From 4ed7f9c86329a1577b6a8c28fdf749faf5b57464 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Sat, 30 May 2026 16:12:17 -0400 Subject: [PATCH 1/5] Update --- jsdoc-testing/declarations.js | 1 + 1 file changed, 1 insertion(+) diff --git a/jsdoc-testing/declarations.js b/jsdoc-testing/declarations.js index 4cb843650..9c90d0319 100644 --- a/jsdoc-testing/declarations.js +++ b/jsdoc-testing/declarations.js @@ -99,6 +99,7 @@ const files = [ 'src/materials/ShaderMaterial', 'src/materials/ShadowMaterial', 'src/materials/SpriteMaterial', + 'src/math/Box3', 'src/math/interpolants/BezierInterpolant', 'src/math/interpolants/CubicInterpolant', 'src/math/interpolants/DiscreteInterpolant', From bb695e6a8e84242a223b4761cf5459a596172a6c Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Sat, 30 May 2026 16:12:30 -0400 Subject: [PATCH 2/5] Update three.js --- three.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/three.js b/three.js index abec57640..0b6dc718c 160000 --- a/three.js +++ b/three.js @@ -1 +1 @@ -Subproject commit abec57640c2959b45636732bc7692724fc6bc964 +Subproject commit 0b6dc718c923122d81590fa0e595a7ef85851808 From 410d1ebf20897f0bd238a36072ac6f6b868c873b Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Sat, 30 May 2026 16:13:04 -0400 Subject: [PATCH 3/5] Add jsdoc --- jsdoc-testing/jsdoc/build/three.module.d.ts | 1836 ++ jsdoc-testing/jsdoc/build/three.webgpu.d.ts | 23873 ++++++++++++++++ jsdoc-testing/jsdoc/examples/jsm/Addons.d.ts | 269 + .../jsm/animation/AnimationClipCreator.d.ts | 62 + .../examples/jsm/animation/CCDIKSolver.d.ts | 152 + .../examples/jsm/capabilities/WebGL.d.ts | 31 + .../examples/jsm/capabilities/WebGPU.d.ts | 22 + .../jsm/controls/ArcballControls.d.ts | 676 + .../examples/jsm/controls/DragControls.d.ts | 93 + .../jsm/controls/FirstPersonControls.d.ts | 185 + .../examples/jsm/controls/FlyControls.d.ts | 101 + .../examples/jsm/controls/MapControls.d.ts | 18 + .../examples/jsm/controls/OrbitControls.d.ts | 458 + .../jsm/controls/PointerLockControls.d.ts | 105 + .../jsm/controls/TrackballControls.d.ts | 213 + .../jsm/controls/TransformControls.d.ts | 192 + jsdoc-testing/jsdoc/examples/jsm/csm/CSM.d.ts | 214 + .../jsdoc/examples/jsm/csm/CSMFrustum.d.ts | 81 + .../jsdoc/examples/jsm/csm/CSMHelper.d.ts | 60 + .../jsdoc/examples/jsm/csm/CSMShader.d.ts | 11 + .../jsdoc/examples/jsm/csm/CSMShadowNode.d.ts | 175 + .../examples/jsm/curves/CurveExtras.d.ts | 378 + .../jsdoc/examples/jsm/curves/NURBSCurve.d.ts | 70 + .../examples/jsm/curves/NURBSSurface.d.ts | 58 + .../jsdoc/examples/jsm/curves/NURBSUtils.d.ts | 112 + .../examples/jsm/curves/NURBSVolume.d.ts | 38 + .../examples/jsm/effects/AnaglyphEffect.d.ts | 68 + .../examples/jsm/effects/AsciiEffect.d.ts | 72 + .../examples/jsm/effects/OutlineEffect.d.ts | 89 + .../jsm/effects/ParallaxBarrierEffect.d.ts | 36 + .../examples/jsm/effects/StereoEffect.d.ts | 37 + .../jsm/environments/ColorEnvironment.d.ts | 31 + .../jsm/environments/DebugEnvironment.d.ts | 28 + .../jsm/environments/RoomEnvironment.d.ts | 28 + .../examples/jsm/exporters/DRACOExporter.d.ts | 75 + .../examples/jsm/exporters/EXRExporter.d.ts | 45 + .../examples/jsm/exporters/GLTFExporter.d.ts | 130 + .../examples/jsm/exporters/KTX2Exporter.d.ts | 26 + .../examples/jsm/exporters/OBJExporter.d.ts | 23 + .../examples/jsm/exporters/PLYExporter.d.ts | 56 + .../examples/jsm/exporters/STLExporter.d.ts | 36 + .../examples/jsm/exporters/USDZExporter.d.ts | 82 + .../jsm/geometries/BoxLineGeometry.d.ts | 27 + .../jsm/geometries/ConvexGeometry.d.ts | 23 + .../jsm/geometries/DecalGeometry.d.ts | 40 + .../jsm/geometries/ParametricFunctions.d.ts | 36 + .../jsm/geometries/ParametricGeometry.d.ts | 40 + .../jsm/geometries/RoundedBoxGeometry.d.ts | 26 + .../jsm/geometries/TeapotGeometry.d.ts | 37 + .../examples/jsm/geometries/TextGeometry.d.ts | 92 + .../jsdoc/examples/jsm/gpgpu/BitonicSort.d.ts | 263 + .../jsm/helpers/AnimationPathHelper.d.ts | 134 + .../jsm/helpers/LightProbeGridHelper.d.ts | 35 + .../jsm/helpers/LightProbeHelper.d.ts | 42 + .../jsm/helpers/LightProbeHelperGPU.d.ts | 45 + .../examples/jsm/helpers/OctreeHelper.d.ts | 43 + .../jsm/helpers/PositionalAudioHelper.d.ts | 66 + .../examples/jsm/helpers/RapierHelper.d.ts | 32 + .../jsm/helpers/RectAreaLightHelper.d.ts | 43 + .../examples/jsm/helpers/TextureHelper.d.ts | 34 + .../jsm/helpers/TextureHelperGPU.d.ts | 35 + .../jsm/helpers/VertexNormalsHelper.d.ts | 59 + .../jsm/helpers/VertexTangentsHelper.d.ts | 46 + .../examples/jsm/inspector/Extension.d.ts | 4 + .../examples/jsm/inspector/Inspector.d.ts | 76 + .../jsm/inspector/RendererInspector.d.ts | 39 + .../extensions/tsl-graph/TSLGraphEditor.d.ts | 44 + .../extensions/tsl-graph/TSLGraphLoader.d.ts | 24 + .../examples/jsm/inspector/tabs/Console.d.ts | 17 + .../examples/jsm/inspector/tabs/Memory.d.ts | 20 + .../jsm/inspector/tabs/Parameters.d.ts | 37 + .../jsm/inspector/tabs/Performance.d.ts | 20 + .../examples/jsm/inspector/tabs/Settings.d.ts | 10 + .../examples/jsm/inspector/tabs/Timeline.d.ts | 149 + .../examples/jsm/inspector/tabs/Viewer.d.ts | 16 + .../examples/jsm/inspector/ui/Graph.d.ts | 12 + .../jsdoc/examples/jsm/inspector/ui/Item.d.ts | 17 + .../jsdoc/examples/jsm/inspector/ui/List.d.ts | 11 + .../examples/jsm/inspector/ui/Profiler.d.ts | 62 + .../examples/jsm/inspector/ui/Style.d.ts | 3 + .../jsdoc/examples/jsm/inspector/ui/Tab.d.ts | 53 + .../examples/jsm/inspector/ui/Values.d.ts | 75 + .../examples/jsm/inspector/ui/utils.d.ts | 9 + .../jsm/interaction/InteractionManager.d.ts | 77 + .../examples/jsm/interactive/HTMLMesh.d.ts | 31 + .../jsm/interactive/InteractiveGroup.d.ts | 81 + .../jsm/interactive/SelectionBox.d.ts | 83 + .../jsdoc/examples/jsm/libs/ammo.wasm.d.ts | 6 + .../jsm/libs/basis/basis_transcoder.d.ts | 2 + .../jsm/libs/chevrotain.module.min.d.ts | 2 + .../jsdoc/examples/jsm/libs/demuxer_mp4.d.ts | 8 + .../jsm/libs/draco/draco_decoder.d.ts | 5 + .../jsm/libs/draco/draco_encoder.d.ts | 5 + .../jsm/libs/draco/draco_wasm_wrapper.d.ts | 5 + .../jsm/libs/draco/gltf/draco_decoder.d.ts | 5 + .../jsm/libs/draco/gltf/draco_encoder.d.ts | 5 + .../libs/draco/gltf/draco_wasm_wrapper.d.ts | 5 + .../jsdoc/examples/jsm/libs/ecsy.module.d.ts | 344 + .../examples/jsm/libs/ktx-parse.module.d.ts | 299 + .../jsm/libs/meshopt_decoder.module.d.ts | 19 + .../examples/jsm/libs/mikktspace.module.d.ts | 16 + .../jsm/libs/motion-controllers.module.d.ts | 64 + .../examples/jsm/libs/opentype.module.d.ts | 1094 + .../examples/jsm/libs/potpack.module.d.ts | 34 + .../examples/jsm/libs/rhino3dm/rhino3dm.d.ts | 5 + .../jsm/libs/rhino3dm/rhino3dm.module.d.ts | 2 + .../jsdoc/examples/jsm/libs/stats.module.d.ts | 18 + .../jsdoc/examples/jsm/libs/surfaceNet.d.ts | 15 + .../jsdoc/examples/jsm/libs/utif.module.d.ts | 156 + .../examples/jsm/libs/zstddec.module.d.ts | 6 + .../jsm/lighting/ClusteredLighting.d.ts | 42 + .../jsm/lighting/DynamicLighting.d.ts | 54 + .../examples/jsm/lighting/LightProbeGrid.d.ts | 142 + .../examples/jsm/lighting/TiledLighting.d.ts | 25 + .../jsm/lights/LightProbeGenerator.d.ts | 30 + .../jsm/lights/RectAreaLightTexturesLib.d.ts | 32 + .../jsm/lights/RectAreaLightUniformsLib.d.ts | 19 + .../jsdoc/examples/jsm/lines/Line2.d.ts | 44 + .../examples/jsm/lines/LineGeometry.d.ts | 58 + .../examples/jsm/lines/LineMaterial.d.ts | 89 + .../examples/jsm/lines/LineSegments2.d.ts | 60 + .../jsm/lines/LineSegmentsGeometry.d.ts | 73 + .../jsdoc/examples/jsm/lines/Wireframe.d.ts | 46 + .../jsm/lines/WireframeGeometry2.d.ts | 30 + .../examples/jsm/lines/webgpu/Line2.d.ts | 33 + .../jsm/lines/webgpu/LineSegments2.d.ts | 51 + .../examples/jsm/lines/webgpu/Wireframe.d.ts | 37 + .../jsdoc/examples/jsm/loaders/3DMLoader.d.ts | 110 + .../jsdoc/examples/jsm/loaders/3MFLoader.d.ts | 66 + .../jsdoc/examples/jsm/loaders/AMFLoader.d.ts | 43 + .../jsdoc/examples/jsm/loaders/BVHLoader.d.ts | 71 + .../examples/jsm/loaders/ColladaLoader.d.ts | 49 + .../jsdoc/examples/jsm/loaders/DDSLoader.d.ts | 30 + .../examples/jsm/loaders/DRACOLoader.d.ts | 116 + .../jsdoc/examples/jsm/loaders/EXRLoader.d.ts | 73 + .../jsdoc/examples/jsm/loaders/FBXLoader.d.ts | 52 + .../examples/jsm/loaders/FontLoader.d.ts | 75 + .../examples/jsm/loaders/GCodeLoader.d.ts | 48 + .../examples/jsm/loaders/GLTFLoader.d.ts | 395 + .../jsm/loaders/HDRCubeTextureLoader.d.ts | 58 + .../jsdoc/examples/jsm/loaders/HDRLoader.d.ts | 45 + .../jsdoc/examples/jsm/loaders/IESLoader.d.ts | 51 + .../jsdoc/examples/jsm/loaders/KMZLoader.d.ts | 38 + .../examples/jsm/loaders/KTX2Loader.d.ts | 188 + .../jsdoc/examples/jsm/loaders/KTXLoader.d.ts | 34 + .../examples/jsm/loaders/LDrawLoader.d.ts | 256 + .../examples/jsm/loaders/LUT3dlLoader.d.ts | 62 + .../examples/jsm/loaders/LUTCubeLoader.d.ts | 68 + .../examples/jsm/loaders/LUTImageLoader.d.ts | 58 + .../jsdoc/examples/jsm/loaders/LWOLoader.d.ts | 55 + .../examples/jsm/loaders/LottieLoader.d.ts | 52 + .../jsdoc/examples/jsm/loaders/MD2Loader.d.ts | 43 + .../jsdoc/examples/jsm/loaders/MDDLoader.d.ts | 71 + .../jsdoc/examples/jsm/loaders/MTLLoader.d.ts | 107 + .../examples/jsm/loaders/MaterialXLoader.d.ts | 60 + .../examples/jsm/loaders/NRRDLoader.d.ts | 46 + .../jsdoc/examples/jsm/loaders/OBJLoader.d.ts | 58 + .../jsdoc/examples/jsm/loaders/PCDLoader.d.ts | 67 + .../jsdoc/examples/jsm/loaders/PDBLoader.d.ts | 45 + .../jsdoc/examples/jsm/loaders/PLYLoader.d.ts | 76 + .../jsdoc/examples/jsm/loaders/PVRLoader.d.ts | 30 + .../examples/jsm/loaders/RGBELoader.d.ts | 3 + .../jsdoc/examples/jsm/loaders/STLLoader.d.ts | 69 + .../jsdoc/examples/jsm/loaders/SVGLoader.d.ts | 150 + .../jsdoc/examples/jsm/loaders/TDSLoader.d.ts | 141 + .../jsdoc/examples/jsm/loaders/TGALoader.d.ts | 28 + .../examples/jsm/loaders/TIFFLoader.d.ts | 28 + .../jsdoc/examples/jsm/loaders/TTFLoader.d.ts | 48 + .../jsdoc/examples/jsm/loaders/USDLoader.d.ts | 48 + .../examples/jsm/loaders/USDZLoader.d.ts | 3 + .../examples/jsm/loaders/UltraHDRLoader.d.ts | 82 + .../jsdoc/examples/jsm/loaders/VOXLoader.d.ts | 54 + .../examples/jsm/loaders/VRMLLoader.d.ts | 40 + .../jsdoc/examples/jsm/loaders/VTKLoader.d.ts | 48 + .../jsdoc/examples/jsm/loaders/XYZLoader.d.ts | 42 + .../jsm/loaders/collada/ColladaComposer.d.ts | 154 + .../jsm/loaders/collada/ColladaParser.d.ts | 234 + .../examples/jsm/loaders/lwo/IFFParser.d.ts | 121 + .../examples/jsm/loaders/lwo/LWO2Parser.d.ts | 5 + .../examples/jsm/loaders/lwo/LWO3Parser.d.ts | 5 + .../examples/jsm/loaders/usd/USDAParser.d.ts | 31 + .../examples/jsm/loaders/usd/USDCParser.d.ts | 70 + .../examples/jsm/loaders/usd/USDComposer.d.ts | 226 + .../LDrawConditionalLineMaterial.d.ts | 21 + .../LDrawConditionalLineNodeMaterial.d.ts | 34 + .../jsm/materials/WoodNodeMaterial.d.ts | 39 + .../jsdoc/examples/jsm/math/Capsule.d.ts | 82 + .../examples/jsm/math/ColorConverter.d.ts | 34 + .../jsdoc/examples/jsm/math/ColorSpaces.d.ts | 94 + .../jsdoc/examples/jsm/math/ConvexHull.d.ts | 533 + .../examples/jsm/math/ImprovedNoise.d.ts | 19 + .../jsdoc/examples/jsm/math/Lut.d.ts | 133 + .../examples/jsm/math/MeshSurfaceSampler.d.ts | 95 + .../jsdoc/examples/jsm/math/OBB.d.ts | 150 + .../jsdoc/examples/jsm/math/Octree.d.ts | 195 + .../jsdoc/examples/jsm/math/SimplexNoise.d.ts | 52 + .../jsm/misc/ConvexObjectBreaker.d.ts | 93 + .../jsdoc/examples/jsm/misc/Gyroscope.d.ts | 13 + .../jsdoc/examples/jsm/misc/MD2Character.d.ts | 133 + .../jsm/misc/MD2CharacterComplex.d.ts | 210 + .../examples/jsm/misc/MorphAnimMesh.d.ts | 55 + .../examples/jsm/misc/MorphBlendMesh.d.ts | 124 + .../jsm/misc/ProgressiveLightMap.d.ts | 87 + .../jsm/misc/ProgressiveLightMapGPU.d.ts | 83 + .../examples/jsm/misc/RollerCoaster.d.ts | 69 + .../jsdoc/examples/jsm/misc/TubePainter.d.ts | 68 + .../jsdoc/examples/jsm/misc/Volume.d.ts | 163 + .../jsdoc/examples/jsm/misc/VolumeSlice.d.ts | 99 + .../examples/jsm/modifiers/CurveModifier.d.ts | 79 + .../jsm/modifiers/CurveModifierGPU.d.ts | 37 + .../jsm/modifiers/EdgeSplitModifier.d.ts | 24 + .../jsm/modifiers/SimplifyModifier.d.ts | 26 + .../jsm/modifiers/TessellateModifier.d.ts | 43 + .../examples/jsm/objects/GroundedSkybox.d.ts | 30 + .../jsdoc/examples/jsm/objects/Lensflare.d.ts | 125 + .../examples/jsm/objects/LensflareMesh.d.ts | 59 + .../jsm/objects/ReflectorForSSRPass.d.ts | 139 + .../jsdoc/examples/jsm/objects/Refractor.d.ts | 112 + .../examples/jsm/objects/ShadowMesh.d.ts | 48 + .../jsdoc/examples/jsm/objects/Sky.d.ts | 108 + .../jsdoc/examples/jsm/objects/SkyMesh.d.ts | 127 + .../jsdoc/examples/jsm/objects/Water.d.ts | 92 + .../jsdoc/examples/jsm/objects/Water2.d.ts | 145 + .../examples/jsm/objects/Water2Mesh.d.ts | 72 + .../jsdoc/examples/jsm/objects/WaterMesh.d.ts | 127 + .../jsdoc/examples/jsm/offscreen/jank.d.ts | 2 + .../examples/jsm/offscreen/offscreen.d.ts | 1 + .../jsdoc/examples/jsm/offscreen/scene.d.ts | 2 + .../examples/jsm/physics/AmmoPhysics.d.ts | 54 + .../examples/jsm/physics/JoltPhysics.d.ts | 53 + .../examples/jsm/physics/RapierPhysics.d.ts | 98 + .../jsm/postprocessing/AfterimagePass.d.ts | 75 + .../jsm/postprocessing/BloomPass.d.ts | 79 + .../jsm/postprocessing/BokehPass.d.ts | 102 + .../jsm/postprocessing/ClearPass.d.ts | 50 + .../jsm/postprocessing/CubeTexturePass.d.ts | 61 + .../jsm/postprocessing/DotScreenPass.d.ts | 55 + .../jsm/postprocessing/EffectComposer.d.ts | 158 + .../examples/jsm/postprocessing/FXAAPass.d.ts | 25 + .../examples/jsm/postprocessing/FilmPass.d.ts | 53 + .../examples/jsm/postprocessing/GTAOPass.d.ts | 184 + .../jsm/postprocessing/GlitchPass.d.ts | 61 + .../jsm/postprocessing/HalftonePass.d.ts | 66 + .../examples/jsm/postprocessing/LUTPass.d.ts | 27 + .../examples/jsm/postprocessing/MaskPass.d.ts | 79 + .../jsm/postprocessing/OutlinePass.d.ts | 177 + .../jsm/postprocessing/OutputPass.d.ts | 56 + .../examples/jsm/postprocessing/Pass.d.ts | 115 + .../jsm/postprocessing/RenderPass.d.ts | 89 + .../postprocessing/RenderPixelatedPass.d.ts | 101 + .../postprocessing/RenderTransitionPass.d.ts | 107 + .../examples/jsm/postprocessing/SAOPass.d.ts | 97 + .../examples/jsm/postprocessing/SMAAPass.d.ts | 51 + .../jsm/postprocessing/SSAARenderPass.d.ts | 105 + .../examples/jsm/postprocessing/SSAOPass.d.ts | 137 + .../examples/jsm/postprocessing/SSRPass.d.ts | 218 + .../examples/jsm/postprocessing/SavePass.d.ts | 62 + .../jsm/postprocessing/ShaderPass.d.ts | 59 + .../jsm/postprocessing/TAARenderPass.d.ts | 59 + .../jsm/postprocessing/TexturePass.d.ts | 64 + .../jsm/postprocessing/UnrealBloomPass.d.ts | 112 + .../examples/jsm/renderers/CSS2DRenderer.d.ts | 109 + .../examples/jsm/renderers/CSS3DRenderer.d.ts | 121 + .../examples/jsm/renderers/Projector.d.ts | 75 + .../examples/jsm/renderers/SVGRenderer.d.ts | 150 + .../shaders/ACESFilmicToneMappingShader.d.ts | 15 + .../jsm/shaders/AfterimageShader.d.ts | 11 + .../examples/jsm/shaders/BasicShader.d.ts | 11 + .../jsm/shaders/BleachBypassShader.d.ts | 12 + .../examples/jsm/shaders/BlendShader.d.ts | 11 + .../examples/jsm/shaders/BokehShader.d.ts | 12 + .../examples/jsm/shaders/BokehShader2.d.ts | 28 + .../jsm/shaders/BrightnessContrastShader.d.ts | 13 + .../jsm/shaders/ColorCorrectionShader.d.ts | 11 + .../examples/jsm/shaders/ColorifyShader.d.ts | 11 + .../jsm/shaders/ConvolutionShader.d.ts | 11 + .../examples/jsm/shaders/CopyShader.d.ts | 11 + .../examples/jsm/shaders/DOFMipMapShader.d.ts | 13 + .../jsm/shaders/DepthLimitedBlurShader.d.ts | 18 + .../examples/jsm/shaders/DigitalGlitch.d.ts | 11 + .../examples/jsm/shaders/DotScreenShader.d.ts | 11 + .../examples/jsm/shaders/ExposureShader.d.ts | 11 + .../examples/jsm/shaders/FXAAShader.d.ts | 15 + .../examples/jsm/shaders/FilmShader.d.ts | 13 + .../examples/jsm/shaders/FocusShader.d.ts | 11 + .../examples/jsm/shaders/FreiChenShader.d.ts | 14 + .../examples/jsm/shaders/GTAOShader.d.ts | 31 + .../jsm/shaders/GammaCorrectionShader.d.ts | 14 + .../examples/jsm/shaders/HalftoneShader.d.ts | 16 + .../jsm/shaders/HorizontalBlurShader.d.ts | 18 + .../shaders/HorizontalTiltShiftShader.d.ts | 16 + .../jsm/shaders/HueSaturationShader.d.ts | 14 + .../examples/jsm/shaders/KaleidoShader.d.ts | 17 + .../jsm/shaders/LuminosityHighPassShader.d.ts | 11 + .../jsm/shaders/LuminosityShader.d.ts | 11 + .../examples/jsm/shaders/MirrorShader.d.ts | 13 + .../examples/jsm/shaders/NormalMapShader.d.ts | 10 + .../examples/jsm/shaders/OutputShader.d.ts | 14 + .../jsm/shaders/PoissonDenoiseShader.d.ts | 16 + .../examples/jsm/shaders/RGBShiftShader.d.ts | 17 + .../jsdoc/examples/jsm/shaders/SAOShader.d.ts | 13 + .../examples/jsm/shaders/SMAAShader.d.ts | 31 + .../examples/jsm/shaders/SSAOShader.d.ts | 30 + .../jsdoc/examples/jsm/shaders/SSRShader.d.ts | 30 + .../examples/jsm/shaders/SepiaShader.d.ts | 11 + .../jsm/shaders/SobelOperatorShader.d.ts | 13 + .../shaders/SubsurfaceScatteringShader.d.ts | 13 + .../jsm/shaders/TechnicolorShader.d.ts | 13 + .../examples/jsm/shaders/ToonShader.d.ts | 34 + .../jsm/shaders/TriangleBlurShader.d.ts | 15 + .../jsm/shaders/UnpackDepthRGBAShader.d.ts | 11 + .../examples/jsm/shaders/VelocityShader.d.ts | 11 + .../jsm/shaders/VerticalBlurShader.d.ts | 16 + .../jsm/shaders/VerticalTiltShiftShader.d.ts | 16 + .../examples/jsm/shaders/VignetteShader.d.ts | 11 + .../examples/jsm/shaders/VolumeShader.d.ts | 13 + .../jsm/shaders/WaterRefractionShader.d.ts | 11 + .../examples/jsm/textures/FlakesTexture.d.ts | 17 + .../jsdoc/examples/jsm/transpiler/AST.d.ts | 190 + .../examples/jsm/transpiler/GLSLDecoder.d.ts | 70 + .../jsdoc/examples/jsm/transpiler/Linker.d.ts | 17 + .../jsm/transpiler/ShaderToyDecoder.d.ts | 4 + .../examples/jsm/transpiler/TSLEncoder.d.ts | 29 + .../examples/jsm/transpiler/Transpiler.d.ts | 48 + .../jsm/transpiler/TranspilerUtils.d.ts | 4 + .../examples/jsm/transpiler/WGSLEncoder.d.ts | 24 + .../jsm/tsl/display/AfterImageNode.d.ts | 93 + .../jsm/tsl/display/AnaglyphPassNode.d.ts | 135 + .../jsm/tsl/display/BilateralBlurNode.d.ts | 138 + .../jsm/tsl/display/BleachBypass.d.ts | 10 + .../examples/jsm/tsl/display/BloomNode.d.ts | 238 + .../jsdoc/examples/jsm/tsl/display/CRT.d.ts | 58 + .../tsl/display/ChromaticAberrationNode.d.ts | 53 + .../examples/jsm/tsl/display/DenoiseNode.d.ts | 115 + .../jsm/tsl/display/DepthOfFieldNode.d.ts | 205 + .../jsm/tsl/display/DotScreenNode.d.ts | 44 + .../examples/jsm/tsl/display/FSR1Node.d.ts | 112 + .../examples/jsm/tsl/display/FXAANode.d.ts | 44 + .../examples/jsm/tsl/display/FilmNode.d.ts | 56 + .../examples/jsm/tsl/display/GTAONode.d.ts | 211 + .../jsm/tsl/display/GaussianBlurNode.d.ts | 168 + .../examples/jsm/tsl/display/GodraysNode.d.ts | 201 + .../jsm/tsl/display/LensflareNode.d.ts | 132 + .../examples/jsm/tsl/display/Lut3DNode.d.ts | 51 + .../examples/jsm/tsl/display/MotionBlur.d.ts | 11 + .../examples/jsm/tsl/display/OutlineNode.d.ts | 351 + .../tsl/display/ParallaxBarrierPassNode.d.ts | 26 + .../jsm/tsl/display/PixelationPassNode.d.ts | 134 + .../jsm/tsl/display/RGBShiftNode.d.ts | 45 + .../jsm/tsl/display/RetroPassNode.d.ts | 40 + .../examples/jsm/tsl/display/SMAANode.d.ts | 166 + .../jsm/tsl/display/SSAAPassNode.d.ts | 82 + .../examples/jsm/tsl/display/SSGINode.d.ts | 263 + .../examples/jsm/tsl/display/SSRNode.d.ts | 235 + .../examples/jsm/tsl/display/SSSNode.d.ts | 226 + .../jsdoc/examples/jsm/tsl/display/Sepia.d.ts | 9 + .../jsdoc/examples/jsm/tsl/display/Shape.d.ts | 12 + .../examples/jsm/tsl/display/SharpenNode.d.ts | 96 + .../jsm/tsl/display/SobelOperatorNode.d.ts | 45 + .../tsl/display/StereoCompositePassNode.d.ts | 86 + .../jsm/tsl/display/StereoPassNode.d.ts | 39 + .../examples/jsm/tsl/display/TAAUNode.d.ts | 275 + .../examples/jsm/tsl/display/TRAANode.d.ts | 239 + .../jsm/tsl/display/TransitionNode.d.ts | 65 + .../examples/jsm/tsl/display/boxBlur.d.ts | 24 + .../jsm/tsl/display/depthAwareBlend.d.ts | 17 + .../examples/jsm/tsl/display/hashBlur.d.ts | 22 + .../examples/jsm/tsl/display/radialBlur.d.ts | 20 + .../jsm/tsl/lighting/ClusteredLightsNode.d.ts | 80 + .../jsm/tsl/lighting/DynamicLightsNode.d.ts | 38 + .../jsm/tsl/lighting/TiledLightsNode.d.ts | 87 + .../lighting/data/AmbientLightDataNode.d.ts | 17 + .../data/DirectionalLightDataNode.d.ts | 24 + .../data/HemisphereLightDataNode.d.ts | 24 + .../tsl/lighting/data/PointLightDataNode.d.ts | 26 + .../tsl/lighting/data/SpotLightDataNode.d.ts | 30 + .../jsdoc/examples/jsm/tsl/math/Bayer.d.ts | 29 + .../jsm/tsl/shadows/TileShadowNode.d.ts | 115 + .../jsm/tsl/shadows/TileShadowNodeHelper.d.ts | 33 + .../jsm/tsl/utils/GroundedSkybox.d.ts | 15 + .../examples/jsm/tsl/utils/Raymarching.d.ts | 1 + .../jsm/utils/BufferGeometryUtils.d.ts | 123 + .../jsdoc/examples/jsm/utils/CameraUtils.d.ts | 14 + .../jsdoc/examples/jsm/utils/ColorUtils.d.ts | 20 + .../jsm/utils/GeometryCompressionUtils.d.ts | 23 + .../examples/jsm/utils/GeometryUtils.d.ts | 48 + .../jsdoc/examples/jsm/utils/LDrawUtils.d.ts | 17 + .../examples/jsm/utils/SceneOptimizer.d.ts | 72 + .../jsdoc/examples/jsm/utils/SceneUtils.d.ts | 72 + .../examples/jsm/utils/ShadowMapViewer.d.ts | 72 + .../jsm/utils/ShadowMapViewerGPU.d.ts | 71 + .../examples/jsm/utils/SkeletonUtils.d.ts | 97 + .../jsdoc/examples/jsm/utils/SortUtils.d.ts | 1 + .../jsdoc/examples/jsm/utils/UVsDebug.d.ts | 16 + .../examples/jsm/utils/WebGLTextureUtils.d.ts | 14 + .../jsm/utils/WebGPUTextureUtils.d.ts | 15 + .../jsdoc/examples/jsm/utils/WorkerPool.d.ts | 79 + .../jsdoc/examples/jsm/webxr/ARButton.d.ts | 22 + .../examples/jsm/webxr/OculusHandModel.d.ts | 87 + .../jsm/webxr/OculusHandPointerModel.d.ts | 151 + .../jsdoc/examples/jsm/webxr/Text2D.d.ts | 15 + .../jsdoc/examples/jsm/webxr/VRButton.d.ts | 31 + .../examples/jsm/webxr/WebGLXRFallback.d.ts | 8 + .../jsdoc/examples/jsm/webxr/XRButton.d.ts | 26 + .../jsm/webxr/XRControllerModelFactory.d.ts | 96 + .../examples/jsm/webxr/XREstimatedLight.d.ts | 44 + .../examples/jsm/webxr/XRHandMeshModel.d.ts | 44 + .../jsm/webxr/XRHandModelFactory.d.ts | 102 + .../jsm/webxr/XRHandPrimitiveModel.d.ts | 54 + .../jsdoc/examples/jsm/webxr/XRPlanes.d.ts | 22 + jsdoc-testing/jsdoc/src/Three.Core.d.ts | 162 + jsdoc-testing/jsdoc/src/Three.Legacy.d.ts | 1 + .../jsdoc/src/Three.WebGPU.Nodes.d.ts | 29 + jsdoc-testing/jsdoc/src/Three.WebGPU.d.ts | 35 + jsdoc-testing/jsdoc/src/Three.d.ts | 9 + .../jsdoc/src/animation/AnimationAction.d.ts | 311 + .../jsdoc/src/animation/AnimationClip.d.ts | 154 + .../jsdoc/src/animation/AnimationMixer.d.ts | 152 + .../src/animation/AnimationObjectGroup.d.ts | 77 + .../jsdoc/src/animation/AnimationUtils.d.ts | 131 + .../jsdoc/src/animation/KeyframeTrack.d.ts | 178 + .../jsdoc/src/animation/PropertyBinding.d.ts | 144 + .../jsdoc/src/animation/PropertyMixer.d.ts | 95 + .../tracks/BooleanKeyframeTrack.d.ts | 28 + .../animation/tracks/ColorKeyframeTrack.d.ts | 17 + .../animation/tracks/NumberKeyframeTrack.d.ts | 17 + .../tracks/QuaternionKeyframeTrack.d.ts | 18 + .../animation/tracks/StringKeyframeTrack.d.ts | 28 + .../animation/tracks/VectorKeyframeTrack.d.ts | 17 + jsdoc-testing/jsdoc/src/audio/Audio.d.ts | 379 + .../jsdoc/src/audio/AudioAnalyser.d.ts | 65 + .../jsdoc/src/audio/AudioContext.d.ts | 19 + .../jsdoc/src/audio/AudioListener.d.ts | 91 + .../jsdoc/src/audio/PositionalAudio.d.ts | 115 + .../jsdoc/src/cameras/ArrayCamera.d.ts | 42 + jsdoc-testing/jsdoc/src/cameras/Camera.d.ts | 56 + .../jsdoc/src/cameras/CubeCamera.d.ts | 74 + .../jsdoc/src/cameras/OrthographicCamera.d.ts | 122 + .../jsdoc/src/cameras/PerspectiveCamera.d.ts | 216 + .../jsdoc/src/cameras/StereoCamera.d.ts | 61 + jsdoc-testing/jsdoc/src/constants.d.ts | 1592 ++ .../jsdoc/src/core/BufferAttribute.d.ts | 487 + .../jsdoc/src/core/BufferGeometry.d.ts | 391 + jsdoc-testing/jsdoc/src/core/Clock.d.ts | 73 + .../jsdoc/src/core/EventDispatcher.d.ts | 53 + .../jsdoc/src/core/GLBufferAttribute.d.ts | 122 + .../src/core/InstancedBufferAttribute.d.ts | 36 + .../src/core/InstancedBufferGeometry.d.ts | 22 + .../src/core/InstancedInterleavedBuffer.d.ts | 35 + .../jsdoc/src/core/InterleavedBuffer.d.ts | 153 + .../src/core/InterleavedBufferAttribute.d.ts | 226 + jsdoc-testing/jsdoc/src/core/Layers.d.ts | 68 + jsdoc-testing/jsdoc/src/core/Object3D.d.ts | 584 + jsdoc-testing/jsdoc/src/core/Raycaster.d.ts | 145 + .../jsdoc/src/core/RenderTarget.d.ts | 207 + .../jsdoc/src/core/RenderTarget3D.d.ts | 25 + jsdoc-testing/jsdoc/src/core/Timer.d.ts | 86 + jsdoc-testing/jsdoc/src/core/Uniform.d.ts | 34 + .../jsdoc/src/core/UniformsGroup.d.ts | 87 + jsdoc-testing/jsdoc/src/extras/Controls.d.ts | 93 + jsdoc-testing/jsdoc/src/extras/DataUtils.d.ts | 39 + jsdoc-testing/jsdoc/src/extras/Earcut.d.ts | 18 + .../jsdoc/src/extras/ImageUtils.d.ts | 22 + .../jsdoc/src/extras/PMREMGenerator.d.ts | 556 + .../jsdoc/src/extras/ShapeUtils.d.ts | 29 + .../jsdoc/src/extras/TextureUtils.d.ts | 81 + .../jsdoc/src/extras/core/Curve.d.ts | 170 + .../jsdoc/src/extras/core/CurvePath.d.ts | 56 + .../jsdoc/src/extras/core/Interpolations.d.ts | 39 + jsdoc-testing/jsdoc/src/extras/core/Path.d.ts | 151 + .../jsdoc/src/extras/core/Shape.d.ts | 76 + .../jsdoc/src/extras/core/ShapePath.d.ts | 93 + .../jsdoc/src/extras/curves/ArcCurve.d.ts | 27 + .../src/extras/curves/CatmullRomCurve3.d.ts | 83 + .../src/extras/curves/CubicBezierCurve.d.ts | 78 + .../src/extras/curves/CubicBezierCurve3.d.ts | 61 + .../jsdoc/src/extras/curves/Curves.d.ts | 10 + .../jsdoc/src/extras/curves/EllipseCurve.d.ts | 117 + .../jsdoc/src/extras/curves/LineCurve.d.ts | 50 + .../jsdoc/src/extras/curves/LineCurve3.d.ts | 50 + .../extras/curves/QuadraticBezierCurve.d.ts | 70 + .../extras/curves/QuadraticBezierCurve3.d.ts | 54 + .../jsdoc/src/extras/curves/SplineCurve.d.ts | 59 + .../jsdoc/src/extras/lib/earcut.d.ts | 7 + .../jsdoc/src/geometries/BoxGeometry.d.ts | 46 + .../jsdoc/src/geometries/CapsuleGeometry.d.ts | 43 + .../jsdoc/src/geometries/CircleGeometry.d.ts | 48 + .../jsdoc/src/geometries/ConeGeometry.d.ts | 29 + .../src/geometries/CylinderGeometry.d.ts | 47 + .../src/geometries/DodecahedronGeometry.d.ts | 23 + .../jsdoc/src/geometries/EdgesGeometry.d.ts | 34 + .../jsdoc/src/geometries/ExtrudeGeometry.d.ts | 97 + .../jsdoc/src/geometries/Geometries.d.ts | 21 + .../src/geometries/IcosahedronGeometry.d.ts | 23 + .../jsdoc/src/geometries/LatheGeometry.d.ts | 50 + .../src/geometries/OctahedronGeometry.d.ts | 23 + .../jsdoc/src/geometries/PlaneGeometry.d.ts | 42 + .../src/geometries/PolyhedronGeometry.d.ts | 36 + .../jsdoc/src/geometries/RingGeometry.d.ts | 44 + .../jsdoc/src/geometries/ShapeGeometry.d.ts | 47 + .../jsdoc/src/geometries/SphereGeometry.d.ts | 45 + .../src/geometries/TetrahedronGeometry.d.ts | 23 + .../jsdoc/src/geometries/TorusGeometry.d.ts | 45 + .../src/geometries/TorusKnotGeometry.d.ts | 46 + .../jsdoc/src/geometries/TubeGeometry.d.ts | 60 + .../src/geometries/WireframeGeometry.d.ts | 38 + .../jsdoc/src/helpers/ArrowHelper.d.ts | 75 + .../jsdoc/src/helpers/AxesHelper.d.ts | 35 + .../jsdoc/src/helpers/Box3Helper.d.ts | 35 + .../jsdoc/src/helpers/BoxHelper.d.ts | 44 + .../jsdoc/src/helpers/CameraHelper.d.ts | 64 + .../src/helpers/DirectionalLightHelper.d.ts | 68 + .../jsdoc/src/helpers/GridHelper.d.ts | 32 + .../src/helpers/HemisphereLightHelper.d.ts | 55 + .../jsdoc/src/helpers/PlaneHelper.d.ts | 41 + .../jsdoc/src/helpers/PointLightHelper.d.ts | 52 + .../jsdoc/src/helpers/PolarGridHelper.d.ts | 36 + .../jsdoc/src/helpers/SkeletonHelper.d.ts | 56 + .../jsdoc/src/helpers/SpotLightHelper.d.ts | 54 + .../jsdoc/src/lights/AmbientLight.d.ts | 30 + .../jsdoc/src/lights/DirectionalLight.d.ts | 67 + .../src/lights/DirectionalLightShadow.d.ts | 20 + .../jsdoc/src/lights/HemisphereLight.d.ts | 40 + jsdoc-testing/jsdoc/src/lights/Light.d.ts | 47 + .../jsdoc/src/lights/LightProbe.d.ts | 45 + .../jsdoc/src/lights/LightShadow.d.ts | 198 + .../jsdoc/src/lights/PointLight.d.ts | 70 + .../jsdoc/src/lights/PointLightShadow.d.ts | 20 + .../jsdoc/src/lights/RectAreaLight.d.ts | 68 + jsdoc-testing/jsdoc/src/lights/SpotLight.d.ts | 116 + .../jsdoc/src/lights/SpotLightShadow.d.ts | 37 + .../jsdoc/src/lights/webgpu/IESSpotLight.d.ts | 18 + .../src/lights/webgpu/ProjectorLight.d.ts | 17 + .../jsdoc/src/loaders/AnimationLoader.d.ts | 32 + .../jsdoc/src/loaders/AudioLoader.d.ts | 30 + .../src/loaders/BufferGeometryLoader.d.ts | 35 + .../src/loaders/CompressedTextureLoader.d.ts | 61 + .../jsdoc/src/loaders/CubeTextureLoader.d.ts | 45 + .../jsdoc/src/loaders/DataTextureLoader.d.ts | 92 + .../jsdoc/src/loaders/FileLoader.d.ts | 68 + .../jsdoc/src/loaders/ImageBitmapLoader.d.ts | 79 + .../jsdoc/src/loaders/ImageLoader.d.ts | 29 + jsdoc-testing/jsdoc/src/loaders/Loader.d.ts | 141 + .../jsdoc/src/loaders/LoaderUtils.d.ts | 22 + .../jsdoc/src/loaders/MaterialLoader.d.ts | 63 + .../jsdoc/src/loaders/ObjectLoader.d.ts | 91 + .../jsdoc/src/loaders/TextureLoader.d.ts | 33 + .../jsdoc/src/loaders/nodes/NodeLoader.d.ts | 84 + .../src/loaders/nodes/NodeMaterialLoader.d.ts | 57 + .../src/loaders/nodes/NodeObjectLoader.d.ts | 96 + .../src/materials/LineBasicMaterial.d.ts | 86 + .../src/materials/LineDashedMaterial.d.ts | 49 + .../jsdoc/src/materials/Material.d.ts | 497 + .../jsdoc/src/materials/Materials.d.ts | 19 + .../src/materials/MeshBasicMaterial.d.ts | 184 + .../src/materials/MeshDepthMaterial.d.ts | 106 + .../src/materials/MeshDistanceMaterial.d.ts | 86 + .../src/materials/MeshLambertMaterial.d.ts | 307 + .../src/materials/MeshMatcapMaterial.d.ts | 182 + .../src/materials/MeshNormalMaterial.d.ts | 129 + .../src/materials/MeshPhongMaterial.d.ts | 322 + .../src/materials/MeshPhysicalMaterial.d.ts | 310 + .../src/materials/MeshStandardMaterial.d.ts | 328 + .../jsdoc/src/materials/MeshToonMaterial.d.ts | 244 + .../jsdoc/src/materials/PointsMaterial.d.ts | 102 + .../src/materials/RawShaderMaterial.d.ts | 108 + .../jsdoc/src/materials/ShaderMaterial.d.ts | 256 + .../jsdoc/src/materials/ShadowMaterial.d.ts | 56 + .../jsdoc/src/materials/SpriteMaterial.d.ts | 89 + .../materials/nodes/Line2NodeMaterial.d.ts | 93 + .../nodes/LineBasicNodeMaterial.d.ts | 23 + .../nodes/LineDashedNodeMaterial.d.ts | 78 + .../nodes/MeshBasicNodeMaterial.d.ts | 39 + .../nodes/MeshLambertNodeMaterial.d.ts | 39 + .../nodes/MeshMatcapNodeMaterial.d.ts | 29 + .../nodes/MeshNormalNodeMaterial.d.ts | 28 + .../nodes/MeshPhongNodeMaterial.d.ts | 64 + .../nodes/MeshPhysicalNodeMaterial.d.ts | 276 + .../materials/nodes/MeshSSSNodeMaterial.d.ts | 96 + .../nodes/MeshStandardNodeMaterial.d.ts | 81 + .../materials/nodes/MeshToonNodeMaterial.d.ts | 30 + .../src/materials/nodes/NodeMaterial.d.ts | 505 + .../src/materials/nodes/NodeMaterials.d.ts | 18 + .../materials/nodes/PointsNodeMaterial.d.ts | 49 + .../materials/nodes/ShadowNodeMaterial.d.ts | 30 + .../materials/nodes/SpriteNodeMaterial.d.ts | 62 + .../materials/nodes/VolumeNodeMaterial.d.ts | 48 + .../nodes/manager/NodeMaterialObserver.d.ts | 131 + jsdoc-testing/jsdoc/src/math/Box2.d.ts | 205 + jsdoc-testing/jsdoc/src/math/Box3.d.ts | 298 + jsdoc-testing/jsdoc/src/math/Color.d.ts | 538 + .../jsdoc/src/math/ColorManagement.d.ts | 21 + jsdoc-testing/jsdoc/src/math/Cylindrical.d.ts | 74 + jsdoc-testing/jsdoc/src/math/Euler.d.ts | 164 + jsdoc-testing/jsdoc/src/math/Frustum.d.ts | 100 + .../jsdoc/src/math/FrustumArray.d.ts | 64 + jsdoc-testing/jsdoc/src/math/Interpolant.d.ts | 114 + jsdoc-testing/jsdoc/src/math/Line3.d.ts | 120 + jsdoc-testing/jsdoc/src/math/MathUtils.d.ts | 224 + jsdoc-testing/jsdoc/src/math/Matrix2.d.ts | 70 + jsdoc-testing/jsdoc/src/math/Matrix3.d.ts | 251 + jsdoc-testing/jsdoc/src/math/Matrix4.d.ts | 404 + jsdoc-testing/jsdoc/src/math/Plane.d.ts | 190 + jsdoc-testing/jsdoc/src/math/Quaternion.d.ts | 310 + jsdoc-testing/jsdoc/src/math/Ray.d.ts | 185 + jsdoc-testing/jsdoc/src/math/Sphere.d.ts | 185 + jsdoc-testing/jsdoc/src/math/Spherical.d.ts | 81 + .../jsdoc/src/math/SphericalHarmonics3.d.ts | 131 + jsdoc-testing/jsdoc/src/math/Triangle.d.ts | 231 + jsdoc-testing/jsdoc/src/math/Vector2.d.ts | 440 + jsdoc-testing/jsdoc/src/math/Vector3.d.ts | 613 + jsdoc-testing/jsdoc/src/math/Vector4.d.ts | 443 + .../math/interpolants/BezierInterpolant.d.ts | 21 + .../math/interpolants/CubicInterpolant.d.ts | 22 + .../interpolants/DiscreteInterpolant.d.ts | 10 + .../math/interpolants/LinearInterpolant.d.ts | 9 + .../QuaternionLinearInterpolant.d.ts | 9 + jsdoc-testing/jsdoc/src/nodes/Nodes.d.ts | 141 + jsdoc-testing/jsdoc/src/nodes/TSL.d.ts | 138 + .../src/nodes/accessors/AccessorsUtils.d.ts | 23 + .../jsdoc/src/nodes/accessors/Arrays.d.ts | 2 + .../jsdoc/src/nodes/accessors/BatchNode.d.ts | 47 + .../jsdoc/src/nodes/accessors/Bitangent.d.ts | 28 + .../nodes/accessors/BufferAttributeNode.d.ts | 143 + .../jsdoc/src/nodes/accessors/BufferNode.d.ts | 75 + .../src/nodes/accessors/BuiltinNode.d.ts | 40 + .../jsdoc/src/nodes/accessors/Camera.d.ts | 70 + .../src/nodes/accessors/ClippingNode.d.ts | 65 + .../src/nodes/accessors/CubeTextureNode.d.ts | 48 + .../src/nodes/accessors/InstanceNode.d.ts | 131 + .../nodes/accessors/InstancedMeshNode.d.ts | 31 + .../jsdoc/src/nodes/accessors/Lights.d.ts | 48 + .../src/nodes/accessors/MaterialNode.d.ts | 384 + .../nodes/accessors/MaterialProperties.d.ts | 24 + .../accessors/MaterialReferenceNode.d.ts | 41 + .../jsdoc/src/nodes/accessors/ModelNode.d.ts | 104 + .../accessors/ModelViewProjectionNode.d.ts | 7 + .../jsdoc/src/nodes/accessors/MorphNode.d.ts | 49 + .../jsdoc/src/nodes/accessors/Normal.d.ts | 100 + .../src/nodes/accessors/Object3DNode.d.ts | 128 + .../src/nodes/accessors/PointUVNode.d.ts | 33 + .../jsdoc/src/nodes/accessors/Position.d.ts | 57 + .../nodes/accessors/ReferenceBaseNode.d.ts | 181 + .../src/nodes/accessors/ReferenceNode.d.ts | 197 + .../src/nodes/accessors/ReflectVector.d.ts | 28 + .../accessors/RendererReferenceNode.d.ts | 33 + .../src/nodes/accessors/SceneProperties.d.ts | 21 + .../src/nodes/accessors/SkinningNode.d.ts | 122 + .../nodes/accessors/StorageBufferNode.d.ts | 183 + .../nodes/accessors/StorageTexture3DNode.d.ts | 36 + .../nodes/accessors/StorageTextureNode.d.ts | 146 + .../jsdoc/src/nodes/accessors/Tangent.d.ts | 28 + .../src/nodes/accessors/TangentUtils.d.ts | 20 + .../src/nodes/accessors/Texture3DNode.d.ts | 54 + .../src/nodes/accessors/TextureBicubic.d.ts | 20 + .../src/nodes/accessors/TextureNode.d.ts | 354 + .../src/nodes/accessors/TextureSizeNode.d.ts | 50 + .../jsdoc/src/nodes/accessors/UV.d.ts | 1 + .../src/nodes/accessors/UniformArrayNode.d.ts | 125 + .../src/nodes/accessors/UserDataNode.d.ts | 35 + .../src/nodes/accessors/VelocityNode.d.ts | 79 + .../src/nodes/accessors/VertexColorNode.d.ts | 31 + .../jsdoc/src/nodes/code/CodeNode.d.ts | 79 + .../jsdoc/src/nodes/code/ExpressionNode.d.ts | 35 + .../src/nodes/code/FunctionCallNode.d.ts | 70 + .../jsdoc/src/nodes/code/FunctionNode.d.ts | 70 + .../jsdoc/src/nodes/core/ArrayNode.d.ts | 76 + .../jsdoc/src/nodes/core/AssignNode.d.ts | 65 + .../jsdoc/src/nodes/core/AttributeNode.d.ts | 41 + .../jsdoc/src/nodes/core/BypassNode.d.ts | 54 + .../jsdoc/src/nodes/core/ConstNode.d.ts | 25 + .../jsdoc/src/nodes/core/ContextNode.d.ts | 107 + .../jsdoc/src/nodes/core/IndexNode.d.ts | 88 + .../jsdoc/src/nodes/core/InputNode.d.ts | 61 + .../jsdoc/src/nodes/core/InspectorNode.d.ts | 57 + .../jsdoc/src/nodes/core/IsolateNode.d.ts | 55 + .../jsdoc/src/nodes/core/LightingModel.d.ts | 59 + .../jsdoc/src/nodes/core/MRTNode.d.ts | 106 + jsdoc-testing/jsdoc/src/nodes/core/Node.d.ts | 437 + .../jsdoc/src/nodes/core/NodeAttribute.d.ts | 44 + .../jsdoc/src/nodes/core/NodeBuilder.d.ts | 1335 + .../jsdoc/src/nodes/core/NodeCache.d.ts | 47 + .../jsdoc/src/nodes/core/NodeCode.d.ts | 36 + .../jsdoc/src/nodes/core/NodeError.d.ts | 13 + .../jsdoc/src/nodes/core/NodeFrame.d.ts | 133 + .../jsdoc/src/nodes/core/NodeFunction.d.ts | 55 + .../src/nodes/core/NodeFunctionInput.d.ts | 52 + .../jsdoc/src/nodes/core/NodeParser.d.ts | 15 + .../jsdoc/src/nodes/core/NodeUniform.d.ts | 62 + .../jsdoc/src/nodes/core/NodeUtils.d.ts | 93 + .../jsdoc/src/nodes/core/NodeVar.d.ts | 50 + .../jsdoc/src/nodes/core/NodeVarying.d.ts | 51 + .../src/nodes/core/OutputStructNode.d.ts | 41 + .../jsdoc/src/nodes/core/ParameterNode.d.ts | 35 + .../jsdoc/src/nodes/core/PropertyNode.d.ts | 254 + .../jsdoc/src/nodes/core/StackNode.d.ts | 151 + .../jsdoc/src/nodes/core/StackTrace.d.ts | 44 + .../jsdoc/src/nodes/core/StructNode.d.ts | 33 + .../jsdoc/src/nodes/core/StructType.d.ts | 7 + .../jsdoc/src/nodes/core/StructTypeNode.d.ts | 49 + .../jsdoc/src/nodes/core/SubBuildNode.d.ts | 30 + .../jsdoc/src/nodes/core/TempNode.d.ts | 28 + .../src/nodes/core/UniformGroupNode.d.ts | 77 + .../jsdoc/src/nodes/core/UniformNode.d.ts | 65 + .../jsdoc/src/nodes/core/VarNode.d.ts | 88 + .../jsdoc/src/nodes/core/VaryingNode.d.ts | 80 + .../jsdoc/src/nodes/core/constants.d.ts | 30 + .../jsdoc/src/nodes/display/BlendModes.d.ts | 67 + .../jsdoc/src/nodes/display/BumpMapNode.d.ts | 44 + .../src/nodes/display/ColorAdjustment.d.ts | 76 + .../nodes/display/ColorSpaceFunctions.d.ts | 18 + .../src/nodes/display/ColorSpaceNode.d.ts | 50 + .../src/nodes/display/FrontFacingNode.d.ts | 48 + .../src/nodes/display/NormalMapNode.d.ts | 58 + .../jsdoc/src/nodes/display/PassNode.d.ts | 403 + .../display/PremultiplyAlphaFunctions.d.ts | 28 + .../src/nodes/display/RenderOutputNode.d.ts | 79 + .../jsdoc/src/nodes/display/ScreenNode.d.ts | 127 + .../nodes/display/ToneMappingFunctions.d.ts | 68 + .../src/nodes/display/ToneMappingNode.d.ts | 60 + .../nodes/display/ToonOutlinePassNode.d.ts | 71 + .../src/nodes/display/ViewportDepthNode.d.ts | 105 + .../display/ViewportDepthTextureNode.d.ts | 31 + .../display/ViewportSharedTextureNode.d.ts | 37 + .../nodes/display/ViewportTextureNode.d.ts | 89 + jsdoc-testing/jsdoc/src/nodes/fog/Fog.d.ts | 38 + .../src/nodes/functions/BSDF/BRDF_GGX.d.ts | 2 + .../functions/BSDF/BRDF_GGX_Multiscatter.d.ts | 2 + .../nodes/functions/BSDF/BRDF_Lambert.d.ts | 2 + .../src/nodes/functions/BSDF/BRDF_Sheen.d.ts | 2 + .../src/nodes/functions/BSDF/DFGLUT.d.ts | 2 + .../jsdoc/src/nodes/functions/BSDF/D_GGX.d.ts | 2 + .../functions/BSDF/D_GGX_Anisotropic.d.ts | 2 + .../nodes/functions/BSDF/EnvironmentBRDF.d.ts | 2 + .../src/nodes/functions/BSDF/F_Schlick.d.ts | 2 + .../jsdoc/src/nodes/functions/BSDF/LTC.d.ts | 3 + .../nodes/functions/BSDF/Schlick_to_F0.d.ts | 2 + .../functions/BSDF/V_GGX_SmithCorrelated.d.ts | 2 + .../V_GGX_SmithCorrelated_Anisotropic.d.ts | 2 + .../nodes/functions/BasicLightingModel.d.ts | 23 + .../nodes/functions/PhongLightingModel.d.ts | 31 + .../functions/PhysicalLightingModel.d.ts | 171 + .../src/nodes/functions/ShadowMaskModel.d.ts | 27 + .../nodes/functions/ToonLightingModel.d.ts | 23 + .../functions/VolumetricLightingModel.d.ts | 25 + .../material/getAlphaHashThreshold.d.ts | 2 + .../material/getGeometryRoughness.d.ts | 2 + .../material/getParallaxCorrectNormal.d.ts | 19 + .../functions/material/getRoughness.d.ts | 2 + .../functions/material/getShIrradianceAt.d.ts | 2 + .../jsdoc/src/nodes/geometry/RangeNode.d.ts | 68 + .../src/nodes/gpgpu/AtomicFunctionNode.d.ts | 78 + .../jsdoc/src/nodes/gpgpu/BarrierNode.d.ts | 24 + .../src/nodes/gpgpu/ComputeBuiltinNode.d.ts | 135 + .../jsdoc/src/nodes/gpgpu/ComputeNode.d.ts | 96 + .../src/nodes/gpgpu/SubgroupFunctionNode.d.ts | 303 + .../src/nodes/gpgpu/WorkgroupInfoNode.d.ts | 119 + .../jsdoc/src/nodes/lighting/AONode.d.ts | 25 + .../src/nodes/lighting/AmbientLightNode.d.ts | 12 + .../src/nodes/lighting/AnalyticLightNode.d.ts | 127 + .../nodes/lighting/BasicEnvironmentNode.d.ts | 26 + .../src/nodes/lighting/BasicLightMapNode.d.ts | 24 + .../nodes/lighting/DirectionalLightNode.d.ts | 13 + .../src/nodes/lighting/EnvironmentNode.d.ts | 33 + .../nodes/lighting/HemisphereLightNode.d.ts | 34 + .../src/nodes/lighting/IESSpotLightNode.d.ts | 16 + .../src/nodes/lighting/IrradianceNode.d.ts | 24 + .../src/nodes/lighting/LightProbeNode.d.ts | 22 + .../jsdoc/src/nodes/lighting/LightUtils.d.ts | 11 + .../nodes/lighting/LightingContextNode.d.ts | 83 + .../src/nodes/lighting/LightingNode.d.ts | 21 + .../jsdoc/src/nodes/lighting/LightsNode.d.ts | 119 + .../src/nodes/lighting/PointLightNode.d.ts | 40 + .../src/nodes/lighting/PointShadowNode.d.ts | 52 + .../nodes/lighting/ProjectorLightNode.d.ts | 17 + .../src/nodes/lighting/RectAreaLightNode.d.ts | 41 + .../src/nodes/lighting/ShadowBaseNode.d.ts | 46 + .../src/nodes/lighting/ShadowFilterNode.d.ts | 50 + .../jsdoc/src/nodes/lighting/ShadowNode.d.ts | 193 + .../src/nodes/lighting/SpotLightNode.d.ts | 52 + .../src/nodes/materialx/MaterialXNodes.d.ts | 44 + .../jsdoc/src/nodes/materialx/lib/mx_hsv.d.ts | 2 + .../src/nodes/materialx/lib/mx_noise.d.ts | 70 + .../materialx/lib/mx_transform_color.d.ts | 1 + .../jsdoc/src/nodes/math/BitcastNode.d.ts | 62 + .../jsdoc/src/nodes/math/BitcountNode.d.ts | 111 + .../jsdoc/src/nodes/math/ConditionalNode.d.ts | 65 + jsdoc-testing/jsdoc/src/nodes/math/Hash.d.ts | 9 + .../jsdoc/src/nodes/math/MathNode.d.ts | 701 + .../jsdoc/src/nodes/math/MathUtils.d.ts | 4 + .../jsdoc/src/nodes/math/OperatorNode.d.ts | 312 + .../jsdoc/src/nodes/math/PackFloatNode.d.ts | 66 + .../jsdoc/src/nodes/math/TriNoise3D.d.ts | 11 + .../jsdoc/src/nodes/math/UnpackFloatNode.d.ts | 64 + .../src/nodes/parsers/GLSLNodeFunction.d.ts | 25 + .../src/nodes/parsers/GLSLNodeParser.d.ts | 17 + .../jsdoc/src/nodes/pmrem/PMREMNode.d.ts | 113 + .../jsdoc/src/nodes/pmrem/PMREMUtils.d.ts | 4 + .../jsdoc/src/nodes/procedural/Checker.d.ts | 9 + .../jsdoc/src/nodes/shapes/Shapes.d.ts | 9 + .../jsdoc/src/nodes/tsl/TSLBase.d.ts | 26 + .../jsdoc/src/nodes/tsl/TSLCore.d.ts | 75 + .../src/nodes/utils/ArrayElementNode.d.ts | 53 + .../jsdoc/src/nodes/utils/ConvertNode.d.ts | 41 + .../jsdoc/src/nodes/utils/CubeMapNode.d.ts | 57 + .../jsdoc/src/nodes/utils/DebugNode.d.ts | 12 + .../jsdoc/src/nodes/utils/Discard.d.ts | 2 + .../jsdoc/src/nodes/utils/EquirectUV.d.ts | 17 + .../jsdoc/src/nodes/utils/EventNode.d.ts | 34 + .../jsdoc/src/nodes/utils/FlipNode.d.ts | 46 + .../nodes/utils/FunctionOverloadingNode.d.ts | 60 + .../jsdoc/src/nodes/utils/JoinNode.d.ts | 33 + .../jsdoc/src/nodes/utils/LoopNode.d.ts | 67 + .../jsdoc/src/nodes/utils/MatcapUV.d.ts | 11 + .../src/nodes/utils/MaxMipLevelNode.d.ts | 51 + .../jsdoc/src/nodes/utils/MemberNode.d.ts | 41 + .../jsdoc/src/nodes/utils/Oscillators.d.ts | 4 + .../jsdoc/src/nodes/utils/Packing.d.ts | 3 + .../src/nodes/utils/PostProcessingUtils.d.ts | 66 + .../jsdoc/src/nodes/utils/RTTNode.d.ts | 129 + .../jsdoc/src/nodes/utils/ReflectorNode.d.ts | 233 + .../jsdoc/src/nodes/utils/Remap.d.ts | 30 + .../jsdoc/src/nodes/utils/RotateNode.d.ts | 49 + .../jsdoc/src/nodes/utils/SampleNode.d.ts | 46 + .../jsdoc/src/nodes/utils/SetNode.d.ts | 49 + .../jsdoc/src/nodes/utils/SplitNode.d.ts | 65 + .../jsdoc/src/nodes/utils/SpriteSheetUV.d.ts | 17 + .../jsdoc/src/nodes/utils/SpriteUtils.d.ts | 17 + .../nodes/utils/StorageArrayElementNode.d.ts | 51 + .../jsdoc/src/nodes/utils/Timer.d.ts | 21 + .../src/nodes/utils/TriplanarTextures.d.ts | 21 + .../jsdoc/src/nodes/utils/UVUtils.d.ts | 42 + .../jsdoc/src/nodes/utils/ViewportUtils.d.ts | 13 + .../jsdoc/src/objects/BatchedMesh.d.ts | 366 + jsdoc-testing/jsdoc/src/objects/Bone.d.ts | 26 + .../jsdoc/src/objects/ClippingGroup.d.ts | 50 + jsdoc-testing/jsdoc/src/objects/Group.d.ts | 29 + .../jsdoc/src/objects/InstancedMesh.d.ts | 151 + jsdoc-testing/jsdoc/src/objects/LOD.d.ts | 103 + jsdoc-testing/jsdoc/src/objects/Line.d.ts | 94 + jsdoc-testing/jsdoc/src/objects/LineLoop.d.ts | 25 + .../jsdoc/src/objects/LineSegments.d.ts | 24 + jsdoc-testing/jsdoc/src/objects/Mesh.d.ts | 97 + jsdoc-testing/jsdoc/src/objects/Points.d.ts | 71 + jsdoc-testing/jsdoc/src/objects/Skeleton.d.ts | 134 + .../jsdoc/src/objects/SkinnedMesh.d.ts | 118 + jsdoc-testing/jsdoc/src/objects/Sprite.d.ts | 75 + .../src/renderers/WebGL3DRenderTarget.d.ts | 25 + .../src/renderers/WebGLArrayRenderTarget.d.ts | 25 + .../src/renderers/WebGLCubeRenderTarget.d.ts | 40 + .../src/renderers/WebGLRenderTarget.d.ts | 16 + .../jsdoc/src/renderers/WebGLRenderer.d.ts | 580 + .../jsdoc/src/renderers/common/Animation.d.ts | 92 + .../src/renderers/common/Attributes.d.ts | 52 + .../jsdoc/src/renderers/common/Backend.d.ts | 554 + .../src/renderers/common/Background.d.ts | 40 + .../jsdoc/src/renderers/common/BindGroup.d.ts | 36 + .../jsdoc/src/renderers/common/Binding.d.ts | 49 + .../jsdoc/src/renderers/common/Bindings.d.ts | 120 + .../jsdoc/src/renderers/common/BlendMode.d.ts | 109 + .../jsdoc/src/renderers/common/Buffer.d.ts | 91 + .../src/renderers/common/BufferUtils.d.ts | 28 + .../src/renderers/common/BundleGroup.d.ts | 40 + .../src/renderers/common/CanvasTarget.d.ts | 189 + .../jsdoc/src/renderers/common/ChainMap.d.ts | 48 + .../src/renderers/common/ClippingContext.d.ts | 122 + .../jsdoc/src/renderers/common/Color4.d.ts | 49 + .../src/renderers/common/ComputePipeline.d.ts | 31 + .../jsdoc/src/renderers/common/Constants.d.ts | 9 + .../renderers/common/CubeRenderTarget.d.ts | 42 + .../jsdoc/src/renderers/common/DataMap.d.ts | 41 + .../src/renderers/common/Geometries.d.ts | 103 + .../IndirectStorageBufferAttribute.d.ts | 29 + .../jsdoc/src/renderers/common/Info.d.ts | 211 + .../src/renderers/common/InspectorBase.d.ts | 109 + .../jsdoc/src/renderers/common/Lighting.d.ts | 28 + .../jsdoc/src/renderers/common/Pipeline.d.ts | 28 + .../jsdoc/src/renderers/common/Pipelines.d.ts | 174 + .../src/renderers/common/PostProcessing.d.ts | 17 + .../renderers/common/ProgrammableStage.d.ts | 64 + .../jsdoc/src/renderers/common/QuadMesh.d.ts | 52 + .../src/renderers/common/ReadbackBuffer.d.ts | 55 + .../src/renderers/common/RenderBundle.d.ts | 20 + .../src/renderers/common/RenderBundles.d.ts | 29 + .../src/renderers/common/RenderContext.d.ts | 221 + .../src/renderers/common/RenderContexts.d.ts | 42 + .../src/renderers/common/RenderList.d.ts | 169 + .../src/renderers/common/RenderLists.d.ts | 41 + .../src/renderers/common/RenderObject.d.ts | 409 + .../common/RenderObjectPipeline.d.ts | 30 + .../src/renderers/common/RenderObjects.d.ts | 108 + .../src/renderers/common/RenderPipeline.d.ts | 126 + .../jsdoc/src/renderers/common/Renderer.d.ts | 1422 + .../src/renderers/common/RendererUtils.d.ts | 105 + .../src/renderers/common/SampledTexture.d.ts | 85 + .../jsdoc/src/renderers/common/Sampler.d.ts | 76 + .../renderers/common/Storage3DTexture.d.ts | 52 + .../renderers/common/StorageArrayTexture.d.ts | 38 + .../src/renderers/common/StorageBuffer.d.ts | 38 + .../common/StorageBufferAttribute.d.ts | 35 + .../StorageInstancedBufferAttribute.d.ts | 35 + .../src/renderers/common/StorageTexture.d.ts | 43 + .../jsdoc/src/renderers/common/Textures.d.ts | 117 + .../renderers/common/TimestampQueryPool.d.ts | 119 + .../jsdoc/src/renderers/common/Uniform.d.ts | 260 + .../src/renderers/common/UniformBuffer.d.ts | 18 + .../src/renderers/common/UniformsGroup.d.ts | 147 + .../jsdoc/src/renderers/common/XRManager.d.ts | 596 + .../src/renderers/common/XRRenderTarget.d.ts | 66 + .../common/extras/PMREMGenerator.d.ts | 198 + .../common/nodes/NodeBuilderState.d.ts | 105 + .../renderers/common/nodes/NodeLibrary.d.ts | 99 + .../renderers/common/nodes/NodeManager.d.ts | 287 + .../common/nodes/NodeSampledTexture.d.ts | 72 + .../renderers/common/nodes/NodeSampler.d.ts | 31 + .../common/nodes/NodeStorageBuffer.d.ts | 36 + .../renderers/common/nodes/NodeUniform.d.ts | 230 + .../common/nodes/NodeUniformBuffer.d.ts | 56 + .../common/nodes/NodeUniformsGroup.d.ts | 38 + .../src/renderers/shaders/DFGLUTData.d.ts | 1 + .../src/renderers/shaders/ShaderChunk.d.ts | 252 + .../ShaderChunk/alphahash_fragment.glsl.d.ts | 2 + .../alphahash_pars_fragment.glsl.d.ts | 2 + .../ShaderChunk/alphamap_fragment.glsl.d.ts | 2 + .../alphamap_pars_fragment.glsl.d.ts | 2 + .../ShaderChunk/alphatest_fragment.glsl.d.ts | 2 + .../alphatest_pars_fragment.glsl.d.ts | 2 + .../ShaderChunk/aomap_fragment.glsl.d.ts | 2 + .../ShaderChunk/aomap_pars_fragment.glsl.d.ts | 2 + .../batching_pars_vertex.glsl.d.ts | 2 + .../ShaderChunk/batching_vertex.glsl.d.ts | 2 + .../ShaderChunk/begin_vertex.glsl.d.ts | 2 + .../ShaderChunk/beginnormal_vertex.glsl.d.ts | 2 + .../shaders/ShaderChunk/bsdfs.glsl.d.ts | 2 + .../bumpmap_pars_fragment.glsl.d.ts | 2 + .../clearcoat_normal_fragment_begin.glsl.d.ts | 2 + .../clearcoat_normal_fragment_maps.glsl.d.ts | 2 + .../clearcoat_pars_fragment.glsl.d.ts | 2 + .../clipping_planes_fragment.glsl.d.ts | 2 + .../clipping_planes_pars_fragment.glsl.d.ts | 2 + .../clipping_planes_pars_vertex.glsl.d.ts | 2 + .../clipping_planes_vertex.glsl.d.ts | 2 + .../ShaderChunk/color_fragment.glsl.d.ts | 2 + .../ShaderChunk/color_pars_fragment.glsl.d.ts | 2 + .../ShaderChunk/color_pars_vertex.glsl.d.ts | 2 + .../ShaderChunk/color_vertex.glsl.d.ts | 2 + .../ShaderChunk/colorspace_fragment.glsl.d.ts | 2 + .../colorspace_pars_fragment.glsl.d.ts | 2 + .../shaders/ShaderChunk/common.glsl.d.ts | 2 + .../cube_uv_reflection_fragment.glsl.d.ts | 2 + .../ShaderChunk/default_fragment.glsl.d.ts | 2 + .../ShaderChunk/default_vertex.glsl.d.ts | 2 + .../defaultnormal_vertex.glsl.d.ts | 2 + .../displacementmap_pars_vertex.glsl.d.ts | 2 + .../displacementmap_vertex.glsl.d.ts | 2 + .../ShaderChunk/dithering_fragment.glsl.d.ts | 2 + .../dithering_pars_fragment.glsl.d.ts | 2 + .../emissivemap_fragment.glsl.d.ts | 2 + .../emissivemap_pars_fragment.glsl.d.ts | 2 + .../envmap_common_pars_fragment.glsl.d.ts | 2 + .../ShaderChunk/envmap_fragment.glsl.d.ts | 2 + .../envmap_pars_fragment.glsl.d.ts | 2 + .../ShaderChunk/envmap_pars_vertex.glsl.d.ts | 2 + .../envmap_physical_pars_fragment.glsl.d.ts | 2 + .../ShaderChunk/envmap_vertex.glsl.d.ts | 2 + .../ShaderChunk/fog_fragment.glsl.d.ts | 2 + .../ShaderChunk/fog_pars_fragment.glsl.d.ts | 2 + .../ShaderChunk/fog_pars_vertex.glsl.d.ts | 2 + .../shaders/ShaderChunk/fog_vertex.glsl.d.ts | 2 + .../gradientmap_pars_fragment.glsl.d.ts | 2 + .../iridescence_fragment.glsl.d.ts | 2 + .../iridescence_pars_fragment.glsl.d.ts | 2 + .../lightmap_pars_fragment.glsl.d.ts | 2 + .../lightprobes_pars_fragment.glsl.d.ts | 2 + .../lights_fragment_begin.glsl.d.ts | 2 + .../ShaderChunk/lights_fragment_end.glsl.d.ts | 2 + .../lights_fragment_maps.glsl.d.ts | 2 + .../lights_lambert_fragment.glsl.d.ts | 2 + .../lights_lambert_pars_fragment.glsl.d.ts | 2 + .../ShaderChunk/lights_pars_begin.glsl.d.ts | 2 + .../lights_phong_fragment.glsl.d.ts | 2 + .../lights_phong_pars_fragment.glsl.d.ts | 2 + .../lights_physical_fragment.glsl.d.ts | 2 + .../lights_physical_pars_fragment.glsl.d.ts | 2 + .../lights_toon_fragment.glsl.d.ts | 2 + .../lights_toon_pars_fragment.glsl.d.ts | 2 + .../logdepthbuf_fragment.glsl.d.ts | 2 + .../logdepthbuf_pars_fragment.glsl.d.ts | 2 + .../logdepthbuf_pars_vertex.glsl.d.ts | 2 + .../ShaderChunk/logdepthbuf_vertex.glsl.d.ts | 2 + .../ShaderChunk/map_fragment.glsl.d.ts | 2 + .../ShaderChunk/map_pars_fragment.glsl.d.ts | 2 + .../map_particle_fragment.glsl.d.ts | 2 + .../map_particle_pars_fragment.glsl.d.ts | 2 + .../metalnessmap_fragment.glsl.d.ts | 2 + .../metalnessmap_pars_fragment.glsl.d.ts | 2 + .../ShaderChunk/morphcolor_vertex.glsl.d.ts | 2 + .../morphinstance_vertex.glsl.d.ts | 2 + .../ShaderChunk/morphnormal_vertex.glsl.d.ts | 2 + .../morphtarget_pars_vertex.glsl.d.ts | 2 + .../ShaderChunk/morphtarget_vertex.glsl.d.ts | 2 + .../normal_fragment_begin.glsl.d.ts | 2 + .../normal_fragment_maps.glsl.d.ts | 2 + .../normal_pars_fragment.glsl.d.ts | 2 + .../ShaderChunk/normal_pars_vertex.glsl.d.ts | 2 + .../ShaderChunk/normal_vertex.glsl.d.ts | 2 + .../normalmap_pars_fragment.glsl.d.ts | 2 + .../ShaderChunk/opaque_fragment.glsl.d.ts | 2 + .../shaders/ShaderChunk/packing.glsl.d.ts | 2 + .../premultiplied_alpha_fragment.glsl.d.ts | 2 + .../ShaderChunk/project_vertex.glsl.d.ts | 2 + .../roughnessmap_fragment.glsl.d.ts | 2 + .../roughnessmap_pars_fragment.glsl.d.ts | 2 + .../shadowmap_pars_fragment.glsl.d.ts | 2 + .../shadowmap_pars_vertex.glsl.d.ts | 2 + .../ShaderChunk/shadowmap_vertex.glsl.d.ts | 2 + .../shadowmask_pars_fragment.glsl.d.ts | 2 + .../ShaderChunk/skinbase_vertex.glsl.d.ts | 2 + .../skinning_pars_vertex.glsl.d.ts | 2 + .../ShaderChunk/skinning_vertex.glsl.d.ts | 2 + .../ShaderChunk/skinnormal_vertex.glsl.d.ts | 2 + .../specularmap_fragment.glsl.d.ts | 2 + .../specularmap_pars_fragment.glsl.d.ts | 2 + .../tonemapping_fragment.glsl.d.ts | 2 + .../tonemapping_pars_fragment.glsl.d.ts | 2 + .../transmission_fragment.glsl.d.ts | 2 + .../transmission_pars_fragment.glsl.d.ts | 2 + .../ShaderChunk/uv_pars_fragment.glsl.d.ts | 2 + .../ShaderChunk/uv_pars_vertex.glsl.d.ts | 2 + .../shaders/ShaderChunk/uv_vertex.glsl.d.ts | 2 + .../ShaderChunk/worldpos_vertex.glsl.d.ts | 2 + .../src/renderers/shaders/ShaderLib.d.ts | 7 + .../shaders/ShaderLib/background.glsl.d.ts | 2 + .../ShaderLib/backgroundCube.glsl.d.ts | 2 + .../shaders/ShaderLib/cube.glsl.d.ts | 2 + .../shaders/ShaderLib/depth.glsl.d.ts | 2 + .../shaders/ShaderLib/distance.glsl.d.ts | 2 + .../shaders/ShaderLib/equirect.glsl.d.ts | 2 + .../shaders/ShaderLib/linedashed.glsl.d.ts | 2 + .../shaders/ShaderLib/meshbasic.glsl.d.ts | 2 + .../shaders/ShaderLib/meshlambert.glsl.d.ts | 2 + .../shaders/ShaderLib/meshmatcap.glsl.d.ts | 2 + .../shaders/ShaderLib/meshnormal.glsl.d.ts | 2 + .../shaders/ShaderLib/meshphong.glsl.d.ts | 2 + .../shaders/ShaderLib/meshphysical.glsl.d.ts | 2 + .../shaders/ShaderLib/meshtoon.glsl.d.ts | 2 + .../shaders/ShaderLib/points.glsl.d.ts | 2 + .../shaders/ShaderLib/shadow.glsl.d.ts | 2 + .../shaders/ShaderLib/sprite.glsl.d.ts | 2 + .../renderers/shaders/ShaderLib/vsm.glsl.d.ts | 2 + .../src/renderers/shaders/UniformsLib.d.ts | 449 + .../src/renderers/shaders/UniformsUtils.d.ts | 29 + .../webgl-fallback/WebGLBackend.d.ts | 649 + .../webgl-fallback/WebGLBufferRenderer.d.ts | 13 + .../webgl-fallback/nodes/GLSLNodeBuilder.d.ts | 384 + .../utils/WebGLAttributeUtils.d.ts | 64 + .../utils/WebGLCapabilities.d.ts | 48 + .../webgl-fallback/utils/WebGLConstants.d.ts | 11 + .../webgl-fallback/utils/WebGLExtensions.d.ts | 56 + .../webgl-fallback/utils/WebGLState.d.ts | 372 + .../utils/WebGLTextureUtils.d.ts | 197 + .../utils/WebGLTimestampQueryPool.d.ts | 58 + .../webgl-fallback/utils/WebGLUtils.d.ts | 51 + .../src/renderers/webgl/WebGLAnimation.d.ts | 6 + .../src/renderers/webgl/WebGLAttributes.d.ts | 5 + .../src/renderers/webgl/WebGLBackground.d.ts | 10 + .../renderers/webgl/WebGLBindingStates.d.ts | 12 + .../renderers/webgl/WebGLBufferRenderer.d.ts | 8 + .../renderers/webgl/WebGLCapabilities.d.ts | 20 + .../renderers/webgl/WebGLEnvironments.d.ts | 4 + .../src/renderers/webgl/WebGLExtensions.d.ts | 5 + .../src/renderers/webgl/WebGLGeometries.d.ts | 5 + .../webgl/WebGLIndexedBufferRenderer.d.ts | 9 + .../jsdoc/src/renderers/webgl/WebGLInfo.d.ts | 17 + .../src/renderers/webgl/WebGLLights.d.ts | 40 + .../src/renderers/webgl/WebGLMaterials.d.ts | 4 + .../renderers/webgl/WebGLMorphtargets.d.ts | 3 + .../src/renderers/webgl/WebGLObjects.d.ts | 4 + .../src/renderers/webgl/WebGLOutput.d.ts | 11 + .../src/renderers/webgl/WebGLPrograms.d.ts | 141 + .../src/renderers/webgl/WebGLProperties.d.ts | 7 + .../src/renderers/webgl/WebGLRenderLists.d.ts | 14 + .../renderers/webgl/WebGLRenderStates.d.ts | 4 + .../src/renderers/webgl/WebGLShader.d.ts | 1 + .../src/renderers/webgl/WebGLShaderCache.d.ts | 11 + .../jsdoc/src/renderers/webgl/WebGLState.d.ts | 39 + .../src/renderers/webgl/WebGLTextures.d.ts | 20 + .../src/renderers/webgl/WebGLUniforms.d.ts | 9 + .../renderers/webgl/WebGLUniformsGroups.d.ts | 5 + .../jsdoc/src/renderers/webgl/WebGLUtils.d.ts | 3 + .../src/renderers/webgpu/WebGPUBackend.d.ts | 580 + .../webgpu/WebGPURenderer.Nodes.d.ts | 25 + .../src/renderers/webgpu/WebGPURenderer.d.ts | 42 + .../descriptors/GPUBindGroupDescriptor.d.ts | 32 + .../descriptors/GPUBufferDescriptor.d.ts | 39 + .../GPUCommandEncoderDescriptor.d.ts | 18 + .../descriptors/GPUComputePassDescriptor.d.ts | 24 + .../GPUComputePipelineDescriptor.d.ts | 32 + .../GPUCopyExternalImageDestInfo.d.ts | 25 + .../GPUCopyExternalImageSourceInfo.d.ts | 36 + .../webgpu/descriptors/GPUExtent3D.d.ts | 35 + .../GPUPipelineLayoutDescriptor.d.ts | 25 + .../descriptors/GPUQuerySetDescriptor.d.ts | 31 + .../GPURenderBundleEncoderDescriptor.d.ts | 52 + .../GPURenderPassColorAttachment.d.ts | 50 + .../GPURenderPassDepthStencilAttachment.d.ts | 71 + .../descriptors/GPURenderPassDescriptor.d.ts | 50 + .../GPURenderPassTimestampWrites.d.ts | 33 + .../GPURenderPipelineDescriptor.d.ts | 90 + .../descriptors/GPUSamplerDescriptor.d.ts | 87 + .../GPUShaderModuleDescriptor.d.ts | 30 + .../descriptors/GPUTexelCopyBufferInfo.d.ts | 39 + .../descriptors/GPUTexelCopyBufferLayout.d.ts | 32 + .../descriptors/GPUTexelCopyTextureInfo.d.ts | 45 + .../descriptors/GPUTextureDescriptor.d.ts | 73 + .../descriptors/GPUTextureViewDescriptor.d.ts | 78 + .../webgpu/nodes/BasicNodeLibrary.d.ts | 11 + .../webgpu/nodes/StandardNodeLibrary.d.ts | 12 + .../webgpu/nodes/WGSLNodeBuilder.d.ts | 633 + .../webgpu/nodes/WGSLNodeFunction.d.ts | 25 + .../webgpu/nodes/WGSLNodeParser.d.ts | 17 + .../webgpu/utils/WebGPUAttributeUtils.d.ts | 78 + .../webgpu/utils/WebGPUBindingUtils.d.ts | 88 + .../webgpu/utils/WebGPUCapabilities.d.ts | 32 + .../webgpu/utils/WebGPUConstants.d.ts | 301 + .../webgpu/utils/WebGPUPipelineUtils.d.ts | 144 + .../webgpu/utils/WebGPUTexturePassUtils.d.ts | 84 + .../webgpu/utils/WebGPUTextureUtils.d.ts | 289 + .../utils/WebGPUTimestampQueryPool.d.ts | 53 + .../renderers/webgpu/utils/WebGPUUtils.d.ts | 104 + .../src/renderers/webxr/WebXRController.d.ts | 96 + .../renderers/webxr/WebXRDepthSensing.d.ts | 55 + .../src/renderers/webxr/WebXRManager.d.ts | 220 + jsdoc-testing/jsdoc/src/scenes/Fog.d.ts | 70 + jsdoc-testing/jsdoc/src/scenes/FogExp2.d.ts | 60 + jsdoc-testing/jsdoc/src/scenes/Scene.d.ts | 97 + .../jsdoc/src/textures/CanvasTexture.d.ts | 33 + .../src/textures/CompressedArrayTexture.d.ts | 58 + .../src/textures/CompressedCubeTexture.d.ts | 35 + .../jsdoc/src/textures/CompressedTexture.d.ts | 36 + .../jsdoc/src/textures/CubeDepthTexture.d.ts | 51 + .../jsdoc/src/textures/CubeTexture.d.ts | 49 + .../jsdoc/src/textures/Data3DTexture.d.ts | 34 + .../jsdoc/src/textures/DataArrayTexture.d.ts | 53 + .../jsdoc/src/textures/DataTexture.d.ts | 38 + .../jsdoc/src/textures/DepthTexture.d.ts | 42 + .../jsdoc/src/textures/ExternalTexture.d.ts | 36 + .../src/textures/FramebufferTexture.d.ts | 42 + .../jsdoc/src/textures/HTMLTexture.d.ts | 33 + jsdoc-testing/jsdoc/src/textures/Source.d.ts | 78 + jsdoc-testing/jsdoc/src/textures/Texture.d.ts | 413 + .../jsdoc/src/textures/VideoFrameTexture.d.ts | 44 + .../jsdoc/src/textures/VideoTexture.d.ts | 59 + jsdoc-testing/jsdoc/src/utils.d.ts | 185 + 1154 files changed, 112626 insertions(+) create mode 100644 jsdoc-testing/jsdoc/build/three.module.d.ts create mode 100644 jsdoc-testing/jsdoc/build/three.webgpu.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/Addons.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/animation/AnimationClipCreator.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/animation/CCDIKSolver.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/capabilities/WebGL.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/capabilities/WebGPU.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/controls/ArcballControls.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/controls/DragControls.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/controls/FirstPersonControls.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/controls/FlyControls.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/controls/MapControls.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/controls/OrbitControls.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/controls/PointerLockControls.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/controls/TrackballControls.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/controls/TransformControls.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/csm/CSM.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/csm/CSMFrustum.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/csm/CSMHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/csm/CSMShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/csm/CSMShadowNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/curves/CurveExtras.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/curves/NURBSCurve.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/curves/NURBSSurface.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/curves/NURBSUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/curves/NURBSVolume.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/effects/AnaglyphEffect.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/effects/AsciiEffect.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/effects/OutlineEffect.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/effects/ParallaxBarrierEffect.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/effects/StereoEffect.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/environments/ColorEnvironment.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/environments/DebugEnvironment.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/environments/RoomEnvironment.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/exporters/DRACOExporter.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/exporters/EXRExporter.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/exporters/GLTFExporter.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/exporters/KTX2Exporter.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/exporters/OBJExporter.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/exporters/PLYExporter.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/exporters/STLExporter.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/exporters/USDZExporter.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/geometries/BoxLineGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/geometries/ConvexGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/geometries/DecalGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/geometries/ParametricFunctions.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/geometries/ParametricGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/geometries/RoundedBoxGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/geometries/TeapotGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/geometries/TextGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/gpgpu/BitonicSort.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/AnimationPathHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeGridHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeHelperGPU.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/OctreeHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/PositionalAudioHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/RapierHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/RectAreaLightHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/TextureHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/TextureHelperGPU.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/VertexNormalsHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/VertexTangentsHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/Extension.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/Inspector.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/RendererInspector.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/extensions/tsl-graph/TSLGraphEditor.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/extensions/tsl-graph/TSLGraphLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Console.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Memory.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Parameters.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Performance.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Settings.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Timeline.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Viewer.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Graph.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Item.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/ui/List.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Profiler.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Style.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Tab.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Values.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/ui/utils.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/interaction/InteractionManager.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/interactive/HTMLMesh.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/interactive/InteractiveGroup.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/interactive/SelectionBox.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/ammo.wasm.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/basis/basis_transcoder.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/chevrotain.module.min.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/demuxer_mp4.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_decoder.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_encoder.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_wasm_wrapper.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_decoder.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_encoder.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_wasm_wrapper.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/ecsy.module.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/ktx-parse.module.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/meshopt_decoder.module.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/mikktspace.module.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/motion-controllers.module.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/opentype.module.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/potpack.module.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/rhino3dm/rhino3dm.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/rhino3dm/rhino3dm.module.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/stats.module.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/surfaceNet.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/utif.module.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/zstddec.module.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/lighting/ClusteredLighting.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/lighting/DynamicLighting.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/lighting/LightProbeGrid.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/lighting/TiledLighting.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/lights/LightProbeGenerator.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/lights/RectAreaLightTexturesLib.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/lights/RectAreaLightUniformsLib.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/lines/Line2.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/lines/LineGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/lines/LineMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/lines/LineSegments2.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/lines/LineSegmentsGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/lines/Wireframe.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/lines/WireframeGeometry2.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/Line2.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/LineSegments2.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/Wireframe.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/3DMLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/3MFLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/AMFLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/BVHLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/ColladaLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/DDSLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/DRACOLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/EXRLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/FBXLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/FontLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/GCodeLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/GLTFLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/HDRCubeTextureLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/HDRLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/IESLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/KMZLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/KTX2Loader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/KTXLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/LDrawLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/LUT3dlLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/LUTCubeLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/LUTImageLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/LWOLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/LottieLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/MD2Loader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/MDDLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/MTLLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/MaterialXLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/NRRDLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/OBJLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/PCDLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/PDBLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/PLYLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/PVRLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/RGBELoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/STLLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/SVGLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/TDSLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/TGALoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/TIFFLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/TTFLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/USDLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/USDZLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/UltraHDRLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/VOXLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/VRMLLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/VTKLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/XYZLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/collada/ColladaComposer.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/collada/ColladaParser.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/IFFParser.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/LWO2Parser.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/LWO3Parser.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDAParser.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDCParser.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDComposer.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/materials/LDrawConditionalLineMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/materials/LDrawConditionalLineNodeMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/materials/WoodNodeMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/math/Capsule.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/math/ColorConverter.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/math/ColorSpaces.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/math/ConvexHull.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/math/ImprovedNoise.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/math/Lut.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/math/MeshSurfaceSampler.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/math/OBB.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/math/Octree.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/math/SimplexNoise.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/ConvexObjectBreaker.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/Gyroscope.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/MD2Character.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/MD2CharacterComplex.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/MorphAnimMesh.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/MorphBlendMesh.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/ProgressiveLightMap.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/ProgressiveLightMapGPU.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/RollerCoaster.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/TubePainter.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/Volume.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/VolumeSlice.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/modifiers/CurveModifier.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/modifiers/CurveModifierGPU.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/modifiers/EdgeSplitModifier.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/modifiers/SimplifyModifier.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/modifiers/TessellateModifier.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/GroundedSkybox.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/Lensflare.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/LensflareMesh.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/ReflectorForSSRPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/Refractor.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/ShadowMesh.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/Sky.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/SkyMesh.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/Water.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/Water2.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/Water2Mesh.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/WaterMesh.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/offscreen/jank.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/offscreen/offscreen.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/offscreen/scene.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/physics/AmmoPhysics.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/physics/JoltPhysics.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/physics/RapierPhysics.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/AfterimagePass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/BloomPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/BokehPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/ClearPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/CubeTexturePass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/DotScreenPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/EffectComposer.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/FXAAPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/FilmPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/GTAOPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/GlitchPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/HalftonePass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/LUTPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/MaskPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/OutlinePass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/OutputPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/Pass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderPixelatedPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderTransitionPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/SAOPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/SMAAPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSAARenderPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSAOPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSRPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/SavePass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/ShaderPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/TAARenderPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/TexturePass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/UnrealBloomPass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/renderers/CSS2DRenderer.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/renderers/CSS3DRenderer.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/renderers/Projector.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/renderers/SVGRenderer.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/AfterimageShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/BasicShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/BleachBypassShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/BlendShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/BokehShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/BokehShader2.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/BrightnessContrastShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/ColorCorrectionShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/ColorifyShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/ConvolutionShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/CopyShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/DOFMipMapShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/DepthLimitedBlurShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/DigitalGlitch.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/DotScreenShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/ExposureShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/FXAAShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/FilmShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/FocusShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/FreiChenShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/GTAOShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/GammaCorrectionShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/HalftoneShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/HorizontalBlurShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/HueSaturationShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/KaleidoShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/LuminosityHighPassShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/LuminosityShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/MirrorShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/NormalMapShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/OutputShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/PoissonDenoiseShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/RGBShiftShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/SAOShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/SMAAShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/SSAOShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/SSRShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/SepiaShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/SobelOperatorShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/SubsurfaceScatteringShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/TechnicolorShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/ToonShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/TriangleBlurShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/VelocityShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/VerticalBlurShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/VerticalTiltShiftShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/VignetteShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/VolumeShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/WaterRefractionShader.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/textures/FlakesTexture.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/transpiler/AST.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/transpiler/GLSLDecoder.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/transpiler/Linker.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/transpiler/ShaderToyDecoder.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/transpiler/TSLEncoder.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/transpiler/Transpiler.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/transpiler/TranspilerUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/transpiler/WGSLEncoder.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/AfterImageNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/AnaglyphPassNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/BilateralBlurNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/BleachBypass.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/BloomNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/CRT.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/ChromaticAberrationNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/DenoiseNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/DepthOfFieldNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/DotScreenNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/FSR1Node.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/FXAANode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/FilmNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/GTAONode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/GaussianBlurNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/GodraysNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/LensflareNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/Lut3DNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/MotionBlur.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/OutlineNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/ParallaxBarrierPassNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/PixelationPassNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/RGBShiftNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/RetroPassNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/SMAANode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSAAPassNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSGINode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSRNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSSNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/Sepia.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/Shape.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/SharpenNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/SobelOperatorNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/StereoCompositePassNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/StereoPassNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/TAAUNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/TRAANode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/TransitionNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/boxBlur.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/depthAwareBlend.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/hashBlur.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/radialBlur.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/ClusteredLightsNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/DynamicLightsNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/TiledLightsNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/AmbientLightDataNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/DirectionalLightDataNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/HemisphereLightDataNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/PointLightDataNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/SpotLightDataNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/math/Bayer.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/shadows/TileShadowNode.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/shadows/TileShadowNodeHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/utils/GroundedSkybox.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/utils/Raymarching.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/BufferGeometryUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/CameraUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/ColorUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/GeometryCompressionUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/GeometryUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/LDrawUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/SceneOptimizer.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/SceneUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/ShadowMapViewer.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/ShadowMapViewerGPU.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/SkeletonUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/SortUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/UVsDebug.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/WebGLTextureUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/WebGPUTextureUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/WorkerPool.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/ARButton.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/OculusHandModel.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/OculusHandPointerModel.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/Text2D.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/VRButton.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/WebGLXRFallback.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/XRButton.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/XRControllerModelFactory.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/XREstimatedLight.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandMeshModel.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandModelFactory.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandPrimitiveModel.d.ts create mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/XRPlanes.d.ts create mode 100644 jsdoc-testing/jsdoc/src/Three.Core.d.ts create mode 100644 jsdoc-testing/jsdoc/src/Three.Legacy.d.ts create mode 100644 jsdoc-testing/jsdoc/src/Three.WebGPU.Nodes.d.ts create mode 100644 jsdoc-testing/jsdoc/src/Three.WebGPU.d.ts create mode 100644 jsdoc-testing/jsdoc/src/Three.d.ts create mode 100644 jsdoc-testing/jsdoc/src/animation/AnimationAction.d.ts create mode 100644 jsdoc-testing/jsdoc/src/animation/AnimationClip.d.ts create mode 100644 jsdoc-testing/jsdoc/src/animation/AnimationMixer.d.ts create mode 100644 jsdoc-testing/jsdoc/src/animation/AnimationObjectGroup.d.ts create mode 100644 jsdoc-testing/jsdoc/src/animation/AnimationUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/animation/KeyframeTrack.d.ts create mode 100644 jsdoc-testing/jsdoc/src/animation/PropertyBinding.d.ts create mode 100644 jsdoc-testing/jsdoc/src/animation/PropertyMixer.d.ts create mode 100644 jsdoc-testing/jsdoc/src/animation/tracks/BooleanKeyframeTrack.d.ts create mode 100644 jsdoc-testing/jsdoc/src/animation/tracks/ColorKeyframeTrack.d.ts create mode 100644 jsdoc-testing/jsdoc/src/animation/tracks/NumberKeyframeTrack.d.ts create mode 100644 jsdoc-testing/jsdoc/src/animation/tracks/QuaternionKeyframeTrack.d.ts create mode 100644 jsdoc-testing/jsdoc/src/animation/tracks/StringKeyframeTrack.d.ts create mode 100644 jsdoc-testing/jsdoc/src/animation/tracks/VectorKeyframeTrack.d.ts create mode 100644 jsdoc-testing/jsdoc/src/audio/Audio.d.ts create mode 100644 jsdoc-testing/jsdoc/src/audio/AudioAnalyser.d.ts create mode 100644 jsdoc-testing/jsdoc/src/audio/AudioContext.d.ts create mode 100644 jsdoc-testing/jsdoc/src/audio/AudioListener.d.ts create mode 100644 jsdoc-testing/jsdoc/src/audio/PositionalAudio.d.ts create mode 100644 jsdoc-testing/jsdoc/src/cameras/ArrayCamera.d.ts create mode 100644 jsdoc-testing/jsdoc/src/cameras/Camera.d.ts create mode 100644 jsdoc-testing/jsdoc/src/cameras/CubeCamera.d.ts create mode 100644 jsdoc-testing/jsdoc/src/cameras/OrthographicCamera.d.ts create mode 100644 jsdoc-testing/jsdoc/src/cameras/PerspectiveCamera.d.ts create mode 100644 jsdoc-testing/jsdoc/src/cameras/StereoCamera.d.ts create mode 100644 jsdoc-testing/jsdoc/src/constants.d.ts create mode 100644 jsdoc-testing/jsdoc/src/core/BufferAttribute.d.ts create mode 100644 jsdoc-testing/jsdoc/src/core/BufferGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/core/Clock.d.ts create mode 100644 jsdoc-testing/jsdoc/src/core/EventDispatcher.d.ts create mode 100644 jsdoc-testing/jsdoc/src/core/GLBufferAttribute.d.ts create mode 100644 jsdoc-testing/jsdoc/src/core/InstancedBufferAttribute.d.ts create mode 100644 jsdoc-testing/jsdoc/src/core/InstancedBufferGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/core/InstancedInterleavedBuffer.d.ts create mode 100644 jsdoc-testing/jsdoc/src/core/InterleavedBuffer.d.ts create mode 100644 jsdoc-testing/jsdoc/src/core/InterleavedBufferAttribute.d.ts create mode 100644 jsdoc-testing/jsdoc/src/core/Layers.d.ts create mode 100644 jsdoc-testing/jsdoc/src/core/Object3D.d.ts create mode 100644 jsdoc-testing/jsdoc/src/core/Raycaster.d.ts create mode 100644 jsdoc-testing/jsdoc/src/core/RenderTarget.d.ts create mode 100644 jsdoc-testing/jsdoc/src/core/RenderTarget3D.d.ts create mode 100644 jsdoc-testing/jsdoc/src/core/Timer.d.ts create mode 100644 jsdoc-testing/jsdoc/src/core/Uniform.d.ts create mode 100644 jsdoc-testing/jsdoc/src/core/UniformsGroup.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/Controls.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/DataUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/Earcut.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/ImageUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/PMREMGenerator.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/ShapeUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/TextureUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/core/Curve.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/core/CurvePath.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/core/Interpolations.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/core/Path.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/core/Shape.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/core/ShapePath.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/curves/ArcCurve.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/curves/CatmullRomCurve3.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/curves/CubicBezierCurve.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/curves/CubicBezierCurve3.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/curves/Curves.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/curves/EllipseCurve.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/curves/LineCurve.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/curves/LineCurve3.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/curves/QuadraticBezierCurve.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/curves/QuadraticBezierCurve3.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/curves/SplineCurve.d.ts create mode 100644 jsdoc-testing/jsdoc/src/extras/lib/earcut.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/BoxGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/CapsuleGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/CircleGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/ConeGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/CylinderGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/DodecahedronGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/EdgesGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/ExtrudeGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/Geometries.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/IcosahedronGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/LatheGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/OctahedronGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/PlaneGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/PolyhedronGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/RingGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/ShapeGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/SphereGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/TetrahedronGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/TorusGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/TorusKnotGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/TubeGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/geometries/WireframeGeometry.d.ts create mode 100644 jsdoc-testing/jsdoc/src/helpers/ArrowHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/src/helpers/AxesHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/src/helpers/Box3Helper.d.ts create mode 100644 jsdoc-testing/jsdoc/src/helpers/BoxHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/src/helpers/CameraHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/src/helpers/DirectionalLightHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/src/helpers/GridHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/src/helpers/HemisphereLightHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/src/helpers/PlaneHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/src/helpers/PointLightHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/src/helpers/PolarGridHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/src/helpers/SkeletonHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/src/helpers/SpotLightHelper.d.ts create mode 100644 jsdoc-testing/jsdoc/src/lights/AmbientLight.d.ts create mode 100644 jsdoc-testing/jsdoc/src/lights/DirectionalLight.d.ts create mode 100644 jsdoc-testing/jsdoc/src/lights/DirectionalLightShadow.d.ts create mode 100644 jsdoc-testing/jsdoc/src/lights/HemisphereLight.d.ts create mode 100644 jsdoc-testing/jsdoc/src/lights/Light.d.ts create mode 100644 jsdoc-testing/jsdoc/src/lights/LightProbe.d.ts create mode 100644 jsdoc-testing/jsdoc/src/lights/LightShadow.d.ts create mode 100644 jsdoc-testing/jsdoc/src/lights/PointLight.d.ts create mode 100644 jsdoc-testing/jsdoc/src/lights/PointLightShadow.d.ts create mode 100644 jsdoc-testing/jsdoc/src/lights/RectAreaLight.d.ts create mode 100644 jsdoc-testing/jsdoc/src/lights/SpotLight.d.ts create mode 100644 jsdoc-testing/jsdoc/src/lights/SpotLightShadow.d.ts create mode 100644 jsdoc-testing/jsdoc/src/lights/webgpu/IESSpotLight.d.ts create mode 100644 jsdoc-testing/jsdoc/src/lights/webgpu/ProjectorLight.d.ts create mode 100644 jsdoc-testing/jsdoc/src/loaders/AnimationLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/src/loaders/AudioLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/src/loaders/BufferGeometryLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/src/loaders/CompressedTextureLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/src/loaders/CubeTextureLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/src/loaders/DataTextureLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/src/loaders/FileLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/src/loaders/ImageBitmapLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/src/loaders/ImageLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/src/loaders/Loader.d.ts create mode 100644 jsdoc-testing/jsdoc/src/loaders/LoaderUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/loaders/MaterialLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/src/loaders/ObjectLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/src/loaders/TextureLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/src/loaders/nodes/NodeLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/src/loaders/nodes/NodeMaterialLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/src/loaders/nodes/NodeObjectLoader.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/LineBasicMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/LineDashedMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/Material.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/Materials.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/MeshBasicMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/MeshDepthMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/MeshDistanceMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/MeshLambertMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/MeshMatcapMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/MeshNormalMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/MeshPhongMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/MeshPhysicalMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/MeshStandardMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/MeshToonMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/PointsMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/RawShaderMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/ShaderMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/ShadowMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/SpriteMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/Line2NodeMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/LineBasicNodeMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/LineDashedNodeMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/MeshBasicNodeMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/MeshLambertNodeMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/MeshMatcapNodeMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/MeshNormalNodeMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/MeshPhongNodeMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/MeshPhysicalNodeMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/MeshSSSNodeMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/MeshStandardNodeMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/MeshToonNodeMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/NodeMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/NodeMaterials.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/PointsNodeMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/ShadowNodeMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/SpriteNodeMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/VolumeNodeMaterial.d.ts create mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/manager/NodeMaterialObserver.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/Box2.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/Box3.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/Color.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/ColorManagement.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/Cylindrical.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/Euler.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/Frustum.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/FrustumArray.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/Interpolant.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/Line3.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/MathUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/Matrix2.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/Matrix3.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/Matrix4.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/Plane.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/Quaternion.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/Ray.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/Sphere.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/Spherical.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/SphericalHarmonics3.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/Triangle.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/Vector2.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/Vector3.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/Vector4.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/interpolants/BezierInterpolant.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/interpolants/CubicInterpolant.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/interpolants/DiscreteInterpolant.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/interpolants/LinearInterpolant.d.ts create mode 100644 jsdoc-testing/jsdoc/src/math/interpolants/QuaternionLinearInterpolant.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/Nodes.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/TSL.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/AccessorsUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/Arrays.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/BatchNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/Bitangent.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/BufferAttributeNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/BufferNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/BuiltinNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/Camera.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/ClippingNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/CubeTextureNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/InstanceNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/InstancedMeshNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/Lights.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/MaterialNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/MaterialProperties.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/MaterialReferenceNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/ModelNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/ModelViewProjectionNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/MorphNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/Normal.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/Object3DNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/PointUVNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/Position.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/ReferenceBaseNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/ReferenceNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/ReflectVector.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/RendererReferenceNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/SceneProperties.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/SkinningNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/StorageBufferNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/StorageTexture3DNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/StorageTextureNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/Tangent.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/TangentUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/Texture3DNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/TextureBicubic.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/TextureNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/TextureSizeNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/UV.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/UniformArrayNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/UserDataNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/VelocityNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/VertexColorNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/code/CodeNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/code/ExpressionNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/code/FunctionCallNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/code/FunctionNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/ArrayNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/AssignNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/AttributeNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/BypassNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/ConstNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/ContextNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/IndexNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/InputNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/InspectorNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/IsolateNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/LightingModel.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/MRTNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/Node.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeAttribute.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeBuilder.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeCache.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeCode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeError.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeFrame.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeFunction.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeFunctionInput.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeParser.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeUniform.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeVar.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeVarying.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/OutputStructNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/ParameterNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/PropertyNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/StackNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/StackTrace.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/StructNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/StructType.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/StructTypeNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/SubBuildNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/TempNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/UniformGroupNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/UniformNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/VarNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/VaryingNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/core/constants.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/display/BlendModes.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/display/BumpMapNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ColorAdjustment.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ColorSpaceFunctions.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ColorSpaceNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/display/FrontFacingNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/display/NormalMapNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/display/PassNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/display/PremultiplyAlphaFunctions.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/display/RenderOutputNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ScreenNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ToneMappingFunctions.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ToneMappingNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ToonOutlinePassNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ViewportDepthNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ViewportDepthTextureNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ViewportSharedTextureNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ViewportTextureNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/fog/Fog.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_GGX.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_GGX_Multiscatter.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_Lambert.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_Sheen.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/DFGLUT.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/D_GGX.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/EnvironmentBRDF.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/F_Schlick.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/LTC.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/Schlick_to_F0.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BasicLightingModel.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/PhongLightingModel.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/PhysicalLightingModel.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/ShadowMaskModel.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/ToonLightingModel.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/VolumetricLightingModel.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/material/getAlphaHashThreshold.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/material/getGeometryRoughness.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/material/getParallaxCorrectNormal.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/material/getRoughness.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/material/getShIrradianceAt.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/geometry/RangeNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/gpgpu/AtomicFunctionNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/gpgpu/BarrierNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/gpgpu/ComputeBuiltinNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/gpgpu/ComputeNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/gpgpu/SubgroupFunctionNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/gpgpu/WorkgroupInfoNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/AONode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/AmbientLightNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/AnalyticLightNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/BasicEnvironmentNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/BasicLightMapNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/DirectionalLightNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/EnvironmentNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/HemisphereLightNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/IESSpotLightNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/IrradianceNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/LightProbeNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/LightUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/LightingContextNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/LightingNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/LightsNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/PointLightNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/PointShadowNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/ProjectorLightNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/RectAreaLightNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/ShadowBaseNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/ShadowFilterNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/ShadowNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/SpotLightNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/materialx/MaterialXNodes.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_hsv.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_noise.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_transform_color.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/math/BitcastNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/math/BitcountNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/math/ConditionalNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/math/Hash.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/math/MathNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/math/MathUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/math/OperatorNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/math/PackFloatNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/math/TriNoise3D.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/math/UnpackFloatNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/parsers/GLSLNodeFunction.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/parsers/GLSLNodeParser.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/pmrem/PMREMNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/pmrem/PMREMUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/procedural/Checker.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/shapes/Shapes.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/tsl/TSLBase.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/tsl/TSLCore.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/ArrayElementNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/ConvertNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/CubeMapNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/DebugNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/Discard.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/EquirectUV.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/EventNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/FlipNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/FunctionOverloadingNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/JoinNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/LoopNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/MatcapUV.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/MaxMipLevelNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/MemberNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/Oscillators.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/Packing.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/PostProcessingUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/RTTNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/ReflectorNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/Remap.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/RotateNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/SampleNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/SetNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/SplitNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/SpriteSheetUV.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/SpriteUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/StorageArrayElementNode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/Timer.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/TriplanarTextures.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/UVUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/ViewportUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/objects/BatchedMesh.d.ts create mode 100644 jsdoc-testing/jsdoc/src/objects/Bone.d.ts create mode 100644 jsdoc-testing/jsdoc/src/objects/ClippingGroup.d.ts create mode 100644 jsdoc-testing/jsdoc/src/objects/Group.d.ts create mode 100644 jsdoc-testing/jsdoc/src/objects/InstancedMesh.d.ts create mode 100644 jsdoc-testing/jsdoc/src/objects/LOD.d.ts create mode 100644 jsdoc-testing/jsdoc/src/objects/Line.d.ts create mode 100644 jsdoc-testing/jsdoc/src/objects/LineLoop.d.ts create mode 100644 jsdoc-testing/jsdoc/src/objects/LineSegments.d.ts create mode 100644 jsdoc-testing/jsdoc/src/objects/Mesh.d.ts create mode 100644 jsdoc-testing/jsdoc/src/objects/Points.d.ts create mode 100644 jsdoc-testing/jsdoc/src/objects/Skeleton.d.ts create mode 100644 jsdoc-testing/jsdoc/src/objects/SkinnedMesh.d.ts create mode 100644 jsdoc-testing/jsdoc/src/objects/Sprite.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/WebGL3DRenderTarget.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/WebGLArrayRenderTarget.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/WebGLCubeRenderTarget.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/WebGLRenderTarget.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/WebGLRenderer.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Animation.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Attributes.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Backend.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Background.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/BindGroup.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Binding.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Bindings.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/BlendMode.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Buffer.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/BufferUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/BundleGroup.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/CanvasTarget.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/ChainMap.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/ClippingContext.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Color4.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/ComputePipeline.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Constants.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/CubeRenderTarget.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/DataMap.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Geometries.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/IndirectStorageBufferAttribute.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Info.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/InspectorBase.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Lighting.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Pipeline.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Pipelines.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/PostProcessing.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/ProgrammableStage.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/QuadMesh.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/ReadbackBuffer.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RenderBundle.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RenderBundles.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RenderContext.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RenderContexts.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RenderList.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RenderLists.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RenderObject.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RenderObjectPipeline.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RenderObjects.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RenderPipeline.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Renderer.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RendererUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/SampledTexture.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Sampler.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Storage3DTexture.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/StorageArrayTexture.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/StorageBuffer.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/StorageBufferAttribute.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/StorageInstancedBufferAttribute.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/StorageTexture.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Textures.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/TimestampQueryPool.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Uniform.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/UniformBuffer.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/UniformsGroup.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/XRManager.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/XRRenderTarget.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/extras/PMREMGenerator.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeBuilderState.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeLibrary.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeManager.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeSampledTexture.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeSampler.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeStorageBuffer.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniform.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniformBuffer.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniformsGroup.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/DFGLUTData.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphahash_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphahash_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphamap_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphamap_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphatest_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphatest_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/aomap_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/aomap_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/batching_pars_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/batching_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/begin_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/beginnormal_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/bsdfs.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/bumpmap_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_begin.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_maps.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_pars_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_pars_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/colorspace_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/colorspace_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/common.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/cube_uv_reflection_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/default_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/default_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/defaultnormal_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/displacementmap_pars_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/displacementmap_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/dithering_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/dithering_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/emissivemap_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/emissivemap_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_common_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_pars_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_pars_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/gradientmap_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/iridescence_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/iridescence_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lightmap_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lightprobes_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_begin.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_end.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_maps.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_lambert_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_lambert_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_pars_begin.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_phong_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_phong_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_toon_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_toon_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_particle_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_particle_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/metalnessmap_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/metalnessmap_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphcolor_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphinstance_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphnormal_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphtarget_pars_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphtarget_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_fragment_begin.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_fragment_maps.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_pars_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normalmap_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/opaque_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/packing.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/premultiplied_alpha_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/project_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/roughnessmap_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/roughnessmap_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_pars_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmask_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinbase_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinning_pars_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinning_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinnormal_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/specularmap_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/specularmap_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/tonemapping_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/tonemapping_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/transmission_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/transmission_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_pars_fragment.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_pars_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/worldpos_vertex.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/background.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/backgroundCube.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/cube.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/depth.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/distance.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/equirect.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/linedashed.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshbasic.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshlambert.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshmatcap.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshnormal.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshphong.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshphysical.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshtoon.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/points.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/shadow.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/sprite.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/vsm.glsl.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/UniformsLib.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/UniformsUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/WebGLBackend.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/WebGLBufferRenderer.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLAttributeUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLCapabilities.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLConstants.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLExtensions.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLState.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLTextureUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLTimestampQueryPool.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLAnimation.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLAttributes.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBackground.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBindingStates.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBufferRenderer.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLCapabilities.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLEnvironments.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLExtensions.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLGeometries.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLInfo.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLLights.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLMaterials.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLMorphtargets.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLObjects.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLOutput.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLPrograms.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLProperties.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLRenderLists.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLRenderStates.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLShader.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLShaderCache.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLState.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLTextures.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUniforms.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUniformsGroups.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPUBackend.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPURenderer.Nodes.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPURenderer.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUBindGroupDescriptor.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUBufferDescriptor.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCommandEncoderDescriptor.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUComputePassDescriptor.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUComputePipelineDescriptor.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCopyExternalImageDestInfo.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCopyExternalImageSourceInfo.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUExtent3D.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUPipelineLayoutDescriptor.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUQuerySetDescriptor.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderBundleEncoderDescriptor.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassColorAttachment.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassDepthStencilAttachment.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassDescriptor.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassTimestampWrites.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPipelineDescriptor.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUSamplerDescriptor.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUShaderModuleDescriptor.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyBufferInfo.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyBufferLayout.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyTextureInfo.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTextureDescriptor.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTextureViewDescriptor.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeFunction.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeParser.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUAttributeUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUBindingUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUCapabilities.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUConstants.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUPipelineUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTexturePassUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTextureUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUUtils.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webxr/WebXRController.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webxr/WebXRDepthSensing.d.ts create mode 100644 jsdoc-testing/jsdoc/src/renderers/webxr/WebXRManager.d.ts create mode 100644 jsdoc-testing/jsdoc/src/scenes/Fog.d.ts create mode 100644 jsdoc-testing/jsdoc/src/scenes/FogExp2.d.ts create mode 100644 jsdoc-testing/jsdoc/src/scenes/Scene.d.ts create mode 100644 jsdoc-testing/jsdoc/src/textures/CanvasTexture.d.ts create mode 100644 jsdoc-testing/jsdoc/src/textures/CompressedArrayTexture.d.ts create mode 100644 jsdoc-testing/jsdoc/src/textures/CompressedCubeTexture.d.ts create mode 100644 jsdoc-testing/jsdoc/src/textures/CompressedTexture.d.ts create mode 100644 jsdoc-testing/jsdoc/src/textures/CubeDepthTexture.d.ts create mode 100644 jsdoc-testing/jsdoc/src/textures/CubeTexture.d.ts create mode 100644 jsdoc-testing/jsdoc/src/textures/Data3DTexture.d.ts create mode 100644 jsdoc-testing/jsdoc/src/textures/DataArrayTexture.d.ts create mode 100644 jsdoc-testing/jsdoc/src/textures/DataTexture.d.ts create mode 100644 jsdoc-testing/jsdoc/src/textures/DepthTexture.d.ts create mode 100644 jsdoc-testing/jsdoc/src/textures/ExternalTexture.d.ts create mode 100644 jsdoc-testing/jsdoc/src/textures/FramebufferTexture.d.ts create mode 100644 jsdoc-testing/jsdoc/src/textures/HTMLTexture.d.ts create mode 100644 jsdoc-testing/jsdoc/src/textures/Source.d.ts create mode 100644 jsdoc-testing/jsdoc/src/textures/Texture.d.ts create mode 100644 jsdoc-testing/jsdoc/src/textures/VideoFrameTexture.d.ts create mode 100644 jsdoc-testing/jsdoc/src/textures/VideoTexture.d.ts create mode 100644 jsdoc-testing/jsdoc/src/utils.d.ts diff --git a/jsdoc-testing/jsdoc/build/three.module.d.ts b/jsdoc-testing/jsdoc/build/three.module.d.ts new file mode 100644 index 000000000..99a67f4d7 --- /dev/null +++ b/jsdoc-testing/jsdoc/build/three.module.d.ts @@ -0,0 +1,1836 @@ +import { ACESFilmicToneMapping } from './three.core.js'; +import { AddEquation } from './three.core.js'; +import { AddOperation } from './three.core.js'; +import { AdditiveBlending } from './three.core.js'; +import { AgXToneMapping } from './three.core.js'; +import { AlphaFormat } from './three.core.js'; +import { AlwaysCompare } from './three.core.js'; +import { AlwaysDepth } from './three.core.js'; +import { ArrayCamera } from './three.core.js'; +import { BackSide } from './three.core.js'; +import { BoxGeometry } from './three.core.js'; +import { BufferAttribute } from './three.core.js'; +import { BufferGeometry } from './three.core.js'; +import { ByteType } from './three.core.js'; +import { CineonToneMapping } from './three.core.js'; +import { ClampToEdgeWrapping } from './three.core.js'; +import { Color } from './three.core.js'; +import { ColorManagement } from './three.core.js'; +import { ConstantAlphaFactor } from './three.core.js'; +import { ConstantColorFactor } from './three.core.js'; +import { CubeCamera } from './three.core.js'; +import { CubeDepthTexture } from './three.core.js'; +import { CubeReflectionMapping } from './three.core.js'; +import { CubeRefractionMapping } from './three.core.js'; +import { CubeTexture } from './three.core.js'; +import { CubeUVReflectionMapping } from './three.core.js'; +import { CullFaceBack } from './three.core.js'; +import { CullFaceFront } from './three.core.js'; +import { CullFaceNone } from './three.core.js'; +import { CustomBlending } from './three.core.js'; +import { CustomToneMapping } from './three.core.js'; +import { Data3DTexture } from './three.core.js'; +import { DataArrayTexture } from './three.core.js'; +import { DataTexture } from './three.core.js'; +import { DepthFormat } from './three.core.js'; +import { DepthStencilFormat } from './three.core.js'; +import { DepthTexture } from './three.core.js'; +import { DoubleSide } from './three.core.js'; +import { DstAlphaFactor } from './three.core.js'; +import { DstColorFactor } from './three.core.js'; +import { EqualCompare } from './three.core.js'; +import { EqualDepth } from './three.core.js'; +import { EquirectangularReflectionMapping } from './three.core.js'; +import { EquirectangularRefractionMapping } from './three.core.js'; +import { EventDispatcher } from './three.core.js'; +import { ExternalTexture } from './three.core.js'; +import { Float32BufferAttribute } from './three.core.js'; +import { FloatType } from './three.core.js'; +import { FrontSide } from './three.core.js'; +import { Frustum } from './three.core.js'; +import { GLSL3 } from './three.core.js'; +import { GreaterCompare } from './three.core.js'; +import { GreaterDepth } from './three.core.js'; +import { GreaterEqualCompare } from './three.core.js'; +import { GreaterEqualDepth } from './three.core.js'; +import { HalfFloatType } from './three.core.js'; +import { IntType } from './three.core.js'; +import { Layers } from './three.core.js'; +import { LessCompare } from './three.core.js'; +import { LessDepth } from './three.core.js'; +import { LessEqualCompare } from './three.core.js'; +import { LessEqualDepth } from './three.core.js'; +import { LinearFilter } from './three.core.js'; +import { LinearMipmapLinearFilter } from './three.core.js'; +import { LinearMipmapNearestFilter } from './three.core.js'; +import { LinearSRGBColorSpace } from './three.core.js'; +import { LinearToneMapping } from './three.core.js'; +import { LinearTransfer } from './three.core.js'; +import { Matrix3 } from './three.core.js'; +import { Matrix4 } from './three.core.js'; +import { MaxEquation } from './three.core.js'; +import { Mesh } from './three.core.js'; +import { MeshBasicMaterial } from './three.core.js'; +import { MeshDepthMaterial } from './three.core.js'; +import { MeshDistanceMaterial } from './three.core.js'; +import { MinEquation } from './three.core.js'; +import { MirroredRepeatWrapping } from './three.core.js'; +import { MixOperation } from './three.core.js'; +import { MultiplyBlending } from './three.core.js'; +import { MultiplyOperation } from './three.core.js'; +import { NearestFilter } from './three.core.js'; +import { NearestMipmapLinearFilter } from './three.core.js'; +import { NearestMipmapNearestFilter } from './three.core.js'; +import { NeutralToneMapping } from './three.core.js'; +import { NeverCompare } from './three.core.js'; +import { NeverDepth } from './three.core.js'; +import { NoBlending } from './three.core.js'; +import { NoColorSpace } from './three.core.js'; +import { NoToneMapping } from './three.core.js'; +import { NormalBlending } from './three.core.js'; +import { NotEqualCompare } from './three.core.js'; +import { NotEqualDepth } from './three.core.js'; +import { ObjectSpaceNormalMap } from './three.core.js'; +import { OneFactor } from './three.core.js'; +import { OneMinusConstantAlphaFactor } from './three.core.js'; +import { OneMinusConstantColorFactor } from './three.core.js'; +import { OneMinusDstAlphaFactor } from './three.core.js'; +import { OneMinusDstColorFactor } from './three.core.js'; +import { OneMinusSrcAlphaFactor } from './three.core.js'; +import { OneMinusSrcColorFactor } from './three.core.js'; +import { OrthographicCamera } from './three.core.js'; +import { PCFShadowMap } from './three.core.js'; +import { PCFSoftShadowMap } from './three.core.js'; +/** + * This class generates a Prefiltered, Mipmapped Radiance Environment Map + * (PMREM) from a cubeMap environment texture. This allows different levels of + * blur to be quickly accessed based on material roughness. It is packed into a + * special CubeUV format that allows us to perform custom interpolation so that + * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap + * chain, it only goes down to the LOD_MIN level (above), and then creates extra + * even more filtered 'mips' at the same LOD_MIN resolution, associated with + * higher roughness levels. In this way we maintain resolution to smoothly + * interpolate diffuse lighting while limiting sampling computation. + * + * The prefiltering uses GGX VNDF (Visible Normal Distribution Function) + * importance sampling based on "Sampling the GGX Distribution of Visible Normals" + * (Heitz, 2018) to generate environment maps that accurately match the GGX BRDF + * used in material rendering for physically-based image-based lighting. + */ +export class PMREMGenerator { + /** + * Constructs a new PMREM generator. + * + * @param {WebGLRenderer} renderer - The renderer. + */ + constructor(renderer: WebGLRenderer); + _renderer: WebGLRenderer; + _pingPongRenderTarget: any; + _lodMax: number; + _cubeSize: number; + _sizeLods: any[]; + _sigmas: any[]; + _lodMeshes: any[]; + _backgroundBox: Mesh | null; + _cubemapMaterial: ShaderMaterial | null; + _equirectMaterial: ShaderMaterial | null; + _blurMaterial: ShaderMaterial | null; + _ggxMaterial: ShaderMaterial | null; + /** + * Generates a PMREM from a supplied Scene, which can be faster than using an + * image if networking bandwidth is low. Optional sigma specifies a blur radius + * in radians to be applied to the scene before PMREM generation. Optional near + * and far planes ensure the scene is rendered in its entirety. + * + * @param {Scene} scene - The scene to be captured. + * @param {number} [sigma=0] - The blur radius in radians. + * @param {number} [near=0.1] - The near plane distance. + * @param {number} [far=100] - The far plane distance. + * @param {Object} [options={}] - The configuration options. + * @param {number} [options.size=256] - The texture size of the PMREM. + * @param {Vector3} [options.position=origin] - The position of the internal cube camera that renders the scene. + * @return {WebGLRenderTarget} The resulting PMREM. + */ + fromScene(scene: Scene, sigma?: number, near?: number, far?: number, options?: { + size?: number | undefined; + position?: Vector3 | undefined; + }): WebGLRenderTarget; + /** + * Generates a PMREM from an equirectangular texture, which can be either LDR + * or HDR. The ideal input image size is 1k (1024 x 512), as this matches best + * with the 256 x 256 cubemap output. The minimum supported input image size + * is 64 x 32. + * + * @param {Texture} equirectangular - The equirectangular texture to be converted. + * @param {?WebGLRenderTarget} [renderTarget=null] - The render target to use. + * @return {WebGLRenderTarget} The resulting PMREM. + */ + fromEquirectangular(equirectangular: Texture, renderTarget?: WebGLRenderTarget | null): WebGLRenderTarget; + /** + * Generates a PMREM from an cubemap texture, which can be either LDR + * or HDR. The ideal input cube size is 256 x 256, as this matches best + * with the 256 x 256 cubemap output. The minimum supported input cube + * size is 16 x 16 per face. + * + * @param {Texture} cubemap - The cubemap texture to be converted. + * @param {?WebGLRenderTarget} [renderTarget=null] - The render target to use. + * @return {WebGLRenderTarget} The resulting PMREM. + */ + fromCubemap(cubemap: Texture, renderTarget?: WebGLRenderTarget | null): WebGLRenderTarget; + /** + * Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during + * your texture's network fetch for increased concurrency. + */ + compileCubemapShader(): void; + /** + * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during + * your texture's network fetch for increased concurrency. + */ + compileEquirectangularShader(): void; + /** + * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class, + * so you should not need more than one PMREMGenerator object. If you do, calling dispose() on + * one of them will cause any others to also become unusable. + */ + dispose(): void; + _setSize(cubeSize: any): void; + _dispose(): void; + _cleanup(outputTarget: any): void; + _fromTexture(texture: any, renderTarget: any): any; + _allocateTargets(): WebGLRenderTarget; + _compileMaterial(material: any): void; + _sceneToCubeUV(scene: any, near: any, far: any, cubeUVRenderTarget: any, position: any): void; + _textureToCubeUV(texture: any, cubeUVRenderTarget: any): void; + _applyPMREM(cubeUVRenderTarget: any): void; + /** + * Applies GGX VNDF importance sampling filter to generate a prefiltered environment map. + * Uses Monte Carlo integration with VNDF importance sampling to accurately represent the + * GGX BRDF for physically-based rendering. Reads from the previous LOD level and + * applies incremental roughness filtering to avoid over-blurring. + * + * @private + * @param {WebGLRenderTarget} cubeUVRenderTarget + * @param {number} lodIn - Source LOD level to read from + * @param {number} lodOut - Target LOD level to write to + */ + private _applyGGXFilter; + /** + * This is a two-pass Gaussian blur for a cubemap. Normally this is done + * vertically and horizontally, but this breaks down on a cube. Here we apply + * the blur latitudinally (around the poles), and then longitudinally (towards + * the poles) to approximate the orthogonally-separable blur. It is least + * accurate at the poles, but still does a decent job. + * + * Used for initial scene blur in fromScene() method when sigma > 0. + * + * @private + * @param {WebGLRenderTarget} cubeUVRenderTarget + * @param {number} lodIn + * @param {number} lodOut + * @param {number} sigma + * @param {Vector3} [poleAxis] + */ + private _blur; + _halfBlur(targetIn: any, targetOut: any, lodIn: any, lodOut: any, sigmaRadians: any, direction: any, poleAxis: any): void; +} +import { PerspectiveCamera } from './three.core.js'; +import { Plane } from './three.core.js'; +import { PlaneGeometry } from './three.core.js'; +import { R11_EAC_Format } from './three.core.js'; +import { RED_GREEN_RGTC2_Format } from './three.core.js'; +import { RED_RGTC1_Format } from './three.core.js'; +import { REVISION } from './three.core.js'; +import { RG11_EAC_Format } from './three.core.js'; +import { RGBAFormat } from './three.core.js'; +import { RGBAIntegerFormat } from './three.core.js'; +import { RGBA_ASTC_10x10_Format } from './three.core.js'; +import { RGBA_ASTC_10x5_Format } from './three.core.js'; +import { RGBA_ASTC_10x6_Format } from './three.core.js'; +import { RGBA_ASTC_10x8_Format } from './three.core.js'; +import { RGBA_ASTC_12x10_Format } from './three.core.js'; +import { RGBA_ASTC_12x12_Format } from './three.core.js'; +import { RGBA_ASTC_4x4_Format } from './three.core.js'; +import { RGBA_ASTC_5x4_Format } from './three.core.js'; +import { RGBA_ASTC_5x5_Format } from './three.core.js'; +import { RGBA_ASTC_6x5_Format } from './three.core.js'; +import { RGBA_ASTC_6x6_Format } from './three.core.js'; +import { RGBA_ASTC_8x5_Format } from './three.core.js'; +import { RGBA_ASTC_8x6_Format } from './three.core.js'; +import { RGBA_ASTC_8x8_Format } from './three.core.js'; +import { RGBA_BPTC_Format } from './three.core.js'; +import { RGBA_ETC2_EAC_Format } from './three.core.js'; +import { RGBA_PVRTC_2BPPV1_Format } from './three.core.js'; +import { RGBA_PVRTC_4BPPV1_Format } from './three.core.js'; +import { RGBA_S3TC_DXT1_Format } from './three.core.js'; +import { RGBA_S3TC_DXT3_Format } from './three.core.js'; +import { RGBA_S3TC_DXT5_Format } from './three.core.js'; +import { RGBFormat } from './three.core.js'; +import { RGB_BPTC_SIGNED_Format } from './three.core.js'; +import { RGB_BPTC_UNSIGNED_Format } from './three.core.js'; +import { RGB_ETC1_Format } from './three.core.js'; +import { RGB_ETC2_Format } from './three.core.js'; +import { RGB_PVRTC_2BPPV1_Format } from './three.core.js'; +import { RGB_PVRTC_4BPPV1_Format } from './three.core.js'; +import { RGB_S3TC_DXT1_Format } from './three.core.js'; +import { RGFormat } from './three.core.js'; +import { RGIntegerFormat } from './three.core.js'; +import { RawShaderMaterial } from './three.core.js'; +import { RedFormat } from './three.core.js'; +import { RedIntegerFormat } from './three.core.js'; +import { ReinhardToneMapping } from './three.core.js'; +import { RepeatWrapping } from './three.core.js'; +import { ReverseSubtractEquation } from './three.core.js'; +import { SIGNED_R11_EAC_Format } from './three.core.js'; +import { SIGNED_RED_GREEN_RGTC2_Format } from './three.core.js'; +import { SIGNED_RED_RGTC1_Format } from './three.core.js'; +import { SIGNED_RG11_EAC_Format } from './three.core.js'; +import { SRGBColorSpace } from './three.core.js'; +import { SRGBTransfer } from './three.core.js'; +export namespace ShaderChunk { + export { alphahash_fragment }; + export { alphahash_pars_fragment }; + export { alphamap_fragment }; + export { alphamap_pars_fragment }; + export { alphatest_fragment }; + export { alphatest_pars_fragment }; + export { aomap_fragment }; + export { aomap_pars_fragment }; + export { batching_pars_vertex }; + export { batching_vertex }; + export { begin_vertex }; + export { beginnormal_vertex }; + export { bsdfs }; + export { iridescence_fragment }; + export { bumpmap_pars_fragment }; + export { clipping_planes_fragment }; + export { clipping_planes_pars_fragment }; + export { clipping_planes_pars_vertex }; + export { clipping_planes_vertex }; + export { color_fragment }; + export { color_pars_fragment }; + export { color_pars_vertex }; + export { color_vertex }; + export { common }; + export { cube_uv_reflection_fragment }; + export { defaultnormal_vertex }; + export { displacementmap_pars_vertex }; + export { displacementmap_vertex }; + export { emissivemap_fragment }; + export { emissivemap_pars_fragment }; + export { colorspace_fragment }; + export { colorspace_pars_fragment }; + export { envmap_fragment }; + export { envmap_common_pars_fragment }; + export { envmap_pars_fragment }; + export { envmap_pars_vertex }; + export { envmap_physical_pars_fragment }; + export { envmap_vertex }; + export { fog_vertex }; + export { fog_pars_vertex }; + export { fog_fragment }; + export { fog_pars_fragment }; + export { gradientmap_pars_fragment }; + export { lightmap_pars_fragment }; + export { lights_lambert_fragment }; + export { lights_lambert_pars_fragment }; + export { lights_pars_begin }; + export { lights_toon_fragment }; + export { lights_toon_pars_fragment }; + export { lights_phong_fragment }; + export { lights_phong_pars_fragment }; + export { lights_physical_fragment }; + export { lights_physical_pars_fragment }; + export { lights_fragment_begin }; + export { lights_fragment_maps }; + export { lights_fragment_end }; + export { lightprobes_pars_fragment }; + export { logdepthbuf_fragment }; + export { logdepthbuf_pars_fragment }; + export { logdepthbuf_pars_vertex }; + export { logdepthbuf_vertex }; + export { map_fragment }; + export { map_pars_fragment }; + export { map_particle_fragment }; + export { map_particle_pars_fragment }; + export { metalnessmap_fragment }; + export { metalnessmap_pars_fragment }; + export { morphinstance_vertex }; + export { morphcolor_vertex }; + export { morphnormal_vertex }; + export { morphtarget_pars_vertex }; + export { morphtarget_vertex }; + export { normal_fragment_begin }; + export { normal_fragment_maps }; + export { normal_pars_fragment }; + export { normal_pars_vertex }; + export { normal_vertex }; + export { normalmap_pars_fragment }; + export { clearcoat_normal_fragment_begin }; + export { clearcoat_normal_fragment_maps }; + export { clearcoat_pars_fragment }; + export { iridescence_pars_fragment }; + export { opaque_fragment }; + export { packing }; + export { premultiplied_alpha_fragment }; + export { project_vertex }; + export { dithering_fragment }; + export { dithering_pars_fragment }; + export { roughnessmap_fragment }; + export { roughnessmap_pars_fragment }; + export { shadowmap_pars_fragment }; + export { shadowmap_pars_vertex }; + export { shadowmap_vertex }; + export { shadowmask_pars_fragment }; + export { skinbase_vertex }; + export { skinning_pars_vertex }; + export { skinning_vertex }; + export { skinnormal_vertex }; + export { specularmap_fragment }; + export { specularmap_pars_fragment }; + export { tonemapping_fragment }; + export { tonemapping_pars_fragment }; + export { transmission_fragment }; + export { transmission_pars_fragment }; + export { uv_pars_fragment }; + export { uv_pars_vertex }; + export { uv_vertex }; + export { worldpos_vertex }; + export { vertex$h as background_vert }; + export { fragment$h as background_frag }; + export { vertex$g as backgroundCube_vert }; + export { fragment$g as backgroundCube_frag }; + export { vertex$f as cube_vert }; + export { fragment$f as cube_frag }; + export { vertex$e as depth_vert }; + export { fragment$e as depth_frag }; + export { vertex$d as distance_vert }; + export { fragment$d as distance_frag }; + export { vertex$c as equirect_vert }; + export { fragment$c as equirect_frag }; + export { vertex$b as linedashed_vert }; + export { fragment$b as linedashed_frag }; + export { vertex$a as meshbasic_vert }; + export { fragment$a as meshbasic_frag }; + export { vertex$9 as meshlambert_vert }; + export { fragment$9 as meshlambert_frag }; + export { vertex$8 as meshmatcap_vert }; + export { fragment$8 as meshmatcap_frag }; + export { vertex$7 as meshnormal_vert }; + export { fragment$7 as meshnormal_frag }; + export { vertex$6 as meshphong_vert }; + export { fragment$6 as meshphong_frag }; + export { vertex$5 as meshphysical_vert }; + export { fragment$5 as meshphysical_frag }; + export { vertex$4 as meshtoon_vert }; + export { fragment$4 as meshtoon_frag }; + export { vertex$3 as points_vert }; + export { fragment$3 as points_frag }; + export { vertex$2 as shadow_vert }; + export { fragment$2 as shadow_frag }; + export { vertex$1 as sprite_vert }; + export { fragment$1 as sprite_frag }; +} +export namespace ShaderLib { + namespace physical { + export let uniforms: Object; + import vertexShader = ShaderChunk.meshphysical_vert; + export { vertexShader }; + import fragmentShader = ShaderChunk.meshphysical_frag; + export { fragmentShader }; + } +} +import { ShaderMaterial } from './three.core.js'; +import { ShortType } from './three.core.js'; +import { SrcAlphaFactor } from './three.core.js'; +import { SrcAlphaSaturateFactor } from './three.core.js'; +import { SrcColorFactor } from './three.core.js'; +import { SubtractEquation } from './three.core.js'; +import { SubtractiveBlending } from './three.core.js'; +import { TangentSpaceNormalMap } from './three.core.js'; +import { Texture } from './three.core.js'; +import { Uint16BufferAttribute } from './three.core.js'; +import { Uint32BufferAttribute } from './three.core.js'; +export namespace UniformsLib { + export namespace common_1 { + namespace diffuse { + let value: Color; + } + namespace opacity { + let value_1: number; + export { value_1 as value }; + } + namespace map { + let value_2: null; + export { value_2 as value }; + } + namespace mapTransform { + let value_3: Matrix3; + export { value_3 as value }; + } + namespace alphaMap { + let value_4: null; + export { value_4 as value }; + } + namespace alphaMapTransform { + let value_5: Matrix3; + export { value_5 as value }; + } + namespace alphaTest { + let value_6: number; + export { value_6 as value }; + } + } + export { common_1 as common }; + export namespace specularmap { + namespace specularMap { + let value_7: null; + export { value_7 as value }; + } + namespace specularMapTransform { + let value_8: Matrix3; + export { value_8 as value }; + } + } + export namespace envmap { + namespace envMap { + let value_9: null; + export { value_9 as value }; + } + namespace envMapRotation { + let value_10: Matrix3; + export { value_10 as value }; + } + namespace reflectivity { + let value_11: number; + export { value_11 as value }; + } + namespace ior { + let value_12: number; + export { value_12 as value }; + } + namespace refractionRatio { + let value_13: number; + export { value_13 as value }; + } + namespace dfgLUT { + let value_14: null; + export { value_14 as value }; + } + } + export namespace aomap { + namespace aoMap { + let value_15: null; + export { value_15 as value }; + } + namespace aoMapIntensity { + let value_16: number; + export { value_16 as value }; + } + namespace aoMapTransform { + let value_17: Matrix3; + export { value_17 as value }; + } + } + export namespace lightmap { + namespace lightMap { + let value_18: null; + export { value_18 as value }; + } + namespace lightMapIntensity { + let value_19: number; + export { value_19 as value }; + } + namespace lightMapTransform { + let value_20: Matrix3; + export { value_20 as value }; + } + } + export namespace bumpmap { + namespace bumpMap { + let value_21: null; + export { value_21 as value }; + } + namespace bumpMapTransform { + let value_22: Matrix3; + export { value_22 as value }; + } + namespace bumpScale { + let value_23: number; + export { value_23 as value }; + } + } + export namespace normalmap { + namespace normalMap { + let value_24: null; + export { value_24 as value }; + } + namespace normalMapTransform { + let value_25: Matrix3; + export { value_25 as value }; + } + namespace normalScale { + let value_26: Vector2; + export { value_26 as value }; + } + } + export namespace displacementmap { + namespace displacementMap { + let value_27: null; + export { value_27 as value }; + } + namespace displacementMapTransform { + let value_28: Matrix3; + export { value_28 as value }; + } + namespace displacementScale { + let value_29: number; + export { value_29 as value }; + } + namespace displacementBias { + let value_30: number; + export { value_30 as value }; + } + } + export namespace emissivemap { + namespace emissiveMap { + let value_31: null; + export { value_31 as value }; + } + namespace emissiveMapTransform { + let value_32: Matrix3; + export { value_32 as value }; + } + } + export namespace metalnessmap { + namespace metalnessMap { + let value_33: null; + export { value_33 as value }; + } + namespace metalnessMapTransform { + let value_34: Matrix3; + export { value_34 as value }; + } + } + export namespace roughnessmap { + namespace roughnessMap { + let value_35: null; + export { value_35 as value }; + } + namespace roughnessMapTransform { + let value_36: Matrix3; + export { value_36 as value }; + } + } + export namespace gradientmap { + namespace gradientMap { + let value_37: null; + export { value_37 as value }; + } + } + export namespace fog { + namespace fogDensity { + let value_38: number; + export { value_38 as value }; + } + namespace fogNear { + let value_39: number; + export { value_39 as value }; + } + namespace fogFar { + let value_40: number; + export { value_40 as value }; + } + namespace fogColor { + let value_41: Color; + export { value_41 as value }; + } + } + export namespace lights { + namespace ambientLightColor { + let value_42: never[]; + export { value_42 as value }; + } + namespace lightProbe { + let value_43: never[]; + export { value_43 as value }; + } + namespace directionalLights { + let value_44: never[]; + export { value_44 as value }; + export namespace properties { + let direction: {}; + let color: {}; + } + } + namespace directionalLightShadows { + let value_45: never[]; + export { value_45 as value }; + export namespace properties_1 { + let shadowIntensity: number; + let shadowBias: {}; + let shadowNormalBias: {}; + let shadowRadius: {}; + let shadowMapSize: {}; + } + export { properties_1 as properties }; + } + namespace directionalShadowMatrix { + let value_46: never[]; + export { value_46 as value }; + } + namespace spotLights { + let value_47: never[]; + export { value_47 as value }; + export namespace properties_2 { + let color_1: {}; + export { color_1 as color }; + export let position: {}; + let direction_1: {}; + export { direction_1 as direction }; + export let distance: {}; + export let coneCos: {}; + export let penumbraCos: {}; + export let decay: {}; + } + export { properties_2 as properties }; + } + namespace spotLightShadows { + let value_48: never[]; + export { value_48 as value }; + export namespace properties_3 { + let shadowIntensity_1: number; + export { shadowIntensity_1 as shadowIntensity }; + let shadowBias_1: {}; + export { shadowBias_1 as shadowBias }; + let shadowNormalBias_1: {}; + export { shadowNormalBias_1 as shadowNormalBias }; + let shadowRadius_1: {}; + export { shadowRadius_1 as shadowRadius }; + let shadowMapSize_1: {}; + export { shadowMapSize_1 as shadowMapSize }; + } + export { properties_3 as properties }; + } + namespace spotLightMap { + let value_49: never[]; + export { value_49 as value }; + } + namespace spotLightMatrix { + let value_50: never[]; + export { value_50 as value }; + } + namespace pointLights { + let value_51: never[]; + export { value_51 as value }; + export namespace properties_4 { + let color_2: {}; + export { color_2 as color }; + let position_1: {}; + export { position_1 as position }; + let decay_1: {}; + export { decay_1 as decay }; + let distance_1: {}; + export { distance_1 as distance }; + } + export { properties_4 as properties }; + } + namespace pointLightShadows { + let value_52: never[]; + export { value_52 as value }; + export namespace properties_5 { + let shadowIntensity_2: number; + export { shadowIntensity_2 as shadowIntensity }; + let shadowBias_2: {}; + export { shadowBias_2 as shadowBias }; + let shadowNormalBias_2: {}; + export { shadowNormalBias_2 as shadowNormalBias }; + let shadowRadius_2: {}; + export { shadowRadius_2 as shadowRadius }; + let shadowMapSize_2: {}; + export { shadowMapSize_2 as shadowMapSize }; + export let shadowCameraNear: {}; + export let shadowCameraFar: {}; + } + export { properties_5 as properties }; + } + namespace pointShadowMatrix { + let value_53: never[]; + export { value_53 as value }; + } + namespace hemisphereLights { + let value_54: never[]; + export { value_54 as value }; + export namespace properties_6 { + let direction_2: {}; + export { direction_2 as direction }; + export let skyColor: {}; + export let groundColor: {}; + } + export { properties_6 as properties }; + } + namespace rectAreaLights { + let value_55: never[]; + export { value_55 as value }; + export namespace properties_7 { + let color_3: {}; + export { color_3 as color }; + let position_2: {}; + export { position_2 as position }; + export let width: {}; + export let height: {}; + } + export { properties_7 as properties }; + } + namespace ltc_1 { + let value_56: null; + export { value_56 as value }; + } + namespace ltc_2 { + let value_57: null; + export { value_57 as value }; + } + namespace probesSH { + let value_58: null; + export { value_58 as value }; + } + namespace probesMin { + let value_59: Vector3; + export { value_59 as value }; + } + namespace probesMax { + let value_60: Vector3; + export { value_60 as value }; + } + namespace probesResolution { + let value_61: Vector3; + export { value_61 as value }; + } + } + export namespace points { + export namespace diffuse_1 { + let value_62: Color; + export { value_62 as value }; + } + export { diffuse_1 as diffuse }; + export namespace opacity_1 { + let value_63: number; + export { value_63 as value }; + } + export { opacity_1 as opacity }; + export namespace size { + let value_64: number; + export { value_64 as value }; + } + export namespace scale { + let value_65: number; + export { value_65 as value }; + } + export namespace map_1 { + let value_66: null; + export { value_66 as value }; + } + export { map_1 as map }; + export namespace alphaMap_1 { + let value_67: null; + export { value_67 as value }; + } + export { alphaMap_1 as alphaMap }; + export namespace alphaMapTransform_1 { + let value_68: Matrix3; + export { value_68 as value }; + } + export { alphaMapTransform_1 as alphaMapTransform }; + export namespace alphaTest_1 { + let value_69: number; + export { value_69 as value }; + } + export { alphaTest_1 as alphaTest }; + export namespace uvTransform { + let value_70: Matrix3; + export { value_70 as value }; + } + } + export namespace sprite { + export namespace diffuse_2 { + let value_71: Color; + export { value_71 as value }; + } + export { diffuse_2 as diffuse }; + export namespace opacity_2 { + let value_72: number; + export { value_72 as value }; + } + export { opacity_2 as opacity }; + export namespace center { + let value_73: Vector2; + export { value_73 as value }; + } + export namespace rotation { + let value_74: number; + export { value_74 as value }; + } + export namespace map_2 { + let value_75: null; + export { value_75 as value }; + } + export { map_2 as map }; + export namespace mapTransform_1 { + let value_76: Matrix3; + export { value_76 as value }; + } + export { mapTransform_1 as mapTransform }; + export namespace alphaMap_2 { + let value_77: null; + export { value_77 as value }; + } + export { alphaMap_2 as alphaMap }; + export namespace alphaMapTransform_2 { + let value_78: Matrix3; + export { value_78 as value }; + } + export { alphaMapTransform_2 as alphaMapTransform }; + export namespace alphaTest_2 { + let value_79: number; + export { value_79 as value }; + } + export { alphaTest_2 as alphaTest }; + } +} +import { UniformsUtils } from './three.core.js'; +import { UnsignedByteType } from './three.core.js'; +import { UnsignedInt101111Type } from './three.core.js'; +import { UnsignedInt248Type } from './three.core.js'; +import { UnsignedInt5999Type } from './three.core.js'; +import { UnsignedIntType } from './three.core.js'; +import { UnsignedShort4444Type } from './three.core.js'; +import { UnsignedShort5551Type } from './three.core.js'; +import { UnsignedShortType } from './three.core.js'; +import { VSMShadowMap } from './three.core.js'; +import { Vector2 } from './three.core.js'; +import { Vector3 } from './three.core.js'; +import { Vector4 } from './three.core.js'; +import { WebGLCoordinateSystem } from './three.core.js'; +/** + * A cube render target used in context of {@link WebGLRenderer}. + * + * @augments WebGLRenderTarget + */ +export class WebGLCubeRenderTarget extends WebGLRenderTarget { + /** + * Constructs a new cube render target. + * + * @param {number} [size=1] - The size of the render target. + * @param {RenderTarget~Options} [options] - The configuration object. + */ + constructor(size?: number, options?: {}); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWebGLCubeRenderTarget: boolean; + /** + * Converts the given equirectangular texture to a cube map. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {Texture} texture - The equirectangular texture. + * @return {WebGLCubeRenderTarget} A reference to this cube render target. + */ + fromEquirectangularTexture(renderer: WebGLRenderer, texture: Texture): WebGLCubeRenderTarget; + /** + * Clears this cube render target. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {boolean} [color=true] - Whether the color buffer should be cleared or not. + * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not. + * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not. + */ + clear(renderer: WebGLRenderer, color?: boolean, depth?: boolean, stencil?: boolean): void; +} +import { WebGLRenderTarget } from './three.core.js'; +/** + * This renderer uses WebGL 2 to display scenes. + * + * WebGL 1 is not supported since `r163`. + */ +export class WebGLRenderer { + /** + * Constructs a new WebGL renderer. + * + * @param {WebGLRenderer~Options} [parameters] - The configuration parameter. + */ + constructor(parameters?: {}); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWebGLRenderer: boolean; + /** + * A canvas where the renderer draws its output. This is automatically created by the renderer + * in the constructor (if not provided already); you just need to add it to your page like so: + * ```js + * document.body.appendChild( renderer.domElement ); + * ``` + * + * @type {HTMLCanvasElement|OffscreenCanvas} + */ + domElement: HTMLCanvasElement | OffscreenCanvas; + /** + * A object with debug configuration settings. + * + * - `checkShaderErrors`: If it is `true`, defines whether material shader programs are + * checked for errors during compilation and linkage process. It may be useful to disable + * this check in production for performance gain. It is strongly recommended to keep these + * checks enabled during development. If the shader does not compile and link, it will not + * work and associated material will not render. + * - `onShaderError(gl, program, glVertexShader,glFragmentShader)`: A callback function that + * can be used for custom error reporting. The callback receives the WebGL context, an instance + * of WebGLProgram as well two instances of WebGLShader representing the vertex and fragment shader. + * Assigning a custom function disables the default error reporting. + * + * @type {Object} + */ + debug: Object; + /** + * Whether the renderer should automatically clear its output before rendering a frame or not. + * + * @type {boolean} + * @default true + */ + autoClear: boolean; + /** + * If {@link WebGLRenderer#autoClear} set to `true`, whether the renderer should clear + * the color buffer or not. + * + * @type {boolean} + * @default true + */ + autoClearColor: boolean; + /** + * If {@link WebGLRenderer#autoClear} set to `true`, whether the renderer should clear + * the depth buffer or not. + * + * @type {boolean} + * @default true + */ + autoClearDepth: boolean; + /** + * If {@link WebGLRenderer#autoClear} set to `true`, whether the renderer should clear + * the stencil buffer or not. + * + * @type {boolean} + * @default true + */ + autoClearStencil: boolean; + /** + * Whether the renderer should sort objects or not. + * + * Note: Sorting is used to attempt to properly render objects that have some + * degree of transparency. By definition, sorting objects may not work in all + * cases. Depending on the needs of application, it may be necessary to turn + * off sorting and use other methods to deal with transparency rendering e.g. + * manually determining each object's rendering order. + * + * @type {boolean} + * @default true + */ + sortObjects: boolean; + /** + * User-defined clipping planes specified in world space. These planes apply globally. + * Points in space whose dot product with the plane is negative are cut away. + * + * @type {Array} + */ + clippingPlanes: Array; + /** + * Whether the renderer respects object-level clipping planes or not. + * + * @type {boolean} + * @default false + */ + localClippingEnabled: boolean; + /** + * The tone mapping technique of the renderer. + * + * @type {(NoToneMapping|LinearToneMapping|ReinhardToneMapping|CineonToneMapping|ACESFilmicToneMapping|CustomToneMapping|AgXToneMapping|NeutralToneMapping)} + * @default NoToneMapping + */ + toneMapping: (number | number | number | number | number | number | number | number); + /** + * Exposure level of tone mapping. + * + * @type {number} + * @default 1 + */ + toneMappingExposure: number; + /** + * The normalized resolution scale for the transmission render target, measured in percentage + * of viewport dimensions. Lowering this value can result in significant performance improvements + * when using {@link MeshPhysicalMaterial#transmission}. + * + * @type {number} + * @default 1 + */ + transmissionResolutionScale: number; + _outputColorSpace: string; + /** + * A reference to the XR manager. + * + * @type {WebXRManager} + */ + xr: WebXRManager; + /** + * Returns the rendering context. + * + * @return {WebGL2RenderingContext} The rendering context. + */ + getContext: () => WebGL2RenderingContext; + /** + * Returns the rendering context attributes. + * + * @return {WebGLContextAttributes} The rendering context attributes. + */ + getContextAttributes: () => WebGLContextAttributes; + /** + * Simulates a loss of the WebGL context. This requires support for the `WEBGL_lose_context` extension. + */ + forceContextLoss: () => void; + /** + * Simulates a restore of the WebGL context. This requires support for the `WEBGL_lose_context` extension. + */ + forceContextRestore: () => void; + /** + * Returns the pixel ratio. + * + * @return {number} The pixel ratio. + */ + getPixelRatio: () => number; + /** + * Sets the given pixel ratio and resizes the canvas if necessary. + * + * @param {number} value - The pixel ratio. + */ + setPixelRatio: (value: number) => void; + /** + * Returns the renderer's size in logical pixels. This method does not honor the pixel ratio. + * + * @param {Vector2} target - The method writes the result in this target object. + * @return {Vector2} The renderer's size in logical pixels. + */ + getSize: (target: Vector2) => Vector2; + /** + * Resizes the output canvas to (width, height) with device pixel ratio taken + * into account, and also sets the viewport to fit that size, starting in (0, + * 0). Setting `updateStyle` to false prevents any style changes to the output canvas. + * + * @param {number} width - The width in logical pixels. + * @param {number} height - The height in logical pixels. + * @param {boolean} [updateStyle=true] - Whether to update the `style` attribute of the canvas or not. + */ + setSize: (width: number, height: number, updateStyle?: boolean) => void; + /** + * Returns the drawing buffer size in physical pixels. This method honors the pixel ratio. + * + * @param {Vector2} target - The method writes the result in this target object. + * @return {Vector2} The drawing buffer size. + */ + getDrawingBufferSize: (target: Vector2) => Vector2; + /** + * This method allows to define the drawing buffer size by specifying + * width, height and pixel ratio all at once. The size of the drawing + * buffer is computed with this formula: + * ```js + * size.x = width * pixelRatio; + * size.y = height * pixelRatio; + * ``` + * + * @param {number} width - The width in logical pixels. + * @param {number} height - The height in logical pixels. + * @param {number} pixelRatio - The pixel ratio. + */ + setDrawingBufferSize: (width: number, height: number, pixelRatio: number) => void; + /** + * Sets the post-processing effects to be applied after rendering. + * + * @param {Array} effects - An array of post-processing effects. + */ + setEffects: (effects: any[]) => void; + /** + * Returns the current viewport definition. + * + * @param {Vector2} target - The method writes the result in this target object. + * @return {Vector2} The current viewport definition. + */ + getCurrentViewport: (target: Vector2) => Vector2; + /** + * Returns the viewport definition. + * + * @param {Vector4} target - The method writes the result in this target object. + * @return {Vector4} The viewport definition. + */ + getViewport: (target: Vector4) => Vector4; + /** + * Sets the viewport to render from `(x, y)` to `(x + width, y + height)`. + * + * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the viewport origin in logical pixel unit. + * Or alternatively a four-component vector specifying all the parameters of the viewport. + * @param {number} y - The vertical coordinate for the lower left corner of the viewport origin in logical pixel unit. + * @param {number} width - The width of the viewport in logical pixel unit. + * @param {number} height - The height of the viewport in logical pixel unit. + */ + setViewport: (x: number | Vector4, y: number, width: number, height: number) => void; + /** + * Returns the scissor region. + * + * @param {Vector4} target - The method writes the result in this target object. + * @return {Vector4} The scissor region. + */ + getScissor: (target: Vector4) => Vector4; + /** + * Sets the scissor region to render from `(x, y)` to `(x + width, y + height)`. + * + * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the scissor region origin in logical pixel unit. + * Or alternatively a four-component vector specifying all the parameters of the scissor region. + * @param {number} y - The vertical coordinate for the lower left corner of the scissor region origin in logical pixel unit. + * @param {number} width - The width of the scissor region in logical pixel unit. + * @param {number} height - The height of the scissor region in logical pixel unit. + */ + setScissor: (x: number | Vector4, y: number, width: number, height: number) => void; + /** + * Returns `true` if the scissor test is enabled. + * + * @return {boolean} Whether the scissor test is enabled or not. + */ + getScissorTest: () => boolean; + /** + * Enable or disable the scissor test. When this is enabled, only the pixels + * within the defined scissor area will be affected by further renderer + * actions. + * + * @param {boolean} boolean - Whether the scissor test is enabled or not. + */ + setScissorTest: (boolean: boolean) => void; + /** + * Sets a custom opaque sort function for the render lists. Pass `null` + * to use the default `painterSortStable` function. + * + * @param {?Function} method - The opaque sort function. + */ + setOpaqueSort: (method: Function | null) => void; + /** + * Sets a custom transparent sort function for the render lists. Pass `null` + * to use the default `reversePainterSortStable` function. + * + * @param {?Function} method - The opaque sort function. + */ + setTransparentSort: (method: Function | null) => void; + /** + * Returns the clear color. + * + * @param {Color} target - The method writes the result in this target object. + * @return {Color} The clear color. + */ + getClearColor: (target: Color) => Color; + /** + * Sets the clear color and alpha. + * + * @param {Color} color - The clear color. + * @param {number} [alpha=1] - The clear alpha. + */ + setClearColor: (...args: any[]) => void; + /** + * Returns the clear alpha. Ranges within `[0,1]`. + * + * @return {number} The clear alpha. + */ + getClearAlpha: () => number; + /** + * Sets the clear alpha. + * + * @param {number} alpha - The clear alpha. + */ + setClearAlpha: (...args: any[]) => void; + /** + * Tells the renderer to clear its color, depth or stencil drawing buffer(s). + * This method initializes the buffers to the current clear color values. + * + * @param {boolean} [color=true] - Whether the color buffer should be cleared or not. + * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not. + * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not. + */ + clear: (color?: boolean, depth?: boolean, stencil?: boolean) => void; + /** + * Clears the color buffer. Equivalent to calling `renderer.clear( true, false, false )`. + */ + clearColor: () => void; + /** + * Clears the depth buffer. Equivalent to calling `renderer.clear( false, true, false )`. + */ + clearDepth: () => void; + /** + * Clears the stencil buffer. Equivalent to calling `renderer.clear( false, false, true )`. + */ + clearStencil: () => void; + /** + * Sets a compatibility node builder for rendering node materials with WebGLRenderer. + * This enables using TSL (Three.js Shading Language) node materials to prepare + * for migration to WebGPURenderer. + * + * @param {WebGLNodesHandler} nodesHandler - The node builder instance. + */ + setNodesHandler: (nodesHandler: WebGLNodesHandler) => void; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose: () => void; + renderBufferDirect: (camera: any, scene: any, geometry: any, material: any, object: any, group: any) => void; + /** + * Compiles all materials in the scene with the camera. This is useful to precompile shaders + * before the first rendering. If you want to add a 3D object to an existing scene, use the third + * optional parameter for applying the target scene. + * + * Note that the (target) scene's lighting and environment must be configured before calling this method. + * + * @param {Object3D} scene - The scene or another type of 3D object to precompile. + * @param {Camera} camera - The camera. + * @param {?Scene} [targetScene=null] - The target scene. + * @return {Set} The precompiled materials. + */ + compile: (scene: Object3D, camera: Camera, targetScene?: Scene | null) => Set; + /** + * Asynchronous version of {@link WebGLRenderer#compile}. + * + * This method makes use of the `KHR_parallel_shader_compile` WebGL extension. Hence, + * it is recommended to use this version of `compile()` whenever possible. + * + * @async + * @param {Object3D} scene - The scene or another type of 3D object to precompile. + * @param {Camera} camera - The camera. + * @param {?Scene} [targetScene=null] - The target scene. + * @return {Promise} A Promise that resolves when the given scene can be rendered without unnecessary stalling due to shader compilation. + */ + compileAsync: (scene: Object3D, camera: Camera, targetScene?: Scene | null) => Promise; + /** + * Applications are advised to always define the animation loop + * with this method and not manually with `requestAnimationFrame()` + * for best compatibility. + * + * @param {?onAnimationCallback} callback - The application's animation loop. + */ + setAnimationLoop: (callback: onAnimationCallback | null) => void; + /** + * Renders the given scene (or other type of 3D object) using the given camera. + * + * The render is done to a previously specified render target set by calling {@link WebGLRenderer#setRenderTarget} + * or to the canvas as usual. + * + * By default render buffers are cleared before rendering but you can prevent + * this by setting the property `autoClear` to `false`. If you want to prevent + * only certain buffers being cleared you can `autoClearColor`, `autoClearDepth` + * or `autoClearStencil` to `false`. To force a clear, use {@link WebGLRenderer#clear}. + * + * @param {Object3D} scene - The scene to render. + * @param {Camera} camera - The camera. + */ + render: (scene: Object3D, camera: Camera) => void; + /** + * Returns the active cube face. + * + * @return {number} The active cube face. + */ + getActiveCubeFace: () => number; + /** + * Returns the active mipmap level. + * + * @return {number} The active mipmap level. + */ + getActiveMipmapLevel: () => number; + /** + * Returns the active render target. + * + * @return {?WebGLRenderTarget} The active render target. Returns `null` if no render target + * is currently set. + */ + getRenderTarget: () => WebGLRenderTarget | null; + setRenderTargetTextures: (renderTarget: any, colorTexture: any, depthTexture: any) => void; + setRenderTargetFramebuffer: (renderTarget: any, defaultFramebuffer: any) => void; + /** + * Sets the active rendertarget. + * + * @param {?WebGLRenderTarget} renderTarget - The render target to set. When `null` is given, + * the canvas is set as the active render target instead. + * @param {number} [activeCubeFace=0] - The active cube face when using a cube render target. + * Indicates the z layer to render in to when using 3D or array render targets. + * @param {number} [activeMipmapLevel=0] - The active mipmap level. + */ + setRenderTarget: (renderTarget: WebGLRenderTarget | null, activeCubeFace?: number, activeMipmapLevel?: number) => void; + /** + * Reads the pixel data from the given render target into the given buffer. + * + * @param {WebGLRenderTarget} renderTarget - The render target to read from. + * @param {number} x - The `x` coordinate of the copy region's origin. + * @param {number} y - The `y` coordinate of the copy region's origin. + * @param {number} width - The width of the copy region. + * @param {number} height - The height of the copy region. + * @param {TypedArray} buffer - The result buffer. + * @param {number} [activeCubeFaceIndex] - The active cube face index. + * @param {number} [textureIndex=0] - The texture index of an MRT render target. + */ + readRenderTargetPixels: (renderTarget: WebGLRenderTarget, x: number, y: number, width: number, height: number, buffer: TypedArray, activeCubeFaceIndex?: number, textureIndex?: number) => void; + /** + * Asynchronous, non-blocking version of {@link WebGLRenderer#readRenderTargetPixels}. + * + * It is recommended to use this version of `readRenderTargetPixels()` whenever possible. + * + * @async + * @param {WebGLRenderTarget} renderTarget - The render target to read from. + * @param {number} x - The `x` coordinate of the copy region's origin. + * @param {number} y - The `y` coordinate of the copy region's origin. + * @param {number} width - The width of the copy region. + * @param {number} height - The height of the copy region. + * @param {TypedArray} buffer - The result buffer. + * @param {number} [activeCubeFaceIndex] - The active cube face index. + * @param {number} [textureIndex=0] - The texture index of an MRT render target. + * @return {Promise} A Promise that resolves when the read has been finished. The resolve provides the read data as a typed array. + */ + readRenderTargetPixelsAsync: (renderTarget: WebGLRenderTarget, x: number, y: number, width: number, height: number, buffer: TypedArray, activeCubeFaceIndex?: number, textureIndex?: number) => Promise; + /** + * Copies pixels from the current bound framebuffer into the given texture. + * + * @param {FramebufferTexture} texture - The texture. + * @param {?Vector2} [position=null] - The start position of the copy operation. + * @param {number} [level=0] - The mip level. The default represents the base mip. + */ + copyFramebufferToTexture: (texture: FramebufferTexture, position?: Vector2 | null, level?: number) => void; + /** + * Copies data of the given source texture into a destination texture. + * + * When using render target textures as `srcTexture` and `dstTexture`, you must make sure both render targets are initialized + * {@link WebGLRenderer#initRenderTarget}. + * + * @param {Texture} srcTexture - The source texture. + * @param {Texture} dstTexture - The destination texture. + * @param {?(Box2|Box3)} [srcRegion=null] - A bounding box which describes the source region. Can be two or three-dimensional. + * @param {?(Vector2|Vector3)} [dstPosition=null] - A vector that represents the origin of the destination region. Can be two or three-dimensional. + * @param {number} [srcLevel=0] - The source mipmap level to copy. + * @param {?number} [dstLevel=0] - The destination mipmap level. + */ + copyTextureToTexture: (srcTexture: Texture, dstTexture: Texture, srcRegion?: (Box2 | Box3) | null, dstPosition?: (Vector2 | Vector3) | null, srcLevel?: number, dstLevel?: number | null) => void; + /** + * Initializes the given WebGLRenderTarget memory. Useful for initializing a render target so data + * can be copied into it using {@link WebGLRenderer#copyTextureToTexture} before it has been + * rendered to. + * + * @param {WebGLRenderTarget} target - The render target. + */ + initRenderTarget: (target: WebGLRenderTarget) => void; + /** + * Initializes the given texture. Useful for preloading a texture rather than waiting until first + * render (which can cause noticeable lags due to decode and GPU upload overhead). + * + * @param {Texture} texture - The texture. + */ + initTexture: (texture: Texture) => void; + /** + * Can be used to reset the internal WebGL state. This method is mostly + * relevant for applications which share a single WebGL context across + * multiple WebGL libraries. + */ + resetState: () => void; + /** + * Defines the coordinate system of the renderer. + * + * In `WebGLRenderer`, the value is always `WebGLCoordinateSystem`. + * + * @type {WebGLCoordinateSystem|WebGPUCoordinateSystem} + * @default WebGLCoordinateSystem + * @readonly + */ + readonly get coordinateSystem(): number | WebGPUCoordinateSystem; + set outputColorSpace(colorSpace: string | string); + /** + * Defines the output color space of the renderer. + * + * @type {SRGBColorSpace|LinearSRGBColorSpace} + * @default SRGBColorSpace + */ + get outputColorSpace(): string | string; +} +export function WebGLUtils(gl: any, extensions: any): { + convert: (p: any, colorSpace?: string) => any; +}; +import { WebXRController } from './three.core.js'; +import { ZeroFactor } from './three.core.js'; +import { createCanvasElement } from './three.core.js'; +import { error } from './three.core.js'; +import { log } from './three.core.js'; +import { warn } from './three.core.js'; +import { warnOnce } from './three.core.js'; +declare var alphahash_fragment: string; +declare var alphahash_pars_fragment: string; +declare var alphamap_fragment: string; +declare var alphamap_pars_fragment: string; +declare var alphatest_fragment: string; +declare var alphatest_pars_fragment: string; +declare var aomap_fragment: string; +declare var aomap_pars_fragment: string; +declare var batching_pars_vertex: string; +declare var batching_vertex: string; +declare var begin_vertex: string; +declare var beginnormal_vertex: string; +declare var bsdfs: string; +declare var iridescence_fragment: string; +declare var bumpmap_pars_fragment: string; +declare var clipping_planes_fragment: string; +declare var clipping_planes_pars_fragment: string; +declare var clipping_planes_pars_vertex: string; +declare var clipping_planes_vertex: string; +declare var color_fragment: string; +declare var color_pars_fragment: string; +declare var color_pars_vertex: string; +declare var color_vertex: string; +declare var common: string; +declare var cube_uv_reflection_fragment: string; +declare var defaultnormal_vertex: string; +declare var displacementmap_pars_vertex: string; +declare var displacementmap_vertex: string; +declare var emissivemap_fragment: string; +declare var emissivemap_pars_fragment: string; +declare var colorspace_fragment: string; +declare var colorspace_pars_fragment: string; +declare var envmap_fragment: string; +declare var envmap_common_pars_fragment: string; +declare var envmap_pars_fragment: string; +declare var envmap_pars_vertex: string; +declare var envmap_physical_pars_fragment: string; +declare var envmap_vertex: string; +declare var fog_vertex: string; +declare var fog_pars_vertex: string; +declare var fog_fragment: string; +declare var fog_pars_fragment: string; +declare var gradientmap_pars_fragment: string; +declare var lightmap_pars_fragment: string; +declare var lights_lambert_fragment: string; +declare var lights_lambert_pars_fragment: string; +declare var lights_pars_begin: string; +declare var lights_toon_fragment: string; +declare var lights_toon_pars_fragment: string; +declare var lights_phong_fragment: string; +declare var lights_phong_pars_fragment: string; +declare var lights_physical_fragment: string; +declare var lights_physical_pars_fragment: string; +declare var lights_fragment_begin: string; +declare var lights_fragment_maps: string; +declare var lights_fragment_end: string; +declare var lightprobes_pars_fragment: string; +declare var logdepthbuf_fragment: string; +declare var logdepthbuf_pars_fragment: string; +declare var logdepthbuf_pars_vertex: string; +declare var logdepthbuf_vertex: string; +declare var map_fragment: string; +declare var map_pars_fragment: string; +declare var map_particle_fragment: string; +declare var map_particle_pars_fragment: string; +declare var metalnessmap_fragment: string; +declare var metalnessmap_pars_fragment: string; +declare var morphinstance_vertex: string; +declare var morphcolor_vertex: string; +declare var morphnormal_vertex: string; +declare var morphtarget_pars_vertex: string; +declare var morphtarget_vertex: string; +declare var normal_fragment_begin: string; +declare var normal_fragment_maps: string; +declare var normal_pars_fragment: string; +declare var normal_pars_vertex: string; +declare var normal_vertex: string; +declare var normalmap_pars_fragment: string; +declare var clearcoat_normal_fragment_begin: string; +declare var clearcoat_normal_fragment_maps: string; +declare var clearcoat_pars_fragment: string; +declare var iridescence_pars_fragment: string; +declare var opaque_fragment: string; +declare var packing: string; +declare var premultiplied_alpha_fragment: string; +declare var project_vertex: string; +declare var dithering_fragment: string; +declare var dithering_pars_fragment: string; +declare var roughnessmap_fragment: string; +declare var roughnessmap_pars_fragment: string; +declare var shadowmap_pars_fragment: string; +declare var shadowmap_pars_vertex: string; +declare var shadowmap_vertex: string; +declare var shadowmask_pars_fragment: string; +declare var skinbase_vertex: string; +declare var skinning_pars_vertex: string; +declare var skinning_vertex: string; +declare var skinnormal_vertex: string; +declare var specularmap_fragment: string; +declare var specularmap_pars_fragment: string; +declare var tonemapping_fragment: string; +declare var tonemapping_pars_fragment: string; +declare var transmission_fragment: string; +declare var transmission_pars_fragment: string; +declare var uv_pars_fragment: string; +declare var uv_pars_vertex: string; +declare var uv_vertex: string; +declare var worldpos_vertex: string; +declare const vertex$h: "varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}"; +declare const fragment$h: "uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}"; +declare const vertex$g: "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}"; +declare const fragment$g: "#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vWorldDirection );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}"; +declare const vertex$f: "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}"; +declare const fragment$f: "uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}"; +declare const vertex$e: "#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}"; +declare const fragment$e: "#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\tfloat fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ];\n\t#else\n\t\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5;\n\t#endif\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\n\t#endif\n}"; +declare const vertex$d: "#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}"; +declare const fragment$d: "#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = vec4( dist, 0.0, 0.0, 1.0 );\n}"; +declare const vertex$c: "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}"; +declare const fragment$c: "uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}"; +declare const vertex$b: "uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; +declare const fragment$b: "uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; +declare const vertex$a: "#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; +declare const fragment$a: "uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; +declare const vertex$9: "#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}"; +declare const fragment$9: "#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; +declare const vertex$8: "#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}"; +declare const fragment$8: "#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; +declare const vertex$7: "#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}"; +declare const fragment$7: "#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( normalize( normal ) * 0.5 + 0.5, diffuseColor.a );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}"; +declare const vertex$6: "#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}"; +declare const fragment$6: "#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; +declare const vertex$5: "#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}"; +declare const fragment$5: "#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n\tuniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n \n\t\toutgoingLight = outgoingLight + sheenSpecularDirect + sheenSpecularIndirect;\n \n \t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; +declare const vertex$4: "#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}"; +declare const fragment$4: "#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; +declare const vertex$3: "uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}"; +declare const fragment$3: "uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; +declare const vertex$2: "#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; +declare const fragment$2: "uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n\t#include \n}"; +declare const vertex$1: "uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix[ 3 ];\n\tvec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}"; +declare const fragment$1: "uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"; +/** + * This class represents an abstraction of the WebXR Device API and is + * internally used by {@link WebGLRenderer}. `WebXRManager` also provides a public + * interface that allows users to enable/disable XR and perform XR related + * tasks like for instance retrieving controllers. + * + * @augments EventDispatcher + * @hideconstructor + */ +declare class WebXRManager extends EventDispatcher { + /** + * Constructs a new WebGL renderer. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGL2RenderingContext} gl - The rendering context. + */ + constructor(renderer: WebGLRenderer, gl: WebGL2RenderingContext); + /** + * Whether the manager's XR camera should be automatically updated or not. + * + * @type {boolean} + * @default true + */ + cameraAutoUpdate: boolean; + /** + * This flag notifies the renderer to be ready for XR rendering. Set it to `true` + * if you are going to use XR in your app. + * + * @type {boolean} + * @default false + */ + enabled: boolean; + /** + * Whether XR presentation is active or not. + * + * @type {boolean} + * @readonly + * @default false + */ + readonly isPresenting: boolean; + /** + * Returns a group representing the `target ray` space of the XR controller. + * Use this space for visualizing 3D objects that support the user in pointing + * tasks like UI interaction. + * + * @param {number} index - The index of the controller. + * @return {Group} A group representing the `target ray` space. + */ + getController: (index: number) => Group; + /** + * Returns a group representing the `grip` space of the XR controller. + * Use this space for visualizing 3D objects that support the user in pointing + * tasks like UI interaction. + * + * Note: If you want to show something in the user's hand AND offer a + * pointing ray at the same time, you'll want to attached the handheld object + * to the group returned by `getControllerGrip()` and the ray to the + * group returned by `getController()`. The idea is to have two + * different groups in two different coordinate spaces for the same WebXR + * controller. + * + * @param {number} index - The index of the controller. + * @return {Group} A group representing the `grip` space. + */ + getControllerGrip: (index: number) => Group; + /** + * Returns a group representing the `hand` space of the XR controller. + * Use this space for visualizing 3D objects that support the user in pointing + * tasks like UI interaction. + * + * @param {number} index - The index of the controller. + * @return {Group} A group representing the `hand` space. + */ + getHand: (index: number) => Group; + /** + * Sets the framebuffer scale factor. + * + * This method can not be used during a XR session. + * + * @param {number} value - The framebuffer scale factor. + */ + setFramebufferScaleFactor: (value: number) => void; + /** + * Sets the reference space type. Can be used to configure a spatial relationship with the user's physical + * environment. Depending on how the user moves in 3D space, setting an appropriate reference space can + * improve tracking. Default is `local-floor`. Valid values can be found here + * https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpace#reference_space_types. + * + * This method can not be used during a XR session. + * + * @param {string} value - The reference space type. + */ + setReferenceSpaceType: (value: string) => void; + /** + * Returns the XR reference space. + * + * @return {XRReferenceSpace} The XR reference space. + */ + getReferenceSpace: () => XRReferenceSpace; + /** + * Sets a custom XR reference space. + * + * @param {XRReferenceSpace} space - The XR reference space. + */ + setReferenceSpace: (space: XRReferenceSpace) => void; + /** + * Returns the current base layer. + * + * This is an `XRProjectionLayer` when the targeted XR device supports the + * WebXR Layers API, or an `XRWebGLLayer` otherwise. + * + * @return {?(XRWebGLLayer|XRProjectionLayer)} The XR base layer. + */ + getBaseLayer: () => (XRWebGLLayer | XRProjectionLayer) | null; + /** + * Returns the current XR binding. + * + * Creates a new binding if needed and the browser is + * capable of doing so. + * + * @return {?XRWebGLBinding} The XR binding. Returns `null` if one cannot be created. + */ + getBinding: () => XRWebGLBinding | null; + /** + * Returns the current XR frame. + * + * @return {?XRFrame} The XR frame. Returns `null` when used outside a XR session. + */ + getFrame: () => XRFrame | null; + /** + * Returns the current XR session. + * + * @return {?XRSession} The XR session. Returns `null` when used outside a XR session. + */ + getSession: () => XRSession | null; + /** + * After a XR session has been requested usually with one of the `*Button` modules, it + * is injected into the renderer with this method. This method triggers the start of + * the actual XR rendering. + * + * @async + * @param {XRSession} value - The XR session to set. + * @return {Promise} A Promise that resolves when the session has been set. + */ + setSession: (value: XRSession) => Promise; + /** + * Returns the environment blend mode from the current XR session. + * + * @return {'opaque'|'additive'|'alpha-blend'|undefined} The environment blend mode. Returns `undefined` when used outside of a XR session. + */ + getEnvironmentBlendMode: () => "opaque" | "additive" | "alpha-blend" | undefined; + /** + * Returns the current depth texture computed via depth sensing. + * + * See {@link WebXRDepthSensing#getDepthTexture}. + * + * @return {?Texture} The depth texture. + */ + getDepthTexture: () => Texture | null; + /** + * Updates the state of the XR camera. Use this method on app level if you + * set `cameraAutoUpdate` to `false`. The method requires the non-XR + * camera of the scene as a parameter. The passed in camera's transformation + * is automatically adjusted to the position of the XR camera when calling + * this method. + * + * @param {Camera} camera - The camera. + */ + updateCamera: (camera: Camera) => void; + /** + * Returns an instance of {@link ArrayCamera} which represents the XR camera + * of the active XR session. For each view it holds a separate camera object. + * + * The camera's `fov` is currently not used and does not reflect the fov of + * the XR camera. If you need the fov on app level, you have to compute in + * manually from the XR camera's projection matrices. + * + * @return {ArrayCamera} The XR camera. + */ + getCamera: () => ArrayCamera; + /** + * Returns the amount of foveation used by the XR compositor for the projection layer. + * + * @return {number|undefined} The amount of foveation. + */ + getFoveation: () => number | undefined; + /** + * Sets the foveation value. + * + * @param {number} value - A number in the range `[0,1]` where `0` means no foveation (full resolution) + * and `1` means maximum foveation (the edges render at lower resolution). + */ + setFoveation: (value: number) => void; + /** + * Returns `true` if depth sensing is supported. + * + * @return {boolean} Whether depth sensing is supported or not. + */ + hasDepthSensing: () => boolean; + /** + * Returns the depth sensing mesh. + * + * See {@link WebXRDepthSensing#getMesh}. + * + * @return {Mesh} The depth sensing mesh. + */ + getDepthSensingMesh: () => Mesh; + /** + * Retrieves an opaque texture from the view-aligned {@link XRCamera}. + * Only available during the current animation loop. + * + * @param {XRCamera} xrCamera - The camera to query. + * @return {?Texture} An opaque texture representing the current raw camera frame. + */ + getCameraTexture: (xrCamera: XRCamera) => Texture | null; + setAnimationLoop: (callback: any) => void; + dispose: () => void; +} +export { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveBlending, AgXToneMapping, AlphaFormat, AlwaysCompare, AlwaysDepth, ArrayCamera, BackSide, BoxGeometry, BufferAttribute, BufferGeometry, ByteType, CineonToneMapping, ClampToEdgeWrapping, Color, ColorManagement, ConstantAlphaFactor, ConstantColorFactor, CubeCamera, CubeDepthTexture, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeUVReflectionMapping, CullFaceBack, CullFaceFront, CullFaceNone, CustomBlending, CustomToneMapping, Data3DTexture, DataArrayTexture, DataTexture, DepthFormat, DepthStencilFormat, DepthTexture, DoubleSide, DstAlphaFactor, DstColorFactor, EqualCompare, EqualDepth, EquirectangularReflectionMapping, EquirectangularRefractionMapping, EventDispatcher, ExternalTexture, Float32BufferAttribute, FloatType, FrontSide, Frustum, GLSL3, GreaterCompare, GreaterDepth, GreaterEqualCompare, GreaterEqualDepth, HalfFloatType, IntType, Layers, LessCompare, LessDepth, LessEqualCompare, LessEqualDepth, LinearFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, LinearToneMapping, LinearTransfer, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeutralToneMapping, NeverCompare, NeverDepth, NoBlending, NoColorSpace, NoToneMapping, NormalBlending, NotEqualCompare, NotEqualDepth, ObjectSpaceNormalMap, OneFactor, OneMinusConstantAlphaFactor, OneMinusConstantColorFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, PCFShadowMap, PCFSoftShadowMap, PerspectiveCamera, Plane, PlaneGeometry, R11_EAC_Format, RED_GREEN_RGTC2_Format, RED_RGTC1_Format, REVISION, RG11_EAC_Format, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGBFormat, RGB_BPTC_SIGNED_Format, RGB_BPTC_UNSIGNED_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGFormat, RGIntegerFormat, RawShaderMaterial, RedFormat, RedIntegerFormat, ReinhardToneMapping, RepeatWrapping, ReverseSubtractEquation, SIGNED_R11_EAC_Format, SIGNED_RED_GREEN_RGTC2_Format, SIGNED_RED_RGTC1_Format, SIGNED_RG11_EAC_Format, SRGBColorSpace, SRGBTransfer, ShaderMaterial, ShortType, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, SubtractEquation, SubtractiveBlending, TangentSpaceNormalMap, Texture, Uint16BufferAttribute, Uint32BufferAttribute, UniformsUtils, UnsignedByteType, UnsignedInt101111Type, UnsignedInt248Type, UnsignedInt5999Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, WebGLCoordinateSystem, WebGLRenderTarget, WebXRController, ZeroFactor, createCanvasElement, error, log, warn, warnOnce }; +export { AdditiveAnimationBlendMode, AlwaysStencilFunc, AmbientLight, AnimationAction, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrowHelper, AttachedBindMode, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BasicDepthPacking, BasicShadowMap, BatchedMesh, BezierInterpolant, Bone, BooleanKeyframeTrack, Box2, Box3, Box3Helper, BoxHelper, BufferGeometryLoader, Cache, Camera, CameraHelper, CanvasTexture, CapsuleGeometry, CatmullRomCurve3, CircleGeometry, Clock, ColorKeyframeTrack, Compatibility, CompressedArrayTexture, CompressedCubeTexture, CompressedTexture, CompressedTextureLoader, ConeGeometry, Controls, CubeTextureLoader, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceFrontBack, Curve, CurvePath, CylinderGeometry, Cylindrical, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DetachedBindMode, DirectionalLight, DirectionalLightHelper, DiscreteInterpolant, DodecahedronGeometry, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EdgesGeometry, EllipseCurve, EqualStencilFunc, Euler, ExtrudeGeometry, FileLoader, Float16BufferAttribute, Fog, FogExp2, FramebufferTexture, FrustumArray, GLBufferAttribute, GLSL1, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, Group, HTMLTexture, HemisphereLight, HemisphereLightHelper, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateBezier, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InterpolationSamplingMode, InterpolationSamplingType, InvertStencilOp, KeepStencilOp, KeyframeTrack, LOD, LatheGeometry, LessEqualStencilFunc, LessStencilFunc, Light, LightProbe, Line, Line3, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LineSegments, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, Loader, LoaderUtils, LoadingManager, LoopOnce, LoopPingPong, LoopRepeat, MOUSE, Material, MaterialBlending, MaterialLoader, MathUtils, Matrix2, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NeverStencilFunc, NoNormalPacking, NormalAnimationBlendMode, NormalGAPacking, NormalRGPacking, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, ObjectLoader, OctahedronGeometry, Path, PlaneHelper, PointLight, PointLightHelper, Points, PointsMaterial, PolarGridHelper, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, RGBADepthPacking, RGBDepthPacking, RGBIntegerFormat, RGDepthPacking, Ray, Raycaster, RectAreaLight, RenderTarget, RenderTarget3D, ReplaceStencilOp, RingGeometry, Scene, ShadowMaterial, Shape, ShapeGeometry, ShapePath, ShapeUtils, Skeleton, SkeletonHelper, SkinnedMesh, Source, Sphere, SphereGeometry, Spherical, SphericalHarmonics3, SplineCurve, SpotLight, SpotLightHelper, Sprite, SpriteMaterial, StaticCopyUsage, StaticDrawUsage, StaticReadUsage, StereoCamera, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, TOUCH, TetrahedronGeometry, TextureLoader, TextureUtils, Timer, TimestampQuery, TorusGeometry, TorusKnotGeometry, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry, UVMapping, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsGroup, VectorKeyframeTrack, VideoFrameTexture, VideoTexture, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGPUCoordinateSystem, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroSlopeEnding, ZeroStencilOp, getConsoleFunction, setConsoleFunction } from "./three.core.js"; diff --git a/jsdoc-testing/jsdoc/build/three.webgpu.d.ts b/jsdoc-testing/jsdoc/build/three.webgpu.d.ts new file mode 100644 index 000000000..c7d41b22a --- /dev/null +++ b/jsdoc-testing/jsdoc/build/three.webgpu.d.ts @@ -0,0 +1,23873 @@ +import { ACESFilmicToneMapping } from './three.core.js'; +/** + * A generic class that can be used by nodes which contribute + * ambient occlusion to the scene. E.g. an ambient occlusion map + * node can be used as input for this module. Used in {@link NodeMaterial}. + * + * @augments LightingNode + */ +export class AONode extends LightingNode { + /** + * Constructs a new AO node. + * + * @param {?Node} [aoNode=null] - The ambient occlusion node. + */ + constructor(aoNode?: Node | null); + /** + * The ambient occlusion node. + * + * @type {?Node} + * @default null + */ + aoNode: Node | null; + setup(builder: any): void; +} +import { AddEquation } from './three.core.js'; +import { AddOperation } from './three.core.js'; +import { AdditiveBlending } from './three.core.js'; +import { AgXToneMapping } from './three.core.js'; +import { AlphaFormat } from './three.core.js'; +import { AlwaysCompare } from './three.core.js'; +import { AlwaysDepth } from './three.core.js'; +import { AlwaysStencilFunc } from './three.core.js'; +import { AmbientLight } from './three.core.js'; +/** + * Module for representing ambient lights as nodes. + * + * @augments AnalyticLightNode + */ +export class AmbientLightNode extends AnalyticLightNode { + /** + * Constructs a new ambient light node. + * + * @param {?AmbientLight} [light=null] - The ambient light source. + */ + constructor(light?: AmbientLight | null); + setup({ context }: { + context: any; + }): void; +} +/** + * Base class for analytic light nodes. + * + * @augments LightingNode + */ +export class AnalyticLightNode extends LightingNode { + /** + * Constructs a new analytic light node. + * + * @param {?Light} [light=null] - The light source. + */ + constructor(light?: Light | null); + /** + * The light source. + * + * @type {?Light} + * @default null + */ + light: Light | null; + /** + * The light's color value. + * + * @type {Color} + */ + color: Color; + /** + * The light's color node. Points to `colorNode` of the light source, if set. Otherwise + * it creates a uniform node based on {@link AnalyticLightNode#color}. + * + * @type {Node} + */ + colorNode: Node; + /** + * This property is used to retain a reference to the original value of {@link AnalyticLightNode#colorNode}. + * The final color node is represented by a different node when using shadows. + * + * @type {?Node} + * @default null + */ + baseColorNode: Node | null; + /** + * Represents the light's shadow. + * + * @type {?ShadowNode} + * @default null + */ + shadowNode: ShadowNode | null; + /** + * Represents the light's shadow color. + * + * @type {?Node} + * @default null + */ + shadowColorNode: Node | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isAnalyticLightNode: boolean; + _shadowDisposeListener: (() => void) | undefined; + /** + * Frees internal resources related to shadows. + */ + disposeShadow(): void; + getHash(): any; + /** + * Returns a node representing a direction vector which points from the current + * position in view space to the light's position in view space. + * + * @param {NodeBuilder} builder - The builder object used for setting up the light. + * @return {Node} The light vector node. + */ + getLightVector(builder: NodeBuilder): Node; + /** + * Sets up the direct lighting for the analytic light node. + * + * @abstract + * @param {NodeBuilder} builder - The builder object used for setting up the light. + * @return {Object|undefined} The direct light data (color and direction). + */ + setupDirect(): Object | undefined; + /** + * Sets up the direct rect area lighting for the analytic light node. + * + * @abstract + * @param {NodeBuilder} builder - The builder object used for setting up the light. + * @return {Object|undefined} The direct rect area light data. + */ + setupDirectRectArea(): Object | undefined; + /** + * Setups the shadow node for this light. The method exists so concrete light classes + * can setup different types of shadow nodes. + * + * @return {ShadowNode} The created shadow node. + */ + setupShadowNode(): ShadowNode; + /** + * Setups the shadow for this light. This method is only executed if the light + * cast shadows and the current build object receives shadows. It incorporates + * shadows into the lighting computation. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setupShadow(builder: NodeBuilder): void; + /** + * Unlike most other nodes, lighting nodes do not return a output node in {@link Node#setup}. + * The main purpose of lighting nodes is to configure the current {@link LightingModel} and/or + * invocate the respective interface methods. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setup(builder: NodeBuilder): void; + /** + * The update method is used to update light uniforms per frame. + * Potentially overwritten in concrete light nodes to update light + * specific uniforms. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update(): void; +} +import { ArrayCamera } from './three.core.js'; +/** + * Base class for representing element access on an array-like + * node data structures. + * + * @augments Node + */ +export class ArrayElementNode extends Node { + /** + * Constructs an array element node. + * + * @param {Node} node - The array-like node. + * @param {Node} indexNode - The index node that defines the element access. + */ + constructor(node: Node, indexNode: Node); + /** + * The array-like node. + * + * @type {Node} + */ + node: Node; + /** + * The index node that defines the element access. + * + * @type {Node} + */ + indexNode: Node; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isArrayElementNode: boolean; + /** + * This method is overwritten since the node type is inferred from the array-like node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * This method is overwritten since the member type is inferred from the array-like node. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} name - The member name. + * @return {string} The member type. + */ + getMemberType(builder: NodeBuilder, name: string): string; + generate(builder: any): string; +} +/** + * ArrayNode represents a collection of nodes, typically created using the {@link array} function. + * ```js + * const colors = array( [ + * vec3( 1, 0, 0 ), + * vec3( 0, 1, 0 ), + * vec3( 0, 0, 1 ) + * ] ); + * + * const redColor = tintColors.element( 0 ); + * ``` + * + * @augments TempNode + */ +export class ArrayNode extends TempNode { + /** + * Constructs a new array node. + * + * @param {?string} nodeType - The data type of the elements. + * @param {number} count - Size of the array. + * @param {?Array} [values=null] - Array default values. + */ + constructor(nodeType: string | null, count: number, values?: Array | null); + /** + * Array size. + * + * @type {number} + */ + count: number; + /** + * Array default values. + * + * @type {?Array} + */ + values: Array | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isArrayNode: boolean; + /** + * Returns the number of elements in the node array. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {number} The number of elements in the node array. + */ + getArrayCount(): number; + /** + * Returns the node's type. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The type of the node. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Returns the type of a member variable. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} name - The name of the member variable. + * @return {string} The type of the member variable. + */ + getMemberType(builder: NodeBuilder, name: string): string; + /** + * This method builds the output node and returns the resulting array as a shader string. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The generated shader string. + */ + generate(builder: NodeBuilder): string; +} +/** + * These node represents an assign operation. Meaning a node is assigned + * to another node. + * + * @augments TempNode + */ +export class AssignNode extends TempNode { + /** + * Constructs a new assign node. + * + * @param {Node} targetNode - The target node. + * @param {Node} sourceNode - The source type. + */ + constructor(targetNode: Node, sourceNode: Node); + /** + * The target node. + * + * @type {Node} + */ + targetNode: Node; + /** + * The source node. + * + * @type {Node} + */ + sourceNode: Node; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isAssignNode: boolean; + /** + * Whether this node is used more than once in context of other nodes. This method + * is overwritten since it always returns `false` (assigns are unique). + * + * @return {boolean} A flag that indicates if there is more than one dependency to other nodes. Always `false`. + */ + hasDependencies(): boolean; + generateNodeType(builder: any, output: any): string; + /** + * Whether a split is required when assigning source to target. This can happen when the component length of + * target and source data type does not match. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {boolean} Whether a split is required when assigning source to target. + */ + needsSplitAssign(builder: NodeBuilder): boolean; + setup(builder: any): void; + generate(builder: any, output: any): any; +} +/** + * `AtomicFunctionNode` represents any function that can operate on atomic variable types + * within a shader. In an atomic function, any modification to an atomic variable will + * occur as an indivisible step with a defined order relative to other modifications. + * Accordingly, even if multiple atomic functions are modifying an atomic variable at once + * atomic operations will not interfere with each other. + * + * This node can only be used with a WebGPU backend. + * + * @augments Node + */ +export class AtomicFunctionNode extends Node { + /** + * Constructs a new atomic function node. + * + * @param {string} method - The signature of the atomic function to construct. + * @param {Node} pointerNode - An atomic variable or element of an atomic buffer. + * @param {Node} valueNode - The value that mutates the atomic variable. + */ + constructor(method: string, pointerNode: Node, valueNode: Node); + /** + * The signature of the atomic function to construct. + * + * @type {string} + */ + method: string; + /** + * An atomic variable or element of an atomic buffer. + * + * @type {Node} + */ + pointerNode: Node; + /** + * A value that modifies the atomic variable. + * + * @type {Node} + */ + valueNode: Node; + /** + * Overwrites the default implementation to return the type of + * the pointer node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The input type. + */ + getInputType(builder: NodeBuilder): string; + /** + * Overwritten since the node type is inferred from the input type. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + generate(builder: any): any; +} +export namespace AtomicFunctionNode { + let ATOMIC_LOAD: string; + let ATOMIC_STORE: string; + let ATOMIC_ADD: string; + let ATOMIC_SUB: string; + let ATOMIC_MAX: string; + let ATOMIC_MIN: string; + let ATOMIC_AND: string; + let ATOMIC_OR: string; + let ATOMIC_XOR: string; +} +/** + * Base class for representing shader attributes as nodes. + * + * @augments Node + */ +export class AttributeNode extends Node { + /** + * Constructs a new attribute node. + * + * @param {string} attributeName - The name of the attribute. + * @param {?string} nodeType - The node type. + */ + constructor(attributeName: string, nodeType?: string | null); + _attributeName: string; + getHash(builder: any): string; + generateNodeType(builder: any): string | null; + /** + * Sets the attribute name to the given value. The method can be + * overwritten in derived classes if the final name must be computed + * analytically. + * + * @param {string} attributeName - The name of the attribute. + * @return {AttributeNode} A reference to this node. + */ + setAttributeName(attributeName: string): AttributeNode; + /** + * Returns the attribute name of this node. The method can be + * overwritten in derived classes if the final name must be computed + * analytically. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The attribute name. + */ + getAttributeName(): string; + generate(builder: any): any; + serialize(data: any): void; + deserialize(data: any): void; +} +import { BackSide } from './three.core.js'; +/** + * Represents a GPU control barrier that synchronizes compute operations within a given scope. + * + * This node can only be used with a WebGPU backend. + * + * @augments Node + */ +export class BarrierNode extends Node { + /** + * Constructs a new barrier node. + * + * @param {string} scope - The scope defines the behavior of the node. + */ + constructor(scope: string); + scope: string; + isBarrierNode: boolean; + setup(builder: any): void; + generate(builder: any): void; +} +/** + * Represents a basic model for Image-based lighting (IBL). The environment + * is defined via environment maps in the equirectangular or cube map format. + * `BasicEnvironmentNode` is intended for non-PBR materials like {@link MeshBasicNodeMaterial} + * or {@link MeshPhongNodeMaterial}. + * + * @augments LightingNode + */ +export class BasicEnvironmentNode extends LightingNode { + /** + * Constructs a new basic environment node. + * + * @param {Node} [envNode=null] - A node representing the environment. + */ + constructor(envNode?: Node); + /** + * A node representing the environment. + * + * @type {Node} + * @default null + */ + envNode: Node; + setup(builder: any): void; +} +/** + * A specific version of {@link IrradianceNode} that is only relevant + * for {@link MeshBasicNodeMaterial}. Since the material is unlit, it + * requires a special scaling factor for the light map. + * + * @augments LightingNode + */ +export class BasicLightMapNode extends LightingNode { + /** + * Constructs a new basic light map node. + * + * @param {?Node} [lightMapNode=null] - The light map node. + */ + constructor(lightMapNode?: Node | null); + /** + * The light map node. + * + * @type {?Node} + */ + lightMapNode: Node | null; + setup(builder: any): void; +} +/** + * This version of a node library represents a basic version + * just focusing on lights and tone mapping techniques. + * + * @private + * @augments NodeLibrary + */ +export class BasicNodeLibrary extends NodeLibrary { +} +import { BasicShadowMap } from './three.core.js'; +/** + * This node implements the vertex shader logic which is required + * when rendering 3D objects via batching. `BatchNode` must be used + * with instances of {@link BatchedMesh}. + * + * @augments Node + */ +export class BatchNode extends Node { + /** + * Constructs a new batch node. + * + * @param {BatchedMesh} batchMesh - A reference to batched mesh. + */ + constructor(batchMesh: BatchedMesh); + /** + * A reference to batched mesh. + * + * @type {BatchedMesh} + */ + batchMesh: BatchedMesh; + /** + * The batching index node. + * + * @type {?IndexNode} + * @default null + */ + batchingIdNode: IndexNode | null; + /** + * Setups the internal buffers and nodes and assigns the transformed vertex data + * to predefined node variables for accumulation. That follows the same patterns + * like with morph and skinning nodes. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setup(builder: NodeBuilder): void; +} +/** + * This node represents an operation that reinterprets the bit representation of a value + * in one type as a value in another type. + * + * @augments TempNode + */ +export class BitcastNode extends TempNode { + /** + * Constructs a new bitcast node. + * + * @param {Node} valueNode - The value to convert. + * @param {string} conversionType - The type to convert to. + * @param {?string} [inputType = null] - The expected input data type of the bitcast operation. + */ + constructor(valueNode: Node, conversionType: string, inputType?: string | null); + /** + * The data to bitcast to a new type. + * + * @type {Node} + */ + valueNode: Node; + /** + * The type the value will be converted to. + * + * @type {string} + */ + conversionType: string; + /** + * The expected input data type of the bitcast operation. + * + * + * @type {string} + * @default null + */ + inputType: string; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBitcastNode: boolean; + generateNodeType(builder: any): any; + generate(builder: any): string; +} +/** + * This node represents an operation that counts the bits of a piece of shader data. + * + * @augments MathNode + */ +export class BitcountNode extends MathNode { + /** + * Constructs a new math node. + * + * @param {'countTrailingZeros'|'countLeadingZeros'|'countOneBits'} method - The method name. + * @param {Node} aNode - The first input. + */ + constructor(method: "countTrailingZeros" | "countLeadingZeros" | "countOneBits", aNode: Node); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBitcountNode: boolean; + /** + * Casts the input value of the function to an integer if necessary. + * + * @private + * @param {Node|Node} inputNode - The input value. + * @param {Node} outputNode - The output value. + * @param {string} elementType - The type of the input value. + */ + private _resolveElementType; + _returnDataNode(inputType: any): any; + /** + * Creates and registers a reusable GLSL function that emulates the behavior of countTrailingZeros. + * + * @private + * @param {string} method - The name of the function to create. + * @param {string} elementType - The type of the input value. + * @returns {Function} - The generated function + */ + private _createTrailingZerosBaseLayout; + /** + * Creates and registers a reusable GLSL function that emulates the behavior of countLeadingZeros. + * + * @private + * @param {string} method - The name of the function to create. + * @param {string} elementType - The type of the input value. + * @returns {Function} - The generated function + */ + private _createLeadingZerosBaseLayout; + /** + * Creates and registers a reusable GLSL function that emulates the behavior of countOneBits. + * + * @private + * @param {string} method - The name of the function to create. + * @param {string} elementType - The type of the input value. + * @returns {Function} - The generated function + */ + private _createOneBitsBaseLayout; + /** + * Creates and registers a reusable GLSL function that emulates the behavior of the specified bitcount function. + * including considerations for component-wise bitcounts on vector type inputs. + * + * @private + * @param {string} method - The name of the function to create. + * @param {string} inputType - The type of the input value. + * @param {number} typeLength - The vec length of the input value. + * @param {Function} baseFn - The base function that operates on an individual component of the vector. + * @returns {Function} - The alias function for the specified bitcount method. + */ + private _createMainLayout; +} +export namespace BitcountNode { + let COUNT_TRAILING_ZEROS: string; + let COUNT_LEADING_ZEROS: string; + let COUNT_ONE_BITS: string; +} +/** + * Represents blending configuration. + * + * This class encapsulates all blending-related properties that control how + * a material's colors are combined with the colors already in the frame buffer. + */ +export class BlendMode { + /** + * Constructs a new blending configuration. + * + * @param {(NoBlending|NormalBlending|AdditiveBlending|SubtractiveBlending|MultiplyBlending|CustomBlending|MaterialBlending)} [blending=NormalBlending] - The blending mode. + */ + constructor(blending?: (number | number | number | number | number | number | number)); + /** + * Defines the blending type. + * + * It must be set to `CustomBlending` if custom blending properties like + * {@link BlendMode#blendSrc}, {@link BlendMode#blendDst} or {@link BlendMode#blendEquation} + * should have any effect. + * + * @type {(NoBlending|NormalBlending|AdditiveBlending|SubtractiveBlending|MultiplyBlending|CustomBlending|MaterialBlending)} + * @default NormalBlending + */ + blending: (number | number | number | number | number | number | number); + /** + * Defines the blending source factor. + * + * This determines how the source (incoming) fragment color is factored before being added + * to the destination (existing) fragment color in the frame buffer. + * + * @type {(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} + * @default SrcAlphaFactor + */ + blendSrc: (number | number | number | number | number | number | number | number | number | number | number | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); + /** + * Defines the blending destination factor. + * + * This determines how the destination (existing) fragment color in the frame buffer + * is factored before being combined with the source (incoming) fragment color. + * + * @type {(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} + * @default OneMinusSrcAlphaFactor + */ + blendDst: (number | number | number | number | number | number | number | number | number | number | number | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); + /** + * Defines the blending equation. + * + * This determines how the source and destination colors are combined. + * + * @type {(AddEquation|SubtractEquation|ReverseSubtractEquation|MinEquation|MaxEquation)} + * @default AddEquation + */ + blendEquation: (number | number | number | number | number); + /** + * Defines the blending source alpha factor. + * + * When set, this allows separate control of the alpha channel's source blending factor. + * If `null`, {@link BlendMode#blendSrc} is used for the alpha channel as well. + * + * @type {?(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} + * @default null + */ + blendSrcAlpha: (number | number | number | number | number | number | number | number | number | number | number | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; + /** + * Defines the blending destination alpha factor. + * + * When set, this allows separate control of the alpha channel's destination blending factor. + * If `null`, {@link BlendMode#blendDst} is used for the alpha channel as well. + * + * @type {?(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} + * @default null + */ + blendDstAlpha: (number | number | number | number | number | number | number | number | number | number | number | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; + /** + * Defines the blending equation of the alpha channel. + * + * When set, this allows separate control of the alpha channel's blending equation. + * If `null`, {@link BlendMode#blendEquation} is used for the alpha channel as well. + * + * @type {?(AddEquation|SubtractEquation|ReverseSubtractEquation|MinEquation|MaxEquation)} + * @default null + */ + blendEquationAlpha: (number | number | number | number | number) | null; + /** + * Defines whether to premultiply the alpha (transparency) value. + * + * If `true`, the RGB color of the texture or material is multiplied by its alpha value. + * This is useful for transparent textures/materials where the color data + * should already include the transparency information. + * + * @type {boolean} + * @default false + */ + premultiplyAlpha: boolean; + /** + * Copies the blending properties from the given source to this instance. + * + * @param {BlendMode} source - The blending configuration to copy from. + * @return {BlendMode} A reference to this instance. + */ + copy(source: BlendMode): BlendMode; + /** + * Returns a clone of this blending configuration. + * + * @return {BlendMode} A new Blending instance with the same properties. + */ + clone(): BlendMode; +} +import { BoxGeometry } from './three.core.js'; +import { BufferAttribute } from './three.core.js'; +/** + * In earlier `three.js` versions it was only possible to define attribute data + * on geometry level. With `BufferAttributeNode`, it is also possible to do this + * on the node level. + * ```js + * const geometry = new THREE.PlaneGeometry(); + * const positionAttribute = geometry.getAttribute( 'position' ); + * + * const colors = []; + * for ( let i = 0; i < position.count; i ++ ) { + * colors.push( 1, 0, 0 ); + * } + * + * material.colorNode = bufferAttribute( new THREE.Float32BufferAttribute( colors, 3 ) ); + * ``` + * This new approach is especially interesting when geometry data are generated via + * compute shaders. The below line converts a storage buffer into an attribute node. + * ```js + * material.positionNode = positionBuffer.toAttribute(); + * ``` + * @augments InputNode + */ +export class BufferAttributeNode extends InputNode { + /** + * Constructs a new buffer attribute node. + * + * @param {BufferAttribute|InterleavedBuffer|TypedArray} value - The attribute data. + * @param {?string} [bufferType=null] - The buffer type (e.g. `'vec3'`). + * @param {number} [bufferStride=0] - The buffer stride. + * @param {number} [bufferOffset=0] - The buffer offset. + */ + constructor(value: BufferAttribute | InterleavedBuffer | TypedArray, bufferType?: string | null, bufferStride?: number, bufferOffset?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBufferNode: boolean; + /** + * The buffer type (e.g. `'vec3'`). + * + * @type {?string} + * @default null + */ + bufferType: string | null; + /** + * The buffer stride. + * + * @type {number} + * @default 0 + */ + bufferStride: number; + /** + * The buffer offset. + * + * @type {number} + * @default 0 + */ + bufferOffset: number; + /** + * The usage property. Set this to `THREE.DynamicDrawUsage` via `.setUsage()`, + * if you are planning to update the attribute data per frame. + * + * @type {number} + * @default StaticDrawUsage + */ + usage: number; + /** + * Whether the attribute is instanced or not. + * + * @type {boolean} + * @default false + */ + instanced: boolean; + /** + * A reference to the buffer attribute. + * + * @type {?BufferAttribute} + * @default null + */ + attribute: BufferAttribute | null; + /** + * This method is overwritten since the attribute data might be shared + * and thus the hash should be shared as well. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The hash. + */ + getHash(builder: NodeBuilder): string; + /** + * This method is overwritten since the node type is inferred from + * the buffer attribute. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Depending on which value was passed to the node, `setup()` behaves + * differently. If no instance of `BufferAttribute` was passed, the method + * creates an internal attribute and configures it respectively. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setup(builder: NodeBuilder): void; + /** + * Generates the code snippet of the buffer attribute node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The generated code snippet. + */ + generate(builder: NodeBuilder): string; + /** + * Overwrites the default implementation to return a fixed value `'bufferAttribute'`. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The input type. + */ + getInputType(): string; + /** + * Sets the `usage` property to the given value. + * + * @param {number} value - The usage to set. + * @return {BufferAttributeNode} A reference to this node. + */ + setUsage(value: number): BufferAttributeNode; + /** + * Sets the `instanced` property to the given value. + * + * @param {boolean} value - The value to set. + * @return {BufferAttributeNode} A reference to this node. + */ + setInstanced(value: boolean): BufferAttributeNode; +} +import { BufferGeometry } from './three.core.js'; +/** + * A special type of uniform node which represents array-like data + * as uniform buffers. The access usually happens via `element()` + * which returns an instance of {@link ArrayElementNode}. For example: + * + * ```js + * const bufferNode = buffer( array, 'mat4', count ); + * const matrixNode = bufferNode.element( index ); // access a matrix from the buffer + * ``` + * In general, it is recommended to use the more managed {@link UniformArrayNode} + * since it handles more input types and automatically cares about buffer paddings. + * + * @augments UniformNode + */ +export class BufferNode extends UniformNode { + /** + * Constructs a new buffer node. + * + * @param {Array} value - Array-like buffer data. + * @param {string} bufferType - The data type of the buffer. + * @param {number} [bufferCount=0] - The count of buffer elements. + */ + constructor(value: Array, bufferType: string, bufferCount?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBufferNode: boolean; + /** + * The data type of the buffer. + * + * @type {string} + */ + bufferType: string; + /** + * The uniform node that holds the value of the reference node. + * + * @type {number} + * @default 0 + */ + bufferCount: number; + /** + * An array of update ranges. + * + * @type {Array<{start: number, count: number}>} + */ + updateRanges: Array<{ + start: number; + count: number; + }>; + /** + * Adds a range of data in the data array to be updated on the GPU. + * + * @param {number} start - Position at which to start update. + * @param {number} count - The number of components to update. + */ + addUpdateRange(start: number, count: number): void; + /** + * Clears the update ranges. + */ + clearUpdateRanges(): void; + /** + * Overwrites the default implementation to return a fixed value `'buffer'`. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The input type. + */ + getInputType(): string; +} +/** + * The node allows to set values for built-in shader variables. That is + * required for features like hardware-accelerated vertex clipping. + * + * @augments Node + */ +export class BuiltinNode extends Node { + /** + * Constructs a new builtin node. + * + * @param {string} name - The name of the built-in shader variable. + */ + constructor(name: string); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBuiltinNode: boolean; + /** + * Generates the code snippet of the builtin node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The generated code snippet. + */ + generate(): string; +} +/** + * This class can be used for applying bump maps to materials. + * + * ```js + * material.normalNode = bumpMap( texture( bumpTex ) ); + * ``` + * + * @augments TempNode + */ +export class BumpMapNode extends TempNode { + /** + * Constructs a new bump map node. + * + * @param {Node} textureNode - Represents the bump map data. + * @param {?Node} [scaleNode=null] - Controls the intensity of the bump effect. + */ + constructor(textureNode: Node, scaleNode?: Node | null); + /** + * Represents the bump map data. + * + * @type {Node} + */ + textureNode: Node; + /** + * Controls the intensity of the bump effect. + * + * @type {?Node} + * @default null + */ + scaleNode: Node | null; + setup(): void; +} +/** + * A specialized group which enables applications access to the + * Render Bundle API of WebGPU. The group with all its descendant nodes + * are considered as one render bundle and processed as such by + * the renderer. + * + * This module is only fully supported by `WebGPURenderer` with a WebGPU backend. + * With a WebGL backend, the group can technically be rendered but without + * any performance improvements. + * + * @augments Group + */ +export class BundleGroup extends Group { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBundleGroup: boolean; + /** + * The bundle group's version. + * + * @type {number} + * @readonly + * @default 0 + */ + readonly version: number; + /** + * Set this property to `true` when the bundle group has changed. + * + * @type {boolean} + * @default false + * @param {boolean} value + */ + set needsUpdate(value: boolean); +} +/** + * The class generates the code of a given node but returns another node in the output. + * This can be used to call a method or node that does not return a value, i.e. + * type `void` on an input where returning a value is required. Example: + * + * ```js + * material.colorNode = myColor.bypass( runVoidFn() ) + *``` + * + * @augments Node + */ +export class BypassNode extends Node { + /** + * Constructs a new bypass node. + * + * @param {Node} outputNode - The output node. + * @param {Node} callNode - The call node. + */ + constructor(outputNode: Node, callNode: Node); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBypassNode: boolean; + /** + * The output node. + * + * @type {Node} + */ + outputNode: Node; + /** + * The call node. + * + * @type {Node} + */ + callNode: Node; + generateNodeType(builder: any): string; + generate(builder: any): string | Node | null; +} +import { ByteType } from './three.core.js'; +/** + * CanvasTarget is a class that represents the final output destination of the renderer. + * + * @augments EventDispatcher + */ +export class CanvasTarget extends EventDispatcher { + /** + * Constructs a new CanvasTarget. + * + * @param {HTMLCanvasElement|OffscreenCanvas} domElement - The canvas element to render to. + */ + constructor(domElement: HTMLCanvasElement | OffscreenCanvas); + /** + * A reference to the canvas element the renderer is drawing to. + * This value of this property will automatically be created by + * the renderer. + * + * @type {HTMLCanvasElement|OffscreenCanvas} + */ + domElement: HTMLCanvasElement | OffscreenCanvas; + /** + * The renderer's pixel ratio. + * + * @private + * @type {number} + * @default 1 + */ + private _pixelRatio; + /** + * The width of the renderer's default framebuffer in logical pixel unit. + * + * @private + * @type {number} + */ + private _width; + /** + * The height of the renderer's default framebuffer in logical pixel unit. + * + * @private + * @type {number} + */ + private _height; + /** + * The viewport of the renderer in logical pixel unit. + * + * @private + * @type {Vector4} + */ + private _viewport; + /** + * The scissor rectangle of the renderer in logical pixel unit. + * + * @private + * @type {Vector4} + */ + private _scissor; + /** + * Whether the scissor test should be enabled or not. + * + * @private + * @type {boolean} + */ + private _scissorTest; + /** + * The color texture of the default framebuffer. + * + * @type {FramebufferTexture} + */ + colorTexture: FramebufferTexture; + /** + * The depth texture of the default framebuffer. + * + * @type {DepthTexture} + */ + depthTexture: DepthTexture; + /** + * Returns the pixel ratio. + * + * @return {number} The pixel ratio. + */ + getPixelRatio(): number; + /** + * Returns the drawing buffer size in physical pixels. This method honors the pixel ratio. + * + * @param {Vector2} target - The method writes the result in this target object. + * @return {Vector2} The drawing buffer size. + */ + getDrawingBufferSize(target: Vector2): Vector2; + /** + * Returns the renderer's size in logical pixels. This method does not honor the pixel ratio. + * + * @param {Vector2} target - The method writes the result in this target object. + * @return {Vector2} The renderer's size in logical pixels. + */ + getSize(target: Vector2): Vector2; + /** + * Sets the given pixel ratio and resizes the canvas if necessary. + * + * @param {number} [value=1] - The pixel ratio. + */ + setPixelRatio(value?: number): void; + /** + * This method allows to define the drawing buffer size by specifying + * width, height and pixel ratio all at once. The size of the drawing + * buffer is computed with this formula: + * ```js + * size.x = width * pixelRatio; + * size.y = height * pixelRatio; + * ``` + * + * @param {number} width - The width in logical pixels. + * @param {number} height - The height in logical pixels. + * @param {number} pixelRatio - The pixel ratio. + */ + setDrawingBufferSize(width: number, height: number, pixelRatio: number): void; + /** + * Sets the size of the renderer. + * + * @param {number} width - The width in logical pixels. + * @param {number} height - The height in logical pixels. + * @param {boolean} [updateStyle=true] - Whether to update the `style` attribute of the canvas or not. + */ + setSize(width: number, height: number, updateStyle?: boolean): void; + /** + * Returns the scissor rectangle. + * + * @param {Vector4} target - The method writes the result in this target object. + * @return {Vector4} The scissor rectangle. + */ + getScissor(target: Vector4): Vector4; + /** + * Defines the scissor rectangle. + * + * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the box in logical pixel unit. + * Instead of passing four arguments, the method also works with a single four-dimensional vector. + * @param {number} y - The vertical coordinate for the lower left corner of the box in logical pixel unit. + * @param {number} width - The width of the scissor box in logical pixel unit. + * @param {number} height - The height of the scissor box in logical pixel unit. + */ + setScissor(x: number | Vector4, y: number, width: number, height: number): void; + /** + * Returns the scissor test value. + * + * @return {boolean} Whether the scissor test should be enabled or not. + */ + getScissorTest(): boolean; + /** + * Defines the scissor test. + * + * @param {boolean} boolean - Whether the scissor test should be enabled or not. + */ + setScissorTest(boolean: boolean): void; + /** + * Returns the viewport definition. + * + * @param {Vector4} target - The method writes the result in this target object. + * @return {Vector4} The viewport definition. + */ + getViewport(target: Vector4): Vector4; + /** + * Defines the viewport. + * + * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the viewport origin in logical pixel unit. + * @param {number} y - The vertical coordinate for the lower left corner of the viewport origin in logical pixel unit. + * @param {number} width - The width of the viewport in logical pixel unit. + * @param {number} height - The height of the viewport in logical pixel unit. + * @param {number} minDepth - The minimum depth value of the viewport. WebGPU only. + * @param {number} maxDepth - The maximum depth value of the viewport. WebGPU only. + */ + setViewport(x: number | Vector4, y: number, width: number, height: number, minDepth?: number, maxDepth?: number): void; + /** + * Dispatches the resize event. + * + * @private + */ + private _dispatchResize; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + * + * @fires RenderTarget#dispose + */ + dispose(): void; +} +import { CineonToneMapping } from './three.core.js'; +import { ClampToEdgeWrapping } from './three.core.js'; +/** + * In earlier three.js versions, clipping was defined globally + * on the renderer or on material level. This special version of + * `THREE.Group` allows to encode the clipping state into the scene + * graph. Meaning if you create an instance of this group, all + * descendant 3D objects will be affected by the respective clipping + * planes. + * + * Note: `ClippingGroup` can only be used with `WebGPURenderer`. + * + * @augments Group + */ +export class ClippingGroup extends Group { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isClippingGroup: boolean; + /** + * An array with clipping planes. + * + * @type {Array} + */ + clippingPlanes: Array; + /** + * Whether clipping should be enabled or not. + * + * @type {boolean} + * @default true + */ + enabled: boolean; + /** + * Whether the intersection of the clipping planes is used to clip objects, rather than their union. + * + * @type {boolean} + * @default false + */ + clipIntersection: boolean; + /** + * Whether shadows should be clipped or not. + * + * @type {boolean} + * @default false + */ + clipShadows: boolean; +} +/** + * This node is used in {@link NodeMaterial} to setup the clipping + * which can happen hardware-accelerated (if supported) and optionally + * use alpha-to-coverage for anti-aliasing clipped edges. + * + * @augments Node + */ +export class ClippingNode extends Node { + /** + * Constructs a new clipping node. + * + * @param {('default'|'hardware'|'alphaToCoverage')} [scope='default'] - The node's scope. Similar to other nodes, + * the selected scope influences the behavior of the node and what type of code is generated. + */ + constructor(scope?: ("default" | "hardware" | "alphaToCoverage")); + /** + * The node's scope. Similar to other nodes, the selected scope influences + * the behavior of the node and what type of code is generated. + * + * @type {('default'|'hardware'|'alphaToCoverage')} + */ + scope: ("default" | "hardware" | "alphaToCoverage"); + /** + * Setups the node depending on the selected scope. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The result node. + */ + setup(builder: NodeBuilder): Node; + hardwareClipping: any; + /** + * Setups alpha to coverage. + * + * @param {Array} intersectionPlanes - The intersection planes. + * @param {Array} unionPlanes - The union planes. + * @return {Node} The result node. + */ + setupAlphaToCoverage(intersectionPlanes: Array, unionPlanes: Array): Node; + /** + * Setups the default clipping. + * + * @param {Array} intersectionPlanes - The intersection planes. + * @param {Array} unionPlanes - The union planes. + * @return {Node} The result node. + */ + setupDefault(intersectionPlanes: Array, unionPlanes: Array): Node; + /** + * Setups hardware clipping. + * + * @param {Array} unionPlanes - The union planes. + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The result node. + */ + setupHardwareClipping(unionPlanes: Array, builder: NodeBuilder): Node; +} +export namespace ClippingNode { + let ALPHA_TO_COVERAGE: string; + let DEFAULT: string; + let HARDWARE: string; +} +/** + * This class represents native code sections. It is the base + * class for modules like {@link FunctionNode} which allows to implement + * functions with native shader languages. + * + * @augments Node + */ +export class CodeNode extends Node { + /** + * Constructs a new code node. + * + * @param {string} [code=''] - The native code. + * @param {Array} [includes=[]] - An array of includes. + * @param {('js'|'wgsl'|'glsl')} [language=''] - The used language. + */ + constructor(code?: string, includes?: Array, language?: ("js" | "wgsl" | "glsl")); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isCodeNode: boolean; + /** + * The native code. + * + * @type {string} + * @default '' + */ + code: string; + /** + * An array of includes + * + * @type {Array} + * @default [] + */ + includes: Array; + /** + * The used language. + * + * @type {('js'|'wgsl'|'glsl')} + * @default '' + */ + language: ("js" | "wgsl" | "glsl"); + /** + * Sets the includes of this code node. + * + * @param {Array} includes - The includes to set. + * @return {CodeNode} A reference to this node. + */ + setIncludes(includes: Array): CodeNode; + /** + * Returns the includes of this code node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Array} The includes. + */ + getIncludes(): Array; + generate(builder: any): any; + serialize(data: any): void; + deserialize(data: any): void; +} +import { Color } from './three.core.js'; +import { ColorManagement } from './three.core.js'; +/** + * This node represents a color space conversion. Meaning it converts + * a color value from a source to a target color space. + * + * @augments TempNode + */ +export class ColorSpaceNode extends TempNode { + /** + * Constructs a new color space node. + * + * @param {Node} colorNode - Represents the color to convert. + * @param {string} source - The source color space. + * @param {string} target - The target color space. + */ + constructor(colorNode: Node, source: string, target: string); + /** + * Represents the color to convert. + * + * @type {Node} + */ + colorNode: Node; + /** + * The source color space. + * + * @type {string} + */ + source: string; + /** + * The target color space. + * + * @type {string} + */ + target: string; + /** + * This method resolves the constants `WORKING_COLOR_SPACE` and + * `OUTPUT_COLOR_SPACE` based on the current configuration of the + * color management and renderer. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} colorSpace - The color space to resolve. + * @return {string} The resolved color space. + */ + resolveColorSpace(builder: NodeBuilder, colorSpace: string): string; + setup(builder: any): Node; +} +import { Compatibility } from './three.core.js'; +/** + * `ComputeBuiltinNode` represents a compute-scope builtin value that expose information + * about the currently running dispatch and/or the device it is running on. + * + * This node can only be used with a WebGPU backend. + * + * @augments Node + */ +export class ComputeBuiltinNode extends Node { + /** + * Constructs a new compute builtin node. + * + * @param {string} builtinName - The built-in name. + * @param {string} nodeType - The node type. + */ + constructor(builtinName: string, nodeType: string); + /** + * The built-in name. + * + * @private + * @type {string} + */ + private _builtinName; + /** + * This method is overwritten since hash is derived from the built-in name. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The hash. + */ + getHash(builder: NodeBuilder): string; + /** + * This method is overwritten since the node type is simply derived from `nodeType`.. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(): string; + /** + * Sets the builtin name. + * + * @param {string} builtinName - The built-in name. + * @return {ComputeBuiltinNode} A reference to this node. + */ + setBuiltinName(builtinName: string): ComputeBuiltinNode; + /** + * Returns the builtin name. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The builtin name. + */ + getBuiltinName(): string; + /** + * Whether the current node builder has the builtin or not. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {boolean} Whether the builder has the builtin or not. + */ + hasBuiltin(builder: NodeBuilder): boolean; + generate(builder: any, output: any): any; + serialize(data: any): void; + deserialize(data: any): void; +} +/** + * Represents a compute shader node. + * + * @augments Node + */ +export class ComputeNode extends Node { + /** + * Constructs a new compute node. + * + * @param {Node} computeNode - The node that defines the compute shader logic. + * @param {Array} workgroupSize - An array defining the X, Y, and Z dimensions of the workgroup for compute shader execution. + */ + constructor(computeNode: Node, workgroupSize: Array); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isComputeNode: boolean; + /** + * The node that defines the compute shader logic. + * + * @type {Node} + */ + computeNode: Node; + /** + * An array defining the X, Y, and Z dimensions of the workgroup for compute shader execution. + * + * @type {Array} + * @default [ 64 ] + */ + workgroupSize: Array; + /** + * The total number of threads (invocations) to execute. If it is a number, it will be used + * to automatically generate bounds checking against `instanceIndex`. + * + * @type {number|Array} + */ + count: number | Array; + /** + * The dispatch size for workgroups on X, Y, and Z axes. + * Used directly if `count` is not provided. + * + * @type {number|Array} + */ + dispatchSize: number | Array; + /** + * A callback executed when the compute node finishes initialization. + * + * @type {?Function} + */ + onInitFunction: Function | null; + /** + * A uniform node holding the dispatch count for bounds checking. + * Created automatically when `count` is a number. + * + * @type {?UniformNode} + */ + countNode: UniformNode | null; + /** + * Sets the {@link ComputeNode#name} property. + * + * @param {string} name - The name of the uniform. + * @return {ComputeNode} A reference to this node. + */ + setName(name: string): ComputeNode; + /** + * Sets the {@link ComputeNode#name} property. + * + * @deprecated + * @param {string} name - The name of the uniform. + * @return {ComputeNode} A reference to this node. + */ + label(name: string): ComputeNode; + /** + * Sets the callback to run during initialization. + * + * @param {Function} callback - The callback function. + * @return {ComputeNode} A reference to this node. + */ + onInit(callback: Function): ComputeNode; + /** + * The method execute the compute for this node. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + updateBefore({ renderer }: NodeFrame): void; + setup(builder: any): string | Node | null; + generate(builder: any, output: any): any; +} +/** + * Represents a logical `if/else` statement. Can be used as an alternative + * to the `If()`/`Else()` syntax. + * + * The `select()` method is called in a chaining fashion on a condition. The parameter nodes of `select()` + * determine the outcome of the entire statement. + * + * ```js + * velocity = position.greaterThanEqual( limit ).select( velocity.negate(), velocity ); + * ``` + * + * @augments Node + */ +export class ConditionalNode extends Node { + /** + * Constructs a new conditional node. + * + * @param {Node} condNode - The node that defines the condition. + * @param {Node} ifNode - The node that is evaluate when the condition ends up `true`. + * @param {?Node} [elseNode=null] - The node that is evaluate when the condition ends up `false`. + */ + constructor(condNode: Node, ifNode: Node, elseNode?: Node | null); + /** + * The node that defines the condition. + * + * @type {Node} + */ + condNode: Node; + /** + * The node that is evaluate when the condition ends up `true`. + * + * @type {Node} + */ + ifNode: Node; + /** + * The node that is evaluate when the condition ends up `false`. + * + * @type {?Node} + * @default null + */ + elseNode: Node | null; + /** + * This method is overwritten since the node type is inferred from the if/else + * nodes. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + setup(builder: any): void; + generate(builder: any, output: any): any; +} +/** + * Class for representing a constant value in the shader. + * + * @augments InputNode + */ +export class ConstNode extends InputNode { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isConstNode: boolean; + /** + * Generates the shader string of the value with the current node builder. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The generated value as a shader string. + */ + generateConst(builder: NodeBuilder): string; + generate(builder: any, output: any): any; +} +/** + * This node can be used as a context management component for another node. + * {@link NodeBuilder} performs its node building process in a specific context and + * this node allows the modify the context. A typical use case is to overwrite `getUV()` e.g.: + * + * ```js + *node.context( { getUV: () => customCoord } ); + *\// or + *material.contextNode = context( { getUV: () => customCoord } ); + *\// or + *renderer.contextNode = context( { getUV: () => customCoord } ); + *\// or + *scenePass.contextNode = context( { getUV: () => customCoord } ); + *``` + * @augments Node + */ +export class ContextNode extends Node { + /** + * Constructs a new context node. + * + * @param {Node} node - The node whose context should be modified. + * @param {Object} [value={}] - The modified context data. + */ + constructor(node?: Node, value?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isContextNode: boolean; + /** + * The node whose context should be modified. + * + * @type {Node} + */ + node: Node; + /** + * The modified context data. + * + * @type {Object} + * @default {} + */ + value: Object; + /** + * This method is overwritten to ensure it returns the type of {@link ContextNode#node}. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Gathers the context data from all parent context nodes. + * + * @return {Object} The gathered context data. + */ + getFlowContextData(): Object; + /** + * This method is overwritten to ensure it returns the member type of {@link ContextNode#node}. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} name - The member name. + * @returns {string} The member type. + */ + getMemberType(builder: NodeBuilder, name: string): string; + analyze(builder: any): void; + setup(builder: any): void; + generate(builder: any, output: any): string | Node | null; +} +/** + * This module is part of the TSL core and usually not used in app level code. + * It represents a convert operation during the shader generation process + * meaning it converts the data type of a node to a target data type. + * + * @augments Node + */ +export class ConvertNode extends Node { + /** + * Constructs a new convert node. + * + * @param {Node} node - The node which type should be converted. + * @param {string} convertTo - The target node type. Multiple types can be defined by separating them with a `|` sign. + */ + constructor(node: Node, convertTo: string); + /** + * The node which type should be converted. + * + * @type {Node} + */ + node: Node; + /** + * The target node type. Multiple types can be defined by separating them with a `|` sign. + * + * @type {string} + */ + convertTo: string; + /** + * This method is overwritten since the implementation tries to infer the best + * matching type from the {@link ConvertNode#convertTo} property. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + serialize(data: any): void; + deserialize(data: any): void; + generate(builder: any, output: any): any; +} +import { CubeCamera } from './three.core.js'; +import { CubeDepthTexture } from './three.core.js'; +/** + * This node can be used to automatically convert environment maps in the + * equirectangular format into the cube map format. + * + * @augments TempNode + */ +export class CubeMapNode extends TempNode { + /** + * Constructs a new cube map node. + * + * @param {Node} envNode - The node representing the environment map. + */ + constructor(envNode: Node); + /** + * The node representing the environment map. + * + * @type {Node} + */ + envNode: Node; + /** + * A reference to the internal cube texture. + * + * @private + * @type {?CubeTexture} + * @default null + */ + private _cubeTexture; + /** + * A reference to the internal cube texture node. + * + * @private + * @type {CubeTextureNode} + */ + private _cubeTextureNode; + /** + * A default cube texture that acts as a placeholder. + * It is used when the conversion from equirectangular to cube + * map has not finished yet for a given texture. + * + * @private + * @type {CubeTexture} + */ + private _defaultTexture; + updateBefore(frame: any): void; + setup(builder: any): CubeTextureNode; +} +import { CubeReflectionMapping } from './three.core.js'; +import { CubeRefractionMapping } from './three.core.js'; +/** + * This class represents a cube render target. It is a special version + * of `WebGLCubeRenderTarget` which is compatible with `WebGPURenderer`. + * + * @augments RenderTarget + */ +export class CubeRenderTarget extends RenderTarget { + /** + * Constructs a new cube render target. + * + * @param {number} [size=1] - The size of the render target. + * @param {RenderTarget~Options} [options] - The configuration object. + */ + constructor(size?: number, options?: {}); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isCubeRenderTarget: boolean; + /** + * Converts the given equirectangular texture to a cube map. + * + * @param {Renderer} renderer - The renderer. + * @param {Texture} texture - The equirectangular texture. + * @return {CubeRenderTarget} A reference to this cube render target. + */ + fromEquirectangularTexture(renderer: Renderer, texture$1: any): CubeRenderTarget; + /** + * Clears this cube render target. + * + * @param {Renderer} renderer - The renderer. + * @param {boolean} [color=true] - Whether the color buffer should be cleared or not. + * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not. + * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not. + */ + clear(renderer: Renderer, color?: boolean, depth?: boolean, stencil?: boolean): void; +} +import { CubeTexture } from './three.core.js'; +/** + * This type of uniform node represents a cube texture. + * + * @augments TextureNode + */ +export class CubeTextureNode extends TextureNode { + /** + * Constructs a new cube texture node. + * + * @param {CubeTexture} value - The cube texture. + * @param {?Node} [uvNode=null] - The uv node. + * @param {?Node} [levelNode=null] - The level node. + * @param {?Node} [biasNode=null] - The bias node. + */ + constructor(value: CubeTexture, uvNode?: Node | null, levelNode?: Node | null, biasNode?: Node | null); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isCubeTextureNode: boolean; + /** + * Overwritten with an empty implementation since the `updateMatrix` flag is ignored + * for cube textures. The uv transformation matrix is not applied to cube textures. + * + * @param {boolean} value - The update toggle. + */ + setUpdateMatrix(): void; +} +import { CubeUVReflectionMapping } from './three.core.js'; +import { CullFaceBack } from './three.core.js'; +import { CullFaceFront } from './three.core.js'; +import { CullFaceNone } from './three.core.js'; +import { CustomBlending } from './three.core.js'; +import { CylinderGeometry } from './three.core.js'; +import { DataArrayTexture } from './three.core.js'; +import { DataTexture } from './three.core.js'; +export class DebugNode extends TempNode { + constructor(node: any, callback?: null); + node: any; + callback: any; + generateNodeType(builder: any): any; + setup(builder: any): any; + analyze(builder: any): any; + generate(builder: any): any; +} +import { DecrementStencilOp } from './three.core.js'; +import { DecrementWrapStencilOp } from './three.core.js'; +import { DepthFormat } from './three.core.js'; +import { DepthStencilFormat } from './three.core.js'; +import { DepthTexture } from './three.core.js'; +import { DirectionalLight } from './three.core.js'; +/** + * Module for representing directional lights as nodes. + * + * @augments AnalyticLightNode + */ +export class DirectionalLightNode extends AnalyticLightNode { + /** + * Constructs a new directional light node. + * + * @param {?DirectionalLight} [light=null] - The directional light source. + */ + constructor(light?: DirectionalLight | null); + setupDirect(): { + lightDirection: any; + lightColor: Node; + }; +} +import { DoubleSide } from './three.core.js'; +import { DstAlphaFactor } from './three.core.js'; +import { DstColorFactor } from './three.core.js'; +import { DynamicDrawUsage } from './three.core.js'; +/** + * Represents a physical model for Image-based lighting (IBL). The environment + * is defined via environment maps in the equirectangular, cube map or cubeUV (PMREM) format. + * `EnvironmentNode` is intended for PBR materials like {@link MeshStandardNodeMaterial}. + * + * @augments LightingNode + */ +export class EnvironmentNode extends LightingNode { + /** + * Constructs a new environment node. + * + * @param {Node} [envNode=null] - A node representing the environment. + */ + constructor(envNode?: Node); + /** + * A node representing the environment. + * + * @type {?Node} + * @default null + */ + envNode: Node | null; + setup(builder: any): void; + /** + * Returns the PMREM node cache of the current renderer. + * + * @private + * @param {Renderer} renderer - The current renderer. + * @return {WeakMap} The node cache. + */ + private _getPMREMNodeCache; +} +import { EqualCompare } from './three.core.js'; +import { EqualDepth } from './three.core.js'; +import { EqualStencilFunc } from './three.core.js'; +import { EquirectangularReflectionMapping } from './three.core.js'; +import { EquirectangularRefractionMapping } from './three.core.js'; +import { EventDispatcher } from './three.core.js'; +/** + * EventNode is a node that executes a callback during specific update phases. + * + * @augments Node + */ +export class EventNode extends Node { + /** + * Creates an EventNode. + * + * @param {string} eventType - The type of event + * @param {Function} callback - The callback to execute on update. + */ + constructor(eventType: string, callback: Function); + eventType: string; + callback: Function; + update(frame: any): void; + updateBefore(frame: any): void; +} +export namespace EventNode { + let OBJECT: string; + let MATERIAL: string; + let FRAME: string; + let BEFORE_OBJECT: string; + let BEFORE_MATERIAL: string; + let BEFORE_FRAME: string; +} +/** + * This class can be used to implement basic expressions in shader code. + * Basic examples for that are `return`, `continue` or `discard` statements. + * + * @augments Node + */ +export class ExpressionNode extends Node { + /** + * Constructs a new expression node. + * + * @param {string} [snippet=''] - The native code snippet. + * @param {string} [nodeType='void'] - The node type. + */ + constructor(snippet?: string, nodeType?: string); + /** + * The native code snippet. + * + * @type {string} + * @default '' + */ + snippet: string; + generate(builder: any, output: any): any; +} +import { FileLoader } from './three.core.js'; +/** + * This module is part of the TSL core and usually not used in app level code. + * It represents a flip operation during the shader generation process + * meaning it flips normalized values with the following formula: + * ``` + * x = 1 - x; + * ``` + * `FlipNode` is internally used to implement any `flipXYZW()`, `flipRGBA()` and + * `flipSTPQ()` method invocations on node objects. For example: + * ```js + * uvNode = uvNode.flipY(); + * ``` + * + * @augments TempNode + */ +export class FlipNode extends TempNode { + /** + * Constructs a new flip node. + * + * @param {Node} sourceNode - The node which component(s) should be flipped. + * @param {string} components - The components that should be flipped e.g. `'x'` or `'xy'`. + */ + constructor(sourceNode: Node, components: string); + /** + * The node which component(s) should be flipped. + * + * @type {Node} + */ + sourceNode: Node; + /** + * The components that should be flipped e.g. `'x'` or `'xy'`. + * + * @type {string} + */ + components: string; + /** + * This method is overwritten since the node type is inferred from the source node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + generate(builder: any): string; +} +import { Float16BufferAttribute } from './three.core.js'; +import { Float32BufferAttribute } from './three.core.js'; +import { FloatType } from './three.core.js'; +import { FramebufferTexture } from './three.core.js'; +/** + * This node can be used to evaluate whether a primitive is front or back facing. + * + * @augments Node + */ +export class FrontFacingNode extends Node { + /** + * Constructs a new front facing node. + */ + constructor(); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isFrontFacingNode: boolean; + generate(builder: any): any; +} +import { FrontSide } from './three.core.js'; +import { Frustum } from './three.core.js'; +import { FrustumArray } from './three.core.js'; +/** + * This module represents the call of a {@link FunctionNode}. Developers are usually not confronted + * with this module since they use the predefined TSL syntax `wgslFn` and `glslFn` which encapsulate + * this logic. + * + * @augments TempNode + */ +export class FunctionCallNode extends TempNode { + /** + * Constructs a new function call node. + * + * @param {?FunctionNode} functionNode - The function node. + * @param {Object} [parameters={}] - The parameters for the function call. + */ + constructor(functionNode?: FunctionNode | null, parameters?: { + [x: string]: Node; + }); + /** + * The function node. + * + * @type {?FunctionNode} + * @default null + */ + functionNode: FunctionNode | null; + /** + * The parameters of the function call. + * + * @type {Object} + * @default {} + */ + parameters: { + [x: string]: Node; + }; + /** + * Sets the parameters of the function call node. + * + * @param {Object} parameters - The parameters to set. + * @return {FunctionCallNode} A reference to this node. + */ + setParameters(parameters: { + [x: string]: Node; + }): FunctionCallNode; + /** + * Returns the parameters of the function call node. + * + * @return {Object} The parameters of this node. + */ + getParameters(): { + [x: string]: Node; + }; + /** + * Returns the type of this function call node. + * + * @param {NodeBuilder} builder - The current node builder. + * @returns {string} The type of this node. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Returns the function node of this function call node. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} [name] - The name of the member. + * @returns {string} The type of the member. + */ + getMemberType(builder: NodeBuilder, name?: string): string; + generate(builder: any): string; +} +/** + * This class represents a native shader function. It can be used to implement + * certain aspects of a node material with native shader code. There are two predefined + * TSL functions for easier usage. + * + * - `wgslFn`: Creates a WGSL function node. + * - `glslFn`: Creates a GLSL function node. + * + * A basic example with one include looks like so: + * + * ```js + * const desaturateWGSLFn = wgslFn( ` + * fn desaturate( color:vec3 ) -> vec3 { + * let lum = vec3( 0.299, 0.587, 0.114 ); + * return vec3( dot( lum, color ) ); + * }` + *); + * const someWGSLFn = wgslFn( ` + * fn someFn( color:vec3 ) -> vec3 { + * return desaturate( color ); + * } + * `, [ desaturateWGSLFn ] ); + * material.colorNode = someWGSLFn( { color: texture( map ) } ); + *``` + * @augments CodeNode + */ +export class FunctionNode extends CodeNode { + /** + * Returns the type of this function node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The type. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Returns the type of a member of this function node. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} name - The name of the member. + * @return {string} The type of the member. + */ + getMemberType(builder: NodeBuilder, name: string): string; + /** + * Returns the inputs of this function node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Array} The inputs. + */ + getInputs(builder: NodeBuilder): Array; + /** + * Returns the node function for this function node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {NodeFunction} The node function. + */ + getNodeFunction(builder: NodeBuilder): NodeFunction; + generate(builder: any, output: any): any; +} +/** + * This class allows to define multiple overloaded versions + * of the same function. Depending on the parameters of the function + * call, the node picks the best-fit overloaded version. + * + * @augments Node + */ +export class FunctionOverloadingNode extends Node { + /** + * Constructs a new function overloading node. + * + * @param {Array} functionNodes - Array of `Fn` function definitions. + * @param {...Node} parametersNodes - A list of parameter nodes. + */ + constructor(functionNodes?: Array, ...parametersNodes: Node[]); + /** + * Array of `Fn` function definitions. + * + * @type {Array} + */ + functionNodes: Array; + /** + * A list of parameter nodes. + * + * @type {Array} + */ + parametersNodes: Array; + /** + * The selected overloaded function call. + * + * @private + * @type {ShaderCallNodeInternal} + */ + private _candidateFn; + /** + * This method is overwritten since the node type is inferred from + * the function's return type. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Returns the candidate function for the current parameters. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {FunctionNode} The candidate function. + */ + getCandidateFn(builder: NodeBuilder): FunctionNode; + /** + * Sets up the node for the current parameters. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The setup node. + */ + setup(builder: NodeBuilder): Node; +} +/** + * A node builder targeting GLSL. + * + * This module generates GLSL shader code from node materials and also + * generates the respective bindings and vertex buffer definitions. These + * data are later used by the renderer to create render and compute pipelines + * for render objects. + * + * @augments NodeBuilder + */ +export class GLSLNodeBuilder extends NodeBuilder { + /** + * Constructs a new GLSL node builder renderer. + * + * @param {Object3D} object - The 3D object. + * @param {Renderer} renderer - The renderer. + */ + constructor(object: Object3D, renderer: Renderer); + /** + * A dictionary holds for each shader stage ('vertex', 'fragment', 'compute') + * another dictionary which manages UBOs per group ('render','frame','object'). + * + * @type {Object>} + */ + uniformGroups: { + [x: string]: { + [x: string]: NodeUniformsGroup; + }; + }; + /** + * An array that holds objects defining the varying and attribute data in + * context of Transform Feedback. + * + * @type {Array>} + */ + transforms: Array<{ + [x: string]: AttributeNode | string; + }>; + /** + * A dictionary that holds for each shader stage a Map of used extensions. + * + * @type {Object>} + */ + extensions: { + [x: string]: Map; + }; + /** + * A dictionary that holds for each shader stage an Array of used builtins. + * + * @type {Object>} + */ + builtins: { + [x: string]: string[]; + }; + /** + * Checks if the given texture requires a manual conversion to the working color space. + * + * @param {Texture} texture - The texture to check. + * @return {boolean} Whether the given texture requires a conversion to working color space or not. + */ + needsToWorkingColorSpace(texture: Texture): boolean; + /** + * Includes the given method name into the current + * function node. + * + * @private + * @param {string} name - The method name to include. + * @return {CodeNode} The respective code node. + */ + private _include; + /** + * Returns the bitcast method name for a given input and outputType. + * + * @param {string} type - The output type to bitcast to. + * @param {string} inputType - The input type of the. + * @return {string} The resolved GLSL bitcast invocation. + */ + getBitcastMethod(type: string, inputType: string): string; + /** + * Returns the float packing method name for a given numeric encoding. + * + * @param {string} encoding - The numeric encoding that describes how the float values are mapped to the integer range. + * @returns {string} The resolved GLSL float packing method name. + */ + getFloatPackingMethod(encoding: string): string; + /** + * Returns the float unpacking method name for a given numeric encoding. + * + * @param {string} encoding - The numeric encoding that describes how the integer values are mapped to the float range. + * @returns {string} The resolved GLSL float unpacking method name. + */ + getFloatUnpackingMethod(encoding: string): string; + /** + * Returns the native snippet for a ternary operation. + * + * @param {string} condSnippet - The condition determining which expression gets resolved. + * @param {string} ifSnippet - The expression to resolve to if the condition is true. + * @param {string} elseSnippet - The expression to resolve to if the condition is false. + * @return {string} The resolved method name. + */ + getTernary(condSnippet: string, ifSnippet: string, elseSnippet: string): string; + /** + * Builds the given shader node. + * + * @param {ShaderNodeInternal} shaderNode - The shader node. + * @return {string} The GLSL function code. + */ + buildFunctionCode(shaderNode: ShaderNodeInternal): string; + /** + * Setups the Pixel Buffer Object (PBO) for the given storage + * buffer node. + * + * @param {StorageBufferNode} storageBufferNode - The storage buffer node. + */ + setupPBO(storageBufferNode: StorageBufferNode): void; + /** + * Returns a GLSL snippet that represents the property name of the given node. + * + * @param {Node} node - The node. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {string} The property name. + */ + getPropertyName(node: Node, shaderStage?: string): string; + /** + * Setups the Pixel Buffer Object (PBO) for the given storage + * buffer node. + * + * @param {StorageArrayElementNode} storageArrayElementNode - The storage array element node. + * @return {string} The property name. + */ + generatePBO(storageArrayElementNode: StorageArrayElementNode): string; + /** + * Generates the GLSL snippet that reads a single texel from a texture without sampling or filtering. + * + * @param {?Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvIndexSnippet - A GLSL snippet that represents texture coordinates used for sampling. + * @param {?string} levelSnippet - A GLSL snippet that represents the mip level, with level 0 containing a full size version of the texture. + * @param {?string} depthSnippet - A GLSL snippet that represents the 0-based texture array index to sample. + * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @return {string} The GLSL snippet. + */ + generateTextureLoad(texture: Texture | null, textureProperty: string, uvIndexSnippet: string, levelSnippet: string | null, depthSnippet: string | null, offsetSnippet: string | null): string; + /** + * Generates the GLSL snippet for sampling/loading the given texture. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. + * @param {?string} depthSnippet - A GLSL snippet that represents the 0-based texture array index to sample. + * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @return {string} The GLSL snippet. + */ + generateTexture(texture: Texture, textureProperty: string, uvSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; + /** + * Generates the GLSL snippet when sampling textures with explicit mip level. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. + * @param {string} levelSnippet - A GLSL snippet that represents the mip level, with level 0 containing a full size version of the texture. + * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @return {string} The GLSL snippet. + */ + generateTextureLevel(texture: Texture, textureProperty: string, uvSnippet: string, levelSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; + /** + * Generates the GLSL snippet when sampling textures with a bias to the mip level. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. + * @param {string} biasSnippet - A GLSL snippet that represents the bias to apply to the mip level before sampling. + * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @return {string} The GLSL snippet. + */ + generateTextureBias(texture: Texture, textureProperty: string, uvSnippet: string, biasSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; + /** + * Generates the GLSL snippet for sampling/loading the given texture using explicit gradients. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. + * @param {Array} gradSnippet - An array holding both gradient GLSL snippets. + * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @return {string} The GLSL snippet. + */ + generateTextureGrad(texture: Texture, textureProperty: string, uvSnippet: string, gradSnippet: Array, depthSnippet: string | null, offsetSnippet: string | null): string; + /** + * Generates the GLSL snippet for sampling a depth texture and comparing the sampled depth values + * against a reference value. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. + * @param {string} compareSnippet - A GLSL snippet that represents the reference value. + * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {string} The GLSL snippet. + */ + generateTextureCompare(texture: Texture, textureProperty: string, uvSnippet: string, compareSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, shaderStage?: string): string; + /** + * Generates the GLSL snippet for gathering four texels from the given texture. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. + * @param {string} gatherSnippet - A GLSL snippet that represents the index of the channel to read. + * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {?string} flipYSnippet - A GLSL snippet that represents the y-flip. Only used for WebGL. + * @return {string} The GLSL snippet. + */ + generateTextureGather(texture: Texture, textureProperty: string, uvSnippet: string, gatherSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, flipYSnippet: string | null): string; + /** + * Generates the GLSL snippet for performing a depth comparison on four texels in the given depth texture. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. + * @param {string} compareSnippet - A GLSL snippet that represents the reference value. + * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {?string} flipYSnippet - A GLSL snippet that represents the y-flip. Only used for WebGL. + * @return {string} The GLSL snippet. + */ + generateTextureGatherCompare(texture: Texture, textureProperty: string, uvSnippet: string, compareSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, flipYSnippet: string | null): string; + /** + * Returns the uniforms of the given shader stage as a GLSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The GLSL snippet that defines the uniforms. + */ + getUniforms(shaderStage: string): string; + /** + * Returns the shader attributes of the given shader stage as a GLSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The GLSL snippet that defines the shader attributes. + */ + getAttributes(shaderStage: string): string; + /** + * Returns the members of the given struct type node as a GLSL string. + * + * @param {StructTypeNode} struct - The struct type node. + * @return {string} The GLSL snippet that defines the struct members. + */ + getStructMembers(struct: StructTypeNode): string; + /** + * Returns the structs of the given shader stage as a GLSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The GLSL snippet that defines the structs. + */ + getStructs(shaderStage: string): string; + /** + * Returns the varyings of the given shader stage as a GLSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The GLSL snippet that defines the varyings. + */ + getVaryings(shaderStage: string): string; + /** + * Returns a builtin representing the index of an invocation within its workgroup. + * + * @return {string} The invocation local index. + */ + getInvocationLocalIndex(): string; + /** + * Returns a builtin representing the size of a subgroup within the current shader. + */ + getSubgroupSize(): void; + /** + * Returns a builtin representing the index of an invocation within its subgroup. + */ + getInvocationSubgroupIndex(): void; + /** + * Returns a builtin representing the index of the current invocation's subgroup within its workgroup. + */ + getSubgroupIndex(): void; + /** + * Returns the frag depth builtin. + * + * @return {string} The frag depth builtin. + */ + getFragDepth(): string; + /** + * Enables the given extension. + * + * @param {string} name - The extension name. + * @param {string} behavior - The extension behavior. + * @param {string} [shaderStage=this.shaderStage] - The shader stage. + */ + enableExtension(name: string, behavior: string, shaderStage?: string): void; + /** + * Returns the enabled extensions of the given shader stage as a GLSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The GLSL snippet that defines the enabled extensions. + */ + getExtensions(shaderStage: string): string; + /** + * Returns the clip distances builtin. + * + * @return {string} The clip distances builtin. + */ + getClipDistance(): string; + /** + * Whether the requested feature is available or not. + * + * @param {string} name - The requested feature. + * @return {boolean} Whether the requested feature is supported or not. + */ + isAvailable(name: string): boolean; + /** + * Enables hardware clipping. + * + * @param {string} planeCount - The clipping plane count. + */ + enableHardwareClipping(planeCount: string): void; + /** + * Enables multiview. + */ + enableMultiview(): void; + /** + * Registers a transform in context of Transform Feedback. + * + * @param {string} varyingName - The varying name. + * @param {AttributeNode} attributeNode - The attribute node. + */ + registerTransform(varyingName: string, attributeNode: AttributeNode): void; + /** + * Returns the transforms of the given shader stage as a GLSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The GLSL snippet that defines the transforms. + */ + getTransforms(): string; + /** + * Returns a GLSL struct based on the given name and variables. + * + * @private + * @param {string} name - The struct name. + * @param {string} vars - The struct variables. + * @return {string} The GLSL snippet representing a struct. + */ + private _getGLSLUniformStruct; + /** + * Returns a GLSL vertex shader based on the given shader data. + * + * @private + * @param {Object} shaderData - The shader data. + * @return {string} The vertex shader. + */ + private _getGLSLVertexCode; + /** + * Returns a GLSL fragment shader based on the given shader data. + * + * @private + * @param {Object} shaderData - The shader data. + * @return {string} The vertex shader. + */ + private _getGLSLFragmentCode; + /** + * This method is one of the more important ones since it's responsible + * for generating a matching binding instance for the given uniform node. + * + * These bindings are later used in the renderer to create bind groups + * and layouts. + * + * @param {UniformNode} node - The uniform node. + * @param {string} type - The node data type. + * @param {string} shaderStage - The shader stage. + * @param {?string} [name=null] - An optional uniform name. + * @return {NodeUniform} The node uniform object. + */ + getUniformFromNode(node: UniformNode, type: string, shaderStage: string, name?: string | null): NodeUniform; +} +/** + * A GLSL node parser. + * + * @augments NodeParser + */ +export class GLSLNodeParser extends NodeParser { + /** + * The method parses the given GLSL code an returns a node function. + * + * @param {string} source - The GLSL code. + * @return {GLSLNodeFunction} A node function. + */ + parseFunction(source: string): GLSLNodeFunction; +} +import { GreaterCompare } from './three.core.js'; +import { GreaterDepth } from './three.core.js'; +import { GreaterEqualCompare } from './three.core.js'; +import { GreaterEqualDepth } from './three.core.js'; +import { GreaterEqualStencilFunc } from './three.core.js'; +import { GreaterStencilFunc } from './three.core.js'; +import { Group } from './three.core.js'; +import { HalfFloatType } from './three.core.js'; +import { HemisphereLight } from './three.core.js'; +/** + * Module for representing hemisphere lights as nodes. + * + * @augments AnalyticLightNode + */ +export class HemisphereLightNode extends AnalyticLightNode { + /** + * Constructs a new hemisphere light node. + * + * @param {?HemisphereLight} [light=null] - The hemisphere light source. + */ + constructor(light?: HemisphereLight | null); + /** + * Uniform node representing the light's position. + * + * @type {UniformNode} + */ + lightPositionNode: UniformNode; + /** + * A node representing the light's direction. + * + * @type {Node} + */ + lightDirectionNode: Node; + /** + * Uniform node representing the light's ground color. + * + * @type {UniformNode} + */ + groundColorNode: UniformNode; + /** + * Overwritten to updated hemisphere light specific uniforms. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update(frame: NodeFrame): void; + setup(builder: any): void; +} +/** + * A IES version of {@link SpotLight}. Can only be used with {@link WebGPURenderer}. + * + * @augments SpotLight + */ +export class IESSpotLight extends SpotLight { + /** + * The IES map. It's a lookup table that stores normalized attenuation factors + * (0.0 to 1.0) that represent the light's intensity at a specific angle. + * + * @type {?Texture} + * @default null + */ + iesMap: Texture | null; + copy(source: any, recursive: any): this; +} +/** + * An IES version of the default spot light node. + * + * @augments SpotLightNode + */ +export class IESSpotLightNode extends SpotLightNode { + /** + * The texture node representing the IES texture. + * + * @type {?TextureNode} + * @default null + */ + _iesTextureNode: TextureNode | null; +} +import { IncrementStencilOp } from './three.core.js'; +import { IncrementWrapStencilOp } from './three.core.js'; +/** + * This class represents shader indices of different types. The following predefined node + * objects cover frequent use cases: + * + * - `vertexIndex`: The index of a vertex within a mesh. + * - `instanceIndex`: The index of either a mesh instance or an invocation of a compute shader. + * - `drawIndex`: The index of a draw call. + * - `invocationLocalIndex`: The index of a compute invocation within the scope of a workgroup load. + * - `invocationSubgroupIndex`: The index of a compute invocation within the scope of a subgroup. + * - `subgroupIndex`: The index of a compute invocation's subgroup within its workgroup. + * + * @augments Node + */ +export class IndexNode extends Node { + /** + * Constructs a new index node. + * + * @param {('vertex'|'instance'|'subgroup'|'invocationLocal'|'invocationGlobal'|'invocationSubgroup'|'draw')} scope - The scope of the index node. + */ + constructor(scope: ("vertex" | "instance" | "subgroup" | "invocationLocal" | "invocationGlobal" | "invocationSubgroup" | "draw")); + /** + * The scope of the index node. + * + * @type {string} + */ + scope: string; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isIndexNode: boolean; + generate(builder: any): any; +} +export namespace IndexNode { + let VERTEX: string; + let INSTANCE: string; + let SUBGROUP: string; + let INVOCATION_LOCAL: string; + let INVOCATION_SUBGROUP: string; + let DRAW: string; +} +/** + * This special type of buffer attribute is intended for compute shaders. + * It can be used to encode draw parameters for indirect draw calls. + * + * Note: This type of buffer attribute can only be used with `WebGPURenderer` + * and a WebGPU backend. + * + * @augments StorageBufferAttribute + */ +export class IndirectStorageBufferAttribute extends StorageBufferAttribute { + /** + * Constructs a new storage buffer attribute. + * + * @param {number|Uint32Array} count - The item count. It is also valid to pass a `Uint32Array` as an argument. + * The subsequent parameter is then obsolete. + * @param {number} itemSize - The item size. + */ + constructor(count: number | Uint32Array, itemSize: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isIndirectStorageBufferAttribute: boolean; +} +/** + * Base class for representing data input nodes. + * + * @augments Node + */ +export class InputNode extends Node { + /** + * Constructs a new input node. + * + * @param {any} value - The value of this node. This can be any JS primitive, functions, array buffers or even three.js objects (vector, matrices, colors). + * @param {?string} nodeType - The node type. If no explicit type is defined, the node tries to derive the type from its value. + */ + constructor(value: any, nodeType?: string | null); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isInputNode: boolean; + /** + * The value of this node. This can be any JS primitive, functions, array buffers or even three.js objects (vector, matrices, colors). + * + * @type {any} + */ + value: any; + /** + * The precision of the value in the shader. + * + * @type {?('low'|'medium'|'high')} + * @default null + */ + precision: ("low" | "medium" | "high") | null; + generateNodeType(): string | null; + /** + * Returns the input type of the node which is by default the node type. Derived modules + * might overwrite this method and use a fixed type or compute one analytically. + * + * A typical example for different input and node types are textures. The input type of a + * normal RGBA texture is `texture` whereas its node type is `vec4`. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The input type. + */ + getInputType(builder: NodeBuilder): string; + /** + * Sets the precision to the given value. The method can be + * overwritten in derived classes if the final precision must be computed + * analytically. + * + * @param {('low'|'medium'|'high')} precision - The precision of the input value in the shader. + * @return {InputNode} A reference to this node. + */ + setPrecision(precision: ("low" | "medium" | "high")): InputNode; + serialize(data: any): void; + deserialize(data: any): void; + generate(): void; +} +/** + * InspectorBase is the base class for all inspectors. + * + * @class InspectorBase + * @augments EventDispatcher + */ +export class InspectorBase extends EventDispatcher { + /** + * The renderer associated with this inspector. + * + * @type {WebGLRenderer} + * @private + */ + private _renderer; + /** + * The current frame being processed. + * + * @type {Object} + */ + currentFrame: Object; + /** + * Returns the node frame for the current renderer. + * + * @return {Object} The node frame. + */ + get nodeFrame(): Object; + /** + * Sets the renderer for this inspector. + * + * @param {WebGLRenderer} renderer - The renderer to associate with this inspector. + * @return {InspectorBase} This inspector instance. + */ + setRenderer(renderer: WebGLRenderer): InspectorBase; + /** + * Returns the renderer associated with this inspector. + * + * @return {WebGLRenderer} The associated renderer. + */ + getRenderer(): WebGLRenderer; + /** + * Initializes the inspector. + */ + init(): void; + /** + * Called when a frame begins. + */ + begin(): void; + /** + * Called when a frame ends. + */ + finish(): void; + /** + * Inspects a node. + * + * @param {Node} node - The node to inspect. + */ + inspect(): void; + /** + * When a compute operation is performed. + * + * @param {ComputeNode} computeNode - The compute node being executed. + * @param {number|Array} dispatchSizeOrCount - The dispatch size or count. + */ + computeAsync(): void; + /** + * Called when a compute operation begins. + * + * @param {string} uid - A unique identifier for the render context. + * @param {ComputeNode} computeNode - The compute node being executed. + */ + beginCompute(): void; + /** + * Called when a compute operation ends. + * + * @param {string} uid - A unique identifier for the render context. + * @param {ComputeNode} computeNode - The compute node being executed. + */ + finishCompute(): void; + /** + * Called when a render operation begins. + * + * @param {string} uid - A unique identifier for the render context. + * @param {Scene} scene - The scene being rendered. + * @param {Camera} camera - The camera being used for rendering. + * @param {?WebGLRenderTarget} renderTarget - The render target, if any. + */ + beginRender(): void; + /** + * Called when an animation loop ends. + * + * @param {string} uid - A unique identifier for the render context. + */ + finishRender(): void; + /** + * Called when a texture copy operation is performed. + * + * @param {Texture} srcTexture - The source texture. + * @param {Texture} dstTexture - The destination texture. + */ + copyTextureToTexture(): void; + /** + * Called when a framebuffer copy operation is performed. + * + * @param {Texture} framebufferTexture - The texture associated with the framebuffer. + */ + copyFramebufferToTexture(): void; +} +/** + * InspectorNode is a wrapper node that allows inspection of node values during rendering. + * It can be used to debug or analyze node outputs in the rendering pipeline. + * + * @augments Node + */ +export class InspectorNode extends Node { + /** + * Creates an InspectorNode. + * + * @param {Node} node - The node to inspect. + * @param {string} [name=''] - Optional name for the inspector node. + * @param {Function|null} [callback=null] - Optional callback to modify the node during setup. + */ + constructor(node: Node, name?: string, callback?: Function | null); + node: Node; + callback: Function | null; + isInspectorNode: boolean; + /** + * Returns the name of the inspector node. + * + * @returns {string} + */ + getName(): string; + /** + * Updates the inspector node, allowing inspection of the wrapped node. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update(frame: NodeFrame): void; + /** + * Returns the type of the wrapped node. + * + * @param {NodeBuilder} builder - The node builder. + * @returns {string} + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Sets up the inspector node. + * + * @param {NodeBuilder} builder - The node builder. + * @returns {Node} The setup node. + */ + setup(builder: NodeBuilder): Node; +} +/** + * This node implements the vertex shader logic which is required + * when rendering 3D objects via instancing. The code makes sure + * vertex positions, normals and colors can be modified via instanced + * data. + * + * @augments Node + */ +export class InstanceNode extends Node { + /** + * Constructs a new instance node. + * + * @param {number} count - The number of instances. + * @param {InstancedBufferAttribute|StorageInstancedBufferAttribute} instanceMatrix - Instanced buffer attribute representing the instance transformations. + * @param {?InstancedBufferAttribute|StorageInstancedBufferAttribute} instanceColor - Instanced buffer attribute representing the instance colors. + */ + constructor(count: number, instanceMatrix: InstancedBufferAttribute | StorageInstancedBufferAttribute, instanceColor?: (InstancedBufferAttribute | StorageInstancedBufferAttribute) | null); + /** + * The number of instances. + * + * @type {number} + */ + count: number; + /** + * Instanced buffer attribute representing the transformation of instances. + * + * @type {InstancedBufferAttribute} + */ + instanceMatrix: InstancedBufferAttribute; + /** + * Instanced buffer attribute representing the color of instances. + * + * @type {InstancedBufferAttribute} + */ + instanceColor: InstancedBufferAttribute; + /** + * The node that represents the instance matrix data. + * + * @type {?Node} + */ + instanceMatrixNode: Node | null; + /** + * The node that represents the instance color data. + * + * @type {?Node} + * @default null + */ + instanceColorNode: Node | null; + /** + * A reference to a buffer that is used by `instanceMatrixNode`. + * + * @type {?InstancedInterleavedBuffer} + */ + buffer: InstancedInterleavedBuffer | null; + /** + * A reference to a buffer that is used by `instanceColorNode`. + * + * @type {?InstancedBufferAttribute} + */ + bufferColor: InstancedBufferAttribute | null; + /** + * The previous instance matrices. Required for computing motion vectors. + * + * @type {?Node} + * @default null + */ + previousInstanceMatrixNode: Node | null; + /** + * Tracks whether the matrix data is provided via a storage buffer. + * + * @type {boolean} + */ + get isStorageMatrix(): boolean; + /** + * Tracks whether the color data is provided via a storage buffer. + * + * @type {boolean} + */ + get isStorageColor(): boolean; + /** + * Setups the internal buffers and nodes and assigns the transformed vertex data + * to predefined node variables for accumulation. That follows the same patterns + * like with morph and skinning nodes. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setup(builder: NodeBuilder): void; + /** + * Checks if the internal buffers require an update. + * + * @param {NodeFrame} frame - The current node frame. + */ + update(frame: NodeFrame): void; + /** + * Computes the transformed/instanced vertex position of the previous frame. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The instanced position from the previous frame. + */ + getPreviousInstancedPosition(builder: NodeBuilder): Node; + /** + * Creates a node representing the instance matrix data. + * + * @private + * @param {boolean} assignBuffer - Whether the created interleaved buffer should be assigned to the `buffer` member or not. + * @param {NodeBuilder} builder - A reference to the current node builder. + * @return {Node} The instance matrix node. + */ + private _createInstanceMatrixNode; +} +import { InstancedBufferAttribute } from './three.core.js'; +import { InstancedInterleavedBuffer } from './three.core.js'; +/** + * This is a special version of `InstanceNode` which requires the usage of {@link InstancedMesh}. + * It allows an easier setup of the instance node. + * + * @augments InstanceNode + */ +export class InstancedMeshNode extends InstanceNode { + /** + * Constructs a new instanced mesh node. + * + * @param {InstancedMesh} instancedMesh - The instanced mesh. + */ + constructor(instancedMesh: InstancedMesh); + /** + * A reference to the instanced mesh. + * + * @type {InstancedMesh} + */ + instancedMesh: InstancedMesh; +} +import { IntType } from './three.core.js'; +import { InterleavedBuffer } from './three.core.js'; +import { InterleavedBufferAttribute } from './three.core.js'; +import { InvertStencilOp } from './three.core.js'; +/** + * A generic class that can be used by nodes which contribute + * irradiance to the scene. E.g. a light map node can be used + * as input for this module. Used in {@link NodeMaterial}. + * + * @augments LightingNode + */ +export class IrradianceNode extends LightingNode { + /** + * Constructs a new irradiance node. + * + * @param {Node} node - A node contributing irradiance. + */ + constructor(node: Node); + /** + * A node contributing irradiance. + * + * @type {Node} + */ + node: Node; + setup(builder: any): void; +} +/** + * This node can be used as a cache management component for another node. + * Caching is in general used by default in {@link NodeBuilder} but this node + * allows the usage of a shared parent cache during the build process. + * + * @augments Node + */ +export class IsolateNode extends Node { + /** + * Constructs a new cache node. + * + * @param {Node} node - The node that should be cached. + * @param {boolean} [parent=true] - Whether this node refers to a shared parent cache or not. + */ + constructor(node: Node, parent?: boolean); + /** + * The node that should be cached. + * + * @type {Node} + */ + node: Node; + /** + * Whether this node refers to a shared parent cache or not. + * + * @type {boolean} + * @default true + */ + parent: boolean; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isIsolateNode: boolean; + generateNodeType(builder: any): string; + build(builder: any, ...params: any[]): string | Node | null; + setParent(parent: any): this; + getParent(): boolean; +} +/** + * This module is part of the TSL core and usually not used in app level code. + * It represents a join operation during the shader generation process. + * For example in can compose/join two single floats into a `vec2` type. + * + * @augments TempNode + */ +export class JoinNode extends TempNode { + /** + * Constructs a new join node. + * + * @param {Array} nodes - An array of nodes that should be joined. + * @param {?string} [nodeType=null] - The node type. + */ + constructor(nodes?: Array, nodeType?: string | null); + /** + * An array of nodes that should be joined. + * + * @type {Array} + */ + nodes: Array; + /** + * This method is overwritten since the node type must be inferred from the + * joined data length if not explicitly defined. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + generate(builder: any, output: any): any; +} +import { KeepStencilOp } from './three.core.js'; +import { LessCompare } from './three.core.js'; +import { LessDepth } from './three.core.js'; +import { LessEqualCompare } from './three.core.js'; +import { LessEqualDepth } from './three.core.js'; +import { LessEqualStencilFunc } from './three.core.js'; +import { LessStencilFunc } from './three.core.js'; +import { LightProbe } from './three.core.js'; +/** + * Module for representing light probes as nodes. + * + * @augments AnalyticLightNode + */ +export class LightProbeNode extends AnalyticLightNode { + /** + * Constructs a new light probe node. + * + * @param {?LightProbe} [light=null] - The light probe. + */ + constructor(light?: LightProbe | null); + /** + * Light probe represented as a uniform of spherical harmonics. + * + * @type {UniformArrayNode} + */ + lightProbe: UniformArrayNode; + /** + * Overwritten to updated light probe specific uniforms. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update(frame: NodeFrame): void; + setup(builder: any): void; +} +/** + * This renderer module manages the lights nodes which are unique + * per scene and camera combination. + * + * The lights node itself is later configured in the render list + * with the actual lights from the scene. + * + * @private + */ +export class Lighting { + /** + * Creates a new lights node for the given array of lights. + * + * @param {Array} lights - The render object. + * @return {LightsNode} The lights node. + */ + createNode(lights?: Array): LightsNode; + /** + * Returns a lights node for the given scene and camera. + * + * @param {Scene} scene - The scene. + * @param {Camera} camera - The camera. + * @return {LightsNode} The lights node. + */ + getNode(scene: Scene): LightsNode; +} +/** + * `LightingContextNode` represents an extension of the {@link ContextNode} module + * by adding lighting specific context data. It represents the runtime context of + * {@link LightsNode}. + * + * @augments ContextNode + */ +export class LightingContextNode extends ContextNode { + /** + * Constructs a new lighting context node. + * + * @param {LightsNode} lightsNode - The lights node. + * @param {?LightingModel} [lightingModel=null] - The current lighting model. + * @param {?Node} [backdropNode=null] - A backdrop node. + * @param {?Node} [backdropAlphaNode=null] - A backdrop alpha node. + */ + constructor(lightsNode: LightsNode, lightingModel?: LightingModel | null, backdropNode?: Node | null, backdropAlphaNode?: Node | null); + /** + * The current lighting model. + * + * @type {?LightingModel} + * @default null + */ + lightingModel: LightingModel | null; + /** + * A backdrop node. + * + * @type {?Node} + * @default null + */ + backdropNode: Node | null; + /** + * A backdrop alpha node. + * + * @type {?Node} + * @default null + */ + backdropAlphaNode: Node | null; + _value: { + radiance: Node; + irradiance: Node; + iblIrradiance: Node; + ambientOcclusion: Node; + reflectedLight: { + directDiffuse: Node; + directSpecular: Node; + indirectDiffuse: Node; + indirectSpecular: Node; + }; + backdrop: Node; + backdropAlpha: Node; + } | null; + /** + * Returns a lighting context object. + * + * @return {{ + * radiance: Node, + * irradiance: Node, + * iblIrradiance: Node, + * ambientOcclusion: Node, + * reflectedLight: {directDiffuse: Node, directSpecular: Node, indirectDiffuse: Node, indirectSpecular: Node}, + * backdrop: Node, + * backdropAlpha: Node + * }} The lighting context object. + */ + getContext(): { + radiance: Node; + irradiance: Node; + iblIrradiance: Node; + ambientOcclusion: Node; + reflectedLight: { + directDiffuse: Node; + directSpecular: Node; + indirectDiffuse: Node; + indirectSpecular: Node; + }; + backdrop: Node; + backdropAlpha: Node; + }; +} +/** + * Abstract class for implementing lighting models. The module defines + * multiple methods that concrete lighting models can implement. These + * methods are executed at different points during the light evaluation + * process. + */ +export class LightingModel { + /** + * This method is intended for setting up lighting model and context data + * which are later used in the evaluation process. + * + * @abstract + * @param {NodeBuilder} builder - The current node builder. + */ + start(builder: NodeBuilder): void; + /** + * This method is intended for executing final tasks like final updates + * to the outgoing light. + * + * @abstract + * @param {NodeBuilder} builder - The current node builder. + */ + finish(): void; + /** + * This method is intended for implementing the direct light term and + * executed during the build process of directional, point and spot light nodes. + * + * @abstract + * @param {Object} lightData - The light data. + * @param {NodeBuilder} builder - The current node builder. + */ + direct(): void; + /** + * This method is intended for implementing the direct light term for + * rect area light nodes. + * + * @abstract + * @param {Object} lightData - The light data. + * @param {NodeBuilder} builder - The current node builder. + */ + directRectArea(): void; + /** + * This method is intended for implementing the indirect light term. + * + * @abstract + * @param {NodeBuilder} builder - The current node builder. + */ + indirect(): void; + /** + * This method is intended for implementing the ambient occlusion term. + * Unlike other methods, this method must be called manually by the lighting + * model in its indirect term. + * + * @abstract + * @param {NodeBuilder} builder - The current node builder. + */ + ambientOcclusion(): void; +} +/** + * Base class for lighting nodes. + * + * @augments Node + */ +export class LightingNode extends Node { + /** + * Constructs a new lighting node. + */ + constructor(); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLightingNode: boolean; +} +/** + * This node represents the scene's lighting and manages the lighting model's life cycle + * for the current build 3D object. It is responsible for computing the total outgoing + * light in a given lighting context. + * + * @augments Node + */ +export class LightsNode extends Node { + /** + * Constructs a new lights node. + */ + constructor(); + /** + * A node representing the total diffuse light. + * + * @type {Node} + */ + totalDiffuseNode: Node; + /** + * A node representing the total specular light. + * + * @type {Node} + */ + totalSpecularNode: Node; + /** + * A node representing the outgoing light. + * + * @type {Node} + */ + outgoingLightNode: Node; + /** + * An array representing the lights in the scene. + * + * @private + * @type {Array} + */ + private _lights; + /** + * For each light in the scene, this node will create a + * corresponding light node. + * + * @private + * @type {?Array} + * @default null + */ + private _lightNodes; + /** + * A hash for identifying the current light nodes setup. + * + * @private + * @type {?string} + * @default null + */ + private _lightNodesHash; + /** + * Computes a hash value for identifying the current light nodes setup. + * + * @param {NodeBuilder} builder - A reference to the current node builder. + * @return {string} The computed hash. + */ + getHash(builder: NodeBuilder): string; + analyze(builder: any): void; + /** + * Creates lighting nodes for each scene light. This makes it possible to further + * process lights in the node system. + * + * @param {NodeBuilder} builder - A reference to the current node builder. + */ + setupLightsNode(builder: NodeBuilder): void; + /** + * Sets up a direct light in the lighting model. + * + * @param {Object} builder - The builder object containing the context and stack. + * @param {Object} lightNode - The light node. + * @param {Object} lightData - The light object containing color and direction properties. + */ + setupDirectLight(builder: Object, lightNode: Object, lightData: Object): void; + setupDirectRectAreaLight(builder: any, lightNode: any, lightData: any): void; + /** + * Setups the internal lights by building all respective + * light nodes. + * + * @param {NodeBuilder} builder - A reference to the current node builder. + * @param {Array} lightNodes - An array of lighting nodes. + */ + setupLights(builder: NodeBuilder, lightNodes: Array): void; + getLightNodes(builder: any): LightingNode[] | null; + /** + * The implementation makes sure that for each light in the scene + * there is a corresponding light node. By building the light nodes + * and evaluating the lighting model the outgoing light is computed. + * + * @param {NodeBuilder} builder - A reference to the current node builder. + * @return {Node} A node representing the outgoing light. + */ + setup(builder: NodeBuilder): Node; + /** + * Configures this node with an array of lights. + * + * @param {Array} lights - An array of lights. + * @return {LightsNode} A reference to this node. + */ + setLights(lights: Array): LightsNode; + /** + * Returns an array of the scene's lights. + * + * @return {Array} The scene's lights. + */ + getLights(): Array; + /** + * Whether the scene has lights or not. + * + * @type {boolean} + */ + get hasLights(): boolean; +} +/** + * This node material can be used to render lines with a size larger than one + * by representing them as instanced meshes. + * + * @augments NodeMaterial + */ +export class Line2NodeMaterial extends NodeMaterial { + /** + * Constructs a new node material for wide line rendering. + * + * @param {Object} [parameters={}] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLine2NodeMaterial: boolean; + /** + * The dash offset. + * + * @type {number} + * @default 0 + */ + dashOffset: number; + /** + * Defines the lines color. + * + * @type {?Node} + * @default null + */ + lineColorNode: Node | null; + /** + * Defines the offset. + * + * @type {?Node} + * @default null + */ + offsetNode: Node | null; + /** + * Defines the dash scale. + * + * @type {?Node} + * @default null + */ + dashScaleNode: Node | null; + /** + * Defines the dash size. + * + * @type {?Node} + * @default null + */ + dashSizeNode: Node | null; + /** + * Defines the gap size. + * + * @type {?Node} + * @default null + */ + gapSizeNode: Node | null; + _useDash: any; + _useAlphaToCoverage: boolean; + _useWorldUnits: boolean; + set worldUnits(value: boolean); + /** + * Whether the lines should sized in world units or not. + * When set to `false` the unit is pixel. + * + * @type {boolean} + * @default false + */ + get worldUnits(): boolean; + set dashed(value: boolean); + /** + * Whether the lines should be dashed or not. + * + * @type {boolean} + * @default false + */ + get dashed(): boolean; + /** + * Copies the properties of the given material to this instance. + * + * @param {Line2NodeMaterial} source - The material to copy. + * @return {Line2NodeMaterial} A reference to this material. + */ + copy(source: Line2NodeMaterial): Line2NodeMaterial; +} +import { LineBasicMaterial } from './three.core.js'; +/** + * Node material version of {@link LineBasicMaterial}. + * + * @augments NodeMaterial + */ +export class LineBasicNodeMaterial extends NodeMaterial { + /** + * Constructs a new line basic node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLineBasicNodeMaterial: boolean; +} +import { LineDashedMaterial } from './three.core.js'; +/** + * Node material version of {@link LineDashedMaterial}. + * + * @augments NodeMaterial + */ +export class LineDashedNodeMaterial extends NodeMaterial { + /** + * Constructs a new line dashed node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLineDashedNodeMaterial: boolean; + /** + * The dash offset. + * + * @type {number} + * @default 0 + */ + dashOffset: number; + /** + * The offset of dash materials is by default inferred from the `dashOffset` + * property. This node property allows to overwrite the default + * and define the offset with a node instead. + * + * If you don't want to overwrite the offset but modify the existing + * value instead, use {@link materialLineDashOffset}. + * + * @type {?Node} + * @default null + */ + offsetNode: Node | null; + /** + * The scale of dash materials is by default inferred from the `scale` + * property. This node property allows to overwrite the default + * and define the scale with a node instead. + * + * If you don't want to overwrite the scale but modify the existing + * value instead, use {@link materialLineScale}. + * + * @type {?Node} + * @default null + */ + dashScaleNode: Node | null; + /** + * The dash size of dash materials is by default inferred from the `dashSize` + * property. This node property allows to overwrite the default + * and define the dash size with a node instead. + * + * If you don't want to overwrite the dash size but modify the existing + * value instead, use {@link materialLineDashSize}. + * + * @type {?Node} + * @default null + */ + dashSizeNode: Node | null; + /** + * The gap size of dash materials is by default inferred from the `gapSize` + * property. This node property allows to overwrite the default + * and define the gap size with a node instead. + * + * If you don't want to overwrite the gap size but modify the existing + * value instead, use {@link materialLineGapSize}. + * + * @type {?Node} + * @default null + */ + gapSizeNode: Node | null; +} +import { LinearFilter } from './three.core.js'; +import { LinearMipMapLinearFilter } from './three.core.js'; +import { LinearMipmapLinearFilter } from './three.core.js'; +import { LinearMipmapNearestFilter } from './three.core.js'; +import { LinearSRGBColorSpace } from './three.core.js'; +import { LinearToneMapping } from './three.core.js'; +import { LinearTransfer } from './three.core.js'; +import { Loader } from './three.core.js'; +/** + * This module offers a variety of ways to implement loops in TSL. In it's basic form it's: + * ```js + * Loop( count, ( { i } ) => { + * + * } ); + * ``` + * However, it is also possible to define a start and end ranges, data types and loop conditions: + * ```js + * Loop( { start: int( 0 ), end: int( 10 ), type: 'int', condition: '<' }, ( { i } ) => { + * + * } ); + *``` + * Nested loops can be defined in a compacted form: + * ```js + * Loop( 10, 5, ( { i, j } ) => { + * + * } ); + * ``` + * Loops that should run backwards can be defined like so: + * ```js + * Loop( { start: 10 }, () => {} ); + * ``` + * It is possible to execute with boolean values, similar to the `while` syntax. + * ```js + * const value = float( 0 ).toVar(); + * + * Loop( value.lessThan( 10 ), () => { + * + * value.addAssign( 1 ); + * + * } ); + * ``` + * The module also provides `Break()` and `Continue()` TSL expression for loop control. + * @augments Node + */ +export class LoopNode extends Node { + /** + * Constructs a new loop node. + * + * @param {Array} params - Depending on the loop type, array holds different parameterization values for the loop. + */ + constructor(params?: Array); + params: any[]; + /** + * Returns a loop variable name based on an index. The pattern is + * `0` = `i`, `1`= `j`, `2`= `k` and so on. + * + * @param {number} index - The index. + * @return {string} The loop variable name. + */ + getVarName(index: number): string; + /** + * Returns properties about this node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Object} The node properties. + */ + getProperties(builder: NodeBuilder): Object; + setup(builder: any): void; + generate(builder: any): void; +} +/** + * This node can be used setup a MRT context for rendering. A typical MRT setup for + * post-processing is shown below: + * ```js + * const mrtNode = mrt( { + * output: output, + * normal: normalView + * } ) ; + * ``` + * The MRT output is defined as a dictionary. + * + * @augments OutputStructNode + */ +export class MRTNode extends OutputStructNode { + /** + * Constructs a new output struct node. + * + * @param {Object} outputNodes - The MRT outputs. + */ + constructor(outputNodes: { + [x: string]: Node; + }); + /** + * A dictionary representing the MRT outputs. The key + * is the name of the output, the value the node which produces + * the output result. + * + * @type {Object} + */ + outputNodes: { + [x: string]: Node; + }; + /** + * A dictionary storing the blend modes for each output. + * + * @type {Object} + */ + blendModes: { + [x: string]: BlendMode; + }; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMRTNode: boolean; + /** + * Sets the blend mode for the given output name. + * + * @param {string} name - The name of the output. + * @param {BlendMode} blend - The blending mode. + * @return {MRTNode} The current MRT node. + */ + setBlendMode(name: string, blend: BlendMode): MRTNode; + /** + * Returns the blend mode for the given output name. + * + * @param {string} name - The name of the output. + * @return {BlendMode} The blend mode. + */ + getBlendMode(name: string): BlendMode; + /** + * Returns `true` if the MRT node has an output with the given name. + * + * @param {string} name - The name of the output. + * @return {NodeBuilder} Whether the MRT node has an output for the given name or not. + */ + has(name: string): NodeBuilder; + /** + * Returns the output node for the given name. + * + * @param {string} name - The name of the output. + * @return {Node} The output node. + */ + get(name: string): Node; + /** + * Merges the outputs of the given MRT node with the outputs of this node. + * + * @param {MRTNode} mrtNode - The MRT to merge. + * @return {MRTNode} A new MRT node with merged outputs.. + */ + merge(mrtNode: MRTNode): MRTNode; + setup(builder: any): Node | null; +} +import { Material } from './three.core.js'; +import { MaterialBlending } from './three.core.js'; +import { MaterialLoader } from './three.core.js'; +/** + * This class should simplify the node access to material properties. + * It internal uses reference nodes to make sure changes to material + * properties are automatically reflected to predefined TSL objects + * like e.g. `materialColor`. + * + * @augments Node + */ +export class MaterialNode extends Node { + /** + * Constructs a new material node. + * + * @param {string} scope - The scope defines what kind of material property is referred by the node. + */ + constructor(scope: string); + /** + * The scope defines what material property is referred by the node. + * + * @type {string} + */ + scope: string; + /** + * Returns a cached reference node for the given property and type. + * + * @param {string} property - The name of the material property. + * @param {string} type - The uniform type of the property. + * @return {MaterialReferenceNode} A material reference node representing the property access. + */ + getCache(property: string, type: string): MaterialReferenceNode; + /** + * Returns a float-typed material reference node for the given property name. + * + * @param {string} property - The name of the material property. + * @return {MaterialReferenceNode} A material reference node representing the property access. + */ + getFloat(property: string): MaterialReferenceNode; + /** + * Returns a color-typed material reference node for the given property name. + * + * @param {string} property - The name of the material property. + * @return {MaterialReferenceNode} A material reference node representing the property access. + */ + getColor(property: string): MaterialReferenceNode; + /** + * Returns a texture-typed material reference node for the given property name. + * + * @param {string} property - The name of the material property. + * @return {MaterialReferenceNode} A material reference node representing the property access. + */ + getTexture(property: string): MaterialReferenceNode; + /** + * The node setup is done depending on the selected scope. Multiple material properties + * might be grouped into a single node composition if they logically belong together. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The node representing the selected scope. + */ + setup(builder: NodeBuilder): Node; +} +export namespace MaterialNode { + let ALPHA_TEST: string; + let COLOR: string; + let OPACITY: string; + let SHININESS: string; + let SPECULAR: string; + let SPECULAR_STRENGTH: string; + let SPECULAR_INTENSITY: string; + let SPECULAR_COLOR: string; + let REFLECTIVITY: string; + let ROUGHNESS: string; + let METALNESS: string; + let NORMAL: string; + let CLEARCOAT: string; + let CLEARCOAT_ROUGHNESS: string; + let CLEARCOAT_NORMAL: string; + let EMISSIVE: string; + let ROTATION: string; + let SHEEN: string; + let SHEEN_ROUGHNESS: string; + let ANISOTROPY: string; + let IRIDESCENCE: string; + let IRIDESCENCE_IOR: string; + let IRIDESCENCE_THICKNESS: string; + let IOR: string; + let TRANSMISSION: string; + let THICKNESS: string; + let ATTENUATION_DISTANCE: string; + let ATTENUATION_COLOR: string; + let LINE_SCALE: string; + let LINE_DASH_SIZE: string; + let LINE_GAP_SIZE: string; + let LINE_WIDTH: string; + let LINE_DASH_OFFSET: string; + let POINT_SIZE: string; + let DISPERSION: string; + let LIGHT_MAP: string; + let AO: string; +} +/** + * This node is a special type of reference node which is intended + * for linking material properties with node values. + * ```js + * const opacityNode = materialReference( 'opacity', 'float', material ); + * ``` + * When changing `material.opacity`, the node value of `opacityNode` will + * automatically be updated. + * + * @augments ReferenceNode + */ +export class MaterialReferenceNode extends ReferenceNode { + /** + * Constructs a new material reference node. + * + * @param {string} property - The name of the property the node refers to. + * @param {string} inputType - The uniform type that should be used to represent the property value. + * @param {?Material} [material=null] - The material the property belongs to. When no material is set, + * the node refers to the material of the current rendered object. + */ + constructor(property: string, inputType: string, material?: Material | null); + /** + * The material the property belongs to. When no material is set, + * the node refers to the material of the current rendered object. + * + * @type {?Material} + * @default null + */ + material: Material | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMaterialReferenceNode: boolean; +} +/** + * This node represents a variety of mathematical methods available in shaders. + * They are divided into three categories: + * + * - Methods with one input like `sin`, `cos` or `normalize`. + * - Methods with two inputs like `dot`, `cross` or `pow`. + * - Methods with three inputs like `mix`, `clamp` or `smoothstep`. + * + * @augments TempNode + */ +export class MathNode extends TempNode { + /** + * Constructs a new math node. + * + * @param {string} method - The method name. + * @param {Node} aNode - The first input. + * @param {?Node} [bNode=null] - The second input. + * @param {?Node} [cNode=null] - The third input. + */ + constructor(method: string, aNode: Node, bNode?: Node | null, cNode?: Node | null, ...args: any[]); + /** + * The method name. + * + * @type {string} + */ + method: string; + /** + * The first input. + * + * @type {Node} + */ + aNode: Node; + /** + * The second input. + * + * @type {?Node} + * @default null + */ + bNode: Node | null; + /** + * The third input. + * + * @type {?Node} + * @default null + */ + cNode: Node | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMathNode: boolean; + /** + * The input type is inferred from the node types of the input nodes. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The input type. + */ + getInputType(builder: NodeBuilder): string; + /** + * The selected method as well as the input type determine the node type of this node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + setup(builder: any): any; + generate(builder: any, output: any): any; + serialize(data: any): void; + deserialize(data: any): void; +} +export namespace MathNode { + let ALL: string; + let ANY: string; + let RADIANS: string; + let DEGREES: string; + let EXP: string; + let EXP2: string; + let LOG: string; + let LOG2: string; + let SQRT: string; + let INVERSE_SQRT: string; + let FLOOR: string; + let CEIL: string; + let NORMALIZE: string; + let FRACT: string; + let SIN: string; + let SINH: string; + let COS: string; + let COSH: string; + let TAN: string; + let TANH: string; + let ASIN: string; + let ASINH: string; + let ACOS: string; + let ACOSH: string; + let ATAN: string; + let ATANH: string; + let ABS: string; + let SIGN: string; + let LENGTH: string; + let NEGATE: string; + let ONE_MINUS: string; + let DFDX: string; + let DFDY: string; + let ROUND: string; + let RECIPROCAL: string; + let TRUNC: string; + let FWIDTH: string; + let TRANSPOSE: string; + let DETERMINANT: string; + let INVERSE: string; + let EQUALS: string; + let MIN: string; + let MAX: string; + let STEP: string; + let REFLECT: string; + let DISTANCE: string; + let DIFFERENCE: string; + let DOT: string; + let CROSS: string; + let POW: string; + let TRANSFORM_DIRECTION: string; + let MIX: string; + let CLAMP: string; + let REFRACT: string; + let SMOOTHSTEP: string; + let FACEFORWARD: string; +} +import { MathUtils } from './three.core.js'; +import { Matrix2 } from './three.core.js'; +import { Matrix3 } from './three.core.js'; +import { Matrix4 } from './three.core.js'; +import { MaxEquation } from './three.core.js'; +/** + * A special type of uniform node that computes the + * maximum mipmap level for a given texture node. + * + * ```js + * const level = maxMipLevel( textureNode ); + * ``` + * + * @augments UniformNode + */ +export class MaxMipLevelNode extends UniformNode { + /** + * Constructs a new max mip level node. + * + * @param {TextureNode} textureNode - The texture node to compute the max mip level for. + */ + constructor(textureNode: TextureNode); + /** + * The texture node to compute the max mip level for. + * + * @private + * @type {TextureNode} + */ + private _textureNode; + /** + * The texture node to compute the max mip level for. + * + * @readonly + * @type {TextureNode} + */ + readonly get textureNode(): TextureNode; + /** + * The texture. + * + * @readonly + * @type {Texture} + */ + readonly get texture(): Texture; + update(): void; +} +/** + * Base class for representing member access on an object-like + * node data structures. + * + * @augments Node + */ +export class MemberNode extends Node { + /** + * Constructs a member node. + * + * @param {Node} structNode - The struct node. + * @param {string} property - The property name. + */ + constructor(structNode: Node, property: string); + /** + * The struct node. + * + * @type {Node} + */ + structNode: Node; + /** + * The property name. + * + * @type {Node} + */ + property: Node; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMemberNode: boolean; + hasMember(builder: any): boolean; + generateNodeType(builder: any): string; + getMemberType(builder: any, name: any): any; + generate(builder: any): any; +} +import { Mesh } from './three.core.js'; +import { MeshBasicMaterial } from './three.core.js'; +/** + * Node material version of {@link MeshBasicMaterial}. + * + * @augments NodeMaterial + */ +export class MeshBasicNodeMaterial extends NodeMaterial { + /** + * Constructs a new mesh basic node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshBasicNodeMaterial: boolean; + /** + * Overwritten since this type of material uses {@link BasicEnvironmentNode} + * to implement the default environment mapping. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {?BasicEnvironmentNode} The environment node. + */ + setupEnvironment(builder: NodeBuilder): BasicEnvironmentNode | null; + /** + * Setups the lighting model. + * + * @return {BasicLightingModel} The lighting model. + */ + setupLightingModel(): BasicLightingModel; +} +import { MeshLambertMaterial } from './three.core.js'; +/** + * Node material version of {@link MeshLambertMaterial}. + * + * @augments NodeMaterial + */ +export class MeshLambertNodeMaterial extends NodeMaterial { + /** + * Constructs a new mesh lambert node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshLambertNodeMaterial: boolean; + /** + * Overwritten since this type of material uses {@link BasicEnvironmentNode} + * to implement the default environment mapping. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {?BasicEnvironmentNode} The environment node. + */ + setupEnvironment(builder: NodeBuilder): BasicEnvironmentNode | null; + /** + * Setups the lighting model. + * + * @return {PhongLightingModel} The lighting model. + */ + setupLightingModel(): PhongLightingModel; +} +import { MeshMatcapMaterial } from './three.core.js'; +/** + * Node material version of {@link MeshMatcapMaterial}. + * + * @augments NodeMaterial + */ +export class MeshMatcapNodeMaterial extends NodeMaterial { + /** + * Constructs a new mesh normal node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshMatcapNodeMaterial: boolean; + /** + * Setups the matcap specific node variables. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setupVariants(builder: NodeBuilder): void; +} +import { MeshNormalMaterial } from './three.core.js'; +/** + * Node material version of {@link MeshNormalMaterial}. + * + * @augments NodeMaterial + */ +export class MeshNormalNodeMaterial extends NodeMaterial { + /** + * Constructs a new mesh normal node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshNormalNodeMaterial: boolean; + /** + * Overwrites the default implementation by computing the diffuse color + * based on the normal data. + */ + setupDiffuseColor(): void; +} +import { MeshPhongMaterial } from './three.core.js'; +/** + * Node material version of {@link MeshPhongMaterial}. + * + * @augments NodeMaterial + */ +export class MeshPhongNodeMaterial extends NodeMaterial { + /** + * Constructs a new mesh lambert node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshPhongNodeMaterial: boolean; + /** + * The shininess of phong materials is by default inferred from the `shininess` + * property. This node property allows to overwrite the default + * and define the shininess with a node instead. + * + * If you don't want to overwrite the shininess but modify the existing + * value instead, use {@link materialShininess}. + * + * @type {?Node} + * @default null + */ + shininessNode: Node | null; + /** + * The specular color of phong materials is by default inferred from the + * `specular` property. This node property allows to overwrite the default + * and define the specular color with a node instead. + * + * If you don't want to overwrite the specular color but modify the existing + * value instead, use {@link materialSpecular}. + * + * @type {?Node} + * @default null + */ + specularNode: Node | null; + /** + * Overwritten since this type of material uses {@link BasicEnvironmentNode} + * to implement the default environment mapping. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {?BasicEnvironmentNode} The environment node. + */ + setupEnvironment(builder: NodeBuilder): BasicEnvironmentNode | null; + /** + * Setups the lighting model. + * + * @return {PhongLightingModel} The lighting model. + */ + setupLightingModel(): PhongLightingModel; + copy(source: any): NodeMaterial; +} +import { MeshPhysicalMaterial } from './three.core.js'; +/** + * Node material version of {@link MeshPhysicalMaterial}. + * + * @augments MeshStandardNodeMaterial + */ +export class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshPhysicalNodeMaterial: boolean; + /** + * The clearcoat of physical materials is by default inferred from the `clearcoat` + * and `clearcoatMap` properties. This node property allows to overwrite the default + * and define the clearcoat with a node instead. + * + * If you don't want to overwrite the clearcoat but modify the existing + * value instead, use {@link materialClearcoat}. + * + * @type {?Node} + * @default null + */ + clearcoatNode: Node | null; + /** + * The clearcoat roughness of physical materials is by default inferred from the `clearcoatRoughness` + * and `clearcoatRoughnessMap` properties. This node property allows to overwrite the default + * and define the clearcoat roughness with a node instead. + * + * If you don't want to overwrite the clearcoat roughness but modify the existing + * value instead, use {@link materialClearcoatRoughness}. + * + * @type {?Node} + * @default null + */ + clearcoatRoughnessNode: Node | null; + /** + * The clearcoat normal of physical materials is by default inferred from the `clearcoatNormalMap` + * property. This node property allows to overwrite the default + * and define the clearcoat normal with a node instead. + * + * If you don't want to overwrite the clearcoat normal but modify the existing + * value instead, use {@link materialClearcoatNormal}. + * + * @type {?Node} + * @default null + */ + clearcoatNormalNode: Node | null; + /** + * The sheen of physical materials is by default inferred from the `sheen`, `sheenColor` + * and `sheenColorMap` properties. This node property allows to overwrite the default + * and define the sheen with a node instead. + * + * If you don't want to overwrite the sheen but modify the existing + * value instead, use {@link materialSheen}. + * + * @type {?Node} + * @default null + */ + sheenNode: Node | null; + /** + * The sheen roughness of physical materials is by default inferred from the `sheenRoughness` and + * `sheenRoughnessMap` properties. This node property allows to overwrite the default + * and define the sheen roughness with a node instead. + * + * If you don't want to overwrite the sheen roughness but modify the existing + * value instead, use {@link materialSheenRoughness}. + * + * @type {?Node} + * @default null + */ + sheenRoughnessNode: Node | null; + /** + * The iridescence of physical materials is by default inferred from the `iridescence` + * property. This node property allows to overwrite the default + * and define the iridescence with a node instead. + * + * If you don't want to overwrite the iridescence but modify the existing + * value instead, use {@link materialIridescence}. + * + * @type {?Node} + * @default null + */ + iridescenceNode: Node | null; + /** + * The iridescence IOR of physical materials is by default inferred from the `iridescenceIOR` + * property. This node property allows to overwrite the default + * and define the iridescence IOR with a node instead. + * + * If you don't want to overwrite the iridescence IOR but modify the existing + * value instead, use {@link materialIridescenceIOR}. + * + * @type {?Node} + * @default null + */ + iridescenceIORNode: Node | null; + /** + * The iridescence thickness of physical materials is by default inferred from the `iridescenceThicknessRange` + * and `iridescenceThicknessMap` properties. This node property allows to overwrite the default + * and define the iridescence thickness with a node instead. + * + * If you don't want to overwrite the iridescence thickness but modify the existing + * value instead, use {@link materialIridescenceThickness}. + * + * @type {?Node} + * @default null + */ + iridescenceThicknessNode: Node | null; + /** + * The specular intensity of physical materials is by default inferred from the `specularIntensity` + * and `specularIntensityMap` properties. This node property allows to overwrite the default + * and define the specular intensity with a node instead. + * + * If you don't want to overwrite the specular intensity but modify the existing + * value instead, use {@link materialSpecularIntensity}. + * + * @type {?Node} + * @default null + */ + specularIntensityNode: Node | null; + /** + * The specular color of physical materials is by default inferred from the `specularColor` + * and `specularColorMap` properties. This node property allows to overwrite the default + * and define the specular color with a node instead. + * + * If you don't want to overwrite the specular color but modify the existing + * value instead, use {@link materialSpecularColor}. + * + * @type {?Node} + * @default null + */ + specularColorNode: Node | null; + /** + * The ior of physical materials is by default inferred from the `ior` + * property. This node property allows to overwrite the default + * and define the ior with a node instead. + * + * If you don't want to overwrite the ior but modify the existing + * value instead, use {@link materialIOR}. + * + * @type {?Node} + * @default null + */ + iorNode: Node | null; + /** + * The transmission of physical materials is by default inferred from the `transmission` and + * `transmissionMap` properties. This node property allows to overwrite the default + * and define the transmission with a node instead. + * + * If you don't want to overwrite the transmission but modify the existing + * value instead, use {@link materialTransmission}. + * + * @type {?Node} + * @default null + */ + transmissionNode: Node | null; + /** + * The thickness of physical materials is by default inferred from the `thickness` and + * `thicknessMap` properties. This node property allows to overwrite the default + * and define the thickness with a node instead. + * + * If you don't want to overwrite the thickness but modify the existing + * value instead, use {@link materialThickness}. + * + * @type {?Node} + * @default null + */ + thicknessNode: Node | null; + /** + * The attenuation distance of physical materials is by default inferred from the + * `attenuationDistance` property. This node property allows to overwrite the default + * and define the attenuation distance with a node instead. + * + * If you don't want to overwrite the attenuation distance but modify the existing + * value instead, use {@link materialAttenuationDistance}. + * + * @type {?Node} + * @default null + */ + attenuationDistanceNode: Node | null; + /** + * The attenuation color of physical materials is by default inferred from the + * `attenuationColor` property. This node property allows to overwrite the default + * and define the attenuation color with a node instead. + * + * If you don't want to overwrite the attenuation color but modify the existing + * value instead, use {@link materialAttenuationColor}. + * + * @type {?Node} + * @default null + */ + attenuationColorNode: Node | null; + /** + * The dispersion of physical materials is by default inferred from the + * `dispersion` property. This node property allows to overwrite the default + * and define the dispersion with a node instead. + * + * If you don't want to overwrite the dispersion but modify the existing + * value instead, use {@link materialDispersion}. + * + * @type {?Node} + * @default null + */ + dispersionNode: Node | null; + /** + * The anisotropy of physical materials is by default inferred from the + * `anisotropy` property. This node property allows to overwrite the default + * and define the anisotropy with a node instead. + * + * If you don't want to overwrite the anisotropy but modify the existing + * value instead, use {@link materialAnisotropy}. + * + * @type {?Node} + * @default null + */ + anisotropyNode: Node | null; + /** + * Whether the lighting model should use clearcoat or not. + * + * @type {boolean} + * @default true + */ + get useClearcoat(): boolean; + /** + * Whether the lighting model should use iridescence or not. + * + * @type {boolean} + * @default true + */ + get useIridescence(): boolean; + /** + * Whether the lighting model should use sheen or not. + * + * @type {boolean} + * @default true + */ + get useSheen(): boolean; + /** + * Whether the lighting model should use anisotropy or not. + * + * @type {boolean} + * @default true + */ + get useAnisotropy(): boolean; + /** + * Whether the lighting model should use transmission or not. + * + * @type {boolean} + * @default true + */ + get useTransmission(): boolean; + /** + * Whether the lighting model should use dispersion or not. + * + * @type {boolean} + * @default true + */ + get useDispersion(): boolean; + /** + * Setups the physical specific node variables. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setupVariants(builder: NodeBuilder): void; + /** + * Setups the clearcoat normal node. + * + * @return {Node} The clearcoat normal. + */ + setupClearcoatNormal(): Node; + setup(builder: any): void; +} +/** + * This node material is an experimental extension of {@link MeshPhysicalNodeMaterial} + * that implements a Subsurface scattering (SSS) term. + * + * @augments MeshPhysicalNodeMaterial + */ +export class MeshSSSNodeMaterial extends MeshPhysicalNodeMaterial { + /** + * Represents the thickness color. + * + * @type {?Node} + * @default null + */ + thicknessColorNode: Node | null; + /** + * Represents the distortion factor. + * + * @type {?Node} + */ + thicknessDistortionNode: Node | null; + /** + * Represents the thickness ambient factor. + * + * @type {?Node} + */ + thicknessAmbientNode: Node | null; + /** + * Represents the thickness attenuation. + * + * @type {?Node} + */ + thicknessAttenuationNode: Node | null; + /** + * Represents the thickness power. + * + * @type {?Node} + */ + thicknessPowerNode: Node | null; + /** + * Represents the thickness scale. + * + * @type {?Node} + */ + thicknessScaleNode: Node | null; + /** + * Whether the lighting model should use SSS or not. + * + * @type {boolean} + * @default true + */ + get useSSS(): boolean; + /** + * Setups the lighting model. + * + * @return {SSSLightingModel} The lighting model. + */ + setupLightingModel(): SSSLightingModel; +} +import { MeshStandardMaterial } from './three.core.js'; +/** + * Node material version of {@link MeshStandardMaterial}. + * + * @augments NodeMaterial + */ +export class MeshStandardNodeMaterial extends NodeMaterial { + /** + * Constructs a new mesh standard node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshStandardNodeMaterial: boolean; + /** + * The emissive color of standard materials is by default inferred from the `emissive`, + * `emissiveIntensity` and `emissiveMap` properties. This node property allows to + * overwrite the default and define the emissive color with a node instead. + * + * If you don't want to overwrite the emissive color but modify the existing + * value instead, use {@link materialEmissive}. + * + * @type {?Node} + * @default null + */ + emissiveNode: Node | null; + /** + * The metalness of standard materials is by default inferred from the `metalness`, + * and `metalnessMap` properties. This node property allows to + * overwrite the default and define the metalness with a node instead. + * + * If you don't want to overwrite the metalness but modify the existing + * value instead, use {@link materialMetalness}. + * + * @type {?Node} + * @default null + */ + metalnessNode: Node | null; + /** + * The roughness of standard materials is by default inferred from the `roughness`, + * and `roughnessMap` properties. This node property allows to + * overwrite the default and define the roughness with a node instead. + * + * If you don't want to overwrite the roughness but modify the existing + * value instead, use {@link materialRoughness}. + * + * @type {?Node} + * @default null + */ + roughnessNode: Node | null; + /** + * Overwritten since this type of material uses {@link EnvironmentNode} + * to implement the PBR (PMREM based) environment mapping. Besides, the + * method honors `Scene.environment`. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {?EnvironmentNode} The environment node. + */ + setupEnvironment(builder: NodeBuilder): EnvironmentNode | null; + /** + * Setups the lighting model. + * + * @return {PhysicalLightingModel} The lighting model. + */ + setupLightingModel(): PhysicalLightingModel; + /** + * Setups the specular related node variables. + */ + setupSpecular(): void; + copy(source: any): NodeMaterial; +} +import { MeshToonMaterial } from './three.core.js'; +/** + * Node material version of {@link MeshToonMaterial}. + * + * @augments NodeMaterial + */ +export class MeshToonNodeMaterial extends NodeMaterial { + /** + * Constructs a new mesh toon node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshToonNodeMaterial: boolean; + /** + * Setups the lighting model. + * + * @return {ToonLightingModel} The lighting model. + */ + setupLightingModel(): ToonLightingModel; +} +import { MinEquation } from './three.core.js'; +import { MirroredRepeatWrapping } from './three.core.js'; +import { MixOperation } from './three.core.js'; +/** + * This type of node is a specialized version of `Object3DNode` + * with larger set of model related metrics. Unlike `Object3DNode`, + * `ModelNode` extracts the reference to the 3D object from the + * current node frame state. + * + * @augments Object3DNode + */ +export class ModelNode extends Object3DNode { + /** + * Constructs a new object model node. + * + * @param {('position'|'viewPosition'|'direction'|'scale'|'worldMatrix')} scope - The node represents a different type of transformation depending on the scope. + */ + constructor(scope: ("position" | "viewPosition" | "direction" | "scale" | "worldMatrix")); +} +/** + * This node implements the vertex transformation shader logic which is required + * for morph target animation. + * + * @augments Node + */ +export class MorphNode extends Node { + /** + * Constructs a new morph node. + * + * @param {Mesh} mesh - The mesh holding the morph targets. + */ + constructor(mesh: Mesh); + /** + * The mesh holding the morph targets. + * + * @type {Mesh} + */ + mesh: Mesh; + /** + * A uniform node which represents the morph base influence value. + * + * @type {UniformNode} + */ + morphBaseInfluence: UniformNode; + /** + * Setups the morph node by assigning the transformed vertex data to predefined node variables. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setup(builder: NodeBuilder): void; + /** + * Updates the state of the morphed mesh by updating the base influence. + * + * @param {NodeFrame} frame - The current node frame. + */ + update(): void; +} +import { MultiplyBlending } from './three.core.js'; +import { MultiplyOperation } from './three.core.js'; +import { NearestFilter } from './three.core.js'; +import { NearestMipmapLinearFilter } from './three.core.js'; +import { NearestMipmapNearestFilter } from './three.core.js'; +import { NeutralToneMapping } from './three.core.js'; +import { NeverCompare } from './three.core.js'; +import { NeverDepth } from './three.core.js'; +import { NeverStencilFunc } from './three.core.js'; +import { NoBlending } from './three.core.js'; +import { NoColorSpace } from './three.core.js'; +import { NoNormalPacking } from './three.core.js'; +import { NoToneMapping } from './three.core.js'; +/** + * Base class for all nodes. + * + * @augments EventDispatcher + */ +export class Node extends EventDispatcher { + static get type(): string; + /** + * Constructs a new node. + * + * @param {?string} nodeType - The node type. + */ + constructor(nodeType?: string | null); + /** + * The node type. This represents the result type of the node (e.g. `float` or `vec3`). + * + * @type {?string} + * @default null + */ + nodeType: string | null; + /** + * The update type of the node's {@link Node#update} method. Possible values are listed in {@link NodeUpdateType}. + * + * @type {string} + * @default 'none' + */ + updateType: string; + /** + * The update type of the node's {@link Node#updateBefore} method. Possible values are listed in {@link NodeUpdateType}. + * + * @type {string} + * @default 'none' + */ + updateBeforeType: string; + /** + * The update type of the node's {@link Node#updateAfter} method. Possible values are listed in {@link NodeUpdateType}. + * + * @type {string} + * @default 'none' + */ + updateAfterType: string; + /** + * The version of the node. The version automatically is increased when {@link Node#needsUpdate} is set to `true`. + * + * @type {number} + * @readonly + * @default 0 + */ + readonly version: number; + /** + * The name of the node. + * + * @type {string} + * @default '' + */ + name: string; + /** + * Whether this node is global or not. This property is relevant for the internal + * node caching system. All nodes which should be declared just once should + * set this flag to `true` (a typical example is {@link AttributeNode}). + * + * @type {boolean} + * @default false + */ + global: boolean; + /** + * Create a list of parents for this node during the build process. + * + * @type {boolean} + * @default false + */ + parents: boolean; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isNode: boolean; + _beforeNodes: any; + /** + * The cache key of this node. + * + * @private + * @type {?number} + * @default null + */ + private _cacheKey; + /** + * The UUID of the node. + * + * @type {string} + * @default null + * @private + */ + private _uuid; + /** + * The cache key's version. + * + * @private + * @type {number} + * @default 0 + */ + private _cacheKeyVersion; + /** + * The unique ID of the node. + * + * @type {number} + * @readonly + */ + readonly id: number; + /** + * The stack trace of the node for debugging purposes. + * + * @type {?string} + * @default null + */ + stackTrace: string | null; + /** + * Set this property to `true` when the node should be regenerated. + * + * @type {boolean} + * @default false + * @param {boolean} value + */ + set needsUpdate(value: boolean); + /** + * The UUID of the node. + * + * @type {string} + * @readonly + */ + readonly get uuid(): string; + /** + * The type of the class. The value is usually the constructor name. + * + * @type {string} + * @readonly + */ + readonly get type(): string; + /** + * Convenient method for defining {@link Node#update}. + * + * @param {Function} callback - The update method. + * @param {string} updateType - The update type. + * @return {Node} A reference to this node. + */ + onUpdate(callback: Function, updateType: string): Node; + /** + * The method can be implemented to update the node's internal state when it is used to render an object. + * The {@link Node#updateType} property defines how often the update is executed. + * + * @abstract + * @param {NodeFrame} frame - A reference to the current node frame. + * @return {?boolean} An optional bool that indicates whether the implementation actually performed an update or not (e.g. due to caching). + */ + update(): boolean | null; + /** + * Convenient method for defining {@link Node#update}. Similar to {@link Node#onUpdate}, but + * this method automatically sets the update type to `FRAME`. + * + * @param {Function} callback - The update method. + * @return {Node} A reference to this node. + */ + onFrameUpdate(callback: Function): Node; + /** + * Convenient method for defining {@link Node#update}. Similar to {@link Node#onUpdate}, but + * this method automatically sets the update type to `RENDER`. + * + * @param {Function} callback - The update method. + * @return {Node} A reference to this node. + */ + onRenderUpdate(callback: Function): Node; + /** + * Convenient method for defining {@link Node#update}. Similar to {@link Node#onUpdate}, but + * this method automatically sets the update type to `OBJECT`. + * + * @param {Function} callback - The update method. + * @return {Node} A reference to this node. + */ + onObjectUpdate(callback: Function): Node; + /** + * Convenient method for defining {@link Node#updateReference}. + * + * @param {Function} callback - The update method. + * @return {Node} A reference to this node. + */ + onReference(callback: Function): Node; + /** + * Nodes might refer to other objects like materials. This method allows to dynamically update the reference + * to such objects based on a given state (e.g. the current node frame or builder). + * + * @param {any} state - This method can be invocated in different contexts so `state` can refer to any object type. + * @return {any} The updated reference. + */ + updateReference(): any; + /** + * By default this method returns the value of the {@link Node#global} flag. This method + * can be overwritten in derived classes if an analytical way is required to determine the + * global cache referring to the current shader-stage. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {boolean} Whether this node is global or not. + */ + isGlobal(): boolean; + /** + * Generator function that can be used to iterate over the child nodes. + * + * @generator + * @yields {Node} A child node. + */ + getChildren(): Generator; + /** + * Calling this method dispatches the `dispose` event. This event can be used + * to register event listeners for clean up tasks. + */ + dispose(): void; + /** + * Callback for {@link Node#traverse}. + * + * @callback traverseCallback + * @param {Node} node - The current node. + */ + /** + * Can be used to traverse through the node's hierarchy. + * + * @param {traverseCallback} callback - A callback that is executed per node. + */ + traverse(callback: (node: Node) => any): void; + /** + * Returns the child nodes of this node. + * + * @private + * @param {Set} [ignores=new Set()] - A set of nodes to ignore during the search to avoid circular references. + * @returns {Array} An array of objects describing the child nodes. + */ + private _getChildren; + /** + * Returns the cache key for this node. + * + * @param {boolean} [force=false] - When set to `true`, a recomputation of the cache key is forced. + * @param {Set} [ignores=null] - A set of nodes to ignore during the computation of the cache key. + * @return {number} The cache key of the node. + */ + getCacheKey(force?: boolean, ignores?: Set): number; + /** + * Generate a custom cache key for this node. + * + * @return {number} The cache key of the node. + */ + customCacheKey(): number; + /** + * Returns the references to this node which is by default `this`. + * + * @return {Node} A reference to this node. + */ + getScope(): Node; + /** + * Returns the hash of the node which is used to identify the node. By default it's + * the {@link Node#uuid} however derived node classes might have to overwrite this method + * depending on their implementation. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The hash. + */ + getHash(): string; + /** + * Returns the update type of {@link Node#update}. + * + * @return {NodeUpdateType} The update type. + */ + getUpdateType(): { + NONE: string; + FRAME: string; + RENDER: string; + OBJECT: string; + }; + /** + * Returns the update type of {@link Node#updateBefore}. + * + * @return {NodeUpdateType} The update type. + */ + getUpdateBeforeType(): { + NONE: string; + FRAME: string; + RENDER: string; + OBJECT: string; + }; + /** + * Returns the update type of {@link Node#updateAfter}. + * + * @return {NodeUpdateType} The update type. + */ + getUpdateAfterType(): { + NONE: string; + FRAME: string; + RENDER: string; + OBJECT: string; + }; + /** + * Certain types are composed of multiple elements. For example a `vec3` + * is composed of three `float` values. This method returns the type of + * these elements. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The type of the node. + */ + getElementType(builder: NodeBuilder): string; + /** + * Returns the node member type for the given name. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} name - The name of the member. + * @return {string} The type of the node. + */ + getMemberType(): string; + /** + * Returns the node's type. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} [output=null] - The output of the node. + * @return {string} The type of the node. + */ + getNodeType(builder: NodeBuilder, output?: string): string; + /** + * Returns the node's type. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} [output=null] - The output of the node. + * @return {string} The type of the node. + */ + generateNodeType(builder: NodeBuilder, output?: string): string; + /** + * This method is used during the build process of a node and ensures + * equal nodes are not built multiple times but just once. For example if + * `attribute( 'uv' )` is used multiple times by the user, the build + * process makes sure to process just the first node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The shared node if possible. Otherwise `this` is returned. + */ + getShared(builder: NodeBuilder): Node; + /** + * Returns the number of elements in the node array. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {?number} The number of elements in the node array. + */ + getArrayCount(): number | null; + /** + * Represents the setup stage which is the first step of the build process, see {@link Node#build} method. + * This method is often overwritten in derived modules to prepare the node which is used as a node's output/result. + * If an output node is prepared, then it must be returned in the `return` statement of the derived module's setup function. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {?Node} The output node. + */ + setup(builder: NodeBuilder): Node | null; + /** + * Represents the analyze stage which is the second step of the build process, see {@link Node#build} method. + * This stage analyzes the node hierarchy and ensures descendent nodes are built. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {?Node} output - The target output node. + */ + analyze(builder: NodeBuilder, output?: Node | null): void; + /** + * Represents the generate stage which is the third step of the build process, see {@link Node#build} method. + * This state builds the output node and returns the resulting shader string. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {?string} [output] - Can be used to define the output type. + * @return {?string} The generated shader string. + */ + generate(builder: NodeBuilder, output?: string | null): string | null; + /** + * The method can be implemented to update the node's internal state before it is used to render an object. + * The {@link Node#updateBeforeType} property defines how often the update is executed. + * + * @abstract + * @param {NodeFrame} frame - A reference to the current node frame. + * @return {?boolean} An optional bool that indicates whether the implementation actually performed an update or not (e.g. due to caching). + */ + updateBefore(): boolean | null; + /** + * The method can be implemented to update the node's internal state after it was used to render an object. + * The {@link Node#updateAfterType} property defines how often the update is executed. + * + * @abstract + * @param {NodeFrame} frame - A reference to the current node frame. + * @return {?boolean} An optional bool that indicates whether the implementation actually performed an update or not (e.g. due to caching). + */ + updateAfter(): boolean | null; + before(node: any): this; + /** + * This method performs the build of a node. The behavior and return value depend on the current build stage: + * - **setup**: Prepares the node and its children for the build process. This process can also create new nodes. Returns the node itself or a variant. + * - **analyze**: Analyzes the node hierarchy for optimizations in the code generation stage. Returns `null`. + * - **generate**: Generates the shader code for the node. Returns the generated shader string. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {?(string|Node)} [output=null] - Can be used to define the output type. + * @return {?(Node|string)} The result of the build process, depending on the build stage. + */ + build(builder: NodeBuilder, output?: (string | Node) | null): (Node | string) | null; + /** + * Returns the child nodes as a JSON object. + * + * @return {Generator} An iterable list of serialized child objects as JSON. + */ + getSerializeChildren(): Generator; + /** + * Serializes the node to JSON. + * + * @param {Object} json - The output JSON object. + */ + serialize(json: Object): void; + /** + * Deserializes the node from the given JSON. + * + * @param {Object} json - The JSON object. + */ + deserialize(json: Object): void; + /** + * Serializes the node into the three.js JSON Object/Scene format. + * + * @param {?Object} meta - An optional JSON object that already holds serialized data from other scene objects. + * @return {Object} The serialized node. + */ + toJSON(meta: Object | null): Object; + assign(...params: any[]): any; + toVarIntent(): Node; + get(value: any): MemberNode; +} +export namespace Node { + let captureStackTrace: boolean; +} +export namespace NodeAccess { + let READ_ONLY: string; + let WRITE_ONLY: string; + let READ_WRITE: string; +} +/** + * {@link NodeBuilder} is going to create instances of this class during the build process + * of nodes. They represent the final shader attributes that are going to be generated + * by the builder. Arrays of node attributes is maintained in {@link NodeBuilder#attributes} + * and {@link NodeBuilder#bufferAttributes} for this purpose. + */ +export class NodeAttribute { + /** + * Constructs a new node attribute. + * + * @param {string} name - The name of the attribute. + * @param {string} type - The type of the attribute. + * @param {?Node} node - An optional reference to the node. + */ + constructor(name: string, type: string, node?: Node | null); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isNodeAttribute: boolean; + /** + * The name of the attribute. + * + * @type {string} + */ + name: string; + /** + * The type of the attribute. + * + * @type {string} + */ + type: string; + /** + * An optional reference to the node. + * + * @type {?Node} + * @default null + */ + node: Node | null; +} +/** + * Base class for builders which generate a shader program based + * on a 3D object and its node material definition. + */ +export class NodeBuilder { + /** + * Constructs a new node builder. + * + * @param {Object3D} object - The 3D object. + * @param {Renderer} renderer - The current renderer. + * @param {NodeParser} parser - A reference to a node parser. + */ + constructor(object: Object3D, renderer: Renderer, parser: NodeParser); + /** + * The 3D object. + * + * @type {Object3D} + */ + object: Object3D; + /** + * The material of the 3D object. + * + * @type {?Material} + */ + material: Material | null; + /** + * The geometry of the 3D object. + * + * @type {?BufferGeometry} + */ + geometry: BufferGeometry | null; + /** + * The current renderer. + * + * @type {Renderer} + */ + renderer: Renderer; + /** + * A reference to a node parser. + * + * @type {NodeParser} + */ + parser: NodeParser; + /** + * The scene the 3D object belongs to. + * + * @type {?Scene} + * @default null + */ + scene: Scene | null; + /** + * The camera the 3D object is rendered with. + * + * @type {?Camera} + * @default null + */ + camera: Camera | null; + /** + * A list of all nodes the builder is processing + * for this 3D object. + * + * @type {Array} + */ + nodes: Array; + /** + * A list of all nodes the builder is processing in sequential order. + * + * This is used to determine the update order of nodes, which is important for + * {@link NodeUpdateType#UPDATE_BEFORE} and {@link NodeUpdateType#UPDATE_AFTER}. + * + * @type {Array} + */ + sequentialNodes: Array; + /** + * A list of all nodes which {@link Node#update} method should be executed. + * + * @type {Array} + */ + updateNodes: Array; + /** + * A list of all nodes which {@link Node#updateBefore} method should be executed. + * + * @type {Array} + */ + updateBeforeNodes: Array; + /** + * A list of all nodes which {@link Node#updateAfter} method should be executed. + * + * @type {Array} + */ + updateAfterNodes: Array; + /** + * A dictionary that assigns each node to a unique hash. + * + * @type {Object} + */ + hashNodes: { + [x: number]: Node; + }; + /** + * A reference to a node material observer. + * + * @type {?NodeMaterialObserver} + * @default null + */ + observer: NodeMaterialObserver | null; + /** + * A reference to the current lights node. + * + * @type {?LightsNode} + * @default null + */ + lightsNode: LightsNode | null; + /** + * A reference to the current environment node. + * + * @type {?Node} + * @default null + */ + environmentNode: Node | null; + /** + * A reference to the current fog node. + * + * @type {?Node} + * @default null + */ + fogNode: Node | null; + /** + * The current clipping context. + * + * @type {?ClippingContext} + */ + clippingContext: ClippingContext | null; + /** + * The generated vertex shader. + * + * @type {?string} + */ + vertexShader: string | null; + /** + * The generated fragment shader. + * + * @type {?string} + */ + fragmentShader: string | null; + /** + * The generated compute shader. + * + * @type {?string} + */ + computeShader: string | null; + /** + * Nodes used in the primary flow of code generation. + * + * @type {Object>} + */ + flowNodes: { + [x: string]: Node[]; + }; + /** + * Nodes code from `.flowNodes`. + * + * @type {Object} + */ + flowCode: { + [x: string]: string; + }; + /** + * This dictionary holds the node uniforms of the builder. + * The uniforms are maintained in an array for each shader stage. + * + * @type {Object} + */ + uniforms: Object; + /** + * This dictionary holds the output structs of the builder. + * The structs are maintained in an array for each shader stage. + * + * @type {Object} + */ + structs: Object; + /** + * This dictionary holds the types of the builder. + * + * @type {Object} + */ + types: Object; + /** + * This dictionary holds the bindings for each shader stage. + * + * @type {Object} + */ + bindings: Object; + /** + * This dictionary maintains the binding indices per bind group. + * + * @type {Object} + */ + bindingsIndexes: Object; + /** + * Reference to the array of bind groups. + * + * @type {?Array} + */ + bindGroups: Array | null; + /** + * This array holds the node attributes of this builder + * created via {@link AttributeNode}. + * + * @type {Array} + */ + attributes: Array; + /** + * This array holds the node attributes of this builder + * created via {@link BufferAttributeNode}. + * + * @type {Array} + */ + bufferAttributes: Array; + /** + * This array holds the node varyings of this builder. + * + * @type {Array} + */ + varyings: Array; + /** + * This dictionary holds the (native) node codes of this builder. + * The codes are maintained in an array for each shader stage. + * + * @type {Object>} + */ + codes: { + [x: string]: NodeCode[]; + }; + /** + * This dictionary holds the node variables of this builder. + * The variables are maintained in an array for each shader stage. + * This dictionary is also used to count the number of variables + * according to their type (const, vars). + * + * @type {Object|number>} + */ + vars: { + [x: string]: number | NodeVar[]; + }; + /** + * This dictionary holds the declarations for each shader stage. + * + * @type {Object} + */ + declarations: Object; + /** + * Current code flow. + * All code generated in this stack will be stored in `.flow`. + * + * @type {{code: string}} + */ + flow: { + code: string; + }; + /** + * A chain of nodes. + * Used to check recursive calls in node-graph. + * + * @type {Array} + */ + chaining: Array; + /** + * The current stack. + * This reflects the current process in the code block hierarchy, + * it is useful to know if the current process is inside a conditional for example. + * + * @type {StackNode} + */ + stack: StackNode; + /** + * List of stack nodes. + * The current stack hierarchy is stored in an array. + * + * @type {Array} + */ + stacks: Array; + /** + * A tab value. Used for shader string generation. + * + * @type {string} + * @default '\t' + */ + tab: string; + /** + * Reference to the current function node. + * + * @type {?FunctionNode} + * @default null + */ + currentFunctionNode: FunctionNode | null; + /** + * The builder's context. + * + * @type {Object} + */ + context: Object; + /** + * The builder's cache. + * + * @type {NodeCache} + */ + cache: NodeCache; + /** + * Since the {@link NodeBuilder#cache} might be temporarily + * overwritten by other caches, this member retains the reference + * to the builder's own cache. + * + * @type {NodeCache} + * @default this.cache + */ + globalCache: NodeCache; + flowsData: WeakMap; + /** + * The current shader stage. + * + * @type {?('vertex'|'fragment'|'compute'|'any')} + */ + shaderStage: ("vertex" | "fragment" | "compute" | "any") | null; + /** + * The current build stage. + * + * @type {?('setup'|'analyze'|'generate')} + */ + buildStage: ("setup" | "analyze" | "generate") | null; + /** + * The sub-build layers. + * + * @type {Array} + * @default [] + */ + subBuildLayers: Array; + /** + * The active stack nodes. + * + * @type {Array} + */ + activeStacks: Array; + /** + * The current sub-build TSL function(Fn). + * + * @type {?string} + * @default null + */ + subBuildFn: string | null; + /** + * The current TSL function(Fn) call node. + * + * @type {?Node} + * @default null + */ + fnCall: Node | null; + /** + * Whether the material is using flat shading or not. + * + * @returns {boolean} Whether the material is using flat shading or not. + */ + isFlatShading(): boolean; + /** + * Whether the material is opaque or not. + * + * @return {boolean} Whether the material is opaque or not. + */ + isOpaque(): boolean; + /** + * Factory method for creating an instance of {@link RenderTarget} with the given + * dimensions and options. + * + * @param {number} width - The width of the render target. + * @param {number} height - The height of the render target. + * @param {Object} options - The options of the render target. + * @return {RenderTarget} The render target. + */ + createRenderTarget(width: number, height: number, options: Object): RenderTarget; + /** + * Factory method for creating an instance of {@link CubeRenderTarget} with the given + * dimensions and options. + * + * @param {number} size - The size of the cube render target. + * @param {Object} options - The options of the cube render target. + * @return {CubeRenderTarget} The cube render target. + */ + createCubeRenderTarget(size: number, options: Object): CubeRenderTarget; + /** + * Whether the given node is included in the internal array of nodes or not. + * + * @param {Node} node - The node to test. + * @return {boolean} Whether the given node is included in the internal array of nodes or not. + */ + includes(node: Node): boolean; + /** + * Returns the type of the color output based on the renderer's render target. + * + * @param {number} [index=0] - The index of the render target texture. + * @return {string} The type. + */ + getOutputType(index?: number): string; + /** + * Returns the output struct name which is required by + * {@link OutputStructNode}. + * + * @abstract + * @return {string} The name of the output struct. + */ + getOutputStructName(): string; + /** + * Returns a bind group for the given group name and binding. + * + * @private + * @param {string} groupName - The group name. + * @param {Array} bindings - List of bindings. + * @return {BindGroup} The bind group + */ + private _getBindGroup; + /** + * Returns an array of node uniform groups for the given group name and shader stage. + * + * @param {string} groupName - The group name. + * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. + * @return {Array} The array of node uniform groups. + */ + getBindGroupArray(groupName: string, shaderStage: ("vertex" | "fragment" | "compute" | "any")): Array; + /** + * Returns a list bindings of all shader stages separated by groups. + * + * @return {Array} The list of bindings. + */ + getBindings(): Array; + /** + * Sorts the bind groups and updates {@link NodeBuilder#bindingsIndexes}. + */ + sortBindingGroups(): void; + /** + * The builder maintains each node in a hash-based dictionary. + * This method sets the given node (value) with the given hash (key) into this dictionary. + * + * @param {Node} node - The node to add. + * @param {number} hash - The hash of the node. + */ + setHashNode(node: Node, hash: number): void; + /** + * Adds a node to this builder. + * + * @param {Node} node - The node to add. + */ + addNode(node: Node): void; + /** + * It is used to add Nodes that will be used as FRAME and RENDER events, + * and need to follow a certain sequence in the calls to work correctly. + * This function should be called after 'setup()' in the 'build()' process to ensure that the child nodes are processed first. + * + * @param {Node} node - The node to add. + */ + addSequentialNode(node: Node): void; + /** + * Checks the update types of nodes + */ + buildUpdateNodes(): void; + /** + * A reference the current node which is the + * last node in the chain of nodes. + * + * @type {Node} + */ + get currentNode(): Node; + /** + * Whether the given texture is filtered or not. + * + * @param {Texture} texture - The texture to check. + * @return {boolean} Whether the given texture is filtered or not. + */ + isFilteredTexture(texture: Texture): boolean; + /** + * Returns the maximum number of bytes available for uniform buffers. + * + * @return {number} The maximum number of bytes available for uniform buffers. + */ + getUniformBufferLimit(): number; + /** + * Adds the given node to the internal node chain. + * This is used to check recursive calls in node-graph. + * + * @param {Node} node - The node to add. + */ + addChain(node: Node): void; + /** + * Removes the given node from the internal node chain. + * + * @param {Node} node - The node to remove. + */ + removeChain(node: Node): void; + /** + * Returns the native shader method name for a given generic name. E.g. + * the method name `textureDimensions` matches the WGSL name but must be + * resolved to `textureSize` in GLSL. + * + * @abstract + * @param {string} method - The method name to resolve. + * @return {string} The resolved method name. + */ + getMethod(method: string): string; + /** + * Returns the native snippet for a ternary operation. E.g. GLSL would output + * a ternary op as `cond ? x : y` whereas WGSL would output it as `select(y, x, cond)` + * + * @abstract + * @param {string} condSnippet - The condition determining which expression gets resolved. + * @param {string} ifSnippet - The expression to resolve to if the condition is true. + * @param {string} elseSnippet - The expression to resolve to if the condition is false. + * @return {string} The resolved method name. + */ + getTernary(): string; + /** + * Returns a node for the given hash, see {@link NodeBuilder#setHashNode}. + * + * @param {number} hash - The hash of the node. + * @return {Node} The found node. + */ + getNodeFromHash(hash: number): Node; + /** + * Adds the Node to a target flow so that it can generate code in the 'generate' process. + * + * @param {('vertex'|'fragment'|'compute')} shaderStage - The shader stage. + * @param {Node} node - The node to add. + * @return {Node} The node. + */ + addFlow(shaderStage: ("vertex" | "fragment" | "compute"), node: Node): Node; + /** + * Sets builder's context. + * + * @param {Object} context - The context to set. + */ + setContext(context: Object): void; + /** + * Returns the builder's current context. + * + * @return {Object} The builder's current context. + */ + getContext(): Object; + /** + * Adds context data to the builder's current context. + * + * @param {Object} context - The context to add. + * @return {Object} The previous context. + */ + addContext(context: Object): Object; + /** + * Gets a context used in shader construction that can be shared across different materials. + * This is necessary since the renderer cache can reuse shaders generated in one material and use them in another. + * + * @return {Object} The builder's current context without material. + */ + getSharedContext(): Object; + /** + * Sets builder's cache. + * + * @param {NodeCache} cache - The cache to set. + */ + setCache(cache: NodeCache): void; + /** + * Returns the builder's current cache. + * + * @return {NodeCache} The builder's current cache. + */ + getCache(): NodeCache; + /** + * Returns a cache for the given node. + * + * @param {Node} node - The node. + * @param {boolean} [parent=true] - Whether this node refers to a shared parent cache or not. + * @return {NodeCache} The cache. + */ + getCacheFromNode(node: Node, parent?: boolean): NodeCache; + /** + * Whether the requested feature is available or not. + * + * @abstract + * @param {string} name - The requested feature. + * @return {boolean} Whether the requested feature is supported or not. + */ + isAvailable(): boolean; + /** + * Returns the vertexIndex input variable as a native shader string. + * + * @abstract + * @return {string} The instanceIndex shader string. + */ + getVertexIndex(): string; + /** + * Contextually returns either the vertex stage instance index builtin + * or the linearized index of an compute invocation within a grid of workgroups. + * + * @abstract + * @return {string} The instanceIndex shader string. + */ + getInstanceIndex(): string; + /** + * Returns the drawIndex input variable as a native shader string. + * Only relevant for WebGL and its `WEBGL_multi_draw` extension. + * + * @abstract + * @return {?string} The drawIndex shader string. + */ + getDrawIndex(): string | null; + /** + * Returns the frontFacing input variable as a native shader string. + * + * @abstract + * @return {string} The frontFacing shader string. + */ + getFrontFacing(): string; + /** + * Returns the fragCoord input variable as a native shader string. + * + * @abstract + * @return {string} The fragCoord shader string. + */ + getFragCoord(): string; + /** + * Whether to flip texture data along its vertical axis or not. WebGL needs + * this method evaluate to `true`, WebGPU to `false`. + * + * @abstract + * @return {boolean} Whether to flip texture data along its vertical axis or not. + */ + isFlipY(): boolean; + /** + * Calling this method increases the usage count for the given node by one. + * + * @param {Node} node - The node to increase the usage count for. + * @return {number} The updated usage count. + */ + increaseUsage(node: Node): number; + /** + * Generates a texture sample shader string for the given texture data. + * + * @abstract + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The texture property name. + * @param {string} uvSnippet - Snippet defining the texture coordinates. + * @return {string} The generated shader string. + */ + generateTexture(): string; + /** + * Generates a texture LOD shader string for the given texture data. + * + * @abstract + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The texture property name. + * @param {string} uvSnippet - Snippet defining the texture coordinates. + * @param {?string} depthSnippet - Snippet defining the 0-based texture array index to sample. + * @param {string} levelSnippet - Snippet defining the mip level. + * @return {string} The generated shader string. + */ + generateTextureLod(): string; + /** + * Generates the array declaration string. + * + * @param {string} type - The type. + * @param {?number} [count] - The count. + * @return {string} The generated value as a shader string. + */ + generateArrayDeclaration(type: string, count?: number | null): string; + /** + * Generates the array shader string for the given type and value. + * + * @param {string} type - The type. + * @param {?number} [count] - The count. + * @param {?Array} [values=null] - The default values. + * @return {string} The generated value as a shader string. + */ + generateArray(type: string, count?: number | null, values?: Array | null): string; + /** + * Generates the struct shader string. + * + * @param {string} type - The type. + * @param {Array} [membersLayout] - The count. + * @param {?Array} [values=null] - The default values. + * @return {string} The generated value as a shader string. + */ + generateStruct(type: string, membersLayout?: Array, values?: Array | null): string; + /** + * Generates the shader string for the given type and value. + * + * @param {string} type - The type. + * @param {?any} [value=null] - The value. + * @return {string} The generated value as a shader string. + */ + generateConst(type: string, value?: any | null): string; + /** + * It might be necessary to convert certain data types to different ones + * so this method can be used to hide the conversion. + * + * @param {string} type - The type. + * @return {string} The updated type. + */ + getType(type: string): string; + /** + * Whether the given attribute name is defined in the geometry or not. + * + * @param {string} name - The attribute name. + * @return {boolean} Whether the given attribute name is defined in the geometry. + */ + hasGeometryAttribute(name: string): boolean; + /** + * Returns a node attribute for the given name and type. + * + * @param {string} name - The attribute's name. + * @param {string} type - The attribute's type. + * @return {NodeAttribute} The node attribute. + */ + getAttribute(name: string, type: string): NodeAttribute; + /** + * Returns for the given node and shader stage the property name for the shader. + * + * @param {Node} node - The node. + * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. + * @return {string} The property name. + */ + getPropertyName(node: Node): string; + /** + * Whether the given type is a vector type or not. + * + * @param {string} type - The type to check. + * @return {boolean} Whether the given type is a vector type or not. + */ + isVector(type: string): boolean; + /** + * Whether the given type is a matrix type or not. + * + * @param {string} type - The type to check. + * @return {boolean} Whether the given type is a matrix type or not. + */ + isMatrix(type: string): boolean; + /** + * Whether the given type is a reference type or not. + * + * @param {string} type - The type to check. + * @return {boolean} Whether the given type is a reference type or not. + */ + isReference(type: string): boolean; + /** + * Checks if the given texture requires a manual conversion to the working color space. + * + * @abstract + * @param {Texture} texture - The texture to check. + * @return {boolean} Whether the given texture requires a conversion to working color space or not. + */ + needsToWorkingColorSpace(): boolean; + /** + * Returns the component type of a given texture. + * + * @param {Texture} texture - The texture. + * @return {string} The component type. + */ + getComponentTypeFromTexture(texture: Texture): string; + /** + * Returns the element type for a given type. + * + * @param {string} type - The type. + * @return {string} The element type. + */ + getElementType(type: string): string; + /** + * Returns the component type for a given type. + * + * @param {string} type - The type. + * @return {string} The component type. + */ + getComponentType(type: string): string; + /** + * Returns the vector type for a given type. + * + * @param {string} type - The type. + * @return {string} The vector type. + */ + getVectorType(type: string): string; + /** + * Returns the data type for the given the length and component type. + * + * @param {number} length - The length. + * @param {string} [componentType='float'] - The component type. + * @return {string} The type. + */ + getTypeFromLength(length: number, componentType?: string): string; + /** + * Returns the type for a given typed array. + * + * @param {TypedArray} array - The typed array. + * @return {string} The type. + */ + getTypeFromArray(array: TypedArray): string; + /** + * Returns the type is an integer type. + * + * @param {string} type - The type. + * @return {boolean} Whether the type is an integer type or not. + */ + isInteger(type: string): boolean; + /** + * Returns the type for a given buffer attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + * @return {string} The type. + */ + getTypeFromAttribute(attribute: BufferAttribute): string; + /** + * Returns the length for the given data type. + * + * @param {string} type - The data type. + * @return {number} The length. + */ + getTypeLength(type: string): number; + /** + * Returns the vector type for a given matrix type. + * + * @param {string} type - The matrix type. + * @return {string} The vector type. + */ + getVectorFromMatrix(type: string): string; + /** + * For a given type this method changes the component type to the + * given value. E.g. `vec4` should be changed to the new component type + * `uint` which results in `uvec4`. + * + * @param {string} type - The type. + * @param {string} newComponentType - The new component type. + * @return {string} The new type. + */ + changeComponentType(type: string, newComponentType: string): string; + /** + * Returns the integer type pendant for the given type. + * + * @param {string} type - The type. + * @return {string} The integer type. + */ + getIntegerType(type: string): string; + /** + * Adds an active stack to the internal stack. + * + * @param {StackNode} stack - The stack node to add. + */ + setActiveStack(stack: StackNode): void; + /** + * Removes the active stack from the internal stack. + * + * @param {StackNode} stack - The stack node to remove. + */ + removeActiveStack(stack: StackNode): void; + /** + * Returns the active stack. + * + * @return {StackNode} The active stack. + */ + getActiveStack(): StackNode; + /** + * Returns the base stack. + * + * @return {StackNode} The base stack. + */ + getBaseStack(): StackNode; + /** + * Adds a stack node to the internal stack. + * + * @return {StackNode} The added stack node. + */ + addStack(): StackNode; + /** + * Removes the last stack node from the internal stack. + * + * @return {StackNode} The removed stack node. + */ + removeStack(): StackNode; + /** + * The builder maintains (cached) data for each node during the building process. This method + * can be used to get these data for a specific shader stage and cache. + * + * @param {Node} node - The node to get the data for. + * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. + * @param {?NodeCache} cache - An optional cache. + * @return {Object} The node data. + */ + getDataFromNode(node: Node, shaderStage?: ("vertex" | "fragment" | "compute" | "any"), cache?: NodeCache | null): Object; + /** + * Returns the properties for the given node and shader stage. + * + * Properties are typically used within a build stage to reference a node's + * child node or nodes manually assigned to the properties in a separate build stage. + * A typical usage pattern for defining nodes manually would be assigning dependency nodes + * to the current node's properties in the setup stage and building those properties in the generate stage. + * + * @param {Node} node - The node to get the properties for. + * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage='any'] - The shader stage. + * @return {Object} The node properties. + */ + getNodeProperties(node: Node, shaderStage?: ("vertex" | "fragment" | "compute" | "any")): Object; + /** + * Returns an instance of {@link NodeAttribute} for the given buffer attribute node. + * + * @param {BufferAttributeNode} node - The buffer attribute node. + * @param {string} type - The node type. + * @param {?string} [name=null] - The name of the buffer attribute. + * @return {NodeAttribute} The node attribute. + */ + getBufferAttributeFromNode(node: BufferAttributeNode, type: string, name?: string | null): NodeAttribute; + /** + * Returns an instance of {@link StructType} for the given struct name and shader stage + * or null if not found. + * + * @param {string} name - The name of the struct. + * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. + * @return {?StructType} The struct type or null if not found. + */ + getStructTypeNode(name: string, shaderStage?: ("vertex" | "fragment" | "compute" | "any")): StructType | null; + /** + * Returns an instance of {@link StructType} for the given output struct node. + * + * @param {OutputStructNode} node - The output struct node. + * @param {Array} membersLayout - The output struct types. + * @param {?string} [name=null] - The name of the struct. + * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. + * @return {StructType} The struct type attribute. + */ + getStructTypeFromNode(node: OutputStructNode, membersLayout: Array, name?: string | null, shaderStage?: ("vertex" | "fragment" | "compute" | "any")): StructType; + /** + * Returns an instance of {@link StructType} for the given output struct node. + * + * @param {OutputStructNode} node - The output struct node. + * @param {Array} membersLayout - The output struct types. + * @return {StructType} The struct type attribute. + */ + getOutputStructTypeFromNode(node: OutputStructNode, membersLayout: Array): StructType; + /** + * Returns an instance of {@link NodeUniform} for the given uniform node. + * + * @param {UniformNode} node - The uniform node. + * @param {string} type - The uniform type. + * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. + * @param {?string} name - The name of the uniform. + * @return {NodeUniform} The node uniform. + */ + getUniformFromNode(node: UniformNode, type: string, shaderStage?: ("vertex" | "fragment" | "compute" | "any"), name?: string | null): NodeUniform; + /** + * Returns an instance of {@link NodeVar} for the given variable node. + * + * @param {VarNode} node - The variable node. + * @param {?string} name - The variable's name. + * @param {string} [type=node.getNodeType( this )] - The variable's type. + * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. + * @param {boolean} [readOnly=false] - Whether the variable is read-only or not. + * + * @return {NodeVar} The node variable. + */ + getVarFromNode(node: VarNode, name?: string | null, type?: string, shaderStage?: ("vertex" | "fragment" | "compute" | "any"), readOnly?: boolean): NodeVar; + /** + * Returns whether a Node or its flow is deterministic, useful for use in `const`. + * + * @param {Node} node - The varying node. + * @return {boolean} Returns true if deterministic. + */ + isDeterministic(node: Node): boolean; + /** + * Returns an instance of {@link NodeVarying} for the given varying node. + * + * @param {(VaryingNode|PropertyNode)} node - The varying node. + * @param {?string} name - The varying's name. + * @param {string} [type=node.getNodeType( this )] - The varying's type. + * @param {?string} interpolationType - The interpolation type of the varying. + * @param {?string} interpolationSampling - The interpolation sampling type of the varying. + * @return {NodeVar} The node varying. + */ + getVaryingFromNode(node: (VaryingNode | PropertyNode), name?: string | null, type?: string, interpolationType?: string | null, interpolationSampling?: string | null): NodeVar; + /** + * Registers a node declaration in the current shader stage. + * + * @param {Object} node - The node to be registered. + */ + registerDeclaration(node: Object): void; + /** + * Returns an instance of {@link NodeCode} for the given code node. + * + * @param {CodeNode} node - The code node. + * @param {string} type - The node type. + * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. + * @return {NodeCode} The node code. + */ + getCodeFromNode(node: CodeNode, type: string, shaderStage?: ("vertex" | "fragment" | "compute" | "any")): NodeCode; + /** + * Adds a code flow based on the code-block hierarchy. + + * This is used so that code-blocks like If,Else create their variables locally if the Node + * is only used inside one of these conditionals in the current shader stage. + * + * @param {Node} node - The node to add. + * @param {Node} nodeBlock - Node-based code-block. Usually 'ConditionalNode'. + */ + addFlowCodeHierarchy(node: Node, nodeBlock: Node): void; + /** + * Add a inline-code to the current flow code-block. + * + * @param {Node} node - The node to add. + * @param {string} code - The code to add. + * @param {Node} nodeBlock - Current ConditionalNode + */ + addLineFlowCodeBlock(node: Node, code: string, nodeBlock: Node): void; + /** + * Add a inline-code to the current flow. + * + * @param {string} code - The code to add. + * @param {?Node} [node= null] - Optional Node, can help the system understand if the Node is part of a code-block. + * @return {NodeBuilder} A reference to this node builder. + */ + addLineFlowCode(code: string, node?: Node | null): NodeBuilder; + /** + * Adds a code to the current code flow. + * + * @param {string} code - Shader code. + * @return {NodeBuilder} A reference to this node builder. + */ + addFlowCode(code: string): NodeBuilder; + /** + * Add tab in the code that will be generated so that other snippets respect the current tabulation. + * Typically used in codes with If,Else. + * + * @return {NodeBuilder} A reference to this node builder. + */ + addFlowTab(): NodeBuilder; + /** + * Removes a tab. + * + * @return {NodeBuilder} A reference to this node builder. + */ + removeFlowTab(): NodeBuilder; + /** + * Gets the current flow data based on a Node. + * + * @param {Node} node - Node that the flow was started. + * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. + * @return {Object} The flow data. + */ + getFlowData(node: Node): Object; + /** + * Executes the node flow based on a root node to generate the final shader code. + * + * @param {Node} node - The node to execute. + * @return {Object} The code flow. + */ + flowNode(node: Node): Object; + /** + * Includes a node in the current function node. + * + * @param {Node} node - The node to include. + * @returns {void} + */ + addInclude(node: Node): void; + /** + * Returns the native shader operator name for a given generic name. + * It is a similar type of method like {@link NodeBuilder#getMethod}. + * + * @param {ShaderNodeInternal} shaderNode - The shader node to build the function node with. + * @return {FunctionNode} The build function node. + */ + buildFunctionNode(shaderNode: ShaderNodeInternal): FunctionNode; + /** + * Generates a code flow based on a TSL function: Fn(). + * + * @param {ShaderNodeInternal} shaderNode - A function code will be generated based on the input. + * @return {Object} + */ + flowShaderNode(shaderNode: ShaderNodeInternal): Object; + /** + * Executes the node in a specific build stage. + * + * This function can be used to arbitrarily execute the specified build stage + * outside of the standard build process. For instance, if a node's type depends + * on properties created by the 'setup' stage, then flowBuildStage(node, 'setup') + * can be used to execute the setup build stage and access its generated nodes + * before the standard build process begins. + * + * @param {Node} node - The node to execute. + * @param {string} buildStage - The build stage to execute the node in. + * @param {?(Node|string)} [output=null] - Expected output type. For example 'vec3'. + * @return {?(Node|string)} The result of the node build. + */ + flowBuildStage(node: Node, buildStage: string, output?: (Node | string) | null): (Node | string) | null; + /** + * Runs the node flow through all the steps of creation, 'setup', 'analyze', 'generate'. + * + * @param {Node} node - The node to execute. + * @param {?string} output - Expected output type. For example 'vec3'. + * @return {Object} + */ + flowStagesNode(node: Node, output?: string | null): Object; + /** + * Returns the native shader operator name for a given generic name. + * It is a similar type of method like {@link NodeBuilder#getMethod}. + * + * @abstract + * @param {string} op - The operator name to resolve. + * @return {?string} The resolved operator name. + */ + getFunctionOperator(): string | null; + /** + * Builds the given shader node. + * + * @abstract + * @param {ShaderNodeInternal} shaderNode - The shader node. + * @return {string} The function code. + */ + buildFunctionCode(): string; + /** + * Generates a code flow based on a child Node. + * + * @param {Node} node - The node to execute. + * @param {?string} output - Expected output type. For example 'vec3'. + * @return {Object} The code flow. + */ + flowChildNode(node: Node, output?: string | null): Object; + /** + * Executes a flow of code in a different stage. + * + * Some nodes like `varying()` have the ability to compute code in vertex-stage and + * return the value in fragment-stage even if it is being executed in an input fragment. + * + * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. + * @param {Node} node - The node to execute. + * @param {?string} output - Expected output type. For example 'vec3'. + * @param {?string} propertyName - The property name to assign the result. + * @return {?(Object|Node)} The code flow or node.build() result. + */ + flowNodeFromShaderStage(shaderStage: ("vertex" | "fragment" | "compute" | "any"), node: Node, output?: string | null, propertyName?: string | null): (Object | Node) | null; + /** + * Returns an array holding all node attributes of this node builder. + * + * @return {Array} The node attributes of this builder. + */ + getAttributesArray(): Array; + /** + * Returns the attribute definitions as a shader string for the given shader stage. + * + * @abstract + * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. + * @return {string} The attribute code section. + */ + getAttributes(): string; + /** + * Returns the varying definitions as a shader string for the given shader stage. + * + * @abstract + * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. + * @return {string} The varying code section. + */ + getVaryings(): string; + /** + * Returns a single variable definition as a shader string for the given variable type and name. + * + * @param {string} type - The variable's type. + * @param {string} name - The variable's name. + * @param {?number} [count=null] - The array length. + * @return {string} The shader string. + */ + getVar(type: string, name: string, count?: number | null): string; + /** + * Returns the variable definitions as a shader string for the given shader stage. + * + * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. + * @param {boolean} [global=false] - Whether the variables are global. + * @return {string} The variable code section. + */ + getVars(shaderStage: ("vertex" | "fragment" | "compute" | "any"), global?: boolean): string; + /** + * Returns the uniform definitions as a shader string for the given shader stage. + * + * @abstract + * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. + * @return {string} The uniform code section. + */ + getUniforms(): string; + /** + * Returns the native code definitions as a shader string for the given shader stage. + * + * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. + * @return {string} The native code section. + */ + getCodes(shaderStage: ("vertex" | "fragment" | "compute" | "any")): string; + /** + * Returns the hash of this node builder. + * + * @return {string} The hash. + */ + getHash(): string; + /** + * Sets the current shader stage. + * + * @param {?('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage to set. + */ + setShaderStage(shaderStage: ("vertex" | "fragment" | "compute" | "any") | null): void; + /** + * Returns the current shader stage. + * + * @return {?('vertex'|'fragment'|'compute'|'any')} The current shader stage. + */ + getShaderStage(): ("vertex" | "fragment" | "compute" | "any") | null; + /** + * Sets the current build stage. + * + * @param {?('setup'|'analyze'|'generate')} buildStage - The build stage to set. + */ + setBuildStage(buildStage: ("setup" | "analyze" | "generate") | null): void; + /** + * Returns the current build stage. + * + * @return {?('setup'|'analyze'|'generate')} The current build stage. + */ + getBuildStage(): ("setup" | "analyze" | "generate") | null; + /** + * Controls the code build of the shader stages. + * + * @abstract + */ + buildCode(): void; + /** + * Returns the current sub-build layer. + * + * @return {SubBuildNode} The current sub-build layers. + */ + get subBuild(): SubBuildNode; + /** + * Adds a sub-build layer to the node builder. + * + * @param {SubBuildNode} subBuild - The sub-build layer to add. + */ + addSubBuild(subBuild: SubBuildNode): void; + /** + * Removes the last sub-build layer from the node builder. + * + * @return {SubBuildNode} The removed sub-build layer. + */ + removeSubBuild(): SubBuildNode; + /** + * Returns the closest sub-build layer for the given data. + * + * @param {Node|Set|Array} data - The data to get the closest sub-build layer from. + * @return {?string} The closest sub-build name or null if none found. + */ + getClosestSubBuild(data: Node | Set | Array): string | null; + /** + * Returns the output node of a sub-build layer. + * + * @param {Node} node - The node to get the output from. + * @return {string} The output node name. + */ + getSubBuildOutput(node: Node): string; + /** + * Returns the sub-build property name for the given property and node. + * + * @param {string} [property=''] - The property name. + * @param {?Node} [node=null] - The node to get the sub-build from. + * @return {string} The sub-build property name. + */ + getSubBuildProperty(property?: string, node?: Node | null): string; + /** + * Prebuild the node builder. + */ + prebuild(): void; + /** + * Central build method which controls the build for the given object. + * + * @return {NodeBuilder} A reference to this node builder. + */ + build(): NodeBuilder; + /** + * Async version of build() that yields to main thread between shader stages. + * Use this in compileAsync() to prevent blocking the main thread. + * + * @return {Promise} A promise that resolves to this node builder. + */ + buildAsync(): Promise; + /** + * Returns shared data object for the given node. + * + * @param {Node} node - The node to get shared data from. + * @return {Object} The shared data. + */ + getSharedDataFromNode(node: Node): Object; + /** + * Returns a uniform representation which is later used for UBO generation and rendering. + * + * @param {NodeUniform} uniformNode - The uniform node. + * @param {string} type - The requested type. + * @return {Uniform} The uniform. + */ + getNodeUniform(uniformNode: NodeUniform, type: string): Uniform; + /** + * Formats the given shader snippet from a given type into another one. E.g. + * this method might be used to convert a simple float string `"1.0"` into a + * `vec3` representation: `"vec3( 1.0 )"`. + * + * @param {string} snippet - The shader snippet. + * @param {string} fromType - The source type. + * @param {string} toType - The target type. + * @return {string} The updated shader string. + */ + format(snippet: string, fromType: string, toType: string): string; + /** + * Returns a signature with the engine's current revision. + * + * @return {string} The signature. + */ + getSignature(): string; + /** + * Returns `true` if data from the previous frame are required. Relevant + * when computing motion vectors with {@link VelocityNode}. + * + * @return {boolean} Whether data from the previous frame are required or not. + */ + needsPreviousData(): boolean; +} +/** + * This utility class is used in {@link NodeBuilder} as an internal + * cache data structure for node data. + */ +export class NodeCache { + /** + * Constructs a new node cache. + * + * @param {?NodeCache} parent - A reference to a parent cache. + */ + constructor(parent?: NodeCache | null); + /** + * The id of the cache. + * + * @type {number} + * @readonly + */ + readonly id: number; + /** + * A weak map for managing node data. + * + * @type {WeakMap} + */ + nodesData: WeakMap; + /** + * Reference to a parent node cache. + * + * @type {?NodeCache} + * @default null + */ + parent: NodeCache | null; + /** + * Returns the data for the given node. + * + * @param {Node} node - The node. + * @return {?Object} The data for the node. + */ + getData(node: Node): Object | null; + /** + * Sets the data for a given node. + * + * @param {Node} node - The node. + * @param {Object} data - The data that should be cached. + */ + setData(node: Node, data: Object): void; +} +/** + * {@link NodeBuilder} is going to create instances of this class during the build process + * of nodes. They represent user-defined, native shader code portions that are going to be + * injected by the builder. A dictionary of node codes is maintained in {@link NodeBuilder#codes} + * for this purpose. + */ +export class NodeCode { + /** + * Constructs a new code node. + * + * @param {string} name - The name of the code. + * @param {string} type - The node type. + * @param {string} [code=''] - The native shader code. + */ + constructor(name: string, type: string, code?: string); + /** + * The name of the code. + * + * @type {string} + */ + name: string; + /** + * The node type. + * + * @type {string} + */ + type: string; + /** + * The native shader code. + * + * @type {string} + * @default '' + */ + code: string; +} +/** + * Custom error class for node-related errors, including stack trace information. + */ +export class NodeError extends Error { + constructor(message: any, stackTrace?: null); + /** + * The stack trace associated with the error. + * + * @type {?StackTrace} + */ + stackTrace: StackTrace | null; +} +/** + * Management class for updating nodes. The module tracks metrics like + * the elapsed time, delta time, the render and frame ID to correctly + * call the node update methods {@link Node#updateBefore}, {@link Node#update} + * and {@link Node#updateAfter} depending on the node's configuration. + */ +export class NodeFrame { + /** + * The elapsed time in seconds. + * + * @type {number} + * @default 0 + */ + time: number; + /** + * The delta time in seconds. + * + * @type {number} + * @default 0 + */ + deltaTime: number; + /** + * The frame ID. + * + * @type {number} + * @default 0 + */ + frameId: number; + /** + * The render ID. + * + * @type {number} + * @default 0 + */ + renderId: number; + /** + * Used to control the {@link Node#update} call. + * + * @type {WeakMap} + */ + updateMap: WeakMap; + /** + * Used to control the {@link Node#updateBefore} call. + * + * @type {WeakMap} + */ + updateBeforeMap: WeakMap; + /** + * Used to control the {@link Node#updateAfter} call. + * + * @type {WeakMap} + */ + updateAfterMap: WeakMap; + /** + * A reference to the current renderer. + * + * @type {?Renderer} + * @default null + */ + renderer: Renderer | null; + /** + * A reference to the current material. + * + * @type {?Material} + * @default null + */ + material: Material | null; + /** + * A reference to the current camera. + * + * @type {?Camera} + * @default null + */ + camera: Camera | null; + /** + * A reference to the current 3D object. + * + * @type {?Object3D} + * @default null + */ + object: Object3D | null; + /** + * A reference to the current scene. + * + * @type {?Scene} + * @default null + */ + scene: Scene | null; + /** + * Returns a dictionary for a given node and update map which + * is used to correctly call node update methods per frame or render. + * + * @private + * @param {WeakMap} referenceMap - The reference weak map. + * @param {Node} nodeRef - The reference to the current node. + * @return {Object>} The dictionary. + */ + private _getMaps; + /** + * This method executes the {@link Node#updateBefore} for the given node. + * It makes sure {@link Node#updateBeforeType} is honored meaning the update + * is only executed once per frame, render or object depending on the update + * type. + * + * @param {Node} node - The node that should be updated. + */ + updateBeforeNode(node: Node): void; + /** + * This method executes the {@link Node#updateAfter} for the given node. + * It makes sure {@link Node#updateAfterType} is honored meaning the update + * is only executed once per frame, render or object depending on the update + * type. + * + * @param {Node} node - The node that should be updated. + */ + updateAfterNode(node: Node): void; + /** + * This method executes the {@link Node#update} for the given node. + * It makes sure {@link Node#updateType} is honored meaning the update + * is only executed once per frame, render or object depending on the update + * type. + * + * @param {Node} node - The node that should be updated. + */ + updateNode(node: Node): void; + /** + * Updates the internal state of the node frame. This method is + * called by the renderer in its internal animation loop. + */ + update(): void; + lastTime: number | undefined; +} +/** + * Describes the input of a {@link NodeFunction}. + */ +export class NodeFunctionInput { + /** + * Constructs a new node function input. + * + * @param {string} type - The input type. + * @param {string} name - The input name. + * @param {?number} [count=null] - If the input is an Array, count will be the length. + * @param {('in'|'out'|'inout')} [qualifier=''] - The parameter qualifier (only relevant for GLSL). + * @param {boolean} [isConst=false] - Whether the input uses a const qualifier or not (only relevant for GLSL). + */ + constructor(type: string, name: string, count?: number | null, qualifier?: ("in" | "out" | "inout"), isConst?: boolean); + /** + * The input type. + * + * @type {string} + */ + type: string; + /** + * The input name. + * + * @type {string} + */ + name: string; + /** + * If the input is an Array, count will be the length. + * + * @type {?number} + * @default null + */ + count: number | null; + /** + *The parameter qualifier (only relevant for GLSL). + * + * @type {('in'|'out'|'inout')} + * @default '' + */ + qualifier: ("in" | "out" | "inout"); + /** + * Whether the input uses a const qualifier or not (only relevant for GLSL). + * + * @type {boolean} + * @default false + */ + isConst: boolean; +} +export namespace NodeFunctionInput { + let isNodeFunctionInput: boolean; +} +/** + * A loader for loading node objects in the three.js JSON Object/Scene format. + * + * @augments Loader + */ +export class NodeLoader extends Loader { + /** + * Constructs a new node loader. + * + * @param {LoadingManager} [manager] - A reference to a loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Represents a dictionary of textures. + * + * @type {Object} + */ + textures: { + [x: string]: Texture; + }; + /** + * Represents a dictionary of node types. + * + * @type {Object} + */ + nodes: { + [x: string]: Node.constructor; + }; + /** + * Loads the node definitions from the given URL. + * + * @param {string} url - The path/URL of the file to be loaded. + * @param {Function} onLoad - Will be called when load completes. + * @param {Function} onProgress - Will be called while load progresses. + * @param {Function} onError - Will be called when errors are thrown during the loading process. + */ + load(url: string, onLoad: Function, onProgress: Function, onError: Function): void; + /** + * Parse the node dependencies for the loaded node. + * + * @param {Array} [json] - The JSON definition + * @return {Object} A dictionary with node dependencies. + */ + parseNodes(json?: Array): { + [x: string]: Node; + }; + /** + * Parses the node from the given JSON. + * + * @param {Object} json - The JSON definition + * @param {string} json.type - The node type. + * @param {string} json.uuid - The node UUID. + * @param {Array} [json.nodes] - The node dependencies. + * @param {Object} [json.meta] - The meta data. + * @return {Node} The parsed node. + */ + parse(json: { + type: string; + uuid: string; + nodes?: Object[] | undefined; + meta?: Object | undefined; + }): Node; + /** + * Defines the dictionary of textures. + * + * @param {Object} value - The texture library defines as ``. + * @return {NodeLoader} A reference to this loader. + */ + setTextures(value: { + [x: string]: Texture; + }): NodeLoader; + /** + * Defines the dictionary of node types. + * + * @param {Object} value - The node library defined as ``. + * @return {NodeLoader} A reference to this loader. + */ + setNodes(value: { + [x: string]: Node.constructor; + }): NodeLoader; + /** + * Creates a node object from the given type. + * + * @param {string} type - The node type. + * @return {Node} The created node instance. + */ + createNodeFromType(type: string): Node; +} +/** + * Base class for all node materials. + * + * @augments Material + */ +export class NodeMaterial extends Material { + static get type(): string; + set type(_value: string); + /** + * Represents the type of the node material. + * + * @type {string} + */ + get type(): string; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isNodeMaterial: boolean; + /** + * Whether this material is affected by fog or not. + * + * @type {boolean} + * @default true + */ + fog: boolean; + /** + * Whether this material is affected by lights or not. + * + * @type {boolean} + * @default false + */ + lights: boolean; + /** + * Whether this material uses hardware clipping or not. + * This property is managed by the engine and should not be + * modified by apps. + * + * @type {boolean} + * @default false + */ + hardwareClipping: boolean; + /** + * Node materials which set their `lights` property to `true` + * are affected by all lights of the scene. Sometimes selective + * lighting is wanted which means only _some_ lights in the scene + * affect a material. This can be achieved by creating an instance + * of {@link LightsNode} with a list of selective + * lights and assign the node to this property. + * + * ```js + * const customLightsNode = lights( [ light1, light2 ] ); + * material.lightsNode = customLightsNode; + * ``` + * + * @type {?LightsNode} + * @default null + */ + lightsNode: LightsNode | null; + /** + * The environment of node materials can be defined by an environment + * map assigned to the `envMap` property or by `Scene.environment` + * if the node material is a PBR material. This node property allows to overwrite + * the default behavior and define the environment with a custom node. + * + * ```js + * material.envNode = pmremTexture( renderTarget.texture ); + * ``` + * + * @type {?Node} + * @default null + */ + envNode: Node | null; + /** + * The lighting of node materials might be influenced by ambient occlusion. + * The default AO is inferred from an ambient occlusion map assigned to `aoMap` + * and the respective `aoMapIntensity`. This node property allows to overwrite + * the default and define the ambient occlusion with a custom node instead. + * + * If you don't want to overwrite the diffuse color but modify the existing + * values instead, use {@link materialAO}. + * + * @type {?Node} + * @default null + */ + aoNode: Node | null; + /** + * The diffuse color of node materials is by default inferred from the + * `color` and `map` properties. This node property allows to overwrite the default + * and define the diffuse color with a node instead. + * + * ```js + * material.colorNode = color( 0xff0000 ); // define red color + * ``` + * + * If you don't want to overwrite the diffuse color but modify the existing + * values instead, use {@link materialColor}. + * + * ```js + * material.colorNode = materialColor.mul( color( 0xff0000 ) ); // give diffuse colors a red tint + * ``` + * + * @type {?Node} + * @default null + */ + colorNode: Node | null; + /** + * The normals of node materials are by default inferred from the `normalMap`/`normalScale` + * or `bumpMap`/`bumpScale` properties. This node property allows to overwrite the default + * and define the normals with a node instead. + * + * If you don't want to overwrite the normals but modify the existing values instead, + * use {@link materialNormal}. + * + * @type {?Node} + * @default null + */ + normalNode: Node | null; + /** + * The opacity of node materials is by default inferred from the `opacity` + * and `alphaMap` properties. This node property allows to overwrite the default + * and define the opacity with a node instead. + * + * If you don't want to overwrite the opacity but modify the existing + * value instead, use {@link materialOpacity}. + * + * @type {?Node} + * @default null + */ + opacityNode: Node | null; + /** + * This node can be used to implement a variety of filter-like effects. The idea is + * to store the current rendering into a texture e.g. via `viewportSharedTexture()`, use it + * to create an arbitrary effect and then assign the node composition to this property. + * Everything behind the object using this material will now be affected by a filter. + * + * ```js + * const material = new NodeMaterial() + * material.transparent = true; + * + * // everything behind the object will be monochromatic + * material.backdropNode = saturation( viewportSharedTexture().rgb, 0 ); + * ``` + * + * Backdrop computations are part of the lighting so only lit materials can use this property. + * + * @type {?Node} + * @default null + */ + backdropNode: Node | null; + /** + * This node allows to modulate the influence of `backdropNode` to the outgoing light. + * + * @type {?Node} + * @default null + */ + backdropAlphaNode: Node | null; + /** + * The alpha test of node materials is by default inferred from the `alphaTest` + * property. This node property allows to overwrite the default and define the + * alpha test with a node instead. + * + * If you don't want to overwrite the alpha test but modify the existing + * value instead, use {@link materialAlphaTest}. + * + * @type {?Node} + * @default null + */ + alphaTestNode: Node | null; + /** + * Discards the fragment if the mask value is `false`. + * + * @type {?Node} + * @default null + */ + maskNode: Node | null; + /** + * This node can be used to implement a shadow mask for the material. + * + * @type {?Node} + * @default null + */ + maskShadowNode: Node | null; + /** + * The local vertex positions are computed based on multiple factors like the + * attribute data, morphing or skinning. This node property allows to overwrite + * the default and define local vertex positions with nodes instead. + * + * If you don't want to overwrite the vertex positions but modify the existing + * values instead, use {@link positionLocal}. + * + *```js + * material.positionNode = positionLocal.add( displace ); + * ``` + * + * @type {?Node} + * @default null + */ + positionNode: Node | null; + /** + * This node property is intended for logic which modifies geometry data once or per animation step. + * Apps usually place such logic randomly in initialization routines or in the animation loop. + * `geometryNode` is intended as a dedicated API so there is an intended spot where geometry modifications + * can be implemented. + * + * The idea is to assign a `Fn` definition that holds the geometry modification logic. A typical example + * would be a GPU based particle system that provides a node material for usage on app level. The particle + * simulation would be implemented as compute shaders and managed inside a `Fn` function. This function is + * eventually assigned to `geometryNode`. + * + * @type {?Function} + * @default null + */ + geometryNode: Function | null; + /** + * Allows to overwrite depth values in the fragment shader. + * + * @type {?Node} + * @default null + */ + depthNode: Node | null; + /** + * Allows to overwrite the position used for shadow map rendering which + * is by default {@link positionWorld}, the vertex position + * in world space. + * + * @type {?Node} + * @default null + */ + receivedShadowPositionNode: Node | null; + /** + * Allows to overwrite the geometry position used for shadow map projection which + * is by default {@link positionLocal}, the vertex position in local space. + * + * @type {?Node} + * @default null + */ + castShadowPositionNode: Node | null; + /** + * This node can be used to influence how an object using this node material + * receive shadows. + * + * ```js + * const totalShadows = float( 1 ).toVar(); + * material.receivedShadowNode = Fn( ( [ shadow ] ) => { + * totalShadows.mulAssign( shadow ); + * //return float( 1 ); // bypass received shadows + * return shadow.mix( color( 0xff0000 ), 1 ); // modify shadow color + * } ); + * + * @type {?(Function|FunctionNode)} + * @default null + */ + receivedShadowNode: (Function | FunctionNode) | null; + /** + * This node can be used to influence how an object using this node material + * casts shadows. To apply a color to shadows, you can simply do: + * + * ```js + * material.castShadowNode = vec4( 1, 0, 0, 1 ); + * ``` + * + * Which can be nice to fake colored shadows of semi-transparent objects. It + * is also common to use the property with `Fn` function so checks are performed + * per fragment. + * + * ```js + * materialCustomShadow.castShadowNode = Fn( () => { + * hash( vertexIndex ).greaterThan( 0.5 ).discard(); + * return materialColor; + * } )(); + * ``` + * + * @type {?Node} + * @default null + */ + castShadowNode: Node | null; + /** + * This node can be used to define the final output of the material. + * + * TODO: Explain the differences to `fragmentNode`. + * + * @type {?Node} + * @default null + */ + outputNode: Node | null; + /** + * MRT configuration is done on renderer or pass level. This node allows to + * overwrite what values are written into MRT targets on material level. This + * can be useful for implementing selective FX features that should only affect + * specific objects. + * + * @type {?MRTNode} + * @default null + */ + mrtNode: MRTNode | null; + /** + * This node property can be used if you need complete freedom in implementing + * the fragment shader. Assigning a node will replace the built-in material + * logic used in the fragment stage. + * + * @type {?Node} + * @default null + */ + fragmentNode: Node | null; + /** + * This node property can be used if you need complete freedom in implementing + * the vertex shader. Assigning a node will replace the built-in material logic + * used in the vertex stage. + * + * @type {?Node} + * @default null + */ + vertexNode: Node | null; + /** + * This node can be used as a global context management component for this material. + * + * @type {?ContextNode} + * @default null + */ + contextNode: ContextNode | null; + /** + * Returns an array of child nodes for this material. + * + * @private + * @returns {Array<{property: string, childNode: Node}>} + */ + private _getNodeChildren; + /** + * Builds this material with the given node builder. + * + * @param {NodeBuilder} builder - The current node builder. + */ + build(builder: NodeBuilder): void; + /** + * Setups a node material observer with the given builder. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {NodeMaterialObserver} The node material observer. + */ + setupObserver(builder: NodeBuilder): NodeMaterialObserver; + /** + * Setups the vertex and fragment stage of this node material. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setup(builder: NodeBuilder): void; + /** + * Setups the clipping node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {ClippingNode} The clipping node. + */ + setupClipping(builder: NodeBuilder): ClippingNode; + /** + * Setups the hardware clipping if available on the current device. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setupHardwareClipping(builder: NodeBuilder): void; + /** + * Setups the depth of this material. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setupDepth(builder: NodeBuilder): void; + /** + * Setups the position node in view space. This method exists + * so derived node materials can modify the implementation e.g. sprite materials. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The position in view space. + */ + setupPositionView(): Node; + /** + * Setups the position in clip space. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The position in view space. + */ + setupModelViewProjection(): Node; + /** + * Setups the logic for the vertex stage. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The position in clip space. + */ + setupVertex(builder: NodeBuilder): Node; + /** + * Setups the computation of the position in local space. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The position in local space. + */ + setupPosition(builder: NodeBuilder): Node; + /** + * Setups the computation of the material's diffuse color. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {BufferGeometry} geometry - The geometry. + */ + setupDiffuseColor(builder: NodeBuilder): void; + /** + * Abstract interface method that can be implemented by derived materials + * to setup material-specific node variables. + * + * @abstract + * @param {NodeBuilder} builder - The current node builder. + */ + setupVariants(): void; + /** + * Setups the outgoing light node variable + * + * @return {Node} The outgoing light node. + */ + setupOutgoingLight(): Node; + /** + * Setups the normal node from the material. + * + * @return {Node} The normal node. + */ + setupNormal(): Node; + /** + * Setups the environment node from the material. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The environment node. + */ + setupEnvironment(): Node; + /** + * Setups the light map node from the material. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The light map node. + */ + setupLightMap(builder: NodeBuilder): Node; + /** + * Setups the lights node based on the scene, environment and material. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {LightsNode} The lights node. + */ + setupLights(builder: NodeBuilder): LightsNode; + /** + * This method should be implemented by most derived materials + * since it defines the material's lighting model. + * + * @abstract + * @param {NodeBuilder} builder - The current node builder. + * @return {LightingModel} The lighting model. + */ + setupLightingModel(): LightingModel; + /** + * Setups the outgoing light node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The outgoing light node. + */ + setupLighting(builder: NodeBuilder): Node; + /** + * Setup the fog. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {Node} outputNode - The existing output node. + * @return {Node} The output node. + */ + setupFog(builder: NodeBuilder, outputNode: Node): Node; + /** + * Setups premultiplied alpha. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {Node} outputNode - The existing output node. + * @return {Node} The output node. + */ + setupPremultipliedAlpha(builder: NodeBuilder, outputNode: Node): Node; + /** + * Setups the output node. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {Node} outputNode - The existing output node. + * @return {Node} The output node. + */ + setupOutput(builder: NodeBuilder, outputNode: Node): Node; + /** + * Most classic material types have a node pendant e.g. for `MeshBasicMaterial` + * there is `MeshBasicNodeMaterial`. This utility method is intended for + * defining all material properties of the classic type in the node type. + * + * @param {Material} material - The material to copy properties with their values to this node material. + */ + setDefaultValues(material: Material): void; + /** + * Copies the properties of the given node material to this instance. + * + * @param {NodeMaterial} source - The material to copy. + * @return {NodeMaterial} A reference to this node material. + */ + copy(source: NodeMaterial): NodeMaterial; +} +/** + * A special type of material loader for loading node materials. + * + * @augments MaterialLoader + */ +export class NodeMaterialLoader extends MaterialLoader { + /** + * Constructs a new node material loader. + * + * @param {LoadingManager} [manager] - A reference to a loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Represents a dictionary of node types. + * + * @type {Object} + */ + nodes: { + [x: string]: Node.constructor; + }; + /** + * Represents a dictionary of node material types. + * + * @type {Object} + */ + nodeMaterials: { + [x: string]: NodeMaterial.constructor; + }; + /** + * Parses the node material from the given JSON. + * + * @param {Object} json - The JSON definition + * @return {NodeMaterial}. The parsed material. + */ + parse(json: Object): NodeMaterial; + /** + * Defines the dictionary of node types. + * + * @param {Object} value - The node library defined as ``. + * @return {NodeLoader} A reference to this loader. + */ + setNodes(value: { + [x: string]: Node.constructor; + }): NodeLoader; + /** + * Defines the dictionary of node material types. + * + * @param {Object} value - The node material library defined as ``. + * @return {NodeLoader} A reference to this loader. + */ + setNodeMaterials(value: { + [x: string]: NodeMaterial.constructor; + }): NodeLoader; + /** + * Creates a node material from the given type. + * + * @param {string} type - The node material type. + * @return {Node} The created node material instance. + */ + createMaterialFromType(type: string): Node; +} +/** + * This class is used by {@link WebGPURenderer} as management component. + * It's primary purpose is to determine whether render objects require a + * refresh right before they are going to be rendered or not. + */ +export class NodeMaterialObserver { + /** + * Constructs a new node material observer. + * + * @param {NodeBuilder} builder - The node builder. + */ + constructor(builder: NodeBuilder); + /** + * A node material can be used by more than one render object so the + * monitor must maintain a list of render objects. + * + * @type {WeakMap} + */ + renderObjects: WeakMap; + /** + * Whether the material uses node objects or not. + * + * @type {boolean} + */ + hasNode: boolean; + /** + * Whether the node builder's 3D object is animated or not. + * + * @type {boolean} + */ + hasAnimation: boolean; + /** + * A list of all possible material uniforms + * + * @type {Array} + */ + refreshUniforms: Array; + /** + * Holds the current render ID from the node frame. + * + * @type {number} + * @default 0 + */ + renderId: number; + /** + * Returns `true` if the given render object is verified for the first time of this observer. + * + * @param {RenderObject} renderObject - The render object. + * @return {boolean} Whether the given render object is verified for the first time of this observer. + */ + firstInitialization(renderObject: RenderObject): boolean; + /** + * Returns `true` if the current rendering produces motion vectors. + * + * @param {Renderer} renderer - The renderer. + * @return {boolean} Whether the current rendering produces motion vectors or not. + */ + needsVelocity(renderer: Renderer): boolean; + /** + * Returns monitoring data for the given render object. + * + * @param {RenderObject} renderObject - The render object. + * @return {Object} The monitoring data. + */ + getRenderObjectData(renderObject: RenderObject): Object; + /** + * Returns an attribute data structure holding the attributes versions for + * monitoring. + * + * @param {Object} attributes - The geometry attributes. + * @return {Object} An object for monitoring the versions of attributes. + */ + getAttributesData(attributes: Object): Object; + /** + * Returns `true` if the node builder's material uses + * node properties. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {boolean} Whether the node builder's material uses node properties or not. + */ + containsNode(builder: NodeBuilder): boolean; + /** + * Returns a geometry data structure holding the geometry property values for + * monitoring. + * + * @param {BufferGeometry} geometry - The geometry. + * @return {Object} An object for monitoring geometry properties. + */ + getGeometryData(geometry: BufferGeometry): Object; + /** + * Returns a material data structure holding the material property values for + * monitoring. + * + * @param {Material} material - The material. + * @return {Object} An object for monitoring material properties. + */ + getMaterialData(material: Material): Object; + /** + * Returns `true` if the given render object has not changed its state. + * + * @param {RenderObject} renderObject - The render object. + * @param {Array} lightsData - The current material lights. + * @param {number} renderId - The current render ID. + * @return {boolean} Whether the given render object has changed its state or not. + */ + equals(renderObject: RenderObject, lightsData: Array, renderId: number): boolean; + /** + * Returns the lights data for the given material lights. + * + * @param {Array} materialLights - The material lights. + * @return {Array} The lights data for the given material lights. + */ + getLightsData(materialLights: Array, lights: any): Array; + /** + * Returns the lights for the given lights node and render ID. + * + * @param {LightsNode} lightsNode - The lights node. + * @param {number} renderId - The render ID. + * @return {Array} The lights for the given lights node and render ID. + */ + getLights(lightsNode: LightsNode, renderId: number): Array; + /** + * Checks if the given render object requires a refresh. + * + * @param {RenderObject} renderObject - The render object. + * @param {NodeFrame} nodeFrame - The current node frame. + * @return {boolean} Whether the given render object requires a refresh or not. + */ + needsRefresh(renderObject: RenderObject, nodeFrame: NodeFrame): boolean; +} +/** + * A special type of object loader for loading 3D objects using + * node materials. + * + * @augments ObjectLoader + */ +export class NodeObjectLoader extends ObjectLoader { + /** + * Constructs a new node object loader. + * + * @param {LoadingManager} [manager] - A reference to a loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Represents a dictionary of node types. + * + * @type {Object} + */ + nodes: { + [x: string]: Node.constructor; + }; + /** + * Represents a dictionary of node material types. + * + * @type {Object} + */ + nodeMaterials: { + [x: string]: NodeMaterial.constructor; + }; + /** + * A reference to hold the `nodes` JSON property. + * + * @private + * @type {?Object[]} + */ + private _nodesJSON; + /** + * Defines the dictionary of node types. + * + * @param {Object} value - The node library defined as ``. + * @return {NodeObjectLoader} A reference to this loader. + */ + setNodes(value: { + [x: string]: Node.constructor; + }): NodeObjectLoader; + /** + * Defines the dictionary of node material types. + * + * @param {Object} value - The node material library defined as ``. + * @return {NodeObjectLoader} A reference to this loader. + */ + setNodeMaterials(value: { + [x: string]: NodeMaterial.constructor; + }): NodeObjectLoader; + /** + * Parses the node objects from the given JSON. + * + * @param {Object} json - The JSON definition + * @param {Function} onLoad - The onLoad callback function. + * @return {Object3D}. The parsed 3D object. + */ + parse(json: Object, onLoad: Function): Object3D; + /** + * Parses the node objects from the given JSON and textures. + * + * @param {Object[]} json - The JSON definition + * @param {Object} textures - The texture library. + * @return {Object}. The parsed nodes. + */ + parseNodes(json: Object[], textures: { + [x: string]: Texture; + }): { + [x: string]: Node; + }; + /** + * Parses the node objects from the given JSON and textures. + * + * @param {Object} json - The JSON definition + * @param {Object} textures - The texture library. + * @return {Object}. The parsed materials. + */ + parseMaterials(json: Object, textures: { + [x: string]: Texture; + }): { + [x: string]: NodeMaterial; + }; +} +export namespace NodeShaderStage { + let VERTEX_1: string; + export { VERTEX_1 as VERTEX }; + export let FRAGMENT: string; +} +export namespace NodeType { + let BOOLEAN: string; + let INTEGER: string; + let FLOAT: string; + let VECTOR2: string; + let VECTOR3: string; + let VECTOR4: string; + let MATRIX2: string; + let MATRIX3: string; + let MATRIX4: string; +} +/** + * {@link NodeBuilder} is going to create instances of this class during the build process + * of nodes. They represent the final shader uniforms that are going to be generated + * by the builder. A dictionary of node uniforms is maintained in {@link NodeBuilder#uniforms} + * for this purpose. + */ +export class NodeUniform { + /** + * Constructs a new node uniform. + * + * @param {string} name - The name of the uniform. + * @param {string} type - The type of the uniform. + * @param {UniformNode} node - An reference to the node. + */ + constructor(name: string, type: string, node: UniformNode); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isNodeUniform: boolean; + /** + * The name of the uniform. + * + * @type {string} + */ + name: string; + /** + * The type of the uniform. + * + * @type {string} + */ + type: string; + /** + * An reference to the node. + * + * @type {UniformNode} + */ + node: UniformNode; + set value(val: any); + /** + * The value of the uniform node. + * + * @type {any} + */ + get value(): any; + /** + * The id of the uniform node. + * + * @type {number} + */ + get id(): number; + /** + * The uniform node's group. + * + * @type {UniformGroupNode} + */ + get groupNode(): UniformGroupNode; +} +export namespace NodeUpdateType { + export let NONE: string; + let FRAME_1: string; + export { FRAME_1 as FRAME }; + export let RENDER: string; + let OBJECT_1: string; + export { OBJECT_1 as OBJECT }; +} +export var NodeUtils: Readonly<{ + __proto__: null; + arrayBufferToBase64: typeof arrayBufferToBase64; + base64ToArrayBuffer: typeof base64ToArrayBuffer; + getAlignmentFromType: typeof getAlignmentFromType; + getDataFromObject: typeof getDataFromObject; + getLengthFromType: typeof getLengthFromType; + getMemoryLengthFromType: typeof getMemoryLengthFromType; + getTypeFromLength: typeof getTypeFromLength; + getTypedArrayFromType: typeof getTypedArrayFromType; + getValueFromType: typeof getValueFromType; + getValueType: typeof getValueType; + hash: (...params: number[]) => number; + hashArray: (array: Array) => number; + hashString: (str: string) => number; +}>; +/** + * {@link NodeBuilder} is going to create instances of this class during the build process + * of nodes. They represent the final shader variables that are going to be generated + * by the builder. A dictionary of node variables is maintained in {@link NodeBuilder#vars} for + * this purpose. + */ +export class NodeVar { + /** + * Constructs a new node variable. + * + * @param {string} name - The name of the variable. + * @param {string} type - The type of the variable. + * @param {boolean} [readOnly=false] - The read-only flag. + * @param {?number} [count=null] - The size. + */ + constructor(name: string, type: string, readOnly?: boolean, count?: number | null); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isNodeVar: boolean; + /** + * The name of the variable. + * + * @type {string} + */ + name: string; + /** + * The type of the variable. + * + * @type {string} + */ + type: string; + /** + * The read-only flag. + * + * @type {boolean} + */ + readOnly: boolean; + /** + * The size. + * + * @type {?number} + */ + count: number | null; +} +/** + * {@link NodeBuilder} is going to create instances of this class during the build process + * of nodes. They represent the final shader varyings that are going to be generated + * by the builder. An array of node varyings is maintained in {@link NodeBuilder#varyings} for + * this purpose. + * + * @augments NodeVar + */ +export class NodeVarying extends NodeVar { + /** + * Constructs a new node varying. + * + * @param {string} name - The name of the varying. + * @param {string} type - The type of the varying. + * @param {?string} interpolationType - The interpolation type of the varying. + * @param {?string} interpolationSampling - The interpolation sampling type of the varying. + */ + constructor(name: string, type: string, interpolationType?: string | null, interpolationSampling?: string | null); + /** + * Whether this varying requires interpolation or not. This property can be used + * to check if the varying can be optimized for a variable. + * + * @type {boolean} + * @default false + */ + needsInterpolation: boolean; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isNodeVarying: boolean; + /** + * The interpolation type of the varying data. + * + * @type {?string} + * @default null + */ + interpolationType: string | null; + /** + * The interpolation sampling type of varying data. + * + * @type {?string} + * @default null + */ + interpolationSampling: string | null; +} +import { NormalBlending } from './three.core.js'; +import { NormalGAPacking } from './three.core.js'; +/** + * This class can be used for applying normals maps to materials. + * + * ```js + * material.normalNode = normalMap( texture( normalTex ) ); + * ``` + * + * @augments TempNode + */ +export class NormalMapNode extends TempNode { + /** + * Constructs a new normal map node. + * + * @param {Node} node - Represents the normal map data. + * @param {?Node} [scaleNode=null] - Controls the intensity of the effect. + */ + constructor(node: Node, scaleNode?: Node | null); + /** + * Represents the normal map data. + * + * @type {Node} + */ + node: Node; + /** + * Controls the intensity of the effect. + * + * @type {?Node} + * @default null + */ + scaleNode: Node | null; + /** + * The normal map type. + * + * @type {(TangentSpaceNormalMap|ObjectSpaceNormalMap)} + * @default TangentSpaceNormalMap + */ + normalMapType: (number | number); + /** + * Controls how to unpack the sampled normal map values. + * + * @type {string} + * @default NoNormalPacking + */ + unpackNormalMode: string; + setup(builder: any): any; +} +import { NormalRGPacking } from './three.core.js'; +import { NotEqualCompare } from './three.core.js'; +import { NotEqualDepth } from './three.core.js'; +import { NotEqualStencilFunc } from './three.core.js'; +import { Object3D } from './three.core.js'; +/** + * This node can be used to access transformation related metrics of 3D objects. + * Depending on the selected scope, a different metric is represented as a uniform + * in the shader. The following scopes are supported: + * + * - `POSITION`: The object's position in world space. + * - `VIEW_POSITION`: The object's position in view/camera space. + * - `DIRECTION`: The object's direction in world space. + * - `SCALE`: The object's scale in world space. + * - `WORLD_MATRIX`: The object's matrix in world space. + * + * @augments Node + */ +export class Object3DNode extends Node { + /** + * Constructs a new object 3D node. + * + * @param {('position'|'viewPosition'|'direction'|'scale'|'worldMatrix')} scope - The node represents a different type of transformation depending on the scope. + * @param {?Object3D} [object3d=null] - The 3D object. + */ + constructor(scope: ("position" | "viewPosition" | "direction" | "scale" | "worldMatrix"), object3d?: Object3D | null); + /** + * The node reports a different type of transformation depending on the scope. + * + * @type {('position'|'viewPosition'|'direction'|'scale'|'worldMatrix')} + */ + scope: ("position" | "viewPosition" | "direction" | "scale" | "worldMatrix"); + /** + * The 3D object. + * + * @type {?Object3D} + * @default null + */ + object3d: Object3D | null; + /** + * Holds the value of the node as a uniform. + * + * @type {UniformNode} + */ + uniformNode: UniformNode; + /** + * Overwritten since the node type is inferred from the scope. + * + * @return {('mat4'|'vec3'|'float')} The node type. + */ + generateNodeType(): ("mat4" | "vec3" | "float"); + /** + * Updates the uniform value depending on the scope. + * + * @param {NodeFrame} frame - The current node frame. + */ + update(frame: NodeFrame): void; + /** + * Generates the code snippet of the uniform node. The node type of the uniform + * node also depends on the selected scope. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The generated code snippet. + */ + generate(builder: NodeBuilder): string; + serialize(data: any): void; + deserialize(data: any): void; +} +export namespace Object3DNode { + let WORLD_MATRIX: string; + let POSITION: string; + let SCALE: string; + let VIEW_POSITION: string; + let DIRECTION: string; + let RADIUS: string; +} +import { ObjectLoader } from './three.core.js'; +import { ObjectSpaceNormalMap } from './three.core.js'; +import { OneFactor } from './three.core.js'; +import { OneMinusDstAlphaFactor } from './three.core.js'; +import { OneMinusDstColorFactor } from './three.core.js'; +import { OneMinusSrcAlphaFactor } from './three.core.js'; +import { OneMinusSrcColorFactor } from './three.core.js'; +/** + * This node represents basic mathematical and logical operations like addition, + * subtraction or comparisons (e.g. `equal()`). + * + * @augments TempNode + */ +export class OperatorNode extends TempNode { + /** + * Constructs a new operator node. + * + * @param {string} op - The operator. + * @param {Node} aNode - The first input. + * @param {Node} bNode - The second input. + * @param {...Node} params - Additional input parameters. + */ + constructor(op: string, aNode: Node, bNode: Node, ...params: Node[]); + /** + * The operator. + * + * @type {string} + */ + op: string; + /** + * The first input. + * + * @type {Node} + */ + aNode: Node; + /** + * The second input. + * + * @type {Node} + */ + bNode: Node; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isOperatorNode: boolean; + /** + * Returns the operator method name. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} output - The output type. + * @returns {string} The operator method name. + */ + getOperatorMethod(builder: NodeBuilder, output: string): string; + /** + * This method is overwritten since the node type is inferred from the operator + * and the input node types. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {?string} [output=null] - The output type. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder, output?: string | null): string; + generate(builder: any, output: any): any; + serialize(data: any): void; + deserialize(data: any): void; +} +import { OrthographicCamera } from './three.core.js'; +/** + * This node can be used to define multiple outputs in a shader programs. + * + * @augments Node + */ +export class OutputStructNode extends Node { + /** + * Constructs a new output struct node. The constructor can be invoked with an + * arbitrary number of nodes representing the members. + * + * @param {...Node} members - A parameter list of nodes. + */ + constructor(...members: Node[]); + /** + * An array of nodes which defines the output. + * + * @type {Array} + */ + members: Array; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isOutputStructNode: boolean; + generateNodeType(): string; + generate(builder: any): any; +} +import { PCFShadowMap } from './three.core.js'; +import { PCFSoftShadowMap } from './three.core.js'; +/** + * This class generates a Prefiltered, Mipmapped Radiance Environment Map + * (PMREM) from a cubeMap environment texture. This allows different levels of + * blur to be quickly accessed based on material roughness. It is packed into a + * special CubeUV format that allows us to perform custom interpolation so that + * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap + * chain, it only goes down to the LOD_MIN level (above), and then creates extra + * even more filtered 'mips' at the same LOD_MIN resolution, associated with + * higher roughness levels. In this way we maintain resolution to smoothly + * interpolate diffuse lighting while limiting sampling computation. + * + * The prefiltering uses GGX VNDF (Visible Normal Distribution Function) + * importance sampling based on "Sampling the GGX Distribution of Visible Normals" + * (Heitz, 2018) to generate environment maps that accurately match the GGX BRDF + * used in material rendering for physically-based image-based lighting. + */ +export class PMREMGenerator { + /** + * Constructs a new PMREM generator. + * + * @param {Renderer} renderer - The renderer. + */ + constructor(renderer: Renderer); + _renderer: Renderer; + _pingPongRenderTarget: RenderTarget | null; + _lodMax: number; + _cubeSize: number; + _sizeLods: any[]; + _sigmas: any[]; + _lodMeshes: any[]; + _blurMaterial: NodeMaterial | null; + _ggxMaterial: NodeMaterial | null; + _cubemapMaterial: NodeMaterial | null; + _equirectMaterial: NodeMaterial | null; + _backgroundBox: Mesh | null; + get _hasInitialized(): boolean; + /** + * Generates a PMREM from a supplied Scene, which can be faster than using an + * image if networking bandwidth is low. Optional sigma specifies a blur radius + * in radians to be applied to the scene before PMREM generation. Optional near + * and far planes ensure the scene is rendered in its entirety. + * + * @param {Scene} scene - The scene to be captured. + * @param {number} [sigma=0] - The blur radius in radians. + * @param {number} [near=0.1] - The near plane distance. + * @param {number} [far=100] - The far plane distance. + * @param {Object} [options={}] - The configuration options. + * @param {number} [options.size=256] - The texture size of the PMREM. + * @param {Vector3} [options.renderTarget=origin] - The position of the internal cube camera that renders the scene. + * @param {?RenderTarget} [options.renderTarget=null] - The render target to use. + * @return {RenderTarget} The resulting PMREM. + * @see {@link PMREMGenerator#fromScene} + */ + fromScene(scene: Scene, sigma?: number, near?: number, far?: number, options?: { + size?: number | undefined; + renderTarget?: Vector3 | undefined; + renderTarget?: Vector3 | undefined; + }): RenderTarget; + /** + * Generates a PMREM from a supplied Scene, which can be faster than using an + * image if networking bandwidth is low. Optional sigma specifies a blur radius + * in radians to be applied to the scene before PMREM generation. Optional near + * and far planes ensure the scene is rendered in its entirety (the cubeCamera + * is placed at the origin). + * + * @deprecated + * @param {Scene} scene - The scene to be captured. + * @param {number} [sigma=0] - The blur radius in radians. + * @param {number} [near=0.1] - The near plane distance. + * @param {number} [far=100] - The far plane distance. + * @param {Object} [options={}] - The configuration options. + * @param {number} [options.size=256] - The texture size of the PMREM. + * @param {Vector3} [options.position=origin] - The position of the internal cube camera that renders the scene. + * @param {?RenderTarget} [options.renderTarget=null] - The render target to use. + * @return {Promise} A Promise that resolve with the PMREM when the generation has been finished. + * @see {@link PMREMGenerator#fromScene} + */ + fromSceneAsync(scene: Scene, sigma?: number, near?: number, far?: number, options?: { + size?: number | undefined; + position?: Vector3 | undefined; + renderTarget?: RenderTarget | null | undefined; + }): Promise; + /** + * Generates a PMREM from an equirectangular texture, which can be either LDR + * or HDR. The ideal input image size is 1k (1024 x 512), as this matches best + * with the 256 x 256 cubemap output. The minimum supported input image size + * is 64 x 32. + * + * @param {Texture} equirectangular - The equirectangular texture to be converted. + * @param {?RenderTarget} [renderTarget=null] - The render target to use. + * @return {RenderTarget} The resulting PMREM. + * @see {@link PMREMGenerator#fromEquirectangularAsync} + */ + fromEquirectangular(equirectangular: Texture, renderTarget?: RenderTarget | null): RenderTarget; + /** + * Generates a PMREM from an equirectangular texture, which can be either LDR + * or HDR. The ideal input image size is 1k (1024 x 512), + * as this matches best with the 256 x 256 cubemap output. + * + * @deprecated + * @param {Texture} equirectangular - The equirectangular texture to be converted. + * @param {?RenderTarget} [renderTarget=null] - The render target to use. + * @return {Promise} The resulting PMREM. + * @see {@link PMREMGenerator#fromEquirectangular} + */ + fromEquirectangularAsync(equirectangular: Texture, renderTarget?: RenderTarget | null): Promise; + /** + * Generates a PMREM from an cubemap texture, which can be either LDR + * or HDR. The ideal input cube size is 256 x 256, as this matches best + * with the 256 x 256 cubemap output. The minimum supported input cube + * size is 16 x 16 per face. + * + * @param {Texture} cubemap - The cubemap texture to be converted. + * @param {?RenderTarget} [renderTarget=null] - The render target to use. + * @return {RenderTarget} The resulting PMREM. + * @see {@link PMREMGenerator#fromCubemapAsync} + */ + fromCubemap(cubemap: Texture, renderTarget?: RenderTarget | null): RenderTarget; + /** + * Generates a PMREM from an cubemap texture, which can be either LDR + * or HDR. The ideal input cube size is 256 x 256, + * with the 256 x 256 cubemap output. + * + * @deprecated + * @param {Texture} cubemap - The cubemap texture to be converted. + * @param {?RenderTarget} [renderTarget=null] - The render target to use. + * @return {Promise} The resulting PMREM. + * @see {@link PMREMGenerator#fromCubemap} + */ + fromCubemapAsync(cubemap: Texture, renderTarget?: RenderTarget | null): Promise; + /** + * Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during + * your texture's network fetch for increased concurrency. + * + * @returns {Promise} + */ + compileCubemapShader(): Promise; + /** + * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during + * your texture's network fetch for increased concurrency. + * + * @returns {Promise} + */ + compileEquirectangularShader(): Promise; + /** + * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class, + * so you should not need more than one PMREMGenerator object. If you do, calling dispose() on + * one of them will cause any others to also become unusable. + */ + dispose(): void; + _setSizeFromTexture(texture: any): void; + _setSize(cubeSize: any): void; + _dispose(): void; + _cleanup(outputTarget: any): void; + _fromTexture(texture: any, renderTarget: any): any; + _allocateTarget(): RenderTarget; + _init(renderTarget: any): void; + _compileMaterial(material: any): Promise; + _sceneToCubeUV(scene: any, near: any, far: any, cubeUVRenderTarget: any, position: any): void; + _textureToCubeUV(texture: any, cubeUVRenderTarget: any): void; + _applyPMREM(cubeUVRenderTarget: any): void; + /** + * Applies GGX VNDF importance sampling filter to generate a prefiltered environment map. + * Uses Monte Carlo integration with VNDF importance sampling to accurately represent the + * GGX BRDF for physically-based rendering. Reads from the previous LOD level and + * applies incremental roughness filtering to avoid over-blurring. + * + * @private + * @param {RenderTarget} cubeUVRenderTarget + * @param {number} lodIn - Source LOD level to read from + * @param {number} lodOut - Target LOD level to write to + */ + private _applyGGXFilter; + /** + * This is a two-pass Gaussian blur for a cubemap. Normally this is done + * vertically and horizontally, but this breaks down on a cube. Here we apply + * the blur latitudinally (around the poles), and then longitudinally (towards + * the poles) to approximate the orthogonally-separable blur. It is least + * accurate at the poles, but still does a decent job. + * + * Used for initial scene blur in fromScene() method when sigma > 0. + * + * @private + * @param {RenderTarget} cubeUVRenderTarget - The cubemap render target. + * @param {number} lodIn - The input level-of-detail. + * @param {number} lodOut - The output level-of-detail. + * @param {number} sigma - The blur radius in radians. + * @param {Vector3} [poleAxis] - The pole axis. + */ + private _blur; + _halfBlur(targetIn: any, targetOut: any, lodIn: any, lodOut: any, sigmaRadians: any, direction: any, poleAxis: any): void; + _setViewport(target: any, x: any, y: any, width: any, height: any): void; +} +/** + * This node represents a PMREM which is a special type of preprocessed + * environment map intended for PBR materials. + * + * ```js + * const material = new MeshStandardNodeMaterial(); + * material.envNode = pmremTexture( envMap ); + * ``` + * + * @augments TempNode + */ +export class PMREMNode extends TempNode { + /** + * Constructs a new function overloading node. + * + * @param {Texture} value - The input texture. + * @param {Node} [uvNode=null] - The uv node. + * @param {Node} [levelNode=null] - The level node. + */ + constructor(value: Texture, uvNode?: Node, levelNode?: Node); + /** + * Reference to the input texture. + * + * @private + * @type {Texture} + */ + private _value; + /** + * Reference to the generated PMREM. + * + * @private + * @type {Texture | null} + * @default null + */ + private _pmrem; + /** + * The uv node. + * + * @type {Node} + */ + uvNode: Node; + /** + * The level node. + * + * @type {Node} + */ + levelNode: Node; + /** + * Reference to a PMREM generator. + * + * @private + * @type {?PMREMGenerator} + * @default null + */ + private _generator; + /** + * The texture node holding the generated PMREM. + * + * @private + * @type {TextureNode} + */ + private _texture; + /** + * A uniform representing the PMREM's width. + * + * @private + * @type {UniformNode} + */ + private _width; + /** + * A uniform representing the PMREM's height. + * + * @private + * @type {UniformNode} + */ + private _height; + /** + * A uniform representing the PMREM's max Mip. + * + * @private + * @type {UniformNode} + */ + private _maxMip; + set value(value: Texture); + /** + * The node's texture value. + * + * @type {Texture} + */ + get value(): Texture; + /** + * Uses the given PMREM texture to update internal values. + * + * @param {Texture} texture - The PMREM texture. + */ + updateFromTexture(texture: Texture): void; + updateBefore(frame: any): void; + setup(builder: any): void; +} +/** + * This node represents an operation that packs floating-point values of a vector into an unsigned 32-bit integer + * + * @augments TempNode + */ +export class PackFloatNode extends TempNode { + /** + * + * @param {'snorm' | 'unorm' | 'float16'} encoding - The numeric encoding that describes how the float values are mapped to the integer range. + * @param {Node} vectorNode - The vector node to be packed + */ + constructor(encoding: "snorm" | "unorm" | "float16", vectorNode: Node); + /** + * The vector to be packed. + * + * @type {Node} + */ + vectorNode: Node; + /** + * The numeric encoding. + * + * @type {string} + */ + encoding: string; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isPackFloatNode: boolean; + generateNodeType(): string; + generate(builder: any): string; +} +/** + * Special version of {@link PropertyNode} which is used for parameters. + * + * @augments PropertyNode + */ +export class ParameterNode extends PropertyNode { + /** + * Constructs a new parameter node. + * + * @param {string} nodeType - The type of the node. + * @param {?string} [name=null] - The name of the parameter in the shader. + */ + constructor(nodeType: string, name?: string | null); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isParameterNode: boolean; + /** + * Gets the type of a member variable in the parameter node. + * + * @param {NodeBuilder} builder - The node builder. + * @param {string} name - The name of the member variable. + * @returns {string} + */ + getMemberType(builder: NodeBuilder, name: string): string; + getHash(): string; + generate(): string; +} +/** + * Represents a render pass (sometimes called beauty pass) in context of post processing. + * This pass produces a render for the given scene and camera and can provide multiple outputs + * via MRT for further processing. + * + * ```js + * const postProcessing = new RenderPipeline( renderer ); + * + * const scenePass = pass( scene, camera ); + * + * postProcessing.outputNode = scenePass; + * ``` + * + * @augments TempNode + */ +export class PassNode extends TempNode { + /** + * Constructs a new pass node. + * + * @param {('color'|'depth')} scope - The scope of the pass. The scope determines whether the node outputs color or depth. + * @param {Scene} scene - A reference to the scene. + * @param {Camera} camera - A reference to the camera. + * @param {Object} options - Options for the internal render target. + */ + constructor(scope: ("color" | "depth"), scene: Scene, camera: Camera, options?: Object); + /** + * The scope of the pass. The scope determines whether the node outputs color or depth. + * + * @type {('color'|'depth')} + */ + scope: ("color" | "depth"); + /** + * A reference to the scene. + * + * @type {Scene} + */ + scene: Scene; + /** + * A reference to the camera. + * + * @type {Camera} + */ + camera: Camera; + /** + * Options for the internal render target. + * + * @type {Object} + */ + options: Object; + /** + * The pass's pixel ratio. Will be kept automatically kept in sync with the renderer's pixel ratio. + * + * @private + * @type {number} + * @default 1 + */ + private _pixelRatio; + /** + * The pass's pixel width. Will be kept automatically kept in sync with the renderer's width. + * @private + * @type {number} + * @default 1 + */ + private _width; + /** + * The pass's pixel height. Will be kept automatically kept in sync with the renderer's height. + * @private + * @type {number} + * @default 1 + */ + private _height; + /** + * The pass's render target. + * + * @type {RenderTarget} + */ + renderTarget: RenderTarget; + /** + * An optional override material for the pass. + * + * @type {Material|null} + */ + overrideMaterial: Material | null; + /** + * Whether the pass is transparent. + * + * @type {boolean} + * @default false + */ + transparent: boolean; + /** + * Whether the pass is opaque. + * + * @type {boolean} + * @default true + */ + opaque: boolean; + /** + * An optional global context for the pass. + * + * @type {ContextNode|null} + */ + contextNode: ContextNode | null; + /** + * A cache for the context node. + * + * @private + * @type {?Object} + * @default null + */ + private _contextNodeCache; + /** + * A dictionary holding the internal result textures. + * + * @private + * @type {{ output: Texture, depth: ?DepthTexture }} + */ + private _textures; + /** + * A dictionary holding the internal texture nodes. + * + * @private + * @type {Object} + */ + private _textureNodes; + /** + * A dictionary holding the internal depth nodes. + * + * @private + * @type {Object} + */ + private _linearDepthNodes; + /** + * A dictionary holding the internal viewZ nodes. + * + * @private + * @type {Object} + */ + private _viewZNodes; + /** + * A dictionary holding the texture data of the previous frame. + * Used for computing velocity/motion vectors. + * + * @private + * @type {Object} + */ + private _previousTextures; + /** + * A dictionary holding the texture nodes of the previous frame. + * Used for computing velocity/motion vectors. + * + * @private + * @type {Object} + */ + private _previousTextureNodes; + /** + * The `near` property of the camera as a uniform. + * + * @private + * @type {UniformNode} + */ + private _cameraNear; + /** + * The `far` property of the camera as a uniform. + * + * @private + * @type {UniformNode} + */ + private _cameraFar; + /** + * A MRT node configuring the MRT settings. + * + * @private + * @type {?MRTNode} + * @default null + */ + private _mrt; + /** + * Layer object for configuring the camera that is used + * to produce the pass. + * + * @private + * @type {?Layers} + * @default null + */ + private _layers; + /** + * Scales the resolution of the internal render target. + * + * @private + * @type {number} + * @default 1 + */ + private _resolutionScale; + /** + * Custom viewport definition. + * + * @private + * @type {?Vector4} + * @default null + */ + private _viewport; + /** + * Custom scissor definition. + * + * @private + * @type {?Vector4} + * @default null + */ + private _scissor; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isPassNode: boolean; + /** + * Sets the resolution scale for the pass. + * The resolution scale is a factor that is multiplied with the renderer's width and height. + * + * @param {number} resolutionScale - The resolution scale to set. A value of `1` means full resolution. + * @return {PassNode} A reference to this pass. + */ + setResolutionScale(resolutionScale: number): PassNode; + /** + * Gets the current resolution scale of the pass. + * + * @return {number} The current resolution scale. A value of `1` means full resolution. + */ + getResolutionScale(): number; + /** + * Sets the resolution for the pass. + * The resolution is a factor that is multiplied with the renderer's width and height. + * + * @param {number} resolution - The resolution to set. A value of `1` means full resolution. + * @return {PassNode} A reference to this pass. + * @deprecated since r181. Use {@link PassNode#setResolutionScale `setResolutionScale()`} instead. + */ + setResolution(resolution: number): PassNode; + /** + * Gets the current resolution of the pass. + * + * @return {number} The current resolution. A value of `1` means full resolution. + * @deprecated since r181. Use {@link PassNode#getResolutionScale `getResolutionScale()`} instead. + */ + getResolution(): number; + /** + * Sets the layer configuration that should be used when rendering the pass. + * + * @param {Layers} layers - The layers object to set. + * @return {PassNode} A reference to this pass. + */ + setLayers(layers: Layers): PassNode; + /** + * Gets the current layer configuration of the pass. + * + * @return {?Layers} . + */ + getLayers(): Layers | null; + /** + * Sets the given MRT node to setup MRT for this pass. + * + * @param {MRTNode} mrt - The MRT object. + * @return {PassNode} A reference to this pass. + */ + setMRT(mrt: MRTNode): PassNode; + /** + * Returns the current MRT node. + * + * @return {MRTNode} The current MRT node. + */ + getMRT(): MRTNode; + /** + * Returns the texture for the given output name. + * + * @param {string} name - The output name to get the texture for. + * @return {Texture} The texture. + */ + getTexture(name: string): Texture; + /** + * Returns the texture holding the data of the previous frame for the given output name. + * + * @param {string} name - The output name to get the texture for. + * @return {Texture} The texture holding the data of the previous frame. + */ + getPreviousTexture(name: string): Texture; + /** + * Switches current and previous textures for the given output name. + * + * @param {string} name - The output name. + */ + toggleTexture(name: string): void; + /** + * Returns the texture node for the given output name. + * + * @param {string} [name='output'] - The output name to get the texture node for. + * @return {TextureNode} The texture node. + */ + getTextureNode(name?: string): TextureNode; + /** + * Returns the previous texture node for the given output name. + * + * @param {string} [name='output'] - The output name to get the previous texture node for. + * @return {TextureNode} The previous texture node. + */ + getPreviousTextureNode(name?: string): TextureNode; + /** + * Returns a viewZ node of this pass. + * + * @param {string} [name='depth'] - The output name to get the viewZ node for. In most cases the default `'depth'` can be used however the parameter exists for custom depth outputs. + * @return {Node} The viewZ node. + */ + getViewZNode(name?: string): Node; + /** + * Returns a linear depth node of this pass. + * + * @param {string} [name='depth'] - The output name to get the linear depth node for. In most cases the default `'depth'` can be used however the parameter exists for custom depth outputs. + * @return {Node} The linear depth node. + */ + getLinearDepthNode(name?: string): Node; + /** + * Precompiles the pass. + * + * Note that this method must be called after the pass configuration is complete. + * So calls like `setMRT()` and `getTextureNode()` must proceed the precompilation. + * + * @async + * @param {Renderer} renderer - The renderer. + * @return {Promise} A Promise that resolves when the compile has been finished. + * @see {@link Renderer#compileAsync} + */ + compileAsync(renderer: Renderer): Promise; + setup({ renderer }: { + renderer: any; + }): Node | TextureNode; + updateBefore(frame: any): void; + /** + * Sets the size of the pass's render target. Honors the pixel ratio. + * + * @param {number} width - The width to set. + * @param {number} height - The height to set. + */ + setSize(width: number, height: number): void; + /** + * This method allows to define the pass's scissor rectangle. By default, the scissor rectangle is kept + * in sync with the pass's dimensions. To reverse the process and use auto-sizing again, call the method + * with `null` as the single argument. + * + * @param {?(number | Vector4)} x - The horizontal coordinate for the lower left corner of the box in logical pixel unit. + * Instead of passing four arguments, the method also works with a single four-dimensional vector. + * @param {number} y - The vertical coordinate for the lower left corner of the box in logical pixel unit. + * @param {number} width - The width of the scissor box in logical pixel unit. + * @param {number} height - The height of the scissor box in logical pixel unit. + */ + setScissor(x: (number | Vector4) | null, y: number, width: number, height: number): void; + /** + * This method allows to define the pass's viewport. By default, the viewport is kept in sync + * with the pass's dimensions. To reverse the process and use auto-sizing again, call the method + * with `null` as the single argument. + * + * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the viewport origin in logical pixel unit. + * @param {number} y - The vertical coordinate for the lower left corner of the viewport origin in logical pixel unit. + * @param {number} width - The width of the viewport in logical pixel unit. + * @param {number} height - The height of the viewport in logical pixel unit. + */ + setViewport(x: number | Vector4, y: number, width: number, height: number): void; + /** + * Sets the pixel ratio the pass's render target and updates the size. + * + * @param {number} pixelRatio - The pixel ratio to set. + */ + setPixelRatio(pixelRatio: number): void; +} +export namespace PassNode { + let COLOR_1: "color"; + export { COLOR_1 as COLOR }; + export let DEPTH: "depth"; +} +import { PerspectiveCamera } from './three.core.js'; +/** + * Represents the lighting model for a phong material. Used in {@link MeshPhongNodeMaterial}. + * + * @augments BasicLightingModel + */ +export class PhongLightingModel extends BasicLightingModel { + /** + * Constructs a new phong lighting model. + * + * @param {boolean} [specular=true] - Whether specular is supported or not. + */ + constructor(specular?: boolean); + /** + * Whether specular is supported or not. Set this to `false` if you are + * looking for a Lambert-like material meaning a material for non-shiny + * surfaces, without specular highlights. + * + * @type {boolean} + * @default true + */ + specular: boolean; + /** + * Implements the direct lighting. The specular portion is optional an can be controlled + * with the {@link PhongLightingModel#specular} flag. + * + * @param {Object} lightData - The light data. + */ + direct({ lightDirection, lightColor, reflectedLight }: Object): void; +} +/** + * Represents the lighting model for a PBR material. + * + * @augments LightingModel + */ +export class PhysicalLightingModel extends LightingModel { + /** + * Constructs a new physical lighting model. + * + * @param {boolean} [clearcoat=false] - Whether clearcoat is supported or not. + * @param {boolean} [sheen=false] - Whether sheen is supported or not. + * @param {boolean} [iridescence=false] - Whether iridescence is supported or not. + * @param {boolean} [anisotropy=false] - Whether anisotropy is supported or not. + * @param {boolean} [transmission=false] - Whether transmission is supported or not. + * @param {boolean} [dispersion=false] - Whether dispersion is supported or not. + */ + constructor(clearcoat?: boolean, sheen?: boolean, iridescence?: boolean, anisotropy?: boolean, transmission?: boolean, dispersion?: boolean); + /** + * Whether clearcoat is supported or not. + * + * @type {boolean} + * @default false + */ + clearcoat: boolean; + /** + * Whether sheen is supported or not. + * + * @type {boolean} + * @default false + */ + sheen: boolean; + /** + * Whether iridescence is supported or not. + * + * @type {boolean} + * @default false + */ + iridescence: boolean; + /** + * Whether anisotropy is supported or not. + * + * @type {boolean} + * @default false + */ + anisotropy: boolean; + /** + * Whether transmission is supported or not. + * + * @type {boolean} + * @default false + */ + transmission: boolean; + /** + * Whether dispersion is supported or not. + * + * @type {boolean} + * @default false + */ + dispersion: boolean; + /** + * The clear coat radiance. + * + * @type {?Node} + * @default null + */ + clearcoatRadiance: Node | null; + /** + * The clear coat specular direct. + * + * @type {?Node} + * @default null + */ + clearcoatSpecularDirect: Node | null; + /** + * The clear coat specular indirect. + * + * @type {?Node} + * @default null + */ + clearcoatSpecularIndirect: Node | null; + /** + * The sheen specular direct. + * + * @type {?Node} + * @default null + */ + sheenSpecularDirect: Node | null; + /** + * The sheen specular indirect. + * + * @type {?Node} + * @default null + */ + sheenSpecularIndirect: Node | null; + /** + * The iridescence Fresnel. + * + * @type {?Node} + * @default null + */ + iridescenceFresnel: Node | null; + /** + * The iridescence F0. + * + * @type {?Node} + * @default null + */ + iridescenceF0: Node | null; + /** + * The iridescence F0 dielectric. + * + * @type {?Node} + * @default null + */ + iridescenceF0Dielectric: Node | null; + /** + * The iridescence F0 metallic. + * + * @type {?Node} + * @default null + */ + iridescenceF0Metallic: Node | null; + computeMultiscattering(singleScatter: any, multiScatter: any, specularF90: any, f0: any, iridescenceF0?: null): void; + /** + * Implements the direct light. + * + * @param {Object} lightData - The light data. + * @param {NodeBuilder} builder - The current node builder. + */ + direct({ lightDirection, lightColor, reflectedLight }: Object): void; + /** + * This method is intended for implementing the direct light term for + * rect area light nodes. + * + * @param {Object} input - The input data. + * @param {NodeBuilder} builder - The current node builder. + */ + directRectArea({ lightColor, lightPosition, halfWidth, halfHeight, reflectedLight, ltc_1, ltc_2 }: Object): void; + /** + * Implements the indirect lighting. + * + * @param {NodeBuilder} builder - The current node builder. + */ + indirect(builder: NodeBuilder): void; + /** + * Implements the indirect diffuse term. + * + * @param {NodeBuilder} builder - The current node builder. + */ + indirectDiffuse(builder: NodeBuilder): void; + /** + * Implements the indirect specular term. + * + * @param {NodeBuilder} builder - The current node builder. + */ + indirectSpecular(builder: NodeBuilder): void; + /** + * Implements the ambient occlusion term. + * + * @param {NodeBuilder} builder - The current node builder. + */ + ambientOcclusion(builder: NodeBuilder): void; + /** + * Used for final lighting accumulations depending on the requested features. + * + * @param {NodeBuilder} builder - The current node builder. + */ + finish({ context }: NodeBuilder): void; +} +import { Plane } from './three.core.js'; +import { PlaneGeometry } from './three.core.js'; +import { PointLight } from './three.core.js'; +/** + * Module for representing point lights as nodes. + * + * @augments AnalyticLightNode + */ +export class PointLightNode extends AnalyticLightNode { + /** + * Constructs a new point light node. + * + * @param {?PointLight} [light=null] - The point light source. + */ + constructor(light?: PointLight | null); + /** + * Uniform node representing the cutoff distance. + * + * @type {UniformNode} + */ + cutoffDistanceNode: UniformNode; + /** + * Uniform node representing the decay exponent. + * + * @type {UniformNode} + */ + decayExponentNode: UniformNode; + /** + * Overwritten to updated point light specific uniforms. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update(frame: NodeFrame): void; + /** + * Overwritten to setup point light specific shadow. + * + * @return {PointShadowNode} + */ + setupShadowNode(): PointShadowNode; + setupDirect(builder: any): { + lightDirection: any; + lightColor: any; + }; +} +/** + * Represents the shadow implementation for point light nodes. + * + * @augments ShadowNode + */ +export class PointShadowNode extends ShadowNode { + /** + * Constructs a new point shadow node. + * + * @param {PointLight} light - The shadow casting point light. + * @param {?PointLightShadow} [shadow=null] - An optional point light shadow. + */ + constructor(light: PointLight, shadow?: PointLightShadow | null); + /** + * Overwrites the default implementation to create a CubeRenderTarget with CubeDepthTexture. + * + * @param {LightShadow} shadow - The light shadow object. + * @param {NodeBuilder} builder - A reference to the current node builder. + * @return {Object} An object containing the shadow map and depth texture. + */ + setupRenderTarget(shadow: LightShadow, builder: NodeBuilder): Object; +} +/** + * A node for representing the uv coordinates of points. + * + * Can only be used with a WebGL backend. In WebGPU, point + * primitives always have the size of one pixel and can thus + * can't be used as sprite-like objects that display textures. + * + * @augments Node + */ +export class PointUVNode extends Node { + /** + * Constructs a new point uv node. + */ + constructor(); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isPointUVNode: boolean; + generate(): string; +} +import { PointsMaterial } from './three.core.js'; +/** + * Node material version of {@link PointsMaterial}. + * + * This material can be used in two ways: + * + * - By rendering point primitives with {@link Points}. Since WebGPU only supports point primitives + * with a pixel size of `1`, it's not possible to define a size. + * + * ```js + * const pointCloud = new THREE.Points( geometry, new THREE.PointsNodeMaterial() ); + * ``` + * + * - By rendering point primitives with {@link Sprites}. In this case, size is honored, + * see {@link PointsNodeMaterial#sizeNode}. + * + * ```js + * const instancedPoints = new THREE.Sprite( new THREE.PointsNodeMaterial( { positionNode: instancedBufferAttribute( positionAttribute ) } ) ); + * ``` + * + * @augments SpriteNodeMaterial + */ +export class PointsNodeMaterial extends SpriteNodeMaterial { + /** + * This node property provides an additional way to set the point size. + * + * Note that WebGPU only supports point primitives with 1 pixel size. Consequently, + * this node has no effect when the material is used with {@link Points} and a WebGPU + * backend. If an application wants to render points with a size larger than 1 pixel, + * the material should be used with {@link Sprite} and instancing. + * + * @type {?Node} + * @default null + */ + sizeNode: Node | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isPointsNodeMaterial: boolean; + setupPositionView(): any; + setupVertexSprite(builder: any): any; + setupVertex(builder: any): any; + _useAlphaToCoverage: any; +} +/** + * @deprecated since r183. Use {@link RenderPipeline} instead. PostProcessing has been renamed to RenderPipeline. + * + * This class is a wrapper for backward compatibility and will be removed in a future version. + */ +export class PostProcessing extends RenderPipeline { + /** + * Constructs a new post processing management module. + * + * @param {Renderer} renderer - A reference to the renderer. + * @param {Node} outputNode - An optional output node. + * @deprecated since r183. Use {@link RenderPipeline} instead. + */ + constructor(renderer: Renderer, outputNode: Node); +} +/** + * A projector light version of {@link SpotLight}. Can only be used with {@link WebGPURenderer}. + * + * @augments SpotLight + */ +export class ProjectorLight extends SpotLight { + /** + * Aspect ratio of the light. Set to `null` to use the texture aspect ratio. + * + * @type {?number} + * @default null + */ + aspect: number | null; + copy(source: any, recursive: any): this; +} +/** + * An implementation of a projector light node. + * + * @augments SpotLightNode + */ +export class ProjectorLightNode extends SpotLightNode { + update(frame: any): void; + /** + * Overwrites the default implementation to compute projection attenuation. + * + * @param {NodeBuilder} builder - The node builder. + * @return {Node} The spot attenuation. + */ + getSpotAttenuation(builder: NodeBuilder): Node; +} +/** + * This class represents a shader property. It can be used + * to explicitly define a property and assign a value to it. + * + * ```js + * const threshold = property( 'float', 'threshold' ).assign( THRESHOLD ); + *``` + * `PropertyNode` is used by the engine to predefined common material properties + * for TSL code. + * + * @augments Node + */ +export class PropertyNode extends Node { + /** + * Constructs a new property node. + * + * @param {string} nodeType - The type of the node. + * @param {?string} [name=null] - The name of the property in the shader. + * @param {boolean} [varying=false] - Whether this property is a varying or not. + */ + constructor(nodeType: string, name?: string | null, varying?: boolean); + /** + * Whether this property is a varying or not. + * + * @type {boolean} + * @default false + */ + varying: boolean; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isPropertyNode: boolean; + getNodeType(builder: any): any; + getHash(builder: any): string; + generate(builder: any): any; +} +/** + * This module is a helper for passes which need to render a full + * screen effect which is quite common in context of post processing. + * + * The intended usage is to reuse a single quad mesh for rendering + * subsequent passes by just reassigning the `material` reference. + * + * Note: This module can only be used with `WebGPURenderer`. + * + * @augments Mesh + */ +export class QuadMesh extends Mesh { + /** + * Constructs a new quad mesh. + * + * @param {?Material} [material=null] - The material to render the quad mesh with. + */ + constructor(material?: Material | null); + /** + * The camera to render the quad mesh with. + * + * @type {OrthographicCamera} + * @readonly + */ + readonly camera: OrthographicCamera; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isQuadMesh: boolean; + /** + * Async version of `render()`. + * + * @async + * @deprecated + * @param {Renderer} renderer - The renderer. + * @return {Promise} A Promise that resolves when the render has been finished. + */ + renderAsync(renderer: Renderer): Promise; + /** + * Renders the quad mesh + * + * @param {Renderer} renderer - The renderer. + */ + render(renderer: Renderer): void; +} +import { Quaternion } from './three.core.js'; +import { R11_EAC_Format } from './three.core.js'; +import { RED_GREEN_RGTC2_Format } from './three.core.js'; +import { RED_RGTC1_Format } from './three.core.js'; +import { REVISION } from './three.core.js'; +import { RG11_EAC_Format } from './three.core.js'; +import { RGBAFormat } from './three.core.js'; +import { RGBAIntegerFormat } from './three.core.js'; +import { RGBA_ASTC_10x10_Format } from './three.core.js'; +import { RGBA_ASTC_10x5_Format } from './three.core.js'; +import { RGBA_ASTC_10x6_Format } from './three.core.js'; +import { RGBA_ASTC_10x8_Format } from './three.core.js'; +import { RGBA_ASTC_12x10_Format } from './three.core.js'; +import { RGBA_ASTC_12x12_Format } from './three.core.js'; +import { RGBA_ASTC_4x4_Format } from './three.core.js'; +import { RGBA_ASTC_5x4_Format } from './three.core.js'; +import { RGBA_ASTC_5x5_Format } from './three.core.js'; +import { RGBA_ASTC_6x5_Format } from './three.core.js'; +import { RGBA_ASTC_6x6_Format } from './three.core.js'; +import { RGBA_ASTC_8x5_Format } from './three.core.js'; +import { RGBA_ASTC_8x6_Format } from './three.core.js'; +import { RGBA_ASTC_8x8_Format } from './three.core.js'; +import { RGBA_BPTC_Format } from './three.core.js'; +import { RGBA_ETC2_EAC_Format } from './three.core.js'; +import { RGBA_PVRTC_2BPPV1_Format } from './three.core.js'; +import { RGBA_PVRTC_4BPPV1_Format } from './three.core.js'; +import { RGBA_S3TC_DXT1_Format } from './three.core.js'; +import { RGBA_S3TC_DXT3_Format } from './three.core.js'; +import { RGBA_S3TC_DXT5_Format } from './three.core.js'; +import { RGBFormat } from './three.core.js'; +import { RGBIntegerFormat } from './three.core.js'; +import { RGB_BPTC_SIGNED_Format } from './three.core.js'; +import { RGB_BPTC_UNSIGNED_Format } from './three.core.js'; +import { RGB_ETC1_Format } from './three.core.js'; +import { RGB_ETC2_Format } from './three.core.js'; +import { RGB_PVRTC_2BPPV1_Format } from './three.core.js'; +import { RGB_PVRTC_4BPPV1_Format } from './three.core.js'; +import { RGB_S3TC_DXT1_Format } from './three.core.js'; +import { RGFormat } from './three.core.js'; +import { RGIntegerFormat } from './three.core.js'; +/** + * `RTTNode` takes another node and uses it with a `QuadMesh` to render into a texture (RTT). + * This module is especially relevant in context of post processing where certain nodes require + * texture input for their effects. With the helper function `convertToTexture()` which is based + * on this module, the node system can automatically ensure texture input if required. + * + * @augments TextureNode + */ +export class RTTNode extends TextureNode { + /** + * Constructs a new RTT node. + * + * @param {Node} node - The node to render a texture with. + * @param {?number} [width=null] - The width of the internal render target. If not width is applied, the render target is automatically resized. + * @param {?number} [height=null] - The height of the internal render target. + * @param {Object} [options={type:HalfFloatType}] - The options for the internal render target. + */ + constructor(node: Node, width?: number | null, height?: number | null, options?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isRTTNode: boolean; + /** + * The node to render a texture with. + * + * @type {Node} + */ + node: Node; + /** + * The width of the internal render target. + * If not width is applied, the render target is automatically resized. + * + * @type {?number} + * @default null + */ + width: number | null; + /** + * The height of the internal render target. + * + * @type {?number} + * @default null + */ + height: number | null; + /** + * The pixel ratio + * + * @type {number} + * @default 1 + */ + pixelRatio: number; + /** + * The render target + * + * @type {RenderTarget} + */ + renderTarget: RenderTarget; + /** + * Whether the texture requires an update or not. + * + * @type {boolean} + * @default true + */ + textureNeedsUpdate: boolean; + /** + * Whether the texture should automatically be updated or not. + * + * @type {boolean} + * @default true + */ + autoUpdate: boolean; + /** + * The node which is used with the quad mesh for RTT. + * + * @private + * @type {Node} + * @default null + */ + private _rttNode; + /** + * The internal quad mesh for RTT. + * + * @private + * @type {QuadMesh} + */ + private _quadMesh; + /** + * Whether the internal render target should automatically be resized or not. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly get autoResize(): boolean; + setup(builder: any): void; + /** + * Sets the size of the internal render target + * + * @param {number} width - The width to set. + * @param {number} height - The width to set. + */ + setSize(width: number, height: number): void; + /** + * Sets the pixel ratio. This will also resize the render target. + * + * @param {number} pixelRatio - The pixel ratio to set. + */ + setPixelRatio(pixelRatio: number): void; + updateBefore({ renderer }: { + renderer: any; + }): void; +} +/** + * `RangeNode` generates random instanced attribute data in a defined range. + * An exemplary use case for this utility node is to generate random per-instance + * colors: + * ```js + * const material = new MeshBasicNodeMaterial(); + * material.colorNode = range( new Color( 0x000000 ), new Color( 0xFFFFFF ) ); + * const mesh = new InstancedMesh( geometry, material, count ); + * ``` + * @augments Node + */ +export class RangeNode extends Node { + /** + * Constructs a new range node. + * + * @param {Node} [minNode=float()] - A node defining the lower bound of the range. + * @param {Node} [maxNode=float()] - A node defining the upper bound of the range. + */ + constructor(minNode?: Node, maxNode?: Node); + /** + * A node defining the lower bound of the range. + * + * @type {Node} + * @default float() + */ + minNode: Node; + /** + * A node defining the upper bound of the range. + * + * @type {Node} + * @default float() + */ + maxNode: Node; + /** + * Returns the vector length which is computed based on the range definition. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {number} The vector length. + */ + getVectorLength(builder: NodeBuilder): number; + /** + * This method is overwritten since the node type is inferred from range definition. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Returns a constant node from the given node by traversing it. + * + * @param {Node} node - The node to traverse. + * @returns {Node} The constant node, if found. + */ + getConstNode(node: Node): Node; + setup(builder: any): any; +} +/** + * A readback buffer is used to transfer data from the GPU to the CPU. + * It is primarily used to read back compute shader results. + * + * @augments EventDispatcher + */ +export class ReadbackBuffer extends EventDispatcher { + /** + * Constructs a new readback buffer. + * + * @param {number} maxByteLength - The maximum size of the buffer to be read back. + */ + constructor(maxByteLength: number); + /** + * Name used for debugging purposes. + * + * @type {string} + */ + name: string; + /** + * The mapped, read back array buffer. + * + * @type {ArrayBuffer|null} + */ + buffer: ArrayBuffer | null; + /** + * The maximum size of the buffer to be read back. + * + * @type {number} + */ + maxByteLength: number; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isReadbackBuffer: boolean; + _mapped: boolean; + /** + * Releases the mapped buffer data so the GPU buffer can be + * used by the GPU again. + * + * Note: Any `ArrayBuffer` data associated with this readback buffer + * are removed and no longer accessible after calling this method. + */ + release(): void; + /** + * Frees internal resources. + */ + dispose(): void; +} +import { RectAreaLight } from './three.core.js'; +/** + * Module for representing rect area lights as nodes. + * + * @augments AnalyticLightNode + */ +export class RectAreaLightNode extends AnalyticLightNode { + /** + * Used to configure the internal BRDF approximation texture data. + * + * @param {RectAreaLightTexturesLib} ltc - The BRDF approximation texture data. + */ + static setLTC(ltc: RectAreaLightTexturesLib): void; + /** + * Constructs a new rect area light node. + * + * @param {?RectAreaLight} [light=null] - The rect area light source. + */ + constructor(light?: RectAreaLight | null); + /** + * Uniform node representing the half height of the are light. + * + * @type {UniformNode} + */ + halfHeight: UniformNode; + /** + * Uniform node representing the half width of the are light. + * + * @type {UniformNode} + */ + halfWidth: UniformNode; + /** + * Overwritten to updated rect area light specific uniforms. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update(frame: NodeFrame): void; + setupDirectRectArea(builder: any): { + lightColor: Node; + lightPosition: any; + halfWidth: any; + halfHeight: any; + ltc_1: TextureNode; + ltc_2: TextureNode; + }; +} +import { RedFormat } from './three.core.js'; +import { RedIntegerFormat } from './three.core.js'; +/** + * Base class for nodes which establishes a reference to a property of another object. + * In this way, the value of the node is automatically linked to the value of + * referenced object. Reference nodes internally represent the linked value + * as a uniform. + * + * @augments Node + */ +export class ReferenceBaseNode extends Node { + /** + * Constructs a new reference base node. + * + * @param {string} property - The name of the property the node refers to. + * @param {string} uniformType - The uniform type that should be used to represent the property value. + * @param {?Object} [object=null] - The object the property belongs to. + * @param {?number} [count=null] - When the linked property is an array-like, this parameter defines its length. + */ + constructor(property: string, uniformType: string, object?: Object | null, count?: number | null); + /** + * The name of the property the node refers to. + * + * @type {string} + */ + property: string; + /** + * The uniform type that should be used to represent the property value. + * + * @type {string} + */ + uniformType: string; + /** + * The object the property belongs to. + * + * @type {?Object} + * @default null + */ + object: Object | null; + /** + * When the linked property is an array, this parameter defines its length. + * + * @type {?number} + * @default null + */ + count: number | null; + /** + * The property name might have dots so nested properties can be referred. + * The hierarchy of the names is stored inside this array. + * + * @type {Array} + */ + properties: Array; + /** + * Points to the current referred object. This property exists next to {@link ReferenceNode#object} + * since the final reference might be updated from calling code. + * + * @type {?Object} + * @default null + */ + reference: Object | null; + /** + * The uniform node that holds the value of the reference node. + * + * @type {UniformNode} + * @default null + */ + node: UniformNode; + /** + * The uniform group of the internal uniform. + * + * @type {UniformGroupNode} + * @default null + */ + group: UniformGroupNode; + /** + * Sets the uniform group for this reference node. + * + * @param {UniformGroupNode} group - The uniform group to set. + * @return {ReferenceBaseNode} A reference to this node. + */ + setGroup(group: UniformGroupNode): ReferenceBaseNode; + /** + * When the referred property is array-like, this method can be used + * to access elements via an index node. + * + * @param {IndexNode} indexNode - indexNode. + * @return {ReferenceElementNode} A reference to an element. + */ + element(indexNode: IndexNode): ReferenceElementNode; + /** + * Sets the node type which automatically defines the internal + * uniform type. + * + * @param {string} uniformType - The type to set. + */ + setNodeType(uniformType: string): void; + /** + * This method is overwritten since the node type is inferred from + * the type of the reference node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Returns the property value from the given referred object. + * + * @param {Object} [object=this.reference] - The object to retrieve the property value from. + * @return {any} The value. + */ + getValueFromReference(object?: Object): any; + /** + * Allows to update the reference based on the given state. The state is only + * evaluated {@link ReferenceBaseNode#object} is not set. + * + * @param {(NodeFrame|NodeBuilder)} state - The current state. + * @return {Object} The updated reference. + */ + updateReference(state: (NodeFrame | NodeBuilder)): Object; + /** + * The output of the reference node is the internal uniform node. + * + * @return {UniformNode} The output node. + */ + setup(): UniformNode; + /** + * Overwritten to update the internal uniform value. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update(): void; + /** + * Retrieves the value from the referred object property and uses it + * to updated the internal uniform. + */ + updateValue(): void; +} +/** + * This type of node establishes a reference to a property of another object. + * In this way, the value of the node is automatically linked to the value of + * referenced object. Reference nodes internally represent the linked value + * as a uniform. + * + * @augments Node + */ +export class ReferenceNode extends Node { + /** + * Constructs a new reference node. + * + * @param {string} property - The name of the property the node refers to. + * @param {string} uniformType - The uniform type that should be used to represent the property value. + * @param {?Object} [object=null] - The object the property belongs to. + * @param {?number} [count=null] - When the linked property is an array-like, this parameter defines its length. + */ + constructor(property: string, uniformType: string, object?: Object | null, count?: number | null); + /** + * The name of the property the node refers to. + * + * @type {string} + */ + property: string; + /** + * The uniform type that should be used to represent the property value. + * + * @type {string} + */ + uniformType: string; + /** + * The object the property belongs to. + * + * @type {?Object} + * @default null + */ + object: Object | null; + /** + * When the linked property is an array, this parameter defines its length. + * + * @type {?number} + * @default null + */ + count: number | null; + /** + * The property name might have dots so nested properties can be referred. + * The hierarchy of the names is stored inside this array. + * + * @type {Array} + */ + properties: Array; + /** + * Points to the current referred object. This property exists next to {@link ReferenceNode#object} + * since the final reference might be updated from calling code. + * + * @type {?Object} + * @default null + */ + reference: Object | null; + /** + * The uniform node that holds the value of the reference node. + * + * @type {UniformNode} + * @default null + */ + node: UniformNode; + /** + * The uniform group of the internal uniform. + * + * @type {UniformGroupNode} + * @default null + */ + group: UniformGroupNode; + /** + * When the referred property is array-like, this method can be used + * to access elements via an index node. + * + * @param {IndexNode} indexNode - indexNode. + * @return {ReferenceElementNode} A reference to an element. + */ + element(indexNode: IndexNode): ReferenceElementNode; + /** + * Sets the uniform group for this reference node. + * + * @param {UniformGroupNode} group - The uniform group to set. + * @return {ReferenceNode} A reference to this node. + */ + setGroup(group: UniformGroupNode): ReferenceNode; + /** + * Sets the name for the internal uniform. + * + * @param {string} name - The label to set. + * @return {ReferenceNode} A reference to this node. + */ + setName(name: string): ReferenceNode; + /** + * Sets the label for the internal uniform. + * + * @deprecated + * @param {string} name - The label to set. + * @return {ReferenceNode} A reference to this node. + */ + label(name: string): ReferenceNode; + /** + * Sets the node type which automatically defines the internal + * uniform type. + * + * @param {string} uniformType - The type to set. + */ + setNodeType(uniformType: string): void; + /** + * This method is overwritten since the node type is inferred from + * the type of the reference node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Returns the property value from the given referred object. + * + * @param {Object} [object=this.reference] - The object to retrieve the property value from. + * @return {any} The value. + */ + getValueFromReference(object?: Object): any; + /** + * Allows to update the reference based on the given state. The state is only + * evaluated {@link ReferenceNode#object} is not set. + * + * @param {(NodeFrame|NodeBuilder)} state - The current state. + * @return {Object} The updated reference. + */ + updateReference(state: (NodeFrame | NodeBuilder)): Object; + /** + * The output of the reference node is the internal uniform node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {UniformNode} The output node. + */ + setup(): UniformNode; + /** + * Overwritten to update the internal uniform value. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update(): void; + /** + * Retrieves the value from the referred object property and uses it + * to updated the internal uniform. + */ + updateValue(): void; +} +/** + * This node can be used to implement mirror-like flat reflective surfaces. + * + * ```js + * const groundReflector = reflector(); + * material.colorNode = groundReflector; + * + * const plane = new Mesh( geometry, material ); + * plane.add( groundReflector.target ); + * ``` + * + * @augments TextureNode + */ +export class ReflectorNode extends TextureNode { + /** + * Constructs a new reflector node. + * + * @param {Object} [parameters={}] - An object holding configuration parameters. + * @param {Object3D} [parameters.target=new Object3D()] - The 3D object the reflector is linked to. + * @param {number} [parameters.resolutionScale=1] - The resolution scale. + * @param {boolean} [parameters.generateMipmaps=false] - Whether mipmaps should be generated or not. + * @param {boolean} [parameters.bounces=true] - Whether reflectors can render other reflector nodes or not. + * @param {boolean} [parameters.depth=false] - Whether depth data should be generated or not. + * @param {number} [parameters.samples] - Anti-Aliasing samples of the internal render-target. + * @param {TextureNode} [parameters.defaultTexture] - The default texture node. + * @param {ReflectorBaseNode} [parameters.reflector] - The reflector base node. + */ + constructor(parameters?: { + target?: Object3D | undefined; + resolutionScale?: number | undefined; + generateMipmaps?: boolean | undefined; + bounces?: boolean | undefined; + depth?: boolean | undefined; + samples?: number | undefined; + defaultTexture?: TextureNode | undefined; + reflector?: ReflectorBaseNode | undefined; + }); + /** + * A reference to the internal reflector base node which holds the actual implementation. + * + * @private + * @type {ReflectorBaseNode} + * @default ReflectorBaseNode + */ + private _reflectorBaseNode; + /** + * A reference to the internal depth node. + * + * @private + * @type {?Node} + * @default null + */ + private _depthNode; + /** + * A reference to the internal reflector node. + * + * @type {ReflectorBaseNode} + */ + get reflector(): ReflectorBaseNode; + /** + * A reference to 3D object the reflector is linked to. + * + * @type {Object3D} + */ + get target(): Object3D; + /** + * Returns a node representing the mirror's depth. That can be used + * to implement more advanced reflection effects like distance attenuation. + * + * @return {Node} The depth node. + */ + getDepthNode(): Node; + setup(builder: any): void; + clone(): any; +} +import { ReinhardToneMapping } from './three.core.js'; +/** + * Normally, tone mapping and color conversion happens automatically just + * before outputting a pixel to the default (screen) framebuffer. In certain + * post processing setups this is too late because some effects such as FXAA + * require e.g. sRGB input. For such scenarios, `RenderOutputNode` can be used + * to apply tone mapping and color space conversion at an arbitrary point + * in the effect chain. + * + * When applying tone mapping and color space conversion manually with this node, + * you have to set {@link RenderPipeline#outputColorTransform} to `false`. + * + * ```js + * const postProcessing = new RenderPipeline( renderer ); + * postProcessing.outputColorTransform = false; + * + * const scenePass = pass( scene, camera ); + * const outputPass = renderOutput( scenePass ); + * + * postProcessing.outputNode = outputPass; + * ``` + * + * @augments TempNode + */ +export class RenderOutputNode extends TempNode { + /** + * Constructs a new render output node. + * + * @param {Node} colorNode - The color node to process. + * @param {?number} toneMapping - The tone mapping type. + * @param {?string} outputColorSpace - The output color space. + */ + constructor(colorNode: Node, toneMapping: number | null, outputColorSpace: string | null); + /** + * The color node to process. + * + * @type {Node} + */ + colorNode: Node; + /** + * The tone mapping type. + * + * @private + * @type {?number} + */ + private _toneMapping; + /** + * The output color space. + * + * @type {?string} + */ + outputColorSpace: string | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isRenderOutputNode: boolean; + /** + * Sets the tone mapping type. + * + * @param {number} value - The tone mapping type. + * @return {ToneMappingNode} A reference to this node. + */ + setToneMapping(value: number): ToneMappingNode; + /** + * Gets the tone mapping type. + * + * @returns {number} The tone mapping type. + */ + getToneMapping(): number; + setup({ context }: { + context: any; + }): Node; +} +/** + * This module is responsible to manage the rendering pipeline setups in apps. + * You usually create a single instance of this class and use it to define + * the output of your render pipeline and post processing effect chain. + * ```js + * const renderPipeline = new RenderPipeline( renderer ); + * + * const scenePass = pass( scene, camera ); + * + * renderPipeline.outputNode = scenePass; + * ``` + * + * Note: This module can only be used with `WebGPURenderer`. + */ +export class RenderPipeline { + /** + * Constructs a new render pipeline management module. + * + * @param {Renderer} renderer - A reference to the renderer. + * @param {Node} outputNode - An optional output node. + */ + constructor(renderer: Renderer, outputNode?: Node); + /** + * A reference to the renderer. + * + * @type {Renderer} + */ + renderer: Renderer; + /** + * A node which defines the final output of the rendering + * pipeline. This is usually the last node in a chain + * of effect nodes. + * + * @type {Node} + */ + outputNode: Node; + /** + * Whether the default output tone mapping and color + * space transformation should be enabled or not. + * + * This is enabled by default but it must be disabled for + * effects that expect to be executed after tone mapping and color + * space conversion. A typical example is FXAA which + * requires sRGB input. + * + * When set to `false`, the app must control the output + * transformation with `RenderOutputNode`. + * + * ```js + * const outputPass = renderOutput( scenePass ); + * ``` + * + * @type {boolean} + */ + outputColorTransform: boolean; + /** + * Must be set to `true` when the output node changes. + * + * @type {Node} + */ + needsUpdate: Node; + /** + * The full screen quad that is used to render + * the effects. + * + * @private + * @type {QuadMesh} + */ + private _quadMesh; + /** + * The context of the render pipeline stack. + * + * @private + * @type {?Object} + * @default null + */ + private _context; + /** + * The current tone mapping. + * + * @private + * @type {ToneMapping} + */ + private _toneMapping; + /** + * The current output color space. + * + * @private + * @type {ColorSpace} + */ + private _outputColorSpace; + /** + * When `RenderPipeline` is used to apply rendering pipeline and post processing effects, + * the application must use this version of `render()` inside + * its animation loop (not the one from the renderer). + */ + render(): void; + /** + * Returns the current context of the render pipeline stack. + * + * @readonly + * @type {?Object} + */ + readonly get context(): Object | null; + /** + * Frees internal resources. + */ + dispose(): void; + /** + * Updates the state of the module. + * + * @private + */ + private _update; + /** + * When `RenderPipeline` is used to apply rendering pipeline and post processing effects, + * the application must use this version of `renderAsync()` inside + * its animation loop (not the one from the renderer). + * + * @async + * @deprecated + * @return {Promise} A Promise that resolves when the render has been finished. + */ + renderAsync(): Promise; +} +import { RenderTarget } from './three.core.js'; +/** + * This node is a special type of reference node which is intended + * for linking renderer properties with node values. + * ```js + * const exposureNode = rendererReference( 'toneMappingExposure', 'float', renderer ); + * ``` + * When changing `renderer.toneMappingExposure`, the node value of `exposureNode` will + * automatically be updated. + * + * @augments ReferenceBaseNode + */ +export class RendererReferenceNode extends ReferenceBaseNode { + /** + * Constructs a new renderer reference node. + * + * @param {string} property - The name of the property the node refers to. + * @param {string} inputType - The uniform type that should be used to represent the property value. + * @param {?Renderer} [renderer=null] - The renderer the property belongs to. When no renderer is set, + * the node refers to the renderer of the current state. + */ + constructor(property: string, inputType: string, renderer?: Renderer | null); + /** + * The renderer the property belongs to. When no renderer is set, + * the node refers to the renderer of the current state. + * + * @type {?Renderer} + * @default null + */ + renderer: Renderer | null; +} +export var RendererUtils: Readonly<{ + __proto__: null; + resetRendererAndSceneState: typeof resetRendererAndSceneState; + resetRendererState: typeof resetRendererState; + resetSceneState: typeof resetSceneState; + restoreRendererAndSceneState: typeof restoreRendererAndSceneState; + restoreRendererState: typeof restoreRendererState; + restoreSceneState: typeof restoreSceneState; + saveRendererAndSceneState: typeof saveRendererAndSceneState; + saveRendererState: typeof saveRendererState; + saveSceneState: typeof saveSceneState; +}>; +import { RepeatWrapping } from './three.core.js'; +import { ReplaceStencilOp } from './three.core.js'; +import { ReverseSubtractEquation } from './three.core.js'; +/** + * Applies a rotation to the given position node. + * + * @augments TempNode + */ +export class RotateNode extends TempNode { + /** + * Constructs a new rotate node. + * + * @param {Node} positionNode - The position node. + * @param {Node} rotationNode - Represents the rotation that is applied to the position node. Depending + * on whether the position data are 2D or 3D, the rotation is expressed a single float value or an Euler value. + */ + constructor(positionNode: Node, rotationNode: Node); + /** + * The position node. + * + * @type {Node} + */ + positionNode: Node; + /** + * Represents the rotation that is applied to the position node. + * Depending on whether the position data are 2D or 3D, the rotation is expressed a single float value or an Euler value. + * + * @type {Node} + */ + rotationNode: Node; + /** + * The type of the {@link RotateNode#positionNode} defines the node's type. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node's type. + */ + generateNodeType(builder: NodeBuilder): string; + setup(builder: any): any; +} +import { SIGNED_R11_EAC_Format } from './three.core.js'; +import { SIGNED_RED_GREEN_RGTC2_Format } from './three.core.js'; +import { SIGNED_RED_RGTC1_Format } from './three.core.js'; +import { SIGNED_RG11_EAC_Format } from './three.core.js'; +import { SRGBColorSpace } from './three.core.js'; +import { SRGBTransfer } from './three.core.js'; +/** + * Class representing a node that samples a value using a provided callback function. + * + * @extends Node + */ +export class SampleNode extends Node { + /** + * Creates an instance of SampleNode. + * + * @param {Function} callback - The function to be called when sampling. Should accept a UV node and return a value. + * @param {?Node} [uvNode=null] - The UV node to be used in the texture sampling. + */ + constructor(callback: Function, uvNode?: Node | null); + callback: Function; + /** + * Represents the texture coordinates. + * + * @type {?Node} + * @default null + */ + uvNode: Node | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSampleNode: boolean; + /** + * Sets up the node by sampling with the default UV accessor. + * + * @returns {Node} The result of the callback function when called with the UV node. + */ + setup(): Node; + /** + * Calls the callback function with the provided UV node. + * + * @param {Node} uv - The UV node or value to be passed to the callback. + * @returns {Node} The result of the callback function. + */ + sample(uv: Node): Node; +} +import { Scene } from './three.core.js'; +/** + * This node provides a collection of screen related metrics. + * Depending on {@link ScreenNode#scope}, the nodes can represent + * resolution or viewport data as well as fragment or uv coordinates. + * + * @augments Node + */ +export class ScreenNode extends Node { + /** + * Constructs a new screen node. + * + * @param {('coordinate'|'viewport'|'size'|'uv'|'dpr')} scope - The node's scope. + */ + constructor(scope: ("coordinate" | "viewport" | "size" | "uv" | "dpr")); + /** + * The node represents different metric depending on which scope is selected. + * + * - `ScreenNode.COORDINATE`: Window-relative coordinates of the current fragment according to WebGPU standards. + * - `ScreenNode.VIEWPORT`: The current viewport defined as a four-dimensional vector. + * - `ScreenNode.SIZE`: The dimensions of the current bound framebuffer. + * - `ScreenNode.UV`: Normalized coordinates. + * - `ScreenNode.DPR`: Device pixel ratio. + * + * @type {('coordinate'|'viewport'|'size'|'uv'|'dpr')} + */ + scope: ("coordinate" | "viewport" | "size" | "uv" | "dpr"); + /** + * This output node. + * + * @private + * @type {?Node} + * @default null + */ + private _output; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isViewportNode: boolean; + /** + * This method is overwritten since the node type depends on the selected scope. + * + * @return {('float'|'vec2'|'vec4')} The node type. + */ + generateNodeType(): ("float" | "vec2" | "vec4"); + /** + * `ScreenNode` implements {@link Node#update} to retrieve viewport and size information + * from the current renderer. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update({ renderer }: NodeFrame): void; + setup(): any; + generate(builder: any): any; +} +export namespace ScreenNode { + let COORDINATE: string; + let VIEWPORT: string; + let SIZE: string; + let UV: string; + let DPR: string; +} +/** + * This module is part of the TSL core and usually not used in app level code. + * `SetNode` represents a set operation which means it is used to implement any + * `setXYZW()`, `setRGBA()` and `setSTPQ()` method invocations on node objects. + * For example: + * ```js + * materialLine.colorNode = color( 0, 0, 0 ).setR( float( 1 ) ); + * ``` + * + * @augments TempNode + */ +export class SetNode extends TempNode { + /** + * Constructs a new set node. + * + * @param {Node} sourceNode - The node that should be updated. + * @param {string} components - The components that should be updated. + * @param {Node} targetNode - The value node. + */ + constructor(sourceNode: Node, components: string, targetNode: Node); + /** + * The node that should be updated. + * + * @type {Node} + */ + sourceNode: Node; + /** + * The components that should be updated. + * + * @type {string} + */ + components: string; + /** + * The value node. + * + * @type {Node} + */ + targetNode: Node; + /** + * This method is overwritten since the node type is inferred from {@link SetNode#sourceNode}. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + generate(builder: any): string; +} +/** + * Base class for all shadow nodes. + * + * Shadow nodes encapsulate shadow related logic and are always coupled to lighting nodes. + * Lighting nodes might share the same shadow node type or use specific ones depending on + * their requirements. + * + * @augments Node + */ +export class ShadowBaseNode extends Node { + /** + * Constructs a new shadow base node. + * + * @param {Light} light - The shadow casting light. + */ + constructor(light: Light); + /** + * The shadow casting light. + * + * @type {Light} + */ + light: Light; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isShadowBaseNode: boolean; + /** + * Setups the shadow position node which is by default the predefined TSL node object `shadowPositionWorld`. + * + * @param {NodeBuilder} object - A configuration object that must at least hold a material reference. + */ + setupShadowPosition({ context, material }: NodeBuilder): void; +} +import { ShadowMaterial } from './three.core.js'; +/** + * Represents the default shadow implementation for lighting nodes. + * + * @augments ShadowBaseNode + */ +export class ShadowNode extends ShadowBaseNode { + /** + * Constructs a new shadow node. + * + * @param {Light} light - The shadow casting light. + * @param {?LightShadow} [shadow=null] - An optional light shadow. + */ + constructor(light: Light, shadow?: LightShadow | null); + /** + * The light shadow which defines the properties light's + * shadow. + * + * @type {?LightShadow} + * @default null + */ + shadow: LightShadow | null; + /** + * A reference to the shadow map which is a render target. + * + * @type {?RenderTarget} + * @default null + */ + shadowMap: RenderTarget | null; + /** + * Only relevant for VSM shadows. Render target for the + * first VSM render pass. + * + * @type {?RenderTarget} + * @default null + */ + vsmShadowMapVertical: RenderTarget | null; + /** + * Only relevant for VSM shadows. Render target for the + * second VSM render pass. + * + * @type {?RenderTarget} + * @default null + */ + vsmShadowMapHorizontal: RenderTarget | null; + /** + * Only relevant for VSM shadows. Node material which + * is used to render the first VSM pass. + * + * @type {?NodeMaterial} + * @default null + */ + vsmMaterialVertical: NodeMaterial | null; + /** + * Only relevant for VSM shadows. Node material which + * is used to render the second VSM pass. + * + * @type {?NodeMaterial} + * @default null + */ + vsmMaterialHorizontal: NodeMaterial | null; + /** + * A reference to the output node which defines the + * final result of this shadow node. + * + * @type {?Node} + * @private + * @default null + */ + private _node; + /** + * The current shadow map type of this shadow node. + * + * @type {?number} + * @private + * @default null + */ + private _currentShadowType; + /** + * A Weak Map holding the current frame ID per camera. Used + * to control the update of shadow maps. + * + * @type {WeakMap} + * @private + */ + private _cameraFrameId; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isShadowNode: boolean; + /** + * This index can be used when overriding setupRenderTarget with a RenderTarget Array to specify the depth layer. + * + * @type {number} + * @readonly + * @default true + */ + readonly depthLayer: number; + /** + * Setups the shadow filtering. + * + * @param {NodeBuilder} builder - A reference to the current node builder. + * @param {Object} inputs - A configuration object that defines the shadow filtering. + * @param {Function} inputs.filterFn - This function defines the filtering type of the shadow map e.g. PCF. + * @param {DepthTexture} inputs.depthTexture - A reference to the shadow map's texture data. + * @param {Node} inputs.shadowCoord - Shadow coordinates which are used to sample from the shadow map. + * @param {LightShadow} inputs.shadow - The light shadow. + * @return {Node} The result node of the shadow filtering. + */ + setupShadowFilter(builder: NodeBuilder, { filterFn, depthTexture, shadowCoord, shadow, depthLayer }: { + filterFn: Function; + depthTexture: DepthTexture; + shadowCoord: Node; + shadow: LightShadow; + }): Node; + /** + * Setups the shadow coordinates. + * + * @param {NodeBuilder} builder - A reference to the current node builder. + * @param {Node} shadowPosition - A node representing the shadow position. + * @return {Node} The shadow coordinates. + */ + setupShadowCoord(builder: NodeBuilder, shadowPosition: Node): Node; + /** + * Returns the shadow filtering function for the given shadow type. + * + * @param {number} type - The shadow type. + * @return {Function} The filtering function. + */ + getShadowFilterFn(type: number): Function; + setupRenderTarget(shadow: any, builder: any): { + shadowMap: any; + depthTexture: DepthTexture; + }; + /** + * Setups the shadow output node. + * + * @param {NodeBuilder} builder - A reference to the current node builder. + * @return {Node} The shadow output node. + */ + setupShadow(builder: NodeBuilder): Node; + /** + * The implementation performs the setup of the output node. An output is only + * produces if shadow mapping is globally enabled in the renderer. + * + * @param {NodeBuilder} builder - A reference to the current node builder. + * @return {ShaderCallNodeInternal} The output node. + */ + setup(builder: NodeBuilder): ShaderCallNodeInternal; + /** + * Renders the shadow. The logic of this function could be included + * into {@link ShadowNode#updateShadow} however more specialized shadow + * nodes might require a custom shadow map rendering. By having a + * dedicated method, it's easier to overwrite the default behavior. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + renderShadow(frame: NodeFrame): void; + /** + * Updates the shadow. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + updateShadow(frame: NodeFrame): void; + _depthVersionCached: number | undefined; + /** + * For VSM additional render passes are required. + * + * @param {Renderer} renderer - A reference to the current renderer. + */ + vsmPass(renderer: Renderer): void; + /** + * Resets the resouce state of this shadow node. + * + * @private + */ + private _reset; + /** + * The implementation performs the update of the shadow map if necessary. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + updateBefore(frame: NodeFrame): void; +} +/** + * Node material version of {@link ShadowMaterial}. + * + * @augments NodeMaterial + */ +export class ShadowNodeMaterial extends NodeMaterial { + /** + * Constructs a new shadow node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isShadowNodeMaterial: boolean; + /** + * Setups the lighting model. + * + * @return {ShadowMaskModel} The lighting model. + */ + setupLightingModel(): ShadowMaskModel; +} +import { ShortType } from './three.core.js'; +/** + * This node implements the vertex transformation shader logic which is required + * for skinning/skeletal animation. + * + * @augments Node + */ +export class SkinningNode extends Node { + /** + * Constructs a new skinning node. + * + * @param {SkinnedMesh} skinnedMesh - The skinned mesh. + */ + constructor(skinnedMesh: SkinnedMesh); + /** + * The skinned mesh. + * + * @type {SkinnedMesh} + */ + skinnedMesh: SkinnedMesh; + /** + * The skin index attribute. + * + * @type {AttributeNode} + */ + skinIndexNode: AttributeNode; + /** + * The skin weight attribute. + * + * @type {AttributeNode} + */ + skinWeightNode: AttributeNode; + /** + * The bind matrix node. + * + * @type {Node} + */ + bindMatrixNode: Node; + /** + * The bind matrix inverse node. + * + * @type {Node} + */ + bindMatrixInverseNode: Node; + /** + * The bind matrices as a uniform buffer node. + * + * @type {Node} + */ + boneMatricesNode: Node; + /** + * The current vertex position in local space. + * + * @type {Node} + */ + positionNode: Node; + /** + * The result of vertex position in local space. + * + * @type {Node} + */ + toPositionNode: Node; + /** + * The previous bind matrices as a uniform buffer node. + * Required for computing motion vectors. + * + * @type {?Node} + * @default null + */ + previousBoneMatricesNode: Node | null; + /** + * Transforms the given vertex position via skinning. + * + * @param {Node} [boneMatrices=this.boneMatricesNode] - The bone matrices + * @param {Node} [position=this.positionNode] - The vertex position in local space. + * @return {Node} The transformed vertex position. + */ + getSkinnedPosition(boneMatrices?: Node, position?: Node): Node; + /** + * Transforms the given vertex normal and tangent via skinning. + * + * @param {Node} [boneMatrices=this.boneMatricesNode] - The bone matrices + * @param {Node} [normal=normalLocal] - The vertex normal in local space. + * @param {Node} [tangent=tangentLocal] - The vertex tangent in local space. + * @return {{skinNormal: Node, skinTangent:Node}} The transformed vertex normal and tangent. + */ + getSkinnedNormalAndTangent(boneMatrices?: Node, normal?: Node, tangent?: Node): { + skinNormal: Node; + skinTangent: Node; + }; + /** + * Computes the transformed/skinned vertex position of the previous frame. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The skinned position from the previous frame. + */ + getPreviousSkinnedPosition(builder: NodeBuilder): Node; + /** + * Setups the skinning node by assigning the transformed vertex data to predefined node variables. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The transformed vertex position. + */ + setup(builder: NodeBuilder): Node; + /** + * Generates the code snippet of the skinning node. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} output - The current output. + * @return {string} The generated code snippet. + */ + generate(builder: NodeBuilder, output: string): string; + /** + * Updates the state of the skinned mesh by updating the skeleton once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + update(frame: NodeFrame): void; +} +import { Sphere } from './three.core.js'; +import { SphereGeometry } from './three.core.js'; +/** + * This module is part of the TSL core and usually not used in app level code. + * `SplitNode` represents a property access operation which means it is + * used to implement any `.xyzw`, `.rgba` and `stpq` usage on node objects. + * For example: + * ```js + * const redValue = color.r; + * ``` + * + * @augments Node + */ +export class SplitNode extends Node { + /** + * Constructs a new split node. + * + * @param {Node} node - The node that should be accessed. + * @param {string} [components='x'] - The components that should be accessed. + */ + constructor(node: Node, components?: string); + /** + * The node that should be accessed. + * + * @type {Node} + */ + node: Node; + /** + * The components that should be accessed. + * + * @type {string} + */ + components: string; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSplitNode: boolean; + /** + * Returns the vector length which is computed based on the requested components. + * + * @return {number} The vector length. + */ + getVectorLength(): number; + /** + * Returns the component type of the node's type. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The component type. + */ + getComponentType(builder: NodeBuilder): string; + /** + * This method is overwritten since the node type is inferred from requested components. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + generate(builder: any, output: any): any; + serialize(data: any): void; + deserialize(data: any): void; +} +import { SpotLight } from './three.core.js'; +/** + * Module for representing spot lights as nodes. + * + * @augments AnalyticLightNode + */ +export class SpotLightNode extends AnalyticLightNode { + /** + * Constructs a new spot light node. + * + * @param {?SpotLight} [light=null] - The spot light source. + */ + constructor(light?: SpotLight | null); + /** + * Uniform node representing the cone cosine. + * + * @type {UniformNode} + */ + coneCosNode: UniformNode; + /** + * Uniform node representing the penumbra cosine. + * + * @type {UniformNode} + */ + penumbraCosNode: UniformNode; + /** + * Uniform node representing the cutoff distance. + * + * @type {UniformNode} + */ + cutoffDistanceNode: UniformNode; + /** + * Uniform node representing the decay exponent. + * + * @type {UniformNode} + */ + decayExponentNode: UniformNode; + /** + * Overwritten to updated spot light specific uniforms. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update(frame: NodeFrame): void; + /** + * Computes the spot attenuation for the given angle. + * + * @param {NodeBuilder} builder - The node builder. + * @param {Node} angleCosine - The angle to compute the spot attenuation for. + * @return {Node} The spot attenuation. + */ + getSpotAttenuation(builder: NodeBuilder, angleCosine: Node): Node; + getLightCoord(builder: any): any; + setupDirect(builder: any): { + lightColor: any; + lightDirection: any; + }; +} +import { SpriteMaterial } from './three.core.js'; +/** + * Node material version of {@link SpriteMaterial}. + * + * @augments NodeMaterial + */ +export class SpriteNodeMaterial extends NodeMaterial { + /** + * Constructs a new sprite node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSpriteNodeMaterial: boolean; + _useSizeAttenuation: boolean; + /** + * The rotation of sprite materials is by default inferred from the `rotation`, + * property. This node property allows to overwrite the default and define + * the rotation with a node instead. + * + * If you don't want to overwrite the rotation but modify the existing + * value instead, use {@link materialRotation}. + * + * @type {?Node} + * @default null + */ + rotationNode: Node | null; + /** + * This node property provides an additional way to scale sprites next to + * `Object3D.scale`. The scale transformation based in `Object3D.scale` + * is multiplied with the scale value of this node in the vertex shader. + * + * @type {?Node} + * @default null + */ + scaleNode: Node | null; + /** + * Setups the position node in view space. This method implements + * the sprite specific vertex shader. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The position in view space. + */ + setupPositionView(builder: NodeBuilder): Node; + copy(source: any): NodeMaterial; + set sizeAttenuation(value: boolean); + /** + * Whether to use size attenuation or not. + * + * @type {boolean} + * @default true + */ + get sizeAttenuation(): boolean; +} +import { SrcAlphaFactor } from './three.core.js'; +import { SrcAlphaSaturateFactor } from './three.core.js'; +import { SrcColorFactor } from './three.core.js'; +/** + * Stack is a helper for Nodes that need to produce stack-based code instead of continuous flow. + * They are usually needed in cases like `If`, `Else`. + * + * @augments Node + */ +export class StackNode extends Node { + /** + * Constructs a new stack node. + * + * @param {?StackNode} [parent=null] - The parent stack node. + */ + constructor(parent?: StackNode | null); + /** + * List of nodes. + * + * @type {Array} + */ + nodes: Array; + /** + * The output node. + * + * @type {?Node} + * @default null + */ + outputNode: Node | null; + /** + * The parent stack node. + * + * @type {?StackNode} + * @default null + */ + parent: StackNode | null; + /** + * The current conditional node. + * + * @private + * @type {ConditionalNode} + * @default null + */ + private _currentCond; + /** + * The expression node. Only + * relevant for Switch/Case. + * + * @private + * @type {Node} + * @default null + */ + private _expressionNode; + /** + * The current node being processed. + * + * @private + * @type {Node} + * @default null + */ + private _currentNode; + /** + * Stores additional data for nodes that are added to the stack. + * + * @private + * @type {Map} + */ + private _nodeDataLibrary; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStackNode: boolean; + getElementType(builder: any): string; + generateNodeType(builder: any): string; + getMemberType(builder: any, name: any): string; + /** + * Adds a node to this stack. + * + * @param {Node} node - The node to add. + * @param {number} [index=-1] - The index of the node. If not specified, the node will be added to the end of the stack. + * @return {StackNode} A reference to this stack node. + */ + addToStack(node: Node, index?: number): StackNode; + /** + * Adds a node to the stack before the current node. + * + * @param {Node} node - The node to add. + * @return {StackNode} A reference to this stack node. + */ + addToStackBefore(node: Node): StackNode; + /** + * Represent an `if` statement in TSL. + * + * @param {Node} boolNode - Represents the condition. + * @param {Function} method - TSL code which is executed if the condition evaluates to `true`. + * @return {StackNode} A reference to this stack node. + */ + If(boolNode: Node, method: Function): StackNode; + /** + * Represent an `elseif` statement in TSL. + * + * @param {Node} boolNode - Represents the condition. + * @param {Function} method - TSL code which is executed if the condition evaluates to `true`. + * @return {StackNode} A reference to this stack node. + */ + ElseIf(boolNode: Node, method: Function): StackNode; + /** + * Represent an `else` statement in TSL. + * + * @param {Function} method - TSL code which is executed in the `else` case. + * @return {StackNode} A reference to this stack node. + */ + Else(method: Function): StackNode; + /** + * Represents a `switch` statement in TSL. + * + * @param {any} expression - Represents the expression. + * @param {Function} method - TSL code which is executed if the condition evaluates to `true`. + * @return {StackNode} A reference to this stack node. + */ + Switch(expression: any): StackNode; + /** + * Represents a `case` statement in TSL. The TSL version accepts an arbitrary numbers of values. + * The last parameter must be the callback method that should be executed in the `true` case. + * + * @param {...any} params - The values of the `Case()` statement as well as the callback method. + * @return {StackNode} A reference to this stack node. + */ + Case(...params: any[]): StackNode; + /** + * Represents the default code block of a Switch/Case statement. + * + * @param {Function} method - TSL code which is executed in the `else` case. + * @return {StackNode} A reference to this stack node. + */ + Default(method: Function): StackNode; + setup(builder: any): any; + build(builder: any, ...params: any[]): string | Node | null | undefined; +} +/** + * Class representing a stack trace for debugging purposes. + */ +export class StackTrace { + /** + * Creates a StackTrace instance by capturing and filtering the current stack trace. + * + * @param {Error|string|null} stackMessage - An optional stack trace to use instead of capturing a new one. + */ + constructor(stackMessage?: Error | string | null); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStackTrace: boolean; + /** + * The stack trace. + * + * @type {Array<{fn: string, file: string, line: number, column: number}>} + */ + stack: Array<{ + fn: string; + file: string; + line: number; + column: number; + }>; + /** + * Returns a formatted location string of the top stack frame. + * + * @returns {string} The formatted stack trace message. + */ + getLocation(): string; + /** + * Returns the full error message including the stack trace. + * + * @param {string} message - The error message. + * @returns {string} The full error message with stack trace. + */ + getError(message: string): string; +} +import { StaticDrawUsage } from './three.core.js'; +/** + * This special type of texture is intended for compute shaders. + * It can be used to compute the data of a texture with a compute shader. + * + * Note: This type of texture can only be used with `WebGPURenderer` + * and a WebGPU backend. + * + * @augments Texture + */ +export class Storage3DTexture extends Texture { + /** + * Constructs a new storage texture. + * + * @param {number} [width=1] - The storage texture's width. + * @param {number} [height=1] - The storage texture's height. + * @param {number} [depth=1] - The storage texture's depth. + */ + constructor(width?: number, height?: number, depth?: number); + isArrayTexture: boolean; + /** + * This defines how the texture is wrapped in the depth direction and corresponds to + * *W* in UVW mapping. + * + * @type {number} + */ + wrapR: number; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStorageTexture: boolean; + /** + * Indicates whether this texture is a 3D texture. + * + * @type {boolean} + * + */ + is3DTexture: boolean; + /** + * Sets the size of the storage 3d texture. + * + * @param {number} width - The new width of the storage texture. + * @param {number} height - The new height of the storage texture. + * @param {number} depth - The new depth of the storage texture. + */ + setSize(width: number, height: number, depth: number): void; +} +/** + * This class enables element access on instances of {@link StorageBufferNode}. + * In most cases, it is indirectly used when accessing elements with the + * {@link StorageBufferNode#element} method. + * + * ```js + * const position = positionStorage.element( instanceIndex ); + * ``` + * + * @augments ArrayElementNode + */ +export class StorageArrayElementNode extends ArrayElementNode { + /** + * Constructs storage buffer element node. + * + * @param {StorageBufferNode} storageBufferNode - The storage buffer node. + * @param {Node} indexNode - The index node that defines the element access. + */ + constructor(storageBufferNode: StorageBufferNode, indexNode: Node); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStorageArrayElementNode: boolean; + /** + * The storage buffer node. + * + * @param {Node} value + * @type {StorageBufferNode} + */ + set storageBufferNode(value: Node); + get storageBufferNode(): Node; + getMemberType(builder: any, name: any): any; + setup(builder: any): Node | null; + generate(builder: any, output: any): any; +} +/** + * This special type of texture is intended for compute shaders. + * It can be used to compute the data of a texture with a compute shader. + * + * Note: This type of texture can only be used with `WebGPURenderer` + * and a WebGPU backend. + * + * @augments Texture + */ +export class StorageArrayTexture extends Texture { + /** + * Constructs a new storage texture. + * + * @param {number} [width=1] - The storage texture's width. + * @param {number} [height=1] - The storage texture's height. + * @param {number} [depth=1] - The storage texture's depth. + */ + constructor(width?: number, height?: number, depth?: number); + isArrayTexture: boolean; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStorageTexture: boolean; + /** + * Sets the size of the storage array texture. + * + * @param {number} width - The new width of the storage texture. + * @param {number} height - The new height of the storage texture. + * @param {number} depth - The new depth of the storage texture. + */ + setSize(width: number, height: number, depth: number): void; +} +/** + * This special type of buffer attribute is intended for compute shaders. + * In earlier three.js versions it was only possible to update attribute data + * on the CPU via JavaScript and then upload the data to the GPU. With the + * new material system and renderer it is now possible to use compute shaders + * to compute the data for an attribute more efficiently on the GPU. + * + * The idea is to create an instance of this class and provide it as an input + * to {@link StorageBufferNode}. + * + * Note: This type of buffer attribute can only be used with `WebGPURenderer`. + * + * @augments BufferAttribute + */ +export class StorageBufferAttribute extends BufferAttribute { + /** + * Constructs a new storage buffer attribute. + * + * @param {number|TypedArray} count - The item count. It is also valid to pass a typed array as an argument. + * The subsequent parameters are then obsolete. + * @param {number} itemSize - The item size. + * @param {TypedArray.constructor} [typeClass=Float32Array] - A typed array constructor. + */ + constructor(count: number | TypedArray, itemSize: number, typeClass?: TypedArray.constructor); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStorageBufferAttribute: boolean; +} +/** + * This node is used in context of compute shaders and allows to define a + * storage buffer for data. A typical workflow is to create instances of + * this node with the convenience functions `attributeArray()` or `instancedArray()`, + * setup up a compute shader that writes into the buffers and then convert + * the storage buffers to attribute nodes for rendering. + * + * ```js + * const positionBuffer = instancedArray( particleCount, 'vec3' ); // the storage buffer node + * + * const computeInit = Fn( () => { // the compute shader + * + * const position = positionBuffer.element( instanceIndex ); + * + * // compute position data + * + * position.x = 1; + * position.y = 1; + * position.z = 1; + * + * } )().compute( particleCount ); + * + * const particleMaterial = new THREE.SpriteNodeMaterial(); + * particleMaterial.positionNode = positionBuffer.toAttribute(); + * + * renderer.computeAsync( computeInit ); + * + * ``` + * + * @augments BufferNode + */ +export class StorageBufferNode extends BufferNode { + /** + * Constructs a new storage buffer node. + * + * @param {StorageBufferAttribute|StorageInstancedBufferAttribute|BufferAttribute} value - The buffer data. + * @param {?(string|Struct)} [bufferType=null] - The buffer type (e.g. `'vec3'`). + * @param {number} [bufferCount=0] - The buffer count. + */ + constructor(value: StorageBufferAttribute | StorageInstancedBufferAttribute | BufferAttribute, bufferType?: (string | Struct) | null, bufferCount?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStorageBufferNode: boolean; + /** + * The buffer struct type. + * + * @type {?StructTypeNode} + * @default null + */ + structTypeNode: StructTypeNode | null; + /** + * The access type of the texture node. + * + * @type {string} + * @default 'readWrite' + */ + access: string; + /** + * Whether the node is atomic or not. + * + * @type {boolean} + * @default false + */ + isAtomic: boolean; + /** + * Whether the node represents a PBO or not. + * Only relevant for WebGL. + * + * @type {boolean} + * @default false + */ + isPBO: boolean; + /** + * A reference to the internal buffer attribute node. + * + * @private + * @type {?BufferAttributeNode} + * @default null + */ + private _attribute; + /** + * A reference to the internal varying node. + * + * @private + * @type {?VaryingNode} + * @default null + */ + private _varying; + /** + * This method is overwritten since the buffer data might be shared + * and thus the hash should be shared as well. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The hash. + */ + getHash(builder: NodeBuilder): string; + /** + * Enables element access with the given index node. + * + * @param {IndexNode} indexNode - The index node. + * @return {StorageArrayElementNode} A node representing the element access. + */ + element(indexNode: IndexNode): StorageArrayElementNode; + /** + * Defines whether this node is a PBO or not. Only relevant for WebGL. + * + * @param {boolean} value - The value so set. + * @return {StorageBufferNode} A reference to this node. + */ + setPBO(value: boolean): StorageBufferNode; + /** + * Returns the `isPBO` value. + * + * @return {boolean} Whether the node represents a PBO or not. + */ + getPBO(): boolean; + /** + * Defines the node access. + * + * @param {string} value - The node access. + * @return {StorageBufferNode} A reference to this node. + */ + setAccess(value: string): StorageBufferNode; + /** + * Convenience method for configuring a read-only node access. + * + * @return {StorageBufferNode} A reference to this node. + */ + toReadOnly(): StorageBufferNode; + /** + * Defines whether the node is atomic or not. + * + * @param {boolean} value - The atomic flag. + * @return {StorageBufferNode} A reference to this node. + */ + setAtomic(value: boolean): StorageBufferNode; + /** + * Convenience method for making this node atomic. + * + * @return {StorageBufferNode} A reference to this node. + */ + toAtomic(): StorageBufferNode; + /** + * Returns attribute data for this storage buffer node. + * + * @return {{attribute: BufferAttributeNode, varying: VaryingNode}} The attribute data. + */ + getAttributeData(): { + attribute: BufferAttributeNode; + varying: VaryingNode; + }; + /** + * This method is overwritten since the node type from the availability of storage buffers + * and the attribute data. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Returns the type of a member of the struct. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} name - The name of the member. + * @return {string} The type of the member. + */ + getMemberType(builder: NodeBuilder, name: string): string; + /** + * Generates the code snippet of the storage buffer node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The generated code snippet. + */ + generate(builder: NodeBuilder): string; +} +/** + * This special type of instanced buffer attribute is intended for compute shaders. + * In earlier three.js versions it was only possible to update attribute data + * on the CPU via JavaScript and then upload the data to the GPU. With the + * new material system and renderer it is now possible to use compute shaders + * to compute the data for an attribute more efficiently on the GPU. + * + * The idea is to create an instance of this class and provide it as an input + * to {@link StorageBufferNode}. + * + * Note: This type of buffer attribute can only be used with `WebGPURenderer`. + * + * @augments InstancedBufferAttribute + */ +export class StorageInstancedBufferAttribute extends InstancedBufferAttribute { + /** + * Constructs a new storage instanced buffer attribute. + * + * @param {number|TypedArray} count - The item count. It is also valid to pass a typed array as an argument. + * The subsequent parameters are then obsolete. + * @param {number} itemSize - The item size. + * @param {TypedArray.constructor} [typeClass=Float32Array] - A typed array constructor. + */ + constructor(count: number | TypedArray, itemSize: number, typeClass?: TypedArray.constructor); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStorageInstancedBufferAttribute: boolean; +} +/** + * This special type of texture is intended for compute shaders. + * It can be used to compute the data of a texture with a compute shader. + * + * Note: This type of texture can only be used with `WebGPURenderer` + * and a WebGPU backend. + * + * @augments Texture + */ +export class StorageTexture extends Texture { + /** + * Constructs a new storage texture. + * + * @param {number} [width=1] - The storage texture's width. + * @param {number} [height=1] - The storage texture's height. + */ + constructor(width?: number, height?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStorageTexture: boolean; + /** + * When `true`, mipmaps will be auto-generated after compute writes. + * When `false`, mipmaps must be written manually via compute shaders. + * + * @type {boolean} + * @default true + */ + mipmapsAutoUpdate: boolean; + /** + * Sets the size of the storage texture. + * + * @param {number} width - The new width of the storage texture. + * @param {number} height - The new height of the storage texture. + */ + setSize(width: number, height: number): void; +} +/** + * This special version of a texture node can be used to + * write data into a storage texture with a compute shader. + * + * ```js + * const storageTexture = new THREE.StorageTexture( width, height ); + * + * const computeTexture = Fn( ( { storageTexture } ) => { + * + * const posX = instanceIndex.mod( width ); + * const posY = instanceIndex.div( width ); + * const indexUV = uvec2( posX, posY ); + * + * // generate RGB values + * + * const r = 1; + * const g = 1; + * const b = 1; + * + * textureStore( storageTexture, indexUV, vec4( r, g, b, 1 ) ).toWriteOnly(); + * + * } ); + * + * const computeNode = computeTexture( { storageTexture } ).compute( width * height ); + * renderer.computeAsync( computeNode ); + * ``` + * + * This node can only be used with a WebGPU backend. + * + * @augments TextureNode + */ +export class StorageTextureNode extends TextureNode { + /** + * Constructs a new storage texture node. + * + * @param {StorageTexture} value - The storage texture. + * @param {Node} uvNode - The uv node. + * @param {?Node} [storeNode=null] - The value node that should be stored in the texture. + */ + constructor(value: StorageTexture, uvNode: Node, storeNode?: Node | null); + /** + * The value node that should be stored in the texture. + * + * @type {?Node} + * @default null + */ + storeNode: Node | null; + /** + * The mip level to write to for storage textures. + * + * @type {number} + * @default 0 + */ + mipLevel: number; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStorageTextureNode: boolean; + /** + * The access type of the texture node. + * + * @type {string} + * @default 'writeOnly' + */ + access: string; + setup(builder: any): any; + /** + * Defines the node access. + * + * @param {string} value - The node access. + * @return {StorageTextureNode} A reference to this node. + */ + setAccess(value: string): StorageTextureNode; + /** + * Sets the mip level to write to. + * + * @param {number} level - The mip level. + * @return {StorageTextureNode} A reference to this node. + */ + setMipLevel(level: number): StorageTextureNode; + /** + * Generates the snippet for the storage texture. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} textureProperty - The texture property. + * @param {string} uvSnippet - The uv snippet. + * @param {?string} levelSnippet - The level snippet. + * @param {?string} biasSnippet - The bias snippet. + * @param {?string} depthSnippet - The depth snippet. + * @param {?string} compareSnippet - The compare snippet. + * @param {?Array} gradSnippet - The grad snippet. + * @param {?string} offsetSnippet - The offset snippet. + * @return {string} The generated code snippet. + */ + generateSnippet(builder: NodeBuilder, textureProperty: string, uvSnippet: string, levelSnippet: string | null, biasSnippet: string | null, depthSnippet: string | null, compareSnippet: string | null, gradSnippet: Array | null, offsetSnippet: string | null): string; + /** + * Convenience method for configuring a read/write node access. + * + * @return {StorageTextureNode} A reference to this node. + */ + toReadWrite(): StorageTextureNode; + /** + * Convenience method for configuring a read-only node access. + * + * @return {StorageTextureNode} A reference to this node. + */ + toReadOnly(): StorageTextureNode; + /** + * Convenience method for configuring a write-only node access. + * + * @return {StorageTextureNode} A reference to this node. + */ + toWriteOnly(): StorageTextureNode; + /** + * Stores a value in this storage texture at the given coordinates. + * + * @param {Node} uvNode - The storage texture coordinates. + * @param {?Node} [storeNode=null] - The value node that should be stored in the texture. + * @return {StorageTextureNode} A storage texture node representing the store operation. + */ + store(uvNode: Node, storeNode?: Node | null): StorageTextureNode; + /** + * Generates the code snippet of the storage texture node. + * + * @param {NodeBuilder} builder - The current node builder. + */ + generateStore(builder: NodeBuilder): void; +} +/** + * StructNode allows to create custom structures with multiple members. + * This can also be used to define structures in attribute and uniform data. + * + * ```js + * // Define a custom struct + * const BoundingBox = struct( { min: 'vec3', max: 'vec3' } ); + * + * // Create a new instance of the struct + * const bb = BoundingBox( vec3( 0 ), vec3( 1 ) ); // style 1 + * const bb = BoundingBox( { min: vec3( 0 ), max: vec3( 1 ) } ); // style 2 + * + * // Access the struct members + * const min = bb.get( 'min' ); + * + * // Assign a new value to a member + * min.assign( vec3() ); + * ``` + * @augments Node + */ +export class StructNode extends Node { + constructor(structTypeNode: any, values: any); + structTypeNode: any; + values: any; + isStructNode: boolean; + generateNodeType(builder: any): any; + getMemberType(builder: any, name: any): any; + _getChildren(): Object[]; + generate(builder: any): any; +} +/** + * Represents a struct type node in the node-based system. + * This class is used to define and manage the layout and types of struct members. + * It extends the base Node class and provides methods to get the length of the struct, + * retrieve member types, and generate the struct type for a builder. + * + * @augments Node + */ +export class StructTypeNode extends Node { + /** + * Creates an instance of StructTypeNode. + * + * @param {Object} membersLayout - The layout of the members for the struct. + * @param {?string} [name=null] - The optional name of the struct. + */ + constructor(membersLayout: Object, name?: string | null); + /** + * The layout of the members for the struct + * + * @type {Array.<{name: string, type: string, atomic: boolean}>} + */ + membersLayout: Array<{ + name: string; + type: string; + atomic: boolean; + }>; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStructTypeNode: boolean; + /** + * Returns the length of the struct in 4-byte elements (e.g. float or int components). + * The length is calculated by summing the lengths of the struct's members, accounting for memory alignment. + * To get the size in bytes, multiply the returned value by 4. + * + * @returns {number} The length of the struct in 4-byte elements. + */ + getLength(): number; + getMemberType(builder: any, name: any): string; + generateNodeType(builder: any): any; + setup(builder: any): void; + generate(builder: any): string; +} +/** + * This node is used to build a sub-build in the node system. + * + * @augments Node + * @param {Node} node - The node to be built in the sub-build. + * @param {string} name - The name of the sub-build. + * @param {?string} [nodeType=null] - The type of the node, if known. + */ +export class SubBuildNode extends Node { + constructor(node: any, name: any, nodeType?: null); + /** + * The node to be built in the sub-build. + * + * @type {Node} + */ + node: Node; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSubBuildNode: boolean; + generateNodeType(builder: any): string; + build(builder: any, ...params: any[]): string | Node | null; +} +/** + * This class represents a set of built in WGSL shader functions that sync + * synchronously execute an operation across a subgroup, or 'warp', of compute + * or fragment shader invocations within a workgroup. Typically, these functions + * will synchronously execute an operation using data from all active invocations + * within the subgroup, then broadcast that result to all active invocations. In + * other graphics APIs, subgroup functions are also referred to as wave intrinsics + * (DirectX/HLSL) or warp intrinsics (CUDA). + * + * @augments TempNode + */ +export class SubgroupFunctionNode extends TempNode { + /** + * Constructs a new function node. + * + * @param {string} method - The subgroup/wave intrinsic method to construct. + * @param {Node} [aNode=null] - The method's first argument. + * @param {Node} [bNode=null] - The method's second argument. + */ + constructor(method: string, aNode?: Node, bNode?: Node); + /** + * The subgroup/wave intrinsic method to construct. + * + * @type {string} + */ + method: string; + /** + * The method's first argument. + * + * @type {Node} + */ + aNode: Node; + /** + * The method's second argument. + * + * @type {Node} + */ + bNode: Node; + getInputType(builder: any): string | null; + generateNodeType(builder: any): string | null; + generate(builder: any, output: any): any; + serialize(data: any): void; + deserialize(data: any): void; +} +export namespace SubgroupFunctionNode { + let SUBGROUP_ELECT: string; + let SUBGROUP_BALLOT: string; + let SUBGROUP_ADD: string; + let SUBGROUP_INCLUSIVE_ADD: string; + let SUBGROUP_EXCLUSIVE_AND: string; + let SUBGROUP_MUL: string; + let SUBGROUP_INCLUSIVE_MUL: string; + let SUBGROUP_EXCLUSIVE_MUL: string; + let SUBGROUP_AND: string; + let SUBGROUP_OR: string; + let SUBGROUP_XOR: string; + let SUBGROUP_MIN: string; + let SUBGROUP_MAX: string; + let SUBGROUP_ALL: string; + let SUBGROUP_ANY: string; + let SUBGROUP_BROADCAST_FIRST: string; + let QUAD_SWAP_X: string; + let QUAD_SWAP_Y: string; + let QUAD_SWAP_DIAGONAL: string; + let SUBGROUP_BROADCAST: string; + let SUBGROUP_SHUFFLE: string; + let SUBGROUP_SHUFFLE_XOR: string; + let SUBGROUP_SHUFFLE_UP: string; + let SUBGROUP_SHUFFLE_DOWN: string; + let QUAD_BROADCAST: string; +} +import { SubtractEquation } from './three.core.js'; +import { SubtractiveBlending } from './three.core.js'; +export var TSL: Readonly<{ + __proto__: null; + BRDF_GGX: () => void; + BRDF_Lambert: () => void; + BasicPointShadowFilter: () => void; + BasicShadowFilter: () => void; + Break: () => ExpressionNode; + Const: (node: Node, name?: string | null) => VarNode; + Continue: () => ExpressionNode; + DFGLUT: () => void; + D_GGX: any; + Discard: (conditional: ConditionalNode | null) => Node; + EPSILON: any; + F_Schlick: () => void; + Fn: typeof Fn; + HALF_PI: any; + INFINITY: any; + If: (...params: any[]) => StackNode; + Loop: (...params: any[]) => LoopNode; + NodeAccess: { + READ_ONLY: string; + WRITE_ONLY: string; + READ_WRITE: string; + }; + NodeShaderStage: { + VERTEX: string; + FRAGMENT: string; + }; + NodeType: { + BOOLEAN: string; + INTEGER: string; + FLOAT: string; + VECTOR2: string; + VECTOR3: string; + VECTOR4: string; + MATRIX2: string; + MATRIX3: string; + MATRIX4: string; + }; + NodeUpdateType: { + NONE: string; + FRAME: string; + RENDER: string; + OBJECT: string; + }; + OnBeforeFrameUpdate: (callback: Function) => EventNode; + OnBeforeMaterialUpdate: (callback: Function) => EventNode; + OnBeforeObjectUpdate: (callback: Function) => EventNode; + OnFrameUpdate: (callback: Function) => EventNode; + OnMaterialUpdate: (callback: Function) => EventNode; + OnObjectUpdate: (callback: Function) => EventNode; + PCFShadowFilter: () => void; + PCFSoftShadowFilter: () => void; + PI: any; + PI2: any; + PointShadowFilter: () => void; + Return: () => ExpressionNode; + Schlick_to_F0: any; + ShaderNode: typeof ShaderNode; + Stack: typeof Stack; + Switch: (...params: any[]) => StackNode; + TBNViewMatrix: any; + TWO_PI: any; + VSMShadowFilter: () => void; + V_GGX_SmithCorrelated: any; + Var: (node: Node, name?: string | null) => VarNode; + VarIntent: (node: Node) => VarNode; + abs: any; + acesFilmicToneMapping: any; + acos: any; + acosh: any; + add: any; + addMethodChaining: typeof addMethodChaining; + addNodeElement: typeof addNodeElement; + agxToneMapping: any; + all: any; + alphaT: any; + and: any; + anisotropy: any; + anisotropyB: any; + anisotropyT: any; + any: any; + append: (node: Node) => Function; + array: (...params: any[]) => ArrayNode; + asin: any; + asinh: any; + assign: any; + atan: any; + atanh: any; + atomicAdd: (pointerNode: Node, valueNode: Node) => AtomicFunctionNode; + atomicAnd: (pointerNode: Node, valueNode: Node) => AtomicFunctionNode; + atomicFunc: (method: string, pointerNode: Node, valueNode: Node) => AtomicFunctionNode; + atomicLoad: (pointerNode: Node) => AtomicFunctionNode; + atomicMax: (pointerNode: Node, valueNode: Node) => AtomicFunctionNode; + atomicMin: (pointerNode: Node, valueNode: Node) => AtomicFunctionNode; + atomicOr: (pointerNode: Node, valueNode: Node) => AtomicFunctionNode; + atomicStore: (pointerNode: Node, valueNode: Node) => AtomicFunctionNode; + atomicSub: (pointerNode: Node, valueNode: Node) => AtomicFunctionNode; + atomicXor: (pointerNode: Node, valueNode: Node) => AtomicFunctionNode; + attenuationColor: any; + attenuationDistance: any; + attribute: (name: string, nodeType?: string | null) => AttributeNode; + attributeArray: (count: number | TypedArray, type?: string | Struct) => StorageBufferNode; + backgroundBlurriness: any; + backgroundIntensity: any; + backgroundRotation: any; + batch: any; + bentNormalView: any; + billboarding: () => void; + bitAnd: any; + bitNot: any; + bitOr: any; + bitXor: any; + bitangentGeometry: any; + bitangentLocal: any; + bitangentView: any; + bitangentWorld: any; + bitcast: any; + blendBurn: any; + blendColor: any; + blendDodge: any; + blendOverlay: any; + blendScreen: any; + blur: () => void; + bool: any; + buffer: (value: Array, type: string, count: number) => BufferNode; + bufferAttribute: (array: BufferAttribute | InterleavedBuffer | TypedArray, type?: string | null, stride?: number, offset?: number) => BufferAttributeNode | Node; + builtin: any; + builtinAOContext: typeof builtinAOContext; + builtinShadowContext: typeof builtinShadowContext; + bumpMap: any; + bvec2: any; + bvec3: any; + bvec4: any; + bypass: any; + cache: typeof cache; + call: (func: any, ...params: any[]) => FunctionCallNode; + cameraFar: any; + cameraIndex: any; + cameraNear: any; + cameraNormalMatrix: any; + cameraPosition: any; + cameraProjectionMatrix: any; + cameraProjectionMatrixInverse: any; + cameraViewMatrix: any; + cameraViewport: any; + cameraWorldMatrix: any; + cbrt: (a: Node | number) => Node; + cdl: () => void; + ceil: any; + checker: () => void; + cineonToneMapping: any; + clamp: (value: Node | number, low?: Node | number, high?: Node | number) => Node; + clearcoat: any; + clearcoatNormalView: any; + clearcoatRoughness: any; + clipSpace: any; + code: any; + color: any; + colorSpaceToWorking: (node: Node, sourceColorSpace: string) => ColorSpaceNode; + colorToDirection: (node: Node) => Node; + compute: (node: Node, count: number | Array, workgroupSize?: Array) => ComputeNode; + computeKernel: (node: Node, workgroupSize?: Array) => ComputeNode; + computeSkinning: (skinnedMesh: SkinnedMesh, toPosition?: Node) => SkinningNode; + context: (nodeOrValue?: Node | Object, value?: Object) => ContextNode; + convert: (node: any, types: any) => ConvertNode; + convertColorSpace: (node: Node, sourceColorSpace: string, targetColorSpace: string) => ColorSpaceNode; + convertToTexture: (node: Node, ...params: any[]) => RTTNode; + cos: any; + cosh: any; + countLeadingZeros: any; + countOneBits: any; + countTrailingZeros: any; + cross: any; + cubeTexture: (value?: (CubeTexture | CubeTextureNode) | null, uvNode?: Node | null, levelNode?: Node | null, biasNode?: Node | null) => CubeTextureNode; + cubeTextureBase: any; + dFdx: any; + dFdy: any; + dashSize: any; + debug: (node: Node, callback?: Function | null) => DebugNode; + decrement: () => void; + decrementBefore: () => void; + defaultBuildStages: string[]; + defaultShaderStages: string[]; + defined: typeof defined; + degrees: any; + deltaTime: any; + densityFogFactor: () => void; + depth: ViewportDepthNode; + depthPass: (scene: Scene, camera: Camera, options: Object) => PassNode; + determinant: any; + difference: any; + diffuseColor: any; + diffuseContribution: any; + directPointLight: ({ color, lightVector, cutoffDistance, decayExponent }: { + color: any; + lightVector: any; + cutoffDistance: any; + decayExponent: any; + }) => { + lightDirection: any; + lightColor: any; + }; + directionToColor: (node: Node) => Node; + directionToFaceDirection: () => void; + dispersion: any; + disposeShadowMaterial: (light: Light) => void; + distance: any; + div: any; + dot: any; + drawIndex: IndexNode; + dynamicBufferAttribute: (array: BufferAttribute | InterleavedBuffer | TypedArray, type?: string | null, stride?: number, offset?: number) => BufferAttributeNode | Node; + element: any; + emissive: any; + equal: any; + equirectUV: () => void; + exp: any; + exp2: any; + exponentialHeightFogFactor: () => void; + expression: any; + faceDirection: any; + faceForward: any; + faceforward: any; + float: any; + floatBitsToInt: (value: Node) => BitcastNode; + floatBitsToUint: (value: Node) => BitcastNode; + floor: any; + fog: () => void; + fract: any; + frameGroup: UniformGroupNode; + frameId: any; + frontFacing: any; + fwidth: any; + gain: (x: Node, k: Node) => Node; + gapSize: any; + getConstNodeType: (value: any) => any; + getCurrentStack: () => any; + getDirection: any; + getDistanceAttenuation: () => void; + getGeometryRoughness: () => void; + getNormalFromDepth: () => void; + getParallaxCorrectNormal: () => void; + getRoughness: () => void; + getScreenPosition: () => void; + getShIrradianceAt: () => void; + getShadowMaterial: (light: Light) => NodeMaterial; + getShadowRenderObjectFunction: (renderer: Renderer, shadow: LightShadow, shadowType: number, useVelocity: boolean) => shadowRenderObjectFunction; + getTextureIndex: typeof getTextureIndex; + getViewPosition: () => void; + ggxConvolution: () => void; + globalId: any; + glsl: (src: string, includes: Array) => CodeNode; + glslFn: (code: any, includes: any) => any; + grayscale: () => void; + greaterThan: any; + greaterThanEqual: any; + hash: () => void; + highpModelNormalViewMatrix: any; + highpModelViewMatrix: any; + hue: () => void; + increment: () => void; + incrementBefore: () => void; + inspector: typeof inspector; + instance: any; + instanceIndex: IndexNode; + instancedArray: (count: number | TypedArray, type?: string | Struct) => StorageBufferNode; + instancedBufferAttribute: (array: BufferAttribute | InterleavedBuffer | TypedArray, type?: string | null, stride?: number, offset?: number) => BufferAttributeNode | Node; + instancedDynamicBufferAttribute: (array: BufferAttribute | InterleavedBuffer | TypedArray, type?: string | null, stride?: number, offset?: number) => BufferAttributeNode | Node; + instancedMesh: any; + int: any; + intBitsToFloat: (value: Node) => BitcastNode; + interleavedGradientNoise: any; + inverse: any; + inverseSqrt: any; + inversesqrt: any; + invocationLocalIndex: IndexNode; + invocationSubgroupIndex: IndexNode; + ior: any; + iridescence: any; + iridescenceIOR: any; + iridescenceThickness: any; + isolate: (node: Node) => IsolateNode; + ivec2: any; + ivec3: any; + ivec4: any; + js: (src: string, includes: Array) => CodeNode; + label: typeof label; + length: any; + lengthSq: (a: Node) => Node; + lessThan: any; + lessThanEqual: any; + lightPosition: typeof lightPosition; + lightProjectionUV: typeof lightProjectionUV; + lightShadowMatrix: typeof lightShadowMatrix; + lightTargetDirection: (light: Light) => Node; + lightTargetPosition: typeof lightTargetPosition; + lightViewPosition: typeof lightViewPosition; + lightingContext: any; + lights: (lights?: Array) => LightsNode; + linearDepth: any; + linearToneMapping: any; + localId: any; + log: any; + log2: any; + logarithmicDepthToViewZ: (depth: Node, near: Node, far: Node) => Node; + luminance: (color: Node, luminanceCoefficients?: Node | null) => Node; + mat2: any; + mat3: any; + mat4: any; + matcapUV: any; + materialAO: any; + materialAlphaTest: any; + materialAnisotropy: any; + materialAnisotropyVector: any; + materialAttenuationColor: any; + materialAttenuationDistance: any; + materialClearcoat: any; + materialClearcoatNormal: any; + materialClearcoatRoughness: any; + materialColor: any; + materialDispersion: any; + materialEmissive: any; + materialEnvIntensity: any; + materialEnvRotation: any; + materialIOR: any; + materialIridescence: any; + materialIridescenceIOR: any; + materialIridescenceThickness: any; + materialLightMap: any; + materialLineDashOffset: any; + materialLineDashSize: any; + materialLineGapSize: any; + materialLineScale: any; + materialLineWidth: any; + materialMetalness: any; + materialNormal: any; + materialOpacity: any; + materialPointSize: any; + materialReference: (name: string, type: string, material?: Material | null) => MaterialReferenceNode; + materialReflectivity: any; + materialRefractionRatio: any; + materialRotation: any; + materialRoughness: any; + materialSheen: any; + materialSheenRoughness: any; + materialShininess: any; + materialSpecular: any; + materialSpecularColor: any; + materialSpecularIntensity: any; + materialSpecularStrength: any; + materialThickness: any; + materialTransmission: any; + max: any; + maxMipLevel: any; + mediumpModelViewMatrix: any; + metalness: any; + min: any; + mix: any; + mixElement: (t: Node | number, e1: Node | number, e2: Node | number) => Node; + mod: any; + modelDirection: any; + modelNormalMatrix: any; + modelPosition: any; + modelRadius: any; + modelScale: any; + modelViewMatrix: any; + modelViewPosition: any; + modelViewProjection: any; + modelWorldMatrix: any; + modelWorldMatrixInverse: any; + morphReference: any; + mrt: any; + mul: any; + mx_aastep: (threshold: any, value: any) => any; + mx_add: (in1: any, in2?: any) => any; + mx_atan2: (in1?: any, in2?: any) => any; + mx_cell_noise_float: (texcoord?: any) => any; + mx_contrast: (input: any, amount?: number, pivot?: number) => any; + mx_divide: (in1: any, in2?: any) => any; + mx_fractal_noise_float: (position?: any, octaves?: number, lacunarity?: number, diminish?: number, amplitude?: number) => any; + mx_fractal_noise_vec2: (position?: any, octaves?: number, lacunarity?: number, diminish?: number, amplitude?: number) => any; + mx_fractal_noise_vec3: (position?: any, octaves?: number, lacunarity?: number, diminish?: number, amplitude?: number) => any; + mx_fractal_noise_vec4: (position?: any, octaves?: number, lacunarity?: number, diminish?: number, amplitude?: number) => any; + mx_frame: () => any; + mx_heighttonormal: (input: any, scale: any) => any; + mx_hsvtorgb: any; + mx_ifequal: (value1: any, value2: any, in1: any, in2: any) => any; + mx_ifgreater: (value1: any, value2: any, in1: any, in2: any) => any; + mx_ifgreatereq: (value1: any, value2: any, in1: any, in2: any) => any; + mx_invert: (in1: any, amount?: any) => any; + mx_modulo: (in1: any, in2?: any) => any; + mx_multiply: (in1: any, in2?: any) => any; + mx_noise_float: (texcoord?: any, amplitude?: number, pivot?: number) => any; + mx_noise_vec3: (texcoord?: any, amplitude?: number, pivot?: number) => any; + mx_noise_vec4: (texcoord?: any, amplitude?: number, pivot?: number) => any; + mx_place2d: (texcoord: any, pivot?: any, scale?: any, rotate?: any, offset?: any) => any; + mx_power: (in1: any, in2?: any) => any; + mx_ramp4: (valuetl: any, valuetr: any, valuebl: any, valuebr: any, texcoord?: any) => any; + mx_ramplr: (valuel: any, valuer: any, texcoord?: any) => any; + mx_ramptb: (valuet: any, valueb: any, texcoord?: any) => any; + mx_rgbtohsv: any; + mx_rotate2d: (input: any, amount: any) => any; + mx_rotate3d: (input: any, amount: any, axis: any) => any; + mx_safepower: (in1: any, in2?: number) => any; + mx_separate: (in1: any, channelOrOut?: null) => any; + mx_splitlr: (valuel: any, valuer: any, center: any, texcoord?: any) => any; + mx_splittb: (valuet: any, valueb: any, center: any, texcoord?: any) => any; + mx_srgb_texture_to_lin_rec709: any; + mx_subtract: (in1: any, in2?: any) => any; + mx_timer: () => any; + mx_transform_uv: (uv_scale?: number, uv_offset?: number, uv_geo?: any) => any; + mx_unifiednoise2d: (noiseType: any, texcoord?: any, freq?: any, offset?: any, jitter?: number, outmin?: number, outmax?: number, clampoutput?: boolean, octaves?: number, lacunarity?: number, diminish?: number) => any; + mx_unifiednoise3d: (noiseType: any, texcoord?: any, freq?: any, offset?: any, jitter?: number, outmin?: number, outmax?: number, clampoutput?: boolean, octaves?: number, lacunarity?: number, diminish?: number) => any; + mx_worley_noise_float: (texcoord?: any, jitter?: number) => any; + mx_worley_noise_vec2: (texcoord?: any, jitter?: number) => any; + mx_worley_noise_vec3: (texcoord?: any, jitter?: number) => any; + negate: any; + neutralToneMapping: any; + nodeArray: (val: any, altType?: null) => any; + nodeImmutable: (NodeClass: any, ...params: any[]) => any; + nodeObject: (val: any, altType?: null) => any; + nodeObjectIntent: (val: any, altType?: null) => any; + nodeObjects: (val: any, altType?: null) => any; + nodeProxy: (NodeClass: any, scope?: null, factor?: null, settings?: null) => any; + nodeProxyConstructor: (constructorFunction: any, nodeInstance: any) => any; + nodeProxyIntent: (NodeClass: any, scope?: null, factor?: null, settings?: {}) => any; + normalFlat: any; + normalGeometry: any; + normalLocal: any; + normalMap: any; + normalView: any; + normalViewGeometry: any; + normalWorld: any; + normalWorldGeometry: any; + normalize: any; + not: any; + notEqual: any; + numWorkgroups: any; + objectDirection: any; + objectGroup: UniformGroupNode; + objectPosition: any; + objectRadius: any; + objectScale: any; + objectViewPosition: any; + objectWorldMatrix: any; + oneMinus: any; + or: any; + orthographicDepthToViewZ: () => void; + oscSawtooth: (t?: Node) => Node; + oscSine: (t?: Node) => Node; + oscSquare: (t?: Node) => Node; + oscTriangle: (t?: Node) => Node; + output: any; + outputStruct: any; + overloadingFn: (functionNodes: Array) => FunctionOverloadingNode; + packHalf2x16: any; + packSnorm2x16: any; + packUnorm2x16: any; + parabola: (x: Node, k: Node) => Node; + parallaxDirection: any; + parallaxUV: (uv: Node, scale: Node) => Node; + parameter: (type: string, name: string | null) => ParameterNode; + pass: (scene: Scene, camera: Camera, options: Object) => PassNode; + passTexture: (pass: PassNode, texture: Texture) => PassTextureNode; + pcurve: (x: Node, a: Node, b: Node) => Node; + perspectiveDepthToViewZ: () => void; + pmremTexture: any; + pointShadow: (light: PointLight, shadow?: PointLightShadow | null) => PointShadowNode; + pointUV: PointUVNode; + pointWidth: any; + positionGeometry: any; + positionLocal: any; + positionPrevious: any; + positionView: any; + positionViewDirection: any; + positionWorld: any; + positionWorldDirection: any; + posterize: () => void; + pow: any; + pow2: (x: Node | number) => Node; + pow3: (x: Node | number) => Node; + pow4: (x: Node | number) => Node; + premultiplyAlpha: () => void; + property: (type: string, name?: string | null) => PropertyNode; + quadBroadcast: any; + quadSwapDiagonal: any; + quadSwapX: any; + quadSwapY: any; + radians: any; + rand: () => void; + range: any; + rangeFogFactor: () => void; + reciprocal: any; + reference: (name: string, type: string, object?: Object | null) => ReferenceNode; + referenceBuffer: (name: string, type: string, count: number, object: Object) => ReferenceNode; + reflect: any; + reflectVector: any; + reflectView: any; + reflector: (parameters?: { + target?: Object3D | undefined; + resolution?: number | undefined; + generateMipmaps?: boolean | undefined; + bounces?: boolean | undefined; + depth?: boolean | undefined; + samples?: number | undefined; + defaultTexture?: TextureNode | undefined; + reflector?: ReflectorBaseNode | undefined; + }) => ReflectorNode; + refract: any; + refractVector: any; + refractView: any; + reinhardToneMapping: any; + remap: () => void; + remapClamp: typeof remapClamp; + renderGroup: UniformGroupNode; + renderOutput: (color: Node, toneMapping?: number | null, outputColorSpace?: string | null) => RenderOutputNode; + rendererReference: (name: string, type: string, renderer?: Renderer | null) => RendererReferenceNode; + replaceDefaultUV: typeof replaceDefaultUV; + rotate: any; + rotateUV: () => void; + roughness: any; + round: any; + rtt: (node: Node, ...params: any[]) => RTTNode; + sRGBTransferEOTF: any; + sRGBTransferOETF: any; + sample: (callback: Function, uv?: Node | null) => SampleNode; + sampler: (value: TextureNode | Texture) => Node; + samplerComparison: (value: TextureNode | Texture) => Node; + saturate: (value: Node | number) => Node; + saturation: () => void; + screenCoordinate: any; + screenDPR: any; + screenSize: any; + screenUV: any; + select: any; + setCurrentStack: (stack: any) => void; + setName: (node: Node, name: string) => ContextNode; + shaderStages: string[]; + shadow: (light: Light, shadow?: LightShadow | null) => ShadowNode; + shadowPositionWorld: any; + shapeCircle: () => void; + sharedUniformGroup: (name: string, order?: number, updateType?: null) => UniformGroupNode; + sheen: any; + sheenRoughness: any; + shiftLeft: any; + shiftRight: any; + shininess: any; + sign: any; + sin: any; + sinc: (x: Node, k: Node) => Node; + sinh: any; + skinning: (skinnedMesh: SkinnedMesh) => SkinningNode; + smoothstep: any; + smoothstepElement: (x: Node | number, low: Node | number, high: Node | number) => Node; + specularColor: any; + specularColorBlended: any; + specularF90: any; + spherizeUV: () => void; + split: (node: any, channels: any) => SplitNode; + spritesheetUV: () => void; + sqrt: any; + stack: any; + step: any; + stepElement: (x: Node | number, edge: Node | number) => Node; + storage: (value: StorageBufferAttribute | StorageInstancedBufferAttribute | BufferAttribute, type?: (string | Struct) | null, count?: number) => StorageBufferNode; + storageBarrier: () => BarrierNode; + storageTexture: any; + struct: (membersLayout: Object, name?: string | null) => Function; + sub: any; + subBuild: (node: Node, name: string, type?: string | null) => Node; + subgroupAdd: any; + subgroupAll: any; + subgroupAnd: any; + subgroupAny: any; + subgroupBallot: any; + subgroupBroadcast: any; + subgroupBroadcastFirst: any; + subgroupElect: any; + subgroupExclusiveAdd: any; + subgroupExclusiveMul: any; + subgroupInclusiveAdd: any; + subgroupInclusiveMul: any; + subgroupIndex: IndexNode; + subgroupMax: any; + subgroupMin: any; + subgroupMul: any; + subgroupOr: any; + subgroupShuffle: any; + subgroupShuffleDown: any; + subgroupShuffleUp: any; + subgroupShuffleXor: any; + subgroupSize: any; + subgroupXor: any; + tan: any; + tangentGeometry: any; + tangentLocal: any; + tangentView: any; + tangentWorld: any; + tanh: any; + texture: (value?: (Texture | TextureNode) | null, uvNode?: Node | null, levelNode?: Node | null, biasNode?: Node | null) => TextureNode; + texture3D: any; + texture3DLevel: (value?: (Texture | TextureNode) | null, uvNode?: Node | null, levelNode?: Node | null) => TextureNode; + texture3DLoad: (...params: any[]) => TextureNode; + textureBarrier: () => BarrierNode; + textureBicubic: () => void; + textureBicubicLevel: () => void; + textureCubeUV: () => void; + textureLevel: (value: any, uv: any, level: any) => TextureNode; + textureLoad: (...params: any[]) => TextureNode; + textureSize: any; + textureStore: (value: StorageTexture | StorageTextureNode, uvNode: Node, storeNode?: Node | null) => StorageTextureNode; + thickness: any; + time: any; + toneMapping: (mapping: number, exposure: Node | number, color: Node | Color) => ToneMappingNode; + toneMappingExposure: any; + toonOutlinePass: (scene: Scene, camera: Camera, color?: Color, thickness?: number, alpha?: number) => ToonOutlinePassNode; + transformDirection: any; + transformNormal: () => void; + transformNormalToView: () => void; + transformedClearcoatNormalView: any; + transformedNormalView: any; + transformedNormalWorld: any; + transmission: any; + transpose: any; + triNoise3D: any; + triplanarTexture: (...params: any[]) => Node; + triplanarTextures: () => void; + trunc: any; + uint: any; + uintBitsToFloat: (value: Node) => BitcastNode; + uniform: (value: any | string, type?: string) => UniformNode; + uniformArray: (values: Array, nodeType?: string | null) => UniformArrayNode; + uniformCubeTexture: (value?: CubeTexture | null) => CubeTextureNode; + uniformFlow: (node: Node) => ContextNode; + uniformGroup: (name: string, order?: number, updateType?: null) => UniformGroupNode; + uniformTexture: (value?: Texture | null) => TextureNode; + unpackHalf2x16: any; + unpackNormal: (xy: Node) => Node; + unpackSnorm2x16: any; + unpackUnorm2x16: any; + unpremultiplyAlpha: () => void; + userData: (name: string, inputType: string, userData: Object | null) => UserDataNode; + uv: (index?: number) => AttributeNode; + uvec2: any; + uvec3: any; + uvec4: any; + varying: any; + varyingProperty: (type: string, name?: string | null) => PropertyNode; + vec2: any; + vec3: any; + vec4: any; + vectorComponents: string[]; + velocity: VelocityNode; + vertexColor: (index?: number) => VertexColorNode; + vertexIndex: IndexNode; + vertexStage: (node: Node) => VaryingNode; + vibrance: () => void; + viewZToLogarithmicDepth: (viewZ: Node, near: Node, far: Node) => Node; + viewZToOrthographicDepth: (viewZ: Node, near: Node, far: Node) => Node; + viewZToPerspectiveDepth: (viewZ: Node, near: Node, far: Node) => Node; + viewZToReversedOrthographicDepth: (viewZ: Node, near: Node, far: Node) => Node; + viewZToReversedPerspectiveDepth: (viewZ: Node, near: Node, far: Node) => Node; + viewport: any; + viewportCoordinate: any; + viewportDepthTexture: any; + viewportLinearDepth: ViewportDepthNode; + viewportMipTexture: any; + viewportOpaqueMipTexture: (uv?: Node | null, level?: Node | null) => ViewportTextureNode; + viewportResolution: any; + viewportSafeUV: () => void; + viewportSharedTexture: any; + viewportSize: any; + viewportTexture: any; + viewportUV: any; + vogelDiskSample: any; + wgsl: (src: string, includes: Array) => CodeNode; + wgslFn: (code: any, includes: any) => any; + workgroupArray: (type: string, count?: number) => WorkgroupInfoNode; + workgroupBarrier: () => BarrierNode; + workgroupId: any; + workingToColorSpace: (node: Node, targetColorSpace: string) => ColorSpaceNode; + xor: any; +}>; +import { TangentSpaceNormalMap } from './three.core.js'; +/** + * This module uses cache management to create temporary variables + * if the node is used more than once to prevent duplicate calculations. + * + * The class acts as a base class for many other nodes types. + * + * @augments Node + */ +export class TempNode extends Node { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isTempNode: boolean; + /** + * Whether this node is used more than once in context of other nodes. + * + * @param {NodeBuilder} builder - The node builder. + * @return {boolean} A flag that indicates if there is more than one dependency to other nodes. + */ + hasDependencies(builder: NodeBuilder): boolean; + build(builder: any, output: any): any; +} +import { Texture } from './three.core.js'; +/** + * This type of uniform node represents a 3D texture. + * + * @augments TextureNode + */ +export class Texture3DNode extends TextureNode { + /** + * Constructs a new 3D texture node. + * + * @param {Data3DTexture} value - The 3D texture. + * @param {?Node} [uvNode=null] - The uv node. + * @param {?Node} [levelNode=null] - The level node. + */ + constructor(value: Data3DTexture, uvNode?: Node | null, levelNode?: Node | null); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isTexture3DNode: boolean; + /** + * Overwritten with an empty implementation since the `updateMatrix` flag is ignored + * for 3D textures. The uv transformation matrix is not applied to 3D textures. + * + * @param {boolean} value - The update toggle. + */ + setUpdateMatrix(): void; + /** + * Computes the normal for the given uv. These texture coordiantes represent a + * position inside the 3D texture. Unlike geometric normals, this normal + * represents a slope or gradient of scalar data inside the 3D texture. + * + * @param {Node} uvNode - The uv node that defines a position in the 3D texture. + * @return {Node} The normal representing the slope/gradient in the data. + */ + normal(uvNode: Node): Node; +} +/** + * This type of uniform node represents a 2D texture. + * + * @augments UniformNode + */ +export class TextureNode extends UniformNode { + /** + * Constructs a new texture node. + * + * @param {Texture} [value=EmptyTexture] - The texture. + * @param {?Node} [uvNode=null] - The uv node. + * @param {?Node} [levelNode=null] - The level node. + * @param {?Node} [biasNode=null] - The bias node. + */ + constructor(value?: Texture, uvNode?: Node | null, levelNode?: Node | null, biasNode?: Node | null); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isTextureNode: boolean; + /** + * Represents the texture coordinates. + * + * @type {?Node} + * @default null + */ + uvNode: Node | null; + /** + * Represents the mip level that should be selected. + * + * @type {?Node} + * @default null + */ + levelNode: Node | null; + /** + * Represents the bias to be applied during level-of-detail computation. + * + * @type {?Node} + * @default null + */ + biasNode: Node | null; + /** + * Represents a reference value a texture sample is compared to. + * + * @type {?Node} + * @default null + */ + compareNode: Node | null; + /** + * When using texture arrays, the depth node defines the layer to select. + * + * @type {?Node} + * @default null + */ + depthNode: Node | null; + /** + * When defined, a texture is sampled using explicit gradients. + * + * @type {?Array>} + * @default null + */ + gradNode: Array> | null; + /** + * Represents the optional index constant of the channel to gather. + * This must be in range [0, 3] and a compile-time constant. + * + * @type {?Node} + * @default null + */ + gatherNode: Node | null; + /** + * Represents the optional texel offset applied to the unnormalized texture + * coordinate before sampling the texture. + * + * @type {?Node} + * @default null + */ + offsetNode: Node | null; + /** + * Whether texture values should be sampled or fetched. + * + * @type {boolean} + * @default true + */ + sampler: boolean; + /** + * Whether the uv transformation matrix should be + * automatically updated or not. Use `setUpdateMatrix()` + * if you want to change the value of the property. + * + * @type {boolean} + * @default false + */ + updateMatrix: boolean; + /** + * The reference node. + * + * @type {?Node} + * @default null + */ + referenceNode: Node | null; + /** + * The texture value is stored in a private property. + * + * @private + * @type {Texture} + */ + private _value; + /** + * The uniform node that represents the uv transformation matrix. + * + * @private + * @type {?UniformNode} + * @default null + */ + private _matrixUniform; + /** + * The uniform node that represents the y-flip. Only required for WebGL. + * + * @private + * @type {?UniformNode} + * @default null + */ + private _flipYUniform; + set value(value: Texture); + /** + * The texture value. + * + * @type {Texture} + */ + get value(): Texture; + /** + * Overwritten since the uniform hash is defined by the texture's UUID. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The uniform hash. + */ + getUniformHash(): string; + /** + * Overwritten since the node type is inferred from the texture type. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(): string; + /** + * Overwrites the default implementation to return a fixed value `'texture'`. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The input type. + */ + getInputType(): string; + /** + * Returns a default uvs based on the current texture's channel. + * + * @return {AttributeNode} The default uvs. + */ + getDefaultUV(): AttributeNode; + /** + * Overwritten to always return the texture reference of the node. + * + * @param {any} state - This method can be invocated in different contexts so `state` can refer to any object type. + * @return {Texture} The texture reference. + */ + updateReference(): Texture; + /** + * Transforms the given uv node with the texture transformation matrix. + * + * @param {Node} uvNode - The uv node to transform. + * @return {Node} The transformed uv node. + */ + getTransformedUV(uvNode: Node): Node; + /** + * Defines whether the uv transformation matrix should automatically be updated or not. + * + * @param {boolean} value - The update toggle. + * @return {TextureNode} A reference to this node. + */ + setUpdateMatrix(value: boolean): TextureNode; + /** + * Setups the uv node. Depending on the backend as well as texture's image and type, it might be necessary + * to modify the uv node for correct sampling. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {Node} uvNode - The uv node to setup. + * @return {Node} The updated uv node. + */ + setupUV(builder: NodeBuilder, uvNode: Node): Node; + /** + * Setups texture node by preparing the internal nodes for code generation. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setup(builder: NodeBuilder): void; + /** + * Generates the uv code snippet. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {Node} uvNode - The uv node to generate code for. + * @return {string} The generated code snippet. + */ + generateUV(builder: NodeBuilder, uvNode: Node): string; + /** + * Generates the offset code snippet. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {Node} offsetNode - The offset node to generate code for. + * @return {string} The generated code snippet. + */ + generateOffset(builder: NodeBuilder, offsetNode: Node): string; + /** + * Generates the snippet for the texture sampling. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} textureProperty - The texture property. + * @param {string} uvSnippet - The uv snippet. + * @param {?string} levelSnippet - The level snippet. + * @param {?string} biasSnippet - The bias snippet. + * @param {?string} depthSnippet - The depth snippet. + * @param {?string} compareSnippet - The compare snippet. + * @param {?Array} gradSnippet - The grad snippet. + * @param {?string} gatherSnippet - The gather snippet. + * @param {?string} offsetSnippet - The offset snippet. + * @param {?string} flipYSnippet - The y-flip snippet. Only used for WebGL. + * @return {string} The generated code snippet. + */ + generateSnippet(builder: NodeBuilder, textureProperty: string, uvSnippet: string, levelSnippet: string | null, biasSnippet: string | null, depthSnippet: string | null, compareSnippet: string | null, gradSnippet: Array | null, gatherSnippet: string | null, offsetSnippet: string | null, flipYSnippet: string | null): string; + /** + * Generates the code snippet of the texture node. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} output - The current output. + * @return {string} The generated code snippet. + */ + generate(builder: NodeBuilder, output: string): string; + /** + * Sets the sampler value. + * + * @param {boolean} value - The sampler value to set. + * @return {TextureNode} A reference to this texture node. + */ + setSampler(value: boolean): TextureNode; + /** + * Returns the sampler value. + * + * @return {boolean} The sampler value. + */ + getSampler(): boolean; + /** + * Samples the texture with the given uv node. + * + * @param {Node} uvNode - The uv node. + * @return {TextureNode} A texture node representing the texture sample. + */ + sample(uvNode: Node): TextureNode; + /** + * TSL function for creating a texture node that fetches/loads texels without interpolation. + * + * @param {Node} uvNode - The uv node. + * @returns {TextureNode} A texture node representing the texture load. + */ + load(uvNode: Node): TextureNode; + /** + * Samples a blurred version of the texture by defining an internal bias. + * + * @param {Node} amountNode - How blurred the texture should be. + * @return {TextureNode} A texture node representing the texture sample. + */ + blur(amountNode: Node): TextureNode; + /** + * Samples a specific mip of the texture. + * + * @param {Node} levelNode - The mip level to sample. + * @return {TextureNode} A texture node representing the texture sample. + */ + level(levelNode: Node): TextureNode; + /** + * Returns the texture size of the requested level. + * + * @param {Node} levelNode - The level to compute the size for. + * @return {TextureSizeNode} The texture size. + */ + size(levelNode: Node): TextureSizeNode; + /** + * Samples the texture with the given bias. + * + * @param {Node} biasNode - The bias node. + * @return {TextureNode} A texture node representing the texture sample. + */ + bias(biasNode: Node): TextureNode; + /** + * Returns the base texture of this node. + * @return {TextureNode} The base texture node. + */ + getBase(): TextureNode; + /** + * Samples the texture by executing a compare operation. + * + * @param {Node} compareNode - The node that defines the compare value. + * @return {TextureNode} A texture node representing the texture sample. + */ + compare(compareNode: Node): TextureNode; + /** + * Samples the texture using an explicit gradient. + * + * @param {Node} gradNodeX - The gradX node. + * @param {Node} gradNodeY - The gradY node. + * @return {TextureNode} A texture node representing the texture sample. + */ + grad(gradNodeX: Node, gradNodeY: Node): TextureNode; + /** + * Gathers four texels from the texture. + * + * @param {Node} gatherNode - The index of the channel to read. This must be in range [0, 3] and a compile-time constant. + * @return {TextureNode} A texture node representing the texture sample. + */ + gather(gatherNode?: Node): TextureNode; + /** + * Samples the texture by defining a depth node. + * + * @param {Node} depthNode - The depth node. + * @return {TextureNode} A texture node representing the texture sample. + */ + depth(depthNode: Node): TextureNode; + /** + * Samples the texture by defining an offset node. + * + * @param {Node} offsetNode - The offset node. + * @return {TextureNode} A texture node representing the texture sample. + */ + offset(offsetNode: Node): TextureNode; + /** + * The update is used to implement the update of the uv transformation matrix. + */ + update(): void; + /** + * Clones the texture node. + * + * @return {TextureNode} The cloned texture node. + */ + clone(): TextureNode; +} +/** + * A node that represents the dimensions of a texture. The texture size is + * retrieved in the shader via built-in shader functions like `textureDimensions()` + * or `textureSize()`. + * + * @augments Node + */ +export class TextureSizeNode extends Node { + /** + * Constructs a new texture size node. + * + * @param {TextureNode} textureNode - A texture node which size should be retrieved. + * @param {?Node} [levelNode=null] - A level node which defines the requested mip. + */ + constructor(textureNode: TextureNode, levelNode?: Node | null); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isTextureSizeNode: boolean; + /** + * A texture node which size should be retrieved. + * + * @type {TextureNode} + */ + textureNode: TextureNode; + /** + * A level node which defines the requested mip. + * + * @type {Node} + * @default null + */ + levelNode: Node; + generate(builder: any, output: any): any; +} +import { TimestampQuery } from './three.core.js'; +/** + * This node represents a tone mapping operation. + * + * @augments TempNode + */ +export class ToneMappingNode extends TempNode { + /** + * Constructs a new tone mapping node. + * + * @param {number} toneMapping - The tone mapping type. + * @param {Node} exposureNode - The tone mapping exposure. + * @param {Node} [colorNode=null] - The color node to process. + */ + constructor(toneMapping: number, exposureNode?: Node, colorNode?: Node); + /** + * The tone mapping type. + * + * @private + * @type {number} + */ + private _toneMapping; + /** + * The tone mapping exposure. + * + * @type {Node} + * @default null + */ + exposureNode: Node; + /** + * Represents the color to process. + * + * @type {?Node} + * @default null + */ + colorNode: Node | null; + /** + * Sets the tone mapping type. + * + * @param {number} value - The tone mapping type. + * @return {ToneMappingNode} A reference to this node. + */ + setToneMapping(value: number): ToneMappingNode; + /** + * Gets the tone mapping type. + * + * @returns {number} The tone mapping type. + */ + getToneMapping(): number; + setup(builder: any): any; +} +/** + * Represents a render pass for producing a toon outline effect on compatible objects. + * Only 3D objects with materials of type `MeshToonMaterial` and `MeshToonNodeMaterial` + * will receive the outline. + * + * ```js + * const postProcessing = new RenderPipeline( renderer ); + * + * const scenePass = toonOutlinePass( scene, camera ); + * + * postProcessing.outputNode = scenePass; + * ``` + * @augments PassNode + */ +export class ToonOutlinePassNode extends PassNode { + /** + * Constructs a new outline pass node. + * + * @param {Scene} scene - A reference to the scene. + * @param {Camera} camera - A reference to the camera. + * @param {Node} colorNode - Defines the outline's color. + * @param {Node} thicknessNode - Defines the outline's thickness. + * @param {Node} alphaNode - Defines the outline's alpha. + */ + constructor(scene: Scene, camera: Camera, colorNode: Node, thicknessNode: Node, alphaNode: Node); + /** + * Defines the outline's color. + * + * @type {Node} + */ + colorNode: Node; + /** + * Defines the outline's thickness. + * + * @type {Node} + */ + thicknessNode: Node; + /** + * Defines the outline's alpha. + * + * @type {Node} + */ + alphaNode: Node; + /** + * An internal material cache. + * + * @private + * @type {WeakMap} + */ + private _materialCache; + /** + * Creates the material used for outline rendering. + * + * @private + * @return {NodeMaterial} The outline material. + */ + private _createMaterial; + /** + * For the given toon material, this method returns a corresponding + * outline material. + * + * @private + * @param {(MeshToonMaterial|MeshToonNodeMaterial)} originalMaterial - The toon material. + * @return {NodeMaterial} The outline material. + */ + private _getOutlineMaterial; +} +import { UVMapping } from './three.core.js'; +import { Uint16BufferAttribute } from './three.core.js'; +import { Uint32BufferAttribute } from './three.core.js'; +/** + * Similar to {@link BufferNode} this module represents array-like data as + * uniform buffers. Unlike {@link BufferNode}, it can handle more common + * data types in the array (e.g `three.js` primitives) and automatically + * manage buffer padding. It should be the first choice when working with + * uniforms buffers. + * ```js + * const tintColors = uniformArray( [ + * new Color( 1, 0, 0 ), + * new Color( 0, 1, 0 ), + * new Color( 0, 0, 1 ) + * ], 'color' ); + * + * const redColor = tintColors.element( 0 ); + * + * @augments BufferNode + */ +export class UniformArrayNode extends BufferNode { + /** + * Constructs a new uniform array node. + * + * @param {Array} value - Array holding the buffer data. + * @param {?string} [elementType=null] - The data type of a buffer element. + */ + constructor(value: Array, elementType?: string | null); + /** + * Array holding the buffer data. Unlike {@link BufferNode}, the array can + * hold number primitives as well as three.js objects like vectors, matrices + * or colors. + * + * @type {Array} + */ + array: Array; + /** + * The data type of an array element. + * + * @type {string} + */ + elementType: string; + /** + * The padded type. Uniform buffers must conform to a certain buffer layout + * so a separate type is computed to ensure correct buffer size. + * + * @type {string} + */ + paddedType: string; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isArrayBufferNode: boolean; + /** + * This method is overwritten since the node type is inferred from the + * {@link UniformArrayNode#paddedType}. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(): string; + /** + * The data type of the array elements. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The element type. + */ + getElementType(): string; + /** + * Returns the padded type based on the element type. + * + * @return {string} The padded type. + */ + getPaddedType(): string; + /** + * The update makes sure to correctly transfer the data from the (complex) objects + * in the array to the internal, correctly padded value buffer. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update(): void; + /** + * Implement the value buffer creation based on the array data. + * + * @param {NodeBuilder} builder - A reference to the current node builder. + * @return {null} + */ + setup(builder: NodeBuilder): null; + /** + * Overwrites the default `element()` method to provide element access + * based on {@link UniformArrayNode}. + * + * @param {IndexNode} indexNode - The index node. + * @return {UniformArrayElementNode} + */ + element(indexNode: IndexNode): UniformArrayElementNode; +} +/** + * This node can be used to group single instances of {@link UniformNode} + * and manage them as a uniform buffer. + * + * In most cases, the predefined nodes `objectGroup`, `renderGroup` and `frameGroup` + * will be used when defining the {@link UniformNode#groupNode} property. + * + * - `objectGroup`: Uniform buffer per object. + * - `renderGroup`: Shared uniform buffer, updated once per render call. + * - `frameGroup`: Shared uniform buffer, updated once per frame. + * + * @augments Node + */ +export class UniformGroupNode extends Node { + /** + * Constructs a new uniform group node. + * + * @param {string} name - The name of the uniform group node. + * @param {boolean} [shared=false] - Whether this uniform group node is shared or not. + * @param {number} [order=1] - Influences the internal sorting. + * @param {string|null} [updateType=null] - The update type of the uniform group node. + */ + constructor(name: string, shared?: boolean, order?: number, updateType?: string | null); + /** + * Whether this uniform group node is shared or not. + * + * @type {boolean} + * @default false + */ + shared: boolean; + /** + * Influences the internal sorting. + * TODO: Add details when this property should be changed. + * + * @type {number} + * @default 1 + */ + order: number; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isUniformGroup: boolean; + /** + * Marks the uniform group node as needing an update. + * This will trigger the necessary updates in the rendering process. + */ + update(): void; +} +/** + * Class for representing a uniform. + * + * @augments InputNode + */ +export class UniformNode extends InputNode { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isUniformNode: boolean; + /** + * The uniform group of this uniform. By default, uniforms are + * managed per object but they might belong to a shared group + * which is updated per frame or render call. + * + * @type {UniformGroupNode} + */ + groupNode: UniformGroupNode; + /** + * Sets the {@link UniformNode#name} property. + * + * @param {string} name - The name of the uniform. + * @return {UniformNode} A reference to this node. + */ + setName(name: string): UniformNode; + /** + * Sets the {@link UniformNode#name} property. + * + * @deprecated + * @param {string} name - The name of the uniform. + * @return {UniformNode} A reference to this node. + */ + label(name: string): UniformNode; + /** + * Sets the {@link UniformNode#groupNode} property. + * + * @param {UniformGroupNode} group - The uniform group. + * @return {UniformNode} A reference to this node. + */ + setGroup(group: UniformGroupNode): UniformNode; + /** + * Returns the {@link UniformNode#groupNode}. + * + * @return {UniformGroupNode} The uniform group. + */ + getGroup(): UniformGroupNode; + /** + * By default, this method returns the result of {@link Node#getHash} but derived + * classes might overwrite this method with a different implementation. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The uniform hash. + */ + getUniformHash(builder: NodeBuilder): string; + onUpdate(callback: any, updateType: any): Node; + getInputType(builder: any): string; + generate(builder: any, output: any): any; +} +/** + * This node represents an operation that unpacks values from a 32-bit unsigned integer, reinterpreting the results as a floating-point vector + * + * @augments TempNode + */ +export class UnpackFloatNode extends TempNode { + /** + * + * @param {'snorm' | 'unorm' | 'float16'} encoding - The numeric encoding that describes how the integer values are mapped to the float range + * @param {Node} uintNode - The uint node to be unpacked + */ + constructor(encoding: "snorm" | "unorm" | "float16", uintNode: Node); + /** + * The unsigned integer to be unpacked. + * + * @type {Node} + */ + uintNode: Node; + /** + * The numeric encoding. + * + * @type {string} + */ + encoding: string; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isUnpackFloatNode: boolean; + generateNodeType(): string; + generate(builder: any): string; +} +import { UnsignedByteType } from './three.core.js'; +import { UnsignedInt101111Type } from './three.core.js'; +import { UnsignedInt248Type } from './three.core.js'; +import { UnsignedInt5999Type } from './three.core.js'; +import { UnsignedIntType } from './three.core.js'; +import { UnsignedShort4444Type } from './three.core.js'; +import { UnsignedShort5551Type } from './three.core.js'; +import { UnsignedShortType } from './three.core.js'; +/** + * A special type of reference node that allows to link values in + * `userData` fields to node objects. + * ```js + * sprite.userData.rotation = 1; // stores individual rotation per sprite + * + * const material = new THREE.SpriteNodeMaterial(); + * material.rotationNode = userData( 'rotation', 'float' ); + * ``` + * Since `UserDataNode` is extended from {@link ReferenceNode}, the node value + * will automatically be updated when the `rotation` user data field changes. + * + * @augments ReferenceNode + */ +export class UserDataNode extends ReferenceNode { + /** + * Constructs a new user data node. + * + * @param {string} property - The property name that should be referenced by the node. + * @param {string} inputType - The node data type of the reference. + * @param {?Object} [userData=null] - A reference to the `userData` object. If not provided, the `userData` property of the 3D object that uses the node material is evaluated. + */ + constructor(property: string, inputType: string, userData?: Object | null); + /** + * A reference to the `userData` object. If not provided, the `userData` + * property of the 3D object that uses the node material is evaluated. + * + * @type {?Object} + * @default null + */ + userData: Object | null; +} +import { VSMShadowMap } from './three.core.js'; +/** + * Class for representing shader variables as nodes. Variables are created from + * existing nodes like the following: + * + * ```js + * const depth = sampleDepth( uvNode ).toVar( 'depth' ); + * ``` + * + * @augments Node + */ +export class VarNode extends Node { + /** + * Constructs a new variable node. + * + * @param {Node} node - The node for which a variable should be created. + * @param {?string} [name=null] - The name of the variable in the shader. + * @param {boolean} [readOnly=false] - The read-only flag. + */ + constructor(node: Node, name?: string | null, readOnly?: boolean); + /** + * The node for which a variable should be created. + * + * @type {Node} + */ + node: Node; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isVarNode: boolean; + /** + * + * The read-only flag. + * + * @type {boolean} + * @default false + */ + readOnly: boolean; + /** + * This flag is used to indicate that this node is used for intent. + * + * @type {boolean} + * @default false + */ + intent: boolean; + /** + * Sets the intent flag for this node. + * + * This flag is used to indicate that this node is used for intent + * and should not be built directly. Instead, it is used to indicate that + * the node should be treated as a variable intent. + * + * It's useful for assigning variables without needing creating a new variable node. + * + * @param {boolean} value - The value to set for the intent flag. + * @returns {VarNode} This node. + */ + setIntent(value: boolean): VarNode; + /** + * Checks if this node is used for intent. + * + * @param {NodeBuilder} builder - The node builder. + * @returns {boolean} Whether this node is used for intent. + */ + isIntent(builder: NodeBuilder): boolean; + /** + * Returns the intent flag of this node. + * + * @return {boolean} The intent flag. + */ + getIntent(): boolean; + getMemberType(builder: any, name: any): string; + getElementType(builder: any): string; + generateNodeType(builder: any): string; + getArrayCount(builder: any): number | null; + isAssign(builder: any): any; + build(...params: any[]): string | Node | null; + generate(builder: any): any; + _hasStack(builder: any): boolean; +} +/** + * Class for representing shader varyings as nodes. Varyings are create from + * existing nodes like the following: + * + * ```js + * const positionLocal = positionGeometry.toVarying( 'vPositionLocal' ); + * ``` + * + * @augments Node + */ +export class VaryingNode extends Node { + /** + * Constructs a new varying node. + * + * @param {Node} node - The node for which a varying should be created. + * @param {?string} name - The name of the varying in the shader. + */ + constructor(node: Node, name?: string | null); + /** + * The node for which a varying should be created. + * + * @type {Node} + */ + node: Node; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isVaryingNode: boolean; + /** + * The interpolation type of the varying data. + * + * @type {?string} + * @default null + */ + interpolationType: string | null; + /** + * The interpolation sampling type of varying data. + * + * @type {?string} + * @default null + */ + interpolationSampling: string | null; + /** + * Defines the interpolation type of the varying. + * + * @param {string} type - The interpolation type. + * @param {?string} sampling - The interpolation sampling type + * @return {VaryingNode} A reference to this node. + */ + setInterpolation(type: string, sampling?: string | null): VaryingNode; + getHash(builder: any): string; + generateNodeType(builder: any): string; + /** + * This method performs the setup of a varying node with the current node builder. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {NodeVarying} The node varying from the node builder. + */ + setupVarying(builder: NodeBuilder): NodeVarying; + setup(builder: any): void; + analyze(builder: any): void; + generate(builder: any): any; +} +import { Vector2 } from './three.core.js'; +import { Vector3 } from './three.core.js'; +import { Vector4 } from './three.core.js'; +/** + * A node for representing motion or velocity vectors. Foundation + * for advanced post processing effects like motion blur or TRAA. + * + * The node keeps track of the model, view and projection matrices + * of the previous frame and uses them to compute offsets in NDC space. + * These offsets represent the final velocity. + * + * @augments TempNode + */ +export class VelocityNode extends TempNode { + /** + * Constructs a new vertex color node. + */ + constructor(); + /** + * The current projection matrix. + * + * @type {?Matrix4} + * @default null + */ + projectionMatrix: Matrix4 | null; + /** + * Uniform node representing the previous model matrix in world space. + * + * @type {UniformNode} + * @default null + */ + previousModelWorldMatrix: UniformNode; + /** + * Uniform node representing the previous projection matrix. + * + * @type {UniformNode} + * @default null + */ + previousProjectionMatrix: UniformNode; + /** + * Uniform node representing the previous view matrix. + * + * @type {UniformNode} + * @default null + */ + previousCameraViewMatrix: UniformNode; + /** + * Sets the given projection matrix. + * + * @param {Matrix4} projectionMatrix - The projection matrix to set. + */ + setProjectionMatrix(projectionMatrix: Matrix4): void; + /** + * Updates velocity specific uniforms. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update({ frameId, camera, object }: NodeFrame): void; + /** + * Overwritten to updated velocity specific uniforms. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + updateAfter({ object }: NodeFrame): void; + /** + * Implements the velocity computation based on the previous and current vertex data. + * + * @param {NodeBuilder} builder - A reference to the current node builder. + * @return {Node} The motion vector. + */ + setup(): Node; +} +/** + * An attribute node for representing vertex colors. + * + * @augments AttributeNode + */ +export class VertexColorNode extends AttributeNode { + /** + * Constructs a new vertex color node. + * + * @param {number} index - The attribute index. + */ + constructor(index: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isVertexColorNode: boolean; + /** + * The attribute index to enable more than one sets of vertex colors. + * + * @type {number} + * @default 0 + */ + index: number; +} +/** + * This node offers a collection of features in context of the depth logic in the fragment shader. + * Depending on {@link ViewportDepthNode#scope}, it can be used to define a depth value for the current + * fragment or for depth evaluation purposes. + * + * @augments Node + */ +export class ViewportDepthNode extends Node { + /** + * Constructs a new viewport depth node. + * + * @param {('depth'|'depthBase'|'linearDepth')} scope - The node's scope. + * @param {?Node} [valueNode=null] - The value node. + */ + constructor(scope: ("depth" | "depthBase" | "linearDepth"), valueNode?: Node | null); + /** + * The node behaves differently depending on which scope is selected. + * + * - `ViewportDepthNode.DEPTH_BASE`: Allows to define a value for the current fragment's depth. + * - `ViewportDepthNode.DEPTH`: Represents the depth value for the current fragment (`valueNode` is ignored). + * - `ViewportDepthNode.LINEAR_DEPTH`: Represents the linear (orthographic) depth value of the current fragment. + * If a `valueNode` is set, the scope can be used to convert perspective depth data to linear data. + * + * @type {('depth'|'depthBase'|'linearDepth')} + */ + scope: ("depth" | "depthBase" | "linearDepth"); + /** + * Can be used to define a custom depth value. + * The property is ignored in the `ViewportDepthNode.DEPTH` scope. + * + * @type {?Node} + * @default null + */ + valueNode: Node | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isViewportDepthNode: boolean; + generate(builder: any): any; + setup({ camera }: { + camera: any; + }): any; +} +export namespace ViewportDepthNode { + export let DEPTH_BASE: string; + let DEPTH_1: string; + export { DEPTH_1 as DEPTH }; + export let LINEAR_DEPTH: string; +} +/** + * Represents the depth of the current viewport as a texture. This module + * can be used in combination with viewport texture to achieve effects + * that require depth evaluation. + * + * @augments ViewportTextureNode + */ +export class ViewportDepthTextureNode extends ViewportTextureNode { + /** + * Constructs a new viewport depth texture node. + * + * @param {Node} [uvNode=screenUV] - The uv node. + * @param {?Node} [levelNode=null] - The level node. + * @param {?DepthTexture} [depthTexture=null] - A depth texture. If not provided, uses a shared depth texture. + */ + constructor(uvNode?: Node, levelNode?: Node | null, depthTexture?: DepthTexture | null); +} +/** + * `ViewportTextureNode` creates an internal texture for each node instance. This module + * shares a texture across all instances of `ViewportSharedTextureNode`. It should + * be the first choice when using data of the default/screen framebuffer for performance reasons. + * + * @augments ViewportTextureNode + */ +export class ViewportSharedTextureNode extends ViewportTextureNode { + /** + * Constructs a new viewport shared texture node. + * + * @param {Node} [uvNode=screenUV] - The uv node. + * @param {?Node} [levelNode=null] - The level node. + */ + constructor(uvNode?: Node, levelNode?: Node | null); + /** + * Overwritten so the method always returns the unique shared + * framebuffer texture. + * + * @return {FramebufferTexture} The shared framebuffer texture. + */ + getTextureForReference(): FramebufferTexture; + updateReference(): this; +} +/** + * A special type of texture node which represents the data of the current viewport + * as a texture. The module extracts data from the current bound framebuffer with + * a copy operation so no extra render pass is required to produce the texture data + * (which is good for performance). `ViewportTextureNode` can be used as an input for a + * variety of effects like refractive or transmissive materials. + * + * @augments TextureNode + */ +export class ViewportTextureNode extends TextureNode { + /** + * Constructs a new viewport texture node. + * + * @param {Node} [uvNode=screenUV] - The uv node. + * @param {?Node} [levelNode=null] - The level node. + * @param {?Texture} [framebufferTexture=null] - A framebuffer texture holding the viewport data. If not provided, a framebuffer texture is created automatically. + */ + constructor(uvNode?: Node, levelNode?: Node | null, framebufferTexture?: Texture | null); + /** + * Whether to generate mipmaps or not. + * + * @type {boolean} + * @default false + */ + generateMipmaps: boolean; + /** + * The reference framebuffer texture. This is used to store the framebuffer texture + * for the current render target. If the render target changes, a new framebuffer texture + * is created automatically. + * + * @type {FramebufferTexture} + * @default null + */ + defaultFramebuffer: FramebufferTexture; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isOutputTextureNode: boolean; + /** + * The framebuffer texture for the current renderer context. + * + * @type {WeakMap} + * @private + */ + private _cacheTextures; + /** + * This methods returns a texture for the given render target or canvas target reference. + * + * To avoid rendering errors, `ViewportTextureNode` must use unique framebuffer textures + * for different render contexts. + * + * @param {?(RenderTarget|CanvasTarget)} [reference=null] - The render target or canvas target reference. + * @return {Texture} The framebuffer texture. + */ + getTextureForReference(reference?: (RenderTarget | CanvasTarget) | null): Texture; + updateReference(frame: any): Texture; + updateBefore(frame: any): void; + clone(): any; +} +/** + * Volume node material. + * + * @augments NodeMaterial + */ +export class VolumeNodeMaterial extends NodeMaterial { + /** + * Constructs a new volume node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isVolumeNodeMaterial: boolean; + /** + * Number of steps used for raymarching. + * + * @type {number} + * @default 25 + */ + steps: number; + /** + * Offsets the distance a ray has been traveled through a volume. + * Can be used to implement dithering to reduce banding. + * + * @type {Node} + * @default null + */ + offsetNode: Node; + /** + * Node used for scattering calculations. + * + * @type {Function|FunctionNode} + * @default null + */ + scatteringNode: Function | FunctionNode; + setupLightingModel(): VolumetricLightingModel; +} +/** + * A backend implementation targeting WebGL 2. + * + * @private + * @augments Backend + */ +export class WebGLBackend extends Backend { + /** + * WebGLBackend options. + * + * @typedef {Object} WebGLBackend~Options + * @property {boolean} [logarithmicDepthBuffer=false] - Whether logarithmic depth buffer is enabled or not. + * @property {boolean} [reversedDepthBuffer=false] - Whether reversed depth buffer is enabled or not. + * @property {boolean} [alpha=true] - Whether the default framebuffer (which represents the final contents of the canvas) should be transparent or opaque. + * @property {boolean} [depth=true] - Whether the default framebuffer should have a depth buffer or not. + * @property {boolean} [stencil=false] - Whether the default framebuffer should have a stencil buffer or not. + * @property {boolean} [antialias=false] - Whether MSAA as the default anti-aliasing should be enabled or not. + * @property {number} [samples=0] - When `antialias` is `true`, `4` samples are used by default. Set this parameter to any other integer value than 0 to overwrite the default. + * @property {boolean} [forceWebGL=false] - If set to `true`, the renderer uses a WebGL 2 backend no matter if WebGPU is supported or not. + * @property {WebGL2RenderingContext} [context=undefined] - A WebGL 2 rendering context. + */ + /** + * Constructs a new WebGPU backend. + * + * @param {WebGLBackend~Options} [parameters] - The configuration parameter. + */ + constructor(parameters?: {}); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWebGLBackend: boolean; + /** + * A reference to a backend module holding shader attribute-related + * utility functions. + * + * @type {?WebGLAttributeUtils} + * @default null + */ + attributeUtils: WebGLAttributeUtils | null; + /** + * A reference to a backend module holding extension-related + * utility functions. + * + * @type {?WebGLExtensions} + * @default null + */ + extensions: WebGLExtensions | null; + /** + * A reference to a backend module holding capability-related + * utility functions. + * + * @type {?WebGLCapabilities} + * @default null + */ + capabilities: WebGLCapabilities | null; + /** + * A reference to a backend module holding texture-related + * utility functions. + * + * @type {?WebGLTextureUtils} + * @default null + */ + textureUtils: WebGLTextureUtils | null; + /** + * A reference to a backend module holding renderer-related + * utility functions. + * + * @type {?WebGLBufferRenderer} + * @default null + */ + bufferRenderer: WebGLBufferRenderer | null; + /** + * A reference to the rendering context. + * + * @type {?WebGL2RenderingContext} + * @default null + */ + gl: WebGL2RenderingContext | null; + /** + * A reference to a backend module holding state-related + * utility functions. + * + * @type {?WebGLState} + * @default null + */ + state: WebGLState | null; + /** + * A reference to a backend module holding common + * utility functions. + * + * @type {?WebGLUtils} + * @default null + */ + utils: WebGLUtils | null; + /** + * Dictionary for caching VAOs. + * + * @type {Object} + */ + vaoCache: { + [x: string]: WebGLVertexArrayObject; + }; + /** + * Dictionary for caching transform feedback objects. + * + * @type {Object} + */ + transformFeedbackCache: { + [x: string]: WebGLTransformFeedback; + }; + /** + * Controls if `gl.RASTERIZER_DISCARD` should be enabled or not. + * Only relevant when using compute shaders. + * + * @type {boolean} + * @default false + */ + discard: boolean; + /** + * A reference to the `EXT_disjoint_timer_query_webgl2` extension. `null` if the + * device does not support the extension. + * + * @type {?EXTDisjointTimerQueryWebGL2} + * @default null + */ + disjoint: EXTDisjointTimerQueryWebGL2 | null; + /** + * A reference to the `KHR_parallel_shader_compile` extension. `null` if the + * device does not support the extension. + * + * @type {?KHRParallelShaderCompile} + * @default null + */ + parallel: KHRParallelShaderCompile | null; + /** + * A reference to the current render context. + * + * @private + * @type {RenderContext} + * @default null + */ + private _currentContext; + /** + * A unique collection of bindings. + * + * @private + * @type {WeakSet>} + */ + private _knownBindings; + /** + * Whether the device supports framebuffers invalidation or not. + * + * @private + * @type {boolean} + */ + private _supportsInvalidateFramebuffer; + /** + * The target framebuffer when rendering with + * the WebXR device API. + * + * @private + * @type {?WebGLFramebuffer} + * @default null + */ + private _xrFramebuffer; + /** + * Initializes the backend so it is ready for usage. + * + * @param {Renderer} renderer - The renderer. + */ + init(renderer: Renderer): void; + _onContextLost: ((event: any) => void) | undefined; + drawBuffersIndexedExt: Object | undefined; + /** + * This method performs a readback operation by moving buffer data from + * a storage buffer attribute from the GPU to the CPU. ReadbackBuffer can + * be used to retain and reuse handles to the intermediate buffers and prevent + * new allocation. + * + * @async + * @param {BufferAttribute} attribute - The storage buffer attribute to read frm. + * @param {ReadbackBuffer|ArrayBuffer} target - The storage buffer attribute. + * @param {number} offset - The storage buffer attribute. + * @param {number} count - The offset from which to start reading the + * @return {Promise} A promise that resolves with the buffer data when the data are ready. + */ + getArrayBufferAsync(attribute: BufferAttribute, target?: ReadbackBuffer | ArrayBuffer, offset?: number, count?: number): Promise; + /** + * Ensures the backend is XR compatible. + * + * @async + * @return {Promise} A Promise that resolve when the renderer is XR compatible. + */ + makeXRCompatible(): Promise; + /** + * Sets the XR rendering destination. + * + * @param {WebGLFramebuffer} xrFramebuffer - The XR framebuffer. + */ + setXRTarget(xrFramebuffer: WebGLFramebuffer): void; + /** + * Configures the given XR render target with external textures. + * + * This method is only relevant when using the WebXR Layers API. + * + * @param {XRRenderTarget} renderTarget - The XR render target. + * @param {WebGLTexture} colorTexture - A native color texture. + * @param {?WebGLTexture} [depthTexture=null] - A native depth texture. + */ + setXRRenderTargetTextures(renderTarget: XRRenderTarget, colorTexture: WebGLTexture, depthTexture?: WebGLTexture | null): void; + /** + * Inits a time stamp query for the given render context. + * + * @param {string} type - The type of the timestamp query. + * @param {string} uid - A unique identifier for the timestamp query. + */ + initTimestampQuery(type: string, uid: string): void; + /** + * Prepares the timestamp buffer. + * + * @param {string} type - The type of the timestamp query. + * @param {string} uid - A unique identifier for the timestamp query. + */ + prepareTimestampBuffer(type: string, uid: string): void; + /** + * Returns the backend's rendering context. + * + * @return {WebGL2RenderingContext} The rendering context. + */ + getContext(): WebGL2RenderingContext; + /** + * This method is executed at the beginning of a render call and prepares + * the WebGL state for upcoming render calls + * + * @param {RenderContext} renderContext - The render context. + */ + beginRender(renderContext: RenderContext): void; + /** + * This method is executed at the end of a render call and finalizes work + * after draw calls. + * + * @param {RenderContext} renderContext - The render context. + */ + finishRender(renderContext: RenderContext): void; + /** + * This method processes the result of occlusion queries and writes it + * into render context data. + * + * @async + * @param {RenderContext} renderContext - The render context. + */ + resolveOccludedAsync(renderContext: RenderContext): void; + /** + * Returns `true` if the given 3D object is fully occluded by other + * 3D objects in the scene. + * + * @param {RenderContext} renderContext - The render context. + * @param {Object3D} object - The 3D object to test. + * @return {boolean} Whether the 3D object is fully occluded or not. + */ + isOccluded(renderContext: RenderContext, object: Object3D): boolean; + /** + * Updates the viewport with the values from the given render context. + * + * @param {RenderContext} renderContext - The render context. + */ + updateViewport(renderContext: RenderContext): void; + /** + * Updates the scissor with the values from the given render context. + * + * @param {RenderContext} renderContext - The render context. + */ + updateScissor(renderContext: RenderContext): void; + /** + * Defines the scissor test. + * + * @param {boolean} boolean - Whether the scissor test should be enabled or not. + */ + setScissorTest(boolean: boolean): void; + /** + * Performs a clear operation. + * + * @param {boolean} color - Whether the color buffer should be cleared or not. + * @param {boolean} depth - Whether the depth buffer should be cleared or not. + * @param {boolean} stencil - Whether the stencil buffer should be cleared or not. + * @param {?Object} [descriptor=null] - The render context of the current set render target. + * @param {boolean} [setFrameBuffer=true] - Controls whether the intermediate framebuffer should be set or not. + * @param {boolean} [resolveRenderTarget=true] - Controls whether an active render target should be resolved + * or not. Only relevant for explicit clears. + */ + clear(color: boolean, depth: boolean, stencil: boolean, descriptor?: Object | null, setFrameBuffer?: boolean, resolveRenderTarget?: boolean): void; + /** + * This method is executed at the beginning of a compute call and + * prepares the state for upcoming compute tasks. + * + * @param {Node|Array} computeGroup - The compute node(s). + */ + beginCompute(computeGroup: Node | Array): void; + /** + * Executes a compute command for the given compute node. + * + * @param {Node|Array} computeGroup - The group of compute nodes of a compute call. Can be a single compute node. + * @param {Node} computeNode - The compute node. + * @param {Array} bindings - The bindings. + * @param {ComputePipeline} pipeline - The compute pipeline. + * @param {?number} [count=null] - The count of compute invocations. If `null`, the count is determined by the compute node. + */ + compute(computeGroup: Node | Array, computeNode: Node, bindings: Array, pipeline: ComputePipeline, count?: number | null): void; + /** + * This method is executed at the end of a compute call and + * finalizes work after compute tasks. + * + * @param {Node|Array} computeGroup - The compute node(s). + */ + finishCompute(computeGroup: Node | Array): void; + /** + * Internal to determine if the current render target is a render target array with depth 2D array texture. + * + * @param {RenderContext} renderContext - The render context. + * @return {boolean} Whether the render target is a render target array with depth 2D array texture. + * + * @private + */ + private _isRenderCameraDepthArray; + /** + * Internal draw function. + * + * @private + * @param {Object3D} object - The object to render. + * @param {WebGLBufferRenderer} renderer - The internal renderer. + * @param {number} firstVertex - The first vertex to render. + * @param {number} vertexCount - The vertex count. + * @param {number} instanceCount - The intance count. + * @param {WebGLProgram} programGPU - The raw WebGL shader program. + */ + private _draw; + /** + * Executes a draw command for the given render object. + * + * @param {RenderObject} renderObject - The render object to draw. + * @param {Info} info - Holds a series of statistical information about the GPU memory and the rendering process. + */ + draw(renderObject: RenderObject): void; + /** + * Creates a default texture for the given texture that can be used + * as a placeholder until the actual texture is ready for usage. + * + * @param {Texture} texture - The texture to create a default texture for. + */ + createDefaultTexture(texture: Texture): void; + /** + * Defines a texture on the GPU for the given texture object. + * + * @param {Texture} texture - The texture. + * @param {Object} [options={}] - Optional configuration parameter. + */ + createTexture(texture: Texture, options?: Object): void; + /** + * Uploads the updated texture data to the GPU. + * + * @param {Texture} texture - The texture. + * @param {Object} [options={}] - Optional configuration parameter. + */ + updateTexture(texture: Texture, options?: Object): void; + /** + * Generates mipmaps for the given texture. + * + * @param {Texture} texture - The texture. + */ + generateMipmaps(texture: Texture): void; + /** + * Destroys the GPU data for the given texture object. + * + * @param {Texture} texture - The texture. + * @param {boolean} [isDefaultTexture=false] - Whether the texture uses a default GPU texture or not. + */ + destroyTexture(texture: Texture, isDefaultTexture?: boolean): void; + /** + * Returns texture data as a typed array. + * + * @async + * @param {Texture} texture - The texture to copy. + * @param {number} x - The x coordinate of the copy origin. + * @param {number} y - The y coordinate of the copy origin. + * @param {number} width - The width of the copy. + * @param {number} height - The height of the copy. + * @param {number} faceIndex - The face index. + * @return {Promise} A Promise that resolves with a typed array when the copy operation has finished. + */ + copyTextureToBuffer(texture: Texture, x: number, y: number, width: number, height: number, faceIndex: number): Promise; + /** + * Returns a node builder for the given render object. + * + * @param {RenderObject} object - The render object. + * @param {Renderer} renderer - The renderer. + * @return {GLSLNodeBuilder} The node builder. + */ + createNodeBuilder(object: RenderObject, renderer: Renderer): GLSLNodeBuilder; + /** + * Creates a shader program from the given programmable stage. + * + * @param {ProgrammableStage} program - The programmable stage. + */ + createProgram(program: ProgrammableStage): void; + /** + * Destroys the shader program of the given programmable stage. + * + * @param {ProgrammableStage} program - The programmable stage. + */ + destroyProgram(program: ProgrammableStage): void; + /** + * Creates a render pipeline for the given render object. + * + * @param {RenderObject} renderObject - The render object. + * @param {Array} promises - An array of compilation promises which are used in `compileAsync()`. + */ + createRenderPipeline(renderObject: RenderObject, promises: Array>): void; + /** + * Formats the source code of error messages. + * + * @private + * @param {string} string - The code. + * @param {number} errorLine - The error line. + * @return {string} The formatted code. + */ + private _handleSource; + /** + * Gets the shader compilation errors from the info log. + * + * @private + * @param {WebGL2RenderingContext} gl - The rendering context. + * @param {WebGLShader} shader - The WebGL shader object. + * @param {string} type - The shader type. + * @return {string} The shader errors. + */ + private _getShaderErrors; + /** + * Logs shader compilation errors. + * + * @private + * @param {WebGLProgram} programGPU - The WebGL program. + * @param {WebGLShader} glFragmentShader - The fragment shader as a native WebGL shader object. + * @param {WebGLShader} glVertexShader - The vertex shader as a native WebGL shader object. + */ + private _logProgramError; + /** + * Completes the shader program setup for the given render object. + * + * @private + * @param {RenderObject} renderObject - The render object. + * @param {RenderPipeline} pipeline - The render pipeline. + */ + private _completeCompile; + /** + * Creates a compute pipeline for the given compute node. + * + * @param {ComputePipeline} computePipeline - The compute pipeline. + * @param {Array} bindings - The bindings. + */ + createComputePipeline(computePipeline: ComputePipeline, bindings: Array): void; + /** + * Creates bindings from the given bind group definition. + * + * @param {BindGroup} bindGroup - The bind group. + * @param {Array} bindings - Array of bind groups. + * @param {number} cacheIndex - The cache index. + * @param {number} version - The version. + */ + createBindings(bindGroup: BindGroup, bindings: Array): void; + /** + * Updates the given bind group definition. + * + * @param {BindGroup} bindGroup - The bind group. + * @param {Array} bindings - Array of bind groups. + * @param {number} cacheIndex - The cache index. + * @param {number} version - The version. + */ + updateBindings(bindGroup: BindGroup): void; + /** + * Updates a buffer binding. + * + * @param {Buffer} binding - The buffer binding to update. + */ + updateBinding(binding: Buffer): void; + /** + * Creates a uniform buffer. + * + * @param {Buffer} uniformBuffer - The uniform buffer. + */ + createUniformBuffer(uniformBuffer: Buffer): void; + /** + * Destroys the GPU data for the given uniform buffer. + * + * @param {Buffer} uniformBuffer - The uniform buffer. + */ + destroyUniformBuffer(uniformBuffer: Buffer): void; + /** + * Creates the GPU buffer of an indexed shader attribute. + * + * @param {BufferAttribute} attribute - The indexed buffer attribute. + */ + createIndexAttribute(attribute: BufferAttribute): void; + /** + * Creates the GPU buffer of a shader attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + */ + createAttribute(attribute: BufferAttribute): void; + /** + * Creates the GPU buffer of a storage attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + */ + createStorageAttribute(attribute: BufferAttribute): void; + /** + * Updates the GPU buffer of a shader attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute to update. + */ + updateAttribute(attribute: BufferAttribute): void; + /** + * Destroys the GPU buffer of a shader attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute to destroy. + */ + destroyAttribute(attribute: BufferAttribute): void; + /** + * Checks if the given feature is supported by the backend. + * + * @param {string} name - The feature's name. + * @return {boolean} Whether the feature is supported or not. + */ + hasFeature(name: string): boolean; + /** + * Copies data of the given source texture to the given destination texture. + * + * @param {Texture} srcTexture - The source texture. + * @param {Texture} dstTexture - The destination texture. + * @param {?(Box3|Box2)} [srcRegion=null] - The region of the source texture to copy. + * @param {?(Vector2|Vector3)} [dstPosition=null] - The destination position of the copy. + * @param {number} [srcLevel=0] - The source mip level to copy from. + * @param {number} [dstLevel=0] - The destination mip level to copy to. + */ + copyTextureToTexture(srcTexture: Texture, dstTexture: Texture, srcRegion?: (Box3 | Box2) | null, dstPosition?: (Vector2 | Vector3) | null, srcLevel?: number, dstLevel?: number): void; + /** + * Copies the current bound framebuffer to the given texture. + * + * @param {Texture} texture - The destination texture. + * @param {RenderContext} renderContext - The render context. + * @param {Vector4} rectangle - A four dimensional vector defining the origin and dimension of the copy. + */ + copyFramebufferToTexture(texture: Texture, renderContext: RenderContext, rectangle: Vector4): void; + /** + * Checks if the given compatibility is supported by the backend. + * + * @param {string} name - The compatibility name. + * @return {boolean} Whether the compatibility is supported or not. + */ + hasCompatibility(name: string): boolean; + /** + * Initializes the render target defined in the given render context. + * + * @param {RenderContext} renderContext - The render context. + */ + initRenderTarget(renderContext: RenderContext): void; + /** + * Configures the active framebuffer from the given render context. + * + * @private + * @param {RenderContext} descriptor - The render context. + */ + private _setFramebuffer; + /** + * Computes the VAO key for the given index and attributes. + * + * @private + * @param {Array} attributes - An array of buffer attributes. + * @return {string} The VAO key. + */ + private _getVaoKey; + /** + * Creates a VAO from the index and attributes. + * + * @private + * @param {Array} attributes - An array of buffer attributes. + * @return {Object} The VAO data. + */ + private _createVao; + /** + * Creates a transform feedback from the given transform buffers. + * + * @private + * @param {Array} transformBuffers - The transform buffers. + * @return {WebGLTransformFeedback} The transform feedback. + */ + private _getTransformFeedback; + /** + * Setups the given bindings. + * + * @private + * @param {Array} bindings - The bindings. + * @param {WebGLProgram} programGPU - The WebGL program. + */ + private _setupBindings; + /** + * Binds the given uniforms. + * + * @private + * @param {Array} bindings - The bindings. + */ + private _bindUniforms; + /** + * The method ensures multisampled render targets are resolved. + * + * @private + * @param {RenderContext} renderContext - The render context. + */ + private _resolveRenderTarget; + /** + * Returns `true` if the `WEBGL_multisampled_render_to_texture` extension + * should be used when MSAA is enabled. + * + * @private + * @param {RenderTarget} renderTarget - The render target that should be multisampled. + * @return {boolean} Whether to use the `WEBGL_multisampled_render_to_texture` extension for MSAA or not. + */ + private _useMultisampledExtension; +} +/** + * A WebGL 2 backend utility module for managing the device's capabilities. + * + * @private + */ +export class WebGLCapabilities { + /** + * Constructs a new utility object. + * + * @param {WebGLBackend} backend - The WebGL 2 backend. + */ + constructor(backend: WebGLBackend); + /** + * A reference to the WebGL 2 backend. + * + * @type {WebGLBackend} + */ + backend: WebGLBackend; + /** + * This value holds the cached max anisotropy value. + * + * @type {?number} + * @default null + */ + maxAnisotropy: number | null; + /** + * This value holds the cached max uniform block size value. + * + * @type {?number} + * @default null + */ + maxUniformBlockSize: number | null; + /** + * Returns the maximum anisotropy texture filtering value. This value + * depends on the device and is reported by the `EXT_texture_filter_anisotropic` + * WebGL extension. + * + * @return {number} The maximum anisotropy texture filtering value. + */ + getMaxAnisotropy(): number; + /** + * Returns the maximum number of bytes available for uniform buffers. + * + * @return {number} The maximum number of bytes available for uniform buffers. + */ + getUniformBufferLimit(): number; +} +import { WebGLCoordinateSystem } from './three.core.js'; +/** + * A backend implementation targeting WebGPU. + * + * @private + * @augments Backend + */ +export class WebGPUBackend extends Backend { + /** + * WebGPUBackend options. + * + * @typedef {Object} WebGPUBackend~Options + * @property {boolean} [logarithmicDepthBuffer=false] - Whether logarithmic depth buffer is enabled or not. + * @property {boolean} [reversedDepthBuffer=false] - Whether reversed depth buffer is enabled or not. + * @property {boolean} [alpha=true] - Whether the default framebuffer (which represents the final contents of the canvas) should be transparent or opaque. + * @property {boolean} [depth=true] - Whether the default framebuffer should have a depth buffer or not. + * @property {boolean} [stencil=false] - Whether the default framebuffer should have a stencil buffer or not. + * @property {boolean} [antialias=false] - Whether MSAA as the default anti-aliasing should be enabled or not. + * @property {number} [samples=0] - When `antialias` is `true`, `4` samples are used by default. Set this parameter to any other integer value than 0 to overwrite the default. + * @property {boolean} [forceWebGL=false] - If set to `true`, the renderer uses a WebGL 2 backend no matter if WebGPU is supported or not. + * @property {boolean} [trackTimestamp=false] - Whether to track timestamps with a Timestamp Query API or not. + * @property {string} [powerPreference=undefined] - The power preference. + * @property {Object} [requiredLimits=undefined] - Specifies the limits that are required by the device request. The request will fail if the adapter cannot provide these limits. + * @property {GPUDevice} [device=undefined] - If there is an existing GPU device on app level, it can be passed to the renderer as a parameter. + * @property {number} [outputType=undefined] - Texture type for output to canvas. By default, device's preferred format is used; other formats may incur overhead. + */ + /** + * Constructs a new WebGPU backend. + * + * @param {WebGPUBackend~Options} [parameters] - The configuration parameter. + */ + constructor(parameters?: {}); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWebGPUBackend: boolean; + /** + * Indicates whether the backend is in WebGPU compatibility mode or not. + * The backend must be initialized before the property can be evaluated. + * + * @type {?boolean} + * @readonly + * @default null + */ + readonly compatibilityMode: boolean | null; + /** + * A reference to the device. + * + * @type {?GPUDevice} + * @default null + */ + device: GPUDevice | null; + /** + * A reference to the default render pass descriptor. + * + * @type {?Object} + * @default null + */ + defaultRenderPassdescriptor: Object | null; + /** + * A reference to a backend module holding common utility functions. + * + * @type {WebGPUUtils} + */ + utils: WebGPUUtils; + /** + * A reference to a backend module holding shader attribute-related + * utility functions. + * + * @type {WebGPUAttributeUtils} + */ + attributeUtils: WebGPUAttributeUtils; + /** + * A reference to a backend module holding shader binding-related + * utility functions. + * + * @type {WebGPUBindingUtils} + */ + bindingUtils: WebGPUBindingUtils; + /** + * A reference to a backend module holding device capability related + * utility functions. + * + * @type {WebGPUCapabilities} + */ + capabilities: WebGPUCapabilities; + /** + * A reference to a backend module holding shader pipeline-related + * utility functions. + * + * @type {WebGPUPipelineUtils} + */ + pipelineUtils: WebGPUPipelineUtils; + /** + * A reference to a backend module holding shader texture-related + * utility functions. + * + * @type {WebGPUTextureUtils} + */ + textureUtils: WebGPUTextureUtils; + /** + * A map that manages the resolve buffers for occlusion queries. + * + * @type {Map} + */ + occludedResolveCache: Map; + /** + * A map of compatibility checks. + * + * @type {Object} + */ + _compatibility: Object; + /** + * Registers external GPU textures from `XRGPUBinding` for use in rendering. + * + * @param {RenderTarget} renderTarget - The render target to register the textures for. + * @param {GPUTexture} colorTexture - The shared XR color GPUTexture. + * @param {?Array} [viewDescriptors=null] - Optional view descriptors, one per XR view. + */ + setXRRenderTargetTextures(renderTarget: RenderTarget, colorTexture: GPUTexture, viewDescriptors?: Array | null): void; + /** + * A reference to the context. + * + * @type {?GPUCanvasContext} + * @default null + */ + get context(): GPUCanvasContext | null; + /** + * This method performs a readback operation by moving buffer data from + * a storage buffer attribute from the GPU to the CPU. ReadbackBuffer can + * be used to retain and reuse handles to the intermediate buffers and prevent + * new allocation. + * + * @async + * @param {BufferAttribute} attribute - The storage buffer attribute to read frm. + * @param {number} count - The offset from which to start reading the + * @param {number} offset - The storage buffer attribute. + * @param {ReadbackBuffer|ArrayBuffer} target - The storage buffer attribute. + * @return {Promise} A promise that resolves with the buffer data when the data are ready. + */ + getArrayBufferAsync(attribute: BufferAttribute, target?: ReadbackBuffer | ArrayBuffer, offset?: number, count?: number): Promise; + /** + * Returns the backend's rendering context. + * + * @return {GPUCanvasContext} The rendering context. + */ + getContext(): GPUCanvasContext; + /** + * Returns the default render pass descriptor. + * + * In WebGPU, the default framebuffer must be configured + * like custom framebuffers so the backend needs a render + * pass descriptor even when rendering directly to screen. + * + * @private + * @return {Object} The render pass descriptor. + */ + private _getDefaultRenderPassDescriptor; + /** + * Returns whether the render target is a render target array with depth 2D array texture. + * + * @param {RenderContext} renderContext - The render context. + * @return {boolean} Whether the render target is a render target array with depth 2D array texture. + * + * @private + */ + private _isRenderCameraDepthArray; + /** + * Returns whether the current render context references external textures. + * + * External textures can change every frame, so their descriptors must not be cached. + * + * @private + * @param {RenderContext} renderContext - The render context. + * @return {boolean} Whether the render context uses external textures. + */ + private _hasExternalTexture; + /** + * Creates attachment views for an external texture render target. + * + * @private + * @param {RenderContext} renderContext - The render context. + * @param {Object} textureData - The backend data for the texture. + * @return {Array} The attachment view descriptors. + */ + private _createExternalTextureViews; + /** + * Returns the render pass descriptor for the given render context. + * + * @private + * @param {RenderContext} renderContext - The render context. + * @param {Object} colorAttachmentsConfig - Configuration object for the color attachments. + * @return {Object} The render pass descriptor. + */ + private _getRenderPassDescriptor; + /** + * This method is executed at the beginning of a render call and prepares + * the WebGPU state for upcoming render calls + * + * @param {RenderContext} renderContext - The render context. + */ + beginRender(renderContext: RenderContext): void; + /** + * Creates render pass descriptors for each camera in an array camera. + * + * @param {RenderContext} renderContext - The render context. + * @param {Object} renderContextData - The render context data. + * @param {Object} descriptor - The render pass descriptor. + * @param {ArrayCamera} cameras - The array camera. + * + * @private + */ + private _createArrayCameraLayerDescriptors; + /** + * Updates render pass descriptors for each camera in an array camera. + * + * @param {RenderContext} renderContext - The render context. + * @param {Object} renderContextData - The render context data. + * @param {ArrayCamera} cameras - The array camera. + * + */ + _updateArrayCameraLayerDescriptors(renderContext: RenderContext, renderContextData: Object, cameras: ArrayCamera): void; + /** + * This method is executed at the end of a render call and finalizes work + * after draw calls. + * + * @param {RenderContext} renderContext - The render context. + */ + finishRender(renderContext: RenderContext): void; + /** + * Returns `true` if the given 3D object is fully occluded by other + * 3D objects in the scene. + * + * @param {RenderContext} renderContext - The render context. + * @param {Object3D} object - The 3D object to test. + * @return {boolean} Whether the 3D object is fully occluded or not. + */ + isOccluded(renderContext: RenderContext, object: Object3D): boolean; + /** + * This method processes the result of occlusion queries and writes it + * into render context data. + * + * @async + * @param {RenderContext} renderContext - The render context. + * @return {Promise} A Promise that resolves when the occlusion query results have been processed. + */ + resolveOccludedAsync(renderContext: RenderContext): Promise; + /** + * Updates the viewport with the values from the given render context. + * + * @param {RenderContext} renderContext - The render context. + */ + updateViewport(renderContext: RenderContext): void; + /** + * Updates the scissor with the values from the given render context. + * + * @param {RenderContext} renderContext - The render context. + */ + updateScissor(renderContext: RenderContext): void; + /** + * Performs a clear operation. + * + * @param {boolean} color - Whether the color buffer should be cleared or not. + * @param {boolean} depth - Whether the depth buffer should be cleared or not. + * @param {boolean} stencil - Whether the stencil buffer should be cleared or not. + * @param {?RenderContext} [renderTargetContext=null] - The render context of the current set render target. + */ + clear(color: boolean, depth: boolean, stencil: boolean, renderTargetContext?: RenderContext | null): void; + /** + * This method is executed at the beginning of a compute call and + * prepares the state for upcoming compute tasks. + * + * @param {Node|Array} computeGroup - The compute node(s). + */ + beginCompute(computeGroup: Node | Array): void; + /** + * Executes a compute command for the given compute node. + * + * @param {Node|Array} computeGroup - The group of compute nodes of a compute call. Can be a single compute node. + * @param {Node} computeNode - The compute node. + * @param {Array} bindings - The bindings. + * @param {ComputePipeline} pipeline - The compute pipeline. + * @param {number|Array|IndirectStorageBufferAttribute} [dispatchSize=null] + * - A single number representing count, or + * - An array [x, y, z] representing dispatch size, or + * - A IndirectStorageBufferAttribute for indirect dispatch size. + */ + compute(computeGroup: Node | Array, computeNode: Node, bindings: Array, pipeline: ComputePipeline, dispatchSize?: number | Array | IndirectStorageBufferAttribute): void; + /** + * This method is executed at the end of a compute call and + * finalizes work after compute tasks. + * + * @param {Node|Array} computeGroup - The compute node(s). + */ + finishCompute(computeGroup: Node | Array): void; + /** + * Internal draw function that performs the draw with the given pass encoder. + * + * @private + * @param {RenderObject} renderObject - The render object. + * @param {Info} info - Holds a series of statistical information about the GPU memory and the rendering process. + * @param {Object} renderContextData - The render context data object, holding current pass state and occlusion query tracking. + * @param {GPURenderPipeline} pipelineGPU - The GPU render pipeline. + * @param {Array} bindings - The bind groups. + * @param {Array} vertexBuffers - The vertex buffers. + * @param {{vertexCount: number, firstVertex: number, instanceCount: number, firstInstance: number}} drawParams - The draw parameters. + * @param {GPURenderPassEncoder|GPURenderBundleEncoder} passEncoderGPU - The GPU pass encoder used for recording draw commands. + * @param {Object} currentSets - Tracking object for currently set pipeline, attributes, bind groups, and index state. + */ + private _draw; + /** + * Executes a draw command for the given render object. + * + * @param {RenderObject} renderObject - The render object to draw. + * @param {Info} info - Holds a series of statistical information about the GPU memory and the rendering process. + */ + draw(renderObject: RenderObject, info: Info): void; + /** + * Returns `true` if the render pipeline requires an update. + * + * @param {RenderObject} renderObject - The render object. + * @return {boolean} Whether the render pipeline requires an update or not. + */ + needsRenderUpdate(renderObject: RenderObject): boolean; + /** + * Returns a cache key that is used to identify render pipelines. + * + * @param {RenderObject} renderObject - The render object. + * @return {string} The cache key. + */ + getRenderCacheKey(renderObject: RenderObject): string; + /** + * Updates a GPU sampler for the given texture. + * + * @param {Texture} texture - The texture to update the sampler for. + * @param {TextureNode} textureNode - The texture node to update the sampler with. + * @return {string} The current sampler key. + */ + updateSampler(texture: Texture, textureNode: TextureNode): string; + /** + * Creates a default texture for the given texture that can be used + * as a placeholder until the actual texture is ready for usage. + * + * @param {Texture} texture - The texture to create a default texture for. + * @return {boolean} Whether the sampler has been updated or not. + */ + createDefaultTexture(texture: Texture): boolean; + /** + * Defines a texture on the GPU for the given texture object. + * + * @param {Texture} texture - The texture. + * @param {Object} [options={}] - Optional configuration parameter. + */ + createTexture(texture: Texture, options?: Object): void; + /** + * Uploads the updated texture data to the GPU. + * + * @param {Texture} texture - The texture. + * @param {Object} [options={}] - Optional configuration parameter. + */ + updateTexture(texture: Texture, options?: Object): void; + /** + * Generates mipmaps for the given texture. + * + * @param {Texture} texture - The texture. + */ + generateMipmaps(texture: Texture): void; + /** + * Destroys the GPU data for the given texture object. + * + * @param {Texture} texture - The texture. + * @param {boolean} [isDefaultTexture=false] - Whether the texture uses a default GPU texture or not. + */ + destroyTexture(texture: Texture, isDefaultTexture?: boolean): void; + /** + * Returns texture data as a typed array. + * + * @async + * @param {Texture} texture - The texture to copy. + * @param {number} x - The x coordinate of the copy origin. + * @param {number} y - The y coordinate of the copy origin. + * @param {number} width - The width of the copy. + * @param {number} height - The height of the copy. + * @param {number} faceIndex - The face index. + * @return {Promise} A Promise that resolves with a typed array when the copy operation has finished. + */ + copyTextureToBuffer(texture: Texture, x: number, y: number, width: number, height: number, faceIndex: number): Promise; + /** + * Inits a time stamp query for the given render context. + * + * @param {string} type - The type of the timestamp query (e.g. 'render', 'compute'). + * @param {number} uid - Unique id for the context (e.g. render context id). + * @param {Object} descriptor - The query descriptor. + */ + initTimestampQuery(type: string, uid: number, descriptor: Object): void; + /** + * Returns a node builder for the given render object. + * + * @param {RenderObject} object - The render object. + * @param {Renderer} renderer - The renderer. + * @return {WGSLNodeBuilder} The node builder. + */ + createNodeBuilder(object: RenderObject, renderer: Renderer): WGSLNodeBuilder; + /** + * Creates a shader program from the given programmable stage. + * + * @param {ProgrammableStage} program - The programmable stage. + */ + createProgram(program: ProgrammableStage): void; + /** + * Destroys the shader program of the given programmable stage. + * + * @param {ProgrammableStage} program - The programmable stage. + */ + destroyProgram(program: ProgrammableStage): void; + /** + * Creates a render pipeline for the given render object. + * + * @param {RenderObject} renderObject - The render object. + * @param {Array} promises - An array of compilation promises which are used in `compileAsync()`. + */ + createRenderPipeline(renderObject: RenderObject, promises: Array>): void; + /** + * Creates a compute pipeline for the given compute node. + * + * @param {ComputePipeline} computePipeline - The compute pipeline. + * @param {Array} bindings - The bindings. + */ + createComputePipeline(computePipeline: ComputePipeline, bindings: Array): void; + /** + * Prepares the state for encoding render bundles. + * + * @param {RenderContext} renderContext - The render context. + */ + beginBundle(renderContext: RenderContext): void; + /** + * After processing render bundles this method finalizes related work. + * + * @param {RenderContext} renderContext - The render context. + * @param {RenderBundle} bundle - The render bundle. + */ + finishBundle(renderContext: RenderContext, bundle: RenderBundle): void; + /** + * Adds a render bundle to the render context data. + * + * @param {RenderContext} renderContext - The render context. + * @param {RenderBundle} bundle - The render bundle to add. + */ + addBundle(renderContext: RenderContext, bundle: RenderBundle): void; + /** + * Creates a uniform buffer. + * + * @param {Buffer} uniformBuffer - The uniform buffer. + */ + createUniformBuffer(uniformBuffer: Buffer): void; + /** + * Destroys the GPU data for the given uniform buffer. + * + * @param {Buffer} uniformBuffer - The uniform buffer. + */ + destroyUniformBuffer(uniformBuffer: Buffer): void; + /** + * Creates bindings from the given bind group definition. + * + * @param {BindGroup} bindGroup - The bind group. + * @param {Array} bindings - Array of bind groups. + * @param {number} cacheIndex - The cache index. + * @param {number} version - The version. + */ + createBindings(bindGroup: BindGroup, bindings: Array, cacheIndex: number, version: number): void; + /** + * Updates the given bind group definition. + * + * @param {BindGroup} bindGroup - The bind group. + * @param {Array} bindings - Array of bind groups. + * @param {number} cacheIndex - The cache index. + * @param {number} version - The version. + */ + updateBindings(bindGroup: BindGroup, bindings: Array, cacheIndex: number, version: number): void; + /** + * Updates a buffer binding. + * + * @param {Buffer} binding - The buffer binding to update. + */ + updateBinding(binding: Buffer): void; + /** + * Delete data associated with the current bind group. + * + * @param {BindGroup} bindGroup - The bind group. + */ + deleteBindGroupData(bindGroup: BindGroup): void; + /** + * Creates the buffer of an indexed shader attribute. + * + * @param {BufferAttribute} attribute - The indexed buffer attribute. + */ + createIndexAttribute(attribute: BufferAttribute): void; + /** + * Creates the GPU buffer of a shader attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + */ + createAttribute(attribute: BufferAttribute): void; + /** + * Creates the GPU buffer of a storage attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + */ + createStorageAttribute(attribute: BufferAttribute): void; + /** + * Creates the GPU buffer of an indirect storage attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + */ + createIndirectStorageAttribute(attribute: BufferAttribute): void; + /** + * Updates the GPU buffer of a shader attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute to update. + */ + updateAttribute(attribute: BufferAttribute): void; + /** + * Destroys the GPU buffer of a shader attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute to destroy. + */ + destroyAttribute(attribute: BufferAttribute): void; + /** + * Checks if the given feature is supported by the backend. + * + * @param {string} name - The feature's name. + * @return {boolean} Whether the feature is supported or not. + */ + hasFeature(name: string): boolean; + /** + * Copies data of the given source texture to the given destination texture. + * + * @param {Texture} srcTexture - The source texture. + * @param {Texture} dstTexture - The destination texture. + * @param {?(Box3|Box2)} [srcRegion=null] - The region of the source texture to copy. + * @param {?(Vector2|Vector3)} [dstPosition=null] - The destination position of the copy. + * @param {number} [srcLevel=0] - The mipmap level to copy. + * @param {number} [dstLevel=0] - The destination mip level to copy to. + */ + copyTextureToTexture(srcTexture: Texture, dstTexture: Texture, srcRegion?: (Box3 | Box2) | null, dstPosition?: (Vector2 | Vector3) | null, srcLevel?: number, dstLevel?: number): void; + /** + * Copies the current bound framebuffer to the given texture. + * + * @param {Texture} texture - The destination texture. + * @param {RenderContext} renderContext - The render context. + * @param {Vector4} rectangle - A four dimensional vector defining the origin and dimension of the copy. + */ + copyFramebufferToTexture(texture: Texture, renderContext: RenderContext, rectangle: Vector4): void; + /** + * Checks if the given compatibility is supported by the backend. + * + * @param {string} name - The compatibility name. + * @return {boolean} Whether the compatibility is supported or not. + */ + hasCompatibility(name: string): boolean; +} +import { WebGPUCoordinateSystem } from './three.core.js'; +/** + * This renderer is the new alternative of `WebGLRenderer`. `WebGPURenderer` has the ability + * to target different backends. By default, the renderer tries to use a WebGPU backend if the + * browser supports WebGPU. If not, `WebGPURenderer` falls backs to a WebGL 2 backend. + * + * @augments Renderer + */ +export class WebGPURenderer extends Renderer { + /** + * WebGPURenderer options. + * + * @typedef {Object} WebGPURenderer~Options + * @property {boolean} [logarithmicDepthBuffer=false] - Whether logarithmic depth buffer is enabled or not. + * @property {boolean} [reversedDepthBuffer=false] - Whether reversed depth buffer is enabled or not. + * @property {boolean} [alpha=true] - Whether the default framebuffer (which represents the final contents of the canvas) should be transparent or opaque. + * @property {boolean} [depth=true] - Whether the default framebuffer should have a depth buffer or not. + * @property {boolean} [stencil=false] - Whether the default framebuffer should have a stencil buffer or not. + * @property {boolean} [antialias=false] - Whether MSAA as the default anti-aliasing should be enabled or not. + * @property {number} [samples=0] - When `antialias` is `true`, `4` samples are used by default. Set this parameter to any other integer value than 0 to overwrite the default. + * @property {boolean} [forceWebGL=false] - If set to `true`, the renderer uses a WebGL 2 backend no matter if WebGPU is supported or not. + * @property {boolean} [multiview=false] - If set to `true`, the renderer will use multiview during WebXR rendering if supported. + * @property {number} [outputType=undefined] - Texture type for output to canvas. By default, device's preferred format is used; other formats may incur overhead. + * @property {number} [outputBufferType=HalfFloatType] - Defines the type of output buffers. The default `HalfFloatType` is recommend for best + * quality. To save memory and bandwidth, `UnsignedByteType` might be used. This will reduce rendering quality though. + */ + /** + * Constructs a new WebGPU renderer. + * + * @param {WebGPURenderer~Options} [parameters] - The configuration parameter. + */ + constructor(parameters?: {}); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWebGPURenderer: boolean; +} +import { WebXRController } from './three.core.js'; +/** + * A node allowing the user to create a 'workgroup' scoped buffer within the + * context of a compute shader. Typically, workgroup scoped buffers are + * created to hold data that is transferred from a global storage scope into + * a local workgroup scope. For invocations within a workgroup, data + * access speeds on 'workgroup' scoped buffers can be significantly faster + * than similar access operations on globally accessible storage buffers. + * + * This node can only be used with a WebGPU backend. + * + * @augments Node + */ +export class WorkgroupInfoNode extends Node { + /** + * Constructs a new buffer scoped to type scope. + * + * @param {string} scope - TODO. + * @param {string} bufferType - The data type of a 'workgroup' scoped buffer element. + * @param {number} [bufferCount=0] - The number of elements in the buffer. + */ + constructor(scope: string, bufferType: string, bufferCount?: number); + /** + * The buffer type. + * + * @type {string} + */ + bufferType: string; + /** + * The buffer count. + * + * @type {number} + * @default 0 + */ + bufferCount: number; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWorkgroupInfoNode: boolean; + /** + * The data type of the array buffer. + * + * @type {string} + */ + elementType: string; + /** + * TODO. + * + * @type {string} + */ + scope: string; + /** + * Sets the name of this node. + * + * @param {string} name - The name to set. + * @return {WorkgroupInfoNode} A reference to this node. + */ + setName(name: string): WorkgroupInfoNode; + /** + * Sets the name/label of this node. + * + * @deprecated + * @param {string} name - The name to set. + * @return {WorkgroupInfoNode} A reference to this node. + */ + label(name: string): WorkgroupInfoNode; + /** + * Sets the scope of this node. + * + * @param {string} scope - The scope to set. + * @return {WorkgroupInfoNode} A reference to this node. + */ + setScope(scope: string): WorkgroupInfoNode; + /** + * The data type of the array buffer. + * + * @return {string} The element type. + */ + getElementType(): string; + /** + * Overwrites the default implementation since the input type + * is inferred from the scope. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The input type. + */ + getInputType(): string; + /** + * This method can be used to access elements via an index node. + * + * @param {IndexNode} indexNode - indexNode. + * @return {WorkgroupInfoElementNode} A reference to an element. + */ + element(indexNode: IndexNode): WorkgroupInfoElementNode; + generate(builder: any): any; +} +import { ZeroFactor } from './three.core.js'; +import { ZeroStencilOp } from './three.core.js'; +import { createCanvasElement } from './three.core.js'; +export const defaultBuildStages: string[]; +export const defaultShaderStages: string[]; +import { error } from './three.core.js'; +import { log as log$1 } from './three.core.js'; +export const shaderStages: string[]; +export const vectorComponents: string[]; +import { warn } from './three.core.js'; +import { warnOnce } from './three.core.js'; +/** + * The purpose of a node library is to assign node implementations + * to existing library features. In `WebGPURenderer` lights, materials + * which are not based on `NodeMaterial` as well as tone mapping techniques + * are implemented with node-based modules. + * + * @private + */ +declare class NodeLibrary { + /** + * A weak map that maps lights to light nodes. + * + * @type {WeakMap} + */ + lightNodes: WeakMap; + /** + * A map that maps materials to node materials. + * + * @type {Map} + */ + materialNodes: Map; + /** + * A map that maps tone mapping techniques (constants) + * to tone mapping node functions. + * + * @type {Map} + */ + toneMappingNodes: Map; + /** + * Returns a matching node material instance for the given material object. + * + * This method also assigns/copies the properties of the given material object + * to the node material. This is done to make sure the current material + * configuration carries over to the node version. + * + * @param {Material} material - A material. + * @return {NodeMaterial} The corresponding node material. + */ + fromMaterial(material: Material): NodeMaterial; + /** + * Adds a tone mapping node function for a tone mapping technique (constant). + * + * @param {Function} toneMappingNode - The tone mapping node function. + * @param {number} toneMapping - The tone mapping. + */ + addToneMapping(toneMappingNode: Function, toneMapping: number): void; + /** + * Returns a tone mapping node function for a tone mapping technique (constant). + * + * @param {number} toneMapping - The tone mapping. + * @return {?Function} The tone mapping node function. Returns `null` if no node function is found. + */ + getToneMappingFunction(toneMapping: number): Function | null; + /** + * Returns a node material class definition for a material type. + * + * @param {string} materialType - The material type. + * @return {?NodeMaterial.constructor} The node material class definition. Returns `null` if no node material is found. + */ + getMaterialNodeClass(materialType: string): NodeMaterial.constructor | null; + /** + * Adds a node material class definition for a given material type. + * + * @param {NodeMaterial.constructor} materialNodeClass - The node material class definition. + * @param {string} materialClassType - The material type. + */ + addMaterial(materialNodeClass: NodeMaterial.constructor, materialClassType: string): void; + /** + * Returns a light node class definition for a light class definition. + * + * @param {Light.constructor} light - The light class definition. + * @return {?AnalyticLightNode.constructor} The light node class definition. Returns `null` if no light node is found. + */ + getLightNodeClass(light: Light.constructor): AnalyticLightNode.constructor | null; + /** + * Adds a light node class definition for a given light class definition. + * + * @param {AnalyticLightNode.constructor} lightNodeClass - The light node class definition. + * @param {Light.constructor} lightClass - The light class definition. + */ + addLight(lightNodeClass: AnalyticLightNode.constructor, lightClass: Light.constructor): void; + /** + * Adds a node class definition for the given type to the provided type library. + * + * @param {Node.constructor} nodeClass - The node class definition. + * @param {number|string} type - The object type. + * @param {Map} library - The type library. + */ + addType(nodeClass: Node.constructor, type: number | string, library: Map): void; + /** + * Adds a node class definition for the given class definition to the provided type library. + * + * @param {Node.constructor} nodeClass - The node class definition. + * @param {Node.constructor} baseClass - The class definition. + * @param {WeakMap} library - The type library. + */ + addClass(nodeClass: Node.constructor, baseClass: Node.constructor, library: WeakMap): void; +} +/** + * Base class for renderers. + */ +declare class Renderer { + /** + * Renderer options. + * + * @typedef {Object} Renderer~Options + * @property {boolean} [logarithmicDepthBuffer=false] - Whether logarithmic depth buffer is enabled or not. + * @property {boolean} [reversedDepthBuffer=false] - Whether reversed depth buffer is enabled or not. + * @property {boolean} [alpha=true] - Whether the default framebuffer (which represents the final contents of the canvas) should be transparent or opaque. + * @property {boolean} [depth=true] - Whether the default framebuffer should have a depth buffer or not. + * @property {boolean} [stencil=false] - Whether the default framebuffer should have a stencil buffer or not. + * @property {boolean} [antialias=false] - Whether MSAA as the default anti-aliasing should be enabled or not. + * @property {number} [samples=0] - When `antialias` is `true`, `4` samples are used by default. This parameter can set to any other integer value than 0 + * to overwrite the default. + * @property {?Function} [getFallback=null] - This callback function can be used to provide a fallback backend, if the primary backend can't be targeted. + * @property {number} [outputBufferType=HalfFloatType] - Defines the type of output buffers. The default `HalfFloatType` is recommend for best + * quality. To save memory and bandwidth, `UnsignedByteType` might be used. This will reduce rendering quality though. + * @property {boolean} [multiview=false] - If set to `true`, the renderer will use multiview during WebXR rendering if supported. + */ + /** + * Constructs a new renderer. + * + * @param {Backend} backend - The backend the renderer is targeting (e.g. WebGPU or WebGL 2). + * @param {Renderer~Options} [parameters] - The configuration parameter. + + */ + constructor(backend: Backend, parameters?: {}); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isRenderer: boolean; + /** + * A reference to the current backend. + * + * @type {Backend} + */ + backend: Backend; + /** + * Whether the renderer should automatically clear the current rendering target + * before execute a `render()` call. The target can be the canvas (default framebuffer) + * or the current bound render target (custom framebuffer). + * + * @type {boolean} + * @default true + */ + autoClear: boolean; + /** + * When `autoClear` is set to `true`, this property defines whether the renderer + * should clear the color buffer. + * + * @type {boolean} + * @default true + */ + autoClearColor: boolean; + /** + * When `autoClear` is set to `true`, this property defines whether the renderer + * should clear the depth buffer. + * + * @type {boolean} + * @default true + */ + autoClearDepth: boolean; + /** + * When `autoClear` is set to `true`, this property defines whether the renderer + * should clear the stencil buffer. + * + * @type {boolean} + * @default true + */ + autoClearStencil: boolean; + /** + * Whether the default framebuffer should be transparent or opaque. + * + * @type {boolean} + * @default true + */ + alpha: boolean; + /** + * Whether logarithmic depth buffer is enabled or not. + * + * @type {boolean} + * @default false + * @readonly + */ + readonly logarithmicDepthBuffer: boolean; + /** + * Whether reversed depth buffer is enabled or not. + * + * @type {boolean} + * @default false + * @readonly + */ + readonly reversedDepthBuffer: boolean; + /** + * Defines the output color space of the renderer. + * + * @type {string} + * @default SRGBColorSpace + */ + outputColorSpace: string; + /** + * Defines the tone mapping of the renderer. + * + * @type {number} + * @default NoToneMapping + */ + toneMapping: number; + /** + * Defines the tone mapping exposure. + * + * @type {number} + * @default 1 + */ + toneMappingExposure: number; + /** + * Whether the renderer should sort its render lists or not. + * + * Note: Sorting is used to attempt to properly render objects that have some degree of transparency. + * By definition, sorting objects may not work in all cases. Depending on the needs of application, + * it may be necessary to turn off sorting and use other methods to deal with transparency rendering + * e.g. manually determining each object's rendering order. + * + * @type {boolean} + * @default true + */ + sortObjects: boolean; + /** + * Whether the default framebuffer should have a depth buffer or not. + * + * @type {boolean} + * @default true + */ + depth: boolean; + /** + * Whether the default framebuffer should have a stencil buffer or not. + * + * @type {boolean} + * @default false + */ + stencil: boolean; + /** + * Holds a series of statistical information about the GPU memory + * and the rendering process. Useful for debugging and monitoring. + * + * @type {Info} + */ + info: Info; + /** + * A global context node that stores override nodes for specific transformations or calculations. + * These nodes can be used to replace default behavior in the rendering pipeline. + * + * @type {ContextNode} + * @property {Object} value - The context value object. + */ + contextNode: ContextNode; + /** + * The node library defines how certain library objects like materials, lights + * or tone mapping functions are mapped to node types. This is required since + * although instances of classes like `MeshBasicMaterial` or `PointLight` can + * be part of the scene graph, they are internally represented as nodes for + * further processing. + * + * @type {NodeLibrary} + */ + library: NodeLibrary; + /** + * A map-like data structure for managing lights. + * + * @type {Lighting} + */ + lighting: Lighting; + /** + * The number of MSAA samples. + * + * @private + * @type {number} + * @default 0 + */ + private _samples; + /** + * Callback when the canvas has been resized. + * + * @private + */ + private _onCanvasTargetResize; + /** + * The canvas target for rendering. + * + * @private + * @type {CanvasTarget} + */ + private _canvasTarget; + /** + * The inspector provides information about the internal renderer state. + * + * @private + * @type {InspectorBase} + */ + private _inspector; + /** + * This callback function can be used to provide a fallback backend, if the primary backend can't be targeted. + * + * @private + * @type {?Function} + */ + private _getFallback; + /** + * A reference to a renderer module for managing shader attributes. + * + * @private + * @type {?Attributes} + * @default null + */ + private _attributes; + /** + * A reference to a renderer module for managing geometries. + * + * @private + * @type {?Geometries} + * @default null + */ + private _geometries; + /** + * A reference to a renderer module for managing node related logic. + * + * @private + * @type {?NodeManager} + * @default null + */ + private _nodes; + /** + * A reference to a renderer module for managing the internal animation loop. + * + * @private + * @type {?Animation} + * @default null + */ + private _animation; + /** + * A reference to a renderer module for managing shader program bindings. + * + * @private + * @type {?Bindings} + * @default null + */ + private _bindings; + /** + * A reference to a renderer module for managing render objects. + * + * @private + * @type {?RenderObjects} + * @default null + */ + private _objects; + /** + * A reference to a renderer module for managing render and compute pipelines. + * + * @private + * @type {?Pipelines} + * @default null + */ + private _pipelines; + /** + * A reference to a renderer module for managing render bundles. + * + * @private + * @type {?RenderBundles} + * @default null + */ + private _bundles; + /** + * A reference to a renderer module for managing render lists. + * + * @private + * @type {?RenderLists} + * @default null + */ + private _renderLists; + /** + * A reference to a renderer module for managing render contexts. + * + * @private + * @type {?RenderContexts} + * @default null + */ + private _renderContexts; + /** + * A reference to a renderer module for managing textures. + * + * @private + * @type {?Textures} + * @default null + */ + private _textures; + /** + * A reference to a renderer module for backgrounds. + * + * @private + * @type {?Background} + * @default null + */ + private _background; + /** + * Cache for the fullscreen quad. + * This fullscreen quad is used for internal render passes + * like the tone mapping and color space output pass. + * + * @private + * @type {Map} + */ + private _quadCache; + /** + * A reference to the current render context. + * + * @private + * @type {?RenderContext} + * @default null + */ + private _currentRenderContext; + /** + * A custom sort function for the opaque render list. + * + * @private + * @type {?Function} + * @default null + */ + private _opaqueSort; + /** + * A custom sort function for the transparent render list. + * + * @private + * @type {?Function} + * @default null + */ + private _transparentSort; + /** + * Cache of framebuffer targets per canvas target. + * + * @private + * @type {Map} + */ + private _frameBufferTargets; + /** + * The clear color value. + * + * @private + * @type {Color4} + */ + private _clearColor; + /** + * The clear depth value. + * + * @private + * @type {number} + * @default 1 + */ + private _clearDepth; + /** + * The clear stencil value. + * + * @private + * @type {number} + * @default 0 + */ + private _clearStencil; + /** + * The current render target. + * + * @private + * @type {?RenderTarget} + * @default null + */ + private _renderTarget; + /** + * The active cube face. + * + * @private + * @type {number} + * @default 0 + */ + private _activeCubeFace; + /** + * The active mipmap level. + * + * @private + * @type {number} + * @default 0 + */ + private _activeMipmapLevel; + /** + * The current output render target. + * + * @private + * @type {?RenderTarget} + * @default null + */ + private _outputRenderTarget; + /** + * The MRT setting. + * + * @private + * @type {?MRTNode} + * @default null + */ + private _mrt; + /** + * This function defines how a render object is going + * to be rendered. + * + * @private + * @type {?Function} + * @default null + */ + private _renderObjectFunction; + /** + * Used to keep track of the current render object function. + * + * @private + * @type {?Function} + * @default null + */ + private _currentRenderObjectFunction; + /** + * Used to keep track of the current render bundle. + * + * @private + * @type {?RenderBundle} + * @default null + */ + private _currentRenderBundle; + /** + * Next to `_renderObjectFunction()`, this function provides another hook + * for influencing the render process of a render object. It is meant for internal + * use and only relevant for `compileAsync()` right now. Instead of using + * the default logic of `_renderObjectDirect()` which actually draws the render object, + * a different function might be used which performs no draw but just the node + * and pipeline updates. + * + * @private + * @type {Function} + */ + private _handleObjectFunction; + /** + * Indicates whether the device has been lost or not. In WebGL terms, the device + * lost is considered as a context lost. When this is set to `true`, rendering + * isn't possible anymore. + * + * @private + * @type {boolean} + * @default false + */ + private _isDeviceLost; + /** + * A callback function that defines what should happen when a device/context lost occurs. + * + * @type {Function} + */ + onDeviceLost: Function; + /** + * A callback function that defines what should happen when an uncaptured + * backend error is reported (e.g. a WebGPU validation/out-of-memory/internal + * error raised outside an error scope). Applications can override this to + * surface errors in their own UI without letting them escalate to a device + * loss. The default implementation logs to the console. + * + * @type {Function} + */ + onError: Function; + /** + * Defines the type of output buffers. The default `HalfFloatType` is recommend for + * best quality. To save memory and bandwidth, `UnsignedByteType` might be used. + * This will reduce rendering quality though. + * + * @private + * @type {number} + * @default HalfFloatType + */ + private _outputBufferType; + /** + * A cache for shadow nodes per material + * + * @private + * @type {WeakMap} + */ + private _cacheShadowNodes; + /** + * Whether the renderer has been initialized or not. + * + * @private + * @type {boolean} + * @default false + */ + private _initialized; + /** + * The call depth of the renderer. Counts the number of + * nested render calls. + * + * @private + * @type {number} + * @default - 1 + */ + private _callDepth; + /** + * A reference to the promise which initializes the renderer. + * + * @private + * @type {?Promise} + * @default null + */ + private _initPromise; + /** + * An array of compilation promises which are used in `compileAsync()`. + * + * @private + * @type {?Array} + * @default null + */ + private _compilationPromises; + /** + * Whether the renderer should render transparent render objects or not. + * + * @type {boolean} + * @default true + */ + transparent: boolean; + /** + * Whether the renderer should render opaque render objects or not. + * + * @type {boolean} + * @default true + */ + opaque: boolean; + /** + * Shadow map configuration + * @typedef {Object} ShadowMapConfig + * @property {boolean} enabled - Whether to globally enable shadows or not. + * @property {boolean} transmitted - Whether to enable light transmission through non-opaque materials. + * @property {number} type - The shadow map type. + */ + /** + * The renderer's shadow configuration. + * + * @type {ShadowMapConfig} + */ + shadowMap: { + /** + * - Whether to globally enable shadows or not. + */ + enabled: boolean; + /** + * - Whether to enable light transmission through non-opaque materials. + */ + transmitted: boolean; + /** + * - The shadow map type. + */ + type: number; + }; + /** + * XR configuration. + * @typedef {Object} XRConfig + * @property {boolean} enabled - Whether to globally enable XR or not. + */ + /** + * The renderer's XR manager. + * + * @type {XRManager} + */ + xr: XRManager; + /** + * Debug configuration. + * @typedef {Object} DebugConfig + * @property {boolean} checkShaderErrors - Whether shader errors should be checked or not. + * @property {?Function} onShaderError - A callback function that is executed when a shader error happens. Only supported with WebGL 2 right now. + * @property {Function} getShaderAsync - Allows the get the raw shader code for the given scene, camera and 3D object. + */ + /** + * The renderer's debug configuration. + * + * @type {DebugConfig} + */ + debug: { + /** + * - Whether shader errors should be checked or not. + */ + checkShaderErrors: boolean; + /** + * - A callback function that is executed when a shader error happens. Only supported with WebGL 2 right now. + */ + onShaderError: Function | null; + /** + * - Allows the get the raw shader code for the given scene, camera and 3D object. + */ + getShaderAsync: Function; + }; + /** + * Initializes the renderer so it is ready for usage. + * + * @async + * @return {Promise} A Promise that resolves when the renderer has been initialized. + */ + init(): Promise; + /** + * A reference to the canvas element the renderer is drawing to. + * This value of this property will automatically be created by + * the renderer. + * + * @type {HTMLCanvasElement|OffscreenCanvas} + */ + get domElement(): HTMLCanvasElement | OffscreenCanvas; + /** + * The coordinate system of the renderer. The value of this property + * depends on the selected backend. Either `THREE.WebGLCoordinateSystem` or + * `THREE.WebGPUCoordinateSystem`. + * + * @readonly + * @type {number} + */ + readonly get coordinateSystem(): number; + /** + * Compiles all materials in the given scene. This can be useful to avoid a + * phenomenon which is called "shader compilation stutter", which occurs when + * rendering an object with a new shader for the first time. + * + * If you want to add a 3D object to an existing scene, use the third optional + * parameter for applying the target scene. Note that the (target) scene's lighting + * and environment must be configured before calling this method. + * + * @async + * @param {Object3D} scene - The scene or 3D object to precompile. + * @param {Camera} camera - The camera that is used to render the scene. + * @param {?Scene} targetScene - If the first argument is a 3D object, this parameter must represent the scene the 3D object is going to be added. + * @return {Promise} A Promise that resolves when the compile has been finished. + */ + compileAsync(scene: Object3D, camera: Camera, targetScene?: Scene | null): Promise; + /** + * Renders the scene in an async fashion. + * + * @async + * @deprecated + * @param {Object3D} scene - The scene or 3D object to render. + * @param {Camera} camera - The camera. + * @return {Promise} A Promise that resolves when the render has been finished. + */ + renderAsync(scene: Object3D, camera: Camera): Promise; + /** + * Can be used to synchronize CPU operations with GPU tasks. So when this method is called, + * the CPU waits for the GPU to complete its operation (e.g. a compute task). + * + * @async + * @deprecated + * @return {Promise} A Promise that resolves when synchronization has been finished. + */ + waitForGPU(): Promise; + set inspector(value: InspectorBase); + /** + * The inspector instance. The inspector can be any class that extends from `InspectorBase`. + * + * @type {InspectorBase} + */ + get inspector(): InspectorBase; + /** + * Enables or disables high precision for model-view and normal-view matrices. + * When enabled, will use CPU 64-bit precision for higher precision instead of GPU 32-bit for higher performance. + * + * NOTE: 64-bit precision is not compatible with `InstancedMesh` and `SkinnedMesh`. + * + * @param {boolean} value - Whether to enable or disable high precision. + * @type {boolean} + */ + set highPrecision(value: boolean); + /** + * Returns whether high precision is enabled or not. + * + * @return {boolean} Whether high precision is enabled or not. + * @type {boolean} + */ + get highPrecision(): boolean; + /** + * Sets the given MRT configuration. + * + * @param {MRTNode} mrt - The MRT node to set. + * @return {Renderer} A reference to this renderer. + */ + setMRT(mrt: MRTNode): Renderer; + /** + * Returns the MRT configuration. + * + * @return {MRTNode} The MRT configuration. + */ + getMRT(): MRTNode; + /** + * Returns the output buffer type. + * + * @return {number} The output buffer type. + */ + getOutputBufferType(): number; + /** + * Returns the output buffer type. + * + * @deprecated since r182. Use `.getOutputBufferType()` instead. + * @return {number} The output buffer type. + */ + getColorBufferType(): number; + /** + * Default implementation of the device lost callback. + * + * @private + * @param {Object} info - Information about the context lost. + */ + private _onDeviceLost; + /** + * Default implementation of the uncaptured backend error callback. + * + * @private + * @param {Object} info - Information about the uncaptured error. + */ + private _onError; + /** + * Renders the given render bundle. + * + * @private + * @param {Object} bundle - Render bundle data. + * @param {Scene} sceneRef - The scene the render bundle belongs to. + * @param {LightsNode} lightsNode - The lights node. + */ + private _renderBundle; + /** + * Renders the scene or 3D object with the given camera. This method can only be called + * if the renderer has been initialized. When using `render()` inside an animation loop, + * it's guaranteed the renderer will be initialized. The animation loop must be defined + * with {@link Renderer#setAnimationLoop} though. + * + * For all other use cases (like when using on-demand rendering), you must call + * {@link Renderer#init} before rendering. + * + * The target of the method is the default framebuffer (meaning the canvas) + * or alternatively a render target when specified via `setRenderTarget()`. + * + * @param {Object3D} scene - The scene or 3D object to render. + * @param {Camera} camera - The camera to render the scene with. + */ + render(scene: Object3D, camera: Camera): void; + /** + * Returns whether the renderer has been initialized or not. + * + * @readonly + * @return {boolean} Whether the renderer has been initialized or not. + */ + readonly get initialized(): boolean; + _renderOutputLayers(quad: any, renderTarget: any): void; + /** + * Returns an internal render target which is used when computing the output tone mapping + * and color space conversion. Unlike in `WebGLRenderer`, this is done in a separate render + * pass and not inline to achieve more correct results. + * + * @private + * @return {?RenderTarget} The render target. The method returns `null` if no output conversion should be applied. + */ + private _getFrameBufferTarget; + /** + * Renders the scene or 3D object with the given camera. + * + * @private + * @param {Object3D} scene - The scene or 3D object to render. + * @param {Camera} camera - The camera to render the scene with. + * @param {boolean} [useFrameBufferTarget=true] - Whether to use a framebuffer target or not. + * @return {RenderContext} The current render context. + */ + private _renderScene; + _setXRLayerSize(width: any, height: any): void; + /** + * The output pass performs tone mapping and color space conversion. + * + * @private + * @param {RenderTarget} renderTarget - The current render target. + */ + private _renderOutput; + /** + * Returns the maximum available anisotropy for texture filtering. + * + * @return {number} The maximum available anisotropy. + */ + getMaxAnisotropy(): number; + /** + * Returns the active cube face. + * + * @return {number} The active cube face. + */ + getActiveCubeFace(): number; + /** + * Returns the active mipmap level. + * + * @return {number} The active mipmap level. + */ + getActiveMipmapLevel(): number; + /** + * Applications are advised to always define the animation loop + * with this method and not manually with `requestAnimationFrame()` + * for best compatibility. + * + * @async + * @param {?onAnimationCallback} callback - The application's animation loop. + * @return {Promise} A Promise that resolves when the set has been executed. + */ + setAnimationLoop(callback: onAnimationCallback | null): Promise; + /** + * Returns the current animation loop callback. + * + * @return {?Function} The current animation loop callback. + */ + getAnimationLoop(): Function | null; + /** + * Can be used to transfer buffer data from a storage buffer attribute + * from the GPU to the CPU in context of compute shaders. + * + * @async + * @param {BufferAttribute} attribute - The storage buffer attribute to read frm. + * @param {ReadbackBuffer|ArrayBuffer} target - The storage buffer attribute. + * @param {number} offset - The storage buffer attribute. + * @param {number} count - The offset from which to start reading the + * @return {Promise} A promise that resolves with the buffer data when the data are ready. + */ + getArrayBufferAsync(attribute: BufferAttribute, target?: ReadbackBuffer | ArrayBuffer, offset?: number, count?: number): Promise; + /** + * Returns the rendering context. + * + * @return {GPUCanvasContext|WebGL2RenderingContext} The rendering context. + */ + getContext(): GPUCanvasContext | WebGL2RenderingContext; + /** + * Returns the pixel ratio. + * + * @return {number} The pixel ratio. + */ + getPixelRatio(): number; + /** + * Returns the drawing buffer size in physical pixels. This method honors the pixel ratio. + * + * @param {Vector2} target - The method writes the result in this target object. + * @return {Vector2} The drawing buffer size. + */ + getDrawingBufferSize(target: Vector2): Vector2; + /** + * Returns the renderer's size in logical pixels. This method does not honor the pixel ratio. + * + * @param {Vector2} target - The method writes the result in this target object. + * @return {Vector2} The renderer's size in logical pixels. + */ + getSize(target: Vector2): Vector2; + /** + * Sets the given pixel ratio and resizes the canvas if necessary. + * + * @param {number} [value=1] - The pixel ratio. + */ + setPixelRatio(value?: number): void; + /** + * This method allows to define the drawing buffer size by specifying + * width, height and pixel ratio all at once. The size of the drawing + * buffer is computed with this formula: + * ```js + * size.x = width * pixelRatio; + * size.y = height * pixelRatio; + * ``` + * + * @param {number} width - The width in logical pixels. + * @param {number} height - The height in logical pixels. + * @param {number} pixelRatio - The pixel ratio. + */ + setDrawingBufferSize(width: number, height: number, pixelRatio: number): void; + /** + * Sets the size of the renderer. + * + * @param {number} width - The width in logical pixels. + * @param {number} height - The height in logical pixels. + * @param {boolean} [updateStyle=true] - Whether to update the `style` attribute of the canvas or not. + */ + setSize(width: number, height: number, updateStyle?: boolean): void; + /** + * Defines a manual sort function for the opaque render list. + * Pass `null` to use the default sort. + * + * @param {Function} method - The sort function. + */ + setOpaqueSort(method: Function): void; + /** + * Defines a manual sort function for the transparent render list. + * Pass `null` to use the default sort. + * + * @param {Function} method - The sort function. + */ + setTransparentSort(method: Function): void; + /** + * Returns the scissor rectangle. + * + * @param {Vector4} target - The method writes the result in this target object. + * @return {Vector4} The scissor rectangle. + */ + getScissor(target: Vector4): Vector4; + /** + * Defines the scissor rectangle. + * + * @param {number | Vector4} x - The horizontal coordinate for the upper left corner of the box in logical pixel unit. + * Instead of passing four arguments, the method also works with a single four-dimensional vector. + * @param {number} y - The vertical coordinate for the upper left corner of the box in logical pixel unit. + * @param {number} width - The width of the scissor box in logical pixel unit. + * @param {number} height - The height of the scissor box in logical pixel unit. + */ + setScissor(x: number | Vector4, y: number, width: number, height: number): void; + /** + * Returns the scissor test value. + * + * @return {boolean} Whether the scissor test should be enabled or not. + */ + getScissorTest(): boolean; + /** + * Defines the scissor test. + * + * @param {boolean} boolean - Whether the scissor test should be enabled or not. + */ + setScissorTest(boolean: boolean): void; + /** + * Returns the viewport definition. + * + * @param {Vector4} target - The method writes the result in this target object. + * @return {Vector4} The viewport definition. + */ + getViewport(target: Vector4): Vector4; + /** + * Defines the viewport. + * + * @param {number | Vector4} x - The horizontal coordinate for the upper left corner of the viewport origin in logical pixel unit. + * @param {number} y - The vertical coordinate for the upper left corner of the viewport origin in logical pixel unit. + * @param {number} width - The width of the viewport in logical pixel unit. + * @param {number} height - The height of the viewport in logical pixel unit. + * @param {number} minDepth - The minimum depth value of the viewport. WebGPU only. + * @param {number} maxDepth - The maximum depth value of the viewport. WebGPU only. + */ + setViewport(x: number | Vector4, y: number, width: number, height: number, minDepth?: number, maxDepth?: number): void; + /** + * Returns the clear color. + * + * @param {Color} target - The method writes the result in this target object. + * @return {Color} The clear color. + */ + getClearColor(target: Color): Color; + /** + * Defines the clear color and optionally the clear alpha. + * + * @param {Color} color - The clear color. + * @param {number} [alpha=1] - The clear alpha. + */ + setClearColor(color: Color, alpha?: number): void; + /** + * Returns the clear alpha. + * + * @return {number} The clear alpha. + */ + getClearAlpha(): number; + /** + * Defines the clear alpha. + * + * @param {number} alpha - The clear alpha. + */ + setClearAlpha(alpha: number): void; + /** + * Returns the clear depth. + * + * @return {number} The clear depth. + */ + getClearDepth(): number; + /** + * Defines the clear depth. + * + * @param {number} depth - The clear depth. + */ + setClearDepth(depth: number): void; + /** + * Returns the clear stencil. + * + * @return {number} The clear stencil. + */ + getClearStencil(): number; + /** + * Defines the clear stencil. + * + * @param {number} stencil - The clear stencil. + */ + setClearStencil(stencil: number): void; + /** + * This method performs an occlusion query for the given 3D object. + * It returns `true` if the given 3D object is fully occluded by other + * 3D objects in the scene. + * + * @param {Object3D} object - The 3D object to test. + * @return {boolean} Whether the 3D object is fully occluded or not. + */ + isOccluded(object: Object3D): boolean; + /** + * Performs a manual clear operation. This method ignores `autoClear` properties. + * + * @param {boolean} [color=true] - Whether the color buffer should be cleared or not. + * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not. + * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not. + */ + clear(color?: boolean, depth?: boolean, stencil?: boolean): void; + /** + * Performs a manual clear operation of the color buffer. This method ignores `autoClear` properties. + */ + clearColor(): void; + /** + * Performs a manual clear operation of the depth buffer. This method ignores `autoClear` properties. + */ + clearDepth(): void; + /** + * Performs a manual clear operation of the stencil buffer. This method ignores `autoClear` properties. + */ + clearStencil(): void; + /** + * Async version of {@link Renderer#clear}. + * + * @async + * @deprecated + * @param {boolean} [color=true] - Whether the color buffer should be cleared or not. + * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not. + * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not. + * @return {Promise} A Promise that resolves when the clear operation has been executed. + */ + clearAsync(color?: boolean, depth?: boolean, stencil?: boolean): Promise; + /** + * Async version of {@link Renderer#clearColor}. + * + * @async + * @deprecated + * @return {Promise} A Promise that resolves when the clear operation has been executed. + */ + clearColorAsync(): Promise; + /** + * Async version of {@link Renderer#clearDepth}. + * + * @async + * @deprecated + * @return {Promise} A Promise that resolves when the clear operation has been executed. + */ + clearDepthAsync(): Promise; + /** + * Async version of {@link Renderer#clearStencil}. + * + * @async + * @deprecated + * @return {Promise} A Promise that resolves when the clear operation has been executed. + */ + clearStencilAsync(): Promise; + /** + * Returns `true` if a framebuffer target is needed to perform tone mapping or color space conversion. + * If this is the case, the renderer allocates an internal render target for that purpose. + * + */ + get needsFrameBufferTarget(): boolean; + /** + * The number of samples used for multi-sample anti-aliasing (MSAA). + * + * @type {number} + * @default 0 + */ + get samples(): number; + /** + * The current number of samples used for multi-sample anti-aliasing (MSAA). + * + * When rendering to a custom render target, the number of samples of that render target is used. + * If the renderer needs an internal framebuffer target for tone mapping or color space conversion, + * the number of samples is set to 0. + * + * @type {number} + */ + get currentSamples(): number; + /** + * The current tone mapping of the renderer. When not producing screen output, + * the tone mapping is always `NoToneMapping`. + * + * @type {number} + */ + get currentToneMapping(): number; + /** + * The current color space of the renderer. When not producing screen output, + * the color space is always the working color space. + * + * @type {string} + */ + get currentColorSpace(): string; + /** + * Returns `true` if the rendering settings are set to screen output. + * + * @returns {boolean} True if the current render target is the same of output render target or `null`, otherwise false. + */ + get isOutputTarget(): boolean; + /** + * Frees all internal resources of the renderer. Call this method if the renderer + * is no longer in use by your app. + */ + dispose(): void; + /** + * Sets the given render target. Calling this method means the renderer does not + * target the default framebuffer (meaning the canvas) anymore but a custom framebuffer. + * Use `null` as the first argument to reset the state. + * + * @param {?RenderTarget} renderTarget - The render target to set. + * @param {number} [activeCubeFace=0] - The active cube face. + * @param {number} [activeMipmapLevel=0] - The active mipmap level. + */ + setRenderTarget(renderTarget: RenderTarget | null, activeCubeFace?: number, activeMipmapLevel?: number): void; + /** + * Returns the current render target. + * + * @return {?RenderTarget} The render target. Returns `null` if no render target is set. + */ + getRenderTarget(): RenderTarget | null; + /** + * Sets the output render target for the renderer. + * + * @param {?RenderTarget} renderTarget - The render target to set as the output target. + */ + setOutputRenderTarget(renderTarget: RenderTarget | null): void; + /** + * Returns the current output target. + * + * @return {?RenderTarget} The current output render target. Returns `null` if no output target is set. + */ + getOutputRenderTarget(): RenderTarget | null; + /** + * Sets the canvas target. The canvas target manages the HTML canvas + * or the offscreen canvas the renderer draws into. + * + * @param {CanvasTarget} canvasTarget - The canvas target. + */ + setCanvasTarget(canvasTarget: CanvasTarget): void; + /** + * Returns the current canvas target. + * + * @return {CanvasTarget} The current canvas target. + */ + getCanvasTarget(): CanvasTarget; + /** + * Resets the renderer to the initial state before WebXR started. + * + * @private + */ + private _resetXRState; + /** + * Callback for {@link Renderer#setRenderObjectFunction}. + * + * @callback renderObjectFunction + * @param {Object3D} object - The 3D object. + * @param {Scene} scene - The scene the 3D object belongs to. + * @param {Camera} camera - The camera the object should be rendered with. + * @param {BufferGeometry} geometry - The object's geometry. + * @param {Material} material - The object's material. + * @param {?Object} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. + * @param {LightsNode} lightsNode - The current lights node. + * @param {ClippingContext} clippingContext - The clipping context. + * @param {?string} [passId=null] - An optional ID for identifying the pass. + */ + /** + * Sets the given render object function. Calling this method overwrites the default implementation + * which is {@link Renderer#renderObject}. Defining a custom function can be useful + * if you want to modify the way objects are rendered. For example you can define things like "every + * object that has material of a certain type should perform a pre-pass with a special overwrite material". + * The custom function must always call `renderObject()` in its implementation. + * + * Use `null` as the first argument to reset the state. + * + * @param {?renderObjectFunction} renderObjectFunction - The render object function. + */ + setRenderObjectFunction(renderObjectFunction: ((object: Object3D, scene: Scene, camera: Camera, geometry: BufferGeometry, material: Material, group: Object | null, lightsNode: LightsNode, clippingContext: ClippingContext, passId?: string | null | undefined) => any) | null): void; + /** + * Returns the current render object function. + * + * @return {?Function} The current render object function. Returns `null` if no function is set. + */ + getRenderObjectFunction(): Function | null; + /** + * Execute a single or an array of compute nodes. This method can only be called + * if the renderer has been initialized. + * + * @param {Node|Array} computeNodes - The compute node(s). + * @param {number|Array|IndirectStorageBufferAttribute} [dispatchSize=null] + * - A single number representing count, or + * - An array [x, y, z] representing dispatch size, or + * - A IndirectStorageBufferAttribute for indirect dispatch size. + * @return {Promise|undefined} A Promise that resolve when the compute has finished. Only returned when the renderer has not been initialized. + */ + compute(computeNodes: Node | Array, dispatchSize?: number | Array | IndirectStorageBufferAttribute): Promise | undefined; + /** + * Execute a single or an array of compute nodes. + * + * @async + * @param {Node|Array} computeNodes - The compute node(s). + * @param {number|Array|IndirectStorageBufferAttribute} [dispatchSize=null] + * - A single number representing count, or + * - An array [x, y, z] representing dispatch size, or + * - A IndirectStorageBufferAttribute for indirect dispatch size. + * @return {Promise} A Promise that resolve when the compute has finished. + */ + computeAsync(computeNodes: Node | Array, dispatchSize?: number | Array | IndirectStorageBufferAttribute): Promise; + /** + * Checks if the given feature is supported by the selected backend. + * + * @async + * @deprecated + * @param {string} name - The feature's name. + * @return {Promise} A Promise that resolves with a bool that indicates whether the feature is supported or not. + */ + hasFeatureAsync(name: string): Promise; + resolveTimestampsAsync(type?: string): Promise; + /** + * Checks if the given feature is supported by the selected backend. If the + * renderer has not been initialized, this method always returns `false`. + * + * @param {string} name - The feature's name. + * @return {boolean} Whether the feature is supported or not. + */ + hasFeature(name: string): boolean; + /** + * Returns `true` when the renderer has been initialized. + * + * @return {boolean} Whether the renderer has been initialized or not. + */ + hasInitialized(): boolean; + /** + * Initializes the given textures. Useful for preloading a texture rather than waiting until first render + * (which can cause noticeable lags due to decode and GPU upload overhead). + * + * @async + * @deprecated + * @param {Texture} texture - The texture. + * @return {Promise} A Promise that resolves when the texture has been initialized. + */ + initTextureAsync(texture: Texture): Promise; + /** + * Initializes the given texture. Useful for preloading a texture rather than waiting until first render + * (which can cause noticeable lags due to decode and GPU upload overhead). + * + * This method can only be used if the renderer has been initialized. + * + * @param {Texture} texture - The texture. + */ + initTexture(texture: Texture): void; + /** + * Initializes the given render target. + * + * @param {RenderTarget} renderTarget - The render target to intialize. + */ + initRenderTarget(renderTarget: RenderTarget): void; + /** + * Copies the current bound framebuffer into the given texture. + * + * @param {FramebufferTexture} framebufferTexture - The texture. + * @param {?(Vector2|Vector4)} [rectangle=null] - A two or four dimensional vector that defines the rectangular portion of the framebuffer that should be copied. + */ + copyFramebufferToTexture(framebufferTexture: FramebufferTexture, rectangle?: (Vector2 | Vector4) | null): void; + /** + * Copies data of the given source texture into a destination texture. + * + * @param {Texture} srcTexture - The source texture. + * @param {Texture} dstTexture - The destination texture. + * @param {Box2|Box3} [srcRegion=null] - A bounding box which describes the source region. Can be two or three-dimensional. + * @param {Vector2|Vector3} [dstPosition=null] - A vector that represents the origin of the destination region. Can be two or three-dimensional. + * @param {number} [srcLevel=0] - The source mip level to copy from. + * @param {number} [dstLevel=0] - The destination mip level to copy to. + */ + copyTextureToTexture(srcTexture: Texture, dstTexture: Texture, srcRegion?: Box2 | Box3, dstPosition?: Vector2 | Vector3, srcLevel?: number, dstLevel?: number): void; + /** + * Reads pixel data from the given render target. + * + * @async + * @param {RenderTarget} renderTarget - The render target to read from. + * @param {number} x - The `x` coordinate of the copy region's origin. + * @param {number} y - The `y` coordinate of the copy region's origin. + * @param {number} width - The width of the copy region. + * @param {number} height - The height of the copy region. + * @param {number} [textureIndex=0] - The texture index of a MRT render target. + * @param {number} [faceIndex=0] - The active cube face index. + * @return {Promise} A Promise that resolves when the read has been finished. The resolve provides the read data as a typed array. + */ + readRenderTargetPixelsAsync(renderTarget: RenderTarget, x: number, y: number, width: number, height: number, textureIndex?: number, faceIndex?: number): Promise; + /** + * Analyzes the given 3D object's hierarchy and builds render lists from the + * processed hierarchy. + * + * @private + * @param {Object3D} object - The 3D object to process (usually a scene). + * @param {Camera} camera - The camera the object is rendered with. + * @param {number} groupOrder - The group order is derived from the `renderOrder` of groups and is used to group 3D objects within groups. + * @param {RenderList} renderList - The current render list. + * @param {ClippingContext} clippingContext - The current clipping context. + */ + private _projectObject; + /** + * Renders the given render bundles. + * + * @private + * @param {Array} bundles - Array with render bundle data. + * @param {Scene} sceneRef - The scene the render bundles belong to. + * @param {LightsNode} lightsNode - The current lights node. + */ + private _renderBundles; + /** + * Renders the transparent objects from the given render lists. + * + * @private + * @param {Array} renderList - The transparent render list. + * @param {Array} doublePassList - The list of transparent objects which require a double pass (e.g. because of transmission). + * @param {Camera} camera - The camera the render list should be rendered with. + * @param {Scene} scene - The scene the render list belongs to. + * @param {LightsNode} lightsNode - The current lights node. + */ + private _renderTransparents; + /** + * Renders the objects from the given render list. + * + * @private + * @param {Array} renderList - The render list. + * @param {Camera} camera - The camera the render list should be rendered with. + * @param {Scene} scene - The scene the render list belongs to. + * @param {LightsNode} lightsNode - The current lights node. + * @param {?string} [passId=null] - An optional ID for identifying the pass. + */ + private _renderObjects; + /** + * Retrieves shadow nodes for the given material. This is used to setup shadow passes. + * The result is cached per material and updated when the material's version changes. + * + * @private + * @param {Material} material + * @returns {Object} - The shadow nodes for the material. + */ + private _getShadowNodes; + /** + * This method represents the default render object function that manages the render lifecycle + * of the object. + * + * @param {Object3D} object - The 3D object. + * @param {Scene} scene - The scene the 3D object belongs to. + * @param {Camera} camera - The camera the object should be rendered with. + * @param {BufferGeometry} geometry - The object's geometry. + * @param {Material} material - The object's material. + * @param {?Object} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. + * @param {LightsNode} lightsNode - The current lights node. + * @param {?ClippingContext} clippingContext - The clipping context. + * @param {?string} [passId=null] - An optional ID for identifying the pass. + */ + renderObject(object: Object3D, scene: Scene, camera: Camera, geometry: BufferGeometry, material: Material, group: Object | null, lightsNode: LightsNode, clippingContext?: ClippingContext | null, passId?: string | null): void; + /** + * Checks if the given compatibility is supported by the selected backend. + * + * @param {string} name - The compatibility's name. + * @return {boolean} Whether the compatibility is supported or not. + */ + hasCompatibility(name: string): boolean; + /** + * This method represents the default `_handleObjectFunction` implementation which creates + * a render object from the given data and performs the draw command with the selected backend. + * + * @private + * @param {Object3D} object - The 3D object. + * @param {Material} material - The object's material. + * @param {Scene} scene - The scene the 3D object belongs to. + * @param {Camera} camera - The camera the object should be rendered with. + * @param {LightsNode} lightsNode - The current lights node. + * @param {?{start: number, count: number}} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. + * @param {ClippingContext} clippingContext - The clipping context. + * @param {string} [passId] - An optional ID for identifying the pass. + */ + private _renderObjectDirect; + /** + * A different implementation for `_handleObjectFunction` which only makes sure the object is ready for rendering. + * Used in `compileAsync()`. + * + * @private + * @param {Object3D} object - The 3D object. + * @param {Material} material - The object's material. + * @param {Scene} scene - The scene the 3D object belongs to. + * @param {Camera} camera - The camera the object should be rendered with. + * @param {LightsNode} lightsNode - The current lights node. + * @param {?{start: number, count: number}} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. + * @param {ClippingContext} clippingContext - The clipping context. + * @param {string} [passId] - An optional ID for identifying the pass. + */ + private _createObjectPipeline; + /** + * Alias for `compileAsync()`. + * + * @method + * @param {Object3D} scene - The scene or 3D object to precompile. + * @param {Camera} camera - The camera that is used to render the scene. + * @param {Scene} targetScene - If the first argument is a 3D object, this parameter must represent the scene the 3D object is going to be added. + * @return {function(Object3D, Camera, ?Scene): Promise|undefined} A Promise that resolves when the compile has been finished. + */ + get compile(): (arg0: Object3D, arg1: Camera, arg2: Scene | null) => Promise | undefined; +} +/** + * Base class for node functions. A derived module must be implemented + * for each supported native shader language. Similar to other `Node*` modules, + * this class is only relevant during the building process and not used + * in user-level code. + */ +declare class NodeFunction { + /** + * Constructs a new node function. + * + * @param {string} type - The node type. This type is the return type of the node function. + * @param {Array} inputs - The function's inputs. + * @param {string} [name=''] - The function's name. + * @param {string} [precision=''] - The precision qualifier. + */ + constructor(type: string, inputs: Array, name?: string, precision?: string); + /** + * The node type. This type is the return type of the node function. + * + * @type {string} + */ + type: string; + /** + * The function's inputs. + * + * @type {Array} + */ + inputs: Array; + /** + * The name of the uniform. + * + * @type {string} + * @default '' + */ + name: string; + /** + * The precision qualifier. + * + * @type {string} + * @default '' + */ + precision: string; + /** + * This method returns the native code of the node function. + * + * @abstract + * @param {string} name - The function's name. + * @return {string} A shader code. + */ + getCode(): string; +} +declare namespace NodeFunction { + let isNodeFunction: boolean; +} +/** + * A special form of uniforms group that represents + * the individual uniforms as node-based uniforms. + * + * @private + * @augments UniformsGroup + */ +declare class NodeUniformsGroup extends UniformsGroup { + /** + * Constructs a new node-based uniforms group. + * + * @param {string} name - The group's name. + * @param {UniformGroupNode} groupNode - The uniform group node. + */ + constructor(name: string, groupNode: UniformGroupNode); + /** + * The group's ID. + * + * @type {number} + */ + id: number; + /** + * The uniform group node. + * + * @type {UniformGroupNode} + */ + groupNode: UniformGroupNode; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isNodeUniformsGroup: boolean; +} +declare class ShaderNodeInternal extends Node { + constructor(jsFunc: any, nodeType: any); + jsFunc: any; + layout: any; + once: boolean; + setLayout(layout: any): this; + getLayout(): any; + call(rawInputs?: null): ShaderCallNodeInternal; + setup(): ShaderCallNodeInternal; +} +/** + * Base class for node parsers. A derived parser must be implemented + * for each supported native shader language. + */ +declare class NodeParser { + /** + * The method parses the given native code an returns a node function. + * + * @abstract + * @param {string} source - The native shader code. + * @return {NodeFunction} A node function. + */ + parseFunction(): NodeFunction; +} +/** + * This class represents a GLSL node function. + * + * @augments NodeFunction + */ +declare class GLSLNodeFunction extends NodeFunction { + /** + * Constructs a new GLSL node function. + * + * @param {string} source - The GLSL source. + */ + constructor(source: string); + inputsCode: any; + blockCode: any; + headerCode: any; + /** + * This method returns the GLSL code of the node function. + * + * @param {string} [name=this.name] - The function's name. + * @return {string} The shader code. + */ + getCode(name?: string): string; +} +/** + * Represents the lighting model for unlit materials. The only light contribution + * is baked indirect lighting modulated with ambient occlusion and the material's + * diffuse color. Environment mapping is supported. Used in {@link MeshBasicNodeMaterial}. + * + * @augments LightingModel + */ +declare class BasicLightingModel extends LightingModel { + /** + * Implements the baked indirect lighting with its modulation. + * + * @param {NodeBuilder} builder - The current node builder. + */ + indirect({ context }: NodeBuilder): void; + /** + * Implements the environment mapping. + * + * @param {NodeBuilder} builder - The current node builder. + */ + finish(builder: NodeBuilder): void; +} +/** + * Represents the lighting model for {@link MeshSSSNodeMaterial}. + * + * @augments PhysicalLightingModel + */ +declare class SSSLightingModel extends PhysicalLightingModel { + /** + * Constructs a new physical lighting model. + * + * @param {boolean} [clearcoat=false] - Whether clearcoat is supported or not. + * @param {boolean} [sheen=false] - Whether sheen is supported or not. + * @param {boolean} [iridescence=false] - Whether iridescence is supported or not. + * @param {boolean} [anisotropy=false] - Whether anisotropy is supported or not. + * @param {boolean} [transmission=false] - Whether transmission is supported or not. + * @param {boolean} [dispersion=false] - Whether dispersion is supported or not. + * @param {boolean} [sss=false] - Whether SSS is supported or not. + */ + constructor(clearcoat?: boolean, sheen?: boolean, iridescence?: boolean, anisotropy?: boolean, transmission?: boolean, dispersion?: boolean, sss?: boolean); + /** + * Whether the lighting model should use SSS or not. + * + * @type {boolean} + * @default false + */ + useSSS: boolean; + /** + * Extends the default implementation with a SSS term. + * + * Reference: [Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look](https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/) + * + * @param {Object} input - The input data. + * @param {NodeBuilder} builder - The current node builder. + */ + direct({ lightDirection, lightColor, reflectedLight }: Object, builder: NodeBuilder): void; +} +/** + * Represents the lighting model for a toon material. Used in {@link MeshToonNodeMaterial}. + * + * @augments LightingModel + */ +declare class ToonLightingModel extends LightingModel { + /** + * Implements the direct lighting. Instead of using a conventional smooth irradiance, the irradiance is + * reduced to a small number of discrete shades to create a comic-like, flat look. + * + * @param {Object} lightData - The light data. + * @param {NodeBuilder} builder - The current node builder. + */ + direct({ lightDirection, lightColor, reflectedLight }: Object, builder: NodeBuilder): void; + /** + * Implements the indirect lighting. + * + * @param {NodeBuilder} builder - The current node builder. + */ + indirect(builder: NodeBuilder): void; +} +/** + * Represents the state that is used to perform clipping via clipping planes. + * There is a default clipping context for each render context. When the + * scene holds instances of `ClippingGroup`, there will be a context for each + * group. + * + * @private + */ +declare class ClippingContext { + /** + * Constructs a new clipping context. + * + * @param {?ClippingContext} [parentContext=null] - A reference to the parent clipping context. + */ + constructor(parentContext?: ClippingContext | null); + /** + * The clipping context's version. + * + * @type {number} + * @readonly + */ + readonly version: number; + /** + * Whether the intersection of the clipping planes is used to clip objects, rather than their union. + * + * @type {?boolean} + * @default null + */ + clipIntersection: boolean | null; + /** + * The clipping context's cache key. + * + * @type {string} + */ + cacheKey: string; + /** + * Whether the shadow pass is active or not. + * + * @type {boolean} + * @default false + */ + shadowPass: boolean; + /** + * The view matrix. + * + * @type {Matrix4} + */ + viewMatrix: Matrix4; + /** + * The view normal matrix. + * + * @type {Matrix3} + */ + viewNormalMatrix: Matrix3; + /** + * Internal cache for maintaining clipping contexts. + * + * @type {WeakMap} + */ + clippingGroupContexts: WeakMap; + /** + * The intersection planes. + * + * @type {Array} + */ + intersectionPlanes: Array; + /** + * The intersection planes. + * + * @type {Array} + */ + unionPlanes: Array; + /** + * The version of the clipping context's parent context. + * + * @type {?number} + * @readonly + */ + readonly parentVersion: number | null; + /** + * Projects the given source clipping planes and writes the result into the + * destination array. + * + * @param {Array} source - The source clipping planes. + * @param {Array} destination - The destination. + * @param {number} offset - The offset. + */ + projectPlanes(source: Array, destination: Array, offset: number): void; + /** + * Updates the root clipping context of a scene. + * + * @param {Scene} scene - The scene. + * @param {Camera} camera - The camera that is used to render the scene. + */ + updateGlobal(scene: Scene, camera: Camera): void; + /** + * Updates the clipping context. + * + * @param {ClippingContext} parentContext - The parent context. + * @param {ClippingGroup} clippingGroup - The clipping group this context belongs to. + */ + update(parentContext: ClippingContext, clippingGroup: ClippingGroup): void; + /** + * Returns a clipping context for the given clipping group. + * + * @param {ClippingGroup} clippingGroup - The clipping group. + * @return {ClippingContext} The clipping context. + */ + getGroupContext(clippingGroup: ClippingGroup): ClippingContext; + /** + * The count of union clipping planes. + * + * @type {number} + * @readonly + */ + readonly get unionClippingCount(): number; +} +/** + * A bind group represents a collection of bindings and thus a collection + * or resources. Bind groups are assigned to pipelines to provide them + * with the required resources (like uniform buffers or textures). + * + * @private + */ +declare class BindGroup { + /** + * Constructs a new bind group. + * + * @param {string} name - The bind group's name. + * @param {Array} bindings - An array of bindings. + * @param {number} index - The group index. + */ + constructor(name?: string, bindings?: Array); + /** + * The bind group's name. + * + * @type {string} + */ + name: string; + /** + * An array of bindings. + * + * @type {Array} + */ + bindings: Array; + /** + * The group's ID. + * + * @type {number} + */ + id: number; +} +declare class StructType { + constructor(name: any, members: any); + name: any; + members: any; + output: boolean; +} +/** + * Abstract base class for uniforms. + * + * @abstract + * @private + */ +declare class Uniform { + /** + * Constructs a new uniform. + * + * @param {string} name - The uniform's name. + * @param {any} value - The uniform's value. + */ + constructor(name: string, value: any); + /** + * The uniform's name. + * + * @type {string} + */ + name: string; + /** + * The uniform's value. + * + * @type {any} + */ + value: any; + /** + * Used to build the uniform buffer according to the STD140 layout. + * Derived uniforms will set this property to a data type specific + * value. + * + * @type {number} + */ + boundary: number; + /** + * The item size. Derived uniforms will set this property to a data + * type specific value. + * + * @type {number} + */ + itemSize: number; + /** + * This property is set by {@link UniformsGroup} and marks + * the start position in the uniform buffer. + * + * @type {number} + */ + offset: number; + /** + * This property is set by {@link UniformsGroup} and marks + * the index position in the uniform array. + * + * @type {number} + */ + index: number; + /** + * Sets the uniform's value. + * + * @param {any} value - The value to set. + */ + setValue(value: any): void; + /** + * Returns the uniform's value. + * + * @return {any} The value. + */ + getValue(): any; +} +/** + * A render object is the renderer's representation of single entity that gets drawn + * with a draw command. There is no unique mapping of render objects to 3D objects in the + * scene since render objects also depend from the used material, the current render context + * and the current scene's lighting. + * + * In general, the basic process of the renderer is: + * + * - Analyze the 3D objects in the scene and generate render lists containing render items. + * - Process the render lists by calling one or more render commands for each render item. + * - For each render command, request a render object and perform the draw. + * + * The module provides an interface to get data required for the draw command like the actual + * draw parameters or vertex buffers. It also holds a series of caching related methods since + * creating render objects should only be done when necessary. + * + * @private + */ +declare class RenderObject { + /** + * Constructs a new render object. + * + * @param {NodeManager} nodes - Renderer component for managing nodes related logic. + * @param {Geometries} geometries - Renderer component for managing geometries. + * @param {Renderer} renderer - The renderer. + * @param {Object3D} object - The 3D object. + * @param {Material} material - The 3D object's material. + * @param {Scene} scene - The scene the 3D object belongs to. + * @param {Camera} camera - The camera the object should be rendered with. + * @param {LightsNode} lightsNode - The lights node. + * @param {RenderContext} renderContext - The render context. + * @param {ClippingContext} clippingContext - The clipping context. + */ + constructor(nodes: NodeManager, geometries: Geometries, renderer: Renderer, object: Object3D, material: Material, scene: Scene, camera: Camera, lightsNode: LightsNode, renderContext: RenderContext, clippingContext: ClippingContext); + id: number; + /** + * Renderer component for managing nodes related logic. + * + * @type {NodeManager} + * @private + */ + private _nodes; + /** + * Renderer component for managing geometries. + * + * @type {Geometries} + * @private + */ + private _geometries; + /** + * The renderer. + * + * @type {Renderer} + */ + renderer: Renderer; + /** + * The 3D object. + * + * @type {Object3D} + */ + object: Object3D; + /** + * The 3D object's material. + * + * @type {Material} + */ + material: Material; + /** + * The scene the 3D object belongs to. + * + * @type {Scene} + */ + scene: Scene; + /** + * The camera the 3D object should be rendered with. + * + * @type {Camera} + */ + camera: Camera; + /** + * The lights node. + * + * @type {LightsNode} + */ + lightsNode: LightsNode; + /** + * The render context. + * + * @type {RenderContext} + */ + context: RenderContext; + /** + * The 3D object's geometry. + * + * @type {BufferGeometry} + */ + geometry: BufferGeometry; + /** + * The render object's version. + * + * @type {number} + */ + version: number; + /** + * The draw range of the geometry. + * + * @type {?Object} + * @default null + */ + drawRange: Object | null; + /** + * An array holding the buffer attributes + * of the render object. This entails attribute + * definitions on geometry and node level. + * + * @type {?Array} + * @default null + */ + attributes: Array | null; + /** + * An object holding the version of the + * attributes. The keys are the attribute names + * and the values are the attribute versions. + * + * @type {?Object} + * @default null + */ + attributesId: { + [x: string]: number; + } | null; + /** + * A reference to a render pipeline the render + * object is processed with. + * + * @type {RenderPipeline} + * @default null + */ + pipeline: RenderPipeline; + /** + * Only relevant for objects using + * multiple materials. This represents a group entry + * from the respective `BufferGeometry`. + * + * @type {?{start: number, count: number}} + * @default null + */ + group: { + start: number; + count: number; + } | null; + /** + * An array holding the vertex buffers which can + * be buffer attributes but also interleaved buffers. + * + * @type {?Array} + * @default null + */ + vertexBuffers: Array | null; + /** + * The parameters for the draw command. + * + * @type {?Object} + * @default null + */ + drawParams: Object | null; + /** + * If this render object is used inside a render bundle, + * this property points to the respective bundle group. + * + * @type {?BundleGroup} + * @default null + */ + bundle: BundleGroup | null; + /** + * The clipping context. + * + * @type {ClippingContext} + */ + clippingContext: ClippingContext; + /** + * The clipping context's cache key. + * + * @type {string} + */ + clippingContextCacheKey: string; + /** + * The initial node cache key. + * + * @type {number} + */ + initialNodesCacheKey: number; + /** + * The initial cache key. + * + * @type {number} + */ + initialCacheKey: number; + /** + * The node builder state. + * + * @type {?NodeBuilderState} + * @private + * @default null + */ + private _nodeBuilderState; + /** + * An array of bindings. + * + * @type {?Array} + * @private + * @default null + */ + private _bindings; + /** + * Reference to the node material observer. + * + * @type {?NodeMaterialObserver} + * @private + * @default null + */ + private _monitor; + /** + * An event listener which is defined by `RenderObjects`. It performs + * clean up tasks when `dispose()` on this render object. + * + * @method + */ + onDispose: any; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isRenderObject: boolean; + /** + * An event listener which is executed when `dispose()` is called on + * the material of this render object. + * + * @method + */ + onMaterialDispose: () => void; + /** + * An event listener which is executed when `dispose()` is called on + * the geometry of this render object. + * + * @method + */ + onGeometryDispose: () => void; + /** + * Updates the clipping context. + * + * @param {ClippingContext} context - The clipping context to set. + */ + updateClipping(context: ClippingContext): void; + /** + * Whether the clipping requires an update or not. + * + * @type {boolean} + * @readonly + */ + readonly get clippingNeedsUpdate(): boolean; + /** + * The number of clipping planes defined in context of hardware clipping. + * + * @type {number} + * @readonly + */ + readonly get hardwareClippingPlanes(): number; + /** + * Returns the node builder state of this render object. + * + * @return {NodeBuilderState} The node builder state. + */ + getNodeBuilderState(): NodeBuilderState; + /** + * Returns the node material observer of this render object. + * + * @return {NodeMaterialObserver} The node material observer. + */ + getMonitor(): NodeMaterialObserver; + /** + * Returns an array of bind groups of this render object. + * + * @return {Array} The bindings. + */ + getBindings(): Array; + /** + * Returns a binding group by group name of this render object. + * + * @param {string} name - The name of the binding group. + * @return {?BindGroup} The bindings. + */ + getBindingGroup(name: string): BindGroup | null; + /** + * Returns the index of the render object's geometry. + * + * @return {?BufferAttribute} The index. Returns `null` for non-indexed geometries. + */ + getIndex(): BufferAttribute | null; + /** + * Returns the indirect buffer attribute. + * + * @return {?BufferAttribute} The indirect attribute. `null` if no indirect drawing is used. + */ + getIndirect(): BufferAttribute | null; + /** + * Returns the byte offset into the indirect attribute buffer. + * + * @return {number|Array} The byte offset into the indirect attribute buffer. + */ + getIndirectOffset(): number | Array; + /** + * Returns an array that acts as a key for identifying the render object in a chain map. + * + * @return {Array} An array with object references. + */ + getChainArray(): Array; + /** + * This method is used when the geometry of a 3D object has been exchanged and the + * respective render object now requires an update. + * + * @param {BufferGeometry} geometry - The geometry to set. + */ + setGeometry(geometry: BufferGeometry): void; + /** + * Returns the buffer attributes of the render object. The returned array holds + * attribute definitions on geometry and node level. + * + * @return {Array} An array with buffer attributes. + */ + getAttributes(): Array; + /** + * Returns the vertex buffers of the render object. + * + * @return {Array} An array with buffer attribute or interleaved buffers. + */ + getVertexBuffers(): Array; + /** + * Returns the draw parameters for the render object. + * + * @return {?{vertexCount: number, firstVertex: number, instanceCount: number, firstInstance: number}} The draw parameters. + */ + getDrawParameters(): { + vertexCount: number; + firstVertex: number; + instanceCount: number; + firstInstance: number; + } | null; + /** + * Returns the render object's geometry cache key. + * + * The geometry cache key is part of the material cache key. + * + * @return {string} The geometry cache key. + */ + getGeometryCacheKey(): string; + /** + * Returns the render object's material cache key. + * + * The material cache key is part of the render object cache key. + * + * @return {number} The material cache key. + */ + getMaterialCacheKey(): number; + /** + * Whether the geometry requires an update or not. + * + * @type {boolean} + * @readonly + */ + readonly get needsGeometryUpdate(): boolean; + /** + * Whether the render object requires an update or not. + * + * Note: There are two distinct places where render objects are checked for an update. + * + * 1. In `RenderObjects.get()` which is executed when the render object is request. This + * method checks the `needsUpdate` flag and recreates the render object if necessary. + * 2. In `Renderer._renderObjectDirect()` right after getting the render object via + * `RenderObjects.get()`. The render object's NodeMaterialObserver is then used to detect + * a need for a refresh due to material, geometry or object related value changes. + * + * TODO: Investigate if it's possible to merge both steps so there is only a single place + * that performs the 'needsUpdate' check. + * + * @type {boolean} + * @readonly + */ + readonly get needsUpdate(): boolean; + /** + * Returns the dynamic cache key which represents a key that is computed per draw command. + * + * @return {number} The cache key. + */ + getDynamicCacheKey(): number; + /** + * Returns the render object's cache key. + * + * @return {number} The cache key. + */ + getCacheKey(): number; + /** + * Frees internal resources. + */ + dispose(): void; +} +/** + * Converts the given array buffer to a Base64 string. + * + * @private + * @method + * @param {ArrayBuffer} arrayBuffer - The array buffer. + * @return {string} The Base64 string. + */ +declare function arrayBufferToBase64(arrayBuffer: ArrayBuffer): string; +/** + * Converts the given Base64 string to an array buffer. + * + * @private + * @method + * @param {string} base64 - The Base64 string. + * @return {ArrayBuffer} The array buffer. + */ +declare function base64ToArrayBuffer(base64: string): ArrayBuffer; +/** + * Returns the alignment requirement for the given data type in 4-byte elements. + * + * @private + * @method + * @param {string} type - The data type. + * @return {number} The alignment requirement in 4-byte elements. + */ +declare function getAlignmentFromType(type: string): number; +/** + * Gets the object data that can be shared between different rendering steps. + * + * @private + * @param {Object} object - The object to get the data for. + * @return {Object} The object data. + */ +declare function getDataFromObject(object: Object): Object; +/** + * Returns the length for the given data type. + * + * @private + * @method + * @param {string} type - The data type. + * @return {number} The length. + */ +declare function getLengthFromType(type: string): number; +/** + * Returns the gpu memory length for the given data type in 4-byte elements. + * + * @private + * @method + * @param {string} type - The data type. + * @return {number} The memory length in 4-byte elements. + */ +declare function getMemoryLengthFromType(type: string): number; +/** + * Returns the data type for the given the length. + * + * @private + * @method + * @param {number} length - The length. + * @return {string} The data type. + */ +declare function getTypeFromLength(length: number): string; +/** + * Returns the typed array for the given data type. + * + * @private + * @method + * @param {string} type - The data type. + * @return {TypedArray} The typed array. + */ +declare function getTypedArrayFromType(type: string): TypedArray; +/** + * Returns the value/object for the given data type and parameters. + * + * @private + * @method + * @param {string} type - The given type. + * @param {...any} params - A parameter list. + * @return {any} The value/object. + */ +declare function getValueFromType(type: string, ...params: any[]): any; +/** + * Returns the data type for the given value. + * + * @private + * @method + * @param {any} value - The value. + * @return {?string} The data type. + */ +declare function getValueType(value: any): string | null; +/** + * This class is only relevant if the referenced property is array-like. + * In this case, `ReferenceElementNode` allows to refer to a specific + * element inside the data structure via an index. + * + * @augments ArrayElementNode + */ +declare class ReferenceElementNode extends ArrayElementNode { + /** + * Constructs a new reference element node. + * + * @param {?ReferenceNode} referenceNode - The reference node. + * @param {Node} indexNode - The index node that defines the element access. + */ + constructor(referenceNode: ReferenceNode | null, indexNode: Node); + /** + * Similar to {@link ReferenceNode#reference}, an additional + * property references to the current node. + * + * @type {?ReferenceNode} + * @default null + */ + referenceNode: ReferenceNode | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isReferenceElementNode: boolean; + /** + * This method is overwritten since the node type is inferred from + * the uniform type of the reference node. + * + * @return {string} The node type. + */ + generateNodeType(): string; + generate(builder: any): any; +} +/** + * Holds the actual implementation of the reflector. + * + * TODO: Explain why `ReflectorBaseNode`. Originally the entire logic was implemented + * in `ReflectorNode`, see #29619. + * + * @private + * @augments Node + */ +declare class ReflectorBaseNode extends Node { + /** + * Constructs a new reflector base node. + * + * @param {TextureNode} textureNode - Represents the rendered reflections as a texture node. + * @param {Object} [parameters={}] - An object holding configuration parameters. + * @param {Object3D} [parameters.target=new Object3D()] - The 3D object the reflector is linked to. + * @param {number} [parameters.resolutionScale=1] - The resolution scale. + * @param {boolean} [parameters.generateMipmaps=false] - Whether mipmaps should be generated or not. + * @param {boolean} [parameters.bounces=true] - Whether reflectors can render other reflector nodes or not. + * @param {boolean} [parameters.depth=false] - Whether depth data should be generated or not. + * @param {number} [parameters.samples] - Anti-Aliasing samples of the internal render-target. + */ + constructor(textureNode: TextureNode, parameters?: { + target?: Object3D | undefined; + resolutionScale?: number | undefined; + generateMipmaps?: boolean | undefined; + bounces?: boolean | undefined; + depth?: boolean | undefined; + samples?: number | undefined; + }); + /** + * Represents the rendered reflections as a texture node. + * + * @type {TextureNode} + */ + textureNode: TextureNode; + /** + * The 3D object the reflector is linked to. + * + * @type {Object3D} + * @default {new Object3D()} + */ + target: Object3D; + /** + * The resolution scale. + * + * @type {number} + * @default {1} + */ + resolutionScale: number; + /** + * Whether mipmaps should be generated or not. + * + * @type {boolean} + * @default {false} + */ + generateMipmaps: boolean; + /** + * Whether reflectors can render other reflector nodes or not. + * + * @type {boolean} + * @default {true} + */ + bounces: boolean; + /** + * Whether depth data should be generated or not. + * + * @type {boolean} + * @default {false} + */ + depth: boolean; + /** + * The number of anti-aliasing samples for the render-target + * + * @type {number} + * @default {0} + */ + samples: number; + /** + * Weak map for managing virtual cameras. + * + * @type {WeakMap} + */ + virtualCameras: WeakMap; + /** + * Weak map for managing render targets. + * + * @type {Map} + */ + renderTargets: Map; + /** + * Force render even if reflector is facing away from camera. + * + * @type {boolean} + * @default {false} + */ + forceUpdate: boolean; + /** + * Whether the reflector has been rendered or not. + * + * When the reflector is facing away from the camera, + * this flag is set to `false` and the texture will be empty(black). + * + * @type {boolean} + * @default {false} + */ + hasOutput: boolean; + /** + * Updates the resolution of the internal render target. + * + * @private + * @param {RenderTarget} renderTarget - The render target to resize. + * @param {Renderer} renderer - The renderer that is used to determine the new size. + */ + private _updateResolution; + setup(builder: any): Node | null; + /** + * Returns a virtual camera for the given camera. The virtual camera is used to + * render the scene from the reflector's view so correct reflections can be produced. + * + * @param {Camera} camera - The scene's camera. + * @return {Camera} The corresponding virtual camera. + */ + getVirtualCamera(camera: Camera): Camera; + /** + * Returns a render target for the given camera. The reflections are rendered + * into this render target. + * + * @param {Camera} camera - The scene's camera. + * @return {RenderTarget} The render target. + */ + getRenderTarget(camera: Camera): RenderTarget; + updateBefore(frame: any): false | undefined; + set resolution(value: number); + /** + * The resolution scale. + * + * @deprecated + * @type {number} + * @default {1} + */ + get resolution(): number; +} +/** + * Saves the state of the given renderer and scene and stores it into the given state object. + * Besides, the function also resets the state of the renderer and scene to its default values. + * + * If not state object is provided, the function creates one. + * + * @private + * @function + * @param {Renderer} renderer - The renderer. + * @param {Scene} scene - The scene. + * @param {Object} [state={}] - The state. + * @return {Object} The state. + */ +declare function resetRendererAndSceneState(renderer: Renderer, scene: Scene, state?: Object): Object; +/** + * Saves the state of the given renderer and stores it into the given state object. + * Besides, the function also resets the state of the renderer to its default values. + * + * If not state object is provided, the function creates one. + * + * @private + * @function + * @param {Renderer} renderer - The renderer. + * @param {Object} [state={}] - The state. + * @return {Object} The state. + */ +declare function resetRendererState(renderer: Renderer, state?: Object): Object; +/** + * Saves the state of the given scene and stores it into the given state object. + * Besides, the function also resets the state of the scene to its default values. + * + * If not state object is provided, the function creates one. + * + * @private + * @function + * @param {Scene} scene - The scene. + * @param {Object} [state={}] - The state. + * @return {Object} The state. + */ +declare function resetSceneState(scene: Scene, state?: Object): Object; +/** + * Restores the state of the given renderer and scene from the given state object. + * + * @private + * @function + * @param {Renderer} renderer - The renderer. + * @param {Scene} scene - The scene. + * @param {Object} state - The state to restore. + */ +declare function restoreRendererAndSceneState(renderer: Renderer, scene: Scene, state: Object): void; +/** + * Restores the state of the given renderer from the given state object. + * + * @private + * @function + * @param {Renderer} renderer - The renderer. + * @param {Object} state - The state to restore. + */ +declare function restoreRendererState(renderer: Renderer, state: Object): void; +/** + * Restores the state of the given scene from the given state object. + * + * @private + * @function + * @param {Scene} scene - The scene. + * @param {Object} state - The state to restore. + */ +declare function restoreSceneState(scene: Scene, state: Object): void; +/** + * Saves the state of the given renderer and scene and stores it into the given state object. + * + * If not state object is provided, the function creates one. + * + * @private + * @function + * @param {Renderer} renderer - The renderer. + * @param {Scene} scene - The scene. + * @param {Object} [state={}] - The state. + * @return {Object} The state. + */ +declare function saveRendererAndSceneState(renderer: Renderer, scene: Scene, state?: Object): Object; +/** + * Saves the state of the given renderer and stores it into the given state object. + * + * If not state object is provided, the function creates one. + * + * @private + * @function + * @param {Renderer} renderer - The renderer. + * @param {Object} [state={}] - The state. + * @return {Object} The state. + */ +declare function saveRendererState(renderer: Renderer, state?: Object): Object; +/** + * Saves the state of the given scene and stores it into the given state object. + * + * If not state object is provided, the function creates one. + * + * @private + * @function + * @param {Scene} scene - The scene. + * @param {Object} [state={}] - The state. + * @return {Object} The state. + */ +declare function saveSceneState(scene: Scene, state?: Object): Object; +declare class ShaderCallNodeInternal extends Node { + constructor(shaderNode: any, rawInputs: any); + shaderNode: any; + rawInputs: any; + isShaderCallNodeInternal: boolean; + generateNodeType(builder: any): any; + getElementType(builder: any): any; + getMemberType(builder: any, name: any): any; + call(builder: any): any; + setupOutput(builder: any): any; + getOutputNode(builder: any): any; + build(builder: any, output?: null): any; +} +/** + * Represents lighting model for a shadow material. Used in {@link ShadowNodeMaterial}. + * + * @augments LightingModel + */ +declare class ShadowMaskModel extends LightingModel { + /** + * The shadow mask node. + * + * @type {Node} + */ + shadowNode: Node; + /** + * Only used to save the shadow mask. + * + * @param {Object} input - The input data. + */ + direct({ lightNode }: Object): void; + /** + * Uses the shadow mask to produce the final color. + * + * @param {NodeBuilder} builder - The current node builder. + */ + finish({ context }: NodeBuilder): void; +} +declare function Fn(jsFunc: any, layout?: null): () => void; +declare function ShaderNode(jsFunc: any, nodeType: any): ShaderNodeInternal; +/** + * Add the given node to the current stack. + * + * @param {Node} node - The node to add. + * @returns {Node} The node that was added to the stack. + */ +declare function Stack(node: Node): Node; +declare function addMethodChaining(name: any, nodeElement: any): void; +declare function addNodeElement(name: any): void; +/** + * TSL function for defining a built-in ambient occlusion context for a given node. + * + * @tsl + * @function + * @param {Node} aoNode - The ambient occlusion value node to apply. + * @param {Node} [node=null] - The node whose context should be modified. + * @returns {ContextNode} + */ +declare function builtinAOContext(aoNode: Node, node?: Node): ContextNode; +/** + * TSL function for defining a built-in shadow context for a given node. + * + * @tsl + * @function + * @param {ShadowNode} shadowNode - The shadow node representing the light's shadow. + * @param {Light} light - The light associated with the shadow. + * @param {Node} [node=null] - The node whose context should be modified. + * @returns {ContextNode} + */ +declare function builtinShadowContext(shadowNode: ShadowNode, light: Light, node?: Node): ContextNode; +/** + * TSL function for creating a cache node. + * + * @tsl + * @function + * @deprecated + * @param {Node} node - The node that should be cached. + * @param {boolean} [parent=true] - Whether this node refers to a shared parent cache or not. + * @returns {IsolateNode} + */ +declare function cache(node: Node, parent?: boolean): IsolateNode; +declare function defined(value: any): boolean; +/** + * Returns the MRT texture index for the given name. + * + * @param {Array} textures - The textures of a MRT-configured render target. + * @param {string} name - The name of the MRT texture which index is requested. + * @return {number} The texture index. + */ +declare function getTextureIndex(textures: Array, name: string): number; +/** + * Creates an inspector node to wrap around a given node for inspection purposes. + * + * @tsl + * @param {Node} node - The node to inspect. + * @param {string} [name=''] - Optional name for the inspector node. + * @param {Function|null} [callback=null] - Optional callback to modify the node during setup. + * @returns {Node} The inspector node. + */ +declare function inspector(node: Node, name?: string, callback?: Function | null): Node; +/** + * TSL function for defining a label context value for a given node. + * + * @tsl + * @function + * @deprecated + * @param {Node} node - The node whose context should be modified. + * @param {string} name - The name/label to set. + * @returns {ContextNode} + */ +declare function label(node: Node, name: string): ContextNode; +/** + * TSL function for getting the position in world space for the given light. + * + * @tsl + * @function + * @param {Light} light -The light source. + * @returns {UniformNode} The light's position in world space. + */ +declare function lightPosition(light: Light): UniformNode; +/** + * TSL function for getting projected uv coordinates for the given light. + * Relevant when using maps with spot lights. + * + * @tsl + * @function + * @param {Light} light -The light source. + * @param {Node} [position=positionWorld] -The position to project. + * @returns {Node} The projected uvs. + */ +declare function lightProjectionUV(light: Light, position?: Node): Node; +/** + * TSL function for getting a shadow matrix uniform node for the given light. + * + * @tsl + * @function + * @param {Light} light -The light source. + * @returns {UniformNode} The shadow matrix uniform node. + */ +declare function lightShadowMatrix(light: Light): UniformNode; +/** + * TSL function for getting the light target position in world space for the given light. + * + * @tsl + * @function + * @param {Light} light -The light source. + * @returns {UniformNode} The light target position in world space. + */ +declare function lightTargetPosition(light: Light): UniformNode; +/** + * TSL function for getting the position in view space for the given light. + * + * @tsl + * @function + * @param {Light} light - The light source. + * @returns {UniformNode} The light's position in view space. + */ +declare function lightViewPosition(light: Light): UniformNode; +/** + * Represents the texture of a pass node. + * + * @augments TextureNode + */ +declare class PassTextureNode extends TextureNode { + /** + * Constructs a new pass texture node. + * + * @param {PassNode} passNode - The pass node. + * @param {Texture} texture - The output texture. + */ + constructor(passNode: PassNode, texture: Texture); + /** + * A reference to the pass node. + * + * @type {PassNode} + */ + passNode: PassNode; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @default true + * @readonly + */ + readonly isPassTextureNode: boolean; + setup(builder: any): void; + clone(): any; +} +/** + * This node allows to remap a node value from one range into another but with enabled clamping. E.g a value of + * `0.4` in the range `[ 0.3, 0.5 ]` should be remapped into the normalized range `[ 0, 1 ]`. + * `remapClamp` takes care of that and converts the original value of `0.4` to `0.5`. + * + * @tsl + * @function + * @param {Node} node - The node that should be remapped. + * @param {Node} inLowNode - The source or current lower bound of the range. + * @param {Node} inHighNode - The source or current upper bound of the range. + * @param {?Node} [outLowNode=float(0)] - The target lower bound of the range. + * @param {?Node} [outHighNode=float(1)] - The target upper bound of the range. + * @returns {Node} + */ +declare function remapClamp(node: Node, inLowNode: Node, inHighNode: Node, outLowNode?: Node | null, outHighNode?: Node | null): Node; +/** + * Replaces the default UV coordinates used in texture lookups. + * + * ```js + *material.contextNode = replaceDefaultUV( ( textureNode ) => { + * + * // ... + * return customUVCoordinates; + * + *} ); + *``` + * + * @tsl + * @function + * @param {function(Node):Node|Node} callback - A callback that receives the texture node + * and must return the new uv coordinates. + * @param {Node} [node=null] - An optional node to which the context will be applied. + * @return {ContextNode} A context node that replaces the default UV coordinates. + */ +declare function replaceDefaultUV(callback: (arg0: Node) => Node | Node, node?: Node): ContextNode; +/** + * Represents the element access on uniform array nodes. + * + * @augments ArrayElementNode + */ +declare class UniformArrayElementNode extends ArrayElementNode { + /** + * Constructs a new buffer node. + * + * @param {UniformArrayNode} uniformArrayNode - The uniform array node to access. + * @param {IndexNode} indexNode - The index data that define the position of the accessed element in the array. + */ + constructor(uniformArrayNode: UniformArrayNode, indexNode: IndexNode); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isArrayBufferElementNode: boolean; + generate(builder: any): any; +} +/** + * VolumetricLightingModel class extends the LightingModel to implement volumetric lighting effects. + * This model calculates the scattering and transmittance of light through a volumetric medium. + * It dynamically adjusts the direction of the ray based on the camera and object positions. + * The model supports custom scattering and depth nodes to enhance the lighting effects. + * + * @augments LightingModel + */ +declare class VolumetricLightingModel extends LightingModel { + start(builder: any): void; + scatteringLight(lightColor: any, builder: any): void; + direct({ lightNode, lightColor }: { + lightNode: any; + lightColor: any; + }, builder: any): void; + directRectArea({ lightColor, lightPosition, halfWidth, halfHeight }: { + lightColor: any; + lightPosition: any; + halfWidth: any; + halfHeight: any; + }, builder: any): void; + finish(builder: any): void; +} +/** + * Most of the rendering related logic is implemented in the + * {@link Renderer} module and related management components. + * Sometimes it is required though to execute commands which are + * specific to the current 3D backend (which is WebGPU or WebGL 2). + * This abstract base class defines an interface that encapsulates + * all backend-related logic. Derived classes for each backend must + * implement the interface. + * + * @abstract + * @private + */ +declare class Backend { + /** + * Constructs a new backend. + * + * @param {Object} parameters - An object holding parameters for the backend. + */ + constructor(parameters?: Object); + /** + * The parameters of the backend. + * + * @type {Object} + */ + parameters: Object; + /** + * This weak map holds backend-specific data of objects + * like textures, attributes or render targets. + * + * @type {WeakMap} + */ + data: WeakMap; + /** + * A reference to the renderer. + * + * @type {?Renderer} + * @default null + */ + renderer: Renderer | null; + /** + * A reference to the canvas element the renderer is drawing to. + * + * @type {?(HTMLCanvasElement|OffscreenCanvas)} + * @default null + */ + domElement: (HTMLCanvasElement | OffscreenCanvas) | null; + /** + * A reference to the timestamp query pool. + * + * @type {{render: ?TimestampQueryPool, compute: ?TimestampQueryPool}} + */ + timestampQueryPool: { + render: TimestampQueryPool | null; + compute: TimestampQueryPool | null; + }; + /** + * Whether to track timestamps with a Timestamp Query API or not. + * + * @type {boolean} + * @default false + */ + trackTimestamp: boolean; + /** + * Initializes the backend so it is ready for usage. Concrete backends + * are supposed to implement their rendering context creation and related + * operations in this method. + * + * @async + * @param {Renderer} renderer - The renderer. + * @return {Promise} A Promise that resolves when the backend has been initialized. + */ + init(renderer: Renderer): Promise; + /** + * The coordinate system of the backend. + * + * @abstract + * @type {number} + * @readonly + */ + readonly get coordinateSystem(): number; + /** + * This method is executed at the beginning of a render call and + * can be used by the backend to prepare the state for upcoming + * draw calls. + * + * @abstract + * @param {RenderContext} renderContext - The render context. + */ + beginRender(): void; + /** + * This method is executed at the end of a render call and + * can be used by the backend to finalize work after draw + * calls. + * + * @abstract + * @param {RenderContext} renderContext - The render context. + */ + finishRender(): void; + /** + * Sets the XR rendering destination. + * + * Backends that render directly into XR framebuffers can override this hook. + * + * @param {?Object} xrTarget - The XR rendering destination. + */ + setXRTarget(): void; + /** + * This method is executed at the beginning of a compute call and + * can be used by the backend to prepare the state for upcoming + * compute tasks. + * + * @abstract + * @param {Node|Array} computeGroup - The compute node(s). + */ + beginCompute(): void; + /** + * This method is executed at the end of a compute call and + * can be used by the backend to finalize work after compute + * tasks. + * + * @abstract + * @param {Node|Array} computeGroup - The compute node(s). + */ + finishCompute(): void; + /** + * Executes a draw command for the given render object. + * + * @abstract + * @param {RenderObject} renderObject - The render object to draw. + * @param {Info} info - Holds a series of statistical information about the GPU memory and the rendering process. + */ + draw(): void; + /** + * Executes a compute command for the given compute node. + * + * @abstract + * @param {Node|Array} computeGroup - The group of compute nodes of a compute call. Can be a single compute node. + * @param {Node} computeNode - The compute node. + * @param {Array} bindings - The bindings. + * @param {ComputePipeline} computePipeline - The compute pipeline. + */ + compute(): void; + /** + * Creates a shader program from the given programmable stage. + * + * @abstract + * @param {ProgrammableStage} program - The programmable stage. + */ + createProgram(): void; + /** + * Destroys the shader program of the given programmable stage. + * + * @abstract + * @param {ProgrammableStage} program - The programmable stage. + */ + destroyProgram(): void; + /** + * Creates bindings from the given bind group definition. + * + * @abstract + * @param {BindGroup} bindGroup - The bind group. + * @param {Array} bindings - Array of bind groups. + * @param {number} cacheIndex - The cache index. + * @param {number} version - The version. + */ + createBindings(): void; + /** + * Updates the given bind group definition. + * + * @abstract + * @param {BindGroup} bindGroup - The bind group. + * @param {Array} bindings - Array of bind groups. + * @param {number} cacheIndex - The cache index. + * @param {number} version - The version. + */ + updateBindings(): void; + /** + * Updates a buffer binding. + * + * @abstract + * @param {Buffer} binding - The buffer binding to update. + */ + updateBinding(): void; + /** + * Creates a render pipeline for the given render object. + * + * @abstract + * @param {RenderObject} renderObject - The render object. + * @param {Array} promises - An array of compilation promises which are used in `compileAsync()`. + */ + createRenderPipeline(): void; + /** + * Creates a compute pipeline for the given compute node. + * + * @abstract + * @param {ComputePipeline} computePipeline - The compute pipeline. + * @param {Array} bindings - The bindings. + */ + createComputePipeline(): void; + /** + * Returns `true` if the render pipeline requires an update. + * + * @abstract + * @param {RenderObject} renderObject - The render object. + * @return {boolean} Whether the render pipeline requires an update or not. + */ + needsRenderUpdate(): boolean; + /** + * Returns a cache key that is used to identify render pipelines. + * + * @abstract + * @param {RenderObject} renderObject - The render object. + * @return {string} The cache key. + */ + getRenderCacheKey(): string; + /** + * Returns a node builder for the given render object. + * + * @abstract + * @param {RenderObject} renderObject - The render object. + * @param {Renderer} renderer - The renderer. + * @return {NodeBuilder} The node builder. + */ + createNodeBuilder(): NodeBuilder; + /** + * Updates a GPU sampler for the given texture. + * + * @abstract + * @param {Texture} texture - The texture to update the sampler for. + * @param {TextureNode} textureNode - The texture node to update the sampler with. + * @return {string} The current sampler key. + */ + updateSampler(): string; + /** + * Creates a default texture for the given texture that can be used + * as a placeholder until the actual texture is ready for usage. + * + * @abstract + * @param {Texture} texture - The texture to create a default texture for. + */ + createDefaultTexture(): void; + /** + * Defines a texture on the GPU for the given texture object. + * + * @abstract + * @param {Texture} texture - The texture. + * @param {Object} [options={}] - Optional configuration parameter. + */ + createTexture(): void; + /** + * Uploads the updated texture data to the GPU. + * + * @abstract + * @param {Texture} texture - The texture. + * @param {Object} [options={}] - Optional configuration parameter. + */ + updateTexture(): void; + /** + * Generates mipmaps for the given texture. + * + * @abstract + * @param {Texture} texture - The texture. + */ + generateMipmaps(): void; + /** + * Destroys the GPU data for the given texture object. + * + * @abstract + * @param {Texture} texture - The texture. + * @param {boolean} [isDefaultTexture=false] - Whether the texture uses a default GPU texture or not. + */ + destroyTexture(): void; + /** + * Returns texture data as a typed array. + * + * @abstract + * @async + * @param {Texture} texture - The texture to copy. + * @param {number} x - The x coordinate of the copy origin. + * @param {number} y - The y coordinate of the copy origin. + * @param {number} width - The width of the copy. + * @param {number} height - The height of the copy. + * @param {number} faceIndex - The face index. + * @return {Promise} A Promise that resolves with a typed array when the copy operation has finished. + */ + copyTextureToBuffer(): Promise; + /** + * Copies data of the given source texture to the given destination texture. + * + * @abstract + * @param {Texture} srcTexture - The source texture. + * @param {Texture} dstTexture - The destination texture. + * @param {?(Box3|Box2)} [srcRegion=null] - The region of the source texture to copy. + * @param {?(Vector2|Vector3)} [dstPosition=null] - The destination position of the copy. + * @param {number} [srcLevel=0] - The source mip level to copy from. + * @param {number} [dstLevel=0] - The destination mip level to copy to. + */ + copyTextureToTexture(): void; + /** + * Copies the current bound framebuffer to the given texture. + * + * @abstract + * @param {Texture} texture - The destination texture. + * @param {RenderContext} renderContext - The render context. + * @param {Vector4} rectangle - A four dimensional vector defining the origin and dimension of the copy. + */ + copyFramebufferToTexture(): void; + /** + * Creates the GPU buffer of a shader attribute. + * + * @abstract + * @param {BufferAttribute} attribute - The buffer attribute. + */ + createAttribute(): void; + /** + * Creates the GPU buffer of an indexed shader attribute. + * + * @abstract + * @param {BufferAttribute} attribute - The indexed buffer attribute. + */ + createIndexAttribute(): void; + /** + * Creates the GPU buffer of a storage attribute. + * + * @abstract + * @param {BufferAttribute} attribute - The buffer attribute. + */ + createStorageAttribute(): void; + /** + * Creates a uniform buffer. + * + * @abstract + * @param {Buffer} uniformBuffer - The uniform buffer. + */ + createUniformBuffer(): void; + /** + * Destroys a uniform buffer. + * + * @abstract + * @param {Buffer} uniformBuffer - The uniform buffer. + */ + destroyUniformBuffer(): void; + /** + * Updates the GPU buffer of a shader attribute. + * + * @abstract + * @param {BufferAttribute} attribute - The buffer attribute to update. + */ + updateAttribute(): void; + /** + * Destroys the GPU buffer of a shader attribute. + * + * @abstract + * @param {BufferAttribute} attribute - The buffer attribute to destroy. + */ + destroyAttribute(): void; + /** + * Returns the backend's rendering context. + * + * @abstract + * @return {Object} The rendering context. + */ + getContext(): Object; + /** + * Backends can use this method if they have to run + * logic when the renderer gets resized. + * + * @abstract + */ + updateSize(): void; + /** + * Updates the viewport with the values from the given render context. + * + * @abstract + * @param {RenderContext} renderContext - The render context. + */ + updateViewport(): void; + /** + * Updates a unique identifier for the given render context that can be used + * to allocate resources like occlusion queries or timestamp queries. + * + * @param {RenderContext|ComputeNode} abstractRenderContext - The render context. + */ + updateTimeStampUID(abstractRenderContext: RenderContext | ComputeNode): void; + /** + * Returns a unique identifier for the given render context that can be used + * to allocate resources like occlusion queries or timestamp queries. + * + * @param {RenderContext|ComputeNode} abstractRenderContext - The render context. + * @return {string} The unique identifier. + */ + getTimestampUID(abstractRenderContext: RenderContext | ComputeNode): string; + /** + * Returns all timestamp frames for the given type. + * + * @param {string} type - The type of the time stamp. + * @return {Array} The timestamp frames. + */ + getTimestampFrames(type: string): Array; + /** + * Returns the query pool for the given uid. + * + * @param {string} uid - The unique identifier. + * @return {TimestampQueryPool} The query pool. + */ + _getQueryPool(uid: string): TimestampQueryPool; + /** + * Returns the timestamp for the given uid. + * + * @param {string} uid - The unique identifier. + * @return {number} The timestamp. + */ + getTimestamp(uid: string): number; + /** + * Returns `true` if a timestamp for the given uid is available. + * + * @param {string} uid - The unique identifier. + * @return {boolean} Whether the timestamp is available or not. + */ + hasTimestamp(uid: string): boolean; + /** + * Returns `true` if the given 3D object is fully occluded by other + * 3D objects in the scene. Backends must implement this method by using + * a Occlusion Query API. + * + * @abstract + * @param {RenderContext} renderContext - The render context. + * @param {Object3D} object - The 3D object to test. + * @return {boolean} Whether the 3D object is fully occluded or not. + */ + isOccluded(): boolean; + /** + * Resolves the time stamp for the given render context and type. + * + * @async + * @abstract + * @param {string} [type='render'] - The type of the time stamp. + * @return {Promise} A Promise that resolves with the time stamp. + */ + resolveTimestampsAsync(type?: string): Promise; + /** + * This method performs a readback operation by moving buffer data from + * a storage buffer attribute from the GPU to the CPU. + * + * @async + * @param {StorageBufferAttribute} attribute - The storage buffer attribute. + * @return {Promise} A promise that resolves with the buffer data when the data are ready. + */ + getArrayBufferAsync(): Promise; + /** + * Checks if the given feature is supported by the backend. + * + * @async + * @abstract + * @param {string} name - The feature's name. + * @return {Promise} A Promise that resolves with a bool that indicates whether the feature is supported or not. + */ + hasFeatureAsync(): Promise; + /** + * Checks if the given feature is supported by the backend. + * + * @abstract + * @param {string} name - The feature's name. + * @return {boolean} Whether the feature is supported or not. + */ + hasFeature(): boolean; + /** + * Returns the drawing buffer size. + * + * @return {Vector2} The drawing buffer size. + */ + getDrawingBufferSize(): Vector2; + /** + * Defines the scissor test. + * + * @abstract + * @param {boolean} boolean - Whether the scissor test should be enabled or not. + */ + setScissorTest(): void; + /** + * Returns the clear color and alpha into a single + * color object. + * + * @return {Color4} The clear color. + */ + getClearColor(): Color4; + /** + * Returns the DOM element. If no DOM element exists, the backend + * creates a new one. + * + * @return {HTMLCanvasElement} The DOM element. + */ + getDomElement(): HTMLCanvasElement; + /** + * Checks if the backend has the given compatibility. + * + * @abstract + * @param {string} name - The compatibility. + * @return {boolean} Whether the backend has the given compatibility or not. + */ + hasCompatibility(): boolean; + /** + * Initializes the render target defined in the given render context. + * + * @abstract + * @param {RenderContext} renderContext - The render context. + */ + initRenderTarget(): void; + /** + * Sets a dictionary for the given object into the + * internal data structure. + * + * @param {Object} object - The object. + * @param {Object} value - The dictionary to set. + */ + set(object: Object, value: Object): void; + /** + * Returns the dictionary for the given object. + * + * @param {Object} object - The object. + * @return {Object} The object's dictionary. + */ + get(object: Object): Object; + /** + * Checks if the given object has a dictionary + * with data defined. + * + * @param {Object} object - The object. + * @return {boolean} Whether a dictionary for the given object as been defined or not. + */ + has(object: Object): boolean; + /** + * Deletes an object from the internal data structure. + * + * @param {Object} object - The object to delete. + */ + delete(object: Object): void; + /** + * Delete GPU data associated with a bind group. + * + * @abstract + * @param {BindGroup} bindGroup - The bind group. + */ + deleteBindGroupData(): void; + /** + * Frees internal resources. + * + * @abstract + */ + dispose(): void; +} +/** + * A WebGL 2 backend utility module for managing shader attributes. + * + * @private + */ +declare class WebGLAttributeUtils { + /** + * Constructs a new utility object. + * + * @param {WebGLBackend} backend - The WebGL 2 backend. + */ + constructor(backend: WebGLBackend); + /** + * A reference to the WebGL 2 backend. + * + * @type {WebGLBackend} + */ + backend: WebGLBackend; + /** + * Creates the GPU buffer for the given buffer attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + * @param {GLenum } bufferType - A flag that indicates the buffer type and thus binding point target. + */ + createAttribute(attribute: BufferAttribute, bufferType: GLenum): void; + /** + * Updates the GPU buffer of the given buffer attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + */ + updateAttribute(attribute: BufferAttribute): void; + /** + * Destroys the GPU buffer of the given buffer attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + */ + destroyAttribute(attribute: BufferAttribute): void; + /** + * This method performs a readback operation by moving buffer data from + * a storage buffer attribute from the GPU to the CPU. ReadbackBuffer can + * be used to retain and reuse handles to the intermediate buffers and prevent + * new allocation. + * + * @async + * @param {BufferAttribute} attribute - The storage buffer attribute to read frm. + * @param {ReadbackBuffer|ArrayBuffer} target - The storage buffer attribute. + * @param {number} offset - The storage buffer attribute. + * @param {number} count - The offset from which to start reading the + * @return {Promise} A promise that resolves with the buffer data when the data are ready. + */ + getArrayBufferAsync(attribute: BufferAttribute, target?: ReadbackBuffer | ArrayBuffer, offset?: number, count?: number): Promise; + /** + * Creates a WebGL buffer with the given data. + * + * @private + * @param {WebGL2RenderingContext} gl - The rendering context. + * @param {GLenum } bufferType - A flag that indicates the buffer type and thus binding point target. + * @param {TypedArray} array - The array of the buffer attribute. + * @param {GLenum} usage - The usage. + * @return {WebGLBuffer} The WebGL buffer. + */ + private _createBuffer; +} +/** + * A WebGL 2 backend utility module for managing extensions. + * + * @private + */ +declare class WebGLExtensions { + /** + * Constructs a new utility object. + * + * @param {WebGLBackend} backend - The WebGL 2 backend. + */ + constructor(backend: WebGLBackend); + /** + * A reference to the WebGL 2 backend. + * + * @type {WebGLBackend} + */ + backend: WebGLBackend; + /** + * A reference to the rendering context. + * + * @type {WebGL2RenderingContext} + */ + gl: WebGL2RenderingContext; + /** + * A list with all the supported WebGL extensions. + * + * @type {Array} + */ + availableExtensions: Array; + /** + * A dictionary with requested WebGL extensions. + * The key is the name of the extension, the value + * the requested extension object. + * + * @type {Object} + */ + extensions: { + [x: string]: Object; + }; + /** + * Returns the extension object for the given extension name. + * + * @param {string} name - The extension name. + * @return {Object} The extension object. + */ + get(name: string): Object; + /** + * Returns `true` if the requested extension is available. + * + * @param {string} name - The extension name. + * @return {boolean} Whether the given extension is available or not. + */ + has(name: string): boolean; +} +/** + * A WebGL 2 backend utility module for managing textures. + * + * @private + */ +declare class WebGLTextureUtils { + /** + * Constructs a new utility object. + * + * @param {WebGLBackend} backend - The WebGL 2 backend. + */ + constructor(backend: WebGLBackend); + /** + * A reference to the WebGL 2 backend. + * + * @type {WebGLBackend} + */ + backend: WebGLBackend; + /** + * A reference to the rendering context. + * + * @type {WebGL2RenderingContext} + */ + gl: WebGL2RenderingContext; + /** + * A reference to a backend module holding extension-related + * utility functions. + * + * @type {WebGLExtensions} + */ + extensions: WebGLExtensions; + /** + * A dictionary for managing default textures. The key + * is the binding point (target), the value the WEbGL texture object. + * + * @type {Object} + */ + defaultTextures: any; + /** + * A scratch framebuffer used for attaching the source texture in + * {@link copyTextureToTexture}. + * + * @private + * @type {?WebGLFramebuffer} + */ + private _srcFramebuffer; + /** + * A scratch framebuffer used for attaching the destination texture in + * {@link copyTextureToTexture}. + * + * @private + * @type {?WebGLFramebuffer} + */ + private _dstFramebuffer; + /** + * Inits the state of the utility. + * + * @private + */ + private _init; + /** + * Returns the native texture type for the given texture. + * + * @param {Texture} texture - The texture. + * @return {GLenum} The native texture type. + */ + getGLTextureType(texture: Texture): GLenum; + /** + * Returns the native texture type for the given texture. + * + * @param {?string} internalFormatName - The internal format name. When `null`, the internal format is derived from the subsequent parameters. + * @param {GLenum} glFormat - The WebGL format. + * @param {GLenum} glType - The WebGL type. + * @param {string} colorSpace - The texture's color space. + * @param {boolean} [forceLinearTransfer=false] - Whether to force a linear transfer or not. + * @return {GLenum} The internal format. + */ + getInternalFormat(internalFormatName: string | null, glFormat: GLenum, glType: GLenum, normalized: any, colorSpace: string, forceLinearTransfer?: boolean): GLenum; + /** + * Sets the texture parameters for the given texture. + * + * @param {GLenum} textureType - The texture type. + * @param {Texture} texture - The texture. + */ + setTextureParameters(textureType: GLenum, texture: Texture): void; + /** + * Creates a default texture for the given texture that can be used + * as a placeholder until the actual texture is ready for usage. + * + * @param {Texture} texture - The texture to create a default texture for. + */ + createDefaultTexture(texture: Texture): void; + /** + * Defines a texture on the GPU for the given texture object. + * + * @param {Texture} texture - The texture. + * @param {Object} [options={}] - Optional configuration parameter. + * @return {undefined} + */ + createTexture(texture: Texture, options?: Object): undefined; + /** + * Uploads texture buffer data to the GPU memory. + * + * @param {WebGLBuffer} buffer - The buffer data. + * @param {Texture} texture - The texture, + */ + copyBufferToTexture(buffer: WebGLBuffer, texture: Texture): void; + /** + * Uploads the updated texture data to the GPU. + * + * @param {Texture} texture - The texture. + * @param {Object} [options={}] - Optional configuration parameter. + */ + updateTexture(texture: Texture, options?: Object): void; + /** + * Generates mipmaps for the given texture. + * + * @param {Texture} texture - The texture. + */ + generateMipmaps(texture: Texture): void; + /** + * Deallocates the render buffers of the given render target. + * + * @param {RenderTarget} renderTarget - The render target. + */ + deallocateRenderBuffers(renderTarget: RenderTarget): void; + /** + * Destroys the GPU data for the given texture object. + * + * @param {Texture} texture - The texture. + * @param {boolean} [isDefaultTexture=false] - Whether the texture uses a default GPU texture or not. + */ + destroyTexture(texture: Texture, isDefaultTexture?: boolean): void; + /** + * Copies data of the given source texture to the given destination texture. + * + * @param {Texture} srcTexture - The source texture. + * @param {Texture} dstTexture - The destination texture. + * @param {?(Box3|Box2)} [srcRegion=null] - The region of the source texture to copy. + * @param {?(Vector2|Vector3)} [dstPosition=null] - The destination position of the copy. + * @param {number} [srcLevel=0] - The source mip level to copy from. + * @param {number} [dstLevel=0] - The destination mip level to copy to. + */ + copyTextureToTexture(srcTexture: Texture, dstTexture: Texture, srcRegion?: (Box3 | Box2) | null, dstPosition?: (Vector2 | Vector3) | null, srcLevel?: number, dstLevel?: number): void; + /** + * Copies the current bound framebuffer to the given texture. + * + * @param {Texture} texture - The destination texture. + * @param {RenderContext} renderContext - The render context. + * @param {Vector4} rectangle - A four dimensional vector defining the origin and dimension of the copy. + */ + copyFramebufferToTexture(texture: Texture, renderContext: RenderContext, rectangle: Vector4): void; + /** + * SetupS storage for internal depth/stencil buffers and bind to correct framebuffer. + * + * @param {WebGLRenderbuffer} renderbuffer - The render buffer. + * @param {RenderContext} renderContext - The render context. + * @param {number} samples - The MSAA sample count. + * @param {boolean} [useMultisampledRTT=false] - Whether to use WEBGL_multisampled_render_to_texture or not. + */ + setupRenderBufferStorage(renderbuffer: WebGLRenderbuffer, renderContext: RenderContext, samples: number, useMultisampledRTT?: boolean): void; + /** + * Returns texture data as a typed array. + * + * @async + * @param {Texture} texture - The texture to copy. + * @param {number} x - The x coordinate of the copy origin. + * @param {number} y - The y coordinate of the copy origin. + * @param {number} width - The width of the copy. + * @param {number} height - The height of the copy. + * @param {number} faceIndex - The face index. + * @return {Promise} A Promise that resolves with a typed array when the copy operation has finished. + */ + copyTextureToBuffer(texture: Texture, x: number, y: number, width: number, height: number, faceIndex: number): Promise; + /** + * Returns the corresponding typed array type for the given WebGL data type. + * + * @private + * @param {GLenum} glType - The WebGL data type. + * @return {TypedArray.constructor} The typed array type. + */ + private _getTypedArrayType; + /** + * Returns the bytes-per-texel value for the given WebGL data type and texture format. + * + * @private + * @param {GLenum} glType - The WebGL data type. + * @param {GLenum} glFormat - The WebGL texture format. + * @return {number} The bytes-per-texel. + */ + private _getBytesPerTexel; + /** + * Frees the internal resources. + */ + dispose(): void; +} +declare class WebGLBufferRenderer { + constructor(backend: any); + gl: any; + extensions: any; + info: any; + mode: any; + index: number; + type: any; + object: any; + render(start: any, count: any): void; + renderInstances(start: any, count: any, primcount: any): void; + renderMultiDraw(starts: any, counts: any, drawCount: any): void; +} +/** + * A WebGL 2 backend utility module for managing the WebGL state. + * + * The major goal of this module is to reduce the number of state changes + * by caching the WEbGL state with a series of variables. In this way, the + * renderer only executes state change commands when necessary which + * improves the overall performance. + * + * @private + */ +declare class WebGLState { + /** + * Constructs a new utility object. + * + * @param {WebGLBackend} backend - The WebGL 2 backend. + */ + constructor(backend: WebGLBackend); + /** + * A reference to the WebGL 2 backend. + * + * @type {WebGLBackend} + */ + backend: WebGLBackend; + /** + * A reference to the rendering context. + * + * @type {WebGL2RenderingContext} + */ + gl: WebGL2RenderingContext; + enabled: {}; + parameters: {}; + currentFlipSided: any; + currentCullFace: any; + currentProgram: any; + currentBlendingEnabled: boolean; + currentBlending: any; + currentBlendSrc: any; + currentBlendDst: number | null; + currentBlendSrcAlpha: number | null; + currentBlendDstAlpha: number | null; + currentPremultipledAlpha: boolean | null; + currentPolygonOffsetFactor: any; + currentPolygonOffsetUnits: number | null; + currentColorMask: any; + currentDepthReversed: boolean; + currentDepthFunc: any; + currentDepthMask: any; + currentStencilFunc: any; + currentStencilRef: number | null; + currentStencilFuncMask: number | null; + currentStencilFail: any; + currentStencilZFail: number | null; + currentStencilZPass: number | null; + currentStencilMask: any; + currentLineWidth: any; + currentClippingPlanes: number; + currentVAO: any; + currentIndex: WebGLBuffer | null; + currentBoundFramebuffers: {}; + currentDrawbuffers: WeakMap; + maxTextures: any; + currentTextureSlot: any; + currentBoundTextures: {}; + currentBoundBufferBases: {}; + /** + * Inits the state of the utility. + * + * @private + */ + private _init; + currentScissor: Vector4 | undefined; + currentViewport: Vector4 | undefined; + _tempVec4: Vector4 | undefined; + /** + * Enables the given WebGL capability. + * + * This method caches the capability state so + * `gl.enable()` is only called when necessary. + * + * @param {GLenum} id - The capability to enable. + */ + enable(id: GLenum): void; + /** + * Disables the given WebGL capability. + * + * This method caches the capability state so + * `gl.disable()` is only called when necessary. + * + * @param {GLenum} id - The capability to enable. + */ + disable(id: GLenum): void; + /** + * Specifies whether polygons are front- or back-facing + * by setting the winding orientation. + * + * This method caches the state so `gl.frontFace()` is only + * called when necessary. + * + * @param {boolean} flipSided - Whether triangles flipped their sides or not. + */ + setFlipSided(flipSided: boolean): void; + /** + * Specifies whether or not front- and/or back-facing + * polygons can be culled. + * + * This method caches the state so `gl.cullFace()` is only + * called when necessary. + * + * @param {number} cullFace - Defines which polygons are candidates for culling. + */ + setCullFace(cullFace: number): void; + /** + * Specifies the width of line primitives. + * + * This method caches the state so `gl.lineWidth()` is only + * called when necessary. + * + * @param {number} width - The line width. + */ + setLineWidth(width: number): void; + setMRTBlending(textures: any, mrt: any, material: any): void; + /** + * Applies blending configuration for a specific draw buffer index. + * + * @private + * @param {number} index - The draw buffer index. + * @param {Object} blending - The blending configuration (material or BlendMode). + */ + private _setMRTBlendingIndex; + /** + * Defines the blending. + * + * This method caches the state so `gl.blendEquation()`, `gl.blendEquationSeparate()`, + * `gl.blendFunc()` and `gl.blendFuncSeparate()` are only called when necessary. + * + * @param {number} blending - The blending type. + * @param {number} blendEquation - The blending equation. + * @param {number} blendSrc - Only relevant for custom blending. The RGB source blending factor. + * @param {number} blendDst - Only relevant for custom blending. The RGB destination blending factor. + * @param {number} blendEquationAlpha - Only relevant for custom blending. The blending equation for alpha. + * @param {number} blendSrcAlpha - Only relevant for custom blending. The alpha source blending factor. + * @param {number} blendDstAlpha - Only relevant for custom blending. The alpha destination blending factor. + * @param {boolean} premultipliedAlpha - Whether premultiplied alpha is enabled or not. + */ + setBlending(blending: number, blendEquation: number, blendSrc: number, blendDst: number, blendEquationAlpha: number, blendSrcAlpha: number, blendDstAlpha: number, premultipliedAlpha: boolean): void; + currentBlendEquation: any; + currentBlendEquationAlpha: number | undefined; + /** + * Specifies whether colors can be written when rendering + * into a framebuffer or not. + * + * This method caches the state so `gl.colorMask()` is only + * called when necessary. + * + * @param {boolean} colorMask - The color mask. + */ + setColorMask(colorMask: boolean): void; + /** + * Specifies whether the depth test is enabled or not. + * + * @param {boolean} depthTest - Whether the depth test is enabled or not. + */ + setDepthTest(depthTest: boolean): void; + /** + * Configures the WebGL state to use a reversed depth buffer. + * + * @param {boolean} reversed - Whether the depth buffer is reversed or not. + */ + setReversedDepth(reversed: boolean): void; + /** + * Specifies whether depth values can be written when rendering + * into a framebuffer or not. + * + * This method caches the state so `gl.depthMask()` is only + * called when necessary. + * + * @param {boolean} depthMask - The depth mask. + */ + setDepthMask(depthMask: boolean): void; + /** + * Specifies the depth compare function. + * + * This method caches the state so `gl.depthFunc()` is only + * called when necessary. + * + * @param {number} depthFunc - The depth compare function. + */ + setDepthFunc(depthFunc: number): void; + /** + * Specifies the scissor box. + * + * @param {number} x - The x-coordinate of the lower left corner of the viewport. + * @param {number} y - The y-coordinate of the lower left corner of the viewport. + * @param {number} width - The width of the viewport. + * @param {number} height - The height of the viewport. + * + */ + scissor(x: number, y: number, width: number, height: number): void; + /** + * Specifies the viewport. + * + * @param {number} x - The x-coordinate of the lower left corner of the viewport. + * @param {number} y - The y-coordinate of the lower left corner of the viewport. + * @param {number} width - The width of the viewport. + * @param {number} height - The height of the viewport. + * + */ + viewport(x: number, y: number, width: number, height: number): void; + /** + * Defines the scissor test. + * + * @param {boolean} boolean - Whether the scissor test should be enabled or not. + */ + setScissorTest(boolean: boolean): void; + /** + * Specifies whether the stencil test is enabled or not. + * + * @param {boolean} stencilTest - Whether the stencil test is enabled or not. + */ + setStencilTest(stencilTest: boolean): void; + /** + * Specifies whether stencil values can be written when rendering + * into a framebuffer or not. + * + * This method caches the state so `gl.stencilMask()` is only + * called when necessary. + * + * @param {boolean} stencilMask - The stencil mask. + */ + setStencilMask(stencilMask: boolean): void; + /** + * Specifies whether the stencil test functions. + * + * This method caches the state so `gl.stencilFunc()` is only + * called when necessary. + * + * @param {number} stencilFunc - The stencil compare function. + * @param {number} stencilRef - The reference value for the stencil test. + * @param {number} stencilMask - A bit-wise mask that is used to AND the reference value and the stored stencil value when the test is done. + */ + setStencilFunc(stencilFunc: number, stencilRef: number, stencilMask: number): void; + /** + * Specifies whether the stencil test operation. + * + * This method caches the state so `gl.stencilOp()` is only + * called when necessary. + * + * @param {number} stencilFail - The function to use when the stencil test fails. + * @param {number} stencilZFail - The function to use when the stencil test passes, but the depth test fail. + * @param {number} stencilZPass - The function to use when both the stencil test and the depth test pass, + * or when the stencil test passes and there is no depth buffer or depth testing is disabled. + */ + setStencilOp(stencilFail: number, stencilZFail: number, stencilZPass: number): void; + /** + * Configures the WebGL state for the given material. + * + * @param {Material} material - The material to configure the state for. + * @param {number} frontFaceCW - Whether the front faces are counter-clockwise or not. + * @param {number} hardwareClippingPlanes - The number of hardware clipping planes. + */ + setMaterial(material: Material, frontFaceCW: number, hardwareClippingPlanes: number): void; + /** + * Specifies the polygon offset. + * + * This method caches the state so `gl.polygonOffset()` is only + * called when necessary. + * + * @param {boolean} polygonOffset - Whether polygon offset is enabled or not. + * @param {number} factor - The scale factor for the variable depth offset for each polygon. + * @param {number} units - The multiplier by which an implementation-specific value is multiplied with to create a constant depth offset. + */ + setPolygonOffset(polygonOffset: boolean, factor: number, units: number): void; + /** + * Defines the usage of the given WebGL program. + * + * This method caches the state so `gl.useProgram()` is only + * called when necessary. + * + * @param {WebGLProgram} program - The WebGL program to use. + * @return {boolean} Whether a program change has been executed or not. + */ + useProgram(program: WebGLProgram): boolean; + /** + * Sets the vertex state by binding the given VAO and element buffer. + * + * @param {WebGLVertexArrayObject} vao - The VAO. + * @param {?WebGLBuffer} indexBuffer - The index buffer. + * @return {boolean} Whether a vertex state has been changed or not. + */ + setVertexState(vao: WebGLVertexArrayObject, indexBuffer?: WebGLBuffer | null): boolean; + /** + * Resets the vertex array state by resetting the VAO and element buffer. + */ + resetVertexState(): void; + /** + * Binds the given framebuffer. + * + * This method caches the state so `gl.bindFramebuffer()` is only + * called when necessary. + * + * @param {number} target - The binding point (target). + * @param {WebGLFramebuffer} framebuffer - The WebGL framebuffer to bind. + * @return {boolean} Whether a bind has been executed or not. + */ + bindFramebuffer(target: number, framebuffer: WebGLFramebuffer): boolean; + /** + * Defines draw buffers to which fragment colors are written into. + * Configures the MRT setup of custom framebuffers. + * + * This method caches the state so `gl.drawBuffers()` is only + * called when necessary. + * + * @param {RenderContext} renderContext - The render context. + * @param {WebGLFramebuffer} framebuffer - The WebGL framebuffer. + */ + drawBuffers(renderContext: RenderContext, framebuffer: WebGLFramebuffer): void; + /** + * Makes the given texture unit active. + * + * This method caches the state so `gl.activeTexture()` is only + * called when necessary. + * + * @param {number} webglSlot - The texture unit to make active. + */ + activeTexture(webglSlot: number): void; + /** + * Binds the given WebGL texture to a target. + * + * This method caches the state so `gl.bindTexture()` is only + * called when necessary. + * + * @param {number} webglType - The binding point (target). + * @param {WebGLTexture} webglTexture - The WebGL texture to bind. + * @param {number} webglSlot - The texture. + */ + bindTexture(webglType: number, webglTexture: WebGLTexture, webglSlot: number): void; + /** + * Binds a given WebGL buffer to a given binding point (target) at a given index. + * + * This method caches the state so `gl.bindBufferBase()` is only + * called when necessary. + * + * @param {number} target - The target for the bind operation. + * @param {number} index - The index of the target. + * @param {WebGLBuffer} buffer - The WebGL buffer. + * @return {boolean} Whether a bind has been executed or not. + */ + bindBufferBase(target: number, index: number, buffer: WebGLBuffer): boolean; + /** + * Unbinds the current bound texture. + * + * This method caches the state so `gl.bindTexture()` is only + * called when necessary. + */ + unbindTexture(): void; + /** + * Returns the value for the given parameter. + * + * @param {number} name - The paramter to get the value for. + * @return {any} The value for the given parameter. + */ + getParameter(name: number): any; + /** + * Specifies a pixel storage mode. + * + * @param {number} name - The parameter to set. + * @param {any} value - A value to set the parameter to. + */ + pixelStorei(name: number, value: any): void; +} +/** + * A WebGL 2 backend utility module with common helpers. + * + * @private + */ +declare class WebGLUtils { + /** + * Constructs a new utility object. + * + * @param {WebGLBackend} backend - The WebGL 2 backend. + */ + constructor(backend: WebGLBackend); + /** + * A reference to the WebGL 2 backend. + * + * @type {WebGLBackend} + */ + backend: WebGLBackend; + /** + * A reference to the rendering context. + * + * @type {WebGL2RenderingContext} + */ + gl: WebGL2RenderingContext; + /** + * A reference to a backend module holding extension-related + * utility functions. + * + * @type {WebGLExtensions} + */ + extensions: WebGLExtensions; + /** + * Converts the given three.js constant into a WebGL constant. + * The method currently supports the conversion of texture formats + * and types. + * + * @param {number} p - The three.js constant. + * @param {string} [colorSpace=NoColorSpace] - The color space. + * @return {?number} The corresponding WebGL constant. + */ + convert(p: number, colorSpace?: string): number | null; + /** + * This method can be used to synchronize the CPU with the GPU by waiting until + * ongoing GPU commands have been completed. + * + * @private + * @return {Promise} A promise that resolves when all ongoing GPU commands have been completed. + */ + private _clientWaitAsync; +} +/** + * A special type of render target that is used when rendering + * with the WebXR Device API. + * + * @private + * @augments RenderTarget + */ +declare class XRRenderTarget extends RenderTarget { + /** + * Constructs a new XR render target. + * + * @param {number} [width=1] - The width of the render target. + * @param {number} [height=1] - The height of the render target. + * @param {Object} [options={}] - The configuration options. + */ + constructor(width?: number, height?: number, options?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isXRRenderTarget: boolean; + /** + * Whether the attachments of the render target + * are defined by external textures. This flag is + * set to `true` when using the WebXR Layers API. + * + * @private + * @type {boolean} + * @default false + */ + private _hasExternalTextures; + /** + * Whether a depth buffer should automatically be allocated + * for this XR render target or not. + * + * Allocating a depth buffer is the default behavior of XR render + * targets. However, when using the WebXR Layers API, this flag + * must be set to `false` when the `ignoreDepthValues` property of + * the projection layers evaluates to `false`. + * + * Reference: {@link https://www.w3.org/TR/webxrlayers-1/#dom-xrprojectionlayer-ignoredepthvalues}. + * + * @private + * @type {boolean} + * @default true + */ + private _autoAllocateDepthBuffer; + /** + * Whether this render target is associated with a XRWebGLLayer. + * + * A XRWebGLLayer points to an opaque framebuffer. Basically, + * this means that you don't have access to its bound color, + * stencil and depth buffers. We need to handle this framebuffer + * differently since its textures are always bound. + * + * @private + * @type {boolean} + * @default false + * */ + private _isOpaqueFramebuffer; + copy(source: any): this; +} +/** + * Any render or compute command is executed in a specific context that defines + * the state of the renderer and its backend. Typical examples for such context + * data are the current clear values or data from the active framebuffer. This + * module is used to represent these contexts as objects. + * + * @private + */ +declare class RenderContext { + /** + * The context's ID. + * + * @type {number} + */ + id: number; + /** + * The MRT configuration. + * + * @type {?MRTNode} + * @default null + */ + mrt: MRTNode | null; + /** + * Whether the current active framebuffer has a color attachment. + * + * @type {boolean} + * @default true + */ + color: boolean; + /** + * Whether the color attachment should be cleared or not. + * + * @type {boolean} + * @default true + */ + clearColor: boolean; + /** + * The clear color value. + * + * @type {Object} + * @default true + */ + clearColorValue: Object; + /** + * Whether the current active framebuffer has a depth attachment. + * + * @type {boolean} + * @default true + */ + depth: boolean; + /** + * Whether the depth attachment should be cleared or not. + * + * @type {boolean} + * @default true + */ + clearDepth: boolean; + /** + * The clear depth value. + * + * @type {number} + * @default 1 + */ + clearDepthValue: number; + /** + * Whether the current active framebuffer has a stencil attachment. + * + * @type {boolean} + * @default false + */ + stencil: boolean; + /** + * Whether the stencil attachment should be cleared or not. + * + * @type {boolean} + * @default true + */ + clearStencil: boolean; + /** + * The clear stencil value. + * + * @type {number} + * @default 1 + */ + clearStencilValue: number; + /** + * By default the viewport encloses the entire framebuffer If a smaller + * viewport is manually defined, this property is to `true` by the renderer. + * + * @type {boolean} + * @default false + */ + viewport: boolean; + /** + * The viewport value. This value is in physical pixels meaning it incorporates + * the renderer's pixel ratio. The viewport property of render targets or + * the renderer is in logical pixels. + * + * @type {Vector4} + */ + viewportValue: Vector4; + /** + * When the scissor test is active and scissor rectangle smaller than the + * framebuffers dimensions, this property is to `true` by the renderer. + * + * @type {boolean} + * @default false + */ + scissor: boolean; + /** + * The scissor rectangle. + * + * @type {Vector4} + */ + scissorValue: Vector4; + /** + * The active render target. + * + * @type {?RenderTarget} + * @default null + */ + renderTarget: RenderTarget | null; + /** + * The textures of the active render target. + * `null` when no render target is set. + * + * @type {?Array} + * @default null + */ + textures: Array | null; + /** + * The depth texture of the active render target. + * `null` when no render target is set. + * + * @type {?DepthTexture} + * @default null + */ + depthTexture: DepthTexture | null; + /** + * The active cube face. + * + * @type {number} + * @default 0 + */ + activeCubeFace: number; + /** + * The active mipmap level. + * + * @type {number} + * @default 0 + */ + activeMipmapLevel: number; + /** + * The number of MSAA samples. This value is always `1` when + * MSAA isn't used. + * + * @type {number} + * @default 1 + */ + sampleCount: number; + /** + * The active render target's width in physical pixels. + * + * @type {number} + * @default 0 + */ + width: number; + /** + * The active render target's height in physical pixels. + * + * @type {number} + * @default 0 + */ + height: number; + /** + * The occlusion query count. + * + * @type {number} + * @default 0 + */ + occlusionQueryCount: number; + /** + * The current clipping context. + * + * @type {?ClippingContext} + * @default null + */ + clippingContext: ClippingContext | null; + /** + * The current camera. + * + * @type {?Camera} + * @default null + */ + camera: Camera | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isRenderContext: boolean; + /** + * Returns the cache key of this render context. + * + * @return {number} The cache key. + */ + getCacheKey(): number; +} +/** + * Class for representing compute pipelines. + * + * @private + * @augments Pipeline + */ +declare class ComputePipeline extends Pipeline { + /** + * Constructs a new compute pipeline. + * + * @param {string} cacheKey - The pipeline's cache key. + * @param {ProgrammableStage} computeProgram - The pipeline's compute shader. + */ + constructor(cacheKey: string, computeProgram: ProgrammableStage); + /** + * The pipeline's compute shader. + * + * @type {ProgrammableStage} + */ + computeProgram: ProgrammableStage; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isComputePipeline: boolean; +} +/** + * Class for representing programmable stages which are vertex, + * fragment or compute shaders. Unlike fixed-function states (like blending), + * they represent the programmable part of a pipeline. + * + * @private + */ +declare class ProgrammableStage { + /** + * Constructs a new programmable stage. + * + * @param {string} code - The shader code. + * @param {('vertex'|'fragment'|'compute')} stage - The type of stage. + * @param {string} name - The name of the shader. + * @param {?Array} [transforms=null] - The transforms (only relevant for compute stages with WebGL 2 which uses Transform Feedback). + * @param {?Array} [attributes=null] - The attributes (only relevant for compute stages with WebGL 2 which uses Transform Feedback). + */ + constructor(code: string, stage: ("vertex" | "fragment" | "compute"), name: string, transforms?: Array | null, attributes?: Array | null); + /** + * The id of the programmable stage. + * + * @type {number} + */ + id: number; + /** + * The shader code. + * + * @type {string} + */ + code: string; + /** + * The type of stage. + * + * @type {string} + */ + stage: string; + /** + * The name of the stage. + * This is used for debugging purposes. + * + * @type {string} + */ + name: string; + /** + * The transforms (only relevant for compute stages with WebGL 2 which uses Transform Feedback). + * + * @type {?Array} + */ + transforms: Array | null; + /** + * The attributes (only relevant for compute stages with WebGL 2 which uses Transform Feedback). + * + * @type {?Array} + */ + attributes: Array | null; + /** + * How often the programmable stage is currently in use. + * + * @type {number} + * @default 0 + */ + usedTimes: number; +} +/** + * Represents a buffer binding type. + * + * @private + * @abstract + * @augments Binding + */ +declare class Buffer extends Binding { + /** + * Constructs a new buffer. + * + * @param {string} name - The buffer's name. + * @param {TypedArray} [buffer=null] - The buffer. + */ + constructor(name: string, buffer?: TypedArray); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBuffer: boolean; + /** + * The bytes per element. + * + * @type {number} + */ + bytesPerElement: number; + /** + * A reference to the internal buffer. + * + * @private + * @type {TypedArray} + */ + private _buffer; + /** + * An array of update ranges. + * + * @private + * @type {Array<{start: number, count: number}>} + */ + private _updateRanges; + /** + * The array of update ranges. + * + * @type {Array<{start: number, count: number}>} + */ + get updateRanges(): Array<{ + start: number; + count: number; + }>; + /** + * Adds an update range. + * + * @param {number} start - The start index. + * @param {number} count - The number of elements. + */ + addUpdateRange(start: number, count: number): void; + /** + * Clears all update ranges. + */ + clearUpdateRanges(): void; + /** + * The buffer's byte length. + * + * @type {number} + * @readonly + */ + readonly get byteLength(): number; + /** + * A reference to the internal buffer. + * + * @type {Float32Array} + * @readonly + */ + readonly get buffer(): Float32Array; + /** + * Updates the binding. + * + * @return {boolean} Whether the buffer has been updated and must be + * uploaded to the GPU. + */ + update(): boolean; + /** + * Releases the buffer. + */ + release(): void; +} +/** + * A WebGPU backend utility module with common helpers. + * + * @private + */ +declare class WebGPUUtils { + /** + * Constructs a new utility object. + * + * @param {WebGPUBackend} backend - The WebGPU backend. + */ + constructor(backend: WebGPUBackend); + /** + * A reference to the WebGPU backend. + * + * @type {WebGPUBackend} + */ + backend: WebGPUBackend; + /** + * Returns the depth/stencil GPU format for the given render context. + * + * @param {RenderContext} renderContext - The render context. + * @return {string} The depth/stencil GPU texture format. + */ + getCurrentDepthStencilFormat(renderContext: RenderContext): string; + /** + * Returns the GPU format for the given texture. + * + * @param {Texture} texture - The texture. + * @return {string} The GPU texture format. + */ + getTextureFormatGPU(texture: Texture): string; + /** + * Returns an object that defines the multi-sampling state of the given texture. + * + * @param {Texture} texture - The texture. + * @return {Object} The multi-sampling state. + */ + getTextureSampleData(texture: Texture): Object; + /** + * Returns the default color attachment's GPU format of the current render context. + * + * @param {RenderContext} renderContext - The render context. + * @return {string} The GPU texture format of the default color attachment. + */ + getCurrentColorFormat(renderContext: RenderContext): string; + /** + * Returns the GPU formats of all color attachments of the current render context. + * + * @param {RenderContext} renderContext - The render context. + * @return {Array} The GPU texture formats of all color attachments. + */ + getCurrentColorFormats(renderContext: RenderContext): Array; + /** + * Returns the output color space of the current render context. + * + * @param {RenderContext} renderContext - The render context. + * @return {string} The output color space. + */ + getCurrentColorSpace(renderContext: RenderContext): string; + /** + * Returns GPU primitive topology for the given object and material. + * + * @param {Object3D} object - The 3D object. + * @param {Material} material - The material. + * @return {string} The GPU primitive topology. + */ + getPrimitiveTopology(object: Object3D, material: Material): string; + /** + * Returns a modified sample count from the given sample count value. + * + * That is required since WebGPU only supports either 1 or 4. + * + * @param {number} sampleCount - The input sample count. + * @return {number} The (potentially updated) output sample count. + */ + getSampleCount(sampleCount: number): number; + /** + * Returns the sample count of the given render context. + * + * @param {RenderContext} renderContext - The render context. + * @return {number} The sample count. + */ + getSampleCountRenderContext(renderContext: RenderContext): number; + /** + * Returns the preferred canvas format. + * + * There is a separate method for this so it's possible to + * honor edge cases for specific devices. + * + * @return {string} The GPU texture format of the canvas. + */ + getPreferredCanvasFormat(): string; +} +/** + * A WebGPU backend utility module for managing shader attributes. + * + * @private + */ +declare class WebGPUAttributeUtils { + /** + * Constructs a new utility object. + * + * @param {WebGPUBackend} backend - The WebGPU backend. + */ + constructor(backend: WebGPUBackend); + /** + * A reference to the WebGPU backend. + * + * @type {WebGPUBackend} + */ + backend: WebGPUBackend; + /** + * Creates the GPU buffer for the given buffer attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + * @param {GPUBufferUsage} usage - A flag that indicates how the buffer may be used after its creation. + */ + createAttribute(attribute: BufferAttribute, usage: GPUBufferUsage): void; + /** + * Updates the GPU buffer of the given buffer attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + */ + updateAttribute(attribute: BufferAttribute): void; + /** + * This method creates the vertex buffer layout data which are + * require when creating a render pipeline for the given render object. + * + * @param {RenderObject} renderObject - The render object. + * @return {Array} An array holding objects which describe the vertex buffer layout. + */ + createShaderVertexBuffers(renderObject: RenderObject): Array; + /** + * Destroys the GPU buffer of the given buffer attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + */ + destroyAttribute(attribute: BufferAttribute): void; + /** + * This method performs a readback operation by moving buffer data from + * a storage buffer attribute from the GPU to the CPU. ReadbackBuffer can + * be used to retain and reuse handles to the intermediate buffers and prevent + * new allocation. + * + * @async + * @param {BufferAttribute} attribute - The storage buffer attribute to read frm. + * @param {number} count - The offset from which to start reading the + * @param {number} offset - The storage buffer attribute. + * @param {ReadbackBuffer|ArrayBuffer} target - The storage buffer attribute. + * @return {Promise} A promise that resolves with the buffer data when the data are ready. + */ + getArrayBufferAsync(attribute: BufferAttribute, target?: ReadbackBuffer | ArrayBuffer, offset?: number, count?: number): Promise; + /** + * Returns the vertex format of the given buffer attribute. + * + * @private + * @param {BufferAttribute} geometryAttribute - The buffer attribute. + * @return {string|undefined} The vertex format (e.g. 'float32x3'). + */ + private _getVertexFormat; + /** + * Utility method for handling interleaved buffer attributes correctly. + * To process them, their `InterleavedBuffer` is returned. + * + * @private + * @param {BufferAttribute} attribute - The attribute. + * @return {BufferAttribute|InterleavedBuffer} + */ + private _getBufferAttribute; +} +/** + * A WebGPU backend utility module for managing bindings. + * + * When reading the documentation it's helpful to keep in mind that + * all class definitions starting with 'GPU*' are modules from the + * WebGPU API. So for example `BindGroup` is a class from the engine + * whereas `GPUBindGroup` is a class from WebGPU. + * + * @private + */ +declare class WebGPUBindingUtils { + /** + * Constructs a new utility object. + * + * @param {WebGPUBackend} backend - The WebGPU backend. + */ + constructor(backend: WebGPUBackend); + /** + * A reference to the WebGPU backend. + * + * @type {WebGPUBackend} + */ + backend: WebGPUBackend; + /** + * A cache that maps combinations of layout entries to existing bind group layouts. + * + * @private + * @type {Map} + */ + private _bindGroupLayoutCache; + /** + * Creates a GPU bind group layout for the given bind group. + * + * @param {BindGroup} bindGroup - The bind group. + * @return {GPUBindGroupLayout} The GPU bind group layout. + */ + createBindingsLayout(bindGroup: BindGroup): GPUBindGroupLayout; + /** + * Creates bindings from the given bind group definition. + * + * @param {BindGroup} bindGroup - The bind group. + * @param {Array} bindings - Array of bind groups. + * @param {number} cacheIndex - The cache index. + * @param {number} version - The version. + */ + createBindings(bindGroup: BindGroup, bindings: Array, cacheIndex: number, version?: number): void; + /** + * Updates a buffer binding. + * + * @param {Buffer} binding - The buffer binding to update. + */ + updateBinding(binding: Buffer): void; + /** + * Creates a GPU bind group for the camera index. + * + * @param {Uint32Array} data - The index data. + * @param {GPUBindGroupLayout} layoutGPU - The GPU bind group layout. + * @return {GPUBindGroup} The GPU bind group. + */ + createBindGroupIndex(data: Uint32Array, layoutGPU: GPUBindGroupLayout): GPUBindGroup; + /** + * Creates a GPU bind group for the given bind group and GPU layout. + * + * @param {BindGroup} bindGroup - The bind group. + * @param {GPUBindGroupLayout} layoutGPU - The GPU bind group layout. + * @return {GPUBindGroup} The GPU bind group. + */ + createBindGroup(bindGroup: BindGroup, layoutGPU: GPUBindGroupLayout): GPUBindGroup; + /** + * Creates a GPU bind group layout entries for the given bind group. + * + * @private + * @param {BindGroup} bindGroup - The bind group. + * @return {Array} The GPU bind group layout entries. + */ + private _createLayoutEntries; + /** + * Delete the data associated with a bind group. + * + * @param {BindGroup} bindGroup - The bind group. + */ + deleteBindGroupData(bindGroup: BindGroup): void; + /** + * Frees internal resources. + */ + dispose(): void; +} +/** + * A WebGPU backend utility module for managing the device's capabilities. + * + * @private + */ +declare class WebGPUCapabilities { + /** + * Constructs a new utility object. + * + * @param {WebGPUBackend} backend - The WebGPU backend. + */ + constructor(backend: WebGPUBackend); + /** + * A reference to the WebGPU backend. + * + * @type {WebGPUBackend} + */ + backend: WebGPUBackend; + /** + * Returns the maximum anisotropy texture filtering value. + * + * @return {number} The maximum anisotropy texture filtering value. + */ + getMaxAnisotropy(): number; + /** + * Returns the maximum number of bytes available for uniform buffers. + * + * @return {number} The maximum number of bytes available for uniform buffers. + */ + getUniformBufferLimit(): number; +} +/** + * A WebGPU backend utility module for managing pipelines. + * + * @private + */ +declare class WebGPUPipelineUtils { + /** + * Constructs a new utility object. + * + * @param {WebGPUBackend} backend - The WebGPU backend. + */ + constructor(backend: WebGPUBackend); + /** + * A reference to the WebGPU backend. + * + * @type {WebGPUBackend} + */ + backend: WebGPUBackend; + /** + * A Weak Map that tracks the active pipeline for render or compute passes. + * + * @private + * @type {WeakMap<(GPURenderPassEncoder|GPUComputePassEncoder),(GPURenderPipeline|GPUComputePipeline)>} + */ + private _activePipelines; + /** + * Sets the given pipeline for the given pass. The method makes sure to only set the + * pipeline when necessary. + * + * @param {(GPURenderPassEncoder|GPUComputePassEncoder)} pass - The pass encoder. + * @param {(GPURenderPipeline|GPUComputePipeline)} pipeline - The pipeline. + */ + setPipeline(pass: (GPURenderPassEncoder | GPUComputePassEncoder), pipeline: (GPURenderPipeline | GPUComputePipeline)): void; + /** + * Returns the sample count derived from the given render context. + * + * @private + * @param {RenderContext} renderContext - The render context. + * @return {number} The sample count. + */ + private _getSampleCount; + /** + * Creates a render pipeline for the given render object. + * + * @param {RenderObject} renderObject - The render object. + * @param {Array} promises - An array of compilation promises which are used in `compileAsync()`. + */ + createRenderPipeline(renderObject: RenderObject, promises: Array>): void; + /** + * Creates GPU render bundle encoder for the given render context. + * + * @param {RenderContext} renderContext - The render context. + * @param {?string} [label='renderBundleEncoder'] - The label. + * @return {GPURenderBundleEncoder} The GPU render bundle encoder. + */ + createBundleEncoder(renderContext: RenderContext, label?: string | null): GPURenderBundleEncoder; + /** + * Creates a compute pipeline for the given compute node. + * + * @param {ComputePipeline} pipeline - The compute pipeline. + * @param {Array} bindings - The bindings. + */ + createComputePipeline(pipeline: ComputePipeline, bindings: Array): void; + /** + * Reads line-accurate diagnostics from shader modules and logs them. + * Called from pipeline creation error paths to turn opaque validation + * failures into actionable WGSL feedback. + * + * @private + * @param {Array<{program: ProgrammableStage, module: GPUShaderModule}>} stages - Pairs of program + compiled shader module. + * @param {string} pipelineLabel - Label of the owning pipeline, used as log prefix. + * @return {Promise} + */ + private _reportShaderDiagnostics; + /** + * Returns the blending state as a descriptor object required + * for the pipeline creation. + * + * @private + * @param {Material|BlendMode} object - The object containing blending information. + * @return {Object} The blending state. + */ + private _getBlending; + /** + * Returns the GPU blend factor which is required for the pipeline creation. + * + * @private + * @param {number} blend - The blend factor as a three.js constant. + * @return {string} The GPU blend factor. + */ + private _getBlendFactor; + /** + * Returns the GPU stencil compare function which is required for the pipeline creation. + * + * @private + * @param {Material} material - The material. + * @return {string} The GPU stencil compare function. + */ + private _getStencilCompare; + /** + * Returns the GPU stencil operation which is required for the pipeline creation. + * + * @private + * @param {number} op - A three.js constant defining the stencil operation. + * @return {string} The GPU stencil operation. + */ + private _getStencilOperation; + /** + * Returns the GPU blend operation which is required for the pipeline creation. + * + * @private + * @param {number} blendEquation - A three.js constant defining the blend equation. + * @return {string} The GPU blend operation. + */ + private _getBlendOperation; + /** + * Returns the primitive state as a descriptor object required + * for the pipeline creation. + * + * @private + * @param {Object3D} object - The 3D object. + * @param {BufferGeometry} geometry - The geometry. + * @param {Material} material - The material. + * @return {Object} The primitive state. + */ + private _getPrimitiveState; + /** + * Returns the GPU color write mask which is required for the pipeline creation. + * + * @private + * @param {Material} material - The material. + * @return {number} The GPU color write mask. + */ + private _getColorWriteMask; + /** + * Returns the GPU depth compare function which is required for the pipeline creation. + * + * @private + * @param {Material} material - The material. + * @return {string} The GPU depth compare function. + */ + private _getDepthCompare; +} +/** + * A WebGPU backend utility module for managing textures. + * + * @private + */ +declare class WebGPUTextureUtils { + /** + * Constructs a new utility object. + * + * @param {WebGPUBackend} backend - The WebGPU backend. + */ + constructor(backend: WebGPUBackend); + /** + * A reference to the WebGPU backend. + * + * @type {WebGPUBackend} + */ + backend: WebGPUBackend; + /** + * A reference to the pass utils. + * + * @type {?WebGPUTexturePassUtils} + * @default null + */ + _passUtils: WebGPUTexturePassUtils | null; + /** + * A dictionary for managing default textures. The key + * is the texture format, the value the texture object. + * + * @type {Object} + */ + defaultTexture: { + [x: string]: Texture; + }; + /** + * A dictionary for managing default cube textures. The key + * is the texture format, the value the texture object. + * + * @type {Object} + */ + defaultCubeTexture: { + [x: string]: CubeTexture; + }; + /** + * A default video frame. + * + * @type {?VideoFrame} + * @default null + */ + defaultVideoFrame: VideoFrame | null; + /** + * A cache of shared texture samplers. + * + * @type {Map} + */ + _samplerCache: Map; + /** + * Creates a GPU sampler for the given texture. + * + * @param {Texture} texture - The texture to create the sampler for. + * @param {TextureNode} textureNode - The texture node to update the sampler with. + * @return {string} The current sampler key. + */ + updateSampler(texture: Texture, textureNode: TextureNode): string; + /** + * Creates a default texture for the given texture that can be used + * as a placeholder until the actual texture is ready for usage. + * + * @param {Texture} texture - The texture to create a default texture for. + */ + createDefaultTexture(texture: Texture): void; + /** + * Defines a texture on the GPU for the given texture object. + * + * @param {Texture} texture - The texture. + * @param {Object} [options={}] - Optional configuration parameter. + */ + createTexture(texture: Texture, options?: Object): void; + /** + * Destroys the GPU data for the given texture object. + * + * @param {Texture} texture - The texture. + * @param {boolean} [isDefaultTexture=false] - Whether the texture uses a default GPU texture or not. + */ + destroyTexture(texture: Texture, isDefaultTexture?: boolean): void; + /** + * Generates mipmaps for the given texture. + * + * @param {Texture} texture - The texture. + * @param {?GPUCommandEncoder} [encoder=null] - An optional command encoder used to generate mipmaps. + */ + generateMipmaps(texture: Texture, encoder?: GPUCommandEncoder | null): void; + /** + * Returns the color buffer representing the color + * attachment of the default framebuffer. + * + * @return {GPUTexture} The color buffer. + */ + getColorBuffer(): GPUTexture; + /** + * Returns the depth buffer representing the depth + * attachment of the default framebuffer. + * + * @param {boolean} [depth=true] - Whether depth is enabled or not. + * @param {boolean} [stencil=false] - Whether stencil is enabled or not. + * @return {GPUTexture} The depth buffer. + */ + getDepthBuffer(depth?: boolean, stencil?: boolean): GPUTexture; + /** + * Uploads the updated texture data to the GPU. + * + * @param {Texture} texture - The texture. + * @param {Object} [options={}] - Optional configuration parameter. + */ + updateTexture(texture: Texture, options?: Object): void; + /** + * Returns texture data as a typed array. + * + * @async + * @param {Texture} texture - The texture to copy. + * @param {number} x - The x coordinate of the copy origin. + * @param {number} y - The y coordinate of the copy origin. + * @param {number} width - The width of the copy. + * @param {number} height - The height of the copy. + * @param {number} faceIndex - The face index. + * @return {Promise} A Promise that resolves with a typed array when the copy operation has finished. + */ + copyTextureToBuffer(texture: Texture, x: number, y: number, width: number, height: number, faceIndex: number): Promise; + /** + * Frees all internal resources. + */ + dispose(): void; + /** + * Returns the default GPU texture for the given format. + * + * @private + * @param {string} format - The GPU format. + * @return {GPUTexture} The GPU texture. + */ + private _getDefaultTextureGPU; + /** + * Returns the default GPU cube texture for the given format. + * + * @private + * @param {string} format - The GPU format. + * @return {GPUTexture} The GPU texture. + */ + private _getDefaultCubeTextureGPU; + /** + * Uploads cube texture image data to the GPU memory. + * + * @private + * @param {CubeTexture} texture - The cube texture. + * @param {GPUTexture} textureGPU - The GPU texture. + * @param {Object} textureDescriptorGPU - The GPU texture descriptor. + */ + private _copyCubeMapToTexture; + /** + * Uploads texture image data to the GPU memory. + * + * @private + * @param {HTMLImageElement|ImageBitmap|HTMLCanvasElement} image - The image data. + * @param {GPUTexture} textureGPU - The GPU texture. + * @param {Object} textureDescriptorGPU - The GPU texture descriptor. + * @param {number} originDepth - The origin depth. + * @param {boolean} flipY - Whether to flip texture data along their vertical axis or not. + * @param {boolean} premultiplyAlpha - Whether the texture should have its RGB channels premultiplied by the alpha channel or not. + * @param {number} [mipLevel=0] - The mip level where the data should be copied to. + */ + private _copyImageToTexture; + /** + * Returns the pass utils singleton. + * + * @private + * @return {WebGPUTexturePassUtils} The utils instance. + */ + private _getPassUtils; + /** + * Generates mipmaps for the given GPU texture. + * + * @private + * @param {GPUTexture} textureGPU - The GPU texture object. + * @param {?GPUCommandEncoder} [encoder=null] - An optional command encoder used to generate mipmaps. + */ + private _generateMipmaps; + /** + * Flip the contents of the given GPU texture along its vertical axis. + * + * @private + * @param {GPUTexture} textureGPU - The GPU texture object. + * @param {Object} textureDescriptorGPU - The texture descriptor. + * @param {number} [originDepth=0] - The origin depth. + */ + private _flipY; + /** + * Uploads texture buffer data to the GPU memory. + * + * @private + * @param {Object} image - An object defining the image buffer data. + * @param {GPUTexture} textureGPU - The GPU texture. + * @param {Object} textureDescriptorGPU - The GPU texture descriptor. + * @param {number} originDepth - The origin depth. + * @param {boolean} flipY - Whether to flip texture data along their vertical axis or not. + * @param {number} [depth=0] - The depth offset when copying array or 3D texture data. + * @param {number} [mipLevel=0] - The mip level where the data should be copied to. + */ + private _copyBufferToTexture; + /** + * Uploads compressed texture data to the GPU memory. + * + * @private + * @param {Array} mipmaps - An array with mipmap data. + * @param {GPUTexture} textureGPU - The GPU texture. + * @param {Object} textureDescriptorGPU - The GPU texture descriptor. + * @param {?Set} [layerUpdates=null] - The layer indices to update. + */ + private _copyCompressedBufferToTexture; + /** + * This method is only relevant for compressed texture formats. It returns a block + * data descriptor for the given GPU compressed texture format. + * + * @private + * @param {string} format - The GPU compressed texture format. + * @return {Object} The block data descriptor. + */ + private _getBlockData; + /** + * Converts the three.js uv wrapping constants to GPU address mode constants. + * + * @private + * @param {number} value - The three.js constant defining a uv wrapping mode. + * @return {string} The GPU address mode. + */ + private _convertAddressMode; + /** + * Converts the three.js filter constants to GPU filter constants. + * + * @private + * @param {number} value - The three.js constant defining a filter mode. + * @return {string} The GPU filter mode. + */ + private _convertFilterMode; + /** + * Converts the three.js filter constants to a GPU mipmap filter constant. + * Unlike `_convertFilterMode`, this extracts the between-mip-level filtering + * axis from the combined three.js constant rather than the within-level axis. + * + * @private + * @param {number} value - The three.js constant defining a filter mode. + * @return {string} The GPU mipmap filter mode. + */ + private _convertMipmapFilterMode; + /** + * Returns the bytes-per-texel value for the given GPU texture format. + * + * @private + * @param {string} format - The GPU texture format. + * @return {number} The bytes-per-texel. + */ + private _getBytesPerTexel; + /** + * Returns the corresponding typed array type for the given GPU texture format. + * + * @private + * @param {string} format - The GPU texture format. + * @return {TypedArray.constructor} The typed array type. + */ + private _getTypedArrayType; + /** + * Returns the GPU dimensions for the given texture. + * + * @private + * @param {Texture} texture - The texture. + * @return {string} The GPU dimension. + */ + private _getDimension; +} +/** + * This renderer module provides a series of statistical information + * about the GPU memory and the rendering process. Useful for debugging + * and monitoring. + */ +declare class Info { + /** + * Whether frame related metrics should automatically + * be resetted or not. This property should be set to `false` + * by apps which manage their own animation loop. They must + * then call `renderer.info.reset()` once per frame manually. + * + * @type {boolean} + * @default true + */ + autoReset: boolean; + /** + * The current frame ID. This ID is managed + * by `NodeFrame`. + * + * @type {number} + * @readonly + * @default 0 + */ + readonly frame: number; + /** + * The number of render calls since the + * app has been started. + * + * @type {number} + * @readonly + * @default 0 + */ + readonly calls: number; + /** + * Render related metrics. + * + * @type {Object} + * @readonly + * @property {number} calls - The number of render calls since the app has been started. + * @property {number} frameCalls - The number of render calls of the current frame. + * @property {number} drawCalls - The number of draw calls of the current frame. + * @property {number} triangles - The number of rendered triangle primitives of the current frame. + * @property {number} points - The number of rendered point primitives of the current frame. + * @property {number} lines - The number of rendered line primitives of the current frame. + * @property {number} timestamp - The timestamp of the frame. + */ + readonly render: Object; + /** + * Compute related metrics. + * + * @type {Object} + * @readonly + * @property {number} calls - The number of compute calls since the app has been started. + * @property {number} frameCalls - The number of compute calls of the current frame. + * @property {number} timestamp - The timestamp of the frame when using `renderer.computeAsync()`. + */ + readonly compute: Object; + /** + * Memory related metrics. + * + * @type {Object} + * @readonly + * @property {number} attributes - The number of active attributes. + * @property {number} attributesSize - The memory size of active attributes in bytes. + * @property {number} geometries - The number of active geometries. + * @property {number} indexAttributes - The number of active index attributes. + * @property {number} indexAttributesSize - The memory size of active index attributes in bytes. + * @property {number} indirectStorageAttributes - The number of active indirect storage attributes. + * @property {number} indirectStorageAttributesSize - The memory size of active indirect storage attributes in bytes. + * @property {number} programs - The number of active programs. + * @property {number} programsSize - The memory size of active programs in bytes. + * @property {number} readbackBuffers - The number of active readback buffers. + * @property {number} readbackBuffersSize - The memory size of active readback buffers in bytes. + * @property {number} renderTargets - The number of active renderTargets. + * @property {number} storageAttributes - The number of active storage attributes. + * @property {number} storageAttributesSize - The memory size of active storage attributes in bytes. + * @property {number} textures - The number of active textures. + * @property {number} texturesSize - The memory size of active textures in bytes. + * @property {number} uniformBuffers - The number of active uniform buffers. + * @property {number} uniformBuffersSize - The memory size of active uniform buffers in bytes. + * @property {number} total - The total memory size in bytes. + */ + readonly memory: Object; + /** + * Map for storing calculated byte sizes of tracked objects. + * + * @type {Map} + * @private + */ + private memoryMap; + /** + * This method should be executed per draw call and updates the corresponding metrics. + * + * @param {Object3D} object - The 3D object that is going to be rendered. + * @param {number} count - The vertex or index count. + * @param {number} instanceCount - The instance count. + */ + update(object: Object3D, count: number, instanceCount: number): void; + /** + * Resets frame related metrics. + */ + reset(): void; + /** + * Performs a complete reset of the object. + */ + dispose(): void; + /** + * Tracks texture memory explicitly, updating counts and byte tracking. + * + * @param {Texture} texture + */ + createTexture(texture: Texture): void; + /** + * Tracks texture memory explicitly, updating counts and byte tracking. + * + * @param {Texture} texture + */ + destroyTexture(texture: Texture): void; + /** + * Tracks attribute memory explicitly, updating counts and byte tracking. + * + * @param {BufferAttribute} attribute + * @param {string} type - type of attribute + * @private + */ + private _createAttribute; + /** + * Tracks a regular attribute memory explicitly. + * + * @param {BufferAttribute} attribute - The attribute to track. + */ + createAttribute(attribute: BufferAttribute): void; + /** + * Tracks an index attribute memory explicitly. + * + * @param {BufferAttribute} attribute - The index attribute to track. + */ + createIndexAttribute(attribute: BufferAttribute): void; + /** + * Tracks a storage attribute memory explicitly. + * + * @param {BufferAttribute} attribute - The storage attribute to track. + */ + createStorageAttribute(attribute: BufferAttribute): void; + /** + * Tracks an indirect storage attribute memory explicitly. + * + * @param {BufferAttribute} attribute - The indirect storage attribute to track. + */ + createIndirectStorageAttribute(attribute: BufferAttribute): void; + /** + * Tracks attribute memory explicitly, updating counts and byte tracking. + * + * @param {BufferAttribute} attribute + */ + destroyAttribute(attribute: BufferAttribute): void; + /** + * Tracks a readback buffer memory explicitly. + * + * @param {ReadbackBuffer} readbackBuffer - The readback buffer to track. + */ + createReadbackBuffer(readbackBuffer: ReadbackBuffer): void; + /** + * Tracks a readback buffer memory explicitly. + * + * @param {ReadbackBuffer} readbackBuffer - The readback buffer to track. + */ + destroyReadbackBuffer(readbackBuffer: ReadbackBuffer): void; + /** + * Tracks a uniform buffer memory explicitly. + * + * @param {UniformBuffer} uniformBuffer - The uniform buffer to track. + */ + createUniformBuffer(uniformBuffer: UniformBuffer): void; + /** + * Tracks a uniform buffer memory explicitly. + * + * @param {UniformBuffer} uniformBuffer - The uniform buffer to track. + */ + destroyUniformBuffer(uniformBuffer: UniformBuffer): void; + /** + * Tracks program memory explicitly, updating counts and byte tracking. + * + * @param {ProgrammableStage} program - The program to track. + */ + createProgram(program: ProgrammableStage): void; + /** + * Tracks program memory explicitly, updating counts and byte tracking. + * + * @param {Object} program - The program to track. + */ + destroyProgram(program: Object): void; + /** + * Calculates the memory size of a texture in bytes. + * + * @param {Texture} texture - The texture to calculate the size for. + * @return {number} The calculated size in bytes. + * @private + */ + private _getTextureMemorySize; + /** + * Calculates the memory size of an attribute in bytes. + * + * @param {BufferAttribute} attribute - The attribute to calculate the size for. + * @return {number} The calculated size in bytes. + * @private + */ + private _getAttributeMemorySize; +} +/** + * A node builder targeting WGSL. + * + * This module generates WGSL shader code from node materials and also + * generates the respective bindings and vertex buffer definitions. These + * data are later used by the renderer to create render and compute pipelines + * for render objects. + * + * @augments NodeBuilder + */ +declare class WGSLNodeBuilder extends NodeBuilder { + /** + * Constructs a new WGSL node builder renderer. + * + * @param {Object3D} object - The 3D object. + * @param {Renderer} renderer - The renderer. + */ + constructor(object: Object3D, renderer: Renderer); + /** + * A dictionary that holds for each shader stage ('vertex', 'fragment', 'compute') + * another dictionary which manages UBOs per group ('render','frame','object'). + * + * @type {Object>} + */ + uniformGroups: { + [x: string]: { + [x: string]: NodeUniformsGroup; + }; + }; + /** + * A dictionary that holds the assigned binding indices for each uniform group. + * This ensures the same binding index is used across all shader stages. + * + * @type {Object} + */ + uniformGroupsBindings: { + [x: string]: { + index: number; + id: number; + }; + }; + /** + * A dictionary that holds for each shader stage a Map of builtins. + * + * @type {Object>} + */ + builtins: { + [x: string]: Map; + }; + /** + * A dictionary that holds for each shader stage a Set of directives. + * + * @type {Object>} + */ + directives: { + [x: string]: Set; + }; + /** + * A map for managing scope arrays. Only relevant for when using + * {@link WorkgroupInfoNode} in context of compute shaders. + * + * @type {Map} + */ + scopedArrays: Map; + /** + * A flag that indicates that early returns are allowed. + * + * @type {boolean} + * @default true + */ + allowEarlyReturns: boolean; + /** + * A flag that indicates that global variables are allowed. + * + * @type {boolean} + * @default true + */ + allowGlobalVariables: boolean; + /** + * Generates the WGSL snippet for sampled textures. + * + * @private + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {string} The WGSL snippet. + */ + private _generateTextureSample; + /** + * Generates the WGSL snippet when sampling textures with explicit mip level. + * + * @private + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {string} levelSnippet - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. + * @param {string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @return {string} The WGSL snippet. + */ + private generateTextureSampleLevel; + /** + * Generates a wrap function used in context of textures. + * + * @param {Texture} texture - The texture to generate the function for. + * @return {string} The name of the generated function. + */ + generateWrapFunction(texture: Texture): string; + /** + * Generates a WGSL variable that holds the texture dimension of the given texture. + * It also returns information about the number of layers (elements) of an arrayed + * texture as well as the cube face count of cube textures. + * + * @param {Texture} texture - The texture to generate the function for. + * @param {string} textureProperty - The name of the video texture uniform in the shader. + * @param {string} levelSnippet - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. + * @return {string} The name of the dimension variable. + */ + generateTextureDimension(texture: Texture, textureProperty: string, levelSnippet: string): string; + /** + * Generates the WGSL snippet for a manual filtered texture. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {string} [levelSnippet='0u'] - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @return {string} The WGSL snippet. + */ + generateFilteredTexture(texture: Texture, textureProperty: string, uvSnippet: string, offsetSnippet: string | null, levelSnippet?: string, depthSnippet: string | null): string; + /** + * Generates the WGSL snippet for a texture lookup with explicit level-of-detail. + * Since it's a lookup, no sampling or filtering is applied. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {string} [levelSnippet='0u'] - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. + * @return {string} The WGSL snippet. + */ + generateTextureLod(texture: Texture, textureProperty: string, uvSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, levelSnippet?: string): string; + /** + * Generates the WGSL snippet that reads a single texel from a storage texture. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvIndexSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {?string} levelSnippet - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @return {string} The WGSL snippet. + */ + generateStorageTextureLoad(texture: Texture, textureProperty: string, uvIndexSnippet: string, levelSnippet: string | null, depthSnippet: string | null, offsetSnippet: string | null): string; + /** + * Generates the WGSL snippet that reads a single texel from a texture without sampling or filtering. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvIndexSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {?string} levelSnippet - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @return {string} The WGSL snippet. + */ + generateTextureLoad(texture: Texture, textureProperty: string, uvIndexSnippet: string, levelSnippet: string | null, depthSnippet: string | null, offsetSnippet: string | null): string; + /** + * Generates the WGSL snippet that writes a single texel to a texture. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvIndexSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {string} valueSnippet - A WGSL snippet that represent the new texel value. + * @return {string} The WGSL snippet. + */ + generateTextureStore(texture: Texture, textureProperty: string, uvIndexSnippet: string, depthSnippet: string | null, valueSnippet: string): string; + /** + * Returns `true` if the sampled values of the given texture should be compared against a reference value. + * + * @param {Texture} texture - The texture. + * @return {boolean} Whether the sampled values of the given texture should be compared against a reference value or not. + */ + isSampleCompare(texture: Texture): boolean; + /** + * Returns `true` if the given texture is unfilterable. + * + * @param {Texture} texture - The texture. + * @return {boolean} Whether the given texture is unfilterable or not. + */ + isUnfilterable(texture: Texture): boolean; + /** + * Generates the WGSL snippet for sampling/loading the given texture. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {string} The WGSL snippet. + */ + generateTexture(texture: Texture, textureProperty: string, uvSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, shaderStage?: string): string; + /** + * Generates the WGSL snippet for sampling/loading the given texture using explicit gradients. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {Array} gradSnippet - An array holding both gradient WGSL snippets. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {string} The WGSL snippet. + */ + generateTextureGrad(texture: Texture, textureProperty: string, uvSnippet: string, gradSnippet: Array, depthSnippet: string | null, offsetSnippet: string | null, shaderStage?: string): string; + /** + * Generates the WGSL snippet for sampling a depth texture and comparing the sampled depth values + * against a reference value. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {string} compareSnippet - A WGSL snippet that represents the reference value. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {string} The WGSL snippet. + */ + generateTextureCompare(texture: Texture, textureProperty: string, uvSnippet: string, compareSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, shaderStage?: string): string; + /** + * Generates the WGSL snippet for gathering four texels from the given texture. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {string} gatherSnippet - A WGSL snippet that represents the index of the channel to read. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {?string} flipYSnippet - A WGSL snippet that represents the y-flip. Only used for WebGL. + * @return {string} The WGSL snippet. + */ + generateTextureGather(texture: Texture, textureProperty: string, uvSnippet: string, gatherSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; + /** + * Generates the WGSL snippet for performing a depth comparison on four texels in the given depth texture. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {string} compareSnippet - A WGSL snippet that represents the reference value. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {?string} flipYSnippet - A WGSL snippet that represents the y-flip. Only used for WebGL. + * @return {string} The WGSL snippet. + */ + generateTextureGatherCompare(texture: Texture, textureProperty: string, uvSnippet: string, compareSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; + /** + * Generates the WGSL snippet when sampling textures with explicit mip level. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {string} levelSnippet - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {string} The WGSL snippet. + */ + generateTextureLevel(texture: Texture, textureProperty: string, uvSnippet: string, levelSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; + /** + * Generates the WGSL snippet when sampling textures with a bias to the mip level. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {string} biasSnippet - A WGSL snippet that represents the bias to apply to the mip level before sampling. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {string} The WGSL snippet. + */ + generateTextureBias(texture: Texture, textureProperty: string, uvSnippet: string, biasSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, shaderStage?: string): string; + /** + * Returns a WGSL snippet that represents the property name of the given node. + * + * @param {Node} node - The node. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {string} The property name. + */ + getPropertyName(node: Node, shaderStage?: string): string; + /** + * Returns the native shader operator name for a given generic name. + * + * @param {string} op - The operator name to resolve. + * @return {?string} The resolved operator name. + */ + getFunctionOperator(op: string): string | null; + /** + * Returns the node access for the given node and shader stage. + * + * @param {StorageTextureNode|StorageBufferNode} node - The storage node. + * @param {string} shaderStage - The shader stage. + * @return {string} The node access. + */ + getNodeAccess(node: StorageTextureNode | StorageBufferNode, shaderStage: string): string; + /** + * Returns A WGSL snippet representing the storage access. + * + * @param {StorageTextureNode|StorageBufferNode} node - The storage node. + * @param {string} shaderStage - The shader stage. + * @return {string} The WGSL snippet representing the storage access. + */ + getStorageAccess(node: StorageTextureNode | StorageBufferNode, shaderStage: string): string; + /** + * This method is one of the more important ones since it's responsible + * for generating a matching binding instance for the given uniform node. + * + * These bindings are later used in the renderer to create bind groups + * and layouts. + * + * @param {UniformNode} node - The uniform node. + * @param {string} type - The node data type. + * @param {string} shaderStage - The shader stage. + * @param {?string} [name=null] - An optional uniform name. + * @return {NodeUniform} The node uniform object. + */ + getUniformFromNode(node: UniformNode, type: string, shaderStage: string, name?: string | null): NodeUniform; + /** + * This method should be used whenever builtins are required in nodes. + * The internal builtins data structure will make sure builtins are + * defined in the WGSL source. + * + * @param {string} name - The builtin name. + * @param {string} property - The property name. + * @param {string} type - The node data type. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {string} The property name. + */ + getBuiltin(name: string, property: string, type: string, shaderStage?: string): string; + /** + * Returns `true` if the given builtin is defined in the given shader stage. + * + * @param {string} name - The builtin name. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {boolean} Whether the given builtin is defined in the given shader stage or not. + */ + hasBuiltin(name: string, shaderStage?: string): boolean; + /** + * Builds the given shader node. + * + * @param {ShaderNodeInternal} shaderNode - The shader node. + * @return {string} The WGSL function code. + */ + buildFunctionCode(shaderNode: ShaderNodeInternal): string; + /** + * Returns a builtin representing the index of a compute invocation within the scope of a workgroup load. + * + * @return {string} The invocation local index. + */ + getInvocationLocalIndex(): string; + /** + * Returns a builtin representing the size of a subgroup within the current shader. + * + * @return {string} The subgroup size. + */ + getSubgroupSize(): string; + /** + * Returns a builtin representing the index of a compute invocation within the scope of a subgroup. + * + * @return {string} The invocation subgroup index. + */ + getInvocationSubgroupIndex(): string; + /** + * Returns a builtin representing the index of a compute invocation's subgroup within its workgroup. + * + * @return {string} The subgroup index. + */ + getSubgroupIndex(): string; + /** + * Overwritten as a NOP since this method is intended for the WebGL 2 backend. + * + * @return {null} Null. + */ + getDrawIndex(): null; + /** + * Returns the frag depth builtin. + * + * @return {string} The frag depth builtin. + */ + getFragDepth(): string; + /** + * Returns the clip distances builtin. + * + * @return {string} The clip distances builtin. + */ + getClipDistance(): string; + /** + * Enables the given directive for the given shader stage. + * + * @param {string} name - The directive name. + * @param {string} [shaderStage=this.shaderStage] - The shader stage to enable the directive for. + */ + enableDirective(name: string, shaderStage?: string): void; + /** + * Returns the directives of the given shader stage as a WGSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} A WGSL snippet that enables the directives of the given stage. + */ + getDirectives(shaderStage: string): string; + /** + * Enables the 'subgroups' directive. + */ + enableSubGroups(): void; + /** + * Enables the 'subgroups-f16' directive. + */ + enableSubgroupsF16(): void; + /** + * Enables the 'clip_distances' directive. + */ + enableClipDistances(): void; + /** + * Enables the 'f16' directive. + */ + enableShaderF16(): void; + /** + * Enables the 'dual_source_blending' directive. + */ + enableDualSourceBlending(): void; + /** + * Enables hardware clipping. + * + * @param {string} planeCount - The clipping plane count. + */ + enableHardwareClipping(planeCount: string): void; + /** + * Returns the builtins of the given shader stage as a WGSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} A WGSL snippet that represents the builtins of the given stage. + */ + getBuiltins(shaderStage: string): string; + /** + * This method should be used when a new scoped buffer is used in context of + * compute shaders. It adds the array to the internal data structure which is + * later used to generate the respective WGSL. + * + * @param {string} name - The array name. + * @param {string} scope - The scope. + * @param {string} bufferType - The buffer type. + * @param {string} bufferCount - The buffer count. + * @return {string} The array name. + */ + getScopedArray(name: string, scope: string, bufferType: string, bufferCount: string): string; + /** + * Returns the scoped arrays of the given shader stage as a WGSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string|undefined} The WGSL snippet that defines the scoped arrays. + * Returns `undefined` when used in the vertex or fragment stage. + */ + getScopedArrays(shaderStage: string): string | undefined; + /** + * Returns the shader attributes of the given shader stage as a WGSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The WGSL snippet that defines the shader attributes. + */ + getAttributes(shaderStage: string): string; + /** + * Returns the members of the given struct type node as a WGSL string. + * + * @param {StructTypeNode} struct - The struct type node. + * @return {string} The WGSL snippet that defines the struct members. + */ + getStructMembers(struct: StructTypeNode): string; + /** + * Returns the structs of the given shader stage as a WGSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The WGSL snippet that defines the structs. + */ + getStructs(shaderStage: string): string; + /** + * Returns a WGSL string representing a variable. + * + * @param {string} type - The variable's type. + * @param {string} name - The variable's name. + * @param {?number} [count=null] - The array length. + * @param {string} [qualifier=''] - The variable's qualifier. + * @return {string} The WGSL snippet that defines a variable. + */ + getVar(type: string, name: string, count?: number | null, qualifier?: string): string; + /** + * Returns the variables of the given shader stage as a WGSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The WGSL snippet that defines the variables. + */ + getVars(shaderStage: string, global?: boolean): string; + /** + * Returns the varyings of the given shader stage as a WGSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The WGSL snippet that defines the varyings. + */ + getVaryings(shaderStage: string): string; + isCustomStruct(nodeUniform: any): any; + /** + * Returns the uniforms of the given shader stage as a WGSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The WGSL snippet that defines the uniforms. + */ + getUniforms(shaderStage: string): string; + /** + * Returns the native shader method name for a given generic name. + * + * @param {string} method - The method name to resolve. + * @param {?string} [output=null] - An optional output. + * @return {string} The resolved WGSL method name. + */ + getMethod(method: string, output?: string | null): string; + /** + * Returns the bitcast method name for a given input and outputType. + * + * @param {string} type - The output type to bitcast to. + * @return {string} The resolved WGSL bitcast invocation. + */ + getBitcastMethod(type: string): string; + /** + * Returns the float packing method name for a given numeric encoding. + * + * @param {string} encoding - The numeric encoding that describes how the float values are mapped to the integer range. + * @returns {string} The resolve WGSL float packing method name. + */ + getFloatPackingMethod(encoding: string): string; + /** + * Returns the float unpacking method name for a given numeric encoding. + * + * @param {string} encoding - The numeric encoding that describes how the integer values are mapped to the float range. + * @returns {string} The resolve WGSL float unpacking method name. + */ + getFloatUnpackingMethod(encoding: string): string; + /** + * Returns the native snippet for a ternary operation. + * + * @param {string} condSnippet - The condition determining which expression gets resolved. + * @param {string} ifSnippet - The expression to resolve to if the condition is true. + * @param {string} elseSnippet - The expression to resolve to if the condition is false. + * @return {string} The resolved method name. + */ + getTernary(condSnippet: string, ifSnippet: string, elseSnippet: string): string; + /** + * Whether the requested feature is available or not. + * + * @param {string} name - The requested feature. + * @return {boolean} Whether the requested feature is supported or not. + */ + isAvailable(name: string): boolean; + /** + * Returns the native shader method name for a given generic name. + * + * @private + * @param {string} method - The method name to resolve. + * @return {string} The resolved WGSL method name. + */ + private _getWGSLMethod; + /** + * Includes the given method name into the current + * function node. + * + * @private + * @param {string} name - The method name to include. + * @return {CodeNode} The respective code node. + */ + private _include; + /** + * Returns a WGSL vertex shader based on the given shader data. + * + * @private + * @param {Object} shaderData - The shader data. + * @return {string} The vertex shader. + */ + private _getWGSLVertexCode; + /** + * Returns a WGSL fragment shader based on the given shader data. + * + * @private + * @param {Object} shaderData - The shader data. + * @return {string} The vertex shader. + */ + private _getWGSLFragmentCode; + /** + * Returns a WGSL compute shader based on the given shader data. + * + * @private + * @param {Object} shaderData - The shader data. + * @param {string} workgroupSize - The workgroup size. + * @return {string} The vertex shader. + */ + private _getWGSLComputeCode; + /** + * Returns a WGSL struct based on the given name and variables. + * + * @private + * @param {string} name - The struct name. + * @param {string} vars - The struct variables. + * @return {string} The WGSL snippet representing a struct. + */ + private _getWGSLStruct; + /** + * Returns a WGSL struct binding. + * + * @private + * @param {string} name - The struct name. + * @param {string} vars - The struct variables. + * @param {string} access - The access. + * @param {number} [binding=0] - The binding index. + * @param {number} [group=0] - The group index. + * @return {string} The WGSL snippet representing a struct binding. + */ + private _getWGSLStructBinding; +} +/** + * This module is used to represent render bundles inside the renderer + * for further processing. + * + * @private + */ +declare class RenderBundle { + /** + * Constructs a new bundle group. + * + * @param {BundleGroup} bundleGroup - The bundle group. + * @param {Camera} camera - The camera the bundle group is rendered with. + * @param {RenderContext} renderContext - The render context the bundle is rendered with. + */ + constructor(bundleGroup: BundleGroup, camera: Camera, renderContext: RenderContext); + bundleGroup: BundleGroup; + camera: Camera; + renderContext: RenderContext; +} +/** + * Represents an element of a 'workgroup' scoped buffer. + * + * @augments ArrayElementNode + */ +declare class WorkgroupInfoElementNode extends ArrayElementNode { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWorkgroupInfoElementNode: boolean; + generate(builder: any, output: any): any; +} +/** + * The XR manager is built on top of the WebXR Device API to + * manage XR sessions with renderer backends. + * + * @augments EventDispatcher + */ +declare class XRManager extends EventDispatcher { + /** + * Constructs a new XR manager. + * + * @param {Renderer} renderer - The renderer. + * @param {boolean} [multiview=false] - Enables multiview if the device supports it. + */ + constructor(renderer: Renderer, multiview?: boolean); + /** + * This flag globally enables XR rendering. + * + * @type {boolean} + * @default false + */ + enabled: boolean; + /** + * Whether the XR device is currently presenting or not. + * + * @type {boolean} + * @default false + * @readonly + */ + readonly isPresenting: boolean; + /** + * Whether the XR camera should automatically be updated or not. + * + * @type {boolean} + * @default true + */ + cameraAutoUpdate: boolean; + /** + * The renderer. + * + * @private + * @type {Renderer} + */ + private _renderer; + /** + * Represents the camera for the left eye. + * + * @private + * @type {PerspectiveCamera} + */ + private _cameraL; + /** + * Represents the camera for the right eye. + * + * @private + * @type {PerspectiveCamera} + */ + private _cameraR; + /** + * A list of cameras used for rendering the XR views. + * + * @private + * @type {Array} + */ + private _cameras; + /** + * The main XR camera. + * + * @private + * @type {ArrayCamera} + */ + private _cameraXR; + /** + * The current near value of the XR camera. + * + * @private + * @type {?number} + * @default null + */ + private _currentDepthNear; + /** + * The current far value of the XR camera. + * + * @private + * @type {?number} + * @default null + */ + private _currentDepthFar; + /** + * A list of WebXR controllers requested by the application. + * + * @private + * @type {Array} + */ + private _controllers; + /** + * A list of XR input source. Each input source belongs to + * an instance of WebXRController. + * + * @private + * @type {Array} + */ + private _controllerInputSources; + /** + * The XR render target that represents the rendering destination + * during an active XR session. + * + * @private + * @type {?RenderTarget} + * @default null + */ + private _xrRenderTarget; + /** + * An array holding all the non-projection layers + * + * @private + * @type {Array} + * @default [] + */ + private _layers; + /** + * Whether the XR session uses layers. + * + * @private + * @type {boolean} + * @default false + */ + private _sessionUsesLayers; + /** + * Whether the device supports binding gl objects. + * + * @private + * @type {boolean} + * @readonly + */ + private readonly _supportsGlBinding; + _supportsWebGPUBinding: boolean; + /** + * Helper function to create native WebXR Layer. + * + * @private + * @type {Function} + */ + private _createXRLayer; + /** + * The current WebGL context. + * + * @private + * @type {?WebGL2RenderingContext} + * @default null + */ + private _gl; + /** + * The current animation context. + * + * @private + * @type {?Window} + * @default null + */ + private _currentAnimationContext; + /** + * The current animation loop. + * + * @private + * @type {?Function} + * @default null + */ + private _currentAnimationLoop; + /** + * The current pixel ratio. + * + * @private + * @type {?number} + * @default null + */ + private _currentPixelRatio; + /** + * The renderer's sample count before XR temporarily overrides it. + * + * @private + * @type {?number} + * @default null + */ + private _currentSamples; + /** + * The current size of the renderer's canvas + * in logical pixel unit. + * + * @private + * @type {Vector2} + */ + private _currentSize; + /** + * The default event listener for handling events inside a XR session. + * + * @private + * @type {Function} + */ + private _onSessionEvent; + /** + * The event listener for handling the end of a XR session. + * + * @private + * @type {Function} + */ + private _onSessionEnd; + /** + * The event listener for handling the `inputsourceschange` event. + * + * @private + * @type {Function} + */ + private _onInputSourcesChange; + /** + * The animation loop which is used as a replacement for the default + * animation loop of the application. It is only used when a XR session + * is active. + * + * @private + * @type {Function} + */ + private _onAnimationFrame; + /** + * The current XR reference space. + * + * @private + * @type {?XRReferenceSpace} + * @default null + */ + private _referenceSpace; + /** + * The current XR reference space type. + * + * @private + * @type {XRReferenceSpaceType} + * @default 'local-floor' + */ + private _referenceSpaceType; + /** + * A custom reference space defined by the application. + * + * @private + * @type {?XRReferenceSpace} + * @default null + */ + private _customReferenceSpace; + /** + * The framebuffer scale factor. + * + * @private + * @type {number} + * @default 1 + */ + private _framebufferScaleFactor; + /** + * The foveation factor. + * + * @private + * @type {number} + * @default 1 + */ + private _foveation; + /** + * A reference to the current XR session. + * + * @private + * @type {?XRSession} + * @default null + */ + private _session; + /** + * A reference to the current XR base layer. + * + * @private + * @type {?XRWebGLLayer} + * @default null + */ + private _glBaseLayer; + /** + * A reference to the current XR binding. + * + * @private + * @type {?XRWebGLBinding} + * @default null + */ + private _glBinding; + /** + * A reference to the current XR WebGPU binding. + * + * @private + * @type {?XRGPUBinding} + * @default null + */ + private _webgpuBinding; + /** + * A reference to the current XR projection layer. + * + * @private + * @type {?XRProjectionLayer} + * @default null + */ + private _glProjLayer; + /** + * A reference to the current XR frame. + * + * @private + * @type {?XRFrame} + * @default null + */ + private _xrFrame; + /** + * Whether the browser supports the APIs necessary to use XRProjectionLayers. + * + * Note: this does not represent XRSession explicitly requesting + * `'layers'` as a feature - see `_sessionUsesLayers` and #30112 + * + * @private + * @type {boolean} + * @readonly + */ + private readonly _supportsLayers; + /** + * Whether the usage of multiview has been requested by the application or not. + * + * @private + * @type {boolean} + * @default false + * @readonly + */ + private readonly _useMultiviewIfPossible; + /** + * Whether the usage of multiview is actually enabled. This flag only evaluates to `true` + * if multiview has been requested by the application and the `OVR_multiview2` is available. + * + * @private + * @type {boolean} + * @readonly + */ + private readonly _useMultiview; + /** + * Returns an instance of `THREE.Group` that represents the transformation + * of a XR controller in target ray space. The requested controller is defined + * by the given index. + * + * @param {number} index - The index of the XR controller. + * @return {Group} A group that represents the controller's transformation. + */ + getController(index: number): Group; + /** + * Returns an instance of `THREE.Group` that represents the transformation + * of a XR controller in grip space. The requested controller is defined + * by the given index. + * + * @param {number} index - The index of the XR controller. + * @return {Group} A group that represents the controller's transformation. + */ + getControllerGrip(index: number): Group; + /** + * Returns an instance of `THREE.Group` that represents the transformation + * of a XR controller in hand space. The requested controller is defined + * by the given index. + * + * @param {number} index - The index of the XR controller. + * @return {Group} A group that represents the controller's transformation. + */ + getHand(index: number): Group; + /** + * Returns the foveation value. + * + * @return {number|undefined} The foveation value. + */ + getFoveation(): number | undefined; + /** + * Sets the foveation value. + * + * @param {number} foveation - A number in the range `[0,1]` where `0` means no foveation (full resolution) + * and `1` means maximum foveation (the edges render at lower resolution). + */ + setFoveation(foveation: number): void; + /** + * Returns the framebuffer scale factor. + * + * @return {number} The framebuffer scale factor. + */ + getFramebufferScaleFactor(): number; + /** + * Sets the framebuffer scale factor. + * + * This method can not be used during a XR session. + * + * @param {number} factor - The framebuffer scale factor. + */ + setFramebufferScaleFactor(factor: number): void; + /** + * Returns the reference space type. + * + * @return {XRReferenceSpaceType} The reference space type. + */ + getReferenceSpaceType(): XRReferenceSpaceType; + /** + * Sets the reference space type. + * + * This method can not be used during a XR session. + * + * @param {XRReferenceSpaceType} type - The reference space type. + */ + setReferenceSpaceType(type: XRReferenceSpaceType): void; + /** + * Returns the XR reference space. + * + * @return {XRReferenceSpace} The XR reference space. + */ + getReferenceSpace(): XRReferenceSpace; + /** + * Sets a custom XR reference space. + * + * @param {XRReferenceSpace} space - The XR reference space. + */ + setReferenceSpace(space: XRReferenceSpace): void; + /** + * Returns the XR camera. + * + * @return {ArrayCamera} The XR camera. + */ + getCamera(): ArrayCamera; + /** + * Returns the environment blend mode from the current XR session. + * + * @return {'opaque'|'additive'|'alpha-blend'|undefined} The environment blend mode. Returns `undefined` when used outside of a XR session. + */ + getEnvironmentBlendMode(): "opaque" | "additive" | "alpha-blend" | undefined; + /** + * Returns the current base layer. + * + * This is an `XRProjectionLayer` when the targeted XR device supports the + * WebXR Layers API, or an `XRWebGLLayer` otherwise. + * + * @return {?(XRWebGLLayer|XRProjectionLayer)} The XR base layer. + */ + getBaseLayer(): (XRWebGLLayer | XRProjectionLayer) | null; + /** + * Returns the current XR binding. + * + * Creates a new binding if needed and the browser is + * capable of doing so. + * + * @return {?XRWebGLBinding} The XR binding. Returns `null` if one cannot be created. + */ + getBinding(): XRWebGLBinding | null; + /** + * Applies WebXR fixed foveation to the internal post-processing render target + * used by the first XR render pass before compositing into a projection layer. + * + * Browser-side `XRWebGLBinding.foveateBoundTexture()` failures are treated as + * non-fatal so they do not interrupt rendering. + * + * @param {RenderTarget} renderTarget - The internal render target. + */ + foveateBoundTexture(renderTarget: RenderTarget): void; + /** + * Returns the current XR WebGPU binding. + * + * Creates a new binding if needed and the browser is + * capable of doing so. + * + * @return {?XRGPUBinding} The XR WebGPU binding. Returns `null` if one cannot be created. + */ + getWebGPUBinding(): XRGPUBinding | null; + /** + * Returns whether the current XR session is using WebGPU. + * + * @private + * @return {boolean} Whether the current session uses the WebGPU backend and the `webgpu` session feature. + */ + private _isWebGPUSession; + /** + * Validates the current WebGPU XR session requirements. + * + * @private + */ + private _validateWebGPUSession; + /** + * Initializes the WebGPU XR projection layer and render target. + * + * @private + * @async + * @param {XRSession} session - The XR session. + * @return {Promise} + */ + private _initWebGPUSession; + /** + * Releases WebGPU XR resources associated with the current session. + * + * @private + */ + private _disposeWebGPUSession; + /** + * Collects WebGPU XR sub-image data for the current frame. + * + * @private + * @param {Array} views - The XR views for the current pose. + * @return {{colorTexture:?GPUTexture, viewDescriptors:Array, viewports:Array}} The WebGPU XR view data. + */ + private _getWebGPUViewData; + /** + * Returns the current XR frame. + * + * @return {?XRFrame} The XR frame. Returns `null` when used outside a XR session. + */ + getFrame(): XRFrame | null; + /** + * Returns `true` if the engine renders to a multiview target. + * + * @return {boolean} Whether the engine renders to a multiview render target or not. + */ + useMultiview(): boolean; + /** + * This method can be used in XR applications to create a quadratic layer that presents a separate + * rendered scene. + * + * @param {number} width - The width of the layer plane in world units. + * @param {number} height - The height of the layer plane in world units. + * @param {Vector3} translation - The position/translation of the layer plane in world units. + * @param {Quaternion} quaternion - The orientation of the layer plane expressed as a quaternion. + * @param {number} pixelwidth - The width of the layer's render target in pixels. + * @param {number} pixelheight - The height of the layer's render target in pixels. + * @param {Function} rendercall - A callback function that renders the layer. Similar to code in + * the default animation loop, this method can be used to update/transform 3D object in the layer's scene. + * @param {Object} [attributes={}] - Allows to configure the layer's render target. + * @return {Mesh} A mesh representing the quadratic XR layer. This mesh should be added to the XR scene. + */ + createQuadLayer(width: number, height: number, translation: Vector3, quaternion: Quaternion, pixelwidth: number, pixelheight: number, rendercall: Function, attributes?: Object): Mesh; + /** + * This method can be used in XR applications to create a cylindrical layer that presents a separate + * rendered scene. + * + * @param {number} radius - The radius of the cylinder in world units. + * @param {number} centralAngle - The central angle of the cylinder in radians. + * @param {number} aspectratio - The aspect ratio. + * @param {Vector3} translation - The position/translation of the layer plane in world units. + * @param {Quaternion} quaternion - The orientation of the layer plane expressed as a quaternion. + * @param {number} pixelwidth - The width of the layer's render target in pixels. + * @param {number} pixelheight - The height of the layer's render target in pixels. + * @param {Function} rendercall - A callback function that renders the layer. Similar to code in + * the default animation loop, this method can be used to update/transform 3D object in the layer's scene. + * @param {Object} [attributes={}] - Allows to configure the layer's render target. + * @return {Mesh} A mesh representing the cylindrical XR layer. This mesh should be added to the XR scene. + */ + createCylinderLayer(radius: number, centralAngle: number, aspectratio: number, translation: Vector3, quaternion: Quaternion, pixelwidth: number, pixelheight: number, rendercall: Function, attributes?: Object): Mesh; + /** + * Renders the XR layers that have been previously added to the scene. + * + * This method is usually called in your animation loop before rendering + * the actual scene via `renderer.render( scene, camera );`. + */ + renderLayers(): void; + /** + * Returns the current XR session. + * + * @return {?XRSession} The XR session. Returns `null` when used outside a XR session. + */ + getSession(): XRSession | null; + /** + * After a XR session has been requested usually with one of the `*Button` modules, it + * is injected into the renderer with this method. This method triggers the start of + * the actual XR rendering. + * + * @async + * @param {XRSession} session - The XR session to set. + * @return {Promise} A Promise that resolves when the session has been set. + */ + setSession(session: XRSession): Promise; + /** + * This method is called by the renderer per frame and updates the XR camera + * and it sub cameras based on the given camera. The given camera is the "user" + * camera created on application level and used for non-XR rendering. + * + * @param {PerspectiveCamera} camera - The camera. + */ + updateCamera(camera: PerspectiveCamera): void; + /** + * Returns a WebXR controller for the given controller index. + * + * @private + * @param {number} index - The controller index. + * @return {WebXRController} The XR controller. + */ + private _getController; +} +/** + * This class represents a uniform buffer binding but with + * an API that allows to maintain individual uniform objects. + * + * @private + * @augments UniformBuffer + */ +declare class UniformsGroup extends UniformBuffer { + /** + * Constructs a new uniforms group. + * + * @param {string} name - The group's name. + */ + constructor(name: string); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isUniformsGroup: boolean; + /** + * An array with the raw uniform values. + * + * @private + * @type {?Array} + * @default null + */ + private _values; + /** + * An array of uniform objects. + * + * The order of uniforms in this array must match the order of uniforms in the shader. + * + * @type {Array} + */ + uniforms: Array; + /** + * A cache for the uniform update ranges. + * + * @private + * @type {Map} + */ + private _updateRangeCache; + /** + * Uniform indices whose range has already been pushed into `updateRanges` + * during the current update cycle. Reset on `clearUpdateRanges()`. + * + * @private + * @type {Set} + */ + private _addedIndices; + /** + * Adds a uniform's update range to this buffer. + * + * @param {Uniform} uniform - The uniform. + */ + addUniformUpdateRange(uniform: Uniform): void; + /** + * Adds a uniform to this group. + * + * @param {Uniform} uniform - The uniform to add. + * @return {UniformsGroup} A reference to this group. + */ + addUniform(uniform: Uniform): UniformsGroup; + /** + * Removes a uniform from this group. + * + * @param {Uniform} uniform - The uniform to remove. + * @return {UniformsGroup} A reference to this group. + */ + removeUniform(uniform: Uniform): UniformsGroup; + /** + * An array with the raw uniform values. + * + * @type {Array} + */ + get values(): Array; + /** + * Updates a given uniform by calling an update method matching + * the uniforms type. + * + * @param {Uniform} uniform - The uniform to update. + * @return {boolean} Whether the uniform has been updated or not. + */ + updateByType(uniform: Uniform): boolean; + /** + * Updates a given Number uniform. + * + * @param {NumberUniform} uniform - The Number uniform. + * @return {boolean} Whether the uniform has been updated or not. + */ + updateNumber(uniform: NumberUniform): boolean; + /** + * Updates a given Vector2 uniform. + * + * @param {Vector2Uniform} uniform - The Vector2 uniform. + * @return {boolean} Whether the uniform has been updated or not. + */ + updateVector2(uniform: Vector2Uniform): boolean; + /** + * Updates a given Vector3 uniform. + * + * @param {Vector3Uniform} uniform - The Vector3 uniform. + * @return {boolean} Whether the uniform has been updated or not. + */ + updateVector3(uniform: Vector3Uniform): boolean; + /** + * Updates a given Vector4 uniform. + * + * @param {Vector4Uniform} uniform - The Vector4 uniform. + * @return {boolean} Whether the uniform has been updated or not. + */ + updateVector4(uniform: Vector4Uniform): boolean; + /** + * Updates a given Color uniform. + * + * @param {ColorUniform} uniform - The Color uniform. + * @return {boolean} Whether the uniform has been updated or not. + */ + updateColor(uniform: ColorUniform): boolean; + /** + * Updates a given Matrix3 uniform. + * + * @param {Matrix3Uniform} uniform - The Matrix3 uniform. + * @return {boolean} Whether the uniform has been updated or not. + */ + updateMatrix3(uniform: Matrix3Uniform): boolean; + /** + * Updates a given Matrix4 uniform. + * + * @param {Matrix4Uniform} uniform - The Matrix4 uniform. + * @return {boolean} Whether the uniform has been updated or not. + */ + updateMatrix4(uniform: Matrix4Uniform): boolean; + /** + * Returns a typed array that matches the given data type. + * + * @private + * @param {string} type - The data type. + * @return {TypedArray} The typed array. + */ + private _getBufferForType; +} +/** + * A binding represents the connection between a resource (like a texture, sampler + * or uniform buffer) and the resource definition in a shader stage. + * + * This module is an abstract base class for all concrete bindings types. + * + * @abstract + * @private + */ +declare class Binding { + /** + * Constructs a new binding. + * + * @param {string} [name=''] - The binding's name. + */ + constructor(name?: string); + /** + * The binding's name. + * + * @type {string} + */ + name: string; + /** + * A bitmask that defines in what shader stages the + * binding's resource is accessible. + * + * @type {number} + */ + visibility: number; + /** + * Makes sure binding's resource is visible for the given shader stage. + * + * @param {number} visibility - The shader stage. + */ + setVisibility(visibility: number): void; + /** + * The shader stages in which the binding's resource is visible. + * + * @return {number} The visibility bitmask. + */ + getVisibility(): number; + /** + * Clones the binding. + * + * @return {Binding} The cloned binding. + */ + clone(): Binding; +} +/** + * This module represents the state of a node builder after it was + * used to build the nodes for a render object. The state holds the + * results of the build for further processing in the renderer. + * + * Render objects with identical cache keys share the same node builder state. + * + * @private + */ +declare class NodeBuilderState { + /** + * Constructs a new node builder state. + * + * @param {string} vertexShader - The native vertex shader code. + * @param {string} fragmentShader - The native fragment shader code. + * @param {string} computeShader - The native compute shader code. + * @param {Array} nodeAttributes - An array of node attributes. + * @param {Array} bindings - An array of bind groups. + * @param {Array} updateNodes - An array of nodes that implement their `update()` method. + * @param {Array} updateBeforeNodes - An array of nodes that implement their `updateBefore()` method. + * @param {Array} updateAfterNodes - An array of nodes that implement their `updateAfter()` method. + * @param {NodeMaterialObserver} observer - A node material observer. + * @param {Array} transforms - An array with transform attribute objects. Only relevant when using compute shaders with WebGL 2. + */ + constructor(vertexShader: string, fragmentShader: string, computeShader: string, nodeAttributes: Array, bindings: Array, updateNodes: Array, updateBeforeNodes: Array, updateAfterNodes: Array, observer: NodeMaterialObserver, transforms?: Array); + /** + * The native vertex shader code. + * + * @type {string} + */ + vertexShader: string; + /** + * The native fragment shader code. + * + * @type {string} + */ + fragmentShader: string; + /** + * The native compute shader code. + * + * @type {string} + */ + computeShader: string; + /** + * An array with transform attribute objects. + * Only relevant when using compute shaders with WebGL 2. + * + * @type {Array} + */ + transforms: Array; + /** + * An array of node attributes representing + * the attributes of the shaders. + * + * @type {Array} + */ + nodeAttributes: Array; + /** + * An array of bind groups representing the uniform or storage + * buffers, texture or samplers of the shader. + * + * @type {Array} + */ + bindings: Array; + /** + * An array of nodes that implement their `update()` method. + * + * @type {Array} + */ + updateNodes: Array; + /** + * An array of nodes that implement their `updateBefore()` method. + * + * @type {Array} + */ + updateBeforeNodes: Array; + /** + * An array of nodes that implement their `updateAfter()` method. + * + * @type {Array} + */ + updateAfterNodes: Array; + /** + * A node material observer. + * + * @type {NodeMaterialObserver} + */ + observer: NodeMaterialObserver; + /** + * How often this state is used by render objects. + * + * @type {number} + */ + usedTimes: number; + /** + * This method is used to create a array of bind groups based + * on the existing bind groups of this state. Shared groups are + * not cloned. + * + * @return {Array} A array of bind groups. + */ + createBindings(): Array; +} +/** + * This renderer module manages node-related objects and is the + * primary interface between the renderer and the node system. + * + * @private + * @augments DataMap + */ +declare class NodeManager extends DataMap { + /** + * Constructs a new nodes management component. + * + * @param {Renderer} renderer - The renderer. + * @param {Backend} backend - The renderer's backend. + */ + constructor(renderer: Renderer, backend: Backend); + /** + * The renderer. + * + * @type {Renderer} + */ + renderer: Renderer; + /** + * The renderer's backend. + * + * @type {Backend} + */ + backend: Backend; + /** + * The node frame. + * + * @type {Renderer} + */ + nodeFrame: Renderer; + /** + * A cache for managing node builder states. + * + * @type {Map} + */ + nodeBuilderCache: Map; + /** + * A cache for managing data cache key data. + * + * @type {ChainMap} + */ + callHashCache: ChainMap; + /** + * A cache for managing node uniforms group data. + * + * @type {ChainMap} + */ + groupsData: ChainMap; + /** + * Queue for pending async builds to limit concurrent compilation. + * + * @private + * @type {Array} + */ + private _buildQueue; + /** + * Whether an async build is currently in progress. + * + * @private + * @type {boolean} + */ + private _buildInProgress; + /** + * A cache for managing node objects of + * scene properties like fog or environments. + * + * @type {Object} + */ + cacheLib: { + [x: string]: WeakMap; + }; + /** + * Returns `true` if the given node uniforms group must be updated or not. + * + * @param {NodeUniformsGroup} nodeUniformsGroup - The node uniforms group. + * @return {boolean} Whether the node uniforms group requires an update or not. + */ + updateGroup(nodeUniformsGroup: NodeUniformsGroup): boolean; + /** + * Returns the cache key for the given render object. + * + * @param {RenderObject} renderObject - The render object. + * @return {number} The cache key. + */ + getForRenderCacheKey(renderObject: RenderObject): number; + /** + * Creates a node builder configured for the given render object and material. + * + * @private + * @param {RenderObject} renderObject - The render object. + * @param {Material} material - The material to use. + * @return {NodeBuilder} The configured node builder. + */ + private _createNodeBuilder; + /** + * Returns a node builder state for the given render object. + * + * @param {RenderObject} renderObject - The render object. + * @param {boolean} [useAsync=false] - Whether to use async build with yielding. + * @return {NodeBuilderState|Promise} The node builder state (or Promise if async). + */ + getForRender(renderObject: RenderObject, useAsync?: boolean): NodeBuilderState | Promise; + /** + * Async version of getForRender() that yields to main thread during build. + * Use this in compileAsync() to prevent blocking the main thread. + * + * @param {RenderObject} renderObject - The render object. + * @return {Promise} A promise that resolves to the node builder state. + */ + getForRenderAsync(renderObject: RenderObject): Promise; + /** + * Returns nodeBuilderState if ready, null if pending async build. + * Queues async build on first call for cache miss. + * Use this in render() path to enable non-blocking compilation. + * + * @param {RenderObject} renderObject - The render object. + * @return {?NodeBuilderState} The node builder state, or null if still building. + */ + getForRenderDeferred(renderObject: RenderObject): NodeBuilderState | null; + /** + * Processes the build queue one item at a time. + * This ensures builds don't all run simultaneously and freeze the main thread. + * + * @private + */ + private _processBuildQueue; + /** + * Deletes the given object from the internal data map + * + * @param {any} object - The object to delete. + * @return {?Object} The deleted dictionary. + */ + delete(object: any): Object | null; + /** + * Returns a node builder state for the given compute node. + * + * @param {Node} computeNode - The compute node. + * @return {NodeBuilderState} The node builder state. + */ + getForCompute(computeNode: Node): NodeBuilderState; + /** + * Creates a node builder state for the given node builder. + * + * @private + * @param {NodeBuilder} nodeBuilder - The node builder. + * @return {NodeBuilderState} The node builder state. + */ + private _createNodeBuilderState; + /** + * Returns an environment node for the current configured + * scene environment. + * + * @param {Scene} scene - The scene. + * @return {Node} A node representing the current scene environment. + */ + getEnvironmentNode(scene: Scene): Node; + /** + * Returns a background node for the current configured + * scene background. + * + * @param {Scene} scene - The scene. + * @return {Node} A node representing the current scene background. + */ + getBackgroundNode(scene: Scene): Node; + /** + * Returns a fog node for the current configured scene fog. + * + * @param {Scene} scene - The scene. + * @return {Node} A node representing the current scene fog. + */ + getFogNode(scene: Scene): Node; + /** + * Returns a cache key for the given scene and lights node. + * This key is used by `RenderObject` as a part of the dynamic + * cache key (a key that must be checked every time the render + * objects is drawn). + * + * @param {Scene} scene - The scene. + * @param {LightsNode} lightsNode - The lights node. + * @return {number} The cache key. + */ + getCacheKey(scene: Scene, lightsNode: LightsNode): number; + /** + * A boolean that indicates whether tone mapping should be enabled + * or not. + * + * @type {boolean} + */ + get isToneMappingState(): boolean; + /** + * If a scene background is configured, this method makes sure to + * represent the background with a corresponding node-based implementation. + * + * @param {Scene} scene - The scene. + */ + updateBackground(scene: Scene): void; + /** + * This method is part of the caching of nodes which are used to represents the + * scene's background, fog or environment. + * + * @param {string} type - The type of object to cache. + * @param {Object} object - The object. + * @param {Function} callback - A callback that produces a node representation for the given object. + * @param {boolean} [forceUpdate=false] - Whether an update should be enforced or not. + * @return {Node} The node representation. + */ + getCacheNode(type: string, object: Object, callback: Function, forceUpdate?: boolean): Node; + /** + * If a scene fog is configured, this method makes sure to + * represent the fog with a corresponding node-based implementation. + * + * @param {Scene} scene - The scene. + */ + updateFog(scene: Scene): void; + /** + * If a scene environment is configured, this method makes sure to + * represent the environment with a corresponding node-based implementation. + * + * @param {Scene} scene - The scene. + */ + updateEnvironment(scene: Scene): void; + getNodeFrame(renderer?: Renderer, scene?: null, object?: null, camera?: null, material?: null): Renderer; + getNodeFrameForRender(renderObject: any): Renderer; + /** + * Returns the current output cache key. + * + * @return {string} The output cache key. + */ + getOutputCacheKey(): string; + /** + * Returns a node that represents the output configuration (tone mapping and + * color space) for the current target. + * + * @param {Texture} outputTarget - The output target. + * @return {Node} The output node. + */ + getOutputNode(outputTarget: Texture): Node; + /** + * Sets the output layer index for array texture output pass. + * This should be called before each layer render during the output pass. + * + * @param {number} index - The layer index. + */ + setOutputLayerIndex(index: number): void; + /** + * Triggers the call of `updateBefore()` methods + * for all nodes of the given render object. + * + * @param {RenderObject} renderObject - The render object. + */ + updateBefore(renderObject: RenderObject): void; + /** + * Triggers the call of `updateAfter()` methods + * for all nodes of the given render object. + * + * @param {RenderObject} renderObject - The render object. + */ + updateAfter(renderObject: RenderObject): void; + /** + * Triggers the call of `update()` methods + * for all nodes of the given compute node. + * + * @param {Node} computeNode - The compute node. + */ + updateForCompute(computeNode: Node): void; + /** + * Triggers the call of `update()` methods + * for all nodes of the given render object. + * + * @param {RenderObject} renderObject - The render object. + */ + updateForRender(renderObject: RenderObject): void; + /** + * Returns `true` if the given render object requires a refresh. + * + * @param {RenderObject} renderObject - The render object. + * @return {boolean} Whether the given render object requires a refresh or not. + */ + needsRefresh(renderObject: RenderObject): boolean; +} +/** + * This renderer module manages geometries. + * + * @private + * @augments DataMap + */ +declare class Geometries extends DataMap { + /** + * Constructs a new geometry management component. + * + * @param {Attributes} attributes - Renderer component for managing attributes. + * @param {Info} info - Renderer component for managing metrics and monitoring data. + */ + constructor(attributes: Attributes, info: Info); + /** + * Renderer component for managing attributes. + * + * @type {Attributes} + */ + attributes: Attributes; + /** + * Renderer component for managing metrics and monitoring data. + * + * @type {Info} + */ + info: Info; + /** + * Weak Map for managing attributes for wireframe rendering. + * + * @type {WeakMap} + */ + wireframes: WeakMap; + /** + * This Weak Map is used to make sure buffer attributes are + * updated only once per render call. + * + * @type {WeakMap} + */ + attributeCall: WeakMap; + /** + * Stores the event listeners attached to geometries. + * + * @private + * @type {Map} + */ + private _geometryDisposeListeners; + /** + * Returns `true` if the given render object has an initialized geometry. + * + * @param {RenderObject} renderObject - The render object. + * @return {boolean} Whether if the given render object has an initialized geometry or not. + */ + has(renderObject: RenderObject): boolean; + /** + * Prepares the geometry of the given render object for rendering. + * + * @param {RenderObject} renderObject - The render object. + */ + updateForRender(renderObject: RenderObject): void; + /** + * Initializes the geometry of the given render object. + * + * @param {RenderObject} renderObject - The render object. + */ + initGeometry(renderObject: RenderObject): void; + /** + * Updates the geometry attributes of the given render object. + * + * @param {RenderObject} renderObject - The render object. + */ + updateAttributes(renderObject: RenderObject): void; + /** + * Updates the given attribute. + * + * @param {BufferAttribute} attribute - The attribute to update. + * @param {number} type - The attribute type. + */ + updateAttribute(attribute: BufferAttribute, type: number): void; + /** + * Returns the indirect buffer attribute of the given render object. + * + * @param {RenderObject} renderObject - The render object. + * @return {?BufferAttribute} The indirect attribute. `null` if no indirect drawing is used. + */ + getIndirect(renderObject: RenderObject): BufferAttribute | null; + /** + * Returns the byte offset into the indirect attribute buffer of the given render object. + * + * @param {RenderObject} renderObject - The render object. + * @return {number} The byte offset into the indirect attribute buffer. + */ + getIndirectOffset(renderObject: RenderObject): number; + /** + * Returns the index of the given render object's geometry. This is implemented + * in a method to return a wireframe index if necessary. + * + * @param {RenderObject} renderObject - The render object. + * @return {?BufferAttribute} The index. Returns `null` for non-indexed geometries. + */ + getIndex(renderObject: RenderObject): BufferAttribute | null; +} +/** + * Abstract base class of a timestamp query pool. + * + * @abstract + */ +declare class TimestampQueryPool { + /** + * Creates a new timestamp query pool. + * + * @param {number} [maxQueries=256] - Maximum number of queries this pool can hold. + */ + constructor(maxQueries?: number); + /** + * Whether to track timestamps or not. + * + * @type {boolean} + * @default true + */ + trackTimestamp: boolean; + /** + * Maximum number of queries this pool can hold. + * + * @type {number} + * @default 256 + */ + maxQueries: number; + /** + * How many queries allocated so far. + * + * @type {number} + * @default 0 + */ + currentQueryIndex: number; + /** + * Tracks offsets for different contexts. + * + * @type {Map} + */ + queryOffsets: Map; + /** + * Whether the pool has been disposed or not. + * + * @type {boolean} + * @default false + */ + isDisposed: boolean; + /** + * The total frame duration until the next update. + * + * @type {number} + * @default 0 + */ + lastValue: number; + /** + * Stores all timestamp frames. + * + * @type {Array} + */ + frames: Array; + /** + * This property is used to avoid multiple concurrent resolve operations. + * The WebGL backend uses it as a boolean flag. In context of WebGPU, it holds + * the promise of the current resolve operation. + * + * @type {boolean|Promise} + * @default false + */ + pendingResolve: boolean | Promise; + /** + * Stores the latest timestamp for each render context. + * + * @type {Map} + */ + timestamps: Map; + /** + * Returns all timestamp frames. + * + * @return {Array} The timestamp frames. + */ + getTimestampFrames(): Array; + /** + * Returns the timestamp for a given render context. + * + * @param {string} uid - A unique identifier for the render context. + * @return {?number} The timestamp, or undefined if not available. + */ + getTimestamp(uid: string): number | null; + /** + * Returns whether a timestamp is available for a given render context. + * + * @param {string} uid - A unique identifier for the render context. + * @return {boolean} True if a timestamp is available, false otherwise. + */ + hasTimestamp(uid: string): boolean; + /** + * Allocate queries for a specific uid. + * + * @abstract + * @param {string} uid - A unique identifier for the render context. + * @param {number} frameId - The current frame identifier. + * @returns {?number} + */ + allocateQueriesForContext(): number | null; + /** + * Resolve all timestamps and return data (or process them). + * + * @abstract + * @async + * @returns {Promise|number} The resolved timestamp value. + */ + resolveQueriesAsync(): Promise | number; + /** + * Dispose of the query pool. + * + * @abstract + */ + dispose(): void; +} +/** + * A four-component version of {@link Color} which is internally + * used by the renderer to represents clear color with alpha as + * one object. + * + * @private + * @augments Color + */ +declare class Color4 extends Color { + /** + * Constructs a new four-component color. + * You can also pass a single THREE.Color, hex or + * string argument to this constructor. + * + * @param {number|string} [r=1] - The red value. + * @param {number} [g=1] - The green value. + * @param {number} [b=1] - The blue value. + * @param {number} [a=1] - The alpha value. + */ + constructor(r?: number | string, g?: number, b?: number, a?: number); + a: number; + /** + * Overwrites the default to honor alpha. + * You can also pass a single THREE.Color, hex or + * string argument to this method. + * + * @param {number|string|Color} r - The red value. + * @param {number} [g] - The green value. + * @param {number} [b] - The blue value. + * @param {number} [a=1] - The alpha value. + * @return {Color4} A reference to this object. + */ + set(r: number | string | Color, g?: number, b?: number, a?: number): Color4; + /** + * Overwrites the default to honor alpha. + * + * @param {Color4} color - The color to copy. + * @return {Color4} A reference to this object. + */ + copy(color: Color4): Color4; + /** + * Overwrites the default to honor alpha. + * + * @return {Color4} The cloned color. + */ + clone(): Color4; +} +/** + * Abstract class for representing pipelines. + * + * @private + * @abstract + */ +declare class Pipeline { + /** + * Constructs a new pipeline. + * + * @param {string} cacheKey - The pipeline's cache key. + */ + constructor(cacheKey: string); + /** + * The pipeline's cache key. + * + * @type {string} + */ + cacheKey: string; + /** + * How often the pipeline is currently in use. + * + * @type {number} + * @default 0 + */ + usedTimes: number; +} +/** + * A WebGPU backend utility module used by {@link WebGPUTextureUtils}. + * + * @private + */ +declare class WebGPUTexturePassUtils extends DataMap { + /** + * Constructs a new utility object. + * + * @param {GPUDevice} device - The WebGPU device. + */ + constructor(device: GPUDevice); + /** + * The WebGPU device. + * + * @type {GPUDevice} + */ + device: GPUDevice; + /** + * The mipmap GPU sampler. + * + * @type {GPUSampler} + */ + mipmapSampler: GPUSampler; + /** + * The flipY GPU sampler. + * + * @type {GPUSampler} + */ + flipYSampler: GPUSampler; + flipUniformBuffer: GPUBuffer; + noFlipUniformBuffer: GPUBuffer; + /** + * A cache for GPU render pipelines used for copy/transfer passes. + * Every texture format and textureBindingViewDimension combo requires a unique pipeline. + * + * @type {Object} + */ + transferPipelines: { + [x: string]: GPURenderPipeline; + }; + mipmapShaderModule: GPUShaderModule; + /** + * Returns a render pipeline for the internal copy render pass. The pass + * requires a unique render pipeline for each texture format. + * + * @param {string} format - The GPU texture format + * @param {string?} textureBindingViewDimension - The GPU texture binding view dimension + * @return {GPURenderPipeline} The GPU render pipeline. + */ + getTransferPipeline(format: string, textureBindingViewDimension: string | null): GPURenderPipeline; + /** + * Flip the contents of the given GPU texture along its vertical axis. + * + * @param {GPUTexture} textureGPU - The GPU texture object. + * @param {Object} textureGPUDescriptor - The texture descriptor. + * @param {number} [baseArrayLayer=0] - The index of the first array layer accessible to the texture view. + */ + flipY(textureGPU: GPUTexture, textureGPUDescriptor: Object, baseArrayLayer?: number): void; + /** + * Generates mipmaps for the given GPU texture. + * + * @param {GPUTexture} textureGPU - The GPU texture object. + * @param {?GPUCommandEncoder} [encoder=null] - An optional command encoder used to generate mipmaps. + */ + generateMipmaps(textureGPU: GPUTexture, encoder?: GPUCommandEncoder | null): void; + /** + * Since multiple copy render passes are required to generate mipmaps, the passes + * are managed as render bundles to improve performance. + * + * @param {GPUTexture} textureGPU - The GPU texture object. + * @return {Array} An array of render bundles. + */ + _mipmapCreateBundles(textureGPU: GPUTexture): Array; + /** + * Executes the render bundles. + * + * @param {GPUCommandEncoder} commandEncoder - The GPU command encoder. + * @param {Array} passes - An array of render bundles. + */ + _mipmapRunBundles(commandEncoder: GPUCommandEncoder, passes: Array): void; +} +/** + * Represents a uniform buffer binding type. + * + * @private + * @augments Buffer + */ +declare class UniformBuffer extends Buffer { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isUniformBuffer: boolean; +} +/** + * Represents a Number uniform. + * + * @private + * @augments Uniform + */ +declare class NumberUniform extends Uniform { + /** + * Constructs a new Number uniform. + * + * @param {string} name - The uniform's name. + * @param {number} value - The uniform's value. + */ + constructor(name: string, value?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isNumberUniform: boolean; +} +/** + * Represents a Vector2 uniform. + * + * @private + * @augments Uniform + */ +declare class Vector2Uniform extends Uniform { + /** + * Constructs a new Number uniform. + * + * @param {string} name - The uniform's name. + * @param {Vector2} value - The uniform's value. + */ + constructor(name: string, value?: Vector2); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isVector2Uniform: boolean; +} +/** + * Represents a Vector3 uniform. + * + * @private + * @augments Uniform + */ +declare class Vector3Uniform extends Uniform { + /** + * Constructs a new Number uniform. + * + * @param {string} name - The uniform's name. + * @param {Vector3} value - The uniform's value. + */ + constructor(name: string, value?: Vector3); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isVector3Uniform: boolean; +} +/** + * Represents a Vector4 uniform. + * + * @private + * @augments Uniform + */ +declare class Vector4Uniform extends Uniform { + /** + * Constructs a new Number uniform. + * + * @param {string} name - The uniform's name. + * @param {Vector4} value - The uniform's value. + */ + constructor(name: string, value?: Vector4); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isVector4Uniform: boolean; +} +/** + * Represents a Color uniform. + * + * @private + * @augments Uniform + */ +declare class ColorUniform extends Uniform { + /** + * Constructs a new Number uniform. + * + * @param {string} name - The uniform's name. + * @param {Color} value - The uniform's value. + */ + constructor(name: string, value?: Color); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isColorUniform: boolean; +} +/** + * Represents a Matrix3 uniform. + * + * @private + * @augments Uniform + */ +declare class Matrix3Uniform extends Uniform { + /** + * Constructs a new Number uniform. + * + * @param {string} name - The uniform's name. + * @param {Matrix3} value - The uniform's value. + */ + constructor(name: string, value?: Matrix3); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMatrix3Uniform: boolean; +} +/** + * Represents a Matrix4 uniform. + * + * @private + * @augments Uniform + */ +declare class Matrix4Uniform extends Uniform { + /** + * Constructs a new Number uniform. + * + * @param {string} name - The uniform's name. + * @param {Matrix4} value - The uniform's value. + */ + constructor(name: string, value?: Matrix4); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMatrix4Uniform: boolean; +} +/** + * Data structure for the renderer. It is intended to manage + * data of objects in dictionaries. + * + * @private + */ +declare class DataMap { + /** + * `DataMap` internally uses a weak map + * to manage its data. + * + * @type {WeakMap} + */ + data: WeakMap; + /** + * Returns the dictionary for the given object. + * + * @param {Object} object - The object. + * @return {Object} The dictionary. + */ + get(object: Object): Object; + /** + * Deletes the dictionary for the given object. + * + * @param {Object} object - The object. + * @return {?Object} The deleted dictionary. + */ + delete(object: Object): Object | null; + /** + * Returns `true` if the given object has a dictionary defined. + * + * @param {Object} object - The object to test. + * @return {boolean} Whether a dictionary is defined or not. + */ + has(object: Object): boolean; + /** + * Frees internal resources. + */ + dispose(): void; +} +/** + * Data structure for the renderer. It allows defining values + * with chained, hierarchical keys. Keys are meant to be + * objects since the module internally works with Weak Maps + * for performance reasons. + * + * @private + */ +declare class ChainMap { + /** + * A map of Weak Maps by their key length. + * + * @type {Object} + */ + weakMaps: { + [x: number]: WeakMap; + }; + /** + * Returns the Weak Map for the given keys. + * + * @param {Array} keys - List of keys. + * @return {WeakMap} The weak map. + */ + _getWeakMap(keys: Array): WeakMap; + /** + * Returns the value for the given array of keys. + * + * @param {Array} keys - List of keys. + * @return {any} The value. Returns `undefined` if no value was found. + */ + get(keys: Array): any; + /** + * Sets the value for the given keys. + * + * @param {Array} keys - List of keys. + * @param {any} value - The value to set. + * @return {ChainMap} A reference to this Chain Map. + */ + set(keys: Array, value: any): ChainMap; + /** + * Deletes a value for the given keys. + * + * @param {Array} keys - The keys. + * @return {boolean} Returns `true` if the value has been removed successfully and `false` if the value has not be found. + */ + delete(keys: Array): boolean; +} +/** + * This renderer module manages geometry attributes. + * + * @private + * @augments DataMap + */ +declare class Attributes extends DataMap { + /** + * Constructs a new attribute management component. + * + * @param {Backend} backend - The renderer's backend. + * @param {Info} info - Renderer component for managing metrics and monitoring data. + */ + constructor(backend: Backend, info: Info); + /** + * The renderer's backend. + * + * @type {Backend} + */ + backend: Backend; + /** + * Renderer component for managing metrics and monitoring data. + * + * @type {Info} + */ + info: Info; + /** + * Deletes the data for the given attribute. + * + * @param {BufferAttribute} attribute - The attribute. + * @return {?Object} The deleted attribute data. + */ + delete(attribute: BufferAttribute): Object | null; + /** + * Updates the given attribute. This method creates attribute buffers + * for new attributes and updates data for existing ones. + * + * @param {BufferAttribute} attribute - The attribute to update. + * @param {number} type - The attribute type. + */ + update(attribute: BufferAttribute, type: number): void; + /** + * Utility method for handling interleaved buffer attributes correctly. + * To process them, their `InterleavedBuffer` is returned. + * + * @param {BufferAttribute} attribute - The attribute. + * @return {BufferAttribute|InterleavedBuffer} + */ + _getBufferAttribute(attribute: BufferAttribute): BufferAttribute | InterleavedBuffer; +} +export { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveBlending, AgXToneMapping, AlphaFormat, AlwaysCompare, AlwaysDepth, AlwaysStencilFunc, AmbientLight, ArrayCamera, BackSide, BasicShadowMap, BoxGeometry, BufferAttribute, BufferGeometry, ByteType, CineonToneMapping, ClampToEdgeWrapping, Color, ColorManagement, Compatibility, CubeCamera, CubeDepthTexture, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeUVReflectionMapping, CullFaceBack, CullFaceFront, CullFaceNone, CustomBlending, CylinderGeometry, DataArrayTexture, DataTexture, DecrementStencilOp, DecrementWrapStencilOp, DepthFormat, DepthStencilFormat, DepthTexture, DirectionalLight, DoubleSide, DstAlphaFactor, DstColorFactor, DynamicDrawUsage, EqualCompare, EqualDepth, EqualStencilFunc, EquirectangularReflectionMapping, EquirectangularRefractionMapping, EventDispatcher, FileLoader, Float16BufferAttribute, Float32BufferAttribute, FloatType, FramebufferTexture, FrontSide, Frustum, FrustumArray, GreaterCompare, GreaterDepth, GreaterEqualCompare, GreaterEqualDepth, GreaterEqualStencilFunc, GreaterStencilFunc, Group, HalfFloatType, HemisphereLight, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedInterleavedBuffer, IntType, InterleavedBuffer, InterleavedBufferAttribute, InvertStencilOp, KeepStencilOp, LessCompare, LessDepth, LessEqualCompare, LessEqualDepth, LessEqualStencilFunc, LessStencilFunc, LightProbe, LineBasicMaterial, LineDashedMaterial, LinearFilter, LinearMipMapLinearFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, LinearToneMapping, LinearTransfer, Loader, Material, MaterialBlending, MaterialLoader, MathUtils, Matrix2, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeutralToneMapping, NeverCompare, NeverDepth, NeverStencilFunc, NoBlending, NoColorSpace, NoNormalPacking, NoToneMapping, NormalBlending, NormalGAPacking, NormalRGPacking, NotEqualCompare, NotEqualDepth, NotEqualStencilFunc, Object3D, ObjectLoader, ObjectSpaceNormalMap, OneFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, PCFShadowMap, PCFSoftShadowMap, PerspectiveCamera, Plane, PlaneGeometry, PointLight, PointsMaterial, Quaternion, R11_EAC_Format, RED_GREEN_RGTC2_Format, RED_RGTC1_Format, REVISION, RG11_EAC_Format, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGBFormat, RGBIntegerFormat, RGB_BPTC_SIGNED_Format, RGB_BPTC_UNSIGNED_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGFormat, RGIntegerFormat, RectAreaLight, RedFormat, RedIntegerFormat, ReinhardToneMapping, RenderTarget, RepeatWrapping, ReplaceStencilOp, ReverseSubtractEquation, SIGNED_R11_EAC_Format, SIGNED_RED_GREEN_RGTC2_Format, SIGNED_RED_RGTC1_Format, SIGNED_RG11_EAC_Format, SRGBColorSpace, SRGBTransfer, Scene, ShadowMaterial, ShortType, Sphere, SphereGeometry, SpotLight, SpriteMaterial, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, StaticDrawUsage, SubtractEquation, SubtractiveBlending, TangentSpaceNormalMap, Texture, TimestampQuery, UVMapping, Uint16BufferAttribute, Uint32BufferAttribute, UnsignedByteType, UnsignedInt101111Type, UnsignedInt248Type, UnsignedInt5999Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, WebGLCoordinateSystem, WebGPUCoordinateSystem, WebXRController, ZeroFactor, ZeroStencilOp, createCanvasElement, error, log$1 as log, warn, warnOnce }; +export { AdditiveAnimationBlendMode, AnimationAction, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrowHelper, AttachedBindMode, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BasicDepthPacking, BatchedMesh, BezierInterpolant, Bone, BooleanKeyframeTrack, Box2, Box3, Box3Helper, BoxHelper, BufferGeometryLoader, Cache, Camera, CameraHelper, CanvasTexture, CapsuleGeometry, CatmullRomCurve3, CircleGeometry, Clock, ColorKeyframeTrack, CompressedArrayTexture, CompressedCubeTexture, CompressedTexture, CompressedTextureLoader, ConeGeometry, ConstantAlphaFactor, ConstantColorFactor, Controls, CubeTextureLoader, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceFrontBack, Curve, CurvePath, CustomToneMapping, Cylindrical, Data3DTexture, DataTextureLoader, DataUtils, DefaultLoadingManager, DetachedBindMode, DirectionalLightHelper, DiscreteInterpolant, DodecahedronGeometry, DynamicCopyUsage, DynamicReadUsage, EdgesGeometry, EllipseCurve, Euler, ExternalTexture, ExtrudeGeometry, Fog, FogExp2, GLBufferAttribute, GLSL1, GLSL3, GridHelper, HTMLTexture, HemisphereLightHelper, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, InstancedBufferGeometry, InstancedMesh, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, Interpolant, InterpolateBezier, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InterpolationSamplingMode, InterpolationSamplingType, KeyframeTrack, LOD, LatheGeometry, Layers, Light, Line, Line3, LineCurve, LineCurve3, LineLoop, LineSegments, LinearInterpolant, LinearMipMapNearestFilter, LoaderUtils, LoadingManager, LoopOnce, LoopPingPong, LoopRepeat, MOUSE, MeshDepthMaterial, MeshDistanceMaterial, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NormalAnimationBlendMode, NumberKeyframeTrack, OctahedronGeometry, OneMinusConstantAlphaFactor, OneMinusConstantColorFactor, Path, PlaneHelper, PointLightHelper, Points, PolarGridHelper, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, QuaternionKeyframeTrack, QuaternionLinearInterpolant, RGBADepthPacking, RGBDepthPacking, RGDepthPacking, RawShaderMaterial, Ray, Raycaster, RenderTarget3D, RingGeometry, ShaderMaterial, Shape, ShapeGeometry, ShapePath, ShapeUtils, Skeleton, SkeletonHelper, SkinnedMesh, Source, Spherical, SphericalHarmonics3, SplineCurve, SpotLightHelper, Sprite, StaticCopyUsage, StaticReadUsage, StereoCamera, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, TOUCH, TetrahedronGeometry, TextureLoader, TextureUtils, Timer, TorusGeometry, TorusKnotGeometry, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsGroup, VectorKeyframeTrack, VideoFrameTexture, VideoTexture, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGLRenderTarget, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroSlopeEnding, getConsoleFunction, setConsoleFunction } from "./three.core.js"; diff --git a/jsdoc-testing/jsdoc/examples/jsm/Addons.d.ts b/jsdoc-testing/jsdoc/examples/jsm/Addons.d.ts new file mode 100644 index 000000000..8e04ba8f1 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/Addons.d.ts @@ -0,0 +1,269 @@ +export * from "./animation/AnimationClipCreator.js"; +export * from "./animation/CCDIKSolver.js"; +export * from "./controls/ArcballControls.js"; +export * from "./controls/DragControls.js"; +export * from "./controls/FirstPersonControls.js"; +export * from "./controls/FlyControls.js"; +export * from "./controls/MapControls.js"; +export * from "./controls/OrbitControls.js"; +export * from "./controls/PointerLockControls.js"; +export * from "./controls/TrackballControls.js"; +export * from "./controls/TransformControls.js"; +export * from "./csm/CSM.js"; +export * from "./csm/CSMFrustum.js"; +export * from "./csm/CSMHelper.js"; +export * from "./csm/CSMShader.js"; +export * from "./curves/NURBSCurve.js"; +export * from "./curves/NURBSSurface.js"; +export * from "./curves/NURBSVolume.js"; +export * from "./effects/AnaglyphEffect.js"; +export * from "./effects/AsciiEffect.js"; +export * from "./effects/OutlineEffect.js"; +export * from "./effects/ParallaxBarrierEffect.js"; +export * from "./effects/StereoEffect.js"; +export * from "./environments/ColorEnvironment.js"; +export * from "./environments/DebugEnvironment.js"; +export * from "./environments/RoomEnvironment.js"; +export * from "./exporters/DRACOExporter.js"; +export * from "./exporters/EXRExporter.js"; +export * from "./exporters/GLTFExporter.js"; +export * from "./exporters/KTX2Exporter.js"; +export * from "./exporters/OBJExporter.js"; +export * from "./exporters/PLYExporter.js"; +export * from "./exporters/STLExporter.js"; +export * from "./exporters/USDZExporter.js"; +export * from "./geometries/BoxLineGeometry.js"; +export * from "./geometries/ConvexGeometry.js"; +export * from "./geometries/DecalGeometry.js"; +export * from "./geometries/ParametricFunctions.js"; +export * from "./geometries/ParametricGeometry.js"; +export * from "./geometries/RoundedBoxGeometry.js"; +export * from "./geometries/TeapotGeometry.js"; +export * from "./geometries/TextGeometry.js"; +export * from "./helpers/AnimationPathHelper.js"; +export * from "./helpers/LightProbeHelper.js"; +export * from "./helpers/OctreeHelper.js"; +export * from "./helpers/PositionalAudioHelper.js"; +export * from "./helpers/RapierHelper.js"; +export * from "./helpers/RectAreaLightHelper.js"; +export * from "./helpers/TextureHelper.js"; +export * from "./helpers/VertexNormalsHelper.js"; +export * from "./helpers/VertexTangentsHelper.js"; +export * from "./helpers/ViewHelper.js"; +export * from "./interactive/HTMLMesh.js"; +export * from "./interactive/InteractiveGroup.js"; +export * from "./interactive/SelectionBox.js"; +export * from "./interactive/SelectionHelper.js"; +export * from "./lights/LightProbeGenerator.js"; +export * from "./lights/RectAreaLightTexturesLib.js"; +export * from "./lights/RectAreaLightUniformsLib.js"; +export * from "./lines/Line2.js"; +export * from "./lines/LineGeometry.js"; +export * from "./lines/LineMaterial.js"; +export * from "./lines/LineSegments2.js"; +export * from "./lines/LineSegmentsGeometry.js"; +export * from "./lines/Wireframe.js"; +export * from "./lines/WireframeGeometry2.js"; +export * from "./loaders/3DMLoader.js"; +export * from "./loaders/3MFLoader.js"; +export * from "./loaders/AMFLoader.js"; +export * from "./loaders/BVHLoader.js"; +export * from "./loaders/ColladaLoader.js"; +export * from "./loaders/DDSLoader.js"; +export * from "./loaders/DRACOLoader.js"; +export * from "./loaders/EXRLoader.js"; +export * from "./loaders/FBXLoader.js"; +export * from "./loaders/FontLoader.js"; +export * from "./loaders/GCodeLoader.js"; +export * from "./loaders/GLTFLoader.js"; +export * from "./loaders/HDRLoader.js"; +export * from "./loaders/HDRCubeTextureLoader.js"; +export * from "./loaders/IESLoader.js"; +export * from "./loaders/KMZLoader.js"; +export * from "./loaders/KTX2Loader.js"; +export * from "./loaders/KTXLoader.js"; +export * from "./loaders/LDrawLoader.js"; +export * from "./loaders/LUT3dlLoader.js"; +export * from "./loaders/LUTCubeLoader.js"; +export * from "./loaders/LUTImageLoader.js"; +export * from "./loaders/LWOLoader.js"; +export * from "./loaders/LottieLoader.js"; +export * from "./loaders/MD2Loader.js"; +export * from "./loaders/MDDLoader.js"; +export * from "./loaders/MTLLoader.js"; +export * from "./loaders/NRRDLoader.js"; +export * from "./loaders/OBJLoader.js"; +export * from "./loaders/PCDLoader.js"; +export * from "./loaders/PDBLoader.js"; +export * from "./loaders/PLYLoader.js"; +export * from "./loaders/PVRLoader.js"; +export * from "./loaders/RGBELoader.js"; +export * from "./loaders/UltraHDRLoader.js"; +export * from "./loaders/STLLoader.js"; +export * from "./loaders/SVGLoader.js"; +export * from "./loaders/TDSLoader.js"; +export * from "./loaders/TGALoader.js"; +export * from "./loaders/TIFFLoader.js"; +export * from "./loaders/TTFLoader.js"; +export * from "./loaders/USDLoader.js"; +export * from "./loaders/VOXLoader.js"; +export * from "./loaders/VRMLLoader.js"; +export * from "./loaders/VTKLoader.js"; +export * from "./loaders/XYZLoader.js"; +export * from "./materials/LDrawConditionalLineMaterial.js"; +export * from "./math/Capsule.js"; +export * from "./math/ColorConverter.js"; +export * from "./math/ConvexHull.js"; +export * from "./math/ImprovedNoise.js"; +export * from "./math/Lut.js"; +export * from "./math/MeshSurfaceSampler.js"; +export * from "./math/OBB.js"; +export * from "./math/Octree.js"; +export * from "./math/SimplexNoise.js"; +export * from "./misc/ConvexObjectBreaker.js"; +export * from "./misc/GPUComputationRenderer.js"; +export * from "./misc/Gyroscope.js"; +export * from "./misc/MD2Character.js"; +export * from "./misc/MD2CharacterComplex.js"; +export * from "./misc/MorphAnimMesh.js"; +export * from "./misc/MorphBlendMesh.js"; +export * from "./misc/ProgressiveLightMap.js"; +export * from "./misc/RollerCoaster.js"; +export * from "./misc/TubePainter.js"; +export * from "./misc/Volume.js"; +export * from "./misc/VolumeSlice.js"; +export * from "./modifiers/CurveModifier.js"; +export * from "./modifiers/EdgeSplitModifier.js"; +export * from "./modifiers/SimplifyModifier.js"; +export * from "./modifiers/TessellateModifier.js"; +export * from "./objects/GroundedSkybox.js"; +export * from "./objects/Lensflare.js"; +export * from "./objects/MarchingCubes.js"; +export * from "./objects/Reflector.js"; +export * from "./objects/ReflectorForSSRPass.js"; +export * from "./objects/Refractor.js"; +export * from "./objects/ShadowMesh.js"; +export * from "./objects/Sky.js"; +export * from "./objects/Water.js"; +export * from "./physics/AmmoPhysics.js"; +export * from "./physics/JoltPhysics.js"; +export * from "./physics/RapierPhysics.js"; +export * from "./postprocessing/AfterimagePass.js"; +export * from "./postprocessing/BloomPass.js"; +export * from "./postprocessing/BokehPass.js"; +export * from "./postprocessing/ClearPass.js"; +export * from "./postprocessing/CubeTexturePass.js"; +export * from "./postprocessing/DotScreenPass.js"; +export * from "./postprocessing/EffectComposer.js"; +export * from "./postprocessing/FXAAPass.js"; +export * from "./postprocessing/FilmPass.js"; +export * from "./postprocessing/GlitchPass.js"; +export * from "./postprocessing/GTAOPass.js"; +export * from "./postprocessing/HalftonePass.js"; +export * from "./postprocessing/LUTPass.js"; +export * from "./postprocessing/MaskPass.js"; +export * from "./postprocessing/OutlinePass.js"; +export * from "./postprocessing/OutputPass.js"; +export * from "./postprocessing/Pass.js"; +export * from "./postprocessing/RenderPass.js"; +export * from "./postprocessing/RenderPixelatedPass.js"; +export * from "./postprocessing/RenderTransitionPass.js"; +export * from "./postprocessing/SAOPass.js"; +export * from "./postprocessing/SMAAPass.js"; +export * from "./postprocessing/SSAARenderPass.js"; +export * from "./postprocessing/SSAOPass.js"; +export * from "./postprocessing/SSRPass.js"; +export * from "./postprocessing/SavePass.js"; +export * from "./postprocessing/ShaderPass.js"; +export * from "./postprocessing/TAARenderPass.js"; +export * from "./postprocessing/TexturePass.js"; +export * from "./postprocessing/UnrealBloomPass.js"; +export * from "./renderers/CSS2DRenderer.js"; +export * from "./renderers/CSS3DRenderer.js"; +export * from "./renderers/Projector.js"; +export * from "./renderers/SVGRenderer.js"; +export * from "./shaders/ACESFilmicToneMappingShader.js"; +export * from "./shaders/AfterimageShader.js"; +export * from "./shaders/BasicShader.js"; +export * from "./shaders/BleachBypassShader.js"; +export * from "./shaders/BlendShader.js"; +export * from "./shaders/BokehShader.js"; +export * from "./shaders/BrightnessContrastShader.js"; +export * from "./shaders/ColorCorrectionShader.js"; +export * from "./shaders/ColorifyShader.js"; +export * from "./shaders/ConvolutionShader.js"; +export * from "./shaders/CopyShader.js"; +export * from "./shaders/DOFMipMapShader.js"; +export * from "./shaders/DepthLimitedBlurShader.js"; +export * from "./shaders/DigitalGlitch.js"; +export * from "./shaders/DotScreenShader.js"; +export * from "./shaders/ExposureShader.js"; +export * from "./shaders/FXAAShader.js"; +export * from "./shaders/FilmShader.js"; +export * from "./shaders/FocusShader.js"; +export * from "./shaders/FreiChenShader.js"; +export * from "./shaders/GammaCorrectionShader.js"; +export * from "./shaders/GTAOShader.js"; +export * from "./shaders/HalftoneShader.js"; +export * from "./shaders/HorizontalBlurShader.js"; +export * from "./shaders/HorizontalTiltShiftShader.js"; +export * from "./shaders/HueSaturationShader.js"; +export * from "./shaders/KaleidoShader.js"; +export * from "./shaders/LuminosityHighPassShader.js"; +export * from "./shaders/LuminosityShader.js"; +export * from "./shaders/MirrorShader.js"; +export * from "./shaders/NormalMapShader.js"; +export * from "./shaders/OutputShader.js"; +export * from "./shaders/PoissonDenoiseShader.js"; +export * from "./shaders/RGBShiftShader.js"; +export * from "./shaders/SAOShader.js"; +export * from "./shaders/SMAAShader.js"; +export * from "./shaders/SSAOShader.js"; +export * from "./shaders/SSRShader.js"; +export * from "./shaders/SepiaShader.js"; +export * from "./shaders/SobelOperatorShader.js"; +export * from "./shaders/SubsurfaceScatteringShader.js"; +export * from "./shaders/TechnicolorShader.js"; +export * from "./shaders/ToonShader.js"; +export * from "./shaders/TriangleBlurShader.js"; +export * from "./shaders/UnpackDepthRGBAShader.js"; +export * from "./shaders/VelocityShader.js"; +export * from "./shaders/VerticalBlurShader.js"; +export * from "./shaders/VerticalTiltShiftShader.js"; +export * from "./shaders/VignetteShader.js"; +export * from "./shaders/VolumeShader.js"; +export * from "./shaders/WaterRefractionShader.js"; +export * from "./textures/FlakesTexture.js"; +export * from "./utils/LDrawUtils.js"; +export * from "./utils/SceneOptimizer.js"; +export * from "./utils/ShadowMapViewer.js"; +export * from "./utils/WebGLTextureUtils.js"; +export * from "./utils/UVsDebug.js"; +export * from "./utils/WorkerPool.js"; +export * from "./webxr/ARButton.js"; +export * from "./webxr/OculusHandModel.js"; +export * from "./webxr/OculusHandPointerModel.js"; +export * from "./webxr/Text2D.js"; +export * from "./webxr/VRButton.js"; +export * from "./webxr/WebGLXRFallback.js"; +export * from "./webxr/XRButton.js"; +export * from "./webxr/XRControllerModelFactory.js"; +export * from "./webxr/XREstimatedLight.js"; +export * from "./webxr/XRHandMeshModel.js"; +export * from "./webxr/XRHandModelFactory.js"; +export * from "./webxr/XRHandPrimitiveModel.js"; +export * from "./webxr/XRPlanes.js"; +export { default as WebGL } from "./capabilities/WebGL.js"; +export * as Curves from "./curves/CurveExtras.js"; +export * as NURBSUtils from "./curves/NURBSUtils.js"; +export * as ColorSpaces from "./math/ColorSpaces.js"; +export { Water as Water2 } from "./objects/Water2.js"; +export { BokehShader as BokehShader2 } from "./shaders/BokehShader2.js"; +export * as BufferGeometryUtils from "./utils/BufferGeometryUtils.js"; +export * as CameraUtils from "./utils/CameraUtils.js"; +export * as ColorUtils from "./utils/ColorUtils.js"; +export * as GeometryCompressionUtils from "./utils/GeometryCompressionUtils.js"; +export * as GeometryUtils from "./utils/GeometryUtils.js"; +export * as SceneUtils from "./utils/SceneUtils.js"; +export * as SkeletonUtils from "./utils/SkeletonUtils.js"; +export * as SortUtils from "./utils/SortUtils.js"; diff --git a/jsdoc-testing/jsdoc/examples/jsm/animation/AnimationClipCreator.d.ts b/jsdoc-testing/jsdoc/examples/jsm/animation/AnimationClipCreator.d.ts new file mode 100644 index 000000000..11c23e792 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/animation/AnimationClipCreator.d.ts @@ -0,0 +1,62 @@ +/** + * A utility class with factory methods for creating basic animation clips. + * + * @hideconstructor + * @three_import import { AnimationClipCreator } from 'three/addons/animation/AnimationClipCreator.js'; + */ +export class AnimationClipCreator { + /** + * Creates an animation clip that rotates a 3D object 360 degrees + * in the given period of time around the given axis. + * + * @param {number} period - The duration of the animation. + * @param {('x'|'y'|'z')} [axis='x'] - The axis of rotation. + * @return {AnimationClip} The created animation clip. + */ + static CreateRotationAnimation(period: number, axis?: ("x" | "y" | "z")): AnimationClip; + /** + * Creates an animation clip that scales a 3D object from `0` to `1` + * in the given period of time along the given axis. + * + * @param {number} period - The duration of the animation. + * @param {('x'|'y'|'z')} [axis='x'] - The axis to scale the 3D object along. + * @return {AnimationClip} The created animation clip. + */ + static CreateScaleAxisAnimation(period: number, axis?: ("x" | "y" | "z")): AnimationClip; + /** + * Creates an animation clip that translates a 3D object in a shake pattern + * in the given period. + * + * @param {number} duration - The duration of the animation. + * @param {Vector3} shakeScale - The scale of the shake. + * @return {AnimationClip} The created animation clip. + */ + static CreateShakeAnimation(duration: number, shakeScale: Vector3): AnimationClip; + /** + * Creates an animation clip that scales a 3D object in a pulse pattern + * in the given period. + * + * @param {number} duration - The duration of the animation. + * @param {number} pulseScale - The scale of the pulse. + * @return {AnimationClip} The created animation clip. + */ + static CreatePulsationAnimation(duration: number, pulseScale: number): AnimationClip; + /** + * Creates an animation clip that toggles the visibility of a 3D object. + * + * @param {number} duration - The duration of the animation. + * @return {AnimationClip} The created animation clip. + */ + static CreateVisibilityAnimation(duration: number): AnimationClip; + /** + * Creates an animation clip that animates the `color` property of a 3D object's + * material. + * + * @param {number} duration - The duration of the animation. + * @param {Array} colors - An array of colors that should be sequentially animated. + * @return {AnimationClip} The created animation clip. + */ + static CreateMaterialColorAnimation(duration: number, colors: Array): AnimationClip; +} +import { AnimationClip } from 'three'; +import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/animation/CCDIKSolver.d.ts b/jsdoc-testing/jsdoc/examples/jsm/animation/CCDIKSolver.d.ts new file mode 100644 index 000000000..3f3509ed9 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/animation/CCDIKSolver.d.ts @@ -0,0 +1,152 @@ +/** + * ~IK + */ +export type CCDIKSolver = { + /** + * - The target bone index which refers to a bone in the `Skeleton.bones` array. + */ + target: number; + /** + * - The effector bone index which refers to a bone in the `Skeleton.bones` array. + */ + effector: number; + /** + * ~BoneLink>} links - An array of bone links. + */ + "": Array; + /** + * - Iteration number of calculation. Smaller is faster but less precise. + */ + iteration?: number | undefined; + /** + * - Minimum rotation angle in a step in radians. + */ + minAngle?: number | undefined; + /** + * - Minimum rotation angle in a step in radians. + */ + maxAngle?: number | undefined; + /** + * - The blend factor. + */ + blendFactor?: number | undefined; +}; +/** + * This class solves the Inverse Kinematics Problem with a [CCD Algorithm](https://web.archive.org/web/20221206080850/https://sites.google.com/site/auraliusproject/ccd-algorithm). + * + * `CCDIKSolver` is designed to work with instances of {@link SkinnedMesh}. + * + * @three_import import { CCDIKSolver } from 'three/addons/animation/CCDIKSolver.js'; + */ +export class CCDIKSolver { + /** + * @param {SkinnedMesh} mesh - The skinned mesh. + * @param {Array} [iks=[]] - The IK objects. + */ + constructor(mesh: SkinnedMesh, iks?: any[]); + /** + * The skinned mesh. + * + * @type {SkinnedMesh} + */ + mesh: SkinnedMesh; + /** + * The IK objects. + * + * @type {Array} + */ + iks: Array; + _initialQuaternions: Quaternion[][]; + _workingQuaternion: Quaternion; + /** + * Updates all IK bones by solving the CCD algorithm. + * + * @param {number} [globalBlendFactor=1.0] - Blend factor applied if an IK chain doesn't have its own .blendFactor. + * @return {CCDIKSolver} A reference to this instance. + */ + update(globalBlendFactor?: number): CCDIKSolver; + /** + * Updates one IK bone solving the CCD algorithm. + * + * @param {CCDIKSolver~IK} ik - The IK to update. + * @param {number} [overrideBlend=1.0] - If the IK object does not define `blendFactor`, this value is used. + * @return {CCDIKSolver} A reference to this instance. + */ + updateOne(ik: any, overrideBlend?: number): CCDIKSolver; + /** + * Creates a helper for visualizing the CCDIK. + * + * @param {number} sphereSize - The sphere size. + * @return {CCDIKHelper} The created helper. + */ + createHelper(sphereSize: number): CCDIKHelper; + _valid(): void; +} +/** + * Helper for visualizing IK bones. + * + * @augments Object3D + * @three_import import { CCDIKHelper } from 'three/addons/animation/CCDIKSolver.js'; + */ +export class CCDIKHelper extends Object3D { + /** + * @param {SkinnedMesh} mesh - The skinned mesh. + * @param {Array} [iks=[]] - The IK objects. + * @param {number} [sphereSize=0.25] - The sphere size. + */ + constructor(mesh: SkinnedMesh, iks?: any[], sphereSize?: number); + /** + * The skinned mesh this helper refers to. + * + * @type {SkinnedMesh} + */ + root: SkinnedMesh; + /** + * The IK objects. + * + * @type {Array} + */ + iks: Array; + /** + * The helpers sphere geometry. + * + * @type {SphereGeometry} + */ + sphereGeometry: SphereGeometry; + /** + * The material for the target spheres. + * + * @type {MeshBasicMaterial} + */ + targetSphereMaterial: MeshBasicMaterial; + /** + * The material for the effector spheres. + * + * @type {MeshBasicMaterial} + */ + effectorSphereMaterial: MeshBasicMaterial; + /** + * The material for the link spheres. + * + * @type {MeshBasicMaterial} + */ + linkSphereMaterial: MeshBasicMaterial; + /** + * A global line material. + * + * @type {LineBasicMaterial} + */ + lineMaterial: LineBasicMaterial; + updateMatrixWorld(force: any): void; + /** + * Frees the GPU-related resources allocated by this instance. + * Call this method whenever this instance is no longer used in your app. + */ + dispose(): void; + _init(): void; +} +import { Quaternion } from 'three'; +import { Object3D } from 'three'; +import { SphereGeometry } from 'three'; +import { MeshBasicMaterial } from 'three'; +import { LineBasicMaterial } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/capabilities/WebGL.d.ts b/jsdoc-testing/jsdoc/examples/jsm/capabilities/WebGL.d.ts new file mode 100644 index 000000000..7a5082970 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/capabilities/WebGL.d.ts @@ -0,0 +1,31 @@ +export default WebGL; +/** + * A utility module with basic WebGL 2 capability testing. + * + * @hideconstructor + * @three_import import WebGL from 'three/addons/capabilities/WebGL.js'; + */ +declare class WebGL { + /** + * Returns `true` if WebGL 2 is available. + * + * @return {boolean} Whether WebGL 2 is available or not. + */ + static isWebGL2Available(): boolean; + /** + * Returns `true` if the given color space is available. This method can only be used + * if WebGL 2 is supported. + * + * @param {string} colorSpace - The color space to test. + * @return {boolean} Whether the given color space is available or not. + */ + static isColorSpaceAvailable(colorSpace: string): boolean; + /** + * Returns a `div` element representing a formatted error message that can be appended in + * web sites if WebGL 2 isn't supported. + * + * @return {HTMLDivElement} A `div` element representing a formatted error message that WebGL 2 isn't supported. + */ + static getWebGL2ErrorMessage(): HTMLDivElement; + static _getErrorMessage(version: any): HTMLDivElement; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/capabilities/WebGPU.d.ts b/jsdoc-testing/jsdoc/examples/jsm/capabilities/WebGPU.d.ts new file mode 100644 index 000000000..410375a5f --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/capabilities/WebGPU.d.ts @@ -0,0 +1,22 @@ +export default WebGPU; +/** + * A utility module with basic WebGPU capability testing. + * + * @hideconstructor + * @three_import import WebGPU from 'three/addons/capabilities/WebGPU.js'; + */ +declare class WebGPU { + /** + * Returns `true` if WebGPU is available. + * + * @return {boolean} Whether WebGPU is available or not. + */ + static isAvailable(): boolean; + /** + * Returns a `div` element representing a formatted error message that can be appended in + * web sites if WebGPU isn't supported. + * + * @return {HTMLDivElement} A `div` element representing a formatted error message that WebGPU isn't supported. + */ + static getErrorMessage(): HTMLDivElement; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/controls/ArcballControls.d.ts b/jsdoc-testing/jsdoc/examples/jsm/controls/ArcballControls.d.ts new file mode 100644 index 000000000..a5b82f12b --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/controls/ArcballControls.d.ts @@ -0,0 +1,676 @@ +/** + * Arcball controls allow the camera to be controlled by a virtual trackball with full touch support and advanced navigation functionality. + * Cursor/finger positions and movements are mapped over a virtual trackball surface represented by a gizmo and mapped in intuitive and + * consistent camera movements. Dragging cursor/fingers will cause camera to orbit around the center of the trackball in a conservative + * way (returning to the starting point will make the camera return to its starting orientation). + * + * In addition to supporting pan, zoom and pinch gestures, double clicking/tapping focuses on a point, intuitively moving the object's + * point of interest to the center of the virtual trackball. Focus allows a much better inspection and navigation in complex environment. + * Moreover Arcball controls allow FOV manipulation (in a vertigo-style method) and z-rotation. Saving and restoring of Camera State + * is supported also through clipboard (use ctrl+c and ctrl+v shortcuts for copy and paste the state). + * + * Unlike {@link OrbitControls} and {@link TrackballControls}, `ArcballControls` doesn't require `update()` to be called externally in an + * animation loop when animations are on. + * + * @augments Controls + * @three_import import { ArcballControls } from 'three/addons/controls/ArcballControls.js'; + */ +export class ArcballControls extends Controls { + /** + * Constructs a new controls instance. + * + * @param {Camera} camera - The camera to be controlled. The camera must not be a child of another object, unless that object is the scene itself. + * @param {?HTMLElement} [domElement=null] - The HTML element used for event listeners. + * @param {?Scene} [scene=null] The scene rendered by the camera. If not given, gizmos cannot be shown. + */ + constructor(camera: Camera, domElement?: HTMLElement | null, scene?: Scene | null); + /** + * The scene rendered by the camera. If not given, gizmos cannot be shown. + * + * @type {?Scene} + * @default null + */ + scene: Scene | null; + /** + * The control's focus point. + * + * @type {Vector3} + */ + target: Vector3; + _currentTarget: Vector3; + /** + * The size of the gizmo relative to the screen width and height. + * + * @type {number} + * @default 0.67 + */ + radiusFactor: number; + /** + * Holds the mouse actions of this controls. This property is maintained by the methods + * `setMouseAction()` and `unsetMouseAction()`. + * + * @type {Array} + */ + mouseActions: Array; + _mouseOp: any; + _v2_1: Vector2; + _v3_1: Vector3; + _v3_2: Vector3; + _m4_1: Matrix4; + _m4_2: Matrix4; + _quat: Quaternion; + _translationMatrix: Matrix4; + _rotationMatrix: Matrix4; + _scaleMatrix: Matrix4; + _rotationAxis: Vector3; + _cameraMatrixState: Matrix4; + _cameraProjectionState: Matrix4; + _fovState: number; + _upState: Vector3; + _zoomState: number; + _nearPos: number; + _farPos: number; + _gizmoMatrixState: Matrix4; + _up0: Vector3; + _zoom0: number; + _fov0: number; + _initialNear: number; + _nearPos0: number; + _initialFar: number; + _farPos0: number; + _cameraMatrixState0: Matrix4; + _gizmoMatrixState0: Matrix4; + _target0: Vector3; + _button: number; + _touchStart: any[]; + _touchCurrent: any[]; + _input: symbol; + _switchSensibility: number; + _startFingerDistance: number; + _currentFingerDistance: number; + _startFingerRotation: number; + _currentFingerRotation: number; + _devPxRatio: number; + _downValid: boolean; + _nclicks: number; + _downEvents: any[]; + _downStart: number; + _clickStart: number; + _maxDownTime: number; + _maxInterval: number; + _posThreshold: number; + _movementThreshold: number; + _currentCursorPosition: Vector3; + _startCursorPosition: Vector3; + _grid: GridHelper | null; + _gridPosition: Vector3; + _gizmos: Group; + _curvePts: number; + _timeStart: number; + _animationId: number; + /** + * Duration of focus animations in ms. + * + * @type {number} + * @default 500 + */ + focusAnimationTime: number; + _timePrev: number; + _timeCurrent: number; + _anglePrev: number; + _angleCurrent: number; + _cursorPosPrev: Vector3; + _cursorPosCurr: Vector3; + _wPrev: number; + _wCurr: number; + /** + * If set to `true`, the camera's near and far values will be adjusted every time zoom is + * performed trying to maintain the same visible portion given by initial near and far + * values. Only works with perspective cameras. + * + * This feature only works as expected if the camera's initial state (position, near and far values) + * is correctly configured before creating the controls. Otherwise {@link ArcballControls#setCamera} + * must be called by the application. + * + * @type {boolean} + * @default false + */ + adjustNearFar: boolean; + /** + * The scaling factor used when performing zoom operation. + * + * @type {number} + * @default 1.1 + */ + scaleFactor: number; + /** + * The damping inertia used if 'enableAnimations` is set to `true`. + * + * @type {number} + * @default 25 + */ + dampingFactor: number; + /** + * Maximum angular velocity allowed on rotation animation start. + * + * @type {number} + * @default 20 + */ + wMax: number; + /** + * Set to `true` to enable animations for rotation (damping) and focus operation. + * + * @type {boolean} + * @default true + */ + enableAnimations: boolean; + /** + * If set to `true`, a grid will appear when panning operation is being performed + * (desktop interaction only). + * + * @type {boolean} + * @default false + */ + enableGrid: boolean; + /** + * Set to `true` to make zoom become cursor centered. + * + * @type {boolean} + * @default false + */ + cursorZoom: boolean; + /** + * The minimum FOV in degrees. + * + * @type {number} + * @default 5 + */ + minFov: number; + /** + * The maximum FOV in degrees. + * + * @type {number} + * @default 90 + */ + maxFov: number; + /** + * Speed of rotation. + * + * @type {number} + * @default 1 + */ + rotateSpeed: number; + /** + * Enable or disable camera panning. + * + * @type {boolean} + * @default true + */ + enablePan: boolean; + /** + * Enable or disable camera rotation. + * + * @type {boolean} + * @default true + */ + enableRotate: boolean; + /** + * Enable or disable camera zoom. + * + * @type {boolean} + * @default true + */ + enableZoom: boolean; + /** + * Enable or disable gizmos. + * + * @type {boolean} + * @default true + */ + enableGizmos: boolean; + /** + * Enable or disable camera focusing on double-tap (or click) operations. + * + * @type {boolean} + * @default true + */ + enableFocus: boolean; + /** + * How far you can dolly in. For perspective cameras only. + * + * @type {number} + * @default 0 + */ + minDistance: number; + /** + * How far you can dolly out. For perspective cameras only. + * + * @type {number} + * @default Infinity + */ + maxDistance: number; + /** + * How far you can zoom in. For orthographic cameras only. + * + * @type {number} + * @default 0 + */ + minZoom: number; + /** + * How far you can zoom out. For orthographic cameras only. + * + * @type {number} + * @default Infinity + */ + maxZoom: number; + _tbRadius: number; + _state: symbol; + _onContextMenu: typeof onContextMenu; + _onWheel: typeof onWheel; + _onPointerUp: typeof onPointerUp; + _onPointerMove: typeof onPointerMove; + _onPointerDown: typeof onPointerDown; + _onPointerCancel: typeof onPointerCancel; + _onWindowResize: typeof onWindowResize; + connect(element: any): void; + onSinglePanStart(event: any, operation: any): void; + onSinglePanMove(event: any, opState: any): void; + onSinglePanEnd(): void; + onDoubleTap(event: any): void; + onDoublePanStart(): void; + onDoublePanMove(): void; + onDoublePanEnd(): void; + onRotateStart(): void; + onRotateMove(): void; + onRotateEnd(): void; + onPinchStart(): void; + onPinchMove(): void; + onPinchEnd(): void; + onTriplePanStart(): void; + onTriplePanMove(): void; + onTriplePanEnd(): void; + /** + * Set _center's x/y coordinates. + * + * @private + * @param {number} clientX - The x coordinate. + * @param {number} clientY - The y coordinate. + */ + private setCenter; + /** + * Set default mouse actions. + * + * @private + */ + private initializeMouseActions; + /** + * Compare two mouse actions. + * + * @private + * @param {Object} action1 - The first mouse action. + * @param {Object} action2 - The second mouse action. + * @returns {boolean} `true` if action1 and action 2 are the same mouse action, `false` otherwise. + */ + private compareMouseAction; + /** + * Set a new mouse action by specifying the operation to be performed and a mouse/key combination. In case of conflict, replaces the existing one. + * + * @param {'PAN'|'ROTATE'|'ZOOM'|'FOV'} operation - The operation to be performed ('PAN', 'ROTATE', 'ZOOM', 'FOV'). + * @param {0|1|2|'WHEEL'} mouse - A mouse button (0, 1, 2) or 'WHEEL' for wheel notches. + * @param {?('CTRL'|'SHIFT')} [key=null] - The keyboard modifier ('CTRL', 'SHIFT') or null if key is not needed. + * @returns {boolean} `true` if the mouse action has been successfully added, `false` otherwise. + */ + setMouseAction(operation: "PAN" | "ROTATE" | "ZOOM" | "FOV", mouse: 0 | 1 | 2 | "WHEEL", key?: ("CTRL" | "SHIFT") | null): boolean; + /** + * Remove a mouse action by specifying its mouse/key combination. + * + * @param {0|1|2|'WHEEL'} mouse - A mouse button (0, 1, 2) or 'WHEEL' for wheel notches. + * @param {?('CTRL'|'SHIFT')} key - The keyboard modifier ('CTRL', 'SHIFT') or null if key is not needed. + * @returns {boolean} `true` if the operation has been successfully removed, `false` otherwise. + */ + unsetMouseAction(mouse: 0 | 1 | 2 | "WHEEL", key?: ("CTRL" | "SHIFT") | null): boolean; + /** + * Return the operation associated to a mouse/keyboard combination. + * + * @private + * @param {0|1|2|'WHEEL'} mouse - Mouse button index (0, 1, 2) or 'WHEEL' for wheel notches. + * @param {?('CTRL'|'SHIFT')} key - Keyboard modifier. + * @returns {?('PAN'|'ROTATE'|'ZOOM'|'FOV')} The operation if it has been found, `null` otherwise. + */ + private getOpFromAction; + /** + * Get the operation associated to mouse and key combination and returns the corresponding FSA state. + * + * @private + * @param {0|1|2} mouse - Mouse button index (0, 1, 2) + * @param {?('CTRL'|'SHIFT')} key - Keyboard modifier + * @returns {?STATE} The FSA state obtained from the operation associated to mouse/keyboard combination. + */ + private getOpStateFromAction; + /** + * Calculate the angle between two pointers. + * + * @private + * @param {PointerEvent} p1 - The first pointer event. + * @param {PointerEvent} p2 - The second pointer event. + * @returns {number} The angle between two pointers in degrees. + */ + private getAngle; + /** + * Updates a PointerEvent inside current pointerevents array. + * + * @private + * @param {PointerEvent} event - The pointer event. + */ + private updateTouchEvent; + /** + * Applies a transformation matrix, to the camera and gizmos. + * + * @private + * @param {Object} transformation - Object containing matrices to apply to camera and gizmos. + */ + private applyTransformMatrix; + /** + * Calculates the angular speed. + * + * @private + * @param {number} p0 - Position at t0. + * @param {number} p1 - Position at t1. + * @param {number} t0 - Initial time in milliseconds. + * @param {number} t1 - Ending time in milliseconds. + * @returns {number} The angular speed. + */ + private calculateAngularSpeed; + /** + * Calculates the distance between two pointers. + * + * @private + * @param {PointerEvent} p0 - The first pointer. + * @param {PointerEvent} p1 - The second pointer. + * @returns {number} The distance between the two pointers. + */ + private calculatePointersDistance; + /** + * Calculates the rotation axis as the vector perpendicular between two vectors. + * + * @private + * @param {Vector3} vec1 - The first vector. + * @param {Vector3} vec2 - The second vector. + * @returns {Vector3} The normalized rotation axis. + */ + private calculateRotationAxis; + /** + * Calculates the trackball radius so that gizmo's diameter will be 2/3 of the minimum side of the camera frustum. + * + * @private + * @param {Camera} camera - The camera. + * @returns {number} The trackball radius. + */ + private calculateTbRadius; + /** + * Focus operation consist of positioning the point of interest in front of the camera and a slightly zoom in. + * + * @private + * @param {Vector3} point - The point of interest. + * @param {number} size - Scale factor. + * @param {number} [amount=1] - Amount of operation to be completed (used for focus animations, default is complete full operation). + */ + private focus; + /** + * Creates a grid if necessary and adds it to the scene. + * + * @private + */ + private drawGrid; + /** + * Removes the grid from the scene. + */ + disposeGrid(): void; + /** + * Computes the easing out cubic function for ease out effect in animation. + * + * @private + * @param {number} t - The absolute progress of the animation in the bound of `0` (beginning of the) and `1` (ending of animation). + * @returns {number} Result of easing out cubic at time `t`. + */ + private easeOutCubic; + /** + * Makes rotation gizmos more or less visible. + * + * @param {boolean} isActive - If set to `true`, gizmos are more visible. + */ + activateGizmos(isActive: boolean): void; + /** + * Calculates the cursor position in NDC. + * + * @private + * @param {number} cursorX - Cursor horizontal coordinate within the canvas. + * @param {number} cursorY - Cursor vertical coordinate within the canvas. + * @param {HTMLElement} canvas - The canvas where the renderer draws its output. + * @returns {Vector2} Cursor normalized position inside the canvas. + */ + private getCursorNDC; + /** + * Calculates the cursor position inside the canvas x/y coordinates with the origin being in the center of the canvas. + * + * @private + * @param {number} cursorX - Cursor horizontal coordinate within the canvas. + * @param {number} cursorY - Cursor vertical coordinate within the canvas. + * @param {HTMLElement} canvas - The canvas where the renderer draws its output. + * @returns {Vector2} Cursor position inside the canvas. + */ + private getCursorPosition; + /** + * Sets the camera to be controlled. Must be called in order to set a new camera to be controlled. + * + * @param {Camera} camera - The camera to be controlled. + */ + setCamera(camera: Camera): void; + /** + * Sets gizmos visibility. + * + * @param {boolean} value - Value of gizmos visibility. + */ + setGizmosVisible(value: boolean): void; + /** + * Sets gizmos radius factor and redraws gizmos. + * + * @param {number} value - Value of radius factor. + */ + setTbRadius(value: number): void; + /** + * Creates the rotation gizmos matching trackball center and radius. + * + * @private + * @param {Vector3} tbCenter - The trackball center. + * @param {number} tbRadius - The trackball radius. + */ + private makeGizmos; + /** + * Performs animation for focus operation. + * + * @private + * @param {number} time - Instant in which this function is called as performance.now(). + * @param {Vector3} point - Point of interest for focus operation. + * @param {Matrix4} cameraMatrix - Camera matrix. + * @param {Matrix4} gizmoMatrix - Gizmos matrix. + */ + private onFocusAnim; + /** + * Performs animation for rotation operation. + * + * @private + * @param {number} time - Instant in which this function is called as performance.now(). + * @param {Vector3} rotationAxis - Rotation axis. + * @param {number} w0 - Initial angular velocity. + */ + private onRotationAnim; + /** + * Performs pan operation moving camera between two points. + * + * @private + * @param {Vector3} p0 - Initial point. + * @param {Vector3} p1 - Ending point. + * @param {boolean} [adjust=false] - If movement should be adjusted considering camera distance (Perspective only). + * @returns {Object} + */ + private pan; + /** + * Resets the controls. + */ + reset(): void; + /** + * Rotates the camera around an axis passing by trackball's center. + * + * @private + * @param {Vector3} axis - Rotation axis. + * @param {number} angle - Angle in radians. + * @returns {Object} Object with 'camera' field containing transformation matrix resulting from the operation to be applied to the camera. + */ + private rotate; + /** + * Copy the current state to clipboard (as a readable JSON text). + */ + copyState(): void; + /** + * Set the controls state from the clipboard, assumes that the clipboard stores a JSON + * text as saved from `copyState()`. + */ + pasteState(): void; + /** + * Saves the current state of the control. This can later be recover with `reset()`. + */ + saveState(): void; + /** + * Performs uniform scale operation around a given point. + * + * @private + * @param {number} size - Scale factor. + * @param {Vector3} point - Point around which scale. + * @param {boolean} scaleGizmos - If gizmos should be scaled (Perspective only). + * @returns {Object} Object with 'camera' and 'gizmo' fields containing transformation matrices resulting from the operation to be applied to the camera and gizmos. + */ + private scale; + /** + * Sets camera fov. + * + * @private + * @param {number} value - The FOV to be set. + */ + private setFov; + /** + * Sets values in transformation object. + * + * @private + * @param {?Matrix4} [camera=null] - Transformation to be applied to the camera. + * @param {?Matrix4} [gizmos=null] - Transformation to be applied to gizmos. + */ + private setTransformationMatrices; + /** + * Rotates camera around its direction axis passing by a given point by a given angle. + * + * @private + * @param {Vector3} point - The point where the rotation axis is passing trough. + * @param {number} angle - Angle in radians. + * @returns {Object} The computed transformation matrix. + */ + private zRotate; + /** + * Returns the raycaster that is used for user interaction. This object is shared between all + * instances of `ArcballControls`. + * + * @returns {Raycaster} The internal raycaster. + */ + getRaycaster(): Raycaster; + /** + * Unprojects the cursor on the 3D object surface. + * + * @private + * @param {Vector2} cursor - Cursor coordinates in NDC. + * @param {Camera} camera - Virtual camera. + * @returns {?Vector3} The point of intersection with the model, if exist, null otherwise. + */ + private unprojectOnObj; + /** + * Unproject the cursor on the trackball surface. + * + * @private + * @param {Camera} camera - The virtual camera. + * @param {number} cursorX - Cursor horizontal coordinate on screen. + * @param {number} cursorY - Cursor vertical coordinate on screen. + * @param {HTMLElement} canvas - The canvas where the renderer draws its output. + * @param {number} tbRadius - The trackball radius. + * @returns {Vector3} The unprojected point on the trackball surface. + */ + private unprojectOnTbSurface; + /** + * Unprojects the cursor on the plane passing through the center of the trackball orthogonal to the camera. + * + * @private + * @param {Camera} camera - The virtual camera. + * @param {number} cursorX - Cursor horizontal coordinate on screen. + * @param {number} cursorY - Cursor vertical coordinate on screen. + * @param {HTMLElement} canvas - The canvas where the renderer draws its output. + * @param {boolean} [initialDistance=false] - If initial distance between camera and gizmos should be used for calculations instead of current (Perspective only). + * @returns {Vector3} The unprojected point on the trackball plane. + */ + private unprojectOnTbPlane; + /** + * Updates camera and gizmos state. + * + * @private + */ + private updateMatrixState; + /** + * Updates the trackball FSA. + * + * @private + * @param {STATE} newState - New state of the FSA. + * @param {boolean} updateMatrices - If matrices state should be updated. + */ + private updateTbState; + setStateFromJSON(json: any): void; +} +import { Controls } from 'three'; +import { Vector3 } from 'three'; +import { Vector2 } from 'three'; +import { Matrix4 } from 'three'; +import { Quaternion } from 'three'; +import { GridHelper } from 'three'; +import { Group } from 'three'; +declare function onContextMenu(event: any): void; +declare function onWheel(event: any): void; +declare function onPointerUp(event: any): void; +declare class onPointerUp { + constructor(event: any); + _input: symbol | undefined; + _button: number | undefined; + _nclicks: number | undefined; + _clickStart: number | undefined; + _downValid: boolean | undefined; +} +declare function onPointerMove(event: any): void; +declare class onPointerMove { + constructor(event: any); + _input: symbol | undefined; + _downValid: boolean | undefined; +} +declare function onPointerDown(event: any): void; +declare class onPointerDown { + constructor(event: any); + _downValid: boolean; + _downStart: number | undefined; + _input: symbol | undefined; + _mouseOp: any; + _button: any; +} +declare function onPointerCancel(): void; +declare class onPointerCancel { + _input: symbol; +} +declare function onWindowResize(): void; +declare class onWindowResize { + _tbRadius: any; +} +import { Raycaster } from 'three'; +export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/controls/DragControls.d.ts b/jsdoc-testing/jsdoc/examples/jsm/controls/DragControls.d.ts new file mode 100644 index 000000000..8457f57fb --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/controls/DragControls.d.ts @@ -0,0 +1,93 @@ +/** + * This class can be used to provide a drag'n'drop interaction. + * + * ```js + * const controls = new DragControls( objects, camera, renderer.domElement ); + * + * // add event listener to highlight dragged objects + * controls.addEventListener( 'dragstart', function ( event ) { + * + * event.object.material.emissive.set( 0xaaaaaa ); + * + * } ); + * + * controls.addEventListener( 'dragend', function ( event ) { + * + * event.object.material.emissive.set( 0x000000 ); + * + * } ); + * ``` + * + * @augments Controls + * @three_import import { DragControls } from 'three/addons/controls/DragControls.js'; + */ +export class DragControls extends Controls { + /** + * Constructs a new controls instance. + * + * @param {Array} objects - An array of draggable 3D objects. + * @param {Camera} camera - The camera of the rendered scene. + * @param {?HTMLElement} [domElement=null] - The HTML DOM element used for event listeners. + */ + constructor(objects: Array, camera: Camera, domElement?: HTMLElement | null); + /** + * An array of draggable 3D objects. + * + * @type {Array} + */ + objects: Array; + /** + * Whether children of draggable objects can be dragged independently from their parent. + * + * @type {boolean} + * @default true + */ + recursive: boolean; + /** + * This option only works if the `objects` array contains a single draggable group object. + * If set to `true`, the controls does not transform individual objects but the entire group. + * + * @type {boolean} + * @default false + */ + transformGroup: boolean; + /** + * The speed at which the object will rotate when dragged in `rotate` mode. + * The higher the number the faster the rotation. + * + * @type {number} + * @default 1 + */ + rotateSpeed: number; + /** + * The raycaster used for detecting 3D objects. + * + * @type {Raycaster} + */ + raycaster: Raycaster; + mouseButtons: { + LEFT: number; + MIDDLE: number; + RIGHT: number; + }; + touches: { + ONE: number; + }; + _onPointerMove: typeof onPointerMove; + _onPointerDown: typeof onPointerDown; + _onPointerCancel: typeof onPointerCancel; + _onContextMenu: typeof onContextMenu; + connect(element: any): void; + _updatePointer(event: any): void; + _updateState(event: any): void; +} +import { Controls } from 'three'; +import { Raycaster } from 'three'; +declare function onPointerMove(event: any): void; +declare function onPointerDown(event: any): void; +declare function onPointerCancel(): void; +declare class onPointerCancel { + state: number | undefined; +} +declare function onContextMenu(event: any): void; +export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/controls/FirstPersonControls.d.ts b/jsdoc-testing/jsdoc/examples/jsm/controls/FirstPersonControls.d.ts new file mode 100644 index 000000000..efb3d183a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/controls/FirstPersonControls.d.ts @@ -0,0 +1,185 @@ +/** + * This class is an alternative implementation of {@link FlyControls}. + * + * @augments Controls + * @three_import import { FirstPersonControls } from 'three/addons/controls/FirstPersonControls.js'; + */ +export class FirstPersonControls extends Controls { + /** + * Constructs a new controls instance. + * + * @param {Object3D} object - The object that is managed by the controls. + * @param {?HTMLElement} domElement - The HTML element used for event listeners. + */ + constructor(object: Object3D, domElement?: HTMLElement | null); + /** + * The movement speed. + * + * @type {number} + * @default 1 + */ + movementSpeed: number; + /** + * The look around speed. + * + * @type {number} + * @default 0.005 + */ + lookSpeed: number; + /** + * Whether it's possible to vertically look around or not. + * + * @type {boolean} + * @default true + */ + lookVertical: boolean; + /** + * Whether the camera is automatically moved forward or not. + * + * @type {boolean} + * @default false + */ + autoForward: boolean; + /** + * Whether or not the camera's height influences the forward movement speed. + * Use the properties `heightCoef`, `heightMin` and `heightMax` for configuration. + * + * @type {boolean} + * @default false + */ + heightSpeed: boolean; + /** + * Determines how much faster the camera moves when it's y-component is near `heightMax`. + * + * @type {number} + * @default 1 + */ + heightCoef: number; + /** + * Lower camera height limit used for movement speed adjustment. + * + * @type {number} + * @default 0 + */ + heightMin: number; + /** + * Upper camera height limit used for movement speed adjustment. + * + * @type {number} + * @default 1 + */ + heightMax: number; + /** + * Whether or not looking around is vertically constrained by `verticalMin` and `verticalMax`. + * + * @type {boolean} + * @default false + */ + constrainVertical: boolean; + /** + * How far you can vertically look around, lower limit. Range is `0` to `Math.PI` in radians. + * + * @type {number} + * @default 0 + */ + verticalMin: number; + /** + * How far you can vertically look around, upper limit. Range is `0` to `Math.PI` in radians. + * + * @type {number} + * @default 0 + */ + verticalMax: number; + /** + * Whether the mouse is pressed down or not. + * + * @type {boolean} + * @readonly + * @default false + */ + readonly mouseDragOn: boolean; + _autoSpeedFactor: number; + _pointerX: number; + _pointerY: number; + _pointerDownX: number; + _pointerDownY: number; + _pointerCount: number; + _moveForward: boolean; + _moveBackward: boolean; + _moveLeft: boolean; + _moveRight: boolean; + _lat: number; + _lon: number; + _onPointerMove: typeof onPointerMove; + _onPointerDown: typeof onPointerDown; + _onPointerUp: typeof onPointerUp; + _onContextMenu: typeof onContextMenu; + _onKeyDown: typeof onKeyDown; + _onKeyUp: typeof onKeyUp; + connect(element: any): void; + /** + * Rotates the camera towards the defined target position. + * + * @param {number|Vector3} x - The x coordinate of the target position or alternatively a vector representing the target position. + * @param {number} y - The y coordinate of the target position. + * @param {number} z - The z coordinate of the target position. + * @return {FirstPersonControls} A reference to this controls. + */ + lookAt(x: number | Vector3, y: number, z: number): FirstPersonControls; + update(delta: any): void; + _setOrientation(): void; + /** + * @deprecated, r184. This method is no longer needed. + */ + handleResize(): void; +} +import { Controls } from 'three'; +declare function onPointerMove(event: any): void; +declare class onPointerMove { + constructor(event: any); + _pointerX: number | undefined; + _pointerY: number | undefined; +} +declare function onPointerDown(event: any): void; +declare class onPointerDown { + constructor(event: any); + _moveForward: boolean | undefined; + _moveBackward: boolean | undefined; + _pointerDownX: any; + _pointerDownY: any; + _pointerX: number; + _pointerY: number; + mouseDragOn: boolean; +} +declare function onPointerUp(event: any): void; +declare class onPointerUp { + constructor(event: any); + _moveForward: boolean | undefined; + _moveBackward: boolean | undefined; + _pointerX: number; + _pointerY: number; + mouseDragOn: boolean | undefined; +} +declare function onContextMenu(event: any): void; +declare function onKeyDown(event: any): void; +declare class onKeyDown { + constructor(event: any); + _moveForward: boolean | undefined; + _moveLeft: boolean | undefined; + _moveBackward: boolean | undefined; + _moveRight: boolean | undefined; + _moveUp: boolean | undefined; + _moveDown: boolean | undefined; +} +declare function onKeyUp(event: any): void; +declare class onKeyUp { + constructor(event: any); + _moveForward: boolean | undefined; + _moveLeft: boolean | undefined; + _moveBackward: boolean | undefined; + _moveRight: boolean | undefined; + _moveUp: boolean | undefined; + _moveDown: boolean | undefined; +} +import { Vector3 } from 'three'; +export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/controls/FlyControls.d.ts b/jsdoc-testing/jsdoc/examples/jsm/controls/FlyControls.d.ts new file mode 100644 index 000000000..aa87bbefe --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/controls/FlyControls.d.ts @@ -0,0 +1,101 @@ +/** + * This class enables a navigation similar to fly modes in DCC tools like Blender. + * You can arbitrarily transform the camera in 3D space without any limitations + * (e.g. focus on a specific target). + * + * @augments Controls + * @three_import import { FlyControls } from 'three/addons/controls/FlyControls.js'; + */ +export class FlyControls extends Controls { + /** + * Constructs a new controls instance. + * + * @param {Object3D} object - The object that is managed by the controls. + * @param {?HTMLElement} domElement - The HTML element used for event listeners. + */ + constructor(object: Object3D, domElement?: HTMLElement | null); + /** + * The movement speed. + * + * @type {number} + * @default 1 + */ + movementSpeed: number; + /** + * The rotation speed. + * + * @type {number} + * @default 0.005 + */ + rollSpeed: number; + /** + * If set to `true`, you can only look around by performing a drag interaction. + * + * @type {boolean} + * @default false + */ + dragToLook: boolean; + /** + * If set to `true`, the camera automatically moves forward (and does not stop) when initially translated. + * + * @type {boolean} + * @default false + */ + autoForward: boolean; + _moveState: { + up: number; + down: number; + left: number; + right: number; + forward: number; + back: number; + pitchUp: number; + pitchDown: number; + yawLeft: number; + yawRight: number; + rollLeft: number; + rollRight: number; + }; + _moveVector: Vector3; + _rotationVector: Vector3; + _lastQuaternion: Quaternion; + _lastPosition: Vector3; + _status: number; + _onKeyDown: typeof onKeyDown; + _onKeyUp: typeof onKeyUp; + _onPointerMove: typeof onPointerMove; + _onPointerDown: typeof onPointerDown; + _onPointerUp: typeof onPointerUp; + _onPointerCancel: typeof onPointerCancel; + _onContextMenu: typeof onContextMenu; + connect(element: any): void; + update(delta: any): void; + _updateMovementVector(): void; + _updateRotationVector(): void; + _getContainerDimensions(): { + size: number[]; + offset: number[]; + }; +} +import { Controls } from 'three'; +import { Vector3 } from 'three'; +import { Quaternion } from 'three'; +declare function onKeyDown(event: any): void; +declare class onKeyDown { + constructor(event: any); + movementSpeedMultiplier: number | undefined; +} +declare function onKeyUp(event: any): void; +declare class onKeyUp { + constructor(event: any); + movementSpeedMultiplier: number | undefined; +} +declare function onPointerMove(event: any): void; +declare function onPointerDown(event: any): void; +declare function onPointerUp(event: any): void; +declare function onPointerCancel(): void; +declare class onPointerCancel { + _status: number | undefined; +} +declare function onContextMenu(event: any): void; +export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/controls/MapControls.d.ts b/jsdoc-testing/jsdoc/examples/jsm/controls/MapControls.d.ts new file mode 100644 index 000000000..f3b2f1265 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/controls/MapControls.d.ts @@ -0,0 +1,18 @@ +/** + * This class is intended for transforming a camera over a map from bird's eye perspective. + * The class shares its implementation with {@link OrbitControls} but uses a specific preset + * for mouse/touch interaction and disables screen space panning by default. + * + * - Orbit: Right mouse, or left mouse + ctrl/meta/shiftKey / touch: two-finger rotate. + * - Zoom: Middle mouse, or mousewheel / touch: two-finger spread or squish. + * - Pan: Left mouse, or arrow keys / touch: one-finger move. + * + * @augments OrbitControls + * @three_import import { MapControls } from 'three/addons/controls/MapControls.js'; + */ +export class MapControls extends OrbitControls { + constructor(object: any, domElement: any); + _panWorldStart: Vector3; +} +import { OrbitControls } from './OrbitControls.js'; +import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/controls/OrbitControls.d.ts b/jsdoc-testing/jsdoc/examples/jsm/controls/OrbitControls.d.ts new file mode 100644 index 000000000..0c5ffd8b8 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/controls/OrbitControls.d.ts @@ -0,0 +1,458 @@ +/** + * Orbit controls allow the camera to orbit around a target. + * + * OrbitControls performs orbiting, dollying (zooming), and panning. Unlike {@link TrackballControls}, + * it maintains the "up" direction `object.up` (+Y by default). + * + * - Orbit: Left mouse / touch: one-finger move. + * - Zoom: Middle mouse, or mousewheel / touch: two-finger spread or squish. + * - Pan: Right mouse, or left mouse + ctrl/meta/shiftKey, or arrow keys / touch: two-finger move. + * + * ```js + * const controls = new OrbitControls( camera, renderer.domElement ); + * + * // controls.update() must be called after any manual changes to the camera's transform + * camera.position.set( 0, 20, 100 ); + * controls.update(); + * + * function animate() { + * + * // required if controls.enableDamping or controls.autoRotate are set to true + * controls.update(); + * + * renderer.render( scene, camera ); + * + * } + * ``` + * + * @augments Controls + * @three_import import { OrbitControls } from 'three/addons/controls/OrbitControls.js'; + */ +export class OrbitControls extends Controls { + /** + * Constructs a new controls instance. + * + * @param {Object3D} object - The object that is managed by the controls. + * @param {?HTMLElement} domElement - The HTML element used for event listeners. + */ + constructor(object: Object3D, domElement?: HTMLElement | null); + /** + * The focus point of the controls, the `object` orbits around this. + * It can be updated manually at any point to change the focus of the controls. + * + * @type {Vector3} + */ + target: Vector3; + /** + * The focus point of the `minTargetRadius` and `maxTargetRadius` limits. + * It can be updated manually at any point to change the center of interest + * for the `target`. + * + * @type {Vector3} + */ + cursor: Vector3; + /** + * How far you can dolly in (perspective camera only). + * + * @type {number} + * @default 0 + */ + minDistance: number; + /** + * How far you can dolly out (perspective camera only). + * + * @type {number} + * @default Infinity + */ + maxDistance: number; + /** + * How far you can zoom in (orthographic camera only). + * + * @type {number} + * @default 0 + */ + minZoom: number; + /** + * How far you can zoom out (orthographic camera only). + * + * @type {number} + * @default Infinity + */ + maxZoom: number; + /** + * How close you can get the target to the 3D `cursor`. + * + * @type {number} + * @default 0 + */ + minTargetRadius: number; + /** + * How far you can move the target from the 3D `cursor`. + * + * @type {number} + * @default Infinity + */ + maxTargetRadius: number; + /** + * How far you can orbit vertically, lower limit. Range is `[0, Math.PI]` radians. + * + * @type {number} + * @default 0 + */ + minPolarAngle: number; + /** + * How far you can orbit vertically, upper limit. Range is `[0, Math.PI]` radians. + * + * @type {number} + * @default Math.PI + */ + maxPolarAngle: number; + /** + * How far you can orbit horizontally, lower limit. If set, the interval `[ min, max ]` + * must be a sub-interval of `[ - 2 PI, 2 PI ]`, with `( max - min < 2 PI )`. + * + * @type {number} + * @default -Infinity + */ + minAzimuthAngle: number; + /** + * How far you can orbit horizontally, upper limit. If set, the interval `[ min, max ]` + * must be a sub-interval of `[ - 2 PI, 2 PI ]`, with `( max - min < 2 PI )`. + * + * @type {number} + * @default -Infinity + */ + maxAzimuthAngle: number; + /** + * Set to `true` to enable damping (inertia), which can be used to give a sense of weight + * to the controls. Note that if this is enabled, you must call `update()` in your animation + * loop. + * + * @type {boolean} + * @default false + */ + enableDamping: boolean; + /** + * The damping inertia used if `enableDamping` is set to `true`. + * + * Note that for this to work, you must call `update()` in your animation loop. + * + * @type {number} + * @default 0.05 + */ + dampingFactor: number; + /** + * Enable or disable zooming (dollying) of the camera. + * + * @type {boolean} + * @default true + */ + enableZoom: boolean; + /** + * Speed of zooming / dollying. + * + * @type {number} + * @default 1 + */ + zoomSpeed: number; + /** + * Enable or disable horizontal and vertical rotation of the camera. + * + * Note that it is possible to disable a single axis by setting the min and max of the + * `minPolarAngle` or `minAzimuthAngle` to the same value, which will cause the vertical + * or horizontal rotation to be fixed at that value. + * + * @type {boolean} + * @default true + */ + enableRotate: boolean; + /** + * Speed of rotation. + * + * @type {number} + * @default 1 + */ + rotateSpeed: number; + /** + * How fast to rotate the camera when the keyboard is used. + * + * @type {number} + * @default 1 + */ + keyRotateSpeed: number; + /** + * Enable or disable camera panning. + * + * @type {boolean} + * @default true + */ + enablePan: boolean; + /** + * Speed of panning. + * + * @type {number} + * @default 1 + */ + panSpeed: number; + /** + * Defines how the camera's position is translated when panning. If `true`, the camera pans + * in screen space. Otherwise, the camera pans in the plane orthogonal to the camera's up + * direction. + * + * @type {boolean} + * @default true + */ + screenSpacePanning: boolean; + /** + * How fast to pan the camera when the keyboard is used in + * pixels per keypress. + * + * @type {number} + * @default 7 + */ + keyPanSpeed: number; + /** + * Setting this property to `true` allows to zoom to the cursor's position. + * + * @type {boolean} + * @default false + */ + zoomToCursor: boolean; + /** + * Set to true to automatically rotate around the target + * + * Note that if this is enabled, you must call `update()` in your animation loop. + * If you want the auto-rotate speed to be independent of the frame rate (the refresh + * rate of the display), you must pass the time `deltaTime`, in seconds, to `update()`. + * + * @type {boolean} + * @default false + */ + autoRotate: boolean; + /** + * How fast to rotate around the target if `autoRotate` is `true`. The default equates to 30 seconds + * per orbit at 60fps. + * + * Note that if `autoRotate` is enabled, you must call `update()` in your animation loop. + * + * @type {number} + * @default 2 + */ + autoRotateSpeed: number; + /** + * Used internally by `saveState()` and `reset()`. + * + * @type {Vector3} + */ + target0: Vector3; + /** + * Used internally by `saveState()` and `reset()`. + * + * @type {Vector3} + */ + position0: Vector3; + /** + * Used internally by `saveState()` and `reset()`. + * + * @type {number} + */ + zoom0: number; + _cursorStyle: string; + _domElementKeyEvents: HTMLElement | null; + _lastPosition: Vector3; + _lastQuaternion: Quaternion; + _lastTargetPosition: Vector3; + _quat: Quaternion; + _quatInverse: Quaternion; + _spherical: Spherical; + _sphericalDelta: Spherical; + _scale: number; + _panOffset: Vector3; + _rotateStart: Vector2; + _rotateEnd: Vector2; + _rotateDelta: Vector2; + _panStart: Vector2; + _panEnd: Vector2; + _panDelta: Vector2; + _dollyStart: Vector2; + _dollyEnd: Vector2; + _dollyDelta: Vector2; + _dollyDirection: Vector3; + _mouse: Vector2; + _performCursorZoom: boolean; + _pointers: any[]; + _pointerPositions: {}; + _controlActive: boolean; + _onPointerMove: typeof onPointerMove; + _onPointerDown: typeof onPointerDown; + _onPointerUp: typeof onPointerUp; + _onContextMenu: typeof onContextMenu; + _onMouseWheel: typeof onMouseWheel; + _onKeyDown: typeof onKeyDown; + _onTouchStart: typeof onTouchStart; + _onTouchMove: typeof onTouchMove; + _onMouseDown: typeof onMouseDown; + _onMouseMove: typeof onMouseMove; + _interceptControlDown: typeof interceptControlDown; + _interceptControlUp: typeof interceptControlUp; + /** + * Defines the visual representation of the cursor. + * + * @type {('auto'|'grab')} + * @default 'auto' + */ + set cursorStyle(type: string); + get cursorStyle(): string; + connect(element: any): void; + /** + * Get the current vertical rotation, in radians. + * + * @return {number} The current vertical rotation, in radians. + */ + getPolarAngle(): number; + /** + * Get the current horizontal rotation, in radians. + * + * @return {number} The current horizontal rotation, in radians. + */ + getAzimuthalAngle(): number; + /** + * Returns the distance from the camera to the target. + * + * @return {number} The distance from the camera to the target. + */ + getDistance(): number; + /** + * Adds key event listeners to the given DOM element. + * `window` is a recommended argument for using this method. + * + * @param {HTMLElement} domElement - The DOM element + */ + listenToKeyEvents(domElement: HTMLElement): void; + /** + * Removes the key event listener previously defined with `listenToKeyEvents()`. + */ + stopListenToKeyEvents(): void; + /** + * Save the current state of the controls. This can later be recovered with `reset()`. + */ + saveState(): void; + /** + * Reset the controls to their state from either the last time the `saveState()` + * was called, or the initial state. + */ + reset(): void; + /** + * Programmatically pan the camera. + * + * @param {number} deltaX - The horizontal pan amount in pixels. + * @param {number} deltaY - The vertical pan amount in pixels. + */ + pan(deltaX: number, deltaY: number): void; + /** + * Programmatically dolly in (zoom in for perspective camera). + * + * @param {number} dollyScale - The dolly scale factor. + */ + dollyIn(dollyScale: number): void; + /** + * Programmatically dolly out (zoom out for perspective camera). + * + * @param {number} dollyScale - The dolly scale factor. + */ + dollyOut(dollyScale: number): void; + /** + * Programmatically rotate the camera left (around the vertical axis). + * + * @param {number} angle - The rotation angle in radians. + */ + rotateLeft(angle: number): void; + /** + * Programmatically rotate the camera up (around the horizontal axis). + * + * @param {number} angle - The rotation angle in radians. + */ + rotateUp(angle: number): void; + update(deltaTime?: null): boolean; + _getAutoRotationAngle(deltaTime: any): number; + _getZoomScale(delta: any): number; + _rotateLeft(angle: any): void; + _rotateUp(angle: any): void; + _panLeft(distance: any, objectMatrix: any): void; + _panUp(distance: any, objectMatrix: any): void; + _pan(deltaX: any, deltaY: any): void; + _dollyOut(dollyScale: any): void; + _dollyIn(dollyScale: any): void; + _updateZoomParameters(x: any, y: any): void; + _clampDistance(dist: any): number; + _handleMouseDownRotate(event: any): void; + _handleMouseDownDolly(event: any): void; + _handleMouseDownPan(event: any): void; + _handleMouseMoveRotate(event: any): void; + _handleMouseMoveDolly(event: any): void; + _handleMouseMovePan(event: any): void; + _handleMouseWheel(event: any): void; + _handleKeyDown(event: any): void; + _handleTouchStartRotate(event: any): void; + _handleTouchStartPan(event: any): void; + _handleTouchStartDolly(event: any): void; + _handleTouchStartDollyPan(event: any): void; + _handleTouchStartDollyRotate(event: any): void; + _handleTouchMoveRotate(event: any): void; + _handleTouchMovePan(event: any): void; + _handleTouchMoveDolly(event: any): void; + _handleTouchMoveDollyPan(event: any): void; + _handleTouchMoveDollyRotate(event: any): void; + _addPointer(event: any): void; + _removePointer(event: any): void; + _isTrackingPointer(event: any): boolean; + _trackPointer(event: any): void; + _getSecondPointerPosition(event: any): any; + _customWheelEvent(event: any): { + clientX: any; + clientY: any; + deltaY: any; + }; +} +import { Controls } from 'three'; +import { Vector3 } from 'three'; +import { Quaternion } from 'three'; +import { Spherical } from 'three'; +import { Vector2 } from 'three'; +declare function onPointerMove(event: any): void; +declare function onPointerDown(event: any): void; +declare function onPointerUp(event: any): void; +declare class onPointerUp { + constructor(event: any); + state: number | undefined; +} +declare function onContextMenu(event: any): void; +declare function onMouseWheel(event: any): void; +declare function onKeyDown(event: any): void; +declare function onTouchStart(event: any): void; +declare class onTouchStart { + constructor(event: any); + state: number | undefined; +} +declare function onTouchMove(event: any): void; +declare class onTouchMove { + constructor(event: any); + state: number; +} +declare function onMouseDown(event: any): void; +declare class onMouseDown { + constructor(event: any); + state: number | undefined; +} +declare function onMouseMove(event: any): void; +declare function interceptControlDown(event: any): void; +declare class interceptControlDown { + constructor(event: any); + _controlActive: boolean | undefined; +} +declare function interceptControlUp(event: any): void; +declare class interceptControlUp { + constructor(event: any); + _controlActive: boolean | undefined; +} +export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/controls/PointerLockControls.d.ts b/jsdoc-testing/jsdoc/examples/jsm/controls/PointerLockControls.d.ts new file mode 100644 index 000000000..7cfa4f7b6 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/controls/PointerLockControls.d.ts @@ -0,0 +1,105 @@ +/** + * The implementation of this class is based on the [Pointer Lock API](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API). + * `PointerLockControls` is a perfect choice for first person 3D games. + * + * ```js + * const controls = new PointerLockControls( camera, document.body ); + * + * // add event listener to show/hide a UI (e.g. the game's menu) + * controls.addEventListener( 'lock', function () { + * + * menu.style.display = 'none'; + * + * } ); + * + * controls.addEventListener( 'unlock', function () { + * + * menu.style.display = 'block'; + * + * } ); + * ``` + * + * @augments Controls + * @three_import import { PointerLockControls } from 'three/addons/controls/PointerLockControls.js'; + */ +export class PointerLockControls extends Controls { + /** + * Constructs a new controls instance. + * + * @param {Camera} camera - The camera that is managed by the controls. + * @param {?HTMLElement} domElement - The HTML element used for event listeners. + */ + constructor(camera: Camera, domElement?: HTMLElement | null); + /** + * Whether the controls are locked or not. + * + * @type {boolean} + * @readonly + * @default false + */ + readonly isLocked: boolean; + /** + * Camera pitch, lower limit. Range is '[0, Math.PI]' in radians. + * + * @type {number} + * @default 0 + */ + minPolarAngle: number; + /** + * Camera pitch, upper limit. Range is '[0, Math.PI]' in radians. + * + * @type {number} + * @default Math.PI + */ + maxPolarAngle: number; + /** + * Multiplier for how much the pointer movement influences the camera rotation. + * + * @type {number} + * @default 1 + */ + pointerSpeed: number; + _onMouseMove: typeof onMouseMove; + _onPointerlockChange: typeof onPointerlockChange; + _onPointerlockError: typeof onPointerlockError; + connect(element: any): void; + /** + * Returns the look direction of the camera. + * + * @param {Vector3} v - The target vector that is used to store the method's result. + * @return {Vector3} The normalized direction vector. + */ + getDirection(v: Vector3): Vector3; + /** + * Moves the camera forward parallel to the xz-plane. Assumes camera.up is y-up. + * + * @param {number} distance - The signed distance. + */ + moveForward(distance: number): void; + /** + * Moves the camera sidewards parallel to the xz-plane. + * + * @param {number} distance - The signed distance. + */ + moveRight(distance: number): void; + /** + * Activates the pointer lock. + * + * @param {boolean} [unadjustedMovement=false] - Disables OS-level adjustment for mouse acceleration, and accesses raw mouse input instead. + * Setting it to true will disable mouse acceleration. + */ + lock(unadjustedMovement?: boolean): void; + /** + * Exits the pointer lock. + */ + unlock(): void; +} +import { Controls } from 'three'; +declare function onMouseMove(event: any): void; +declare function onPointerlockChange(): void; +declare class onPointerlockChange { + isLocked: boolean; +} +declare function onPointerlockError(): void; +import { Vector3 } from 'three'; +export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/controls/TrackballControls.d.ts b/jsdoc-testing/jsdoc/examples/jsm/controls/TrackballControls.d.ts new file mode 100644 index 000000000..b118d58fd --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/controls/TrackballControls.d.ts @@ -0,0 +1,213 @@ +/** + * This class is similar to {@link OrbitControls}. However, it does not maintain a constant camera + * `up` vector. That means if the camera orbits over the “north” and “south” poles, it does not flip + * to stay "right side up". + * + * @augments Controls + * @three_import import { TrackballControls } from 'three/addons/controls/TrackballControls.js'; + */ +export class TrackballControls extends Controls { + /** + * Constructs a new controls instance. + * + * @param {Object3D} object - The object that is managed by the controls. + * @param {?HTMLElement} domElement - The HTML element used for event listeners. + */ + constructor(object: Object3D, domElement?: HTMLElement | null); + /** + * Represents the properties of the screen. Automatically set when `handleResize()` is called. + * + * @type {Object} + * @readonly + */ + readonly screen: Object; + /** + * The rotation speed. + * + * @type {number} + * @default 1 + */ + rotateSpeed: number; + /** + * The zoom speed. + * + * @type {number} + * @default 1.2 + */ + zoomSpeed: number; + /** + * The pan speed. + * + * @type {number} + * @default 0.3 + */ + panSpeed: number; + /** + * Whether rotation is disabled or not. + * + * @type {boolean} + * @default false + */ + noRotate: boolean; + /** + * Whether zooming is disabled or not. + * + * @type {boolean} + * @default false + */ + noZoom: boolean; + /** + * Whether panning is disabled or not. + * + * @type {boolean} + * @default false + */ + noPan: boolean; + /** + * Whether damping is disabled or not. + * + * @type {boolean} + * @default false + */ + staticMoving: boolean; + /** + * Defines the intensity of damping. Only considered if `staticMoving` is set to `false`. + * + * @type {number} + * @default 0.2 + */ + dynamicDampingFactor: number; + /** + * How far you can dolly in (perspective camera only). + * + * @type {number} + * @default 0 + */ + minDistance: number; + /** + * How far you can dolly out (perspective camera only). + * + * @type {number} + * @default Infinity + */ + maxDistance: number; + /** + * How far you can zoom in (orthographic camera only). + * + * @type {number} + * @default 0 + */ + minZoom: number; + /** + * How far you can zoom out (orthographic camera only). + * + * @type {number} + * @default Infinity + */ + maxZoom: number; + /** + * The focus point of the controls. + * + * @type {Vector3} + */ + target: Vector3; + keyState: number; + _lastPosition: Vector3; + _lastZoom: number; + _touchZoomDistanceStart: number; + _touchZoomDistanceEnd: number; + _lastAngle: number; + _eye: Vector3; + _movePrev: Vector2; + _moveCurr: Vector2; + _lastAxis: Vector3; + _zoomStart: Vector2; + _zoomEnd: Vector2; + _panStart: Vector2; + _panEnd: Vector2; + _pointers: any[]; + _pointerPositions: {}; + _onPointerMove: typeof onPointerMove; + _onPointerDown: typeof onPointerDown; + _onPointerUp: typeof onPointerUp; + _onPointerCancel: typeof onPointerCancel; + _onContextMenu: typeof onContextMenu; + _onMouseWheel: typeof onMouseWheel; + _onKeyDown: typeof onKeyDown; + _onKeyUp: typeof onKeyUp; + _onTouchStart: typeof onTouchStart; + _onTouchMove: typeof onTouchMove; + _onTouchEnd: typeof onTouchEnd; + _onMouseDown: typeof onMouseDown; + _onMouseMove: typeof onMouseMove; + _onMouseUp: typeof onMouseUp; + _target0: Vector3; + _position0: any; + _up0: Vector3; + _zoom0: any; + connect(element: any): void; + /** + * Must be called if the application window is resized. + */ + handleResize(): void; + /** + * Resets the controls to its initial state. + */ + reset(): void; + _panCamera(): void; + _rotateCamera(): void; + _zoomCamera(): void; + _getMouseOnScreen(pageX: any, pageY: any): Vector2; + _getMouseOnCircle(pageX: any, pageY: any): Vector2; + _addPointer(event: any): void; + _removePointer(event: any): void; + _trackPointer(event: any): void; + _getSecondPointerPosition(event: any): any; + _checkDistances(): void; +} +import { Controls } from 'three'; +import { Vector3 } from 'three'; +import { Vector2 } from 'three'; +declare function onPointerMove(event: any): void; +declare function onPointerDown(event: any): void; +declare function onPointerUp(event: any): void; +declare function onPointerCancel(event: any): void; +declare function onContextMenu(event: any): void; +declare function onMouseWheel(event: any): void; +declare function onKeyDown(event: any): void; +declare class onKeyDown { + constructor(event: any); + keyState: number | undefined; +} +declare function onKeyUp(): void; +declare class onKeyUp { + keyState: number | undefined; +} +declare function onTouchStart(event: any): void; +declare class onTouchStart { + constructor(event: any); + state: number; + _touchZoomDistanceEnd: number | undefined; + _touchZoomDistanceStart: number | undefined; +} +declare function onTouchMove(event: any): void; +declare class onTouchMove { + constructor(event: any); + _touchZoomDistanceEnd: number | undefined; +} +declare function onTouchEnd(event: any): void; +declare class onTouchEnd { + constructor(event: any); + state: number | undefined; +} +declare function onMouseDown(event: any): void; +declare class onMouseDown { + constructor(event: any); + state: number; +} +declare function onMouseMove(event: any): void; +declare function onMouseUp(): void; +declare class onMouseUp { + state: number; +} +export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/controls/TransformControls.d.ts b/jsdoc-testing/jsdoc/examples/jsm/controls/TransformControls.d.ts new file mode 100644 index 000000000..fbb81cc61 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/controls/TransformControls.d.ts @@ -0,0 +1,192 @@ +/** + * This class can be used to transform objects in 3D space by adapting a similar interaction model + * of DCC tools like Blender. Unlike other controls, it is not intended to transform the scene's camera. + * + * `TransformControls` expects that its attached 3D object is part of the scene graph. + * + * @augments Controls + * @three_import import { TransformControls } from 'three/addons/controls/TransformControls.js'; + */ +export class TransformControls extends Controls { + /** + * Constructs a new controls instance. + * + * @param {Camera} camera - The camera of the rendered scene. + * @param {?HTMLElement} domElement - The HTML element used for event listeners. + */ + constructor(camera: Camera, domElement?: HTMLElement | null); + _root: TransformControlsRoot; + _gizmo: TransformControlsGizmo; + _plane: TransformControlsPlane; + /** + * The viewport rectangle, in logical (CSS) pixels with the origin at the lower-left + * of the canvas. Set this when the renderer uses a sub-canvas viewport so pointer + * coordinates map to the correct region. If `null`, the full canvas is used. + * + * @name TransformControls#viewport + * @type {?Vector4} + * @default null + */ + viewport: Vector4 | null; + _offset: Vector3; + _startNorm: Vector3; + _endNorm: Vector3; + _cameraScale: Vector3; + _parentPosition: Vector3; + _parentQuaternion: Quaternion; + _parentQuaternionInv: Quaternion; + _parentScale: Vector3; + _worldScaleStart: Vector3; + _worldQuaternionInv: Quaternion; + _worldScale: Vector3; + _positionStart: Vector3; + _quaternionStart: Quaternion; + _scaleStart: Vector3; + _getPointer: typeof getPointer; + _onPointerDown: typeof onPointerDown; + _onPointerHover: typeof onPointerHover; + _onPointerMove: typeof onPointerMove; + _onPointerUp: typeof onPointerUp; + connect(element: any): void; + /** + * Returns the visual representation of the controls. Add the helper to your scene to + * visually transform the attached 3D object. + * + * @return {TransformControlsRoot} The helper. + */ + getHelper(): TransformControlsRoot; + pointerHover(pointer: any): void; + axis: any; + pointerDown(pointer: any): void; + dragging: boolean | undefined; + pointerMove(pointer: any): void; + rotationAngle: any; + pointerUp(pointer: any): void; + /** + * Sets the 3D object that should be transformed and ensures the controls UI is visible. + * + * @param {Object3D} object - The 3D object that should be transformed. + * @return {TransformControls} A reference to this controls. + */ + attach(object: Object3D): TransformControls; + /** + * Removes the current 3D object from the controls and makes the helper UI invisible. + * + * @return {TransformControls} A reference to this controls. + */ + detach(): TransformControls; + /** + * Resets the object's position, rotation and scale to when the current transform began. + */ + reset(): void; + /** + * Returns the raycaster that is used for user interaction. This object is shared between all + * instances of `TransformControls`. + * + * @returns {Raycaster} The internal raycaster. + */ + getRaycaster(): Raycaster; + /** + * Returns the transformation mode. + * + * @returns {'translate'|'rotate'|'scale'} The transformation mode. + */ + getMode(): "translate" | "rotate" | "scale"; + /** + * Sets the given transformation mode. + * + * @param {'translate'|'rotate'|'scale'} mode - The transformation mode to set. + */ + setMode(mode: "translate" | "rotate" | "scale"): void; + mode: "rotate" | "scale" | "translate" | undefined; + /** + * Sets the translation snap. + * + * @param {?number} translationSnap - The translation snap to set. + */ + setTranslationSnap(translationSnap: number | null): void; + translationSnap: number | null | undefined; + /** + * Sets the rotation snap. + * + * @param {?number} rotationSnap - The rotation snap to set. + */ + setRotationSnap(rotationSnap: number | null): void; + rotationSnap: number | null | undefined; + /** + * Sets the scale snap. + * + * @param {?number} scaleSnap - The scale snap to set. + */ + setScaleSnap(scaleSnap: number | null): void; + scaleSnap: number | null | undefined; + /** + * Sets the size of the helper UI. + * + * @param {number} size - The size to set. + */ + setSize(size: number): void; + size: number | undefined; + /** + * Sets the coordinate space in which transformations are applied. + * + * @param {'world'|'local'} space - The space to set. + */ + setSpace(space: "world" | "local"): void; + space: "world" | "local" | undefined; + /** + * Sets the colors of the control's gizmo. + * + * @param {number|Color|string} xAxis - The x-axis color. + * @param {number|Color|string} yAxis - The y-axis color. + * @param {number|Color|string} zAxis - The z-axis color. + * @param {number|Color|string} active - The color for active elements. + */ + setColors(xAxis: number | Color | string, yAxis: number | Color | string, zAxis: number | Color | string, active: number | Color | string): void; +} +export class TransformControlsGizmo extends Object3D { + isTransformControlsGizmo: boolean; + type: string; + materialLib: { + xAxis: import("three").Material; + yAxis: import("three").Material; + zAxis: import("three").Material; + active: import("three").Material; + xAxisTransparent: import("three").Material; + yAxisTransparent: import("three").Material; + zAxisTransparent: import("three").Material; + activeTransparent: import("three").Material; + }; + gizmo: {}; + picker: {}; + helper: {}; + updateMatrixWorld(force: any): void; +} +export class TransformControlsPlane extends Mesh { + constructor(); + isTransformControlsPlane: boolean; + updateMatrixWorld(force: any): void; +} +import { Controls } from 'three'; +declare class TransformControlsRoot extends Object3D { + constructor(controls: any); + isTransformControlsRoot: boolean; + controls: any; + updateMatrixWorld(force: any): void; + dispose(): void; +} +import { Vector3 } from 'three'; +import { Quaternion } from 'three'; +declare function getPointer(event: any): { + x: number; + y: number; + button: any; +}; +declare function onPointerDown(event: any): void; +declare function onPointerHover(event: any): void; +declare function onPointerMove(event: any): void; +declare function onPointerUp(event: any): void; +import { Object3D } from 'three'; +import { Raycaster } from 'three'; +import { Mesh } from 'three'; +export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/csm/CSM.d.ts b/jsdoc-testing/jsdoc/examples/jsm/csm/CSM.d.ts new file mode 100644 index 000000000..ed5c7f8ee --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/csm/CSM.d.ts @@ -0,0 +1,214 @@ +/** + * An implementation of Cascade Shadow Maps (CSM). + * + * This module can only be used with {@link WebGLRenderer}. When using {@link WebGPURenderer}, + * use {@link CSMShadowNode} instead. + * + * @three_import import { CSM } from 'three/addons/csm/CSM.js'; + */ +export class CSM { + /** + * Constructs a new CSM instance. + * + * @param {CSM~Data} data - The CSM data. + */ + constructor(data: any); + /** + * The scene's camera. + * + * @type {Camera} + */ + camera: Camera; + /** + * The parent object, usually the scene. + * + * @type {Object3D} + */ + parent: Object3D; + /** + * The number of cascades. + * + * @type {number} + * @default 3 + */ + cascades: number; + /** + * The maximum far value. + * + * @type {number} + * @default 100000 + */ + maxFar: number; + /** + * The frustum split mode. + * + * @type {('practical'|'uniform'|'logarithmic'|'custom')} + * @default 'practical' + */ + mode: ("practical" | "uniform" | "logarithmic" | "custom"); + /** + * The shadow map size. + * + * @type {number} + * @default 2048 + */ + shadowMapSize: number; + /** + * The shadow bias. + * + * @type {number} + * @default 0.000001 + */ + shadowBias: number; + /** + * The light direction. + * + * @type {Vector3} + */ + lightDirection: Vector3; + /** + * The light intensity. + * + * @type {number} + * @default 3 + */ + lightIntensity: number; + /** + * The light near value. + * + * @type {number} + * @default 1 + */ + lightNear: number; + /** + * The light far value. + * + * @type {number} + * @default 2000 + */ + lightFar: number; + /** + * The light margin. + * + * @type {number} + * @default 200 + */ + lightMargin: number; + /** + * Custom split callback when using `mode='custom'`. + * + * @type {Function} + */ + customSplitsCallback: Function; + /** + * Whether to fade between cascades or not. + * + * @type {boolean} + * @default false + */ + fade: boolean; + /** + * The main frustum. + * + * @type {CSMFrustum} + */ + mainFrustum: CSMFrustum; + /** + * An array of frustums representing the cascades. + * + * @type {Array} + */ + frustums: Array; + /** + * An array of numbers in the range `[0,1]` the defines how the + * mainCSM frustum should be split up. + * + * @type {Array} + */ + breaks: Array; + /** + * An array of directional lights which cast the shadows for + * the different cascades. There is one directional light for each + * cascade. + * + * @type {Array} + */ + lights: Array; + /** + * A Map holding enhanced material shaders. + * + * @type {Map} + */ + shaders: Map; + /** + * Creates the directional lights of this CSM instance. + * + * @private + */ + private _createLights; + /** + * Inits the cascades according to the scene's camera and breaks configuration. + * + * @private + */ + private _initCascades; + /** + * Updates the shadow bounds of this CSM instance. + * + * @private + */ + private _updateShadowBounds; + /** + * Computes the breaks of this CSM instance based on the scene's camera, number of cascades + * and the selected split mode. + * + * @private + */ + private _getBreaks; + /** + * Updates the CSM. This method must be called in your animation loop before + * calling `renderer.render()`. + */ + update(): void; + /** + * Injects the CSM shader enhancements into the built-in materials. + * + * @private + */ + private _injectInclude; + /** + * Applications must call this method for all materials that should be affected by CSM. + * + * @param {Material} material - The material to setup for CSM support. + */ + setupMaterial(material: Material): void; + /** + * Updates the CSM uniforms. + * + * @private + */ + private _updateUniforms; + /** + * Computes the extended breaks for the CSM uniforms. + * + * @private + * @param {Array} target - The target array that holds the extended breaks. + */ + private _getExtendedBreaks; + /** + * Applications must call this method every time they change camera or CSM settings. + */ + updateFrustums(): void; + /** + * Applications must call this method when they remove the CSM usage from their scene. + */ + remove(): void; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { Vector3 } from 'three'; +import { CSMFrustum } from './CSMFrustum.js'; +import { DirectionalLight } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/csm/CSMFrustum.d.ts b/jsdoc-testing/jsdoc/examples/jsm/csm/CSMFrustum.d.ts new file mode 100644 index 000000000..d3c23f934 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/csm/CSMFrustum.d.ts @@ -0,0 +1,81 @@ +/** + * ~Data + */ +export type CSMFrustum = { + /** + * - Whether this CSM frustum is used with WebGL or WebGPU. + */ + webGL?: boolean | undefined; + /** + * - Whether reversed depth buffer is enabled. + */ + reversedDepth?: boolean | undefined; + /** + * - A projection matrix usually of the scene's camera. + */ + projectionMatrix?: Matrix4 | undefined; + /** + * - The maximum far value. + */ + maxFar?: number | undefined; +}; +import { Matrix4 } from 'three'; +/** + * Represents the frustum of a CSM instance. + * + * @three_import import { CSMFrustum } from 'three/addons/csm/CSMFrustum.js'; + */ +export class CSMFrustum { + /** + * Constructs a new CSM frustum. + * + * @param {CSMFrustum~Data} [data] - The CSM data. + */ + constructor(data: any); + /** + * The zNear value. This value depends on whether the CSM + * is used with WebGL or WebGPU. Both API use different + * conventions for their projection matrices. + * + * @type {number} + */ + zNear: number; + /** + * The zFar value. + * + * @type {number} + */ + zFar: number; + /** + * An object representing the vertices of the near and + * far plane in view space. + * + * @type {Object} + */ + vertices: Object; + /** + * Setups this CSM frustum from the given projection matrix and max far value. + * + * @param {Matrix4} projectionMatrix - The projection matrix, usually of the scene's camera. + * @param {number} maxFar - The maximum far value. + * @returns {Object} An object representing the vertices of the near and far plane in view space. + */ + setFromProjectionMatrix(projectionMatrix: Matrix4, maxFar: number): Object; + /** + * Splits the CSM frustum by the given array. The new CSM frustum are pushed into the given + * target array. + * + * @param {Array} breaks - An array of numbers in the range `[0,1]` the defines how the + * CSM frustum should be split up. + * @param {Array} target - The target array that holds the new CSM frustums. + */ + split(breaks: Array, target: Array): void; + /** + * Transforms the given target CSM frustum into the different coordinate system defined by the + * given camera matrix. + * + * @param {Matrix4} cameraMatrix - The matrix that defines the new coordinate system. + * @param {CSMFrustum} target - The CSM to convert. + */ + toSpace(cameraMatrix: Matrix4, target: CSMFrustum): void; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/csm/CSMHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/csm/CSMHelper.d.ts new file mode 100644 index 000000000..b225bc4b2 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/csm/CSMHelper.d.ts @@ -0,0 +1,60 @@ +/** + * A helper for visualizing the cascades of a CSM instance. + * + * @augments Group + * @three_import import { CSMHelper } from 'three/addons/csm/CSMHelper.js'; + */ +export class CSMHelper extends Group { + /** + * Constructs a new CSM helper. + * + * @param {CSM|CSMShadowNode} csm - The CSM instance to visualize. + */ + constructor(csm: CSM | CSMShadowNode); + /** + * The CSM instance to visualize. + * + * @type {CSM|CSMShadowNode} + */ + csm: CSM | CSMShadowNode; + /** + * Whether to display the CSM frustum or not. + * + * @type {boolean} + * @default true + */ + displayFrustum: boolean; + /** + * Whether to display the cascade planes or not. + * + * @type {boolean} + * @default true + */ + displayPlanes: boolean; + /** + * Whether to display the shadow bounds or not. + * + * @type {boolean} + * @default true + */ + displayShadowBounds: boolean; + frustumLines: LineSegments; + cascadeLines: any[]; + cascadePlanes: any[]; + shadowLines: any[]; + /** + * This method must be called if one of the `display*` properties is changed at runtime. + */ + updateVisibility(): void; + /** + * Updates the helper. This method should be called in the app's animation loop. + */ + update(): void; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { Group } from 'three'; +import { LineSegments } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/csm/CSMShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/csm/CSMShader.d.ts new file mode 100644 index 000000000..8bcc7f719 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/csm/CSMShader.d.ts @@ -0,0 +1,11 @@ +/** + * @module CSMShader + * @three_import import { CSMShader } from 'three/addons/csm/CSMShader.js'; + */ +/** + * The object that holds the GLSL enhancements to enable CSM. This + * code is injected into the built-in material shaders by {@link CSM}. + * + * @type {Object} + */ +export const CSMShader: Object; diff --git a/jsdoc-testing/jsdoc/examples/jsm/csm/CSMShadowNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/csm/CSMShadowNode.d.ts new file mode 100644 index 000000000..3a66b24b5 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/csm/CSMShadowNode.d.ts @@ -0,0 +1,175 @@ +/** + * ~Data + */ +export type CSMShadowNode = { + /** + * - The number of cascades. + */ + cascades?: number | undefined; + /** + * - The maximum far value. + */ + maxFar?: number | undefined; + /** + * - The frustum split mode. + */ + mode?: "uniform" | "custom" | "practical" | "logarithmic" | undefined; + /** + * - Custom split callback when using `mode='custom'`. + */ + customSplitsCallback?: Function | undefined; + /** + * - The light margin. + */ + lightMargin?: number | undefined; +}; +/** + * An implementation of Cascade Shadow Maps (CSM). + * + * This module can only be used with {@link WebGPURenderer}. When using {@link WebGLRenderer}, + * use {@link CSM} instead. + * + * @augments ShadowBaseNode + * @three_import import { CSMShadowNode } from 'three/addons/csm/CSMShadowNode.js'; + */ +export class CSMShadowNode extends ShadowBaseNode { + /** + * Constructs a new CSM shadow node. + * + * @param {DirectionalLight} light - The CSM light. + * @param {CSMShadowNode~Data} [data={}] - The CSM data. + */ + constructor(light: DirectionalLight, data?: {}); + /** + * The scene's camera. + * + * @type {?Camera} + * @default null + */ + camera: Camera | null; + /** + * The number of cascades. + * + * @type {number} + * @default 3 + */ + cascades: number; + /** + * The maximum far value. + * + * @type {number} + * @default 100000 + */ + maxFar: number; + /** + * The frustum split mode. + * + * @type {('practical'|'uniform'|'logarithmic'|'custom')} + * @default 'practical' + */ + mode: ("practical" | "uniform" | "logarithmic" | "custom"); + /** + * The light margin. + * + * @type {number} + * @default 200 + */ + lightMargin: number; + /** + * Custom split callback when using `mode='custom'`. + * + * @type {Function} + */ + customSplitsCallback: Function; + /** + * Whether to fade between cascades or not. + * + * @type {boolean} + * @default false + */ + fade: boolean; + /** + * An array of numbers in the range `[0,1]` the defines how the + * mainCSM frustum should be split up. + * + * @type {Array} + */ + breaks: Array; + _cascades: any[]; + /** + * The main frustum. + * + * @type {?CSMFrustum} + * @default null + */ + mainFrustum: CSMFrustum | null; + /** + * An array of frustums representing the cascades. + * + * @type {Array} + */ + frustums: Array; + /** + * An array of directional lights which cast the shadows for + * the different cascades. There is one directional light for each + * cascade. + * + * @type {Array} + */ + lights: Array; + _shadowNodes: any[]; + /** + * Inits the CSM shadow node. + * + * @private + * @param {NodeBuilder} builder - The node builder. + */ + private _init; + /** + * Inits the cascades according to the scene's camera and breaks configuration. + * + * @private + */ + private _initCascades; + /** + * Computes the breaks of this CSM instance based on the scene's camera, number of cascades + * and the selected split mode. + * + * @private + */ + private _getBreaks; + /** + * Sets the light breaks. + * + * @private + */ + private _setLightBreaks; + /** + * Updates the shadow bounds of this CSM instance. + * + * @private + */ + private _updateShadowBounds; + /** + * Applications must call this method every time they change camera or CSM settings. + */ + updateFrustums(): void; + /** + * Setups the TSL when using fading. + * + * @private + * @return {ShaderCallNodeInternal} + */ + private _setupFade; + /** + * Setups the TSL when no fading (default). + * + * @private + * @return {ShaderCallNodeInternal} + */ + private _setupStandard; + setup(builder: any): any; + updateBefore(): void; +} +import { ShadowBaseNode } from 'three/webgpu'; +import { CSMFrustum } from './CSMFrustum.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/curves/CurveExtras.d.ts b/jsdoc-testing/jsdoc/examples/jsm/curves/CurveExtras.d.ts new file mode 100644 index 000000000..98cb8b3f6 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/curves/CurveExtras.d.ts @@ -0,0 +1,378 @@ +/** + * A bunch of parametric curves + * + * Formulas collected from various sources + * http://mathworld.wolfram.com/HeartCurve.html + * http://en.wikipedia.org/wiki/Viviani%27s_curve + * http://www.mi.sanu.ac.rs/vismath/taylorapril2011/Taylor.pdf + * https://prideout.net/blog/old/blog/index.html@p=44.html + */ +/** + * A Granny Knot curve. + * + * @augments Curve + * @three_import import { GrannyKnot } from 'three/addons/curves/CurveExtras.js'; + */ +export class GrannyKnot extends Curve { + /** + * This method returns a vector in 3D space for the given interpolation factor. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector3} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector3): Vector3; +} +/** + * A heart curve. + * + * @augments Curve + * @three_import import { HeartCurve } from 'three/addons/curves/CurveExtras.js'; + */ +export class HeartCurve extends Curve { + /** + * Constructs a new heart curve. + * + * @param {number} [scale=5] - The curve's scale. + */ + constructor(scale?: number); + /** + * The curve's scale. + * + * @type {number} + * @default 5 + */ + scale: number; + /** + * This method returns a vector in 3D space for the given interpolation factor. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector3} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector3): Vector3; +} +/** + * A Viviani curve. + * + * @augments Curve + * @three_import import { VivianiCurve } from 'three/addons/curves/CurveExtras.js'; + */ +export class VivianiCurve extends Curve { + /** + * Constructs a new Viviani curve. + * + * @param {number} [scale=70] - The curve's scale. + */ + constructor(scale?: number); + /** + * The curve's scale. + * + * @type {number} + * @default 70 + */ + scale: number; + /** + * This method returns a vector in 3D space for the given interpolation factor. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector3} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector3): Vector3; +} +/** + * A knot curve. + * + * @augments Curve + * @three_import import { KnotCurve } from 'three/addons/curves/CurveExtras.js'; + */ +export class KnotCurve extends Curve { + /** + * This method returns a vector in 3D space for the given interpolation factor. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector3} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector3): Vector3; +} +/** + * A helix curve. + * + * @augments Curve + * @three_import import { HelixCurve } from 'three/addons/curves/CurveExtras.js'; + */ +export class HelixCurve extends Curve { + /** + * This method returns a vector in 3D space for the given interpolation factor. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector3} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector3): Vector3; +} +/** + * A Trefoil Knot. + * + * @augments Curve + * @three_import import { TrefoilKnot } from 'three/addons/curves/CurveExtras.js'; + */ +export class TrefoilKnot extends Curve { + /** + * Constructs a new Trefoil Knot. + * + * @param {number} [scale=10] - The curve's scale. + */ + constructor(scale?: number); + /** + * The curve's scale. + * + * @type {number} + * @default 10 + */ + scale: number; + /** + * This method returns a vector in 3D space for the given interpolation factor. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector3} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector3): Vector3; +} +/** + * A torus knot. + * + * @augments Curve + * @three_import import { TorusKnot } from 'three/addons/curves/CurveExtras.js'; + */ +export class TorusKnot extends Curve { + /** + * Constructs a new torus knot. + * + * @param {number} [scale=10] - The curve's scale. + */ + constructor(scale?: number); + /** + * The curve's scale. + * + * @type {number} + * @default 10 + */ + scale: number; + /** + * This method returns a vector in 3D space for the given interpolation factor. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector3} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector3): Vector3; +} +/** + * A Cinquefoil Knot. + * + * @augments Curve + * @three_import import { CinquefoilKnot } from 'three/addons/curves/CurveExtras.js'; + */ +export class CinquefoilKnot extends Curve { + /** + * Constructs a new Cinquefoil Knot. + * + * @param {number} [scale=10] - The curve's scale. + */ + constructor(scale?: number); + /** + * The curve's scale. + * + * @type {number} + * @default 10 + */ + scale: number; + /** + * This method returns a vector in 3D space for the given interpolation factor. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector3} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector3): Vector3; +} +/** + * A Trefoil Polynomial Knot. + * + * @augments Curve + * @three_import import { TrefoilPolynomialKnot } from 'three/addons/curves/CurveExtras.js'; + */ +export class TrefoilPolynomialKnot extends Curve { + /** + * Constructs a new Trefoil Polynomial Knot. + * + * @param {number} [scale=10] - The curve's scale. + */ + constructor(scale?: number); + /** + * The curve's scale. + * + * @type {number} + * @default 10 + */ + scale: number; + /** + * This method returns a vector in 3D space for the given interpolation factor. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector3} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector3): Vector3; +} +/** + * A Figure Eight Polynomial Knot. + * + * @augments Curve + * @three_import import { FigureEightPolynomialKnot } from 'three/addons/curves/CurveExtras.js'; + */ +export class FigureEightPolynomialKnot extends Curve { + /** + * Constructs a new Figure Eight Polynomial Knot. + * + * @param {number} [scale=1] - The curve's scale. + */ + constructor(scale?: number); + /** + * The curve's scale. + * + * @type {number} + * @default 1 + */ + scale: number; + /** + * This method returns a vector in 3D space for the given interpolation factor. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector3} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector3): Vector3; +} +/** + * A Decorated Torus Knot 4a. + * + * @augments Curve + * @three_import import { DecoratedTorusKnot4a } from 'three/addons/curves/CurveExtras.js'; + */ +export class DecoratedTorusKnot4a extends Curve { + /** + * Constructs a new Decorated Torus Knot 4a. + * + * @param {number} [scale=1] - The curve's scale. + */ + constructor(scale?: number); + /** + * The curve's scale. + * + * @type {number} + * @default 40 + */ + scale: number; + /** + * This method returns a vector in 3D space for the given interpolation factor. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector3} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector3): Vector3; +} +/** + * A Decorated Torus Knot 4b. + * + * @augments Curve + * @three_import import { DecoratedTorusKnot4b } from 'three/addons/curves/CurveExtras.js'; + */ +export class DecoratedTorusKnot4b extends Curve { + /** + * Constructs a new Decorated Torus Knot 4b. + * + * @param {number} [scale=1] - The curve's scale. + */ + constructor(scale?: number); + /** + * The curve's scale. + * + * @type {number} + * @default 40 + */ + scale: number; + /** + * This method returns a vector in 3D space for the given interpolation factor. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector3} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector3): Vector3; +} +/** + * A Decorated Torus Knot 5a. + * + * @augments Curve + * @three_import import { DecoratedTorusKnot5a } from 'three/addons/curves/CurveExtras.js'; + */ +export class DecoratedTorusKnot5a extends Curve { + /** + * Constructs a new Decorated Torus Knot 5a. + * + * @param {number} [scale=1] - The curve's scale. + */ + constructor(scale?: number); + /** + * The curve's scale. + * + * @type {number} + * @default 40 + */ + scale: number; + /** + * This method returns a vector in 3D space for the given interpolation factor. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector3} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector3): Vector3; +} +/** + * A Decorated Torus Knot 5c. + * + * @augments Curve + * @three_import import { DecoratedTorusKnot5c } from 'three/addons/curves/CurveExtras.js'; + */ +export class DecoratedTorusKnot5c extends Curve { + /** + * Constructs a new Decorated Torus Knot 5c. + * + * @param {number} [scale=1] - The curve's scale. + */ + constructor(scale?: number); + /** + * The curve's scale. + * + * @type {number} + * @default 40 + */ + scale: number; + /** + * This method returns a vector in 3D space for the given interpolation factor. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector3} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector3): Vector3; +} +import { Curve } from 'three'; +import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSCurve.d.ts b/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSCurve.d.ts new file mode 100644 index 000000000..3a2af704a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSCurve.d.ts @@ -0,0 +1,70 @@ +/** + * This class represents a NURBS curve. + * + * Implementation is based on `(x, y [, z=0 [, w=1]])` control points with `w=weight`. + * + * @augments Curve + * @three_import import { NURBSCurve } from 'three/addons/curves/NURBSCurve.js'; + */ +export class NURBSCurve extends Curve { + /** + * Constructs a new NURBS curve. + * + * @param {number} degree - The NURBS degree. + * @param {Array} knots - The knots as a flat array of numbers. + * @param {Array} controlPoints - An array holding control points. + * @param {number} [startKnot] - Index of the start knot into the `knots` array. + * @param {number} [endKnot] - Index of the end knot into the `knots` array. + */ + constructor(degree: number, knots: Array, controlPoints: Array, startKnot?: number, endKnot?: number); + /** + * The NURBS degree. + * + * @type {number} + */ + degree: number; + /** + * The knots as a flat array of numbers. + * + * @type {Array} + */ + knots: Array; + /** + * An array of control points. + * + * @type {Array} + */ + controlPoints: Array; + /** + * Index of the start knot into the `knots` array. + * + * @type {number} + */ + startKnot: number; + /** + * Index of the end knot into the `knots` array. + * + * @type {number} + */ + endKnot: number; + /** + * This method returns a vector in 3D space for the given interpolation factor. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector3} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector3): Vector3; + /** + * Returns a unit vector tangent for the given interpolation factor. + * + * @param {number} t - The interpolation factor. + * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector3} The tangent vector. + */ + getTangent(t: number, optionalTarget?: Vector3): Vector3; + fromJSON(json: any): this; +} +import { Curve } from 'three'; +import { Vector4 } from 'three'; +import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSSurface.d.ts b/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSSurface.d.ts new file mode 100644 index 000000000..f55a5954a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSSurface.d.ts @@ -0,0 +1,58 @@ +/** + * This class represents a NURBS surface. + * + * Implementation is based on `(x, y [, z=0 [, w=1]])` control points with `w=weight`. + * + * @three_import import { NURBSSurface } from 'three/addons/curves/NURBSSurface.js'; + */ +export class NURBSSurface { + /** + * Constructs a new NURBS surface. + * + * @param {number} degree1 - The first NURBS degree. + * @param {number} degree2 - The second NURBS degree. + * @param {Array} knots1 - The first knots as a flat array of numbers. + * @param {Array} knots2 - The second knots as a flat array of numbers. + * @param {Array>} controlPoints - An array^2 holding control points. + */ + constructor(degree1: number, degree2: number, knots1: Array, knots2: Array, controlPoints: Array>); + /** + * The first NURBS degree. + * + * @type {number} + */ + degree1: number; + /** + * The second NURBS degree. + * + * @type {number} + */ + degree2: number; + /** + * The first knots as a flat array of numbers. + * + * @type {Array} + */ + knots1: Array; + /** + * The second knots as a flat array of numbers. + * + * @type {Array} + */ + knots2: Array; + /** + * An array holding arrays of control points. + * + * @type {Array>} + */ + controlPoints: Array>; + /** + * This method returns a vector in 3D space for the given interpolation factor. This vector lies on the NURBS surface. + * + * @param {number} t1 - The first interpolation factor representing the `u` position on the surface. Must be in the range `[0,1]`. + * @param {number} t2 - The second interpolation factor representing the `v` position on the surface. Must be in the range `[0,1]`. + * @param {Vector3} target - The target vector the result is written to. + */ + getPoint(t1: number, t2: number, target: Vector3): void; +} +import { Vector4 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSUtils.d.ts new file mode 100644 index 000000000..94b6a50e5 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSUtils.d.ts @@ -0,0 +1,112 @@ +/** + * @module NURBSUtils + * @three_import import * as NURBSUtils from 'three/addons/curves/NURBSUtils.js'; + */ +/** + * Finds knot vector span. + * + * @param {number} p - The degree. + * @param {number} u - The parametric value. + * @param {Array} U - The knot vector. + * @return {number} The span. + */ +export function findSpan(p: number, u: number, U: Array): number; +/** + * Calculates basis functions. See The NURBS Book, page 70, algorithm A2.2. + * + * @param {number} span - The span in which `u` lies. + * @param {number} u - The parametric value. + * @param {number} p - The degree. + * @param {Array} U - The knot vector. + * @return {Array} Array[p+1] with basis functions values. + */ +export function calcBasisFunctions(span: number, u: number, p: number, U: Array): Array; +/** + * Calculates B-Spline curve points. See The NURBS Book, page 82, algorithm A3.1. + * + * @param {number} p - The degree of the B-Spline. + * @param {Array} U - The knot vector. + * @param {Array} P - The control points + * @param {number} u - The parametric point. + * @return {Vector4} The point for given `u`. + */ +export function calcBSplinePoint(p: number, U: Array, P: Array, u: number): Vector4; +/** + * Calculates basis functions derivatives. See The NURBS Book, page 72, algorithm A2.3. + * + * @param {number} span - The span in which `u` lies. + * @param {number} u - The parametric point. + * @param {number} p - The degree. + * @param {number} n - number of derivatives to calculate + * @param {Array} U - The knot vector. + * @return {Array>} An array[n+1][p+1] with basis functions derivatives. + */ +export function calcBasisFunctionDerivatives(span: number, u: number, p: number, n: number, U: Array): Array>; +/** + * Calculates derivatives of a B-Spline. See The NURBS Book, page 93, algorithm A3.2. + * + * @param {number} p - The degree. + * @param {Array} U - The knot vector. + * @param {Array} P - The control points + * @param {number} u - The parametric point. + * @param {number} nd - The number of derivatives. + * @return {Array} An array[d+1] with derivatives. + */ +export function calcBSplineDerivatives(p: number, U: Array, P: Array, u: number, nd: number): Array; +/** + * Calculates "K over I". + * + * @param {number} k - The K value. + * @param {number} i - The I value. + * @return {number} k!/(i!(k-i)!) + */ +export function calcKoverI(k: number, i: number): number; +/** + * Calculates derivatives (0-nd) of rational curve. See The NURBS Book, page 127, algorithm A4.2. + * + * @param {Array} Pders - Array with derivatives. + * @return {Array} An array with derivatives for rational curve. + */ +export function calcRationalCurveDerivatives(Pders: Array): Array; +/** + * Calculates NURBS curve derivatives. See The NURBS Book, page 127, algorithm A4.2. + * + * @param {number} p - The degree. + * @param {Array} U - The knot vector. + * @param {Array} P - The control points in homogeneous space. + * @param {number} u - The parametric point. + * @param {number} nd - The number of derivatives. + * @return {Array} array with derivatives for rational curve. + */ +export function calcNURBSDerivatives(p: number, U: Array, P: Array, u: number, nd: number): Array; +/** + * Calculates a rational B-Spline surface point. See The NURBS Book, page 134, algorithm A4.3. + * + * @param {number} p - The first degree of B-Spline surface. + * @param {number} q - The second degree of B-Spline surface. + * @param {Array} U - The first knot vector. + * @param {Array} V - The second knot vector. + * @param {Array>} P - The control points in homogeneous space. + * @param {number} u - The first parametric point. + * @param {number} v - The second parametric point. + * @param {Vector3} target - The target vector. + */ +export function calcSurfacePoint(p: number, q: number, U: Array, V: Array, P: Array>, u: number, v: number, target: Vector3): void; +/** + * Calculates a rational B-Spline volume point. See The NURBS Book, page 134, algorithm A4.3. + * + * @param {number} p - The first degree of B-Spline surface. + * @param {number} q - The second degree of B-Spline surface. + * @param {number} r - The third degree of B-Spline surface. + * @param {Array} U - The first knot vector. + * @param {Array} V - The second knot vector. + * @param {Array} W - The third knot vector. + * @param {Array>>} P - The control points in homogeneous space. + * @param {number} u - The first parametric point. + * @param {number} v - The second parametric point. + * @param {number} w - The third parametric point. + * @param {Vector3} target - The target vector. + */ +export function calcVolumePoint(p: number, q: number, r: number, U: Array, V: Array, W: Array, P: Array>>, u: number, v: number, w: number, target: Vector3): void; +import { Vector4 } from 'three'; +import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSVolume.d.ts b/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSVolume.d.ts new file mode 100644 index 000000000..a0ca96016 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSVolume.d.ts @@ -0,0 +1,38 @@ +/** + * This class represents a NURBS volume. + * + * Implementation is based on `(x, y [, z=0 [, w=1]])` control points with `w=weight`. + * + * @three_import import { NURBSVolume } from 'three/addons/curves/NURBSVolume.js'; + */ +export class NURBSVolume { + /** + * Constructs a new NURBS surface. + * + * @param {number} degree1 - The first NURBS degree. + * @param {number} degree2 - The second NURBS degree. + * @param {number} degree3 - The third NURBS degree. + * @param {Array} knots1 - The first knots as a flat array of numbers. + * @param {Array} knots2 - The second knots as a flat array of numbers. + * @param {Array} knots3 - The third knots as a flat array of numbers. + * @param {Array>>} controlPoints - An array^3 holding control points. + */ + constructor(degree1: number, degree2: number, degree3: number, knots1: Array, knots2: Array, knots3: Array, controlPoints: Array>>); + degree1: number; + degree2: number; + degree3: number; + knots1: number[]; + knots2: number[]; + knots3: number[]; + controlPoints: never[][]; + /** + * This method returns a vector in 3D space for the given interpolation factor. This vector lies within the NURBS volume. + * + * @param {number} t1 - The first interpolation factor representing the `u` position within the volume. Must be in the range `[0,1]`. + * @param {number} t2 - The second interpolation factor representing the `v` position within the volume. Must be in the range `[0,1]`. + * @param {number} t3 - The third interpolation factor representing the `w` position within the volume. Must be in the range `[0,1]`. + * @param {Vector3} target - The target vector the result is written to. + */ + getPoint(t1: number, t2: number, t3: number, target: Vector3): void; +} +import { Vector4 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/effects/AnaglyphEffect.d.ts b/jsdoc-testing/jsdoc/examples/jsm/effects/AnaglyphEffect.d.ts new file mode 100644 index 000000000..5b7946284 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/effects/AnaglyphEffect.d.ts @@ -0,0 +1,68 @@ +/** + * A class that creates an anaglyph effect using physically-correct + * off-axis stereo projection. + * + * This implementation uses CameraUtils.frameCorners() to align stereo + * camera frustums to a virtual screen plane, providing accurate depth + * perception with zero parallax at the plane distance. + * + * Note that this class can only be used with {@link WebGLRenderer}. + * When using {@link WebGPURenderer}, use {@link AnaglyphPassNode}. + * + * @three_import import { AnaglyphEffect } from 'three/addons/effects/AnaglyphEffect.js'; + */ +export class AnaglyphEffect { + /** + * Constructs a new anaglyph effect. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {number} width - The width of the effect in physical pixels. + * @param {number} height - The height of the effect in physical pixels. + */ + constructor(renderer: WebGLRenderer, width?: number, height?: number); + colorMatrixLeft: Matrix3; + colorMatrixRight: Matrix3; + /** + * The interpupillary distance (eye separation) in world units. + * Typical human IPD is 0.064 meters (64mm). + * + * @type {number} + * @default 0.064 + */ + eyeSep: number; + /** + * The distance in world units from the viewer to the virtual + * screen plane where zero parallax (screen depth) occurs. + * Objects at this distance appear at the screen surface. + * Objects closer appear in front of the screen (negative parallax). + * Objects further appear behind the screen (positive parallax). + * + * The screen dimensions are derived from the camera's FOV and aspect ratio + * at this distance, ensuring the stereo view matches the camera's field of view. + * + * @type {number} + * @default 0.5 + */ + planeDistance: number; + /** + * Resizes the effect. + * + * @param {number} width - The width of the effect in logical pixels. + * @param {number} height - The height of the effect in logical pixels. + */ + setSize: (width: number, height: number) => void; + /** + * When using this effect, this method should be called instead of the + * default {@link WebGLRenderer#render}. + * + * @param {Object3D} scene - The scene to render. + * @param {Camera} camera - The camera. + */ + render: (scene: Object3D, camera: Camera) => void; + /** + * Frees internal resources. This method should be called + * when the effect is no longer required. + */ + dispose: () => void; +} +import { Matrix3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/effects/AsciiEffect.d.ts b/jsdoc-testing/jsdoc/examples/jsm/effects/AsciiEffect.d.ts new file mode 100644 index 000000000..2da2a39de --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/effects/AsciiEffect.d.ts @@ -0,0 +1,72 @@ +/** + * ~Options + */ +export type AsciiEffect = { + /** + * - A higher value leads to more details. + */ + resolution?: number | undefined; + /** + * - The scale of the effect. + */ + scale?: number | undefined; + /** + * - Whether colors should be enabled or not. Better quality but slows down rendering. + */ + color?: boolean | undefined; + /** + * - Whether transparency should be enabled or not. + */ + alpha?: boolean | undefined; + /** + * - Whether blocked characters should be enabled or not. + */ + block?: boolean | undefined; + /** + * - Whether colors should be inverted or not. + */ + invert?: boolean | undefined; + /** + * - The string resolution. + */ + strResolution?: "high" | "low" | "medium" | undefined; +}; +/** + * A class that creates an ASCII effect. + * + * The ASCII generation is based on [jsascii](https://github.com/hassadee/jsascii/blob/master/jsascii.js). + * + * @three_import import { AsciiEffect } from 'three/addons/effects/AsciiEffect.js'; + */ +export class AsciiEffect { + /** + * Constructs a new ASCII effect. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {string} [charSet=' .:-=+*#%@'] - The char set. + * @param {AsciiEffect~Options} [options] - The configuration parameter. + */ + constructor(renderer: WebGLRenderer, charSet?: string, options?: {}); + /** + * Resizes the effect. + * + * @param {number} w - The width of the effect in logical pixels. + * @param {number} h - The height of the effect in logical pixels. + */ + setSize: (w: number, h: number) => void; + /** + * When using this effect, this method should be called instead of the + * default {@link WebGLRenderer#render}. + * + * @param {Object3D} scene - The scene to render. + * @param {Camera} camera - The camera. + */ + render: (scene: Object3D, camera: Camera) => void; + /** + * The DOM element of the effect. This element must be used instead of the + * default {@link WebGLRenderer#domElement}. + * + * @type {HTMLDivElement} + */ + domElement: HTMLDivElement; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/effects/OutlineEffect.d.ts b/jsdoc-testing/jsdoc/examples/jsm/effects/OutlineEffect.d.ts new file mode 100644 index 000000000..1d5312135 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/effects/OutlineEffect.d.ts @@ -0,0 +1,89 @@ +/** + * ~Options + */ +export type OutlineEffect = { + /** + * - The outline thickness. + */ + defaultThickness?: number | undefined; + /** + * - The outline color. + */ + defaultColor?: number[] | undefined; + /** + * - The outline alpha value. + */ + defaultAlpha?: number | undefined; + /** + * - Whether to keep alive cached internal materials or not. + */ + defaultKeepAlive?: boolean | undefined; +}; +/** + * An outline effect for toon shaders. + * + * Note that this class can only be used with {@link WebGLRenderer}. + * When using {@link WebGPURenderer}, use {@link ToonOutlinePassNode}. + * + * ```js + * const effect = new OutlineEffect( renderer ); + * + * function render() { + * + * effect.render( scene, camera ); + * + * } + * ``` + * + * @three_import import { OutlineEffect } from 'three/addons/effects/OutlineEffect.js'; + */ +export class OutlineEffect { + /** + * Constructs a new outline effect. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {OutlineEffect~Options} [parameters] - The configuration parameter. + */ + constructor(renderer: WebGLRenderer, parameters?: {}); + enabled: boolean; + /** + * When using this effect, this method should be called instead of the + * default {@link WebGLRenderer#render}. + * + * @param {Object3D} scene - The scene to render. + * @param {Camera} camera - The camera. + */ + render: (scene: Object3D, camera: Camera) => void; + /** + * This method can be used to render outlines in VR. + * + * ```js + * const effect = new OutlineEffect( renderer ); + * let renderingOutline = false; + * + * scene.onAfterRender = function () { + * + * if ( renderingOutline ) return; + * + * renderingOutline = true; + * effect.renderOutline( scene, camera ); + * renderingOutline = false; + * }; + * + * function render() { + * renderer.render( scene, camera ); + * } + * ``` + * + * @param {Object3D} scene - The scene to render. + * @param {Camera} camera - The camera. + */ + renderOutline: (scene: Object3D, camera: Camera) => void; + /** + * Resizes the effect. + * + * @param {number} width - The width of the effect in logical pixels. + * @param {number} height - The height of the effect in logical pixels. + */ + setSize: (width: number, height: number) => void; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/effects/ParallaxBarrierEffect.d.ts b/jsdoc-testing/jsdoc/examples/jsm/effects/ParallaxBarrierEffect.d.ts new file mode 100644 index 000000000..7fc021f50 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/effects/ParallaxBarrierEffect.d.ts @@ -0,0 +1,36 @@ +/** + * A class that creates an parallax barrier effect. + * + * Note that this class can only be used with {@link WebGLRenderer}. + * When using {@link WebGPURenderer}, use {@link ParallaxBarrierPassNode}. + * + * @three_import import { ParallaxBarrierEffect } from 'three/addons/effects/ParallaxBarrierEffect.js'; + */ +export class ParallaxBarrierEffect { + /** + * Constructs a new parallax barrier effect. + * + * @param {WebGLRenderer} renderer - The renderer. + */ + constructor(renderer: WebGLRenderer); + /** + * Resizes the effect. + * + * @param {number} width - The width of the effect in logical pixels. + * @param {number} height - The height of the effect in logical pixels. + */ + setSize: (width: number, height: number) => void; + /** + * When using this effect, this method should be called instead of the + * default {@link WebGLRenderer#render}. + * + * @param {Object3D} scene - The scene to render. + * @param {Camera} camera - The camera. + */ + render: (scene: Object3D, camera: Camera) => void; + /** + * Frees internal resources. This method should be called + * when the effect is no longer required. + */ + dispose: () => void; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/effects/StereoEffect.d.ts b/jsdoc-testing/jsdoc/examples/jsm/effects/StereoEffect.d.ts new file mode 100644 index 000000000..b76fcfce7 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/effects/StereoEffect.d.ts @@ -0,0 +1,37 @@ +/** + * A class that creates an stereo effect. + * + * Note that this class can only be used with {@link WebGLRenderer}. + * When using {@link WebGPURenderer}, use {@link StereoPassNode}. + * + * @three_import import { StereoEffect } from 'three/addons/effects/StereoEffect.js'; + */ +export class StereoEffect { + /** + * Constructs a new stereo effect. + * + * @param {WebGLRenderer} renderer - The renderer. + */ + constructor(renderer: WebGLRenderer); + /** + * Sets the given eye separation. + * + * @param {number} eyeSep - The eye separation to set. + */ + setEyeSeparation: (eyeSep: number) => void; + /** + * Resizes the effect. + * + * @param {number} width - The width of the effect in logical pixels. + * @param {number} height - The height of the effect in logical pixels. + */ + setSize: (width: number, height: number) => void; + /** + * When using this effect, this method should be called instead of the + * default {@link WebGLRenderer#render}. + * + * @param {Object3D} scene - The scene to render. + * @param {Camera} camera - The camera. + */ + render: (scene: Object3D, camera: Camera) => void; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/environments/ColorEnvironment.d.ts b/jsdoc-testing/jsdoc/examples/jsm/environments/ColorEnvironment.d.ts new file mode 100644 index 000000000..426cd16cc --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/environments/ColorEnvironment.d.ts @@ -0,0 +1,31 @@ +/** + * This class represents a scene with a uniform color that can be used as + * input for {@link PMREMGenerator#fromScene}. The resulting PMREM represents + * uniform ambient lighting and can be used for Image Based Lighting by + * assigning it to {@link Scene#environment}. + * + * ```js + * const environment = new ColorEnvironment( 0x00ff00 ); + * const pmremGenerator = new THREE.PMREMGenerator( renderer ); + * + * const envMap = pmremGenerator.fromScene( environment ).texture; + * scene.environment = envMap; + * ``` + * + * @augments Scene + * @three_import import { ColorEnvironment } from 'three/addons/environments/ColorEnvironment.js'; + */ +export class ColorEnvironment extends Scene { + /** + * Constructs a new color environment. + * + * @param {number|Color} color - The color of the environment. + */ + constructor(color?: number | Color); + /** + * Frees internal resources. This method should be called + * when the environment is no longer required. + */ + dispose(): void; +} +import { Scene } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/environments/DebugEnvironment.d.ts b/jsdoc-testing/jsdoc/examples/jsm/environments/DebugEnvironment.d.ts new file mode 100644 index 000000000..ad3dfe122 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/environments/DebugEnvironment.d.ts @@ -0,0 +1,28 @@ +/** + * This class represents a scene with a very basic room setup that can be used as + * input for {@link PMREMGenerator#fromScene}. The resulting PMREM represents the room's + * lighting and can be used for Image Based Lighting by assigning it to {@link Scene#environment} + * or directly as an environment map to PBR materials. + * + * This class uses a simple room setup and should only be used for development purposes. + * A more appropriate setup for production is {@link RoomEnvironment}. + * + * ```js + * const environment = new DebugEnvironment(); + * const pmremGenerator = new THREE.PMREMGenerator( renderer ); + * + * const envMap = pmremGenerator.fromScene( environment ).texture; + * scene.environment = envMap; + * ``` + * + * @augments Scene + * @three_import import { DebugEnvironment } from 'three/addons/environments/DebugEnvironment.js'; + */ +export class DebugEnvironment extends Scene { + /** + * Frees internal resources. This method should be called + * when the environment is no longer required. + */ + dispose(): void; +} +import { Scene } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/environments/RoomEnvironment.d.ts b/jsdoc-testing/jsdoc/examples/jsm/environments/RoomEnvironment.d.ts new file mode 100644 index 000000000..20374de2d --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/environments/RoomEnvironment.d.ts @@ -0,0 +1,28 @@ +/** + * This class represents a scene with a basic room setup that can be used as + * input for {@link PMREMGenerator#fromScene}. The resulting PMREM represents the room's + * lighting and can be used for Image Based Lighting by assigning it to {@link Scene#environment} + * or directly as an environment map to PBR materials. + * + * The implementation is based on the [EnvironmentScene](https://github.com/google/model-viewer/blob/master/packages/model-viewer/src/three-components/EnvironmentScene.ts) + * component from the `model-viewer` project. + * + * ```js + * const environment = new RoomEnvironment(); + * const pmremGenerator = new THREE.PMREMGenerator( renderer ); + * + * const envMap = pmremGenerator.fromScene( environment ).texture; + * scene.environment = envMap; + * ``` + * + * @augments Scene + * @three_import import { RoomEnvironment } from 'three/addons/environments/RoomEnvironment.js'; + */ +export class RoomEnvironment extends Scene { + /** + * Frees internal resources. This method should be called + * when the environment is no longer required. + */ + dispose(): void; +} +import { Scene } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/exporters/DRACOExporter.d.ts b/jsdoc-testing/jsdoc/examples/jsm/exporters/DRACOExporter.d.ts new file mode 100644 index 000000000..3891df80d --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/exporters/DRACOExporter.d.ts @@ -0,0 +1,75 @@ +/** + * ~Options + */ +export type DRACOExporter = { + /** + * - Indicates how to tune the encoder regarding decode speed (0 gives better speed but worst quality). + */ + decodeSpeed?: number | undefined; + /** + * - Indicates how to tune the encoder parameters (0 gives better speed but worst quality). + */ + encodeSpeed?: number | undefined; + /** + * - Either sequential (very little compression) or Edgebreaker. Edgebreaker traverses the triangles of the mesh in a deterministic, spiral-like way which provides most of the benefits of this data format. + */ + encoderMethod?: number | undefined; + /** + * - Indicates the precision of each type of data stored in the draco file in the order (POSITION, NORMAL, COLOR, TEX_COORD, GENERIC). + */ + quantization?: number[] | undefined; + /** + * - Whether to export UVs or not. + */ + exportUvs?: boolean | undefined; + /** + * - Whether to export normals or not. + */ + exportNormals?: boolean | undefined; + /** + * - Whether to export colors or not. + */ + exportColor?: boolean | undefined; +}; +/** + * An exporter to compress geometry with the Draco library. + * + * [Draco](https://google.github.io/draco/) is an open source library for compressing and + * decompressing 3D meshes and point clouds. Compressed geometry can be significantly smaller, + * at the cost of additional decoding time on the client device. + * + * Standalone Draco files have a `.drc` extension, and contain vertex positions, + * normals, colors, and other attributes. Draco files *do not* contain materials, + * textures, animation, or node hierarchies – to use these features, embed Draco geometry + * inside of a glTF file. A normal glTF file can be converted to a Draco-compressed glTF file + * using [glTF-Pipeline](https://github.com/AnalyticalGraphicsInc/gltf-pipeline). + * + * ```js + * const exporter = new DRACOExporter(); + * const data = exporter.parse( mesh, options ); + * ``` + * + * @three_import import { DRACOExporter } from 'three/addons/exporters/DRACOExporter.js'; + */ +export class DRACOExporter { + /** + * Parses the given mesh or point cloud and generates the Draco output. + * + * @param {(Mesh|Points)} object - The mesh or point cloud to export. + * @param {DRACOExporter~Options} options - The export options. + * @return {Int8Array} The exported Draco. + */ + parse(object: (Mesh | Points), options?: {}): Int8Array; +} +export namespace DRACOExporter { + let MESH_EDGEBREAKER_ENCODING: number; + let MESH_SEQUENTIAL_ENCODING: number; + let POINT_CLOUD: number; + let TRIANGULAR_MESH: number; + let INVALID: number; + let POSITION: number; + let NORMAL: number; + let COLOR: number; + let TEX_COORD: number; + let GENERIC: number; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/exporters/EXRExporter.d.ts b/jsdoc-testing/jsdoc/examples/jsm/exporters/EXRExporter.d.ts new file mode 100644 index 000000000..9bd21a485 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/exporters/EXRExporter.d.ts @@ -0,0 +1,45 @@ +/** + * ~Options + */ +export type EXRExporter = { + /** + * - Output data type. + */ + type?: number | undefined; +}; +/** + * An exporter for EXR. + * + * EXR ( Extended Dynamic Range) is an [open format specification](https://github.com/AcademySoftwareFoundation/openexr) + * for professional-grade image storage format of the motion picture industry. The purpose of + * format is to accurately and efficiently represent high-dynamic-range scene-linear image data + * and associated metadata. The library is widely used in host application software where accuracy + * is critical, such as photorealistic rendering, texture access, image compositing, deep compositing, + * and DI. + * + * ```js + * const exporter = new EXRExporter(); + * const result = await exporter.parse( renderer, options ); + * ``` + * + * @three_import import { EXRExporter } from 'three/addons/exporters/EXRExporter.js'; + */ +export class EXRExporter { + /** + * This method has two variants. + * + * - When exporting a data texture, it receives two parameters. The texture and the exporter options. + * - When exporting a render target (e.g. a PMREM), it receives three parameters. The renderer, the + * render target and the exporter options. + * + * @async + * @param {(DataTexture|WebGPURenderer|WebGLRenderer)} arg1 - The data texture to export or a renderer. + * @param {(EXRExporter~Options|RenderTarget)} arg2 - The exporter options or a render target. + * @param {EXRExporter~Options} [arg3] - The exporter options. + * @return {Promise} A Promise that resolves with the exported EXR. + */ + parse(arg1: (DataTexture | WebGPURenderer | WebGLRenderer), arg2: any, arg3: any): Promise; +} +export const NO_COMPRESSION: 0; +export const ZIP_COMPRESSION: 3; +export const ZIPS_COMPRESSION: 2; diff --git a/jsdoc-testing/jsdoc/examples/jsm/exporters/GLTFExporter.d.ts b/jsdoc-testing/jsdoc/examples/jsm/exporters/GLTFExporter.d.ts new file mode 100644 index 000000000..b64b99177 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/exporters/GLTFExporter.d.ts @@ -0,0 +1,130 @@ +/** + * ~Options + */ +export type GLTFExporter = { + /** + * - Export position, rotation and scale instead of matrix per node. + */ + trs?: boolean | undefined; + /** + * - Export only visible 3D objects. + */ + onlyVisible?: boolean | undefined; + /** + * - Export in binary (.glb) format, returning an ArrayBuffer. + */ + binary?: boolean | undefined; + /** + * - Restricts the image maximum size (both width and height) to the given value. + */ + maxTextureSize?: number | undefined; + /** + * - List of animations to be included in the export. + */ + animations?: AnimationClip[] | undefined; + /** + * - Export custom glTF extensions defined on an object's `userData.gltfExtensions` property. + */ + includeCustomExtensions?: boolean | undefined; +}; +/** + * An exporter for `glTF` 2.0. + * + * glTF (GL Transmission Format) is an [open format specification](https://github.com/KhronosGroup/glTF/tree/master/specification/2.0) + * for efficient delivery and loading of 3D content. Assets may be provided either in JSON (.gltf) + * or binary (.glb) format. External files store textures (.jpg, .png) and additional binary + * data (.bin). A glTF asset may deliver one or more scenes, including meshes, materials, + * textures, skins, skeletons, morph targets, animations, lights, and/or cameras. + * + * GLTFExporter supports the [glTF 2.0 extensions](https://github.com/KhronosGroup/glTF/tree/master/extensions/): + * + * - KHR_lights_punctual + * - KHR_materials_clearcoat + * - KHR_materials_dispersion + * - KHR_materials_emissive_strength + * - KHR_materials_ior + * - KHR_materials_iridescence + * - KHR_materials_specular + * - KHR_materials_sheen + * - KHR_materials_transmission + * - KHR_materials_unlit + * - KHR_materials_volume + * - KHR_mesh_quantization + * - KHR_texture_transform + * - EXT_materials_bump + * - EXT_mesh_gpu_instancing + * - EXT_texture_webp + * + * The following glTF 2.0 extension is supported by an external user plugin: + * + * - [KHR_materials_variants](https://github.com/takahirox/three-gltf-extensions) + * + * ```js + * const exporter = new GLTFExporter(); + * const data = await exporter.parseAsync( scene, options ); + * ``` + * + * @three_import import { GLTFExporter } from 'three/addons/exporters/GLTFExporter.js'; + */ +export class GLTFExporter { + /** + * A reference to a texture utils module. + * + * @type {?(WebGLTextureUtils|WebGPUTextureUtils)} + * @default null + */ + textureUtils: (WebGLTextureUtils | WebGPUTextureUtils) | null; + pluginCallbacks: any[]; + /** + * Registers a plugin callback. This API is internally used to implement the various + * glTF extensions but can also used by third-party code to add additional logic + * to the exporter. + * + * @param {function(writer:GLTFWriter)} callback - The callback function to register. + * @return {GLTFExporter} A reference to this exporter. + */ + register(callback: any): GLTFExporter; + /** + * Unregisters a plugin callback. + * + * @param {Function} callback - The callback function to unregister. + * @return {GLTFExporter} A reference to this exporter. + */ + unregister(callback: Function): GLTFExporter; + /** + * Sets the texture utils for this exporter. Only relevant when compressed textures have to be exported. + * + * Depending on whether you use {@link WebGLRenderer} or {@link WebGPURenderer}, you must inject the + * corresponding texture utils {@link WebGLTextureUtils} or {@link WebGPUTextureUtils}. + * + * @param {WebGLTextureUtils|WebGPUTextureUtils} utils - The texture utils. + * @return {GLTFExporter} A reference to this exporter. + */ + setTextureUtils(utils: WebGLTextureUtils | WebGPUTextureUtils): GLTFExporter; + /** + * Parses the given scenes and generates the glTF output. + * + * @param {Scene|Array} input - A scene or an array of scenes. + * @param {GLTFExporter~OnDone} onDone - A callback function that is executed when the export has finished. + * @param {GLTFExporter~OnError} onError - A callback function that is executed when an error happens. + * @param {GLTFExporter~Options} options - options + */ + parse(input: Scene | Array, onDone: any, onError: any, options: any): void; + /** + * Async version of {@link GLTFExporter#parse}. + * + * @param {Scene|Array} input - A scene or an array of scenes. + * @param {GLTFExporter~Options} options - options. + * @return {Promise} A Promise that resolved with the exported glTF data. + */ + parseAsync(input: Scene | Array, options: any): Promise; +} +export namespace GLTFExporter { + namespace Utils { + function insertKeyframe(track: any, time: any): number | undefined; + function mergeMorphTargetTracks(clip: any, root: any): any; + function toTypedBufferAttribute(srcAttribute: any, TypedArray: any): BufferAttribute; + } +} +import { Scene } from 'three'; +import { BufferAttribute } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/exporters/KTX2Exporter.d.ts b/jsdoc-testing/jsdoc/examples/jsm/exporters/KTX2Exporter.d.ts new file mode 100644 index 000000000..3c5367230 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/exporters/KTX2Exporter.d.ts @@ -0,0 +1,26 @@ +/** + * An exporter for KTX2. + * + * ```js + * const exporter = new KTX2Exporter(); + * const result = await exporter.parse( dataTexture ); + * ``` + * + * @three_import import { KTX2Exporter } from 'three/addons/exporters/KTX2Exporter.js'; + */ +export class KTX2Exporter { + /** + * This method has two variants. + * + * - When exporting a data texture, it receives one parameter. The data or 3D data texture. + * - When exporting a render target (e.g. a PMREM), it receives two parameters. The renderer and the + * render target. + * + * @async + * @param {(DataTexture|Data3DTexture|WebGPURenderer|WebGLRenderer)} arg1 - The data texture to export or a renderer. + * @param {RenderTarget} [arg2] - The render target that should be exported + * @return {Promise} A Promise that resolves with the exported KTX2. + */ + parse(arg1: (DataTexture | Data3DTexture | WebGPURenderer | WebGLRenderer), arg2?: RenderTarget): Promise; +} +import { DataTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/exporters/OBJExporter.d.ts b/jsdoc-testing/jsdoc/examples/jsm/exporters/OBJExporter.d.ts new file mode 100644 index 000000000..ce14c5604 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/exporters/OBJExporter.d.ts @@ -0,0 +1,23 @@ +/** + * An exporter for OBJ. + * + * `OBJExporter` is not able to export material data into MTL files so only geometry data are supported. + * + * ```js + * const exporter = new OBJExporter(); + * const data = exporter.parse( scene ); + * ``` + * + * @three_import import { OBJExporter } from 'three/addons/exporters/OBJExporter.js'; + */ +export class OBJExporter { + /** + * Parses the given 3D object and generates the OBJ output. + * + * If the 3D object is composed of multiple children and geometry, they are merged into a single mesh in the file. + * + * @param {Object3D} object - The 3D object to export. + * @return {string} The exported OBJ. + */ + parse(object: Object3D): string; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/exporters/PLYExporter.d.ts b/jsdoc-testing/jsdoc/examples/jsm/exporters/PLYExporter.d.ts new file mode 100644 index 000000000..09942d1f4 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/exporters/PLYExporter.d.ts @@ -0,0 +1,56 @@ +/** + * ~Options + */ +export type PLYExporter = { + /** + * - Whether to export in binary format or ASCII. + */ + binary?: boolean | undefined; + /** + * - Which properties to explicitly exclude from + * the exported PLY file. Valid values are `'color'`, `'normal'`, `'uv'`, and `'index'`. If triangle + * indices are excluded, then a point cloud is exported. + */ + excludeAttributes?: string[] | undefined; + /** + * - Whether the binary export uses little or big endian. + */ + littleEndian?: boolean | undefined; + /** + * - A mapping that allows + * exporting custom buffer attributes as PLY vertex properties. Each entry maps a buffer attribute + * name to an array of PLY property names. The number of property names must match the item size + * of the buffer attribute. This is the inverse of `PLYLoader.setCustomPropertyNameMapping()`. + */ + customPropertyMapping?: { + [x: string]: string[]; + } | undefined; +}; +/** + * An exporter for PLY. + * + * PLY (Polygon or Stanford Triangle Format) is a file format for efficient delivery and + * loading of simple, static 3D content in a dense format. Both binary and ascii formats are + * supported. PLY can store vertex positions, colors, normals and uv coordinates. No textures + * or texture references are saved. + * + * ```js + * const exporter = new PLYExporter(); + * const data = exporter.parse( scene, options ); + * ``` + * + * @three_import import { PLYExporter } from 'three/addons/exporters/PLYExporter.js'; + */ +export class PLYExporter { + /** + * Parses the given 3D object and generates the PLY output. + * + * If the 3D object is composed of multiple children and geometry, they are merged into a single mesh in the file. + * + * @param {Object3D} object - The 3D object to export. + * @param {PLYExporter~OnDone} onDone - A callback function that is executed when the export has finished. + * @param {PLYExporter~Options} options - The export options. + * @return {?(string|ArrayBuffer)} The exported PLY. + */ + parse(object: Object3D, onDone: any, options?: {}): (string | ArrayBuffer) | null; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/exporters/STLExporter.d.ts b/jsdoc-testing/jsdoc/examples/jsm/exporters/STLExporter.d.ts new file mode 100644 index 000000000..e72db8c3d --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/exporters/STLExporter.d.ts @@ -0,0 +1,36 @@ +/** + * ~Options + */ +export type STLExporter = { + /** + * - Whether to export in binary format or ASCII. + */ + binary?: boolean | undefined; +}; +/** + * An exporter for STL. + * + * STL files describe only the surface geometry of a three-dimensional object without + * any representation of color, texture or other common model attributes. The STL format + * specifies both ASCII and binary representations, with binary being more compact. + * STL files contain no scale information or indexes, and the units are arbitrary. + * + * ```js + * const exporter = new STLExporter(); + * const data = exporter.parse( mesh, { binary: true } ); + * ``` + * + * @three_import import { STLExporter } from 'three/addons/exporters/STLExporter.js'; + */ +export class STLExporter { + /** + * Parses the given 3D object and generates the STL output. + * + * If the 3D object is composed of multiple children and geometry, they are merged into a single mesh in the file. + * + * @param {Object3D} scene - A scene, mesh or any other 3D object containing meshes to encode. + * @param {STLExporter~Options} options - The export options. + * @return {string|ArrayBuffer} The exported STL. + */ + parse(scene: Object3D, options?: {}): string | ArrayBuffer; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/exporters/USDZExporter.d.ts b/jsdoc-testing/jsdoc/examples/jsm/exporters/USDZExporter.d.ts new file mode 100644 index 000000000..14434a5af --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/exporters/USDZExporter.d.ts @@ -0,0 +1,82 @@ +/** + * ~Options + */ +export type USDZExporter = { + /** + * - The maximum texture size that is going to be exported. + */ + maxTextureSize?: number | undefined; + /** + * - Whether to include anchoring properties or not. + */ + includeAnchoringProperties?: boolean | undefined; + /** + * - Export only visible 3D objects. + */ + onlyVisible?: boolean | undefined; + /** + * - If `includeAnchoringProperties` is set to `true`, the anchoring type and alignment + * can be configured via `ar.anchoring.type` and `ar.planeAnchoring.alignment`. + */ + ar?: Object | undefined; + /** + * - Whether to make the exported USDZ compatible to QuickLook + * which means the asset is modified to accommodate the bugs FB10036297 and FB11442287 (Apple Feedback). + */ + quickLookCompatible?: boolean | undefined; + /** + * - Animation clips to bake into `xformOp` time samples on the + * targeted objects. Only `position`, `quaternion`, and `scale` tracks are exported. + */ + animations?: AnimationClip[] | undefined; + /** + * - Time codes per second used when writing animation samples. + */ + animationFrameRate?: number | undefined; +}; +/** + * An exporter for USDZ. + * + * ```js + * const exporter = new USDZExporter(); + * const arraybuffer = await exporter.parseAsync( scene ); + * ``` + * + * @three_import import { USDZExporter } from 'three/addons/exporters/USDZExporter.js'; + */ +export class USDZExporter { + /** + * A reference to a texture utils module. + * + * @type {?(WebGLTextureUtils|WebGPUTextureUtils)} + * @default null + */ + textureUtils: (WebGLTextureUtils | WebGPUTextureUtils) | null; + /** + * Sets the texture utils for this exporter. Only relevant when compressed textures have to be exported. + * + * Depending on whether you use {@link WebGLRenderer} or {@link WebGPURenderer}, you must inject the + * corresponding texture utils {@link WebGLTextureUtils} or {@link WebGPUTextureUtils}. + * + * @param {WebGLTextureUtils|WebGPUTextureUtils} utils - The texture utils. + */ + setTextureUtils(utils: WebGLTextureUtils | WebGPUTextureUtils): void; + /** + * Parse the given 3D object and generates the USDZ output. + * + * @param {Object3D} scene - The 3D object to export. + * @param {USDZExporter~OnDone} onDone - A callback function that is executed when the export has finished. + * @param {USDZExporter~OnError} onError - A callback function that is executed when an error happens. + * @param {USDZExporter~Options} options - The export options. + */ + parse(scene: Object3D, onDone: any, onError: any, options: any): void; + /** + * Async version of {@link USDZExporter#parse}. + * + * @async + * @param {Object3D} scene - The 3D object to export. + * @param {USDZExporter~Options} options - The export options. + * @return {Promise} A Promise that resolved with the exported USDZ data. + */ + parseAsync(scene: Object3D, options?: {}): Promise; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/geometries/BoxLineGeometry.d.ts b/jsdoc-testing/jsdoc/examples/jsm/geometries/BoxLineGeometry.d.ts new file mode 100644 index 000000000..f91b9d984 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/geometries/BoxLineGeometry.d.ts @@ -0,0 +1,27 @@ +/** + * A special type of box geometry intended for {@link LineSegments}. + * + * ```js + * const geometry = new THREE.BoxLineGeometry(); + * const material = new THREE.LineBasicMaterial( { color: 0x00ff00 } ); + * const lines = new THREE.LineSegments( geometry, material ); + * scene.add( lines ); + * ``` + * + * @augments BufferGeometry + * @three_import import { BoxLineGeometry } from 'three/addons/geometries/BoxLineGeometry.js'; + */ +export class BoxLineGeometry extends BufferGeometry { + /** + * Constructs a new box line geometry. + * + * @param {number} [width=1] - The width. That is, the length of the edges parallel to the X axis. + * @param {number} [height=1] - The height. That is, the length of the edges parallel to the Y axis. + * @param {number} [depth=1] - The depth. That is, the length of the edges parallel to the Z axis. + * @param {number} [widthSegments=1] - Number of segmented rectangular sections along the width of the sides. + * @param {number} [heightSegments=1] - Number of segmented rectangular sections along the height of the sides. + * @param {number} [depthSegments=1] - Number of segmented rectangular sections along the depth of the sides. + */ + constructor(width?: number, height?: number, depth?: number, widthSegments?: number, heightSegments?: number, depthSegments?: number); +} +import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/geometries/ConvexGeometry.d.ts b/jsdoc-testing/jsdoc/examples/jsm/geometries/ConvexGeometry.d.ts new file mode 100644 index 000000000..e5e6dacf7 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/geometries/ConvexGeometry.d.ts @@ -0,0 +1,23 @@ +/** + * This class can be used to generate a convex hull for a given array of 3D points. + * The average time complexity for this task is considered to be O(nlog(n)). + * + * ```js + * const geometry = new ConvexGeometry( points ); + * const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); + * const mesh = new THREE.Mesh( geometry, material ); + * scene.add( mesh ); + * ``` + * + * @augments BufferGeometry + * @three_import import { ConvexGeometry } from 'three/addons/geometries/ConvexGeometry.js'; + */ +export class ConvexGeometry extends BufferGeometry { + /** + * Constructs a new convex geometry. + * + * @param {Array} points - An array of points in 3D space which should be enclosed by the convex hull. + */ + constructor(points?: Array); +} +import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/geometries/DecalGeometry.d.ts b/jsdoc-testing/jsdoc/examples/jsm/geometries/DecalGeometry.d.ts new file mode 100644 index 000000000..382bd6e37 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/geometries/DecalGeometry.d.ts @@ -0,0 +1,40 @@ +/** + * This class can be used to create a decal mesh that serves different kinds of purposes e.g. + * adding unique details to models, performing dynamic visual environmental changes or covering seams. + * + * Please not that decal projections can be distorted when used around corners. More information at + * this GitHub issue: [Decal projections without distortions](https://github.com/mrdoob/three.js/issues/21187). + * + * Reference: [How to project decals](http://blog.wolfire.com/2009/06/how-to-project-decals/) + * + * ```js + * const geometry = new DecalGeometry( mesh, position, orientation, size ); + * const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); + * const mesh = new THREE.Mesh( geometry, material ); + * scene.add( mesh ); + * ``` + * + * @augments BufferGeometry + * @three_import import { DecalGeometry } from 'three/addons/geometries/DecalGeometry.js'; + */ +export class DecalGeometry extends BufferGeometry { + /** + * Constructs a new decal geometry. + * + * @param {Mesh} [mesh] - The base mesh the decal should be projected on. + * @param {Vector3} [position] - The position of the decal projector. + * @param {Euler} [orientation] - The orientation of the decal projector. + * @param {Vector3} [size] - The scale of the decal projector. + */ + constructor(mesh?: Mesh, position?: Vector3, orientation?: Euler, size?: Vector3); +} +export class DecalVertex { + constructor(position: any, normal?: null); + position: any; + normal: any; + clone(): any; +} +import { BufferGeometry } from 'three'; +import { Mesh } from 'three'; +import { Vector3 } from 'three'; +import { Euler } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/geometries/ParametricFunctions.d.ts b/jsdoc-testing/jsdoc/examples/jsm/geometries/ParametricFunctions.d.ts new file mode 100644 index 000000000..db21efb1c --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/geometries/ParametricFunctions.d.ts @@ -0,0 +1,36 @@ +/** + * @module ParametricFunctions + * @three_import import * as ParametricFunctions from 'three/addons/geometries/ParametricFunctions.js'; + */ +/** + * A parametric function representing the Klein bottle. + * + * @param {number} v - The `v` coordinate on the surface in the range `[0,1]`. + * @param {number} u - The `u` coordinate on the surface in the range `[0,1]`. + * @param {Vector3} target - The target vector that is used to store the method's result. + */ +export function klein(v: number, u: number, target: Vector3): void; +/** + * A parametric function representing a flat plane. + * + * @param {number} u - The `u` coordinate on the surface in the range `[0,1]`. + * @param {number} v - The `v` coordinate on the surface in the range `[0,1]`. + * @param {Vector3} target - The target vector that is used to store the method's result. + */ +export function plane(u: number, v: number, target: Vector3): void; +/** + * A parametric function representing a flat mobius strip. + * + * @param {number} u - The `u` coordinate on the surface in the range `[0,1]`. + * @param {number} t - The `v` coordinate on the surface in the range `[0,1]`. + * @param {Vector3} target - The target vector that is used to store the method's result. + */ +export function mobius(u: number, t: number, target: Vector3): void; +/** + * A parametric function representing a volumetric mobius strip. + * + * @param {number} u - The `u` coordinate on the surface in the range `[0,1]`. + * @param {number} t - The `v` coordinate on the surface in the range `[0,1]`. + * @param {Vector3} target - The target vector that is used to store the method's result. + */ +export function mobius3d(u: number, t: number, target: Vector3): void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/geometries/ParametricGeometry.d.ts b/jsdoc-testing/jsdoc/examples/jsm/geometries/ParametricGeometry.d.ts new file mode 100644 index 000000000..ef52bca65 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/geometries/ParametricGeometry.d.ts @@ -0,0 +1,40 @@ +/** + * ~Func + */ +export type ParametricGeometry = (u: number, v: number, target: Vector3) => any; +import { Vector3 } from 'three'; +/** + * This class can be used to generate a geometry based on a parametric surface. + * + * Reference: [Mesh Generation with Python](https://prideout.net/blog/old/blog/index.html@p=44.html) + * + * ```js + * const geometry = new THREE.ParametricGeometry( klein, 25, 25 ); + * const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); + * const klein = new THREE.Mesh( geometry, material ); + * scene.add( klein ); + * ``` + * + * @augments BufferGeometry + * @three_import import { ParametricGeometry } from 'three/addons/geometries/ParametricGeometry.js'; + */ +export class ParametricGeometry extends BufferGeometry { + /** + * Constructs a new parametric geometry. + * + * @param {ParametricGeometry~Func} func - The parametric function. Default is a function that generates a curved plane surface. + * @param {number} [slices=8] - The number of slices to use for the parametric function. + * @param {number} [stacks=8] - The stacks of slices to use for the parametric function. + */ + constructor(func?: (u: any, v: any, target: any) => any, slices?: number, stacks?: number); + /** + * Holds the constructor parameters that have been + * used to generate the geometry. Any modification + * after instantiation does not change the geometry. + * + * @type {Object} + */ + parameters: Object; + copy(source: any): this; +} +import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/geometries/RoundedBoxGeometry.d.ts b/jsdoc-testing/jsdoc/examples/jsm/geometries/RoundedBoxGeometry.d.ts new file mode 100644 index 000000000..8bb5e657c --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/geometries/RoundedBoxGeometry.d.ts @@ -0,0 +1,26 @@ +/** + * A special type of box geometry with rounded corners and edges. + * + * ```js + * const geometry = new THREE.RoundedBoxGeometry(); + * const material = new THREE.MeshStandardMaterial( { color: 0x00ff00 } ); + * const cube = new THREE.Mesh( geometry, material ); + * scene.add( cube ); + * ``` + * + * @augments BoxGeometry + * @three_import import { RoundedBoxGeometry } from 'three/addons/geometries/RoundedBoxGeometry.js'; + */ +export class RoundedBoxGeometry extends BoxGeometry { + /** + * Constructs a new rounded box geometry. + * + * @param {number} [width=1] - The width. That is, the length of the edges parallel to the X axis. + * @param {number} [height=1] - The height. That is, the length of the edges parallel to the Y axis. + * @param {number} [depth=1] - The depth. That is, the length of the edges parallel to the Z axis. + * @param {number} [segments=2] - Number of segments that form the rounded corners. + * @param {number} [radius=0.1] - The radius of the rounded corners. + */ + constructor(width?: number, height?: number, depth?: number, segments?: number, radius?: number); +} +import { BoxGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/geometries/TeapotGeometry.d.ts b/jsdoc-testing/jsdoc/examples/jsm/geometries/TeapotGeometry.d.ts new file mode 100644 index 000000000..f555f1a36 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/geometries/TeapotGeometry.d.ts @@ -0,0 +1,37 @@ +/** + * Tessellates the famous Utah teapot database by Martin Newell into triangles. + * + * The teapot should normally be rendered as a double sided object, since for some + * patches both sides can be seen, e.g., the gap around the lid and inside the spout. + * + * Segments 'n' determines the number of triangles output. Total triangles = 32*2*n*n - 8*n + * (degenerates at the top and bottom cusps are deleted). + * + * Code based on [SPD software](http://tog.acm.org/resources/SPD/) + * Created for the Udacity course [Interactive Rendering](http://bit.ly/ericity) + * + * ```js + * const geometry = new TeapotGeometry( 50, 18 ); + * const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); + * const teapot = new THREE.Mesh( geometry, material ); + * scene.add( teapot ); + * ``` + * + * @augments BufferGeometry + * @three_import import { TeapotGeometry } from 'three/addons/geometries/TeapotGeometry.js'; + */ +export class TeapotGeometry extends BufferGeometry { + /** + * Constructs a new teapot geometry. + * + * @param {number} [size=50] - Relative scale of the teapot. + * @param {number} [segments=10] - Number of line segments to subdivide each patch edge. + * @param {boolean} [bottom=true] - Whether the bottom of the teapot is generated or not. + * @param {boolean} [lid=true] - Whether the lid is generated or not. + * @param {boolean} [body=true] - Whether the body is generated or not. + * @param {boolean} [fitLid=true] - Whether the lid is slightly stretched to prevent gaps between the body and lid or not. + * @param {boolean} [blinn=true] - Whether the teapot is scaled vertically for better aesthetics or not. + */ + constructor(size?: number, segments?: number, bottom?: boolean, lid?: boolean, body?: boolean, fitLid?: boolean, blinn?: boolean); +} +import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/geometries/TextGeometry.d.ts b/jsdoc-testing/jsdoc/examples/jsm/geometries/TextGeometry.d.ts new file mode 100644 index 000000000..70f1d0791 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/geometries/TextGeometry.d.ts @@ -0,0 +1,92 @@ +/** + * ~Options + */ +export type TextGeometry = { + /** + * - The font. + */ + font?: Font | undefined; + /** + * - The text size. + */ + size?: number | undefined; + /** + * - Depth to extrude the shape. + */ + depth?: number | undefined; + /** + * - Number of points on the curves. + */ + curveSegments?: number | undefined; + /** + * - Number of points used for subdividing segments along the depth of the extruded spline. + */ + steps?: number | undefined; + /** + * - Whether to beveling to the shape or not. + */ + bevelEnabled?: boolean | undefined; + /** + * - How deep into the original shape the bevel goes. + */ + bevelThickness?: number | undefined; + /** + * - Distance from the shape outline that the bevel extends. + */ + bevelSize?: number | undefined; + /** + * - Distance from the shape outline that the bevel starts. + */ + bevelOffset?: number | undefined; + /** + * - Number of bevel layers. + */ + bevelSegments?: number | undefined; + /** + * - Char direction: ltr(left to right), rtl(right to left) & tb(top bottom). + */ + direction?: string | undefined; + /** + * - A 3D spline path along which the shape should be extruded. Bevels not supported for path extrusion. + */ + extrudePath?: Curve | null; + /** + * - An object that provides UV generator functions for custom UV generation. + */ + UVGenerator?: Object | undefined; +}; +import { Font } from '../loaders/FontLoader.js'; +/** + * A class for generating text as a single geometry. It is constructed by providing a string of text, and a set of + * parameters consisting of a loaded font and extrude settings. + * + * See the {@link FontLoader} page for additional details. + * + * `TextGeometry` uses [typeface.json](http://gero3.github.io/facetype.js/) generated fonts. + * Some existing fonts can be found located in `/examples/fonts`. + * + * ```js + * const loader = new FontLoader(); + * const font = await loader.loadAsync( 'fonts/helvetiker_regular.typeface.json' ); + * const geometry = new TextGeometry( 'Hello three.js!', { + * font: font, + * size: 80, + * depth: 5, + * curveSegments: 12 + * } ); + * ``` + * + * @augments ExtrudeGeometry + * @three_import import { TextGeometry } from 'three/addons/geometries/TextGeometry.js'; + */ +export class TextGeometry extends ExtrudeGeometry { + static fromJSON(data: any): TextGeometry; + /** + * Constructs a new text geometry. + * + * @param {string} text - The text that should be transformed into a geometry. + * @param {TextGeometry~Options} [parameters] - The text settings. + */ + constructor(text: string, parameters?: {}); +} +import { ExtrudeGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/gpgpu/BitonicSort.d.ts b/jsdoc-testing/jsdoc/examples/jsm/gpgpu/BitonicSort.d.ts new file mode 100644 index 000000000..8115e72d5 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/gpgpu/BitonicSort.d.ts @@ -0,0 +1,263 @@ +/** + * Returns the indices that will be compared in a bitonic flip operation. + * + * @tsl + * @private + * @param {Node} index - The compute thread's invocation id. + * @param {Node} blockHeight - The height of the block within which elements are being swapped. + * @returns {Node} The indices of the elements in the data buffer being compared. + */ +export const getBitonicFlipIndices: any; +/** + * Returns the indices that will be compared in a bitonic sort's disperse operation. + * + * @tsl + * @private + * @param {Node} index - The compute thread's invocation id. + * @param {Node} swapSpan - The maximum span over which elements are being swapped. + * @returns {Node} The indices of the elements in the data buffer being compared. + */ +export const getBitonicDisperseIndices: any; +export class BitonicSort { + /** + * Constructs a new light probe helper. + * + * @param {Renderer} renderer - The current scene's renderer. + * @param {StorageBufferNode} dataBuffer - The data buffer to sort. + * @param {Object} [options={}] - Options that modify the bitonic sort. + */ + constructor(renderer: Renderer, dataBuffer: StorageBufferNode, options?: Object); + /** + * A reference to the renderer. + * + * @type {Renderer} + */ + renderer: Renderer; + /** + * A reference to the StorageBufferNode holding the data that will be sorted . + * + * @type {StorageBufferNode} + */ + dataBuffer: StorageBufferNode; + /** + * The size of the data. + * + * @type {StorageBufferNode} + */ + count: StorageBufferNode; + /** + * + * The size of each compute dispatch. + * @type {number} + */ + dispatchSize: number; + /** + * The workgroup size of the compute shaders executed during the sort. + * + * @type {StorageBufferNode} + */ + workgroupSize: StorageBufferNode; + /** + * A node representing a workgroup scoped buffer that holds locally sorted elements. + * + * @type {WorkgroupInfoNode} + */ + localStorage: WorkgroupInfoNode; + _tempArray: Uint32Array; + /** + * A node representing a storage buffer used for transferring the result of the global sort back to the original data buffer. + * + * @type {StorageBufferNode} + */ + tempBuffer: StorageBufferNode; + /** + * A node containing the current algorithm type, the current swap span, and the highest swap span. + * + * @type {StorageBufferNode} + */ + infoStorage: StorageBufferNode; + /** + * The number of distinct swap operations ('flips' and 'disperses') executed in an in-place + * bitonic sort of the current data buffer. + * + * @type {number} + */ + swapOpCount: number; + /** + * The number of steps (i.e prepping and/or executing a swap) needed to fully execute an in-place bitonic sort of the current data buffer. + * + * @type {number} + */ + stepCount: number; + /** + * The number of the buffer being read from. + * + * @type {string} + */ + readBufferName: string; + /** + * An object containing compute shaders that execute a 'flip' swap within a global address space on elements in the data buffer. + * + * @type {Object} + */ + flipGlobalNodes: { + [x: string]: ComputeNode; + }; + /** + * An object containing compute shaders that execute a 'disperse' swap within a global address space on elements in the data buffer. + * + * @type {Object} + */ + disperseGlobalNodes: { + [x: string]: ComputeNode; + }; + /** + * A compute shader that executes a sequence of flip and disperse swaps within a local address space on elements in the data buffer. + * + * @type {ComputeNode} + */ + swapLocalFn: ComputeNode; + /** + * A compute shader that executes a sequence of disperse swaps within a local address space on elements in the data buffer. + * + * @type {Object} + */ + disperseLocalNodes: { + [x: string]: ComputeNode; + }; + /** + * A compute shader that sets up the algorithm and the swap span for the next swap operation. + * + * @type {ComputeNode} + */ + setAlgoFn: ComputeNode; + /** + * A compute shader that aligns the result of the global swap operation with the current buffer. + * + * @type {ComputeNode} + */ + alignFn: ComputeNode; + /** + * A compute shader that resets the algorithm and swap span information. + * + * @type {ComputeNode} + */ + resetFn: ComputeNode; + /** + * The current compute shader dispatch within the list of dispatches needed to complete the sort. + * + * @type {number} + */ + currentDispatch: number; + /** + * The number of global swap operations that must be executed before the sort + * can swap in local address space. + * + * @type {number} + */ + globalOpsRemaining: number; + /** + * The total number of global operations needed to sort elements within the current swap span. + * + * @type {number} + */ + globalOpsInSpan: number; + /** + * Get total number of distinct swaps that occur in a bitonic sort. + * + * @private + * @returns {number} - The total number of distinct swaps in a bitonic sort + */ + private _getSwapOpCount; + /** + * Get the number of steps it takes to execute a complete bitonic sort. + * + * @private + * @returns {number} The number of steps it takes to execute a complete bitonic sort. + */ + private _getStepCount; + /** + * Compares and swaps two data points in the data buffer within the global address space. + * @param {Node} idxBefore - The index of the first data element in the data buffer. + * @param {Node} idxAfter - The index of the second data element in the data buffer. + * @param {StorageBufferNode} dataBuffer - The buffer of data to read from. + * @param {StorageBufferNode} tempBuffer - The buffer of data to write to. + * @private + * + */ + private _globalCompareAndSwapTSL; + /** + * Compares and swaps two data points in the data buffer within the local address space. + * + * @private + * @param {Node} idxBefore - The index of the first data element in the data buffer. + * @param {Node} idxAfter - The index of the second data element in the data buffer + */ + private _localCompareAndSwapTSL; + /** + * Create the compute shader that performs a global disperse swap on the data buffer. + * + * @private + * @param {StorageBufferNode} readBuffer - The data buffer to read from. + * @param {StorageBufferNode} writeBuffer - The data buffer to read from. + * @returns {ComputeNode} - A compute shader that performs a global disperse swap on the data buffer. + */ + private _getDisperseGlobal; + /** + * Create the compute shader that performs a global flip swap on the data buffer. + * + * @private + * @param {StorageBufferNode} readBuffer - The data buffer to read from. + * @param {StorageBufferNode} writeBuffer - The data buffer to read from. + * @returns {ComputeNode} - A compute shader that executes a global flip swap. + */ + private _getFlipGlobal; + /** + * Create the compute shader that performs a complete local swap on the data buffer. + * + * @private + * @returns {ComputeNode} - A compute shader that executes a full local swap. + */ + private _getSwapLocal; + /** + * Create the compute shader that performs a local disperse swap on the data buffer. + * + * @private + * @param {StorageBufferNode} readWriteBuffer - The data buffer to read from and write to. + * @returns {ComputeNode} - A compute shader that executes a local disperse swap. + */ + private _getDisperseLocal; + /** + * Create the compute shader that resets the sort's algorithm information. + * + * @private + * @returns {ComputeNode} - A compute shader that resets the bitonic sort's algorithm information. + */ + private _getResetFn; + /** + * Create the compute shader that copies the state of the last global swap to the data buffer. + * + * @private + * @returns {ComputeNode} - A compute shader that copies the state of the last global swap to the data buffer. + */ + private _getAlignFn; + /** + * Create the compute shader that sets the bitonic sort algorithm's information. + * + * @private + * @returns {ComputeNode} - A compute shader that sets the bitonic sort algorithm's information. + */ + private _getSetAlgoFn; + /** + * Executes a step of the bitonic sort operation. + * + * @param {Renderer} renderer - The current scene's renderer. + */ + computeStep(renderer: Renderer): void; + /** + * Executes a complete bitonic sort on the data buffer. + * + * @param {Renderer} renderer - The current scene's renderer. + */ + compute(renderer: Renderer): void; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/AnimationPathHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/AnimationPathHelper.d.ts new file mode 100644 index 000000000..67faad4f1 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/helpers/AnimationPathHelper.d.ts @@ -0,0 +1,134 @@ +/** + * Visualizes the motion path of an animated object based on position keyframes + * from an AnimationClip. + * + * ```js + * const clip = model.animations[ 0 ]; + * const helper = new AnimationPathHelper( model, clip, object ); + * scene.add( helper ); + * ``` + * + * @augments Object3D + * @three_import import { AnimationPathHelper } from 'three/addons/helpers/AnimationPathHelper.js'; + */ +export class AnimationPathHelper extends Object3D { + /** + * Constructs a new animation path helper. + * + * @param {Object3D} root - The root object containing the animation clips. + * @param {AnimationClip} clip - The animation clip containing position keyframes. + * @param {Object3D} object - The specific object to show the path for. + * @param {Object} [options={}] - Configuration options. + * @param {number|Color|string} [options.color=0x00ff00] - The path line color. + * @param {number|Color|string} [options.markerColor=0xff0000] - The keyframe marker color. + * @param {number} [options.divisions=100] - Number of samples for smooth path interpolation. + * @param {boolean} [options.showMarkers=true] - Whether to show markers at keyframe positions. + * @param {number} [options.markerSize=5] - Size of keyframe markers in pixels. + */ + constructor(root: Object3D, clip: AnimationClip, object: Object3D, options?: { + color?: number | Color | string; + markerColor?: number | Color | string; + divisions?: number | undefined; + showMarkers?: boolean | undefined; + markerSize?: number | undefined; + }); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isAnimationPathHelper: boolean; + type: string; + /** + * The root object containing the animation clips. + * + * @type {Object3D} + */ + root: Object3D; + /** + * The animation clip containing position keyframes. + * + * @type {AnimationClip} + */ + clip: AnimationClip; + /** + * The object whose path is being visualized. + * + * @type {Object3D} + */ + object: Object3D; + /** + * Number of samples for smooth path interpolation. + * + * @type {number} + * @default 100 + */ + divisions: number; + /** + * The position track for the object. + * + * @type {KeyframeTrack|null} + * @private + */ + private _track; + /** + * The line representing the animation path. + * + * @type {Line} + */ + line: Line; + /** + * Points marking keyframe positions. + * + * @type {Points|null} + */ + points: Points | null; + /** + * Finds the position track for the given object. + * + * @private + * @param {Object3D} object - The object to find the track for. + * @returns {KeyframeTrack|null} The position track, or null if not found. + */ + private _findTrackForObject; + /** + * Samples the track at regular intervals. + * + * @private + * @returns {Float32Array} Array of sampled positions. + */ + private _sampleTrack; + /** + * Updates the geometry with sampled path data. + * + * @private + */ + private _updateGeometry; + /** + * Updates the helper's transform to match the object's parent. + * + * @param {boolean} force - Force matrix update. + */ + updateMatrixWorld(force: boolean): void; + /** + * Sets the path line color. + * + * @param {number|Color|string} color - The new color. + */ + setColor(color: number | Color | string): void; + /** + * Sets the keyframe marker color. + * + * @param {number|Color|string} color - The new color. + */ + setMarkerColor(color: number | Color | string): void; + /** + * Frees the GPU-related resources allocated by this instance. + */ + dispose(): void; +} +import { Object3D } from 'three'; +import { Line } from 'three'; +import { Points } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeGridHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeGridHelper.d.ts new file mode 100644 index 000000000..3764cba90 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeGridHelper.d.ts @@ -0,0 +1,35 @@ +/** + * Visualizes an {@link LightProbeGrid} by rendering a sphere at each + * probe position, shaded with the probe's L2 spherical harmonics. + * + * Uses a single `InstancedMesh` draw call for all probes. + * + * ```js + * const helper = new LightProbeGridHelper( probes ); + * scene.add( helper ); + * ``` + * + * @augments InstancedMesh + * @three_import import { LightProbeGridHelper } from 'three/addons/helpers/LightProbeGridHelper.js'; + */ +export class LightProbeGridHelper extends InstancedMesh { + /** + * Constructs a new irradiance probe grid helper. + * + * @param {LightProbeGrid} probes - The probe grid to visualize. + * @param {number} [sphereSize=0.12] - The radius of each probe sphere. + */ + constructor(probes: LightProbeGrid, sphereSize?: number); + /** + * The probe grid to visualize. + * + * @type {LightProbeGrid} + */ + probes: LightProbeGrid; + /** + * Rebuilds instance matrices and UVW attributes from the current probe grid. + * Call this after changing `probes` or after re-baking. + */ + update(): void; +} +import { InstancedMesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeHelper.d.ts new file mode 100644 index 000000000..018e3ba25 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeHelper.d.ts @@ -0,0 +1,42 @@ +/** + * Renders a sphere to visualize a light probe in the scene. + * + * This helper can only be used with {@link WebGLRenderer}. + * When using {@link WebGPURenderer}, import from `LightProbeHelperGPU.js`. + * + * ```js + * const helper = new LightProbeHelper( lightProbe ); + * scene.add( helper ); + * ``` + * + * @augments Mesh + * @three_import import { LightProbeHelper } from 'three/addons/helpers/LightProbeHelper.js'; + */ +export class LightProbeHelper extends Mesh { + /** + * Constructs a new light probe helper. + * + * @param {LightProbe} lightProbe - The light probe to visualize. + * @param {number} [size=1] - The size of the helper. + */ + constructor(lightProbe: LightProbe, size?: number); + /** + * The light probe to visualize. + * + * @type {LightProbe} + */ + lightProbe: LightProbe; + /** + * The size of the helper. + * + * @type {number} + * @default 1 + */ + size: number; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeHelperGPU.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeHelperGPU.d.ts new file mode 100644 index 000000000..01864c9fb --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeHelperGPU.d.ts @@ -0,0 +1,45 @@ +/** + * Renders a sphere to visualize a light probe in the scene. + * + * This helper can only be used with {@link WebGPURenderer}. + * When using {@link WebGLRenderer}, import from `LightProbeHelper.js`. + * + * ```js + * const helper = new LightProbeHelper( lightProbe ); + * scene.add( helper ); + * ``` + * + * @private + * @augments Mesh + * @three_import import { LightProbeHelper } from 'three/addons/helpers/LightProbeHelperGPU.js'; + */ +export class LightProbeHelper extends Mesh { + /** + * Constructs a new light probe helper. + * + * @param {LightProbe} lightProbe - The light probe to visualize. + * @param {number} [size=1] - The size of the helper. + */ + constructor(lightProbe: LightProbe, size?: number); + /** + * The light probe to visualize. + * + * @type {LightProbe} + */ + lightProbe: LightProbe; + /** + * The size of the helper. + * + * @type {number} + * @default 1 + */ + size: number; + _intensity: import("three/webgpu").UniformNode; + _sh: import("three/webgpu").UniformArrayNode; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { Mesh } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/OctreeHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/OctreeHelper.d.ts new file mode 100644 index 000000000..53f7df977 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/helpers/OctreeHelper.d.ts @@ -0,0 +1,43 @@ +/** + * A helper for visualizing an Octree. + * + * ```js + * const helper = new OctreeHelper( octree ); + * scene.add( helper ); + * ``` + * + * @augments LineSegments + * @three_import import { OctreeHelper } from 'three/addons/helpers/OctreeHelper.js'; + */ +export class OctreeHelper extends LineSegments { + /** + * Constructs a new Octree helper. + * + * @param {Octree} octree - The octree to visualize. + * @param {number|Color|string} [color=0xffff00] - The helper's color. + */ + constructor(octree: Octree, color?: number | Color | string); + /** + * The octree to visualize. + * + * @type {Octree} + */ + octree: Octree; + /** + * The helper's color. + * + * @type {number|Color|string} + */ + color: number | Color | string; + /** + * Updates the helper. This method must be called whenever the Octree's + * structure is changed. + */ + update(): void; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { LineSegments } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/PositionalAudioHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/PositionalAudioHelper.d.ts new file mode 100644 index 000000000..a5f89e637 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/helpers/PositionalAudioHelper.d.ts @@ -0,0 +1,66 @@ +/** + * This helper displays the directional cone of a positional audio. + * + * `PositionalAudioHelper` must be added as a child of the positional audio. + * + * ```js + * const positionalAudio = new THREE.PositionalAudio( listener ); + * positionalAudio.setDirectionalCone( 180, 230, 0.1 ); + * scene.add( positionalAudio ); + * + * const helper = new PositionalAudioHelper( positionalAudio ); + * positionalAudio.add( helper ); + * ``` + * + * @augments Line + * @three_import import { PositionalAudioHelper } from 'three/addons/helpers/PositionalAudioHelper.js'; + */ +export class PositionalAudioHelper extends Line { + /** + * Constructs a new positional audio helper. + * + * @param {PositionalAudio} audio - The audio to visualize. + * @param {number} [range=1] - The range of the directional cone. + * @param {number} [divisionsInnerAngle=16] - The number of divisions of the inner part of the directional cone. + * @param {number} [divisionsOuterAngle=2] The number of divisions of the outer part of the directional cone. + */ + constructor(audio: PositionalAudio, range?: number, divisionsInnerAngle?: number, divisionsOuterAngle?: number); + /** + * The audio to visualize. + * + * @type {PositionalAudio} + */ + audio: PositionalAudio; + /** + * The range of the directional cone. + * + * @type {number} + * @default 1 + */ + range: number; + /** + * The number of divisions of the inner part of the directional cone. + * + * @type {number} + * @default 16 + */ + divisionsInnerAngle: number; + /** + * The number of divisions of the outer part of the directional cone. + * + * @type {number} + * @default 2 + */ + divisionsOuterAngle: number; + /** + * Updates the helper. This method must be called whenever the directional cone + * of the positional audio is changed. + */ + update(): void; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { Line } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/RapierHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/RapierHelper.d.ts new file mode 100644 index 000000000..bc3a4241f --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/helpers/RapierHelper.d.ts @@ -0,0 +1,32 @@ +/** + * This class displays all Rapier Colliders in outline. + * + * @augments LineSegments + * @three_import import { RapierHelper } from 'three/addons/helpers/RapierHelper.js'; + */ +export class RapierHelper extends LineSegments { + /** + * Constructs a new Rapier debug helper. + * + * @param {RAPIER.world} world - The Rapier world to visualize. + */ + constructor(world: RAPIER.world); + /** + * The Rapier world to visualize. + * + * @type {RAPIER.world} + */ + world: RAPIER.world; + material: LineBasicMaterial; + /** + * Call this in the render loop to update the outlines. + */ + update(): void; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { LineSegments } from 'three'; +import { LineBasicMaterial } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/RectAreaLightHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/RectAreaLightHelper.d.ts new file mode 100644 index 000000000..389cd61ce --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/helpers/RectAreaLightHelper.d.ts @@ -0,0 +1,43 @@ +/** + * Creates a visual aid for rect area lights. + * + * `RectAreaLightHelper` must be added as a child of the light. + * + * ```js + * const light = new THREE.RectAreaLight( 0xffffbb, 1.0, 5, 5 ); + * const helper = new RectAreaLightHelper( light ); + * light.add( helper ); + * ``` + * + * @augments Line + * @three_import import { RectAreaLightHelper } from 'three/addons/helpers/RectAreaLightHelper.js'; + */ +export class RectAreaLightHelper extends Line { + /** + * Constructs a new rect area light helper. + * + * @param {RectAreaLight} light - The light to visualize. + * @param {number|Color|string} [color] - The helper's color. + * If this is not the set, the helper will take the color of the light. + */ + constructor(light: RectAreaLight, color?: number | Color | string); + /** + * The light to visualize. + * + * @type {RectAreaLight} + */ + light: RectAreaLight; + /** + * The helper's color. If `undefined`, the helper will take the color of the light. + * + * @type {number|Color|string|undefined} + */ + color: number | Color | string | undefined; + updateMatrixWorld(): void; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { Line } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/TextureHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/TextureHelper.d.ts new file mode 100644 index 000000000..5ad336a81 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/helpers/TextureHelper.d.ts @@ -0,0 +1,34 @@ +/** + * A helper that can be used to display any type of texture for + * debugging purposes. Depending on the type of texture (2D, 3D, Array), + * the helper becomes a plane or box mesh. + * + * This helper can only be used with {@link WebGLRenderer}. + * When using {@link WebGPURenderer}, import from `TextureHelperGPU.js`. + * + * @augments Mesh + * @three_import import { TextureHelper } from 'three/addons/helpers/TextureHelper.js'; + */ +export class TextureHelper extends Mesh { + /** + * Constructs a new texture helper. + * + * @param {Texture} texture - The texture to visualize. + * @param {number} [width=1] - The helper's width. + * @param {number} [height=1] - The helper's height. + * @param {number} [depth=1] - The helper's depth. + */ + constructor(texture: Texture, width?: number, height?: number, depth?: number); + /** + * The texture to visualize. + * + * @type {Texture} + */ + texture: Texture; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/TextureHelperGPU.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/TextureHelperGPU.d.ts new file mode 100644 index 000000000..0f6b98a9a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/helpers/TextureHelperGPU.d.ts @@ -0,0 +1,35 @@ +/** + * A helper that can be used to display any type of texture for + * debugging purposes. Depending on the type of texture (2D, 3D, Array), + * the helper becomes a plane or box mesh. + * + * This helper can only be used with {@link WebGPURenderer}. + * When using {@link WebGLRenderer}, import from `TextureHelper.js`. + * + * @private + * @augments Mesh + * @three_import import { TextureHelper } from 'three/addons/helpers/TextureHelperGPU.js'; + */ +export class TextureHelper extends Mesh { + /** + * Constructs a new texture helper. + * + * @param {Texture} texture - The texture to visualize. + * @param {number} [width=1] - The helper's width. + * @param {number} [height=1] - The helper's height. + * @param {number} [depth=1] - The helper's depth. + */ + constructor(texture: Texture, width?: number, height?: number, depth?: number); + /** + * The texture to visualize. + * + * @type {Texture} + */ + texture: Texture; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { Mesh } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/VertexNormalsHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/VertexNormalsHelper.d.ts new file mode 100644 index 000000000..2f73276be --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/helpers/VertexNormalsHelper.d.ts @@ -0,0 +1,59 @@ +/** + * Visualizes an object's vertex normals. + * + * Requires that normals have been specified in the geometry as a buffer attribute or + * have been calculated using {@link BufferGeometry#computeVertexNormals}. + * ```js + * const geometry = new THREE.BoxGeometry( 10, 10, 10, 2, 2, 2 ); + * const material = new THREE.MeshStandardMaterial(); + * const mesh = new THREE.Mesh( geometry, material ); + * scene.add( mesh ); + * + * const helper = new VertexNormalsHelper( mesh, 1, 0xff0000 ); + * scene.add( helper ); + * ``` + * + * @augments LineSegments + * @three_import import { VertexNormalsHelper } from 'three/addons/helpers/VertexNormalsHelper.js'; + */ +export class VertexNormalsHelper extends LineSegments { + /** + * Constructs a new vertex normals helper. + * + * @param {Object3D} object - The object for which to visualize vertex normals. + * @param {number} [size=1] - The helper's size. + * @param {number|Color|string} [color=0xff0000] - The helper's color. + */ + constructor(object: Object3D, size?: number, color?: number | Color | string); + /** + * The object for which to visualize vertex normals. + * + * @type {Object3D} + */ + object: Object3D; + /** + * The helper's size. + * + * @type {number} + * @default 1 + */ + size: number; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isVertexNormalsHelper: boolean; + /** + * Updates the vertex normals preview based on the object's world transform. + */ + update(): void; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { LineSegments } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/VertexTangentsHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/VertexTangentsHelper.d.ts new file mode 100644 index 000000000..605ea6ed8 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/helpers/VertexTangentsHelper.d.ts @@ -0,0 +1,46 @@ +/** + * Visualizes an object's vertex tangents. + * + * Requires that tangents have been specified in the geometry as a buffer attribute or + * have been calculated using {@link BufferGeometry#computeTangents}. + * ```js + * const helper = new VertexTangentsHelper( mesh, 1, 0xff0000 ); + * scene.add( helper ); + * ``` + * + * @augments LineSegments + * @three_import import { VertexTangentsHelper } from 'three/addons/helpers/VertexTangentsHelper.js'; + */ +export class VertexTangentsHelper extends LineSegments { + /** + * Constructs a new vertex tangents helper. + * + * @param {Object3D} object - The object for which to visualize vertex tangents. + * @param {number} [size=1] - The helper's size. + * @param {number|Color|string} [color=0xff0000] - The helper's color. + */ + constructor(object: Object3D, size?: number, color?: number | Color | string); + /** + * The object for which to visualize vertex tangents. + * + * @type {Object3D} + */ + object: Object3D; + /** + * The helper's size. + * + * @type {number} + * @default 1 + */ + size: number; + /** + * Updates the vertex normals preview based on the object's world transform. + */ + update(): void; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { LineSegments } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/Extension.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/Extension.d.ts new file mode 100644 index 000000000..8c54bfd3f --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/inspector/Extension.d.ts @@ -0,0 +1,4 @@ +export class Extension extends Tab { + isExtension: boolean; +} +import { Tab } from 'three/addons/inspector/ui/Tab.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/Inspector.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/Inspector.d.ts new file mode 100644 index 000000000..fc89287cd --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/inspector/Inspector.d.ts @@ -0,0 +1,76 @@ +export class Inspector extends RendererInspector { + statsData: Map; + profiler: Profiler; + performance: Performance; + memory: Memory; + console: Console; + parameters: Parameters; + viewer: Viewer; + timeline: Timeline; + settings: Settings; + once: {}; + extensionsData: WeakMap; + displayCycle: { + text: { + needsUpdate: boolean; + duration: number; + time: number; + }; + graph: { + needsUpdate: boolean; + duration: number; + time: number; + }; + }; + get domElement(): HTMLDivElement | undefined; + onExtension(name: any, callback: any): this; + hide(): void; + show(): void; + getSize(): { + width: number; + height: number; + }; + setActiveTab(tab: any): this; + addTab(tab: any): this; + removeTab(tab: any): this; + setActiveExtension(name: any, value: any): this; + resolveConsoleOnce(type: any, message: any): void; + resolveConsole(type: any, message: any, stackTrace?: null): void; + setRenderer(renderer: any): this; + createParameters(name: any): { + parameters: any; + name: any; + paramList: import("./ui/Item.js").Item; + objects: any[]; + close(): /*elided*/ any; + add(object: any, property: any, ...params: any[]): import("./ui/Values.js").ValueNumber | import("./ui/Values.js").ValueCheckbox | import("./ui/Values.js").ValueSlider | import("./ui/Values.js").ValueSelect | import("./ui/Values.js").ValueButton | import("./ui/Values.js").ValueString | null; + _addInfo(editor: any, itemNode: any): void; + _addParameter(object: any, property: any, editor: any, subItem: any): void; + _registerParameter(object: any, property: any, editor: any, subItem: any): void; + addString(object: any, property: any): import("./ui/Values.js").ValueString; + addFolder(name: any): /*elided*/ any; + addBoolean(object: any, property: any): import("./ui/Values.js").ValueCheckbox; + addSelect(object: any, property: any, options: any): import("./ui/Values.js").ValueSelect; + addColor(object: any, property: any): import("./ui/Values.js").ValueColor; + addSlider(object: any, property: any, min?: number, max?: number, step?: number): import("./ui/Values.js").ValueSlider; + addNumber(object: any, property: any, ...params: any[]): import("./ui/Values.js").ValueNumber; + addButton(object: any, property: any): import("./ui/Values.js").ValueButton; + }; + getStatsData(cid: any): any; + resolveStats(stats: any): void; + getNodes(): any[] | null; + getAverageDeltaTime(statsData: any, property: any, frames?: number | undefined): number; + resolveFrame(frame: any): void; + updateCycle(cycle: any): void; +} +export function getItem(id: any): any; +export function setItem(id: any, state: any): void; +import { RendererInspector } from './RendererInspector.js'; +import { Profiler } from './ui/Profiler.js'; +import { Performance } from './tabs/Performance.js'; +import { Memory } from './tabs/Memory.js'; +import { Console } from './tabs/Console.js'; +import { Parameters } from './tabs/Parameters.js'; +import { Viewer } from './tabs/Viewer.js'; +import { Timeline } from './tabs/Timeline.js'; +import { Settings } from './tabs/Settings.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/RendererInspector.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/RendererInspector.d.ts new file mode 100644 index 000000000..211fa1dea --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/inspector/RendererInspector.d.ts @@ -0,0 +1,39 @@ +export class RendererInspector extends InspectorBase { + currentFrame: Object | null; + currentRender: any; + currentNodes: any[] | null; + lastFrame: Object | null; + frames: any[]; + framesLib: {}; + maxFrames: number; + _lastFinishTime: number; + _resolveTimestampPromise: any; + isRendererInspector: boolean; + getParent(): any; + fps: number | undefined; + _getFPS(): number; + _createFrame(): { + frameId: any; + resolvedCompute: boolean; + resolvedRender: boolean; + deltaTime: number; + startTime: number; + finishTime: number; + miscellaneous: number; + children: never[]; + renders: never[]; + computes: never[]; + }; + getFrame(): Object | null; + getFrameById(frameId: any): any; + updateTabs(): void; + resolveFrame(): void; + resolveTimestamp(): Promise; + get isAvailable(): boolean; + addFrame(frame: any): void; + inspect(node: any): void; + beginCompute(uid: any, computeNode: any): void; + currentCompute: any; + beginRender(uid: any, scene: any, camera: any, renderTarget: any): void; +} +import { InspectorBase } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/extensions/tsl-graph/TSLGraphEditor.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/extensions/tsl-graph/TSLGraphEditor.d.ts new file mode 100644 index 000000000..72ae21978 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/inspector/extensions/tsl-graph/TSLGraphEditor.d.ts @@ -0,0 +1,44 @@ +export default TSLGraphEditor; +declare class TSLGraphEditor extends Extension { + constructor(options?: {}); + autoGraphId: boolean; + iframe: HTMLIFrameElement; + editorOrigin: string; + material: any; + uniforms: any; + isReady: boolean; + _codeData: any; + _codeSaveTimeout: number | null; + _pending: Map; + _resolveReady: ((value: any) => void) | null; + _editorReady: Promise; + get hasGraphs(): boolean; + _initPicker(inspector: any): void; + apply(scene: any): this; + restoreMaterial(material: any): void; + init(inspector: any): void; + setMaterial(material: any): Promise; + loadGraph(graphData: any): Promise; + command(type: any, payload: any): Promise; + getCode(): Promise; + getTSLFunction(): Promise; + getGraph(): Promise; + onResponse(): Promise; + onEvent(type: any, payload: any): Promise; + onMessage(event: any): Promise; + _setMaterial(material: any): Promise; + materialDefault: any; + _getGraphType(material: any): "material/physical" | "material/standard" | "material/phong" | "material/basic" | "material/sprite" | "material/node"; + _showManagerModal(): void; + _exportData(): void; + _importData(): void; + getCodes(): any; + _saveCode(): void; + _restoreMaterial(): void; + _updateMaterial(): Promise; + _updateUniforms(uniforms: any): void; + _isEditorMessage(value: any): boolean; + _makeRequestId(): string; + _post(message: any): void; +} +import { Extension } from 'three/addons/inspector/Extension.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/extensions/tsl-graph/TSLGraphLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/extensions/tsl-graph/TSLGraphLoader.d.ts new file mode 100644 index 000000000..85c1dc7fc --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/inspector/extensions/tsl-graph/TSLGraphLoader.d.ts @@ -0,0 +1,24 @@ +export class TSLGraphLoader extends FileLoader { + static get hasGraphs(): boolean; + static getCodes(): any; + static setCodes(codes: any): void; + static setGraph(graphId: any, graphData: any): void; + static getGraph(graphId: any): any; + static deleteGraph(graphId: any): void; + static setGraphs(json: any): any; + static clearGraphs(): void; + constructor(manager: any); + load(url: any, onLoad: any, onProgress: any, onError: any): void; + parseMaterial(json: any): any; + parseMaterials(json: any): any; + parse(json: any): TSLGraphLoaderApplier; + _generateMaterialCode(json: any, name?: string, imports?: {}): any; + _generateCode(materials: any, imports: any): string; +} +import { FileLoader } from 'three'; +declare class TSLGraphLoaderApplier { + constructor(tslGraphFns: any); + tslGraphFns: any; + apply(scene: any): void; +} +export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Console.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Console.d.ts new file mode 100644 index 000000000..23e7c48b0 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Console.d.ts @@ -0,0 +1,17 @@ +export class Console extends Tab { + constructor(options?: {}); + filters: { + info: boolean; + warn: boolean; + error: boolean; + }; + filterText: string; + logContainer: HTMLDivElement; + buildHeader(): void; + applyFilters(): void; + copyAll(button: any): void; + _getIcon(type: any, subType: any): string | undefined; + _formatMessage(type: any, text: any): DocumentFragment; + addMessage(type: any, text: any): void; +} +import { Tab } from '../ui/Tab.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Memory.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Memory.d.ts new file mode 100644 index 000000000..934bb1515 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Memory.d.ts @@ -0,0 +1,20 @@ +export class Memory extends Tab { + constructor(options?: {}); + memoryStats: Item; + attributes: Item; + geometries: Item; + indexAttributes: Item; + indirectStorageAttributes: Item; + programs: Item; + readbackBuffers: Item; + renderTargets: Item; + storageAttributes: Item; + textures: Item; + uniformBuffers: Item; + graph: Graph; + updateGraph(inspector: any): void; + updateText(inspector: any): void; +} +import { Tab } from '../ui/Tab.js'; +import { Item } from '../ui/Item.js'; +import { Graph } from '../ui/Graph.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Parameters.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Parameters.d.ts new file mode 100644 index 000000000..e02332be8 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Parameters.d.ts @@ -0,0 +1,37 @@ +export class Parameters extends Tab { + constructor(options?: {}); + paramList: List; + groups: any[]; + createGroup(name: any): ParametersGroup; +} +import { Tab } from '../ui/Tab.js'; +import { List } from '../ui/List.js'; +declare class ParametersGroup { + constructor(parameters: any, name: any); + parameters: any; + name: any; + paramList: Item; + objects: any[]; + close(): this; + add(object: any, property: any, ...params: any[]): ValueNumber | ValueCheckbox | ValueSlider | ValueSelect | ValueButton | ValueString | null; + _addInfo(editor: any, itemNode: any): void; + _addParameter(object: any, property: any, editor: any, subItem: any): void; + _registerParameter(object: any, property: any, editor: any, subItem: any): void; + addString(object: any, property: any): ValueString; + addFolder(name: any): ParametersGroup; + addBoolean(object: any, property: any): ValueCheckbox; + addSelect(object: any, property: any, options: any): ValueSelect; + addColor(object: any, property: any): ValueColor; + addSlider(object: any, property: any, min?: number, max?: number, step?: number): ValueSlider; + addNumber(object: any, property: any, ...params: any[]): ValueNumber; + addButton(object: any, property: any): ValueButton; +} +import { Item } from '../ui/Item.js'; +import { ValueNumber } from '../ui/Values.js'; +import { ValueCheckbox } from '../ui/Values.js'; +import { ValueSlider } from '../ui/Values.js'; +import { ValueSelect } from '../ui/Values.js'; +import { ValueButton } from '../ui/Values.js'; +import { ValueString } from '../ui/Values.js'; +import { ValueColor } from '../ui/Values.js'; +export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Performance.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Performance.d.ts new file mode 100644 index 000000000..1abd6b469 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Performance.d.ts @@ -0,0 +1,20 @@ +export class Performance extends Tab { + constructor(options?: {}); + graphFpsCounter: HTMLSpanElement; + notInUse: Map; + frameStats: Item; + graphStats: Item; + graph: Graph; + miscellaneous: Item; + currentRender: any; + currentItem: any; + frameItems: Map; + resolveStats(inspector: any, stats: any): void; + updateGraph(inspector: any): void; + addNotInUse(cid: any, item: any): void; + updateNotInUse(cid: any): void; + updateText(inspector: any, frame: any): void; +} +import { Tab } from '../ui/Tab.js'; +import { Item } from '../ui/Item.js'; +import { Graph } from '../ui/Graph.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Settings.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Settings.d.ts new file mode 100644 index 000000000..99176c006 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Settings.d.ts @@ -0,0 +1,10 @@ +export class Settings extends Parameters { + constructor(); + extensions: {}; + setActiveExtension(name: any, value: any): Promise; + _updateExtensionUI(extension: any): void; + _unloadExtension(inspector: any, extension: any): Promise; + _loadExtension(inspector: any, extension: any): Promise; + _getExtensions(): Promise; +} +import { Parameters } from './Parameters.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Timeline.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Timeline.d.ts new file mode 100644 index 000000000..47583cc4f --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Timeline.d.ts @@ -0,0 +1,149 @@ +export class Timeline extends Tab { + constructor(options?: {}); + isRecording: boolean; + frames: any[]; + baseTriangles: number; + currentFrame: { + id: any; + calls: never[]; + fps: number; + triangles: number; + } | null; + isHierarchicalView: boolean; + callBlocks: WeakMap; + fallbackBlocks: any[]; + originalBackend: any; + originalMethods: Map; + renderer: any; + graph: Graph; + scrollWrapper: HTMLDivElement; + buildHeader(): void; + recordButton: HTMLButtonElement | undefined; + viewModeButton: HTMLButtonElement | undefined; + recordRefreshButton: HTMLButtonElement | undefined; + exportButton: HTMLButtonElement | undefined; + frameInfo: HTMLSpanElement | undefined; + buildUI(): void; + graphSlider: HTMLDivElement | undefined; + hoverIndicator: HTMLDivElement | undefined; + playhead: HTMLDivElement | undefined; + fixedScreenX: number | undefined; + isTrackingLatest: boolean | undefined; + isManualScrubbing: boolean | undefined; + timelineTrack: HTMLDivElement | undefined; + setRenderer(renderer: any): void; + toggleRecording(): void; + startRecording(): void; + selectedFrameIndex: any; + stopRecording(): void; + clear(): void; + exportData(): void; + getRenderTargetDetails(renderTarget: any): { + [x: string]: any; + target: any; + }; + getCallDetail(method: any, args: any): { + scene: any; + camera: any; + } | { + compute: any; + } | { + color: any; + depth: any; + stencil: any; + } | { + group: any; + count: any; + } | { + group: any; + size: string; + } | { + object: any; + } | { + name: any; + count: any; + itemSize: any; + } | { + target: any; + width: any; + height: any; + } | { + source: any; + destination: any; + } | { + magFilter: any; + minFilter: any; + wrapS: any; + wrapT: any; + anisotropy: any; + } | { + texture: any; + } | { + node: any; + bindings: number; + dispatch: any; + group?: undefined; + x?: undefined; + y?: undefined; + width?: undefined; + height?: undefined; + stage?: undefined; + name?: undefined; + } | { + group: any; + node?: undefined; + bindings?: undefined; + dispatch?: undefined; + x?: undefined; + y?: undefined; + width?: undefined; + height?: undefined; + stage?: undefined; + name?: undefined; + } | { + x: any; + y: any; + width: any; + height: any; + node?: undefined; + bindings?: undefined; + dispatch?: undefined; + group?: undefined; + stage?: undefined; + name?: undefined; + } | { + stage: any; + name: any; + node?: undefined; + bindings?: undefined; + dispatch?: undefined; + group?: undefined; + x?: undefined; + y?: undefined; + width?: undefined; + height?: undefined; + } | { + name: any; + node?: undefined; + bindings?: undefined; + dispatch?: undefined; + group?: undefined; + x?: undefined; + y?: undefined; + width?: undefined; + height?: undefined; + stage?: undefined; + } | null; + getTextureName(texture: any): any; + getTextureFilterName(filter: any): any; + getTextureWrapName(wrap: any): any; + formatDetails(details: any): string; + renderSlider(): void; + selectFrame(index: any): void; + getCallBlock(call: any, fallbackIndex: any, instanceIndex?: number): any; + renderTimelineTrack(frame: any): void; + collapsedGroups: Set | undefined; + getColorForMethod(method: any): "var(--color-green)" | "var(--text-secondary)" | "var(--color-red)" | "var(--color-yellow)"; +} +import { Tab } from '../ui/Tab.js'; +import { Graph } from '../ui/Graph.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Viewer.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Viewer.d.ts new file mode 100644 index 000000000..5f391e043 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Viewer.d.ts @@ -0,0 +1,16 @@ +export class Viewer extends Tab { + constructor(options?: {}); + itemLibrary: Map; + folderLibrary: Map; + canvasNodes: Map; + currentDataList: any[]; + nodeList: List; + nodes: Item; + getFolder(name: any): any; + addNodeItem(canvasData: any): any; + getCanvasDataByNode(renderer: any, node: any): any; + update(inspector: any): void; +} +import { Tab } from '../ui/Tab.js'; +import { List } from '../ui/List.js'; +import { Item } from '../ui/Item.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Graph.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Graph.d.ts new file mode 100644 index 000000000..d427e26b6 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Graph.d.ts @@ -0,0 +1,12 @@ +export class Graph { + constructor(maxPoints?: number); + maxPoints: number; + lines: {}; + limit: number; + limitIndex: number; + domElement: SVGSVGElement; + addLine(id: any, color: any): void; + addPoint(lineId: any, value: any): void; + resetLimit(): void; + update(): void; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Item.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Item.d.ts new file mode 100644 index 000000000..f6e7d5aae --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Item.d.ts @@ -0,0 +1,17 @@ +export class Item { + constructor(...data: any[]); + children: any[]; + isOpen: boolean; + childrenContainer: HTMLDivElement | null; + parent: any; + domElement: HTMLDivElement; + itemRow: HTMLDivElement; + userData: {}; + data: any[]; + onItemClick(e: any): void; + add(item: any, index?: number): this; + remove(item: any): this; + updateToggler(): void; + toggle(): this; + close(): this; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/List.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/List.d.ts new file mode 100644 index 000000000..50e04e4bc --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/List.d.ts @@ -0,0 +1,11 @@ +export class List { + constructor(...headers: any[]); + headers: any[]; + children: any[]; + domElement: HTMLDivElement; + id: string; + gridStyleElement: HTMLStyleElement; + setGridStyle(gridTemplate: any): void; + add(item: any): void; + remove(item: any): this; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Profiler.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Profiler.d.ts new file mode 100644 index 000000000..779270bef --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Profiler.d.ts @@ -0,0 +1,62 @@ +export class Profiler extends EventDispatcher { + constructor(inspector: any); + inspector: any; + tabs: {}; + activeTabId: any; + isResizing: boolean; + lastHeightBottom: number; + lastWidthRight: number; + position: string; + detachedWindows: any[]; + maxZIndex: number; + nextTabOriginalIndex: number; + getSize(): { + width: number; + height: number; + }; + get isMobile(): boolean; + get isSmallScreen(): boolean; + detectMobile(): boolean; + setupOrientationListener(): void; + setupWindowResizeListener(): void; + constrainWindowToBounds(windowPanel: any): void; + setupShell(): void; + domElement: HTMLDivElement | undefined; + toggleButton: HTMLButtonElement | undefined; + builtinTabsContainer: Element | null | undefined; + miniPanel: HTMLDivElement | undefined; + panel: HTMLDivElement | undefined; + tabsContainer: HTMLDivElement | undefined; + floatingBtn: HTMLButtonElement | undefined; + maximizeBtn: HTMLButtonElement | undefined; + contentWrapper: HTMLDivElement | undefined; + setupResizing(): void; + toggleMaximize(): void; + hide(): void; + show(tab: any): void; + addTab(tab: any): void; + addBuiltinTab(tab: any): void; + removeTab(tab: any): void; + updatePanelSize(): void; + setupTabDragAndDrop(tab: any): void; + createPreviewWindow(tab: any, x: any, y: any): HTMLDivElement; + detachTab(tab: any, x: any, y: any): void; + createDetachedWindow(tab: any, x: any, y: any): { + panel: HTMLDivElement; + tab: any; + }; + bringWindowToFront(windowPanel: any): void; + setupDetachedWindowDrag(windowPanel: any, header: any, tab: any): void; + setupDetachedWindowResize(windowPanel: any, resizerTop: any, resizerRight: any, resizerBottom: any, resizerLeft: any, resizerCorner: any): void; + reattachTab(tab: any): void; + setActiveTab(id: any): void; + togglePanel(): void; + togglePosition(): void; + setPosition(targetPosition: any): void; + saveLayout(): void; + loadLayout(): void; + isLoadingLayout: boolean | undefined; + pendingDetachedTabs: any; + restoreDetachedTabs(): void; +} +import { EventDispatcher } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Style.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Style.d.ts new file mode 100644 index 000000000..7889785be --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Style.d.ts @@ -0,0 +1,3 @@ +export class Style { + static init(container: any): void; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Tab.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Tab.d.ts new file mode 100644 index 000000000..83cfb5d9e --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Tab.d.ts @@ -0,0 +1,53 @@ +/** + * Tab class + * @param {string} title - The title of the tab + * @param {Object} options - Options for the tab + * @param {boolean} [options.allowDetach=true] - Whether the tab can be detached into a separate window + * @param {boolean} [options.builtin=false] - Whether the tab should appear in the profiler-toggle button + * @param {string} [options.icon] - SVG icon HTML for the builtin button + * + * @example + * // Create a tab that can be detached (default behavior) + * const tab1 = new Tab('My Tab'); + * + * // Create a tab that cannot be detached + * const tab2 = new Tab('Fixed Tab', { allowDetach: false }); + * + * // Create a builtin tab that appears in the profiler-toggle + * const tab3 = new Tab('Builtin Tab', { builtin: true }); + * + * // Create a builtin tab with custom icon + * const tab4 = new Tab('Settings', { builtin: true, icon: '...' }); + * + * // Control builtin tab visibility + * tab3.showBuiltin(); // Show the builtin button and mini-content + * tab3.hideBuiltin(); // Hide the builtin button and mini-content + */ +export class Tab extends EventDispatcher { + constructor(title: any, options?: {}); + id: any; + button: HTMLButtonElement; + content: HTMLDivElement; + _isActive: boolean; + isVisible: boolean; + isDetached: boolean; + detachedWindow: any; + allowDetach: any; + builtin: any; + icon: any; + builtinButton: any; + miniContent: any; + profiler: any; + onVisibilityChange: any; + get inspector(): any; + set isActive(value: boolean); + get isActive(): boolean; + init(): void; + update(): void; + setActive(isActive: any): void; + show(): void; + hide(): void; + showBuiltin(): void; + hideBuiltin(): void; +} +import { EventDispatcher } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Values.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Values.d.ts new file mode 100644 index 000000000..60dca2908 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Values.d.ts @@ -0,0 +1,75 @@ +export class Value extends EventDispatcher { + domElement: HTMLDivElement; + _onChangeFunction: any; + setValue(): this; + getValue(): null; + dispatchChange(): void; + onChange(callback: any): this; +} +export class ValueNumber extends Value { + constructor({ value, step, min, max }: { + value?: number | undefined; + step?: number | undefined; + min?: number | undefined; + max?: number | undefined; + }); + input: HTMLInputElement; + _onChangeValue(): void; + addDragHandler(): void; + setValue(val: any): this; + getValue(): number; +} +export class ValueString extends Value { + constructor({ value }: { + value?: string | undefined; + }); + input: HTMLInputElement; + setValue(val: any): this; + getValue(): string; +} +export class ValueCheckbox extends Value { + constructor({ value }: { + value?: boolean | undefined; + }); + checkbox: HTMLInputElement; + setValue(val: any): this; + getValue(): boolean; +} +export class ValueSlider extends Value { + constructor({ value, min, max, step }: { + value?: number | undefined; + min?: number | undefined; + max?: number | undefined; + step?: number | undefined; + }); + slider: HTMLInputElement; + numberInput: HTMLInputElement; + setValue(val: any): this; + getValue(): number; + step(value: any): this; +} +export class ValueSelect extends Value { + constructor({ options, value }: { + options?: never[] | undefined; + value?: string | undefined; + }); + options: any[]; + select: HTMLSelectElement; + getValue(): any; +} +export class ValueColor extends Value { + constructor({ value }: { + value?: string | undefined; + }); + colorInput: HTMLInputElement; + _value: string; + _getColorHex(color: any): any; + getValue(): string; +} +export class ValueButton extends Value { + constructor({ text, value }: { + text?: string | undefined; + value?: (() => void) | undefined; + }); +} +import { EventDispatcher } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/utils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/utils.d.ts new file mode 100644 index 000000000..20e4088f4 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/utils.d.ts @@ -0,0 +1,9 @@ +export function createValueSpan(): HTMLSpanElement; +export function setText(element: any, text: any): void; +export function getText(element: any): any; +export function splitPath(fullPath: any): { + path: any; + name: any; +}; +export function splitCamelCase(str: any): any; +export function formatBytes(bytes: any, decimals?: number): string; diff --git a/jsdoc-testing/jsdoc/examples/jsm/interaction/InteractionManager.d.ts b/jsdoc-testing/jsdoc/examples/jsm/interaction/InteractionManager.d.ts new file mode 100644 index 000000000..b71532d01 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/interaction/InteractionManager.d.ts @@ -0,0 +1,77 @@ +/** + * Manages interaction for 3D objects independently of the scene graph. + * + * For objects with an {@link HTMLTexture}, the manager computes CSS `matrix3d` + * transforms each frame so the underlying HTML elements stay aligned with + * their meshes. Because the elements are children of the canvas, the browser + * dispatches pointer events to them natively. + * + * ```js + * const interactions = new InteractionManager(); + * interactions.connect( renderer, camera ); + * + * // Objects live anywhere in the scene graph + * scene.add( mesh ); + * + * // Register for interaction separately + * interactions.add( mesh ); + * + * // In the animation loop + * interactions.update(); + * ``` + * @three_import import { InteractionManager } from 'three/addons/interaction/InteractionManager.js'; + */ +export class InteractionManager { + /** + * The registered interactive objects. + * + * @type {Array} + */ + objects: Array; + /** + * The canvas element. + * + * @type {?HTMLCanvasElement} + * @default null + */ + element: HTMLCanvasElement | null; + /** + * The camera used for computing the element transforms. + * + * @type {?Camera} + * @default null + */ + camera: Camera | null; + _cachedCssW: number; + _cachedCssH: number; + /** + * Adds one or more objects to the manager. + * + * @param {...Object3D} objects - The objects to add. + * @return {this} + */ + add(...objects: Object3D[]): this; + /** + * Removes one or more objects from the manager. + * + * @param {...Object3D} objects - The objects to remove. + * @return {this} + */ + remove(...objects: Object3D[]): this; + /** + * Stores the renderer and camera needed for computing element transforms. + * + * @param {(WebGPURenderer|WebGLRenderer)} renderer - The renderer. + * @param {Camera} camera - The camera. + */ + connect(renderer: (WebGPURenderer | WebGLRenderer), camera: Camera): void; + /** + * Updates the element transforms for all registered objects. + * Call this once per frame in the animation loop. + */ + update(): void; + /** + * Disconnects this manager, clearing the renderer and camera references. + */ + disconnect(): void; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/interactive/HTMLMesh.d.ts b/jsdoc-testing/jsdoc/examples/jsm/interactive/HTMLMesh.d.ts new file mode 100644 index 000000000..6631c6734 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/interactive/HTMLMesh.d.ts @@ -0,0 +1,31 @@ +/** + * This class can be used to render a DOM element onto a canvas and use it as a texture + * for a plane mesh. + * + * A typical use case for this class is to render the GUI of `lil-gui` as a texture so it + * is compatible for VR. + * + * ```js + * const gui = new GUI( { width: 300 } ); // create lil-gui instance + * + * const mesh = new HTMLMesh( gui.domElement ); + * scene.add( mesh ); + * ``` + * + * @augments Mesh + * @three_import import { HTMLMesh } from 'three/addons/interactive/HTMLMesh.js'; + */ +export class HTMLMesh extends Mesh { + /** + * Constructs a new HTML mesh. + * + * @param {HTMLElement} dom - The DOM element to display as a plane mesh. + */ + constructor(dom: HTMLElement); + /** + * Frees the GPU-related resources allocated by this instance and removes all event listeners. + * Call this method whenever this instance is no longer used in your app. + */ + dispose: () => void; +} +import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/interactive/InteractiveGroup.d.ts b/jsdoc-testing/jsdoc/examples/jsm/interactive/InteractiveGroup.d.ts new file mode 100644 index 000000000..f05136dc0 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/interactive/InteractiveGroup.d.ts @@ -0,0 +1,81 @@ +/** + * This class can be used to group 3D objects in an interactive group. + * The group itself can listen to Pointer, Mouse or XR controller events to + * detect selections of descendant 3D objects. If a 3D object is selected, + * the respective event is going to dispatched to it. + * + * ```js + * const group = new InteractiveGroup(); + * group.listenToPointerEvents( renderer, camera ); + * group.listenToXRControllerEvents( controller1 ); + * group.listenToXRControllerEvents( controller2 ); + * scene.add( group ); + * + * // now add objects that should be interactive + * group.add( mesh1, mesh2, mesh3 ); + * ``` + * @augments Group + * @three_import import { InteractiveGroup } from 'three/addons/interactive/InteractiveGroup.js'; + */ +export class InteractiveGroup extends Group { + /** + * The internal raycaster. + * + * @type {Raycaster} + */ + raycaster: Raycaster; + /** + * The internal raycaster. + * + * @type {?HTMLElement} + * @default null + */ + element: HTMLElement | null; + /** + * The camera used for raycasting. + * + * @type {?Camera} + * @default null + */ + camera: Camera | null; + /** + * An array of XR controllers. + * + * @type {Array} + */ + controllers: Array; + _onPointerEvent: (event: any) => void; + _onXRControllerEvent: (event: any) => void; + onPointerEvent(event: any): void; + onXRControllerEvent(event: any): void; + /** + * Calling this method makes sure the interactive group listens to Pointer and Mouse events. + * The target is the `domElement` of the given renderer. The camera is required for the internal + * raycasting so 3D objects can be detected based on the events. + * + * @param {(WebGPURenderer|WebGLRenderer)} renderer - The renderer. + * @param {Camera} camera - The camera. + */ + listenToPointerEvents(renderer: (WebGPURenderer | WebGLRenderer), camera: Camera): void; + /** + * Disconnects this interactive group from all Pointer and Mouse Events. + */ + disconnectionPointerEvents(): void; + /** + * Calling this method makes sure the interactive group listens to events of + * the given XR controller. + * + * @param {Group} controller - The XR controller. + */ + listenToXRControllerEvents(controller: Group): void; + /** + * Disconnects this interactive group from all XR controllers. + */ + disconnectXrControllerEvents(): void; + /** + * Disconnects this interactive group from the DOM and all XR controllers. + */ + disconnect(): void; +} +import { Group } from 'three'; +import { Raycaster } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/interactive/SelectionBox.d.ts b/jsdoc-testing/jsdoc/examples/jsm/interactive/SelectionBox.d.ts new file mode 100644 index 000000000..7bd19c5bc --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/interactive/SelectionBox.d.ts @@ -0,0 +1,83 @@ +/** + * This class can be used to select 3D objects in a scene with a selection box. + * It is recommended to visualize the selected area with the help of {@link SelectionHelper}. + * + * ```js + * const selectionBox = new SelectionBox( camera, scene ); + * const selectedObjects = selectionBox.select( startPoint, endPoint ); + * ``` + * + * @three_import import { SelectionBox } from 'three/addons/interactive/SelectionBox.js'; + */ +export class SelectionBox { + /** + * Constructs a new selection box. + * + * @param {Camera} camera - The camera the scene is rendered with. + * @param {Scene} scene - The scene. + * @param {number} [deep=Number.MAX_VALUE] - How deep the selection frustum of perspective cameras should extend. + */ + constructor(camera: Camera, scene: Scene, deep?: number); + /** + * The camera the scene is rendered with. + * + * @type {Camera} + */ + camera: Camera; + /** + * The camera the scene is rendered with. + * + * @type {Scene} + */ + scene: Scene; + /** + * The start point of the selection. + * + * @type {Vector3} + */ + startPoint: Vector3; + /** + * The end point of the selection. + * + * @type {Vector3} + */ + endPoint: Vector3; + /** + * The selected 3D objects. + * + * @type {Array} + */ + collection: Array; + /** + * The selected instance IDs of instanced meshes. + * + * @type {Object} + */ + instances: Object; + /** + * The selected batches of batched meshes. + * + * @type {Object} + */ + batches: Object; + /** + * How deep the selection frustum of perspective cameras should extend. + * + * @type {number} + * @default Number.MAX_VALUE + */ + deep: number; + /** + * This method selects 3D objects in the scene based on the given start + * and end point. If no parameters are provided, the method uses the start + * and end values of the respective members. + * + * @param {Vector3} [startPoint] - The start point. + * @param {Vector3} [endPoint] - The end point. + * @return {Array} The selected 3D objects. + */ + select(startPoint?: Vector3, endPoint?: Vector3): Array; + _updateFrustum(startPoint: any, endPoint: any): void; + _searchChildInFrustum(frustum: any, object: any): void; +} +import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/ammo.wasm.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/ammo.wasm.d.ts new file mode 100644 index 000000000..53124ae4f --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/ammo.wasm.d.ts @@ -0,0 +1,6 @@ +export = Ammo; +declare function Ammo(Ammo: any): any; +declare class Ammo { + constructor(Ammo: any); + Ammo: any; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/basis/basis_transcoder.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/basis/basis_transcoder.d.ts new file mode 100644 index 000000000..a141857f4 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/basis/basis_transcoder.d.ts @@ -0,0 +1,2 @@ +export = BASIS; +declare function BASIS(moduleArg?: {}): Promise; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/chevrotain.module.min.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/chevrotain.module.min.d.ts new file mode 100644 index 000000000..5298df7f0 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/chevrotain.module.min.d.ts @@ -0,0 +1,2 @@ +declare const _default: any; +export default _default; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/demuxer_mp4.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/demuxer_mp4.d.ts new file mode 100644 index 000000000..007913507 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/demuxer_mp4.d.ts @@ -0,0 +1,8 @@ +export class MP4Demuxer { + constructor(uri: any, { onConfig, onChunk, setStatus }: { + onConfig: any; + onChunk: any; + setStatus: any; + }); + #private; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_decoder.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_decoder.d.ts new file mode 100644 index 000000000..8367943c4 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_decoder.d.ts @@ -0,0 +1,5 @@ +export = DracoDecoderModule; +declare function DracoDecoderModule(DracoDecoderModule?: {}): any; +declare namespace DracoDecoderModule { + export { DracoDecoderModule }; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_encoder.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_encoder.d.ts new file mode 100644 index 000000000..1c63c0411 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_encoder.d.ts @@ -0,0 +1,5 @@ +export = DracoEncoderModule; +declare function DracoEncoderModule(DracoEncoderModule: any, ...args: any[]): any; +declare namespace DracoEncoderModule { + export { DracoEncoderModule }; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_wasm_wrapper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_wasm_wrapper.d.ts new file mode 100644 index 000000000..e973d4a6a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_wasm_wrapper.d.ts @@ -0,0 +1,5 @@ +export = DracoDecoderModule; +declare function DracoDecoderModule(n: any): any; +declare namespace DracoDecoderModule { + export { DracoDecoderModule }; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_decoder.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_decoder.d.ts new file mode 100644 index 000000000..8367943c4 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_decoder.d.ts @@ -0,0 +1,5 @@ +export = DracoDecoderModule; +declare function DracoDecoderModule(DracoDecoderModule?: {}): any; +declare namespace DracoDecoderModule { + export { DracoDecoderModule }; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_encoder.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_encoder.d.ts new file mode 100644 index 000000000..1c63c0411 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_encoder.d.ts @@ -0,0 +1,5 @@ +export = DracoEncoderModule; +declare function DracoEncoderModule(DracoEncoderModule: any, ...args: any[]): any; +declare namespace DracoEncoderModule { + export { DracoEncoderModule }; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_wasm_wrapper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_wasm_wrapper.d.ts new file mode 100644 index 000000000..e973d4a6a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_wasm_wrapper.d.ts @@ -0,0 +1,5 @@ +export = DracoDecoderModule; +declare function DracoDecoderModule(n: any): any; +declare namespace DracoDecoderModule { + export { DracoDecoderModule }; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/ecsy.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/ecsy.module.d.ts new file mode 100644 index 000000000..092baee43 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/ecsy.module.d.ts @@ -0,0 +1,344 @@ +export class Component { + constructor(props: any); + _pool: any; + copy(source: any): this; + clone(): any; + reset(): void; + dispose(): void; + getName(): any; + checkUndefinedAttributes(src: any): void; +} +export namespace Component { + let schema: {}; + let isComponent: boolean; + function getName(): any; +} +export function Not(Component: any): { + operator: string; + Component: any; +}; +export class ObjectPool { + constructor(T: any, initialSize: any); + freeList: any[]; + count: number; + T: any; + isObjectPool: boolean; + acquire(): any; + release(item: any): void; + expand(count: any): void; + totalSize(): number; + totalFree(): number; + totalUsed(): number; +} +export class System { + constructor(world: any, attributes: any); + canExecute(): boolean; + getName(): any; + world: any; + enabled: boolean; + _queries: {}; + queries: {}; + priority: any; + executeTime: number; + _mandatoryQueries: any[]; + initialized: boolean; + stop(): void; + play(): void; + clearEvents(): void; + toJSON(): { + name: any; + enabled: boolean; + executeTime: number; + priority: any; + queries: {}; + }; +} +export namespace System { + let isSystem: boolean; + function getName(): any; +} +export class SystemStateComponent extends Component { +} +export namespace SystemStateComponent { + let isSystemStateComponent: boolean; +} +export class TagComponent extends Component { + constructor(); +} +export namespace TagComponent { + let isTagComponent: boolean; +} +export namespace Types { + let Number: any; + let Boolean: any; + let String: any; + let Array: any; + let Ref: any; + let JSON: any; +} +export const Version: "0.3.1"; +export class World { + constructor(options?: {}); + options: { + entityPoolSize: number; + entityClass: typeof Entity; + }; + componentsManager: ComponentManager; + entityManager: EntityManager; + systemManager: SystemManager; + enabled: boolean; + eventQueues: {}; + lastTime: number; + registerComponent(Component: any, objectPool: any): this; + registerSystem(System: any, attributes: any): this; + hasRegisteredComponent(Component: any): boolean; + unregisterSystem(System: any): this; + getSystem(SystemClass: any): any; + getSystems(): any[]; + execute(delta: any, time: any): void; + stop(): void; + play(): void; + createEntity(name: any): any; + stats(): { + entities: { + numEntities: number; + numQueries: number; + queries: {}; + numComponentPool: number; + componentPool: {}; + eventDispatcher: { + fired: number; + handled: number; + }; + }; + system: { + numSystems: number; + systems: {}; + }; + }; +} +declare class Entity { + constructor(entityManager: any); + _entityManager: any; + id: number; + _ComponentTypes: any[]; + _components: {}; + _componentsToRemove: {}; + queries: any[]; + _ComponentTypesToRemove: any[]; + alive: boolean; + numStateComponents: number; + getComponent(Component: any, includeRemoved: any): any; + getRemovedComponent(Component: any): any; + getComponents(): {}; + getComponentsToRemove(): {}; + getComponentTypes(): any[]; + getMutableComponent(Component: any): any; + addComponent(Component: any, values: any): this; + removeComponent(Component: any, forceImmediate: any): this; + hasComponent(Component: any, includeRemoved: any): boolean; + hasRemovedComponent(Component: any): boolean; + hasAllComponents(Components: any): boolean; + hasAnyComponents(Components: any): boolean; + removeAllComponents(forceImmediate: any): any; + copy(src: any): this; + clone(): Entity; + reset(): void; + remove(forceImmediate: any): any; +} +export function cloneArray(src: any): any; +export function cloneClonable(src: any): any; +export function cloneJSON(src: any): any; +export function cloneValue(src: any): any; +export function copyArray(src: any, dest: any): any; +export function copyCopyable(src: any, dest: any): any; +export function copyJSON(src: any): any; +export function copyValue(src: any): any; +export function createType(typeDefinition: any): any; +export function enableRemoteDevtools(remoteId: any): void; +declare class ComponentManager { + Components: any[]; + _ComponentsMap: {}; + _componentPool: {}; + numComponents: {}; + nextComponentId: number; + hasComponent(Component: any): boolean; + registerComponent(Component: any, objectPool: any): void; + componentAddedToEntity(Component: any): void; + componentRemovedFromEntity(Component: any): void; + getComponentsPool(Component: any): any; +} +/** + * @private + * @class EntityManager + */ +declare class EntityManager { + constructor(world: any); + world: any; + componentsManager: any; + _entities: any[]; + _nextEntityId: number; + _entitiesByNames: {}; + _queryManager: QueryManager; + eventDispatcher: EventDispatcher; + _entityPool: EntityPool; + entitiesWithComponentsToRemove: any[]; + entitiesToRemove: any[]; + deferredRemovalEnabled: boolean; + getEntityByName(name: any): any; + /** + * Create a new entity + */ + createEntity(name: any): any; + /** + * Add a component to an entity + * @param {Entity} entity Entity where the component will be added + * @param {Component} Component Component to be added to the entity + * @param {Object} values Optional values to replace the default attributes + */ + entityAddComponent(entity: Entity, Component: Component, values: Object): void; + /** + * Remove a component from an entity + * @param {Entity} entity Entity which will get removed the component + * @param {*} Component Component to remove from the entity + * @param {Bool} immediately If you want to remove the component immediately instead of deferred (Default is false) + */ + entityRemoveComponent(entity: Entity, Component: any, immediately: Bool): void; + _entityRemoveComponentSync(entity: any, Component: any, index: any): void; + /** + * Remove all the components from an entity + * @param {Entity} entity Entity from which the components will be removed + */ + entityRemoveAllComponents(entity: Entity, immediately: any): void; + /** + * Remove the entity from this manager. It will clear also its components + * @param {Entity} entity Entity to remove from the manager + * @param {Bool} immediately If you want to remove the component immediately instead of deferred (Default is false) + */ + removeEntity(entity: Entity, immediately: Bool): void; + _releaseEntity(entity: any, index: any): void; + /** + * Remove all entities from this manager + */ + removeAllEntities(): void; + processDeferredRemoval(): void; + /** + * Get a query based on a list of components + * @param {Array(Component)} Components List of components that will form the query + */ + queryComponents(Components: any): any; + /** + * Return number of entities + */ + count(): number; + /** + * Return some stats + */ + stats(): { + numEntities: number; + numQueries: number; + queries: {}; + numComponentPool: number; + componentPool: {}; + eventDispatcher: { + fired: number; + handled: number; + }; + }; +} +declare class SystemManager { + constructor(world: any); + _systems: any[]; + _executeSystems: any[]; + world: any; + lastExecutedSystem: any; + registerSystem(SystemClass: any, attributes: any): this; + unregisterSystem(SystemClass: any): this; + sortSystems(): void; + getSystem(SystemClass: any): any; + getSystems(): any[]; + removeSystem(SystemClass: any): void; + executeSystem(system: any, delta: any, time: any): void; + stop(): void; + execute(delta: any, time: any, forcePlay: any): void; + stats(): { + numSystems: number; + systems: {}; + }; +} +/** + * @private + * @class QueryManager + */ +declare class QueryManager { + constructor(world: any); + _world: any; + _queries: {}; + onEntityRemoved(entity: any): void; + /** + * Callback when a component is added to an entity + * @param {Entity} entity Entity that just got the new component + * @param {Component} Component Component added to the entity + */ + onEntityComponentAdded(entity: Entity, Component: Component): void; + /** + * Callback when a component is removed from an entity + * @param {Entity} entity Entity to remove the component from + * @param {Component} Component Component to remove from the entity + */ + onEntityComponentRemoved(entity: Entity, Component: Component): void; + /** + * Get a query for the specified components + * @param {Component} Components Components that the query should have + */ + getQuery(Components: Component): any; + /** + * Return some stats from this class + */ + stats(): {}; +} +/** + * @private + * @class EventDispatcher + */ +declare class EventDispatcher { + _listeners: {}; + stats: { + fired: number; + handled: number; + }; + /** + * Add an event listener + * @param {String} eventName Name of the event to listen + * @param {Function} listener Callback to trigger when the event is fired + */ + addEventListener(eventName: string, listener: Function): void; + /** + * Check if an event listener is already added to the list of listeners + * @param {String} eventName Name of the event to check + * @param {Function} listener Callback for the specified event + */ + hasEventListener(eventName: string, listener: Function): boolean; + /** + * Remove an event listener + * @param {String} eventName Name of the event to remove + * @param {Function} listener Callback for the specified event + */ + removeEventListener(eventName: string, listener: Function): void; + /** + * Dispatch an event + * @param {String} eventName Name of the event to dispatch + * @param {Entity} entity (Optional) Entity to emit + * @param {Component} component + */ + dispatchEvent(eventName: string, entity: Entity, component: Component): void; + /** + * Reset stats counters + */ + resetCounters(): void; +} +declare class EntityPool extends ObjectPool { + constructor(entityManager: any, entityClass: any, initialSize: any); + entityManager: any; +} +export { Entity as _Entity }; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/ktx-parse.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/ktx-parse.module.d.ts new file mode 100644 index 000000000..40983ceda --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/ktx-parse.module.d.ts @@ -0,0 +1,299 @@ +declare const Z: 15; +declare const q: 2; +declare const Q: 14; +declare const G: 1; +declare const R: 0; +declare const J: 13; +declare const u: 1; +declare const _: 0; +declare const s: 0; +declare const U: 162; +declare const f: 160; +declare const h: 163; +declare const c: 161; +declare const l: 1; +declare const p: 166; +declare const o: 0; +declare const H: 6; +declare const z: 7; +declare const Y: 11; +declare const N: 4; +declare const P: 2; +declare const M: 3; +declare const E: 1; +declare const W: 5; +declare const X: 10; +declare const j: 8; +declare const K: 9; +declare const S: 0; +declare const et: 32; +declare const $: 128; +declare const nt: 16; +declare const tt: 64; +declare const F: 16; +declare const O: 17; +declare const T: 18; +declare const w: 7; +declare const k: 12; +declare const B: 9; +declare const v: 8; +declare const b: 3; +declare const x: 1; +declare const m: 4; +declare const V: 14; +declare const I: 13; +declare const L: 10; +declare const A: 11; +declare const d: 5; +declare const D: 6; +declare const y: 2; +declare const C: 15; +declare const g: 0; +declare const a: 0; +declare const r: 2; +declare const e: 1; +declare const t: 0; +declare const i: 3; +declare const n: 2; +declare const Ut: 8; +declare const qt: 69; +declare const Rt: 65; +declare const Gt: 68; +declare const Yt: 64; +declare const Xt: 63; +declare const jt: 59; +declare const Kt: 62; +declare const zt: 58; +declare const Ii: 1000340001; +declare const ki: 1000340000; +declare const Bi: 1000066011; +declare const Xn: 180; +declare const Kn: 179; +declare const Di: 1000066008; +declare const Nn: 174; +declare const Mn: 173; +declare const wi: 1000066009; +declare const Hn: 176; +declare const Wn: 175; +declare const vi: 1000066010; +declare const jn: 178; +declare const zn: 177; +declare const Li: 1000066012; +declare const Rn: 182; +declare const Yn: 181; +declare const Ai: 1000066013; +declare const qn: 184; +declare const Gn: 183; +declare const _i: 1000066000; +declare const wn: 158; +declare const Dn: 157; +declare const ui: 1000066001; +declare const Bn: 160; +declare const vn: 159; +declare const gi: 1000066002; +declare const An: 162; +declare const Ln: 161; +declare const xi: 1000066003; +declare const In: 164; +declare const kn: 163; +declare const yi: 1000066004; +declare const Cn: 166; +declare const Vn: 165; +declare const bi: 1000066005; +declare const On: 168; +declare const Fn: 167; +declare const mi: 1000066006; +declare const Sn: 170; +declare const Tn: 169; +declare const di: 1000066007; +declare const Pn: 172; +declare const En: 171; +declare const We: 122; +declare const ti: 1000156011; +declare const ai: 1000156021; +declare const rt: 3; +declare const ct: 7; +declare const lt: 5; +declare const Wt: 49; +declare const Mt: 45; +declare const Ht: 50; +declare const Nt: 48; +declare const Pt: 44; +declare const Vt: 35; +declare const kt: 31; +declare const Ct: 36; +declare const It: 34; +declare const At: 30; +declare const Ze: 134; +declare const Qe: 133; +declare const Je: 132; +declare const qe: 131; +declare const tn: 136; +declare const $e: 135; +declare const nn: 138; +declare const en: 137; +declare const an: 140; +declare const sn: 139; +declare const on: 142; +declare const rn: 141; +declare const fn: 144; +declare const ln: 143; +declare const Un: 146; +declare const cn: 145; +declare const ze: 124; +declare const Ye: 128; +declare const Re: 129; +declare const Ke: 126; +declare const Ge: 130; +declare const He: 123; +declare const dn: 156; +declare const mn: 155; +declare const bn: 154; +declare const yn: 153; +declare const un: 150; +declare const _n: 149; +declare const xn: 152; +declare const gn: 151; +declare const pn: 148; +declare const hn: 147; +declare const $n: 1000156010; +declare const si: 1000156020; +declare const ci: 1000054004; +declare const ri: 1000054000; +declare const Ui: 1000054005; +declare const oi: 1000054001; +declare const hi: 1000054006; +declare const li: 1000054002; +declare const pi: 1000054007; +declare const fi: 1000054003; +declare const Zn: 1000156009; +declare const Qn: 1000156008; +declare const Jn: 1000156007; +declare const ii: 1000156019; +declare const ni: 1000156018; +declare const ei: 1000156017; +declare const ue: 97; +declare const _e: 96; +declare const he: 92; +declare const pe: 95; +declare const Ue: 91; +declare const ce: 90; +declare const fe: 89; +declare const oe: 85; +declare const le: 88; +declare const re: 84; +declare const ae: 83; +declare const se: 82; +declare const ne: 78; +declare const ie: 81; +declare const ee: 77; +declare const te: 76; +declare const $t: 75; +declare const Qt: 71; +declare const Zt: 74; +declare const Jt: 70; +declare const Ae: 109; +declare const Le: 108; +declare const Be: 107; +declare const ve: 106; +declare const we: 105; +declare const De: 104; +declare const de: 103; +declare const me: 102; +declare const be: 101; +declare const ye: 100; +declare const xe: 99; +declare const ge: 98; +declare const at: 2; +declare const st: 1; +declare const ft: 6; +declare const ot: 4; +declare const Ne: 121; +declare const Me: 120; +declare const Pe: 119; +declare const Ee: 118; +declare const Se: 117; +declare const Te: 116; +declare const Oe: 115; +declare const Fe: 114; +declare const Ce: 113; +declare const Ve: 112; +declare const Ie: 111; +declare const ke: 110; +declare const St: 42; +declare const Ot: 38; +declare const Et: 43; +declare const Tt: 41; +declare const Ft: 37; +declare const Bt: 28; +declare const wt: 24; +declare const Lt: 29; +declare const vt: 27; +declare const Dt: 23; +declare const mt: 21; +declare const yt: 17; +declare const dt: 22; +declare const bt: 20; +declare const xt: 16; +declare const ut: 14; +declare const pt: 10; +declare const gt: 15; +declare const _t: 13; +declare const ht: 9; +declare const Xe: 127; +declare const it: 0; +declare const je: 125; +declare function Vi(): { + vkFormat: number; + typeSize: number; + pixelWidth: number; + pixelHeight: number; + pixelDepth: number; + layerCount: number; + faceCount: number; + levelCount: number; + supercompressionScheme: number; + levels: never[]; + dataFormatDescriptor: { + vendorId: number; + descriptorType: number; + versionNumber: number; + colorModel: number; + colorPrimaries: number; + transferFunction: number; + flags: number; + texelBlockDimension: number[]; + bytesPlane: number[]; + samples: never[]; + }[]; + keyValue: {}; + globalData: null; +}; +declare function Mi(t: any): { + vkFormat: number; + typeSize: number; + pixelWidth: number; + pixelHeight: number; + pixelDepth: number; + layerCount: number; + faceCount: number; + levelCount: number; + supercompressionScheme: number; + levels: never[]; + dataFormatDescriptor: { + vendorId: number; + descriptorType: number; + versionNumber: number; + colorModel: number; + colorPrimaries: number; + transferFunction: number; + flags: number; + texelBlockDimension: number[]; + bytesPlane: number[]; + samples: never[]; + }[]; + keyValue: {}; + globalData: null; +}; +declare function Hi(t: any, e?: {}): Uint8Array; +export { Z as KHR_DF_CHANNEL_RGBSDA_ALPHA, q as KHR_DF_CHANNEL_RGBSDA_BLUE, Q as KHR_DF_CHANNEL_RGBSDA_DEPTH, G as KHR_DF_CHANNEL_RGBSDA_GREEN, R as KHR_DF_CHANNEL_RGBSDA_RED, J as KHR_DF_CHANNEL_RGBSDA_STENCIL, u as KHR_DF_FLAG_ALPHA_PREMULTIPLIED, _ as KHR_DF_FLAG_ALPHA_STRAIGHT, s as KHR_DF_KHR_DESCRIPTORTYPE_BASICFORMAT, U as KHR_DF_MODEL_ASTC, f as KHR_DF_MODEL_ETC1, h as KHR_DF_MODEL_ETC1S, c as KHR_DF_MODEL_ETC2, l as KHR_DF_MODEL_RGBSDA, p as KHR_DF_MODEL_UASTC, o as KHR_DF_MODEL_UNSPECIFIED, H as KHR_DF_PRIMARIES_ACES, z as KHR_DF_PRIMARIES_ACESCC, Y as KHR_DF_PRIMARIES_ADOBERGB, N as KHR_DF_PRIMARIES_BT2020, P as KHR_DF_PRIMARIES_BT601_EBU, M as KHR_DF_PRIMARIES_BT601_SMPTE, E as KHR_DF_PRIMARIES_BT709, W as KHR_DF_PRIMARIES_CIEXYZ, X as KHR_DF_PRIMARIES_DISPLAYP3, j as KHR_DF_PRIMARIES_NTSC1953, K as KHR_DF_PRIMARIES_PAL525, S as KHR_DF_PRIMARIES_UNSPECIFIED, et as KHR_DF_SAMPLE_DATATYPE_EXPONENT, $ as KHR_DF_SAMPLE_DATATYPE_FLOAT, nt as KHR_DF_SAMPLE_DATATYPE_LINEAR, tt as KHR_DF_SAMPLE_DATATYPE_SIGNED, F as KHR_DF_TRANSFER_ACESCC, O as KHR_DF_TRANSFER_ACESCCT, T as KHR_DF_TRANSFER_ADOBERGB, w as KHR_DF_TRANSFER_BT1886, k as KHR_DF_TRANSFER_DCIP3, B as KHR_DF_TRANSFER_HLG_EOTF, v as KHR_DF_TRANSFER_HLG_OETF, b as KHR_DF_TRANSFER_ITU, x as KHR_DF_TRANSFER_LINEAR, m as KHR_DF_TRANSFER_NTSC, V as KHR_DF_TRANSFER_PAL625_EOTF, I as KHR_DF_TRANSFER_PAL_OETF, L as KHR_DF_TRANSFER_PQ_EOTF, A as KHR_DF_TRANSFER_PQ_OETF, d as KHR_DF_TRANSFER_SLOG, D as KHR_DF_TRANSFER_SLOG2, y as KHR_DF_TRANSFER_SRGB, C as KHR_DF_TRANSFER_ST240, g as KHR_DF_TRANSFER_UNSPECIFIED, a as KHR_DF_VENDORID_KHRONOS, r as KHR_DF_VERSION, e as KHR_SUPERCOMPRESSION_BASISLZ, t as KHR_SUPERCOMPRESSION_NONE, i as KHR_SUPERCOMPRESSION_ZLIB, n as KHR_SUPERCOMPRESSION_ZSTD, Ut as VK_FORMAT_A1R5G5B5_UNORM_PACK16, qt as VK_FORMAT_A2B10G10R10_SINT_PACK32, Rt as VK_FORMAT_A2B10G10R10_SNORM_PACK32, Gt as VK_FORMAT_A2B10G10R10_UINT_PACK32, Yt as VK_FORMAT_A2B10G10R10_UNORM_PACK32, Xt as VK_FORMAT_A2R10G10B10_SINT_PACK32, jt as VK_FORMAT_A2R10G10B10_SNORM_PACK32, Kt as VK_FORMAT_A2R10G10B10_UINT_PACK32, zt as VK_FORMAT_A2R10G10B10_UNORM_PACK32, Ii as VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT, ki as VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT, Bi as VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT, Xn as VK_FORMAT_ASTC_10x10_SRGB_BLOCK, Kn as VK_FORMAT_ASTC_10x10_UNORM_BLOCK, Di as VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT, Nn as VK_FORMAT_ASTC_10x5_SRGB_BLOCK, Mn as VK_FORMAT_ASTC_10x5_UNORM_BLOCK, wi as VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT, Hn as VK_FORMAT_ASTC_10x6_SRGB_BLOCK, Wn as VK_FORMAT_ASTC_10x6_UNORM_BLOCK, vi as VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT, jn as VK_FORMAT_ASTC_10x8_SRGB_BLOCK, zn as VK_FORMAT_ASTC_10x8_UNORM_BLOCK, Li as VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT, Rn as VK_FORMAT_ASTC_12x10_SRGB_BLOCK, Yn as VK_FORMAT_ASTC_12x10_UNORM_BLOCK, Ai as VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT, qn as VK_FORMAT_ASTC_12x12_SRGB_BLOCK, Gn as VK_FORMAT_ASTC_12x12_UNORM_BLOCK, _i as VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT, wn as VK_FORMAT_ASTC_4x4_SRGB_BLOCK, Dn as VK_FORMAT_ASTC_4x4_UNORM_BLOCK, ui as VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT, Bn as VK_FORMAT_ASTC_5x4_SRGB_BLOCK, vn as VK_FORMAT_ASTC_5x4_UNORM_BLOCK, gi as VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT, An as VK_FORMAT_ASTC_5x5_SRGB_BLOCK, Ln as VK_FORMAT_ASTC_5x5_UNORM_BLOCK, xi as VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT, In as VK_FORMAT_ASTC_6x5_SRGB_BLOCK, kn as VK_FORMAT_ASTC_6x5_UNORM_BLOCK, yi as VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT, Cn as VK_FORMAT_ASTC_6x6_SRGB_BLOCK, Vn as VK_FORMAT_ASTC_6x6_UNORM_BLOCK, bi as VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT, On as VK_FORMAT_ASTC_8x5_SRGB_BLOCK, Fn as VK_FORMAT_ASTC_8x5_UNORM_BLOCK, mi as VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT, Sn as VK_FORMAT_ASTC_8x6_SRGB_BLOCK, Tn as VK_FORMAT_ASTC_8x6_UNORM_BLOCK, di as VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT, Pn as VK_FORMAT_ASTC_8x8_SRGB_BLOCK, En as VK_FORMAT_ASTC_8x8_UNORM_BLOCK, We as VK_FORMAT_B10G11R11_UFLOAT_PACK32, ti as VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16, ai as VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16, rt as VK_FORMAT_B4G4R4A4_UNORM_PACK16, ct as VK_FORMAT_B5G5R5A1_UNORM_PACK16, lt as VK_FORMAT_B5G6R5_UNORM_PACK16, Wt as VK_FORMAT_B8G8R8A8_SINT, Mt as VK_FORMAT_B8G8R8A8_SNORM, Ht as VK_FORMAT_B8G8R8A8_SRGB, Nt as VK_FORMAT_B8G8R8A8_UINT, Pt as VK_FORMAT_B8G8R8A8_UNORM, Vt as VK_FORMAT_B8G8R8_SINT, kt as VK_FORMAT_B8G8R8_SNORM, Ct as VK_FORMAT_B8G8R8_SRGB, It as VK_FORMAT_B8G8R8_UINT, At as VK_FORMAT_B8G8R8_UNORM, Ze as VK_FORMAT_BC1_RGBA_SRGB_BLOCK, Qe as VK_FORMAT_BC1_RGBA_UNORM_BLOCK, Je as VK_FORMAT_BC1_RGB_SRGB_BLOCK, qe as VK_FORMAT_BC1_RGB_UNORM_BLOCK, tn as VK_FORMAT_BC2_SRGB_BLOCK, $e as VK_FORMAT_BC2_UNORM_BLOCK, nn as VK_FORMAT_BC3_SRGB_BLOCK, en as VK_FORMAT_BC3_UNORM_BLOCK, an as VK_FORMAT_BC4_SNORM_BLOCK, sn as VK_FORMAT_BC4_UNORM_BLOCK, on as VK_FORMAT_BC5_SNORM_BLOCK, rn as VK_FORMAT_BC5_UNORM_BLOCK, fn as VK_FORMAT_BC6H_SFLOAT_BLOCK, ln as VK_FORMAT_BC6H_UFLOAT_BLOCK, Un as VK_FORMAT_BC7_SRGB_BLOCK, cn as VK_FORMAT_BC7_UNORM_BLOCK, ze as VK_FORMAT_D16_UNORM, Ye as VK_FORMAT_D16_UNORM_S8_UINT, Re as VK_FORMAT_D24_UNORM_S8_UINT, Ke as VK_FORMAT_D32_SFLOAT, Ge as VK_FORMAT_D32_SFLOAT_S8_UINT, He as VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, dn as VK_FORMAT_EAC_R11G11_SNORM_BLOCK, mn as VK_FORMAT_EAC_R11G11_UNORM_BLOCK, bn as VK_FORMAT_EAC_R11_SNORM_BLOCK, yn as VK_FORMAT_EAC_R11_UNORM_BLOCK, un as VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK, _n as VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK, xn as VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK, gn as VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK, pn as VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK, hn as VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, $n as VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16, si as VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16, ci as VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG, ri as VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG, Ui as VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG, oi as VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG, hi as VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG, li as VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG, pi as VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG, fi as VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG, Zn as VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16, Qn as VK_FORMAT_R10X6G10X6_UNORM_2PACK16, Jn as VK_FORMAT_R10X6_UNORM_PACK16, ii as VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16, ni as VK_FORMAT_R12X4G12X4_UNORM_2PACK16, ei as VK_FORMAT_R12X4_UNORM_PACK16, ue as VK_FORMAT_R16G16B16A16_SFLOAT, _e as VK_FORMAT_R16G16B16A16_SINT, he as VK_FORMAT_R16G16B16A16_SNORM, pe as VK_FORMAT_R16G16B16A16_UINT, Ue as VK_FORMAT_R16G16B16A16_UNORM, ce as VK_FORMAT_R16G16B16_SFLOAT, fe as VK_FORMAT_R16G16B16_SINT, oe as VK_FORMAT_R16G16B16_SNORM, le as VK_FORMAT_R16G16B16_UINT, re as VK_FORMAT_R16G16B16_UNORM, ae as VK_FORMAT_R16G16_SFLOAT, se as VK_FORMAT_R16G16_SINT, ne as VK_FORMAT_R16G16_SNORM, ie as VK_FORMAT_R16G16_UINT, ee as VK_FORMAT_R16G16_UNORM, te as VK_FORMAT_R16_SFLOAT, $t as VK_FORMAT_R16_SINT, Qt as VK_FORMAT_R16_SNORM, Zt as VK_FORMAT_R16_UINT, Jt as VK_FORMAT_R16_UNORM, Ae as VK_FORMAT_R32G32B32A32_SFLOAT, Le as VK_FORMAT_R32G32B32A32_SINT, Be as VK_FORMAT_R32G32B32A32_UINT, ve as VK_FORMAT_R32G32B32_SFLOAT, we as VK_FORMAT_R32G32B32_SINT, De as VK_FORMAT_R32G32B32_UINT, de as VK_FORMAT_R32G32_SFLOAT, me as VK_FORMAT_R32G32_SINT, be as VK_FORMAT_R32G32_UINT, ye as VK_FORMAT_R32_SFLOAT, xe as VK_FORMAT_R32_SINT, ge as VK_FORMAT_R32_UINT, at as VK_FORMAT_R4G4B4A4_UNORM_PACK16, st as VK_FORMAT_R4G4_UNORM_PACK8, ft as VK_FORMAT_R5G5B5A1_UNORM_PACK16, ot as VK_FORMAT_R5G6B5_UNORM_PACK16, Ne as VK_FORMAT_R64G64B64A64_SFLOAT, Me as VK_FORMAT_R64G64B64A64_SINT, Pe as VK_FORMAT_R64G64B64A64_UINT, Ee as VK_FORMAT_R64G64B64_SFLOAT, Se as VK_FORMAT_R64G64B64_SINT, Te as VK_FORMAT_R64G64B64_UINT, Oe as VK_FORMAT_R64G64_SFLOAT, Fe as VK_FORMAT_R64G64_SINT, Ce as VK_FORMAT_R64G64_UINT, Ve as VK_FORMAT_R64_SFLOAT, Ie as VK_FORMAT_R64_SINT, ke as VK_FORMAT_R64_UINT, St as VK_FORMAT_R8G8B8A8_SINT, Ot as VK_FORMAT_R8G8B8A8_SNORM, Et as VK_FORMAT_R8G8B8A8_SRGB, Tt as VK_FORMAT_R8G8B8A8_UINT, Ft as VK_FORMAT_R8G8B8A8_UNORM, Bt as VK_FORMAT_R8G8B8_SINT, wt as VK_FORMAT_R8G8B8_SNORM, Lt as VK_FORMAT_R8G8B8_SRGB, vt as VK_FORMAT_R8G8B8_UINT, Dt as VK_FORMAT_R8G8B8_UNORM, mt as VK_FORMAT_R8G8_SINT, yt as VK_FORMAT_R8G8_SNORM, dt as VK_FORMAT_R8G8_SRGB, bt as VK_FORMAT_R8G8_UINT, xt as VK_FORMAT_R8G8_UNORM, ut as VK_FORMAT_R8_SINT, pt as VK_FORMAT_R8_SNORM, gt as VK_FORMAT_R8_SRGB, _t as VK_FORMAT_R8_UINT, ht as VK_FORMAT_R8_UNORM, Xe as VK_FORMAT_S8_UINT, it as VK_FORMAT_UNDEFINED, je as VK_FORMAT_X8_D24_UNORM_PACK32, Vi as createDefaultContainer, Mi as read, Hi as write }; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/meshopt_decoder.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/meshopt_decoder.module.d.ts new file mode 100644 index 000000000..a2637cd13 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/meshopt_decoder.module.d.ts @@ -0,0 +1,19 @@ +export var MeshoptDecoder: { + supported: boolean; + ready?: undefined; + useWorkers?: undefined; + decodeVertexBuffer?: undefined; + decodeIndexBuffer?: undefined; + decodeIndexSequence?: undefined; + decodeGltfBuffer?: undefined; + decodeGltfBufferAsync?: undefined; +} | { + ready: Promise; + supported: boolean; + useWorkers: (count: any) => void; + decodeVertexBuffer: (target: any, count: any, size: any, source: any, filter: any) => void; + decodeIndexBuffer: (target: any, count: any, size: any, source: any) => void; + decodeIndexSequence: (target: any, count: any, size: any, source: any) => void; + decodeGltfBuffer: (target: any, count: any, size: any, source: any, mode: any, filter: any) => void; + decodeGltfBufferAsync: (count: any, size: any, source: any, mode: any, filter: any) => Promise; +}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/mikktspace.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/mikktspace.module.d.ts new file mode 100644 index 000000000..8bee20d6e --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/mikktspace.module.d.ts @@ -0,0 +1,16 @@ +/** +* Generates vertex tangents for the given position/normal/texcoord attributes. +* @param {Float32Array} position +* @param {Float32Array} normal +* @param {Float32Array} texcoord +* @returns {Float32Array} +*/ +export function generateTangents(position: Float32Array, normal: Float32Array, texcoord: Float32Array): Float32Array; +export function dispose(): void; +export function __wbindgen_string_new(arg0: any, arg1: any): number; +export function __wbindgen_rethrow(arg0: any): never; +export let wasm: any; +export let isReady: boolean; +export namespace ready { + function then(onFulfilled: any, onRejected: any): any; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/motion-controllers.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/motion-controllers.module.d.ts new file mode 100644 index 000000000..105f5023d --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/motion-controllers.module.d.ts @@ -0,0 +1,64 @@ +export namespace Constants { + let Handedness: Readonly<{ + NONE: "none"; + LEFT: "left"; + RIGHT: "right"; + }>; + let ComponentState: Readonly<{ + DEFAULT: "default"; + TOUCHED: "touched"; + PRESSED: "pressed"; + }>; + let ComponentProperty: Readonly<{ + BUTTON: "button"; + X_AXIS: "xAxis"; + Y_AXIS: "yAxis"; + STATE: "state"; + }>; + let ComponentType: Readonly<{ + TRIGGER: "trigger"; + SQUEEZE: "squeeze"; + TOUCHPAD: "touchpad"; + THUMBSTICK: "thumbstick"; + BUTTON: "button"; + }>; + let ButtonTouchThreshold: number; + let AxisTouchThreshold: number; + let VisualResponseProperty: Readonly<{ + TRANSFORM: "transform"; + VISIBILITY: "visibility"; + }>; +} +/** + * @description Builds a motion controller with components and visual responses based on the + * supplied profile description. Data is polled from the xrInputSource's gamepad. + * @author Nell Waliczek / https://github.com/NellWaliczek +*/ +export class MotionController { + /** + * @param {Object} xrInputSource - The XRInputSource to build the MotionController around + * @param {Object} profile - The best matched profile description for the supplied xrInputSource + * @param {string} assetUrl + */ + constructor(xrInputSource: Object, profile: Object, assetUrl: string); + xrInputSource: Object; + assetUrl: string; + id: any; + layoutDescription: any; + components: {}; + get gripSpace(): any; + get targetRaySpace(): any; + /** + * @description Returns a subset of component data for simplified debugging + */ + get data(): any[]; + /** + * @description Poll for updated data based on current gamepad state + */ + updateFromGamepad(): void; +} +export function fetchProfile(xrInputSource: any, basePath: any, defaultProfile?: null, getAssetPath?: boolean): Promise<{ + profile: any; + assetPath: string | undefined; +}>; +export function fetchProfilesList(basePath: any): Promise; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/opentype.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/opentype.module.d.ts new file mode 100644 index 000000000..5334c78d3 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/opentype.module.d.ts @@ -0,0 +1,1094 @@ +export default opentype; +export type GlyphOptions = { + unicode?: number | undefined; + unicodes?: any[] | undefined; + xMin?: number | undefined; + yMin?: number | undefined; + xMax?: number | undefined; + yMax?: number | undefined; + advanceWidth?: number | undefined; +}; +export type ContextParams = { + /** + * current item index + */ + currentIndex: number; +}; +export type SubstitutionAction = { + /** + * feature tag + */ + tag: string; + /** + * substitution value(s) + */ + substitution: any; +}; +export type FontOptions = { + familyName: string; + styleName: string; + fullName?: string | undefined; + postScriptName?: string | undefined; + designer?: string | undefined; + designerURL?: string | undefined; + manufacturer?: string | undefined; + manufacturerURL?: string | undefined; + license?: string | undefined; + licenseURL?: string | undefined; + version?: string | undefined; + description?: string | undefined; + copyright?: string | undefined; + trademark?: string | undefined; + unitsPerEm: number; + ascender: number; + descender: number; + createdTimestamp: number; + weightClass?: string | undefined; + widthClass?: string | undefined; + fsSelection?: string | undefined; +}; +export type TableData = { + /** + * - The data offset. + */ + offset: number; +}; +export type FQuery = {}; +export type GlyphRenderOptions = { + /** + * - language system used to determine which features to apply. + * See https://www.microsoft.com/typography/developers/opentype/languagetags.aspx + */ + language?: string | undefined; + /** + * - whether to include kerning values + */ + kerning?: boolean | undefined; + /** + * - OpenType Layout feature tags. Used to enable or disable the features of the given script/language system. + * See https://www.microsoft.com/typography/otspec/featuretags.htm + */ + features?: object | undefined; +}; +declare var opentype: Readonly<{ + __proto__: null; + Font: typeof Font; + Glyph: typeof Glyph; + Path: typeof Path; + BoundingBox: typeof BoundingBox; + _parse: { + getByte: typeof getByte; + getCard8: typeof getByte; + getUShort: typeof getUShort; + getCard16: typeof getUShort; + getShort: typeof getShort; + getULong: typeof getULong; + getFixed: typeof getFixed; + getTag: typeof getTag; + getOffset: typeof getOffset; + getBytes: typeof getBytes; + bytesToString: typeof bytesToString; + Parser: typeof Parser; + }; + parse: typeof parseBuffer; + load: typeof load; +}>; +/** + * A bounding box is an enclosing box that describes the smallest measure within which all the points lie. + * It is used to calculate the bounding box of a glyph or text path. + * + * On initialization, x1/y1/x2/y2 will be NaN. Check if the bounding box is empty using `isEmpty()`. + * + * @exports opentype.BoundingBox + * @class + * @constructor + */ +export function BoundingBox(): void; +export class BoundingBox { + x1: number; + y1: number; + x2: number; + y2: number; + /** + * Returns true if the bounding box is empty, that is, no points have been added to the box yet. + */ + isEmpty(): boolean; + /** + * Add the point to the bounding box. + * The x1/y1/x2/y2 coordinates of the bounding box will now encompass the given point. + * @param {number} x - The X coordinate of the point. + * @param {number} y - The Y coordinate of the point. + */ + addPoint(x: number, y: number): void; + /** + * Add a X coordinate to the bounding box. + * This extends the bounding box to include the X coordinate. + * This function is used internally inside of addBezier. + * @param {number} x - The X coordinate of the point. + */ + addX(x: number): void; + /** + * Add a Y coordinate to the bounding box. + * This extends the bounding box to include the Y coordinate. + * This function is used internally inside of addBezier. + * @param {number} y - The Y coordinate of the point. + */ + addY(y: number): void; + /** + * Add a Bézier curve to the bounding box. + * This extends the bounding box to include the entire Bézier. + * @param {number} x0 - The starting X coordinate. + * @param {number} y0 - The starting Y coordinate. + * @param {number} x1 - The X coordinate of the first control point. + * @param {number} y1 - The Y coordinate of the first control point. + * @param {number} x2 - The X coordinate of the second control point. + * @param {number} y2 - The Y coordinate of the second control point. + * @param {number} x - The ending X coordinate. + * @param {number} y - The ending Y coordinate. + */ + addBezier(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, x: number, y: number): void; + /** + * Add a quadratic curve to the bounding box. + * This extends the bounding box to include the entire quadratic curve. + * @param {number} x0 - The starting X coordinate. + * @param {number} y0 - The starting Y coordinate. + * @param {number} x1 - The X coordinate of the control point. + * @param {number} y1 - The Y coordinate of the control point. + * @param {number} x - The ending X coordinate. + * @param {number} y - The ending Y coordinate. + */ + addQuad(x0: number, y0: number, x1: number, y1: number, x: number, y: number): void; +} +/** + * @typedef FontOptions + * @type Object + * @property {Boolean} empty - whether to create a new empty font + * @property {string} familyName + * @property {string} styleName + * @property {string=} fullName + * @property {string=} postScriptName + * @property {string=} designer + * @property {string=} designerURL + * @property {string=} manufacturer + * @property {string=} manufacturerURL + * @property {string=} license + * @property {string=} licenseURL + * @property {string=} version + * @property {string=} description + * @property {string=} copyright + * @property {string=} trademark + * @property {Number} unitsPerEm + * @property {Number} ascender + * @property {Number} descender + * @property {Number} createdTimestamp + * @property {string=} weightClass + * @property {string=} widthClass + * @property {string=} fsSelection + */ +/** + * A Font represents a loaded OpenType font file. + * It contains a set of glyphs and methods to draw text on a drawing context, + * or to get a path representing the text. + * @exports opentype.Font + * @class + * @param {FontOptions} + * @constructor + */ +export function Font(options: any): void; +export class Font { + /** + * @typedef FontOptions + * @type Object + * @property {Boolean} empty - whether to create a new empty font + * @property {string} familyName + * @property {string} styleName + * @property {string=} fullName + * @property {string=} postScriptName + * @property {string=} designer + * @property {string=} designerURL + * @property {string=} manufacturer + * @property {string=} manufacturerURL + * @property {string=} license + * @property {string=} licenseURL + * @property {string=} version + * @property {string=} description + * @property {string=} copyright + * @property {string=} trademark + * @property {Number} unitsPerEm + * @property {Number} ascender + * @property {Number} descender + * @property {Number} createdTimestamp + * @property {string=} weightClass + * @property {string=} widthClass + * @property {string=} fsSelection + */ + /** + * A Font represents a loaded OpenType font file. + * It contains a set of glyphs and methods to draw text on a drawing context, + * or to get a path representing the text. + * @exports opentype.Font + * @class + * @param {FontOptions} + * @constructor + */ + constructor(options: any); + names: { + fontFamily: { + en: any; + }; + fontSubfamily: { + en: any; + }; + fullName: { + en: any; + }; + postScriptName: { + en: any; + }; + designer: { + en: any; + }; + designerURL: { + en: any; + }; + manufacturer: { + en: any; + }; + manufacturerURL: { + en: any; + }; + license: { + en: any; + }; + licenseURL: { + en: any; + }; + version: { + en: any; + }; + description: { + en: any; + }; + copyright: { + en: any; + }; + trademark: { + en: any; + }; + } | undefined; + unitsPerEm: any; + ascender: any; + descender: any; + createdTimestamp: any; + tables: any; + supported: boolean; + glyphs: GlyphSet; + encoding: DefaultEncoding; + position: Position; + substitution: Substitution; + _push: any; + _hmtxTableData: {}; + /** + * Check if the font has a glyph for the given character. + * @param {string} + * @return {Boolean} + */ + hasChar(c: any): boolean; + /** + * Convert the given character to a single glyph index. + * Note that this function assumes that there is a one-to-one mapping between + * the given character and a glyph; for complex scripts this might not be the case. + * @param {string} + * @return {Number} + */ + charToGlyphIndex(s: any): number; + /** + * Convert the given character to a single Glyph object. + * Note that this function assumes that there is a one-to-one mapping between + * the given character and a glyph; for complex scripts this might not be the case. + * @param {string} + * @return {opentype.Glyph} + */ + charToGlyph(c: any): opentype.Glyph; + /** + * Update features + * @param {any} options features options + */ + updateFeatures(options: any): { + script: string; + tags: string[]; + }[]; + /** + * Convert the given text to a list of Glyph objects. + * Note that there is no strict one-to-one mapping between characters and + * glyphs, so the list of returned glyphs can be larger or smaller than the + * length of the given string. + * @param {string} + * @param {GlyphRenderOptions} [options] + * @return {opentype.Glyph[]} + */ + stringToGlyphs(s: any, options?: GlyphRenderOptions): opentype.Glyph[]; + /** + * @param {string} + * @return {Number} + */ + nameToGlyphIndex(name: any): number; + /** + * @param {string} + * @return {opentype.Glyph} + */ + nameToGlyph(name: any): opentype.Glyph; + /** + * @param {Number} + * @return {String} + */ + glyphIndexToName(gid: any): string; + /** + * Retrieve the value of the kerning pair between the left glyph (or its index) + * and the right glyph (or its index). If no kerning pair is found, return 0. + * The kerning value gets added to the advance width when calculating the spacing + * between glyphs. + * For GPOS kerning, this method uses the default script and language, which covers + * most use cases. To have greater control, use font.position.getKerningValue . + * @param {opentype.Glyph} leftGlyph + * @param {opentype.Glyph} rightGlyph + * @return {Number} + */ + getKerningValue(leftGlyph: opentype.Glyph, rightGlyph: opentype.Glyph): number; + /** + * @typedef GlyphRenderOptions + * @type Object + * @property {string} [script] - script used to determine which features to apply. By default, 'DFLT' or 'latn' is used. + * See https://www.microsoft.com/typography/otspec/scripttags.htm + * @property {string} [language='dflt'] - language system used to determine which features to apply. + * See https://www.microsoft.com/typography/developers/opentype/languagetags.aspx + * @property {boolean} [kerning=true] - whether to include kerning values + * @property {object} [features] - OpenType Layout feature tags. Used to enable or disable the features of the given script/language system. + * See https://www.microsoft.com/typography/otspec/featuretags.htm + */ + defaultRenderOptions: { + kerning: boolean; + features: { + script: string; + tags: string[]; + }[]; + }; + /** + * Helper function that invokes the given callback for each glyph in the given text. + * The callback gets `(glyph, x, y, fontSize, options)`.* @param {string} text + * @param {string} text - The text to apply. + * @param {number} [x=0] - Horizontal position of the beginning of the text. + * @param {number} [y=0] - Vertical position of the *baseline* of the text. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + * @param {GlyphRenderOptions=} options + * @param {Function} callback + */ + forEachGlyph(text: string, x?: number, y?: number, fontSize?: number, options?: GlyphRenderOptions | undefined, callback: Function): number; + /** + * Create a Path object that represents the given text. + * @param {string} text - The text to create. + * @param {number} [x=0] - Horizontal position of the beginning of the text. + * @param {number} [y=0] - Vertical position of the *baseline* of the text. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + * @param {GlyphRenderOptions=} options + * @return {opentype.Path} + */ + getPath(text: string, x?: number, y?: number, fontSize?: number, options?: GlyphRenderOptions | undefined): opentype.Path; + /** + * Create an array of Path objects that represent the glyphs of a given text. + * @param {string} text - The text to create. + * @param {number} [x=0] - Horizontal position of the beginning of the text. + * @param {number} [y=0] - Vertical position of the *baseline* of the text. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + * @param {GlyphRenderOptions=} options + * @return {opentype.Path[]} + */ + getPaths(text: string, x?: number, y?: number, fontSize?: number, options?: GlyphRenderOptions | undefined): opentype.Path[]; + /** + * Returns the advance width of a text. + * + * This is something different than Path.getBoundingBox() as for example a + * suffixed whitespace increases the advanceWidth but not the bounding box + * or an overhanging letter like a calligraphic 'f' might have a quite larger + * bounding box than its advance width. + * + * This corresponds to canvas2dContext.measureText(text).width + * + * @param {string} text - The text to create. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + * @param {GlyphRenderOptions=} options + * @return advance width + */ + getAdvanceWidth(text: string, fontSize?: number, options?: GlyphRenderOptions | undefined): number; + /** + * Draw the text on the given drawing context. + * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas. + * @param {string} text - The text to create. + * @param {number} [x=0] - Horizontal position of the beginning of the text. + * @param {number} [y=0] - Vertical position of the *baseline* of the text. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + * @param {GlyphRenderOptions=} options + */ + draw(ctx: CanvasRenderingContext2D, text: string, x?: number, y?: number, fontSize?: number, options?: GlyphRenderOptions | undefined): void; + /** + * Draw the points of all glyphs in the text. + * On-curve points will be drawn in blue, off-curve points will be drawn in red. + * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas. + * @param {string} text - The text to create. + * @param {number} [x=0] - Horizontal position of the beginning of the text. + * @param {number} [y=0] - Vertical position of the *baseline* of the text. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + * @param {GlyphRenderOptions=} options + */ + drawPoints(ctx: CanvasRenderingContext2D, text: string, x?: number, y?: number, fontSize?: number, options?: GlyphRenderOptions | undefined): void; + /** + * Draw lines indicating important font measurements for all glyphs in the text. + * Black lines indicate the origin of the coordinate system (point 0,0). + * Blue lines indicate the glyph bounding box. + * Green line indicates the advance width of the glyph. + * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas. + * @param {string} text - The text to create. + * @param {number} [x=0] - Horizontal position of the beginning of the text. + * @param {number} [y=0] - Vertical position of the *baseline* of the text. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + * @param {GlyphRenderOptions=} options + */ + drawMetrics(ctx: CanvasRenderingContext2D, text: string, x?: number, y?: number, fontSize?: number, options?: GlyphRenderOptions | undefined): void; + /** + * @param {string} + * @return {string} + */ + getEnglishName(name: any): string; + /** + * Validate + */ + validate(): void; + /** + * Convert the font object to a SFNT data structure. + * This structure contains all the necessary tables and metadata to create a binary OTF file. + * @return {opentype.Table} + */ + toTables(): opentype.Table; + /** + * @deprecated Font.toBuffer is deprecated. Use Font.toArrayBuffer instead. + */ + toBuffer(): ArrayBuffer; + /** + * Converts a `opentype.Font` into an `ArrayBuffer` + * @return {ArrayBuffer} + */ + toArrayBuffer(): ArrayBuffer; + /** + * Initiate a download of the OpenType font. + */ + download(fileName: any): void; + /** + * @private + */ + private fsSelectionValues; + /** + * @private + */ + private usWidthClasses; + /** + * @private + */ + private usWeightClasses; +} +/** + * @typedef GlyphOptions + * @type Object + * @property {string} [name] - The glyph name + * @property {number} [unicode] + * @property {Array} [unicodes] + * @property {number} [xMin] + * @property {number} [yMin] + * @property {number} [xMax] + * @property {number} [yMax] + * @property {number} [advanceWidth] + */ +/** + * @exports opentype.Glyph + * @class + * @param {GlyphOptions} + * @constructor + */ +export function Glyph(options: any): void; +export class Glyph { + /** + * @typedef GlyphOptions + * @type Object + * @property {string} [name] - The glyph name + * @property {number} [unicode] + * @property {Array} [unicodes] + * @property {number} [xMin] + * @property {number} [yMin] + * @property {number} [xMax] + * @property {number} [yMax] + * @property {number} [advanceWidth] + */ + /** + * @exports opentype.Glyph + * @class + * @param {GlyphOptions} + * @constructor + */ + constructor(options: any); + /** + * @param {GlyphOptions} + */ + bindConstructorValues(options: any): void; + index: any; + name: any; + unicode: any; + unicodes: any[] | undefined; + xMin: any; + yMin: any; + xMax: any; + yMax: any; + advanceWidth: any; + /** + * @param {number} + */ + addUnicode(unicode: any): void; + /** + * Calculate the minimum bounding box for this glyph. + * @return {opentype.BoundingBox} + */ + getBoundingBox(): opentype.BoundingBox; + /** + * Convert the glyph to a Path we can draw on a drawing context. + * @param {number} [x=0] - Horizontal position of the beginning of the text. + * @param {number} [y=0] - Vertical position of the *baseline* of the text. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + * @param {Object=} options - xScale, yScale to stretch the glyph. + * @param {opentype.Font} if hinting is to be used, the font + * @return {opentype.Path} + */ + getPath(x?: number, y?: number, fontSize?: number, options?: Object | undefined, font: any): opentype.Path; + /** + * Split the glyph into contours. + * This function is here for backwards compatibility, and to + * provide raw access to the TrueType glyph outlines. + * @return {Array} + */ + getContours(): any[]; + /** + * Calculate the xMin/yMin/xMax/yMax/lsb/rsb for a Glyph. + * @return {Object} + */ + getMetrics(): Object; + /** + * Draw the glyph on the given context. + * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas. + * @param {number} [x=0] - Horizontal position of the beginning of the text. + * @param {number} [y=0] - Vertical position of the *baseline* of the text. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + * @param {Object=} options - xScale, yScale to stretch the glyph. + */ + draw(ctx: CanvasRenderingContext2D, x?: number, y?: number, fontSize?: number, options?: Object | undefined): void; + /** + * Draw the points of the glyph. + * On-curve points will be drawn in blue, off-curve points will be drawn in red. + * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas. + * @param {number} [x=0] - Horizontal position of the beginning of the text. + * @param {number} [y=0] - Vertical position of the *baseline* of the text. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + */ + drawPoints(ctx: CanvasRenderingContext2D, x?: number, y?: number, fontSize?: number): void; + /** + * Draw lines indicating important font measurements. + * Black lines indicate the origin of the coordinate system (point 0,0). + * Blue lines indicate the glyph bounding box. + * Green line indicates the advance width of the glyph. + * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas. + * @param {number} [x=0] - Horizontal position of the beginning of the text. + * @param {number} [y=0] - Vertical position of the *baseline* of the text. + * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. + */ + drawMetrics(ctx: CanvasRenderingContext2D, x?: number, y?: number, fontSize?: number): void; +} +/** + * A bézier path containing a set of path commands similar to a SVG path. + * Paths can be drawn on a context using `draw`. + * @exports opentype.Path + * @class + * @constructor + */ +export function Path(): void; +export class Path { + commands: any[]; + fill: string; + stroke: any; + strokeWidth: number; + /** + * @param {number} x + * @param {number} y + */ + moveTo(x: number, y: number): void; + /** + * @param {number} x + * @param {number} y + */ + lineTo(x: number, y: number): void; + /** + * Draws cubic curve + * @function + * curveTo + * @memberof opentype.Path.prototype + * @param {number} x1 - x of control 1 + * @param {number} y1 - y of control 1 + * @param {number} x2 - x of control 2 + * @param {number} y2 - y of control 2 + * @param {number} x - x of path point + * @param {number} y - y of path point + */ + /** + * Draws cubic curve + * @function + * bezierCurveTo + * @memberof opentype.Path.prototype + * @param {number} x1 - x of control 1 + * @param {number} y1 - y of control 1 + * @param {number} x2 - x of control 2 + * @param {number} y2 - y of control 2 + * @param {number} x - x of path point + * @param {number} y - y of path point + * @see curveTo + */ + curveTo: (x1: number, y1: number, x2: number, y2: number, x: number, y: number) => void; + bezierCurveTo(x1: number, y1: number, x2: number, y2: number, x: number, y: number): void; + /** + * Draws quadratic curve + * @function + * quadraticCurveTo + * @memberof opentype.Path.prototype + * @param {number} x1 - x of control + * @param {number} y1 - y of control + * @param {number} x - x of path point + * @param {number} y - y of path point + */ + /** + * Draws quadratic curve + * @function + * quadTo + * @memberof opentype.Path.prototype + * @param {number} x1 - x of control + * @param {number} y1 - y of control + * @param {number} x - x of path point + * @param {number} y - y of path point + */ + quadTo: (x1: number, y1: number, x: number, y: number) => void; + quadraticCurveTo(x1: number, y1: number, x: number, y: number): void; + /** + * Closes the path + * @function closePath + * @memberof opentype.Path.prototype + */ + /** + * Close the path + * @function close + * @memberof opentype.Path.prototype + */ + close: () => void; + closePath(): void; + /** + * Add the given path or list of commands to the commands of this path. + * @param {Array} pathOrCommands - another opentype.Path, an opentype.BoundingBox, or an array of commands. + */ + extend(pathOrCommands: any[]): void; + /** + * Calculate the bounding box of the path. + * @returns {opentype.BoundingBox} + */ + getBoundingBox(): opentype.BoundingBox; + /** + * Draw the path to a 2D context. + * @param {CanvasRenderingContext2D} ctx - A 2D drawing context. + */ + draw(ctx: CanvasRenderingContext2D): void; + /** + * Convert the Path to a string of path data instructions + * See http://www.w3.org/TR/SVG/paths.html#PathData + * @param {number} [decimalPlaces=2] - The amount of decimal places for floating-point values + * @return {string} + */ + toPathData(decimalPlaces?: number): string; + /** + * Convert the path to an SVG element, as a string. + * @param {number} [decimalPlaces=2] - The amount of decimal places for floating-point values + * @return {string} + */ + toSVG(decimalPlaces?: number): string; + /** + * Convert the path to a DOM element. + * @param {number} [decimalPlaces=2] - The amount of decimal places for floating-point values + * @return {SVGPathElement} + */ + toDOMElement(decimalPlaces?: number): SVGPathElement; +} +declare namespace parse { + export { getByte }; + export { getByte as getCard8 }; + export { getUShort }; + export { getUShort as getCard16 }; + export { getShort }; + export { getULong }; + export { getFixed }; + export { getTag }; + export { getOffset }; + export { getBytes }; + export { bytesToString }; + export { Parser }; +} +/** + * Asynchronously load the font from a URL or a filesystem. When done, call the callback + * with two arguments `(err, font)`. The `err` will be null on success, + * the `font` is a Font object. + * We use the node.js callback convention so that + * opentype.js can integrate with frameworks like async.js. + * @alias opentype.load + * @param {string} url - The URL of the font to load. + * @param {Function} callback - The callback. + */ +export function load(url: string, callback: Function, opt: any): Promise; +/** + * Parse the OpenType file data (as an ArrayBuffer) and return a Font object. + * Throws an error if the font could not be parsed. + * @param {ArrayBuffer} + * @param {Object} opt - options for parsing + * @return {opentype.Font} + */ +declare function parseBuffer(buffer: any, opt: Object): opentype.Font; +declare function getByte(dataView: any, offset: any): any; +declare function getUShort(dataView: any, offset: any): any; +declare function getShort(dataView: any, offset: any): any; +declare function getULong(dataView: any, offset: any): any; +declare function getFixed(dataView: any, offset: any): any; +declare function getTag(dataView: any, offset: any): string; +declare function getOffset(dataView: any, offset: any, offSize: any): number; +declare function getBytes(dataView: any, startOffset: any, endOffset: any): any[]; +declare function bytesToString(bytes: any): string; +declare function Parser(data: any, offset: any): void; +declare class Parser { + constructor(data: any, offset: any); + data: any; + offset: any; + relativeOffset: number; + parseByte(): any; + parseChar(): any; + parseCard8: any; + parseUShort(): any; + parseCard16: any; + parseSID: any; + parseOffset16: any; + parseShort(): any; + parseF2Dot14(): number; + parseULong(): any; + parseOffset32: any; + parseFixed(): any; + parseString(length: any): string; + parseTag(): string; + parseLongDateTime(): any; + parseVersion(minorBase: any): any; + skip(type: any, amount: any): void; + parseULongList(count: any): any[]; + parseOffset16List: (count: any) => any[]; + parseUShortList(count: any): any[]; + parseShortList(count: any): any[]; + parseByteList(count: any): any[]; + /** + * Parse a list of items. + * Record count is optional, if omitted it is read from the stream. + * itemCallback is one of the Parser methods. + */ + parseList(count: any, itemCallback: any): any[]; + parseList32(count: any, itemCallback: any): any[]; + /** + * Parse a list of records. + * Record count is optional, if omitted it is read from the stream. + * Example of recordDescription: { sequenceIndex: Parser.uShort, lookupListIndex: Parser.uShort } + */ + parseRecordList(count: any, recordDescription: any): any[]; + parseRecordList32(count: any, recordDescription: any): any[]; + parseStruct(description: any): any; + /** + * Parse a GPOS valueRecord + * https://docs.microsoft.com/en-us/typography/opentype/spec/gpos#value-record + * valueFormat is optional, if omitted it is read from the stream. + */ + parseValueRecord(valueFormat: any): { + xPlacement: any; + yPlacement: any; + xAdvance: any; + yAdvance: any; + xPlaDevice: any; + yPlaDevice: any; + xAdvDevice: any; + yAdvDevice: any; + } | undefined; + /** + * Parse a list of GPOS valueRecords + * https://docs.microsoft.com/en-us/typography/opentype/spec/gpos#value-record + * valueFormat and valueCount are read from the stream. + */ + parseValueRecordList(): any[]; + parsePointer(description: any): any; + parsePointer32(description: any): any; + /** + * Parse a list of offsets to lists of 16-bit integers, + * or a list of offsets to lists of offsets to any kind of items. + * If itemCallback is not provided, a list of list of UShort is assumed. + * If provided, itemCallback is called on each item and must parse the item. + * See examples in tables/gsub.js + */ + parseListOfLists(itemCallback: any): any[]; + parseCoverage(): { + format: number; + glyphs: any[]; + ranges?: undefined; + } | { + format: number; + ranges: any[]; + glyphs?: undefined; + }; + parseClassDef(): { + format: number; + startGlyph: any; + classes: any[]; + ranges?: undefined; + } | { + format: number; + ranges: any[]; + startGlyph?: undefined; + classes?: undefined; + }; + parseScriptList(): any; + parseFeatureList(): any; + parseLookupList(lookupTableParsers: any): any; + parseFeatureVariationsList(): any; +} +declare namespace Parser { + function list(count: any, itemCallback: any): () => any; + function list32(count: any, itemCallback: any): () => any; + function recordList(count: any, recordDescription: any): () => any; + function recordList32(count: any, recordDescription: any): () => any; + function pointer(description: any): () => any; + function pointer32(description: any): () => any; + let tag: any; + let byte: any; + let uShort: any; + let offset16: any; + let uShortList: any; + let uLong: any; + let offset32: any; + let uLongList: any; + let struct: any; + let coverage: any; + let classDef: any; +} +/** + * A GlyphSet represents all glyphs available in the font, but modelled using + * a deferred glyph loader, for retrieving glyphs only once they are absolutely + * necessary, to keep the memory footprint down. + * @exports opentype.GlyphSet + * @class + * @param {opentype.Font} + * @param {Array} + */ +declare function GlyphSet(font: any, glyphs: any): void; +declare class GlyphSet { + /** + * A GlyphSet represents all glyphs available in the font, but modelled using + * a deferred glyph loader, for retrieving glyphs only once they are absolutely + * necessary, to keep the memory footprint down. + * @exports opentype.GlyphSet + * @class + * @param {opentype.Font} + * @param {Array} + */ + constructor(font: any, glyphs: any); + font: any; + glyphs: {}; + length: any; + /** + * @param {number} index + * @return {opentype.Glyph} + */ + get(index: number): opentype.Glyph; + /** + * @param {number} index + * @param {Object} + */ + push(index: number, loader: any): void; +} +/** + * This is the encoding used for fonts created from scratch. + * It loops through all glyphs and finds the appropriate unicode value. + * Since it's linear time, other encodings will be faster. + * @exports opentype.DefaultEncoding + * @class + * @constructor + * @param {opentype.Font} + */ +declare function DefaultEncoding(font: any): void; +declare class DefaultEncoding { + /** + * This is the encoding used for fonts created from scratch. + * It loops through all glyphs and finds the appropriate unicode value. + * Since it's linear time, other encodings will be faster. + * @exports opentype.DefaultEncoding + * @class + * @constructor + * @param {opentype.Font} + */ + constructor(font: any); + font: any; + charToGlyphIndex(c: any): number | null; +} +/** + * @exports opentype.Position + * @class + * @extends opentype.Layout + * @param {opentype.Font} + * @constructor + */ +declare function Position(font: any): void; +declare class Position { + /** + * @exports opentype.Position + * @class + * @extends opentype.Layout + * @param {opentype.Font} + * @constructor + */ + constructor(font: any); + /** + * Init some data for faster and easier access later. + */ + init(): void; + defaultKerningTables: object[] | undefined; + /** + * Find a glyph pair in a list of lookup tables of type 2 and retrieve the xAdvance kerning value. + * + * @param {integer} leftIndex - left glyph index + * @param {integer} rightIndex - right glyph index + * @returns {integer} + */ + getKerningValue(kerningLookups: any, leftIndex: integer, rightIndex: integer): integer; + /** + * List all kerning lookup tables. + * + * @param {string} [script='DFLT'] - use font.position.getDefaultScriptName() for a better default value + * @param {string} [language='dflt'] + * @return {object[]} The list of kerning lookup tables (may be empty), or undefined if there is no GPOS table (and we should use the kern table) + */ + getKerningTables(script?: string, language?: string): object[]; +} +/** + * @exports opentype.Substitution + * @class + * @extends opentype.Layout + * @param {opentype.Font} + * @constructor + */ +declare function Substitution(font: any): void; +declare class Substitution { + /** + * @exports opentype.Substitution + * @class + * @extends opentype.Layout + * @param {opentype.Font} + * @constructor + */ + constructor(font: any); + /** + * Create a default GSUB table. + * @return {Object} gsub - The GSUB table. + */ + createDefaultTable(): Object; + /** + * List all single substitutions (lookup type 1) for a given script, language, and feature. + * @param {string} [script='DFLT'] + * @param {string} [language='dflt'] + * @param {string} feature - 4-character feature name ('aalt', 'salt', 'ss01'...) + * @return {Array} substitutions - The list of substitutions. + */ + getSingle(feature: string, script?: string, language?: string): any[]; + /** + * List all multiple substitutions (lookup type 2) for a given script, language, and feature. + * @param {string} [script='DFLT'] + * @param {string} [language='dflt'] + * @param {string} feature - 4-character feature name ('ccmp', 'stch') + * @return {Array} substitutions - The list of substitutions. + */ + getMultiple(feature: string, script?: string, language?: string): any[]; + /** + * List all alternates (lookup type 3) for a given script, language, and feature. + * @param {string} [script='DFLT'] + * @param {string} [language='dflt'] + * @param {string} feature - 4-character feature name ('aalt', 'salt'...) + * @return {Array} alternates - The list of alternates + */ + getAlternates(feature: string, script?: string, language?: string): any[]; + /** + * List all ligatures (lookup type 4) for a given script, language, and feature. + * The result is an array of ligature objects like { sub: [ids], by: id } + * @param {string} feature - 4-letter feature name ('liga', 'rlig', 'dlig'...) + * @param {string} [script='DFLT'] + * @param {string} [language='dflt'] + * @return {Array} ligatures - The list of ligatures. + */ + getLigatures(feature: string, script?: string, language?: string): any[]; + /** + * Add or modify a single substitution (lookup type 1) + * Format 2, more flexible, is always used. + * @param {string} feature - 4-letter feature name ('liga', 'rlig', 'dlig'...) + * @param {Object} substitution - { sub: id, by: id } (format 1 is not supported) + * @param {string} [script='DFLT'] + * @param {string} [language='dflt'] + */ + addSingle(feature: string, substitution: Object, script?: string, language?: string): void; + /** + * Add or modify a multiple substitution (lookup type 2) + * @param {string} feature - 4-letter feature name ('ccmp', 'stch') + * @param {Object} substitution - { sub: id, by: [id] } for format 2. + * @param {string} [script='DFLT'] + * @param {string} [language='dflt'] + */ + addMultiple(feature: string, substitution: Object, script?: string, language?: string): void; + /** + * Add or modify an alternate substitution (lookup type 3) + * @param {string} feature - 4-letter feature name ('liga', 'rlig', 'dlig'...) + * @param {Object} substitution - { sub: id, by: [ids] } + * @param {string} [script='DFLT'] + * @param {string} [language='dflt'] + */ + addAlternate(feature: string, substitution: Object, script?: string, language?: string): void; + /** + * Add a ligature (lookup type 4) + * Ligatures with more components must be stored ahead of those with fewer components in order to be found + * @param {string} feature - 4-letter feature name ('liga', 'rlig', 'dlig'...) + * @param {Object} ligature - { sub: [ids], by: id } + * @param {string} [script='DFLT'] + * @param {string} [language='dflt'] + */ + addLigature(feature: string, ligature: Object, script?: string, language?: string): void; + /** + * List all feature data for a given script and language. + * @param {string} feature - 4-letter feature name + * @param {string} [script='DFLT'] + * @param {string} [language='dflt'] + * @return {Array} substitutions - The list of substitutions. + */ + getFeature(feature: string, script?: string, language?: string): any[]; + /** + * Add a substitution to a feature for a given script and language. + * @param {string} feature - 4-letter feature name + * @param {Object} sub - the substitution to add (an object like { sub: id or [ids], by: id or [ids] }) + * @param {string} [script='DFLT'] + * @param {string} [language='dflt'] + */ + add(feature: string, sub: Object, script?: string, language?: string): void; +} +export { parse as _parse, parseBuffer as parse }; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/potpack.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/potpack.module.d.ts new file mode 100644 index 000000000..2830d6809 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/potpack.module.d.ts @@ -0,0 +1,34 @@ +/** + * potpack - by [@mourner](https://github.com/mourner) + * + * A tiny JavaScript function for packing 2D rectangles into a near-square container, + * which is useful for generating CSS sprites and WebGL textures. Similar to + * [shelf-pack](https://github.com/mapbox/shelf-pack), but static (you can't add items + * once a layout is generated), and aims for maximal space utilization. + * + * A variation of algorithms used in [rectpack2D](https://github.com/TeamHypersomnia/rectpack2D) + * and [bin-pack](https://github.com/bryanburgers/bin-pack), which are in turn based + * on [this article by Blackpawn](http://blackpawn.com/texts/lightmaps/default.html). + * + * @license + * ISC License + * + * Copyright (c) 2018, Mapbox + * + * Permission to use, copy, modify, and/or distribute this software for any purpose + * with or without fee is hereby granted, provided that the above copyright notice + * and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS + * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF + * THIS SOFTWARE. + */ +export function potpack(boxes: any): { + w: number; + h: number; + fill: number; +}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/rhino3dm/rhino3dm.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/rhino3dm/rhino3dm.d.ts new file mode 100644 index 000000000..08be483f6 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/rhino3dm/rhino3dm.d.ts @@ -0,0 +1,5 @@ +export = rhino3dm; +declare function rhino3dm(config: any): any; +declare namespace rhino3dm { + export { rhino3dm }; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/rhino3dm/rhino3dm.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/rhino3dm/rhino3dm.module.d.ts new file mode 100644 index 000000000..dfad8acce --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/rhino3dm/rhino3dm.module.d.ts @@ -0,0 +1,2 @@ +export default rhino3dm; +declare function rhino3dm(config: any): Promise; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/stats.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/stats.module.d.ts new file mode 100644 index 000000000..aeae725f1 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/stats.module.d.ts @@ -0,0 +1,18 @@ +export default Stats; +declare function Stats(): { + REVISION: number; + dom: HTMLDivElement; + addPanel: (panel: any) => any; + showPanel: (id: any) => void; + begin: () => void; + end: () => number; + update: () => void; + domElement: HTMLDivElement; + setMode: (id: any) => void; +}; +declare namespace Stats { + function Panel(name: any, fg: any, bg: any): { + dom: HTMLCanvasElement; + update: (value: any, maxValue: any) => void; + }; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/surfaceNet.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/surfaceNet.d.ts new file mode 100644 index 000000000..4c6302df7 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/surfaceNet.d.ts @@ -0,0 +1,15 @@ +/** + * SurfaceNets in JavaScript + * + * Written by Mikola Lysenko (C) 2012 + * + * MIT License + * + * Based on: S.F. Gibson, 'Constrained Elastic Surface Nets'. (1998) MERL Tech Report. + * from https://github.com/mikolalysenko/isosurface/tree/master + * + */ +export function surfaceNet(dims: any, potential: any, bounds: any): { + positions: number[][]; + cells: any[][]; +}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/utif.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/utif.module.d.ts new file mode 100644 index 000000000..d3233f736 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/utif.module.d.ts @@ -0,0 +1,156 @@ +export default UTIF; +declare namespace UTIF { + function encodeImage(rgba: any, w: any, h: any, metadata: any): ArrayBuffer; + function encode(ifds: any): ArrayBuffer; + function decode(buff: any, prm: any): any[]; + namespace decode { + function _decompress(img: any, ifds: any, data: any, off: any, len: any, cmpr: any, tgt: any, toff: any, fo: any, w: any, h: any): void; + function _decodePanasonic(img: any, data: any, off: any, len: any, tgt: any, toff: any): void; + function _decodeVC5(t: any, E: any, h: any, L: any, g: any, n: any): void; + function _decodeLogLuv32(img: any, data: any, off: any, len: any, tgt: any, toff: any): void; + function _ljpeg_diff(data: any, prm: any, huff: any): number; + function _decodeARW(img: any, inp: any, off: any, src_length: any, tgt: any, toff: any): void; + function _decodeNikon(img: any, imgs: any, data: any, off: any, src_length: any, tgt: any, toff: any): void; + function _putsF(dt: any, pos: any, val: any): void; + function _getbithuff(data: any, prm: any, nbits: any, huff: any): number; + function _make_decoder(source: any): number[]; + function _decodeNewJPEG(img: any, data: any, off: any, len: any, tgt: any, toff: any): void; + function _decodeOldJPEGInit(img: any, data: any, off: any, len: any): { + jpegOffset: any; + tables?: undefined; + sosMarker?: undefined; + sofPosition?: undefined; + } | { + jpegOffset: any; + tables: Uint8Array; + sosMarker: Uint8Array; + sofPosition: number; + }; + function _decodeOldJPEG(img: any, data: any, off: any, len: any, tgt: any, toff: any): void; + function _decodePackBits(data: any, off: any, len: any, tgt: any, toff: any): any; + function _decodeThunder(data: any, off: any, len: any, tgt: any, toff: any): void; + let _dmap: { + "1": number; + "011": number; + "000011": number; + "0000011": number; + "010": number; + "000010": number; + "0000010": number; + }; + let _lens: {}[]; + function _decodeG4(data: any, off: any, slen: any, tgt: any, toff: any, w: any, fo: any): void; + function _findDiff(line: any, x: any, clr: any): any; + function _makeDiff(line: any): any[]; + function _decodeG2(data: any, off: any, slen: any, tgt: any, toff: any, w: any, fo: any): void; + function _decodeG3(data: any, off: any, slen: any, tgt: any, toff: any, w: any, fo: any, twoDim: any): void; + function _addNtimes(arr: any, n: any, val: any): void; + function _writeBits(bits: any, tgt: any, boff: any): void; + let _decodeLZW: any; + } + function decodeImage(buff: any, img: any, ifds: any): void; + let tags: {}; + namespace _types { + namespace basic { + export { main }; + export { rest }; + } + namespace gps { + let main_1: number[]; + export { main_1 as main }; + let rest_1: { + 18: number; + 29: number; + }; + export { rest_1 as rest }; + } + } + function _readIFD(bin: any, data: any, offset: any, ifds: any, depth: any, prm: any): any; + function _writeIFD(bin: any, types: any, data: any, offset: any, ifd: any): any[]; + function toRGBA8(out: any, scl: any): Uint8Array; + function replaceIMG(imgs: any): void; + let _xhrs: any[]; + let _imgs: any[]; + function _imgLoaded(e: any): void; + function bufferToURI(buff: any): string; + namespace _binBE { + let ui8: Uint8Array; + let i16: Int16Array; + let i32: Int32Array; + let ui32: Uint32Array; + let fl32: Float32Array; + let fl64: Float64Array; + } + namespace _binLE { + import nextZero = nextZero; + export { nextZero }; + export function readUshort(buff: any, p: any): number; + export function readShort(buff: any, p: any): any; + export function readInt(buff: any, p: any): any; + export function readUint(buff: any, p: any): any; + import readASCII = readASCII; + export { readASCII }; + export function readFloat(buff: any, p: any): any; + export function readDouble(buff: any, p: any): any; + export function writeUshort(buff: any, p: any, n: any): void; + export function writeInt(buff: any, p: any, n: any): void; + export function writeUint(buff: any, p: any, n: any): void; + import writeASCII = writeASCII; + export { writeASCII }; + } + function _copyTile(tb: any, tw: any, th: any, b: any, w: any, h: any, xoff: any, yoff: any): void; + function _inflateRaw(N: any, W: any): any; + function LosslessJpegDecode(h: any): Uint8Array | Uint16Array; +} +declare var main: any[]; +declare var rest: { + 33432: number; + 33434: number; + 33437: number; + 34665: number; + 34850: number; + 34853: number; + 34855: number; + 34864: number; + 34866: number; + 36864: number; + 36867: number; + 36868: number; + 37121: number; + 37377: number; + 37378: number; + 37380: number; + 37381: number; + 37383: number; + 37384: number; + 37385: number; + 37386: number; + 37510: number; + 37520: number; + 37521: number; + 37522: number; + 40960: number; + 40961: number; + 40962: number; + 40963: number; + 40965: number; + 41486: number; + 41487: number; + 41488: number; + 41985: number; + 41986: number; + 41987: number; + 41988: number; + 41989: number; + 41990: number; + 41993: number; + 41994: number; + 41995: number; + 41996: number; + 42032: number; + 42033: number; + 42034: number; + 42036: number; + 42037: number; + 59932: number; +}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/zstddec.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/zstddec.module.d.ts new file mode 100644 index 000000000..6486bf3f1 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/libs/zstddec.module.d.ts @@ -0,0 +1,6 @@ +export { Q as ZSTDDecoder }; +declare class Q { + init(): any; + _init(A: any): void; + decode(A: any, g?: number): any; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/lighting/ClusteredLighting.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lighting/ClusteredLighting.d.ts new file mode 100644 index 000000000..66ac1de37 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/lighting/ClusteredLighting.d.ts @@ -0,0 +1,42 @@ +/** + * A custom lighting implementation based on Forward+ Clustered Shading that + * overwrites the default lighting system in {@link WebGPURenderer}. Suitable + * for 3D scenes with many point lights and real depth complexity — the view + * frustum is partitioned into a 3D cluster grid so only the lights actually + * reaching each fragment are evaluated. + * + * ```js + * const lighting = new ClusteredLighting(); + * renderer.lighting = lighting; // set lighting system + * ``` + * + * @augments Lighting + * @three_import import { ClusteredLighting } from 'three/addons/lighting/ClusteredLighting.js'; + */ +export class ClusteredLighting extends Lighting { + /** + * Constructs a new clustered lighting system. + * + * @param {number} [maxLights=1024] - Maximum number of point lights. + * @param {number} [tileSize=32] - Screen tile size in pixels (cluster XY size). + * @param {number} [zSlices=24] - Number of exponential depth slices. + * @param {number} [maxLightsPerCluster=64] - Per-cluster light-list capacity. + */ + constructor(maxLights?: number, tileSize?: number, zSlices?: number, maxLightsPerCluster?: number); + maxLights: number; + tileSize: number; + zSlices: number; + maxLightsPerCluster: number; + /** + * Creates a new clustered lights node for the given array of lights. + * + * This method is called internally by the renderer and must be overwritten by + * all custom lighting implementations. + * + * @param {Array} lights - The lights. + * @return {ClusteredLightsNode} The clustered lights node. + */ + createNode(lights?: Array): ClusteredLightsNode; +} +import { Lighting } from 'three/webgpu'; +import ClusteredLightsNode from '../tsl/lighting/ClusteredLightsNode.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lighting/DynamicLighting.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lighting/DynamicLighting.d.ts new file mode 100644 index 000000000..1dd73c216 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/lighting/DynamicLighting.d.ts @@ -0,0 +1,54 @@ +/** + * A custom lighting implementation that batches supported analytic lights into + * uniform arrays so light count changes do not recompile materials. + * + * ```js + * const lighting = new DynamicLighting( { maxPointLights: 64 } ); + * renderer.lighting = lighting; + * ``` + * + * @augments Lighting + * @three_import import { DynamicLighting } from 'three/addons/lighting/DynamicLighting.js'; + */ +export class DynamicLighting extends Lighting { + /** + * Constructs a new dynamic lighting system. + * + * @param {Object} [options={}] - Dynamic lighting configuration. + * @param {number} [options.maxDirectionalLights=8] - Maximum number of batched directional lights. + * @param {number} [options.maxPointLights=16] - Maximum number of batched point lights. + * @param {number} [options.maxSpotLights=16] - Maximum number of batched spot lights. + * @param {number} [options.maxHemisphereLights=4] - Maximum number of batched hemisphere lights. + */ + constructor(options?: { + maxDirectionalLights?: number | undefined; + maxPointLights?: number | undefined; + maxSpotLights?: number | undefined; + maxHemisphereLights?: number | undefined; + }); + options: { + maxDirectionalLights: number; + maxPointLights: number; + maxSpotLights: number; + maxHemisphereLights: number; + }; + _nodes: WeakMap; + /** + * Creates a new dynamic lights node for the given array of lights. + * + * @param {Array} lights - The lights to bind to the node. + * @return {DynamicLightsNode} The dynamic lights node. + */ + createNode(lights?: Array): DynamicLightsNode; + /** + * Returns a lights node for the given scene. + * + * @param {Scene} scene - The scene. + * @return {LightsNode} The lights node. + */ + getNode(scene: Scene): LightsNode; +} +export default DynamicLighting; +import { Lighting } from 'three/webgpu'; +import DynamicLightsNode from '../tsl/lighting/DynamicLightsNode.js'; +import { LightsNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lighting/LightProbeGrid.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lighting/LightProbeGrid.d.ts new file mode 100644 index 000000000..fbebd4b1f --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/lighting/LightProbeGrid.d.ts @@ -0,0 +1,142 @@ +/** + * A 3D grid of L2 Spherical Harmonic irradiance probes that provides + * position-dependent diffuse global illumination. + * + * Note that this class can only be used with {@link WebGLRenderer}. + * A version for {@link WebGPURenderer} will be added at a later point. + * + * All seven packed SH sub-volumes are stored in a **single** RGBA + * `WebGL3DRenderTarget` using a texture-atlas layout along the Z axis. + * Each sub-volume occupies `( nz + 2 )` atlas slices: one padding slice at + * each end (a copy of the nearest edge data slice) to prevent color bleeding + * when the hardware trilinear filter reads across a sub-volume boundary. + * + * Atlas layout (nz = resolution.z, PADDING = 1): + * ``` + * slice 0 : padding (copy of sub-volume 0, data slice 0) + * slices 1 … nz : sub-volume 0 data + * slice nz + 1 : padding (copy of sub-volume 0, data slice nz-1) + * slice nz + 2 : padding (copy of sub-volume 1, data slice 0) + * slices nz+3 … 2*nz+2 : sub-volume 1 data + * … + * ``` + * Total atlas depth = `7 * ( nz + 2 )`. + * + * Baking is fully GPU-resident: cubemap rendering, SH projection, and + * texture packing all happen on the GPU with zero CPU readback. + * + * @three_import import { LightProbeGrid } from 'three/addons/lighting/LightProbeGrid.js'; + */ +export class LightProbeGrid extends Object3D { + /** + * Constructs a new irradiance probe grid. + * + * The volume is centered at the object's position. + * + * @param {number} [width=1] - Full width of the volume along X. + * @param {number} [height=1] - Full height of the volume along Y. + * @param {number} [depth=1] - Full depth of the volume along Z. + * @param {number} [widthProbes] - Number of probes along X. Defaults to `Math.max( 2, Math.round( width ) + 1 )`. + * @param {number} [heightProbes] - Number of probes along Y. Defaults to `Math.max( 2, Math.round( height ) + 1 )`. + * @param {number} [depthProbes] - Number of probes along Z. Defaults to `Math.max( 2, Math.round( depth ) + 1 )`. + */ + constructor(width?: number, height?: number, depth?: number, widthProbes?: number, heightProbes?: number, depthProbes?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLightProbeGrid: boolean; + /** + * The full width of the volume along X. + * + * @type {number} + */ + width: number; + /** + * The full height of the volume along Y. + * + * @type {number} + */ + height: number; + /** + * The full depth of the volume along Z. + * + * @type {number} + */ + depth: number; + /** + * The number of probes along each axis. + * + * @type {Vector3} + */ + resolution: Vector3; + /** + * The world-space bounding box for the grid. Updated automatically + * by {@link LightProbeGrid#bake}. + * + * @type {Box3} + */ + boundingBox: Box3; + /** + * The single RGBA atlas 3D texture storing all seven packed SH sub-volumes. + * + * @type {?Data3DTexture} + * @default null + */ + texture: Data3DTexture | null; + /** + * Internal render target for GPU-resident baking. + * + * @private + * @type {?WebGL3DRenderTarget} + * @default null + */ + private _renderTarget; + /** + * Returns the world-space position of the probe at grid indices (ix, iy, iz). + * + * @param {number} ix - X index. + * @param {number} iy - Y index. + * @param {number} iz - Z index. + * @param {Vector3} target - The target vector. + * @return {Vector3} The world-space position. + */ + getProbePosition(ix: number, iy: number, iz: number, target: Vector3): Vector3; + /** + * Updates the world-space bounding box from the current position and size. + */ + updateBoundingBox(): void; + /** + * Bakes all probes by rendering cubemaps at each probe position + * and projecting to L2 SH. Fully GPU-resident with zero CPU readback. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {Scene} scene - The scene to render. + * @param {Object} [options] - Bake options. + * @param {number} [options.cubemapSize=8] - Resolution of each cubemap face. + * @param {number} [options.near=0.1] - Near plane for the cube camera. + * @param {number} [options.far=100] - Far plane for the cube camera. + */ + bake(renderer: WebGLRenderer, scene: Scene, options?: { + cubemapSize?: number | undefined; + near?: number | undefined; + far?: number | undefined; + }): void; + /** + * Ensures the atlas 3D render target exists with the correct dimensions. + * + * @private + */ + private _ensureTextures; + /** + * Frees GPU resources. + */ + dispose(): void; +} +import { Object3D } from 'three'; +import { Vector3 } from 'three'; +import { Box3 } from 'three'; +import { Scene } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lighting/TiledLighting.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lighting/TiledLighting.d.ts new file mode 100644 index 000000000..80361aa55 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/lighting/TiledLighting.d.ts @@ -0,0 +1,25 @@ +/** + * A custom lighting implementation based on Tiled-Lighting that overwrites the default + * implementation in {@link WebGPURenderer}. + * + * ```js + * const lighting = new TiledLighting(); + * renderer.lighting = lighting; // set lighting system + * ``` + * + * @augments Lighting + * @three_import import { TiledLighting } from 'three/addons/lighting/TiledLighting.js'; + */ +export class TiledLighting extends Lighting { + /** + * Creates a new tiled lights node for the given array of lights. + * + * This method is called internally by the renderer and must be overwritten by + * all custom lighting implementations. + * + * @param {Array} lights - The render object. + * @return {TiledLightsNode} The tiled lights node. + */ + createNode(lights?: Array): TiledLightsNode; +} +import { Lighting } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lights/LightProbeGenerator.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lights/LightProbeGenerator.d.ts new file mode 100644 index 000000000..b1ccbcbd9 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/lights/LightProbeGenerator.d.ts @@ -0,0 +1,30 @@ +/** + * Utility class for creating instances of {@link LightProbe}. + * + * @hideconstructor + * @three_import import { LightProbeGenerator } from 'three/addons/lights/LightProbeGenerator.js'; + */ +export class LightProbeGenerator { + /** + * Creates a light probe from the given (radiance) environment map. + * The method expects that the environment map is represented as a cube texture. + * + * @param {CubeTexture} cubeTexture - The environment map. + * @return {LightProbe} The created light probe. + */ + static fromCubeTexture(cubeTexture: CubeTexture): LightProbe; + /** + * Creates a light probe from the given (radiance) environment map. + * The method expects that the environment map is represented as a cube render target. + * + * The cube render target must be in RGBA so `cubeRenderTarget.texture.format` must be + * set to {@link RGBAFormat}. + * + * @async + * @param {WebGPURenderer|WebGLRenderer} renderer - The renderer. + * @param {CubeRenderTarget|WebGLCubeRenderTarget} cubeRenderTarget - The environment map. + * @return {Promise} A Promise that resolves with the created light probe. + */ + static fromCubeRenderTarget(renderer: WebGPURenderer | WebGLRenderer, cubeRenderTarget: CubeRenderTarget | WebGLCubeRenderTarget): Promise; +} +import { LightProbe } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lights/RectAreaLightTexturesLib.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lights/RectAreaLightTexturesLib.d.ts new file mode 100644 index 000000000..833559dbc --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/lights/RectAreaLightTexturesLib.d.ts @@ -0,0 +1,32 @@ +/** + * Texture library for {@link RectAreaLight}. This class holds the LTC BRDF data + * in data textures for further use in the renderer. + * + * Reference: Real-Time Polygonal-Light Shading with Linearly Transformed Cosines + * by Eric Heitz, Jonathan Dupuy, Stephen Hill and David Neubelt. [Code](https://github.com/selfshadow/ltc_code/). + * + * NOTE: This is a temporary location for the BRDF approximation texture data + * based off of Eric Heitz's work (see citation). BRDF data for + * `RectAreaLight` is currently approximated using a precomputed texture + * of roughly 80kb in size. The hope is to find a better way to include + * the large texture data before including the full RectAreaLight implementation + * in the main build files. + * + * @hideconstructor + * @three_import import { RectAreaLightTexturesLib } from 'three/addons/lights/RectAreaLightTexturesLib.js'; + */ +export class RectAreaLightTexturesLib { + /** + * Inits the texture library. + * + * @return {RectAreaLightTexturesLib} + */ + static init(): RectAreaLightTexturesLib; +} +export namespace RectAreaLightTexturesLib { + let LTC_HALF_1: DataTexture | null | undefined; + let LTC_HALF_2: DataTexture | null | undefined; + let LTC_FLOAT_1: DataTexture | null | undefined; + let LTC_FLOAT_2: DataTexture | null | undefined; +} +import { DataTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lights/RectAreaLightUniformsLib.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lights/RectAreaLightUniformsLib.d.ts new file mode 100644 index 000000000..4e8ec37f6 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/lights/RectAreaLightUniformsLib.d.ts @@ -0,0 +1,19 @@ +/** + * This class is only relevant when using {@link RectAreaLight} with {@link WebGLRenderer}. + * + * Before rect area lights can be used, the internal uniform library of the renderer must be + * enhanced with the following code. + * + * ```js + * RectAreaLightUniformsLib.init(); + * ``` + * + * @hideconstructor + * @three_import import { RectAreaLightUniformsLib } from 'three/addons/lights/RectAreaLightUniformsLib.js'; + */ +export class RectAreaLightUniformsLib { + /** + * Inits the uniform library required when using rect area lights. + */ + static init(): void; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/lines/Line2.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lines/Line2.d.ts new file mode 100644 index 000000000..a1cdac05d --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/lines/Line2.d.ts @@ -0,0 +1,44 @@ +/** + * A polyline drawn between vertices. + * + * This adds functionality beyond {@link Line}, like arbitrary line width and changing width to + * be in world units.It extends {@link LineSegments2}, simplifying constructing segments from a + * chain of points. + * + * This module can only be used with {@link WebGLRenderer}. When using {@link WebGPURenderer}, + * import the class from `lines/webgpu/Line2.js`. + * + * ```js + * const geometry = new LineGeometry(); + * geometry.setPositions( positions ); + * geometry.setColors( colors ); + * + * const material = new LineMaterial( { linewidth: 5, vertexColors: true } }; + * + * const line = new Line2( geometry, material ); + * scene.add( line ); + * ``` + * + * @augments LineSegments2 + * @three_import import { Line2 } from 'three/addons/lines/Line2.js'; + */ +export class Line2 extends LineSegments2 { + /** + * Constructs a new wide line. + * + * @param {LineGeometry} [geometry] - The line geometry. + * @param {LineMaterial} [material] - The line material. + */ + constructor(geometry?: LineGeometry, material?: LineMaterial); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLine2: boolean; +} +import { LineSegments2 } from './LineSegments2.js'; +import { LineGeometry } from './LineGeometry.js'; +import { LineMaterial } from './LineMaterial.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lines/LineGeometry.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lines/LineGeometry.d.ts new file mode 100644 index 000000000..2564da5ce --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/lines/LineGeometry.d.ts @@ -0,0 +1,58 @@ +/** + * A chain of vertices, forming a polyline. + * + * This is used in {@link Line2} to describe the shape. + * + * ```js + * const points = [ + * new THREE.Vector3( - 10, 0, 0 ), + * new THREE.Vector3( 0, 5, 0 ), + * new THREE.Vector3( 10, 0, 0 ), + * ]; + * + * const geometry = new LineGeometry(); + * geometry.setFromPoints( points ); + * ``` + * + * @augments LineSegmentsGeometry + * @three_import import { LineLineGeometry2 } from 'three/addons/lines/LineGeometry.js'; + */ +export class LineGeometry extends LineSegmentsGeometry { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLineGeometry: boolean; + /** + * Sets the given line positions for this geometry. + * + * @param {Float32Array|Array} array - The position data to set. + * @return {LineGeometry} A reference to this geometry. + */ + setPositions(array: Float32Array | Array): LineGeometry; + /** + * Sets the given line colors for this geometry. + * + * @param {Float32Array|Array} array - The position data to set. + * @return {LineGeometry} A reference to this geometry. + */ + setColors(array: Float32Array | Array): LineGeometry; + /** + * Setups this line segments geometry from the given sequence of points. + * + * @param {Array} points - An array of points in 2D or 3D space. + * @return {LineGeometry} A reference to this geometry. + */ + setFromPoints(points: Array): LineGeometry; + /** + * Setups this line segments geometry from the given line. + * + * @param {Line} line - The line that should be used as a data source for this geometry. + * @return {LineGeometry} A reference to this geometry. + */ + fromLine(line: Line): LineGeometry; +} +import { LineSegmentsGeometry } from './LineSegmentsGeometry.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lines/LineMaterial.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lines/LineMaterial.d.ts new file mode 100644 index 000000000..d59ebc5ec --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/lines/LineMaterial.d.ts @@ -0,0 +1,89 @@ +/** + * A material for drawing wireframe-style geometries. + * + * Unlike {@link LineBasicMaterial}, it supports arbitrary line widths and allows using world units + * instead of screen space units. This material is used with {@link LineSegments2} and {@link Line2}. + * + * This module can only be used with {@link WebGLRenderer}. When using {@link WebGPURenderer}, + * use {@link Line2NodeMaterial}. + * + * @augments ShaderMaterial + * @three_import import { LineMaterial } from 'three/addons/lines/LineMaterial.js'; + */ +export class LineMaterial extends ShaderMaterial { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLineMaterial: boolean; + set color(value: Color); + /** + * The material's color. + * + * @type {Color} + * @default (1,1,1) + */ + get color(): Color; + set worldUnits(value: boolean); + /** + * Whether the material's sizes (width, dash gaps) are in world units. + * + * @type {boolean} + * @default false + */ + get worldUnits(): boolean; + set dashed(value: boolean); + /** + * Whether the line is dashed, or solid. + * + * @type {boolean} + * @default false + */ + get dashed(): boolean; + set dashScale(value: number); + /** + * The scale of the dashes and gaps. + * + * @type {number} + * @default 1 + */ + get dashScale(): number; + set dashSize(value: number); + /** + * The size of the dash. + * + * @type {number} + * @default 1 + */ + get dashSize(): number; + set dashOffset(value: number); + /** + * Where in the dash cycle the dash starts. + * + * @type {number} + * @default 0 + */ + get dashOffset(): number; + set gapSize(value: number); + /** + * The size of the gap. + * + * @type {number} + * @default 0 + */ + get gapSize(): number; + set resolution(value: Vector2); + /** + * The size of the viewport, in screen pixels. This must be kept updated to make + * screen-space rendering accurate. The `LineSegments2.onBeforeRender` callback + * performs the update for visible objects. + * + * @type {Vector2} + */ + get resolution(): Vector2; +} +import { ShaderMaterial } from 'three'; +import { Vector2 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lines/LineSegments2.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lines/LineSegments2.d.ts new file mode 100644 index 000000000..7dd0b3b2d --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/lines/LineSegments2.d.ts @@ -0,0 +1,60 @@ +/** + * A series of lines drawn between pairs of vertices. + * + * This adds functionality beyond {@link LineSegments}, like arbitrary line width and changing width + * to be in world units. {@link Line2} extends this object, forming a polyline instead of individual + * segments. + * + * This module can only be used with {@link WebGLRenderer}. When using {@link WebGPURenderer}, + * import the class from `lines/webgpu/LineSegments2.js`. + * + * ```js + * const geometry = new LineSegmentsGeometry(); + * geometry.setPositions( positions ); + * geometry.setColors( colors ); + * + * const material = new LineMaterial( { linewidth: 5, vertexColors: true } }; + * + * const lineSegments = new LineSegments2( geometry, material ); + * scene.add( lineSegments ); + * ``` + * + * @augments Mesh + * @three_import import { LineSegments2 } from 'three/addons/lines/LineSegments2.js'; + */ +export class LineSegments2 extends Mesh { + /** + * Constructs a new wide line. + * + * @param {LineSegmentsGeometry} [geometry] - The line geometry. + * @param {LineMaterial} [material] - The line material. + */ + constructor(geometry?: LineSegmentsGeometry, material?: LineMaterial); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLineSegments2: boolean; + /** + * Computes an array of distance values which are necessary for rendering dashed lines. + * For each vertex in the geometry, the method calculates the cumulative length from the + * current point to the very beginning of the line. + * + * @return {LineSegments2} A reference to this instance. + */ + computeLineDistances(): LineSegments2; + /** + * Computes intersection points between a casted ray and this instance. + * + * @param {Raycaster} raycaster - The raycaster. + * @param {Array} intersects - The target array that holds the intersection points. + */ + raycast(raycaster: Raycaster, intersects: Array): void; + onBeforeRender(renderer: any): void; +} +import { Mesh } from 'three'; +import { LineSegmentsGeometry } from './LineSegmentsGeometry.js'; +import { LineMaterial } from './LineMaterial.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lines/LineSegmentsGeometry.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lines/LineSegmentsGeometry.d.ts new file mode 100644 index 000000000..4845d8410 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/lines/LineSegmentsGeometry.d.ts @@ -0,0 +1,73 @@ +/** + * A series of vertex pairs, forming line segments. + * + * This is used in {@link LineSegments2} to describe the shape. + * + * @augments InstancedBufferGeometry + * @three_import import { LineSegmentsGeometry } from 'three/addons/lines/LineSegmentsGeometry.js'; + */ +export class LineSegmentsGeometry extends InstancedBufferGeometry { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLineSegmentsGeometry: boolean; + /** + * Applies the given 4x4 transformation matrix to the geometry. + * + * @param {Matrix4} matrix - The matrix to apply. + * @return {LineSegmentsGeometry} A reference to this instance. + */ + applyMatrix4(matrix: Matrix4): LineSegmentsGeometry; + /** + * Sets the given line positions for this geometry. The length must be a multiple of six since + * each line segment is defined by a start end vertex in the pattern `(xyz xyz)`. + * + * @param {Float32Array|Array} array - The position data to set. + * @return {LineSegmentsGeometry} A reference to this geometry. + */ + setPositions(array: Float32Array | Array): LineSegmentsGeometry; + /** + * Sets the given line colors for this geometry. The length must be a multiple of six since + * each line segment is defined by a start end color in the pattern `(rgb rgb)`. + * + * @param {Float32Array|Array} array - The position data to set. + * @return {LineSegmentsGeometry} A reference to this geometry. + */ + setColors(array: Float32Array | Array): LineSegmentsGeometry; + /** + * Setups this line segments geometry from the given wireframe geometry. + * + * @param {WireframeGeometry} geometry - The geometry that should be used as a data source for this geometry. + * @return {LineSegmentsGeometry} A reference to this geometry. + */ + fromWireframeGeometry(geometry: WireframeGeometry): LineSegmentsGeometry; + /** + * Setups this line segments geometry from the given edges geometry. + * + * @param {EdgesGeometry} geometry - The geometry that should be used as a data source for this geometry. + * @return {LineSegmentsGeometry} A reference to this geometry. + */ + fromEdgesGeometry(geometry: EdgesGeometry): LineSegmentsGeometry; + /** + * Setups this line segments geometry from the given mesh. + * + * @param {Mesh} mesh - The mesh geometry that should be used as a data source for this geometry. + * @return {LineSegmentsGeometry} A reference to this geometry. + */ + fromMesh(mesh: Mesh): LineSegmentsGeometry; + /** + * Setups this line segments geometry from the given line segments. + * + * @param {LineSegments} lineSegments - The line segments that should be used as a data source for this geometry. + * Assumes the source geometry is not using indices. + * @return {LineSegmentsGeometry} A reference to this geometry. + */ + fromLineSegments(lineSegments: LineSegments): LineSegmentsGeometry; + toJSON(): void; +} +import { InstancedBufferGeometry } from 'three'; +import { WireframeGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lines/Wireframe.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lines/Wireframe.d.ts new file mode 100644 index 000000000..a40c88984 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/lines/Wireframe.d.ts @@ -0,0 +1,46 @@ +/** + * A class for creating wireframes based on wide lines. + * + * This module can only be used with {@link WebGLRenderer}. When using {@link WebGPURenderer}, + * import the class from `lines/webgpu/Wireframe.js`. + * + * ```js + * const geometry = new THREE.IcosahedronGeometry(); + * const wireframeGeometry = new WireframeGeometry2( geo ); + * + * const wireframe = new Wireframe( wireframeGeometry, material ); + * scene.add( wireframe ); + * ``` + * + * @augments Mesh + * @three_import import { Wireframe } from 'three/addons/lines/Wireframe.js'; + */ +export class Wireframe extends Mesh { + /** + * Constructs a new wireframe. + * + * @param {LineSegmentsGeometry} [geometry] - The line geometry. + * @param {LineMaterial} [material] - The line material. + */ + constructor(geometry?: LineSegmentsGeometry, material?: LineMaterial); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWireframe: boolean; + /** + * Computes an array of distance values which are necessary for rendering dashed lines. + * For each vertex in the geometry, the method calculates the cumulative length from the + * current point to the very beginning of the line. + * + * @return {Wireframe} A reference to this instance. + */ + computeLineDistances(): Wireframe; + onBeforeRender(renderer: any): void; +} +import { Mesh } from 'three'; +import { LineSegmentsGeometry } from './LineSegmentsGeometry.js'; +import { LineMaterial } from './LineMaterial.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lines/WireframeGeometry2.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lines/WireframeGeometry2.d.ts new file mode 100644 index 000000000..61bb232cf --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/lines/WireframeGeometry2.d.ts @@ -0,0 +1,30 @@ +/** + * A special type of line segments geometry intended for wireframe rendering. + * + * This is used in {@link Wireframe} to describe the shape. + * + * ```js + * const geometry = new THREE.IcosahedronGeometry(); + * const wireframeGeometry = new WireframeGeometry2( geo ); + * ``` + * + * @augments LineSegmentsGeometry + * @three_import import { WireframeGeometry2 } from 'three/addons/lines/WireframeGeometry2.js'; + */ +export class WireframeGeometry2 extends LineSegmentsGeometry { + /** + * Constructs a new wireframe geometry. + * + * @param {BufferGeometry} [geometry] - The geometry to render the wireframe for. + */ + constructor(geometry?: BufferGeometry); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWireframeGeometry2: boolean; +} +import { LineSegmentsGeometry } from './LineSegmentsGeometry.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/Line2.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/Line2.d.ts new file mode 100644 index 000000000..99fa543d7 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/Line2.d.ts @@ -0,0 +1,33 @@ +/** + * A polyline drawn between vertices. + * + * This adds functionality beyond {@link Line}, like arbitrary line width and changing width to + * be in world units.It extends {@link LineSegments2}, simplifying constructing segments from a + * chain of points. + * + * This module can only be used with {@link WebGPURenderer}. When using {@link WebGLRenderer}, + * import the class from `lines/Line2.js`. + * + * @augments LineSegments2 + * @three_import import { Line2 } from 'three/addons/lines/webgpu/Line2.js'; + */ +export class Line2 extends LineSegments2 { + /** + * Constructs a new wide line. + * + * @param {LineGeometry} [geometry] - The line geometry. + * @param {Line2NodeMaterial} [material] - The line material. + */ + constructor(geometry?: LineGeometry, material?: Line2NodeMaterial); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLine2: boolean; +} +import { LineSegments2 } from './LineSegments2.js'; +import { LineGeometry } from '../LineGeometry.js'; +import { Line2NodeMaterial } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/LineSegments2.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/LineSegments2.d.ts new file mode 100644 index 000000000..b78c3ec1e --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/LineSegments2.d.ts @@ -0,0 +1,51 @@ +/** + * A series of lines drawn between pairs of vertices. + * + * This adds functionality beyond {@link LineSegments}, like arbitrary line width and changing width + * to be in world units. {@link Line2} extends this object, forming a polyline instead of individual + * segments. + * + * This module can only be used with {@link WebGPURenderer}. When using {@link WebGLRenderer}, + * import the class from `lines/LineSegments2.js`. + * + * @augments Mesh + * @three_import import { LineSegments2 } from 'three/addons/lines/webgpu/LineSegments2.js'; + */ +export class LineSegments2 extends Mesh { + /** + * Constructs a new wide line. + * + * @param {LineSegmentsGeometry} [geometry] - The line geometry. + * @param {Line2NodeMaterial} [material] - The line material. + */ + constructor(geometry?: LineSegmentsGeometry, material?: Line2NodeMaterial); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLineSegments2: boolean; + _resolution: Vector2; + /** + * Computes an array of distance values which are necessary for rendering dashed lines. + * For each vertex in the geometry, the method calculates the cumulative length from the + * current point to the very beginning of the line. + * + * @return {LineSegments2} A reference to this instance. + */ + computeLineDistances(): LineSegments2; + onBeforeRender(renderer: any): void; + /** + * Computes intersection points between a casted ray and this instance. + * + * @param {Raycaster} raycaster - The raycaster. + * @param {Array} intersects - The target array that holds the intersection points. + */ + raycast(raycaster: Raycaster, intersects: Array): void; +} +import { Mesh } from 'three/webgpu'; +import { Vector2 } from 'three/webgpu'; +import { LineSegmentsGeometry } from '../LineSegmentsGeometry.js'; +import { Line2NodeMaterial } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/Wireframe.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/Wireframe.d.ts new file mode 100644 index 000000000..5c34f7a30 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/Wireframe.d.ts @@ -0,0 +1,37 @@ +/** + * A class for creating wireframes based on wide lines. + * + * This module can only be used with {@link WebGPURenderer}. When using {@link WebGLRenderer}, + * import the class from `lines/Wireframe.js`. + * + * @augments Mesh + * @three_import import { Wireframe } from 'three/addons/lines/webgpu/Wireframe.js'; + */ +export class Wireframe extends Mesh { + /** + * Constructs a new wireframe. + * + * @param {LineSegmentsGeometry} [geometry] - The line geometry. + * @param {Line2NodeMaterial} [material] - The line material. + */ + constructor(geometry?: LineSegmentsGeometry, material?: Line2NodeMaterial); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWireframe: boolean; + /** + * Computes an array of distance values which are necessary for rendering dashed lines. + * For each vertex in the geometry, the method calculates the cumulative length from the + * current point to the very beginning of the line. + * + * @return {Wireframe} A reference to this instance. + */ + computeLineDistances(): Wireframe; +} +import { Mesh } from 'three/webgpu'; +import { LineSegmentsGeometry } from '../LineSegmentsGeometry.js'; +import { Line2NodeMaterial } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/3DMLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/3DMLoader.d.ts new file mode 100644 index 000000000..b2415ffd0 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/3DMLoader.d.ts @@ -0,0 +1,110 @@ +/** + * A loader for Rhinoceros 3D files and objects. + * + * Rhinoceros is a 3D modeler used to create, edit, analyze, document, render, + * animate, and translate NURBS curves, surfaces, breps, extrusions, point clouds, + * as well as polygon meshes and SubD objects. `rhino3dm.js` is compiled to WebAssembly + * from the open source geometry library `openNURBS`. The loader currently uses + * `rhino3dm.js 8.4.0`. + * + * ```js + * const loader = new Rhino3dmLoader(); + * loader.setLibraryPath( 'https://cdn.jsdelivr.net/npm/rhino3dm@8.0.1' ); + * + * const object = await loader.loadAsync( 'models/3dm/Rhino_Logo.3dm' ); + * scene.add( object ); + * ``` + * + * @augments Loader + * @three_import import { Rhino3dmLoader } from 'three/addons/loaders/3DMLoader.js'; + */ +export class Rhino3dmLoader extends Loader { + /** + * Constructs a new Rhino 3DM loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + libraryPath: string; + libraryPending: Promise | null; + libraryBinary: any; + libraryConfig: {}; + url: string; + workerLimit: number; + workerPool: any[]; + workerNextTaskID: number; + workerSourceURL: string; + workerConfig: {}; + materials: any[]; + warnings: any[]; + /** + * Path to a folder containing the JS and WASM libraries. + * + * @param {string} path - The library path to set. + * @return {Rhino3dmLoader} A reference to this loader. + */ + setLibraryPath(path: string): Rhino3dmLoader; + /** + * Sets the maximum number of Web Workers to be used during decoding. + * A lower limit may be preferable if workers are also for other + * tasks in the application. + * + * @param {number} workerLimit - The worker limit. + * @return {Rhino3dmLoader} A reference to this loader. + */ + setWorkerLimit(workerLimit: number): Rhino3dmLoader; + /** + * Starts loading from the given URL and passes the loaded 3DM asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Object3D)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: Object3D) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Prints debug messages to the browser console. + */ + debug(): void; + /** + * Decodes the 3DM asset data with a Web Worker. + * + * @param {ArrayBuffer} buffer - The raw 3DM asset data as an array buffer. + * @param {string} url - The asset URL. + * @return {Promise} A Promise that resolved with the decoded 3D object. + */ + decodeObjects(buffer: ArrayBuffer, url: string): Promise; + /** + * Parses the given 3DM data and passes the loaded 3DM asset + * to the `onLoad()` callback. + * + * @param {ArrayBuffer} data - The raw 3DM asset data as an array buffer. + * @param {function(Object3D)} onLoad - Executed when the loading process has been finished. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + parse(data: ArrayBuffer, onLoad: (arg0: Object3D) => any, onError: onErrorCallback): void; + _compareMaterials(material: any): any; + _createMaterial(material: any, renderEnvironment: any): MeshStandardMaterial; + _createGeometry(data: any): Object3D; + _createObject(obj: any, mat: any): Sprite | Mesh | Line | Points | SpotLight | PointLight | DirectionalLight | RectAreaLight | undefined; + _initLibrary(): Promise; + _getWorker(taskCost: any): Promise; + _releaseTask(worker: any, taskID: any): void; + /** + * Frees internal resources. This method should be called + * when the loader is no longer required. + */ + dispose(): void; +} +import { Loader } from 'three'; +import { Object3D } from 'three'; +import { MeshStandardMaterial } from 'three'; +import { Sprite } from 'three'; +import { Mesh } from 'three'; +import { Line } from 'three'; +import { Points } from 'three'; +import { SpotLight } from 'three'; +import { PointLight } from 'three'; +import { DirectionalLight } from 'three'; +import { RectAreaLight } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/3MFLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/3MFLoader.d.ts new file mode 100644 index 000000000..6d04210bb --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/3MFLoader.d.ts @@ -0,0 +1,66 @@ +/** + * A loader for the [3D Manufacturing Format (3MF)](https://3mf.io/specification/) format. + * + * The following features from the core specification are supported: + * + * - 3D Models + * - Object Resources (Meshes and Components) + * - Material Resources (Base Materials) + * + * 3MF Materials and Properties Extension are only partially supported. + * + * - Texture 2D + * - Texture 2D Groups + * - Color Groups (Vertex Colors) + * - Metallic Display Properties (PBR) + * + * ```js + * const loader = new ThreeMFLoader(); + * + * const object = await loader.loadAsync( './models/3mf/truck.3mf' ); + * object.rotation.set( - Math.PI / 2, 0, 0 ); // z-up conversion + * scene.add( object ); + * ``` + * + * @augments Loader + * @three_import import { ThreeMFLoader } from 'three/addons/loaders/3MFLoader.js'; + */ +export class ThreeMFLoader extends Loader { + /** + * Constructs a new 3MF loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * An array of available extensions. + * + * @type {Array} + */ + availableExtensions: Array; + /** + * Starts loading from the given URL and passes the loaded 3MF asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Group)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: Group) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given 3MF data and returns the resulting group. + * + * @param {ArrayBuffer} data - The raw 3MF asset data as an array buffer. + * @return {Group} A group representing the parsed asset. + */ + parse(data: ArrayBuffer): Group; + /** + * Adds a 3MF extension. + * + * @param {Object} extension - The extension to add. + */ + addExtension(extension: Object): void; +} +import { Loader } from 'three'; +import { Group } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/AMFLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/AMFLoader.d.ts new file mode 100644 index 000000000..ab0d0f496 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/AMFLoader.d.ts @@ -0,0 +1,43 @@ +/** + * A loader for the AMF format. + * + * The loader supports materials, color and ZIP compressed files. + * No constellation support (yet). + * + * ```js + * const loader = new AMFLoader(); + * + * const object = await loader.loadAsync( './models/amf/rook.amf' ); + * scene.add( object ); + * ``` + * + * @augments Loader + * @three_import import { AMFLoader } from 'three/addons/loaders/AMFLoader.js'; + */ +export class AMFLoader extends Loader { + /** + * Constructs a new AMF loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Starts loading from the given URL and passes the loaded AMF asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Group)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: Group) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given AMF data and returns the resulting group. + * + * @param {ArrayBuffer} data - The raw AMF asset data as an array buffer. + * @return {Group} A group representing the parsed asset. + */ + parse(data: ArrayBuffer): Group; +} +import { Loader } from 'three'; +import { Group } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/BVHLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/BVHLoader.d.ts new file mode 100644 index 000000000..a63bd7f6c --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/BVHLoader.d.ts @@ -0,0 +1,71 @@ +/** + * A loader for the BVH format. + * + * Imports BVH files and outputs a single {@link Skeleton} and {@link AnimationClip}. + * The loader only supports BVH files containing a single root right now. + * + * ```js + * const loader = new BVHLoader(); + * const result = await loader.loadAsync( 'models/bvh/pirouette.bvh' ); + * + * // visualize skeleton + * const skeletonHelper = new THREE.SkeletonHelper( result.skeleton.bones[ 0 ] ); + * scene.add( result.skeleton.bones[ 0 ] ); + * scene.add( skeletonHelper ); + * + * // play animation clip + * mixer = new THREE.AnimationMixer( result.skeleton.bones[ 0 ] ); + * mixer.clipAction( result.clip ).play(); + * ``` + * + * @augments Loader + * @three_import import { BVHLoader } from 'three/addons/loaders/BVHLoader.js'; + */ +export class BVHLoader extends Loader { + /** + * Constructs a new BVH loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Whether to animate bone positions or not. + * + * @type {boolean} + * @default true + */ + animateBonePositions: boolean; + /** + * Whether to animate bone rotations or not. + * + * @type {boolean} + * @default true + */ + animateBoneRotations: boolean; + /** + * Starts loading from the given URL and passes the loaded BVH asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function({skeleton:Skeleton,clip:AnimationClip})} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: { + skeleton: Skeleton; + clip: AnimationClip; + }) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given BVH data and returns the resulting data. + * + * @param {string} text - The raw BVH data as a string. + * @return {{skeleton:Skeleton,clip:AnimationClip}} An object representing the parsed asset. + */ + parse(text: string): { + skeleton: Skeleton; + clip: AnimationClip; + }; +} +import { Loader } from 'three'; +import { Skeleton } from 'three'; +import { AnimationClip } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/ColladaLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/ColladaLoader.d.ts new file mode 100644 index 000000000..6eff80f62 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/ColladaLoader.d.ts @@ -0,0 +1,49 @@ +/** + * A loader for the Collada format. + * + * The Collada format is very complex so this loader only supports a subset of what + * is defined in the [official specification](https://www.khronos.org/files/collada_spec_1_5.pdf). + * + * Assets with a Z-UP coordinate system are transformed it into Y-UP by a simple rotation. + * The vertex data are not converted. + * + * ```js + * const loader = new ColladaLoader(); + * + * const result = await loader.loadAsync( './models/collada/elf/elf.dae' ); + * scene.add( result.scene ); + * ``` + * + * @augments Loader + * @three_import import { ColladaLoader } from 'three/addons/loaders/ColladaLoader.js'; + */ +export class ColladaLoader extends Loader { + /** + * Starts loading from the given URL and passes the loaded Collada asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function({scene:Group,animations:Array,kinematics:Object})} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: { + scene: Group; + animations: Array; + kinematics: Object; + }) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given Collada data and returns a result object holding the parsed scene, + * an array of animation clips and kinematics. + * + * @param {string} text - The raw Collada data as a string. + * @param {string} [path] - The asset path. + * @return {?{scene:Group,animations:Array,kinematics:Object}} An object representing the parsed asset. + */ + parse(text: string, path?: string): { + scene: Group; + animations: Array; + kinematics: Object; + } | null; +} +import { Loader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/DDSLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/DDSLoader.d.ts new file mode 100644 index 000000000..1042415d7 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/DDSLoader.d.ts @@ -0,0 +1,30 @@ +/** + * A loader for the S3TC texture compression format. + * + * ```js + * const loader = new DDSLoader(); + * + * const map = loader.load( 'textures/compressed/disturb_dxt1_nomip.dds' ); + * map.colorSpace = THREE.SRGBColorSpace; // only for color textures + * ``` + * + * @augments CompressedTextureLoader + * @three_import import { DDSLoader } from 'three/addons/loaders/DDSLoader.js'; + */ +export class DDSLoader extends CompressedTextureLoader { + /** + * Constructs a new DDS loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Parses the given S3TC texture data. + * + * @param {ArrayBuffer} buffer - The raw texture data. + * @param {boolean} loadMipmaps - Whether to load mipmaps or not. + * @return {CompressedTextureLoader~TexData} An object representing the parsed texture data. + */ + parse(buffer: ArrayBuffer, loadMipmaps: boolean): CompressedTextureLoader; +} +import { CompressedTextureLoader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/DRACOLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/DRACOLoader.d.ts new file mode 100644 index 000000000..8ea3c4d09 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/DRACOLoader.d.ts @@ -0,0 +1,116 @@ +/** + * A loader for the Draco format. + * + * [Draco](https://google.github.io/draco/) is an open source library for compressing + * and decompressing 3D meshes and point clouds. Compressed geometry can be significantly smaller, + * at the cost of additional decoding time on the client device. + * + * Standalone Draco files have a `.drc` extension, and contain vertex positions, normals, colors, + * and other attributes. Draco files do not contain materials, textures, animation, or node hierarchies – + * to use these features, embed Draco geometry inside of a glTF file. A normal glTF file can be converted + * to a Draco-compressed glTF file using [glTF-Pipeline](https://github.com/CesiumGS/gltf-pipeline). + * When using Draco with glTF, an instance of `DRACOLoader` will be used internally by {@link GLTFLoader}. + * + * It is recommended to create one DRACOLoader instance and reuse it to avoid loading and creating + * multiple decoder instances. + * + * `DRACOLoader` will automatically use either the JS or the WASM decoding library, based on + * browser capabilities. + * + * ```js + * const loader = new DRACOLoader(); + * loader.setDecoderPath( '/examples/jsm/libs/draco/' ); + * + * const geometry = await dracoLoader.loadAsync( 'models/draco/bunny.drc' ); + * geometry.computeVertexNormals(); // optional + * + * dracoLoader.dispose(); + * ``` + * + * @augments Loader + * @three_import import { DRACOLoader } from 'three/addons/loaders/DRACOLoader.js'; + */ +export class DRACOLoader extends Loader { + /** + * Constructs a new Draco loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + decoderPath: string; + decoderConfig: {}; + decoderBinary: any; + decoderPending: Promise | null; + workerLimit: number; + workerPool: any[]; + workerNextTaskID: number; + workerSourceURL: string; + defaultAttributeIDs: { + position: string; + normal: string; + color: string; + uv: string; + }; + defaultAttributeTypes: { + position: string; + normal: string; + color: string; + uv: string; + }; + /** + * Provides configuration for the decoder libraries. Configuration cannot be changed after decoding begins. + * + * @param {string} path - The decoder path. + * @return {DRACOLoader} A reference to this loader. + */ + setDecoderPath(path: string): DRACOLoader; + /** + * Provides configuration for the decoder libraries. Configuration cannot be changed after decoding begins. + * + * @deprecated + * @param {{type:('js'|'wasm')}} config - The decoder config. + * @return {DRACOLoader} A reference to this loader. + */ + setDecoderConfig(config: { + type: ("js" | "wasm"); + }): DRACOLoader; + /** + * Sets the maximum number of Web Workers to be used during decoding. + * A lower limit may be preferable if workers are also for other tasks in the application. + * + * @param {number} workerLimit - The worker limit. + * @return {DRACOLoader} A reference to this loader. + */ + setWorkerLimit(workerLimit: number): DRACOLoader; + /** + * Starts loading from the given URL and passes the loaded Draco asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(BufferGeometry)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: BufferGeometry) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given Draco data. + * + * @param {ArrayBuffer} buffer - The raw Draco data as an array buffer. + * @param {function(BufferGeometry)} onLoad - Executed when the loading/parsing process has been finished. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + parse(buffer: ArrayBuffer, onLoad: (arg0: BufferGeometry) => any, onError?: onErrorCallback): void; + decodeDracoFile(buffer: any, callback: any, attributeIDs: any, attributeTypes: any, vertexColorSpace?: string, onError?: () => void): any; + decodeGeometry(buffer: any, taskConfig: any): any; + _createGeometry(geometryData: any): BufferGeometry; + _assignVertexColorSpace(attribute: any, inputColorSpace: any): void; + _loadLibrary(url: any, responseType: any): Promise; + preload(): this; + _initDecoder(): Promise; + _getWorker(taskID: any, taskCost: any): Promise; + _releaseTask(worker: any, taskID: any): void; + debug(): void; + dispose(): this; +} +import { Loader } from 'three'; +import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/EXRLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/EXRLoader.d.ts new file mode 100644 index 000000000..59177cb96 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/EXRLoader.d.ts @@ -0,0 +1,73 @@ +/** + * A loader for the OpenEXR texture format. + * + * `EXRLoader` currently supports uncompressed, ZIP(S), RLE, PIZ, B44/A and DWA/B compression. + * Supports reading as UnsignedByte, HalfFloat and Float type data texture. + * + * ```js + * const loader = new EXRLoader(); + * const texture = await loader.loadAsync( 'textures/memorial.exr' ); + * ``` + * + * @augments DataTextureLoader + * @three_import import { EXRLoader } from 'three/addons/loaders/EXRLoader.js'; + */ +export class EXRLoader extends DataTextureLoader { + /** + * Constructs a new EXR loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * The texture type. + * + * @type {(HalfFloatType|FloatType)} + * @default HalfFloatType + */ + type: (number | number); + /** + * Texture output format. + * + * @type {(RGBAFormat|RGFormat|RedFormat)} + * @default RGBAFormat + */ + outputFormat: (number | number | number); + /** + * For multi-part EXR files, the index of the part to load. + * + * @type {number} + * @default 0 + */ + part: number; + /** + * Parses the given EXR texture data. + * + * @param {ArrayBuffer} buffer - The raw texture data. + * @return {DataTextureLoader~TexData} An object representing the parsed texture data. + */ + parse(buffer: ArrayBuffer): DataTextureLoader; + /** + * Sets the texture type. + * + * @param {(HalfFloatType|FloatType)} value - The texture type to set. + * @return {EXRLoader} A reference to this loader. + */ + setDataType(value: (number | number)): EXRLoader; + /** + * Sets texture output format. Defaults to `RGBAFormat`. + * + * @param {(RGBAFormat|RGFormat|RedFormat)} value - Texture output format. + * @return {EXRLoader} A reference to this loader. + */ + setOutputFormat(value: (number | number | number)): EXRLoader; + /** + * For multi-part EXR files, sets which part to load. + * + * @param {number} value - The part index to load. + * @return {EXRLoader} A reference to this loader. + */ + setPart(value: number): EXRLoader; + load(url: any, onLoad: any, onProgress: any, onError: any): import("three").DataTexture; +} +import { DataTextureLoader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/FBXLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/FBXLoader.d.ts new file mode 100644 index 000000000..6dd4a2610 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/FBXLoader.d.ts @@ -0,0 +1,52 @@ +/** + * A loader for the FBX format. + * + * Requires FBX file to be >= 7.0 and in ASCII or >= 6400 in Binary format. + * Versions lower than this may load but will probably have errors. + * + * Needs Support: + * - Morph normals / blend shape normals + * + * FBX format references: + * - [C++ SDK reference](https://help.autodesk.com/view/FBX/2017/ENU/?guid=__cpp_ref_index_html) + * + * Binary format specification: + * - [FBX binary file format specification](https://code.blender.org/2013/08/fbx-binary-file-format-specification/) + * + * ```js + * const loader = new FBXLoader(); + * const object = await loader.loadAsync( 'models/fbx/stanford-bunny.fbx' ); + * scene.add( object ); + * ``` + * + * @augments Loader + * @three_import import { FBXLoader } from 'three/addons/loaders/FBXLoader.js'; + */ +export class FBXLoader extends Loader { + /** + * Constructs a new FBX loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Starts loading from the given URL and passes the loaded FBX asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Group)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: Group) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given FBX data and returns the resulting group. + * + * @param {ArrayBuffer} FBXBuffer - The raw FBX data as an array buffer. + * @param {string} path - The URL base path. + * @return {Group} An object representing the parsed asset. + */ + parse(FBXBuffer: ArrayBuffer, path: string): Group; +} +import { Loader } from 'three'; +import { Group } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/FontLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/FontLoader.d.ts new file mode 100644 index 000000000..0771ff5cc --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/FontLoader.d.ts @@ -0,0 +1,75 @@ +/** + * A loader for loading fonts. + * + * You can convert fonts online using [facetype.js](https://gero3.github.io/facetype.js/). + * + * ```js + * const loader = new FontLoader(); + * const font = await loader.loadAsync( 'fonts/helvetiker_regular.typeface.json' ); + * ``` + * + * @augments Loader + * @three_import import { FontLoader } from 'three/addons/loaders/FontLoader.js'; + */ +export class FontLoader extends Loader { + /** + * Constructs a new font loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Starts loading from the given URL and passes the loaded font + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Font)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: Font) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given font data and returns the resulting font. + * + * @param {Object} json - The raw font data as a JSON object. + * @return {Font} The font. + */ + parse(json: Object): Font; +} +/** + * Class representing a font. + */ +export class Font { + /** + * Constructs a new font. + * + * @param {Object} data - The font data as JSON. + */ + constructor(data: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isFont: boolean; + type: string; + /** + * The font data as JSON. + * + * @type {Object} + */ + data: Object; + /** + * Generates geometry shapes from the given text and size. The result of this method + * should be used with {@link ShapeGeometry} to generate the actual geometry data. + * + * @param {string} text - The text. + * @param {number} [size=100] - The text size. + * @param {string} [direction='ltr'] - Char direction: ltr(left to right), rtl(right to left) & tb(top bottom). + * @return {Array} An array of shapes representing the text. + */ + generateShapes(text: string, size?: number, direction?: string): Array; +} +import { Loader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/GCodeLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/GCodeLoader.d.ts new file mode 100644 index 000000000..5c0f7df3a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/GCodeLoader.d.ts @@ -0,0 +1,48 @@ +/** + * A loader for the GCode format. + * + * GCode files are usually used for 3D printing or CNC applications. + * + * ```js + * const loader = new GCodeLoader(); + * const object = await loader.loadAsync( 'models/gcode/benchy.gcode' ); + * scene.add( object ); + * ``` + * + * @augments Loader + * @three_import import { GCodeLoader } from 'three/addons/loaders/GCodeLoader.js'; + */ +export class GCodeLoader extends Loader { + /** + * Constructs a new GCode loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Whether to split layers or not. + * + * @type {boolean} + * @default false + */ + splitLayer: boolean; + /** + * Starts loading from the given URL and passes the loaded GCode asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Group)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: Group) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given GCode data and returns a group with lines. + * + * @param {string} data - The raw Gcode data as a string. + * @return {Group} The parsed GCode asset. + */ + parse(data: string): Group; +} +import { Loader } from 'three'; +import { Group } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/GLTFLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/GLTFLoader.d.ts new file mode 100644 index 000000000..97a25a303 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/GLTFLoader.d.ts @@ -0,0 +1,395 @@ +/** + * ~LoadObject + */ +export type GLTFLoader = { + /** + * - An array of animation clips. + */ + animations: Array; + /** + * - Meta data about the loaded asset. + */ + asset: Object; + /** + * - An array of cameras. + */ + cameras: Array; + /** + * - A reference to the internal parser. + */ + parser: GLTFParser; + /** + * - The default scene. + */ + scene: Group; + /** + * - glTF assets might define multiple scenes. + */ + scenes: Array; + /** + * - Additional data. + */ + userData: Object; +}; +import { AnimationClip } from 'three'; +declare class GLTFParser { + constructor(json?: {}, options?: {}); + json: {}; + extensions: {}; + plugins: {}; + options: {}; + cache: any; + associations: Map; + primitiveCache: {}; + nodeCache: {}; + meshCache: { + refs: {}; + uses: {}; + }; + cameraCache: { + refs: {}; + uses: {}; + }; + lightCache: { + refs: {}; + uses: {}; + }; + sourceCache: {}; + textureCache: {}; + nodeNamesUsed: {}; + textureLoader: TextureLoader | ImageBitmapLoader; + fileLoader: FileLoader; + setExtensions(extensions: any): void; + setPlugins(plugins: any): void; + parse(onLoad: any, onError: any): void; + /** + * Marks the special nodes/meshes in json for efficient parse. + * + * @private + */ + private _markDefs; + /** + * Counts references to shared node / Object3D resources. These resources + * can be reused, or "instantiated", at multiple nodes in the scene + * hierarchy. Mesh, Camera, and Light instances are instantiated and must + * be marked. Non-scenegraph resources (like Materials, Geometries, and + * Textures) can be reused directly and are not marked here. + * + * Example: CesiumMilkTruck sample model reuses "Wheel" meshes. + * + * @private + * @param {Object} cache + * @param {Object3D} index + */ + private _addNodeRef; + /** + * Returns a reference to a shared resource, cloning it if necessary. + * + * @private + * @param {Object} cache + * @param {number} index + * @param {Object} object + * @return {Object} + */ + private _getNodeRef; + _invokeOne(func: any): any; + _invokeAll(func: any): any[]; + /** + * Requests the specified dependency asynchronously, with caching. + * + * @private + * @param {string} type + * @param {number} index + * @return {Promise} + */ + private getDependency; + /** + * Requests all dependencies of the specified type asynchronously, with caching. + * + * @private + * @param {string} type + * @return {Promise>} + */ + private getDependencies; + /** + * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#buffers-and-buffer-views + * + * @private + * @param {number} bufferIndex + * @return {Promise} + */ + private loadBuffer; + /** + * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#buffers-and-buffer-views + * + * @private + * @param {number} bufferViewIndex + * @return {Promise} + */ + private loadBufferView; + /** + * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#accessors + * + * @private + * @param {number} accessorIndex + * @return {Promise} + */ + private loadAccessor; + /** + * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#textures + * + * @private + * @param {number} textureIndex + * @return {Promise} + */ + private loadTexture; + loadTextureImage(textureIndex: any, sourceIndex: any, loader: any): any; + loadImageSource(sourceIndex: any, loader: any): any; + /** + * Asynchronously assigns a texture to the given material parameters. + * + * @private + * @param {Object} materialParams + * @param {string} mapName + * @param {Object} mapDef + * @param {string} [colorSpace] + * @return {Promise} + */ + private assignTexture; + /** + * Assigns final material to a Mesh, Line, or Points instance. The instance + * already has a material (generated from the glTF material options alone) + * but reuse of the same glTF material may require multiple threejs materials + * to accommodate different primitive types, defines, etc. New materials will + * be created if necessary, and reused from a cache. + * + * @private + * @param {Object3D} mesh Mesh, Line, or Points instance. + */ + private assignFinalMaterial; + getMaterialType(): typeof MeshStandardMaterial; + /** + * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials + * + * @private + * @param {number} materialIndex + * @return {Promise} + */ + private loadMaterial; + /** + * When Object3D instances are targeted by animation, they need unique names. + * + * @private + * @param {string} originalName + * @return {string} + */ + private createUniqueName; + /** + * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#geometry + * + * Creates BufferGeometries from primitives. + * + * @private + * @param {Array} primitives + * @return {Promise>} + */ + private loadGeometries; + /** + * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#meshes + * + * @private + * @param {number} meshIndex + * @return {Promise} + */ + private loadMesh; + /** + * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#cameras + * + * @private + * @param {number} cameraIndex + * @return {Promise|undefined} + */ + private loadCamera; + /** + * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins + * + * @private + * @param {number} skinIndex + * @return {Promise} + */ + private loadSkin; + /** + * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#animations + * + * @private + * @param {number} animationIndex + * @return {Promise} + */ + private loadAnimation; + createNodeMesh(nodeIndex: any): Promise | null; + /** + * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#nodes-and-hierarchy + * + * @private + * @param {number} nodeIndex + * @return {Promise} + */ + private loadNode; + _loadNodeShallow(nodeIndex: any): any; + /** + * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#scenes + * + * @private + * @param {number} sceneIndex + * @return {Promise} + */ + private loadScene; + _createAnimationTracks(node: any, inputAccessor: any, outputAccessor: any, sampler: any, target: any): QuaternionKeyframeTrack[]; + _getArrayFromAccessor(accessor: any): any; + _createCubicSplineTrackInterpolant(track: any): void; +} +import { Group } from 'three'; +/** + * A loader for the glTF 2.0 format. + * + * [glTF](https://www.khronos.org/gltf/) (GL Transmission Format) is an [open format specification]{@link https://github.com/KhronosGroup/glTF/tree/main/specification/2.0) + * for efficient delivery and loading of 3D content. Assets may be provided either in JSON (.gltf) or binary (.glb) + * format. External files store textures (.jpg, .png) and additional binary data (.bin). A glTF asset may deliver + * one or more scenes, including meshes, materials, textures, skins, skeletons, morph targets, animations, lights, + * and/or cameras. + * + * `GLTFLoader` uses {@link ImageBitmapLoader} whenever possible. Be advised that image bitmaps are not + * automatically GC-collected when they are no longer referenced, and they require special handling during + * the disposal process. + * + * `GLTFLoader` supports the following glTF 2.0 extensions: + * - KHR_draco_mesh_compression + * - KHR_lights_punctual + * - KHR_materials_anisotropy + * - KHR_materials_clearcoat + * - KHR_materials_dispersion + * - KHR_materials_emissive_strength + * - KHR_materials_ior + * - KHR_materials_specular + * - KHR_materials_transmission + * - KHR_materials_iridescence + * - KHR_materials_unlit + * - KHR_materials_volume + * - KHR_mesh_quantization + * - KHR_meshopt_compression + * - KHR_texture_basisu + * - KHR_texture_transform + * - EXT_materials_bump + * - EXT_meshopt_compression + * - EXT_mesh_gpu_instancing + * - EXT_texture_avif + * - EXT_texture_webp + * + * The following glTF 2.0 extension is supported by an external user plugin: + * - [KHR_materials_variants](https://github.com/takahirox/three-gltf-extensions) + * - [MSFT_texture_dds](https://github.com/takahirox/three-gltf-extensions) + * - [KHR_animation_pointer](https://github.com/needle-tools/three-animation-pointer) + * - [NEEDLE_progressive](https://github.com/needle-tools/gltf-progressive) + * + * ```js + * const loader = new GLTFLoader(); + * + * // Optional: Provide a DRACOLoader instance to decode compressed mesh data + * const dracoLoader = new DRACOLoader(); + * dracoLoader.setDecoderPath( '/examples/jsm/libs/draco/' ); + * loader.setDRACOLoader( dracoLoader ); + * + * const gltf = await loader.loadAsync( 'models/gltf/duck/duck.gltf' ); + * scene.add( gltf.scene ); + * ``` + * + * @augments Loader + * @three_import import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js'; + */ +export class GLTFLoader extends Loader { + /** + * Constructs a new glTF loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + dracoLoader: any; + ktx2Loader: any; + meshoptDecoder: Object | null; + pluginCallbacks: any[]; + /** + * Starts loading from the given URL and passes the loaded glTF asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(GLTFLoader~LoadObject)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Sets the given Draco loader to this loader. Required for decoding assets + * compressed with the `KHR_draco_mesh_compression` extension. + * + * @param {DRACOLoader} dracoLoader - The Draco loader to set. + * @return {GLTFLoader} A reference to this loader. + */ + setDRACOLoader(dracoLoader: DRACOLoader): GLTFLoader; + /** + * Sets the given KTX2 loader to this loader. Required for loading KTX2 + * compressed textures. + * + * @param {KTX2Loader} ktx2Loader - The KTX2 loader to set. + * @return {GLTFLoader} A reference to this loader. + */ + setKTX2Loader(ktx2Loader: KTX2Loader): GLTFLoader; + /** + * Sets the given meshopt decoder. Required for decoding assets + * compressed with the `EXT_meshopt_compression` extension. + * + * @param {Object} meshoptDecoder - The meshopt decoder to set. + * @return {GLTFLoader} A reference to this loader. + */ + setMeshoptDecoder(meshoptDecoder: Object): GLTFLoader; + /** + * Registers a plugin callback. This API is internally used to implement the various + * glTF extensions but can also used by third-party code to add additional logic + * to the loader. + * + * @param {function(parser:GLTFParser)} callback - The callback function to register. + * @return {GLTFLoader} A reference to this loader. + */ + register(callback: any): GLTFLoader; + /** + * Unregisters a plugin callback. + * + * @param {Function} callback - The callback function to unregister. + * @return {GLTFLoader} A reference to this loader. + */ + unregister(callback: Function): GLTFLoader; + /** + * Parses the given glTF data and returns the resulting group. + * + * @param {string|ArrayBuffer} data - The raw glTF data. + * @param {string} path - The URL base path. + * @param {function(GLTFLoader~LoadObject)} onLoad - Executed when the loading process has been finished. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + parse(data: string | ArrayBuffer, path: string, onLoad: any, onError: onErrorCallback): void; + /** + * Async version of {@link GLTFLoader#parse}. + * + * @async + * @param {string|ArrayBuffer} data - The raw glTF data. + * @param {string} path - The URL base path. + * @return {Promise} A Promise that resolves with the loaded glTF when the parsing has been finished. + */ + parseAsync(data: string | ArrayBuffer, path: string): Promise; +} +import { TextureLoader } from 'three'; +import { ImageBitmapLoader } from 'three'; +import { FileLoader } from 'three'; +import { MeshStandardMaterial } from 'three'; +import { QuaternionKeyframeTrack } from 'three'; +import { Loader } from 'three'; +export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/HDRCubeTextureLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/HDRCubeTextureLoader.d.ts new file mode 100644 index 000000000..2ca2298ee --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/HDRCubeTextureLoader.d.ts @@ -0,0 +1,58 @@ +/** + * A loader for loading HDR cube textures. + * + * ```js + * const loader = new HDRCubeTextureLoader(); + * loader.setPath( 'textures/cube/pisaHDR/' ); + * const cubeTexture = await loader.loadAsync( [ 'px.hdr', 'nx.hdr', 'py.hdr', 'ny.hdr', 'pz.hdr', 'nz.hdr' ] ); + * + * scene.background = cubeTexture; + * scene.environment = cubeTexture; + * ``` + * + * @augments Loader + * @three_import import { HDRCubeTextureLoader } from 'three/addons/loaders/HDRCubeTextureLoader.js'; + */ +export class HDRCubeTextureLoader extends Loader { + /** + * Constructs a new HDR cube texture loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * The internal HDR loader that loads the + * individual textures for each cube face. + * + * @type {HDRLoader} + */ + hdrLoader: HDRLoader; + /** + * The texture type. + * + * @type {(HalfFloatType|FloatType)} + * @default HalfFloatType + */ + type: (number | number); + /** + * Starts loading from the given URLs and passes the loaded HDR cube texture + * to the `onLoad()` callback. + * + * @param {Array} urls - The paths/URLs of the files to be loaded. This can also be a data URIs. + * @param {function(CubeTexture)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + * @return {CubeTexture} The HDR cube texture. + */ + load(urls: Array, onLoad: (arg0: CubeTexture) => any, onProgress: onProgressCallback, onError: onErrorCallback): CubeTexture; + /** + * Sets the texture type. + * + * @param {(HalfFloatType|FloatType)} value - The texture type to set. + * @return {HDRCubeTextureLoader} A reference to this loader. + */ + setDataType(value: (number | number)): HDRCubeTextureLoader; +} +import { Loader } from 'three'; +import { HDRLoader } from '../loaders/HDRLoader.js'; +import { CubeTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/HDRLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/HDRLoader.d.ts new file mode 100644 index 000000000..8a43f51bf --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/HDRLoader.d.ts @@ -0,0 +1,45 @@ +/** + * A loader for the RGBE HDR texture format. + * + * ```js + * const loader = new HDRLoader(); + * const envMap = await loader.loadAsync( 'textures/equirectangular/blouberg_sunrise_2_1k.hdr' ); + * envMap.mapping = THREE.EquirectangularReflectionMapping; + * + * scene.environment = envMap; + * ``` + * + * @augments DataTextureLoader + * @three_import import { HDRLoader } from 'three/addons/loaders/HDRLoader.js'; + */ +export class HDRLoader extends DataTextureLoader { + /** + * Constructs a new RGBE/HDR loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * The texture type. + * + * @type {(HalfFloatType|FloatType)} + * @default HalfFloatType + */ + type: (number | number); + /** + * Parses the given RGBE texture data. + * + * @param {ArrayBuffer} buffer - The raw texture data. + * @return {DataTextureLoader~TexData} An object representing the parsed texture data. + */ + parse(buffer: ArrayBuffer): DataTextureLoader; + /** + * Sets the texture type. + * + * @param {(HalfFloatType|FloatType)} value - The texture type to set. + * @return {HDRLoader} A reference to this loader. + */ + setDataType(value: (number | number)): HDRLoader; + load(url: any, onLoad: any, onProgress: any, onError: any): import("three").DataTexture; +} +import { DataTextureLoader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/IESLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/IESLoader.d.ts new file mode 100644 index 000000000..15453e42e --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/IESLoader.d.ts @@ -0,0 +1,51 @@ +/** + * A loader for the IES format. + * + * The loaded texture should be assigned to {@link IESSpotLight#map}. + * + * ```js + * const loader = new IESLoader(); + * const texture = await loader.loadAsync( 'ies/007cfb11e343e2f42e3b476be4ab684e.ies' ); + * + * const spotLight = new THREE.IESSpotLight( 0xff0000, 500 ); + * spotLight.iesMap = texture; + * ``` + * + * @augments Loader + * @three_import import { IESLoader } from 'three/addons/loaders/IESLoader.js'; + */ +export class IESLoader extends Loader { + /** + * Constructs a new IES loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * The texture type. + * + * @type {(HalfFloatType|FloatType)} + * @default HalfFloatType + */ + type: (number | number); + _getIESValues(iesLamp: any, type: any): Uint8Array | Uint16Array | Float32Array | null; + /** + * Starts loading from the given URL and passes the loaded IES texture + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(DataTexture)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: DataTexture) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given IES data. + * + * @param {string} text - The raw IES data. + * @return {DataTexture} THE IES data as a texture. + */ + parse(text: string): DataTexture; +} +import { Loader } from 'three'; +import { DataTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/KMZLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/KMZLoader.d.ts new file mode 100644 index 000000000..17775a709 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/KMZLoader.d.ts @@ -0,0 +1,38 @@ +/** + * A loader for the KMZ format. + * + * ```js + * const loader = new KMZLoader(); + * const kmz = await loader.loadAsync( './models/kmz/Box.kmz' ); + * + * scene.add( kmz.scene ); + * ``` + * + * @augments Loader + * @three_import import { KMZLoader } from 'three/addons/loaders/KMZLoader.js'; + */ +export class KMZLoader extends Loader { + /** + * Starts loading from the given URL and passes the loaded KMZ asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function({scene:Group})} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: { + scene: Group; + }) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given KMZ data and returns an object holding the scene. + * + * @param {ArrayBuffer} data - The raw KMZ data as an array buffer. + * @return {{scene:Group}} The parsed KMZ asset. + */ + parse(data: ArrayBuffer): { + scene: Group; + }; +} +import { Loader } from 'three'; +import { Group } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/KTX2Loader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/KTX2Loader.d.ts new file mode 100644 index 000000000..064241afc --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/KTX2Loader.d.ts @@ -0,0 +1,188 @@ +/** + * A loader for KTX 2.0 GPU Texture containers. + * + * KTX 2.0 is a container format for various GPU texture formats. The loader supports Basis Universal GPU textures, + * which can be quickly transcoded to a wide variety of GPU texture compression formats. While KTX 2.0 also allows + * other hardware-specific formats, this loader does not yet parse them. + * + * This loader parses the KTX 2.0 container and transcodes to a supported GPU compressed texture format. + * The required WASM transcoder and JS wrapper are available from the `examples/jsm/libs/basis` directory. + * + * This loader relies on Web Assembly which is not supported in older browsers. + * + * References: + * - [KTX specification](http://github.khronos.org/KTX-Specification/) + * - [DFD](https://www.khronos.org/registry/DataFormat/specs/1.3/dataformat.1.3.html#basicdescriptor) + * - [BasisU HDR](https://github.com/BinomialLLC/basis_universal/wiki/UASTC-HDR-Texture-Specification-v1.0) + * + * ```js + * const loader = new KTX2Loader(); + * loader.setTranscoderPath( 'examples/jsm/libs/basis/' ); + * loader.detectSupport( renderer ); + * const texture = loader.loadAsync( 'diffuse.ktx2' ); + * ``` + * + * @augments Loader + * @three_import import { KTX2Loader } from 'three/addons/loaders/KTX2Loader.js'; + */ +export class KTX2Loader extends Loader { + /** + * Constructs a new KTX2 loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + transcoderPath: string; + transcoderBinary: any; + transcoderPending: Promise | null; + workerPool: WorkerPool; + workerSourceURL: string; + workerConfig: { + astcSupported: any; + astcHDRSupported: boolean; + etc1Supported: any; + etc2Supported: any; + dxtSupported: any; + bptcSupported: any; + pvrtcSupported: any; + } | { + astcSupported: any; + astcHDRSupported: any; + etc1Supported: any; + etc2Supported: any; + dxtSupported: any; + bptcSupported: any; + pvrtcSupported: any; + } | null; + /** + * Sets the transcoder path to optionally set the decoder load path from a CDN. + * + * By default The WASM transcoder and JS wrapper are loaded from the `examples/jsm/libs/basis` directory. + * + * @param {string} path - The transcoder path to set. + * @return {KTX2Loader} A reference to this loader. + */ + setTranscoderPath(path: string): KTX2Loader; + /** + * Sets the maximum number of Web Workers to be allocated by this instance. + * + * @param {number} workerLimit - The worker limit. + * @return {KTX2Loader} A reference to this loader. + */ + setWorkerLimit(workerLimit: number): KTX2Loader; + /** + * Async version of {@link KTX2Loader#detectSupport}. + * + * @async + * @deprecated + * @param {WebGPURenderer} renderer - The renderer. + * @return {Promise} A Promise that resolves when the support has been detected. + */ + detectSupportAsync(renderer: WebGPURenderer): Promise; + /** + * Detects hardware support for available compressed texture formats, to determine + * the output format for the transcoder. Must be called before loading a texture. + * + * @param {WebGPURenderer|WebGLRenderer} renderer - The renderer. + * @return {KTX2Loader} A reference to this loader. + */ + detectSupport(renderer: WebGPURenderer | WebGLRenderer): KTX2Loader; + init(): Promise; + /** + * Starts loading from the given URL and passes the loaded KTX2 texture + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(CompressedTexture)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: CompressedTexture) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given KTX2 data. + * + * @param {ArrayBuffer} buffer - The raw KTX2 data as an array buffer. + * @param {function(CompressedTexture)} onLoad - Executed when the loading/parsing process has been finished. + * @param {onErrorCallback} onError - Executed when errors occur. + * @returns {Promise} A Promise that resolves when the parsing has been finished. + */ + parse(buffer: ArrayBuffer, onLoad: (arg0: CompressedTexture) => any, onError: onErrorCallback): Promise; + _createTextureFrom(transcodeResult: any, container: any): CompressedTexture | Promise; + /** + * @private + * @param {ArrayBuffer} buffer + * @param {?Object} config + * @return {Promise} + */ + private _createTexture; + /** + * Frees internal resources. This method should be called + * when the loader is no longer required. + */ + dispose(): void; +} +export namespace KTX2Loader { + namespace BasisFormat { + let ETC1S: number; + let UASTC: number; + let UASTC_HDR: number; + } + namespace TranscoderFormat { + let ETC1: number; + let ETC2: number; + let BC1: number; + let BC3: number; + let BC4: number; + let BC5: number; + let BC7_M6_OPAQUE_ONLY: number; + let BC7_M5: number; + let PVRTC1_4_RGB: number; + let PVRTC1_4_RGBA: number; + let ASTC_4x4: number; + let ATC_RGB: number; + let ATC_RGBA_INTERPOLATED_ALPHA: number; + let RGBA32: number; + let RGB565: number; + let BGR565: number; + let RGBA4444: number; + let BC6H: number; + let RGB_HALF: number; + let RGBA_HALF: number; + } + namespace EngineFormat { + export { RGBAFormat }; + export { RGBA_ASTC_4x4_Format }; + export { RGB_BPTC_UNSIGNED_Format }; + export { RGBA_BPTC_Format }; + export { RGBA_ETC2_EAC_Format }; + export { RGBA_PVRTC_4BPPV1_Format }; + export { RGBA_S3TC_DXT5_Format }; + export { RGB_ETC1_Format }; + export { RGB_ETC2_Format }; + export { RGB_PVRTC_4BPPV1_Format }; + export { RGBA_S3TC_DXT1_Format }; + } + namespace EngineType { + export { UnsignedByteType }; + export { HalfFloatType }; + export { FloatType }; + } + function BasisWorker(): void; +} +import { Loader } from 'three'; +import { WorkerPool } from '../utils/WorkerPool.js'; +import { CompressedTexture } from 'three'; +import { RGBAFormat } from 'three'; +import { RGBA_ASTC_4x4_Format } from 'three'; +import { RGB_BPTC_UNSIGNED_Format } from 'three'; +import { RGBA_BPTC_Format } from 'three'; +import { RGBA_ETC2_EAC_Format } from 'three'; +import { RGBA_PVRTC_4BPPV1_Format } from 'three'; +import { RGBA_S3TC_DXT5_Format } from 'three'; +import { RGB_ETC1_Format } from 'three'; +import { RGB_ETC2_Format } from 'three'; +import { RGB_PVRTC_4BPPV1_Format } from 'three'; +import { RGBA_S3TC_DXT1_Format } from 'three'; +import { UnsignedByteType } from 'three'; +import { HalfFloatType } from 'three'; +import { FloatType } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/KTXLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/KTXLoader.d.ts new file mode 100644 index 000000000..931e4f47a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/KTXLoader.d.ts @@ -0,0 +1,34 @@ +/** + * A loader for the KTX texture compression format. + * + * References: + * - [The KTX File Format and Tools](https://www.khronos.org/opengles/sdk/tools/KTX/) + * - [Babylon.JS khronosTextureContainer.ts](https://github.com/BabylonJS/Babylon.js/blob/master/src/Misc/khronosTextureContainer.ts) + * + * ```js + * const loader = new KTXLoader(); + * + * const map = loader.load( 'textures/compressed/lensflare_ASTC8x8.ktx' ) + * map.colorSpace = THREE.SRGBColorSpace; // only for color textures + * ``` + * + * @augments CompressedTextureLoader + * @three_import import { KTXLoader } from 'three/addons/loaders/KTXLoader.js'; + */ +export class KTXLoader extends CompressedTextureLoader { + /** + * Constructs a new KTX loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Parses the given KTX texture data. + * + * @param {ArrayBuffer} buffer - The raw texture data. + * @param {boolean} loadMipmaps - Whether to load mipmaps or not. + * @return {CompressedTextureLoader~TexData} An object representing the parsed texture data. + */ + parse(buffer: ArrayBuffer, loadMipmaps: boolean): CompressedTextureLoader; +} +import { CompressedTextureLoader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/LDrawLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/LDrawLoader.d.ts new file mode 100644 index 000000000..53f42fbe0 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/LDrawLoader.d.ts @@ -0,0 +1,256 @@ +/** + * A loader for the LDraw format. + * + * [LDraw](https://ldraw.org/} (LEGO Draw) is an [open format specification](https://ldraw.org/article/218.html) + * for describing LEGO and other construction set 3D models. + * + * An LDraw asset (a text file usually with extension .ldr, .dat or .txt) can describe just a single construction + * piece, or an entire model. In the case of a model the LDraw file can reference other LDraw files, which are + * loaded from a library path set with `setPartsLibraryPath`. You usually download the LDraw official parts library, + * extract to a folder and point setPartsLibraryPath to it. + * + * Library parts will be loaded by trial and error in subfolders 'parts', 'p' and 'models'. These file accesses + * are not optimal for web environment, so a script tool has been made to pack an LDraw file with all its dependencies + * into a single file, which loads much faster. See section 'Packing LDraw models'. The LDrawLoader example loads + * several packed files. The official parts library is not included due to its large size. + * + * `LDrawLoader` supports the following extensions: + * - !COLOUR: Color and surface finish declarations. + * - BFC: Back Face Culling specification. + * - !CATEGORY: Model/part category declarations. + * - !KEYWORDS: Model/part keywords declarations. + * + * ```js + * const loader = new LDrawLoader(); + * loader.setConditionalLineMaterial( LDrawConditionalLineMaterial ); // the type of line material depends on the used renderer + * const object = await loader.loadAsync( 'models/ldraw/officialLibrary/models/car.ldr_Packed.mpd' ); + * scene.add( object ); + * ``` + * + * @augments Loader + * @three_import import { LDrawLoader } from 'three/addons/loaders/LDrawLoader.js'; + */ +export class LDrawLoader extends Loader { + /** + * Constructs a new LDraw loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + materials: any[]; + materialLibrary: {}; + edgeMaterialCache: WeakMap; + conditionalEdgeMaterialCache: WeakMap; + partsCache: LDrawPartsGeometryCache; + fileMap: {}; + smoothNormals: boolean; + partsLibraryPath: string; + ConditionalLineMaterial: any; + missingColorMaterial: MeshStandardMaterial; + missingEdgeColorMaterial: LineBasicMaterial; + missingConditionalEdgeColorMaterial: any; + /** + * This method must be called prior to `load()` unless the model to load does not reference + * library parts (usually it will be a model with all its parts packed in a single file). + * + * @param {string} path - Path to library parts files to load referenced parts from. + * This is different from Loader.setPath, which indicates the path to load the main asset from. + * @return {LDrawLoader} A reference to this loader. + */ + setPartsLibraryPath(path: string): LDrawLoader; + /** + * Sets the conditional line material type which depends on the used renderer. + * Use {@link LDrawConditionalLineMaterial} when using `WebGLRenderer` and + * {@link LDrawConditionalLineNodeMaterial} when using `WebGPURenderer`. + * + * @param {(LDrawConditionalLineMaterial.constructor|LDrawConditionalLineNodeMaterial.constructor)} type - The conditional line material type. + * @return {LDrawLoader} A reference to this loader. + */ + setConditionalLineMaterial(type: (LDrawConditionalLineMaterial.constructor | LDrawConditionalLineNodeMaterial.constructor)): LDrawLoader; + /** + * This async method preloads materials from a single LDraw file. In the official + * parts library there is a special file which is loaded always the first (LDConfig.ldr) + * and contains all the standard color codes. This method is intended to be used with + * not packed files, for example in an editor where materials are preloaded and parts + * are loaded on demand. + * + * @async + * @param {string} url - Path of the LDraw materials asset. + * @return {Promise} A Promise that resolves when the preload has finished. + */ + preloadMaterials(url: string): Promise; + /** + * Starts loading from the given URL and passes the loaded LDraw asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Group)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: Group) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given LDraw data and returns the resulting group. + * + * @param {string} text - The raw VRML data as a string. + * @param {function(Group)} onLoad - Executed when the loading/parsing process has been finished. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + parse(text: string, onLoad: (arg0: Group) => any, onError: onErrorCallback): void; + /** + * Sets the loader's material library. This method clears existing + * material definitions. + * + * @param {Array} materials - The materials to set. + * @return {LDrawLoader} A reference to this loader. + */ + setMaterials(materials: Array): LDrawLoader; + /** + * Clears the loader's material library. + * + * @return {LDrawLoader} A reference to this loader. + */ + clearMaterials(): LDrawLoader; + /** + * Adds a list of materials to the loader's material library. + * + * @param {Array} materials - The materials to add. + * @return {LDrawLoader} A reference to this loader. + */ + addMaterials(materials: Array): LDrawLoader; + /** + * Initializes the loader with default materials. + * + * @return {LDrawLoader} A reference to this loader. + */ + addDefaultMaterials(): LDrawLoader; + /** + * Sets a map which maps referenced library filenames to new filenames. + * If a fileMap is not specified (the default), library parts will be accessed by trial and + * error in subfolders 'parts', 'p' and 'models'. + * + * @param {Object} fileMap - The file map to set. + * @return {LDrawLoader} A reference to this loader. + */ + setFileMap(fileMap: { + [x: string]: string; + }): LDrawLoader; + /** + * Adds a single material to the loader's material library. + * + * @param {Material} material - The material to add. + * @return {LDrawLoader} A reference to this loader. + */ + addMaterial(material: Material): LDrawLoader; + /** + * Returns a material for the given color code. + * + * @param {string} colorCode - The color code. + * @return {?Material} The material. Returns `null` if no material has been found. + */ + getMaterial(colorCode: string): Material | null; + applyMaterialsToMesh(group: any, parentColorCode: any, materialHierarchy: any, finalMaterialPass?: boolean): void; + /** + * Returns the Material for the main LDraw color. + * + * For an already loaded LDraw asset, returns the Material associated with the main color code. + * This method can be useful to modify the main material of a model or part that exposes it. + * + * The main color code is the standard way to color an LDraw part. It is '16' for triangles and + * '24' for edges. Usually a complete model will not expose the main color (that is, no part + * uses the code '16' at the top level, because they are assigned other specific colors) An LDraw + * part file on the other hand will expose the code '16' to be colored, and can have additional + * fixed colors. + * + * @return {?Material} The material. Returns `null` if no material has been found. + */ + getMainMaterial(): Material | null; + /** + * Returns the material for the edges main LDraw color. + * + * @return {?Material} The material. Returns `null` if no material has been found. + */ + getMainEdgeMaterial(): Material | null; + parseColorMetaDirective(lineParser: any): MeshStandardMaterial | null; + computeBuildingSteps(model: any): void; +} +import { Loader } from 'three'; +declare class LDrawPartsGeometryCache { + constructor(loader: any); + loader: any; + parseCache: LDrawParsedCache; + _cache: {}; + processIntoMesh(info: any): Promise; + hasCachedModel(fileName: any): boolean; + getCachedModel(fileName: any): Promise; + loadModel(fileName: any): Promise; + parseModel(text: any): Promise; +} +import { MeshStandardMaterial } from 'three'; +import { LineBasicMaterial } from 'three'; +import { Group } from 'three'; +declare class LDrawParsedCache { + constructor(loader: any); + loader: any; + _cache: {}; + cloneResult(original: any): { + faces: any; + conditionalSegments: any; + lineSegments: any; + type: any; + category: any; + keywords: any; + author: any; + subobjects: any; + fileName: any; + totalFaces: any; + startingBuildingStep: any; + materials: any; + group: any; + }; + fetchData(fileName: any): Promise; + parse(text: any, fileName?: null): { + faces: { + material: any; + colorCode: any; + faceNormal: null; + vertices: Vector3[]; + normals: null[]; + doubleSided: boolean; + }[]; + conditionalSegments: { + material: any; + colorCode: any; + vertices: Vector3[]; + controlPoints: Vector3[]; + }[]; + lineSegments: { + material: any; + colorCode: any; + vertices: Vector3[]; + }[]; + type: string; + category: any; + keywords: any[] | null; + author: any; + subobjects: { + material: any; + colorCode: any; + matrix: Matrix4; + fileName: any; + inverted: boolean; + startingBuildingStep: boolean; + }[]; + totalFaces: number; + startingBuildingStep: boolean; + materials: {}; + fileName: null; + group: null; + }; + getData(fileName: any, clone?: boolean): any; + ensureDataLoaded(fileName: any): Promise; + setData(fileName: any, text: any): void; +} +import { Vector3 } from 'three'; +import { Matrix4 } from 'three'; +export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/LUT3dlLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/LUT3dlLoader.d.ts new file mode 100644 index 000000000..86866f649 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/LUT3dlLoader.d.ts @@ -0,0 +1,62 @@ +/** + * A loader for the 3DL LUT format. + * + * References: + * - [3D LUTs](http://download.autodesk.com/us/systemdocs/help/2011/lustre/index.html?url=./files/WSc4e151a45a3b785a24c3d9a411df9298473-7ffd.htm,topicNumber=d0e9492) + * - [Format Spec for .3dl](https://community.foundry.com/discuss/topic/103636/format-spec-for-3dl?mode=Post&postID=895258) + * + * ```js + * const loader = new LUT3dlLoader(); + * const map = loader.loadAsync( 'luts/Presetpro-Cinematic.3dl' ); + * ``` + * + * @augments Loader + * @three_import import { LUT3dlLoader } from 'three/addons/loaders/LUT3dlLoader.js'; + */ +export class LUT3dlLoader extends Loader { + /** + * Constructs a new 3DL LUT loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * The texture type. + * + * @type {(UnsignedByteType|FloatType)} + * @default UnsignedByteType + */ + type: (number | FloatType); + /** + * Sets the texture type. + * + * @param {(UnsignedByteType|FloatType)} type - The texture type to set. + * @return {LUT3dlLoader} A reference to this loader. + */ + setType(type: (number | FloatType)): LUT3dlLoader; + /** + * Starts loading from the given URL and passes the loaded 3DL LUT asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function({size:number,texture3D:Data3DTexture})} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: { + size: number; + texture3D: Data3DTexture; + }) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given 3DL LUT data and returns the resulting 3D data texture. + * + * @param {string} input - The raw 3DL LUT data as a string. + * @return {{size:number,texture3D:Data3DTexture}} The parsed 3DL LUT. + */ + parse(input: string): { + size: number; + texture3D: Data3DTexture; + }; +} +import { Loader } from 'three'; +import { Data3DTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/LUTCubeLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/LUTCubeLoader.d.ts new file mode 100644 index 000000000..9632d7613 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/LUTCubeLoader.d.ts @@ -0,0 +1,68 @@ +/** + * A loader for the Cube LUT format. + * + * References: + * - [Cube LUT Specification](https://web.archive.org/web/20220220033515/https://wwwimages2.adobe.com/content/dam/acom/en/products/speedgrade/cc/pdfs/cube-lut-specification-1.0.pdf) + * + * ```js + * const loader = new LUTCubeLoader(); + * const map = loader.loadAsync( 'luts/Bourbon 64.CUBE' ); + * ``` + * + * @augments Loader + * @three_import import { LUTCubeLoader } from 'three/addons/loaders/LUTCubeLoader.js'; + */ +export class LUTCubeLoader extends Loader { + /** + * Constructs a new Cube LUT loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * The texture type. + * + * @type {(UnsignedByteType|FloatType)} + * @default UnsignedByteType + */ + type: (number | FloatType); + /** + * Sets the texture type. + * + * @param {(UnsignedByteType|FloatType)} type - The texture type to set. + * @return {LUTCubeLoader} A reference to this loader. + */ + setType(type: (number | FloatType)): LUTCubeLoader; + /** + * Starts loading from the given URL and passes the loaded Cube LUT asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function({title:string,size:number,domainMin:Vector3,domainMax:Vector3,texture3D:Data3DTexture})} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: { + title: string; + size: number; + domainMin: Vector3; + domainMax: Vector3; + texture3D: Data3DTexture; + }) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given Cube LUT data and returns the resulting 3D data texture. + * + * @param {string} input - The raw Cube LUT data as a string. + * @return {{title:string,size:number,domainMin:Vector3,domainMax:Vector3,texture3D:Data3DTexture}} The parsed Cube LUT. + */ + parse(input: string): { + title: string; + size: number; + domainMin: Vector3; + domainMax: Vector3; + texture3D: Data3DTexture; + }; +} +import { Loader } from 'three'; +import { Vector3 } from 'three'; +import { Data3DTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/LUTImageLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/LUTImageLoader.d.ts new file mode 100644 index 000000000..82ad5b541 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/LUTImageLoader.d.ts @@ -0,0 +1,58 @@ +/** + * A loader for loading LUT images. + * + * ```js + * const loader = new LUTImageLoader(); + * const map = loader.loadAsync( 'luts/NeutralLUT.png' ); + * ``` + * + * @augments Loader + * @three_import import { LUTImageLoader } from 'three/addons/loaders/LUTImageLoader.js'; + */ +export class LUTImageLoader extends Loader { + /** + * Constructs a new LUT loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Whether to vertically flip the LUT or not. + * + * Depending on the LUT's origin, the texture has green at the bottom (e.g. for Unreal) + * or green at the top (e.g. for Unity URP Color Lookup). If you're using lut image strips + * from a Unity pipeline, then set this property to `true`. + * + * @type {boolean} + * @default false + */ + flip: boolean; + /** + * Starts loading from the given URL and passes the loaded LUT + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function({size:number,texture3D:Data3DTexture})} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: { + size: number; + texture3D: Data3DTexture; + }) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given LUT data and returns the resulting 3D data texture. + * + * @param {Uint8ClampedArray} dataArray - The raw LUT data. + * @param {number} size - The LUT size. + * @return {{size:number,texture3D:Data3DTexture}} An object representing the parsed LUT. + */ + parse(dataArray: Uint8ClampedArray, size: number): { + size: number; + texture3D: Data3DTexture; + }; + _getImageData(texture: any): ImageData; + _horz2Vert(texture: any): ImageData; +} +import { Loader } from 'three'; +import { Data3DTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/LWOLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/LWOLoader.d.ts new file mode 100644 index 000000000..3472d102c --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/LWOLoader.d.ts @@ -0,0 +1,55 @@ +/** + * A loader for the LWO format. + * + * LWO3 and LWO2 formats are supported. + * + * References: + * - [LWO3 format specification](https://static.lightwave3d.com/sdk/2019/html/filefmts/lwo3.html) + * - [LWO2 format specification](https://static.lightwave3d.com/sdk/2019/html/filefmts/lwo2.html) + * + * ```js + * const loader = new LWOLoader(); + * const lwoData = await loader.loadAsync( 'models/lwo/Objects/LWO3/Demo.lwo' ); + * + * const mesh = object.meshes[ 0 ]; + * scene.add( mesh ); + * ``` + * + * @augments Loader + * @three_import import { LWOLoader } from 'three/addons/loaders/LWOLoader.js'; + */ +export class LWOLoader extends Loader { + /** + * Constructs a new LWO loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Starts loading from the given URL and passes the loaded LWO asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function({meshes:Array,materials:Array})} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: { + meshes: Array; + materials: Array; + }) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given LWO data and returns the resulting meshes and materials. + * + * @param {ArrayBuffer} iffBuffer - The raw LWO data as an array buffer. + * @param {string} path - The URL base path. + * @param {string} modelName - The model name. + * @return {{meshes:Array,materials:Array}} An object holding the parse meshes and materials. + */ + parse(iffBuffer: ArrayBuffer, path: string, modelName: string): { + meshes: Array; + materials: Array; + }; +} +import { Loader } from 'three'; +import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/LottieLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/LottieLoader.d.ts new file mode 100644 index 000000000..1623ea87b --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/LottieLoader.d.ts @@ -0,0 +1,52 @@ +/** + * A loader for the Lottie texture animation format. + * + * The loader returns an instance of {@link CanvasTexture} to represent + * the animated texture. Two additional properties are added to each texture: + * - `animation`: The return value of `lottie.loadAnimation()` which is an object + * with an API for controlling the animation's playback. + * - `image`: The image container. + * + * ```js + * const loader = new LottieLoader(); + * loader.setQuality( 2 ); + * const texture = await loader.loadAsync( 'textures/lottie/24017-lottie-logo-animation.json' ); + * + * const geometry = new THREE.BoxGeometry(); + * const material = new THREE.MeshBasicMaterial( { map: texture } ); + * const mesh = new THREE.Mesh( geometry, material ); + * scene.add( mesh ); + * ``` + * + * @augments Loader + * @three_import import { LottieLoader } from 'three/addons/loaders/LottieLoader.js'; + */ +export class LottieLoader extends Loader { + /** + * Constructs a new Lottie loader. + * + * @deprecated The loader has been deprecated and will be removed with r186. Use lottie-web instead and create your animated texture manually. + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Sets the texture quality. + * + * @param {number} value - The texture quality. + */ + setQuality(value: number): void; + _quality: number | undefined; + /** + * Starts loading from the given URL and passes the loaded Lottie asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(CanvasTexture)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + * @returns {CanvasTexture} The Lottie texture. + */ + load(url: string, onLoad: (arg0: CanvasTexture) => any, onProgress: onProgressCallback, onError: onErrorCallback): CanvasTexture; +} +import { Loader } from 'three'; +import { CanvasTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/MD2Loader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/MD2Loader.d.ts new file mode 100644 index 000000000..8a30bffd1 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/MD2Loader.d.ts @@ -0,0 +1,43 @@ +/** + * A loader for the MD2 format. + * + * The loader represents the animations of the MD2 asset as an array of animation + * clips and stores them in the `animations` property of the geometry. + * + * ```js + * const loader = new MD2Loader(); + * const geometry = await loader.loadAsync( './models/md2/ogro/ogro.md2' ); + * + * const animations = geometry.animations; + * ``` + * + * @augments Loader + * @three_import import { MD2Loader } from 'three/addons/loaders/MD2Loader.js'; + */ +export class MD2Loader extends Loader { + /** + * Constructs a new MD2 loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Starts loading from the given URL and passes the loaded MD2 asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(BufferGeometry)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} [onProgress] - Executed while the loading is in progress. + * @param {onErrorCallback} [onError] - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: BufferGeometry) => any, onProgress?: onProgressCallback, onError?: onErrorCallback): void; + /** + * Parses the given MD2 data and returns a geometry. + * + * @param {ArrayBuffer} buffer - The raw MD2 data as an array buffer. + * @return {BufferGeometry} The parsed geometry data. + */ + parse(buffer: ArrayBuffer): BufferGeometry; +} +import { Loader } from 'three'; +import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/MDDLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/MDDLoader.d.ts new file mode 100644 index 000000000..428e8f4ad --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/MDDLoader.d.ts @@ -0,0 +1,71 @@ +/** + * A loader for the MDD format. + * + * MDD stores a position for every vertex in a model for every frame in an animation. + * Similar to BVH, it can be used to transfer animation data between different 3D applications or engines. + * + * MDD stores its data in binary format (big endian) in the following way: + * + * - number of frames (a single uint32) + * - number of vertices (a single uint32) + * - time values for each frame (sequence of float32) + * - vertex data for each frame (sequence of float32) + * + * ```js + * const loader = new MDDLoader(); + * const result = await loader.loadAsync( 'models/mdd/cube.mdd' ); + * + * const morphTargets = result.morphTargets; + * const clip = result.clip; + * // clip.optimize(); // optional + * + * const geometry = new THREE.BoxGeometry(); + * geometry.morphAttributes.position = morphTargets; // apply morph targets (vertex data must match) + * + * const material = new THREE.MeshBasicMaterial(); + * + * const mesh = new THREE.Mesh( geometry, material ); + * scene.add( mesh ); + * + * const mixer = new THREE.AnimationMixer( mesh ); + * mixer.clipAction( clip ).play(); + * ``` + * + * @augments Loader + * @three_import import { MDDLoader } from 'three/addons/loaders/MDDLoader.js'; + */ +export class MDDLoader extends Loader { + /** + * Constructs a new MDD loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Starts loading from the given URL and passes the loaded MDD asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function({clip:AnimationClip, morphTargets:Array})} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: { + clip: AnimationClip; + morphTargets: Array; + }) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given MDD data and returns an object holding the animation clip and the respective + * morph targets. + * + * @param {ArrayBuffer} data - The raw XYZ data as an array buffer. + * @return {{clip:AnimationClip, morphTargets:Array}} The result object. + */ + parse(data: ArrayBuffer): { + clip: AnimationClip; + morphTargets: Array; + }; +} +import { Loader } from 'three'; +import { AnimationClip } from 'three'; +import { BufferAttribute } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/MTLLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/MTLLoader.d.ts new file mode 100644 index 000000000..c4443bb17 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/MTLLoader.d.ts @@ -0,0 +1,107 @@ +/** + * ~MaterialOptions + */ +export type MTLLoader = { + /** + * - Which side to apply the material. + */ + side?: (number | BackSide | DoubleSide); + /** + * - What type of wrapping to apply for textures. + */ + wrap?: (number | ClampToEdgeWrapping | MirroredRepeatWrapping); + /** + * - Whether RGB colors should be normalized to `0-1` from `0-255`. + */ + normalizeRGB?: boolean | undefined; + /** + * - Ignore values of RGBs (Ka,Kd,Ks) that are all 0's. + */ + ignoreZeroRGBs?: boolean | undefined; +}; +/** + * A loader for the MTL format. + * + * The Material Template Library format (MTL) or .MTL File Format is a companion file format + * to OBJ that describes surface shading (material) properties of objects within one or more + * OBJ files. + * + * ```js + * const loader = new MTLLoader(); + * const materials = await loader.loadAsync( 'models/obj/male02/male02.mtl' ); + * + * const objLoader = new OBJLoader(); + * objLoader.setMaterials( materials ); + * ``` + * + * @augments Loader + * @three_import import { MTLLoader } from 'three/addons/loaders/MTLLoader.js'; + */ +export class MTLLoader extends Loader { + constructor(manager: any); + /** + * Starts loading from the given URL and passes the loaded MTL asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(MaterialCreator)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: MaterialCreator) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Sets the material options. + * + * @param {MTLLoader~MaterialOptions} value - The material options. + * @return {MTLLoader} A reference to this loader. + */ + setMaterialOptions(value: any): MTLLoader; + materialOptions: any; + /** + * Parses the given MTL data and returns the resulting material creator. + * + * @param {string} text - The raw MTL data as a string. + * @param {string} path - The URL base path. + * @return {MaterialCreator} The material creator. + */ + parse(text: string, path: string): MaterialCreator; +} +import { Loader } from 'three'; +/** + * Material options of `MTLLoader`. + * + * @typedef {Object} MTLLoader~MaterialOptions + * @property {(FrontSide|BackSide|DoubleSide)} [side=FrontSide] - Which side to apply the material. + * @property {(RepeatWrapping|ClampToEdgeWrapping|MirroredRepeatWrapping)} [wrap=RepeatWrapping] - What type of wrapping to apply for textures. + * @property {boolean} [normalizeRGB=false] - Whether RGB colors should be normalized to `0-1` from `0-255`. + * @property {boolean} [ignoreZeroRGBs=false] - Ignore values of RGBs (Ka,Kd,Ks) that are all 0's. + */ +declare class MaterialCreator { + constructor(baseUrl?: string, options?: {}); + baseUrl: string; + options: {}; + materialsInfo: {}; + materials: {}; + materialsArray: any[]; + nameLookup: {}; + crossOrigin: string; + side: any; + wrap: any; + setCrossOrigin(value: any): this; + setManager(value: any): void; + manager: any; + setMaterials(materialsInfo: any): void; + convert(materialsInfo: any): any; + preload(): void; + getIndex(materialName: any): any; + getAsArray(): any[]; + create(materialName: any): any; + createMaterial_(materialName: any): any; + getTextureParams(value: any, matParams: any): { + scale: Vector2; + offset: Vector2; + }; + loadTexture(url: any, mapping: any, onLoad: any, onProgress: any, onError: any): any; +} +import { Vector2 } from 'three'; +export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/MaterialXLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/MaterialXLoader.d.ts new file mode 100644 index 000000000..45daaea85 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/MaterialXLoader.d.ts @@ -0,0 +1,60 @@ +/** + * A loader for the MaterialX format. + * + * The node materials loaded with this loader can only be used with {@link WebGPURenderer}. + * + * ```js + * const loader = new MaterialXLoader().setPath( SAMPLE_PATH ); + * const materials = await loader.loadAsync( 'standard_surface_brass_tiled.mtlx' ); + * ``` + * + * @augments Loader + * @three_import import { MaterialXLoader } from 'three/addons/loaders/MaterialXLoader.js'; + */ +export class MaterialXLoader extends Loader { + /** + * Constructs a new MaterialX loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Starts loading from the given URL and passes the loaded MaterialX asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Object)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + * @return {MaterialXLoader} A reference to this loader. + */ + load(url: string, onLoad: (arg0: { + [x: string]: NodeMaterial; + }) => any, onProgress: onProgressCallback, onError: onErrorCallback): MaterialXLoader; + /** + * Parses the given MaterialX data and returns the resulting materials. + * + * Supported standard_surface inputs: + * - base, base_color: Base color/albedo + * - opacity: Alpha/transparency + * - specular_roughness: Surface roughness + * - metalness: Metallic property + * - specular: Specular reflection intensity + * - specular_color: Specular reflection color + * - ior: Index of refraction + * - specular_anisotropy, specular_rotation: Anisotropic reflection + * - transmission, transmission_color: Transmission properties + * - thin_film_thickness, thin_film_ior: Thin film interference + * - sheen, sheen_color, sheen_roughness: Sheen properties + * - normal: Normal map + * - coat, coat_roughness, coat_color: Clearcoat properties + * - emission, emissionColor: Emission properties + * + * @param {string} text - The raw MaterialX data as a string. + * @return {Object} A dictionary holding the parse node materials. + */ + parse(text: string): { + [x: string]: NodeMaterial; + }; +} +import { Loader } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/NRRDLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/NRRDLoader.d.ts new file mode 100644 index 000000000..1ffe169c3 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/NRRDLoader.d.ts @@ -0,0 +1,46 @@ +/** + * A loader for the NRRD format. + * + * ```js + * const loader = new NRRDLoader(); + * const volume = await loader.loadAsync( 'models/nrrd/I.nrrd' ); + * ``` + * + * @augments Loader + * @three_import import { NRRDLoader } from 'three/addons/loaders/NRRDLoader.js'; + */ +export class NRRDLoader extends Loader { + /** + * Constructs a new NRRD loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Starts loading from the given URL and passes the loaded NRRD asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Volume)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: Volume) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Toggles the segmentation mode. + * + * @param {boolean} segmentation - Whether to use segmentation mode or not. + */ + setSegmentation(segmentation: boolean): void; + segmentation: boolean | undefined; + /** + * Parses the given NRRD data and returns the resulting volume data. + * + * @param {ArrayBuffer} data - The raw NRRD data as an array buffer. + * @return {Volume} The parsed volume. + */ + parse(data: ArrayBuffer): Volume; + _parseChars(array: any, start: any, end: any): string; +} +import { Loader } from 'three'; +import { Volume } from '../misc/Volume.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/OBJLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/OBJLoader.d.ts new file mode 100644 index 000000000..b35f787d0 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/OBJLoader.d.ts @@ -0,0 +1,58 @@ +/** + * A loader for the OBJ format. + * + * The [OBJ format](https://en.wikipedia.org/wiki/Wavefront_.obj_file) is a simple data-format that + * represents 3D geometry in a human readable format as the position of each vertex, the UV position of + * each texture coordinate vertex, vertex normals, and the faces that make each polygon defined as a list + * of vertices, and texture vertices. + * + * ```js + * const loader = new OBJLoader(); + * const object = await loader.loadAsync( 'models/monster.obj' ); + * scene.add( object ); + * ``` + * + * @augments Loader + * @three_import import { OBJLoader } from 'three/addons/loaders/OBJLoader.js'; + */ +export class OBJLoader extends Loader { + /** + * Constructs a new OBJ loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * A reference to a material creator. + * + * @type {?MaterialCreator} + * @default null + */ + materials: MaterialCreator | null; + /** + * Starts loading from the given URL and passes the loaded OBJ asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Group)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: Group) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Sets the material creator for this OBJ. This object is loaded via {@link MTLLoader}. + * + * @param {MaterialCreator} materials - An object that creates the materials for this OBJ. + * @return {OBJLoader} A reference to this loader. + */ + setMaterials(materials: MaterialCreator): OBJLoader; + /** + * Parses the given OBJ data and returns the resulting group. + * + * @param {string} text - The raw OBJ data as a string. + * @return {Group} The parsed OBJ. + */ + parse(text: string): Group; +} +import { Loader } from 'three'; +import { Group } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/PCDLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/PCDLoader.d.ts new file mode 100644 index 000000000..e11b512de --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/PCDLoader.d.ts @@ -0,0 +1,67 @@ +/** + * A loader for the Point Cloud Data (PCD) format. + * + * PCDLoader supports ASCII and (compressed) binary files as well as the following PCD fields: + * - x y z + * - rgb + * - normal_x normal_y normal_z + * - intensity + * - label + * + * ```js + * const loader = new PCDLoader(); + * + * const points = await loader.loadAsync( './models/pcd/binary/Zaghetto.pcd' ); + * points.geometry.center(); // optional + * points.geometry.rotateX( Math.PI ); // optional + * scene.add( points ); + * ``` + * + * @augments Loader + * @three_import import { PCDLoader } from 'three/addons/loaders/PCDLoader.js'; + */ +export class PCDLoader extends Loader { + /** + * Constructs a new PCD loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Whether to use little Endian or not. + * + * @type {boolean} + * @default true + */ + littleEndian: boolean; + /** + * Starts loading from the given URL and passes the loaded PCD asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Points)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: Points) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Get dataview value by field type and size. + * + * @private + * @param {DataView} dataview - The DataView to read from. + * @param {number} offset - The offset to start reading from. + * @param {'F' | 'U' | 'I'} type - Field type. + * @param {number} size - Field size. + * @returns {number} Field value. + */ + private _getDataView; + /** + * Parses the given PCD data and returns a point cloud. + * + * @param {ArrayBuffer} data - The raw PCD data as an array buffer. + * @return {Points} The parsed point cloud. + */ + parse(data: ArrayBuffer): Points; +} +import { Loader } from 'three'; +import { Points } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/PDBLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/PDBLoader.d.ts new file mode 100644 index 000000000..9502d6e8e --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/PDBLoader.d.ts @@ -0,0 +1,45 @@ +/** + * A loader for the PDB format. + * + * The [Protein Data Bank](https://en.wikipedia.org/wiki/Protein_Data_Bank_(file_format)) + * file format is a textual file describing the three-dimensional structures of molecules. + * + * ```js + * const loader = new PDBLoader(); + * const pdb = await loader.loadAsync( 'models/pdb/ethanol.pdb' ); + * + * const geometryAtoms = pdb.geometryAtoms; + * const geometryBonds = pdb.geometryBonds; + * const json = pdb.json; + * ``` + * + * @augments Loader + * @three_import import { PDBLoader } from 'three/addons/loaders/PDBLoader.js'; + */ +export class PDBLoader extends Loader { + /** + * Constructs a new PDB loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Starts loading from the given URL and passes the loaded PDB asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Object)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: Object) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given PDB data and returns an object holding the atoms and + * bond geometries as well as the raw atom data as JSON. + * + * @param {string} text - The raw PDB data as a string. + * @return {Object} The result object. + */ + parse(text: string): Object; +} +import { Loader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/PLYLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/PLYLoader.d.ts new file mode 100644 index 000000000..c03afd50c --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/PLYLoader.d.ts @@ -0,0 +1,76 @@ +/** + * A loader for PLY the PLY format (known as the Polygon + * File Format or the Stanford Triangle Format). + * + * Limitations: + * - ASCII decoding assumes file is UTF-8. + * + * ```js + * const loader = new PLYLoader(); + * const geometry = await loader.loadAsync( './models/ply/ascii/dolphins.ply' ); + * scene.add( new THREE.Mesh( geometry ) ); + * ``` + * + * @augments Loader + * @three_import import { PLYLoader } from 'three/addons/loaders/PLYLoader.js'; + */ +export class PLYLoader extends Loader { + /** + * Constructs a new PLY loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + propertyNameMapping: {}; + customPropertyMapping: {}; + /** + * Starts loading from the given URL and passes the loaded PLY asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(BufferGeometry)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: BufferGeometry) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Sets a property name mapping that maps default property names + * to custom ones. For example, the following maps the properties + * “diffuse_(red|green|blue)” in the file to standard color names. + * + * ```js + * loader.setPropertyNameMapping( { + * diffuse_red: 'red', + * diffuse_green: 'green', + * diffuse_blue: 'blue' + * } ); + * ``` + * + * @param {Object} mapping - The mapping dictionary. + */ + setPropertyNameMapping(mapping: Object): void; + /** + * Custom properties outside of the defaults for position, uv, normal + * and color attributes can be added using the setCustomPropertyNameMapping method. + * For example, the following maps the element properties “custom_property_a” + * and “custom_property_b” to an attribute “customAttribute” with an item size of 2. + * Attribute item sizes are set from the number of element properties in the property array. + * + * ```js + * loader.setCustomPropertyNameMapping( { + * customAttribute: ['custom_property_a', 'custom_property_b'], + * } ); + * ``` + * @param {Object} mapping - The mapping dictionary. + */ + setCustomPropertyNameMapping(mapping: Object): void; + /** + * Parses the given PLY data and returns the resulting geometry. + * + * @param {ArrayBuffer} data - The raw PLY data as an array buffer. + * @return {BufferGeometry} The parsed geometry. + */ + parse(data: ArrayBuffer): BufferGeometry; +} +import { Loader } from 'three'; +import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/PVRLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/PVRLoader.d.ts new file mode 100644 index 000000000..e8f73618d --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/PVRLoader.d.ts @@ -0,0 +1,30 @@ +/** + * A loader for the PVRTC texture compression format. + * + * ```js + * const loader = new PVRLoader(); + * + * const map = loader.load( 'textures/compressed/disturb_4bpp_rgb.pvr' ); + * map.colorSpace = THREE.SRGBColorSpace; // only for color textures + * ``` + * + * @augments CompressedTextureLoader + * @three_import import { PVRLoader } from 'three/addons/loaders/PVRLoader.js'; + */ +export class PVRLoader extends CompressedTextureLoader { + /** + * Constructs a new PVR loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Parses the given PVRTC texture data. + * + * @param {ArrayBuffer} buffer - The raw texture data. + * @param {boolean} loadMipmaps - Whether to load mipmaps or not. This option is not yet supported by the loader. + * @return {CompressedTextureLoader~TexData} An object representing the parsed texture data. + */ + parse(buffer: ArrayBuffer, loadMipmaps: boolean): CompressedTextureLoader; +} +import { CompressedTextureLoader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/RGBELoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/RGBELoader.d.ts new file mode 100644 index 000000000..692cc5d8e --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/RGBELoader.d.ts @@ -0,0 +1,3 @@ +export class RGBELoader extends HDRLoader { +} +import { HDRLoader } from './HDRLoader.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/STLLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/STLLoader.d.ts new file mode 100644 index 000000000..aae8f96aa --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/STLLoader.d.ts @@ -0,0 +1,69 @@ +/** + * A loader for the STL format, as created by Solidworks and other CAD programs. + * + * Supports both binary and ASCII encoded files. The loader returns a non-indexed buffer geometry. + * + * Limitations: + * - Binary decoding supports "Magics" color format (http://en.wikipedia.org/wiki/STL_(file_format)#Color_in_binary_STL). + * - There is perhaps some question as to how valid it is to always assume little-endian-ness. + * - ASCII decoding assumes file is UTF-8. + * + * ```js + * const loader = new STLLoader(); + * const geometry = await loader.loadAsync( './models/stl/slotted_disk.stl' ) + * scene.add( new THREE.Mesh( geometry ) ); + * ``` + * For binary STLs geometry might contain colors for vertices. To use it: + * ```js + * // use the same code to load STL as above + * if ( geometry.hasColors ) { + * material = new THREE.MeshPhongMaterial( { opacity: geometry.alpha, vertexColors: true } ); + * } + * const mesh = new THREE.Mesh( geometry, material ); + * ``` + * For ASCII STLs containing multiple solids, each solid is assigned to a different group. + * Groups can be used to assign a different color by defining an array of materials with the same length of + * geometry.groups and passing it to the Mesh constructor: + * + * ```js + * const materials = []; + * const nGeometryGroups = geometry.groups.length; + * + * for ( let i = 0; i < nGeometryGroups; i ++ ) { + * const material = new THREE.MeshPhongMaterial( { color: colorMap[ i ], wireframe: false } ); + * materials.push( material ); + * } + * + * const mesh = new THREE.Mesh(geometry, materials); + * ``` + * + * @augments Loader + * @three_import import { STLLoader } from 'three/addons/loaders/STLLoader.js'; + */ +export class STLLoader extends Loader { + /** + * Constructs a new STL loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Starts loading from the given URL and passes the loaded STL asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(BufferGeometry)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: BufferGeometry) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given STL data and returns the resulting geometry. + * + * @param {ArrayBuffer} data - The raw STL data as an array buffer. + * @return {BufferGeometry} The parsed geometry. + */ + parse(data: ArrayBuffer): BufferGeometry; +} +import { Loader } from 'three'; +import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/SVGLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/SVGLoader.d.ts new file mode 100644 index 000000000..b11481bc5 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/SVGLoader.d.ts @@ -0,0 +1,150 @@ +/** + * A loader for the SVG format. + * + * Scalable Vector Graphics is an XML-based vector image format for two-dimensional graphics + * with support for interactivity and animation. + * + * ```js + * const loader = new SVGLoader(); + * const data = await loader.loadAsync( 'data/svgSample.svg' ); + * + * const paths = data.paths; + * const group = new THREE.Group(); + * + * for ( let i = 0; i < paths.length; i ++ ) { + * + * const path = paths[ i ]; + * const material = new THREE.MeshBasicMaterial( { + * color: path.color, + * side: THREE.DoubleSide, + * depthWrite: false + * } ); + * + * const shapes = SVGLoader.createShapes( path ); + * + * for ( let j = 0; j < shapes.length; j ++ ) { + * + * const shape = shapes[ j ]; + * const geometry = new THREE.ShapeGeometry( shape ); + * const mesh = new THREE.Mesh( geometry, material ); + * group.add( mesh ); + * + * } + * + * } + * + * scene.add( group ); + * ``` + * + * @augments Loader + * @three_import import { SVGLoader } from 'three/addons/loaders/SVGLoader.js'; + */ +export class SVGLoader extends Loader { + /** + * Creates a material for rendering the fill of the given path. + * + * @param {ShapePath} shapePath - The shape path. + * @return {?MeshBasicMaterial} The fill material. `null` if the path has no fill. + */ + static createFillMaterial(shapePath: ShapePath): MeshBasicMaterial | null; + /** + * Creates a material for rendering the stroke of the given path. + * + * @param {ShapePath} shapePath - The shape path. + * @return {?MeshBasicMaterial} The stroke material. `null` if the path has no stroke. + */ + static createStrokeMaterial(shapePath: ShapePath): MeshBasicMaterial | null; + /** + * Creates from the given shape path and array of shapes. + * + * @deprecated since 185. + * @param {ShapePath} shapePath - The shape path. + * @return {Array} An array of shapes. + */ + static createShapes(shapePath: ShapePath): Array; + /** + * Returns a stroke style object from the given parameters. + * + * @param {number} [width=1] - The stroke width. + * @param {string} [color='#000'] - The stroke color, as returned by {@link Color#getStyle}. + * @param {'round'|'bevel'|'miter'|'miter-limit'} [lineJoin='miter'] - The line join style. + * @param {'round'|'square'|'butt'} [lineCap='butt'] - The line cap style. + * @param {number} [miterLimit=4] - Maximum join length, in multiples of the `width` parameter (join is truncated if it exceeds that distance). + * @return {Object} The style object. + */ + static getStrokeStyle(width?: number, color?: string, lineJoin?: "round" | "bevel" | "miter" | "miter-limit", lineCap?: "round" | "square" | "butt", miterLimit?: number): Object; + /** + * Creates a stroke from an array of points. + * + * @param {Array} points - The points in 2D space. Minimum 2 points. The path can be open or closed (last point equals to first point). + * @param {Object} style - Object with SVG properties as returned by `SVGLoader.getStrokeStyle()`, or `SVGLoader.parse()` in the `path.userData.style` object. + * @param {number} [arcDivisions=12] - Arc divisions for round joins and endcaps. + * @param {number} [minDistance=0.001] - Points closer to this distance will be merged. + * @return {?BufferGeometry} The stroke geometry. UV coordinates are generated ('u' along path. 'v' across it, from left to right). + * Returns `null` if not geometry was generated. + */ + static pointsToStroke(points: Array, style: Object, arcDivisions?: number, minDistance?: number): BufferGeometry | null; + /** + * Creates a stroke from an array of points. + * + * @param {Array} points - The points in 2D space. Minimum 2 points. + * @param {Object} style - Object with SVG properties as returned by `SVGLoader.getStrokeStyle()`, or `SVGLoader.parse()` in the `path.userData.style` object. + * @param {number} [arcDivisions=12] - Arc divisions for round joins and endcaps. + * @param {number} [minDistance=0.001] - Points closer to this distance will be merged. + * @param {Array} vertices - An array holding vertices. + * @param {Array} normals - An array holding normals. + * @param {Array} uvs - An array holding uvs. + * @param {number} [vertexOffset=0] - The vertex offset. + * @return {number} The number of vertices. + */ + static pointsToStrokeWithBuffers(points: Array, style: Object, arcDivisions?: number, minDistance?: number, vertices: Array, normals: Array, uvs: Array, vertexOffset?: number): number; + /** + * Constructs a new SVG loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Default dots per inch. + * + * @type {number} + * @default 90 + */ + defaultDPI: number; + /** + * Default unit. + * + * @type {('mm'|'cm'|'in'|'pt'|'pc'|'px')} + * @default 'px' + */ + defaultUnit: ("mm" | "cm" | "in" | "pt" | "pc" | "px"); + /** + * Starts loading from the given URL and passes the loaded SVG asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function({paths:Array,xml:string})} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: { + paths: Array; + xml: string; + }) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given SVG data and returns the resulting data. + * + * @param {string} text - The raw SVG data as a string. + * @return {{paths:Array,xml:string}} An object holding an array of shape paths and the + * SVG XML document. + */ + parse(text: string): { + paths: Array; + xml: string; + }; +} +import { Loader } from 'three'; +import { ShapePath } from 'three'; +import { MeshBasicMaterial } from 'three'; +import { Vector2 } from 'three'; +import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/TDSLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/TDSLoader.d.ts new file mode 100644 index 000000000..819ba7cd6 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/TDSLoader.d.ts @@ -0,0 +1,141 @@ +/** + * A loader for the 3DS format, based on lib3ds. + * + * Loads geometry with uv and materials basic properties with texture support. + * + * ```js + * const loader = new TDSLoader(); + * loader.setResourcePath( 'models/3ds/portalgun/textures/' ); + * const object = await loader.loadAsync( 'models/3ds/portalgun/portalgun.3ds' ); + * scene.add( object ); + * + * @augments Loader + * @three_import import { TDSLoader } from 'three/addons/loaders/TDSLoader.js'; + */ +export class TDSLoader extends Loader { + /** + * Constructs a new 3DS loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Whether debug mode should be enabled or not. + * + * @type {boolean} + * @default false + */ + debug: boolean; + group: Group | null; + materials: any[]; + meshes: any[]; + /** + * Starts loading from the given URL and passes the loaded 3DS asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Group)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: Group) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given 3DS data and returns the resulting data. + * + * @param {ArrayBuffer} arraybuffer - The raw 3DS data as an array buffer. + * @param {string} path - The asset path. + * @return {Group} The parsed asset represented as a group. + */ + parse(arraybuffer: ArrayBuffer, path: string): Group; + /** + * Decode file content to read 3ds data. + * + * @private + * @param {ArrayBuffer} arraybuffer - Arraybuffer data to be loaded. + * @param {string} path - Path for external resources. + */ + private readFile; + /** + * Read mesh data chunk. + * + * @private + * @param {Chunk} chunk - to read mesh from + * @param {string} path - Path for external resources. + */ + private readMeshData; + /** + * Read named object chunk. + * + * @private + * @param {Chunk} chunk - Chunk in use. + */ + private readNamedObject; + /** + * Read material data chunk and add it to the material list. + * + * @private + * @param {Chunk} chunk - Chunk in use. + * @param {string} path - Path for external resources. + */ + private readMaterialEntry; + /** + * Read mesh data chunk. + * + * @private + * @param {Chunk} chunk - Chunk in use. + * @return {Mesh} - The parsed mesh. + */ + private readMesh; + /** + * Read face array data chunk. + * + * @private + * @param {Chunk} chunk - Chunk in use. + * @param {Mesh} mesh - Mesh to be filled with the data read. + */ + private readFaceArray; + /** + * Read texture map data chunk. + * + * @private + * @param {Chunk} chunk - Chunk in use. + * @param {string} path - Path for external resources. + * @return {Texture} Texture read from this data chunk. + */ + private readMap; + /** + * Read material group data chunk. + * + * @private + * @param {Chunk} chunk - Chunk in use. + * @return {Object} Object with name and index of the object. + */ + private readMaterialGroup; + /** + * Read a color value. + * + * @private + * @param {Chunk} chunk - Chunk. + * @return {Color} Color value read. + */ + private readColor; + /** + * Read percentage value. + * + * @private + * @param {Chunk} chunk - Chunk to read data from. + * @return {number} Data read from the dataview. + */ + private readPercentage; + /** + * Print debug message to the console. + * + * Is controlled by a flag to show or hide debug messages. + * + * @private + * @param {Object} message - Debug message to print to the console. + */ + private debugMessage; +} +import { Loader } from 'three'; +import { Group } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/TGALoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/TGALoader.d.ts new file mode 100644 index 000000000..56f74907c --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/TGALoader.d.ts @@ -0,0 +1,28 @@ +/** + * A loader for the TGA texture format. + * + * ```js + * const loader = new TGALoader(); + * const texture = await loader.loadAsync( 'textures/crate_color8.tga' ); + * texture.colorSpace = THREE.SRGBColorSpace; // only for color textures + * ``` + * + * @augments DataTextureLoader + * @three_import import { TGALoader } from 'three/addons/loaders/TGALoader.js'; + */ +export class TGALoader extends DataTextureLoader { + /** + * Constructs a new TGA loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Parses the given TGA texture data. + * + * @param {ArrayBuffer} buffer - The raw texture data. + * @return {DataTextureLoader~TexData} An object representing the parsed texture data. + */ + parse(buffer: ArrayBuffer): DataTextureLoader; +} +import { DataTextureLoader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/TIFFLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/TIFFLoader.d.ts new file mode 100644 index 000000000..3291f03ea --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/TIFFLoader.d.ts @@ -0,0 +1,28 @@ +/** + * A loader for the TIFF texture format. + * + * ```js + * const loader = new TIFFLoader(); + * const texture = await loader.loadAsync( 'textures/tiff/crate_lzw.tif' ); + * texture.colorSpace = THREE.SRGBColorSpace; + * ``` + * + * @augments DataTextureLoader + * @three_import import { TIFFLoader } from 'three/addons/loaders/TIFFLoader.js'; + */ +export class TIFFLoader extends DataTextureLoader { + /** + * Constructs a new TIFF loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Parses the given TIFF texture data. + * + * @param {ArrayBuffer} buffer - The raw texture data. + * @return {DataTextureLoader~TexData} An object representing the parsed texture data. + */ + parse(buffer: ArrayBuffer): DataTextureLoader; +} +import { DataTextureLoader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/TTFLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/TTFLoader.d.ts new file mode 100644 index 000000000..a9a9483c9 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/TTFLoader.d.ts @@ -0,0 +1,48 @@ +/** + * A loader for the TTF format. + * + * Loads TTF files and converts them into typeface JSON that can be used directly + * to create THREE.Font objects. + * + * ```js + * const loader = new TTFLoader(); + * const json = await loader.loadAsync( 'fonts/ttf/kenpixel.ttf' ); + * const font = new Font( json ); + * ``` + * + * @augments Loader + * @three_import import { TTFLoader } from 'three/addons/loaders/TTFLoader.js'; + */ +export class TTFLoader extends Loader { + /** + * Constructs a new TTF loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Whether the TTF commands should be reversed or not. + * + * @type {boolean} + * @default false + */ + reversed: boolean; + /** + * Starts loading from the given URL and passes the loaded TTF asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Object)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: Object) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given TTF data and returns a JSON for creating a font. + * + * @param {ArrayBuffer} arraybuffer - The raw TTF data as an array buffer. + * @return {Object} The result JSON. + */ + parse(arraybuffer: ArrayBuffer): Object; +} +import { Loader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/USDLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/USDLoader.d.ts new file mode 100644 index 000000000..247a6b36a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/USDLoader.d.ts @@ -0,0 +1,48 @@ +/** + * A loader for the USD format (USD, USDA, USDC, USDZ). + * + * Supports both ASCII (USDA) and binary (USDC) USD files, as well as + * USDZ archives containing either format. + * + * ```js + * const loader = new USDLoader(); + * const model = await loader.loadAsync( 'model.usdz' ); + * scene.add( model ); + * ``` + * + * @augments Loader + * @three_import import { USDLoader } from 'three/addons/loaders/USDLoader.js'; + */ +export class USDLoader extends Loader { + /** + * Constructs a new USDZ loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Starts loading from the given URL and passes the loaded USDZ asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Group)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: Group) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given USDZ data and returns the resulting group. + * + * The returned group is created synchronously, but any referenced textures + * are loaded asynchronously. Provide `onLoad` to be notified once all + * textures have finished loading. + * + * @param {ArrayBuffer|string} buffer - The raw USDZ data as an array buffer. + * @param {string} [path=''] - The URL base path. + * @param {function(Group)} [onLoad] - Executed once the group and all of its textures are ready. + * @param {onErrorCallback} [onError] - Executed when errors occur. + * @return {Group} The parsed asset as a group. + */ + parse(buffer: ArrayBuffer | string, path?: string, onLoad?: (arg0: Group) => any, onError?: onErrorCallback): Group; +} +import { Loader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/USDZLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/USDZLoader.d.ts new file mode 100644 index 000000000..843c08a50 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/USDZLoader.d.ts @@ -0,0 +1,3 @@ +export class USDZLoader extends USDLoader { +} +import { USDLoader } from './USDLoader.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/UltraHDRLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/UltraHDRLoader.d.ts new file mode 100644 index 000000000..91c2888d6 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/UltraHDRLoader.d.ts @@ -0,0 +1,82 @@ +/** + * A loader for the Ultra HDR Image Format. + * + * Existing HDR or EXR textures can be converted to Ultra HDR with this [tool](https://gainmap-creator.monogrid.com/). + * + * Current feature set: + * - JPEG headers (required) + * - XMP metadata (legacy format, supported) + * - ISO 21496-1 metadata (current standard, supported) + * - XMP validation (not implemented) + * - EXIF profile (not implemented) + * - ICC profile (not implemented) + * - Binary storage for SDR & HDR images (required) + * - Gainmap metadata (required) + * - Non-JPEG image formats (not implemented) + * - Primary image as an HDR image (not implemented) + * + * ```js + * const loader = new UltraHDRLoader(); + * const texture = await loader.loadAsync( 'textures/equirectangular/ice_planet_close.jpg' ); + * texture.mapping = THREE.EquirectangularReflectionMapping; + * + * scene.background = texture; + * scene.environment = texture; + * ``` + * + * @augments Loader + * @three_import import { UltraHDRLoader } from 'three/addons/loaders/UltraHDRLoader.js'; + */ +export class UltraHDRLoader extends Loader { + /** + * Constructs a new Ultra HDR loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * The texture type. + * + * @type {(HalfFloatType|FloatType)} + * @default HalfFloatType + */ + type: (number | FloatType); + /** + * Sets the texture type. + * + * @param {(HalfFloatType|FloatType)} value - The texture type to set. + * @return {UltraHDRLoader} A reference to this loader. + */ + setDataType(value: (number | FloatType)): UltraHDRLoader; + /** + * Parses the given Ultra HDR texture data. + * + * @param {ArrayBuffer} buffer - The raw texture data. + * @param {Function} onLoad - The `onLoad` callback. + */ + parse(buffer: ArrayBuffer, onLoad: Function): void; + /** + * Parses ISO 21496-1 gainmap metadata from binary data. + * + * @private + * @param {Uint8Array} data - The binary ISO metadata. + * @param {Object} metadata - The metadata object to populate. + */ + private _parseISOMetadata; + /** + * Starts loading from the given URL and passes the loaded Ultra HDR texture + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the files to be loaded. This can also be a data URI. + * @param {function(DataTexture, Object)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + * @return {DataTexture} The Ultra HDR texture. + */ + load(url: string, onLoad: (arg0: DataTexture, arg1: Object) => any, onProgress: onProgressCallback, onError: onErrorCallback): DataTexture; + _parseXMPMetadata(xmpDataString: any, metadata: any): void; + _srgbToLinear(value: any): number; + _applyGainmapToSDR(metadata: any, sdrBuffer: any, gainmapBuffer: any, onSuccess: any, onError: any): void; +} +import { Loader } from 'three'; +import { DataTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/VOXLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/VOXLoader.d.ts new file mode 100644 index 000000000..4db620acb --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/VOXLoader.d.ts @@ -0,0 +1,54 @@ +/** + * A loader for the VOX format. + * + * ```js + * const loader = new VOXLoader(); + * const result = await loader.loadAsync( 'models/vox/monu10.vox' ); + * + * scene.add( result.scene.children[ 0 ] ); + * ``` + * @augments Loader + * @three_import import { VOXLoader } from 'three/addons/loaders/VOXLoader.js'; + */ +export class VOXLoader extends Loader { + /** + * Starts loading from the given URL and passes the loaded VOX asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Object)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: Object) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given VOX data and returns the result object. + * + * @param {ArrayBuffer} buffer - The raw VOX data as an array buffer. + * @return {Object} The parsed VOX data with properties: chunks, scene. + */ + parse(buffer: ArrayBuffer): Object; +} +/** + * Builds a mesh from a VOX chunk. + * + * @param {Object} chunk - A VOX chunk loaded via {@link VOXLoader}. + * @return {Mesh} The generated mesh. + */ +export function buildMesh(chunk: Object): Mesh; +/** + * Builds a 3D texture from a VOX chunk. + * + * @param {Object} chunk - A VOX chunk loaded via {@link VOXLoader}. + * @return {Data3DTexture} The generated 3D texture. + */ +export function buildData3DTexture(chunk: Object): Data3DTexture; +export class VOXMesh extends Mesh { + constructor(chunk: any); +} +export class VOXData3DTexture extends Data3DTexture { + constructor(chunk: any); +} +import { Loader } from 'three'; +import { Mesh } from 'three'; +import { Data3DTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/VRMLLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/VRMLLoader.d.ts new file mode 100644 index 000000000..08d9f2b94 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/VRMLLoader.d.ts @@ -0,0 +1,40 @@ +/** + * A loader for the VRML format. + * + * ```js + * const loader = new VRMLLoader(); + * const object = await loader.loadAsync( 'models/vrml/house.wrl' ); + * scene.add( object ); + * ``` + * + * @augments Loader + * @three_import import { VRMLLoader } from 'three/addons/loaders/VRMLLoader.js'; + */ +export class VRMLLoader extends Loader { + /** + * Constructs a new VRML loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Starts loading from the given URL and passes the loaded VRML asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Scene)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: Scene) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given VRML data and returns the resulting scene. + * + * @param {string} data - The raw VRML data as a string. + * @param {string} path - The URL base path. + * @return {Scene} The parsed scene. + */ + parse(data: string, path: string): Scene; +} +import { Loader } from 'three'; +import { Scene } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/VTKLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/VTKLoader.d.ts new file mode 100644 index 000000000..daeaecfb0 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/VTKLoader.d.ts @@ -0,0 +1,48 @@ +/** + * A loader for the VTK format. + * + * This loader only supports the `POLYDATA` dataset format so far. Other formats + * (structured points, structured grid, rectilinear grid, unstructured grid, appended) + * are not supported. + * + * ```js + * const loader = new VTKLoader(); + * const geometry = await loader.loadAsync( 'models/vtk/liver.vtk' ); + * geometry.computeVertexNormals(); + * + * const mesh = new THREE.Mesh( geometry, new THREE.MeshLambertMaterial() ); + * scene.add( mesh ); + * ``` + * + * @augments Loader + * @three_import import { VTKLoader } from 'three/addons/loaders/VTKLoader.js'; + * @deprecated since r184. + */ +export class VTKLoader extends Loader { + /** + * Constructs a new VTK loader. + * + * @param {LoadingManager} [manager] - The loading manager. + * @deprecated since r184. + */ + constructor(manager?: LoadingManager); + /** + * Starts loading from the given URL and passes the loaded VTK asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(BufferGeometry)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: BufferGeometry) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given VTK data and returns the resulting geometry. + * + * @param {ArrayBuffer} data - The raw VTK data as an array buffer + * @return {BufferGeometry} The parsed geometry. + */ + parse(data: ArrayBuffer): BufferGeometry; +} +import { Loader } from 'three'; +import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/XYZLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/XYZLoader.d.ts new file mode 100644 index 000000000..e1565591d --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/XYZLoader.d.ts @@ -0,0 +1,42 @@ +/** + * A loader for the XYZ format. + * + * XYZ is a very simple format for storing point clouds. The layouts + * `XYZ` (points) and `XYZRGB` (points + colors) are supported. + * + * ```js + * const loader = new XYZLoader(); + * const geometry = await loader.loadAsync( 'models/xyz/helix_201.xyz' ); + * geometry.center(); + * + * const vertexColors = ( geometry.hasAttribute( 'color' ) === true ); + * const material = new THREE.PointsMaterial( { size: 0.1, vertexColors: vertexColors } ); + * + * const points = new THREE.Points( geometry, material ); + * scene.add( points ); + * ``` + * + * @augments Loader + * @three_import import { XYZLoader } from 'three/addons/loaders/XYZLoader.js'; + */ +export class XYZLoader extends Loader { + /** + * Starts loading from the given URL and passes the loaded XYZ asset + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(BufferGeometry)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: BufferGeometry) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given XYZ data and returns the resulting geometry. + * + * @param {string} text - The raw XYZ data as a string. + * @return {BufferGeometry} The geometry representing the point cloud. + */ + parse(text: string): BufferGeometry; +} +import { Loader } from 'three'; +import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/collada/ColladaComposer.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/collada/ColladaComposer.d.ts new file mode 100644 index 000000000..3113bc0a5 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/collada/ColladaComposer.d.ts @@ -0,0 +1,154 @@ +/** + * ColladaComposer converts parsed library data into Three.js objects. + */ +export class ColladaComposer { + constructor(library: any, collada: any, textureLoader: any, tgaLoader: any); + library: any; + collada: any; + textureLoader: any; + tgaLoader: any; + tempColor: Color; + animations: any[]; + kinematics: {}; + position: Vector3; + scale: Vector3; + quaternion: Quaternion; + matrix: Matrix4; + deferredPivotAnimations: {}; + transformNodes: {}; + compose(): { + scene: any; + animations: any[]; + kinematics: {}; + }; + buildLibrary(data: any, builder: any): void; + getBuild(data: any, builder: any): any; + isEmpty(object: any): boolean; + buildAnimation(data: any): any[]; + collectDeferredPivotAnimation(nodeId: any, nodeChannels: any): void; + hasPivotTransforms(nodeData: any): boolean; + getAnimation(id: any): any; + aggregateAnimationChannels(channels: any, samplers: any, sources: any): {}; + buildMatrixTracks(object3D: any, channelData: any, nodeData: any, tracks: any): void; + buildTranslateTrack(object3D: any, channelData: any, transformInfo: any, tracks: any): void; + buildRotateTrack(object3D: any, sid: any, channelData: any, transformInfo: any, nodeData: any, tracks: any): void; + buildScaleTrack(object3D: any, channelData: any, transformInfo: any, tracks: any): void; + getTimesForAllAxes(channelData: any): any[]; + getValueAtTime(componentData: any, time: any, defaultValue: any): any; + evaluateBezierComponent(componentData: any, i0: any, i1: any, t0: any, t1: any, time: any): number; + getInterpolationInfo(channelData: any): { + type: any; + uniform: boolean; + }; + applyInterpolation(track: any, interpolationInfo: any, channelData?: null): void; + prepareAnimationData(data: any, defaultMatrix: any): { + time: number; + value: any; + }[]; + createKeyframeTracks(animation: any, tracks: any): any; + transformAnimationData(keyframes: any, property: any, defaultValue: any): void; + createMissingKeyframes(keyframes: any, property: any): void; + getPrev(keyframes: any, i: any, property: any): any; + getNext(keyframes: any, i: any, property: any): any; + interpolate(key: any, prev: any, next: any, property: any): void; + buildAnimationClip(data: any): AnimationClip; + getAnimationClip(id: any): any; + buildController(data: any): { + id: any; + }; + buildSkin(data: any): { + joints: never[]; + indices: { + array: never[]; + stride: number; + }; + weights: { + array: never[]; + stride: number; + }; + }; + getController(id: any): any; + buildImage(data: any): any; + getImage(id: any): any; + buildEffect(data: any): any; + getEffect(id: any): any; + getTextureLoader(image: any): any; + buildMaterial(data: any): MeshBasicMaterial | MeshPhongMaterial | MeshLambertMaterial; + getMaterial(id: any): any; + buildCamera(data: any): PerspectiveCamera | OrthographicCamera; + getCamera(id: any): any; + buildLight(data: any): SpotLight | PointLight | DirectionalLight | AmbientLight | undefined; + getLight(id: any): any; + groupPrimitives(primitives: any): {}; + checkUVCoordinates(primitives: any): void; + buildGeometry(data: any): {}; + buildGeometryType(primitives: any, sources: any, vertices: any): { + data: BufferGeometry; + type: any; + materialKeys: any[]; + }; + buildGeometryData(primitive: any, source: any, offset: any, array: any, isColor?: boolean): void; + getGeometry(id: any): any; + buildKinematicsModel(data: any): any; + getKinematicsModel(id: any): any; + buildKinematicsScene(data: any): any; + getKinematicsScene(id: any): any; + setupKinematics(): void; + buildTransformList(node: any): ({ + sid: any; + type: any; + obj: Matrix4; + angle?: undefined; + } | { + sid: any; + type: any; + obj: Vector3; + angle?: undefined; + } | { + sid: any; + type: any; + obj: Vector3; + angle: number; + })[]; + buildSkeleton(skeletons: any, joints: any): Skeleton; + buildBoneHierarchy(root: any, joints: any, boneData: any): void; + buildNode(data: any): any; + wrapWithTransformHierarchy(contentObject: any, nodeData: any): Group; + resolveMaterialBinding(keys: any, instanceMaterials: any): any[]; + get fallbackMaterial(): MeshBasicMaterial; + _fallbackMaterial: MeshBasicMaterial | undefined; + buildObjects(geometries: any, instanceMaterials: any): (Mesh | SkinnedMesh | Line | undefined)[]; + hasNode(id: any): boolean; + getNode(id: any): any; + buildVisualScene(data: any): Group; + hasVisualScene(id: any): boolean; + getVisualScene(id: any): any; + parseScene(xml: any): any; + parseId(text: any): any; + setupAnimations(): void; + buildDeferredPivotAnimationTracks(tracks: any): void; + buildTransformHierarchyTracks(nodeId: any, nodeChannels: any, nodeData: any, tracks: any): void; + buildHierarchyTranslateTrack(transformNode: any, channelData: any, transformInfo: any, tracks: any): void; + buildHierarchyRotateTrack(transformNode: any, channelData: any, transformInfo: any, tracks: any): void; + buildHierarchyScaleTrack(transformNode: any, channelData: any, transformInfo: any, tracks: any): void; +} +import { Color } from 'three'; +import { Vector3 } from 'three'; +import { Quaternion } from 'three'; +import { Matrix4 } from 'three'; +import { AnimationClip } from 'three'; +import { MeshBasicMaterial } from 'three'; +import { MeshPhongMaterial } from 'three'; +import { MeshLambertMaterial } from 'three'; +import { PerspectiveCamera } from 'three'; +import { OrthographicCamera } from 'three'; +import { SpotLight } from 'three'; +import { PointLight } from 'three'; +import { DirectionalLight } from 'three'; +import { AmbientLight } from 'three'; +import { BufferGeometry } from 'three'; +import { Skeleton } from 'three'; +import { Group } from 'three'; +import { Mesh } from 'three'; +import { SkinnedMesh } from 'three'; +import { Line } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/collada/ColladaParser.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/collada/ColladaParser.d.ts new file mode 100644 index 000000000..fbf3e6e77 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/collada/ColladaParser.d.ts @@ -0,0 +1,234 @@ +/** + * ColladaParser handles XML parsing and converts Collada XML to intermediate data structures. + */ +export class ColladaParser { + count: number; + generateId(): string; + parse(text: any): { + library: { + animations: {}; + clips: {}; + controllers: {}; + images: {}; + effects: {}; + materials: {}; + cameras: {}; + lights: {}; + geometries: {}; + nodes: {}; + visualScenes: {}; + kinematicsModels: {}; + physicsModels: {}; + kinematicsScenes: {}; + joints: {}; + }; + asset: { + unit: number; + upAxis: any; + }; + collada: any; + } | null; + library: { + animations: {}; + clips: {}; + controllers: {}; + images: {}; + effects: {}; + materials: {}; + cameras: {}; + lights: {}; + geometries: {}; + nodes: {}; + visualScenes: {}; + kinematicsModels: {}; + physicsModels: {}; + kinematicsScenes: {}; + joints: {}; + } | undefined; + collada: any; + parserErrorToText(parserError: any): string; + parseAsset(xml: any): { + unit: number; + upAxis: any; + }; + parseAssetUnit(xml: any): number; + parseAssetUpAxis(xml: any): any; + parseLibrary(xml: any, libraryName: any, nodeName: any, parser: any): void; + parseAnimation(xml: any): void; + parseAnimationSampler(xml: any): { + inputs: {}; + }; + parseAnimationChannel(xml: any): { + member: any; + indices: any; + id: any; + sid: any; + arraySyntax: boolean; + memberSyntax: boolean; + sampler: any; + }; + parseAnimationClip(xml: any): void; + parseController(xml: any): void; + parseSkin(xml: any): { + sources: {}; + }; + parseJoints(xml: any): { + inputs: {}; + }; + parseVertexWeights(xml: any): { + inputs: {}; + }; + parseImage(xml: any): void; + parseEffect(xml: any): void; + parseEffectProfileCOMMON(xml: any): { + surfaces: {}; + samplers: {}; + }; + parseEffectNewparam(xml: any, data: any): void; + parseEffectSurface(xml: any): { + init_from: any; + }; + parseEffectSampler(xml: any): { + source: any; + }; + parseEffectTechnique(xml: any): { + type: any; + parameters: {}; + extra: { + technique: {}; + }; + }; + parseEffectParameters(xml: any): {}; + parseEffectParameter(xml: any): {}; + parseEffectParameterTexture(xml: any): { + technique: {}; + }; + parseEffectParameterTextureExtra(xml: any, data: any): void; + parseEffectParameterTextureExtraTechnique(xml: any, data: any): void; + parseEffectExtra(xml: any): { + technique: {}; + }; + parseEffectExtraTechnique(xml: any): {}; + parseEffectExtraTechniqueBump(xml: any): {}; + parseMaterial(xml: any): void; + parseCamera(xml: any): void; + parseCameraOptics(xml: any): {}; + parseCameraTechnique(xml: any): { + technique: any; + parameters: {}; + }; + parseCameraParameters(xml: any): {}; + parseLight(xml: any): void; + parseLightTechnique(xml: any): { + technique: any; + parameters: { + color: Color; + falloffAngle: number; + distance: number; + }; + }; + parseLightParameters(xml: any): { + color: Color; + falloffAngle: number; + distance: number; + }; + parseGeometry(xml: any): void; + parseSource(xml: any): { + array: never[]; + stride: number; + }; + parseGeometryVertices(xml: any): {}; + parseGeometryPrimitive(xml: any): { + type: any; + material: any; + count: number; + inputs: {}; + stride: number; + hasUV: boolean; + }; + parseLibraryJoint(xml: any): void; + parseKinematicsModel(xml: any): void; + parseKinematicsTechniqueCommon(xml: any, data: any): void; + parseKinematicsJoint(xml: any): { + sid: any; + name: any; + axis: Vector3; + limits: { + min: number; + max: number; + }; + type: any; + static: boolean; + zeroPosition: number; + middlePosition: number; + } | undefined; + parseKinematicsJointParameter(xml: any): { + sid: any; + name: any; + axis: Vector3; + limits: { + min: number; + max: number; + }; + type: any; + static: boolean; + zeroPosition: number; + middlePosition: number; + }; + parseKinematicsLink(xml: any): { + sid: any; + name: any; + attachments: never[]; + transforms: never[]; + }; + parseKinematicsAttachment(xml: any): { + joint: any; + transforms: never[]; + links: never[]; + }; + parseKinematicsTransform(xml: any): { + type: any; + }; + parsePhysicsModel(xml: any): void; + parsePhysicsRigidBody(xml: any, data: any): void; + parsePhysicsTechniqueCommon(xml: any, data: any): void; + parseKinematicsScene(xml: any): void; + parseKinematicsBindJointAxis(xml: any): { + target: any; + }; + prepareNodes(xml: any): void; + parseNode(xml: any): { + name: any; + type: any; + id: any; + sid: any; + matrix: Matrix4; + nodes: never[]; + instanceCameras: never[]; + instanceControllers: never[]; + instanceLights: never[]; + instanceGeometries: never[]; + instanceNodes: never[]; + transforms: {}; + transformData: {}; + transformOrder: never[]; + }; + parseNodeInstance(xml: any): { + id: any; + materials: {}; + skeletons: never[]; + }; + parseVisualScene(xml: any): void; + hasNode(id: any): boolean; +} +/** + * Utility functions for parsing + */ +export function getElementsByTagName(xml: any, name: any): any[]; +export function parseStrings(text: any): any; +export function parseFloats(text: any): any; +export function parseInts(text: any): any; +export function parseId(text: any): any; +import { Color } from 'three'; +import { Vector3 } from 'three'; +import { Matrix4 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/IFFParser.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/IFFParser.d.ts new file mode 100644 index 000000000..93747f8df --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/IFFParser.d.ts @@ -0,0 +1,121 @@ +export class IFFParser { + debugger: Debugger; + parse(buffer: any): { + materials: {}; + layers: never[]; + tags: never[]; + textures: never[]; + } | undefined; + reader: DataViewReader | undefined; + tree: { + materials: {}; + layers: never[]; + tags: never[]; + textures: never[]; + } | undefined; + currentLayer: { + materials: {}; + layers: never[]; + tags: never[]; + textures: never[]; + } | { + number: number; + flags: number; + pivot: number[]; + name: string | undefined; + } | undefined; + currentForm: any; + parser: LWO2Parser | LWO3Parser | undefined; + parseTopForm(): void; + parseForm(length: any): void; + parentForm: any; + setupForm(type: any, length: any): void; + currentFormEnd: any; + skipForm(length: any): void; + parseUnknownForm(type: any, length: any): void; + parseSurfaceForm(length: any): void; + currentSurface: { + attributes: {}; + connections: {}; + name: string | undefined; + inputName: string | undefined; + nodes: {}; + source: string | undefined; + } | { + attributes: {}; + connections: {}; + name: string | undefined; + nodes: {}; + source: string | undefined; + } | undefined; + parseSurfaceLwo2(length: any): void; + parseSubNode(length: any): void; + currentNode: { + name: string | undefined; + } | undefined; + parseConnections(length: any): void; + parseEntryForm(length: any): void; + parseValueForm(): void; + parseImageStateForm(): void; + parseImageMap(length: any): void; + parseTextureNodeAttribute(type: any): void; + parseEnvelope(length: any): void; + parseClip(length: any): void; + parseClipLwo2(length: any): void; + parseImage(): void; + parseXVAL(type: any, length: any): void; + parseXVAL3(type: any, length: any): void; + parseObjectTag(): void; + parseLayer(length: any): void; + parsePoints(length: any): void; + currentPoints: any[] | undefined; + parseVertexMapping(length: any, discontinuous: any): void; + parseUVMapping(name: any, finalOffset: any, discontinuous: any): void; + parseMorphTargets(name: any, finalOffset: any, type: any): void; + parsePolygonList(length: any): void; + parseTagStrings(length: any): void; + parsePolygonTagMapping(length: any): void; + parseMaterialIndices(finalOffset: any): void; + parseUnknownCHUNK(blockID: any, length: any): void; +} +declare class Debugger { + active: boolean; + depth: number; + formList: any[]; + offset: number; + node: number; + nodeID: string; + dataOffset: number; + length: number; + skipped: boolean; + enable(): void; + log(): void; + closeForms(): void; +} +declare class DataViewReader { + constructor(buffer: any); + dv: DataView; + offset: number; + _textDecoder: TextDecoder; + _bytes: Uint8Array; + size(): any; + setOffset(offset: any): void; + endOfFile(): boolean; + skip(length: any): void; + getUint8(): number; + getUint16(): number; + getInt32(): number; + getUint32(): number; + getUint64(): number; + getFloat32(): number; + getFloat32Array(size: any): number[]; + getFloat64(): number; + getFloat64Array(size: any): number[]; + getVariableLengthIndex(): number; + getIDTag(): string | undefined; + getString(size: any): string | undefined; + getStringArray(size: any): any; +} +import { LWO2Parser } from './LWO2Parser.js'; +import { LWO3Parser } from './LWO3Parser.js'; +export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/LWO2Parser.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/LWO2Parser.d.ts new file mode 100644 index 000000000..dc1f38872 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/LWO2Parser.d.ts @@ -0,0 +1,5 @@ +export class LWO2Parser { + constructor(IFFParser: any); + IFF: any; + parseBlock(): void; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/LWO3Parser.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/LWO3Parser.d.ts new file mode 100644 index 000000000..e5fbcedbf --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/LWO3Parser.d.ts @@ -0,0 +1,5 @@ +export class LWO3Parser { + constructor(IFFParser: any); + IFF: any; + parseBlock(): void; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDAParser.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDAParser.d.ts new file mode 100644 index 000000000..fae9e0192 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDAParser.d.ts @@ -0,0 +1,31 @@ +export class USDAParser { + parseText(text: any): {}; + _preprocess(text: any): string; + _stripBlockComments(text: any): string; + _collapseTripleQuotedStrings(text: any): string; + _stripInlineComment(line: any): any; + _findAssignmentOperator(line: any): number; + /** + * Parse USDA text and return raw spec data in specsByPath format. + * Used by USDComposer for unified scene composition. + */ + parseData(text: any): { + specsByPath: { + '/': { + specType: number; + fields: { + upAxis: any; + defaultPrim: any; + metersPerUnit: number; + framesPerSecond: number; + timeCodesPerSecond: number; + }; + }; + }; + }; + _inferSkelElementSize(specsByPath: any): void; + _inferElementSize(attrSpec: any, numVertices: any): void; + _extractPrimData(data: any, path: any, primFields: any, specsByPath: any, SpecType: any): void; + _parseAttributeValue(valueType: any, rawValue: any): any; + _parseString(str: any): string; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDCParser.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDCParser.d.ts new file mode 100644 index 000000000..546010819 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDCParser.d.ts @@ -0,0 +1,70 @@ +export class USDCParser { + /** + * Parse USDC file and return raw spec data without building Three.js scene. + * Used by USDComposer for unified scene composition. + */ + parseData(buffer: any): { + specsByPath: {}; + }; + buffer: any; + reader: BinaryReader | undefined; + version: { + major: number; + minor: number; + patch: number; + } | undefined; + _conversionBuffer: ArrayBuffer | undefined; + _conversionView: DataView | undefined; + specsByPath: {} | undefined; + _readBootstrap(): void; + tocOffset: number | undefined; + _readTOC(): void; + sections: {} | undefined; + _readTokens(): void; + tokens: any[] | undefined; + _readStrings(): void; + strings: any[] | undefined; + _readFields(): void; + fields: any[] | undefined; + _readFieldSets(): void; + fieldSets: any[] | undefined; + _readPaths(): void; + paths: any[] | undefined; + _readPathsRecursive(parentPath: any, depth?: number): void; + _buildPathsFromCompressed(pathIndices: any, elementTokenIndices: any, jumps: any): void; + _readSpecs(): void; + specs: any[] | undefined; + _readValue(valueRep: any): any; + _readInlinedValue(valueRep: any): any; + _readTimeSamples(valueRep: any): { + times: any; + values: any[]; + }; + _readScalarValue(type: any): any; + _readArrayValue(valueRep: any): any[] | Uint32Array | Float64Array | Float32Array | Int32Array; + _readCompressedArray(type: any, size: any): never[] | Float32Array | Int32Array; + _readHalf(): number; + _halfToFloat(h: any): number; + _getFieldsForSpec(spec: any): {}; +} +declare class BinaryReader { + constructor(buffer: any); + buffer: any; + view: DataView; + offset: number; + seek(offset: any): void; + tell(): number; + readUint8(): number; + readInt8(): number; + readUint16(): number; + readInt16(): number; + readUint32(): number; + readInt32(): number; + readUint64(): number; + readInt64(): number; + readFloat32(): number; + readFloat64(): number; + readBytes(length: any): Uint8Array; + readString(length: any): string; +} +export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDComposer.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDComposer.d.ts new file mode 100644 index 000000000..118fd6fac --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDComposer.d.ts @@ -0,0 +1,226 @@ +/** + * USDComposer handles scene composition from parsed USD data. + * This includes reference resolution, variant selection, transform handling, + * and building the Three.js scene graph. + * + * Works with specsByPath format from USDCParser. + */ +export class USDComposer { + constructor(manager?: null); + textureCache: {}; + skinnedMeshes: any[]; + manager: any; + texturePromises: any[]; + /** + * Compose a Three.js scene from parsed USD data. + * @param {Object} parsedData - Data from USDCParser or USDAParser + * @param {Object} assets - Dictionary of referenced assets (specsByPath or blob URLs) + * @param {Object} variantSelections - External variant selections + * @param {string} basePath - Base path for resolving relative references + * @returns {Group} Three.js scene graph + */ + compose(parsedData: Object, assets?: Object, variantSelections?: Object, basePath?: string): Group; + specsByPath: any; + assets: Object | undefined; + externalVariantSelections: Object | undefined; + basePath: string | undefined; + skeletons: {} | undefined; + fps: any; + /** + * Apply USD transforms to a Three.js object. + * Handles xformOpOrder with proper matrix composition. + * USD uses row-vector convention, Three.js uses column-vector. + */ + applyTransform(obj: any, fields: any, attrs?: {}): void; + /** + * Build indexes for efficient lookups. + * Called once during compose() to avoid O(n) scans per lookup. + */ + _buildIndexes(): void; + childrenByPath: Map | undefined; + attributesByPrimPath: Map | undefined; + materialsByRoot: Map | undefined; + shadersByMaterialPath: Map | undefined; + geomSubsetsByMeshPath: Map | undefined; + /** + * Check if a path is a direct child of parentPath. + */ + _isDirectChild(parentPath: any, path: any, prefix: any): boolean; + /** + * Build the scene hierarchy recursively. + * Uses childrenByPath index for O(1) child lookup instead of O(n) iteration. + */ + _buildHierarchy(parent: any, parentPath: any): void; + /** + * Get variant paths for a parent path based on variant selections. + */ + _getVariantPaths(parentPath: any): any[]; + /** + * Resolve a file path relative to basePath. + */ + _resolveFilePath(refPath: any): any; + /** + * Resolve a USD reference and return the composed content. + * @param {string} refValue - Reference value like "@./path/to/file.usdc@" + * @param {Object} localVariants - Variant selections to apply + * @returns {Group|null} Composed content or null + */ + _resolveReference(refValue: string, localVariants?: Object): Group | null; + /** + * Find a single mesh in the group's shallow hierarchy. + * Only returns a mesh if it's at depth 0 or 1, not deeply nested. + * This preserves transforms in complex hierarchies like Kitchen Set + * while supporting USDZExporter round-trip (Xform > Xform > Mesh pattern). + */ + _findSingleMesh(group: any): any; + /** + * Check if an object has a non-identity local transform. + */ + _hasNonIdentityTransform(obj: any): boolean; + /** + * Get the base path (directory) from a file path. + */ + _getBasePath(filePath: any): any; + /** + * Extract variant selections from a spec's fields. + */ + _getLocalVariantSelections(fields: any): {}; + /** + * Get all reference values from a prim spec. + * @returns {string[]} Array of reference strings like "@path@" or "@path@" + */ + _getReferences(spec: any): string[]; + /** + * Get attributes for a path from attribute specs. + */ + _getAttributes(path: any): {}; + _collectAttributesFromPath(path: any, attrs: any): void; + /** + * Build a mesh from a USD geometric primitive (Cube, Sphere, Cylinder, Cone, Capsule). + */ + _buildGeomPrimitive(path: any, spec: any, typeName: any): Mesh; + /** + * Build a mesh from a Mesh spec. + */ + _buildMesh(path: any, spec: any): Mesh | SkinnedMesh; + /** + * Build a camera from a Camera spec. + */ + _buildCamera(path: any): PerspectiveCamera | OrthographicCamera; + /** + * Build a light from a UsdLux light spec. + */ + _buildLight(path: any, typeName: any): SpotLight | PointLight | DirectionalLight | RectAreaLight | undefined; + /** + * Convert a color temperature in Kelvin to an RGB Color. + * Based on Tanner Helland's algorithm. + */ + _colorTemperature(kelvin: any): Color; + _parseNumber(value: any, fallback: any): any; + _getGeomSubsets(meshPath: any): any[]; + /** + * Get material binding target path, checking variant paths if needed. + */ + _getMaterialBindingTarget(primPath: any): any; + _buildGeometry(path: any, fields: any, hasSkinning?: boolean): BufferGeometry; + _buildGeometryWithSubsets(fields: any, geomSubsets: any, hasSkinning?: boolean): BufferGeometry; + _selectTopWeights(srcIndices: any, srcWeights: any, elementSize: any, numVertices: any, dstIndices: any, dstWeights: any): void; + _findUVPrimvar(fields: any): { + uvs: any; + uvIndices: any; + }; + _findUV2Primvar(fields: any): { + uvs2: any; + uv2Indices: any; + }; + _buildHoleMap(polygonHoles: any): { + parentToHoles: Map; + holeFaces: Set; + }; + _triangulateIndicesWithPattern(indices: any, counts: any, points?: null, holeMap?: null): { + indices: any[]; + pattern: any[]; + }; + _applyTriangulationPattern(indices: any, pattern: any): any[]; + _triangulateNGon(faceIndices: any, points: any): any[][]; + _triangulateNGonWithHoles(outerIndices: any, holeContours: any, points: any): any[][]; + _triangulateIndices(indices: any, counts: any): any[]; + _expandAttribute(data: any, indices: any, itemSize: any): any[]; + /** + * Compute per-vertex normals from indexed triangle data. + * Accumulates area-weighted face normals at each shared vertex and normalizes. + */ + _computeVertexNormals(points: any, indices: any): Float32Array; + /** + * Get the material path for a mesh, checking various binding sources. + */ + _getMaterialPath(meshPath: any, fields: any): any; + _buildMaterial(meshPath: any, fields: any): MeshPhysicalMaterial; + _buildMaterialForPath(materialPath: any): MeshPhysicalMaterial; + /** + * Apply material binding from a prim path to a mesh. + * Used when merging referenced geometry into a prim that has material binding. + */ + _applyMaterialBinding(mesh: any, primPath: any): void; + _pickBestMaterial(materialPaths: any): any; + _applyMaterial(material: any, materialPath: any): void; + /** + * Shared helper for applying texture or value from shader attribute. + * Reduces duplication between _applyPreviewSurface and _applyOpenPBRSurface. + */ + _applyTextureOrValue(material: any, shaderPath: any, fields: any, attrName: any, textureProperty: any, colorSpace: any, valueCallback: any, textureGetter: any): boolean; + _applyPreviewSurface(material: any, shaderPath: any): void; + _applyOpenPBRSurface(material: any, shaderPath: any): void; + _getTextureFromOpenPBRConnection(connPath: any): any; + _loadTextureFromPath(filePath: any): any; + _getTextureFromConnection(connPath: any): any; + _applyTextureTransforms(texture: any, attrs: any): void; + _loadTexture(filePath: any, textureAttrs: any, transformAttrs: any): Texture | null; + _createTextureFromData(data: any, textureAttrs: any, transformAttrs: any): Texture | null; + _getWrapMode(wrapValue: any): number; + _buildSkeleton(path: any): { + skeleton: Skeleton; + joints: any; + rootBones: Bone[]; + animationPath: any; + path: any; + } | null; + _bindSkeletons(): void; + _buildAnimations(): AnimationClip[]; + _buildTransformAnimations(): (QuaternionKeyframeTrack | VectorKeyframeTrack)[]; + _buildAnimationClip(path: any): AnimationClip | null; + _getTimeSampledAttribute(primPath: any, attrName: any): any; + _flattenMatrixArray(matrices: any, numMatrices: any): any; +} +export namespace SpecType { + let Unknown: number; + let Attribute: number; + let Connection: number; + let Expression: number; + let Mapper: number; + let MapperArg: number; + let Prim: number; + let PseudoRoot: number; + let Relationship: number; + let RelationshipTarget: number; + let Variant: number; + let VariantSet: number; +} +import { Group } from 'three'; +import { Mesh } from 'three'; +import { SkinnedMesh } from 'three'; +import { PerspectiveCamera } from 'three'; +import { OrthographicCamera } from 'three'; +import { SpotLight } from 'three'; +import { PointLight } from 'three'; +import { DirectionalLight } from 'three'; +import { RectAreaLight } from 'three'; +import { Color } from 'three'; +import { BufferGeometry } from 'three'; +import { MeshPhysicalMaterial } from 'three'; +import { Texture } from 'three'; +import { Skeleton } from 'three'; +import { Bone } from 'three'; +import { AnimationClip } from 'three'; +import { QuaternionKeyframeTrack } from 'three'; +import { VectorKeyframeTrack } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/materials/LDrawConditionalLineMaterial.d.ts b/jsdoc-testing/jsdoc/examples/jsm/materials/LDrawConditionalLineMaterial.d.ts new file mode 100644 index 000000000..d0c825fab --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/materials/LDrawConditionalLineMaterial.d.ts @@ -0,0 +1,21 @@ +/** + * A special line material for meshes loaded via {@link LDrawLoader}. + * + * This module can only be used with {@link WebGLRenderer}. When using {@link WebGPURenderer}, + * import the class from `LDrawConditionalLineNodeMaterial.js`. + * + * @augments ShaderMaterial + * @three_import import { LDrawConditionalLineMaterial } from 'three/addons/materials/LDrawConditionalLineMaterial.js'; + */ +export class LDrawConditionalLineMaterial extends ShaderMaterial { + static get type(): string; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLDrawConditionalLineMaterial: boolean; +} +import { ShaderMaterial } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/materials/LDrawConditionalLineNodeMaterial.d.ts b/jsdoc-testing/jsdoc/examples/jsm/materials/LDrawConditionalLineNodeMaterial.d.ts new file mode 100644 index 000000000..2115b2f70 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/materials/LDrawConditionalLineNodeMaterial.d.ts @@ -0,0 +1,34 @@ +/** + * A special line material for meshes loaded via {@link LDrawLoader}. + * + * This module can only be used with {@link WebGPURenderer}. When using {@link WebGLRenderer}, + * import the class from `LDrawConditionalLineMaterial.js`. + * + * @augments NodeMaterial + * @three_import import { LDrawConditionalLineMaterial } from 'three/addons/materials/LDrawConditionalLineMaterial.js'; + */ +export class LDrawConditionalLineMaterial extends NodeMaterial { + /** + * Constructs a new conditional line material. + * + * @param {Object} [parameters] - An object with one or more properties + * defining the material's appearance. Any property of the material + * (including any property from inherited materials) can be passed + * in here. Color values can be passed any type of value accepted + * by {@link Color#set}. + */ + constructor(parameters?: Object); + vertexNode: void; + fragmentNode: void; + _diffuseUniform: import("three/webgpu").UniformNode; + _opacityUniform: import("three/webgpu").UniformNode; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLDrawConditionalLineMaterial: boolean; +} +import { NodeMaterial } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/materials/WoodNodeMaterial.d.ts b/jsdoc-testing/jsdoc/examples/jsm/materials/WoodNodeMaterial.d.ts new file mode 100644 index 000000000..5f75eb57f --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/materials/WoodNodeMaterial.d.ts @@ -0,0 +1,39 @@ +export function GetWoodPreset(genus: any, finish: any): any; +export const WoodGenuses: string[]; +export const Finishes: string[]; +/** + * Procedural wood material using TSL (Three.js Shading Language). + * + * Usage examples: + * + * // Using presets (recommended for common wood types) + * const material = WoodNodeMaterial.fromPreset('walnut', 'gloss'); + * + * // Using custom parameters (for advanced customization) + * const material = new WoodNodeMaterial({ + * centerSize: 1.2, + * ringThickness: 1/40, + * darkGrainColor: new THREE.Color('#2a1a0a'), + * lightGrainColor: new THREE.Color('#8b4513'), + * clearcoat: 1, + * clearcoatRoughness: 0.3 + * }); + * + * // Mixing presets with custom overrides + * const walnutParams = GetWoodPreset('walnut', 'raw'); + * const material = new WoodNodeMaterial({ + * ...walnutParams, + * ringThickness: 1/50, // Override specific parameter + * clearcoat: 1 // Add finish + * }); + */ +export class WoodNodeMaterial extends THREE.MeshPhysicalMaterial { + static get type(): string; + static fromPreset(genus?: string, finish?: string): WoodNodeMaterial; + constructor(params?: {}); + isWoodNodeMaterial: boolean; + colorNode: any; + clearcoatNode: any; + clearcoatRoughness: any; +} +import * as THREE from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/math/Capsule.d.ts b/jsdoc-testing/jsdoc/examples/jsm/math/Capsule.d.ts new file mode 100644 index 000000000..8eac33066 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/math/Capsule.d.ts @@ -0,0 +1,82 @@ +/** + * A capsule is essentially a cylinder with hemispherical caps at both ends. + * It can be thought of as a swept sphere, where a sphere is moved along a line segment. + * + * Capsules are often used as bounding volumes (next to AABBs and bounding spheres). + * + * @three_import import { Capsule } from 'three/addons/math/Capsule.js'; + */ +export class Capsule { + /** + * Constructs a new capsule. + * + * @param {Vector3} [start] - The start vector. + * @param {Vector3} [end] - The end vector. + * @param {number} [radius=1] - The capsule's radius. + */ + constructor(start?: Vector3, end?: Vector3, radius?: number); + /** + * The start vector. + * + * @type {Vector3} + */ + start: Vector3; + /** + * The end vector. + * + * @type {Vector3} + */ + end: Vector3; + /** + * The capsule's radius. + * + * @type {number} + * @default 1 + */ + radius: number; + /** + * Returns a new capsule with copied values from this instance. + * + * @return {Capsule} A clone of this instance. + */ + clone(): Capsule; + /** + * Sets the capsule components to the given values. + * Please note that this method only copies the values from the given objects. + * + * @param {Vector3} start - The start vector. + * @param {Vector3} end - The end vector + * @param {number} radius - The capsule's radius. + * @return {Capsule} A reference to this capsule. + */ + set(start: Vector3, end: Vector3, radius: number): Capsule; + /** + * Copies the values of the given capsule to this instance. + * + * @param {Capsule} capsule - The capsule to copy. + * @return {Capsule} A reference to this capsule. + */ + copy(capsule: Capsule): Capsule; + /** + * Returns the center point of this capsule. + * + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The center point. + */ + getCenter(target: Vector3): Vector3; + /** + * Adds the given offset to this capsule, effectively moving it in 3D space. + * + * @param {Vector3} v - The offset that should be used to translate the capsule. + * @return {Capsule} A reference to this capsule. + */ + translate(v: Vector3): Capsule; + /** + * Returns `true` if the given bounding box intersects with this capsule. + * + * @param {Box3} box - The bounding box to test. + * @return {boolean} Whether the given bounding box intersects with this capsule. + */ + intersectsBox(box: Box3): boolean; +} +import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/math/ColorConverter.d.ts b/jsdoc-testing/jsdoc/examples/jsm/math/ColorConverter.d.ts new file mode 100644 index 000000000..a730f9728 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/math/ColorConverter.d.ts @@ -0,0 +1,34 @@ +/** + * A utility class with helper functions for color conversion. + * + * @hideconstructor + * @three_import import { ColorConverter } from 'three/addons/math/ColorConverter.js'; + */ +export class ColorConverter { + /** + * Sets the given HSV color definition to the given color object. + * + * @param {Color} color - The color to set. + * @param {number} h - The hue. + * @param {number} s - The saturation. + * @param {number} v - The value. + * @return {Color} The update color. + */ + static setHSV(color: Color, h: number, s: number, v: number): Color; + /** + * Returns a HSV color representation of the given color object. + * + * @param {Color} color - The color to get HSV values from. + * @param {{h:number,s:number,v:number}} target - The target object that is used to store the method's result. + * @return {{h:number,s:number,v:number}} The HSV color. + */ + static getHSV(color: Color, target: { + h: number; + s: number; + v: number; + }): { + h: number; + s: number; + v: number; + }; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/math/ColorSpaces.d.ts b/jsdoc-testing/jsdoc/examples/jsm/math/ColorSpaces.d.ts new file mode 100644 index 000000000..e7c282d5b --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/math/ColorSpaces.d.ts @@ -0,0 +1,94 @@ +/** + * Display-P3 color space. + * + * @type {string} + * @constant + */ +export const DisplayP3ColorSpace: string; +/** + * Display-P3-Linear color space. + * + * @type {string} + * @constant + */ +export const LinearDisplayP3ColorSpace: string; +/** + * Implementation object for the Display-P3 color space. + * + * @type {module:ColorSpaces~ColorSpaceImpl} + * @constant + */ +export const DisplayP3ColorSpaceImpl: any; +/** + * Implementation object for the Display-P3-Linear color space. + * + * @type {module:ColorSpaces~ColorSpaceImpl} + * @constant + */ +export const LinearDisplayP3ColorSpaceImpl: any; +/** + * Rec2020-Linear color space. + * + * @type {string} + * @constant + */ +export const LinearRec2020ColorSpace: string; +/** + * Implementation object for the Rec2020-Linear color space. + * + * @type {module:ColorSpaces~ColorSpaceImpl} + * @constant + */ +export const LinearRec2020ColorSpaceImpl: any; +/** + * Extended-sRGB color space. + * + * @type {string} + * @constant + */ +export const ExtendedSRGBColorSpace: string; +/** + * Implementation object for the Extended-sRGB color space. + * + * @type {module:ColorSpaces~ColorSpaceImpl} + * @constant + */ +export const ExtendedSRGBColorSpaceImpl: any; +/** + * :ColorSpaces~ColorSpaceImpl + */ +export type module = { + /** + * - The primaries. + */ + primaries: Array; + /** + * - The white point. + */ + whitePoint: Array; + /** + * - A color space conversion matrix, converting to CIE XYZ. + */ + toXYZ: Matrix3; + /** + * - A color space conversion matrix, converting from CIE XYZ. + */ + fromXYZ: Matrix3; + /** + * - The luminance coefficients. + */ + luminanceCoefficients: Array; + /** + * - The working color space config. + */ + workingColorSpaceConfig?: { + unpackColorSpace: string; + } | undefined; + /** + * - The drawing buffer color space config. + */ + outputColorSpaceConfig?: { + drawingBufferColorSpace: string; + } | undefined; +}; +import { Matrix3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/math/ConvexHull.d.ts b/jsdoc-testing/jsdoc/examples/jsm/math/ConvexHull.d.ts new file mode 100644 index 000000000..ca53b31bc --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/math/ConvexHull.d.ts @@ -0,0 +1,533 @@ +/** + * Can be used to compute the convex hull in 3D space for a given set of points. It + * is primarily intended for {@link ConvexGeometry}. + * + * This Quickhull 3D implementation is a port of [quickhull3d](https://github.com/maurizzzio/quickhull3d/) + * by Mauricio Poppe. + * + * @three_import import { ConvexHull } from 'three/addons/math/ConvexHull.js'; + */ +export class ConvexHull { + tolerance: number; + faces: any[]; + newFaces: any[]; + assigned: VertexList; + unassigned: VertexList; + vertices: any[]; + /** + * Computes to convex hull for the given array of points. + * + * @param {Array} points - The array of points in 3D space. + * @return {ConvexHull} A reference to this convex hull. + */ + setFromPoints(points: Array): ConvexHull; + /** + * Computes the convex hull of the given 3D object (including its descendants), + * accounting for the world transforms of both the 3D object and its descendants. + * + * @param {Object3D} object - The 3D object to compute the convex hull for. + * @return {ConvexHull} A reference to this convex hull. + */ + setFromObject(object: Object3D): ConvexHull; + /** + * Returns `true` if the given point lies in the convex hull. + * + * @param {Vector3} point - The point to test. + * @return {boolean} Whether the given point lies in the convex hull or not. + */ + containsPoint(point: Vector3): boolean; + /** + * Computes the intersections point of the given ray and this convex hull. + * + * @param {Ray} ray - The ray to test. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {?Vector3} The intersection point. Returns `null` if not intersection was detected. + */ + intersectRay(ray: Ray, target: Vector3): Vector3 | null; + /** + * Returns `true` if the given ray intersects with this convex hull. + * + * @param {Ray} ray - The ray to test. + * @return {boolean} Whether the given ray intersects with this convex hull or not. + */ + intersectsRay(ray: Ray): boolean; + /** + * Makes the convex hull empty. + * + * @return {ConvexHull} A reference to this convex hull. + */ + makeEmpty(): ConvexHull; + /** + * Adds a vertex to the 'assigned' list of vertices and assigns it to the given face. + * + * @private + * @param {VertexNode} vertex - The vertex to add. + * @param {Face} face - The target face. + * @return {ConvexHull} A reference to this convex hull. + */ + private _addVertexToFace; + /** + * Removes a vertex from the 'assigned' list of vertices and from the given face. + * It also makes sure that the link from 'face' to the first vertex it sees in 'assigned' + * is linked correctly after the removal. + * + * @private + * @param {VertexNode} vertex - The vertex to remove. + * @param {Face} face - The target face. + * @return {ConvexHull} A reference to this convex hull. + */ + private _removeVertexFromFace; + /** + * Removes all the visible vertices that a given face is able to see which are stored in + * the 'assigned' vertex list. + * + * @private + * @param {Face} face - The target face. + * @return {VertexNode|undefined} A reference to this convex hull. + */ + private _removeAllVerticesFromFace; + /** + * Removes all the visible vertices that `face` is able to see. + * + * - If `absorbingFace` doesn't exist, then all the removed vertices will be added to the 'unassigned' vertex list. + * - If `absorbingFace` exists, then this method will assign all the vertices of 'face' that can see 'absorbingFace'. + * - If a vertex cannot see `absorbingFace`, it's added to the 'unassigned' vertex list. + * + * @private + * @param {Face} face - The given face. + * @param {Face} [absorbingFace] - An optional face that tries to absorb the vertices of the first face. + * @return {ConvexHull} A reference to this convex hull. + */ + private _deleteFaceVertices; + /** + * Reassigns as many vertices as possible from the unassigned list to the new faces. + * + * @private + * @param {Array} newFaces - The new faces. + * @return {ConvexHull} A reference to this convex hull. + */ + private _resolveUnassignedPoints; + /** + * Computes the extremes values (min/max vectors) which will be used to + * compute the initial hull. + * + * @private + * @return {Object} The extremes. + */ + private _computeExtremes; + /** + * Computes the initial simplex assigning to its faces all the points that are + * candidates to form part of the hull. + * + * @private + * @return {ConvexHull} A reference to this convex hull. + */ + private _computeInitialHull; + /** + * Removes inactive (e.g. deleted) faces from the internal face list. + * + * @private + * @return {ConvexHull} A reference to this convex hull. + */ + private _reindexFaces; + /** + * Finds the next vertex to create faces with the current hull. + * + * - Let the initial face be the first face existing in the 'assigned' vertex list. + * - If a face doesn't exist then return since there're no vertices left. + * - Otherwise for each vertex that face sees find the one furthest away from it. + * + * @private + * @return {?VertexNode} The next vertex to add. + */ + private _nextVertexToAdd; + /** + * Computes a chain of half edges in CCW order called the 'horizon'. For an edge + * to be part of the horizon it must join a face that can see 'eyePoint' and a face + * that cannot see 'eyePoint'. + * + * @private + * @param {Vector3} eyePoint - The 3D-coordinates of a point. + * @param {HalfEdge} crossEdge - The edge used to jump to the current face. + * @param {Face} face - The current face being tested. + * @param {Array} horizon - The edges that form part of the horizon in CCW order. + * @return {ConvexHull} A reference to this convex hull. + */ + private _computeHorizon; + /** + * Creates a face with the vertices 'eyeVertex.point', 'horizonEdge.tail' and 'horizonEdge.head' + * in CCW order. All the half edges are created in CCW order thus the face is always pointing + * outside the hull. + * + * @private + * @param {VertexNode} eyeVertex - The vertex that is added to the hull. + * @param {HalfEdge} horizonEdge - A single edge of the horizon. + * @return {HalfEdge} The half edge whose vertex is the eyeVertex. + */ + private _addAdjoiningFace; + /** + * Adds 'horizon.length' faces to the hull, each face will be linked with the horizon + * opposite face and the face on the left/right. + * + * @private + * @param {VertexNode} eyeVertex - The vertex that is added to the hull. + * @param {Array} horizon - The horizon. + * @return {ConvexHull} A reference to this convex hull. + */ + private _addNewFaces; + /** + * Adds a vertex to the hull with the following algorithm: + * + * - Compute the 'horizon' which is a chain of half edges. For an edge to belong to this group + * it must be the edge connecting a face that can see 'eyeVertex' and a face which cannot see 'eyeVertex'. + * - All the faces that can see 'eyeVertex' have its visible vertices removed from the assigned vertex list. + * - A new set of faces is created with each edge of the 'horizon' and 'eyeVertex'. Each face is connected + * with the opposite horizon face and the face on the left/right. + * - The vertices removed from all the visible faces are assigned to the new faces if possible. + * + * @private + * @param {VertexNode} eyeVertex - The vertex to add. + * @return {ConvexHull} A reference to this convex hull. + */ + private _addVertexToHull; + /** + * Cleans up internal properties after computing the convex hull. + * + * @private + * @return {ConvexHull} A reference to this convex hull. + */ + private _cleanup; + /** + * Starts the execution of the quick hull algorithm. + * + * @private + * @return {ConvexHull} A reference to this convex hull. + */ + private _compute; +} +/** + * Represents a section bounded by a specific amount of half-edges. + * The current implementation assumes that a face always consist of three edges. + * + * @private + */ +export class Face { + /** + * Creates a face from the given vertex nodes. + * + * @private + * @param {VertexNode} a - The first vertex node. + * @param {VertexNode} b - The second vertex node. + * @param {VertexNode} c - The third vertex node. + * @return {Face} The created face. + */ + private static create; + /** + * The normal vector of the face. + * + * @private + * @type {Vector3} + */ + private normal; + /** + * The midpoint or centroid of the face. + * + * @private + * @type {Vector3} + */ + private midpoint; + /** + * The area of the face. + * + * @private + * @type {number} + * @default 0 + */ + private area; + /** + * Signed distance from face to the origin. + * + * @private + * @type {number} + * @default 0 + */ + private constant; + /** + * Reference to a vertex in a vertex list this face can see. + * + * @private + * @type {?VertexNode} + * @default null + */ + private outside; + mark: number; + /** + * Reference to the base edge of a face. To retrieve all edges, you can use the + * `next` reference of the current edge. + * + * @private + * @type {?HalfEdge} + * @default null + */ + private edge; + /** + * Returns an edge by the given index. + * + * @private + * @param {number} i - The edge index. + * @return {HalfEdge} The edge. + */ + private getEdge; + /** + * Computes all properties of the face. + * + * @private + * @return {Face} A reference to this face. + */ + private compute; + /** + * Returns the signed distance from a given point to the plane representation of this face. + * + * @private + * @param {Vector3} point - The point to compute the distance to. + * @return {number} The distance. + */ + private distanceToPoint; +} +/** + * The basis for a half-edge data structure, also known as doubly + * connected edge list (DCEL). + * + * @private + */ +export class HalfEdge { + /** + * Constructs a new half edge. + * + * @param {VertexNode} vertex - A reference to its destination vertex. + * @param {Face} face - A reference to its face. + */ + constructor(vertex: VertexNode, face: Face); + /** + * A reference to its destination vertex. + * + * @private + * @type {VertexNode} + */ + private vertex; + /** + * Reference to the previous half-edge of the same face. + * + * @private + * @type {?HalfEdge} + * @default null + */ + private prev; + /** + * Reference to the next half-edge of the same face. + * + * @private + * @type {?HalfEdge} + * @default null + */ + private next; + /** + * Reference to the twin half-edge to reach the opposite face. + * + * @private + * @type {?HalfEdge} + * @default null + */ + private twin; + /** + * A reference to its face. + * + * @private + * @type {Face} + */ + private face; + /** + * Returns the destination vertex. + * + * @private + * @return {VertexNode} The destination vertex. + */ + private head; + /** + * Returns the origin vertex. + * + * @private + * @return {?VertexNode} The destination vertex. + */ + private tail; + /** + * Returns the Euclidean length (straight-line length) of the edge. + * + * @private + * @return {number} The edge's length. + */ + private length; + /** + * Returns the square of the Euclidean length (straight-line length) of the edge. + * + * @private + * @return {number} The square of the edge's length. + */ + private lengthSquared; + /** + * Sets the twin edge of this half-edge. It also ensures that the twin reference + * of the given half-edge is correctly set. + * + * @private + * @param {HalfEdge} edge - The twin edge to set. + * @return {HalfEdge} A reference to this edge. + */ + private setTwin; +} +/** + * A vertex as a double linked list node. + * + * @private + */ +export class VertexNode { + /** + * Constructs a new vertex node. + * + * @param {Vector3} point - A point in 3D space. + */ + constructor(point: Vector3); + /** + * A point in 3D space. + * + * @private + * @type {Vector3} + */ + private point; + /** + * Reference to the previous vertex in the double linked list. + * + * @private + * @type {?VertexNode} + * @default null + */ + private prev; + /** + * Reference to the next vertex in the double linked list. + * + * @private + * @type {?VertexNode} + * @default null + */ + private next; + /** + * Reference to the face that is able to see this vertex. + * + * @private + * @type {?Face} + * @default null + */ + private face; +} +/** + * A doubly linked list of vertices. + * + * @private + */ +export class VertexList { + /** + * Reference to the first vertex of the linked list. + * + * @private + * @type {?VertexNode} + * @default null + */ + private head; + /** + * Reference to the last vertex of the linked list. + * + * @private + * @type {?VertexNode} + * @default null + */ + private tail; + /** + * Returns the head reference. + * + * @private + * @return {VertexNode} The head reference. + */ + private first; + /** + * Returns the tail reference. + * + * @private + * @return {VertexNode} The tail reference. + */ + private last; + /** + * Clears the linked list. + * + * @private + * @return {VertexList} A reference to this vertex list. + */ + private clear; + /** + * Inserts a vertex before a target vertex. + * + * @private + * @param {VertexNode} target - The target. + * @param {VertexNode} vertex - The vertex to insert. + * @return {VertexList} A reference to this vertex list. + */ + private insertBefore; + /** + * Inserts a vertex after a target vertex. + * + * @private + * @param {VertexNode} target - The target. + * @param {VertexNode} vertex - The vertex to insert. + * @return {VertexList} A reference to this vertex list. + */ + private insertAfter; + /** + * Appends a vertex to this vertex list. + * + * @private + * @param {VertexNode} vertex - The vertex to append. + * @return {VertexList} A reference to this vertex list. + */ + private append; + /** + * Appends a chain of vertices where the given vertex is the head. + * + * @private + * @param {VertexNode} vertex - The head vertex of a chain of vertices. + * @return {VertexList} A reference to this vertex list. + */ + private appendChain; + /** + * Removes a vertex from the linked list. + * + * @private + * @param {VertexNode} vertex - The vertex to remove. + * @return {VertexList} A reference to this vertex list. + */ + private remove; + /** + * Removes a sublist of vertices from the linked list. + * + * @private + * @param {VertexNode} a - The head of the sublist. + * @param {VertexNode} b - The tail of the sublist. + * @return {VertexList} A reference to this vertex list. + */ + private removeSubList; + /** + * Returns `true` if the linked list is empty. + * + * @private + * @return {boolean} Whether the linked list is empty or not. + */ + private isEmpty; +} +import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/math/ImprovedNoise.d.ts b/jsdoc-testing/jsdoc/examples/jsm/math/ImprovedNoise.d.ts new file mode 100644 index 000000000..85ce6eb37 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/math/ImprovedNoise.d.ts @@ -0,0 +1,19 @@ +/** + * A utility class providing a 3D noise function. + * + * The code is based on [IMPROVED NOISE](https://cs.nyu.edu/~perlin/noise/) + * by Ken Perlin, 2002. + * + * @three_import import { ImprovedNoise } from 'three/addons/math/ImprovedNoise.js'; + */ +export class ImprovedNoise { + /** + * Returns a noise value for the given parameters. + * + * @param {number} x - The x coordinate. + * @param {number} y - The y coordinate. + * @param {number} z - The z coordinate. + * @return {number} The noise value. + */ + noise(x: number, y: number, z: number): number; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/math/Lut.d.ts b/jsdoc-testing/jsdoc/examples/jsm/math/Lut.d.ts new file mode 100644 index 000000000..2650ec61f --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/math/Lut.d.ts @@ -0,0 +1,133 @@ +/** + * Represents a lookup table for colormaps. It is used to determine the color + * values from a range of data values. + * + * ```js + * const lut = new Lut( 'rainbow', 512 ); + * const color = lut.getColor( 0.5 ); + * ``` + * + * @three_import import { Lut } from 'three/addons/math/Lut.js'; + */ +export class Lut { + /** + * Constructs a new Lut. + * + * @param {('rainbow'|'cooltowarm'|'blackbody'|'grayscale')} [colormap='rainbow'] - Sets a colormap from predefined list of colormaps. + * @param {number} [count=32] - Sets the number of colors used to represent the data array. + */ + constructor(colormap?: ("rainbow" | "cooltowarm" | "blackbody" | "grayscale"), count?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLut: boolean; + /** + * The lookup table for the selected color map + * + * @type {Array} + */ + lut: Array; + /** + * The currently selected color map. + * + * @type {Array>} + */ + map: Array>; + /** + * The number of colors of the current selected color map. + * + * @type {number} + * @default 32 + */ + n: number; + /** + * The minimum value to be represented with the lookup table. + * + * @type {number} + * @default 0 + */ + minV: number; + /** + * The maximum value to be represented with the lookup table. + * + * @type {number} + * @default 1 + */ + maxV: number; + /** + * Sets the given LUT. + * + * @param {Lut} value - The LUT to set. + * @return {Lut} A reference to this LUT. + */ + set(value: Lut): Lut; + /** + * Sets the minimum value to be represented with this LUT. + * + * @param {number} min - The minimum value to be represented with the lookup table. + * @return {Lut} A reference to this LUT. + */ + setMin(min: number): Lut; + /** + * Sets the maximum value to be represented with this LUT. + * + * @param {number} max - The maximum value to be represented with the lookup table. + * @return {Lut} A reference to this LUT. + */ + setMax(max: number): Lut; + /** + * Configure the lookup table for the given color map and number of colors. + * + * @param {string} colormap - The name of the color map. + * @param {number} [count=32] - The number of colors. + * @return {Lut} A reference to this LUT. + */ + setColorMap(colormap: string, count?: number): Lut; + /** + * Copies the given lut. + * + * @param {Lut} lut - The LUT to copy. + * @return {Lut} A reference to this LUT. + */ + copy(lut: Lut): Lut; + /** + * Returns an instance of Color for the given data value. + * + * @param {number} alpha - The value to lookup. + * @return {Color} The color from the LUT. + */ + getColor(alpha: number): Color; + /** + * Adds a color map to this Lut instance. + * + * @param {string} name - The name of the color map. + * @param {Array>} arrayOfColors - An array of color values. Each value is an array + * holding a threshold and the actual color value as a hexadecimal number. + * @return {Lut} A reference to this LUT. + */ + addColorMap(name: string, arrayOfColors: Array>): Lut; + /** + * Creates a canvas in order to visualize the lookup table as a texture. + * + * @return {HTMLCanvasElement} The created canvas. + */ + createCanvas(): HTMLCanvasElement; + /** + * Updates the given canvas with the Lut's data. + * + * @param {HTMLCanvasElement} canvas - The canvas to update. + * @return {HTMLCanvasElement} The updated canvas. + */ + updateCanvas(canvas: HTMLCanvasElement): HTMLCanvasElement; +} +export namespace ColorMapKeywords { + let rainbow: number[][]; + let cooltowarm: number[][]; + let blackbody: number[][]; + let grayscale: number[][]; +} +import { Color } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/math/MeshSurfaceSampler.d.ts b/jsdoc-testing/jsdoc/examples/jsm/math/MeshSurfaceSampler.d.ts new file mode 100644 index 000000000..c430c18dd --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/math/MeshSurfaceSampler.d.ts @@ -0,0 +1,95 @@ +/** + * Utility class for sampling weighted random points on the surface of a mesh. + * + * Building the sampler is a one-time O(n) operation. Once built, any number of + * random samples may be selected in O(logn) time. Memory usage is O(n). + * + * References: + * - {@link http://www.joesfer.com/?p=84} + * - {@link https://stackoverflow.com/a/4322940/1314762} + * + * ```js + * const sampler = new MeshSurfaceSampler( surfaceMesh ) + * .setWeightAttribute( 'color' ) + * .build(); + * + * const mesh = new THREE.InstancedMesh( sampleGeometry, sampleMaterial, 100 ); + * + * const position = new THREE.Vector3(); + * const matrix = new THREE.Matrix4(); + * + * // Sample randomly from the surface, creating an instance of the sample geometry at each sample point. + * + * for ( let i = 0; i < 100; i ++ ) { + * + * sampler.sample( position ); + * matrix.makeTranslation( position.x, position.y, position.z ); + * mesh.setMatrixAt( i, matrix ); + * + * } + * + * scene.add( mesh ); + * ``` + * + * @three_import import { MeshSurfaceSampler } from 'three/addons/math/MeshSurfaceSampler.js'; + */ +export class MeshSurfaceSampler { + /** + * Constructs a mesh surface sampler. + * + * @param {Mesh} mesh - Surface mesh from which to sample. + */ + constructor(mesh: Mesh); + geometry: any; + randomFunction: () => number; + indexAttribute: any; + positionAttribute: any; + normalAttribute: any; + colorAttribute: any; + uvAttribute: any; + weightAttribute: any; + distribution: Float32Array | null; + /** + * Specifies a vertex attribute to be used as a weight when sampling from the surface. + * Faces with higher weights are more likely to be sampled, and those with weights of + * zero will not be sampled at all. For vector attributes, only .x is used in sampling. + * + * If no weight attribute is selected, sampling is randomly distributed by area. + * + * @param {string} name - The attribute name. + * @return {MeshSurfaceSampler} A reference to this sampler. + */ + setWeightAttribute(name: string): MeshSurfaceSampler; + /** + * Processes the input geometry and prepares to return samples. Any configuration of the + * geometry or sampler must occur before this method is called. Time complexity is O(n) + * for a surface with n faces. + * + * @return {MeshSurfaceSampler} A reference to this sampler. + */ + build(): MeshSurfaceSampler; + /** + * Allows to set a custom random number generator. Default is `Math.random()`. + * + * @param {Function} randomFunction - A random number generator. + * @return {MeshSurfaceSampler} A reference to this sampler. + */ + setRandomGenerator(randomFunction: Function): MeshSurfaceSampler; + /** + * Selects a random point on the surface of the input geometry, returning the + * position and optionally the normal vector, color and UV Coordinate at that point. + * Time complexity is O(log n) for a surface with n faces. + * + * @param {Vector3} targetPosition - The target object holding the sampled position. + * @param {Vector3} targetNormal - The target object holding the sampled normal. + * @param {Color} targetColor - The target object holding the sampled color. + * @param {Vector2} targetUV - The target object holding the sampled uv coordinates. + * @return {MeshSurfaceSampler} A reference to this sampler. + */ + sample(targetPosition: Vector3, targetNormal: Vector3, targetColor: Color, targetUV: Vector2): MeshSurfaceSampler; + _sampleFaceIndex(): number; + _binarySearch(x: any): number; + _sampleFace(faceIndex: any, targetPosition: any, targetNormal: any, targetColor: any, targetUV: any): this; +} +import { Vector3 } from 'three'; +import { Vector2 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/math/OBB.d.ts b/jsdoc-testing/jsdoc/examples/jsm/math/OBB.d.ts new file mode 100644 index 000000000..de304fef8 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/math/OBB.d.ts @@ -0,0 +1,150 @@ +/** + * Represents an oriented bounding box (OBB) in 3D space. + * + * @three_import import { OBB } from 'three/addons/math/OBB.js'; + */ +export class OBB { + /** + * Constructs a new OBB. + * + * @param {Vector3} [center] - The center of the OBB. + * @param {Vector3} [halfSize] - Positive halfwidth extents of the OBB along each axis. + * @param {Matrix3} [rotation] - The rotation of the OBB. + */ + constructor(center?: Vector3, halfSize?: Vector3, rotation?: Matrix3); + /** + * The center of the OBB. + * + * @type {Vector3} + */ + center: Vector3; + /** + * Positive halfwidth extents of the OBB along each axis. + * + * @type {Vector3} + */ + halfSize: Vector3; + /** + * The rotation of the OBB. + * + * @type {Matrix3} + */ + rotation: Matrix3; + /** + * Sets the OBBs components to the given values. + * + * @param {Vector3} [center] - The center of the OBB. + * @param {Vector3} [halfSize] - Positive halfwidth extents of the OBB along each axis. + * @param {Matrix3} [rotation] - The rotation of the OBB. + * @return {OBB} A reference to this OBB. + */ + set(center?: Vector3, halfSize?: Vector3, rotation?: Matrix3): OBB; + /** + * Copies the values of the given OBB to this instance. + * + * @param {OBB} obb - The OBB to copy. + * @return {OBB} A reference to this OBB. + */ + copy(obb: OBB): OBB; + /** + * Returns a new OBB with copied values from this instance. + * + * @return {OBB} A clone of this instance. + */ + clone(): OBB; + /** + * Returns the size of this OBB. + * + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The size. + */ + getSize(target: Vector3): Vector3; + /** + * Clamps the given point within the bounds of this OBB. + * + * @param {Vector3} point - The point that should be clamped within the bounds of this OBB. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @returns {Vector3} - The clamped point. + */ + clampPoint(point: Vector3, target: Vector3): Vector3; + /** + * Returns `true` if the given point lies within this OBB. + * + * @param {Vector3} point - The point to test. + * @returns {boolean} - Whether the given point lies within this OBB or not. + */ + containsPoint(point: Vector3): boolean; + /** + * Returns `true` if the given AABB intersects this OBB. + * + * @param {Box3} box3 - The AABB to test. + * @returns {boolean} - Whether the given AABB intersects this OBB or not. + */ + intersectsBox3(box3: Box3): boolean; + /** + * Returns `true` if the given bounding sphere intersects this OBB. + * + * @param {Sphere} sphere - The bounding sphere to test. + * @returns {boolean} - Whether the given bounding sphere intersects this OBB or not. + */ + intersectsSphere(sphere: Sphere): boolean; + /** + * Returns `true` if the given OBB intersects this OBB. + * + * @param {OBB} obb - The OBB to test. + * @param {number} [epsilon=Number.EPSILON] - A small value to prevent arithmetic errors. + * @returns {boolean} - Whether the given OBB intersects this OBB or not. + */ + intersectsOBB(obb: OBB, epsilon?: number): boolean; + /** + * Returns `true` if the given plane intersects this OBB. + * + * @param {Plane} plane - The plane to test. + * @returns {boolean} Whether the given plane intersects this OBB or not. + */ + intersectsPlane(plane: Plane): boolean; + /** + * Performs a ray/OBB intersection test and stores the intersection point + * in the given 3D vector. + * + * @param {Ray} ray - The ray to test. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {?Vector3} The intersection point. If no intersection is detected, `null` is returned. + */ + intersectRay(ray: Ray, target: Vector3): Vector3 | null; + /** + * Returns `true` if the given ray intersects this OBB. + * + * @param {Ray} ray - The ray to test. + * @returns {boolean} Whether the given ray intersects this OBB or not. + */ + intersectsRay(ray: Ray): boolean; + /** + * Defines an OBB based on the given AABB. + * + * @param {Box3} box3 - The AABB to setup the OBB from. + * @return {OBB} A reference of this OBB. + */ + fromBox3(box3: Box3): OBB; + /** + * Returns `true` if the given OBB is equal to this OBB. + * + * @param {OBB} obb - The OBB to test. + * @returns {boolean} Whether the given OBB is equal to this OBB or not. + */ + equals(obb: OBB): boolean; + /** + * Applies the given transformation matrix to this OBB. This method can be + * used to transform the bounding volume with the world matrix of a 3D object + * in order to keep both entities in sync. + * + * @param {Matrix4} matrix - The matrix to apply. + * @return {OBB} A reference of this OBB. + */ + applyMatrix4(matrix: Matrix4): OBB; +} +import { Vector3 } from 'three'; +import { Matrix3 } from 'three'; +import { Box3 } from 'three'; +import { Ray } from 'three'; +import { Matrix4 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/math/Octree.d.ts b/jsdoc-testing/jsdoc/examples/jsm/math/Octree.d.ts new file mode 100644 index 000000000..234a0bd1d --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/math/Octree.d.ts @@ -0,0 +1,195 @@ +/** + * An octree is a hierarchical tree data structure used to partition a three-dimensional + * space by recursively subdividing it into eight octants. + * + * This particular implementation can have up to sixteen levels and stores up to eight triangles + * in leaf nodes. + * + * `Octree` can be used in games to compute collision between the game world and colliders from + * the player or other dynamic 3D objects. + * + * + * ```js + * const octree = new Octree().fromGraphNode( scene ); + * const result = octree.capsuleIntersect( playerCollider ); // collision detection + * ``` + * + * @three_import import { Octree } from 'three/addons/math/Octree.js'; + */ +export class Octree { + /** + * Constructs a new Octree. + * + * @param {Box3} [box] - The base box with enclose the entire Octree. + */ + constructor(box?: Box3); + /** + * The base box with enclose the entire Octree. + * + * @type {Box3} + */ + box: Box3; + /** + * The bounds of the Octree. Compared to {@link Octree#box}, no + * margin is applied. + * + * @type {Box3} + */ + bounds: Box3; + /** + * Can by used for layers configuration for refine testing. + * + * @type {Layers} + */ + layers: Layers; + /** + * The number of triangles a leaf can store before it is split. + * + * @type {number} + * @default 8 + */ + trianglesPerLeaf: number; + /** + * The maximum level of the Octree. It defines the maximum + * hierarchical depth of the data structure. + * + * @type {number} + * @default 16 + */ + maxLevel: number; + subTrees: any[]; + triangles: any[]; + /** + * Adds the given triangle to the Octree. The triangle vertices are clamped if they exceed + * the bounds of the Octree. + * + * @param {Triangle} triangle - The triangle to add. + * @return {Octree} A reference to this Octree. + */ + addTriangle(triangle: Triangle): Octree; + /** + * Prepares {@link Octree#box} for the build. + * + * @return {Octree} A reference to this Octree. + */ + calcBox(): Octree; + /** + * Splits the Octree. This method is used recursively when + * building the Octree. + * + * @param {number} level - The current level. + * @return {Octree} A reference to this Octree. + */ + split(level: number): Octree; + /** + * Builds the Octree. + * + * @return {Octree} A reference to this Octree. + */ + build(): Octree; + /** + * Computes the triangles that potentially intersect with the given ray. + * + * @param {Ray} ray - The ray to test. + * @param {Array} triangles - The target array that holds the triangles. + */ + getRayTriangles(ray: Ray, triangles: Array): void; + /** + * Computes the intersection between the given capsule and triangle. + * + * @param {Capsule} capsule - The capsule to test. + * @param {Triangle} triangle - The triangle to test. + * @return {Object|false} The intersection object. If no intersection + * is detected, the method returns `false`. + */ + triangleCapsuleIntersect(capsule: Capsule, triangle: Triangle): Object | false; + /** + * Computes the intersection between the given bounding box and triangle. + * + * @param {Box3} box - The bounding box to test. + * @param {Triangle} triangle - The triangle to test. + * @return {Object|false} The intersection object. If no intersection + * is detected, the method returns `false`. + */ + triangleBoxIntersect(box: Box3, triangle: Triangle): Object | false; + /** + * Computes the intersection between the given sphere and triangle. + * + * @param {Sphere} sphere - The sphere to test. + * @param {Triangle} triangle - The triangle to test. + * @return {Object|false} The intersection object. If no intersection + * is detected, the method returns `false`. + */ + triangleSphereIntersect(sphere: Sphere, triangle: Triangle): Object | false; + /** + * Computes the triangles that potentially intersect with the given bounding sphere. + * + * @param {Sphere} sphere - The sphere to test. + * @param {Array} triangles - The target array that holds the triangles. + */ + getSphereTriangles(sphere: Sphere, triangles: Array): void; + /** + * Computes the triangles that potentially intersect with the given bounding box. + * + * @param {Box3} box - The bounding box. + * @param {Array} triangles - The target array that holds the triangles. + */ + getBoxTriangles(box: Box3, triangles: Array): void; + /** + * Computes the triangles that potentially intersect with the given capsule. + * + * @param {Capsule} capsule - The capsule to test. + * @param {Array} triangles - The target array that holds the triangles. + */ + getCapsuleTriangles(capsule: Capsule, triangles: Array): void; + /** + * Performs a bounding box intersection test with this Octree. + * + * @param {Box3} box - The bounding box to test. + * @return {Object|boolean} The intersection object. If no intersection + * is detected, the method returns `false`. + */ + boxIntersect(box: Box3): Object | boolean; + /** + * Performs a bounding sphere intersection test with this Octree. + * + * @param {Sphere} sphere - The bounding sphere to test. + * @return {Object|boolean} The intersection object. If no intersection + * is detected, the method returns `false`. + */ + sphereIntersect(sphere: Sphere): Object | boolean; + /** + * Performs a capsule intersection test with this Octree. + * + * @param {Capsule} capsule - The capsule to test. + * @return {Object|boolean} The intersection object. If no intersection + * is detected, the method returns `false`. + */ + capsuleIntersect(capsule: Capsule): Object | boolean; + /** + * Performs a ray intersection test with this Octree. + * + * @param {Ray} ray - The ray to test. + * @return {Object|boolean} The nearest intersection object. If no intersection + * is detected, the method returns `false`. + */ + rayIntersect(ray: Ray): Object | boolean; + /** + * Constructs the Octree from the given 3D object. + * + * @param {Object3D} group - The scene graph node. + * @return {Octree} A reference to this Octree. + */ + fromGraphNode(group: Object3D): Octree; + /** + * Clears the Octree by making it empty. + * + * @return {Octree} A reference to this Octree. + */ + clear(): Octree; +} +import { Box3 } from 'three'; +import { Layers } from 'three'; +import { Triangle } from 'three'; +import { Capsule } from '../math/Capsule.js'; +import { Sphere } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/math/SimplexNoise.d.ts b/jsdoc-testing/jsdoc/examples/jsm/math/SimplexNoise.d.ts new file mode 100644 index 000000000..b6ba529db --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/math/SimplexNoise.d.ts @@ -0,0 +1,52 @@ +/** + * A utility class providing noise functions. + * + * The code is based on [Simplex noise demystified](https://web.archive.org/web/20210210162332/http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf) + * by Stefan Gustavson, 2005. + * + * @three_import import { SimplexNoise } from 'three/addons/math/SimplexNoise.js'; + */ +export class SimplexNoise { + /** + * Constructs a new simplex noise object. + * + * @param {Object} [r=Math] - A math utility class that holds a `random()` method. This makes it + * possible to pass in custom random number generator. + */ + constructor(r?: Object); + grad3: number[][]; + grad4: number[][]; + p: number[]; + perm: number[]; + simplex: number[][]; + /** + * A 2D simplex noise method. + * + * @param {number} xin - The x coordinate. + * @param {number} yin - The y coordinate. + * @return {number} The noise value. + */ + noise(xin: number, yin: number): number; + /** + * A 3D simplex noise method. + * + * @param {number} xin - The x coordinate. + * @param {number} yin - The y coordinate. + * @param {number} zin - The z coordinate. + * @return {number} The noise value. + */ + noise3d(xin: number, yin: number, zin: number): number; + /** + * A 4D simplex noise method. + * + * @param {number} x - The x coordinate. + * @param {number} y - The y coordinate. + * @param {number} z - The z coordinate. + * @param {number} w - The w coordinate. + * @return {number} The noise value. + */ + noise4d(x: number, y: number, z: number, w: number): number; + _dot(g: any, x: any, y: any): number; + _dot3(g: any, x: any, y: any, z: any): number; + _dot4(g: any, x: any, y: any, z: any, w: any): number; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/ConvexObjectBreaker.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/ConvexObjectBreaker.d.ts new file mode 100644 index 000000000..f1201ad74 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/misc/ConvexObjectBreaker.d.ts @@ -0,0 +1,93 @@ +/** + * This class can be used to subdivide a convex Geometry object into pieces. + * + * Use the function prepareBreakableObject to prepare a Mesh object to be broken. + * Then, call the various functions to subdivide the object (subdivideByImpact, cutByPlane). + * Sub-objects that are product of subdivision don't need prepareBreakableObject to be called on them. + * + * Requisites for the object: + * - Mesh object must have a buffer geometry and a material. + * - Vertex normals must be planar (not smoothed). + * - The geometry must be convex (this is not checked in the library). You can create convex + * geometries with {@link ConvexGeometry}. The {@link BoxGeometry}, {@link SphereGeometry} and other + * convex primitives can also be used. + * + * Note: This lib adds member variables to object's userData member (see prepareBreakableObject function) + * Use with caution and read the code when using with other libs. + * + * @three_import import { ConvexObjectBreaker } from 'three/addons/misc/ConvexObjectBreaker.js'; + */ +export class ConvexObjectBreaker { + static transformFreeVector(v: any, m: any): any; + static transformFreeVectorInverse(v: any, m: any): any; + static transformTiedVectorInverse(v: any, m: any): any; + static transformPlaneToLocalSpace(plane: any, m: any, resultPlane: any): void; + /** + * Constructs a new convex object breaker. + * + * @param {number} [minSizeForBreak=1.4] - Min size a debris can have to break. + * @param {number} [smallDelta=0.0001] - Max distance to consider that a point belongs to a plane. + */ + constructor(minSizeForBreak?: number, smallDelta?: number); + minSizeForBreak: number; + smallDelta: number; + tempLine1: Line3; + tempPlane1: Plane; + tempPlane2: Plane; + tempPlane_Cut: Plane; + tempCM1: Vector3; + tempCM2: Vector3; + tempVector3: Vector3; + tempVector3_2: Vector3; + tempVector3_3: Vector3; + tempVector3_P0: Vector3; + tempVector3_P1: Vector3; + tempVector3_P2: Vector3; + tempVector3_N0: Vector3; + tempVector3_N1: Vector3; + tempVector3_AB: Vector3; + tempVector3_CB: Vector3; + tempResultObjects: { + object1: null; + object2: null; + }; + segments: boolean[]; + /** + * Must be called for all 3D objects that should be breakable. + * + * @param {Object3D} object - The 3D object. It must have a convex geometry. + * @param {number} mass - The 3D object's mass in kg. Must be greater than `0`. + * @param {Vector3} velocity - The 3D object's velocity. + * @param {Vector3} angularVelocity - The 3D object's angular velocity. + * @param {boolean} breakable - Whether the 3D object is breakable or not. + */ + prepareBreakableObject(object: Object3D, mass: number, velocity: Vector3, angularVelocity: Vector3, breakable: boolean): void; + /** + * Subdivides the given 3D object into pieces by an impact (meaning another object hits + * the given 3D object at a certain surface point). + * + * @param {Object3D} object - The 3D object to subdivide. + * @param {Vector3} pointOfImpact - The point of impact. + * @param {Vector3} normal - The impact normal. + * @param {number} maxRadialIterations - Iterations for radial cuts. + * @param {number} maxRandomIterations - Max random iterations for not-radial cuts. + * @return {Array} The array of pieces. + */ + subdivideByImpact(object: Object3D, pointOfImpact: Vector3, normal: Vector3, maxRadialIterations: number, maxRandomIterations: number): Array; + /** + * Subdivides the given 3D object into pieces by a plane. + * + * @param {Object3D} object - The 3D object to subdivide. + * @param {Plane} plane - The plane to cut the 3D object. + * @param {{object1:?Mesh,object2:?Mesh}} output - An object that stores the pieces. + * @return {number} The number of pieces. + */ + cutByPlane(object: Object3D, plane: Plane, output: { + object1: Mesh | null; + object2: Mesh | null; + }): number; +} +import { Line3 } from 'three'; +import { Plane } from 'three'; +import { Vector3 } from 'three'; +import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/Gyroscope.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/Gyroscope.d.ts new file mode 100644 index 000000000..783a39ef5 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/misc/Gyroscope.d.ts @@ -0,0 +1,13 @@ +/** + * A special type of 3D object that takes a position from the scene graph hierarchy + * but uses its local rotation as world rotation. It works like real-world gyroscope - + * you can move it around using hierarchy while its orientation stays fixed with + * respect to the world. + * + * @augments Object3D + * @three_import import { Gyroscope } from 'three/addons/misc/Gyroscope.js'; + */ +export class Gyroscope extends Object3D { + updateMatrixWorld(force: any): void; +} +import { Object3D } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/MD2Character.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/MD2Character.d.ts new file mode 100644 index 000000000..39a32d240 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/misc/MD2Character.d.ts @@ -0,0 +1,133 @@ +/** + * This class represents a management component for animated MD2 + * character assets. + * + * @three_import import { MD2Character } from 'three/addons/misc/MD2Character.js'; + */ +export class MD2Character { + /** + * The mesh scale. + * + * @type {number} + * @default 1 + */ + scale: number; + /** + * The FPS + * + * @type {number} + * @default 6 + */ + animationFPS: number; + /** + * The root 3D object + * + * @type {Object3D} + */ + root: Object3D; + /** + * The body mesh. + * + * @type {?Mesh} + * @default null + */ + meshBody: Mesh | null; + /** + * The weapon mesh. + * + * @type {?Mesh} + * @default null + */ + meshWeapon: Mesh | null; + /** + * The body skins. + * + * @type {Array} + */ + skinsBody: Array; + /** + * The weapon skins. + * + * @type {Array} + */ + skinsWeapon: Array; + /** + * The weapon meshes. + * + * @type {Array} + */ + weapons: Array; + /** + * The name of the active animation clip. + * + * @type {?string} + * @default null + */ + activeAnimationClipName: string | null; + /** + * The animation mixer. + * + * @type {?AnimationMixer} + * @default null + */ + mixer: AnimationMixer | null; + /** + * The `onLoad` callback function. + * + * @type {Function} + */ + onLoadComplete: Function; + loadCounter: number; + /** + * Loads the character model for the given config. + * + * @param {Object} config - The config which defines the model and textures paths. + */ + loadParts(config: Object): void; + /** + * Sets the animation playback rate. + * + * @param {number} rate - The playback rate to set. + */ + setPlaybackRate(rate: number): void; + /** + * Sets the wireframe material flag. + * + * @param {boolean} wireframeEnabled - Whether to enable wireframe rendering or not. + */ + setWireframe(wireframeEnabled: boolean): void; + /** + * Sets the skin defined by the given skin index. This will result in a different texture + * for the body mesh. + * + * @param {number} index - The skin index. + */ + setSkin(index: number): void; + /** + * Sets the weapon defined by the given weapon index. This will result in a different weapon + * hold by the character. + * + * @param {number} index - The weapon index. + */ + setWeapon(index: number): void; + /** + * Sets the defined animation clip as the active animation. + * + * @param {string} clipName - The name of the animation clip. + */ + setAnimation(clipName: string): void; + activeClipName: string | undefined; + /** + * Synchronizes the weapon with the body animation. + */ + syncWeaponAnimation(): void; + /** + * Updates the animations of the mesh. Must be called inside the animation loop. + * + * @param {number} delta - The delta time in seconds. + */ + update(delta: number): void; +} +import { Object3D } from 'three'; +import { Mesh } from 'three'; +import { AnimationMixer } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/MD2CharacterComplex.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/MD2CharacterComplex.d.ts new file mode 100644 index 000000000..9ccc09604 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/misc/MD2CharacterComplex.d.ts @@ -0,0 +1,210 @@ +/** + * This class represents a management component for animated MD2 + * character assets. It provides a larger API compared to {@link MD2Character}. + * + * @three_import import { MD2CharacterComplex } from 'three/addons/misc/MD2CharacterComplex.js'; + */ +export class MD2CharacterComplex { + /** + * The mesh scale. + * + * @type {number} + * @default 1 + */ + scale: number; + /** + * The FPS + * + * @type {number} + * @default 6 + */ + animationFPS: number; + /** + * The transition frames. + * + * @type {number} + * @default 15 + */ + transitionFrames: number; + /** + * The character's maximum speed. + * + * @type {number} + * @default 275 + */ + maxSpeed: number; + /** + * The character's maximum reverse speed. + * + * @type {number} + * @default - 275 + */ + maxReverseSpeed: number; + /** + * The character's front acceleration. + * + * @type {number} + * @default 600 + */ + frontAcceleration: number; + /** + * The character's back acceleration. + * + * @type {number} + * @default 600 + */ + backAcceleration: number; + /** + * The character's front deceleration. + * + * @type {number} + * @default 600 + */ + frontDeceleration: number; + /** + * The character's angular speed. + * + * @type {number} + * @default 2.5 + */ + angularSpeed: number; + /** + * The root 3D object + * + * @type {Object3D} + */ + root: Object3D; + /** + * The body mesh. + * + * @type {?Mesh} + * @default null + */ + meshBody: Mesh | null; + /** + * The weapon mesh. + * + * @type {?Mesh} + * @default null + */ + meshWeapon: Mesh | null; + /** + * The movement controls. + * + * @type {?Object} + * @default null + */ + controls: Object | null; + /** + * The body skins. + * + * @type {Array} + */ + skinsBody: Array; + /** + * The weapon skins. + * + * @type {Array} + */ + skinsWeapon: Array; + /** + * The weapon meshes. + * + * @type {Array} + */ + weapons: Array; + /** + * The current skin. + * + * @type {Texture} + * @default undefined + */ + currentSkin: Texture; + onLoadComplete: () => void; + meshes: any[]; + animations: {}; + loadCounter: number; + speed: number; + bodyOrientation: number; + walkSpeed: number; + crouchSpeed: number; + activeAnimation: any; + oldAnimation: any; + /** + * Toggles shadow casting and receiving on the character's meshes. + * + * @param {boolean} enable - Whether to enable shadows or not. + */ + enableShadows(enable: boolean): void; + /** + * Toggles visibility on the character's meshes. + * + * @param {boolean} enable - Whether the character is visible or not. + */ + setVisible(enable: boolean): void; + /** + * Shares certain resources from a different character model. + * + * @param {MD2CharacterComplex} original - The original MD2 character. + */ + shareParts(original: MD2CharacterComplex): void; + /** + * Loads the character model for the given config. + * + * @param {Object} config - The config which defines the model and textures paths. + */ + loadParts(config: Object): void; + /** + * Sets the animation playback rate. + * + * @param {number} rate - The playback rate to set. + */ + setPlaybackRate(rate: number): void; + /** + * Sets the wireframe material flag. + * + * @param {boolean} wireframeEnabled - Whether to enable wireframe rendering or not. + */ + setWireframe(wireframeEnabled: boolean): void; + /** + * Sets the skin defined by the given skin index. This will result in a different texture + * for the body mesh. + * + * @param {number} index - The skin index. + */ + setSkin(index: number): void; + /** + * Sets the weapon defined by the given weapon index. This will result in a different weapon + * hold by the character. + * + * @param {number} index - The weapon index. + */ + setWeapon(index: number): void; + /** + * Sets the defined animation clip as the active animation. + * + * @param {string} animationName - The name of the animation clip. + */ + setAnimation(animationName: string): void; + blendCounter: number | undefined; + update(delta: any): void; + /** + * Updates the animations of the mesh. Must be called inside the animation loop. + * + * @param {number} delta - The delta time in seconds. + */ + updateAnimations(delta: number): void; + /** + * Updates the animation state based on the control inputs. + */ + updateBehaviors(): void; + /** + * Transforms the character model based on the control input. + * + * @param {number} delta - The delta time in seconds. + */ + updateMovementModel(delta: number): void; + _createPart(geometry: any, skinMap: any): MorphBlendMesh; +} +import { Object3D } from 'three'; +import { MorphBlendMesh } from '../misc/MorphBlendMesh.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/MorphAnimMesh.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/MorphAnimMesh.d.ts new file mode 100644 index 000000000..565013827 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/misc/MorphAnimMesh.d.ts @@ -0,0 +1,55 @@ +/** + * A special type of an animated mesh with a simple interface + * for animation playback. It allows to playback just one animation + * without any transitions or fading between animation changes. + * + * @augments Mesh + * @three_import import { MorphAnimMesh } from 'three/addons/misc/MorphAnimMesh.js'; + */ +export class MorphAnimMesh extends Mesh { + /** + * Constructs a new morph anim mesh. + * + * @param {BufferGeometry} [geometry] - The mesh geometry. + * @param {Material|Array} [material] - The mesh material. + */ + constructor(geometry?: BufferGeometry, material?: Material | Array); + /** + * The internal animation mixer. + * + * @type {AnimationMixer} + */ + mixer: AnimationMixer; + /** + * The current active animation action. + * + * @type {?AnimationAction} + * @default null + */ + activeAction: AnimationAction | null; + /** + * Sets the animation playback direction to "forward". + */ + setDirectionForward(): void; + /** + * Sets the animation playback direction to "backward". + */ + setDirectionBackward(): void; + /** + * Plays the defined animation clip. The implementation assumes the animation + * clips are stored in {@link Object3D#animations} or the geometry. + * + * @param {string} label - The name of the animation clip. + * @param {number} fps - The FPS of the animation clip. + */ + playAnimation(label: string, fps: number): void; + /** + * Updates the animations of the mesh. Must be called inside the animation loop. + * + * @param {number} delta - The delta time in seconds. + */ + updateAnimation(delta: number): void; + copy(source: any, recursive: any): this; +} +import { Mesh } from 'three'; +import { AnimationMixer } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/MorphBlendMesh.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/MorphBlendMesh.d.ts new file mode 100644 index 000000000..153109c6a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/misc/MorphBlendMesh.d.ts @@ -0,0 +1,124 @@ +/** + * A special type of an animated mesh with a more advanced interface + * for animation playback. Unlike {@link MorphAnimMesh}. It allows to + * playback more than one morph animation at the same time but without + * fading options. + * + * @augments Mesh + * @three_import import { MorphBlendMesh } from 'three/addons/misc/MorphBlendMesh.js'; + */ +export class MorphBlendMesh extends Mesh { + /** + * Constructs a new morph blend mesh. + * + * @param {BufferGeometry} [geometry] - The mesh geometry. + * @param {Material|Array} [material] - The mesh material. + */ + constructor(geometry?: BufferGeometry, material?: Material | Array); + /** + * A dictionary of animations. + * + * @type {Object} + */ + animationsMap: { + [x: string]: Object; + }; + /** + * A list of animations. + * + * @type {Array} + */ + animationsList: Array; + /** + * Creates a new animation. + * + * @param {string} name - The animation name. + * @param {number} start - The start time. + * @param {number} end - The end time. + * @param {number} fps - The FPS. + */ + createAnimation(name: string, start: number, end: number, fps: number): void; + /** + * Automatically creates animations based on the values in + * {@link Mesh#morphTargetDictionary}. + * + * @param {number} fps - The FPS of all animations. + */ + autoCreateAnimations(fps: number): void; + firstAnimation: string | undefined; + /** + * Sets the animation playback direction to "forward" for the + * defined animation. + * + * @param {string} name - The animation name. + */ + setAnimationDirectionForward(name: string): void; + /** + * Sets the animation playback direction to "backward" for the + * defined animation. + * + * @param {string} name - The animation name. + */ + setAnimationDirectionBackward(name: string): void; + /** + * Sets the FPS to the given value for the defined animation. + * + * @param {string} name - The animation name. + * @param {number} fps - The FPS to set. + */ + setAnimationFPS(name: string, fps: number): void; + /** + * Sets the duration to the given value for the defined animation. + * + * @param {string} name - The animation name. + * @param {number} duration - The duration to set. + */ + setAnimationDuration(name: string, duration: number): void; + /** + * Sets the weight to the given value for the defined animation. + * + * @param {string} name - The animation name. + * @param {number} weight - The weight to set. + */ + setAnimationWeight(name: string, weight: number): void; + /** + * Sets the time to the given value for the defined animation. + * + * @param {string} name - The animation name. + * @param {number} time - The time to set. + */ + setAnimationTime(name: string, time: number): void; + /** + * Returns the time for the defined animation. + * + * @param {string} name - The animation name. + * @return {number} The time. + */ + getAnimationTime(name: string): number; + /** + * Returns the duration for the defined animation. + * + * @param {string} name - The animation name. + * @return {number} The duration. + */ + getAnimationDuration(name: string): number; + /** + * Plays the defined animation. + * + * @param {string} name - The animation name. + */ + playAnimation(name: string): void; + /** + * Stops the defined animation. + * + * @param {string} name - The animation name. + */ + stopAnimation(name: string): void; + /** + * Updates the animations of the mesh. + * + * @param {number} delta - The delta time in seconds. + */ + update(delta: number): void; +} +import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/ProgressiveLightMap.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/ProgressiveLightMap.d.ts new file mode 100644 index 000000000..ce7c04e65 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/misc/ProgressiveLightMap.d.ts @@ -0,0 +1,87 @@ +/** + * Progressive Light Map Accumulator, by [zalo](https://github.com/zalo/). + * + * To use, simply construct a `ProgressiveLightMap` object, + * `plmap.addObjectsToLightMap(object)` an array of semi-static + * objects and lights to the class once, and then call + * `plmap.update(camera)` every frame to begin accumulating + * lighting samples. + * + * This should begin accumulating lightmaps which apply to + * your objects, so you can start jittering lighting to achieve + * the texture-space effect you're looking for. + * + * This class can only be used with {@link WebGLRenderer}. + * When using {@link WebGPURenderer}, import from `ProgressiveLightMapGPU.js`. + * + * @three_import import { ProgressiveLightMap } from 'three/addons/misc/ProgressiveLightMap.js'; + */ +export class ProgressiveLightMap { + /** + * Constructs a new progressive light map. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {number} [res=1024] - The side-long dimension of the total lightmap. + */ + constructor(renderer: WebGLRenderer, res?: number); + /** + * The renderer. + * + * @type {WebGLRenderer} + */ + renderer: WebGLRenderer; + /** + * The side-long dimension of the total lightmap. + * + * @type {number} + * @default 1024 + */ + res: number; + lightMapContainers: any[]; + scene: Scene; + buffer1Active: boolean; + firstUpdate: boolean; + labelMesh: Mesh | null; + blurringPlane: Mesh | null; + progressiveLightMap1: WebGLRenderTarget; + progressiveLightMap2: WebGLRenderTarget; + uvMat: MeshPhongMaterial; + /** + * Sets these objects' materials' lightmaps and modifies their uv1's. + * + * @param {Array} objects - An array of objects and lights to set up your lightmap. + */ + addObjectsToLightMap(objects: Array): void; + uv_boxes: any[] | undefined; + /** + * This function renders each mesh one at a time into their respective surface maps. + * + * @param {Camera} camera - The camera the scene is rendered with. + * @param {number} [blendWindow=100] - When >1, samples will accumulate over time. + * @param {boolean} [blurEdges=true] - Whether to fix UV Edges via blurring. + */ + update(camera: Camera, blendWindow?: number, blurEdges?: boolean): void; + /** + * Draws the lightmap in the main scene. Call this after adding the objects to it. + * + * @param {boolean} visible - Whether the debug plane should be visible + * @param {Vector3} [position] - Where the debug plane should be drawn + */ + showDebugLightmap(visible: boolean, position?: Vector3): void; + /** + * Creates the Blurring Plane. + * + * @private + * @param {number} res - The square resolution of this object's lightMap. + * @param {WebGLRenderTarget} lightMap - The lightmap to initialize the plane with. + */ + private _initializeBlurPlane; + /** + * Frees all internal resources. + */ + dispose(): void; +} +import { Scene } from 'three'; +import { Mesh } from 'three'; +import { WebGLRenderTarget } from 'three'; +import { MeshPhongMaterial } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/ProgressiveLightMapGPU.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/ProgressiveLightMapGPU.d.ts new file mode 100644 index 000000000..f6dcf6335 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/misc/ProgressiveLightMapGPU.d.ts @@ -0,0 +1,83 @@ +/** + * Progressive Light Map Accumulator, by [zalo](https://github.com/zalo/). + * + * To use, simply construct a `ProgressiveLightMap` object, + * `plmap.addObjectsToLightMap(object)` an array of semi-static + * objects and lights to the class once, and then call + * `plmap.update(camera)` every frame to begin accumulating + * lighting samples. + * + * This should begin accumulating lightmaps which apply to + * your objects, so you can start jittering lighting to achieve + * the texture-space effect you're looking for. + * + * This class can only be used with {@link WebGPURenderer}. + * When using {@link WebGLRenderer}, import from `ProgressiveLightMap.js`. + * + * @three_import import { ProgressiveLightMap } from 'three/addons/misc/ProgressiveLightMapGPU.js'; + */ +export class ProgressiveLightMap { + /** + * @param {WebGPURenderer} renderer - The renderer. + * @param {number} [resolution=1024] - The side-long dimension of the total lightmap. + */ + constructor(renderer: WebGPURenderer, resolution?: number); + /** + * The renderer. + * + * @type {WebGPURenderer} + */ + renderer: WebGPURenderer; + /** + * The side-long dimension of the total lightmap. + * + * @type {number} + * @default 1024 + */ + resolution: number; + _lightMapContainers: any[]; + _scene: Scene; + _buffer1Active: boolean; + _labelMesh: Mesh | null; + _blurringPlane: Mesh | null; + _progressiveLightMap1: RenderTarget; + _progressiveLightMap2: RenderTarget; + _averagingWindow: import("three/webgpu").UniformNode; + _previousShadowMap: import("three/webgpu").TextureNode; + _uvMat: MeshPhongNodeMaterial; + /** + * Sets these objects' materials' lightmaps and modifies their uv1's. + * + * @param {Array} objects - An array of objects and lights to set up your lightmap. + */ + addObjectsToLightMap(objects: Array): void; + /** + * Frees all internal resources. + */ + dispose(): void; + /** + * This function renders each mesh one at a time into their respective surface maps. + * + * @param {Camera} camera - The camera the scene is rendered with. + * @param {number} [blendWindow=100] - When >1, samples will accumulate over time. + * @param {boolean} [blurEdges=true] - Whether to fix UV Edges via blurring. + */ + update(camera: Camera, blendWindow?: number, blurEdges?: boolean): void; + /** + * Draws the lightmap in the main scene. Call this after adding the objects to it. + * + * @param {boolean} visible - Whether the debug plane should be visible + * @param {Vector3} [position] - Where the debug plane should be drawn + */ + showDebugLightmap(visible: boolean, position?: Vector3): void; + /** + * Creates the Blurring Plane. + * + * @private + */ + private _initializeBlurPlane; +} +import { Scene } from 'three/webgpu'; +import { Mesh } from 'three/webgpu'; +import { RenderTarget } from 'three/webgpu'; +import { MeshPhongNodeMaterial } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/RollerCoaster.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/RollerCoaster.d.ts new file mode 100644 index 000000000..5e3866664 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/misc/RollerCoaster.d.ts @@ -0,0 +1,69 @@ +/** + * A procedural roller coaster geometry. + * + * @augments BufferGeometry + * @three_import import { RollerCoasterGeometry } from 'three/addons/misc/RollerCoaster.js'; + */ +export class RollerCoasterGeometry extends BufferGeometry { + /** + * Constructs a new geometry. + * + * @param {Curve} curve - The curve to generate the geometry along. + * @param {number} divisions - The number of divisions which defines the detail of the geometry. + */ + constructor(curve: Curve, divisions: number); +} +/** + * A procedural roller coaster lifters geometry. + * + * @augments BufferGeometry + * @three_import import { RollerCoasterLiftersGeometry } from 'three/addons/misc/RollerCoaster.js'; + */ +export class RollerCoasterLiftersGeometry extends BufferGeometry { + /** + * Constructs a new geometry. + * + * @param {Curve} curve - The curve to generate the geometry along. + * @param {number} divisions - The number of divisions which defines the detail of the geometry. + */ + constructor(curve: Curve, divisions: number); +} +/** + * A procedural roller coaster shadow geometry. + * + * @augments BufferGeometry + * @three_import import { RollerCoasterShadowGeometry } from 'three/addons/misc/RollerCoaster.js'; + */ +export class RollerCoasterShadowGeometry extends BufferGeometry { + /** + * Constructs a new geometry. + * + * @param {Curve} curve - The curve to generate the geometry along. + * @param {number} divisions - The number of divisions which defines the detail of the geometry. + */ + constructor(curve: Curve, divisions: number); +} +/** + * A procedural sky geometry. + * + * @augments BufferGeometry + * @three_import import { SkyGeometry } from 'three/addons/misc/RollerCoaster.js'; + */ +export class SkyGeometry extends BufferGeometry { +} +/** + * A procedural trees geometry. + * + * @augments BufferGeometry + * @three_import import { TreesGeometry } from 'three/addons/misc/RollerCoaster.js'; + */ +export class TreesGeometry extends BufferGeometry { + /** + * Constructs a new geometry. + * + * @param {Mesh} landscape - A mesh representing the landscape. Trees will be positioned + * randomly on the landscape's surface. + */ + constructor(landscape: Mesh); +} +import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/TubePainter.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/TubePainter.d.ts new file mode 100644 index 000000000..398fe3186 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/misc/TubePainter.d.ts @@ -0,0 +1,68 @@ +/** + * @classdesc This module can be used to paint tube-like meshes + * along a sequence of points. This module is used in a XR + * painter demo. + * + * ```js + * const painter = new TubePainter(); + * scene.add( painter.mesh ); + * ``` + * + * @name TubePainter + * @class + * @three_import import { TubePainter } from 'three/addons/misc/TubePainter.js'; + */ +export function TubePainter(): { + /** + * The "painted" tube mesh. Must be added to the scene. + * + * @name TubePainter#mesh + * @type {Mesh} + */ + mesh: Mesh; + /** + * Moves the current painting position to the given value. + * + * @method + * @name TubePainter#moveTo + * @param {Vector3} position The new painting position. + */ + moveTo: (position: any) => void; + /** + * Draw a stroke from the current position to the given one. + * This method extends the tube while drawing with the XR + * controllers. + * + * @method + * @name TubePainter#lineTo + * @param {Vector3} position The destination position. + */ + lineTo: (position: any) => void; + /** + * Sets the size of newly rendered tube segments. + * + * @method + * @name TubePainter#setSize + * @param {number} size The size. + */ + setSize: (value: any) => void; + /** + * Sets the color of newly rendered tube segments. + * + * @method + * @name TubePainter#setColor + * @param {Color} color The color. + */ + setColor: (value: any) => void; + /** + * Updates the internal geometry buffers so the new painted + * segments are rendered. + * + * @method + * @name TubePainter#update + */ + update: () => void; +}; +export class TubePainter { +} +import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/Volume.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/Volume.d.ts new file mode 100644 index 000000000..87012184d --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/misc/Volume.d.ts @@ -0,0 +1,163 @@ +/** + * This class had been written to handle the output of the {@link NRRDLoader}. + * It contains a volume of data and information about it. For now it only handles 3 dimensional data. + * + * @three_import import { Volume } from 'three/addons/misc/Volume.js'; + */ +export class Volume { + /** + * Constructs a new volume. + * + * @param {number} [xLength] - Width of the volume. + * @param {number} [yLength] - Length of the volume. + * @param {number} [zLength] - Depth of the volume. + * @param {string} [type] - The type of data (uint8, uint16, ...). + * @param {ArrayBuffer} [arrayBuffer] - The buffer with volume data. + */ + constructor(xLength?: number, yLength?: number, zLength?: number, type?: string, arrayBuffer?: ArrayBuffer); + /** + * Width of the volume in the IJK coordinate system. + * + * @type {number} + * @default 1 + */ + xLength: number; + /** + * Height of the volume in the IJK coordinate system. + * + * @type {number} + * @default 1 + */ + yLength: number; + /** + * Depth of the volume in the IJK coordinate system. + * + * @type {number} + * @default 1 + */ + zLength: number; + /** + * The order of the Axis dictated by the NRRD header + * + * @type {Array} + */ + axisOrder: Array; + /** + * The data of the volume. + * + * @type {TypedArray} + */ + data: TypedArray; + /** + * Spacing to apply to the volume from IJK to RAS coordinate system + * + * @type {Array} + */ + spacing: Array; + /** + * Offset of the volume in the RAS coordinate system + * + * @type {Array} + */ + offset: Array; + /** + * The IJK to RAS matrix. + * + * @type {Martrix3} + */ + matrix: Martrix3; + /** + * The RAS to IJK matrix. + * + * @type {Martrix3} + */ + inverseMatrix: Martrix3; + /** + * The list of all the slices associated to this volume + * + * @type {Array} + */ + sliceList: Array; + /** + * Whether to use segmentation mode or not. + * It can load 16-bits nrrds correctly. + * + * @type {boolean} + * @default false + */ + segmentation: boolean; + /** + * This array holds the dimensions of the volume in the RAS space + * + * @type {Array} + */ + RASDimensions: Array; + /** + * Shortcut for data[access(i,j,k)]. + * + * @param {number} i - First coordinate. + * @param {number} j - Second coordinate. + * @param {number} k - Third coordinate. + * @returns {number} The value in the data array. + */ + getData(i: number, j: number, k: number): number; + /** + * Compute the index in the data array corresponding to the given coordinates in IJK system. + * + * @param {number} i - First coordinate. + * @param {number} j - Second coordinate. + * @param {number} k - Third coordinate. + * @returns {number} The index. + */ + access(i: number, j: number, k: number): number; + /** + * Retrieve the IJK coordinates of the voxel corresponding of the given index in the data. + * + * @param {number} index - Index of the voxel. + * @returns {Array} The IJK coordinates as `[x,y,z]`. + */ + reverseAccess(index: number): Array; + /** + * Apply a function to all the voxels, be careful, the value will be replaced. + * + * @param {Function} functionToMap A function to apply to every voxel, will be called with the following parameters: + * value of the voxel, index of the voxel, the data (TypedArray). + * @param {Object} context - You can specify a context in which call the function, default if this Volume. + * @returns {Volume} A reference to this instance. + */ + map(functionToMap: Function, context: Object): Volume; + /** + * Compute the orientation of the slice and returns all the information relative to the geometry such as sliceAccess, + * the plane matrix (orientation and position in RAS coordinate) and the dimensions of the plane in both coordinate system. + * + * @param {('x'|'y'|'z')} axis - The normal axis to the slice. + * @param {number} RASIndex - The index of the slice. + * @returns {Object} An object containing all the useful information on the geometry of the slice. + */ + extractPerpendicularPlane(axis: ("x" | "y" | "z"), RASIndex: number): Object; + /** + * Returns a slice corresponding to the given axis and index. + * The coordinate are given in the Right Anterior Superior coordinate format. + * + * @param {('x'|'y'|'z')} axis - The normal axis to the slice. + * @param {number} index - The index of the slice. + * @returns {VolumeSlice} The extracted slice. + */ + extractSlice(axis: ("x" | "y" | "z"), index: number): VolumeSlice; + /** + * Call repaint on all the slices extracted from this volume. + * + * @see {@link VolumeSlice#repaint} + * @returns {Volume} A reference to this volume. + */ + repaintAllSlices(): Volume; + /** + * Compute the minimum and the maximum of the data in the volume. + * + * @returns {Array} The min/max data as `[min,max]`. + */ + computeMinMax(): Array; + min: number | undefined; + max: number | undefined; +} +import { VolumeSlice } from '../misc/VolumeSlice.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/VolumeSlice.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/VolumeSlice.d.ts new file mode 100644 index 000000000..9f4f5a792 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/misc/VolumeSlice.d.ts @@ -0,0 +1,99 @@ +/** + * This class has been made to hold a slice of a volume data. + * + * @see {@link Volume} + * @three_import import { VolumeSlice } from 'three/addons/misc/VolumeSlice.js'; + */ +export class VolumeSlice { + /** + * Constructs a new volume slice. + * + * @param {Volume} volume - The associated volume. + * @param {number} [index=0] - The index of the slice. + * @param {('x'|'y'|'z')} [axis='z'] - For now only 'x', 'y' or 'z' but later it will change to a normal vector. + */ + constructor(volume: Volume, index?: number, axis?: ("x" | "y" | "z")); + /** + * The associated volume. + * + * @type {Volume} + */ + volume: Volume; + /** + * The normal axis. + * + * @type {('x'|'y'|'z')} + */ + axis: ("x" | "y" | "z"); + /** + * The final canvas used for the texture. + * + * @type {HTMLCanvasElement} + */ + canvas: HTMLCanvasElement; + /** + * The rendering context of the canvas. + * + * @type {CanvasRenderingContext2D} + */ + ctx: CanvasRenderingContext2D; + /** + * The intermediary canvas used to paint the data. + * + * @type {HTMLCanvasElement} + */ + canvasBuffer: HTMLCanvasElement; + /** + * The rendering context of the canvas buffer, + * + * @type {CanvasRenderingContext2D} + */ + ctxBuffer: CanvasRenderingContext2D; + /** + * The mesh ready to get used in the scene. + * + * @type {Mesh} + */ + mesh: Mesh; + /** + * If set to `true`, `updateGeometry()` will be triggered at the next repaint. + * + * @type {boolean} + * @default true + */ + geometryNeedsUpdate: boolean; + /** + * Width of slice in the original coordinate system, corresponds to the width of the buffer canvas. + * + * @type {number} + * @default 0 + */ + iLength: number; + /** + * Height of slice in the original coordinate system, corresponds to the height of the buffer canvas. + * + * @type {number} + * @default 0 + */ + jLength: number; + /** + * Function that allow the slice to access right data. + * + * @type {?Function} + * @see {@link Volume#extractPerpendicularPlane} + */ + sliceAccess: Function | null; + /** + * Refresh the texture and the geometry if geometryNeedsUpdate is set to `true`. + */ + repaint(): void; + /** + * Refresh the geometry according to axis and index. + * @see {@link Volume#extractPerpendicularPlane} + */ + updateGeometry(): void; + matrix: any; + geometry: PlaneGeometry | undefined; +} +import { Mesh } from 'three'; +import { PlaneGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/modifiers/CurveModifier.d.ts b/jsdoc-testing/jsdoc/examples/jsm/modifiers/CurveModifier.d.ts new file mode 100644 index 000000000..9fd45f091 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/modifiers/CurveModifier.d.ts @@ -0,0 +1,79 @@ +/** + * A modifier for making meshes bend around curves. + * + * This module can only be used with {@link WebGLRenderer}. When using {@link WebGPURenderer}, + * import the class from `CurveModifierGPU.js`. + * + * @three_import import { Flow } from 'three/addons/modifiers/CurveModifier.js'; + */ +export class Flow { + /** + * Constructs a new Flow instance. + * + * @param {Mesh} mesh - The mesh to clone and modify to bend around the curve. + * @param {number} numberOfCurves - The amount of space that should preallocated for additional curves. + */ + constructor(mesh: Mesh, numberOfCurves?: number); + curveArray: any[]; + curveLengthArray: any[]; + object3D: import("three").Object3D; + splineTexture: DataTexture; + uniforms: Object; + /** + * Updates the curve for the given curve index. + * + * @param {number} index - The curve index. + * @param {Curve} curve - The curve that should be used to bend the mesh. + */ + updateCurve(index: number, curve: Curve): void; + /** + * Moves the mesh along the curve. + * + * @param {number} amount - The offset. + */ + moveAlongCurve(amount: number): void; +} +/** + * An instanced version of {@link Flow} for making meshes bend around curves, where the instances are placed on the curve. + * + * This module can only be used with {@link WebGLRenderer}. + * + * @augments Flow + * @three_import import { InstancedFlow } from 'three/addons/modifiers/CurveModifier.js'; + */ +export class InstancedFlow extends Flow { + /** + * Constructs a new InstancedFlow instance. + * + * @param {number} count - The number of instanced elements. + * @param {number} curveCount - The number of curves to preallocate for. + * @param {Geometry} geometry - The geometry to use for the instanced mesh. + * @param {Material} material - The material to use for the instanced mesh. + */ + constructor(count: number, curveCount: number, geometry: Geometry, material: Material); + offsets: any[]; + whichCurve: any[]; + /** + * The extra information about which curve and curve position is stored in the translation components of the matrix for the instanced objects + * This writes that information to the matrix and marks it as needing update. + * + * @param {number} index - The index of tge instanced element to update. + */ + writeChanges(index: number): void; + /** + * Move an individual element along the curve by a specific amount. + * + * @param {number} index - Which element to update. + * @param {number} offset - The offset. + */ + moveIndividualAlongCurve(index: number, offset: number): void; + /** + * Select which curve to use for an element. + * + * @param {number} index - The index of the instanced element to update. + * @param {number} curveNo - The index of the curve it should use. + */ + setCurve(index: number, curveNo: number): void; +} +import { DataTexture } from 'three'; +import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/modifiers/CurveModifierGPU.d.ts b/jsdoc-testing/jsdoc/examples/jsm/modifiers/CurveModifierGPU.d.ts new file mode 100644 index 000000000..c88b4f893 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/modifiers/CurveModifierGPU.d.ts @@ -0,0 +1,37 @@ +/** + * A modifier for making meshes bend around curves. + * + * This module can only be used with {@link WebGPURenderer}. When using {@link WebGLRenderer}, + * import the class from `CurveModifier.js`. + * + * @three_import import { Flow } from 'three/addons/modifiers/CurveModifierGPU.js'; + */ +export class Flow { + /** + * Constructs a new Flow instance. + * + * @param {Mesh} mesh - The mesh to clone and modify to bend around the curve. + * @param {number} numberOfCurves - The amount of space that should preallocated for additional curves. + */ + constructor(mesh: Mesh, numberOfCurves?: number); + curveArray: any[]; + curveLengthArray: any[]; + object3D: import("three").Object3D; + splineTexture: DataTexture; + uniforms: Object; + /** + * Updates the curve for the given curve index. + * + * @param {number} index - The curve index. + * @param {Curve} curve - The curve that should be used to bend the mesh. + */ + updateCurve(index: number, curve: Curve): void; + /** + * Moves the mesh along the curve. + * + * @param {number} amount - The offset. + */ + moveAlongCurve(amount: number): void; +} +import { DataTexture } from 'three'; +import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/modifiers/EdgeSplitModifier.d.ts b/jsdoc-testing/jsdoc/examples/jsm/modifiers/EdgeSplitModifier.d.ts new file mode 100644 index 000000000..65a5f1d5a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/modifiers/EdgeSplitModifier.d.ts @@ -0,0 +1,24 @@ +/** + * The modifier can be used to split faces at sharp edges. This allows to compute + * normals without smoothing the edges which can lead to an improved visual result. + * + * ```js + * const modifier = new EdgeSplitModifier(); + * geometry = modifier.modify( geometry, Math.PI * 0.4 ); + * ``` + * + * @three_import import { EdgeSplitModifier } from 'three/addons/modifiers/EdgeSplitModifier.js'; + */ +export class EdgeSplitModifier { + /** + * Returns a new, modified version of the given geometry by applying an edge-split operation. + * Please note that the resulting geometry is always indexed. + * + * @param {BufferGeometry} geometry - The geometry to modify. + * @param {number} cutOffAngle - The cut off angle in radians. + * @param {boolean} [tryKeepNormals=true] - Whether to try to keep normals or not. + * @return {BufferGeometry} A new, modified geometry. + */ + modify(geometry: BufferGeometry, cutOffAngle: number, tryKeepNormals?: boolean): BufferGeometry; +} +import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/modifiers/SimplifyModifier.d.ts b/jsdoc-testing/jsdoc/examples/jsm/modifiers/SimplifyModifier.d.ts new file mode 100644 index 000000000..f867899ab --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/modifiers/SimplifyModifier.d.ts @@ -0,0 +1,26 @@ +/** + * This class can be used to modify a geometry by simplifying it. A typical use + * case for such a modifier is automatic LOD generation. + * + * The implementation is based on [Progressive Mesh type Polygon Reduction Algorithm](https://web.archive.org/web/20230610044040/http://www.melax.com/polychop/) + * by Stan Melax in 1998. + * + * ```js + * const modifier = new SimplifyModifier(); + * geometry = modifier.modify( geometry ); + * ``` + * + * @three_import import { SimplifyModifier } from 'three/addons/modifiers/SimplifyModifier.js'; + */ +export class SimplifyModifier { + /** + * Returns a new, modified version of the given geometry by applying a simplification. + * Please note that the resulting geometry is always non-indexed. + * + * @param {BufferGeometry} geometry - The geometry to modify. + * @param {number} count - The number of vertices to remove. + * @return {BufferGeometry} A new, modified geometry. + */ + modify(geometry: BufferGeometry, count: number): BufferGeometry; +} +import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/modifiers/TessellateModifier.d.ts b/jsdoc-testing/jsdoc/examples/jsm/modifiers/TessellateModifier.d.ts new file mode 100644 index 000000000..58e45c699 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/modifiers/TessellateModifier.d.ts @@ -0,0 +1,43 @@ +/** + * This class can be used to modify a geometry by breaking its edges if they + * are longer than maximum length. + * + * ```js + * const modifier = new TessellateModifier( 8, 6 ); + * geometry = modifier.modify( geometry ); + * ``` + * + * @three_import import { TessellateModifier } from 'three/addons/modifiers/TessellateModifier.js'; + */ +export class TessellateModifier { + /** + * Constructs a new Tessellate modifier. + * + * @param {number} [maxEdgeLength=0.1] - The maximum edge length. + * @param {number} [maxIterations=6] - The number of iterations. + */ + constructor(maxEdgeLength?: number, maxIterations?: number); + /** + * The maximum edge length. + * + * @type {number} + * @default 0.1 + */ + maxEdgeLength: number; + /** + * The maximum edge length. + * + * @type {number} + * @default 0.1 + */ + maxIterations: number; + /** + * Returns a new, modified version of the given geometry by applying a tessellation. + * Please note that the resulting geometry is always non-indexed. + * + * @param {BufferGeometry} geometry - The geometry to modify. + * @return {BufferGeometry} A new, modified geometry. + */ + modify(geometry: BufferGeometry): BufferGeometry; +} +import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/GroundedSkybox.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/GroundedSkybox.d.ts new file mode 100644 index 000000000..51d43e1ef --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/objects/GroundedSkybox.d.ts @@ -0,0 +1,30 @@ +/** + * A ground-projected skybox. + * + * By default the object is centered at the camera, so it is often helpful to set + * `skybox.position.y = height` to put the ground at the origin. + * + * ```js + * const height = 15, radius = 100; + * + * const skybox = new GroundedSkybox( envMap, height, radius ); + * skybox.position.y = height; + * scene.add( skybox ); + * ``` + * + * @augments Mesh + * @three_import import { GroundedSkybox } from 'three/addons/objects/GroundedSkybox.js'; + */ +export class GroundedSkybox extends Mesh { + /** + * Constructs a new ground-projected skybox. + * + * @param {Texture} map - The environment map to use. + * @param {number} height - The height is how far the camera that took the photo was above the ground. + * A larger value will magnify the downward part of the image. + * @param {number} radius - The radius of the skybox. Must be large enough to ensure the scene's camera stays inside. + * @param {number} [resolution=128] - The geometry resolution of the skybox. + */ + constructor(map: Texture, height: number, radius: number, resolution?: number); +} +import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/Lensflare.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/Lensflare.d.ts new file mode 100644 index 000000000..ff0d9bc96 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/objects/Lensflare.d.ts @@ -0,0 +1,125 @@ +/** + * Creates a simulated lens flare that tracks a light. + * + * Note that this class can only be used with {@link WebGLRenderer}. + * When using {@link WebGPURenderer}, use {@link LensflareMesh}. + * + * ```js + * const light = new THREE.PointLight( 0xffffff, 1.5, 2000 ); + * + * const lensflare = new Lensflare(); + * lensflare.addElement( new LensflareElement( textureFlare0, 512, 0 ) ); + * lensflare.addElement( new LensflareElement( textureFlare1, 512, 0 ) ); + * lensflare.addElement( new LensflareElement( textureFlare2, 60, 0.6 ) ); + * + * light.add( lensflare ); + * ``` + * + * @augments Mesh + * @three_import import { Lensflare } from 'three/addons/objects/Lensflare.js'; + */ +export class Lensflare extends Mesh { + /** + * Constructs a new lensflare. + */ + constructor(); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLensflare: boolean; + /** + * Adds the given lensflare element to this instance. + * + * @param {LensflareElement} element - The element to add. + */ + addElement: (element: LensflareElement) => void; + onBeforeRender: (renderer: any, scene: any, camera: any) => void; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose: () => void; +} +export namespace Lensflare { + let Geometry: BufferGeometry; +} +/** + * Represents a single flare that can be added to a {@link Lensflare} container. + * + * @three_import import { LensflareElement } from 'three/addons/objects/Lensflare.js'; + */ +export class LensflareElement { + /** + * Constructs a new lensflare element. + * + * @param {Texture} texture - The flare's texture. + * @param {number} [size=1] - The size in pixels. + * @param {number} [distance=0] - The normalized distance (`[0,1]`) from the light source. + * A value of `0` means the flare is located at light source. + * @param {Color} [color] - The flare's color + */ + constructor(texture: Texture, size?: number, distance?: number, color?: Color); + /** + * The flare's texture. + * + * @type {Texture} + */ + texture: Texture; + /** + * The size in pixels. + * + * @type {number} + * @default 1 + */ + size: number; + /** + * The normalized distance (`[0,1]`) from the light source. + * A value of `0` means the flare is located at light source. + * + * @type {number} + * @default 0 + */ + distance: number; + /** + * The flare's color + * + * @type {Color} + * @default (1,1,1) + */ + color: Color; +} +export namespace LensflareElement { + namespace Shader { + let name: string; + namespace uniforms { + namespace map { + let value: null; + } + namespace occlusionMap { + let value_1: null; + export { value_1 as value }; + } + namespace color { + let value_2: null; + export { value_2 as value }; + } + namespace scale { + let value_3: null; + export { value_3 as value }; + } + namespace screenPosition { + let value_4: null; + export { value_4 as value }; + } + } + let vertexShader: string; + let fragmentShader: string; + } +} +import { Mesh } from 'three'; +import { BufferGeometry } from 'three'; +import { Color } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/LensflareMesh.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/LensflareMesh.d.ts new file mode 100644 index 000000000..e4a20536a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/objects/LensflareMesh.d.ts @@ -0,0 +1,59 @@ +/** + * Creates a simulated lens flare that tracks a light. + * + * Note that this class can only be used with {@link WebGPURenderer}. + * When using {@link WebGLRenderer}, use {@link Lensflare}. + * + * ```js + * const light = new THREE.PointLight( 0xffffff, 1.5, 2000 ); + * + * const lensflare = new LensflareMesh(); + * lensflare.addElement( new LensflareElement( textureFlare0, 512, 0 ) ); + * lensflare.addElement( new LensflareElement( textureFlare1, 512, 0 ) ); + * lensflare.addElement( new LensflareElement( textureFlare2, 60, 0.6 ) ); + * + * light.add( lensflare ); + * ``` + * + * @augments Mesh + * @three_import import { LensflareMesh } from 'three/addons/objects/LensflareMesh.js'; + */ +export class LensflareMesh extends Mesh { + /** + * Constructs a new lensflare mesh. + */ + constructor(); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLensflareMesh: boolean; + /** + * Adds the given lensflare element to this instance. + * + * @param {LensflareElement} element - The element to add. + */ + addElement: (element: LensflareElement) => void; + onBeforeRender: (renderer: any, scene: any, camera: any) => void; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose: () => void; +} +export namespace LensflareMesh { + let Geometry: BufferGeometry; +} +export class LensflareElement { + constructor(texture: any, size?: number, distance?: number, color?: Color); + texture: any; + size: number; + distance: number; + color: Color; +} +import { Mesh } from 'three/webgpu'; +import { BufferGeometry } from 'three/webgpu'; +import { Color } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/ReflectorForSSRPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/ReflectorForSSRPass.d.ts new file mode 100644 index 000000000..2e9c1a8aa --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/objects/ReflectorForSSRPass.d.ts @@ -0,0 +1,139 @@ +/** + * ~Options + */ +export type ReflectorForSSRPass = { + /** + * - The reflector's color. + */ + color?: string | number | Color | undefined; + /** + * - The texture width. A higher value results in more clear reflections but is also more expensive. + */ + textureWidth?: number | undefined; + /** + * - The texture height. A higher value results in more clear reflections but is also more expensive. + */ + textureHeight?: number | undefined; + /** + * - The clip bias. + */ + clipBias?: number | undefined; + /** + * - Can be used to pass in a custom shader that defines how the reflective view is projected onto the reflector's geometry. + */ + shader?: Object | undefined; + /** + * - Whether to store depth values in a texture or not. + */ + useDepthTexture?: boolean | undefined; + /** + * - Resolution for the Reflector Pass. + */ + resolution?: Vector2 | undefined; +}; +import { Color } from 'three'; +import { Vector2 } from 'three'; +/** + * A special version of {@link Reflector} for usage with {@link SSRPass}. + * + * @augments Mesh + * @three_import import { ReflectorForSSRPass } from 'three/addons/objects/ReflectorForSSRPass.js'; + */ +export class ReflectorForSSRPass extends Mesh { + /** + * Constructs a new reflector. + * + * @param {BufferGeometry} geometry - The reflector's geometry. + * @param {ReflectorForSSRPass~Options} [options] - The configuration options. + */ + constructor(geometry: BufferGeometry, options?: {}); + isReflectorForSSRPass: boolean; + needsUpdate: boolean; + maxDistance: number; + opacity: number; + color: Color; + resolution: any; + _distanceAttenuation: boolean; + _fresnel: boolean; + material: ShaderMaterial; + doRender: (renderer: any, scene: any, camera: any) => void; + /** + * Returns the reflector's internal render target. + * + * @return {WebGLRenderTarget} The internal render target + */ + getRenderTarget: () => WebGLRenderTarget; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose: () => void; +} +export namespace ReflectorForSSRPass { + namespace ReflectorShader { + let name: string; + namespace defines { + let DISTANCE_ATTENUATION: boolean; + let FRESNEL: boolean; + } + namespace uniforms { + namespace color { + let value: null; + } + namespace tDiffuse { + let value_1: null; + export { value_1 as value }; + } + namespace tDepth { + let value_2: null; + export { value_2 as value }; + } + namespace textureMatrix { + let value_3: Matrix4; + export { value_3 as value }; + } + namespace maxDistance { + let value_4: number; + export { value_4 as value }; + } + namespace opacity { + let value_5: number; + export { value_5 as value }; + } + namespace fresnelCoe { + let value_6: null; + export { value_6 as value }; + } + namespace virtualCameraNear { + let value_7: null; + export { value_7 as value }; + } + namespace virtualCameraFar { + let value_8: null; + export { value_8 as value }; + } + namespace virtualCameraProjectionMatrix { + let value_9: Matrix4; + export { value_9 as value }; + } + namespace virtualCameraMatrixWorld { + let value_10: Matrix4; + export { value_10 as value }; + } + namespace virtualCameraProjectionMatrixInverse { + let value_11: Matrix4; + export { value_11 as value }; + } + namespace resolution { + let value_12: Vector2; + export { value_12 as value }; + } + } + let vertexShader: string; + let fragmentShader: string; + } +} +import { Mesh } from 'three'; +import { ShaderMaterial } from 'three'; +import { WebGLRenderTarget } from 'three'; +import { Matrix4 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/Refractor.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/Refractor.d.ts new file mode 100644 index 000000000..a171e831b --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/objects/Refractor.d.ts @@ -0,0 +1,112 @@ +/** + * ~Options + */ +export type Refractor = { + /** + * - The refractor's color. + */ + color?: string | number | Color | undefined; + /** + * - The texture width. A higher value results in more clear refractions but is also more expensive. + */ + textureWidth?: number | undefined; + /** + * - The texture height. A higher value results in more clear refractions but is also more expensive. + */ + textureHeight?: number | undefined; + /** + * - The clip bias. + */ + clipBias?: number | undefined; + /** + * - Can be used to pass in a custom shader that defines how the refractive view is projected onto the reflector's geometry. + */ + shader?: Object | undefined; + /** + * - How many samples to use for MSAA. `0` disables MSAA. + */ + multisample?: number | undefined; +}; +import { Color } from 'three'; +/** + * Can be used to create a flat, refractive surface like for special + * windows or water effects. + * + * Note that this class can only be used with {@link WebGLRenderer}. + * When using {@link WebGPURenderer}, use {@link viewportSharedTexture}. + * + * ```js + * const geometry = new THREE.PlaneGeometry( 100, 100 ); + * + * const refractor = new Refractor( refractorGeometry, { + * color: 0xcbcbcb, + * textureWidth: 1024, + * textureHeight: 1024 + * } ); + * + * scene.add( refractor ); + * ``` + * + * @augments Mesh + * @three_import import { Refractor } from 'three/addons/objects/Refractor.js'; + */ +export class Refractor extends Mesh { + /** + * Constructs a new refractor. + * + * @param {BufferGeometry} geometry - The refractor's geometry. + * @param {Refractor~Options} [options] - The configuration options. + */ + constructor(geometry: BufferGeometry, options?: {}); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isRefractor: boolean; + /** + * The reflector's virtual camera. + * + * @type {PerspectiveCamera} + */ + camera: PerspectiveCamera; + material: ShaderMaterial; + onBeforeRender: (renderer: any, scene: any, camera: any) => void; + /** + * Returns the reflector's internal render target. + * + * @return {WebGLRenderTarget} The internal render target + */ + getRenderTarget: () => WebGLRenderTarget; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose: () => void; +} +export namespace Refractor { + namespace RefractorShader { + let name: string; + namespace uniforms { + namespace color { + let value: null; + } + namespace tDiffuse { + let value_1: null; + export { value_1 as value }; + } + namespace textureMatrix { + let value_2: null; + export { value_2 as value }; + } + } + let vertexShader: string; + let fragmentShader: string; + } +} +import { Mesh } from 'three'; +import { PerspectiveCamera } from 'three'; +import { ShaderMaterial } from 'three'; +import { WebGLRenderTarget } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/ShadowMesh.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/ShadowMesh.d.ts new file mode 100644 index 000000000..41e8e275f --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/objects/ShadowMesh.d.ts @@ -0,0 +1,48 @@ +/** + * A Shadow Mesh that follows a shadow-casting mesh in the scene, + * but is confined to a single plane. This technique can be used as + * a very performant alternative to classic shadow mapping. However, + * it has serious limitations like: + * + * - Shadows can only be casted on flat planes. + * - No soft shadows support. + * + * ```js + * const cubeShadow = new ShadowMesh( cube ); + * scene.add( cubeShadow ); + * ``` + * + * @augments Mesh + * @three_import import { ShadowMesh } from 'three/addons/objects/ShadowMesh.js'; + */ +export class ShadowMesh extends Mesh { + /** + * Constructs a new shadow mesh. + * + * @param {Mesh} mesh - The shadow-casting reference mesh. + */ + constructor(mesh: Mesh); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isShadowMesh: boolean; + /** + * Represent the world matrix of the reference mesh. + * + * @type {Matrix4} + */ + meshMatrix: Matrix4; + /** + * Updates the shadow mesh so it follows its shadow-casting reference mesh. + * + * @param {Plane} plane - The plane onto the shadow mesh is projected. + * @param {Vector4} lightPosition4D - The light position. + */ + update(plane: Plane, lightPosition4D: Vector4): void; +} +import { Mesh } from 'three'; +import { Matrix4 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/Sky.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/Sky.d.ts new file mode 100644 index 000000000..dbd0641e6 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/objects/Sky.d.ts @@ -0,0 +1,108 @@ +/** + * Represents a skydome for scene backgrounds. Based on [A Practical Analytic Model for Daylight](https://www.researchgate.net/publication/220720443_A_Practical_Analytic_Model_for_Daylight) + * aka The Preetham Model, the de facto standard for analytical skydomes. + * + * Note that this class can only be used with {@link WebGLRenderer}. + * When using {@link WebGPURenderer}, use {@link SkyMesh}. + * + * More references: + * + * - {@link http://simonwallner.at/project/atmospheric-scattering/} + * - {@link http://blenderartists.org/forum/showthread.php?245954-preethams-sky-impementation-HDR} + * + * + * ```js + * const sky = new Sky(); + * sky.scale.setScalar( 10000 ); + * scene.add( sky ); + * ``` + * + * It can be useful to hide the sun disc when generating an environment map to avoid artifacts + * + * ```js + * // disable before rendering environment map + * sky.material.uniforms.showSunDisc.value = false; + * // ... + * // re-enable before scene sky box rendering + * sky.material.uniforms.showSunDisc.value = true; + * ``` + * + * @augments Mesh + * @three_import import { Sky } from 'three/addons/objects/Sky.js'; + */ +export class Sky extends Mesh { + /** + * Constructs a new skydome. + */ + constructor(); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSky: boolean; +} +export namespace Sky { + namespace SkyShader { + let name: string; + namespace uniforms { + namespace turbidity { + let value: number; + } + namespace rayleigh { + let value_1: number; + export { value_1 as value }; + } + namespace mieCoefficient { + let value_2: number; + export { value_2 as value }; + } + namespace mieDirectionalG { + let value_3: number; + export { value_3 as value }; + } + namespace sunPosition { + let value_4: Vector3; + export { value_4 as value }; + } + namespace up { + let value_5: Vector3; + export { value_5 as value }; + } + namespace cloudScale { + let value_6: number; + export { value_6 as value }; + } + namespace cloudSpeed { + let value_7: number; + export { value_7 as value }; + } + namespace cloudCoverage { + let value_8: number; + export { value_8 as value }; + } + namespace cloudDensity { + let value_9: number; + export { value_9 as value }; + } + namespace cloudElevation { + let value_10: number; + export { value_10 as value }; + } + namespace showSunDisc { + let value_11: number; + export { value_11 as value }; + } + namespace time { + let value_12: number; + export { value_12 as value }; + } + } + let vertexShader: string; + let fragmentShader: string; + } +} +import { Mesh } from 'three'; +import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/SkyMesh.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/SkyMesh.d.ts new file mode 100644 index 000000000..825c2c2f7 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/objects/SkyMesh.d.ts @@ -0,0 +1,127 @@ +/** + * Represents a skydome for scene backgrounds. Based on [A Practical Analytic Model for Daylight](https://www.researchgate.net/publication/220720443_A_Practical_Analytic_Model_for_Daylight) + * aka The Preetham Model, the de facto standard for analytical skydomes. + * + * Note that this class can only be used with {@link WebGPURenderer}. + * When using {@link WebGLRenderer}, use {@link Sky}. + * + * More references: + * + * - {@link http://simonwallner.at/project/atmospheric-scattering/} + * - {@link http://blenderartists.org/forum/showthread.php?245954-preethams-sky-impementation-HDR} + * + * ```js + * const sky = new SkyMesh(); + * sky.scale.setScalar( 10000 ); + * scene.add( sky ); + * ``` + * + * It can be useful to hide the sun disc when generating an environment map to avoid artifacts + * + * ```js + * // disable before rendering environment map + * sky.showSunDisc.value = false; + * // ... + * // re-enable before scene sky box rendering + * sky.showSunDisc.value = true; + * ``` + * + * @augments Mesh + * @three_import import { SkyMesh } from 'three/addons/objects/SkyMesh.js'; + */ +export class SkyMesh extends Mesh { + /** + * Constructs a new skydome. + */ + constructor(); + /** + * The turbidity uniform. + * + * @type {UniformNode} + */ + turbidity: UniformNode; + /** + * The rayleigh uniform. + * + * @type {UniformNode} + */ + rayleigh: UniformNode; + /** + * The mieCoefficient uniform. + * + * @type {UniformNode} + */ + mieCoefficient: UniformNode; + /** + * The mieDirectionalG uniform. + * + * @type {UniformNode} + */ + mieDirectionalG: UniformNode; + /** + * The sun position uniform. + * + * @type {UniformNode} + */ + sunPosition: UniformNode; + /** + * The up position. + * + * @type {UniformNode} + */ + upUniform: UniformNode; + /** + * The cloud scale uniform. + * + * @type {UniformNode} + */ + cloudScale: UniformNode; + /** + * The cloud speed uniform. + * + * @type {UniformNode} + */ + cloudSpeed: UniformNode; + /** + * The cloud coverage uniform. + * + * @type {UniformNode} + */ + cloudCoverage: UniformNode; + /** + * The cloud density uniform. + * + * @type {UniformNode} + */ + cloudDensity: UniformNode; + /** + * The cloud elevation uniform. + * + * @type {UniformNode} + */ + cloudElevation: UniformNode; + /** + * Whether to render the solar disc. + * + * @type {UniformNode} + */ + showSunDisc: UniformNode; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + * @deprecated Use isSkyMesh instead. + */ + readonly isSky: boolean; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSkyMesh: boolean; +} +import { Mesh } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/Water.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/Water.d.ts new file mode 100644 index 000000000..4cbedafa7 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/objects/Water.d.ts @@ -0,0 +1,92 @@ +/** + * ~Options + */ +export type Water = { + /** + * - The texture width. A higher value results in more clear reflections but is also more expensive. + */ + textureWidth?: number | undefined; + /** + * - The texture height. A higher value results in more clear reflections but is also more expensive. + */ + textureHeight?: number | undefined; + /** + * - The clip bias. + */ + clipBias?: number | undefined; + /** + * - The alpha value. + */ + alpha?: number | undefined; + /** + * - The time value. + */ + time?: number | undefined; + /** + * - The water's normal map. + */ + waterNormals?: Texture | null; + /** + * - The sun direction. + */ + sunDirection?: Vector3 | undefined; + /** + * - The sun color. + */ + sunColor?: string | number | Color | undefined; + /** + * - The water color. + */ + waterColor?: string | number | Color | undefined; + /** + * - The eye vector. + */ + eye?: Vector3 | undefined; + /** + * - The distortion scale. + */ + distortionScale?: number | undefined; + /** + * - The water material's `side` property. + */ + side?: (number | BackSide | DoubleSide); + /** + * - Whether the water should be affected by fog or not. + */ + fog?: boolean | undefined; +}; +import { Vector3 } from 'three'; +import { Color } from 'three'; +/** + * A basic flat, reflective water effect. + * + * Note that this class can only be used with {@link WebGLRenderer}. + * When using {@link WebGPURenderer}, use {@link WaterMesh}. + * + * References: + * + * - [Flat mirror for three.js](https://github.com/Slayvin) + * - [An implementation of water shader based on the flat mirror](https://home.adelphi.edu/~stemkoski/) + * - [Water shader explanations in WebGL](http://29a.ch/slides/2012/webglwater/ ) + * + * @augments Mesh + * @three_import import { Water } from 'three/addons/objects/Water.js'; + */ +export class Water extends Mesh { + /** + * Constructs a new water instance. + * + * @param {BufferGeometry} geometry - The water's geometry. + * @param {Water~Options} [options] - The configuration options. + */ + constructor(geometry: BufferGeometry, options?: {}); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWater: boolean; +} +import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/Water2.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/Water2.d.ts new file mode 100644 index 000000000..515f144a6 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/objects/Water2.d.ts @@ -0,0 +1,145 @@ +/** + * :Water2~Options + */ +export type module = { + /** + * - The water color. + */ + color?: string | number | Color | undefined; + /** + * - The texture width. A higher value results in better quality but is also more expensive. + */ + textureWidth?: number | undefined; + /** + * - The texture height. A higher value results in better quality but is also more expensive. + */ + textureHeight?: number | undefined; + /** + * - The clip bias. + */ + clipBias?: number | undefined; + /** + * - The water's flow direction. + */ + flowDirection?: Vector2 | undefined; + /** + * - The water's flow speed. + */ + flowSpeed?: number | undefined; + /** + * - The water's reflectivity. + */ + reflectivity?: number | undefined; + /** + * - The water's scale. + */ + scale?: number | undefined; + /** + * - A custom water shader. + */ + shader?: Object | undefined; + /** + * - The flow map. If no flow map is assigned, the water flow is defined by `flowDirection`. + */ + flowMap?: Texture | null; + /** + * - The first water normal map. + */ + normalMap0?: Texture | null; + /** + * - The second water normal map. + */ + normalMap1?: Texture | null; +}; +/** @module Water2 */ +/** + * An advanced water effect that supports reflections, refractions and flow maps. + * + * Note that this class can only be used with {@link WebGLRenderer}. + * When using {@link WebGPURenderer}, use {@link module:Water2Mesh}. + * + * References: + * + * - {@link https://alex.vlachos.com/graphics/Vlachos-SIGGRAPH10-WaterFlow.pdf} + * - {@link http://graphicsrunner.blogspot.de/2010/08/water-using-flow-maps.html} + * + * @augments Mesh + * @three_import import { Water } from 'three/addons/objects/Water2.js'; + */ +export class Water extends Mesh { + /** + * Constructs a new water instance. + * + * @param {BufferGeometry} geometry - The water's geometry. + * @param {module:Water2~Options} [options] - The configuration options. + */ + constructor(geometry: BufferGeometry, options?: any); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWater: boolean; + onBeforeRender: (renderer: any, scene: any, camera: any) => void; +} +export namespace Water { + namespace WaterShader { + let name: string; + namespace uniforms { + namespace color { + let type: string; + let value: null; + } + namespace reflectivity { + let type_1: string; + export { type_1 as type }; + let value_1: number; + export { value_1 as value }; + } + namespace tReflectionMap { + let type_2: string; + export { type_2 as type }; + let value_2: null; + export { value_2 as value }; + } + namespace tRefractionMap { + let type_3: string; + export { type_3 as type }; + let value_3: null; + export { value_3 as value }; + } + namespace tNormalMap0 { + let type_4: string; + export { type_4 as type }; + let value_4: null; + export { value_4 as value }; + } + namespace tNormalMap1 { + let type_5: string; + export { type_5 as type }; + let value_5: null; + export { value_5 as value }; + } + namespace textureMatrix { + let type_6: string; + export { type_6 as type }; + let value_6: null; + export { value_6 as value }; + } + namespace config { + let type_7: string; + export { type_7 as type }; + let value_7: Vector4; + export { value_7 as value }; + } + } + let vertexShader: string; + let fragmentShader: string; + } +} +import { Color } from 'three'; +import { Vector2 } from 'three'; +import { Mesh } from 'three'; +import { Vector4 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/Water2Mesh.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/Water2Mesh.d.ts new file mode 100644 index 000000000..92371b2fd --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/objects/Water2Mesh.d.ts @@ -0,0 +1,72 @@ +/** + * :Water2Mesh~Options + */ +export type module = { + /** + * - The water color. + */ + color?: string | number | Color | undefined; + /** + * - The water's flow direction. + */ + flowDirection?: Vector2 | undefined; + /** + * - The water's flow speed. + */ + flowSpeed?: number | undefined; + /** + * - The water's reflectivity. + */ + reflectivity?: number | undefined; + /** + * - The water's scale. + */ + scale?: number | undefined; + /** + * - The flow map. If no flow map is assigned, the water flow is defined by `flowDirection`. + */ + flowMap?: Texture | null; + /** + * - The first water normal map. + */ + normalMap0: Texture; + /** + * - The second water normal map. + */ + normalMap1: Texture; +}; +/** @module Water2Mesh */ +/** + * An advanced water effect that supports reflections, refractions and flow maps. + * + * Note that this class can only be used with {@link WebGPURenderer}. + * When using {@link WebGLRenderer}, use {@link module:Water2}. + * + * References: + * + * - {@link https://alex.vlachos.com/graphics/Vlachos-SIGGRAPH10-WaterFlow.pdf} + * - {@link http://graphicsrunner.blogspot.de/2010/08/water-using-flow-maps.html} + * + * @augments Mesh + * @three_import import { WaterMesh } from 'three/addons/objects/Water2Mesh.js'; + */ +export class WaterMesh extends Mesh { + /** + * Constructs a new water mesh. + * + * @param {BufferGeometry} geometry - The water's geometry. + * @param {module:Water2~Options} [options] - The configuration options. + */ + constructor(geometry: BufferGeometry, options?: any); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWater: boolean; +} +import { Color } from 'three/webgpu'; +import { Vector2 } from 'three/webgpu'; +import { Mesh } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/WaterMesh.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/WaterMesh.d.ts new file mode 100644 index 000000000..4fb266691 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/objects/WaterMesh.d.ts @@ -0,0 +1,127 @@ +/** + * ~Options + */ +export type WaterMesh = { + /** + * - The resolution scale. + */ + resolutionScale?: number | undefined; + /** + * - The water's normal map. + */ + waterNormals?: Texture | null; + /** + * - The alpha value. + */ + alpha?: number | undefined; + /** + * - The size value. + */ + size?: number | undefined; + /** + * - The sun color. + */ + sunColor?: string | number | Color | undefined; + /** + * - The sun direction. + */ + sunDirection?: Vector3 | undefined; + /** + * - The water color. + */ + waterColor?: string | number | Color | undefined; + /** + * - The distortion scale. + */ + distortionScale?: number | undefined; +}; +import { Color } from 'three/webgpu'; +import { Vector3 } from 'three/webgpu'; +/** + * A basic flat, reflective water effect. + * + * Note that this class can only be used with {@link WebGPURenderer}. + * When using {@link WebGLRenderer}, use {@link Water}. + * + * References: + * + * - [Flat mirror for three.js](https://github.com/Slayvin) + * - [An implementation of water shader based on the flat mirror](https://home.adelphi.edu/~stemkoski/) + * - [Water shader explanations in WebGL](http://29a.ch/slides/2012/webglwater/ ) + * + * @augments Mesh + * @three_import import { WaterMesh } from 'three/addons/objects/WaterMesh.js'; + */ +export class WaterMesh extends Mesh { + /** + * Constructs a new water mesh. + * + * @param {BufferGeometry} geometry - The water mesh's geometry. + * @param {WaterMesh~Options} [options] - The configuration options. + */ + constructor(geometry: BufferGeometry, options: any); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWaterMesh: boolean; + /** + * The effect's resolution scale. + * + * @type {number} + * @default 0.5 + */ + resolutionScale: number; + /** + * The water's normal map. + * + * @type {TextureNode} + */ + waterNormals: TextureNode; + /** + * The alpha value. + * + * @type {UniformNode} + * @default 1 + */ + alpha: UniformNode; + /** + * The size value. + * + * @type {UniformNode} + * @default 1 + */ + size: UniformNode; + /** + * The sun color. + * + * @type {UniformNode} + * @default 0xffffff + */ + sunColor: UniformNode; + /** + * The sun direction. + * + * @type {UniformNode} + * @default (0.70707,0.70707,0.0) + */ + sunDirection: UniformNode; + /** + * The water color. + * + * @type {UniformNode} + * @default 0x7f7f7f + */ + waterColor: UniformNode; + /** + * The distortion scale. + * + * @type {UniformNode} + * @default 20 + */ + distortionScale: UniformNode; +} +import { Mesh } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/offscreen/jank.d.ts b/jsdoc-testing/jsdoc/examples/jsm/offscreen/jank.d.ts new file mode 100644 index 000000000..7729eb4da --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/offscreen/jank.d.ts @@ -0,0 +1,2 @@ +export default initJank; +declare function initJank(): void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/offscreen/offscreen.d.ts b/jsdoc-testing/jsdoc/examples/jsm/offscreen/offscreen.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/offscreen/offscreen.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/offscreen/scene.d.ts b/jsdoc-testing/jsdoc/examples/jsm/offscreen/scene.d.ts new file mode 100644 index 000000000..4f3b99c71 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/offscreen/scene.d.ts @@ -0,0 +1,2 @@ +export default init; +declare function init(canvas: any, width: any, height: any, pixelRatio: any, path: any): void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/physics/AmmoPhysics.d.ts b/jsdoc-testing/jsdoc/examples/jsm/physics/AmmoPhysics.d.ts new file mode 100644 index 000000000..979e971ed --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/physics/AmmoPhysics.d.ts @@ -0,0 +1,54 @@ +/** + * @classdesc Can be used to include Ammo.js as a Physics engine into + * `three.js` apps. Make sure to include `ammo.wasm.js` first: + * ``` + * + * ``` + * It is then possible to initialize the API via: + * ```js + * const physics = await AmmoPhysics(); + * ``` + * + * @name AmmoPhysics + * @class + * @hideconstructor + * @three_import import { AmmoPhysics } from 'three/addons/physics/AmmoPhysics.js'; + */ +export function AmmoPhysics(): Promise<{ + /** + * Adds the given scene to this physics simulation. Only meshes with a + * `physics` object in their {@link Object3D#userData} field will be honored. + * The object can be used to store the mass of the mesh. E.g.: + * ```js + * box.userData.physics = { mass: 1 }; + * ``` + * + * @method + * @name AmmoPhysics#addScene + * @param {Object3D} scene The scene or any type of 3D object to add. + */ + addScene: (scene: any) => void; + /** + * Adds the given mesh to this physics simulation. + * + * @method + * @name AmmoPhysics#addMesh + * @param {Mesh} mesh The mesh to add. + * @param {number} [mass=0] The mass in kg of the mesh. + * @param {number} [restitution=0] The restitution of the mesh, usually from 0 to 1. Represents how "bouncy" objects are when they collide with each other. + */ + addMesh: (mesh: any, mass?: number, restitution?: number) => void; + /** + * Set the position of the given mesh which is part of the physics simulation. Calling this + * method will reset the current simulated velocity of the mesh. + * + * @method + * @name AmmoPhysics#setMeshPosition + * @param {Mesh} mesh The mesh to update the position for. + * @param {Vector3} position - The new position. + * @param {number} [index=0] - If the mesh is instanced, the index represents the instanced ID. + */ + setMeshPosition: (mesh: any, position: any, index?: number) => void; +} | undefined>; +export class AmmoPhysics { +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/physics/JoltPhysics.d.ts b/jsdoc-testing/jsdoc/examples/jsm/physics/JoltPhysics.d.ts new file mode 100644 index 000000000..b54e2089e --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/physics/JoltPhysics.d.ts @@ -0,0 +1,53 @@ +/** + * @classdesc Can be used to include Jolt as a Physics engine into + * `three.js` apps. The API can be initialized via: + * ```js + * const physics = await JoltPhysics(); + * ``` + * The component automatically imports Jolt from a CDN so make sure + * to use the component with an active Internet connection. + * + * @name JoltPhysics + * @class + * @hideconstructor + * @three_import import { JoltPhysics } from 'three/addons/physics/JoltPhysics.js'; + */ +export function JoltPhysics(): Promise<{ + /** + * Adds the given scene to this physics simulation. Only meshes with a + * `physics` object in their {@link Object3D#userData} field will be honored. + * The object can be used to store the mass and restitution of the mesh. E.g.: + * ```js + * box.userData.physics = { mass: 1, restitution: 0 }; + * ``` + * + * @method + * @name JoltPhysics#addScene + * @param {Object3D} scene The scene or any type of 3D object to add. + */ + addScene: (scene: any) => void; + /** + * Adds the given mesh to this physics simulation. + * + * @method + * @name JoltPhysics#addMesh + * @param {Mesh} mesh The mesh to add. + * @param {number} [mass=0] The mass in kg of the mesh. + * @param {number} [restitution=0] The restitution of the mesh, usually from 0 to 1. Represents how "bouncy" objects are when they collide with each other. + */ + addMesh: (mesh: any, mass?: number, restitution?: number) => void; + /** + * Set the position of the given mesh which is part of the physics simulation. Calling this + * method will reset the current simulated velocity of the mesh. + * + * @method + * @name JoltPhysics#setMeshPosition + * @param {Mesh} mesh The mesh to update the position for. + * @param {Vector3} position - The new position. + * @param {number} [index=0] - If the mesh is instanced, the index represents the instanced ID. + */ + setMeshPosition: (mesh: any, position: any, index?: number) => void; + setMeshVelocity: (mesh: any, velocity: any, index?: number) => void; +}>; +export class JoltPhysics { +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/physics/RapierPhysics.d.ts b/jsdoc-testing/jsdoc/examples/jsm/physics/RapierPhysics.d.ts new file mode 100644 index 000000000..cf3f9fb28 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/physics/RapierPhysics.d.ts @@ -0,0 +1,98 @@ +/** + * @classdesc Can be used to include Rapier as a Physics engine into + * `three.js` apps. The API can be initialized via: + * ```js + * const physics = await RapierPhysics(); + * ``` + * The component automatically imports Rapier from a CDN so make sure + * to use the component with an active Internet connection. + * + * @name RapierPhysics + * @class + * @hideconstructor + * @three_import import { RapierPhysics } from 'three/addons/physics/RapierPhysics.js'; + */ +export function RapierPhysics(): Promise<{ + RAPIER: any; + world: any; + /** + * Adds the given scene to this physics simulation. Only meshes with a + * `physics` object in their {@link Object3D#userData} field will be honored. + * The object can be used to store the mass and restitution of the mesh. E.g.: + * ```js + * box.userData.physics = { mass: 1, restitution: 0 }; + * ``` + * + * @method + * @name RapierPhysics#addScene + * @param {Object3D} scene The scene or any type of 3D object to add. + */ + addScene: (scene: any) => void; + /** + * Adds the given mesh to this physics simulation. + * + * @method + * @name RapierPhysics#addMesh + * @param {Mesh} mesh The mesh to add. + * @param {number} [mass=0] The mass in kg of the mesh. + * @param {number} [restitution=0] The restitution of the mesh, usually from 0 to 1. Represents how "bouncy" objects are when they collide with each other. + */ + addMesh: (mesh: any, mass?: number, restitution?: number) => void; + /** + * Removes the given mesh from this physics simulation. + * + * @method + * @name RapierPhysics#removeMesh + * @param {Mesh} mesh The mesh to remove. + */ + removeMesh: (mesh: any) => void; + /** + * Set the position of the given mesh which is part of the physics simulation. Calling this + * method will reset the current simulated velocity of the mesh. + * + * @method + * @name RapierPhysics#setMeshPosition + * @param {Mesh} mesh The mesh to update the position for. + * @param {Vector3} position - The new position. + * @param {number} [index=0] - If the mesh is instanced, the index represents the instanced ID. + */ + setMeshPosition: (mesh: any, position: any, index?: number) => void; + /** + * Set the velocity of the given mesh which is part of the physics simulation. + * + * @method + * @name RapierPhysics#setMeshVelocity + * @param {Mesh} mesh The mesh to update the velocity for. + * @param {Vector3} velocity - The new velocity. + * @param {number} [index=0] - If the mesh is instanced, the index represents the instanced ID. + */ + setMeshVelocity: (mesh: any, velocity: any, index?: number) => void; + /** + * Adds a heightfield terrain to the physics simulation. + * + * @method + * @name RapierPhysics#addHeightfield + * @param {Mesh} mesh - The Three.js mesh representing the terrain. + * @param {number} width - The number of vertices along the width (x-axis) of the heightfield. + * @param {number} depth - The number of vertices along the depth (z-axis) of the heightfield. + * @param {Float32Array} heights - Array of height values for each vertex in the heightfield. + * @param {Object} scale - Scale factors for the heightfield dimensions. + * @param {number} scale.x - Scale factor for width. + * @param {number} scale.y - Scale factor for height. + * @param {number} scale.z - Scale factor for depth. + * @returns {RigidBody} The created Rapier rigid body for the heightfield. + */ + addHeightfield: (mesh: any, width: any, depth: any, heights: any, scale: any) => any; + /** + * Applies an impulse to the given mesh which is part of the physics simulation. + * + * @method + * @name RapierPhysics#applyImpulse + * @param {Mesh} mesh - The mesh to apply the impulse to. + * @param {Vector3} impulse - The impulse to apply. + * @param {number} [index=0] - If the mesh is instanced, the index represents the instanced ID. + */ + applyImpulse: (mesh: any, impulse: any, index?: number) => void; +}>; +export class RapierPhysics { +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/AfterimagePass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/AfterimagePass.d.ts new file mode 100644 index 000000000..ce505f2d5 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/AfterimagePass.d.ts @@ -0,0 +1,75 @@ +/** + * Pass for a basic after image effect. + * + * ```js + * const afterimagePass = new AfterimagePass( 0.9 ); + * composer.addPass( afterimagePass ); + * ``` + * + * @augments Pass + * @three_import import { AfterimagePass } from 'three/addons/postprocessing/AfterimagePass.js'; + */ +export class AfterimagePass extends Pass { + /** + * Constructs a new after image pass. + * + * @param {number} [damp=0.96] - The damping intensity. A higher value means a stronger after image effect. + */ + constructor(damp?: number); + /** + * The pass uniforms. Use this object if you want to update the + * `damp` value at runtime. + * ```js + * pass.uniforms.damp.value = 0.9; + * ``` + * + * @type {Object} + */ + uniforms: Object; + set damp(value: number); + /** + * The damping intensity, from 0.0 to 1.0. A higher value means a stronger after image effect. + * + * @type {number} + */ + get damp(): number; + /** + * The composition material. + * + * @type {ShaderMaterial} + */ + compFsMaterial: ShaderMaterial; + /** + * The copy material. + * + * @type {ShaderMaterial} + */ + copyFsMaterial: ShaderMaterial; + _textureComp: WebGLRenderTarget; + _textureOld: WebGLRenderTarget; + _compFsQuad: FullScreenQuad; + _copyFsQuad: FullScreenQuad; + /** + * Performs the after image pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; + /** + * Sets the size of the pass. + * + * @param {number} width - The width to set. + * @param {number} height - The height to set. + */ + setSize(width: number, height: number): void; +} +import { Pass } from './Pass.js'; +import { ShaderMaterial } from 'three'; +import { WebGLRenderTarget } from 'three'; +import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/BloomPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/BloomPass.d.ts new file mode 100644 index 000000000..97155abd9 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/BloomPass.d.ts @@ -0,0 +1,79 @@ +/** + * A pass for a basic Bloom effect. + * + * {@link UnrealBloomPass} produces a more advanced Bloom but is also + * more expensive. + * + * ```js + * const effectBloom = new BloomPass( 0.75 ); + * composer.addPass( effectBloom ); + * ``` + * + * @augments Pass + * @three_import import { BloomPass } from 'three/addons/postprocessing/BloomPass.js'; + */ +export class BloomPass extends Pass { + /** + * Constructs a new Bloom pass. + * + * @param {number} [strength=1] - The Bloom strength. + * @param {number} [kernelSize=25] - The kernel size. + * @param {number} [sigma=4] - The sigma. + */ + constructor(strength?: number, kernelSize?: number, sigma?: number); + /** + * The combine pass uniforms. + * + * @type {Object} + */ + combineUniforms: Object; + /** + * The combine pass material. + * + * @type {ShaderMaterial} + */ + materialCombine: ShaderMaterial; + /** + * The convolution pass uniforms. + * + * @type {Object} + */ + convolutionUniforms: Object; + /** + * The convolution pass material. + * + * @type {ShaderMaterial} + */ + materialConvolution: ShaderMaterial; + _renderTargetX: WebGLRenderTarget; + _renderTargetY: WebGLRenderTarget; + _fsQuad: FullScreenQuad; + /** + * Performs the Bloom pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget, deltaTime: number, maskActive: boolean): void; + /** + * Sets the size of the pass. + * + * @param {number} width - The width to set. + * @param {number} height - The height to set. + */ + setSize(width: number, height: number): void; +} +export namespace BloomPass { + let blurX: Vector2; + let blurY: Vector2; +} +import { Pass } from './Pass.js'; +import { ShaderMaterial } from 'three'; +import { WebGLRenderTarget } from 'three'; +import { FullScreenQuad } from './Pass.js'; +import { Vector2 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/BokehPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/BokehPass.d.ts new file mode 100644 index 000000000..22a5e5f4a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/BokehPass.d.ts @@ -0,0 +1,102 @@ +/** + * ~Options + */ +export type BokehPass = { + /** + * - Defines the effect's focus which is the distance along the camera's look direction in world units. + */ + focus?: number | undefined; + /** + * - Defines the effect's aperture. + */ + aperture?: number | undefined; + /** + * - Defines the effect's maximum blur. + */ + maxblur?: number | undefined; +}; +/** + * Pass for creating depth of field (DOF) effect. + * + * ```js + * const bokehPass = new BokehPass( scene, camera, { + * focus: 500 + * aperture: 5, + * maxblur: 0.01 + * } ); + * composer.addPass( bokehPass ); + * ``` + * + * @augments Pass + * @three_import import { BokehPass } from 'three/addons/postprocessing/BokehPass.js'; + */ +export class BokehPass extends Pass { + /** + * Constructs a new Bokeh pass. + * + * @param {Scene} scene - The scene to render the DOF for. + * @param {Camera} camera - The camera. + * @param {BokehPass~Options} params - The pass options. + */ + constructor(scene: Scene, camera: Camera, params: any); + /** + * The scene to render the DOF for. + * + * @type {Scene} + */ + scene: Scene; + /** + * The camera. + * + * @type {Camera} + */ + camera: Camera; + _renderTargetDepth: WebGLRenderTarget; + _materialDepth: MeshDepthMaterial; + /** + * The pass bokeh material. + * + * @type {ShaderMaterial} + */ + materialBokeh: ShaderMaterial; + /** + * The pass uniforms. Use this object if you want to update the + * `focus`, `aperture` or `maxblur` values at runtime. + * + * ```js + * pass.uniforms.focus.value = focus; + * pass.uniforms.aperture.value = aperture; + * pass.uniforms.maxblur.value = maxblur; + * ``` + * + * @type {Object} + */ + uniforms: Object; + _fsQuad: FullScreenQuad; + _oldClearColor: Color; + /** + * Performs the Bokeh pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; + /** + * Sets the size of the pass. + * + * @param {number} width - The width to set. + * @param {number} height - The height to set. + */ + setSize(width: number, height: number): void; +} +import { Pass } from './Pass.js'; +import { WebGLRenderTarget } from 'three'; +import { MeshDepthMaterial } from 'three'; +import { ShaderMaterial } from 'three'; +import { FullScreenQuad } from './Pass.js'; +import { Color } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/ClearPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/ClearPass.d.ts new file mode 100644 index 000000000..1e974da1b --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/ClearPass.d.ts @@ -0,0 +1,50 @@ +/** + * This class can be used to force a clear operation for the current read or + * default framebuffer (when rendering to screen). + * + * ```js + * const clearPass = new ClearPass(); + * composer.addPass( clearPass ); + * ``` + * + * @augments Pass + * @three_import import { ClearPass } from 'three/addons/postprocessing/ClearPass.js'; + */ +export class ClearPass extends Pass { + /** + * Constructs a new clear pass. + * + * @param {(number|Color|string)} [clearColor=0x000000] - The clear color. + * @param {number} [clearAlpha=0] - The clear alpha. + */ + constructor(clearColor?: (number | Color | string), clearAlpha?: number); + /** + * The clear color. + * + * @type {(number|Color|string)} + * @default 0x000000 + */ + clearColor: (number | Color | string); + /** + * The clear alpha. + * + * @type {number} + * @default 0 + */ + clearAlpha: number; + _oldClearColor: Color; + /** + * Performs the clear operation. This affects the current read or the default framebuffer. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; +} +import { Pass } from './Pass.js'; +import { Color } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/CubeTexturePass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/CubeTexturePass.d.ts new file mode 100644 index 000000000..e67221297 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/CubeTexturePass.d.ts @@ -0,0 +1,61 @@ +/** + * This pass can be used to render a cube texture over the entire screen. + * + * ```js + * const cubeMap = new THREE.CubeTextureLoader().load( urls ); + * + * const cubeTexturePass = new CubeTexturePass( camera, cubemap ); + * composer.addPass( cubeTexturePass ); + * ``` + * + * @augments Pass + * @three_import import { CubeTexturePass } from 'three/addons/postprocessing/CubeTexturePass.js'; + */ +export class CubeTexturePass extends Pass { + /** + * Constructs a new cube texture pass. + * + * @param {PerspectiveCamera} camera - The camera. + * @param {CubeTexture} tCube - The cube texture to render. + * @param {number} [opacity=1] - The opacity. + */ + constructor(camera: PerspectiveCamera, tCube: CubeTexture, opacity?: number); + /** + * The camera. + * + * @type {PerspectiveCamera} + */ + camera: PerspectiveCamera; + /** + * The cube texture to render. + * + * @type {CubeTexture} + */ + tCube: CubeTexture; + /** + * The opacity. + * + * @type {number} + * @default 1 + */ + opacity: number; + _cubeMesh: Mesh; + _cubeScene: Scene; + _cubeCamera: PerspectiveCamera; + /** + * Performs the cube texture pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; +} +import { Pass } from './Pass.js'; +import { PerspectiveCamera } from 'three'; +import { Mesh } from 'three'; +import { Scene } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/DotScreenPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/DotScreenPass.d.ts new file mode 100644 index 000000000..295052177 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/DotScreenPass.d.ts @@ -0,0 +1,55 @@ +/** + * Pass for creating a dot-screen effect. + * + * ```js + * const pass = new DotScreenPass( new THREE.Vector2( 0, 0 ), 0.5, 0.8 ); + * composer.addPass( pass ); + * ``` + * + * @augments Pass + * @three_import import { DotScreenPass } from 'three/addons/postprocessing/DotScreenPass.js'; + */ +export class DotScreenPass extends Pass { + /** + * Constructs a new dot screen pass. + * + * @param {Vector2} center - The center point. + * @param {number} angle - The rotation of the effect in radians. + * @param {number} scale - The scale of the effect. A higher value means smaller dots. + */ + constructor(center: Vector2, angle: number, scale: number); + /** + * The pass uniforms. Use this object if you want to update the + * `center`, `angle` or `scale` values at runtime. + * ```js + * pass.uniforms.center.value.copy( center ); + * pass.uniforms.angle.value = 0; + * pass.uniforms.scale.value = 0.5; + * ``` + * + * @type {Object} + */ + uniforms: Object; + /** + * The pass material. + * + * @type {ShaderMaterial} + */ + material: ShaderMaterial; + _fsQuad: FullScreenQuad; + /** + * Performs the dot screen pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; +} +import { Pass } from './Pass.js'; +import { ShaderMaterial } from 'three'; +import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/EffectComposer.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/EffectComposer.d.ts new file mode 100644 index 000000000..ba4d2c368 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/EffectComposer.d.ts @@ -0,0 +1,158 @@ +/** + * Used to implement post-processing effects in three.js. + * The class manages a chain of post-processing passes to produce the final visual result. + * Post-processing passes are executed in order of their addition/insertion. + * The last pass is automatically rendered to screen. + * + * This module can only be used with {@link WebGLRenderer}. + * + * ```js + * const composer = new EffectComposer( renderer ); + * + * // adding some passes + * const renderPass = new RenderPass( scene, camera ); + * composer.addPass( renderPass ); + * + * const glitchPass = new GlitchPass(); + * composer.addPass( glitchPass ); + * + * const outputPass = new OutputPass() + * composer.addPass( outputPass ); + * + * function animate() { + * + * composer.render(); // instead of renderer.render() + * + * } + * ``` + * + * @three_import import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js'; + */ +export class EffectComposer { + /** + * Constructs a new effect composer. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} [renderTarget] - This render target and a clone will + * be used as the internal read and write buffers. If not given, the composer creates + * the buffers automatically. + */ + constructor(renderer: WebGLRenderer, renderTarget?: WebGLRenderTarget); + /** + * The renderer. + * + * @type {WebGLRenderer} + */ + renderer: WebGLRenderer; + _pixelRatio: any; + _width: any; + _height: any; + renderTarget1: WebGLRenderTarget; + renderTarget2: import("three").RenderTarget; + /** + * A reference to the internal write buffer. Passes usually write + * their result into this buffer. + * + * @type {WebGLRenderTarget} + */ + writeBuffer: WebGLRenderTarget; + /** + * A reference to the internal read buffer. Passes usually read + * the previous render result from this buffer. + * + * @type {WebGLRenderTarget} + */ + readBuffer: WebGLRenderTarget; + /** + * Whether the final pass is rendered to the screen (default framebuffer) or not. + * + * @type {boolean} + * @default true + */ + renderToScreen: boolean; + /** + * An array representing the (ordered) chain of post-processing passes. + * + * @type {Array} + */ + passes: Array; + /** + * A copy pass used for internal swap operations. + * + * @private + * @type {ShaderPass} + */ + private copyPass; + /** + * The internal timer for managing time data. + * + * @private + * @type {Timer} + */ + private timer; + /** + * Swaps the internal read/write buffers. + */ + swapBuffers(): void; + /** + * Adds the given pass to the pass chain. + * + * @param {Pass} pass - The pass to add. + */ + addPass(pass: Pass): void; + /** + * Inserts the given pass at a given index. + * + * @param {Pass} pass - The pass to insert. + * @param {number} index - The index into the pass chain. + */ + insertPass(pass: Pass, index: number): void; + /** + * Removes the given pass from the pass chain. + * + * @param {Pass} pass - The pass to remove. + */ + removePass(pass: Pass): void; + /** + * Returns `true` if the pass for the given index is the last enabled pass in the pass chain. + * + * @param {number} passIndex - The pass index. + * @return {boolean} Whether the pass for the given index is the last pass in the pass chain. + */ + isLastEnabledPass(passIndex: number): boolean; + /** + * Executes all enabled post-processing passes in order to produce the final frame. + * + * @param {number} deltaTime - The delta time in seconds. If not given, the composer computes + * its own time delta value. + */ + render(deltaTime: number): void; + /** + * Resets the internal state of the EffectComposer. + * + * @param {WebGLRenderTarget} [renderTarget] - This render target has the same purpose like + * the one from the constructor. If set, it is used to setup the read and write buffers. + */ + reset(renderTarget?: WebGLRenderTarget): void; + /** + * Resizes the internal read and write buffers as well as all passes. Similar to {@link WebGLRenderer#setSize}, + * this method honors the current pixel ration. + * + * @param {number} width - The width in logical pixels. + * @param {number} height - The height in logical pixels. + */ + setSize(width: number, height: number): void; + /** + * Sets device pixel ratio. This is usually used for HiDPI device to prevent blurring output. + * Setting the pixel ratio will automatically resize the composer. + * + * @param {number} pixelRatio - The pixel ratio to set. + */ + setPixelRatio(pixelRatio: number): void; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever the composer is no longer used in your app. + */ + dispose(): void; +} +import { WebGLRenderTarget } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/FXAAPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/FXAAPass.d.ts new file mode 100644 index 000000000..9bcbeed49 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/FXAAPass.d.ts @@ -0,0 +1,25 @@ +/** + * A pass for applying FXAA. + * + * ```js + * const fxaaPass = new FXAAPass(); + * composer.addPass( fxaaPass ); + * ``` + * + * @augments ShaderPass + * @three_import import { FXAAPass } from 'three/addons/postprocessing/FXAAPass.js'; + */ +export class FXAAPass extends ShaderPass { + /** + * Constructs a new FXAA pass. + */ + constructor(); + /** + * Sets the size of the pass. + * + * @param {number} width - The width to set. + * @param {number} height - The height to set. + */ + setSize(width: number, height: number): void; +} +import { ShaderPass } from './ShaderPass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/FilmPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/FilmPass.d.ts new file mode 100644 index 000000000..14d8c1255 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/FilmPass.d.ts @@ -0,0 +1,53 @@ +/** + * This pass can be used to create a film grain effect. + * + * ```js + * const filmPass = new FilmPass(); + * composer.addPass( filmPass ); + * ``` + * + * @augments Pass + * @three_import import { FilmPass } from 'three/addons/postprocessing/FilmPass.js'; + */ +export class FilmPass extends Pass { + /** + * Constructs a new film pass. + * + * @param {number} [intensity=0.5] - The grain intensity in the range `[0,1]` (0 = no effect, 1 = full effect). + * @param {boolean} [grayscale=false] - Whether to apply a grayscale effect or not. + */ + constructor(intensity?: number, grayscale?: boolean); + /** + * The pass uniforms. Use this object if you want to update the + * `intensity` or `grayscale` values at runtime. + * ```js + * pass.uniforms.intensity.value = 1; + * pass.uniforms.grayscale.value = true; + * ``` + * + * @type {Object} + */ + uniforms: Object; + /** + * The pass material. + * + * @type {ShaderMaterial} + */ + material: ShaderMaterial; + _fsQuad: FullScreenQuad; + /** + * Performs the film pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget, deltaTime: number): void; +} +import { Pass } from './Pass.js'; +import { ShaderMaterial } from 'three'; +import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/GTAOPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/GTAOPass.d.ts new file mode 100644 index 000000000..5188ebe80 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/GTAOPass.d.ts @@ -0,0 +1,184 @@ +/** + * A pass for an GTAO effect. + * + * `GTAOPass` provides better quality than {@link SSAOPass} but is also more expensive. + * + * ```js + * const gtaoPass = new GTAOPass( scene, camera, width, height ); + * gtaoPass.output = GTAOPass.OUTPUT.Denoise; + * composer.addPass( gtaoPass ); + * ``` + * + * @augments Pass + * @three_import import { GTAOPass } from 'three/addons/postprocessing/GTAOPass.js'; + */ +export class GTAOPass extends Pass { + /** + * Constructs a new GTAO pass. + * + * @param {Scene} scene - The scene to compute the AO for. + * @param {Camera} camera - The camera. + * @param {number} [width=512] - The width of the effect. + * @param {number} [height=512] - The height of the effect. + * @param {Object} [parameters] - The pass parameters. + * @param {Object} [aoParameters] - The AO parameters. + * @param {Object} [pdParameters] - The denoise parameters. + */ + constructor(scene: Scene, camera: Camera, width?: number, height?: number, parameters?: Object, aoParameters?: Object, pdParameters?: Object); + /** + * The width of the effect. + * + * @type {number} + * @default 512 + */ + width: number; + /** + * The height of the effect. + * + * @type {number} + * @default 512 + */ + height: number; + /** + * The camera. + * + * @type {Camera} + */ + camera: Camera; + /** + * The scene to render the AO for. + * + * @type {Scene} + */ + scene: Scene; + /** + * The output configuration. + * + * @type {number} + * @default 0 + */ + output: number; + _renderGBuffer: boolean; + _visibilityCache: any[]; + /** + * The AO blend intensity. + * + * @type {number} + * @default 1 + */ + blendIntensity: number; + /** + * The number of Poisson Denoise rings. + * + * @type {number} + * @default 2 + */ + pdRings: number; + /** + * The Poisson Denoise radius exponent. + * + * @type {number} + * @default 2 + */ + pdRadiusExponent: number; + /** + * The Poisson Denoise sample count. + * + * @type {number} + * @default 16 + */ + pdSamples: number; + gtaoNoiseTexture: DataTexture; + pdNoiseTexture: DataTexture; + gtaoRenderTarget: WebGLRenderTarget; + pdRenderTarget: import("three").RenderTarget; + gtaoMaterial: ShaderMaterial; + normalMaterial: MeshNormalMaterial; + pdMaterial: ShaderMaterial; + depthRenderMaterial: ShaderMaterial; + copyMaterial: ShaderMaterial; + blendMaterial: ShaderMaterial; + _fsQuad: FullScreenQuad; + _originalClearColor: Color; + /** + * Sets the size of the pass. + * + * @param {number} width - The width to set. + * @param {number} height - The height to set. + */ + setSize(width: number, height: number): void; + /** + * A texture holding the computed AO. + * + * @type {Texture} + * @readonly + */ + readonly get gtaoMap(): Texture; + /** + * Configures the GBuffer of this pass. If no arguments are passed, + * the pass creates an internal render target for holding depth + * and normal data. + * + * @param {DepthTexture} [depthTexture] - The depth texture. + * @param {DepthTexture} [normalTexture] - The normal texture. + */ + setGBuffer(depthTexture?: DepthTexture, normalTexture?: DepthTexture): void; + depthTexture: DepthTexture | undefined; + normalTexture: import("three").Texture | DepthTexture | undefined; + normalRenderTarget: WebGLRenderTarget | undefined; + /** + * Configures the clip box of the GTAO shader with the given AABB. + * + * @param {?Box3} box - The AABB enclosing the scene that should receive AO. When passing + * `null`, to clip box is used. + */ + setSceneClipBox(box: Box3 | null): void; + /** + * Updates the GTAO material from the given parameter object. + * + * @param {Object} parameters - The GTAO material parameters. + */ + updateGtaoMaterial(parameters: Object): void; + /** + * Updates the Denoise material from the given parameter object. + * + * @param {Object} parameters - The denoise parameters. + */ + updatePdMaterial(parameters: Object): void; + /** + * Performs the GTAO pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; + _renderPass(renderer: any, passMaterial: any, renderTarget: any, clearColor: any, clearAlpha: any): void; + _renderOverride(renderer: any, overrideMaterial: any, renderTarget: any, clearColor: any, clearAlpha: any): void; + _overrideVisibility(): void; + _restoreVisibility(): void; + _generateNoise(size?: number): DataTexture; +} +export namespace GTAOPass { + namespace OUTPUT { + let Off: number; + let Default: number; + let Diffuse: number; + let Depth: number; + let Normal: number; + let AO: number; + let Denoise: number; + } +} +import { Pass } from './Pass.js'; +import { DataTexture } from 'three'; +import { WebGLRenderTarget } from 'three'; +import { ShaderMaterial } from 'three'; +import { MeshNormalMaterial } from 'three'; +import { FullScreenQuad } from './Pass.js'; +import { Color } from 'three'; +import { DepthTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/GlitchPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/GlitchPass.d.ts new file mode 100644 index 000000000..2ca364516 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/GlitchPass.d.ts @@ -0,0 +1,61 @@ +/** + * Pass for creating a glitch effect. + * + * ```js + * const glitchPass = new GlitchPass(); + * composer.addPass( glitchPass ); + * ``` + * + * @augments Pass + * @three_import import { GlitchPass } from 'three/addons/postprocessing/GlitchPass.js'; + */ +export class GlitchPass extends Pass { + /** + * Constructs a new glitch pass. + * + * @param {number} [dt_size=64] - The size of the displacement texture + * for digital glitch squares. + */ + constructor(dt_size?: number); + /** + * The pass uniforms. + * + * @type {Object} + */ + uniforms: Object; + /** + * The pass material. + * + * @type {ShaderMaterial} + */ + material: ShaderMaterial; + /** + * Whether to noticeably increase the effect intensity or not. + * + * @type {boolean} + * @default false + */ + goWild: boolean; + _heightMap: DataTexture; + _fsQuad: FullScreenQuad; + _curF: number; + _randX: number; + /** + * Performs the glitch pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; + _generateTrigger(): void; + _generateHeightmap(dt_size: any): DataTexture; +} +import { Pass } from './Pass.js'; +import { ShaderMaterial } from 'three'; +import { DataTexture } from 'three'; +import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/HalftonePass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/HalftonePass.d.ts new file mode 100644 index 000000000..a3907b4d1 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/HalftonePass.d.ts @@ -0,0 +1,66 @@ +/** + * Pass for creating a RGB halftone effect. + * + * ```js + * const params = { + * shape: 1, + * radius: 4, + * rotateR: Math.PI / 12, + * rotateB: Math.PI / 12 * 2, + * rotateG: Math.PI / 12 * 3, + * scatter: 0, + * blending: 1, + * blendingMode: 1, + * greyscale: false, + * disable: false + * }; + * const halftonePass = new HalftonePass( params ); + * composer.addPass( halftonePass ); + * ``` + * + * @augments Pass + * @three_import import { HalftonePass } from 'three/addons/postprocessing/HalftonePass.js'; + */ +export class HalftonePass extends Pass { + /** + * Constructs a new halftone pass. + * + * @param {Object} params - The halftone shader parameter. + */ + constructor(params: Object); + /** + * The pass uniforms. + * + * @type {Object} + */ + uniforms: Object; + /** + * The pass material. + * + * @type {ShaderMaterial} + */ + material: ShaderMaterial; + _fsQuad: FullScreenQuad; + /** + * Performs the halftone pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; + /** + * Sets the size of the pass. + * + * @param {number} width - The width to set. + * @param {number} height - The height to set. + */ + setSize(width: number, height: number): void; +} +import { Pass } from './Pass.js'; +import { ShaderMaterial } from 'three'; +import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/LUTPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/LUTPass.d.ts new file mode 100644 index 000000000..0cc065935 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/LUTPass.d.ts @@ -0,0 +1,27 @@ +/** + * Pass for color grading via lookup tables. + * + * ```js + * const lutPass = new LUTPass( { lut: lut.texture3D } ); + * composer.addPass( lutPass ); + * ``` + * + * @augments ShaderPass + * @three_import import { LUTPass } from 'three/addons/postprocessing/LUTPass.js'; + */ +export class LUTPass extends ShaderPass { + /** + * Constructs a LUT pass. + * + * @param {{lut:Data3DTexture,intensity:number}} [options={}] - The pass options. + */ + constructor(options?: { + lut: Data3DTexture; + intensity: number; + }); + set lut(v: any); + get lut(): any; + set intensity(v: any); + get intensity(): any; +} +import { ShaderPass } from './ShaderPass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/MaskPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/MaskPass.d.ts new file mode 100644 index 000000000..2563d270d --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/MaskPass.d.ts @@ -0,0 +1,79 @@ +/** + * This pass can be used to define a mask during post processing. + * Meaning only areas of subsequent post processing are affected + * which lie in the masking area of this pass. Internally, the masking + * is implemented with the stencil buffer. + * + * ```js + * const maskPass = new MaskPass( scene, camera ); + * composer.addPass( maskPass ); + * ``` + * + * @augments Pass + * @three_import import { MaskPass } from 'three/addons/postprocessing/MaskPass.js'; + */ +export class MaskPass extends Pass { + /** + * Constructs a new mask pass. + * + * @param {Scene} scene - The 3D objects in this scene will define the mask. + * @param {Camera} camera - The camera. + */ + constructor(scene: Scene, camera: Camera); + /** + * The scene that defines the mask. + * + * @type {Scene} + */ + scene: Scene; + /** + * The camera. + * + * @type {Camera} + */ + camera: Camera; + /** + * Whether to inverse the mask or not. + * + * @type {boolean} + * @default false + */ + inverse: boolean; + /** + * Performs a mask pass with the configured scene and camera. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; +} +/** + * This pass can be used to clear a mask previously defined with {@link MaskPass}. + * + * ```js + * const clearPass = new ClearMaskPass(); + * composer.addPass( clearPass ); + * ``` + * + * @augments Pass + */ +export class ClearMaskPass extends Pass { + /** + * Performs the clear of the currently defined mask. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer): void; +} +import { Pass } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/OutlinePass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/OutlinePass.d.ts new file mode 100644 index 000000000..9e237fdea --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/OutlinePass.d.ts @@ -0,0 +1,177 @@ +/** + * A pass for rendering outlines around selected objects. + * + * ```js + * const resolution = new THREE.Vector2( window.innerWidth, window.innerHeight ); + * const outlinePass = new OutlinePass( resolution, scene, camera ); + * composer.addPass( outlinePass ); + * ``` + * + * @augments Pass + * @three_import import { OutlinePass } from 'three/addons/postprocessing/OutlinePass.js'; + */ +export class OutlinePass extends Pass { + /** + * Constructs a new outline pass. + * + * @param {Vector2} [resolution] - The effect's resolution. + * @param {Scene} scene - The scene to render. + * @param {Camera} camera - The camera. + * @param {Array} [selectedObjects] - The selected 3D objects that should receive an outline. + * + */ + constructor(resolution?: Vector2, scene: Scene, camera: Camera, selectedObjects?: Array); + /** + * The scene to render. + * + * @type {Object} + */ + renderScene: Object; + /** + * The camera. + * + * @type {Object} + */ + renderCamera: Object; + /** + * The selected 3D objects that should receive an outline. + * + * @type {Array} + */ + selectedObjects: Array; + /** + * The visible edge color. + * + * @type {Color} + * @default (1,1,1) + */ + visibleEdgeColor: Color; + /** + * The hidden edge color. + * + * @type {Color} + * @default (0.1,0.04,0.02) + */ + hiddenEdgeColor: Color; + /** + * Can be used for an animated glow/pulse effect. + * + * @type {number} + * @default 0 + */ + edgeGlow: number; + /** + * Whether to use a pattern texture for to highlight selected + * 3D objects or not. + * + * @type {boolean} + * @default false + */ + usePatternTexture: boolean; + /** + * Can be used to highlight selected 3D objects. Requires to set + * {@link OutlinePass#usePatternTexture} to `true`. + * + * @type {?Texture} + * @default null + */ + patternTexture: Texture | null; + /** + * The edge thickness. + * + * @type {number} + * @default 1 + */ + edgeThickness: number; + /** + * The edge strength. + * + * @type {number} + * @default 3 + */ + edgeStrength: number; + /** + * The downsample ratio. The effect can be rendered in a much + * lower resolution than the beauty pass. + * + * @type {number} + * @default 2 + */ + downSampleRatio: number; + /** + * The pulse period. + * + * @type {number} + * @default 0 + */ + pulsePeriod: number; + _visibilityCache: Map; + _selectionCache: Set; + /** + * The effect's resolution. + * + * @type {Vector2} + * @default (256,256) + */ + resolution: Vector2; + renderTargetMaskBuffer: WebGLRenderTarget; + depthMaterial: MeshDepthMaterial; + prepareMaskMaterial: ShaderMaterial; + renderTargetDepthBuffer: WebGLRenderTarget; + renderTargetMaskDownSampleBuffer: WebGLRenderTarget; + renderTargetBlurBuffer1: WebGLRenderTarget; + renderTargetBlurBuffer2: WebGLRenderTarget; + edgeDetectionMaterial: ShaderMaterial; + renderTargetEdgeBuffer1: WebGLRenderTarget; + renderTargetEdgeBuffer2: WebGLRenderTarget; + separableBlurMaterial1: ShaderMaterial; + separableBlurMaterial2: ShaderMaterial; + overlayMaterial: ShaderMaterial; + copyUniforms: Object; + materialCopy: ShaderMaterial; + _oldClearColor: Color; + oldClearAlpha: number; + _fsQuad: FullScreenQuad; + tempPulseColor1: Color; + tempPulseColor2: Color; + textureMatrix: Matrix4; + /** + * Sets the size of the pass. + * + * @param {number} width - The width to set. + * @param {number} height - The height to set. + */ + setSize(width: number, height: number): void; + /** + * Performs the Outline pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget, deltaTime: number, maskActive: boolean): void; + _updateSelectionCache(): void; + _changeVisibilityOfSelectedObjects(bVisible: any): void; + _changeVisibilityOfNonSelectedObjects(bVisible: any): void; + _updateTextureMatrix(): void; + _getPrepareMaskMaterial(): ShaderMaterial; + _getEdgeDetectionMaterial(): ShaderMaterial; + _getSeparableBlurMaterial(maxRadius: any): ShaderMaterial; + _getOverlayMaterial(): ShaderMaterial; +} +export namespace OutlinePass { + let BlurDirectionX: Vector2; + let BlurDirectionY: Vector2; +} +import { Pass } from './Pass.js'; +import { Color } from 'three'; +import { Vector2 } from 'three'; +import { WebGLRenderTarget } from 'three'; +import { MeshDepthMaterial } from 'three'; +import { ShaderMaterial } from 'three'; +import { FullScreenQuad } from './Pass.js'; +import { Matrix4 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/OutputPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/OutputPass.d.ts new file mode 100644 index 000000000..a4b3d2594 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/OutputPass.d.ts @@ -0,0 +1,56 @@ +/** + * This pass is responsible for including tone mapping and color space conversion + * into your pass chain. In most cases, this pass should be included at the end + * of each pass chain. If a pass requires sRGB input (e.g. like FXAA), the pass + * must follow `OutputPass` in the pass chain. + * + * The tone mapping and color space settings are extracted from the renderer. + * + * ```js + * const outputPass = new OutputPass(); + * composer.addPass( outputPass ); + * ``` + * + * @augments Pass + * @three_import import { OutputPass } from 'three/addons/postprocessing/OutputPass.js'; + */ +export class OutputPass extends Pass { + /** + * This flag indicates that this is an output pass. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isOutputPass: boolean; + /** + * The pass uniforms. + * + * @type {Object} + */ + uniforms: Object; + /** + * The pass material. + * + * @type {RawShaderMaterial} + */ + material: RawShaderMaterial; + _fsQuad: FullScreenQuad; + _outputColorSpace: any; + _toneMapping: any; + /** + * Performs the output pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; +} +import { Pass } from './Pass.js'; +import { RawShaderMaterial } from 'three'; +import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/Pass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/Pass.d.ts new file mode 100644 index 000000000..77af31f08 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/Pass.d.ts @@ -0,0 +1,115 @@ +/** + * Abstract base class for all post processing passes. + * + * This module is only relevant for post processing with {@link WebGLRenderer}. + * + * @abstract + * @three_import import { Pass } from 'three/addons/postprocessing/Pass.js'; + */ +export class Pass { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isPass: boolean; + /** + * If set to `true`, the pass is processed by the composer. + * + * @type {boolean} + * @default true + */ + enabled: boolean; + /** + * If set to `true`, the pass indicates to swap read and write buffer after rendering. + * + * @type {boolean} + * @default true + */ + needsSwap: boolean; + /** + * If set to `true`, the pass clears its buffer before rendering + * + * @type {boolean} + * @default false + */ + clear: boolean; + /** + * If set to `true`, the result of the pass is rendered to screen. The last pass in the composers + * pass chain gets automatically rendered to screen, no matter how this property is configured. + * + * @type {boolean} + * @default false + */ + renderToScreen: boolean; + /** + * Sets the size of the pass. + * + * @abstract + * @param {number} width - The width to set. + * @param {number} height - The height to set. + */ + setSize(): void; + /** + * This method holds the render logic of a pass. It must be implemented in all derived classes. + * + * @abstract + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(): void; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever the pass is no longer used in your app. + * + * @abstract + */ + dispose(): void; +} +/** + * This module is a helper for passes which need to render a full + * screen effect which is quite common in context of post processing. + * + * The intended usage is to reuse a single full screen quad for rendering + * subsequent passes by just reassigning the `material` reference. + * + * This module can only be used with {@link WebGLRenderer}. + * + * @augments Mesh + * @three_import import { FullScreenQuad } from 'three/addons/postprocessing/Pass.js'; + */ +export class FullScreenQuad { + /** + * Constructs a new full screen quad. + * + * @param {?Material} material - The material to render te full screen quad with. + */ + constructor(material: Material | null); + _mesh: Mesh; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever the instance is no longer used in your app. + */ + dispose(): void; + /** + * Renders the full screen quad. + * + * @param {WebGLRenderer} renderer - The renderer. + */ + render(renderer: WebGLRenderer): void; + set material(value: Material | null); + /** + * The quad's material. + * + * @type {?Material} + */ + get material(): Material | null; +} +import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderPass.d.ts new file mode 100644 index 000000000..9e9147843 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderPass.d.ts @@ -0,0 +1,89 @@ +/** + * This class represents a render pass. It takes a camera and a scene and produces + * a beauty pass for subsequent post processing effects. + * + * ```js + * const renderPass = new RenderPass( scene, camera ); + * composer.addPass( renderPass ); + * ``` + * + * @augments Pass + * @three_import import { RenderPass } from 'three/addons/postprocessing/RenderPass.js'; + */ +export class RenderPass extends Pass { + /** + * Constructs a new render pass. + * + * @param {Scene} scene - The scene to render. + * @param {Camera} camera - The camera. + * @param {?Material} [overrideMaterial=null] - The override material. If set, this material is used + * for all objects in the scene. + * @param {?(number|Color|string)} [clearColor=null] - The clear color of the render pass. + * @param {?number} [clearAlpha=null] - The clear alpha of the render pass. + */ + constructor(scene: Scene, camera: Camera, overrideMaterial?: Material | null, clearColor?: (number | Color | string) | null, clearAlpha?: number | null); + /** + * The scene to render. + * + * @type {Scene} + */ + scene: Scene; + /** + * The camera. + * + * @type {Camera} + */ + camera: Camera; + /** + * The override material. If set, this material is used + * for all objects in the scene. + * + * @type {?Material} + * @default null + */ + overrideMaterial: Material | null; + /** + * The clear color of the render pass. + * + * @type {?(number|Color|string)} + * @default null + */ + clearColor: (number | Color | string) | null; + /** + * The clear alpha of the render pass. + * + * @type {?number} + * @default null + */ + clearAlpha: number | null; + /** + * If set to `true`, only the depth can be cleared when `clear` is to `false`. + * + * @type {boolean} + * @default false + */ + clearDepth: boolean; + /** + * This flag indicates that this pass renders the scene itself. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isRenderPass: boolean; + _oldClearColor: Color; + /** + * Performs a beauty pass with the configured scene and camera. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; +} +import { Pass } from './Pass.js'; +import { Color } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderPixelatedPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderPixelatedPass.d.ts new file mode 100644 index 000000000..5d7439be4 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderPixelatedPass.d.ts @@ -0,0 +1,101 @@ +/** + * A special type of render pass that produces a pixelated beauty pass. + * + * ```js + * const renderPixelatedPass = new RenderPixelatedPass( 6, scene, camera ); + * composer.addPass( renderPixelatedPass ); + * ``` + * + * @augments Pass + * @three_import import { RenderPixelatedPass } from 'three/addons/postprocessing/RenderPixelatedPass.js'; + */ +export class RenderPixelatedPass extends Pass { + /** + * Constructs a new render pixelated pass. + * + * @param {number} pixelSize - The effect's pixel size. + * @param {Scene} scene - The scene to render. + * @param {Camera} camera - The camera. + * @param {{normalEdgeStrength:number,depthEdgeStrength:number}} options - The pass options. + */ + constructor(pixelSize: number, scene: Scene, camera: Camera, options?: { + normalEdgeStrength: number; + depthEdgeStrength: number; + }); + /** + * The effect's pixel size. + * + * @type {number} + */ + pixelSize: number; + /** + * The scene to render. + * + * @type {Scene} + */ + scene: Scene; + /** + * The camera. + * + * @type {Camera} + */ + camera: Camera; + /** + * The normal edge strength. + * + * @type {number} + * @default 0.3 + */ + normalEdgeStrength: number; + /** + * The normal edge strength. + * + * @type {number} + * @default 0.4 + */ + depthEdgeStrength: number; + /** + * The pixelated material. + * + * @type {ShaderMaterial} + */ + pixelatedMaterial: ShaderMaterial; + _resolution: Vector2; + _renderResolution: Vector2; + _normalMaterial: MeshNormalMaterial; + _beautyRenderTarget: WebGLRenderTarget; + _normalRenderTarget: WebGLRenderTarget; + _fsQuad: FullScreenQuad; + /** + * Sets the size of the pass. + * + * @param {number} width - The width to set. + * @param {number} height - The height to set. + */ + setSize(width: number, height: number): void; + /** + * Sets the effect's pixel size. + * + * @param {number} pixelSize - The pixel size to set. + */ + setPixelSize(pixelSize: number): void; + /** + * Performs the pixelation pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget): void; + _createPixelatedMaterial(): ShaderMaterial; +} +import { Pass } from './Pass.js'; +import { ShaderMaterial } from 'three'; +import { Vector2 } from 'three'; +import { MeshNormalMaterial } from 'three'; +import { WebGLRenderTarget } from 'three'; +import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderTransitionPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderTransitionPass.d.ts new file mode 100644 index 000000000..4f782a095 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderTransitionPass.d.ts @@ -0,0 +1,107 @@ +/** + * A special type of render pass for implementing transition effects. + * When active, the pass will transition from scene A to scene B. + * + * ```js + * const renderTransitionPass = new RenderTransitionPass( fxSceneA.scene, fxSceneA.camera, fxSceneB.scene, fxSceneB.camera ); + * renderTransitionPass.setTexture( textures[ 0 ] ); + * composer.addPass( renderTransitionPass ); + * ``` + * + * @augments Pass + * @three_import import { RenderTransitionPass } from 'three/addons/postprocessing/RenderTransitionPass.js'; + */ +export class RenderTransitionPass extends Pass { + /** + * Constructs a render transition pass. + * + * @param {Scene} sceneA - The first scene. + * @param {Camera} cameraA - The camera of the first scene. + * @param {Scene} sceneB - The second scene. + * @param {Camera} cameraB - The camera of the second scene. + */ + constructor(sceneA: Scene, cameraA: Camera, sceneB: Scene, cameraB: Camera); + /** + * The first scene. + * + * @type {Scene} + */ + sceneA: Scene; + /** + * The camera of the first scene. + * + * @type {Camera} + */ + cameraA: Camera; + /** + * The second scene. + * + * @type {Scene} + */ + sceneB: Scene; + /** + * The camera of the second scene. + * + * @type {Camera} + */ + cameraB: Camera; + /** + * The pass material. + * + * @type {ShaderMaterial} + */ + material: ShaderMaterial; + _renderTargetA: WebGLRenderTarget; + _renderTargetB: WebGLRenderTarget; + _fsQuad: FullScreenQuad; + /** + * Sets the transition factor. Must be in the range `[0,1]`. + * This value determines to what degree both scenes are mixed. + * + * @param {boolean|number} value - The transition factor. + */ + setTransition(value: boolean | number): void; + /** + * Toggles the usage of a texture for the effect. + * + * @param {boolean} value - Whether to use a texture for the transition effect or not. + */ + useTexture(value: boolean): void; + /** + * Sets the effect texture. + * + * @param {Texture} value - The effect texture. + */ + setTexture(value: Texture): void; + /** + * Sets the texture threshold. This value defines how strong the texture effects + * the transition. Must be in the range `[0,1]` (0 means full effect, 1 means no effect). + * + * @param {boolean|number} value - The threshold value. + */ + setTextureThreshold(value: boolean | number): void; + /** + * Sets the size of the pass. + * + * @param {number} width - The width to set. + * @param {number} height - The height to set. + */ + setSize(width: number, height: number): void; + /** + * Performs the transition pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget): void; + _createMaterial(): ShaderMaterial; +} +import { Pass } from './Pass.js'; +import { ShaderMaterial } from 'three'; +import { WebGLRenderTarget } from 'three'; +import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SAOPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SAOPass.d.ts new file mode 100644 index 000000000..5bc6ace74 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SAOPass.d.ts @@ -0,0 +1,97 @@ +/** + * A SAO implementation inspired from @bhouston previous SAO work. + * + * `SAOPass` provides better quality than {@link SSAOPass} but is also more expensive. + * + * ```js + * const saoPass = new SAOPass( scene, camera ); + * composer.addPass( saoPass ); + * ``` + * + * @augments Pass + * @three_import import { SAOPass } from 'three/addons/postprocessing/SAOPass.js'; + */ +export class SAOPass extends Pass { + /** + * Constructs a new SAO pass. + * + * @param {Scene} scene - The scene to compute the AO for. + * @param {Camera} camera - The camera. + * @param {Vector2} [resolution] - The effect's resolution. + */ + constructor(scene: Scene, camera: Camera, resolution?: Vector2); + /** + * The scene to render the AO for. + * + * @type {Scene} + */ + scene: Scene; + /** + * The camera. + * + * @type {Camera} + */ + camera: Camera; + _originalClearColor: Color; + _oldClearColor: Color; + _oldClearAlpha: number; + /** + * The SAO parameter. + * + * @type {Object} + */ + params: Object; + /** + * The effect's resolution. + * + * @type {Vector2} + * @default (256,256) + */ + resolution: Vector2; + saoRenderTarget: WebGLRenderTarget; + blurIntermediateRenderTarget: import("three").RenderTarget; + normalRenderTarget: WebGLRenderTarget; + normalMaterial: MeshNormalMaterial; + saoMaterial: ShaderMaterial; + vBlurMaterial: ShaderMaterial; + hBlurMaterial: ShaderMaterial; + materialCopy: ShaderMaterial; + fsQuad: FullScreenQuad; + /** + * Performs the SAO pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; + prevStdDev: any; + prevNumSamples: any; + /** + * Sets the size of the pass. + * + * @param {number} width - The width to set. + * @param {number} height - The height to set. + */ + setSize(width: number, height: number): void; + _renderPass(renderer: any, passMaterial: any, renderTarget: any, clearColor: any, clearAlpha: any): void; + _renderOverride(renderer: any, overrideMaterial: any, renderTarget: any, clearColor: any, clearAlpha: any): void; +} +export namespace SAOPass { + namespace OUTPUT { + let Default: number; + let SAO: number; + let Normal: number; + } +} +import { Pass } from './Pass.js'; +import { Color } from 'three'; +import { Vector2 } from 'three'; +import { WebGLRenderTarget } from 'three'; +import { MeshNormalMaterial } from 'three'; +import { ShaderMaterial } from 'three'; +import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SMAAPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SMAAPass.d.ts new file mode 100644 index 000000000..fbdc709b6 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SMAAPass.d.ts @@ -0,0 +1,51 @@ +/** + * A pass for applying SMAA. Unlike {@link FXAAPass}, `SMAAPass` operates in + * `linear-srgb` so this pass must be executed before {@link OutputPass}. + * + * ```js + * const smaaPass = new SMAAPass(); + * composer.addPass( smaaPass ); + * ``` + * + * @augments Pass + * @three_import import { SMAAPass } from 'three/addons/postprocessing/SMAAPass.js'; + */ +export class SMAAPass extends Pass { + _edgesRT: WebGLRenderTarget; + _weightsRT: WebGLRenderTarget; + _areaTexture: Texture; + _searchTexture: Texture; + _uniformsEdges: Object; + _materialEdges: ShaderMaterial; + _uniformsWeights: Object; + _materialWeights: ShaderMaterial; + _uniformsBlend: Object; + _materialBlend: ShaderMaterial; + _fsQuad: FullScreenQuad; + /** + * Performs the SMAA pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; + /** + * Sets the size of the pass. + * + * @param {number} width - The width to set. + * @param {number} height - The height to set. + */ + setSize(width: number, height: number): void; + _getAreaTexture(): string; + _getSearchTexture(): string; +} +import { Pass } from './Pass.js'; +import { WebGLRenderTarget } from 'three'; +import { Texture } from 'three'; +import { ShaderMaterial } from 'three'; +import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSAARenderPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSAARenderPass.d.ts new file mode 100644 index 000000000..7dad6594f --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSAARenderPass.d.ts @@ -0,0 +1,105 @@ +/** + * Supersample Anti-Aliasing Render Pass. + * + * This manual approach to SSAA re-renders the scene ones for each sample with camera jitter and accumulates the results. + * + * ```js + * const ssaaRenderPass = new SSAARenderPass( scene, camera ); + * ssaaRenderPass.sampleLevel = 3; + * composer.addPass( ssaaRenderPass ); + * ``` + * + * @augments Pass + * @three_import import { SSAARenderPass } from 'three/addons/postprocessing/SSAARenderPass.js'; + */ +export class SSAARenderPass extends Pass { + /** + * Constructs a new SSAA render pass. + * + * @param {Scene} scene - The scene to render. + * @param {Camera} camera - The camera. + * @param {?(number|Color|string)} [clearColor=0x000000] - The clear color of the render pass. + * @param {?number} [clearAlpha=0] - The clear alpha of the render pass. + */ + constructor(scene: Scene, camera: Camera, clearColor?: (number | Color | string) | null, clearAlpha?: number | null); + /** + * The scene to render. + * + * @type {Scene} + */ + scene: Scene; + /** + * The camera. + * + * @type {Camera} + */ + camera: Camera; + /** + * The sample level. Specified as n, where the number of + * samples is 2^n, so sampleLevel = 4, is 2^4 samples, 16. + * + * @type {number} + * @default 4 + */ + sampleLevel: number; + /** + * Whether the pass should be unbiased or not. This property has the most + * visible effect when rendering to a RGBA8 buffer because it mitigates + * rounding errors. By default RGBA16F is used. + * + * @type {boolean} + * @default true + */ + unbiased: boolean; + /** + * Whether to use a stencil buffer or not. This property can't + * be changed after the first render. + * + * @type {boolean} + * @default false + */ + stencilBuffer: boolean; + /** + * The clear color of the render pass. + * + * @type {?(number|Color|string)} + * @default 0x000000 + */ + clearColor: (number | Color | string) | null; + /** + * The clear alpha of the render pass. + * + * @type {?number} + * @default 0 + */ + clearAlpha: number | null; + _sampleRenderTarget: WebGLRenderTarget | null; + _oldClearColor: Color; + _copyUniforms: Object; + _copyMaterial: ShaderMaterial; + _fsQuad: FullScreenQuad; + /** + * Sets the size of the pass. + * + * @param {number} width - The width to set. + * @param {number} height - The height to set. + */ + setSize(width: number, height: number): void; + /** + * Performs the SSAA render pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; +} +import { Pass } from './Pass.js'; +import { Color } from 'three'; +import { WebGLRenderTarget } from 'three'; +import { ShaderMaterial } from 'three'; +import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSAOPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSAOPass.d.ts new file mode 100644 index 000000000..e26c2ac62 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSAOPass.d.ts @@ -0,0 +1,137 @@ +/** + * A pass for a basic SSAO effect. + * + * {@link SAOPass} and {@link GTAPass} produce a more advanced AO but are also + * more expensive. + * + * ```js + * const ssaoPass = new SSAOPass( scene, camera, width, height ); + * composer.addPass( ssaoPass ); + * ``` + * + * @augments Pass + * @three_import import { SSAOPass } from 'three/addons/postprocessing/SSAOPass.js'; + */ +export class SSAOPass extends Pass { + /** + * Constructs a new SSAO pass. + * + * @param {Scene} scene - The scene to compute the AO for. + * @param {Camera} camera - The camera. + * @param {number} [width=512] - The width of the effect. + * @param {number} [height=512] - The height of the effect. + * @param {number} [kernelSize=32] - The kernel size. + */ + constructor(scene: Scene, camera: Camera, width?: number, height?: number, kernelSize?: number); + /** + * The width of the effect. + * + * @type {number} + * @default 512 + */ + width: number; + /** + * The height of the effect. + * + * @type {number} + * @default 512 + */ + height: number; + /** + * The camera. + * + * @type {Camera} + */ + camera: Camera; + /** + * The scene to render the AO for. + * + * @type {Scene} + */ + scene: Scene; + /** + * The kernel radius controls how wide the + * AO spreads. + * + * @type {number} + * @default 8 + */ + kernelRadius: number; + kernel: any[]; + noiseTexture: DataTexture | null; + /** + * The output configuration. + * + * @type {number} + * @default 0 + */ + output: number; + /** + * Defines the minimum distance that should be + * affected by the AO. + * + * @type {number} + * @default 0.005 + */ + minDistance: number; + /** + * Defines the maximum distance that should be + * affected by the AO. + * + * @type {number} + * @default 0.1 + */ + maxDistance: number; + _visibilityCache: any[]; + normalRenderTarget: WebGLRenderTarget; + ssaoRenderTarget: WebGLRenderTarget; + blurRenderTarget: import("three").RenderTarget; + ssaoMaterial: ShaderMaterial; + normalMaterial: MeshNormalMaterial; + blurMaterial: ShaderMaterial; + depthRenderMaterial: ShaderMaterial; + copyMaterial: ShaderMaterial; + _fsQuad: FullScreenQuad; + _originalClearColor: Color; + /** + * Performs the SSAO pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; + /** + * Sets the size of the pass. + * + * @param {number} width - The width to set. + * @param {number} height - The height to set. + */ + setSize(width: number, height: number): void; + _renderPass(renderer: any, passMaterial: any, renderTarget: any, clearColor: any, clearAlpha: any): void; + _renderOverride(renderer: any, overrideMaterial: any, renderTarget: any, clearColor: any, clearAlpha: any): void; + _generateSampleKernel(kernelSize: any): void; + _generateRandomKernelRotations(): void; + _overrideVisibility(): void; + _restoreVisibility(): void; +} +export namespace SSAOPass { + namespace OUTPUT { + let Default: number; + let SSAO: number; + let Blur: number; + let Depth: number; + let Normal: number; + } +} +import { Pass } from './Pass.js'; +import { DataTexture } from 'three'; +import { WebGLRenderTarget } from 'three'; +import { ShaderMaterial } from 'three'; +import { MeshNormalMaterial } from 'three'; +import { FullScreenQuad } from './Pass.js'; +import { Color } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSRPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSRPass.d.ts new file mode 100644 index 000000000..02504603f --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSRPass.d.ts @@ -0,0 +1,218 @@ +/** + * ~Options + */ +export type SSRPass = { + /** + * - The renderer. + */ + renderer: WebGLRenderer; + /** + * - The scene to render. + */ + scene: Scene; + /** + * - The camera. + */ + camera: Camera; + /** + * - The width of the effect. + */ + width?: number | undefined; + /** + * - The width of the effect. + */ + height?: number | undefined; + /** + * - Which 3D objects should be affected by SSR. If not set, the entire scene is affected. + */ + selects?: Object3D[] | null | undefined; + /** + * - Whether bouncing is enabled or not. + */ + bouncing?: boolean | undefined; + /** + * - A ground reflector. + */ + groundReflector?: ReflectorForSSRPass | null; +}; +/** + * A pass for a basic SSR effect. + * + * ```js + * const ssrPass = new SSRPass( { + * renderer, + * scene, + * camera, + * width: innerWidth, + * height: innerHeight + * } ); + * composer.addPass( ssrPass ); + * ``` + * + * @augments Pass + * @three_import import { SSRPass } from 'three/addons/postprocessing/SSRPass.js'; + */ +export class SSRPass extends Pass { + /** + * Constructs a new SSR pass. + * + * @param {SSRPass~Options} options - The pass options. + */ + constructor({ renderer, scene, camera, width, height, selects, bouncing, groundReflector }: SSRPass); + /** + * The width of the effect. + * + * @type {number} + * @default 512 + */ + width: number; + /** + * The height of the effect. + * + * @type {number} + * @default 512 + */ + height: number; + /** + * The renderer. + * + * @type {WebGLRenderer} + */ + renderer: WebGLRenderer; + /** + * The scene to render. + * + * @type {Scene} + */ + scene: Scene; + /** + * The camera. + * + * @type {Camera} + */ + camera: Camera; + /** + * The ground reflector. + * + * @type {?ReflectorForSSRPass} + * @default 0 + */ + groundReflector: ReflectorForSSRPass | null; + /** + * The opacity. + * + * @type {number} + * @default 0.5 + */ + opacity: number; + /** + * The output configuration. + * + * @type {number} + * @default 0 + */ + output: number; + /** + * Controls how far a fragment can reflect. + * + * @type {number} + * @default 180 + */ + maxDistance: number; + /** + * Controls the cutoff between what counts as a + * possible reflection hit and what does not. + * + * @type {number} + * @default .018 + */ + thickness: number; + tempColor: Color; + _selects: any; + _resolutionScale: number; + /** + * Whether the pass is selective or not. + * + * @type {boolean} + * @default false + */ + selective: boolean; + _bouncing: any; + /** + * Whether to blur reflections or not. + * + * @type {boolean} + * @default true + */ + blur: boolean; + _distanceAttenuation: any; + _fresnel: any; + _infiniteThick: any; + beautyRenderTarget: WebGLRenderTarget; + prevRenderTarget: WebGLRenderTarget; + normalRenderTarget: WebGLRenderTarget; + metalnessRenderTarget: WebGLRenderTarget; + ssrRenderTarget: WebGLRenderTarget; + blurRenderTarget: import("three").RenderTarget; + blurRenderTarget2: import("three").RenderTarget; + ssrMaterial: ShaderMaterial; + normalMaterial: MeshNormalMaterial; + metalnessOnMaterial: MeshBasicMaterial; + metalnessOffMaterial: MeshBasicMaterial; + blurMaterial: ShaderMaterial; + blurMaterial2: ShaderMaterial; + depthRenderMaterial: ShaderMaterial; + copyMaterial: ShaderMaterial; + fsQuad: FullScreenQuad; + originalClearColor: Color; + set resolutionScale(value: number); + /** + * The resolution scale. Valid values are in the range + * `[0,1]`. `1` means best quality but also results in + * more computational overhead. Setting to `0.5` means + * the effect is computed in half-resolution. + * + * @type {number} + * @default 1 + */ + get resolutionScale(): number; + /** + * Performs the SSR pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget): void; + /** + * Sets the size of the pass. + * + * @param {number} width - The width to set. + * @param {number} height - The height to set. + */ + setSize(width: number, height: number): void; + _renderPass(renderer: any, passMaterial: any, renderTarget: any, clearColor: any, clearAlpha: any): void; + _renderOverride(renderer: any, overrideMaterial: any, renderTarget: any, clearColor: any, clearAlpha: any): void; + _renderMetalness(renderer: any, overrideMaterial: any, renderTarget: any, clearColor: any, clearAlpha: any): void; +} +export namespace SSRPass { + namespace OUTPUT { + let Default: number; + let SSR: number; + let Beauty: number; + let Depth: number; + let Normal: number; + let Metalness: number; + } +} +import { Pass } from './Pass.js'; +import { Color } from 'three'; +import { WebGLRenderTarget } from 'three'; +import { ShaderMaterial } from 'three'; +import { MeshNormalMaterial } from 'three'; +import { MeshBasicMaterial } from 'three'; +import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SavePass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SavePass.d.ts new file mode 100644 index 000000000..658d5124e --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SavePass.d.ts @@ -0,0 +1,62 @@ +/** + * A pass that saves the contents of the current read buffer in a render target. + * + * ```js + * const savePass = new SavePass( customRenderTarget ); + * composer.addPass( savePass ); + * ``` + * + * @augments Pass + * @three_import import { SavePass } from 'three/addons/postprocessing/SavePass.js'; + */ +export class SavePass extends Pass { + /** + * Constructs a new save pass. + * + * @param {WebGLRenderTarget} [renderTarget] - The render target for saving the read buffer. + * If not provided, the pass automatically creates a render target. + */ + constructor(renderTarget?: WebGLRenderTarget); + /** + * The pass uniforms. + * + * @type {Object} + */ + uniforms: Object; + /** + * The pass material. + * + * @type {ShaderMaterial} + */ + material: ShaderMaterial; + /** + * The render target which is used to save the read buffer. + * + * @type {WebGLRenderTarget} + */ + renderTarget: WebGLRenderTarget; + _fsQuad: FullScreenQuad; + /** + * Performs the save pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; + /** + * Sets the size of the pass. + * + * @param {number} width - The width to set. + * @param {number} height - The height to set. + */ + setSize(width: number, height: number): void; +} +import { Pass } from './Pass.js'; +import { ShaderMaterial } from 'three'; +import { WebGLRenderTarget } from 'three'; +import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/ShaderPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/ShaderPass.d.ts new file mode 100644 index 000000000..f88751cd7 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/ShaderPass.d.ts @@ -0,0 +1,59 @@ +/** + * This pass can be used to create a post processing effect + * with a raw GLSL shader object. Useful for implementing custom + * effects. + * + * ```js + * const fxaaPass = new ShaderPass( FXAAShader ); + * composer.addPass( fxaaPass ); + * ``` + * + * @augments Pass + * @three_import import { ShaderPass } from 'three/addons/postprocessing/ShaderPass.js'; + */ +export class ShaderPass extends Pass { + /** + * Constructs a new shader pass. + * + * @param {Object|ShaderMaterial} [shader] - A shader object holding vertex and fragment shader as well as + * defines and uniforms. It's also valid to pass a custom shader material. + * @param {string} [textureID='tDiffuse'] - The name of the texture uniform that should sample + * the read buffer. + */ + constructor(shader?: Object | ShaderMaterial, textureID?: string); + /** + * The name of the texture uniform that should sample the read buffer. + * + * @type {string} + * @default 'tDiffuse' + */ + textureID: string; + /** + * The pass uniforms. + * + * @type {?Object} + */ + uniforms: Object | null; + /** + * The pass material. + * + * @type {?ShaderMaterial} + */ + material: ShaderMaterial | null; + _fsQuad: FullScreenQuad; + /** + * Performs the shader pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; +} +import { Pass } from './Pass.js'; +import { ShaderMaterial } from 'three'; +import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/TAARenderPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/TAARenderPass.d.ts new file mode 100644 index 000000000..c70de7eda --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/TAARenderPass.d.ts @@ -0,0 +1,59 @@ +/** + * + * Temporal Anti-Aliasing Render Pass. + * + * When there is no motion in the scene, the TAA render pass accumulates jittered camera + * samples across frames to create a high quality anti-aliased result. + * + * Note: This effect uses no reprojection so it is no TRAA implementation. + * + * ```js + * const taaRenderPass = new TAARenderPass( scene, camera ); + * taaRenderPass.unbiased = false; + * composer.addPass( taaRenderPass ); + * ``` + * + * @augments SSAARenderPass + * @three_import import { TAARenderPass } from 'three/addons/postprocessing/TAARenderPass.js'; + */ +export class TAARenderPass extends SSAARenderPass { + /** + * Constructs a new TAA render pass. + * + * @param {Scene} scene - The scene to render. + * @param {Camera} camera - The camera. + * @param {?(number|Color|string)} [clearColor=0x000000] - The clear color of the render pass. + * @param {?number} [clearAlpha=0] - The clear alpha of the render pass. + */ + constructor(scene: Scene, camera: Camera, clearColor?: (number | Color | string) | null, clearAlpha?: number | null); + /** + * Whether to accumulate frames or not. This enables + * the TAA. + * + * @type {boolean} + * @default false + */ + accumulate: boolean; + /** + * The accumulation index. + * + * @type {number} + * @default -1 + */ + accumulateIndex: number; + _holdRenderTarget: WebGLRenderTarget | null; + /** + * Performs the TAA render pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget, deltaTime: number): void; +} +import { SSAARenderPass } from './SSAARenderPass.js'; +import { WebGLRenderTarget } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/TexturePass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/TexturePass.d.ts new file mode 100644 index 000000000..77a24d54f --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/TexturePass.d.ts @@ -0,0 +1,64 @@ +/** + * This pass can be used to render a texture over the entire screen. + * + * ```js + * const texture = new THREE.TextureLoader().load( 'textures/2294472375_24a3b8ef46_o.jpg' ); + * texture.colorSpace = THREE.SRGBColorSpace; + * + * const texturePass = new TexturePass( texture ); + * composer.addPass( texturePass ); + * ``` + * + * @augments Pass + * @three_import import { TexturePass } from 'three/addons/postprocessing/TexturePass.js'; + */ +export class TexturePass extends Pass { + /** + * Constructs a new texture pass. + * + * @param {Texture} map - The texture to render. + * @param {number} [opacity=1] - The opacity. + */ + constructor(map: Texture, opacity?: number); + /** + * The texture to render. + * + * @type {Texture} + */ + map: Texture; + /** + * The opacity. + * + * @type {number} + * @default 1 + */ + opacity: number; + /** + * The pass uniforms. + * + * @type {Object} + */ + uniforms: Object; + /** + * The pass material. + * + * @type {ShaderMaterial} + */ + material: ShaderMaterial; + _fsQuad: FullScreenQuad; + /** + * Performs the texture pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; +} +import { Pass } from './Pass.js'; +import { ShaderMaterial } from 'three'; +import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/UnrealBloomPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/UnrealBloomPass.d.ts new file mode 100644 index 000000000..e16437efd --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/UnrealBloomPass.d.ts @@ -0,0 +1,112 @@ +/** + * This pass is inspired by the bloom pass of Unreal Engine. It creates a + * mip map chain of bloom textures and blurs them with different radii. Because + * of the weighted combination of mips, and because larger blurs are done on + * higher mips, this effect provides good quality and performance. + * + * When using this pass, tone mapping must be enabled in the renderer settings. + * + * Reference: + * - [Bloom in Unreal Engine](https://docs.unrealengine.com/latest/INT/Engine/Rendering/PostProcessEffects/Bloom/) + * + * ```js + * const resolution = new THREE.Vector2( window.innerWidth, window.innerHeight ); + * const bloomPass = new UnrealBloomPass( resolution, 1.5, 0.4, 0.85 ); + * composer.addPass( bloomPass ); + * ``` + * + * @augments Pass + * @three_import import { UnrealBloomPass } from 'three/addons/postprocessing/UnrealBloomPass.js'; + */ +export class UnrealBloomPass extends Pass { + /** + * Constructs a new Unreal Bloom pass. + * + * @param {Vector2} [resolution] - The effect's resolution. + * @param {number} [strength=1] - The Bloom strength. + * @param {number} radius - The Bloom radius. + * @param {number} threshold - The luminance threshold limits which bright areas contribute to the Bloom effect. + */ + constructor(resolution?: Vector2, strength?: number, radius: number, threshold: number); + /** + * The Bloom strength. + * + * @type {number} + * @default 1 + */ + strength: number; + /** + * The Bloom radius. Must be in the range `[0,1]`. + * + * @type {number} + */ + radius: number; + /** + * The luminance threshold limits which bright areas contribute to the Bloom effect. + * + * @type {number} + */ + threshold: number; + /** + * The effect's resolution. + * + * @type {Vector2} + * @default (256,256) + */ + resolution: Vector2; + /** + * The effect's clear color + * + * @type {Color} + * @default (0,0,0) + */ + clearColor: Color; + renderTargetsHorizontal: WebGLRenderTarget[]; + renderTargetsVertical: WebGLRenderTarget[]; + nMips: number; + renderTargetBright: WebGLRenderTarget; + highPassUniforms: Object; + materialHighPassFilter: ShaderMaterial; + separableBlurMaterials: ShaderMaterial[]; + compositeMaterial: ShaderMaterial; + bloomTintColors: Vector3[]; + copyUniforms: Object; + blendMaterial: ShaderMaterial; + _oldClearColor: Color; + _oldClearAlpha: number; + _basic: MeshBasicMaterial; + _fsQuad: FullScreenQuad; + /** + * Sets the size of the pass. + * + * @param {number} width - The width to set. + * @param {number} height - The height to set. + */ + setSize(width: number, height: number): void; + /** + * Performs the Bloom pass. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering + * destination for the pass. + * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the + * previous pass from this buffer. + * @param {number} deltaTime - The delta time in seconds. + * @param {boolean} maskActive - Whether masking is active or not. + */ + render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget, deltaTime: number, maskActive: boolean): void; + _getSeparableBlurMaterial(kernelRadius: any): ShaderMaterial; + _getCompositeMaterial(nMips: any): ShaderMaterial; +} +export namespace UnrealBloomPass { + let BlurDirectionX: Vector2; + let BlurDirectionY: Vector2; +} +import { Pass } from './Pass.js'; +import { Vector2 } from 'three'; +import { Color } from 'three'; +import { WebGLRenderTarget } from 'three'; +import { ShaderMaterial } from 'three'; +import { Vector3 } from 'three'; +import { MeshBasicMaterial } from 'three'; +import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/renderers/CSS2DRenderer.d.ts b/jsdoc-testing/jsdoc/examples/jsm/renderers/CSS2DRenderer.d.ts new file mode 100644 index 000000000..031804bfc --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/renderers/CSS2DRenderer.d.ts @@ -0,0 +1,109 @@ +/** + * ~Parameters + */ +export type CSS2DRenderer = { + /** + * - A DOM element where the renderer appends its child-elements. + * If not passed in here, a new div element will be created. + */ + element?: HTMLElement | undefined; +}; +/** + * The only type of 3D object that is supported by {@link CSS2DRenderer}. + * + * @augments Object3D + * @three_import import { CSS2DObject } from 'three/addons/renderers/CSS2DRenderer.js'; + */ +export class CSS2DObject extends Object3D { + /** + * Constructs a new CSS2D object. + * + * @param {HTMLElement} [element] - The DOM element. + */ + constructor(element?: HTMLElement); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isCSS2DObject: boolean; + /** + * The DOM element which defines the appearance of this 3D object. + * + * @type {HTMLElement} + * @readonly + * @default true + */ + readonly element: HTMLElement; + /** + * The 3D objects center point. + * `( 0, 0 )` is the lower left, `( 1, 1 )` is the top right. + * + * @type {Vector2} + * @default (0.5,0.5) + */ + center: Vector2; + copy(source: any, recursive: any): this; +} +/** + * This renderer is a simplified version of {@link CSS3DRenderer}. The only transformation that is + * supported is translation. + * + * The renderer is very useful if you want to combine HTML based labels with 3D objects. Here too, + * the respective DOM elements are wrapped into an instance of {@link CSS2DObject} and added to the + * scene graph. All other types of renderable 3D objects (like meshes or point clouds) are ignored. + * + * `CSS2DRenderer` only supports 100% browser and display zoom. + * + * @three_import import { CSS2DRenderer } from 'three/addons/renderers/CSS2DRenderer.js'; + */ +export class CSS2DRenderer { + /** + * Constructs a new CSS2D renderer. + * + * @param {CSS2DRenderer~Parameters} [parameters] - The parameters. + */ + constructor(parameters?: {}); + /** + * The DOM where the renderer appends its child-elements. + * + * @type {HTMLElement} + */ + domElement: HTMLElement; + /** + * Controls whether the renderer assigns `z-index` values to CSS2DObject DOM elements. + * If set to `true`, z-index values are assigned first based on the `renderOrder` + * and secondly - the distance to the camera. If set to `false`, no z-index values are assigned. + * + * @type {boolean} + * @default true + */ + sortObjects: boolean; + /** + * Returns an object containing the width and height of the renderer. + * + * @return {{width:number,height:number}} The size of the renderer. + */ + getSize: () => { + width: number; + height: number; + }; + /** + * Renders the given scene using the given camera. + * + * @param {Object3D} scene - A scene or any other type of 3D object. + * @param {Camera} camera - The camera. + */ + render: (scene: Object3D, camera: Camera) => void; + /** + * Resizes the renderer to the given width and height. + * + * @param {number} width - The width of the renderer. + * @param {number} height - The height of the renderer. + */ + setSize: (width: number, height: number) => void; +} +import { Object3D } from 'three'; +import { Vector2 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/renderers/CSS3DRenderer.d.ts b/jsdoc-testing/jsdoc/examples/jsm/renderers/CSS3DRenderer.d.ts new file mode 100644 index 000000000..0cf3ed245 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/renderers/CSS3DRenderer.d.ts @@ -0,0 +1,121 @@ +/** + * ~Parameters + */ +export type CSS3DRenderer = { + /** + * - A DOM element where the renderer appends its child-elements. + * If not passed in here, a new div element will be created. + */ + element?: HTMLElement | undefined; +}; +/** + * The base 3D object that is supported by {@link CSS3DRenderer}. + * + * @augments Object3D + * @three_import import { CSS3DObject } from 'three/addons/renderers/CSS3DRenderer.js'; + */ +export class CSS3DObject extends Object3D { + /** + * Constructs a new CSS3D object. + * + * @param {HTMLElement} [element] - The DOM element. + */ + constructor(element?: HTMLElement); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isCSS3DObject: boolean; + /** + * The DOM element which defines the appearance of this 3D object. + * + * @type {HTMLElement} + * @readonly + * @default true + */ + readonly element: HTMLElement; + copy(source: any, recursive: any): this; +} +/** + * A specialized version of {@link CSS3DObject} that represents + * DOM elements as sprites. + * + * @augments CSS3DObject + * @three_import import { CSS3DSprite } from 'three/addons/renderers/CSS3DRenderer.js'; + */ +export class CSS3DSprite extends CSS3DObject { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isCSS3DSprite: boolean; + /** + * The sprite's rotation in radians. + * + * @type {number} + * @default 0 + */ + rotation2D: number; + copy(source: any, recursive: any): this; +} +/** + * This renderer can be used to apply hierarchical 3D transformations to DOM elements + * via the CSS3 [transform](https://www.w3schools.com/cssref/css3_pr_transform.asp) property. + * `CSS3DRenderer` is particularly interesting if you want to apply 3D effects to a website without + * canvas based rendering. It can also be used in order to combine DOM elements with WebGL content. + * + * There are, however, some important limitations: + * + * - It's not possible to use the material system of *three.js*. + * - It's also not possible to use geometries. + * - The renderer only supports 100% browser and display zoom. + * + * So `CSS3DRenderer` is just focused on ordinary DOM elements. These elements are wrapped into special + * 3D objects ({@link CSS3DObject} or {@link CSS3DSprite}) and then added to the scene graph. + * + * @three_import import { CSS3DRenderer } from 'three/addons/renderers/CSS3DRenderer.js'; + */ +export class CSS3DRenderer { + /** + * Constructs a new CSS3D renderer. + * + * @param {CSS3DRenderer~Parameters} [parameters] - The parameters. + */ + constructor(parameters?: {}); + /** + * The DOM where the renderer appends its child-elements. + * + * @type {HTMLElement} + */ + domElement: HTMLElement; + /** + * Returns an object containing the width and height of the renderer. + * + * @return {{width:number,height:number}} The size of the renderer. + */ + getSize: () => { + width: number; + height: number; + }; + /** + * Renders the given scene using the given camera. + * + * @param {Object3D} scene - A scene or any other type of 3D object. + * @param {Camera} camera - The camera. + */ + render: (scene: Object3D, camera: Camera) => void; + /** + * Resizes the renderer to the given width and height. + * + * @param {number} width - The width of the renderer. + * @param {number} height - The height of the renderer. + */ + setSize: (width: number, height: number) => void; +} +import { Object3D } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/renderers/Projector.d.ts b/jsdoc-testing/jsdoc/examples/jsm/renderers/Projector.d.ts new file mode 100644 index 000000000..32084b049 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/renderers/Projector.d.ts @@ -0,0 +1,75 @@ +export class RenderableObject { + id: number; + object: any; + z: number; + renderOrder: number; +} +export class RenderableFace { + id: number; + v1: RenderableVertex; + v2: RenderableVertex; + v3: RenderableVertex; + normalModel: Vector3; + vertexNormalsModel: Vector3[]; + vertexNormalsLength: number; + color: Color; + material: any; + uvs: Vector2[]; + z: number; + renderOrder: number; +} +export class RenderableVertex { + position: Vector3; + positionWorld: Vector3; + positionScreen: Vector4; + visible: boolean; + copy(vertex: any): void; +} +export class RenderableLine { + id: number; + v1: RenderableVertex; + v2: RenderableVertex; + vertexColors: Color[]; + material: any; + z: number; + renderOrder: number; +} +export class RenderableSprite { + id: number; + object: any; + x: number; + y: number; + z: number; + rotation: number; + scale: Vector2; + material: any; + renderOrder: number; +} +/** + * This class can project a given scene in 3D space into a 2D representation + * used for rendering with a 2D API. `Projector` is currently used by {@link SVGRenderer} + * and was previously used by the legacy `CanvasRenderer`. + * + * @three_import import { Projector } from 'three/addons/renderers/Projector.js'; + */ +export class Projector { + /** + * Projects the given scene in 3D space into a 2D representation. The result + * is an object with renderable items. + * + * @param {Object3D} scene - A scene or any other type of 3D object. + * @param {Camera} camera - The camera. + * @param {boolean} sortObjects - Whether to sort objects or not. + * @param {boolean} sortElements - Whether to sort elements (faces, lines and sprites) or not. + * @return {{objects:Array,lights:Array,elements:Array}} The projected scene as renderable objects. + */ + projectScene: (scene: Object3D, camera: Camera, sortObjects: boolean, sortElements: boolean) => { + objects: Array; + lights: Array; + elements: Array; + }; +} +import { Vector3 } from 'three'; +import { Color } from 'three'; +import { Vector2 } from 'three'; +import { Vector4 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/renderers/SVGRenderer.d.ts b/jsdoc-testing/jsdoc/examples/jsm/renderers/SVGRenderer.d.ts new file mode 100644 index 000000000..a9813dd1b --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/renderers/SVGRenderer.d.ts @@ -0,0 +1,150 @@ +/** + * Can be used to wrap SVG elements into a 3D object. + * + * @augments Object3D + * @three_import import { SVGObject } from 'three/addons/renderers/SVGRenderer.js'; + */ +export class SVGObject extends Object3D { + /** + * Constructs a new SVG object. + * + * @param {SVGElement} node - The SVG element. + */ + constructor(node: SVGElement); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSVGObject: boolean; + /** + * This SVG element. + * + * @type {SVGElement} + */ + node: SVGElement; +} +/** + * This renderer an be used to render geometric data using SVG. The produced vector + * graphics are particular useful in the following use cases: + * + * - Animated logos or icons. + * - Interactive 2D/3D diagrams or graphs. + * - Interactive maps. + * - Complex or animated user interfaces. + * + * `SVGRenderer` has various advantages. It produces crystal-clear and sharp output which + * is independent of the actual viewport resolution.SVG elements can be styled via CSS. + * And they have good accessibility since it's possible to add metadata like title or description + * (useful for search engines or screen readers). + * + * There are, however, some important limitations: + * - No advanced shading. + * - No texture support. + * - No shadow support. + * + * @three_import import { SVGRenderer } from 'three/addons/renderers/SVGRenderer.js'; + */ +export class SVGRenderer { + /** + * The DOM where the renderer appends its child-elements. + * + * @type {SVGSVGElement} + */ + domElement: SVGSVGElement; + /** + * Whether to automatically perform a clear before a render call or not. + * + * @type {boolean} + * @default true + */ + autoClear: boolean; + /** + * Whether to sort 3D objects or not. + * + * @type {boolean} + * @default true + */ + sortObjects: boolean; + /** + * Whether to sort elements or not. + * + * @type {boolean} + * @default true + */ + sortElements: boolean; + /** + * Number of fractional pixels to enlarge polygons in order to + * prevent anti-aliasing gaps. Range is `[0,1]`. + * + * @type {number} + * @default 0.5 + */ + overdraw: number; + /** + * The output color space. + * + * @type {(SRGBColorSpace|LinearSRGBColorSpace)} + * @default SRGBColorSpace + */ + outputColorSpace: (string | LinearSRGBColorSpace); + /** + * Provides information about the number of + * rendered vertices and faces. + * + * @type {Object} + */ + info: Object; + /** + * Sets the render quality. Setting to `high` makes the browser improve SVG quality + * over rendering speed and geometric precision. + * + * @param {('low'|'high')} quality - The quality. + */ + setQuality: (quality: ("low" | "high")) => void; + /** + * Sets the clear color. + * + * @param {(number|Color|string)} color - The clear color to set. + */ + setClearColor: (color: (number | Color | string)) => void; + setPixelRatio: () => void; + /** + * Resizes the renderer to the given width and height. + * + * @param {number} width - The width of the renderer. + * @param {number} height - The height of the renderer. + */ + setSize: (width: number, height: number) => void; + /** + * Returns an object containing the width and height of the renderer. + * + * @return {{width:number,height:number}} The size of the renderer. + */ + getSize: () => { + width: number; + height: number; + }; + /** + * Sets the precision of the data used to create a paths. + * + * @param {number} precision - The precision to set. + */ + setPrecision: (precision: number) => void; + /** + * Performs a manual clear with the defined clear color. + */ + clear: () => void; + /** + * Renders the given scene using the given camera. + * + * @param {Object3D} scene - A scene or any other type of 3D object. + * @param {Camera} camera - The camera. + */ + render: (scene: Object3D, camera: Camera) => void; +} +import { Object3D } from 'three'; +import { Color } from 'three'; +import { Camera } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts new file mode 100644 index 000000000..31079d7c7 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts @@ -0,0 +1,15 @@ +/** + * @module ACESFilmicToneMappingShader + * @three_import import { ACESFilmicToneMappingShader } from 'three/addons/shaders/ACESFilmicToneMappingShader.js'; + */ +/** + * ACES Filmic Tone Mapping Shader by Stephen Hill. + * Reference: [ltc_blit.fs](https://github.com/selfshadow/ltc_code/blob/master/webgl/shaders/ltc/ltc_blit.fs) + * + * This implementation of ACES is modified to accommodate a brighter viewing environment. + * The scale factor of 1/0.6 is subjective. See discussion in #19621. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const ACESFilmicToneMappingShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/AfterimageShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/AfterimageShader.d.ts new file mode 100644 index 000000000..440b592fa --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/AfterimageShader.d.ts @@ -0,0 +1,11 @@ +/** + * @module AfterimageShader + * @three_import import { AfterimageShader } from 'three/addons/shaders/AfterimageShader.js'; + */ +/** + * Inspired by [Three.js FBO motion trails](https://codepen.io/brunoimbrizi/pen/MoRJaN?page=1&). + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const AfterimageShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/BasicShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/BasicShader.d.ts new file mode 100644 index 000000000..18bfeb90b --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/BasicShader.d.ts @@ -0,0 +1,11 @@ +/** + * @module BasicShader + * @three_import import { BasicShader } from 'three/addons/shaders/BasicShader.js'; + */ +/** + * Simple shader for testing. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const BasicShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/BleachBypassShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/BleachBypassShader.d.ts new file mode 100644 index 000000000..a1ccf8066 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/BleachBypassShader.d.ts @@ -0,0 +1,12 @@ +/** + * @module BleachBypassShader + * @three_import import { BleachBypassShader } from 'three/addons/shaders/BleachBypassShader.js'; + */ +/** + * Bleach bypass shader [http://en.wikipedia.org/wiki/Bleach_bypass] based on + * [Nvidia Shader library](http://developer.download.nvidia.com/shaderlibrary/webpages/shader_library.html#post_bleach_bypass). + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const BleachBypassShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/BlendShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/BlendShader.d.ts new file mode 100644 index 000000000..e611c0440 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/BlendShader.d.ts @@ -0,0 +1,11 @@ +/** + * @module BlendShader + * @three_import import { BlendShader } from 'three/addons/shaders/BlendShader.js'; + */ +/** + * Blends two textures. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const BlendShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/BokehShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/BokehShader.d.ts new file mode 100644 index 000000000..8f1a07d14 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/BokehShader.d.ts @@ -0,0 +1,12 @@ +/** + * @module BokehShader + * @three_import import { BokehShader } from 'three/addons/shaders/BokehShader.js'; + */ +/** + * Depth-of-field shader with bokeh ported from + * [GLSL shader by Martins Upitis](http://artmartinsh.blogspot.com/2010/02/glsl-lens-blur-filter-with-bokeh.html). + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const BokehShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/BokehShader2.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/BokehShader2.d.ts new file mode 100644 index 000000000..ee60e93f0 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/BokehShader2.d.ts @@ -0,0 +1,28 @@ +/** + * @module BokehShader2 + * @three_import import { BokehShader, BokehDepthShader } from 'three/addons/shaders/BokehShader2.js'; + */ +/** + * Depth-of-field shader with bokeh ported from + * [GLSL shader by Martins Upitis](http://blenderartists.org/forum/showthread.php?237488-GLSL-depth-of-field-with-bokeh-v2-4-(update)). + * + * Requires #define RINGS and SAMPLES integers + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const BokehShader: ShaderMaterial; +export namespace BokehDepthShader { + let name: string; + namespace uniforms { + namespace mNear { + let value: number; + } + namespace mFar { + let value_1: number; + export { value_1 as value }; + } + } + let vertexShader: string; + let fragmentShader: string; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/BrightnessContrastShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/BrightnessContrastShader.d.ts new file mode 100644 index 000000000..cab589f4b --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/BrightnessContrastShader.d.ts @@ -0,0 +1,13 @@ +/** + * @module BrightnessContrastShader + * @three_import import { BrightnessContrastShader } from 'three/addons/shaders/BrightnessContrastShader.js'; + */ +/** + * Brightness and contrast adjustment {@link https://github.com/evanw/glfx.js}. + * Brightness: -1 to 1 (-1 is solid black, 0 is no change, and 1 is solid white) + * Contrast: -1 to 1 (-1 is solid gray, 0 is no change, and 1 is maximum contrast) + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const BrightnessContrastShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/ColorCorrectionShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/ColorCorrectionShader.d.ts new file mode 100644 index 000000000..1172081b2 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/ColorCorrectionShader.d.ts @@ -0,0 +1,11 @@ +/** + * @module ColorCorrectionShader + * @three_import import { ColorCorrectionShader } from 'three/addons/shaders/ColorCorrectionShader.js'; + */ +/** + * Color correction shader. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const ColorCorrectionShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/ColorifyShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/ColorifyShader.d.ts new file mode 100644 index 000000000..ad6864f45 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/ColorifyShader.d.ts @@ -0,0 +1,11 @@ +/** + * @module ColorifyShader + * @three_import import { ColorifyShader } from 'three/addons/shaders/ColorifyShader.js'; + */ +/** + * Colorify shader. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const ColorifyShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/ConvolutionShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/ConvolutionShader.d.ts new file mode 100644 index 000000000..f272adf10 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/ConvolutionShader.d.ts @@ -0,0 +1,11 @@ +/** + * @module ConvolutionShader + * @three_import import { ConvolutionShader } from 'three/addons/shaders/ConvolutionShader.js'; + */ +/** + * Convolution shader ported from o3d sample to WebGL / GLSL. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const ConvolutionShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/CopyShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/CopyShader.d.ts new file mode 100644 index 000000000..9afca73ca --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/CopyShader.d.ts @@ -0,0 +1,11 @@ +/** + * @module CopyShader + * @three_import import { CopyShader } from 'three/addons/shaders/CopyShader.js'; + */ +/** + * Full-screen copy shader pass. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const CopyShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/DOFMipMapShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/DOFMipMapShader.d.ts new file mode 100644 index 000000000..be1d0dc76 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/DOFMipMapShader.d.ts @@ -0,0 +1,13 @@ +/** + * @module DOFMipMapShader + * @three_import import { DOFMipMapShader } from 'three/addons/shaders/DOFMipMapShader.js'; + */ +/** + * Depth-of-field shader using mipmaps from Matt Handley @applmak. + * + * Requires power-of-2 sized render target with enabled mipmaps. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const DOFMipMapShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/DepthLimitedBlurShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/DepthLimitedBlurShader.d.ts new file mode 100644 index 000000000..1aebc77ee --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/DepthLimitedBlurShader.d.ts @@ -0,0 +1,18 @@ +/** + * @module DepthLimitedBlurShader + * @three_import import { DepthLimitedBlurShader, BlurShaderUtils } from 'three/addons/shaders/DepthLimitedBlurShader.js'; + */ +/** + * TODO + * + * Used by {@link SAOPass}. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const DepthLimitedBlurShader: ShaderMaterial; +export namespace BlurShaderUtils { + function createSampleWeights(kernelRadius: any, stdDev: any): number[]; + function createSampleOffsets(kernelRadius: any, uvIncrement: any): any[]; + function configure(material: any, kernelRadius: any, stdDev: any, uvIncrement: any): void; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/DigitalGlitch.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/DigitalGlitch.d.ts new file mode 100644 index 000000000..2e3ea3fc5 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/DigitalGlitch.d.ts @@ -0,0 +1,11 @@ +/** + * @module DigitalGlitch + * @three_import import { DigitalGlitch } from 'three/addons/shaders/DigitalGlitch.js'; + */ +/** + * Digital glitch shader. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const DigitalGlitch: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/DotScreenShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/DotScreenShader.d.ts new file mode 100644 index 000000000..1b7a05f1b --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/DotScreenShader.d.ts @@ -0,0 +1,11 @@ +/** + * @module DotScreenShader + * @three_import import { DotScreenShader } from 'three/addons/shaders/DotScreenShader.js'; + */ +/** + * Dot screen shader based on [glfx.js sepia shader](https://github.com/evanw/glfx.js). + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const DotScreenShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/ExposureShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/ExposureShader.d.ts new file mode 100644 index 000000000..adce4846b --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/ExposureShader.d.ts @@ -0,0 +1,11 @@ +/** + * @module ExposureShader + * @three_import import { ExposureShader } from 'three/addons/shaders/ExposureShader.js'; + */ +/** + * TODO + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const ExposureShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/FXAAShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/FXAAShader.d.ts new file mode 100644 index 000000000..069ce39da --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/FXAAShader.d.ts @@ -0,0 +1,15 @@ +/** + * @module FXAAShader + * @three_import import { FXAAShader } from 'three/addons/shaders/FXAAShader.js'; + */ +/** + * FXAA algorithm from NVIDIA, C# implementation by Jasper Flick, GLSL port by Dave Hoskins. + * + * References: + * - {@link http://developer.download.nvidia.com/assets/gamedev/files/sdk/11/FXAA_WhitePaper.pdf}. + * - {@link https://catlikecoding.com/unity/tutorials/advanced-rendering/fxaa/}. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const FXAAShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/FilmShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/FilmShader.d.ts new file mode 100644 index 000000000..0c8f4d01a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/FilmShader.d.ts @@ -0,0 +1,13 @@ +/** + * @module FilmShader + * @three_import import { FilmShader } from 'three/addons/shaders/FilmShader.js'; + */ +/** + * TODO + * + * Used by {@link FilmPass}. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const FilmShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/FocusShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/FocusShader.d.ts new file mode 100644 index 000000000..350ddb21f --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/FocusShader.d.ts @@ -0,0 +1,11 @@ +/** + * @module FocusShader + * @three_import import { FocusShader } from 'three/addons/shaders/FocusShader.js'; + */ +/** + * Focus shader based on [PaintEffect postprocess from ro.me](http://code.google.com/p/3-dreams-of-black/source/browse/deploy/js/effects/PaintEffect.js). + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const FocusShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/FreiChenShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/FreiChenShader.d.ts new file mode 100644 index 000000000..90085fb50 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/FreiChenShader.d.ts @@ -0,0 +1,14 @@ +/** + * @module FreiChenShader + * @three_import import { FreiChenShader } from 'three/addons/shaders/FreiChenShader.js'; + */ +/** + * Edge Detection Shader using Frei-Chen filter. + * Based on {@link http://rastergrid.com/blog/2011/01/frei-chen-edge-detector}. + * + * aspect: vec2 of (1/width, 1/height) + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const FreiChenShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/GTAOShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/GTAOShader.d.ts new file mode 100644 index 000000000..ffb41db2f --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/GTAOShader.d.ts @@ -0,0 +1,31 @@ +export function generateMagicSquareNoise(size?: number): DataTexture; +/** + * @module GTAOShader + * @three_import import { GTAOShader } from 'three/addons/shaders/GTAOShader.js'; + */ +/** + * GTAO shader. Use by {@link GTAOPass}. + * + * References: + * - [Practical Realtime Strategies for Accurate Indirect Occlusion](https://iryoku.com/downloads/Practical-Realtime-Strategies-for-Accurate-Indirect-Occlusion.pdf). + * - [Horizon-Based Indirect Lighting (HBIL)](https://github.com/Patapom/GodComplex/blob/master/Tests/TestHBIL/2018%20Mayaux%20-%20Horizon-Based%20Indirect%20Lighting%20(HBIL).pdf) + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const GTAOShader: ShaderMaterial; +/** + * GTAO depth shader. Use by {@link GTAOPass}. + * + * @constant + * @type {Object} + */ +export const GTAODepthShader: Object; +/** + * GTAO blend shader. Use by {@link GTAOPass}. + * + * @constant + * @type {Object} + */ +export const GTAOBlendShader: Object; +import { DataTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/GammaCorrectionShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/GammaCorrectionShader.d.ts new file mode 100644 index 000000000..283eb77b0 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/GammaCorrectionShader.d.ts @@ -0,0 +1,14 @@ +/** + * @module GammaCorrectionShader + * @three_import import { GammaCorrectionShader } from 'three/addons/shaders/GammaCorrectionShader.js'; + */ +/** + * Gamma Correction Shader + * + * References: + * - {@link http://en.wikipedia.org/wiki/gamma_correction}. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const GammaCorrectionShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/HalftoneShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/HalftoneShader.d.ts new file mode 100644 index 000000000..2114cfc0f --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/HalftoneShader.d.ts @@ -0,0 +1,16 @@ +/** + * @module HalftoneShader + * @three_import import { HalftoneShader } from 'three/addons/shaders/HalftoneShader.js'; + */ +/** + * RGB Halftone shader. + * + * Used by {@link HalftonePass}. + * + * Shape (1 = Dot, 2 = Ellipse, 3 = Line, 4 = Square, 5 = Diamond) + * Blending Mode (1 = Linear, 2 = Multiply, 3 = Add, 4 = Lighter, 5 = Darker) + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const HalftoneShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/HorizontalBlurShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/HorizontalBlurShader.d.ts new file mode 100644 index 000000000..28377f8a9 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/HorizontalBlurShader.d.ts @@ -0,0 +1,18 @@ +/** + * @module HorizontalBlurShader + * @three_import import { HorizontalBlurShader } from 'three/addons/shaders/HorizontalBlurShader.js'; + */ +/** + * Two pass Gaussian blur filter (horizontal and vertical blur shaders). + * + * References: + * - {@link http://www.cake23.de/traveling-wavefronts-lit-up.html}. + * + * - 9 samples per pass + * - standard deviation 2.7 + * - "h" and "v" parameters should be set to "1 / width" and "1 / height" + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const HorizontalBlurShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts new file mode 100644 index 000000000..f50eb117e --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts @@ -0,0 +1,16 @@ +/** + * @module HorizontalTiltShiftShader + * @three_import import { HorizontalTiltShiftShader } from 'three/addons/shaders/HorizontalTiltShiftShader.js'; + */ +/** + * Simple fake tilt-shift effect, modulating two pass Gaussian blur (see above) by vertical position. + * + * - 9 samples per pass + * - standard deviation 2.7 + * - "h" and "v" parameters should be set to "1 / width" and "1 / height" + * - "r" parameter control where "focused" horizontal line lies + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const HorizontalTiltShiftShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/HueSaturationShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/HueSaturationShader.d.ts new file mode 100644 index 000000000..7447091f8 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/HueSaturationShader.d.ts @@ -0,0 +1,14 @@ +/** + * @module HueSaturationShader + * @three_import import { HueSaturationShader } from 'three/addons/shaders/HueSaturationShader.js'; + */ +/** + * Hue and saturation adjustment, {@link https://github.com/evanw/glfx.js}. + * + * hue: -1 to 1 (-1 is 180 degrees in the negative direction, 0 is no change, etc. + * saturation: -1 to 1 (-1 is solid gray, 0 is no change, and 1 is maximum contrast) + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const HueSaturationShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/KaleidoShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/KaleidoShader.d.ts new file mode 100644 index 000000000..15e4c2f5d --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/KaleidoShader.d.ts @@ -0,0 +1,17 @@ +/** + * @module KaleidoShader + * @three_import import { KaleidoShader } from 'three/addons/shaders/KaleidoShader.js'; + */ +/** + * Kaleidoscope Shader. + * Radial reflection around center point + * Ported from: {@link http://pixelshaders.com/editor/} + * by [Toby Schachman](http://tobyschachman.com/) + * + * sides: number of reflections + * angle: initial angle in radians + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const KaleidoShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/LuminosityHighPassShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/LuminosityHighPassShader.d.ts new file mode 100644 index 000000000..921107772 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/LuminosityHighPassShader.d.ts @@ -0,0 +1,11 @@ +/** + * @module LuminosityHighPassShader + * @three_import import { LuminosityHighPassShader } from 'three/addons/shaders/LuminosityHighPassShader.js'; + */ +/** + * Luminosity high pass shader. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const LuminosityHighPassShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/LuminosityShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/LuminosityShader.d.ts new file mode 100644 index 000000000..846896a76 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/LuminosityShader.d.ts @@ -0,0 +1,11 @@ +/** + * @module LuminosityShader + * @three_import import { LuminosityShader } from 'three/addons/shaders/LuminosityShader.js'; + */ +/** + * Luminosity shader. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const LuminosityShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/MirrorShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/MirrorShader.d.ts new file mode 100644 index 000000000..418c2ee5b --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/MirrorShader.d.ts @@ -0,0 +1,13 @@ +/** + * @module MirrorShader + * @three_import import { MirrorShader } from 'three/addons/shaders/MirrorShader.js'; + */ +/** + * Copies half the input to the other half. + * + * side: side of input to mirror (0 = left, 1 = right, 2 = top, 3 = bottom). + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const MirrorShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/NormalMapShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/NormalMapShader.d.ts new file mode 100644 index 000000000..8a3269372 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/NormalMapShader.d.ts @@ -0,0 +1,10 @@ +/** + * @module NormalMapShader + * @three_import import { NormalMapShader } from 'three/addons/shaders/NormalMapShader.js'; + */ +/** + * Normal map shader, compute normals from heightmap. + * @constant + * @type {ShaderMaterial~Shader} + */ +export const NormalMapShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/OutputShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/OutputShader.d.ts new file mode 100644 index 000000000..92a0cb17a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/OutputShader.d.ts @@ -0,0 +1,14 @@ +/** + * @module OutputShader + * @three_import import { OutputShader } from 'three/addons/shaders/OutputShader.js'; + */ +/** + * Performs tone mapping and color space conversion for + * FX workflows. + * + * Used by {@link OutputPass}. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const OutputShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/PoissonDenoiseShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/PoissonDenoiseShader.d.ts new file mode 100644 index 000000000..096d7a99f --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/PoissonDenoiseShader.d.ts @@ -0,0 +1,16 @@ +export function generatePdSamplePointInitializer(samples: any, rings: any, radiusExponent: any): string; +/** + * @module PoissonDenoiseShader + * @three_import import { PoissonDenoiseShader } from 'three/addons/shaders/PoissonDenoiseShader.js'; + */ +/** + * Poisson Denoise Shader. + * + * References: + * - [Self-Supervised Poisson-Gaussian Denoising](https://openaccess.thecvf.com/content/WACV2021/papers/Khademi_Self-Supervised_Poisson-Gaussian_Denoising_WACV_2021_paper.pdf). + * - [Poisson2Sparse: Self-Supervised Poisson Denoising From a Single Image](https://arxiv.org/pdf/2206.01856.pdf) + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const PoissonDenoiseShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/RGBShiftShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/RGBShiftShader.d.ts new file mode 100644 index 000000000..18ef03581 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/RGBShiftShader.d.ts @@ -0,0 +1,17 @@ +/** + * @module RGBShiftShader + * @three_import import { RGBShiftShader } from 'three/addons/shaders/RGBShiftShader.js'; + */ +/** + * RGB Shift Shader + * Shifts red and blue channels from center in opposite directions + * Ported from https://web.archive.org/web/20090820185047/http://kriss.cx/tom/2009/05/rgb-shift/ + * by Tom Butterworth / https://web.archive.org/web/20090810054752/http://kriss.cx/tom/ + * + * amount: shift distance (1 is width of input) + * angle: shift angle in radians + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const RGBShiftShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/SAOShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/SAOShader.d.ts new file mode 100644 index 000000000..b6bcb6d30 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/SAOShader.d.ts @@ -0,0 +1,13 @@ +/** + * @module SAOShader + * @three_import import { SAOShader } from 'three/addons/shaders/SAOShader.js'; + */ +/** + * SAO shader. + * + * Used by {@link SAOPass}. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const SAOShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/SMAAShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/SMAAShader.d.ts new file mode 100644 index 000000000..62c115472 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/SMAAShader.d.ts @@ -0,0 +1,31 @@ +/** + * WebGL port of Subpixel Morphological Antialiasing (SMAA) v2.8 + * Preset: SMAA 1x Medium (with color edge detection) + * + * References: + * - {@link https://github.com/iryoku/smaa/releases/tag/v2.8} + * + * @module SMAAShader + * @three_import import { SMAAShader } from 'three/addons/shaders/SMAAShader.js'; + */ +/** + * SMAA Edges shader. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const SMAAEdgesShader: ShaderMaterial; +/** + * SMAA Weights shader. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const SMAAWeightsShader: ShaderMaterial; +/** + * SMAA Blend shader. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const SMAABlendShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/SSAOShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/SSAOShader.d.ts new file mode 100644 index 000000000..eeb9afa46 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/SSAOShader.d.ts @@ -0,0 +1,30 @@ +/** + * @module SSAOShader + * @three_import import { SSAOShader } from 'three/addons/shaders/SSAOShader.js'; + */ +/** + * SSAO shader. + * + * References: + * - {@link http://john-chapman-graphics.blogspot.com/2013/01/ssao-tutorial.html} + * - {@link https://learnopengl.com/Advanced-Lighting/SSAO} + * - {@link https://github.com/McNopper/OpenGL/blob/master/Example28/shader/ssao.frag.glsl} + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const SSAOShader: ShaderMaterial; +/** + * SSAO depth shader. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const SSAODepthShader: ShaderMaterial; +/** + * SSAO blur shader. + * + * @constant + * @type {Object} + */ +export const SSAOBlurShader: Object; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/SSRShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/SSRShader.d.ts new file mode 100644 index 000000000..6bb69e4d6 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/SSRShader.d.ts @@ -0,0 +1,30 @@ +/** + * A collection of shaders used for SSR. + * + * References: + * - [3D Game Shaders For Beginners, Screen Space Reflection (SSR)](https://lettier.github.io/3d-game-shaders-for-beginners/screen-space-reflection.html). + * + * @module SSRShader + * @three_import import * as SSRShader from 'three/addons/shaders/SSRShader.js'; + */ +/** + * SSR shader. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const SSRShader: ShaderMaterial; +/** + * SSR Depth shader. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const SSRDepthShader: ShaderMaterial; +/** + * SSR Blur shader. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const SSRBlurShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/SepiaShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/SepiaShader.d.ts new file mode 100644 index 000000000..28750538f --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/SepiaShader.d.ts @@ -0,0 +1,11 @@ +/** + * @module SepiaShader + * @three_import import { SepiaShader } from 'three/addons/shaders/SepiaShader.js'; + */ +/** + * Sepia tone shader based on [glfx.js sepia shader](https://github.com/evanw/glfx.js). + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const SepiaShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/SobelOperatorShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/SobelOperatorShader.d.ts new file mode 100644 index 000000000..6eba3a4ca --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/SobelOperatorShader.d.ts @@ -0,0 +1,13 @@ +/** + * @module SobelOperatorShader + * @three_import import { SobelOperatorShader } from 'three/addons/shaders/SobelOperatorShader.js'; + */ +/** + * Sobel Edge Detection (see {@link https://youtu.be/uihBwtPIBxM}). + * + * As mentioned in the video the Sobel operator expects a grayscale image as input. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const SobelOperatorShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/SubsurfaceScatteringShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/SubsurfaceScatteringShader.d.ts new file mode 100644 index 000000000..b9f7b54f7 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/SubsurfaceScatteringShader.d.ts @@ -0,0 +1,13 @@ +/** + * @module SubsurfaceScatteringShader + * @three_import import { SubsurfaceScatteringShader } from 'three/addons/shaders/SubsurfaceScatteringShader.js'; + */ +/** + * Subsurface Scattering shader. + * + * Based on GDC 2011 – [Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look](https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/) + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const SubsurfaceScatteringShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/TechnicolorShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/TechnicolorShader.d.ts new file mode 100644 index 000000000..5b94f59de --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/TechnicolorShader.d.ts @@ -0,0 +1,13 @@ +/** + * @module TriangleBlurShader + * @three_import import { TriangleBlurShader } from 'three/addons/shaders/TriangleBlurShader.js'; + */ +/** + * Simulates the look of the two-strip technicolor process popular in early 20th century films. + * More historical info here: {@link http://www.widescreenmuseum.com/oldcolor/technicolor1.htm} + * Demo here: {@link http://charliehoey.com/technicolor_shader/shader_test.html} + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const TechnicolorShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/ToonShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/ToonShader.d.ts new file mode 100644 index 000000000..27e8ccfa4 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/ToonShader.d.ts @@ -0,0 +1,34 @@ +/** + * Collection of toon shaders. + * + * @module TriangleBlurShader + * @three_import import * as ToonShader from 'three/addons/shaders/ToonShader.js'; + */ +/** + * Toon1 shader. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const ToonShader1: ShaderMaterial; +/** + * Toon2 shader. + * + * @constant + * @type {Object} + */ +export const ToonShader2: Object; +/** + * Toon Hatching shader. + * + * @constant + * @type {Object} + */ +export const ToonShaderHatching: Object; +/** + * Toon Dotted shader. + * + * @constant + * @type {Object} + */ +export const ToonShaderDotted: Object; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/TriangleBlurShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/TriangleBlurShader.d.ts new file mode 100644 index 000000000..ead206593 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/TriangleBlurShader.d.ts @@ -0,0 +1,15 @@ +/** + * @module TriangleBlurShader + * @three_import import { TriangleBlurShader } from 'three/addons/shaders/TriangleBlurShader.js'; + */ +/** + * Triangle blur shader based on [glfx.js triangle blur shader](https://github.com/evanw/glfx.js). + * + * A basic blur filter, which convolves the image with a + * pyramid filter. The pyramid filter is separable and is applied as two + * perpendicular triangle filters. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const TriangleBlurShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts new file mode 100644 index 000000000..f351e2dd6 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts @@ -0,0 +1,11 @@ +/** + * @module UnpackDepthRGBAShader + * @three_import import { UnpackDepthRGBAShader } from 'three/addons/shaders/UnpackDepthRGBAShader.js'; + */ +/** + * Depth visualization shader that shows depth values as monochrome color. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const UnpackDepthRGBAShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/VelocityShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/VelocityShader.d.ts new file mode 100644 index 000000000..db4b5800b --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/VelocityShader.d.ts @@ -0,0 +1,11 @@ +/** + * @module VelocityShader + * @three_import import { VelocityShader } from 'three/addons/shaders/VelocityShader.js'; + */ +/** + * Mesh velocity shader by @bhouston. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const VelocityShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/VerticalBlurShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/VerticalBlurShader.d.ts new file mode 100644 index 000000000..ff448f282 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/VerticalBlurShader.d.ts @@ -0,0 +1,16 @@ +/** + * @module VerticalBlurShader + * @three_import import { VerticalBlurShader } from 'three/addons/shaders/VerticalBlurShader.js'; + */ +/** + * Two pass Gaussian blur filter (horizontal and vertical blur shaders) + * - see {@link http://www.cake23.de/traveling-wavefronts-lit-up.html} + * + * - 9 samples per pass + * - standard deviation 2.7 + * - "h" and "v" parameters should be set to "1 / width" and "1 / height" + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const VerticalBlurShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/VerticalTiltShiftShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/VerticalTiltShiftShader.d.ts new file mode 100644 index 000000000..341f5b80c --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/VerticalTiltShiftShader.d.ts @@ -0,0 +1,16 @@ +/** + * @module VerticalTiltShiftShader + * @three_import import { VerticalTiltShiftShader } from 'three/addons/shaders/VerticalTiltShiftShader.js'; + */ +/** + * Simple fake tilt-shift effect, modulating two pass Gaussian blur (see above) by vertical position + * + * - 9 samples per pass + * - standard deviation 2.7 + * - "h" and "v" parameters should be set to "1 / width" and "1 / height" + * - "r" parameter control where "focused" horizontal line lies + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const VerticalTiltShiftShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/VignetteShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/VignetteShader.d.ts new file mode 100644 index 000000000..9461b9018 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/VignetteShader.d.ts @@ -0,0 +1,11 @@ +/** + * @module VignetteShader + * @three_import import { VignetteShader } from 'three/addons/shaders/VignetteShader.js'; + */ +/** + * Based on [PaintEffect postprocess from ro.me](https://github.com/dataarts/3-dreams-of-black/blob/master/deploy/js/effects/PaintEffect.js). + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const VignetteShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/VolumeShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/VolumeShader.d.ts new file mode 100644 index 000000000..04bbdc80d --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/VolumeShader.d.ts @@ -0,0 +1,13 @@ +/** + * @module VolumeShader + * @three_import import { VolumeRenderShader1 } from 'three/addons/shaders/VolumeShader.js'; + */ +/** + * Shaders to render 3D volumes using raycasting. + * The applied techniques are based on similar implementations in the Visvis and Vispy projects. + * This is not the only approach, therefore it's marked 1. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const VolumeRenderShader1: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/WaterRefractionShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/WaterRefractionShader.d.ts new file mode 100644 index 000000000..5b5c7ff3a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/shaders/WaterRefractionShader.d.ts @@ -0,0 +1,11 @@ +/** + * @module WaterRefractionShader + * @three_import import { WaterRefractionShader } from 'three/addons/shaders/WaterRefractionShader.js'; + */ +/** + * Basic water refraction shader. + * + * @constant + * @type {ShaderMaterial~Shader} + */ +export const WaterRefractionShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/textures/FlakesTexture.d.ts b/jsdoc-testing/jsdoc/examples/jsm/textures/FlakesTexture.d.ts new file mode 100644 index 000000000..40226d8e3 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/textures/FlakesTexture.d.ts @@ -0,0 +1,17 @@ +/** + * Utility class for generating a flakes texture image. This image might be used + * as a normal map to produce a car paint like effect. + * + * @three_import import { FlakesTexture } from 'three/addons/textures/FlakesTexture.js'; + */ +export class FlakesTexture { + /** + * Generates a new flakes texture image. The result is a canvas + * that can be used as an input for {@link CanvasTexture}. + * + * @param {number} [width=512] - The width of the image. + * @param {number} [height=512] - The height of the image. + * @return {HTMLCanvasElement} The generated image. + */ + constructor(width?: number, height?: number); +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/transpiler/AST.d.ts b/jsdoc-testing/jsdoc/examples/jsm/transpiler/AST.d.ts new file mode 100644 index 000000000..81bdeb7af --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/transpiler/AST.d.ts @@ -0,0 +1,190 @@ +export class ASTNode { + isASTNode: boolean; + linker: { + reference: null; + accesses: never[]; + assignments: never[]; + }; + parent: any; + get isNumericExpression(): boolean; + get hasAssignment(): any; + getType(): any; + getProgram(): this | null; + getParent(parents?: any[]): any; + initialize(): void; +} +export class Comment extends ASTNode { + constructor(comment: any); + comment: any; + isComment: boolean; +} +export class Program extends ASTNode { + constructor(body?: any[]); + body: any[]; + structTypes: Map; + isProgram: boolean; +} +export class VariableDeclaration extends ASTNode { + constructor(type: any, name: any, value?: null, next?: null, immutable?: boolean); + type: any; + name: any; + value: any; + next: any; + immutable: boolean; + isVariableDeclaration: boolean; + get isAssignment(): boolean; +} +export class Uniform extends ASTNode { + constructor(type: any, name: any); + type: any; + name: any; + isUniform: boolean; +} +export class Varying extends ASTNode { + constructor(type: any, name: any); + type: any; + name: any; + isVarying: boolean; +} +export class FunctionParameter extends ASTNode { + constructor(type: any, name: any, qualifier?: null, immutable?: boolean); + type: any; + name: any; + qualifier: any; + immutable: boolean; + isFunctionParameter: boolean; +} +export class FunctionDeclaration extends ASTNode { + constructor(type: any, name: any, params?: any[], body?: any[]); + type: any; + name: any; + params: any[]; + body: any[]; + isFunctionDeclaration: boolean; +} +export class Expression extends ASTNode { + constructor(expression: any); + expression: any; + isExpression: boolean; +} +export class Ternary extends ASTNode { + constructor(cond: any, left: any, right: any); + cond: any; + left: any; + right: any; + isTernary: boolean; +} +export class Operator extends ASTNode { + constructor(type: any, left: any, right: any); + type: any; + left: any; + right: any; + isOperator: boolean; + get isAssignment(): boolean; +} +export class Unary extends ASTNode { + constructor(type: any, expression: any, after?: boolean); + type: any; + expression: any; + after: boolean; + isUnary: boolean; + get isAssignment(): boolean; +} +export class Number extends ASTNode { + constructor(value: any, type?: string); + type: string; + value: any; + isNumber: boolean; +} +export class String extends ASTNode { + constructor(value: any); + value: any; + isString: boolean; +} +export class Conditional extends ASTNode { + constructor(cond?: null, body?: any[]); + cond: any; + body: any[]; + elseConditional: any; + isConditional: boolean; +} +export class FunctionCall extends ASTNode { + constructor(name: any, params?: any[]); + name: any; + params: any[]; + isFunctionCall: boolean; +} +export class Return extends ASTNode { + constructor(value: any); + value: any; + isReturn: boolean; +} +export class Discard extends ASTNode { + isDiscard: boolean; +} +export class Continue extends ASTNode { + isContinue: boolean; +} +export class Break extends ASTNode { + isBreak: boolean; +} +export class Accessor extends ASTNode { + constructor(property: any); + property: any; + isAccessor: boolean; +} +export class StaticElement extends ASTNode { + constructor(value: any); + value: any; + isStaticElement: boolean; +} +export class DynamicElement extends ASTNode { + constructor(value: any); + value: any; + isDynamicElement: boolean; +} +export class AccessorElements extends ASTNode { + constructor(object: any, elements?: any[]); + object: any; + elements: any[]; + isAccessorElements: boolean; +} +export class For extends ASTNode { + constructor(initialization: any, condition: any, afterthought: any, body?: any[]); + initialization: any; + condition: any; + afterthought: any; + body: any[]; + isFor: boolean; +} +export class While extends ASTNode { + constructor(condition: any, body?: any[]); + condition: any; + body: any[]; + isWhile: boolean; +} +export class Switch extends ASTNode { + constructor(discriminant: any, cases: any); + discriminant: any; + cases: any; + isSwitch: boolean; +} +export class SwitchCase extends ASTNode { + constructor(body: any, conditions?: null); + body: any; + conditions: any; + isDefault: boolean; + isSwitchCase: boolean; +} +export class StructMember { + constructor(type: any, name: any); + type: any; + name: any; + isStructMember: boolean; +} +export class StructDefinition extends ASTNode { + constructor(name: any, members?: any[]); + name: any; + members: any[]; + isStructDefinition: boolean; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/transpiler/GLSLDecoder.d.ts b/jsdoc-testing/jsdoc/examples/jsm/transpiler/GLSLDecoder.d.ts new file mode 100644 index 000000000..10eeefc6a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/transpiler/GLSLDecoder.d.ts @@ -0,0 +1,70 @@ +export default GLSLDecoder; +declare class GLSLDecoder { + index: number; + tokenizer: Tokenizer | null; + keywords: any[]; + structTypes: Map; + addPolyfill(name: any, polyfill: any): this; + get tokens(): any[]; + readToken(): any; + getToken(offset?: number): any; + getTokensUntil(str: any, tokens: any, offset?: number): any[]; + readTokensUntil(str: any): any[]; + parseExpressionFromTokens(tokens: any): any; + parseAccessorElementsFromTokens(tokens: any): any; + parseFunctionParametersFromTokens(tokens: any): any; + parseExpression(): any; + parseFunctionParams(tokens: any): FunctionParameter[]; + parseFunction(): any; + parseVariablesFromToken(tokens: any, type: any): any; + parseVariables(): any; + parseUniform(): Uniform; + parseVarying(): Varying; + parseStructDefinition(): StructDefinition; + parseReturn(): Return; + parseWhile(): any; + parseFor(): any; + parseSwitch(): any; + parseSwitchCases(): any; + parseIf(): any; + parseBlock(): any; + parse(source: any): Program; +} +declare class Tokenizer { + constructor(source: any); + source: any; + position: number; + tokens: any[]; + tokenize(): this; + skip(...params: any[]): any; + nextToken(): Token | undefined; + readToken(): Token | undefined; +} +import { FunctionParameter } from './AST.js'; +import { Uniform } from './AST.js'; +import { Varying } from './AST.js'; +import { StructDefinition } from './AST.js'; +import { Return } from './AST.js'; +import { Program } from './AST.js'; +declare class Token { + constructor(tokenizer: any, type: any, str: any, pos: any); + tokenizer: any; + type: any; + str: any; + pos: any; + isTag: boolean; + tags: any; + get endPos(): any; + get isNumber(): boolean; + get isString(): boolean; + get isLiteral(): boolean; + get isOperator(): boolean; +} +declare namespace Token { + let LINE: string; + let COMMENT: string; + let NUMBER: string; + let STRING: string; + let LITERAL: string; + let OPERATOR: string; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/transpiler/Linker.d.ts b/jsdoc-testing/jsdoc/examples/jsm/transpiler/Linker.d.ts new file mode 100644 index 000000000..41d776add --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/transpiler/Linker.d.ts @@ -0,0 +1,17 @@ +export default Linker; +declare class Linker { + block: any; + addBlock(node: any): void; + removeBlock(node: any): void; + processVariables(node: any): void; + processUniform(node: any): void; + processVarying(node: any): void; + evalProperty(node: any): string; + processExpression(node: any): void; + processBody(body: any): void; + processConditional(node: any): void; + processForWhile(node: any): void; + processSwitch(switchNode: any): void; + processFunction(node: any): void; + process(ast: any): void; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/transpiler/ShaderToyDecoder.d.ts b/jsdoc-testing/jsdoc/examples/jsm/transpiler/ShaderToyDecoder.d.ts new file mode 100644 index 000000000..e38bd27ca --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/transpiler/ShaderToyDecoder.d.ts @@ -0,0 +1,4 @@ +export default ShaderToyDecoder; +declare class ShaderToyDecoder extends GLSLDecoder { +} +import GLSLDecoder from './GLSLDecoder.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/transpiler/TSLEncoder.d.ts b/jsdoc-testing/jsdoc/examples/jsm/transpiler/TSLEncoder.d.ts new file mode 100644 index 000000000..a6214f452 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/transpiler/TSLEncoder.d.ts @@ -0,0 +1,29 @@ +export default TSLEncoder; +declare class TSLEncoder { + tab: string; + imports: Set; + global: Set; + overloadings: Map; + iife: boolean; + reference: boolean; + block: any; + addImport(name: any): void; + emitUniform(node: any): string; + emitExpression(node: any, output?: null): any; + emitBody(body: any): string; + emitTernary(node: any): string; + emitConditional(node: any): any; + emitLoop(node: any): any; + emitSwitch(switchNode: any): any; + emitFor(node: any): any; + emitForWhile(node: any): any; + emitWhile(node: any): any; + emitVariables(node: any, isRoot?: boolean): string; + emitVarying(node: any): string; + emitStructDefinition(node: any): string; + emitOverloadingFunction(nodes: any): string; + emitFunction(node: any): string; + emitComment(statement: any, body: any): string; + emitExtraLine(statement: any, body: any): "" | "\n"; + emit(ast: any): string; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/transpiler/Transpiler.d.ts b/jsdoc-testing/jsdoc/examples/jsm/transpiler/Transpiler.d.ts new file mode 100644 index 000000000..ff77458cb --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/transpiler/Transpiler.d.ts @@ -0,0 +1,48 @@ +export default Transpiler; +/** + * A class that transpiles shader code from one language into another. + * + * `Transpiler` can only be used to convert GLSL into TSL right now. It is intended + * to support developers when they want to migrate their custom materials from the + * current to the new node-based material system. + * + * @three_import import Transpiler from 'three/addons/transpiler/Transpiler.js'; + */ +declare class Transpiler { + /** + * Constructs a new transpiler. + * + * @param {GLSLDecoder} decoder - The GLSL decoder. + * @param {TSLEncoder} encoder - The TSL encoder. + */ + constructor(decoder: GLSLDecoder, encoder: TSLEncoder); + /** + * The GLSL decoder. This component parse GLSL and produces + * a language-independent AST for further processing. + * + * @type {GLSLDecoder} + */ + decoder: GLSLDecoder; + /** + * The TSL encoder. It takes the AST and emits TSL code. + * + * @type {TSLEncoder} + */ + encoder: TSLEncoder; + /** + * The linker. It processes the AST and resolves + * variable and function references, ensuring that all + * dependencies are properly linked. + * + * @type {Linker} + */ + linker: Linker; + /** + * Parses the given GLSL source and returns TSL syntax. + * + * @param {string} source - The GLSL source. + * @return {string} The TSL code. + */ + parse(source: string): string; +} +import Linker from './Linker.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/transpiler/TranspilerUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/transpiler/TranspilerUtils.d.ts new file mode 100644 index 000000000..ec88472ef --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/transpiler/TranspilerUtils.d.ts @@ -0,0 +1,4 @@ +export function isExpression(st: any): boolean; +export function isPrimitive(value: any): boolean; +export function isBuiltinType(str: any): boolean; +export function toFloatType(type: any): any; diff --git a/jsdoc-testing/jsdoc/examples/jsm/transpiler/WGSLEncoder.d.ts b/jsdoc-testing/jsdoc/examples/jsm/transpiler/WGSLEncoder.d.ts new file mode 100644 index 000000000..44658abba --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/transpiler/WGSLEncoder.d.ts @@ -0,0 +1,24 @@ +export default WGSLEncoder; +declare class WGSLEncoder { + tab: string; + functions: Map; + uniforms: any[]; + varyings: any[]; + structs: Map; + polyfills: Map; + groupIndex: number; + getWgslType(type: any): any; + emitExpression(node: any): any; + emitTextureAccess(node: any): any; + emitBody(body: any): string; + emitConditional(node: any): any; + emitFor(node: any): string; + emitWhile(node: any): string; + emitSwitch(node: any): any; + emitVariables(node: any): string; + emitStructDefinition(node: any): string; + emitFunction(node: any): string; + emitComment(statement: any, body: any): string; + emitExtraLine(statement: any, body: any): "" | "\n"; + emit(ast: any): string; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/AfterImageNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/AfterImageNode.d.ts new file mode 100644 index 000000000..755c8d91e --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/AfterImageNode.d.ts @@ -0,0 +1,93 @@ +export function afterImage(node: Node, damp?: (Node | number)): AfterImageNode; +export default AfterImageNode; +/** + * Post processing node for creating an after image effect. + * + * @augments TempNode + * @three_import import { afterImage } from 'three/addons/tsl/display/AfterImageNode.js'; + */ +declare class AfterImageNode extends TempNode { + /** + * Constructs a new after image node. + * + * @param {TextureNode} textureNode - The texture node that represents the input of the effect. + * @param {Node} [damp=0.96] - The damping intensity. A higher value means a stronger after image effect. + */ + constructor(textureNode: TextureNode, damp?: Node); + /** + * The texture node that represents the input of the effect. + * + * @type {TextureNode} + */ + textureNode: TextureNode; + /** + * How quickly the after-image fades. A higher value means the after-image + * persists longer, while a lower value means it fades faster. Should be in + * the range `[0, 1]`. + * + * @type {Node} + */ + damp: Node; + /** + * The render target used for compositing the effect. + * + * @private + * @type {RenderTarget} + */ + private _compRT; + /** + * The render target that represents the previous frame. + * + * @private + * @type {RenderTarget} + */ + private _oldRT; + /** + * The result of the effect is represented as a separate texture node. + * + * @private + * @type {PassTextureNode} + */ + private _textureNode; + /** + * The texture represents the pervious frame. + * + * @private + * @type {TextureNode} + */ + private _textureNodeOld; + /** + * The material for the composite pass. + * + * @private + * @type {?NodeMaterial} + */ + private _materialComposed; + /** + * Returns the result of the effect as a texture node. + * + * @return {PassTextureNode} A texture node that represents the result of the effect. + */ + getTextureNode(): PassTextureNode; + /** + * Sets the size of the effect. + * + * @param {number} width - The width of the effect. + * @param {number} height - The height of the effect. + */ + setSize(width: number, height: number): void; + /** + * This method is used to render the effect once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(frame: NodeFrame): void; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {PassTextureNode} + */ + setup(builder: NodeBuilder): PassTextureNode; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/AnaglyphPassNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/AnaglyphPassNode.d.ts new file mode 100644 index 000000000..bb4019473 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/AnaglyphPassNode.d.ts @@ -0,0 +1,135 @@ +export default AnaglyphPassNode; +export function anaglyphPass(scene: Scene, camera: Camera): AnaglyphPassNode; +/** + * A render pass node that creates an anaglyph effect using physically-correct + * off-axis stereo projection. + * + * This implementation uses CameraUtils.frameCorners() to align stereo + * camera frustums to a virtual screen plane, providing accurate depth + * perception with zero parallax at the plane distance. + * + * @augments StereoCompositePassNode + * @three_import import { anaglyphPass, AnaglyphAlgorithm, AnaglyphColorMode } from 'three/addons/tsl/display/AnaglyphPassNode.js'; + */ +declare class AnaglyphPassNode extends StereoCompositePassNode { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isAnaglyphPassNode: boolean; + /** + * The interpupillary distance (eye separation) in world units. + * Typical human IPD is 0.064 meters (64mm). + * + * @type {number} + * @default 0.064 + */ + eyeSep: number; + /** + * The distance in world units from the viewer to the virtual + * screen plane where zero parallax (screen depth) occurs. + * Objects at this distance appear at the screen surface. + * Objects closer appear in front of the screen (negative parallax). + * Objects further appear behind the screen (positive parallax). + * + * The screen dimensions are derived from the camera's FOV and aspect ratio + * at this distance, ensuring the stereo view matches the camera's field of view. + * + * @type {number} + * @default 0.5 + */ + planeDistance: number; + /** + * The current anaglyph algorithm. + * + * @private + * @type {string} + * @default 'dubois' + */ + private _algorithm; + /** + * The current color mode. + * + * @private + * @type {string} + * @default 'redCyan' + */ + private _colorMode; + /** + * Color matrix node for the left eye. + * + * @private + * @type {UniformNode} + */ + private _colorMatrixLeft; + /** + * Color matrix node for the right eye. + * + * @private + * @type {UniformNode} + */ + private _colorMatrixRight; + /** + * Sets the anaglyph algorithm. + * + * @type {string} + */ + set algorithm(value: string); + /** + * Gets the current anaglyph algorithm. + * + * @type {string} + */ + get algorithm(): string; + /** + * Sets the color mode. + * + * @type {string} + */ + set colorMode(value: string); + /** + * Gets the current color mode. + * + * @type {string} + */ + get colorMode(): string; + /** + * Updates the color matrices based on current algorithm and color mode. + * + * @private + */ + private _updateMatrices; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {PassTextureNode} + */ + setup(builder: NodeBuilder): PassTextureNode; +} +/** + * Anaglyph algorithm types. + */ +export type AnaglyphAlgorithm = string; +export namespace AnaglyphAlgorithm { + let TRUE: string; + let GREY: string; + let COLOUR: string; + let HALF_COLOUR: string; + let DUBOIS: string; + let OPTIMISED: string; + let COMPROMISE: string; +} +/** + * Anaglyph color modes. + */ +export type AnaglyphColorMode = string; +export namespace AnaglyphColorMode { + let RED_CYAN: string; + let MAGENTA_CYAN: string; + let MAGENTA_GREEN: string; +} +import StereoCompositePassNode from './StereoCompositePassNode.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/BilateralBlurNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/BilateralBlurNode.d.ts new file mode 100644 index 000000000..6bc590e84 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/BilateralBlurNode.d.ts @@ -0,0 +1,138 @@ +export default BilateralBlurNode; +export function bilateralBlur(node: Node, directionNode: Node, sigma: number, sigmaColor: number): BilateralBlurNode; +/** + * Post processing node for creating a bilateral blur effect. + * + * Bilateral blur smooths an image while preserving sharp edges. Unlike a + * standard Gaussian blur which blurs everything equally, bilateral blur + * analyzes the intensity/color of neighboring pixels. If a neighbor is too + * different from the center pixel (indicating an edge), it is excluded + * from the blurring process. + * + * Reference: {@link https://en.wikipedia.org/wiki/Bilateral_filter} + * + * @augments TempNode + * @three_import import { bilateralBlur } from 'three/addons/tsl/display/BilateralBlurNode.js'; + */ +declare class BilateralBlurNode extends TempNode { + /** + * Constructs a new bilateral blur node. + * + * @param {TextureNode} textureNode - The texture node that represents the input of the effect. + * @param {Node} directionNode - Defines the direction and radius of the blur. + * @param {number} sigma - Controls the spatial kernel of the blur filter. Higher values mean a wider blur radius. + * @param {number} sigmaColor - Controls the intensity kernel. Higher values allow more color difference to be blurred together. + */ + constructor(textureNode: TextureNode, directionNode?: Node, sigma?: number, sigmaColor?: number); + /** + * The texture node that represents the input of the effect. + * + * @type {TextureNode} + */ + textureNode: TextureNode; + /** + * Defines the direction and radius of the blur. + * + * @type {Node} + */ + directionNode: Node; + /** + * Controls the spatial kernel of the blur filter. Higher values mean a wider blur radius. + * + * @type {number} + */ + sigma: number; + /** + * Controls the color/intensity kernel. Higher values allow more color difference + * to be blurred together. Lower values preserve edges more strictly. + * + * @type {number} + */ + sigmaColor: number; + /** + * A uniform node holding the inverse resolution value. + * + * @private + * @type {UniformNode} + */ + private _invSize; + /** + * Bilateral blur is applied in two passes (horizontal, vertical). + * This node controls the direction of each pass. + * + * @private + * @type {UniformNode} + */ + private _passDirection; + /** + * The render target used for the horizontal pass. + * + * @private + * @type {RenderTarget} + */ + private _horizontalRT; + /** + * The render target used for the vertical pass. + * + * @private + * @type {RenderTarget} + */ + private _verticalRT; + /** + * The result of the effect is represented as a separate texture node. + * + * @private + * @type {PassTextureNode} + */ + private _textureNode; + /** + * The material for the blur pass. + * + * @private + * @type {?NodeMaterial} + */ + private _material; + /** + * The resolution scale. + * + * @type {number} + * @default 1 + */ + resolutionScale: number; + /** + * Sets the size of the effect. + * + * @param {number} width - The width of the effect. + * @param {number} height - The height of the effect. + */ + setSize(width: number, height: number): void; + /** + * This method is used to render the effect once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(frame: NodeFrame): void; + /** + * Returns the result of the effect as a texture node. + * + * @return {PassTextureNode} A texture node that represents the result of the effect. + */ + getTextureNode(): PassTextureNode; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {PassTextureNode} + */ + setup(builder: NodeBuilder): PassTextureNode; + /** + * Computes spatial (Gaussian) coefficients depending on the given kernel radius. + * These coefficients are used for the spatial component of the bilateral filter. + * + * @private + * @param {number} kernelRadius - The kernel radius. + * @return {Array} + */ + private _getSpatialCoefficients; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/BleachBypass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/BleachBypass.d.ts new file mode 100644 index 000000000..638306ce2 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/BleachBypass.d.ts @@ -0,0 +1,10 @@ +/** + * Applies a bleach bypass effect to the given color node. + * + * @tsl + * @function + * @param {Node} color - The color node to apply the sepia for. + * @param {Node} [opacity=1] - Influences how strong the effect is blended with the original color. + * @return {Node} The updated color node. + */ +export const bleach: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/BloomNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/BloomNode.d.ts new file mode 100644 index 000000000..fa27f0153 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/BloomNode.d.ts @@ -0,0 +1,238 @@ +export function bloom(node: Node, strength?: number, radius?: number, threshold?: number): BloomNode; +export default BloomNode; +/** + * Post processing node for creating a bloom effect. + * ```js + * const renderPipeline = new THREE.RenderPipeline( renderer ); + * + * const scenePass = pass( scene, camera ); + * const scenePassColor = scenePass.getTextureNode( 'output' ); + * + * const bloomPass = bloom( scenePassColor ); + * + * renderPipeline.outputNode = scenePassColor.add( bloomPass ); + * ``` + * By default, the node affects the entire image. For a selective bloom, + * use the `emissive` material property to control which objects should + * contribute to bloom or not. This can be achieved via MRT. + * ```js + * const renderPipeline = new THREE.RenderPipeline( renderer ); + * + * const scenePass = pass( scene, camera ); + * scenePass.setMRT( mrt( { + * output, + * emissive + * } ) ); + * + * const scenePassColor = scenePass.getTextureNode( 'output' ); + * const emissivePass = scenePass.getTextureNode( 'emissive' ); + * + * const bloomPass = bloom( emissivePass ); + * renderPipeline.outputNode = scenePassColor.add( bloomPass ); + * ``` + * @augments TempNode + * @three_import import { bloom } from 'three/addons/tsl/display/BloomNode.js'; + */ +declare class BloomNode extends TempNode { + /** + * Constructs a new bloom node. + * + * @param {Node} inputNode - The node that represents the input of the effect. + * @param {number} [strength=1] - The strength of the bloom. + * @param {number} [radius=0] - The radius of the bloom. + * @param {number} [threshold=0] - The luminance threshold limits which bright areas contribute to the bloom effect. + */ + constructor(inputNode: Node, strength?: number, radius?: number, threshold?: number); + /** + * The node that represents the input of the effect. + * + * @type {Node} + */ + inputNode: Node; + /** + * The strength of the bloom. + * + * @type {UniformNode} + */ + strength: UniformNode; + /** + * The radius of the bloom. Must be in the range `[0,1]`. + * + * @type {UniformNode} + */ + radius: UniformNode; + /** + * The luminance threshold limits which bright areas contribute to the bloom effect. + * + * @type {UniformNode} + */ + threshold: UniformNode; + /** + * Can be used to tweak the extracted luminance from the scene. + * + * @type {UniformNode} + */ + smoothWidth: UniformNode; + /** + * Scale factor for the internal render targets. + * + * @private + * @type {number} + * @default 0.5 + */ + private _resolutionScale; + /** + * Can be used to inject a custom high pass filter (e.g., for anamorphic effects). + * + * @type {Function} + */ + highPassFn: Function; + /** + * An array that holds the render targets for the horizontal blur passes. + * + * @private + * @type {Array} + */ + private _renderTargetsHorizontal; + /** + * An array that holds the render targets for the vertical blur passes. + * + * @private + * @type {Array} + */ + private _renderTargetsVertical; + /** + * The number if blur mips. + * + * @private + * @type {number} + */ + private _nMips; + /** + * The render target for the luminance pass. + * + * @private + * @type {RenderTarget} + */ + private _renderTargetBright; + /** + * The material for the composite pass. + * + * @private + * @type {?NodeMaterial} + */ + private _compositeMaterial; + /** + * The material for the luminance pass. + * + * @private + * @type {?NodeMaterial} + */ + private _highPassFilterMaterial; + /** + * The materials for the blur pass. + * + * @private + * @type {Array} + */ + private _separableBlurMaterials; + /** + * The result of the luminance pass as a texture node for further processing. + * + * @private + * @type {TextureNode} + */ + private _textureNodeBright; + /** + * The result of the first blur pass as a texture node for further processing. + * + * @private + * @type {TextureNode} + */ + private _textureNodeBlur0; + /** + * The result of the second blur pass as a texture node for further processing. + * + * @private + * @type {TextureNode} + */ + private _textureNodeBlur1; + /** + * The result of the third blur pass as a texture node for further processing. + * + * @private + * @type {TextureNode} + */ + private _textureNodeBlur2; + /** + * The result of the fourth blur pass as a texture node for further processing. + * + * @private + * @type {TextureNode} + */ + private _textureNodeBlur3; + /** + * The result of the fifth blur pass as a texture node for further processing. + * + * @private + * @type {TextureNode} + */ + private _textureNodeBlur4; + /** + * The result of the effect is represented as a separate texture node. + * + * @private + * @type {PassTextureNode} + */ + private _textureOutput; + /** + * Returns the result of the effect as a texture node. + * + * @return {PassTextureNode} A texture node that represents the result of the effect. + */ + getTextureNode(): PassTextureNode; + /** + * Sets the resolution scale for the pass. + * The resolution scale is a factor that is multiplied with the renderer's width and height. + * + * @param {number} resolutionScale - The resolution scale to set. A value of `1` means full resolution. + * @return {BloomNode} A reference to this node. + */ + setResolutionScale(resolutionScale: number): BloomNode; + /** + * Gets the current resolution scale of the pass. + * + * @return {number} The current resolution scale. A value of `1` means full resolution. + */ + getResolutionScale(): number; + /** + * Sets the size of the effect. + * + * @param {number} width - The width of the effect. + * @param {number} height - The height of the effect. + */ + setSize(width: number, height: number): void; + /** + * This method is used to render the effect once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(frame: NodeFrame): void; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {PassTextureNode} + */ + setup(builder: NodeBuilder): PassTextureNode; + /** + * Create a separable blur material for the given kernel radius. + * + * @private + * @param {NodeBuilder} builder - The current node builder. + * @param {number} kernelRadius - The kernel radius. + * @return {NodeMaterial} + */ + private _getSeparableBlurMaterial; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/CRT.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/CRT.d.ts new file mode 100644 index 000000000..8fa82745a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/CRT.d.ts @@ -0,0 +1,58 @@ +/** + * Creates barrel-distorted UV coordinates. + * The center of the screen appears to bulge outward (convex distortion). + * + * @tsl + * @function + * @param {Node} [curvature=0.1] - The amount of curvature (0 = flat, 0.5 = very curved). + * @param {Node} [coord=uv()] - The input UV coordinates. + * @return {Node} The distorted UV coordinates. + */ +export const barrelUV: () => void; +/** + * Checks if UV coordinates are inside the valid 0-1 range. + * Useful for masking areas inside the distorted screen. + * + * @tsl + * @function + * @param {Node} coord - The UV coordinates to check. + * @return {Node} 1.0 if inside bounds, 0.0 if outside. + */ +export const barrelMask: () => void; +/** + * Applies color bleeding effect to simulate horizontal color smearing. + * Simulates the analog signal bleeding in CRT displays where colors + * "leak" into adjacent pixels horizontally. + * + * @tsl + * @function + * @param {Node} color - The input texture node. + * @param {Node} [amount=0.002] - The amount of color bleeding (0-0.01). + * @return {Node} The color with bleeding effect applied. + */ +export const colorBleeding: () => void; +/** + * Applies scanline effect to simulate CRT monitor horizontal lines with animation. + * + * @tsl + * @function + * @param {Node} color - The input color. + * @param {Node} [intensity=0.3] - The intensity of the scanlines (0-1). + * @param {Node} [count=240] - The number of scanlines (typically matches vertical resolution). + * @param {Node} [speed=0.0] - The scroll speed of scanlines (0 = static, 1 = normal CRT roll). + * @param {Node} [coord=uv()] - The UV coordinates to use for scanlines. + * @return {Node} The color with scanlines applied. + */ +export const scanlines: () => void; +/** + * Applies vignette effect to darken the edges of the screen. + * + * @tsl + * @function + * @param {Node} color - The input color. + * @param {Node} [intensity=0.4] - The intensity of the vignette (0-1). + * @param {Node} [smoothness=0.5] - The smoothness of the vignette falloff. + * @param {Node} [coord=uv()] - The UV coordinates to use for vignette calculation. + * @return {Node} The color with vignette applied. + */ +export const vignette: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/ChromaticAberrationNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/ChromaticAberrationNode.d.ts new file mode 100644 index 000000000..564bed21b --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/ChromaticAberrationNode.d.ts @@ -0,0 +1,53 @@ +export default ChromaticAberrationNode; +export function chromaticAberration(node: Node, strength?: Node | number, center?: (Node | Vector2) | null, scale?: Node | number): ChromaticAberrationNode; +/** + * Post processing node for applying chromatic aberration effect. + * This effect simulates the color fringing that occurs in real camera lenses + * by separating and offsetting the red, green, and blue channels. + * + * @augments TempNode + * @three_import import { chromaticAberration } from 'three/addons/tsl/display/ChromaticAberrationNode.js'; + */ +declare class ChromaticAberrationNode extends TempNode { + /** + * Constructs a new chromatic aberration node. + * + * @param {TextureNode} textureNode - The texture node that represents the input of the effect. + * @param {Node} strengthNode - The strength of the chromatic aberration effect as a node. + * @param {Node} centerNode - The center point of the effect as a node. + * @param {Node} scaleNode - The scale factor for stepped scaling from center as a node. + */ + constructor(textureNode: TextureNode, strengthNode: Node, centerNode: Node, scaleNode: Node); + /** + * The texture node that represents the input of the effect. + * + * @type {texture} + */ + textureNode: texture; + /** + * A node holding the strength of the effect. + * + * @type {Node} + */ + strengthNode: Node; + /** + * A node holding the center point of the effect. + * + * @type {Node} + */ + centerNode: Node; + /** + * A node holding the scale factor for stepped scaling. + * + * @type {Node} + */ + scaleNode: Node; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {ShaderCallNodeInternal} + */ + setup(): ShaderCallNodeInternal; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/DenoiseNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/DenoiseNode.d.ts new file mode 100644 index 000000000..26cac984d --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/DenoiseNode.d.ts @@ -0,0 +1,115 @@ +export default DenoiseNode; +export function denoise(node: Node, depthNode: Node, normalNode: Node | null, camera: Camera): DenoiseNode; +/** + * Post processing node for denoising data like raw screen-space ambient occlusion output. + * Denoise can noticeably improve the quality of ambient occlusion but also add quite some + * overhead to the post processing setup. It's best to make its usage optional (e.g. via + * graphic settings). + * + * Reference: {@link https://openaccess.thecvf.com/content/WACV2021/papers/Khademi_Self-Supervised_Poisson-Gaussian_Denoising_WACV_2021_paper.pdf}. + * + * @augments TempNode + * @three_import import { denoise } from 'three/addons/tsl/display/DenoiseNode.js'; + */ +declare class DenoiseNode extends TempNode { + /** + * Constructs a new denoise node. + * + * @param {TextureNode} textureNode - The texture node that represents the input of the effect (e.g. AO). + * @param {Node} depthNode - A node that represents the scene's depth. + * @param {?Node} normalNode - A node that represents the scene's normals. + * @param {Camera} camera - The camera the scene is rendered with. + */ + constructor(textureNode: TextureNode, depthNode: Node, normalNode: Node | null, camera: Camera); + /** + * The texture node that represents the input of the effect (e.g. AO). + * + * @type {TextureNode} + */ + textureNode: TextureNode; + /** + * A node that represents the scene's depth. + * + * @type {Node} + */ + depthNode: Node; + /** + * A node that represents the scene's normals. If no normals are passed to the + * constructor (because MRT is not available), normals can be automatically + * reconstructed from depth values in the shader. + * + * @type {?Node} + */ + normalNode: Node | null; + /** + * The node represents the internal noise texture. + * + * @type {TextureNode} + */ + noiseNode: TextureNode; + /** + * The luma Phi value. + * + * @type {UniformNode} + */ + lumaPhi: UniformNode; + /** + * The depth Phi value. + * + * @type {UniformNode} + */ + depthPhi: UniformNode; + /** + * The normal Phi value. + * + * @type {UniformNode} + */ + normalPhi: UniformNode; + /** + * The radius. + * + * @type {UniformNode} + */ + radius: UniformNode; + /** + * The index. + * + * @type {UniformNode} + */ + index: UniformNode; + /** + * The resolution of the effect. + * + * @private + * @type {UniformNode} + */ + private _resolution; + /** + * An array of sample vectors. + * + * @private + * @type {UniformArrayNode} + */ + private _sampleVectors; + /** + * Represents the inverse projection matrix of the scene's camera. + * + * @private + * @type {UniformNode} + */ + private _cameraProjectionMatrixInverse; + /** + * This method is used to update internal uniforms once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(): void; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {ShaderCallNodeInternal} + */ + setup(): ShaderCallNodeInternal; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/DepthOfFieldNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/DepthOfFieldNode.d.ts new file mode 100644 index 000000000..7d63a602f --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/DepthOfFieldNode.d.ts @@ -0,0 +1,205 @@ +export default DepthOfFieldNode; +export function dof(node: Node, viewZNode: Node, focusDistance?: Node | number, focalLength?: Node | number, bokehScale?: Node | number): DepthOfFieldNode; +/** + * Post processing node for creating depth of field (DOF) effect. + * + * References: + * - {@link https://pixelmischiefblog.wordpress.com/2016/11/25/bokeh-depth-of-field/} + * - {@link https://www.adriancourreges.com/blog/2016/09/09/doom-2016-graphics-study/} + * + * @augments TempNode + * @three_import import { dof } from 'three/addons/tsl/display/DepthOfFieldNode.js'; + */ +declare class DepthOfFieldNode extends TempNode { + /** + * Constructs a new DOF node. + * + * @param {TextureNode} textureNode - The texture node that represents the input of the effect. + * @param {Node} viewZNode - Represents the viewZ depth values of the scene. + * @param {Node} focusDistanceNode - Defines the effect's focus which is the distance along the camera's look direction in world units. + * @param {Node} focalLengthNode - How far an object can be from the focal plane before it goes completely out-of-focus in world units. + * @param {Node} bokehScaleNode - A unitless value for artistic purposes to adjust the size of the bokeh. + */ + constructor(textureNode: TextureNode, viewZNode: Node, focusDistanceNode: Node, focalLengthNode: Node, bokehScaleNode: Node); + /** + * The texture node that represents the input of the effect. + * + * @type {TextureNode} + */ + textureNode: TextureNode; + /** + * Represents the viewZ depth values of the scene. + * + * @type {Node} + */ + viewZNode: Node; + /** + * Defines the effect's focus which is the distance along the camera's look direction in world units. + * + * @type {Node} + */ + focusDistanceNode: Node; + /** + * How far an object can be from the focal plane before it goes completely out-of-focus in world units. + * + * @type {Node} + */ + focalLengthNode: Node; + /** + * A unitless value for artistic purposes to adjust the size of the bokeh. + * + * @type {Node} + */ + bokehScaleNode: Node; + /** + * The inverse size of the resolution. + * + * @private + * @type {UniformNode} + */ + private _invSize; + /** + * The render target used for the near and far field. + * + * @private + * @type {RenderTarget} + */ + private _CoCRT; + /** + * The render target used for blurring the near field. + * + * @private + * @type {RenderTarget} + */ + private _CoCBlurredRT; + /** + * The render target used for the first blur pass. + * + * @private + * @type {RenderTarget} + */ + private _blur64RT; + /** + * The render target used for the near field's second blur pass. + * + * @private + * @type {RenderTarget} + */ + private _blur16NearRT; + /** + * The render target used for the far field's second blur pass. + * + * @private + * @type {RenderTarget} + */ + private _blur16FarRT; + /** + * The render target used for the composite + * + * @private + * @type {RenderTarget} + */ + private _compositeRT; + /** + * The material used for the CoC/near and far fields. + * + * @private + * @type {NodeMaterial} + */ + private _CoCMaterial; + /** + * The material used for blurring the near field. + * + * @private + * @type {NodeMaterial} + */ + private _CoCBlurredMaterial; + /** + * The material used for the 64 tap blur. + * + * @private + * @type {NodeMaterial} + */ + private _blur64Material; + /** + * The material used for the 16 tap blur. + * + * @private + * @type {NodeMaterial} + */ + private _blur16Material; + /** + * The material used for the final composite. + * + * @private + * @type {NodeMaterial} + */ + private _compositeMaterial; + /** + * The result of the effect is represented as a separate texture node. + * + * @private + * @type {TextureNode} + */ + private _textureNode; + /** + * The result of the CoC pass as a texture node. + * + * @private + * @type {TextureNode} + */ + private _CoCTextureNode; + /** + * The result of the blur64 pass as a texture node. + * + * @private + * @type {TextureNode} + */ + private _blur64TextureNode; + /** + * The result of the near field's blur16 pass as a texture node. + * + * @private + * @type {TextureNode} + */ + private _blur16NearTextureNode; + /** + * The result of the far field's blur16 pass as a texture node. + * + * @private + * @type {TextureNode} + */ + private _blur16FarTextureNode; + /** + * Sets the size of the effect. + * + * @param {number} width - The width of the effect. + * @param {number} height - The height of the effect. + */ + setSize(width: number, height: number): void; + /** + * Returns the result of the effect as a texture node. + * + * @return {PassTextureNode} A texture node that represents the result of the effect. + */ + getTextureNode(): PassTextureNode; + /** + * This method is used to update the effect's uniforms once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(frame: NodeFrame): void; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {ShaderCallNodeInternal} + */ + setup(builder: NodeBuilder): ShaderCallNodeInternal; + _generateKernels(): { + points16: Vector2[]; + points64: Vector2[]; + }; +} +import { TempNode } from 'three/webgpu'; +import { Vector2 } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/DotScreenNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/DotScreenNode.d.ts new file mode 100644 index 000000000..c3e37fe86 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/DotScreenNode.d.ts @@ -0,0 +1,44 @@ +export default DotScreenNode; +export function dotScreen(node: Node, angle?: number, scale?: number): DotScreenNode; +/** + * Post processing node for creating dot-screen effect. + * + * @augments TempNode + * @three_import import { dotScreen } from 'three/addons/tsl/display/DotScreenNode.js'; + */ +declare class DotScreenNode extends TempNode { + /** + * Constructs a new dot screen node. + * + * @param {Node} inputNode - The node that represents the input of the effect. + * @param {number} [angle=1.57] - The rotation of the effect in radians. + * @param {number} [scale=1] - The scale of the effect. A higher value means smaller dots. + */ + constructor(inputNode: Node, angle?: number, scale?: number); + /** + * The node that represents the input of the effect. + * + * @type {Node} + */ + inputNode: Node; + /** + * A uniform node that represents the rotation of the effect in radians. + * + * @type {UniformNode} + */ + angle: UniformNode; + /** + * A uniform node that represents the scale of the effect. A higher value means smaller dots. + * + * @type {UniformNode} + */ + scale: UniformNode; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {ShaderCallNodeInternal} + */ + setup(): ShaderCallNodeInternal; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/FSR1Node.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/FSR1Node.d.ts new file mode 100644 index 000000000..ce9465982 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/FSR1Node.d.ts @@ -0,0 +1,112 @@ +export default FSR1Node; +export function fsr1(node: Node, sharpness?: (number | Node), denoise?: (boolean | Node)): FSR1Node; +/** + * Post processing node for applying AMD FidelityFX Super Resolution 1 (FSR 1). + * + * Combines two passes: + * - **EASU** (Edge-Adaptive Spatial Upsampling): Uses 12 texture samples in a cross pattern + * to detect local edge direction, then shapes an approximate Lanczos2 kernel into an + * ellipse aligned with the detected edge. + * - **RCAS** (Robust Contrast-Adaptive Sharpening): Uses a 5-tap cross pattern to apply + * contrast-aware sharpening that is automatically limited per-pixel to avoid artifacts. + * + * Note: Only use FSR 1 if your application is fragment-shader bound and cannot afford to render + * at full resolution. FSR 1 adds its own overhead, so simply shaded scenes will render faster + * at native resolution without it. Besides, FSR 1 should always be used with an anti-aliased + * source image. + * + * Reference: {@link https://gpuopen.com/fidelityfx-superresolution/}. + * + * @augments TempNode + * @three_import import { fsr1 } from 'three/addons/tsl/display/fsr1/FSR1Node.js'; + */ +declare class FSR1Node extends TempNode { + /** + * Constructs a new FSR 1 node. + * + * @param {TextureNode} textureNode - The texture node that represents the input of the effect. + * @param {Node} [sharpness=0.2] - RCAS sharpening strength. 0 = maximum sharpening, 2 = no sharpening. + * @param {Node} [denoise=false] - Whether to attenuate RCAS sharpening in noisy areas. + */ + constructor(textureNode: TextureNode, sharpness?: Node, denoise?: Node); + /** + * The texture node that represents the input of the effect. + * + * @type {TextureNode} + */ + textureNode: TextureNode; + /** + * RCAS sharpening strength. 0 = maximum, 2 = none. + * + * @type {Node} + */ + sharpness: Node; + /** + * Whether to attenuate RCAS sharpening in noisy areas. + * + * @type {Node} + */ + denoise: Node; + /** + * The render target for the EASU upscale pass. + * + * @private + * @type {RenderTarget} + */ + private _easuRT; + /** + * The render target for the RCAS sharpen pass. + * + * @private + * @type {RenderTarget} + */ + private _rcasRT; + /** + * The result of the effect as a texture node. + * + * @private + * @type {PassTextureNode} + */ + private _textureNode; + /** + * The material for the EASU pass. + * + * @private + * @type {?NodeMaterial} + */ + private _easuMaterial; + /** + * The material for the RCAS pass. + * + * @private + * @type {?NodeMaterial} + */ + private _rcasMaterial; + /** + * Sets the output size of the effect. + * + * @param {number} width - The width in pixels. + * @param {number} height - The height in pixels. + */ + setSize(width: number, height: number): void; + /** + * This method is used to render the effect once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(frame: NodeFrame): void; + /** + * Returns the result of the effect as a texture node. + * + * @return {PassTextureNode} A texture node that represents the result of the effect. + */ + getTextureNode(): PassTextureNode; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {PassTextureNode} + */ + setup(builder: NodeBuilder): PassTextureNode; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/FXAANode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/FXAANode.d.ts new file mode 100644 index 000000000..aa6c1cc3a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/FXAANode.d.ts @@ -0,0 +1,44 @@ +export default FXAANode; +export function fxaa(node: Node): FXAANode; +/** + * Post processing node for applying FXAA. This node requires sRGB input + * so tone mapping and color space conversion must happen before the anti-aliasing. + * + * @augments TempNode + * @three_import import { fxaa } from 'three/addons/tsl/display/FXAANode.js'; + */ +declare class FXAANode extends TempNode { + /** + * Constructs a new FXAA node. + * + * @param {TextureNode} textureNode - The texture node that represents the input of the effect. + */ + constructor(textureNode: TextureNode); + /** + * The texture node that represents the input of the effect. + * + * @type {TextureNode} + */ + textureNode: TextureNode; + /** + * A uniform node holding the inverse resolution value. + * + * @private + * @type {UniformNode} + */ + private _invSize; + /** + * This method is used to update the effect's uniforms once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(): void; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {ShaderCallNodeInternal} + */ + setup(): ShaderCallNodeInternal; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/FilmNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/FilmNode.d.ts new file mode 100644 index 000000000..0cac52e90 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/FilmNode.d.ts @@ -0,0 +1,56 @@ +export default FilmNode; +/** + * TSL function for creating a film node for post processing. + * + * @tsl + * @function + * @param {Node} inputNode - The node that represents the input of the effect. + * @param {?Node} [intensityNode=null] - A node that represents the effect's intensity. + * @param {?Node} [uvNode=null] - A node that allows to pass custom (e.g. animated) uv data. + * @returns {FilmNode} + */ +export const film: any; +/** + * Post processing node for creating a film grain effect. + * + * @augments TempNode + * @three_import import { film } from 'three/addons/tsl/display/FilmNode.js'; + */ +declare class FilmNode extends TempNode { + /** + * Constructs a new film node. + * + * @param {Node} inputNode - The node that represents the input of the effect. + * @param {?Node} [intensityNode=null] - A node that represents the effect's intensity. + * @param {?Node} [uvNode=null] - A node that allows to pass custom (e.g. animated) uv data. + */ + constructor(inputNode: Node, intensityNode?: Node | null, uvNode?: Node | null); + /** + * The node that represents the input of the effect. + * + * @type {Node} + */ + inputNode: Node; + /** + * A node that represents the effect's intensity. + * + * @type {?Node} + * @default null + */ + intensityNode: Node | null; + /** + * A node that allows to pass custom (e.g. animated) uv data. + * + * @type {?Node} + * @default null + */ + uvNode: Node | null; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {ShaderCallNodeInternal} + */ + setup(): ShaderCallNodeInternal; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/GTAONode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/GTAONode.d.ts new file mode 100644 index 000000000..25c90ff95 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/GTAONode.d.ts @@ -0,0 +1,211 @@ +export default GTAONode; +export function ao(depthNode: Node, normalNode: Node | null, camera: Camera): GTAONode; +/** + * Post processing node for applying Ground Truth Ambient Occlusion (GTAO) to a scene. + * ```js + * const renderPipeline = new THREE.RenderPipeline( renderer ); + * + * const scenePass = pass( scene, camera ); + * scenePass.setMRT( mrt( { + * output: output, + * normal: normalView + * } ) ); + * + * const scenePassColor = scenePass.getTextureNode( 'output' ); + * const scenePassNormal = scenePass.getTextureNode( 'normal' ); + * const scenePassDepth = scenePass.getTextureNode( 'depth' ); + * + * const aoPass = ao( scenePassDepth, scenePassNormal, camera ); + * const aoPassOutput = aoPass.getTextureNode(); + * + * renderPipeline.outputNode = scenePassColor.mul( vec4( vec3( aoPassOutput.r ), 1 ) ); + * ``` + * + * Reference: [Practical Real-Time Strategies for Accurate Indirect Occlusion](https://www.activision.com/cdn/research/Practical_Real_Time_Strategies_for_Accurate_Indirect_Occlusion_NEW%20VERSION_COLOR.pdf). + * + * @augments TempNode + * @three_import import { ao } from 'three/addons/tsl/display/GTAONode.js'; + */ +declare class GTAONode extends TempNode { + /** + * Constructs a new GTAO node. + * + * @param {Node} depthNode - A node that represents the scene's depth. + * @param {?Node} normalNode - A node that represents the scene's normals. + * @param {Camera} camera - The camera the scene is rendered with. + */ + constructor(depthNode: Node, normalNode: Node | null, camera: Camera); + /** + * A node that represents the scene's depth. + * + * @type {Node} + */ + depthNode: Node; + /** + * A node that represents the scene's normals. If no normals are passed to the + * constructor (because MRT is not available), normals can be automatically + * reconstructed from depth values in the shader. + * + * @type {?Node} + */ + normalNode: Node | null; + /** + * The resolution scale. By default the effect is rendered in full resolution + * for best quality but a value of `0.5` should be sufficient for most scenes. + * + * @type {number} + * @default 1 + */ + resolutionScale: number; + /** + * The render target the ambient occlusion is rendered into. + * + * @private + * @type {RenderTarget} + */ + private _aoRenderTarget; + /** + * The radius of the ambient occlusion. + * + * @type {UniformNode} + */ + radius: UniformNode; + /** + * The resolution of the effect. Can be scaled via + * `resolutionScale`. + * + * @type {UniformNode} + */ + resolution: UniformNode; + /** + * The thickness of the ambient occlusion. + * + * @type {UniformNode} + */ + thickness: UniformNode; + /** + * Another option to tweak the occlusion. The recommended range is + * `[1,2]` for attenuating the AO. + * + * @type {UniformNode} + */ + distanceExponent: UniformNode; + /** + * The distance fall off value of the ambient occlusion. + * A lower value leads to a larger AO effect. The value + * should lie in the range `[0,1]`. + * + * @type {UniformNode} + */ + distanceFallOff: UniformNode; + /** + * The scale of the ambient occlusion. + * + * @type {UniformNode} + */ + scale: UniformNode; + /** + * How many samples are used to compute the AO. + * A higher value results in better quality but also + * in a more expensive runtime behavior. + * + * @type {UniformNode} + */ + samples: UniformNode; + /** + * Whether to use temporal filtering or not. Setting this property to + * `true` requires the usage of `TRAANode`. This will help to reduce noise + * although it introduces typical TAA artifacts like ghosting and temporal + * instabilities. + * + * If setting this property to `false`, a manual denoise via `DenoiseNode` + * might be required. + * + * @type {boolean} + * @default false + */ + useTemporalFiltering: boolean; + /** + * The node represents the internal noise texture used by the AO. + * + * @private + * @type {TextureNode} + */ + private _noiseNode; + /** + * Represents the projection matrix of the scene's camera. + * + * @private + * @type {UniformNode} + */ + private _cameraProjectionMatrix; + /** + * Represents the inverse projection matrix of the scene's camera. + * + * @private + * @type {UniformNode} + */ + private _cameraProjectionMatrixInverse; + /** + * Represents the near value of the scene's camera. + * + * @private + * @type {ReferenceNode} + */ + private _cameraNear; + /** + * Represents the far value of the scene's camera. + * + * @private + * @type {ReferenceNode} + */ + private _cameraFar; + /** + * Temporal direction that influences the rotation angle for each slice. + * + * @private + * @type {UniformNode} + */ + private _temporalDirection; + /** + * The material that is used to render the effect. + * + * @private + * @type {NodeMaterial} + */ + private _material; + /** + * The result of the effect is represented as a separate texture node. + * + * @private + * @type {PassTextureNode} + */ + private _textureNode; + /** + * Returns the result of the effect as a texture node. + * + * @return {PassTextureNode} A texture node that represents the result of the effect. + */ + getTextureNode(): PassTextureNode; + /** + * Sets the size of the effect. + * + * @param {number} width - The width of the effect. + * @param {number} height - The height of the effect. + */ + setSize(width: number, height: number): void; + /** + * This method is used to render the effect once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(frame: NodeFrame): void; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {PassTextureNode} + */ + setup(builder: NodeBuilder): PassTextureNode; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/GaussianBlurNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/GaussianBlurNode.d.ts new file mode 100644 index 000000000..7d9e95355 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/GaussianBlurNode.d.ts @@ -0,0 +1,168 @@ +/** + * TSL function for creating a gaussian blur node for post processing with enabled premultiplied alpha. + * + * @tsl + * @function + * @deprecated since r180. Use `gaussianBlur()` with `premultipliedAlpha: true` option instead. + * @param {Node} node - The node that represents the input of the effect. + * @param {Node} directionNode - Defines the direction and radius of the blur. + * @param {number} sigma - Controls the kernel of the blur filter. Higher values mean a wider blur radius. + * @returns {GaussianBlurNode} + */ +export function premultipliedGaussianBlur(node: Node, directionNode: Node, sigma: number): GaussianBlurNode; +export default GaussianBlurNode; +export function gaussianBlur(node: Node, directionNode: Node, sigma: number, options?: { + premultipliedAlpha?: boolean | undefined; + resolutionScale?: number | undefined; +}): GaussianBlurNode; +/** + * Post processing node for creating a gaussian blur effect. + * + * @augments TempNode + * @three_import import { gaussianBlur, premultipliedGaussianBlur } from 'three/addons/tsl/display/GaussianBlurNode.js'; + */ +declare class GaussianBlurNode extends TempNode { + /** + * Constructs a new gaussian blur node. + * + * @param {TextureNode} textureNode - The texture node that represents the input of the effect. + * @param {Node} directionNode - Defines the direction and radius of the blur. + * @param {number} sigma - Controls the kernel of the blur filter. Higher values mean a wider blur radius. + * @param {Object} [options={}] - Additional options for the gaussian blur effect. + * @param {boolean} [options.premultipliedAlpha=false] - Whether to use premultiplied alpha for the blur effect. + * @param {number} [options.resolutionScale=1] - The resolution of the effect. 0.5 means half the resolution of the texture node. + */ + constructor(textureNode: TextureNode, directionNode?: Node, sigma?: number, options?: { + premultipliedAlpha?: boolean | undefined; + resolutionScale?: number | undefined; + }); + /** + * The texture node that represents the input of the effect. + * + * @type {TextureNode} + */ + textureNode: TextureNode; + /** + * Defines the direction and radius of the blur. + * + * @type {Node} + */ + directionNode: Node; + /** + * Controls the kernel of the blur filter. Higher values mean a wider blur radius. + * + * @type {number} + */ + sigma: number; + /** + * A uniform node holding the inverse resolution value. + * + * @private + * @type {UniformNode} + */ + private _invSize; + /** + * Gaussian blur is applied in two passes (horizontal, vertical). + * This node controls the direction of each pass. + * + * @private + * @type {UniformNode} + */ + private _passDirection; + /** + * The render target used for the horizontal pass. + * + * @private + * @type {RenderTarget} + */ + private _horizontalRT; + /** + * The render target used for the vertical pass. + * + * @private + * @type {RenderTarget} + */ + private _verticalRT; + /** + * The result of the effect is represented as a separate texture node. + * + * @private + * @type {PassTextureNode} + */ + private _textureNode; + /** + * The material for the blur pass. + * + * @private + * @type {?NodeMaterial} + */ + private _material; + /** + * The resolution scale. + * + * @type {number} + * @default (1) + */ + resolutionScale: number; + /** + * Whether the effect should use premultiplied alpha or not. Set this to `true` + * if you are going to blur texture input with transparency. + * + * @type {boolean} + * @default false + */ + premultipliedAlpha: boolean; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @default true + * @readonly + */ + readonly isGaussianBlurNode: boolean; + /** + * Sets the size of the effect. + * + * @param {number} width - The width of the effect. + * @param {number} height - The height of the effect. + */ + setSize(width: number, height: number): void; + /** + * This method is used to render the effect once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(frame: NodeFrame): void; + /** + * Returns the result of the effect as a texture node. + * + * @return {PassTextureNode} A texture node that represents the result of the effect. + */ + getTextureNode(): PassTextureNode; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {PassTextureNode} + */ + setup(builder: NodeBuilder): PassTextureNode; + /** + * Computes gaussian coefficients depending on the given kernel radius. + * + * @private + * @param {number} kernelRadius - The kernel radius. + * @return {Array} + */ + private _getCoefficients; + set resolution(value: Vector2); + /** + * The resolution scale. + * + * @deprecated + * @type {Vector2} + * @default {(1,1)} + */ + get resolution(): Vector2; +} +import { TempNode } from 'three/webgpu'; +import { Vector2 } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/GodraysNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/GodraysNode.d.ts new file mode 100644 index 000000000..dfd74ef47 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/GodraysNode.d.ts @@ -0,0 +1,201 @@ +export default GodraysNode; +export function godrays(depthNode: TextureNode, camera: Camera, light: (DirectionalLight | PointLight)): GodraysNode; +/** + * Post-Processing node for apply Screen-space raymarched godrays to a scene. + * + * After the godrays have been computed, it's recommened to apply a Bilateral + * Blur to the result to mitigate raymarching and noise artifacts. + * + * The composite with the scene pass is ideally done with `depthAwareBlend()`, + * which mitigates aliasing and light leaking. + * + * ```js + * const godraysPass = godrays( scenePassDepth, camera, light ); + * + * const blurPass = bilateralBlur( godraysPassColor ); // optional blur + * + * const outputBlurred = depthAwareBlend( scenePassColor, blurPassColor, scenePassDepth, camera, { blendColor, edgeRadius, edgeStrength } ); // composite + * ``` + * + * Limitations: + * + * - Only point and directional lights are currently supported. + * - The effect requires a full shadow setup. Meaning shadows must be enabled in the renderer, + * 3D objects must cast and receive shadows and the main light must cast shadows. + * + * Reference: This Node is a part of [three-good-godrays](https://github.com/Ameobea/three-good-godrays). + * + * @augments TempNode + * @three_import import { godrays } from 'three/addons/tsl/display/GodraysNode.js'; + */ +declare class GodraysNode extends TempNode { + /** + * Constructs a new Godrays node. + * + * @param {TextureNode} depthNode - A texture node that represents the scene's depth. + * @param {Camera} camera - The camera the scene is rendered with. + * @param {(DirectionalLight|PointLight)} light - The light the godrays are rendered for. + */ + constructor(depthNode: TextureNode, camera: Camera, light: (DirectionalLight | PointLight)); + /** + * A node that represents the beauty pass's depth. + * + * @type {TextureNode} + */ + depthNode: TextureNode; + /** + * The number of raymarching steps + * + * @type {UniformNode} + * @default 60 + */ + raymarchSteps: UniformNode; + /** + * The rate of accumulation for the godrays. Higher values roughly equate to more humid air/denser fog. + * + * @type {UniformNode} + * @default 0.7 + */ + density: UniformNode; + /** + * The maximum density of the godrays. Limits the maximum brightness of the godrays. + * + * @type {UniformNode} + * @default 0.5 + */ + maxDensity: UniformNode; + /** + * Higher values decrease the accumulation of godrays the further away they are from the light source. + * + * @type {UniformNode} + * @default 2 + */ + distanceAttenuation: UniformNode; + /** + * The resolution scale. + * + * @type {number} + */ + resolutionScale: number; + /** + * Represents the world matrix of the scene's camera. + * + * @private + * @type {UniformNode} + */ + private _cameraMatrixWorld; + /** + * Represents the inverse projection matrix of the scene's camera. + * + * @private + * @type {UniformNode} + */ + private _cameraProjectionMatrixInverse; + /** + * Represents the inverse projection matrix of the scene's camera. + * + * @private + * @type {UniformNode} + */ + private _premultipliedLightCameraMatrix; + /** + * Represents the world position of the scene's camera. + * + * @private + * @type {UniformNode} + */ + private _cameraPosition; + /** + * Represents the near value of the scene's camera. + * + * @private + * @type {ReferenceNode} + */ + private _cameraNear; + /** + * Represents the far value of the scene's camera. + * + * @private + * @type {ReferenceNode} + */ + private _cameraFar; + /** + * The near value of the shadow camera. + * + * @private + * @type {ReferenceNode} + */ + private _shadowCameraNear; + /** + * The far value of the shadow camera. + * + * @private + * @type {ReferenceNode} + */ + private _shadowCameraFar; + _fNormals: import("three/webgpu").UniformArrayNode; + _fConstants: import("three/webgpu").UniformArrayNode; + /** + * The light the godrays are rendered for. + * + * @private + * @type {(DirectionalLight|PointLight)} + */ + private _light; + /** + * The camera the scene is rendered with. + * + * @private + * @type {Camera} + */ + private _camera; + /** + * The render target the godrays are rendered into. + * + * @private + * @type {RenderTarget} + */ + private _godraysRenderTarget; + /** + * The material that is used to render the effect. + * + * @private + * @type {NodeMaterial} + */ + private _material; + /** + * The result of the effect is represented as a separate texture node. + * + * @private + * @type {PassTextureNode} + */ + private _textureNode; + /** + * Returns the result of the effect as a texture node. + * + * @return {PassTextureNode} A texture node that represents the result of the effect. + */ + getTextureNode(): PassTextureNode; + /** + * Sets the size of the effect. + * + * @param {number} width - The width of the effect. + * @param {number} height - The height of the effect. + */ + setSize(width: number, height: number): void; + /** + * This method is used to render the effect once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(frame: NodeFrame): void; + _updateLightParams(): void; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {PassTextureNode} + */ + setup(builder: NodeBuilder): PassTextureNode; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/LensflareNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/LensflareNode.d.ts new file mode 100644 index 000000000..924f98774 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/LensflareNode.d.ts @@ -0,0 +1,132 @@ +export default LensflareNode; +export function lensflare(node: TextureNode, params: { + ghostTint?: Node | Color; + threshold?: Node | number; + ghostSamples?: Node | number; + ghostSpacing?: Node | number; + ghostAttenuationFactor?: Node | number; + downSampleRatio?: number | undefined; +}): LensflareNode; +/** + * Post processing node for adding a bloom-based lens flare effect. This effect + * requires that you extract the bloom of the scene via a bloom pass first. + * + * References: + * - {@link https://john-chapman-graphics.blogspot.com/2013/02/pseudo-lens-flare.html}. + * - {@link https://john-chapman.github.io/2017/11/05/pseudo-lens-flare.html}. + * + * @augments TempNode + * @three_import import { lensflare } from 'three/addons/tsl/display/LensflareNode.js'; + */ +declare class LensflareNode extends TempNode { + /** + * Constructs a new lens flare node. + * + * @param {TextureNode} textureNode - The texture node that represents the scene's bloom. + * @param {Object} params - The parameter object for configuring the effect. + * @param {Node | Color} [params.ghostTint=vec3(1, 1, 1)] - Defines the tint of the flare/ghosts. + * @param {Node | number} [params.threshold=float(0.5)] - Controls the size and strength of the effect. A higher threshold results in smaller flares. + * @param {Node | number} [params.ghostSamples=float(4)] - Represents the number of flares/ghosts per bright spot which pivot around the center. + * @param {Node | number} [params.ghostSpacing=float(0.25)] - Defines the spacing of the flares/ghosts. + * @param {Node | number} [params.ghostAttenuationFactor=float(25)] - Defines the attenuation factor of flares/ghosts. + * @param {number} [params.downSampleRatio=4] - Defines how downsampling since the effect is usually not rendered at full resolution. + */ + constructor(textureNode: TextureNode, params?: { + ghostTint?: Node | Color; + threshold?: Node | number; + ghostSamples?: Node | number; + ghostSpacing?: Node | number; + ghostAttenuationFactor?: Node | number; + downSampleRatio?: number | undefined; + }); + /** + * The texture node that represents the scene's bloom. + * + * @type {TextureNode} + */ + textureNode: TextureNode; + /** + * Defines the tint of the flare/ghosts. + * + * @type {Node} + */ + ghostTintNode: Node; + /** + * Controls the size and strength of the effect. A higher threshold results in smaller flares. + * + * @type {Node} + */ + thresholdNode: Node; + /** + * Represents the number of flares/ghosts per bright spot which pivot around the center. + * + * @type {Node} + */ + ghostSamplesNode: Node; + /** + * Defines the spacing of the flares/ghosts. + * + * @type {Node} + */ + ghostSpacingNode: Node; + /** + * Defines the attenuation factor of flares/ghosts. + * + * @type {Node} + */ + ghostAttenuationFactorNode: Node; + /** + * Defines how downsampling since the effect is usually not rendered at full resolution. + * + * @type {number} + */ + downSampleRatio: number; + /** + * The internal render target of the effect. + * + * @private + * @type {RenderTarget} + */ + private _renderTarget; + /** + * The node material that holds the effect's TSL code. + * + * @private + * @type {NodeMaterial} + */ + private _material; + /** + * The result of the effect is represented as a separate texture node. + * + * @private + * @type {PassTextureNode} + */ + private _textureNode; + /** + * Returns the result of the effect as a texture node. + * + * @return {PassTextureNode} A texture node that represents the result of the effect. + */ + getTextureNode(): PassTextureNode; + /** + * Sets the size of the effect. + * + * @param {number} width - The width of the effect. + * @param {number} height - The height of the effect. + */ + setSize(width: number, height: number): void; + /** + * This method is used to render the effect once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(frame: NodeFrame): void; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {PassTextureNode} + */ + setup(builder: NodeBuilder): PassTextureNode; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/Lut3DNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/Lut3DNode.d.ts new file mode 100644 index 000000000..29e3620ff --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/Lut3DNode.d.ts @@ -0,0 +1,51 @@ +export default Lut3DNode; +export function lut3D(node: Node, lut: TextureNode, size: number, intensity: Node | number): Lut3DNode; +/** + * A post processing node for color grading via lookup tables. + * + * @augments TempNode + * @three_import import { lut3D } from 'three/addons/tsl/display/Lut3DNode.js'; + */ +declare class Lut3DNode extends TempNode { + /** + * Constructs a new LUT node. + * + * @param {Node} inputNode - The node that represents the input of the effect. + * @param {TextureNode} lutNode - A texture node that represents the lookup table. + * @param {number} size - The size of the lookup table. + * @param {Node} intensityNode - Controls the intensity of the effect. + */ + constructor(inputNode: Node, lutNode: TextureNode, size: number, intensityNode: Node); + /** + * The node that represents the input of the effect. + * + * @type {Node} + */ + inputNode: Node; + /** + * A texture node that represents the lookup table. + * + * @type {TextureNode} + */ + lutNode: TextureNode; + /** + * The size of the lookup table. + * + * @type {UniformNode} + */ + size: UniformNode; + /** + * Controls the intensity of the effect. + * + * @type {Node} + */ + intensityNode: Node; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {ShaderCallNodeInternal} + */ + setup(): ShaderCallNodeInternal; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/MotionBlur.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/MotionBlur.d.ts new file mode 100644 index 000000000..618927b5d --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/MotionBlur.d.ts @@ -0,0 +1,11 @@ +/** + * Applies a motion blur effect to the given input node. + * + * @tsl + * @function + * @param {Node} inputNode - The input node to apply the motion blur for. + * @param {Node} velocity - The motion vectors of the beauty pass. + * @param {Node} [numSamples=int(16)] - How many samples the effect should use. A higher value results in better quality but is also more expensive. + * @return {Node} The input node with the motion blur effect applied. + */ +export const motionBlur: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/OutlineNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/OutlineNode.d.ts new file mode 100644 index 000000000..a7b2befe2 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/OutlineNode.d.ts @@ -0,0 +1,351 @@ +export default OutlineNode; +export function outline(scene: Scene, camera: Camera, params: { + selectedObjects?: Object3D[] | undefined; + edgeThickness?: Node; + edgeGlow?: Node; + downSampleRatio?: number | undefined; +}): OutlineNode; +/** + * Post processing node for rendering outlines around selected objects. The node + * gives you great flexibility in composing the final outline look depending on + * your requirements. + * ```js + * const renderPipeline = new THREE.RenderPipeline( renderer ); + * + * const scenePass = pass( scene, camera ); + * + * // outline parameter + * + * const edgeStrength = uniform( 3.0 ); + * const edgeGlow = uniform( 0.0 ); + * const edgeThickness = uniform( 1.0 ); + * const visibleEdgeColor = uniform( new THREE.Color( 0xffffff ) ); + * const hiddenEdgeColor = uniform( new THREE.Color( 0x4e3636 ) ); + * + * outlinePass = outline( scene, camera, { + * selectedObjects, + * edgeGlow, + * edgeThickness + * } ); + * + * // compose custom outline + * + * const { visibleEdge, hiddenEdge } = outlinePass; + * const outlineColor = visibleEdge.mul( visibleEdgeColor ).add( hiddenEdge.mul( hiddenEdgeColor ) ).mul( edgeStrength ); + * + * renderPipeline.outputNode = outlineColor.add( scenePass ); + * ``` + * + * @augments TempNode + * @three_import import { outline } from 'three/addons/tsl/display/OutlineNode.js'; + */ +declare class OutlineNode extends TempNode { + /** + * Constructs a new outline node. + * + * @param {Scene} scene - A reference to the scene. + * @param {Camera} camera - The camera the scene is rendered with. + * @param {Object} params - The configuration parameters. + * @param {Array} [params.selectedObjects] - An array of selected objects. + * @param {Node} [params.edgeThickness=float(1)] - The thickness of the edges. + * @param {Node} [params.edgeGlow=float(0)] - Can be used for an animated glow/pulse effects. + * @param {number} [params.downSampleRatio=2] - The downsample ratio. + */ + constructor(scene: Scene, camera: Camera, params?: { + selectedObjects?: Object3D[] | undefined; + edgeThickness?: Node; + edgeGlow?: Node; + downSampleRatio?: number | undefined; + }); + /** + * A reference to the scene. + * + * @type {Scene} + */ + scene: Scene; + /** + * The camera the scene is rendered with. + * + * @type {Camera} + */ + camera: Camera; + /** + * An array of selected objects. + * + * @type {Array} + */ + selectedObjects: Array; + /** + * The thickness of the edges. + * + * @type {Node} + */ + edgeThicknessNode: Node; + /** + * Can be used for an animated glow/pulse effect. + * + * @type {Node} + */ + edgeGlowNode: Node; + /** + * The downsample ratio. + * + * @type {number} + * @default 2 + */ + downSampleRatio: number; + /** + * The render target for the depth pre-pass. + * + * @private + * @type {RenderTarget} + */ + private _renderTargetDepthBuffer; + /** + * The render target for the mask pass. + * + * @private + * @type {RenderTarget} + */ + private _renderTargetMaskBuffer; + /** + * The render target for the mask downsample. + * + * @private + * @type {RenderTarget} + */ + private _renderTargetMaskDownSampleBuffer; + /** + * The first render target for the edge detection. + * + * @private + * @type {RenderTarget} + */ + private _renderTargetEdgeBuffer1; + /** + * The second render target for the edge detection. + * + * @private + * @type {RenderTarget} + */ + private _renderTargetEdgeBuffer2; + /** + * The first render target for the blur pass. + * + * @private + * @type {RenderTarget} + */ + private _renderTargetBlurBuffer1; + /** + * The second render target for the blur pass. + * + * @private + * @type {RenderTarget} + */ + private _renderTargetBlurBuffer2; + /** + * The render target for the final composite. + * + * @private + * @type {RenderTarget} + */ + private _renderTargetComposite; + /** + * Represents the near value of the scene's camera. + * + * @private + * @type {ReferenceNode} + */ + private _cameraNear; + /** + * Represents the far value of the scene's camera. + * + * @private + * @type {ReferenceNode} + */ + private _cameraFar; + /** + * Uniform that represents the blur direction of the pass. + * + * @private + * @type {UniformNode} + */ + private _blurDirection; + /** + * Texture node that holds the data from the depth pre-pass. + * + * @private + * @type {TextureNode} + */ + private _depthTextureUniform; + /** + * Texture node that holds the data from the mask pass. + * + * @private + * @type {TextureNode} + */ + private _maskTextureUniform; + /** + * Texture node that holds the data from the mask downsample pass. + * + * @private + * @type {TextureNode} + */ + private _maskTextureDownsSampleUniform; + /** + * Texture node that holds the data from the first edge detection pass. + * + * @private + * @type {TextureNode} + */ + private _edge1TextureUniform; + /** + * Texture node that holds the data from the second edge detection pass. + * + * @private + * @type {TextureNode} + */ + private _edge2TextureUniform; + /** + * Texture node that holds the current blurred color data. + * + * @private + * @type {TextureNode} + */ + private _blurColorTextureUniform; + /** + * Visible edge color. + * + * @private + * @type {Node} + */ + private _visibleEdgeColor; + /** + * Hidden edge color. + * + * @private + * @type {Node} + */ + private _hiddenEdgeColor; + /** + * The material for the depth pre-pass. + * + * @private + * @type {NodeMaterial} + */ + private _depthMaterial; + _depthSpriteMaterial: SpriteNodeMaterial; + /** + * The material for preparing the mask. + * + * @private + * @type {NodeMaterial} + */ + private _prepareMaskMaterial; + _prepareMaskSpriteMaterial: SpriteNodeMaterial; + /** + * The copy material + * + * @private + * @type {NodeMaterial} + */ + private _materialCopy; + /** + * The edge detection material. + * + * @private + * @type {NodeMaterial} + */ + private _edgeDetectionMaterial; + /** + * The material that is used to render in the blur pass. + * + * @private + * @type {NodeMaterial} + */ + private _separableBlurMaterial; + /** + * The material that is used to render in the blur pass. + * + * @private + * @type {NodeMaterial} + */ + private _separableBlurMaterial2; + /** + * The final composite material. + * + * @private + * @type {NodeMaterial} + */ + private _compositeMaterial; + /** + * A set to cache selected objects in the scene. + * + * @private + * @type {Set} + */ + private _selectionCache; + /** + * The number of selected objects from the previous frame. Used to detect + * the transition to an empty selection so the composite render target can + * be cleared once and avoid leaving a stale outline on screen. + * + * @private + * @type {number} + * @default 0 + */ + private _lastSelectionCount; + /** + * The result of the effect is represented as a separate texture node. + * + * @private + * @type {PassTextureNode} + */ + private _textureNode; + /** + * A mask value that represents the visible edge. + * + * @return {Node} The visible edge. + */ + get visibleEdge(): Node; + /** + * A mask value that represents the hidden edge. + * + * @return {Node} The hidden edge. + */ + get hiddenEdge(): Node; + /** + * Returns the result of the effect as a texture node. + * + * @return {PassTextureNode} A texture node that represents the result of the effect. + */ + getTextureNode(): PassTextureNode; + /** + * Sets the size of the effect. + * + * @param {number} width - The width of the effect. + * @param {number} height - The height of the effect. + */ + setSize(width: number, height: number): void; + /** + * This method is used to render the effect once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(frame: NodeFrame): void; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {PassTextureNode} + */ + setup(): PassTextureNode; + /** + * Updates the selection cache based on the selected objects. + * + * @private + */ + private _updateSelectionCache; +} +import { TempNode } from 'three/webgpu'; +import { SpriteNodeMaterial } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/ParallaxBarrierPassNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/ParallaxBarrierPassNode.d.ts new file mode 100644 index 000000000..a63395293 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/ParallaxBarrierPassNode.d.ts @@ -0,0 +1,26 @@ +export default ParallaxBarrierPassNode; +export function parallaxBarrierPass(scene: Scene, camera: Camera): ParallaxBarrierPassNode; +/** + * A render pass node that creates a parallax barrier effect. + * + * @augments StereoCompositePassNode + * @three_import import { parallaxBarrierPass } from 'three/addons/tsl/display/ParallaxBarrierPassNode.js'; + */ +declare class ParallaxBarrierPassNode extends StereoCompositePassNode { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isParallaxBarrierPassNode: boolean; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {PassTextureNode} + */ + setup(builder: NodeBuilder): PassTextureNode; +} +import StereoCompositePassNode from './StereoCompositePassNode.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/PixelationPassNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/PixelationPassNode.d.ts new file mode 100644 index 000000000..8e2a1b56e --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/PixelationPassNode.d.ts @@ -0,0 +1,134 @@ +export function pixelationPass(scene: Scene, camera: Camera, pixelSize?: Node | number, normalEdgeStrength?: Node | number, depthEdgeStrength?: Node | number): PixelationPassNode; +export default PixelationPassNode; +/** + * A special render pass node that renders the scene with a pixelation effect. + * + * @augments PassNode + * @three_import import { pixelationPass } from 'three/addons/tsl/display/PixelationPassNode.js'; + */ +declare class PixelationPassNode extends PassNode { + /** + * Constructs a new pixelation pass node. + * + * @param {Scene} scene - The scene to render. + * @param {Camera} camera - The camera to render the scene with. + * @param {Node | number} [pixelSize=6] - The pixel size. + * @param {Node | number} [normalEdgeStrength=0.3] - The normal edge strength. + * @param {Node | number} [depthEdgeStrength=0.4] - The depth edge strength. + */ + constructor(scene: Scene, camera: Camera, pixelSize?: Node | number, normalEdgeStrength?: Node | number, depthEdgeStrength?: Node | number); + /** + * The pixel size. + * + * @type {number} + * @default 6 + */ + pixelSize: number; + /** + * The normal edge strength. + * + * @type {number} + * @default 0.3 + */ + normalEdgeStrength: number; + /** + * The depth edge strength. + * + * @type {number} + * @default 0.4 + */ + depthEdgeStrength: number; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isPixelationPassNode: boolean; + _mrt: any; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {PixelationNode} + */ + setup(): PixelationNode; +} +import { PassNode } from 'three/webgpu'; +/** + * A inner node definition that implements the actual pixelation TSL code. + * + * @inner + * @augments TempNode + */ +declare class PixelationNode extends TempNode { + /** + * Constructs a new pixelation node. + * + * @param {TextureNode} textureNode - The texture node that represents the beauty pass. + * @param {TextureNode} depthNode - The texture that represents the beauty's depth. + * @param {TextureNode} normalNode - The texture that represents the beauty's normals. + * @param {Node} pixelSize - The pixel size. + * @param {Node} normalEdgeStrength - The normal edge strength. + * @param {Node} depthEdgeStrength - The depth edge strength. + */ + constructor(textureNode: TextureNode, depthNode: TextureNode, normalNode: TextureNode, pixelSize: Node, normalEdgeStrength: Node, depthEdgeStrength: Node); + /** + * The texture node that represents the beauty pass. + * + * @type {TextureNode} + */ + textureNode: TextureNode; + /** + * The texture that represents the beauty's depth. + * + * @type {TextureNode} + */ + depthNode: TextureNode; + /** + * The texture that represents the beauty's normals. + * + * @type {TextureNode} + */ + normalNode: TextureNode; + /** + * The pixel size. + * + * @type {Node} + */ + pixelSize: Node; + /** + * The pixel size. + * + * @type {Node} + */ + normalEdgeStrength: Node; + /** + * The depth edge strength. + * + * @type {Node} + */ + depthEdgeStrength: Node; + /** + * Uniform node that represents the resolution. + * + * @private + * @type {Node} + */ + private _resolution; + /** + * This method is used to update uniforms once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + update(): void; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {ShaderCallNodeInternal} + */ + setup(): ShaderCallNodeInternal; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/RGBShiftNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/RGBShiftNode.d.ts new file mode 100644 index 000000000..efcef8e20 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/RGBShiftNode.d.ts @@ -0,0 +1,45 @@ +export default RGBShiftNode; +export function rgbShift(node: Node, amount?: number, angle?: number): RGBShiftNode; +/** + * Post processing node for shifting/splitting RGB color channels. The effect + * separates color channels and offsets them from each other. + * + * @augments TempNode + * @three_import import { rgbShift } from 'three/addons/tsl/display/RGBShiftNode.js'; + */ +declare class RGBShiftNode extends TempNode { + /** + * Constructs a new RGB shift node. + * + * @param {TextureNode} textureNode - The texture node that represents the input of the effect. + * @param {number} [amount=0.005] - The amount of the RGB shift. + * @param {number} [angle=0] - Defines the orientation in which colors are shifted. + */ + constructor(textureNode: TextureNode, amount?: number, angle?: number); + /** + * The texture node that represents the input of the effect. + * + * @type {TextureNode} + */ + textureNode: TextureNode; + /** + * The amount of the RGB shift. + * + * @type {UniformNode} + */ + amount: UniformNode; + /** + * Defines in which direction colors are shifted. + * + * @type {UniformNode} + */ + angle: UniformNode; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {ShaderCallNodeInternal} + */ + setup(): ShaderCallNodeInternal; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/RetroPassNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/RetroPassNode.d.ts new file mode 100644 index 000000000..26e36a922 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/RetroPassNode.d.ts @@ -0,0 +1,40 @@ +export default RetroPassNode; +export function retroPass(scene: Scene, camera: Camera, options?: { + affineDistortion?: Node | undefined; +}): RetroPassNode; +/** + * A post-processing pass that applies a retro PS1-style effect to the scene. + * + * This node renders the scene with classic PlayStation 1 visual characteristics: + * - **Vertex snapping**: Vertices are snapped to screen pixels, creating the iconic "wobbly" geometry + * - **Affine texture mapping**: Textures are sampled without perspective correction, resulting in distortion effects + * - **Low resolution**: Default 0.25 scale (typical 320x240 equivalent) + * - **Nearest-neighbor filtering**: Sharp pixelated textures without smoothing + * + * @augments PassNode + */ +declare class RetroPassNode extends PassNode { + /** + * Creates a new RetroPassNode instance. + * + * @param {Scene} scene - The scene to render. + * @param {Camera} camera - The camera to render from. + * @param {Object} [options={}] - Additional options for the retro pass. + * @param {Node} [options.affineDistortion=null] - An optional node to apply affine distortion to UVs. + */ + constructor(scene: Scene, camera: Camera, options?: { + affineDistortion?: Node | undefined; + }); + affineDistortionNode: Node | null; + filterTextures: any; + _materialCache: Map; + /** + * Updates the retro pass before rendering. + * + * @override + * @param {Frame} frame - The current frame information. + * @returns {void} + */ + override updateBefore(frame: Frame): void; +} +import { PassNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SMAANode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SMAANode.d.ts new file mode 100644 index 000000000..412d29a3a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SMAANode.d.ts @@ -0,0 +1,166 @@ +export default SMAANode; +export function smaa(node: Node): SMAANode; +/** + * Post processing node for applying SMAA. Unlike FXAA, this node + * should be applied before converting colors to sRGB. SMAA should produce + * better results than FXAA but is also more expensive to execute. + * + * Used Preset: SMAA 1x Medium (with color edge detection) + * Reference: {@link https://github.com/iryoku/smaa/releases/tag/v2.8}. + * + * @augments TempNode + * @three_import import { smaa } from 'three/addons/tsl/display/SMAANode.js'; + */ +declare class SMAANode extends TempNode { + /** + * Constructs a new SMAA node. + * + * @param {TextureNode} textureNode - The texture node that represents the input of the effect. + */ + constructor(textureNode: TextureNode); + /** + * The texture node that represents the input of the effect. + * + * @type {TextureNode} + */ + textureNode: TextureNode; + /** + * The render target used for the edges pass. + * + * @private + * @type {RenderTarget} + */ + private _renderTargetEdges; + /** + * The render target used for the weights pass. + * + * @private + * @type {RenderTarget} + */ + private _renderTargetWeights; + /** + * The render target used for the blend pass. + * + * @private + * @type {RenderTarget} + */ + private _renderTargetBlend; + /** + * Represents the "area" texture used by the SMAA implementation. + * + * @private + * @type {RenderTarget} + */ + private _areaTexture; + /** + * Represents the "search" texture used by the SMAA implementation. + * + * @private + * @type {RenderTarget} + */ + private _searchTexture; + /** + * A uniform node holding the inverse resolution value. + * + * @private + * @type {UniformNode} + */ + private _invSize; + /** + * A uniform texture node holding the area texture. + * + * @private + * @type {TextureNode} + */ + private _areaTextureUniform; + /** + * A uniform texture node holding the search texture. + * + * @private + * @type {TextureNode} + */ + private _searchTextureUniform; + /** + * A uniform texture node representing the edges pass. + * + * @private + * @type {TextureNode} + */ + private _edgesTextureUniform; + /** + * A uniform texture node representing the weights pass. + * + * @private + * @type {TextureNode} + */ + private _weightsTextureUniform; + /** + * The node material that holds the TSL for rendering the edges pass. + * + * @private + * @type {NodeMaterial} + */ + private _materialEdges; + /** + * The node material that holds the TSL for rendering the weights pass. + * + * @private + * @type {NodeMaterial} + */ + private _materialWeights; + /** + * The node material that holds the TSL for rendering the blend pass. + * + * @private + * @type {NodeMaterial} + */ + private _materialBlend; + /** + * The result of the effect is represented as a separate texture node. + * + * @private + * @type {PassTextureNode} + */ + private _textureNode; + /** + * Returns the result of the effect as a texture node. + * + * @return {PassTextureNode} A texture node that represents the result of the effect. + */ + getTextureNode(): PassTextureNode; + /** + * Sets the size of the effect. + * + * @param {number} width - The width of the effect. + * @param {number} height - The height of the effect. + */ + setSize(width: number, height: number): void; + /** + * This method is used to render the effect once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(frame: NodeFrame): void; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {PassTextureNode} + */ + setup(builder: NodeBuilder): PassTextureNode; + /** + * Returns the area texture as a Base64 string. + * + * @private + * @return {string} The area texture. + */ + private _getAreaTexture; + /** + * Returns the search texture as a Base64 string.. + * + * @private + * @return {string} The search texture. + */ + private _getSearchTexture; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSAAPassNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSAAPassNode.d.ts new file mode 100644 index 000000000..3aeeb2f9c --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSAAPassNode.d.ts @@ -0,0 +1,82 @@ +export default SSAAPassNode; +export function ssaaPass(scene: Scene, camera: Camera): SSAAPassNode; +/** + * A special render pass node that renders the scene with SSAA (Supersampling Anti-Aliasing). + * This manual SSAA approach re-renders the scene ones for each sample with camera jitter and accumulates the results. + * + * This node produces a high-quality anti-aliased output but is also extremely expensive because of + * its brute-force approach of re-rendering the entire scene multiple times. + * + * Reference: {@link https://en.wikipedia.org/wiki/Supersampling} + * + * @augments PassNode + * @three_import import { ssaaPass } from 'three/addons/tsl/display/SSAAPassNode.js'; + */ +declare class SSAAPassNode extends PassNode { + /** + * Constructs a new SSAA pass node. + * + * @param {Scene} scene - The scene to render. + * @param {Camera} camera - The camera to render the scene with. + */ + constructor(scene: Scene, camera: Camera); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSSAAPassNode: boolean; + /** + * The sample level specified as n, where the number of samples is 2^n, + * so sampleLevel = 4, is 2^4 samples, 16. + * + * @type {number} + * @default 4 + */ + sampleLevel: number; + /** + * Whether rounding errors should be mitigated or not. + * + * @type {boolean} + * @default true + */ + unbiased: boolean; + /** + * A uniform node representing the sample weight. + * + * @type {UniformNode} + * @default 1 + */ + sampleWeight: UniformNode; + /** + * Reference to the internal render target that holds the current sample. + * + * @private + * @type {?RenderTarget} + * @default null + */ + private _sampleRenderTarget; + /** + * Reference to the internal quad mesh. + * + * @private + * @type {QuadMesh} + */ + private _quadMesh; + /** + * This method is used to render the SSAA effect once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(frame: NodeFrame): void; + /** + * This method is used to setup the effect's MRT configuration and quad mesh. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {PassTextureNode} + */ + setup(builder: NodeBuilder): PassTextureNode; +} +import { PassNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSGINode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSGINode.d.ts new file mode 100644 index 000000000..fbd9f302b --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSGINode.d.ts @@ -0,0 +1,263 @@ +export default SSGINode; +export function ssgi(beautyNode: TextureNode, depthNode: TextureNode, normalNode: TextureNode, camera: Camera): SSGINode; +/** + * Post processing node for applying Screen Space Global Illumination (SSGI) to a scene. + * + * References: + * - {@link https://github.com/cdrinmatane/SSRT3}. + * - {@link https://cdrinmatane.github.io/posts/ssaovb-code/}. + * - {@link https://cdrinmatane.github.io/cgspotlight-slides/ssilvb_slides.pdf}. + * + * The quality and performance of the effect mainly depend on `sliceCount` and `stepCount`. + * The total number of samples taken per pixel is `sliceCount` * `stepCount` * `2`. Here are some + * recommended presets depending on whether temporal filtering is used or not. + * + * With temporal filtering (recommended): + * + * - Low: `sliceCount` of `1`, `stepCount` of `12`. + * - Medium: `sliceCount` of `2`, `stepCount` of `8`. + * - High: `sliceCount` of `3`, `stepCount` of `16`. + * + * Use for a higher slice count if you notice temporal instabilities like flickering. Reduce the sample + * count then to mitigate the performance lost. + * + * Without temporal filtering: + * + * - Low: `sliceCount` of `2`, `stepCount` of `6`. + * - Medium: `sliceCount` of `3`, `stepCount` of `8`. + * - High: `sliceCount` of `4`, `stepCount` of `12`. + * + * @augments TempNode + * @three_import import { ssgi } from 'three/addons/tsl/display/SSGINode.js'; + */ +declare class SSGINode extends TempNode { + /** + * Constructs a new SSGI node. + * + * @param {TextureNode} beautyNode - A texture node that represents the beauty or scene pass. + * @param {TextureNode} depthNode - A texture node that represents the scene's depth. + * @param {TextureNode} normalNode - A texture node that represents the scene's normals. + * @param {PerspectiveCamera} camera - The camera the scene is rendered with. + */ + constructor(beautyNode: TextureNode, depthNode: TextureNode, normalNode: TextureNode, camera: PerspectiveCamera); + /** + * A texture node that represents the beauty or scene pass. + * + * @type {TextureNode} + */ + beautyNode: TextureNode; + /** + * A node that represents the scene's depth. + * + * @type {TextureNode} + */ + depthNode: TextureNode; + /** + * A node that represents the scene's normals. If no normals are passed to the + * constructor (because MRT is not available), normals can be automatically + * reconstructed from depth values in the shader. + * + * @type {TextureNode} + */ + normalNode: TextureNode; + /** + * Number of per-pixel hemisphere slices. This has a big performance cost and should be kept as low as possible. + * Should be in the range `[1, 4]`. + * + * @type {UniformNode} + * @default 1 + */ + sliceCount: UniformNode; + /** + * Number of samples taken along one side of a given hemisphere slice. This has a big performance cost and should + * be kept as low as possible. Should be in the range `[1, 32]`. + * + * @type {UniformNode} + * @default 12 + */ + stepCount: UniformNode; + /** + * Power function applied to AO to make it appear darker/lighter. Should be in the range `[0, 4]`. + * + * @type {UniformNode} + * @default 1 + */ + aoIntensity: UniformNode; + /** + * Intensity of the indirect diffuse light. Should be in the range `[0, 100]`. + * + * @type {UniformNode} + * @default 10 + */ + giIntensity: UniformNode; + /** + * Effective sampling radius in world space. AO and GI can only have influence within that radius. + * Should be in the range `[1, 25]`. + * + * @type {UniformNode} + * @default 12 + */ + radius: UniformNode; + /** + * Makes the sample distance in screen space instead of world-space (helps having more detail up close). + * + * @type {UniformNode} + * @default false + */ + useScreenSpaceSampling: UniformNode; + /** + * Controls samples distribution. It's an exponent applied at each step get increasing step size over the distance. + * Should be in the range `[1, 3]`. + * + * @type {UniformNode} + * @default 2 + */ + expFactor: UniformNode; + /** + * Constant thickness value of objects on the screen in world units. Allows light to pass behind surfaces past that thickness value. + * Should be in the range `[0.01, 10]`. + * + * @type {UniformNode} + * @default 1 + */ + thickness: UniformNode; + /** + * Whether to increase thickness linearly over distance or not (avoid losing detail over the distance). + * + * @type {UniformNode} + * @default false + */ + useLinearThickness: UniformNode; + /** + * How much light backface surfaces emit. + * Should be in the range `[0, 1]`. + * + * @type {UniformNode} + * @default 0 + */ + backfaceLighting: UniformNode; + /** + * Whether to use temporal filtering or not. Setting this property to + * `true` requires the usage of `TRAANode`. This will help to reduce noise + * although it introduces typical TAA artifacts like ghosting and temporal + * instabilities. + * + * If setting this property to `false`, a manual denoise via `DenoiseNode` + * is required. + * + * @type {boolean} + * @default true + */ + useTemporalFiltering: boolean; + /** + * The resolution of the effect. + * + * @private + * @type {UniformNode} + */ + private _resolution; + /** + * Used to compute the effective step radius when viewSpaceSampling is `false`. + * + * @private + * @type {UniformNode} + */ + private _halfProjScale; + /** + * Temporal direction that influences the rotation angle for each slice. + * + * @private + * @type {UniformNode} + */ + private _temporalDirection; + /** + * Temporal offset added to the initial ray step. + * + * @private + * @type {UniformNode} + */ + private _temporalOffset; + /** + * Represents the projection matrix of the scene's camera. + * + * @private + * @type {UniformNode} + */ + private _cameraProjectionMatrix; + /** + * Represents the inverse projection matrix of the scene's camera. + * + * @private + * @type {UniformNode} + */ + private _cameraProjectionMatrixInverse; + /** + * Represents the near value of the scene's camera. + * + * @private + * @type {ReferenceNode} + */ + private _cameraNear; + /** + * Represents the far value of the scene's camera. + * + * @private + * @type {ReferenceNode} + */ + private _cameraFar; + /** + * A reference to the scene's camera. + * + * @private + * @type {PerspectiveCamera} + */ + private _camera; + /** + * The render target the GI is rendered into. + * + * @private + * @type {RenderTarget} + */ + private _ssgiRenderTarget; + /** + * The material that is used to render the effect. + * + * @private + * @type {NodeMaterial} + */ + private _material; + /** + * The result of the effect is represented as a separate texture node. + * + * @private + * @type {PassTextureNode} + */ + private _textureNode; + /** + * Returns the result of the effect as a texture node. + * + * @return {PassTextureNode} A texture node that represents the result of the effect. + */ + getTextureNode(): PassTextureNode; + /** + * Sets the size of the effect. + * + * @param {number} width - The width of the effect. + * @param {number} height - The height of the effect. + */ + setSize(width: number, height: number): void; + /** + * This method is used to render the effect once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(frame: NodeFrame): void; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {PassTextureNode} + */ + setup(builder: NodeBuilder): PassTextureNode; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSRNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSRNode.d.ts new file mode 100644 index 000000000..5c187d6a7 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSRNode.d.ts @@ -0,0 +1,235 @@ +export default SSRNode; +export function ssr(colorNode: Node, depthNode: Node, normalNode: Node, metalnessNode: Node, roughnessNode?: Node | null, camera?: Camera | null): SSRNode; +/** + * Post processing node for computing screen space reflections (SSR). + * + * Reference: {@link https://lettier.github.io/3d-game-shaders-for-beginners/screen-space-reflection.html} + * + * @augments TempNode + * @three_import import { ssr } from 'three/addons/tsl/display/SSRNode.js'; + */ +declare class SSRNode extends TempNode { + /** + * Constructs a new SSR node. + * + * @param {Node} colorNode - The node that represents the beauty pass. + * @param {Node} depthNode - A node that represents the beauty pass's depth. + * @param {Node} normalNode - A node that represents the beauty pass's normals. + * @param {Node} metalnessNode - A node that represents the beauty pass's metalness. + * @param {?Node} [roughnessNode=null] - A node that represents the beauty pass's roughness. + * @param {?Camera} [camera=null] - The camera the scene is rendered with. + */ + constructor(colorNode: Node, depthNode: Node, normalNode: Node, metalnessNode: Node, roughnessNode?: Node | null, camera?: Camera | null); + /** + * The node that represents the beauty pass. + * + * @type {Node} + */ + colorNode: Node; + /** + * A node that represents the beauty pass's depth. + * + * @type {Node} + */ + depthNode: Node; + /** + * A node that represents the beauty pass's normals. + * + * @type {Node} + */ + normalNode: Node; + /** + * A node that represents the beauty pass's metalness. + * + * @type {Node} + */ + metalnessNode: Node; + /** + * Whether the SSR reflections should be blurred or not. Blurring is a costly + * operation so turn it off if you encounter performance issues on certain + * devices. + * + * @private + * @type {Node} + * @default false + */ + private roughnessNode; + /** + * The resolution scale. Valid values are in the range + * `[0,1]`. `1` means best quality but also results in + * more computational overhead. Setting to `0.5` means + * the effect is computed in half-resolution. + * + * @type {number} + * @default 1 + */ + resolutionScale: number; + /** + * Controls how far a fragment can reflect. Increasing this value result in more + * computational overhead but also increases the reflection distance. + * + * @type {UniformNode} + */ + maxDistance: UniformNode; + /** + * Controls the cutoff between what counts as a possible reflection hit and what does not. + * + * @type {UniformNode} + */ + thickness: UniformNode; + /** + * Controls how the SSR reflections are blended with the beauty pass. + * + * @type {UniformNode} + */ + opacity: UniformNode; + /** + * This parameter controls how detailed the raymarching process works. + * The value ranges is `[0,1]` where `1` means best quality (the maximum number + * of raymarching iterations/samples) and `0` means no samples at all. + * + * A quality of `0.5` is usually sufficient for most use cases. Try to keep + * this parameter as low as possible. Larger values result in noticeable more + * overhead. + * + * @type {UniformNode} + */ + quality: UniformNode; + /** + * The quality of the blur. Must be an integer in the range `[1,3]`. + * + * @type {UniformNode} + */ + blurQuality: UniformNode; + /** + * The camera the scene is rendered with. + * + * @type {Camera} + */ + camera: Camera; + /** + * The spread of the blur. Automatically set when generating mips. + * + * @private + * @type {UniformNode} + */ + private _blurSpread; + /** + * Represents the projection matrix of the scene's camera. + * + * @private + * @type {UniformNode} + */ + private _cameraProjectionMatrix; + /** + * Represents the inverse projection matrix of the scene's camera. + * + * @private + * @type {UniformNode} + */ + private _cameraProjectionMatrixInverse; + /** + * Represents the near value of the scene's camera. + * + * @private + * @type {ReferenceNode} + */ + private _cameraNear; + /** + * Represents the far value of the scene's camera. + * + * @private + * @type {ReferenceNode} + */ + private _cameraFar; + /** + * Whether the scene's camera is perspective or orthographic. + * + * @private + * @type {UniformNode} + */ + private _isPerspectiveCamera; + /** + * The resolution of the pass. + * + * @private + * @type {UniformNode} + */ + private _resolution; + /** + * The render target the SSR is rendered into. + * + * @private + * @type {RenderTarget} + */ + private _ssrRenderTarget; + /** + * The render target for the blurred SSR reflections. + * + * @private + * @type {RenderTarget} + */ + private _blurRenderTarget; + /** + * The material that is used to render the effect. + * + * @private + * @type {NodeMaterial} + */ + private _ssrMaterial; + /** + * The blur material. + * + * @private + * @type {NodeMaterial} + */ + private _blurMaterial; + /** + * The copy material. + * + * @private + * @type {NodeMaterial} + */ + private _copyMaterial; + /** + * The result of the effect is represented as a separate texture node. + * + * @private + * @type {PassTextureNode} + */ + private _textureNode; + /** + * Holds the blurred SSR reflections. + * + * @private + * @type {?PassTextureNode} + */ + private _blurredTextureNode; + /** + * Returns the result of the effect as a texture node. + * + * @return {PassTextureNode} A texture node that represents the result of the effect. + */ + getTextureNode(): PassTextureNode; + /** + * Sets the size of the effect. + * + * @param {number} width - The width of the effect. + * @param {number} height - The height of the effect. + */ + setSize(width: number, height: number): void; + /** + * This method is used to render the effect once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(frame: NodeFrame): void; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {PassTextureNode} + */ + setup(builder: NodeBuilder): PassTextureNode; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSSNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSSNode.d.ts new file mode 100644 index 000000000..dec7a6ea5 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSSNode.d.ts @@ -0,0 +1,226 @@ +export default SSSNode; +export function sss(depthNode: TextureNode, camera: Camera, mainLight: DirectionalLight): SSSNode; +/** + * Post processing node for applying Screen-Space Shadows (SSS) to a scene. + * + * Screen-Space Shadows (also known as Contact Shadows) should ideally be used to complement + * traditional shadow maps. They are best suited for rendering detailed shadows of smaller + * objects at a closer scale like intricate shadowing on highly detailed models. In other words: + * Use Shadow Maps for the foundation and Screen-Space Shadows for the details. + * + * The shadows produced by this implementation might have too hard edges for certain use cases. + * Use a box, gaussian or hash blur to soften the edges before doing the composite with the + * beauty pass. Code example: + * + * ```js + * const sssPass = sss( scenePassDepth, camera, mainLight ); + * + * const sssBlur = boxBlur( sssPass.r, { size: 2, separation: 1 } ); // optional blur + * ``` + * + * Limitations: + * + * - Ideally the maximum shadow length should not exceed `1` meter. Otherwise the effect gets + * computationally very expensive since more samples during the ray marching process are evaluated. + * You can mitigate this issue by reducing the `quality` paramter. + * - The effect can only be used with a single directional light, the main light of your scene. + * This main light usually represents the sun or daylight. + * - Like other Screen-Space techniques SSS can only honor objects in the shadowing computation that + * are currently visible within the camera's view. + * + * References: + * - {@link https://panoskarabelas.com/posts/screen_space_shadows/}. + * - {@link https://www.bendstudio.com/blog/inside-bend-screen-space-shadows/}. + * + * @augments TempNode + * @three_import import { sss } from 'three/addons/tsl/display/SSSNode.js'; + */ +declare class SSSNode extends TempNode { + /** + * Constructs a new SSS node. + * + * @param {TextureNode} depthNode - A texture node that represents the scene's depth. + * @param {Camera} camera - The camera the scene is rendered with. + * @param {DirectionalLight} mainLight - The main directional light of the scene. + */ + constructor(depthNode: TextureNode, camera: Camera, mainLight: DirectionalLight); + /** + * A node that represents the beauty pass's depth. + * + * @type {TextureNode} + */ + depthNode: TextureNode; + /** + * Maximum shadow length in world units. Longer shadows result in more computational + * overhead. + * + * @type {UniformNode} + * @default 0.1 + */ + maxDistance: UniformNode; + /** + * Depth testing thickness. + * + * @type {UniformNode} + * @default 0.01 + */ + thickness: UniformNode; + /** + * Shadow intensity. Must be in the range `[0, 1]`. + * + * @type {UniformNode} + * @default 1.0 + */ + shadowIntensity: UniformNode; + /** + * This parameter controls how detailed the raymarching process works. + * The value ranges is `[0,1]` where `1` means best quality (the maximum number + * of raymarching iterations/samples) and `0` means no samples at all. + * + * A quality of `0.5` is usually sufficient for most use cases. Try to keep + * this parameter as low as possible. Larger values result in noticeable more + * overhead. + * + * @type {UniformNode} + * @default 0.5 + */ + quality: UniformNode; + /** + * The resolution scale. Valid values are in the range + * `[0,1]`. `1` means best quality but also results in + * more computational overhead. Setting to `0.5` means + * the effect is computed in half-resolution. + * + * @type {number} + * @default 1 + */ + resolutionScale: number; + /** + * Whether to use temporal filtering or not. Setting this property to + * `true` requires the usage of `TRAANode`. This will help to reduce noice + * although it introduces typical TAA artifacts like ghosting and temporal + * instabilities. + * + * @type {boolean} + * @default false + */ + useTemporalFiltering: boolean; + /** + * Represents the view matrix of the scene's camera. + * + * @private + * @type {UniformNode} + */ + private _cameraViewMatrix; + /** + * Represents the projection matrix of the scene's camera. + * + * @private + * @type {UniformNode} + */ + private _cameraProjectionMatrix; + /** + * Represents the inverse projection matrix of the scene's camera. + * + * @private + * @type {UniformNode} + */ + private _cameraProjectionMatrixInverse; + /** + * Represents the near value of the scene's camera. + * + * @private + * @type {ReferenceNode} + */ + private _cameraNear; + /** + * Represents the far value of the scene's camera. + * + * @private + * @type {ReferenceNode} + */ + private _cameraFar; + /** + * The resolution of the pass. + * + * @private + * @type {UniformNode} + */ + private _resolution; + /** + * Temporal offset added to the initial ray step. + * + * @private + * @type {UniformNode} + */ + private _temporalOffset; + /** + * The frame ID use when temporal filtering is enabled. + * + * @private + * @type {UniformNode} + */ + private _frameId; + /** + * A reference to the scene's main light. + * + * @private + * @type {DirectionalLight} + */ + private _mainLight; + /** + * The camera the scene is rendered with. + * + * @private + * @type {Camera} + */ + private _camera; + /** + * The render target the SSS is rendered into. + * + * @private + * @type {RenderTarget} + */ + private _sssRenderTarget; + /** + * The material that is used to render the effect. + * + * @private + * @type {NodeMaterial} + */ + private _material; + /** + * The result of the effect is represented as a separate texture node. + * + * @private + * @type {PassTextureNode} + */ + private _textureNode; + /** + * Returns the result of the effect as a texture node. + * + * @return {PassTextureNode} A texture node that represents the result of the effect. + */ + getTextureNode(): PassTextureNode; + /** + * Sets the size of the effect. + * + * @param {number} width - The width of the effect. + * @param {number} height - The height of the effect. + */ + setSize(width: number, height: number): void; + /** + * This method is used to render the effect once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(frame: NodeFrame): void; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {PassTextureNode} + */ + setup(builder: NodeBuilder): PassTextureNode; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/Sepia.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/Sepia.d.ts new file mode 100644 index 000000000..a1ddcf38d --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/Sepia.d.ts @@ -0,0 +1,9 @@ +/** + * Applies a sepia effect to the given color node. + * + * @tsl + * @function + * @param {Node} color - The color node to apply the sepia for. + * @return {Node} The updated color node. + */ +export const sepia: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/Shape.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/Shape.d.ts new file mode 100644 index 000000000..2df2ca224 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/Shape.d.ts @@ -0,0 +1,12 @@ +/** + * Returns a radial gradient from center (white) to edges (black). + * Useful for masking effects based on distance from center. + * + * @tsl + * @function + * @param {Node} [scale=1.0] - Controls the size of the gradient (0 = all black, 1 = full circle). + * @param {Node} [softness=0.5] - Controls the edge softness (0 = hard edge, 1 = soft gradient). + * @param {Node} [coord=uv()] - The input UV coordinates. + * @return {Node} 1.0 at center, 0.0 at edges. + */ +export const circle: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SharpenNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SharpenNode.d.ts new file mode 100644 index 000000000..c6886ab8a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SharpenNode.d.ts @@ -0,0 +1,96 @@ +export default SharpenNode; +export function sharpen(node: Node, sharpness?: (number | Node), denoise?: (boolean | Node)): SharpenNode; +/** + * Post processing node for contrast-adaptive sharpening (RCAS). + * + * Reference: {@link https://gpuopen.com/fidelityfx-superresolution/}. + * + * @augments TempNode + * @three_import import { sharpen } from 'three/addons/tsl/display/SharpenNode.js'; + */ +declare class SharpenNode extends TempNode { + /** + * Constructs a new sharpen node. + * + * @param {TextureNode} textureNode - The texture node that represents the input of the effect. + * @param {Node} [sharpness=0.2] - Sharpening strength. 0 = maximum sharpening, 2 = no sharpening. + * @param {Node} [denoise=false] - Whether to attenuate sharpening in noisy areas. + */ + constructor(textureNode: TextureNode, sharpness?: Node, denoise?: Node); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSharpenNode: boolean; + /** + * The texture node that represents the input of the effect. + * + * @type {TextureNode} + */ + textureNode: TextureNode; + /** + * Sharpening strength. 0 = maximum, 2 = none. + * + * @type {Node} + * @default 0.2 + */ + sharpness: Node; + /** + * Whether to attenuate sharpening in noisy areas. + * + * @type {Node} + * @default false + */ + denoise: Node; + /** + * The render target for the sharpening pass. + * + * @private + * @type {RenderTarget} + */ + private _renderTarget; + /** + * The result of the effect as a texture node. + * + * @private + * @type {PassTextureNode} + */ + private _textureNode; + /** + * The material for the sharpening pass. + * + * @private + * @type {?NodeMaterial} + */ + private _material; + /** + * Sets the output size of the effect. + * + * @param {number} width - The width in pixels. + * @param {number} height - The height in pixels. + */ + setSize(width: number, height: number): void; + /** + * This method is used to render the effect once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(frame: NodeFrame): void; + /** + * Returns the result of the effect as a texture node. + * + * @return {PassTextureNode} A texture node that represents the result of the effect. + */ + getTextureNode(): PassTextureNode; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {PassTextureNode} + */ + setup(builder: NodeBuilder): PassTextureNode; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SobelOperatorNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SobelOperatorNode.d.ts new file mode 100644 index 000000000..251c245d8 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SobelOperatorNode.d.ts @@ -0,0 +1,45 @@ +export default SobelOperatorNode; +export function sobel(node: Node): SobelOperatorNode; +/** + * Post processing node for detecting edges with a sobel filter. + * A sobel filter should be applied after tone mapping and output color + * space conversion. + * + * @augments TempNode + * @three_import import { sobel } from 'three/addons/tsl/display/SobelOperatorNode.js'; + */ +declare class SobelOperatorNode extends TempNode { + /** + * Constructs a new sobel operator node. + * + * @param {TextureNode} textureNode - The texture node that represents the input of the effect. + */ + constructor(textureNode: TextureNode); + /** + * The texture node that represents the input of the effect. + * + * @type {TextureNode} + */ + textureNode: TextureNode; + /** + * A uniform node holding the inverse resolution value. + * + * @private + * @type {UniformNode} + */ + private _invSize; + /** + * This method is used to update the effect's uniforms once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(): void; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {ShaderCallNodeInternal} + */ + setup(): ShaderCallNodeInternal; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/StereoCompositePassNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/StereoCompositePassNode.d.ts new file mode 100644 index 000000000..007849257 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/StereoCompositePassNode.d.ts @@ -0,0 +1,86 @@ +export default StereoCompositePassNode; +/** + * A special (abstract) render pass node that renders the scene + * as a stereoscopic image. Unlike {@link StereoPassNode}, this + * node merges the image for the left and right eye + * into a single one. That is required for effects like + * anaglyph or parallax barrier. + * + * @abstract + * @augments PassNode + * @three_import import { StereoCompositePassNode } from 'three/addons/tsl/display/StereoCompositePassNode.js'; + */ +declare class StereoCompositePassNode extends PassNode { + /** + * Constructs a new stereo composite pass node. + * + * @param {Scene} scene - The scene to render. + * @param {Camera} camera - The camera to render the scene with. + */ + constructor(scene: Scene, camera: Camera); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStereoCompositePassNode: boolean; + /** + * The internal stereo camera that is used to render the scene. + * + * @type {StereoCamera} + */ + stereo: StereoCamera; + /** + * The render target for rendering the left eye's view. + * + * @private + * @type {RenderTarget} + */ + private _renderTargetL; + /** + * The render target for rendering the right eye's view. + * + * @private + * @type {RenderTarget} + */ + private _renderTargetR; + /** + * A texture node representing the left's eye view. + * + * @private + * @type {TextureNode} + */ + private _mapLeft; + /** + * A texture node representing the right's eye view. + * + * @private + * @type {TextureNode} + */ + private _mapRight; + /** + * The node material that implements the composite. All + * derived effect passes must provide an instance for rendering. + * + * @private + * @type {?NodeMaterial} + * @default null + */ + private _material; + /** + * Updates the internal stereo camera. + * + * @param {number} coordinateSystem - The current coordinate system. + */ + updateStereoCamera(coordinateSystem: number): void; + /** + * This method is used to render the effect once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(frame: NodeFrame): void; +} +import { PassNode } from 'three/webgpu'; +import { StereoCamera } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/StereoPassNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/StereoPassNode.d.ts new file mode 100644 index 000000000..758e3f40e --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/StereoPassNode.d.ts @@ -0,0 +1,39 @@ +export default StereoPassNode; +export function stereoPass(scene: Scene, camera: Camera): StereoPassNode; +/** + * A special render pass node that renders the scene as a stereoscopic image. + * + * @augments PassNode + * @three_import import { stereoPass } from 'three/addons/tsl/display/StereoPassNode.js'; + */ +declare class StereoPassNode extends PassNode { + /** + * Constructs a new stereo pass node. + * + * @param {Scene} scene - The scene to render. + * @param {Camera} camera - The camera to render the scene with. + */ + constructor(scene: Scene, camera: Camera); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStereoPassNode: boolean; + /** + * The internal stereo camera that is used to render the scene. + * + * @type {StereoCamera} + */ + stereo: StereoCamera; + /** + * This method is used to render the stereo effect once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(frame: NodeFrame): void; +} +import { PassNode } from 'three/webgpu'; +import { StereoCamera } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/TAAUNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/TAAUNode.d.ts new file mode 100644 index 000000000..b2315c1b2 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/TAAUNode.d.ts @@ -0,0 +1,275 @@ +export default TAAUNode; +export function taau(beautyNode: TextureNode, depthNode: TextureNode, velocityNode: TextureNode, camera: Camera): TAAUNode; +/** + * A special node that performs Temporal Anti-Aliasing Upscaling (TAAU). + * + * Like TRAA, the node accumulates jittered samples over multiple frames and + * reprojects history with motion vectors. Unlike TRAA, the input buffers + * (beauty, depth, velocity) are expected to be rendered at a lower resolution + * than the renderer's drawing buffer — typically by lowering the upstream + * pass's resolution via {@link PassNode#setResolutionScale} — and the resolve + * pass reconstructs an output-resolution image using a 9-tap Blackman-Harris + * filter (Gaussian approximation) over the jittered input samples. The result + * is an alternative to FSR2/3 that does anti-aliasing and upscaling in a + * single pass. + * + * References: + * - Karis, "High Quality Temporal Supersampling", SIGGRAPH 2014, {@link https://advances.realtimerendering.com/s2014/} + * - Riley/Arcila, FidelityFX Super Resolution 2, GDC 2022, {@link https://gpuopen.com/download/GDC_FidelityFX_Super_Resolution_2_0.pdf} + * + * Note: MSAA must be disabled when TAAU is in use. + * + * @augments TempNode + * @three_import import { taau } from 'three/addons/tsl/display/TAAUNode.js'; + */ +declare class TAAUNode extends TempNode { + /** + * Constructs a new TAAU node. + * + * @param {TextureNode} beautyNode - The texture node that represents the input of the effect. + * @param {TextureNode} depthNode - A node that represents the scene's depth. + * @param {TextureNode} velocityNode - A node that represents the scene's velocity. + * @param {Camera} camera - The camera the scene is rendered with. + */ + constructor(beautyNode: TextureNode, depthNode: TextureNode, velocityNode: TextureNode, camera: Camera); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isTAAUNode: boolean; + /** + * The texture node that represents the input of the effect. + * + * @type {TextureNode} + */ + beautyNode: TextureNode; + /** + * A node that represents the scene's depth. + * + * @type {TextureNode} + */ + depthNode: TextureNode; + /** + * A node that represents the scene's velocity. + * + * @type {TextureNode} + */ + velocityNode: TextureNode; + /** + * The camera the scene is rendered with. + * + * @type {Camera} + */ + camera: Camera; + /** + * When the difference between the current and previous depth goes above this threshold, + * the history is considered invalid. + * + * @type {number} + * @default 0.0005 + */ + depthThreshold: number; + /** + * The depth difference within the 3×3 neighborhood to consider a pixel as an edge. + * + * @type {number} + * @default 0.001 + */ + edgeDepthDiff: number; + /** + * The history becomes invalid as the pixel length of the velocity approaches this value. + * + * @type {number} + * @default 128 + */ + maxVelocityLength: number; + /** + * Baseline weight applied to the current frame in the resolve. Lower + * values produce smoother results with longer accumulation but slower + * convergence on disoccluded regions; the motion factor is added on + * top, so fast-moving pixels still respond quickly. + * + * @type {number} + * @default 0.025 + */ + currentFrameWeight: number; + /** + * The jitter index selects the current camera offset value. + * + * @private + * @type {number} + * @default 0 + */ + private _jitterIndex; + /** + * A uniform node holding the current jitter offset in input-pixel + * units. The shader needs this to know where each input sample was + * actually rendered when computing per-tap reconstruction weights. + * + * @private + * @type {UniformNode} + */ + private _jitterOffset; + /** + * The render target that represents the history of frame data. + * Sized to the renderer's drawing buffer (the output resolution). + * + * @private + * @type {?RenderTarget} + */ + private _historyRenderTarget; + /** + * The render target for the resolve. Sized to the renderer's drawing + * buffer (the output resolution). + * + * @private + * @type {?RenderTarget} + */ + private _resolveRenderTarget; + /** + * Render target whose depth attachment holds the previous frame's + * depth buffer. The depth texture must be owned by a render target + * so that `copyTextureToTexture` can copy into it on the WebGL + * backend, which uses a framebuffer blit and therefore needs the + * destination depth texture to be attached to a framebuffer. This + * render target is sized independently of the history target so it + * can match the (lower-resolution) input depth texture. + * + * @private + * @type {RenderTarget} + */ + private _previousDepthRenderTarget; + /** + * Material used for the resolve step. + * + * @private + * @type {NodeMaterial} + */ + private _resolveMaterial; + /** + * Material used to seed the history render target on resize. It + * performs a bilinear upscale of the current beauty buffer into the + * output-sized history target so that the first frames after a + * resize do not fade in from black. + * + * @private + * @type {NodeMaterial} + */ + private _seedMaterial; + /** + * The result of the effect is represented as a separate texture node. + * + * @private + * @type {PassTextureNode} + */ + private _textureNode; + /** + * Used to save the original/unjittered projection matrix. + * + * @private + * @type {Matrix4} + */ + private _originalProjectionMatrix; + /** + * A uniform node holding the camera's near and far. + * + * @private + * @type {UniformNode} + */ + private _cameraNearFar; + /** + * A uniform node holding the camera world matrix. + * + * @private + * @type {UniformNode} + */ + private _cameraWorldMatrix; + /** + * A uniform node holding the camera world matrix inverse. + * + * @private + * @type {UniformNode} + */ + private _cameraWorldMatrixInverse; + /** + * A uniform node holding the camera projection matrix inverse. + * + * @private + * @type {UniformNode} + */ + private _cameraProjectionMatrixInverse; + /** + * A uniform node holding the previous frame's view matrix. + * + * @private + * @type {UniformNode} + */ + private _previousCameraWorldMatrix; + /** + * A uniform node holding the previous frame's projection matrix inverse. + * + * @private + * @type {UniformNode} + */ + private _previousCameraProjectionMatrixInverse; + /** + * A texture node for the previous depth buffer. + * + * @private + * @type {TextureNode} + */ + private _previousDepthNode; + /** + * Sync the post processing stack with the TAAU node. + * + * @private + * @type {boolean} + */ + private _needsPostProcessingSync; + /** + * Returns the result of the effect as a texture node. + * + * @return {PassTextureNode} A texture node that represents the result of the effect. + */ + getTextureNode(): PassTextureNode; + /** + * Sets the output size of the effect (history and resolve targets). The + * previous-depth texture is sized independently in `updateBefore()` to + * track the scene's current depth texture. + * + * @param {number} outputWidth - The output width (drawing buffer width). + * @param {number} outputHeight - The output height (drawing buffer height). + */ + setSize(outputWidth: number, outputHeight: number): void; + /** + * Defines the TAAU's current jitter as a view offset to the scene's + * camera. The jitter is shrunk to one *output* pixel (rather than one + * input pixel) so that the halton sequence gradually fills the output + * sub-pixel grid over multiple frames. + * + * @param {number} inputWidth - The width of the input buffers the camera renders into. + * @param {number} inputHeight - The height of the input buffers the camera renders into. + */ + setViewOffset(inputWidth: number, inputHeight: number): void; + /** + * Clears the view offset from the scene's camera. + */ + clearViewOffset(): void; + /** + * This method is used to render the effect once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(frame: NodeFrame): void; + /** + * This method is used to setup the effect's render targets and TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {PassTextureNode} + */ + setup(builder: NodeBuilder): PassTextureNode; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/TRAANode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/TRAANode.d.ts new file mode 100644 index 000000000..56581bb40 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/TRAANode.d.ts @@ -0,0 +1,239 @@ +export default TRAANode; +export function traa(beautyNode: TextureNode, depthNode: TextureNode, velocityNode: TextureNode, camera: Camera): TRAANode; +/** + * A special node that applies TRAA (Temporal Reprojection Anti-Aliasing). + * + * References: + * - {@link https://alextardif.com/TAA.html} + * - {@link https://www.elopezr.com/temporal-aa-and-the-quest-for-the-holy-trail/} + * + * Note: MSAA must be disabled when TRAA is in use. + * + * @augments TempNode + * @three_import import { traa } from 'three/addons/tsl/display/TRAANode.js'; + */ +declare class TRAANode extends TempNode { + /** + * Constructs a new TRAA node. + * + * @param {TextureNode} beautyNode - The texture node that represents the input of the effect. + * @param {TextureNode} depthNode - A node that represents the scene's depth. + * @param {TextureNode} velocityNode - A node that represents the scene's velocity. + * @param {Camera} camera - The camera the scene is rendered with. + */ + constructor(beautyNode: TextureNode, depthNode: TextureNode, velocityNode: TextureNode, camera: Camera); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isTRAANode: boolean; + /** + * The texture node that represents the input of the effect. + * + * @type {TextureNode} + */ + beautyNode: TextureNode; + /** + * A node that represents the scene's velocity. + * + * @type {TextureNode} + */ + depthNode: TextureNode; + /** + * A node that represents the scene's velocity. + * + * @type {TextureNode} + */ + velocityNode: TextureNode; + /** + * The camera the scene is rendered with. + * + * @type {Camera} + */ + camera: Camera; + /** + * When the difference between the current and previous depth goes above this threshold, + * the history is considered invalid. + * + * @type {number} + * @default 0.0005 + */ + depthThreshold: number; + /** + * The depth difference within the 3×3 neighborhood to consider a pixel as an edge. + * + * @type {number} + * @default 0.001 + */ + edgeDepthDiff: number; + /** + * The history becomes invalid as the pixel length of the velocity approaches this value. + * + * @type {number} + * @default 128 + */ + maxVelocityLength: number; + /** + * Whether to decrease the weight on the current frame when the velocity is more subpixel. + * This reduces blurriness under motion, but can introduce a square pattern artifact. + * + * @type {boolean} + * @default true + */ + useSubpixelCorrection: boolean; + /** + * The jitter index selects the current camera offset value. + * + * @private + * @type {number} + * @default 0 + */ + private _jitterIndex; + /** + * A uniform node holding the inverse resolution value. + * + * @private + * @type {UniformNode} + */ + private _invSize; + /** + * The render target that represents the history of frame data. + * + * @private + * @type {?RenderTarget} + */ + private _historyRenderTarget; + /** + * The render target for the resolve. + * + * @private + * @type {?RenderTarget} + */ + private _resolveRenderTarget; + /** + * Material used for the resolve step. + * + * @private + * @type {NodeMaterial} + */ + private _resolveMaterial; + /** + * The result of the effect is represented as a separate texture node. + * + * @private + * @type {PassTextureNode} + */ + private _textureNode; + /** + * Used to save the original/unjittered projection matrix. + * + * @private + * @type {Matrix4} + */ + private _originalProjectionMatrix; + /** + * A uniform node holding the camera's near and far. + * + * @private + * @type {UniformNode} + */ + private _cameraNearFar; + /** + * A uniform node holding the camera world matrix. + * + * @private + * @type {UniformNode} + */ + private _cameraWorldMatrix; + /** + * A uniform node holding the camera world matrix inverse. + * + * @private + * @type {UniformNode} + */ + private _cameraWorldMatrixInverse; + /** + * A uniform node holding the camera projection matrix inverse. + * + * @private + * @type {UniformNode} + */ + private _cameraProjectionMatrixInverse; + /** + * A uniform node holding the previous frame's view matrix. + * + * @private + * @type {UniformNode} + */ + private _previousCameraWorldMatrix; + /** + * A uniform node holding the previous frame's projection matrix inverse. + * + * @private + * @type {UniformNode} + */ + private _previousCameraProjectionMatrixInverse; + /** + * A texture node for the previous depth buffer. + * + * @private + * @type {TextureNode} + */ + private _previousDepthNode; + /** + * Sync the post processing stack with the TRAA node. + * + * @private + * @type {boolean} + */ + private _needsPostProcessingSync; + /** + * The node used to render the scene's velocity. + * + * @private + * @type {?VelocityNode} + */ + private _velocityNode; + /** + * Returns the result of the effect as a texture node. + * + * @return {PassTextureNode} A texture node that represents the result of the effect. + */ + getTextureNode(): PassTextureNode; + /** + * Sets the size of the effect. + * + * @param {number} width - The width of the effect. + * @param {number} height - The height of the effect. + */ + setSize(width: number, height: number): void; + /** + * Defines the TRAA's current jitter as a view offset + * to the scene's camera. + * + * @param {number} width - The width of the effect. + * @param {number} height - The height of the effect. + */ + setViewOffset(width: number, height: number): void; + /** + * Clears the view offset from the scene's camera. + */ + clearViewOffset(): void; + /** + * This method is used to render the effect once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(frame: NodeFrame): void; + /** + * This method is used to setup the effect's render targets and TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {PassTextureNode} + */ + setup(builder: NodeBuilder): PassTextureNode; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/TransitionNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/TransitionNode.d.ts new file mode 100644 index 000000000..71665d855 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/TransitionNode.d.ts @@ -0,0 +1,65 @@ +export default TransitionNode; +export function transition(nodeA: Node, nodeB: Node, mixTextureNode: Node, mixRatio: Node | number, threshold: Node | number, useTexture: Node | number): TransitionNode; +/** + * Post processing node for creating a transition effect between scenes. + * + * @augments TempNode + * @three_import import { transition } from 'three/addons/tsl/display/TransitionNode.js'; + */ +declare class TransitionNode extends TempNode { + /** + * Constructs a new transition node. + * + * @param {TextureNode} textureNodeA - A texture node that represents the beauty pass of the first scene. + * @param {TextureNode} textureNodeB - A texture node that represents the beauty pass of the second scene. + * @param {TextureNode} mixTextureNode - A texture node that defines how the transition effect should look like. + * @param {Node} mixRatioNode - The interpolation factor that controls the mix. + * @param {Node} thresholdNode - Can be used to tweak the linear interpolation. + * @param {Node} useTextureNode - Whether `mixTextureNode` should influence the transition or not. + */ + constructor(textureNodeA: TextureNode, textureNodeB: TextureNode, mixTextureNode: TextureNode, mixRatioNode: Node, thresholdNode: Node, useTextureNode: Node); + /** + * A texture node that represents the beauty pass of the first scene. + * + * @type {TextureNode} + */ + textureNodeA: TextureNode; + /** + * A texture node that represents the beauty pass of the second scene. + * + * @type {TextureNode} + */ + textureNodeB: TextureNode; + /** + * A texture that defines how the transition effect should look like. + * + * @type {TextureNode} + */ + mixTextureNode: TextureNode; + /** + * The interpolation factor that controls the mix. + * + * @type {Node} + */ + mixRatioNode: Node; + /** + * Can be used to tweak the linear interpolation. + * + * @type {Node} + */ + thresholdNode: Node; + /** + * Whether `mixTextureNode` should influence the transition or not. + * + * @type {Node} + */ + useTextureNode: Node; + /** + * This method is used to setup the effect's TSL code. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {ShaderCallNodeInternal} + */ + setup(): ShaderCallNodeInternal; +} +import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/boxBlur.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/boxBlur.d.ts new file mode 100644 index 000000000..db00aa0d9 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/boxBlur.d.ts @@ -0,0 +1,24 @@ +/** + * Applies a box blur effect to the given texture node. + * + * Compared to Gaussian blur, box blur produces a more blocky result but with better performance when correctly + * configured. It is intended for mobile devices or performance restricted use cases where Gaussian is too heavy. + * + * The (kernel) `size` parameter should be small (1, 2 or 3) since it determines the number of samples based on (size * 2 + 1)^2. + * This implementation uses a single pass approach so the kernel is not applied as a separable filter. That means larger + * kernels won't perform well. Use Gaussian instead if you need a more high-quality blur. + * + * To produce wider blurs, increase the `separation` parameter instead which has no influence on the performance. + * + * Reference: {@link https://github.com/lettier/3d-game-shaders-for-beginners/blob/master/demonstration/shaders/fragment/box-blur.frag}. + * + * @tsl + * @function + * @param {Node} textureNode - The texture node that should be blurred. + * @param {Object} [options={}] - Additional options for the hash blur effect. + * @param {Node} [options.size=int(1)] - Controls the blur's kernel. For performant results, the range should within [1, 3]. + * @param {Node} [options.separation=int(1)] - Spreads out the blur without having to sample additional fragments. Ranges from [1, Infinity]. + * @param {boolean} [options.premultipliedAlpha=false] - Whether to use premultiplied alpha for the blur effect. + * @return {Node} The blurred texture node. + */ +export const boxBlur: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/depthAwareBlend.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/depthAwareBlend.d.ts new file mode 100644 index 000000000..7027dea2f --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/depthAwareBlend.d.ts @@ -0,0 +1,17 @@ +/** + * Performs a depth-aware blend between a base scene and a secondary effect (like godrays). + * This function uses a Poisson disk sampling pattern to detect depth discontinuities + * in the neighborhood of the current pixel. If an edge is detected, it shifts the + * sampling coordinate for the blend node away from the edge to prevent light leaking/haloing. + * + * @param {Node} baseNode - The main scene/beauty pass texture node. + * @param {Node} blendNode - The effect to be blended (e.g., Godrays, Bloom). + * @param {Node} depthNode - The scene depth texture node. + * @param {Camera} camera - The camera used for the scene. + * @param {Object} [options={}] - Configuration for the blend effect. + * @param {Node|Color} [options.blendColor=Color(0xff0000)] - The color applied to the blend node. + * @param {Node | number} [options.edgeRadius=2] - The search radius (in pixels) for detecting depth edges. + * @param {Node | number} [options.edgeStrength=2] - How far to "push" the UV away from detected edges. + * @returns {Node} The resulting blended color node. + */ +export const depthAwareBlend: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/hashBlur.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/hashBlur.d.ts new file mode 100644 index 000000000..e02a15356 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/hashBlur.d.ts @@ -0,0 +1,22 @@ +/** + * Applies a hash blur effect to the given texture node. + * + * The approach of this blur is different compared to Gaussian and box blur since + * it does not rely on a kernel to apply a convolution. Instead, it reads the base + * texture multiple times in a random pattern and then averages the samples. A + * typical artifact of this technique is a slightly noisy appearance of the blur which + * can be mitigated by increasing the number of iterations (see `repeats` parameter). + * Compared to Gaussian blur, hash blur requires just a single pass. + * + * Reference: {@link https://www.shadertoy.com/view/4lXXWn}. + * + * @tsl + * @function + * @param {Node} textureNode - The texture node that should be blurred. + * @param {Node} [bluramount=float(0.1)] - This node determines the amount of blur. + * @param {Object} [options={}] - Additional options for the hash blur effect. + * @param {Node} [options.repeats=float(45)] - The number of iterations for the blur effect. + * @param {boolean} [options.premultipliedAlpha=false] - Whether to use premultiplied alpha for the blur effect. + * @return {Node} The blurred texture node. + */ +export const hashBlur: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/radialBlur.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/radialBlur.d.ts new file mode 100644 index 000000000..0450409a0 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/radialBlur.d.ts @@ -0,0 +1,20 @@ +/** + * This TSL function blurs an image in a circular pattern, radiating from a configurable center point in screen space. + * + * Radial blurs can be used for different kind of effects like producing simple faked lighting effects also known as + * "light shafts". The major limitation of this specific usage is the center point can only be defined in 2D so the + * effect does not honor the depth of 3D objects. Consequently, it is not intended for physically correct lit scenes. + * + * @tsl + * @function + * @param {Node} textureNode - The texture node that should be blurred. + * @param {Object} [options={}] - Additional options for the radial blur effect. + * @param {Node} [options.center=vec2(0.5, 0.5)] - The center of the light in screen uvs. + * @param {Node} [options.weight=float(0.9)] - Base weight factor for each sample in the range `[0,1]`. + * @param {Node} [options.decay=float(0.95)] - Decreases the weight factor so each iteration adds less to the sum. Must be in the range `[0,1]`. + * If you increase the sample count, you have to increase this option as well to avoid a darking effect. + * @param {Node} [options.count=int(32)] - The number if iterations. Should be in the range `[16,64]`. + * @param {Node} [options.exposure=float(5)] - Exposure control of the blur. + * @return {Node} The blurred texture node. + */ +export const radialBlur: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/ClusteredLightsNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/ClusteredLightsNode.d.ts new file mode 100644 index 000000000..3fc0b16d1 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/ClusteredLightsNode.d.ts @@ -0,0 +1,80 @@ +export default ClusteredLightsNode; +/** + * TSL function that creates a clustered lights node. + * + * @tsl + * @function + * @param {number} [maxLights=1024] - Maximum number of point lights. + * @param {number} [tileSize=32] - Screen tile size in pixels. + * @param {number} [zSlices=24] - Depth slice count. + * @param {number} [maxLightsPerCluster=64] - Per-cluster light-list capacity. + * @return {ClusteredLightsNode} The clustered lights node. + */ +export const clusteredLights: any; +/** + * A custom version of `LightsNode` implementing Forward+ clustered shading: + * the view frustum is subdivided into a 3D grid of clusters (X × Y screen tiles + * times an exponentially-spaced set of Z depth slices), and each cluster holds + * only the point lights whose spheres intersect it. At shading time each fragment + * looks up its cluster and loops over just that cluster's lights. Unlike 2D tiled + * lighting, clustered shading culls lights that share screen pixels but lie at + * different depths — suitable for 3D scenes with real depth complexity. + * + * @augments LightsNode + * @three_import import { clusteredLights } from 'three/addons/tsl/lighting/ClusteredLightsNode.js'; + */ +declare class ClusteredLightsNode extends LightsNode { + /** + * Constructs a new clustered lights node. + * + * @param {number} [maxLights=1024] - Maximum number of point lights. + * @param {number} [tileSize=32] - Screen tile size in pixels (cluster XY size). + * @param {number} [zSlices=24] - Number of exponential depth slices. + * @param {number} [maxLightsPerCluster=64] - Per-cluster light-list capacity. + */ + constructor(maxLights?: number, tileSize?: number, zSlices?: number, maxLightsPerCluster?: number); + materialLights: any[]; + clusteredLights: any[]; + maxLights: number; + tileSize: number; + zSlices: number; + maxLightsPerCluster: number; + _chunksPerCluster: number; + _bufferSize: Vector2 | null; + _lightIndexes: import("three/webgpu").UniformNode | null; + _screenClusterIndex: any; + _compute: any; + _lightsTexture: DataTexture | null; + _zSliceRangesTexture: DataTexture | null; + _zSliceRangesData: Float32Array | null; + _lightViewZ: Float32Array; + _lightSortOrder: any[]; + _lightsCount: import("three/webgpu").UniformNode; + _cameraNear: import("three/webgpu").UniformNode; + _cameraFar: import("three/webgpu").UniformNode; + _cameraViewMatrix: import("three/webgpu").UniformNode; + _cameraProjectionMatrix: import("three/webgpu").UniformNode; + _gridDimensions: import("three/webgpu").UniformNode; + customCacheKey(): any; + updateLightsTexture(camera: any): void; + updateBefore(frame: any): void; + setLights(lights: any): LightsNode; + getBlock(): any; + getTile(element: any): any; + getClusterLightCount(zSliceNode: any): void; + getLightData(index: any): { + position: any; + viewPosition: any; + distance: any; + color: any; + decay: any; + }; + setupLights(builder: any, lightNodes: any): void; + getBufferFitSize(value: any): number; + setSize(width: any, height: any): this; + updateProgram(renderer: any): void; + create(width: any, height: any): void; +} +import { LightsNode } from 'three/webgpu'; +import { Vector2 } from 'three/webgpu'; +import { DataTexture } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/DynamicLightsNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/DynamicLightsNode.d.ts new file mode 100644 index 000000000..0cb027cb7 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/DynamicLightsNode.d.ts @@ -0,0 +1,38 @@ +export default DynamicLightsNode; +export function dynamicLights(options?: Object): DynamicLightsNode; +/** + * A custom version of `LightsNode` that batches supported analytic lights into + * uniform arrays and loops. + * + * Unsupported lights, node lights, shadow-casting lights, and projected spot + * lights keep the default per-light path. + * + * @augments LightsNode + * @three_import import { DynamicLightsNode } from 'three/addons/tsl/lighting/DynamicLightsNode.js'; + */ +declare class DynamicLightsNode extends LightsNode { + /** + * Constructs a new dynamic lights node. + * + * @param {Object} [options={}] - Dynamic lighting configuration. + * @param {number} [options.maxDirectionalLights=8] - Maximum number of batched directional lights. + * @param {number} [options.maxPointLights=16] - Maximum number of batched point lights. + * @param {number} [options.maxSpotLights=16] - Maximum number of batched spot lights. + * @param {number} [options.maxHemisphereLights=4] - Maximum number of batched hemisphere lights. + */ + constructor(options?: { + maxDirectionalLights?: number | undefined; + maxPointLights?: number | undefined; + maxSpotLights?: number | undefined; + maxHemisphereLights?: number | undefined; + }); + maxDirectionalLights: number; + maxPointLights: number; + maxSpotLights: number; + maxHemisphereLights: number; + _dataNodes: Map; + setupLightsNode(builder: any): void; + setLights(lights: any): this; + _updateDataNodeLights(lights: any): void; +} +import { LightsNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/TiledLightsNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/TiledLightsNode.d.ts new file mode 100644 index 000000000..3109b43c9 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/TiledLightsNode.d.ts @@ -0,0 +1,87 @@ +/** + * TSL function that checks if a circle intersects with an axis-aligned bounding box (AABB). + * + * @tsl + * @function + * @param {Node} circleCenter - The center of the circle. + * @param {Node} radius - The radius of the circle. + * @param {Node} minBounds - The minimum bounds of the AABB. + * @param {Node} maxBounds - The maximum bounds of the AABB. + * @return {Node} True if the circle intersects the AABB. + */ +export const circleIntersectsAABB: any; +export default TiledLightsNode; +/** + * TSL function that creates a tiled lights node. + * + * @tsl + * @function + * @param {number} [maxLights=1024] - The maximum number of lights. + * @param {number} [tileSize=32] - The tile size. + * @return {TiledLightsNode} The tiled lights node. + */ +export const tiledLights: any; +/** + * A custom version of `LightsNode` implementing tiled lighting. This node is used in + * {@link TiledLighting} to overwrite the renderer's default lighting with + * a custom implementation. + * + * @augments LightsNode + * @three_import import { tiledLights } from 'three/addons/tsl/lighting/TiledLightsNode.js'; + */ +declare class TiledLightsNode extends LightsNode { + /** + * Constructs a new tiled lights node. + * + * @param {number} [maxLights=1024] - The maximum number of lights. + * @param {number} [tileSize=32] - The tile size. + */ + constructor(maxLights?: number, tileSize?: number); + materialLights: any[]; + tiledLights: any[]; + /** + * The maximum number of lights. + * + * @type {number} + * @default 1024 + */ + maxLights: number; + /** + * The tile size. + * + * @type {number} + * @default 32 + */ + tileSize: number; + _bufferSize: Vector2 | null; + _lightIndexes: import("three/webgpu").UniformNode | null; + _screenTileIndex: any; + _compute: any; + _lightsTexture: DataTexture | null; + _lightsCount: import("three/webgpu").UniformNode; + _tileLightCount: number; + _screenSize: import("three/webgpu").UniformNode; + _cameraProjectionMatrix: import("three/webgpu").UniformNode; + _cameraViewMatrix: import("three/webgpu").UniformNode; + customCacheKey(): any; + updateLightsTexture(): void; + updateBefore(frame: any): void; + setLights(lights: any): LightsNode; + getBlock(block?: number): any; + getTile(element: any): any; + getLightData(index: any): { + position: any; + viewPosition: any; + distance: any; + color: any; + decay: any; + }; + setupLights(builder: any, lightNodes: any): void; + getBufferFitSize(value: any): number; + setSize(width: any, height: any): this; + updateProgram(renderer: any): void; + create(width: any, height: any): void; +} +import { LightsNode } from 'three/webgpu'; +import { Vector2 } from 'three/webgpu'; +import { DataTexture } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/AmbientLightDataNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/AmbientLightDataNode.d.ts new file mode 100644 index 000000000..fe894a9c0 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/AmbientLightDataNode.d.ts @@ -0,0 +1,17 @@ +export default AmbientLightDataNode; +/** + * Batched data node for ambient lights in dynamic lighting mode. + * + * @augments Node + */ +declare class AmbientLightDataNode extends Node { + constructor(); + _color: Color; + _lights: any[]; + colorNode: import("three/webgpu").UniformNode; + setLights(lights: any): this; + update(): void; + setup(builder: any): void; +} +import { Node } from 'three/webgpu'; +import { Color } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/DirectionalLightDataNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/DirectionalLightDataNode.d.ts new file mode 100644 index 000000000..8aefc7b47 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/DirectionalLightDataNode.d.ts @@ -0,0 +1,24 @@ +export default DirectionalLightDataNode; +/** + * Batched data node for directional lights in dynamic lighting mode. + * + * @augments Node + */ +declare class DirectionalLightDataNode extends Node { + constructor(maxCount?: number); + maxCount: number; + _lights: any[]; + _colors: Color[]; + _directions: Vector3[]; + colorsNode: import("three/webgpu").UniformNode; + directionsNode: import("three/webgpu").UniformNode; + countNode: import("three/webgpu").UniformNode; + setLights(lights: any): this; + update({ camera }: { + camera: any; + }): void; + setup(builder: any): void; +} +import { Node } from 'three/webgpu'; +import { Color } from 'three/webgpu'; +import { Vector3 } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/HemisphereLightDataNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/HemisphereLightDataNode.d.ts new file mode 100644 index 000000000..20c3132df --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/HemisphereLightDataNode.d.ts @@ -0,0 +1,24 @@ +export default HemisphereLightDataNode; +/** + * Batched data node for hemisphere lights in dynamic lighting mode. + * + * @augments Node + */ +declare class HemisphereLightDataNode extends Node { + constructor(maxCount?: number); + maxCount: number; + _lights: any[]; + _skyColors: Color[]; + _groundColors: Color[]; + _directions: Vector3[]; + skyColorsNode: import("three/webgpu").UniformNode; + groundColorsNode: import("three/webgpu").UniformNode; + directionsNode: import("three/webgpu").UniformNode; + countNode: import("three/webgpu").UniformNode; + setLights(lights: any): this; + update(): void; + setup(builder: any): void; +} +import { Node } from 'three/webgpu'; +import { Color } from 'three/webgpu'; +import { Vector3 } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/PointLightDataNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/PointLightDataNode.d.ts new file mode 100644 index 000000000..693924670 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/PointLightDataNode.d.ts @@ -0,0 +1,26 @@ +export default PointLightDataNode; +/** + * Batched data node for point lights in dynamic lighting mode. + * + * @augments Node + */ +declare class PointLightDataNode extends Node { + constructor(maxCount?: number); + maxCount: number; + _lights: any[]; + _colors: Color[]; + _positionsAndCutoff: Vector4[]; + _decays: Vector4[]; + colorsNode: import("three/webgpu").UniformNode; + positionsAndCutoffNode: import("three/webgpu").UniformNode; + decaysNode: import("three/webgpu").UniformNode; + countNode: import("three/webgpu").UniformNode; + setLights(lights: any): this; + update({ camera }: { + camera: any; + }): void; + setup(builder: any): void; +} +import { Node } from 'three/webgpu'; +import { Color } from 'three/webgpu'; +import { Vector4 } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/SpotLightDataNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/SpotLightDataNode.d.ts new file mode 100644 index 000000000..b46db542a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/SpotLightDataNode.d.ts @@ -0,0 +1,30 @@ +export default SpotLightDataNode; +/** + * Batched data node for simple spot lights in dynamic lighting mode. + * + * Projected spot lights keep the default per-light path. + * + * @augments Node + */ +declare class SpotLightDataNode extends Node { + constructor(maxCount?: number); + maxCount: number; + _lights: any[]; + _colors: Color[]; + _positionsAndCutoff: Vector4[]; + _directionsAndDecay: Vector4[]; + _cones: Vector4[]; + colorsNode: import("three/webgpu").UniformNode; + positionsAndCutoffNode: import("three/webgpu").UniformNode; + directionsAndDecayNode: import("three/webgpu").UniformNode; + conesNode: import("three/webgpu").UniformNode; + countNode: import("three/webgpu").UniformNode; + setLights(lights: any): this; + update({ camera }: { + camera: any; + }): void; + setup(builder: any): void; +} +import { Node } from 'three/webgpu'; +import { Color } from 'three/webgpu'; +import { Vector4 } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/math/Bayer.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/math/Bayer.d.ts new file mode 100644 index 000000000..87b7fcb02 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/math/Bayer.d.ts @@ -0,0 +1,29 @@ +/** + * This TSL function can be used to sample a Bayer16 texture which is a 16x16 texture with a Bayer Matrix pattern. + * It can be used for dithering effects but also as an alternative to blue-noise. When used with Ray Marching + * specifically in {@link VolumeNodeMaterial#offsetNode}, it reduces banding problem, thus being able to use + * fewer steps without affecting the visuals as much. + * + * @tsl + * @function + * @param {Node} uv - The uv to sample the bayer16 texture. + * @return {Node} The sampled bayer value. + */ +export const bayer16: () => void; +/** + * This TSL function applies Bayer dithering to a color input. It uses a 4x4 Bayer matrix + * pattern to add structured noise before color quantization, which helps reduce visible + * color banding when limiting color depth. + * + * @tsl + * @function + * @param {Node} color - The input color to apply dithering to. + * @param {Node} [steps=32] - The number of color steps per channel. + * @return {Node} The dithered color ready for quantization. + * + * @example + * // Apply dithering with posterize + * const ditheredColor = bayerDither( inputColor, 32 ); + * const finalColor = posterize( ditheredColor, 32 ); + */ +export const bayerDither: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/shadows/TileShadowNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/shadows/TileShadowNode.d.ts new file mode 100644 index 000000000..70c1b42db --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/shadows/TileShadowNode.d.ts @@ -0,0 +1,115 @@ +/** + * A class that extends `ShadowBaseNode` to implement tiled shadow mapping. + * This allows splitting a shadow map into multiple tiles, each with its own light and camera, + * to improve shadow quality and performance for large scenes. + * + * **Note:** This class does not support `VSMShadowMap` at the moment. + * + * @class + * @augments ShadowBaseNode + * @three_import import { TileShadowNode } from 'three/addons/tsl/shadows/TileShadowNode.js'; + */ +export class TileShadowNode extends ShadowBaseNode { + /** + * Creates an instance of `TileShadowNode`. + * + * @param {Light} light - The original light source used for shadow mapping. + * @param {Object} [options={}] - Configuration options for the tiled shadow node. + * @param {number} [options.tilesX=2] - The number of tiles along the X-axis. + * @param {number} [options.tilesY=2] - The number of tiles along the Y-axis. + * @param {Object} [options.resolution] - The resolution of the shadow map. + * @param {boolean} [options.debug=false] - Whether to enable debug mode. + */ + constructor(light: Light, options?: { + tilesX?: number | undefined; + tilesY?: number | undefined; + resolution?: Object | undefined; + debug?: boolean | undefined; + }); + config: { + tilesX: number; + tilesY: number; + resolution: any; + debug: boolean; + }; + debug: boolean; + originalLight: Light; + lightPlane: Plane; + line: Line3; + initialLightDirection: Vector3; + _cameraFrameId: WeakMap; + shadowSize: { + top: any; + bottom: any; + left: any; + right: any; + }; + lights: any[]; + _shadowNodes: any[]; + tiles: Object[]; + /** + * Generates the tiles for the shadow map based on the specified number of tiles along the X and Y axes. + * + * @param {number} tilesX - The number of tiles along the X-axis. + * @param {number} tilesY - The number of tiles along the Y-axis. + * @returns {Array} An array of tile objects, each containing the tile's bounds and index. + */ + generateTiles(tilesX: number, tilesY: number): Array; + /** + * Updates the initial light direction based on the light's target position. + */ + updateLightDirection(): void; + /** + * Initializes the tiled shadow node by creating lights, cameras, and shadow maps for each tile. + * + * @param {Builder} builder - The builder used to create render targets and other resources. + */ + init(builder: Builder): void; + shadowMap: any; + cameraArray: ArrayCamera | undefined; + /** + * Updates the light transformations and shadow cameras for each tile. + */ + update(): void; + /** + * Updates the shadow map rendering. + * @param {NodeFrame} frame - A reference to the current node frame. + */ + updateShadow(frame: NodeFrame): void; + _depthVersionCached: any; + /** + * The implementation performs the update of the shadow map if necessary. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + updateBefore(frame: NodeFrame): void; + /** + * Synchronizes the transformation of a tile light with the source light. + * + * @param {LwLight} lwLight - The tile light to synchronize. + * @param {Light} sourceLight - The source light to copy transformations from. + */ + syncLightTransformation(lwLight: LwLight, sourceLight: Light): void; + /** + * Sets up the shadow node for rendering. + * + * @param {Builder} builder - The builder used to set up the shadow node. + * @returns {Node} A node representing the shadow value. + */ + setup(builder: Builder): Node; + /** + * Helper method to remove lights and associated nodes/targets. + * Used internally during dispose and potential re-initialization. + */ + disposeLightsAndNodes(): void; +} +import { ShadowBaseNode } from 'three/webgpu'; +import { Plane } from 'three/webgpu'; +import { Line3 } from 'three/webgpu'; +import { Vector3 } from 'three/webgpu'; +import { ArrayCamera } from 'three/webgpu'; +declare class LwLight extends Object3D { + target: Object3D; +} +import { Object3D } from 'three/webgpu'; +export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/shadows/TileShadowNodeHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/shadows/TileShadowNodeHelper.d.ts new file mode 100644 index 000000000..95987dc0e --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/shadows/TileShadowNodeHelper.d.ts @@ -0,0 +1,33 @@ +/** + * Helper class to manage and display debug visuals for TileShadowNode. + * + * @augments Group + * @three_import import { TileShadowNodeHelper } from 'three/addons/tsl/shadows/TileShadowNodeHelper.js'; + */ +export class TileShadowNodeHelper extends Group { + /** + * @param {TileShadowNode} tileShadowNode The TileShadowNode instance to debug. + */ + constructor(tileShadowNode: TileShadowNode); + tileShadowNode: any; + config: any; + tiles: any; + _debugMeshes: any[]; + _shadowCamHelpers: any[]; + initialized: boolean; + /** + * Initializes the debug displays (planes and camera helpers). + * Should be called after TileShadowNode has initialized its lights and shadow nodes. + */ + init(): void; + /** + * Updates the debug visuals (specifically camera helpers). + * Should be called within TileShadowNode's update method. + */ + update(): void; + /** + * Removes all debug objects (planes and helpers) from the scene. + */ + dispose(): void; +} +import { Group } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/utils/GroundedSkybox.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/utils/GroundedSkybox.d.ts new file mode 100644 index 000000000..e49e7c2b6 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/utils/GroundedSkybox.d.ts @@ -0,0 +1,15 @@ +/** + * @module GroundedSkybox + * @three_import import { getGroundProjectedNormal } from 'three/addons/tsl/utils/GroundedSkybox.js'; + */ +/** + * Projects the world position onto a sphere whose bottom is clipped by a ground disk, + * then returns a vector usable for sampling an environment cube map. + * + * @tsl + * @function + * @param {Node} radiusNode - The radius of the projection sphere. Must be large enough to ensure the scene's camera stays inside. + * @param {Node} heightNode - The height is how far the camera that took the photo was above the ground. A larger value will magnify the downward part of the image. + * @return {Node} A direction vector for sampling the environment cube map. + */ +export const getGroundProjectedNormal: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/utils/Raymarching.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/utils/Raymarching.d.ts new file mode 100644 index 000000000..82ad5f77c --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/tsl/utils/Raymarching.d.ts @@ -0,0 +1 @@ +export function RaymarchingBox(steps: number | Node, callback: Function | FunctionNode): void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/BufferGeometryUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/BufferGeometryUtils.d.ts new file mode 100644 index 000000000..45f64a18c --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/utils/BufferGeometryUtils.d.ts @@ -0,0 +1,123 @@ +/** + * @module BufferGeometryUtils + * @three_import import * as BufferGeometryUtils from 'three/addons/utils/BufferGeometryUtils.js'; + */ +/** + * Computes vertex tangents using the MikkTSpace algorithm. MikkTSpace generates the same tangents consistently, + * and is used in most modelling tools and normal map bakers. Use MikkTSpace for materials with normal maps, + * because inconsistent tangents may lead to subtle visual issues in the normal map, particularly around mirrored + * UV seams. + * + * In comparison to this method, {@link BufferGeometry#computeTangents} (a custom algorithm) generates tangents that + * probably will not match the tangents in other software. The custom algorithm is sufficient for general use with a + * custom material, and may be faster than MikkTSpace. + * + * Returns the original BufferGeometry. Indexed geometries will be de-indexed. Requires position, normal, and uv attributes. + * + * @param {BufferGeometry} geometry - The geometry to compute tangents for. + * @param {Object} MikkTSpace - Instance of `examples/jsm/libs/mikktspace.module.js`, or `mikktspace` npm package. + * Await `MikkTSpace.ready` before use. + * @param {boolean} [negateSign=true] - Whether to negate the sign component (.w) of each tangent. + * Required for normal map conventions in some formats, including glTF. + * @return {BufferGeometry} The updated geometry. + */ +export function computeMikkTSpaceTangents(geometry: BufferGeometry, MikkTSpace: Object, negateSign?: boolean): BufferGeometry; +/** + * Merges a set of geometries into a single instance. All geometries must have compatible attributes. + * + * @param {Array} geometries - The geometries to merge. + * @param {boolean} [useGroups=false] - Whether to use groups or not. + * @return {?BufferGeometry} The merged geometry. Returns `null` if the merge does not succeed. + */ +export function mergeGeometries(geometries: Array, useGroups?: boolean): BufferGeometry | null; +/** + * Merges a set of attributes into a single instance. All attributes must have compatible properties and types. + * Instances of {@link InterleavedBufferAttribute} are not supported. + * + * @param {Array} attributes - The attributes to merge. + * @return {?BufferAttribute} The merged attribute. Returns `null` if the merge does not succeed. + */ +export function mergeAttributes(attributes: Array): BufferAttribute | null; +/** + * Performs a deep clone of the given buffer attribute. + * + * @param {BufferAttribute} attribute - The attribute to clone. + * @return {BufferAttribute} The cloned attribute. + */ +export function deepCloneAttribute(attribute: BufferAttribute): BufferAttribute; +/** + * Returns a new, non-interleaved version of the given attribute. + * + * @param {InterleavedBufferAttribute} attribute - The interleaved attribute. + * @return {BufferAttribute} The non-interleaved attribute. + */ +export function deinterleaveAttribute(attribute: InterleavedBufferAttribute): BufferAttribute; +/** + * Deinterleaves all attributes on the given geometry. + * + * @param {BufferGeometry} geometry - The geometry to deinterleave. + */ +export function deinterleaveGeometry(geometry: BufferGeometry): void; +/** + * Interleaves a set of attributes and returns a new array of corresponding attributes that share a + * single {@link InterleavedBuffer} instance. All attributes must have compatible types. + * + * @param {Array} attributes - The attributes to interleave. + * @return {?Array} An array of interleaved attributes. If interleave does not succeed, the method returns `null`. + */ +export function interleaveAttributes(attributes: Array): Array | null; +/** + * Returns the amount of bytes used by all attributes to represent the geometry. + * + * @param {BufferGeometry} geometry - The geometry. + * @return {number} The estimate bytes used. + */ +export function estimateBytesUsed(geometry: BufferGeometry): number; +/** + * Returns a new geometry with vertices for which all similar vertex attributes (within tolerance) are merged. + * + * @param {BufferGeometry} geometry - The geometry to merge vertices for. + * @param {number} [tolerance=1e-4] - The tolerance value. + * @return {BufferGeometry} - The new geometry with merged vertices. + */ +export function mergeVertices(geometry: BufferGeometry, tolerance?: number): BufferGeometry; +/** + * Returns a new indexed geometry based on `TrianglesDrawMode` draw mode. + * This mode corresponds to the `gl.TRIANGLES` primitive in WebGL. + * + * @param {BufferGeometry} geometry - The geometry to convert. + * @param {number} drawMode - The current draw mode. + * @return {BufferGeometry} The new geometry using `TrianglesDrawMode`. + */ +export function toTrianglesDrawMode(geometry: BufferGeometry, drawMode: number): BufferGeometry; +/** + * Calculates the morphed attributes of a morphed/skinned BufferGeometry. + * + * Helpful for Raytracing or Decals (i.e. a `DecalGeometry` applied to a morphed Object with a `BufferGeometry` + * will use the original `BufferGeometry`, not the morphed/skinned one, generating an incorrect result. + * Using this function to create a shadow `Object3`D the `DecalGeometry` can be correctly generated). + * + * @param {Mesh|Line|Points} object - The 3D object to compute morph attributes for. + * @return {Object} An object with original position/normal attributes and morphed ones. + */ +export function computeMorphedAttributes(object: Mesh | Line | Points): Object; +/** + * Merges the {@link BufferGeometry#groups} for the given geometry. + * + * @param {BufferGeometry} geometry - The geometry to modify. + * @return {BufferGeometry} - The updated geometry + */ +export function mergeGroups(geometry: BufferGeometry): BufferGeometry; +/** + * Modifies the supplied geometry if it is non-indexed, otherwise creates a new, + * non-indexed geometry. Returns the geometry with smooth normals everywhere except + * faces that meet at an angle greater than the crease angle. + * + * @param {BufferGeometry} geometry - The geometry to modify. + * @param {number} [creaseAngle=Math.PI/3] - The crease angle in radians. + * @return {BufferGeometry} - The updated geometry + */ +export function toCreasedNormals(geometry: BufferGeometry, creaseAngle?: number): BufferGeometry; +import { BufferGeometry } from 'three'; +import { BufferAttribute } from 'three'; +import { InterleavedBufferAttribute } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/CameraUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/CameraUtils.d.ts new file mode 100644 index 000000000..42813c0bf --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/utils/CameraUtils.d.ts @@ -0,0 +1,14 @@ +/** + * Set projection matrix and the orientation of a perspective camera + * to exactly frame the corners of an arbitrary rectangle. + * NOTE: This function ignores the standard parameters; + * do not call `updateProjectionMatrix()` after this. + * + * @param {PerspectiveCamera} camera - The camera. + * @param {Vector3} bottomLeftCorner - The bottom-left corner point. + * @param {Vector3} bottomRightCorner - The bottom-right corner point. + * @param {Vector3} topLeftCorner - The top-left corner point. + * @param {boolean} [estimateViewFrustum=false] - If set to `true`, the function tries to estimate the camera's FOV. + */ +export function frameCorners(camera: PerspectiveCamera, bottomLeftCorner: Vector3, bottomRightCorner: Vector3, topLeftCorner: Vector3, estimateViewFrustum?: boolean): void; +import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/ColorUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/ColorUtils.d.ts new file mode 100644 index 000000000..fd8d570bc --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/utils/ColorUtils.d.ts @@ -0,0 +1,20 @@ +/** + * @module ColorUtils + * @three_import import * as ColorUtils from 'three/addons/utils/ColorUtils.js'; + */ +/** + * Sets the given color from a color temperature in Kelvin. + * + * Converts a correlated color temperature (CTT) to an approximate sRGB color + * using Tanner Helland's algorithm. Useful for physically-based lighting + * setups — e.g. candle flame (~1900K), tungsten bulb (~3200K), daylight + * (~6500K), or clear blue sky (~10000K). Values outside [1000, 40000] are + * clamped. + * + * Reference: https://tannerhelland.com/2012/09/18/convert-temperature-rgb-algorithm-code.html + * + * @param {Color} color - The color to set. + * @param {number} kelvin - Color temperature in Kelvin. Clamped to [1000, 40000]. + * @return {Color} The updated color. + */ +export function setKelvin(color: Color, kelvin: number): Color; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/GeometryCompressionUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/GeometryCompressionUtils.d.ts new file mode 100644 index 000000000..30aa1ef4b --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/utils/GeometryCompressionUtils.d.ts @@ -0,0 +1,23 @@ +/** + * @module GeometryCompressionUtils + * @three_import import * as GeometryCompressionUtils from 'three/addons/utils/GeometryCompressionUtils.js'; + */ +/** + * Compressed the given geometry's `normal` attribute by the selected encode method. + * + * @param {BufferGeometry} geometry - The geometry whose normals should be compressed. + * @param {('DEFAULT'|'OCT1Byte'|'OCT2Byte'|'ANGLES')} encodeMethod - The compression method. + */ +export function compressNormals(geometry: BufferGeometry, encodeMethod: ("DEFAULT" | "OCT1Byte" | "OCT2Byte" | "ANGLES")): void; +/** + * Compressed the given geometry's `position` attribute. + * + * @param {BufferGeometry} geometry - The geometry whose position values should be compressed. + */ +export function compressPositions(geometry: BufferGeometry): void; +/** + * Compressed the given geometry's `uv` attribute. + * + * @param {BufferGeometry} geometry - The geometry whose texture coordinates should be compressed. + */ +export function compressUvs(geometry: BufferGeometry): void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/GeometryUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/GeometryUtils.d.ts new file mode 100644 index 000000000..a5d2f6c5e --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/utils/GeometryUtils.d.ts @@ -0,0 +1,48 @@ +/** + * @module GeometryUtils + * @three_import import * as GeometryUtils from 'three/addons/utils/GeometryUtils.js'; + */ +/** + * Generates 2D-Coordinates along a Hilbert curve. + * + * Based on work by: {@link http://www.openprocessing.org/sketch/15493} + * + * @param {Vector3} [center] - Center of Hilbert curve. + * @param {number} [size=10] - Total width of Hilbert curve. + * @param {number} [iterations=10] - Number of subdivisions. + * @param {number} [v0=0] - Corner index -X, -Z. + * @param {number} [v1=1] - Corner index -X, +Z. + * @param {number} [v2=2] - Corner index +X, +Z. + * @param {number} [v3=3] - Corner index +X, -Z. + * @returns {Array} The Hilbert curve points. + */ +export function hilbert2D(center?: Vector3, size?: number, iterations?: number, v0?: number, v1?: number, v2?: number, v3?: number): Array; +/** + * Generates 3D-Coordinates along a Hilbert curve. + * + * Based on work by: {@link https://openprocessing.org/user/5654} + * + * @param {Vector3} [center] - Center of Hilbert curve. + * @param {number} [size=10] - Total width of Hilbert curve. + * @param {number} [iterations=1] - Number of subdivisions. + * @param {number} [v0=0] - Corner index -X, +Y, -Z. + * @param {number} [v1=1] - Corner index -X, +Y, +Z. + * @param {number} [v2=2] - Corner index -X, -Y, +Z. + * @param {number} [v3=3] - Corner index -X, -Y, -Z. + * @param {number} [v4=4] - Corner index +X, -Y, -Z. + * @param {number} [v5=5] - Corner index +X, -Y, +Z. + * @param {number} [v6=6] - Corner index +X, +Y, +Z. + * @param {number} [v7=7] - Corner index +X, +Y, -Z. + * @returns {Array} - The Hilbert curve points. + */ +export function hilbert3D(center?: Vector3, size?: number, iterations?: number, v0?: number, v1?: number, v2?: number, v3?: number, v4?: number, v5?: number, v6?: number, v7?: number): Array; +/** + * Generates a Gosper curve (lying in the XY plane). + * + * Reference: {@link https://gist.github.com/nitaku/6521802} + * + * @param {number} [size=1] - The size of a single gosper island. + * @return {Array} The gosper island points. + */ +export function gosper(size?: number): Array; +import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/LDrawUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/LDrawUtils.d.ts new file mode 100644 index 000000000..6345ec25f --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/utils/LDrawUtils.d.ts @@ -0,0 +1,17 @@ +/** + * Utility class for LDraw models. + * + * @three_import import { LDrawUtils } from 'three/addons/utils/LDrawUtils.js'; + */ +export class LDrawUtils { + /** + * Merges geometries in the given object by materials and returns a new group object. + * Use on not indexed geometries. The object buffers reference the old object ones. + * Special treatment is done to the conditional lines generated by LDrawLoader. + * + * @param {Object3D} object - The object to merge. + * @returns {Group} The merged object. + */ + static mergeObject(object: Object3D): Group; +} +import { Group } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/SceneOptimizer.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/SceneOptimizer.d.ts new file mode 100644 index 000000000..e8def1ced --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/utils/SceneOptimizer.d.ts @@ -0,0 +1,72 @@ +/** + * ~Options + */ +export type SceneOptimizer = { + /** + * - Whether to enable debug mode or not. + */ + debug?: boolean | undefined; +}; +/** + * This class can be used to optimized scenes by converting + * individual meshes into {@link BatchedMesh}. This component + * is an experimental attempt to implement auto-batching in three.js. + * + * @three_import import { SceneOptimizer } from 'three/addons/utils/SceneOptimizer.js'; + */ +export class SceneOptimizer { + /** + * Constructs a new scene optimizer. + * + * @param {Scene} scene - The scene to optimize. + * @param {SceneOptimizer~Options} options - The configuration options. + */ + constructor(scene: Scene, options?: {}); + scene: Scene; + debug: any; + _bufferToHash(buffer: any): number; + _getMaterialPropertiesHash(material: any): string; + _getAttributesSignature(geometry: any): string; + _getGeometryHash(geometry: any): string; + _getBatchKey(materialProps: any, attributesSignature: any): string; + _analyzeModel(): { + batchGroups: Map; + singleGroups: Map; + uniqueGeometries: number; + }; + _createBatchedMeshes(batchGroups: any): Set; + /** + * Removes empty nodes from all descendants of the given 3D object. + * + * @param {Object3D} object - The 3D object to process. + */ + removeEmptyNodes(object: Object3D): void; + /** + * Removes the given array of meshes from the scene. + * + * @param {Set} meshesToRemove - The meshes to remove. + */ + disposeMeshes(meshesToRemove: Set): void; + _logDebugInfo(stats: any): void; + /** + * Performs the auto-baching by identifying groups of meshes in the scene + * that can be represented as a single {@link BatchedMesh}. The method modifies + * the scene by adding instances of `BatchedMesh` and removing the now redundant + * individual meshes. + * + * @return {Scene} The optimized scene. + */ + toBatchedMesh(): Scene; + /** + * Performs the auto-instancing by identifying groups of meshes in the scene + * that can be represented as a single {@link InstancedMesh}. The method modifies + * the scene by adding instances of `InstancedMesh` and removing the now redundant + * individual meshes. + * + * This method is not yet implemented. + * + * @abstract + * @return {Scene} The optimized scene. + */ + toInstancingMesh(): Scene; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/SceneUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/SceneUtils.d.ts new file mode 100644 index 000000000..c25850d82 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/utils/SceneUtils.d.ts @@ -0,0 +1,72 @@ +/** + * This function creates a mesh for each instance of the given instanced mesh and + * adds it to a group. Each mesh will honor the current 3D transformation of its + * corresponding instance. + * + * @param {InstancedMesh} instancedMesh - The instanced mesh. + * @return {Group} A group of meshes. + */ +export function createMeshesFromInstancedMesh(instancedMesh: InstancedMesh): Group; +/** + * This function creates a mesh for each geometry-group of the given multi-material mesh and + * adds it to a group. + * + * @param {Mesh} mesh - The multi-material mesh. + * @return {Group} A group of meshes. + */ +export function createMeshesFromMultiMaterialMesh(mesh: Mesh): Group; +/** + * This function represents an alternative way to create 3D objects with multiple materials. + * Normally, {@link BufferGeometry#groups} are used which might introduce issues e.g. when + * exporting the object to a 3D format. This function accepts a geometry and an array of + * materials and creates for each material a mesh that is added to a group. + * + * @param {BufferGeometry} geometry - The geometry. + * @param {Array} materials - An array of materials. + * @return {Group} A group representing a multi-material object. + */ +export function createMultiMaterialObject(geometry: BufferGeometry, materials: Array): Group; +/** + * Executes a reducer function for each vertex of the given 3D object. + * `reduceVertices()` returns a single value: the function's accumulated result. + * + * @param {Object3D} object - The 3D object that should be processed. It must have a + * geometry with a `position` attribute. + * @param {function(number,Vector3):number} func - The reducer function. First argument + * is the current value, second argument the current vertex. + * @param {any} initialValue - The initial value. + * @return {any} The result. + */ +export function reduceVertices(object: Object3D, func: (arg0: number, arg1: Vector3) => number, initialValue: any): any; +/** + * Sorts the instances of the given instanced mesh. + * + * @param {InstancedMesh} mesh - The instanced mesh to sort. + * @param {function(number, number):number} compareFn - A custom compare function for the sort. + */ +export function sortInstancedMesh(mesh: InstancedMesh, compareFn: (arg0: number, arg1: number) => number): void; +/** + * Generator based alternative to {@link Object3D#traverse}. + * + * @param {Object3D} object - Object to traverse. + * @yields {Object3D} Objects that passed the filter condition. + */ +export function traverseGenerator(object: Object3D): any; +/** + * Generator based alternative to {@link Object3D#traverseVisible}. + * + * @param {Object3D} object Object to traverse. + * @yields {Object3D} Objects that passed the filter condition. + */ +export function traverseVisibleGenerator(object: Object3D): any; +/** + * Generator based alternative to {@link Object3D#traverseAncestors}. + * + * @param {Object3D} object Object to traverse. + * @yields {Object3D} Objects that passed the filter condition. + */ +export function traverseAncestorsGenerator(object: Object3D): any; +import { Group } from 'three'; +import { Mesh } from 'three'; +import { BufferGeometry } from 'three'; +import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/ShadowMapViewer.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/ShadowMapViewer.d.ts new file mode 100644 index 000000000..868c5d524 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/utils/ShadowMapViewer.d.ts @@ -0,0 +1,72 @@ +/** + * This is a helper for visualising a given light's shadow map. + * It works for shadow casting lights: DirectionalLight and SpotLight. + * It renders out the shadow map and displays it on a HUD. + * + * This module can only be used with {@link WebGLRenderer}. When using {@link WebGPURenderer}, + * import the class from `ShadowMapViewerGPU.js`. + * + * ```js + * const lightShadowMapViewer = new ShadowMapViewer( light ); + * lightShadowMapViewer.position.x = 10; + * lightShadowMapViewer.position.y = SCREEN_HEIGHT - ( SHADOW_MAP_HEIGHT / 4 ) - 10; + * lightShadowMapViewer.size.width = SHADOW_MAP_WIDTH / 4; + * lightShadowMapViewer.size.height = SHADOW_MAP_HEIGHT / 4; + * lightShadowMapViewer.update(); + * ``` + * + * @three_import import { ShadowMapViewer } from 'three/addons/utils/ShadowMapViewer.js'; + */ +export class ShadowMapViewer { + /** + * Constructs a new shadow map viewer. + * + * @param {Light} light - The shadow casting light. + */ + constructor(light: Light); + /** + * Whether to display the shadow map viewer or not. + * + * @type {boolean} + * @default true + */ + enabled: boolean; + /** + * The size of the viewer. When changing this property, make sure + * to call {@link ShadowMapViewer#update}. + * + * @type {{width:number,height:number}} + * @default true + */ + size: { + width: number; + height: number; + }; + /** + * The position of the viewer. When changing this property, make sure + * to call {@link ShadowMapViewer#update}. + * + * @type {{x:number,y:number, set:function(number,number)}} + * @default true + */ + position: { + x: number; + y: number; + set: (arg0: number, arg1: number) => any; + }; + /** + * Renders the viewer. This method must be called in the app's animation loop. + * + * @param {WebGLRenderer} renderer - The renderer. + */ + render: (renderer: WebGLRenderer) => void; + /** + * Resizes the viewer. This method should be called whenever the app's + * window is resized. + */ + updateForWindowResize: () => void; + /** + * Updates the viewer. + */ + update: () => void; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/ShadowMapViewerGPU.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/ShadowMapViewerGPU.d.ts new file mode 100644 index 000000000..b32070902 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/utils/ShadowMapViewerGPU.d.ts @@ -0,0 +1,71 @@ +/** + * This is a helper for visualising a given light's shadow map. + * It works for shadow casting lights: DirectionalLight and SpotLight. + * It renders out the shadow map and displays it on a HUD. + * + * This module can only be used with {@link WebGPURenderer}. When using {@link WebGLRenderer}, + * import the class from `ShadowMapViewer.js`. + * + * ```js + * const lightShadowMapViewer = new ShadowMapViewer( light ); + * lightShadowMapViewer.position.x = 10; + * lightShadowMapViewer.position.y = SCREEN_HEIGHT - ( SHADOW_MAP_HEIGHT / 4 ) - 10; + * lightShadowMapViewer.size.width = SHADOW_MAP_WIDTH / 4; + * lightShadowMapViewer.size.height = SHADOW_MAP_HEIGHT / 4; + * lightShadowMapViewer.update(); + * ``` + * + * @three_import import { ShadowMapViewer } from 'three/addons/utils/ShadowMapViewerGPU.js'; + */ +export class ShadowMapViewer { + /** + * Constructs a new shadow map viewer. + * + * @param {Light} light - The shadow casting light. + */ + constructor(light: Light); + /** + * Whether to display the shadow map viewer or not. + * + * @type {boolean} + * @default true + */ + enabled: boolean; + /** + * The size of the viewer. When changing this property, make sure + * to call {@link ShadowMapViewer#update}. + * + * @type {{width:number,height:number}} + * @default true + */ + size: { + width: number; + height: number; + }; + /** + * The position of the viewer. When changing this property, make sure + * to call {@link ShadowMapViewer#update}. + * + * @type {{width:number,height:number}} + * @default true + */ + position: { + width: number; + height: number; + }; + /** + * Renders the viewer. This method must be called in the app's animation loop. + * + * @param {WebGPURenderer} renderer - The renderer. + */ + render: (renderer: WebGPURenderer) => void; + /** + * Resizes the viewer. This method should be called whenever the app's + * window is resized. + */ + updateForWindowResize: () => void; + /** + * Updates the viewer. + */ + update: () => void; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/SkeletonUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/SkeletonUtils.d.ts new file mode 100644 index 000000000..d4841dd3a --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/utils/SkeletonUtils.d.ts @@ -0,0 +1,97 @@ +/** + * :SkeletonUtils~RetargetOptions + */ +export type module = { + /** + * - Whether to use the position of the first frame or not. + */ + useFirstFramePosition?: boolean | undefined; + /** + * - The FPS of the clip. + */ + fps?: number | undefined; + /** + * - A dictionary for mapping target to source bone names. + */ + names?: { + [x: string]: string; + } | undefined; + /** + * - A function for mapping bone names. Alternative to `names`. + */ + getBoneName?: ((arg0: string) => string) | undefined; + /** + * - Whether to trim the clip or not. If set the array should hold two values for the start and end. + */ + trim?: number[] | undefined; + /** + * - Whether to preserve bone matrices or not. + */ + preserveBoneMatrix?: boolean | undefined; + /** + * - Whether to preserve bone positions or not. + */ + preserveBonePositions?: boolean | undefined; + /** + * - Whether to use the target matrix or not. + */ + useTargetMatrix?: boolean | undefined; + /** + * - The name of the source's hip bone. + */ + hip?: string | undefined; + /** + * - The hip influence. + */ + hipInfluence?: Vector3 | undefined; + /** + * - The scale. + */ + scale?: number | undefined; + /** + * - Per-bone local offset matrices, keyed by bone name. + */ + localOffsets?: { + [x: string]: Matrix4; + } | undefined; + /** + * - An additional position offset applied to the hip bone. + */ + hipPosition?: Vector3 | undefined; +}; +/** + * Retargets the skeleton from the given source to the target. + * + * Both `target` and `source` can be a 3D object with a skeleton property (e.g. a skinned mesh) + * or a {@link Skeleton} directly. + * + * @param {Object3D|Skeleton} target - The target object. + * @param {Object3D|Skeleton} source - The source object. + * @param {module:SkeletonUtils~RetargetOptions} options - The options. + */ +export function retarget(target: Object3D | Skeleton, source: Object3D | Skeleton, options?: any): void; +/** + * Retargets the animation clip of the source to the target 3D object. + * + * The `source` can be a 3D object with a skeleton property (e.g. a skinned mesh) + * or a {@link Skeleton} directly. + * + * @param {Object3D} target - The target 3D object. Must have a `skeleton` property. + * @param {Object3D|Skeleton} source - The source object. + * @param {AnimationClip} clip - The animation clip. + * @param {module:SkeletonUtils~RetargetOptions} options - The options. + * @return {AnimationClip} The retargeted animation clip. + */ +export function retargetClip(target: Object3D, source: Object3D | Skeleton, clip: AnimationClip, options?: any): AnimationClip; +/** + * Clones the given 3D object and its descendants, ensuring that any `SkinnedMesh` instances are + * correctly associated with their bones. Bones are also cloned, and must be descendants of the + * object passed to this method. Other data, like geometries and materials, are reused by reference. + * + * @param {Object3D} source - The 3D object to clone. + * @return {Object3D} The cloned 3D object. + */ +export function clone(source: Object3D): Object3D; +import { Vector3 } from 'three'; +import { Matrix4 } from 'three'; +import { AnimationClip } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/SortUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/SortUtils.d.ts new file mode 100644 index 000000000..c3b427e51 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/utils/SortUtils.d.ts @@ -0,0 +1 @@ +export function radixSort(arr: Array, opt: Object): void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/UVsDebug.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/UVsDebug.d.ts new file mode 100644 index 000000000..241f84f5f --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/utils/UVsDebug.d.ts @@ -0,0 +1,16 @@ +/** + * @module UVsDebug + * @three_import import { UVsDebug } from 'three/addons/utils/UVsDebug.js'; + */ +/** + * Function for "unwrapping" and debugging three.js geometries UV mapping. + * + * ```js + * document.body.appendChild( UVsDebug( new THREE.SphereGeometry() ) ); + * ``` + * + * @param {BufferGeometry} geometry - The geometry whose uv coordinates should be inspected. + * @param {number} [size=1024] - The size of the debug canvas. + * @return {HTMLCanvasElement} A canvas element with visualized uv coordinates. + */ +export function UVsDebug(geometry: BufferGeometry, size?: number): HTMLCanvasElement; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/WebGLTextureUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/WebGLTextureUtils.d.ts new file mode 100644 index 000000000..2e39c5f77 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/utils/WebGLTextureUtils.d.ts @@ -0,0 +1,14 @@ +/** + * Returns an uncompressed version of the given compressed texture. + * + * This module can only be used with {@link WebGLRenderer}. When using {@link WebGPURenderer}, + * import the function from {@link WebGPUTextureUtils}. + * + * @param {CompressedTexture} texture - The compressed texture. + * @param {number} [maxTextureSize=Infinity] - The maximum size of the uncompressed texture. + * @param {?WebGLRenderer} [renderer=null] - A reference to a renderer. + * @return {CanvasTexture} The uncompressed texture. + */ +export function decompress(texture: CompressedTexture, maxTextureSize?: number, renderer?: WebGLRenderer | null): CanvasTexture; +import { WebGLRenderer } from 'three'; +import { CanvasTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/WebGPUTextureUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/WebGPUTextureUtils.d.ts new file mode 100644 index 000000000..24b790efc --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/utils/WebGPUTextureUtils.d.ts @@ -0,0 +1,15 @@ +/** + * Returns an uncompressed version of the given compressed texture. + * + * This module can only be used with {@link WebGPURenderer}. When using {@link WebGLRenderer}, + * import the function from {@link WebGLTextureUtils}. + * + * @async + * @param {CompressedTexture} blitTexture - The compressed texture. + * @param {number} [maxTextureSize=Infinity] - The maximum size of the uncompressed texture. + * @param {?WebGPURenderer} [renderer=null] - A reference to a renderer. + * @return {Promise} A Promise that resolved with the uncompressed texture. + */ +export function decompress(blitTexture: CompressedTexture, maxTextureSize?: number, renderer?: WebGPURenderer | null): Promise; +import { WebGPURenderer } from 'three/webgpu'; +import { CanvasTexture } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/WorkerPool.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/WorkerPool.d.ts new file mode 100644 index 000000000..054151041 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/utils/WorkerPool.d.ts @@ -0,0 +1,79 @@ +/** + * A simple pool for managing Web Workers. + * + * @three_import import { WorkerPool } from 'three/addons/utils/WorkerPool.js'; + */ +export class WorkerPool { + /** + * Constructs a new Worker pool. + * + * @param {number} [pool=4] - The size of the pool. + */ + constructor(pool?: number); + /** + * The size of the pool. + * + * @type {number} + * @default 4 + */ + pool: number; + /** + * A message queue. + * + * @type {Array} + */ + queue: Array; + /** + * An array of Workers. + * + * @type {Array} + */ + workers: Array; + /** + * An array with resolve functions for messages. + * + * @type {Array} + */ + workersResolve: Array; + /** + * The current worker status. + * + * @type {number} + */ + workerStatus: number; + /** + * A factory function for creating workers. + * + * @type {?Function} + */ + workerCreator: Function | null; + _initWorker(workerId: any): void; + _getIdleWorker(): number; + _onMessage(workerId: any, msg: any): void; + /** + * Sets a function that is responsible for creating Workers. + * + * @param {Function} workerCreator - The worker creator function. + */ + setWorkerCreator(workerCreator: Function): void; + /** + * Sets the Worker limit + * + * @param {number} pool - The size of the pool. + */ + setWorkerLimit(pool: number): void; + /** + * Post a message to an idle Worker. If no Worker is available, + * the message is pushed into a message queue for later processing. + * + * @param {Object} msg - The message. + * @param {Array} transfer - An array with array buffers for data transfer. + * @return {Promise} A Promise that resolves when the message has been processed. + */ + postMessage(msg: Object, transfer: Array): Promise; + /** + * Terminates all Workers of this pool. Call this method whenever this + * Worker pool is no longer used in your app. + */ + dispose(): void; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/ARButton.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/ARButton.d.ts new file mode 100644 index 000000000..64886c1b3 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/webxr/ARButton.d.ts @@ -0,0 +1,22 @@ +/** + * A utility class for creating a button that allows to initiate + * immersive AR sessions based on WebXR. The button can be created + * with a factory method and then appended to the website's DOM. + * + * ```js + * document.body.appendChild( ARButton.createButton( renderer ) ); + * ``` + * + * @hideconstructor + * @three_import import { ARButton } from 'three/addons/webxr/ARButton.js'; + */ +export class ARButton { + /** + * Constructs a new AR button. + * + * @param {WebGLRenderer|WebGPURenderer} renderer - The renderer. + * @param {XRSessionInit} [sessionInit] - The a configuration object for the AR session. + * @return {HTMLElement} The button or an error message if `immersive-ar` isn't supported. + */ + static createButton(renderer: WebGLRenderer | WebGPURenderer, sessionInit?: XRSessionInit): HTMLElement; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/OculusHandModel.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/OculusHandModel.d.ts new file mode 100644 index 000000000..7d8e29631 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/webxr/OculusHandModel.d.ts @@ -0,0 +1,87 @@ +/** + * Represents an Oculus hand model. + * + * @augments Object3D + * @three_import import { OculusHandModel } from 'three/addons/webxr/OculusHandModel.js'; + */ +export class OculusHandModel extends Object3D { + /** + * Constructs a new Oculus hand model. + * + * @param {Group} controller - The hand controller. + * @param {?Loader} [loader=null] - A loader that is used to load hand models. + * @param {?Function} [onLoad=null] - A callback that is executed when a hand model has been loaded. + */ + constructor(controller: Group, loader?: Loader | null, onLoad?: Function | null); + /** + * The hand controller. + * + * @type {Group} + */ + controller: Group; + /** + * The motion controller. + * + * @type {?MotionController} + * @default null + */ + motionController: MotionController | null; + /** + * The model's environment map. + * + * @type {?Texture} + * @default null + */ + envMap: Texture | null; + /** + * A loader that is used to load hand models. + * + * @type {?Loader} + * @default null + */ + loader: Loader | null; + /** + * A callback that is executed when a hand model has been loaded. + * + * @type {?Function} + * @default null + */ + onLoad: Function | null; + /** + * The path to the model repository. + * + * @type {?string} + * @default null + */ + path: string | null; + /** + * The model mesh. + * + * @type {Mesh} + * @default null + */ + mesh: Mesh; + xrInputSource: any; + /** + * Returns the pointer position which is the position of the index finger tip. + * + * @return {?Vector3} The pointer position. Returns `null` if not index finger tip joint was found. + */ + getPointerPosition(): Vector3 | null; + /** + * Returns `true` if the current pointer position (the index finger tip) intersections + * with the given box object. + * + * @param {Mesh} boxObject - The box object. + * @return {boolean} Whether an intersection was found or not. + */ + intersectBoxObject(boxObject: Mesh): boolean; + /** + * Executed actions depending on the interaction state with + * the given button. + * + * @param {Object} button - The button. + */ + checkButton(button: Object): void; +} +import { Object3D } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/OculusHandPointerModel.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/OculusHandPointerModel.d.ts new file mode 100644 index 000000000..4eed6ebf5 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/webxr/OculusHandPointerModel.d.ts @@ -0,0 +1,151 @@ +/** + * Represents an Oculus hand pointer model. + * + * @augments Object3D + * @three_import import { OculusHandPointerModel } from 'three/addons/webxr/OculusHandPointerModel.js'; + */ +export class OculusHandPointerModel extends Object3D { + /** + * Constructs a new Oculus hand model. + * + * @param {Group} hand - The hand controller. + * @param {Group} controller - The WebXR controller in target ray space. + */ + constructor(hand: Group, controller: Group); + /** + * The hand controller. + * + * @type {Group} + */ + hand: Group; + /** + * The WebXR controller in target ray space. + * + * @type {Group} + */ + controller: Group; + motionController: any; + envMap: any; + mesh: any; + /** + * The pointer geometry. + * + * @type {?BufferGeometry} + * @default null + */ + pointerGeometry: BufferGeometry | null; + /** + * The pointer mesh. + * + * @type {?Mesh} + * @default null + */ + pointerMesh: Mesh | null; + /** + * The pointer object that holds the pointer mesh. + * + * @type {?Object3D} + * @default null + */ + pointerObject: Object3D | null; + /** + * Whether the model is pinched or not. + * + * @type {?boolean} + * @default false + */ + pinched: boolean | null; + /** + * Whether the model is attached or not. + * + * @type {boolean} + * @default false + */ + attached: boolean; + /** + * The cursor object. + * + * @type {?Mesh} + * @default null + */ + cursorObject: Mesh | null; + /** + * The internal raycaster used for detecting + * intersections. + * + * @type {?Raycaster} + * @default null + */ + raycaster: Raycaster | null; + _onConnected(event: any): void; + _onDisconnected(): void; + xrInputSource: any; + _drawVerticesRing(vertices: any, baseVector: any, ringIndex: any): void; + _updatePointerVertices(rearRadius: any): void; + /** + * Creates a pointer mesh and adds it to this model. + */ + createPointer(): void; + _updateRaycaster(): void; + _updatePointer(): void; + /** + * Returns `true` is the model is pinched. + * + * @return {boolean} Whether the model is pinched or not. + */ + isPinched(): boolean; + /** + * Sets the attached state. + * + * @param {boolean} attached - Whether the model is attached or not. + */ + setAttached(attached: boolean): void; + /** + * Returns `true` is the model is attached. + * + * @return {boolean} Whether the model is attached or not. + */ + isAttached(): boolean; + /** + * Performs an intersection test with the model's raycaster and the given object. + * + * @param {Object3D} object - The 3D object to check for intersection with the ray. + * @param {boolean} [recursive=true] - If set to `true`, it also checks all descendants. + * Otherwise it only checks intersection with the object. + * @return {Array} An array holding the intersection points. + */ + intersectObject(object: Object3D, recursive?: boolean): Array; + /** + * Performs an intersection test with the model's raycaster and the given objects. + * + * @param {Array} objects - The 3D objects to check for intersection with the ray. + * @param {boolean} [recursive=true] - If set to `true`, it also checks all descendants. + * Otherwise it only checks intersection with the object. + * @return {Array} An array holding the intersection points. + */ + intersectObjects(objects: Array, recursive?: boolean): Array; + /** + * Checks for intersections between the model's raycaster and the given objects. The method + * updates the cursor object to the intersection point. + * + * @param {Array} objects - The 3D objects to check for intersection with the ray. + * @param {boolean} [recursive=false] - If set to `true`, it also checks all descendants. + * Otherwise it only checks intersection with the object. + */ + checkIntersections(objects: Array, recursive?: boolean): void; + /** + * Sets the cursor to the given distance. + * + * @param {number} distance - The distance to set the cursor to. + */ + setCursor(distance: number): void; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { Object3D } from 'three'; +import { BufferGeometry } from 'three'; +import { Mesh } from 'three'; +import { Raycaster } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/Text2D.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/Text2D.d.ts new file mode 100644 index 000000000..4101f890c --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/webxr/Text2D.d.ts @@ -0,0 +1,15 @@ +/** + * @module Text2D + * @three_import import * as Text2D from 'three/addons/webxr/Text2D.js'; + */ +/** + * A helper function for creating a simple plane mesh + * that can be used as a text label. The mesh's material + * holds a canvas texture that displays the given message. + * + * @param {string} message - The message to display. + * @param {number} height - The labels height. + * @return {Mesh} The plane mesh representing a text label. + */ +export function createText(message: string, height: number): Mesh; +import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/VRButton.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/VRButton.d.ts new file mode 100644 index 000000000..5901f3ec3 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/webxr/VRButton.d.ts @@ -0,0 +1,31 @@ +/** + * A utility class for creating a button that allows to initiate + * immersive VR sessions based on WebXR. The button can be created + * with a factory method and then appended ot the website's DOM. + * + * ```js + * document.body.appendChild( VRButton.createButton( renderer ) ); + * ``` + * + * @hideconstructor + * @three_import import { VRButton } from 'three/addons/webxr/VRButton.js'; + */ +export class VRButton { + /** + * Constructs a new VR button. + * + * @param {WebGLRenderer|WebGPURenderer} renderer - The renderer. + * @param {XRSessionInit} [sessionInit] - The a configuration object for the AR session. + * @return {HTMLElement} The button or an error message if `immersive-ar` isn't supported. + */ + static createButton(renderer: WebGLRenderer | WebGPURenderer, sessionInit?: XRSessionInit): HTMLElement; + /** + * Registers a `sessiongranted` event listener. When a session is granted, the {@link VRButton#xrSessionIsGranted} + * flag will evaluate to `true`. This method is automatically called by the module itself so there + * should be no need to use it on app level. + */ + static registerSessionGrantedListener(): void; +} +export namespace VRButton { + let xrSessionIsGranted: boolean; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/WebGLXRFallback.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/WebGLXRFallback.d.ts new file mode 100644 index 000000000..113ff7df3 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/webxr/WebGLXRFallback.d.ts @@ -0,0 +1,8 @@ +/** + * Sets up a construction-time WebGL fallback for WebGPU XR examples. + * + * @param {WebGPURenderer} renderer - The initial renderer. + * @param {Function} createFallbackRenderer - A function that returns a new renderer with a WebGL backend. + * @param {Function} onFallback - A function that installs the new renderer in the app. + */ +export function setupWebGLXRFallback(renderer: WebGPURenderer, createFallbackRenderer: Function, onFallback?: Function): void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/XRButton.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/XRButton.d.ts new file mode 100644 index 000000000..ad3f844b1 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/webxr/XRButton.d.ts @@ -0,0 +1,26 @@ +/** + * A utility class for creating a button that allows to initiate + * immersive XR sessions based on WebXR. The button can be created + * with a factory method and then appended ot the website's DOM. + * + * ```js + * document.body.appendChild( XRButton.createButton( renderer ) ); + * ``` + * + * Compared to {@link ARButton} and {@link VRButton}, this class will + * try to offer an immersive AR session first. If the device does not + * support this type of session, it uses an immersive VR session. + * + * @hideconstructor + * @three_import import { XRButton } from 'three/addons/webxr/XRButton.js'; + */ +export class XRButton { + /** + * Constructs a new XR button. + * + * @param {WebGLRenderer|WebGPURenderer} renderer - The renderer. + * @param {XRSessionInit} [sessionInit] - The a configuration object for the AR session. + * @return {HTMLElement} The button or an error message if WebXR isn't supported. + */ + static createButton(renderer: WebGLRenderer | WebGPURenderer, sessionInit?: XRSessionInit): HTMLElement; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/XRControllerModelFactory.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/XRControllerModelFactory.d.ts new file mode 100644 index 000000000..b4a44651c --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/webxr/XRControllerModelFactory.d.ts @@ -0,0 +1,96 @@ +/** + * Allows to create controller models for WebXR controllers that can be added as a visual + * representation to your scene. `XRControllerModelFactory` will automatically fetch controller + * models that match what the user is holding as closely as possible. The models should be + * attached to the object returned from getControllerGrip in order to match the orientation of + * the held device. + * + * This module depends on the [motion-controllers](https://github.com/immersive-web/webxr-input-profiles/blob/main/packages/motion-controllers/README.md) + * third-part library. + * + * ```js + * const controllerModelFactory = new XRControllerModelFactory(); + * + * const controllerGrip = renderer.xr.getControllerGrip( 0 ); + * controllerGrip.add( controllerModelFactory.createControllerModel( controllerGrip ) ); + * scene.add( controllerGrip ); + * ``` + * + * @three_import import { XRControllerModelFactory } from 'three/addons/webxr/XRControllerModelFactory.js'; + */ +export class XRControllerModelFactory { + /** + * Constructs a new XR controller model factory. + * + * @param {?GLTFLoader} [gltfLoader=null] - A glTF loader that is used to load controller models. + * @param {?Function} [onLoad=null] - A callback that is executed when a controller model has been loaded. + */ + constructor(gltfLoader?: GLTFLoader | null, onLoad?: Function | null); + /** + * A glTF loader that is used to load controller models. + * + * @type {?GLTFLoader} + * @default null + */ + gltfLoader: GLTFLoader | null; + /** + * The path to the model repository. + * + * @type {string} + */ + path: string; + _assetCache: {}; + /** + * A callback that is executed when a controller model has been loaded. + * + * @type {?Function} + * @default null + */ + onLoad: Function | null; + /** + * Sets the path to the model repository. + * + * @param {string} path - The path to set. + * @return {XRControllerModelFactory} A reference to this instance. + */ + setPath(path: string): XRControllerModelFactory; + /** + * Creates a controller model for the given WebXR controller. + * + * @param {Group} controller - The controller. + * @return {XRControllerModel} The XR controller model. + */ + createControllerModel(controller: Group): XRControllerModel; +} +import { GLTFLoader } from '../loaders/GLTFLoader.js'; +/** + * Represents a XR controller model. + * + * @augments Object3D + */ +declare class XRControllerModel extends Object3D { + /** + * The motion controller. + * + * @type {?MotionController} + * @default null + */ + motionController: MotionController | null; + /** + * The controller's environment map. + * + * @type {?Texture} + * @default null + */ + envMap: Texture | null; + /** + * Sets an environment map that is applied to the controller model. + * + * @param {?Texture} envMap - The environment map to apply. + * @return {XRControllerModel} A reference to this instance. + */ + setEnvironmentMap(envMap: Texture | null): XRControllerModel; +} +import { Object3D } from 'three'; +import { MotionController } from '../libs/motion-controllers.module.js'; +export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/XREstimatedLight.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/XREstimatedLight.d.ts new file mode 100644 index 000000000..6e67a9aa0 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/webxr/XREstimatedLight.d.ts @@ -0,0 +1,44 @@ +/** + * This class can be used to represent the environmental light of + * a XR session. It relies on the WebXR Lighting Estimation API. + * + * @augments Group + * @three_import import { XREstimatedLight } from 'three/addons/webxr/XREstimatedLight.js'; + */ +export class XREstimatedLight extends Group { + /** + * Constructs a new light. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {boolean} [environmentEstimation=true] - Whether to use environment estimation or not. + */ + constructor(renderer: WebGLRenderer, environmentEstimation?: boolean); + /** + * The light probe that represents the estimated light. + * + * @type {LightProbe} + */ + lightProbe: LightProbe; + /** + * Represents the primary light from the XR environment. + * + * @type {DirectionalLight} + */ + directionalLight: DirectionalLight; + /** + * Will be set to a cube map in the SessionLightProbe if environment estimation is + * available and requested. + * + * @type {?Texture} + * @default null + */ + environment: Texture | null; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose: () => void; +} +import { Group } from 'three'; +import { LightProbe } from 'three'; +import { DirectionalLight } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandMeshModel.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandMeshModel.d.ts new file mode 100644 index 000000000..7cb18fa25 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandMeshModel.d.ts @@ -0,0 +1,44 @@ +/** + * Represents one of the hand model types {@link XRHandModelFactory} might produce + * depending on the selected profile. `XRHandMeshModel` represents a hand with a + * custom asset. + * + * @three_import import { XRHandMeshModel } from 'three/addons/webxr/XRHandMeshModel.js'; + */ +export class XRHandMeshModel { + /** + * Constructs a new XR hand mesh model. + * + * @param {XRHandModel} handModel - The hand model. + * @param {Group} controller - The WebXR controller. + * @param {?string} path - The model path. + * @param {XRHandedness} handedness - The handedness of the XR input source. + * @param {?Loader} [loader=null] - The loader. If not provided, an instance of `GLTFLoader` will be used to load models. + * @param {?Function} [onLoad=null] - A callback that is executed when a controller model has been loaded. + * @param {?Object} [customCache=null] - An optional shared cache object for storing and reusing loaded assets across instances. + */ + constructor(handModel: XRHandModel, controller: Group, path: string | null, handedness: XRHandedness, loader?: Loader | null, onLoad?: Function | null, customCache?: Object | null); + /** + * The WebXR controller. + * + * @type {Group} + */ + controller: Group; + /** + * The hand model. + * + * @type {XRHandModel} + */ + handModel: XRHandModel; + /** + * An array of bones representing the bones + * of the hand skeleton. + * + * @type {Array} + */ + bones: Array; + /** + * Updates the mesh based on the tracked XR joints data. + */ + updateMesh(): void; +} diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandModelFactory.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandModelFactory.d.ts new file mode 100644 index 000000000..720ee0cd7 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandModelFactory.d.ts @@ -0,0 +1,102 @@ +/** + * Similar to {@link XRControllerModelFactory}, this class allows to create hand models + * for WebXR controllers that can be added as a visual representation to your scene. + * + * ```js + * const handModelFactory = new XRHandModelFactory(); + * + * const hand = renderer.xr.getHand( 0 ); + * hand.add( handModelFactory.createHandModel( hand ) ); + * scene.add( hand ); + * ``` + * + * @three_import import { XRHandModelFactory } from 'three/addons/webxr/XRHandModelFactory.js'; + */ +export class XRHandModelFactory { + /** + * Constructs a new XR hand model factory. + * + * @param {?GLTFLoader} [gltfLoader=null] - A glTF loader that is used to load hand models. + * @param {?Function} [onLoad=null] - A callback that is executed when a hand model has been loaded. + */ + constructor(gltfLoader?: GLTFLoader | null, onLoad?: Function | null); + /** + * A glTF loader that is used to load hand models. + * + * @type {?GLTFLoader} + * @default null + */ + gltfLoader: GLTFLoader | null; + /** + * The path to the model repository. + * + * @type {?string} + * @default null + */ + path: string | null; + _assetCache: {}; + /** + * A callback that is executed when a hand model has been loaded. + * + * @type {?Function} + * @default null + */ + onLoad: Function | null; + /** + * Sets the path to the hand model repository. + * + * @param {string} path - The path to set. + * @return {XRHandModelFactory} A reference to this instance. + */ + setPath(path: string): XRHandModelFactory; + /** + * Creates a controller model for the given WebXR hand controller. + * + * @param {Group} controller - The hand controller. + * @param {('spheres'|'boxes'|'mesh')} [profile] - The model profile that defines the model type. + * @return {XRHandModel} The XR hand model. + */ + createHandModel(controller: Group, profile?: ("spheres" | "boxes" | "mesh")): XRHandModel; +} +/** + * Represents a XR hand model. + * + * @augments Object3D + */ +declare class XRHandModel extends Object3D { + /** + * Constructs a new XR hand model. + * + * @param {Group} controller - The hand controller. + */ + constructor(controller: Group); + /** + * The hand controller. + * + * @type {Group} + */ + controller: Group; + /** + * The motion controller. + * + * @type {?MotionController} + * @default null + */ + motionController: MotionController | null; + /** + * The controller's environment map. + * + * @type {?Texture} + * @default null + */ + envMap: Texture | null; + /** + * The model mesh. + * + * @type {Mesh} + * @default null + */ + mesh: Mesh; +} +import { Object3D } from 'three'; +export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandPrimitiveModel.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandPrimitiveModel.d.ts new file mode 100644 index 000000000..fbe6ed543 --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandPrimitiveModel.d.ts @@ -0,0 +1,54 @@ +/** + * ~Options + */ +export type XRHandPrimitiveModel = { + /** + * - The primitive type. + */ + primitive?: "sphere" | "box" | undefined; +}; +/** + * Represents one of the hand model types {@link XRHandModelFactory} might produce + * depending on the selected profile. `XRHandPrimitiveModel` represents a hand + * with sphere or box primitives according to the selected `primitive` option. + * + * @three_import import { XRHandPrimitiveModel } from 'three/addons/webxr/XRHandPrimitiveModel.js'; + */ +export class XRHandPrimitiveModel { + /** + * Constructs a new XR hand primitive model. + * + * @param {XRHandModel} handModel - The hand model. + * @param {Group} controller - The WebXR controller. + * @param {string} path - The model path. + * @param {XRHandedness} handedness - The handedness of the XR input source. + * @param {XRHandPrimitiveModel~Options} options - The model options. + */ + constructor(handModel: XRHandModel, controller: Group, path: string, handedness: XRHandedness, options: any); + /** + * The WebXR controller. + * + * @type {Group} + */ + controller: Group; + /** + * The hand model. + * + * @type {XRHandModel} + */ + handModel: XRHandModel; + /** + * The model's environment map. + * + * @type {?Texture} + * @default null + */ + envMap: Texture | null; + handMesh: InstancedMesh; + joints: string[]; + /** + * Updates the mesh based on the tracked XR joints data. + */ + updateMesh(): void; +} +import { InstancedMesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/XRPlanes.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/XRPlanes.d.ts new file mode 100644 index 000000000..de818107d --- /dev/null +++ b/jsdoc-testing/jsdoc/examples/jsm/webxr/XRPlanes.d.ts @@ -0,0 +1,22 @@ +/** + * A utility class for the WebXR Plane Detection Module. If planes + * are detected by WebXR, this class will automatically add them + * as thin box meshes to the scene when below code snippet is used. + * + * ```js + * const planes = new XRPlanes( renderer ); + * scene.add( planes ); + * ``` + * + * @augments Object3D + * @three_import import { XRPlanes } from 'three/addons/webxr/XRPlanes.js'; + */ +export class XRPlanes extends Object3D { + /** + * Constructs a new XR plane container. + * + * @param {WebGLRenderer|WebGPURenderer} renderer - The renderer. + */ + constructor(renderer: WebGLRenderer | WebGPURenderer); +} +import { Object3D } from 'three'; diff --git a/jsdoc-testing/jsdoc/src/Three.Core.d.ts b/jsdoc-testing/jsdoc/src/Three.Core.d.ts new file mode 100644 index 000000000..035a14a67 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/Three.Core.d.ts @@ -0,0 +1,162 @@ +export { WebGLArrayRenderTarget } from "./renderers/WebGLArrayRenderTarget.js"; +export { WebGL3DRenderTarget } from "./renderers/WebGL3DRenderTarget.js"; +export { WebGLRenderTarget } from "./renderers/WebGLRenderTarget.js"; +export { WebXRController } from "./renderers/webxr/WebXRController.js"; +export { FogExp2 } from "./scenes/FogExp2.js"; +export { Fog } from "./scenes/Fog.js"; +export { Scene } from "./scenes/Scene.js"; +export { Sprite } from "./objects/Sprite.js"; +export { LOD } from "./objects/LOD.js"; +export { SkinnedMesh } from "./objects/SkinnedMesh.js"; +export { Skeleton } from "./objects/Skeleton.js"; +export { Bone } from "./objects/Bone.js"; +export { Mesh } from "./objects/Mesh.js"; +export { InstancedMesh } from "./objects/InstancedMesh.js"; +export { BatchedMesh } from "./objects/BatchedMesh.js"; +export { LineSegments } from "./objects/LineSegments.js"; +export { LineLoop } from "./objects/LineLoop.js"; +export { Line } from "./objects/Line.js"; +export { Points } from "./objects/Points.js"; +export { Group } from "./objects/Group.js"; +export { VideoTexture } from "./textures/VideoTexture.js"; +export { VideoFrameTexture } from "./textures/VideoFrameTexture.js"; +export { FramebufferTexture } from "./textures/FramebufferTexture.js"; +export { Source } from "./textures/Source.js"; +export { DataTexture } from "./textures/DataTexture.js"; +export { DataArrayTexture } from "./textures/DataArrayTexture.js"; +export { Data3DTexture } from "./textures/Data3DTexture.js"; +export { CompressedTexture } from "./textures/CompressedTexture.js"; +export { CompressedArrayTexture } from "./textures/CompressedArrayTexture.js"; +export { CompressedCubeTexture } from "./textures/CompressedCubeTexture.js"; +export { CubeTexture } from "./textures/CubeTexture.js"; +export { CanvasTexture } from "./textures/CanvasTexture.js"; +export { HTMLTexture } from "./textures/HTMLTexture.js"; +export { DepthTexture } from "./textures/DepthTexture.js"; +export { CubeDepthTexture } from "./textures/CubeDepthTexture.js"; +export { ExternalTexture } from "./textures/ExternalTexture.js"; +export { Texture } from "./textures/Texture.js"; +export * from "./geometries/Geometries.js"; +export * from "./materials/Materials.js"; +export * from "./core/BufferAttribute.js"; +export * from "./extras/curves/Curves.js"; +export * from "./constants.js"; +export * from "./Three.Legacy.js"; +export { AnimationLoader } from "./loaders/AnimationLoader.js"; +export { CompressedTextureLoader } from "./loaders/CompressedTextureLoader.js"; +export { CubeTextureLoader } from "./loaders/CubeTextureLoader.js"; +export { DataTextureLoader } from "./loaders/DataTextureLoader.js"; +export { TextureLoader } from "./loaders/TextureLoader.js"; +export { ObjectLoader } from "./loaders/ObjectLoader.js"; +export { MaterialLoader } from "./loaders/MaterialLoader.js"; +export { BufferGeometryLoader } from "./loaders/BufferGeometryLoader.js"; +export { ImageLoader } from "./loaders/ImageLoader.js"; +export { ImageBitmapLoader } from "./loaders/ImageBitmapLoader.js"; +export { FileLoader } from "./loaders/FileLoader.js"; +export { Loader } from "./loaders/Loader.js"; +export { LoaderUtils } from "./loaders/LoaderUtils.js"; +export { Cache } from "./loaders/Cache.js"; +export { AudioLoader } from "./loaders/AudioLoader.js"; +export { SpotLight } from "./lights/SpotLight.js"; +export { PointLight } from "./lights/PointLight.js"; +export { RectAreaLight } from "./lights/RectAreaLight.js"; +export { HemisphereLight } from "./lights/HemisphereLight.js"; +export { DirectionalLight } from "./lights/DirectionalLight.js"; +export { AmbientLight } from "./lights/AmbientLight.js"; +export { Light } from "./lights/Light.js"; +export { LightProbe } from "./lights/LightProbe.js"; +export { StereoCamera } from "./cameras/StereoCamera.js"; +export { PerspectiveCamera } from "./cameras/PerspectiveCamera.js"; +export { OrthographicCamera } from "./cameras/OrthographicCamera.js"; +export { CubeCamera } from "./cameras/CubeCamera.js"; +export { ArrayCamera } from "./cameras/ArrayCamera.js"; +export { Camera } from "./cameras/Camera.js"; +export { AudioListener } from "./audio/AudioListener.js"; +export { PositionalAudio } from "./audio/PositionalAudio.js"; +export { AudioContext } from "./audio/AudioContext.js"; +export { AudioAnalyser } from "./audio/AudioAnalyser.js"; +export { Audio } from "./audio/Audio.js"; +export { VectorKeyframeTrack } from "./animation/tracks/VectorKeyframeTrack.js"; +export { StringKeyframeTrack } from "./animation/tracks/StringKeyframeTrack.js"; +export { QuaternionKeyframeTrack } from "./animation/tracks/QuaternionKeyframeTrack.js"; +export { NumberKeyframeTrack } from "./animation/tracks/NumberKeyframeTrack.js"; +export { ColorKeyframeTrack } from "./animation/tracks/ColorKeyframeTrack.js"; +export { BooleanKeyframeTrack } from "./animation/tracks/BooleanKeyframeTrack.js"; +export { PropertyMixer } from "./animation/PropertyMixer.js"; +export { PropertyBinding } from "./animation/PropertyBinding.js"; +export { KeyframeTrack } from "./animation/KeyframeTrack.js"; +export { AnimationUtils } from "./animation/AnimationUtils.js"; +export { AnimationObjectGroup } from "./animation/AnimationObjectGroup.js"; +export { AnimationMixer } from "./animation/AnimationMixer.js"; +export { AnimationClip } from "./animation/AnimationClip.js"; +export { AnimationAction } from "./animation/AnimationAction.js"; +export { RenderTarget } from "./core/RenderTarget.js"; +export { RenderTarget3D } from "./core/RenderTarget3D.js"; +export { Uniform } from "./core/Uniform.js"; +export { UniformsGroup } from "./core/UniformsGroup.js"; +export { InstancedBufferGeometry } from "./core/InstancedBufferGeometry.js"; +export { BufferGeometry } from "./core/BufferGeometry.js"; +export { InterleavedBufferAttribute } from "./core/InterleavedBufferAttribute.js"; +export { InstancedInterleavedBuffer } from "./core/InstancedInterleavedBuffer.js"; +export { InterleavedBuffer } from "./core/InterleavedBuffer.js"; +export { InstancedBufferAttribute } from "./core/InstancedBufferAttribute.js"; +export { GLBufferAttribute } from "./core/GLBufferAttribute.js"; +export { Object3D } from "./core/Object3D.js"; +export { Raycaster } from "./core/Raycaster.js"; +export { Layers } from "./core/Layers.js"; +export { EventDispatcher } from "./core/EventDispatcher.js"; +export { Clock } from "./core/Clock.js"; +export { Timer } from "./core/Timer.js"; +export { QuaternionLinearInterpolant } from "./math/interpolants/QuaternionLinearInterpolant.js"; +export { LinearInterpolant } from "./math/interpolants/LinearInterpolant.js"; +export { DiscreteInterpolant } from "./math/interpolants/DiscreteInterpolant.js"; +export { CubicInterpolant } from "./math/interpolants/CubicInterpolant.js"; +export { BezierInterpolant } from "./math/interpolants/BezierInterpolant.js"; +export { Interpolant } from "./math/Interpolant.js"; +export { Triangle } from "./math/Triangle.js"; +export { MathUtils } from "./math/MathUtils.js"; +export { Spherical } from "./math/Spherical.js"; +export { Cylindrical } from "./math/Cylindrical.js"; +export { Plane } from "./math/Plane.js"; +export { Frustum } from "./math/Frustum.js"; +export { FrustumArray } from "./math/FrustumArray.js"; +export { Sphere } from "./math/Sphere.js"; +export { Ray } from "./math/Ray.js"; +export { Matrix4 } from "./math/Matrix4.js"; +export { Matrix3 } from "./math/Matrix3.js"; +export { Matrix2 } from "./math/Matrix2.js"; +export { Box3 } from "./math/Box3.js"; +export { Box2 } from "./math/Box2.js"; +export { Line3 } from "./math/Line3.js"; +export { Euler } from "./math/Euler.js"; +export { Vector4 } from "./math/Vector4.js"; +export { Vector3 } from "./math/Vector3.js"; +export { Vector2 } from "./math/Vector2.js"; +export { Quaternion } from "./math/Quaternion.js"; +export { Color } from "./math/Color.js"; +export { ColorManagement } from "./math/ColorManagement.js"; +export { SphericalHarmonics3 } from "./math/SphericalHarmonics3.js"; +export { SpotLightHelper } from "./helpers/SpotLightHelper.js"; +export { SkeletonHelper } from "./helpers/SkeletonHelper.js"; +export { PointLightHelper } from "./helpers/PointLightHelper.js"; +export { HemisphereLightHelper } from "./helpers/HemisphereLightHelper.js"; +export { GridHelper } from "./helpers/GridHelper.js"; +export { PolarGridHelper } from "./helpers/PolarGridHelper.js"; +export { DirectionalLightHelper } from "./helpers/DirectionalLightHelper.js"; +export { CameraHelper } from "./helpers/CameraHelper.js"; +export { BoxHelper } from "./helpers/BoxHelper.js"; +export { Box3Helper } from "./helpers/Box3Helper.js"; +export { PlaneHelper } from "./helpers/PlaneHelper.js"; +export { ArrowHelper } from "./helpers/ArrowHelper.js"; +export { AxesHelper } from "./helpers/AxesHelper.js"; +export { Shape } from "./extras/core/Shape.js"; +export { Path } from "./extras/core/Path.js"; +export { ShapePath } from "./extras/core/ShapePath.js"; +export { CurvePath } from "./extras/core/CurvePath.js"; +export { Curve } from "./extras/core/Curve.js"; +export { Controls } from "./extras/Controls.js"; +export { DataUtils } from "./extras/DataUtils.js"; +export { ImageUtils } from "./extras/ImageUtils.js"; +export { ShapeUtils } from "./extras/ShapeUtils.js"; +export { TextureUtils } from "./extras/TextureUtils.js"; +export { DefaultLoadingManager, LoadingManager } from "./loaders/LoadingManager.js"; +export { createCanvasElement, setConsoleFunction, getConsoleFunction, log, warn, error, warnOnce } from "./utils.js"; diff --git a/jsdoc-testing/jsdoc/src/Three.Legacy.d.ts b/jsdoc-testing/jsdoc/src/Three.Legacy.d.ts new file mode 100644 index 000000000..cb0ff5c3b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/Three.Legacy.d.ts @@ -0,0 +1 @@ +export {}; diff --git a/jsdoc-testing/jsdoc/src/Three.WebGPU.Nodes.d.ts b/jsdoc-testing/jsdoc/src/Three.WebGPU.Nodes.d.ts new file mode 100644 index 000000000..dd82de32b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/Three.WebGPU.Nodes.d.ts @@ -0,0 +1,29 @@ +export * from "./Three.Core.js"; +export * from "./materials/nodes/NodeMaterials.js"; +export * from "./nodes/Nodes.js"; +export { default as WebGPURenderer } from "./renderers/webgpu/WebGPURenderer.Nodes.js"; +export { default as WebGPUBackend } from "./renderers/webgpu/WebGPUBackend.js"; +export { default as WebGLBackend } from "./renderers/webgl-fallback/WebGLBackend.js"; +export { default as Lighting } from "./renderers/common/Lighting.js"; +export { default as BundleGroup } from "./renderers/common/BundleGroup.js"; +export { default as QuadMesh } from "./renderers/common/QuadMesh.js"; +export { default as PMREMGenerator } from "./renderers/common/extras/PMREMGenerator.js"; +export { default as RenderPipeline } from "./renderers/common/RenderPipeline.js"; +export { default as PostProcessing } from "./renderers/common/PostProcessing.js"; +export { default as ReadbackBuffer } from "./renderers/common/ReadbackBuffer.js"; +export { default as StorageTexture } from "./renderers/common/StorageTexture.js"; +export { default as StorageBufferAttribute } from "./renderers/common/StorageBufferAttribute.js"; +export { default as StorageInstancedBufferAttribute } from "./renderers/common/StorageInstancedBufferAttribute.js"; +export { default as IndirectStorageBufferAttribute } from "./renderers/common/IndirectStorageBufferAttribute.js"; +export { default as IESSpotLight } from "./lights/webgpu/IESSpotLight.js"; +export { default as ProjectorLight } from "./lights/webgpu/ProjectorLight.js"; +export { default as NodeLoader } from "./loaders/nodes/NodeLoader.js"; +export { default as NodeObjectLoader } from "./loaders/nodes/NodeObjectLoader.js"; +export { default as NodeMaterialLoader } from "./loaders/nodes/NodeMaterialLoader.js"; +export { default as InspectorBase } from "./renderers/common/InspectorBase.js"; +export { default as CanvasTarget } from "./renderers/common/CanvasTarget.js"; +export { default as BlendMode } from "./renderers/common/BlendMode.js"; +export { ClippingGroup } from "./objects/ClippingGroup.js"; +import * as RendererUtils from './renderers/common/RendererUtils.js'; +import * as TSL from './nodes/TSL.js'; +export { RendererUtils, TSL }; diff --git a/jsdoc-testing/jsdoc/src/Three.WebGPU.d.ts b/jsdoc-testing/jsdoc/src/Three.WebGPU.d.ts new file mode 100644 index 000000000..4cc27bf85 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/Three.WebGPU.d.ts @@ -0,0 +1,35 @@ +export * from "./Three.Core.js"; +export * from "./materials/nodes/NodeMaterials.js"; +export * from "./nodes/Nodes.js"; +export { default as WebGPURenderer } from "./renderers/webgpu/WebGPURenderer.js"; +export { default as WebGPUBackend } from "./renderers/webgpu/WebGPUBackend.js"; +export { default as WebGLBackend } from "./renderers/webgl-fallback/WebGLBackend.js"; +export { default as WebGLCapabilities } from "./renderers/webgl-fallback/utils/WebGLCapabilities.js"; +export { default as Lighting } from "./renderers/common/Lighting.js"; +export { default as BundleGroup } from "./renderers/common/BundleGroup.js"; +export { default as QuadMesh } from "./renderers/common/QuadMesh.js"; +export { default as PMREMGenerator } from "./renderers/common/extras/PMREMGenerator.js"; +export { default as RenderPipeline } from "./renderers/common/RenderPipeline.js"; +export { default as PostProcessing } from "./renderers/common/PostProcessing.js"; +export { default as ReadbackBuffer } from "./renderers/common/ReadbackBuffer.js"; +export { default as CubeRenderTarget } from "./renderers/common/CubeRenderTarget.js"; +export { default as StorageTexture } from "./renderers/common/StorageTexture.js"; +export { default as Storage3DTexture } from "./renderers/common/Storage3DTexture.js"; +export { default as StorageArrayTexture } from "./renderers/common/StorageArrayTexture.js"; +export { default as StorageBufferAttribute } from "./renderers/common/StorageBufferAttribute.js"; +export { default as StorageInstancedBufferAttribute } from "./renderers/common/StorageInstancedBufferAttribute.js"; +export { default as IndirectStorageBufferAttribute } from "./renderers/common/IndirectStorageBufferAttribute.js"; +export { default as IESSpotLight } from "./lights/webgpu/IESSpotLight.js"; +export { default as ProjectorLight } from "./lights/webgpu/ProjectorLight.js"; +export { default as NodeLoader } from "./loaders/nodes/NodeLoader.js"; +export { default as NodeObjectLoader } from "./loaders/nodes/NodeObjectLoader.js"; +export { default as NodeMaterialLoader } from "./loaders/nodes/NodeMaterialLoader.js"; +export { default as InspectorBase } from "./renderers/common/InspectorBase.js"; +export { default as CanvasTarget } from "./renderers/common/CanvasTarget.js"; +export { default as BlendMode } from "./renderers/common/BlendMode.js"; +export { default as GLSLNodeBuilder } from "./renderers/webgl-fallback/nodes/GLSLNodeBuilder.js"; +export { default as BasicNodeLibrary } from "./renderers/webgpu/nodes/BasicNodeLibrary.js"; +export { ClippingGroup } from "./objects/ClippingGroup.js"; +import * as RendererUtils from './renderers/common/RendererUtils.js'; +import * as TSL from './nodes/TSL.js'; +export { RendererUtils, TSL }; diff --git a/jsdoc-testing/jsdoc/src/Three.d.ts b/jsdoc-testing/jsdoc/src/Three.d.ts new file mode 100644 index 000000000..3c8c6cd87 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/Three.d.ts @@ -0,0 +1,9 @@ +export * from "./Three.Core.js"; +export { WebGLRenderer } from "./renderers/WebGLRenderer.js"; +export { WebGLCubeRenderTarget } from "./renderers/WebGLCubeRenderTarget.js"; +export { ShaderLib } from "./renderers/shaders/ShaderLib.js"; +export { UniformsLib } from "./renderers/shaders/UniformsLib.js"; +export { UniformsUtils } from "./renderers/shaders/UniformsUtils.js"; +export { ShaderChunk } from "./renderers/shaders/ShaderChunk.js"; +export { PMREMGenerator } from "./extras/PMREMGenerator.js"; +export { WebGLUtils } from "./renderers/webgl/WebGLUtils.js"; diff --git a/jsdoc-testing/jsdoc/src/animation/AnimationAction.d.ts b/jsdoc-testing/jsdoc/src/animation/AnimationAction.d.ts new file mode 100644 index 000000000..543005806 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/animation/AnimationAction.d.ts @@ -0,0 +1,311 @@ +/** + * An instance of `AnimationAction` schedules the playback of an animation which is + * stored in {@link AnimationClip}. + */ +export class AnimationAction { + /** + * Constructs a new animation action. + * + * @param {AnimationMixer} mixer - The mixer that is controlled by this action. + * @param {AnimationClip} clip - The animation clip that holds the actual keyframes. + * @param {?Object3D} [localRoot=null] - The root object on which this action is performed. + * @param {(NormalAnimationBlendMode|AdditiveAnimationBlendMode)} [blendMode] - The blend mode. + */ + constructor(mixer: AnimationMixer, clip: AnimationClip, localRoot?: Object3D | null, blendMode?: (number | number)); + _mixer: AnimationMixer; + _clip: AnimationClip; + _localRoot: any; + /** + * Defines how the animation is blended/combined when two or more animations + * are simultaneously played. + * + * @type {(NormalAnimationBlendMode|AdditiveAnimationBlendMode)} + */ + blendMode: (number | number); + _interpolantSettings: { + endingStart: number; + endingEnd: number; + }; + _interpolants: any[]; + _propertyBindings: any[]; + _cacheIndex: any; + _byClipCacheIndex: any; + _timeScaleInterpolant: any; + _restoreTimeScale: number | null; + _weightInterpolant: any; + /** + * The loop mode, set via {@link AnimationAction#setLoop}. + * + * @type {(LoopRepeat|LoopOnce|LoopPingPong)} + * @default LoopRepeat + */ + loop: (number | number | number); + _loopCount: number; + _startTime: number | null; + /** + * The local time of this action (in seconds, starting with `0`). + * + * The value gets clamped or wrapped to `[0,clip.duration]` (according to the + * loop state). + * + * @type {number} + * @default Infinity + */ + time: number; + /** + * Scaling factor for the {@link AnimationAction#time}. A value of `0` causes the + * animation to pause. Negative values cause the animation to play backwards. + * + * @type {number} + * @default 1 + */ + timeScale: number; + _effectiveTimeScale: number; + /** + * The degree of influence of this action (in the interval `[0, 1]`). Values + * between `0` (no impact) and `1` (full impact) can be used to blend between + * several actions. + * + * @type {number} + * @default 1 + */ + weight: number; + _effectiveWeight: number; + /** + * The number of repetitions of the performed clip over the course of this action. + * Can be set via {@link AnimationAction#setLoop}. + * + * Setting this number has no effect if {@link AnimationAction#loop} is set to + * `THREE:LoopOnce`. + * + * @type {number} + * @default Infinity + */ + repetitions: number; + /** + * If set to `true`, the playback of the action is paused. + * + * @type {boolean} + * @default false + */ + paused: boolean; + /** + * If set to `false`, the action is disabled so it has no impact. + * + * When the action is re-enabled, the animation continues from its current + * time (setting `enabled` to `false` doesn't reset the action). + * + * @type {boolean} + * @default true + */ + enabled: boolean; + /** + * If set to true the animation will automatically be paused on its last frame. + * + * If set to false, {@link AnimationAction#enabled} will automatically be switched + * to `false` when the last loop of the action has finished, so that this action has + * no further impact. + * + * Note: This member has no impact if the action is interrupted (it + * has only an effect if its last loop has really finished). + * + * @type {boolean} + * @default false + */ + clampWhenFinished: boolean; + /** + * Enables smooth interpolation without separate clips for start, loop and end. + * + * @type {boolean} + * @default true + */ + zeroSlopeAtStart: boolean; + /** + * Enables smooth interpolation without separate clips for start, loop and end. + * + * @type {boolean} + * @default true + */ + zeroSlopeAtEnd: boolean; + /** + * Starts the playback of the animation. + * + * @return {AnimationAction} A reference to this animation action. + */ + play(): AnimationAction; + /** + * Stops the playback of the animation. + * + * @return {AnimationAction} A reference to this animation action. + */ + stop(): AnimationAction; + /** + * Resets the playback of the animation. + * + * @return {AnimationAction} A reference to this animation action. + */ + reset(): AnimationAction; + /** + * Returns `true` if the animation is running. + * + * @return {boolean} Whether the animation is running or not. + */ + isRunning(): boolean; + /** + * Returns `true` when {@link AnimationAction#play} has been called. + * + * @return {boolean} Whether the animation is scheduled or not. + */ + isScheduled(): boolean; + /** + * Defines the time when the animation should start. + * + * @param {number} time - The start time in seconds. + * @return {AnimationAction} A reference to this animation action. + */ + startAt(time: number): AnimationAction; + /** + * Configures the loop settings for this action. + * + * @param {(LoopRepeat|LoopOnce|LoopPingPong)} mode - The loop mode. + * @param {number} repetitions - The number of repetitions. + * @return {AnimationAction} A reference to this animation action. + */ + setLoop(mode: (number | number | number), repetitions: number): AnimationAction; + /** + * Sets the effective weight of this action. + * + * An action has no effect and thus an effective weight of zero when the + * action is disabled. + * + * @param {number} weight - The weight to set. + * @return {AnimationAction} A reference to this animation action. + */ + setEffectiveWeight(weight: number): AnimationAction; + /** + * Returns the effective weight of this action. + * + * @return {number} The effective weight. + */ + getEffectiveWeight(): number; + /** + * Fades the animation in by increasing its weight gradually from `0` to `1`, + * within the passed time interval. + * + * @param {number} duration - The duration of the fade. + * @return {AnimationAction} A reference to this animation action. + */ + fadeIn(duration: number): AnimationAction; + /** + * Fades the animation out by decreasing its weight gradually from `1` to `0`, + * within the passed time interval. + * + * @param {number} duration - The duration of the fade. + * @return {AnimationAction} A reference to this animation action. + */ + fadeOut(duration: number): AnimationAction; + /** + * Causes this action to fade in and the given action to fade out, + * within the passed time interval. + * + * @param {AnimationAction} fadeOutAction - The animation action to fade out. + * @param {number} duration - The duration of the fade. + * @param {boolean} [warp=false] - Whether warping should be used or not. + * @return {AnimationAction} A reference to this animation action. + */ + crossFadeFrom(fadeOutAction: AnimationAction, duration: number, warp?: boolean): AnimationAction; + /** + * Causes this action to fade out and the given action to fade in, + * within the passed time interval. + * + * @param {AnimationAction} fadeInAction - The animation action to fade in. + * @param {number} duration - The duration of the fade. + * @param {boolean} [warp=false] - Whether warping should be used or not. + * @return {AnimationAction} A reference to this animation action. + */ + crossFadeTo(fadeInAction: AnimationAction, duration: number, warp?: boolean): AnimationAction; + /** + * Stops any fading which is applied to this action. + * + * @return {AnimationAction} A reference to this animation action. + */ + stopFading(): AnimationAction; + /** + * Sets the effective time scale of this action. + * + * An action has no effect and thus an effective time scale of zero when the + * action is paused. + * + * @param {number} timeScale - The time scale to set. + * @return {AnimationAction} A reference to this animation action. + */ + setEffectiveTimeScale(timeScale: number): AnimationAction; + /** + * Returns the effective time scale of this action. + * + * @return {number} The effective time scale. + */ + getEffectiveTimeScale(): number; + /** + * Sets the duration for a single loop of this action. + * + * @param {number} duration - The duration to set. + * @return {AnimationAction} A reference to this animation action. + */ + setDuration(duration: number): AnimationAction; + /** + * Synchronizes this action with the passed other action. + * + * @param {AnimationAction} action - The action to sync with. + * @return {AnimationAction} A reference to this animation action. + */ + syncWith(action: AnimationAction): AnimationAction; + /** + * Decelerates this animation's speed to `0` within the passed time interval. + * + * @param {number} duration - The duration. + * @return {AnimationAction} A reference to this animation action. + */ + halt(duration: number): AnimationAction; + /** + * Changes the playback speed, within the passed time interval, by modifying + * {@link AnimationAction#timeScale} gradually from `startTimeScale` to + * `endTimeScale`. + * + * @param {number} startTimeScale - The start time scale. + * @param {number} endTimeScale - The end time scale. + * @param {number} duration - The duration. + * @return {AnimationAction} A reference to this animation action. + */ + warp(startTimeScale: number, endTimeScale: number, duration: number): AnimationAction; + /** + * Stops any scheduled warping which is applied to this action. + * + * @return {AnimationAction} A reference to this animation action. + */ + stopWarping(): AnimationAction; + /** + * Returns the animation mixer of this animation action. + * + * @return {AnimationMixer} The animation mixer. + */ + getMixer(): AnimationMixer; + /** + * Returns the animation clip of this animation action. + * + * @return {AnimationClip} The animation clip. + */ + getClip(): AnimationClip; + /** + * Returns the root object of this animation action. + * + * @return {Object3D} The root object. + */ + getRoot(): Object3D; + _update(time: any, deltaTime: any, timeDirection: any, accuIndex: any): void; + _updateWeight(time: any): number; + _updateTimeScale(time: any): number; + _updateTime(deltaTime: any): any; + _setEndings(atStart: any, atEnd: any, pingPong: any): void; + _scheduleFading(duration: any, weightNow: any, weightThen: any): this; +} diff --git a/jsdoc-testing/jsdoc/src/animation/AnimationClip.d.ts b/jsdoc-testing/jsdoc/src/animation/AnimationClip.d.ts new file mode 100644 index 000000000..23194681c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/animation/AnimationClip.d.ts @@ -0,0 +1,154 @@ +/** + * A reusable set of keyframe tracks which represent an animation. + */ +export class AnimationClip { + /** + * Factory method for creating an animation clip from the given JSON. + * + * @static + * @param {Object} json - The serialized animation clip. + * @return {AnimationClip} The new animation clip. + */ + static parse(json: Object): AnimationClip; + /** + * Serializes the given animation clip into JSON. + * + * @static + * @param {AnimationClip} clip - The animation clip to serialize. + * @return {Object} The JSON object. + */ + static toJSON(clip: AnimationClip): Object; + /** + * Returns a new animation clip from the passed morph targets array of a + * geometry, taking a name and the number of frames per second. + * + * Note: The fps parameter is required, but the animation speed can be + * overridden via {@link AnimationAction#setDuration}. + * + * @static + * @param {string} name - The name of the animation clip. + * @param {Array} morphTargetSequence - A sequence of morph targets. + * @param {number} fps - The Frames-Per-Second value. + * @param {boolean} noLoop - Whether the clip should be no loop or not. + * @return {AnimationClip} The new animation clip. + */ + static CreateFromMorphTargetSequence(name: string, morphTargetSequence: Array, fps: number, noLoop: boolean): AnimationClip; + /** + * Searches for an animation clip by name, taking as its first parameter + * either an array of clips, or a mesh or geometry that contains an + * array named "animations" property. + * + * @static + * @param {(Array|Object3D)} objectOrClipArray - The array or object to search through. + * @param {string} name - The name to search for. + * @return {?AnimationClip} The found animation clip. Returns `null` if no clip has been found. + */ + static findByName(objectOrClipArray: (Array | Object3D), name: string): AnimationClip | null; + /** + * Returns an array of new AnimationClips created from the morph target + * sequences of a geometry, trying to sort morph target names into + * animation-group-based patterns like "Walk_001, Walk_002, Run_001, Run_002...". + * + * See {@link MD2Loader#parse} as an example for how the method should be used. + * + * @static + * @param {Array} morphTargets - A sequence of morph targets. + * @param {number} fps - The Frames-Per-Second value. + * @param {boolean} noLoop - Whether the clip should be no loop or not. + * @return {Array} An array of new animation clips. + */ + static CreateClipsFromMorphTargetSequences(morphTargets: Array, fps: number, noLoop: boolean): Array; + /** + * Constructs a new animation clip. + * + * Note: Instead of instantiating an AnimationClip directly with the constructor, you can + * use the static interface of this class for creating clips. In most cases though, animation clips + * will automatically be created by loaders when importing animated 3D assets. + * + * @param {string} [name=''] - The clip's name. + * @param {number} [duration=-1] - The clip's duration in seconds. If a negative value is passed, + * the duration will be calculated from the passed keyframes. + * @param {Array} tracks - An array of keyframe tracks. + * @param {(NormalAnimationBlendMode|AdditiveAnimationBlendMode)} [blendMode=NormalAnimationBlendMode] - Defines how the animation + * is blended/combined when two or more animations are simultaneously played. + */ + constructor(name?: string, duration?: number, tracks?: Array, blendMode?: (number | AdditiveAnimationBlendMode)); + /** + * The clip's name. + * + * @type {string} + */ + name: string; + /** + * An array of keyframe tracks. + * + * @type {Array} + */ + tracks: Array; + /** + * The clip's duration in seconds. + * + * @type {number} + */ + duration: number; + /** + * Defines how the animation is blended/combined when two or more animations + * are simultaneously played. + * + * @type {(NormalAnimationBlendMode|AdditiveAnimationBlendMode)} + */ + blendMode: (number | AdditiveAnimationBlendMode); + /** + * The UUID of the animation clip. + * + * @type {string} + * @readonly + */ + readonly uuid: string; + /** + * An object that can be used to store custom data about the animation clip. + * It should not hold references to functions as these will not be cloned. + * + * @type {Object} + */ + userData: Object; + /** + * Sets the duration of this clip to the duration of its longest keyframe track. + * + * @return {AnimationClip} A reference to this animation clip. + */ + resetDuration(): AnimationClip; + /** + * Trims all tracks to the clip's duration. + * + * @return {AnimationClip} A reference to this animation clip. + */ + trim(): AnimationClip; + /** + * Performs minimal validation on each track in the clip. Returns `true` if all + * tracks are valid. + * + * @return {boolean} Whether the clip's keyframes are valid or not. + */ + validate(): boolean; + /** + * Optimizes each track by removing equivalent sequential keys (which are + * common in morph target sequences). + * + * @return {AnimationClip} A reference to this animation clip. + */ + optimize(): AnimationClip; + /** + * Returns a new animation clip with copied values from this instance. + * + * @return {AnimationClip} A clone of this instance. + */ + clone(): AnimationClip; + /** + * Serializes this animation clip into JSON. + * + * @return {Object} The JSON object. + */ + toJSON(): Object; +} +import { KeyframeTrack } from './KeyframeTrack.js'; diff --git a/jsdoc-testing/jsdoc/src/animation/AnimationMixer.d.ts b/jsdoc-testing/jsdoc/src/animation/AnimationMixer.d.ts new file mode 100644 index 000000000..b474470e7 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/animation/AnimationMixer.d.ts @@ -0,0 +1,152 @@ +/** + * `AnimationMixer` is a player for animations on a particular object in + * the scene. When multiple objects in the scene are animated independently, + * one `AnimationMixer` may be used for each object. + */ +export class AnimationMixer extends EventDispatcher { + /** + * Constructs a new animation mixer. + * + * @param {Object3D} root - The object whose animations shall be played by this mixer. + */ + constructor(root: Object3D); + _root: Object3D; + _accuIndex: number; + /** + * The global mixer time (in seconds; starting with `0` on the mixer's creation). + * + * @type {number} + * @default 0 + */ + time: number; + /** + * A scaling factor for the global time. + * + * Note: Setting this member to `0` and later back to `1` is a + * possibility to pause/unpause all actions that are controlled by this + * mixer. + * + * @type {number} + * @default 1 + */ + timeScale: number; + _bindAction(action: any, prototypeAction: any): void; + _activateAction(action: any): void; + _deactivateAction(action: any): void; + _initMemoryManager(): void; + _actions: any[] | undefined; + _nActiveActions: number | undefined; + _actionsByClip: {} | undefined; + _bindings: any[] | undefined; + _nActiveBindings: number | undefined; + _bindingsByRootAndName: {} | undefined; + _controlInterpolants: any[] | undefined; + _nActiveControlInterpolants: number | undefined; + stats: { + actions: { + readonly total: number; + readonly inUse: number | undefined; + }; + bindings: { + readonly total: number; + readonly inUse: number | undefined; + }; + controlInterpolants: { + readonly total: number; + readonly inUse: number | undefined; + }; + } | undefined; + _isActiveAction(action: any): boolean; + _addInactiveAction(action: any, clipUuid: any, rootUuid: any): void; + _removeInactiveAction(action: any): void; + _removeInactiveBindingsForAction(action: any): void; + _lendAction(action: any): void; + _takeBackAction(action: any): void; + _addInactiveBinding(binding: any, rootUuid: any, trackName: any): void; + _removeInactiveBinding(binding: any): void; + _lendBinding(binding: any): void; + _takeBackBinding(binding: any): void; + _lendControlInterpolant(): any; + _takeBackControlInterpolant(interpolant: any): void; + /** + * Returns an instance of {@link AnimationAction} for the passed clip. + * + * If an action fitting the clip and root parameters doesn't yet exist, it + * will be created by this method. Calling this method several times with the + * same clip and root parameters always returns the same action. + * + * @param {AnimationClip|string} clip - An animation clip or alternatively the name of the animation clip. + * @param {Object3D} [optionalRoot] - An alternative root object. + * @param {(NormalAnimationBlendMode|AdditiveAnimationBlendMode)} [blendMode] - The blend mode. + * @return {?AnimationAction} The animation action. + */ + clipAction(clip: AnimationClip | string, optionalRoot?: Object3D, blendMode?: (number | AdditiveAnimationBlendMode)): AnimationAction | null; + /** + * Returns an existing animation action for the passed clip. + * + * @param {AnimationClip|string} clip - An animation clip or alternatively the name of the animation clip. + * @param {Object3D} [optionalRoot] - An alternative root object. + * @return {?AnimationAction} The animation action. Returns `null` if no action was found. + */ + existingAction(clip: AnimationClip | string, optionalRoot?: Object3D): AnimationAction | null; + /** + * Deactivates all previously scheduled actions on this mixer. + * + * @return {AnimationMixer} A reference to this animation mixer. + */ + stopAllAction(): AnimationMixer; + /** + * Advances the global mixer time and updates the animation. + * + * This is usually done in the render loop by passing the delta + * time from {@link Clock} or {@link Timer}. + * + * @param {number} deltaTime - The delta time in seconds. + * @return {AnimationMixer} A reference to this animation mixer. + */ + update(deltaTime: number): AnimationMixer; + /** + * Sets the global mixer to a specific time and updates the animation accordingly. + * + * This is useful when you need to jump to an exact time in an animation. The + * input parameter will be scaled by {@link AnimationMixer#timeScale} + * + * @param {number} time - The time to set in seconds. + * @return {AnimationMixer} A reference to this animation mixer. + */ + setTime(time: number): AnimationMixer; + /** + * Returns this mixer's root object. + * + * @return {Object3D} The mixer's root object. + */ + getRoot(): Object3D; + /** + * Deallocates all memory resources for a clip. Before using this method make + * sure to call {@link AnimationAction#stop} for all related actions. + * + * @param {AnimationClip} clip - The clip to uncache. + */ + uncacheClip(clip: AnimationClip): void; + /** + * Deallocates all memory resources for a root object. Before using this + * method make sure to call {@link AnimationAction#stop} for all related + * actions or alternatively {@link AnimationMixer#stopAllAction} when the + * mixer operates on a single root. + * + * @param {Object3D} root - The root object to uncache. + */ + uncacheRoot(root: Object3D): void; + /** + * Deallocates all memory resources for an action. The action is identified by the + * given clip and an optional root object. Before using this method make + * sure to call {@link AnimationAction#stop} to deactivate the action. + * + * @param {AnimationClip|string} clip - An animation clip or alternatively the name of the animation clip. + * @param {Object3D} [optionalRoot] - An alternative root object. + */ + uncacheAction(clip: AnimationClip | string, optionalRoot?: Object3D): void; +} +import { EventDispatcher } from '../core/EventDispatcher.js'; +import { AnimationClip } from './AnimationClip.js'; +import { AnimationAction } from './AnimationAction.js'; diff --git a/jsdoc-testing/jsdoc/src/animation/AnimationObjectGroup.d.ts b/jsdoc-testing/jsdoc/src/animation/AnimationObjectGroup.d.ts new file mode 100644 index 000000000..040c4af5c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/animation/AnimationObjectGroup.d.ts @@ -0,0 +1,77 @@ +/** + * A group of objects that receives a shared animation state. + * + * Usage: + * + * - Add objects you would otherwise pass as 'root' to the + * constructor or the .clipAction method of AnimationMixer. + * - Instead pass this object as 'root'. + * - You can also add and remove objects later when the mixer is running. + * + * Note: + * + * - Objects of this class appear as one object to the mixer, + * so cache control of the individual objects must be done on the group. + * + * Limitation: + * + * - The animated properties must be compatible among the all objects in the group. + * - A single property can either be controlled through a target group or directly, but not both. + */ +export class AnimationObjectGroup { + /** + * Constructs a new animation group. + * + * @param {...Object3D} arguments - An arbitrary number of 3D objects that share the same animation state. + */ + constructor(...args: Object3D[]); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isAnimationObjectGroup: boolean; + /** + * The UUID of the 3D object. + * + * @type {string} + * @readonly + */ + readonly uuid: string; + _objects: any[]; + nCachedObjects_: number; + _indicesByUUID: {}; + _paths: any[]; + _parsedPaths: any[]; + _bindings: any[]; + _bindingsIndicesByPath: {}; + stats: { + objects: { + readonly total: number; + readonly inUse: number; + }; + readonly bindingsPerObject: number; + }; + /** + * Adds an arbitrary number of objects to this animation group. + * + * @param {...Object3D} arguments - The 3D objects to add. + */ + add(...args: Object3D[]): void; + /** + * Removes an arbitrary number of objects to this animation group + * + * @param {...Object3D} arguments - The 3D objects to remove. + */ + remove(...args: Object3D[]): void; + /** + * Deallocates all memory resources for the passed 3D objects of this animation group. + * + * @param {...Object3D} arguments - The 3D objects to uncache. + */ + uncache(...args: Object3D[]): void; + subscribe_(path: any, parsedPath: any): any; + unsubscribe_(path: any): void; +} diff --git a/jsdoc-testing/jsdoc/src/animation/AnimationUtils.d.ts b/jsdoc-testing/jsdoc/src/animation/AnimationUtils.d.ts new file mode 100644 index 000000000..7355fe037 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/animation/AnimationUtils.d.ts @@ -0,0 +1,131 @@ +/** + * Converts an array to a specific type. + * + * @param {TypedArray|Array} array - The array to convert. + * @param {TypedArray.constructor} type - The constructor of a typed array that defines the new type. + * @return {TypedArray} The converted array. + */ +export function convertArray(array: TypedArray | any[], type: TypedArray.constructor): TypedArray; +import { isTypedArray } from '../utils.js'; +/** + * Returns an array by which times and values can be sorted. + * + * @param {Array} times - The keyframe time values. + * @return {Array} The array. + */ +export function getKeyframeOrder(times: Array): Array; +/** + * Sorts the given array by the previously computed order via `getKeyframeOrder()`. + * + * @param {Array} values - The values to sort. + * @param {number} stride - The stride. + * @param {Array} order - The sort order. + * @return {Array} The sorted values. + */ +export function sortedArray(values: Array, stride: number, order: Array): Array; +/** + * Used for parsing AOS keyframe formats. + * + * @param {Array} jsonKeys - A list of JSON keyframes. + * @param {Array} times - This array will be filled with keyframe times by this function. + * @param {Array} values - This array will be filled with keyframe values by this function. + * @param {string} valuePropertyName - The name of the property to use. + */ +export function flattenJSON(jsonKeys: Array, times: Array, values: Array, valuePropertyName: string): void; +/** + * Creates a new clip, containing only the segment of the original clip between the given frames. + * + * @param {AnimationClip} sourceClip - The values to sort. + * @param {string} name - The name of the clip. + * @param {number} startFrame - The start frame. + * @param {number} endFrame - The end frame. + * @param {number} [fps=30] - The FPS. + * @return {AnimationClip} The new sub clip. + */ +export function subclip(sourceClip: AnimationClip, name: string, startFrame: number, endFrame: number, fps?: number): AnimationClip; +/** + * Converts the keyframes of the given animation clip to an additive format. + * + * @param {AnimationClip} targetClip - The clip to make additive. + * @param {number} [referenceFrame=0] - The reference frame. + * @param {AnimationClip} [referenceClip=targetClip] - The reference clip. + * @param {number} [fps=30] - The FPS. + * @return {AnimationClip} The updated clip which is now additive. + */ +export function makeClipAdditive(targetClip: AnimationClip, referenceFrame?: number, referenceClip?: AnimationClip, fps?: number): AnimationClip; +/** + * A class with various methods to assist with animations. + * + * @hideconstructor + */ +export class AnimationUtils { + /** + * Converts an array to a specific type + * + * @static + * @param {TypedArray|Array} array - The array to convert. + * @param {TypedArray.constructor} type - The constructor of a type array. + * @return {TypedArray} The converted array + */ + static convertArray(array: TypedArray | any[], type: TypedArray.constructor): TypedArray; + /** + * Returns `true` if the given object is a typed array. + * + * @static + * @param {any} object - The object to check. + * @return {boolean} Whether the given object is a typed array. + */ + static isTypedArray(object: any): boolean; + /** + * Returns an array by which times and values can be sorted. + * + * @static + * @param {Array} times - The keyframe time values. + * @return {Array} The array. + */ + static getKeyframeOrder(times: Array): Array; + /** + * Sorts the given array by the previously computed order via `getKeyframeOrder()`. + * + * @static + * @param {Array} values - The values to sort. + * @param {number} stride - The stride. + * @param {Array} order - The sort order. + * @return {Array} The sorted values. + */ + static sortedArray(values: Array, stride: number, order: Array): Array; + /** + * Used for parsing AOS keyframe formats. + * + * @static + * @param {Array} jsonKeys - A list of JSON keyframes. + * @param {Array} times - This array will be filled with keyframe times by this method. + * @param {Array} values - This array will be filled with keyframe values by this method. + * @param {string} valuePropertyName - The name of the property to use. + */ + static flattenJSON(jsonKeys: Array, times: Array, values: Array, valuePropertyName: string): void; + /** + * Creates a new clip, containing only the segment of the original clip between the given frames. + * + * @static + * @param {AnimationClip} sourceClip - The values to sort. + * @param {string} name - The name of the clip. + * @param {number} startFrame - The start frame. + * @param {number} endFrame - The end frame. + * @param {number} [fps=30] - The FPS. + * @return {AnimationClip} The new sub clip. + */ + static subclip(sourceClip: AnimationClip, name: string, startFrame: number, endFrame: number, fps?: number): AnimationClip; + /** + * Converts the keyframes of the given animation clip to an additive format. + * + * @static + * @param {AnimationClip} targetClip - The clip to make additive. + * @param {number} [referenceFrame=0] - The reference frame. + * @param {AnimationClip} [referenceClip=targetClip] - The reference clip. + * @param {number} [fps=30] - The FPS. + * @return {AnimationClip} The updated clip which is now additive. + */ + static makeClipAdditive(targetClip: AnimationClip, referenceFrame?: number, referenceClip?: AnimationClip, fps?: number): AnimationClip; +} +export { isTypedArray }; diff --git a/jsdoc-testing/jsdoc/src/animation/KeyframeTrack.d.ts b/jsdoc-testing/jsdoc/src/animation/KeyframeTrack.d.ts new file mode 100644 index 000000000..72239e7a2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/animation/KeyframeTrack.d.ts @@ -0,0 +1,178 @@ +/** + * Represents a timed sequence of keyframes, which are composed of lists of + * times and related values, and which are used to animate a specific property + * of an object. + */ +export class KeyframeTrack { + /** + * Converts the keyframe track to JSON. + * + * @static + * @param {KeyframeTrack} track - The keyframe track to serialize. + * @return {Object} The serialized keyframe track as JSON. + */ + static toJSON(track: KeyframeTrack): Object; + /** + * Constructs a new keyframe track. + * + * @param {string} name - The keyframe track's name. + * @param {Array} times - A list of keyframe times. + * @param {Array} values - A list of keyframe values. + * @param {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth|InterpolateBezier)} [interpolation] - The interpolation type. + */ + constructor(name: string, times: Array, values: Array, interpolation?: (number | number | number | number)); + /** + * The track's name can refer to morph targets or bones or + * possibly other values within an animated object. See {@link PropertyBinding#parseTrackName} + * for the forms of strings that can be parsed for property binding. + * + * @type {string} + */ + name: string; + /** + * The keyframe times. + * + * @type {Float32Array} + */ + times: Float32Array; + /** + * The keyframe values. + * + * @type {Float32Array} + */ + values: Float32Array; + /** + * Factory method for creating a new discrete interpolant. + * + * @static + * @param {TypedArray} [result] - The result buffer. + * @return {DiscreteInterpolant} The new interpolant. + */ + InterpolantFactoryMethodDiscrete(result?: TypedArray): DiscreteInterpolant; + /** + * Factory method for creating a new linear interpolant. + * + * @static + * @param {TypedArray} [result] - The result buffer. + * @return {LinearInterpolant} The new interpolant. + */ + InterpolantFactoryMethodLinear(result?: TypedArray): LinearInterpolant; + /** + * Factory method for creating a new smooth interpolant. + * + * @static + * @param {TypedArray} [result] - The result buffer. + * @return {CubicInterpolant} The new interpolant. + */ + InterpolantFactoryMethodSmooth(result?: TypedArray): CubicInterpolant; + /** + * Factory method for creating a new Bezier interpolant. + * + * The Bezier interpolant requires tangent data to be set via the `settings` property + * on the track before creating the interpolant. The settings should contain: + * - `inTangents`: Float32Array with [time, value] pairs per keyframe per component + * - `outTangents`: Float32Array with [time, value] pairs per keyframe per component + * + * @static + * @param {TypedArray} [result] - The result buffer. + * @return {BezierInterpolant} The new interpolant. + */ + InterpolantFactoryMethodBezier(result?: TypedArray): BezierInterpolant; + /** + * Defines the interpolation factor method for this keyframe track. + * + * @param {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth|InterpolateBezier)} interpolation - The interpolation type. + * @return {KeyframeTrack} A reference to this keyframe track. + */ + setInterpolation(interpolation: (number | number | number | number)): KeyframeTrack; + createInterpolant: ((result?: TypedArray) => LinearInterpolant) | ((result?: TypedArray) => CubicInterpolant) | undefined; + /** + * Returns the current interpolation type. + * + * @return {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth|InterpolateBezier)} The interpolation type. + */ + getInterpolation(): (number | number | number | number); + /** + * Returns the value size. + * + * @return {number} The value size. + */ + getValueSize(): number; + /** + * Moves all keyframes either forward or backward in time. + * + * @param {number} timeOffset - The offset to move the time values. + * @return {KeyframeTrack} A reference to this keyframe track. + */ + shift(timeOffset: number): KeyframeTrack; + /** + * Scale all keyframe times by a factor (useful for frame - seconds conversions). + * + * @param {number} timeScale - The time scale. + * @return {KeyframeTrack} A reference to this keyframe track. + */ + scale(timeScale: number): KeyframeTrack; + /** + * Removes keyframes before and after animation without changing any values within the defined time range. + * + * Note: The method does not shift around keys to the start of the track time, because for interpolated + * keys this will change their values + * + * @param {number} startTime - The start time. + * @param {number} endTime - The end time. + * @return {KeyframeTrack} A reference to this keyframe track. + */ + trim(startTime: number, endTime: number): KeyframeTrack; + /** + * Performs minimal validation on the keyframe track. Returns `true` if the values + * are valid. + * + * @return {boolean} Whether the keyframes are valid or not. + */ + validate(): boolean; + /** + * Optimizes this keyframe track by removing equivalent sequential keys (which are + * common in morph target sequences). + * + * @return {KeyframeTrack} A reference to this keyframe track. + */ + optimize(): KeyframeTrack; + /** + * Returns a new keyframe track with copied values from this instance. + * + * @return {KeyframeTrack} A clone of this instance. + */ + clone(): KeyframeTrack; + /** + * The value type name. + * + * @type {string} + * @default '' + */ + ValueTypeName: string; + /** + * The time buffer type of this keyframe track. + * + * @type {TypedArray|Array} + * @default Float32Array.constructor + */ + TimeBufferType: TypedArray | any[]; + /** + * The value buffer type of this keyframe track. + * + * @type {TypedArray|Array} + * @default Float32Array.constructor + */ + ValueBufferType: TypedArray | any[]; + /** + * The default interpolation type of this keyframe track. + * + * @type {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth|InterpolateBezier)} + * @default InterpolateLinear + */ + DefaultInterpolation: (number | number | number | number); +} +import { DiscreteInterpolant } from '../math/interpolants/DiscreteInterpolant.js'; +import { LinearInterpolant } from '../math/interpolants/LinearInterpolant.js'; +import { CubicInterpolant } from '../math/interpolants/CubicInterpolant.js'; +import { BezierInterpolant } from '../math/interpolants/BezierInterpolant.js'; diff --git a/jsdoc-testing/jsdoc/src/animation/PropertyBinding.d.ts b/jsdoc-testing/jsdoc/src/animation/PropertyBinding.d.ts new file mode 100644 index 000000000..af4e99d9d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/animation/PropertyBinding.d.ts @@ -0,0 +1,144 @@ +/** + * This holds a reference to a real property in the scene graph; used internally. + */ +export class PropertyBinding { + /** + * Factory method for creating a property binding from the given parameters. + * + * @static + * @param {Object} root - The root node. + * @param {string} path - The path. + * @param {?Object} [parsedPath] - The parsed path. + * @return {PropertyBinding|Composite} The created property binding or composite. + */ + static create(root: Object, path: string, parsedPath?: Object | null): PropertyBinding | Composite; + /** + * Replaces spaces with underscores and removes unsupported characters from + * node names, to ensure compatibility with parseTrackName(). + * + * @param {string} name - Node name to be sanitized. + * @return {string} The sanitized node name. + */ + static sanitizeNodeName(name: string): string; + /** + * Parses the given track name (an object path to an animated property) and + * returns an object with information about the path. Matches strings in the following forms: + * + * - nodeName.property + * - nodeName.property[accessor] + * - nodeName.material.property[accessor] + * - uuid.property[accessor] + * - uuid.objectName[objectIndex].propertyName[propertyIndex] + * - parentName/nodeName.property + * - parentName/parentName/nodeName.property[index] + * - .bone[Armature.DEF_cog].position + * - scene:helium_balloon_model:helium_balloon_model.position + * + * @static + * @param {string} trackName - The track name to parse. + * @return {Object} The parsed track name as an object. + */ + static parseTrackName(trackName: string): Object; + /** + * Searches for a node in the hierarchy of the given root object by the given + * node name. + * + * @static + * @param {Object} root - The root object. + * @param {string|number} nodeName - The name of the node. + * @return {?Object} The found node. Returns `null` if no object was found. + */ + static findNode(root: Object, nodeName: string | number): Object | null; + /** + * Constructs a new property binding. + * + * @param {Object} rootNode - The root node. + * @param {string} path - The path. + * @param {?Object} [parsedPath] - The parsed path. + */ + constructor(rootNode: Object, path: string, parsedPath?: Object | null); + /** + * The object path to the animated property. + * + * @type {string} + */ + path: string; + /** + * An object holding information about the path. + * + * @type {Object} + */ + parsedPath: Object; + /** + * The object owns the animated property. + * + * @type {?Object} + */ + node: Object | null; + /** + * The root node. + * + * @type {Object3D|Skeleton} + */ + rootNode: Object3D | Skeleton; + getValue: (targetArray: any, offset: any) => void; + setValue: (sourceArray: any, offset: any) => void; + _getValue_unavailable(): void; + _setValue_unavailable(): void; + _getValue_direct(buffer: any, offset: any): void; + _getValue_array(buffer: any, offset: any): void; + _getValue_arrayElement(buffer: any, offset: any): void; + _getValue_toArray(buffer: any, offset: any): void; + _setValue_direct(buffer: any, offset: any): void; + _setValue_direct_setNeedsUpdate(buffer: any, offset: any): void; + _setValue_direct_setMatrixWorldNeedsUpdate(buffer: any, offset: any): void; + _setValue_array(buffer: any, offset: any): void; + _setValue_array_setNeedsUpdate(buffer: any, offset: any): void; + _setValue_array_setMatrixWorldNeedsUpdate(buffer: any, offset: any): void; + _setValue_arrayElement(buffer: any, offset: any): void; + _setValue_arrayElement_setNeedsUpdate(buffer: any, offset: any): void; + _setValue_arrayElement_setMatrixWorldNeedsUpdate(buffer: any, offset: any): void; + _setValue_fromArray(buffer: any, offset: any): void; + _setValue_fromArray_setNeedsUpdate(buffer: any, offset: any): void; + _setValue_fromArray_setMatrixWorldNeedsUpdate(buffer: any, offset: any): void; + _getValue_unbound(targetArray: any, offset: any): void; + _setValue_unbound(sourceArray: any, offset: any): void; + /** + * Creates a getter / setter pair for the property tracked by this binding. + */ + bind(): void; + targetObject: Object | null | undefined; + resolvedProperty: any; + propertyIndex: any; + propertyName: any; + /** + * Unbinds the property. + */ + unbind(): void; + BindingType: { + Direct: number; + EntireArray: number; + ArrayElement: number; + HasFromToArray: number; + }; + Versioning: { + None: number; + NeedsUpdate: number; + MatrixWorldNeedsUpdate: number; + }; + GetterByBindingType: ((buffer: any, offset: any) => void)[]; + SetterByBindingTypeAndVersioning: ((buffer: any, offset: any) => void)[][]; +} +export namespace PropertyBinding { + export { Composite }; +} +declare class Composite { + constructor(targetGroup: any, path: any, optionalParsedPath: any); + _targetGroup: any; + _bindings: any; + getValue(array: any, offset: any): void; + setValue(array: any, offset: any): void; + bind(): void; + unbind(): void; +} +export {}; diff --git a/jsdoc-testing/jsdoc/src/animation/PropertyMixer.d.ts b/jsdoc-testing/jsdoc/src/animation/PropertyMixer.d.ts new file mode 100644 index 000000000..0f715aa7b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/animation/PropertyMixer.d.ts @@ -0,0 +1,95 @@ +/** + * Buffered scene graph property that allows weighted accumulation; used internally. + */ +export class PropertyMixer { + /** + * Constructs a new property mixer. + * + * @param {PropertyBinding} binding - The property binding. + * @param {string} typeName - The keyframe track type name. + * @param {number} valueSize - The keyframe track value size. + */ + constructor(binding: PropertyBinding, typeName: string, valueSize: number); + /** + * The property binding. + * + * @type {PropertyBinding} + */ + binding: PropertyBinding; + /** + * The keyframe track value size. + * + * @type {number} + */ + valueSize: number; + buffer: any[] | Float64Array; + _workIndex: number | undefined; + _mixBufferRegion: (buffer: any, dstOffset: any, srcOffset: any, t: any, stride: any) => void; + _mixBufferRegionAdditive: (buffer: any, dstOffset: any, srcOffset: any, t: any, stride: any) => void; + _setIdentity: () => void; + _origIndex: number; + _addIndex: number; + /** + * Accumulated weight of the property binding. + * + * @type {number} + * @default 0 + */ + cumulativeWeight: number; + /** + * Accumulated additive weight of the property binding. + * + * @type {number} + * @default 0 + */ + cumulativeWeightAdditive: number; + /** + * Number of active keyframe tracks currently using this property binding. + * + * @type {number} + * @default 0 + */ + useCount: number; + /** + * Number of keyframe tracks referencing this property binding. + * + * @type {number} + * @default 0 + */ + referenceCount: number; + /** + * Accumulates data in the `incoming` region into `accu`. + * + * @param {number} accuIndex - The accumulation index. + * @param {number} weight - The weight. + */ + accumulate(accuIndex: number, weight: number): void; + /** + * Accumulates data in the `incoming` region into `add`. + * + * @param {number} weight - The weight. + */ + accumulateAdditive(weight: number): void; + /** + * Applies the state of `accu` to the binding when accus differ. + * + * @param {number} accuIndex - The accumulation index. + */ + apply(accuIndex: number): void; + /** + * Remembers the state of the bound property and copy it to both accus. + */ + saveOriginalState(): void; + /** + * Applies the state previously taken via {@link PropertyMixer#saveOriginalState} to the binding. + */ + restoreOriginalState(): void; + _setAdditiveIdentityNumeric(): void; + _setAdditiveIdentityQuaternion(): void; + _setAdditiveIdentityOther(): void; + _select(buffer: any, dstOffset: any, srcOffset: any, t: any, stride: any): void; + _slerp(buffer: any, dstOffset: any, srcOffset: any, t: any): void; + _slerpAdditive(buffer: any, dstOffset: any, srcOffset: any, t: any, stride: any): void; + _lerp(buffer: any, dstOffset: any, srcOffset: any, t: any, stride: any): void; + _lerpAdditive(buffer: any, dstOffset: any, srcOffset: any, t: any, stride: any): void; +} diff --git a/jsdoc-testing/jsdoc/src/animation/tracks/BooleanKeyframeTrack.d.ts b/jsdoc-testing/jsdoc/src/animation/tracks/BooleanKeyframeTrack.d.ts new file mode 100644 index 000000000..d8e3cfd7f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/animation/tracks/BooleanKeyframeTrack.d.ts @@ -0,0 +1,28 @@ +/** + * A track for boolean keyframe values. + * + * @augments KeyframeTrack + */ +export class BooleanKeyframeTrack extends KeyframeTrack { + /** + * Constructs a new boolean keyframe track. + * + * This keyframe track type has no `interpolation` parameter because the + * interpolation is always discrete. + * + * @param {string} name - The keyframe track's name. + * @param {Array} times - A list of keyframe times. + * @param {Array} values - A list of keyframe values. + */ + constructor(name: string, times: Array, values: Array); + /** + * The default interpolation type of this keyframe track. + * + * @type {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth)} + * @default InterpolateDiscrete + */ + DefaultInterpolation: (InterpolateLinear | number | InterpolateSmooth); + InterpolantFactoryMethodLinear: any; + InterpolantFactoryMethodSmooth: any; +} +import { KeyframeTrack } from '../KeyframeTrack.js'; diff --git a/jsdoc-testing/jsdoc/src/animation/tracks/ColorKeyframeTrack.d.ts b/jsdoc-testing/jsdoc/src/animation/tracks/ColorKeyframeTrack.d.ts new file mode 100644 index 000000000..aa0f64d74 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/animation/tracks/ColorKeyframeTrack.d.ts @@ -0,0 +1,17 @@ +/** + * A track for color keyframe values. + * + * @augments KeyframeTrack + */ +export class ColorKeyframeTrack extends KeyframeTrack { + /** + * Constructs a new color keyframe track. + * + * @param {string} name - The keyframe track's name. + * @param {Array} times - A list of keyframe times. + * @param {Array} values - A list of keyframe values. + * @param {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth)} [interpolation] - The interpolation type. + */ + constructor(name: string, times: Array, values: Array, interpolation?: (InterpolateLinear | InterpolateDiscrete | InterpolateSmooth)); +} +import { KeyframeTrack } from '../KeyframeTrack.js'; diff --git a/jsdoc-testing/jsdoc/src/animation/tracks/NumberKeyframeTrack.d.ts b/jsdoc-testing/jsdoc/src/animation/tracks/NumberKeyframeTrack.d.ts new file mode 100644 index 000000000..f83c955ca --- /dev/null +++ b/jsdoc-testing/jsdoc/src/animation/tracks/NumberKeyframeTrack.d.ts @@ -0,0 +1,17 @@ +/** + * A track for numeric keyframe values. + * + * @augments KeyframeTrack + */ +export class NumberKeyframeTrack extends KeyframeTrack { + /** + * Constructs a new number keyframe track. + * + * @param {string} name - The keyframe track's name. + * @param {Array} times - A list of keyframe times. + * @param {Array} values - A list of keyframe values. + * @param {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth)} [interpolation] - The interpolation type. + */ + constructor(name: string, times: Array, values: Array, interpolation?: (InterpolateLinear | InterpolateDiscrete | InterpolateSmooth)); +} +import { KeyframeTrack } from '../KeyframeTrack.js'; diff --git a/jsdoc-testing/jsdoc/src/animation/tracks/QuaternionKeyframeTrack.d.ts b/jsdoc-testing/jsdoc/src/animation/tracks/QuaternionKeyframeTrack.d.ts new file mode 100644 index 000000000..98e4a75e2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/animation/tracks/QuaternionKeyframeTrack.d.ts @@ -0,0 +1,18 @@ +/** + * A track for Quaternion keyframe values. + * + * @augments KeyframeTrack + */ +export class QuaternionKeyframeTrack extends KeyframeTrack { + /** + * Constructs a new Quaternion keyframe track. + * + * @param {string} name - The keyframe track's name. + * @param {Array} times - A list of keyframe times. + * @param {Array} values - A list of keyframe values. + * @param {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth)} [interpolation] - The interpolation type. + */ + constructor(name: string, times: Array, values: Array, interpolation?: (InterpolateLinear | InterpolateDiscrete | InterpolateSmooth)); + InterpolantFactoryMethodSmooth: any; +} +import { KeyframeTrack } from '../KeyframeTrack.js'; diff --git a/jsdoc-testing/jsdoc/src/animation/tracks/StringKeyframeTrack.d.ts b/jsdoc-testing/jsdoc/src/animation/tracks/StringKeyframeTrack.d.ts new file mode 100644 index 000000000..95c5bd155 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/animation/tracks/StringKeyframeTrack.d.ts @@ -0,0 +1,28 @@ +/** + * A track for string keyframe values. + * + * @augments KeyframeTrack + */ +export class StringKeyframeTrack extends KeyframeTrack { + /** + * Constructs a new string keyframe track. + * + * This keyframe track type has no `interpolation` parameter because the + * interpolation is always discrete. + * + * @param {string} name - The keyframe track's name. + * @param {Array} times - A list of keyframe times. + * @param {Array} values - A list of keyframe values. + */ + constructor(name: string, times: Array, values: Array); + /** + * The default interpolation type of this keyframe track. + * + * @type {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth)} + * @default InterpolateDiscrete + */ + DefaultInterpolation: (InterpolateLinear | number | InterpolateSmooth); + InterpolantFactoryMethodLinear: any; + InterpolantFactoryMethodSmooth: any; +} +import { KeyframeTrack } from '../KeyframeTrack.js'; diff --git a/jsdoc-testing/jsdoc/src/animation/tracks/VectorKeyframeTrack.d.ts b/jsdoc-testing/jsdoc/src/animation/tracks/VectorKeyframeTrack.d.ts new file mode 100644 index 000000000..856db2d58 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/animation/tracks/VectorKeyframeTrack.d.ts @@ -0,0 +1,17 @@ +/** + * A track for vector keyframe values. + * + * @augments KeyframeTrack + */ +export class VectorKeyframeTrack extends KeyframeTrack { + /** + * Constructs a new vector keyframe track. + * + * @param {string} name - The keyframe track's name. + * @param {Array} times - A list of keyframe times. + * @param {Array} values - A list of keyframe values. + * @param {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth)} [interpolation] - The interpolation type. + */ + constructor(name: string, times: Array, values: Array, interpolation?: (InterpolateLinear | InterpolateDiscrete | InterpolateSmooth)); +} +import { KeyframeTrack } from '../KeyframeTrack.js'; diff --git a/jsdoc-testing/jsdoc/src/audio/Audio.d.ts b/jsdoc-testing/jsdoc/src/audio/Audio.d.ts new file mode 100644 index 000000000..755622769 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/audio/Audio.d.ts @@ -0,0 +1,379 @@ +/** + * Represents a non-positional ( global ) audio object. + * + * This and related audio modules make use of the [Web Audio API](https://www.w3.org/TR/webaudio-1.1/). + * + * ```js + * // create an AudioListener and add it to the camera + * const listener = new THREE.AudioListener(); + * camera.add( listener ); + * + * // create a global audio source + * const sound = new THREE.Audio( listener ); + * + * // load a sound and set it as the Audio object's buffer + * const audioLoader = new THREE.AudioLoader(); + * audioLoader.load( 'sounds/ambient.ogg', function( buffer ) { + * sound.setBuffer( buffer ); + * sound.setLoop( true ); + * sound.setVolume( 0.5 ); + * sound.play(); + * }); + * ``` + * + * @augments Object3D + */ +export class Audio extends Object3D { + /** + * Constructs a new audio. + * + * @param {AudioListener} listener - The global audio listener. + */ + constructor(listener: AudioListener); + type: string; + /** + * The global audio listener. + * + * @type {AudioListener} + * @readonly + */ + readonly listener: AudioListener; + /** + * The audio context. + * + * @type {AudioContext} + * @readonly + */ + readonly context: AudioContext; + /** + * The gain node used for volume control. + * + * @type {GainNode} + * @readonly + */ + readonly gain: GainNode; + /** + * Whether to start playback automatically or not. + * + * @type {boolean} + * @default false + */ + autoplay: boolean; + /** + * A reference to an audio buffer. + * + * Defined via {@link Audio#setBuffer}. + * + * @type {?AudioBuffer} + * @default null + * @readonly + */ + readonly buffer: AudioBuffer | null; + /** + * Modify pitch, measured in cents. +/- 100 is a semitone. + * +/- 1200 is an octave. + * + * Defined via {@link Audio#setDetune}. + * + * @type {number} + * @default 0 + * @readonly + */ + readonly detune: number; + /** + * Whether the audio should loop or not. + * + * Defined via {@link Audio#setLoop}. + * + * @type {boolean} + * @default false + * @readonly + */ + readonly loop: boolean; + /** + * Defines where in the audio buffer the replay should + * start, in seconds. + * + * @type {number} + * @default 0 + */ + loopStart: number; + /** + * Defines where in the audio buffer the replay should + * stop, in seconds. + * + * @type {number} + * @default 0 + */ + loopEnd: number; + /** + * An offset to the time within the audio buffer the playback + * should begin, in seconds. + * + * @type {number} + * @default 0 + */ + offset: number; + /** + * Overrides the default duration of the audio. + * + * @type {undefined|number} + * @default undefined + */ + duration: undefined | number; + /** + * The playback speed. + * + * Defined via {@link Audio#setPlaybackRate}. + * + * @type {number} + * @readonly + * @default 1 + */ + readonly playbackRate: number; + /** + * Indicates whether the audio is playing or not. + * + * This flag will be automatically set when using {@link Audio#play}, + * {@link Audio#pause}, {@link Audio#stop}. + * + * @type {boolean} + * @readonly + * @default false + */ + readonly isPlaying: boolean; + /** + * Indicates whether the audio playback can be controlled + * with method like {@link Audio#play} or {@link Audio#pause}. + * + * This flag will be automatically set when audio sources are + * defined. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly hasPlaybackControl: boolean; + /** + * Holds a reference to the current audio source. + * + * The property is automatically by one of the `set*()` methods. + * + * @type {?AudioNode} + * @readonly + * @default null + */ + readonly source: AudioNode | null; + /** + * Defines the source type. + * + * The property is automatically set by one of the `set*()` methods. + * + * @type {('empty'|'audioNode'|'mediaNode'|'mediaStreamNode'|'buffer')} + * @readonly + * @default 'empty' + */ + readonly sourceType: ("empty" | "audioNode" | "mediaNode" | "mediaStreamNode" | "buffer"); + _startedAt: number; + _progress: number; + _connected: boolean; + /** + * Can be used to apply a variety of low-order filters to create + * more complex sound effects e.g. via `BiquadFilterNode`. + * + * The property is automatically set by {@link Audio#setFilters}. + * + * @type {Array} + * @readonly + */ + readonly filters: Array; + /** + * Returns the output audio node. + * + * @return {GainNode} The output node. + */ + getOutput(): GainNode; + /** + * Sets the given audio node as the source of this instance. + * + * {@link Audio#sourceType} is set to `audioNode` and {@link Audio#hasPlaybackControl} to `false`. + * + * @param {AudioNode} audioNode - The audio node like an instance of `OscillatorNode`. + * @return {Audio} A reference to this instance. + */ + setNodeSource(audioNode: AudioNode): Audio; + /** + * Sets the given media element as the source of this instance. + * + * {@link Audio#sourceType} is set to `mediaNode` and {@link Audio#hasPlaybackControl} to `false`. + * + * @param {HTMLMediaElement} mediaElement - The media element. + * @return {Audio} A reference to this instance. + */ + setMediaElementSource(mediaElement: HTMLMediaElement): Audio; + /** + * Sets the given media stream as the source of this instance. + * + * {@link Audio#sourceType} is set to `mediaStreamNode` and {@link Audio#hasPlaybackControl} to `false`. + * + * @param {MediaStream} mediaStream - The media stream. + * @return {Audio} A reference to this instance. + */ + setMediaStreamSource(mediaStream: MediaStream): Audio; + /** + * Sets the given audio buffer as the source of this instance. + * + * {@link Audio#sourceType} is set to `buffer` and {@link Audio#hasPlaybackControl} to `true`. + * + * @param {AudioBuffer} audioBuffer - The audio buffer. + * @return {Audio} A reference to this instance. + */ + setBuffer(audioBuffer: AudioBuffer): Audio; + /** + * Starts the playback of the audio. + * + * Can only be used with compatible audio sources that allow playback control. + * + * @param {number} [delay=0] - The delay, in seconds, at which the audio should start playing. + * @return {Audio|undefined} A reference to this instance. + */ + play(delay?: number): Audio | undefined; + /** + * Pauses the playback of the audio. + * + * Can only be used with compatible audio sources that allow playback control. + * + * @return {Audio|undefined} A reference to this instance. + */ + pause(): Audio | undefined; + /** + * Stops the playback of the audio. + * + * Can only be used with compatible audio sources that allow playback control. + * + * @param {number} [delay=0] - The delay, in seconds, at which the audio should stop playing. + * @return {Audio|undefined} A reference to this instance. + */ + stop(delay?: number): Audio | undefined; + /** + * Connects to the audio source. This is used internally on + * initialisation and when setting / removing filters. + * + * @return {Audio} A reference to this instance. + */ + connect(): Audio; + /** + * Disconnects to the audio source. This is used internally on + * initialisation and when setting / removing filters. + * + * @return {Audio|undefined} A reference to this instance. + */ + disconnect(): Audio | undefined; + /** + * Returns the current set filters. + * + * @return {Array} The list of filters. + */ + getFilters(): Array; + /** + * Sets an array of filters and connects them with the audio source. + * + * @param {Array} [value] - A list of filters. + * @return {Audio} A reference to this instance. + */ + setFilters(value?: Array): Audio; + /** + * Defines the detuning of oscillation in cents. + * + * @param {number} value - The detuning of oscillation in cents. + * @return {Audio} A reference to this instance. + */ + setDetune(value: number): Audio; + /** + * Returns the detuning of oscillation in cents. + * + * @return {number} The detuning of oscillation in cents. + */ + getDetune(): number; + /** + * Returns the first filter in the list of filters. + * + * @return {AudioNode|undefined} The first filter in the list of filters. + */ + getFilter(): AudioNode | undefined; + /** + * Applies a single filter node to the audio. + * + * @param {AudioNode} [filter] - The filter to set. + * @return {Audio} A reference to this instance. + */ + setFilter(filter?: AudioNode): Audio; + /** + * Sets the playback rate. + * + * Can only be used with compatible audio sources that allow playback control. + * + * @param {number} [value] - The playback rate to set. + * @return {Audio|undefined} A reference to this instance. + */ + setPlaybackRate(value?: number): Audio | undefined; + /** + * Returns the current playback rate. + + * @return {number} The playback rate. + */ + getPlaybackRate(): number; + /** + * Automatically called when playback finished. + */ + onEnded(): void; + /** + * Returns the loop flag. + * + * Can only be used with compatible audio sources that allow playback control. + * + * @return {boolean} Whether the audio should loop or not. + */ + getLoop(): boolean; + /** + * Sets the loop flag. + * + * Can only be used with compatible audio sources that allow playback control. + * + * @param {boolean} value - Whether the audio should loop or not. + * @return {Audio|undefined} A reference to this instance. + */ + setLoop(value: boolean): Audio | undefined; + /** + * Sets the loop start value which defines where in the audio buffer the replay should + * start, in seconds. + * + * @param {number} value - The loop start value. + * @return {Audio} A reference to this instance. + */ + setLoopStart(value: number): Audio; + /** + * Sets the loop end value which defines where in the audio buffer the replay should + * stop, in seconds. + * + * @param {number} value - The loop end value. + * @return {Audio} A reference to this instance. + */ + setLoopEnd(value: number): Audio; + /** + * Returns the volume. + * + * @return {number} The volume. + */ + getVolume(): number; + /** + * Sets the volume. + * + * @param {number} value - The volume to set. + * @return {Audio} A reference to this instance. + */ + setVolume(value: number): Audio; + copy(source: any, recursive: any): this; + clone(recursive: any): any; +} +import { Object3D } from '../core/Object3D.js'; diff --git a/jsdoc-testing/jsdoc/src/audio/AudioAnalyser.d.ts b/jsdoc-testing/jsdoc/src/audio/AudioAnalyser.d.ts new file mode 100644 index 000000000..241498397 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/audio/AudioAnalyser.d.ts @@ -0,0 +1,65 @@ +/** + * This class can be used to analyse audio data. + * + * ```js + * // create an AudioListener and add it to the camera + * const listener = new THREE.AudioListener(); + * camera.add( listener ); + * + * // create an Audio source + * const sound = new THREE.Audio( listener ); + * + * // load a sound and set it as the Audio object's buffer + * const audioLoader = new THREE.AudioLoader(); + * audioLoader.load( 'sounds/ambient.ogg', function( buffer ) { + * sound.setBuffer( buffer ); + * sound.setLoop(true); + * sound.setVolume(0.5); + * sound.play(); + * }); + * + * // create an AudioAnalyser, passing in the sound and desired fftSize + * const analyser = new THREE.AudioAnalyser( sound, 32 ); + * + * // get the average frequency of the sound + * const data = analyser.getAverageFrequency(); + * ``` + */ +export class AudioAnalyser { + /** + * Constructs a new audio analyzer. + * + * @param {Audio} audio - The audio to analyze. + * @param {number} [fftSize=2048] - The window size in samples that is used when performing a Fast Fourier Transform (FFT) to get frequency domain data. + */ + constructor(audio: new (src?: string) => HTMLAudioElement, fftSize?: number); + /** + * The global audio listener. + * + * @type {AnalyserNode} + */ + analyser: AnalyserNode; + /** + * Holds the analyzed data. + * + * @type {Uint8Array} + */ + data: Uint8Array; + /** + * Returns an array with frequency data of the audio. + * + * Each item in the array represents the decibel value for a specific frequency. + * The frequencies are spread linearly from 0 to 1/2 of the sample rate. + * For example, for 48000 sample rate, the last item of the array will represent + * the decibel value for 24000 Hz. + * + * @return {Uint8Array} The frequency data. + */ + getFrequencyData(): Uint8Array; + /** + * Returns the average of the frequencies returned by {@link AudioAnalyser#getFrequencyData}. + * + * @return {number} The average frequency. + */ + getAverageFrequency(): number; +} diff --git a/jsdoc-testing/jsdoc/src/audio/AudioContext.d.ts b/jsdoc-testing/jsdoc/src/audio/AudioContext.d.ts new file mode 100644 index 000000000..3a4632519 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/audio/AudioContext.d.ts @@ -0,0 +1,19 @@ +/** + * Manages the global audio context in the engine. + * + * @hideconstructor + */ +export class AudioContext { + /** + * Returns the global native audio context. + * + * @return {Window.AudioContext} The native audio context. + */ + static getContext(): Window.AudioContext; + /** + * Allows to set the global native audio context from outside. + * + * @param {Window.AudioContext} value - The native context to set. + */ + static setContext(value: Window.AudioContext): void; +} diff --git a/jsdoc-testing/jsdoc/src/audio/AudioListener.d.ts b/jsdoc-testing/jsdoc/src/audio/AudioListener.d.ts new file mode 100644 index 000000000..c668dd516 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/audio/AudioListener.d.ts @@ -0,0 +1,91 @@ +/** + * The class represents a virtual listener of the all positional and non-positional audio effects + * in the scene. A three.js application usually creates a single listener. It is a mandatory + * constructor parameter for audios entities like {@link Audio} and {@link PositionalAudio}. + * + * In most cases, the listener object is a child of the camera. So the 3D transformation of the + * camera represents the 3D transformation of the listener. + * + * @augments Object3D + */ +export class AudioListener extends Object3D { + type: string; + /** + * The native audio context. + * + * @type {AudioContext} + * @readonly + */ + readonly context: AudioContext; + /** + * The gain node used for volume control. + * + * @type {GainNode} + * @readonly + */ + readonly gain: GainNode; + /** + * An optional filter. + * + * Defined via {@link AudioListener#setFilter}. + * + * @type {?AudioNode} + * @default null + * @readonly + */ + readonly filter: AudioNode | null; + /** + * Time delta values required for `linearRampToValueAtTime()` usage. + * + * @type {number} + * @default 0 + * @readonly + */ + readonly timeDelta: number; + _timer: Timer; + /** + * Returns the listener's input node. + * + * This method is used by other audio nodes to connect to this listener. + * + * @return {GainNode} The input node. + */ + getInput(): GainNode; + /** + * Removes the current filter from this listener. + * + * @return {AudioListener} A reference to this listener. + */ + removeFilter(): AudioListener; + /** + * Returns the current set filter. + * + * @return {?AudioNode} The filter. + */ + getFilter(): AudioNode | null; + /** + * Sets the given filter to this listener. + * + * @param {AudioNode} value - The filter to set. + * @return {AudioListener} A reference to this listener. + */ + setFilter(value: AudioNode): AudioListener; + /** + * Returns the applications master volume. + * + * @return {number} The master volume. + */ + getMasterVolume(): number; + /** + * Sets the applications master volume. This volume setting affects + * all audio nodes in the scene. + * + * @param {number} value - The master volume to set. + * @return {AudioListener} A reference to this listener. + */ + setMasterVolume(value: number): AudioListener; + updateMatrixWorld(force: any): void; +} +import { Object3D } from '../core/Object3D.js'; +import { AudioContext } from './AudioContext.js'; +import { Timer } from '../core/Timer.js'; diff --git a/jsdoc-testing/jsdoc/src/audio/PositionalAudio.d.ts b/jsdoc-testing/jsdoc/src/audio/PositionalAudio.d.ts new file mode 100644 index 000000000..03307384c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/audio/PositionalAudio.d.ts @@ -0,0 +1,115 @@ +/** + * Represents a positional audio object. + * + * ```js + * // create an AudioListener and add it to the camera + * const listener = new THREE.AudioListener(); + * camera.add( listener ); + * + * // create the PositionalAudio object (passing in the listener) + * const sound = new THREE.PositionalAudio( listener ); + * + * // load a sound and set it as the PositionalAudio object's buffer + * const audioLoader = new THREE.AudioLoader(); + * audioLoader.load( 'sounds/song.ogg', function( buffer ) { + * sound.setBuffer( buffer ); + * sound.setRefDistance( 20 ); + * sound.play(); + * }); + * + * // create an object for the sound to play from + * const sphere = new THREE.SphereGeometry( 20, 32, 16 ); + * const material = new THREE.MeshPhongMaterial( { color: 0xff2200 } ); + * const mesh = new THREE.Mesh( sphere, material ); + * scene.add( mesh ); + * + * // finally add the sound to the mesh + * mesh.add( sound ); + * + * @augments Audio + */ +export class PositionalAudio extends Audio { + /** + * The panner node represents the location, direction, and behavior of an audio + * source in 3D space. + * + * @type {PannerNode} + * @readonly + */ + readonly panner: PannerNode; + connect(): this; + disconnect(): this; + getOutput(): PannerNode; + /** + * Returns the current reference distance. + * + * @return {number} The reference distance. + */ + getRefDistance(): number; + /** + * Defines the reference distance for reducing volume as the audio source moves + * further from the listener – i.e. the distance at which the volume reduction + * starts taking effect. + * + * @param {number} value - The reference distance to set. + * @return {PositionalAudio} A reference to this instance. + */ + setRefDistance(value: number): PositionalAudio; + /** + * Returns the current rolloff factor. + * + * @return {number} The rolloff factor. + */ + getRolloffFactor(): number; + /** + * Defines how quickly the volume is reduced as the source moves away from the listener. + * + * @param {number} value - The rolloff factor. + * @return {PositionalAudio} A reference to this instance. + */ + setRolloffFactor(value: number): PositionalAudio; + /** + * Returns the current distance model. + * + * @return {('linear'|'inverse'|'exponential')} The distance model. + */ + getDistanceModel(): ("linear" | "inverse" | "exponential"); + /** + * Defines which algorithm to use to reduce the volume of the audio source + * as it moves away from the listener. + * + * Read [the spec](https://www.w3.org/TR/webaudio-1.1/#enumdef-distancemodeltype) + * for more details. + * + * @param {('linear'|'inverse'|'exponential')} value - The distance model to set. + * @return {PositionalAudio} A reference to this instance. + */ + setDistanceModel(value: ("linear" | "inverse" | "exponential")): PositionalAudio; + /** + * Returns the current max distance. + * + * @return {number} The max distance. + */ + getMaxDistance(): number; + /** + * Defines the maximum distance between the audio source and the listener, + * after which the volume is not reduced any further. + * + * This value is used only by the `linear` distance model. + * + * @param {number} value - The max distance. + * @return {PositionalAudio} A reference to this instance. + */ + setMaxDistance(value: number): PositionalAudio; + /** + * Sets the directional cone in which the audio can be listened. + * + * @param {number} coneInnerAngle - An angle, in degrees, of a cone inside of which there will be no volume reduction. + * @param {number} coneOuterAngle - An angle, in degrees, of a cone outside of which the volume will be reduced by a constant value, defined by the `coneOuterGain` parameter. + * @param {number} coneOuterGain - The amount of volume reduction outside the cone defined by the `coneOuterAngle`. When set to `0`, no sound can be heard. + * @return {PositionalAudio} A reference to this instance. + */ + setDirectionalCone(coneInnerAngle: number, coneOuterAngle: number, coneOuterGain: number): PositionalAudio; + updateMatrixWorld(force: any): void; +} +import { Audio } from './Audio.js'; diff --git a/jsdoc-testing/jsdoc/src/cameras/ArrayCamera.d.ts b/jsdoc-testing/jsdoc/src/cameras/ArrayCamera.d.ts new file mode 100644 index 000000000..d1dd98d30 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/cameras/ArrayCamera.d.ts @@ -0,0 +1,42 @@ +/** + * This type of camera can be used in order to efficiently render a scene with a + * predefined set of cameras. This is an important performance aspect for + * rendering VR scenes. + * + * An instance of `ArrayCamera` always has an array of sub cameras. It's mandatory + * to define for each sub camera the `viewport` property which determines the + * part of the viewport that is rendered with this camera. + * + * @augments PerspectiveCamera + */ +export class ArrayCamera extends PerspectiveCamera { + /** + * Constructs a new array camera. + * + * @param {Array} [array=[]] - An array of perspective sub cameras. + */ + constructor(array?: Array); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isArrayCamera: boolean; + /** + * Whether this camera is used with multiview rendering or not. + * + * @type {boolean} + * @readonly + * @default false + */ + readonly isMultiViewCamera: boolean; + /** + * An array of perspective sub cameras. + * + * @type {Array} + */ + cameras: Array; +} +import { PerspectiveCamera } from './PerspectiveCamera.js'; diff --git a/jsdoc-testing/jsdoc/src/cameras/Camera.d.ts b/jsdoc-testing/jsdoc/src/cameras/Camera.d.ts new file mode 100644 index 000000000..b24b6e34a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/cameras/Camera.d.ts @@ -0,0 +1,56 @@ +/** + * Abstract base class for cameras. This class should always be inherited + * when you build a new camera. + * + * @abstract + * @augments Object3D + */ +export class Camera extends Object3D { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isCamera: boolean; + type: string; + /** + * The inverse of the camera's world matrix. + * + * @type {Matrix4} + */ + matrixWorldInverse: Matrix4; + /** + * The camera's projection matrix. + * + * @type {Matrix4} + */ + projectionMatrix: Matrix4; + /** + * The inverse of the camera's projection matrix. + * + * @type {Matrix4} + */ + projectionMatrixInverse: Matrix4; + /** + * The coordinate system in which the camera is used. + * + * @type {(WebGLCoordinateSystem|WebGPUCoordinateSystem)} + */ + coordinateSystem: (number | WebGPUCoordinateSystem); + _reversedDepth: boolean; + /** + * The flag that indicates whether the camera uses a reversed depth buffer. + * + * @type {boolean} + * @default false + */ + get reversedDepth(): boolean; + copy(source: any, recursive: any): this; + updateMatrixWorld(force: any): void; + updateWorldMatrix(updateParents: any, updateChildren: any): void; + clone(): any; +} +import { Object3D } from '../core/Object3D.js'; +import { Matrix4 } from '../math/Matrix4.js'; diff --git a/jsdoc-testing/jsdoc/src/cameras/CubeCamera.d.ts b/jsdoc-testing/jsdoc/src/cameras/CubeCamera.d.ts new file mode 100644 index 000000000..28a2ba9c1 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/cameras/CubeCamera.d.ts @@ -0,0 +1,74 @@ +/** + * A special type of camera that is positioned in 3D space to render its surroundings into a + * cube render target. The render target can then be used as an environment map for rendering + * realtime reflections in your scene. + * + * ```js + * // Create cube render target + * const cubeRenderTarget = new THREE.WebGLCubeRenderTarget( 256, { generateMipmaps: true, minFilter: THREE.LinearMipmapLinearFilter } ); + * + * // Create cube camera + * const cubeCamera = new THREE.CubeCamera( 1, 100000, cubeRenderTarget ); + * scene.add( cubeCamera ); + * + * // Create car + * const chromeMaterial = new THREE.MeshLambertMaterial( { color: 0xffffff, envMap: cubeRenderTarget.texture } ); + * const car = new THREE.Mesh( carGeometry, chromeMaterial ); + * scene.add( car ); + * + * // Update the render target cube + * car.visible = false; + * cubeCamera.position.copy( car.position ); + * cubeCamera.update( renderer, scene ); + * + * // Render the scene + * car.visible = true; + * renderer.render( scene, camera ); + * ``` + * + * @augments Object3D + */ +export class CubeCamera extends Object3D { + /** + * Constructs a new cube camera. + * + * @param {number} near - The camera's near plane. + * @param {number} far - The camera's far plane. + * @param {WebGLCubeRenderTarget} renderTarget - The cube render target. + */ + constructor(near: number, far: number, renderTarget: WebGLCubeRenderTarget); + type: string; + /** + * A reference to the cube render target. + * + * @type {WebGLCubeRenderTarget} + */ + renderTarget: WebGLCubeRenderTarget; + /** + * The current active coordinate system. + * + * @type {?(WebGLCoordinateSystem|WebGPUCoordinateSystem)} + * @default null + */ + coordinateSystem: (number | number) | null; + /** + * The current active mipmap level + * + * @type {number} + * @default 0 + */ + activeMipmapLevel: number; + /** + * Must be called when the coordinate system of the cube camera is changed. + */ + updateCoordinateSystem(): void; + /** + * Calling this method will render the given scene with the given renderer + * into the cube render target of the camera. + * + * @param {(Renderer|WebGLRenderer)} renderer - The renderer. + * @param {Scene} scene - The scene to render. + */ + update(renderer: (Renderer | WebGLRenderer), scene: Scene): void; +} +import { Object3D } from '../core/Object3D.js'; diff --git a/jsdoc-testing/jsdoc/src/cameras/OrthographicCamera.d.ts b/jsdoc-testing/jsdoc/src/cameras/OrthographicCamera.d.ts new file mode 100644 index 000000000..b6269a9b1 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/cameras/OrthographicCamera.d.ts @@ -0,0 +1,122 @@ +/** + * Camera that uses [orthographic projection](https://en.wikipedia.org/wiki/Orthographic_projection). + * + * In this projection mode, an object's size in the rendered image stays + * constant regardless of its distance from the camera. This can be useful + * for rendering 2D scenes and UI elements, amongst other things. + * + * ```js + * const camera = new THREE.OrthographicCamera( width / - 2, width / 2, height / 2, height / - 2, 1, 1000 ); + * scene.add( camera ); + * ``` + * + * @augments Camera + */ +export class OrthographicCamera extends Camera { + /** + * Constructs a new orthographic camera. + * + * @param {number} [left=-1] - The left plane of the camera's frustum. + * @param {number} [right=1] - The right plane of the camera's frustum. + * @param {number} [top=1] - The top plane of the camera's frustum. + * @param {number} [bottom=-1] - The bottom plane of the camera's frustum. + * @param {number} [near=0.1] - The camera's near plane. + * @param {number} [far=2000] - The camera's far plane. + */ + constructor(left?: number, right?: number, top?: number, bottom?: number, near?: number, far?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isOrthographicCamera: boolean; + /** + * The zoom factor of the camera. + * + * @type {number} + * @default 1 + */ + zoom: number; + /** + * Represents the frustum window specification. This property should not be edited + * directly but via {@link PerspectiveCamera#setViewOffset} and {@link PerspectiveCamera#clearViewOffset}. + * + * @type {?Object} + * @default null + */ + view: Object | null; + /** + * The left plane of the camera's frustum. + * + * @type {number} + * @default -1 + */ + left: number; + /** + * The right plane of the camera's frustum. + * + * @type {number} + * @default 1 + */ + right: number; + /** + * The top plane of the camera's frustum. + * + * @type {number} + * @default 1 + */ + top: number; + /** + * The bottom plane of the camera's frustum. + * + * @type {number} + * @default -1 + */ + bottom: number; + /** + * The camera's near plane. The valid range is greater than `0` + * and less than the current value of {@link OrthographicCamera#far}. + * + * Note that, unlike for the {@link PerspectiveCamera}, `0` is a + * valid value for an orthographic camera's near plane. + * + * @type {number} + * @default 0.1 + */ + near: number; + /** + * The camera's far plane. Must be greater than the + * current value of {@link OrthographicCamera#near}. + * + * @type {number} + * @default 2000 + */ + far: number; + copy(source: any, recursive: any): this; + /** + * Sets an offset in a larger frustum. This is useful for multi-window or + * multi-monitor/multi-machine setups. + * + * @param {number} fullWidth - The full width of multiview setup. + * @param {number} fullHeight - The full height of multiview setup. + * @param {number} x - The horizontal offset of the subcamera. + * @param {number} y - The vertical offset of the subcamera. + * @param {number} width - The width of subcamera. + * @param {number} height - The height of subcamera. + * @see {@link PerspectiveCamera#setViewOffset} + */ + setViewOffset(fullWidth: number, fullHeight: number, x: number, y: number, width: number, height: number): void; + /** + * Removes the view offset from the projection matrix. + */ + clearViewOffset(): void; + /** + * Updates the camera's projection matrix. Must be called after any change of + * camera properties. + */ + updateProjectionMatrix(): void; + toJSON(meta: any): Object; +} +import { Camera } from './Camera.js'; diff --git a/jsdoc-testing/jsdoc/src/cameras/PerspectiveCamera.d.ts b/jsdoc-testing/jsdoc/src/cameras/PerspectiveCamera.d.ts new file mode 100644 index 000000000..0bf274692 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/cameras/PerspectiveCamera.d.ts @@ -0,0 +1,216 @@ +/** + * Camera that uses [perspective projection](https://en.wikipedia.org/wiki/Perspective_(graphical)). + * + * This projection mode is designed to mimic the way the human eye sees. It + * is the most common projection mode used for rendering a 3D scene. + * + * ```js + * const camera = new THREE.PerspectiveCamera( 45, width / height, 1, 1000 ); + * scene.add( camera ); + * ``` + * + * @augments Camera + */ +export class PerspectiveCamera extends Camera { + /** + * Constructs a new perspective camera. + * + * @param {number} [fov=50] - The vertical field of view. + * @param {number} [aspect=1] - The aspect ratio. + * @param {number} [near=0.1] - The camera's near plane. + * @param {number} [far=2000] - The camera's far plane. + */ + constructor(fov?: number, aspect?: number, near?: number, far?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isPerspectiveCamera: boolean; + /** + * The vertical field of view, from bottom to top of view, + * in degrees. + * + * @type {number} + * @default 50 + */ + fov: number; + /** + * The zoom factor of the camera. + * + * @type {number} + * @default 1 + */ + zoom: number; + /** + * The camera's near plane. The valid range is greater than `0` + * and less than the current value of {@link PerspectiveCamera#far}. + * + * Note that, unlike for the {@link OrthographicCamera}, `0` is not a + * valid value for a perspective camera's near plane. + * + * @type {number} + * @default 0.1 + */ + near: number; + /** + * The camera's far plane. Must be greater than the + * current value of {@link PerspectiveCamera#near}. + * + * @type {number} + * @default 2000 + */ + far: number; + /** + * Object distance used for stereoscopy and depth-of-field effects. This + * parameter does not influence the projection matrix unless a + * {@link StereoCamera} is being used. + * + * @type {number} + * @default 10 + */ + focus: number; + /** + * The aspect ratio, usually the canvas width / canvas height. + * + * @type {number} + * @default 1 + */ + aspect: number; + /** + * Represents the frustum window specification. This property should not be edited + * directly but via {@link PerspectiveCamera#setViewOffset} and {@link PerspectiveCamera#clearViewOffset}. + * + * @type {?Object} + * @default null + */ + view: Object | null; + /** + * Film size used for the larger axis. Default is `35` (millimeters). This + * parameter does not influence the projection matrix unless {@link PerspectiveCamera#filmOffset} + * is set to a nonzero value. + * + * @type {number} + * @default 35 + */ + filmGauge: number; + /** + * Horizontal off-center offset in the same unit as {@link PerspectiveCamera#filmGauge}. + * + * @type {number} + * @default 0 + */ + filmOffset: number; + copy(source: any, recursive: any): this; + /** + * Sets the FOV by focal length in respect to the current {@link PerspectiveCamera#filmGauge}. + * + * The default film gauge is 35, so that the focal length can be specified for + * a 35mm (full frame) camera. + * + * @param {number} focalLength - Values for focal length and film gauge must have the same unit. + */ + setFocalLength(focalLength: number): void; + /** + * Returns the focal length from the current {@link PerspectiveCamera#fov} and + * {@link PerspectiveCamera#filmGauge}. + * + * @return {number} The computed focal length. + */ + getFocalLength(): number; + /** + * Returns the current vertical field of view angle in degrees considering {@link PerspectiveCamera#zoom}. + * + * @return {number} The effective FOV. + */ + getEffectiveFOV(): number; + /** + * Returns the width of the image on the film. If {@link PerspectiveCamera#aspect} is greater than or + * equal to one (landscape format), the result equals {@link PerspectiveCamera#filmGauge}. + * + * @return {number} The film width. + */ + getFilmWidth(): number; + /** + * Returns the height of the image on the film. If {@link PerspectiveCamera#aspect} is greater than or + * equal to one (landscape format), the result equals {@link PerspectiveCamera#filmGauge}. + * + * @return {number} The film width. + */ + getFilmHeight(): number; + /** + * Computes the 2D bounds of the camera's viewable rectangle at a given distance along the viewing direction. + * Sets `minTarget` and `maxTarget` to the coordinates of the lower-left and upper-right corners of the view rectangle. + * + * @param {number} distance - The viewing distance. + * @param {Vector2} minTarget - The lower-left corner of the view rectangle is written into this vector. + * @param {Vector2} maxTarget - The upper-right corner of the view rectangle is written into this vector. + */ + getViewBounds(distance: number, minTarget: Vector2, maxTarget: Vector2): void; + /** + * Computes the width and height of the camera's viewable rectangle at a given distance along the viewing direction. + * + * @param {number} distance - The viewing distance. + * @param {Vector2} target - The target vector that is used to store result where x is width and y is height. + * @returns {Vector2} The view size. + */ + getViewSize(distance: number, target: Vector2): Vector2; + /** + * Sets an offset in a larger frustum. This is useful for multi-window or + * multi-monitor/multi-machine setups. + * + * For example, if you have 3x2 monitors and each monitor is 1920x1080 and + * the monitors are in grid like this + *``` + * +---+---+---+ + * | A | B | C | + * +---+---+---+ + * | D | E | F | + * +---+---+---+ + *``` + * then for each monitor you would call it like this: + *```js + * const w = 1920; + * const h = 1080; + * const fullWidth = w * 3; + * const fullHeight = h * 2; + * + * // --A-- + * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 0, w, h ); + * // --B-- + * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 0, w, h ); + * // --C-- + * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 0, w, h ); + * // --D-- + * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 1, w, h ); + * // --E-- + * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 1, w, h ); + * // --F-- + * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h ); + * ``` + * + * Note there is no reason monitors have to be the same size or in a grid. + * + * @param {number} fullWidth - The full width of multiview setup. + * @param {number} fullHeight - The full height of multiview setup. + * @param {number} x - The horizontal offset of the subcamera. + * @param {number} y - The vertical offset of the subcamera. + * @param {number} width - The width of subcamera. + * @param {number} height - The height of subcamera. + */ + setViewOffset(fullWidth: number, fullHeight: number, x: number, y: number, width: number, height: number): void; + /** + * Removes the view offset from the projection matrix. + */ + clearViewOffset(): void; + /** + * Updates the camera's projection matrix. Must be called after any change of + * camera properties. + */ + updateProjectionMatrix(): void; + toJSON(meta: any): Object; +} +import { Camera } from './Camera.js'; +import { Vector2 } from '../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/cameras/StereoCamera.d.ts b/jsdoc-testing/jsdoc/src/cameras/StereoCamera.d.ts new file mode 100644 index 000000000..929bf5258 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/cameras/StereoCamera.d.ts @@ -0,0 +1,61 @@ +/** + * A special type of camera that uses two perspective cameras with + * stereoscopic projection. Can be used for rendering stereo effects + * like [3D Anaglyph](https://en.wikipedia.org/wiki/Anaglyph_3D) or + * [Parallax Barrier](https://en.wikipedia.org/wiki/parallax_barrier). + */ +export class StereoCamera { + /** + * The type property is used for detecting the object type + * in context of serialization/deserialization. + * + * @type {string} + * @readonly + */ + readonly type: string; + /** + * The aspect. + * + * @type {number} + * @default 1 + */ + aspect: number; + /** + * The eye separation which represents the distance + * between the left and right camera. + * + * @type {number} + * @default 0.064 + */ + eyeSep: number; + /** + * The camera representing the left eye. This is added to layer `1` so objects to be + * rendered by the left camera must also be added to this layer. + * + * @type {PerspectiveCamera} + */ + cameraL: PerspectiveCamera; + /** + * The camera representing the right eye. This is added to layer `2` so objects to be + * rendered by the right camera must also be added to this layer. + * + * @type {PerspectiveCamera} + */ + cameraR: PerspectiveCamera; + _cache: { + focus: null; + fov: null; + aspect: null; + near: null; + far: null; + zoom: null; + eyeSep: null; + }; + /** + * Updates the stereo camera based on the given perspective camera. + * + * @param {PerspectiveCamera} camera - The perspective camera. + */ + update(camera: PerspectiveCamera): void; +} +import { PerspectiveCamera } from './PerspectiveCamera.js'; diff --git a/jsdoc-testing/jsdoc/src/constants.d.ts b/jsdoc-testing/jsdoc/src/constants.d.ts new file mode 100644 index 000000000..91e0cd072 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/constants.d.ts @@ -0,0 +1,1592 @@ +export const REVISION: "185dev"; +/** + * Represents mouse buttons and interaction types in context of controls. + * + * @type {ConstantsMouse} + * @constant + */ +export const MOUSE: ConstantsMouse; +/** + * Represents touch interaction types in context of controls. + * + * @type {ConstantsTouch} + * @constant + */ +export const TOUCH: ConstantsTouch; +/** + * Disables face culling. + * + * @type {number} + * @constant + */ +export const CullFaceNone: number; +/** + * Culls back faces. + * + * @type {number} + * @constant + */ +export const CullFaceBack: number; +/** + * Culls front faces. + * + * @type {number} + * @constant + */ +export const CullFaceFront: number; +/** + * Culls both front and back faces. + * + * @type {number} + * @constant + */ +export const CullFaceFrontBack: number; +/** + * Gives unfiltered shadow maps - fastest, but lowest quality. + * + * @type {number} + * @constant + */ +export const BasicShadowMap: number; +/** + * Filters shadow maps using the Percentage-Closer Filtering (PCF) algorithm. + * + * @type {number} + * @constant + */ +export const PCFShadowMap: number; +/** + * Filters shadow maps using the Percentage-Closer Filtering (PCF) algorithm with + * better soft shadows especially when using low-resolution shadow maps. + * + * @type {number} + * @constant + */ +export const PCFSoftShadowMap: number; +/** + * Filters shadow maps using the Variance Shadow Map (VSM) algorithm. + * When using VSMShadowMap all shadow receivers will also cast shadows. + * + * @type {number} + * @constant + */ +export const VSMShadowMap: number; +/** + * Only front faces are rendered. + * + * @type {number} + * @constant + */ +export const FrontSide: number; +/** + * Only back faces are rendered. + * + * @type {number} + * @constant + */ +export const BackSide: number; +/** + * Both front and back faces are rendered. + * + * @type {number} + * @constant + */ +export const DoubleSide: number; +/** + * No blending is performed which effectively disables + * alpha transparency. + * + * @type {number} + * @constant + */ +export const NoBlending: number; +/** + * The default blending. + * + * @type {number} + * @constant + */ +export const NormalBlending: number; +/** + * Represents additive blending. + * + * @type {number} + * @constant + */ +export const AdditiveBlending: number; +/** + * Represents subtractive blending. + * + * @type {number} + * @constant + */ +export const SubtractiveBlending: number; +/** + * Represents multiply blending. + * + * @type {number} + * @constant + */ +export const MultiplyBlending: number; +/** + * Represents custom blending. + * + * @type {number} + * @constant + */ +export const CustomBlending: number; +/** + * Represents material blending. + * + * @type {number} + * @constant + */ +export const MaterialBlending: number; +/** + * A `source + destination` blending equation. + * + * @type {number} + * @constant + */ +export const AddEquation: number; +/** + * A `source - destination` blending equation. + * + * @type {number} + * @constant + */ +export const SubtractEquation: number; +/** + * A `destination - source` blending equation. + * + * @type {number} + * @constant + */ +export const ReverseSubtractEquation: number; +/** + * A blend equation that uses the minimum of source and destination. + * + * @type {number} + * @constant + */ +export const MinEquation: number; +/** + * A blend equation that uses the maximum of source and destination. + * + * @type {number} + * @constant + */ +export const MaxEquation: number; +/** + * Multiplies all colors by `0`. + * + * @type {number} + * @constant + */ +export const ZeroFactor: number; +/** + * Multiplies all colors by `1`. + * + * @type {number} + * @constant + */ +export const OneFactor: number; +/** + * Multiplies all colors by the source colors. + * + * @type {number} + * @constant + */ +export const SrcColorFactor: number; +/** + * Multiplies all colors by `1` minus each source color. + * + * @type {number} + * @constant + */ +export const OneMinusSrcColorFactor: number; +/** + * Multiplies all colors by the source alpha value. + * + * @type {number} + * @constant + */ +export const SrcAlphaFactor: number; +/** + * Multiplies all colors by 1 minus the source alpha value. + * + * @type {number} + * @constant + */ +export const OneMinusSrcAlphaFactor: number; +/** + * Multiplies all colors by the destination alpha value. + * + * @type {number} + * @constant + */ +export const DstAlphaFactor: number; +/** + * Multiplies all colors by `1` minus the destination alpha value. + * + * @type {number} + * @constant + */ +export const OneMinusDstAlphaFactor: number; +/** + * Multiplies all colors by the destination color. + * + * @type {number} + * @constant + */ +export const DstColorFactor: number; +/** + * Multiplies all colors by `1` minus each destination color. + * + * @type {number} + * @constant + */ +export const OneMinusDstColorFactor: number; +/** + * Multiplies the RGB colors by the smaller of either the source alpha + * value or the value of `1` minus the destination alpha value. The alpha + * value is multiplied by `1`. + * + * @type {number} + * @constant + */ +export const SrcAlphaSaturateFactor: number; +/** + * Multiplies all colors by a constant color. + * + * @type {number} + * @constant + */ +export const ConstantColorFactor: number; +/** + * Multiplies all colors by `1` minus a constant color. + * + * @type {number} + * @constant + */ +export const OneMinusConstantColorFactor: number; +/** + * Multiplies all colors by a constant alpha value. + * + * @type {number} + * @constant + */ +export const ConstantAlphaFactor: number; +/** + * Multiplies all colors by 1 minus a constant alpha value. + * + * @type {number} + * @constant + */ +export const OneMinusConstantAlphaFactor: number; +/** + * Never pass. + * + * @type {number} + * @constant + */ +export const NeverDepth: number; +/** + * Always pass. + * + * @type {number} + * @constant + */ +export const AlwaysDepth: number; +/** + * Pass if the incoming value is less than the depth buffer value. + * + * @type {number} + * @constant + */ +export const LessDepth: number; +/** + * Pass if the incoming value is less than or equal to the depth buffer value. + * + * @type {number} + * @constant + */ +export const LessEqualDepth: number; +/** + * Pass if the incoming value equals the depth buffer value. + * + * @type {number} + * @constant + */ +export const EqualDepth: number; +/** + * Pass if the incoming value is greater than or equal to the depth buffer value. + * + * @type {number} + * @constant + */ +export const GreaterEqualDepth: number; +/** + * Pass if the incoming value is greater than the depth buffer value. + * + * @type {number} + * @constant + */ +export const GreaterDepth: number; +/** + * Pass if the incoming value is not equal to the depth buffer value. + * + * @type {number} + * @constant + */ +export const NotEqualDepth: number; +/** + * Multiplies the environment map color with the surface color. + * + * @type {number} + * @constant + */ +export const MultiplyOperation: number; +/** + * Uses reflectivity to blend between the two colors. + * + * @type {number} + * @constant + */ +export const MixOperation: number; +/** + * Adds the two colors. + * + * @type {number} + * @constant + */ +export const AddOperation: number; +/** + * No tone mapping is applied. + * + * @type {number} + * @constant + */ +export const NoToneMapping: number; +/** + * Linear tone mapping. + * + * @type {number} + * @constant + */ +export const LinearToneMapping: number; +/** + * Reinhard tone mapping. + * + * @type {number} + * @constant + */ +export const ReinhardToneMapping: number; +/** + * Cineon tone mapping. + * + * @type {number} + * @constant + */ +export const CineonToneMapping: number; +/** + * ACES Filmic tone mapping. + * + * @type {number} + * @constant + */ +export const ACESFilmicToneMapping: number; +/** + * Custom tone mapping. + * + * Expects a custom implementation by modifying shader code of the material's fragment shader. + * + * @type {number} + * @constant + */ +export const CustomToneMapping: number; +/** + * AgX tone mapping. + * + * @type {number} + * @constant + */ +export const AgXToneMapping: number; +/** + * Neutral tone mapping. + * + * Implementation based on the Khronos 3D Commerce Group standard tone mapping. + * + * @type {number} + * @constant + */ +export const NeutralToneMapping: number; +/** + * The skinned mesh shares the same world space as the skeleton. + * + * @type {string} + * @constant + */ +export const AttachedBindMode: string; +/** + * The skinned mesh does not share the same world space as the skeleton. + * This is useful when a skeleton is shared across multiple skinned meshes. + * + * @type {string} + * @constant + */ +export const DetachedBindMode: string; +/** + * Maps textures using the geometry's UV coordinates. + * + * @type {number} + * @constant + */ +export const UVMapping: number; +/** + * Reflection mapping for cube textures. + * + * @type {number} + * @constant + */ +export const CubeReflectionMapping: number; +/** + * Refraction mapping for cube textures. + * + * @type {number} + * @constant + */ +export const CubeRefractionMapping: number; +/** + * Reflection mapping for equirectangular textures. + * + * @type {number} + * @constant + */ +export const EquirectangularReflectionMapping: number; +/** + * Refraction mapping for equirectangular textures. + * + * @type {number} + * @constant + */ +export const EquirectangularRefractionMapping: number; +/** + * Reflection mapping for PMREM textures. + * + * @type {number} + * @constant + */ +export const CubeUVReflectionMapping: number; +/** + * The texture will simply repeat to infinity. + * + * @type {number} + * @constant + */ +export const RepeatWrapping: number; +/** + * The last pixel of the texture stretches to the edge of the mesh. + * + * @type {number} + * @constant + */ +export const ClampToEdgeWrapping: number; +/** + * The texture will repeats to infinity, mirroring on each repeat. + * + * @type {number} + * @constant + */ +export const MirroredRepeatWrapping: number; +/** + * Returns the value of the texture element that is nearest (in Manhattan distance) + * to the specified texture coordinates. + * + * @type {number} + * @constant + */ +export const NearestFilter: number; +/** + * Chooses the mipmap that most closely matches the size of the pixel being textured + * and uses the `NearestFilter` criterion (the texel nearest to the center of the pixel) + * to produce a texture value. + * + * @type {number} + * @constant + */ +export const NearestMipmapNearestFilter: number; +export const NearestMipMapNearestFilter: 1004; +/** + * Chooses the two mipmaps that most closely match the size of the pixel being textured and + * uses the `NearestFilter` criterion to produce a texture value from each mipmap. + * The final texture value is a weighted average of those two values. + * + * @type {number} + * @constant + */ +export const NearestMipmapLinearFilter: number; +export const NearestMipMapLinearFilter: 1005; +/** + * Returns the weighted average of the four texture elements that are closest to the specified + * texture coordinates, and can include items wrapped or repeated from other parts of a texture, + * depending on the values of `wrapS` and `wrapT`, and on the exact mapping. + * + * @type {number} + * @constant + */ +export const LinearFilter: number; +/** + * Chooses the mipmap that most closely matches the size of the pixel being textured and uses + * the `LinearFilter` criterion (a weighted average of the four texels that are closest to the + * center of the pixel) to produce a texture value. + * + * @type {number} + * @constant + */ +export const LinearMipmapNearestFilter: number; +export const LinearMipMapNearestFilter: 1007; +/** + * Chooses the two mipmaps that most closely match the size of the pixel being textured and uses + * the `LinearFilter` criterion to produce a texture value from each mipmap. The final texture value + * is a weighted average of those two values. + * + * @type {number} + * @constant + */ +export const LinearMipmapLinearFilter: number; +export const LinearMipMapLinearFilter: 1008; +/** + * An unsigned byte data type for textures. + * + * @type {number} + * @constant + */ +export const UnsignedByteType: number; +/** + * A byte data type for textures. + * + * @type {number} + * @constant + */ +export const ByteType: number; +/** + * A short data type for textures. + * + * @type {number} + * @constant + */ +export const ShortType: number; +/** + * An unsigned short data type for textures. + * + * @type {number} + * @constant + */ +export const UnsignedShortType: number; +/** + * An int data type for textures. + * + * @type {number} + * @constant + */ +export const IntType: number; +/** + * An unsigned int data type for textures. + * + * @type {number} + * @constant + */ +export const UnsignedIntType: number; +/** + * A float data type for textures. + * + * @type {number} + * @constant + */ +export const FloatType: number; +/** + * A half float data type for textures. + * + * @type {number} + * @constant + */ +export const HalfFloatType: number; +/** + * An unsigned short 4_4_4_4 (packed) data type for textures. + * + * @type {number} + * @constant + */ +export const UnsignedShort4444Type: number; +/** + * An unsigned short 5_5_5_1 (packed) data type for textures. + * + * @type {number} + * @constant + */ +export const UnsignedShort5551Type: number; +/** + * An unsigned int 24_8 data type for textures. + * + * @type {number} + * @constant + */ +export const UnsignedInt248Type: number; +/** + * An unsigned int 5_9_9_9 (packed) data type for textures. + * + * @type {number} + * @constant + */ +export const UnsignedInt5999Type: number; +/** + * An unsigned int 10_11_11 (packed) data type for textures. + * + * @type {number} + * @constant + */ +export const UnsignedInt101111Type: number; +/** + * Discards the red, green and blue components and reads just the alpha component. + * + * @type {number} + * @constant + */ +export const AlphaFormat: number; +/** + * Discards the alpha component and reads the red, green and blue component. + * + * @type {number} + * @constant + */ +export const RGBFormat: number; +/** + * Reads the red, green, blue and alpha components. + * + * @type {number} + * @constant + */ +export const RGBAFormat: number; +/** + * Reads each element as a single depth value, converts it to floating point, and clamps to the range `[0,1]`. + * + * @type {number} + * @constant + */ +export const DepthFormat: number; +/** + * Reads each element is a pair of depth and stencil values. The depth component of the pair is interpreted as + * in `DepthFormat`. The stencil component is interpreted based on the depth + stencil internal format. + * + * @type {number} + * @constant + */ +export const DepthStencilFormat: number; +/** + * Discards the green, blue and alpha components and reads just the red component. + * + * @type {number} + * @constant + */ +export const RedFormat: number; +/** + * Discards the green, blue and alpha components and reads just the red component. The texels are read as integers instead of floating point. + * + * @type {number} + * @constant + */ +export const RedIntegerFormat: number; +/** + * Discards the alpha, and blue components and reads the red, and green components. + * + * @type {number} + * @constant + */ +export const RGFormat: number; +/** + * Discards the alpha, and blue components and reads the red, and green components. The texels are read as integers instead of floating point. + * + * @type {number} + * @constant + */ +export const RGIntegerFormat: number; +/** + * Discards the alpha component and reads the red, green and blue component. The texels are read as integers instead of floating point. + * + * @type {number} + * @constant + */ +export const RGBIntegerFormat: number; +/** + * Reads the red, green, blue and alpha components. The texels are read as integers instead of floating point. + * + * @type {number} + * @constant + */ +export const RGBAIntegerFormat: number; +/** + * A DXT1-compressed image in an RGB image format. + * + * @type {number} + * @constant + */ +export const RGB_S3TC_DXT1_Format: number; +/** + * A DXT1-compressed image in an RGB image format with a simple on/off alpha value. + * + * @type {number} + * @constant + */ +export const RGBA_S3TC_DXT1_Format: number; +/** + * A DXT3-compressed image in an RGBA image format. Compared to a 32-bit RGBA texture, it offers 4:1 compression. + * + * @type {number} + * @constant + */ +export const RGBA_S3TC_DXT3_Format: number; +/** + * A DXT5-compressed image in an RGBA image format. It also provides a 4:1 compression, but differs to the DXT3 + * compression in how the alpha compression is done. + * + * @type {number} + * @constant + */ +export const RGBA_S3TC_DXT5_Format: number; +/** + * PVRTC RGB compression in 4-bit mode. One block for each 4×4 pixels. + * + * @type {number} + * @constant + */ +export const RGB_PVRTC_4BPPV1_Format: number; +/** + * PVRTC RGB compression in 2-bit mode. One block for each 8×4 pixels. + * + * @type {number} + * @constant + */ +export const RGB_PVRTC_2BPPV1_Format: number; +/** + * PVRTC RGBA compression in 4-bit mode. One block for each 4×4 pixels. + * + * @type {number} + * @constant + */ +export const RGBA_PVRTC_4BPPV1_Format: number; +/** + * PVRTC RGBA compression in 2-bit mode. One block for each 8×4 pixels. + * + * @type {number} + * @constant + */ +export const RGBA_PVRTC_2BPPV1_Format: number; +/** + * ETC1 RGB format. + * + * @type {number} + * @constant + */ +export const RGB_ETC1_Format: number; +/** + * ETC2 RGB format. + * + * @type {number} + * @constant + */ +export const RGB_ETC2_Format: number; +/** + * ETC2 RGBA format. + * + * @type {number} + * @constant + */ +export const RGBA_ETC2_EAC_Format: number; +/** + * EAC R11 UNORM format. + * + * @type {number} + * @constant + */ +export const R11_EAC_Format: number; +/** + * EAC R11 SNORM format. + * + * @type {number} + * @constant + */ +export const SIGNED_R11_EAC_Format: number; +/** + * EAC RG11 UNORM format. + * + * @type {number} + * @constant + */ +export const RG11_EAC_Format: number; +/** + * EAC RG11 SNORM format. + * + * @type {number} + * @constant + */ +export const SIGNED_RG11_EAC_Format: number; +/** + * ASTC RGBA 4x4 format. + * + * @type {number} + * @constant + */ +export const RGBA_ASTC_4x4_Format: number; +/** + * ASTC RGBA 5x4 format. + * + * @type {number} + * @constant + */ +export const RGBA_ASTC_5x4_Format: number; +/** + * ASTC RGBA 5x5 format. + * + * @type {number} + * @constant + */ +export const RGBA_ASTC_5x5_Format: number; +/** + * ASTC RGBA 6x5 format. + * + * @type {number} + * @constant + */ +export const RGBA_ASTC_6x5_Format: number; +/** + * ASTC RGBA 6x6 format. + * + * @type {number} + * @constant + */ +export const RGBA_ASTC_6x6_Format: number; +/** + * ASTC RGBA 8x5 format. + * + * @type {number} + * @constant + */ +export const RGBA_ASTC_8x5_Format: number; +/** + * ASTC RGBA 8x6 format. + * + * @type {number} + * @constant + */ +export const RGBA_ASTC_8x6_Format: number; +/** + * ASTC RGBA 8x8 format. + * + * @type {number} + * @constant + */ +export const RGBA_ASTC_8x8_Format: number; +/** + * ASTC RGBA 10x5 format. + * + * @type {number} + * @constant + */ +export const RGBA_ASTC_10x5_Format: number; +/** + * ASTC RGBA 10x6 format. + * + * @type {number} + * @constant + */ +export const RGBA_ASTC_10x6_Format: number; +/** + * ASTC RGBA 10x8 format. + * + * @type {number} + * @constant + */ +export const RGBA_ASTC_10x8_Format: number; +/** + * ASTC RGBA 10x10 format. + * + * @type {number} + * @constant + */ +export const RGBA_ASTC_10x10_Format: number; +/** + * ASTC RGBA 12x10 format. + * + * @type {number} + * @constant + */ +export const RGBA_ASTC_12x10_Format: number; +/** + * ASTC RGBA 12x12 format. + * + * @type {number} + * @constant + */ +export const RGBA_ASTC_12x12_Format: number; +/** + * BPTC RGBA format. + * + * @type {number} + * @constant + */ +export const RGBA_BPTC_Format: number; +/** + * BPTC Signed RGB format. + * + * @type {number} + * @constant + */ +export const RGB_BPTC_SIGNED_Format: number; +/** + * BPTC Unsigned RGB format. + * + * @type {number} + * @constant + */ +export const RGB_BPTC_UNSIGNED_Format: number; +/** + * RGTC1 Red format. + * + * @type {number} + * @constant + */ +export const RED_RGTC1_Format: number; +/** + * RGTC1 Signed Red format. + * + * @type {number} + * @constant + */ +export const SIGNED_RED_RGTC1_Format: number; +/** + * RGTC2 Red Green format. + * + * @type {number} + * @constant + */ +export const RED_GREEN_RGTC2_Format: number; +/** + * RGTC2 Signed Red Green format. + * + * @type {number} + * @constant + */ +export const SIGNED_RED_GREEN_RGTC2_Format: number; +/** + * Animations are played once. + * + * @type {number} + * @constant + */ +export const LoopOnce: number; +/** + * Animations are played with a chosen number of repetitions, each time jumping from + * the end of the clip directly to its beginning. + * + * @type {number} + * @constant + */ +export const LoopRepeat: number; +/** + * Animations are played with a chosen number of repetitions, alternately playing forward + * and backward. + * + * @type {number} + * @constant + */ +export const LoopPingPong: number; +/** + * Discrete interpolation mode for keyframe tracks. + * + * @type {number} + * @constant + */ +export const InterpolateDiscrete: number; +/** + * Linear interpolation mode for keyframe tracks. + * + * @type {number} + * @constant + */ +export const InterpolateLinear: number; +/** + * Smooth interpolation mode for keyframe tracks. + * + * @type {number} + * @constant + */ +export const InterpolateSmooth: number; +/** + * Bezier interpolation mode for keyframe tracks. + * + * Uses cubic Bezier curves with explicit 2D control points. + * Requires tangent data to be set on the track. + * + * @type {number} + * @constant + */ +export const InterpolateBezier: number; +/** + * Zero curvature ending for animations. + * + * @type {number} + * @constant + */ +export const ZeroCurvatureEnding: number; +/** + * Zero slope ending for animations. + * + * @type {number} + * @constant + */ +export const ZeroSlopeEnding: number; +/** + * Wrap around ending for animations. + * + * @type {number} + * @constant + */ +export const WrapAroundEnding: number; +/** + * Default animation blend mode. + * + * @type {number} + * @constant + */ +export const NormalAnimationBlendMode: number; +/** + * Additive animation blend mode. Can be used to layer motions on top of + * each other to build complex performances from smaller re-usable assets. + * + * @type {number} + * @constant + */ +export const AdditiveAnimationBlendMode: number; +/** + * For every three vertices draw a single triangle. + * + * @type {number} + * @constant + */ +export const TrianglesDrawMode: number; +/** + * For each vertex draw a triangle from the last three vertices. + * + * @type {number} + * @constant + */ +export const TriangleStripDrawMode: number; +/** + * For each vertex draw a triangle from the first vertex and the last two vertices. + * + * @type {number} + * @constant + */ +export const TriangleFanDrawMode: number; +/** + * The depth value is inverted (1.0 - z) for visualization purposes. + * + * @type {number} + * @constant + */ +export const BasicDepthPacking: number; +/** + * The depth value is packed into 32 bit RGBA. + * + * @type {number} + * @constant + */ +export const RGBADepthPacking: number; +/** + * The depth value is packed into 24 bit RGB. + * + * @type {number} + * @constant + */ +export const RGBDepthPacking: number; +/** + * The depth value is packed into 16 bit RG. + * + * @type {number} + * @constant + */ +export const RGDepthPacking: number; +/** + * Normal information is relative to the underlying surface. + * + * @type {number} + * @constant + */ +export const TangentSpaceNormalMap: number; +/** + * Normal information is relative to the object orientation. + * + * @type {number} + * @constant + */ +export const ObjectSpaceNormalMap: number; +/** + * No color space. + * + * @type {string} + * @constant + */ +export const NoColorSpace: string; +/** + * sRGB color space. + * + * @type {string} + * @constant + */ +export const SRGBColorSpace: string; +/** + * sRGB-linear color space. + * + * @type {string} + * @constant + */ +export const LinearSRGBColorSpace: string; +/** + * Linear transfer function. + * + * @type {string} + * @constant + */ +export const LinearTransfer: string; +/** + * sRGB transfer function. + * + * @type {string} + * @constant + */ +export const SRGBTransfer: string; +/** + * No normal map packing. + * + * @type {string} + * @constant + */ +export const NoNormalPacking: string; +/** + * Normal RG packing. + * + * @type {string} + * @constant + */ +export const NormalRGPacking: string; +/** + * Normal GA packing. + * + * @type {string} + * @constant + */ +export const NormalGAPacking: string; +/** + * Sets the stencil buffer value to `0`. + * + * @type {number} + * @constant + */ +export const ZeroStencilOp: number; +/** + * Keeps the current value. + * + * @type {number} + * @constant + */ +export const KeepStencilOp: number; +/** + * Sets the stencil buffer value to the specified reference value. + * + * @type {number} + * @constant + */ +export const ReplaceStencilOp: number; +/** + * Increments the current stencil buffer value. Clamps to the maximum representable unsigned value. + * + * @type {number} + * @constant + */ +export const IncrementStencilOp: number; +/** + * Decrements the current stencil buffer value. Clamps to `0`. + * + * @type {number} + * @constant + */ +export const DecrementStencilOp: number; +/** + * Increments the current stencil buffer value. Wraps stencil buffer value to zero when incrementing + * the maximum representable unsigned value. + * + * @type {number} + * @constant + */ +export const IncrementWrapStencilOp: number; +/** + * Decrements the current stencil buffer value. Wraps stencil buffer value to the maximum representable + * unsigned value when decrementing a stencil buffer value of `0`. + * + * @type {number} + * @constant + */ +export const DecrementWrapStencilOp: number; +/** + * Inverts the current stencil buffer value bitwise. + * + * @type {number} + * @constant + */ +export const InvertStencilOp: number; +/** + * Will never return true. + * + * @type {number} + * @constant + */ +export const NeverStencilFunc: number; +/** + * Will return true if the stencil reference value is less than the current stencil value. + * + * @type {number} + * @constant + */ +export const LessStencilFunc: number; +/** + * Will return true if the stencil reference value is equal to the current stencil value. + * + * @type {number} + * @constant + */ +export const EqualStencilFunc: number; +/** + * Will return true if the stencil reference value is less than or equal to the current stencil value. + * + * @type {number} + * @constant + */ +export const LessEqualStencilFunc: number; +/** + * Will return true if the stencil reference value is greater than the current stencil value. + * + * @type {number} + * @constant + */ +export const GreaterStencilFunc: number; +/** + * Will return true if the stencil reference value is not equal to the current stencil value. + * + * @type {number} + * @constant + */ +export const NotEqualStencilFunc: number; +/** + * Will return true if the stencil reference value is greater than or equal to the current stencil value. + * + * @type {number} + * @constant + */ +export const GreaterEqualStencilFunc: number; +/** + * Will always return true. + * + * @type {number} + * @constant + */ +export const AlwaysStencilFunc: number; +/** + * Never pass. + * + * @type {number} + * @constant + */ +export const NeverCompare: number; +/** + * Pass if the incoming value is less than the texture value. + * + * @type {number} + * @constant + */ +export const LessCompare: number; +/** + * Pass if the incoming value equals the texture value. + * + * @type {number} + * @constant + */ +export const EqualCompare: number; +/** + * Pass if the incoming value is less than or equal to the texture value. + * + * @type {number} + * @constant + */ +export const LessEqualCompare: number; +/** + * Pass if the incoming value is greater than the texture value. + * + * @type {number} + * @constant + */ +export const GreaterCompare: number; +/** + * Pass if the incoming value is not equal to the texture value. + * + * @type {number} + * @constant + */ +export const NotEqualCompare: number; +/** + * Pass if the incoming value is greater than or equal to the texture value. + * + * @type {number} + * @constant + */ +export const GreaterEqualCompare: number; +/** + * Always pass. + * + * @type {number} + * @constant + */ +export const AlwaysCompare: number; +/** + * The contents are intended to be specified once by the application, and used many + * times as the source for drawing and image specification commands. + * + * @type {number} + * @constant + */ +export const StaticDrawUsage: number; +/** + * The contents are intended to be respecified repeatedly by the application, and + * used many times as the source for drawing and image specification commands. + * + * @type {number} + * @constant + */ +export const DynamicDrawUsage: number; +/** + * The contents are intended to be specified once by the application, and used at most + * a few times as the source for drawing and image specification commands. + * + * @type {number} + * @constant + */ +export const StreamDrawUsage: number; +/** + * The contents are intended to be specified once by reading data from the 3D API, and queried + * many times by the application. + * + * @type {number} + * @constant + */ +export const StaticReadUsage: number; +/** + * The contents are intended to be respecified repeatedly by reading data from the 3D API, and queried + * many times by the application. + * + * @type {number} + * @constant + */ +export const DynamicReadUsage: number; +/** + * The contents are intended to be specified once by reading data from the 3D API, and queried at most + * a few times by the application + * + * @type {number} + * @constant + */ +export const StreamReadUsage: number; +/** + * The contents are intended to be specified once by reading data from the 3D API, and used many times as + * the source for WebGL drawing and image specification commands. + * + * @type {number} + * @constant + */ +export const StaticCopyUsage: number; +/** + * The contents are intended to be respecified repeatedly by reading data from the 3D API, and used many times + * as the source for WebGL drawing and image specification commands. + * + * @type {number} + * @constant + */ +export const DynamicCopyUsage: number; +/** + * The contents are intended to be specified once by reading data from the 3D API, and used at most a few times + * as the source for WebGL drawing and image specification commands. + * + * @type {number} + * @constant + */ +export const StreamCopyUsage: number; +/** + * GLSL 1 shader code. + * + * @type {string} + * @constant + */ +export const GLSL1: string; +/** + * GLSL 3 shader code. + * + * @type {string} + * @constant + */ +export const GLSL3: string; +/** + * WebGL coordinate system. + * + * @type {number} + * @constant + */ +export const WebGLCoordinateSystem: number; +/** + * WebGPU coordinate system. + * + * @type {number} + * @constant + */ +export const WebGPUCoordinateSystem: number; +/** + * Represents the different timestamp query types. + * + * @type {ConstantsTimestampQuery} + * @constant + */ +export const TimestampQuery: ConstantsTimestampQuery; +/** + * Represents mouse buttons and interaction types in context of controls. + * + * @type {ConstantsInterpolationSamplingType} + * @constant + */ +export const InterpolationSamplingType: ConstantsInterpolationSamplingType; +/** + * Represents the different interpolation sampling modes. + * + * @type {ConstantsInterpolationSamplingMode} + * @constant + */ +export const InterpolationSamplingMode: ConstantsInterpolationSamplingMode; +/** + * Compatibility flags for features that may not be supported across all platforms. + * + * @type {Object} + * @constant + */ +export const Compatibility: Object; +/** + * This type represents mouse buttons and interaction types in context of controls. + */ +export type ConstantsMouse = { + /** + * - The left mouse button. + */ + MIDDLE: number; + /** + * - The middle mouse button. + */ + LEFT: number; + /** + * - The right mouse button. + */ + RIGHT: number; + /** + * - A rotate interaction. + */ + ROTATE: number; + /** + * - A dolly interaction. + */ + DOLLY: number; + /** + * - A pan interaction. + */ + PAN: number; +}; +/** + * This type represents touch interaction types in context of controls. + */ +export type ConstantsTouch = { + /** + * - A rotate interaction. + */ + ROTATE: number; + /** + * - A pan interaction. + */ + PAN: number; + /** + * - The dolly-pan interaction. + */ + DOLLY_PAN: number; + /** + * - A dolly-rotate interaction. + */ + DOLLY_ROTATE: number; +}; +/** + * This type represents the different timestamp query types. + */ +export type ConstantsTimestampQuery = { + /** + * - A `compute` timestamp query. + */ + COMPUTE: string; + /** + * - A `render` timestamp query. + */ + RENDER: string; +}; +/** + * Represents the different interpolation sampling types. + */ +export type ConstantsInterpolationSamplingType = { + /** + * - Perspective-correct interpolation. + */ + PERSPECTIVE: string; + /** + * - Linear interpolation. + */ + LINEAR: string; + /** + * - Flat interpolation. + */ + FLAT: string; +}; +/** + * Represents the different interpolation sampling modes. + */ +export type ConstantsInterpolationSamplingMode = { + /** + * - Normal sampling mode. + */ + NORMAL: string; + /** + * - Centroid sampling mode. + */ + CENTROID: string; + /** + * - Sample-specific sampling mode. + */ + SAMPLE: string; + /** + * - Flat interpolation using the first vertex. + */ + FIRST: string; + /** + * - Flat interpolation using either vertex. + */ + EITHER: string; +}; diff --git a/jsdoc-testing/jsdoc/src/core/BufferAttribute.d.ts b/jsdoc-testing/jsdoc/src/core/BufferAttribute.d.ts new file mode 100644 index 000000000..577098a58 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/core/BufferAttribute.d.ts @@ -0,0 +1,487 @@ +/** + * Convenient class that can be used when creating a `Float32` buffer attribute with + * a plain `Array` instance. + * + * @augments BufferAttribute + */ +export class Float32BufferAttribute extends BufferAttribute { + /** + * Constructs a new buffer attribute. + * + * @param {(Array|Float32Array)} array - The array holding the attribute data. + * @param {number} itemSize - The item size. + * @param {boolean} [normalized=false] - Whether the data are normalized or not. + */ + constructor(array: (Array | Float32Array), itemSize: number, normalized?: boolean); +} +/** + * Convenient class that can be used when creating a `Float16` buffer attribute with + * a plain `Array` instance. + * + * This class automatically converts to and from FP16 via `Uint16Array` since `Float16Array` + * browser support is still problematic. + * + * @augments BufferAttribute + */ +export class Float16BufferAttribute extends BufferAttribute { + /** + * Constructs a new buffer attribute. + * + * @param {(Array|Uint16Array)} array - The array holding the attribute data. + * @param {number} itemSize - The item size. + * @param {boolean} [normalized=false] - Whether the data are normalized or not. + */ + constructor(array: (Array | Uint16Array), itemSize: number, normalized?: boolean); + isFloat16BufferAttribute: boolean; + getX(index: any): number; + setX(index: any, x: any): this; + getY(index: any): number; + setY(index: any, y: any): this; + getZ(index: any): number; + setZ(index: any, z: any): this; + getW(index: any): number; + setW(index: any, w: any): this; + setXY(index: any, x: any, y: any): this; + setXYZ(index: any, x: any, y: any, z: any): this; + setXYZW(index: any, x: any, y: any, z: any, w: any): this; +} +/** + * Convenient class that can be used when creating a `UInt32` buffer attribute with + * a plain `Array` instance. + * + * @augments BufferAttribute + */ +export class Uint32BufferAttribute extends BufferAttribute { + /** + * Constructs a new buffer attribute. + * + * @param {(Array|Uint32Array)} array - The array holding the attribute data. + * @param {number} itemSize - The item size. + * @param {boolean} [normalized=false] - Whether the data are normalized or not. + */ + constructor(array: (Array | Uint32Array), itemSize: number, normalized?: boolean); +} +/** + * Convenient class that can be used when creating a `Int32` buffer attribute with + * a plain `Array` instance. + * + * @augments BufferAttribute + */ +export class Int32BufferAttribute extends BufferAttribute { + /** + * Constructs a new buffer attribute. + * + * @param {(Array|Int32Array)} array - The array holding the attribute data. + * @param {number} itemSize - The item size. + * @param {boolean} [normalized=false] - Whether the data are normalized or not. + */ + constructor(array: (Array | Int32Array), itemSize: number, normalized?: boolean); +} +/** + * Convenient class that can be used when creating a `UInt16` buffer attribute with + * a plain `Array` instance. + * + * @augments BufferAttribute + */ +export class Uint16BufferAttribute extends BufferAttribute { + /** + * Constructs a new buffer attribute. + * + * @param {(Array|Uint16Array)} array - The array holding the attribute data. + * @param {number} itemSize - The item size. + * @param {boolean} [normalized=false] - Whether the data are normalized or not. + */ + constructor(array: (Array | Uint16Array), itemSize: number, normalized?: boolean); +} +/** + * Convenient class that can be used when creating a `Int16` buffer attribute with + * a plain `Array` instance. + * + * @augments BufferAttribute + */ +export class Int16BufferAttribute extends BufferAttribute { + /** + * Constructs a new buffer attribute. + * + * @param {(Array|Int16Array)} array - The array holding the attribute data. + * @param {number} itemSize - The item size. + * @param {boolean} [normalized=false] - Whether the data are normalized or not. + */ + constructor(array: (Array | Int16Array), itemSize: number, normalized?: boolean); +} +/** + * Convenient class that can be used when creating a `UInt8Clamped` buffer attribute with + * a plain `Array` instance. + * + * @augments BufferAttribute + */ +export class Uint8ClampedBufferAttribute extends BufferAttribute { + /** + * Constructs a new buffer attribute. + * + * @param {(Array|Uint8ClampedArray)} array - The array holding the attribute data. + * @param {number} itemSize - The item size. + * @param {boolean} [normalized=false] - Whether the data are normalized or not. + */ + constructor(array: (Array | Uint8ClampedArray), itemSize: number, normalized?: boolean); +} +/** + * Convenient class that can be used when creating a `UInt8` buffer attribute with + * a plain `Array` instance. + * + * @augments BufferAttribute + */ +export class Uint8BufferAttribute extends BufferAttribute { + /** + * Constructs a new buffer attribute. + * + * @param {(Array|Uint8Array)} array - The array holding the attribute data. + * @param {number} itemSize - The item size. + * @param {boolean} [normalized=false] - Whether the data are normalized or not. + */ + constructor(array: (Array | Uint8Array), itemSize: number, normalized?: boolean); +} +/** + * Convenient class that can be used when creating a `Int8` buffer attribute with + * a plain `Array` instance. + * + * @augments BufferAttribute + */ +export class Int8BufferAttribute extends BufferAttribute { + /** + * Constructs a new buffer attribute. + * + * @param {(Array|Int8Array)} array - The array holding the attribute data. + * @param {number} itemSize - The item size. + * @param {boolean} [normalized=false] - Whether the data are normalized or not. + */ + constructor(array: (Array | Int8Array), itemSize: number, normalized?: boolean); +} +/** + * This class stores data for an attribute (such as vertex positions, face + * indices, normals, colors, UVs, and any custom attributes ) associated with + * a geometry, which allows for more efficient passing of data to the GPU. + * + * When working with vector-like data, the `fromBufferAttribute( attribute, index )` + * helper methods on vector and color class might be helpful. E.g. {@link Vector3#fromBufferAttribute}. + */ +export class BufferAttribute extends EventDispatcher { + /** + * Constructs a new buffer attribute. + * + * @param {TypedArray} array - The array holding the attribute data. + * @param {number} itemSize - The item size. + * @param {boolean} [normalized=false] - Whether the data are normalized or not. + */ + constructor(array: TypedArray, itemSize: number, normalized?: boolean); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBufferAttribute: boolean; + /** + * The name of the buffer attribute. + * + * @type {string} + */ + name: string; + /** + * The array holding the attribute data. It should have `itemSize * numVertices` + * elements, where `numVertices` is the number of vertices in the associated geometry. + * + * @type {TypedArray} + */ + array: TypedArray; + /** + * The number of values of the array that should be associated with a particular vertex. + * For instance, if this attribute is storing a 3-component vector (such as a position, + * normal, or color), then the value should be `3`. + * + * @type {number} + */ + itemSize: number; + /** + * Represents the number of items this buffer attribute stores. It is internally computed + * by dividing the `array` length by the `itemSize`. + * + * @type {number} + * @readonly + */ + readonly count: number; + /** + * Applies to integer data only. Indicates how the underlying data in the buffer maps to + * the values in the GLSL code. For instance, if `array` is an instance of `UInt16Array`, + * and `normalized` is `true`, the values `0 - +65535` in the array data will be mapped to + * `0.0f - +1.0f` in the GLSL attribute. If `normalized` is `false`, the values will be converted + * to floats unmodified, i.e. `65535` becomes `65535.0f`. + * + * @type {boolean} + */ + normalized: boolean; + /** + * Defines the intended usage pattern of the data store for optimization purposes. + * + * Note: After the initial use of a buffer, its usage cannot be changed. Instead, + * instantiate a new one and set the desired usage before the next render. + * + * @type {(StaticDrawUsage|DynamicDrawUsage|StreamDrawUsage|StaticReadUsage|DynamicReadUsage|StreamReadUsage|StaticCopyUsage|DynamicCopyUsage|StreamCopyUsage)} + * @default StaticDrawUsage + */ + usage: (number | DynamicDrawUsage | StreamDrawUsage | StaticReadUsage | DynamicReadUsage | StreamReadUsage | StaticCopyUsage | DynamicCopyUsage | StreamCopyUsage); + /** + * This can be used to only update some components of stored vectors (for example, just the + * component related to color). Use the `addUpdateRange()` function to add ranges to this array. + * + * @type {Array} + */ + updateRanges: Array; + /** + * Configures the bound GPU type for use in shaders. + * + * Note: this only has an effect for integer arrays and is not configurable for float arrays. + * For lower precision float types, use `Float16BufferAttribute`. + * + * @type {(FloatType|IntType)} + * @default FloatType + */ + gpuType: (number | IntType); + /** + * A version number, incremented every time the `needsUpdate` is set to `true`. + * + * @type {number} + */ + version: number; + /** + * A callback function that is executed after the renderer has transferred the attribute + * array data to the GPU. + */ + onUploadCallback(): void; + /** + * Flag to indicate that this attribute has changed and should be re-sent to + * the GPU. Set this to `true` when you modify the value of the array. + * + * @type {number} + * @default false + * @param {boolean} value + */ + set needsUpdate(value: boolean); + /** + * Sets the usage of this buffer attribute. + * + * @param {(StaticDrawUsage|DynamicDrawUsage|StreamDrawUsage|StaticReadUsage|DynamicReadUsage|StreamReadUsage|StaticCopyUsage|DynamicCopyUsage|StreamCopyUsage)} value - The usage to set. + * @return {BufferAttribute} A reference to this buffer attribute. + */ + setUsage(value: (number | DynamicDrawUsage | StreamDrawUsage | StaticReadUsage | DynamicReadUsage | StreamReadUsage | StaticCopyUsage | DynamicCopyUsage | StreamCopyUsage)): BufferAttribute; + /** + * Adds a range of data in the data array to be updated on the GPU. + * + * @param {number} start - Position at which to start update. + * @param {number} count - The number of components to update. + */ + addUpdateRange(start: number, count: number): void; + /** + * Clears the update ranges. + */ + clearUpdateRanges(): void; + /** + * Copies the values of the given buffer attribute to this instance. + * + * @param {BufferAttribute} source - The buffer attribute to copy. + * @return {BufferAttribute} A reference to this instance. + */ + copy(source: BufferAttribute): BufferAttribute; + /** + * Copies a vector from the given buffer attribute to this one. The start + * and destination position in the attribute buffers are represented by the + * given indices. + * + * @param {number} index1 - The destination index into this buffer attribute. + * @param {BufferAttribute} attribute - The buffer attribute to copy from. + * @param {number} index2 - The source index into the given buffer attribute. + * @return {BufferAttribute} A reference to this instance. + */ + copyAt(index1: number, attribute: BufferAttribute, index2: number): BufferAttribute; + /** + * Copies the given array data into this buffer attribute. + * + * @param {(TypedArray|Array)} array - The array to copy. + * @return {BufferAttribute} A reference to this instance. + */ + copyArray(array: (TypedArray | any[])): BufferAttribute; + /** + * Applies the given 3x3 matrix to the given attribute. Works with + * item size `2` and `3`. + * + * @param {Matrix3} m - The matrix to apply. + * @return {BufferAttribute} A reference to this instance. + */ + applyMatrix3(m: Matrix3): BufferAttribute; + /** + * Applies the given 4x4 matrix to the given attribute. Only works with + * item size `3`. + * + * @param {Matrix4} m - The matrix to apply. + * @return {BufferAttribute} A reference to this instance. + */ + applyMatrix4(m: Matrix4): BufferAttribute; + /** + * Applies the given 3x3 normal matrix to the given attribute. Only works with + * item size `3`. + * + * @param {Matrix3} m - The normal matrix to apply. + * @return {BufferAttribute} A reference to this instance. + */ + applyNormalMatrix(m: Matrix3): BufferAttribute; + /** + * Applies the given 4x4 matrix to the given attribute. Only works with + * item size `3` and with direction vectors. + * + * @param {Matrix4} m - The matrix to apply. + * @return {BufferAttribute} A reference to this instance. + */ + transformDirection(m: Matrix4): BufferAttribute; + /** + * Sets the given array data in the buffer attribute. + * + * @param {(TypedArray|Array)} value - The array data to set. + * @param {number} [offset=0] - The offset in this buffer attribute's array. + * @return {BufferAttribute} A reference to this instance. + */ + set(value: (TypedArray | any[]), offset?: number): BufferAttribute; + /** + * Returns the given component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @param {number} component - The component index. + * @return {number} The returned value. + */ + getComponent(index: number, component: number): number; + /** + * Sets the given value to the given component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @param {number} component - The component index. + * @param {number} value - The value to set. + * @return {BufferAttribute} A reference to this instance. + */ + setComponent(index: number, component: number, value: number): BufferAttribute; + /** + * Returns the x component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @return {number} The x component. + */ + getX(index: number): number; + /** + * Sets the x component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @param {number} x - The value to set. + * @return {BufferAttribute} A reference to this instance. + */ + setX(index: number, x: number): BufferAttribute; + /** + * Returns the y component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @return {number} The y component. + */ + getY(index: number): number; + /** + * Sets the y component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @param {number} y - The value to set. + * @return {BufferAttribute} A reference to this instance. + */ + setY(index: number, y: number): BufferAttribute; + /** + * Returns the z component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @return {number} The z component. + */ + getZ(index: number): number; + /** + * Sets the z component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @param {number} z - The value to set. + * @return {BufferAttribute} A reference to this instance. + */ + setZ(index: number, z: number): BufferAttribute; + /** + * Returns the w component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @return {number} The w component. + */ + getW(index: number): number; + /** + * Sets the w component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @param {number} w - The value to set. + * @return {BufferAttribute} A reference to this instance. + */ + setW(index: number, w: number): BufferAttribute; + /** + * Sets the x and y component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @param {number} x - The value for the x component to set. + * @param {number} y - The value for the y component to set. + * @return {BufferAttribute} A reference to this instance. + */ + setXY(index: number, x: number, y: number): BufferAttribute; + /** + * Sets the x, y and z component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @param {number} x - The value for the x component to set. + * @param {number} y - The value for the y component to set. + * @param {number} z - The value for the z component to set. + * @return {BufferAttribute} A reference to this instance. + */ + setXYZ(index: number, x: number, y: number, z: number): BufferAttribute; + /** + * Sets the x, y, z and w component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @param {number} x - The value for the x component to set. + * @param {number} y - The value for the y component to set. + * @param {number} z - The value for the z component to set. + * @param {number} w - The value for the w component to set. + * @return {BufferAttribute} A reference to this instance. + */ + setXYZW(index: number, x: number, y: number, z: number, w: number): BufferAttribute; + /** + * Sets the given callback function that is executed after the Renderer has transferred + * the attribute array data to the GPU. Can be used to perform clean-up operations after + * the upload when attribute data are not needed anymore on the CPU side. + * + * @param {Function} callback - The `onUpload()` callback. + * @return {BufferAttribute} A reference to this instance. + */ + onUpload(callback: Function): BufferAttribute; + /** + * Returns a new buffer attribute with copied values from this instance. + * + * @return {BufferAttribute} A clone of this instance. + */ + clone(): BufferAttribute; + /** + * Serializes the buffer attribute into JSON. + * + * @return {Object} A JSON object representing the serialized buffer attribute. + */ + toJSON(): Object; + /** + * Disposes of the buffer attribute. Available only in {@link WebGPURenderer}. + */ + dispose(): void; +} +import { EventDispatcher } from './EventDispatcher.js'; diff --git a/jsdoc-testing/jsdoc/src/core/BufferGeometry.d.ts b/jsdoc-testing/jsdoc/src/core/BufferGeometry.d.ts new file mode 100644 index 000000000..82a3230ad --- /dev/null +++ b/jsdoc-testing/jsdoc/src/core/BufferGeometry.d.ts @@ -0,0 +1,391 @@ +/** + * A representation of mesh, line, or point geometry. Includes vertex + * positions, face indices, normals, colors, UVs, and custom attributes + * within buffers, reducing the cost of passing all this data to the GPU. + * + * ```js + * const geometry = new THREE.BufferGeometry(); + * // create a simple square shape. We duplicate the top left and bottom right + * // vertices because each vertex needs to appear once per triangle. + * const vertices = new Float32Array( [ + * -1.0, -1.0, 1.0, // v0 + * 1.0, -1.0, 1.0, // v1 + * 1.0, 1.0, 1.0, // v2 + * + * 1.0, 1.0, 1.0, // v3 + * -1.0, 1.0, 1.0, // v4 + * -1.0, -1.0, 1.0 // v5 + * ] ); + * // itemSize = 3 because there are 3 values (components) per vertex + * geometry.setAttribute( 'position', new THREE.BufferAttribute( vertices, 3 ) ); + * const material = new THREE.MeshBasicMaterial( { color: 0xff0000 } ); + * const mesh = new THREE.Mesh( geometry, material ); + * ``` + * + * @augments EventDispatcher + */ +export class BufferGeometry extends EventDispatcher { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBufferGeometry: boolean; + /** + * The UUID of the geometry. + * + * @type {string} + * @readonly + */ + readonly uuid: string; + /** + * The name of the geometry. + * + * @type {string} + */ + name: string; + type: string; + /** + * Allows for vertices to be re-used across multiple triangles; this is + * called using "indexed triangles". Each triangle is associated with the + * indices of three vertices. This attribute therefore stores the index of + * each vertex for each triangular face. If this attribute is not set, the + * renderer assumes that each three contiguous positions represent a single triangle. + * + * @type {?BufferAttribute} + * @default null + */ + index: BufferAttribute | null; + /** + * A (storage) buffer attribute which was generated with a compute shader and + * now defines indirect draw calls. + * + * Can only be used with {@link WebGPURenderer} and a WebGPU backend. + * + * @type {?BufferAttribute} + * @default null + */ + indirect: BufferAttribute | null; + /** + * The offset, in bytes, into the indirect drawing buffer where the value data begins. If an array is provided, multiple indirect draw calls will be made for each offset. + * + * Can only be used with {@link WebGPURenderer} and a WebGPU backend. + * + * @type {number|Array} + * @default 0 + */ + indirectOffset: number | Array; + /** + * This dictionary has as id the name of the attribute to be set and as value + * the buffer attribute to set it to. Rather than accessing this property directly, + * use `setAttribute()` and `getAttribute()` to access attributes of this geometry. + * + * @type {Object} + */ + attributes: { + [x: string]: any; + }; + /** + * This dictionary holds the morph targets of the geometry. + * + * Note: Once the geometry has been rendered, the morph attribute data cannot + * be changed. You will have to call `dispose()`, and create a new geometry instance. + * + * @type {Object} + */ + morphAttributes: Object; + /** + * Used to control the morph target behavior; when set to `true`, the morph + * target data is treated as relative offsets, rather than as absolute + * positions/normals. + * + * @type {boolean} + * @default false + */ + morphTargetsRelative: boolean; + /** + * Split the geometry into groups, each of which will be rendered in a + * separate draw call. This allows an array of materials to be used with the geometry. + * + * Use `addGroup()` and `clearGroups()` to edit groups, rather than modifying this array directly. + * + * Every vertex and index must belong to exactly one group — groups must not share vertices or + * indices, and must not leave vertices or indices unused. + * + * @type {Array} + */ + groups: Array; + /** + * Bounding box for the geometry which can be calculated with `computeBoundingBox()`. + * + * @type {?Box3} + * @default null + */ + boundingBox: Box3 | null; + /** + * Bounding sphere for the geometry which can be calculated with `computeBoundingSphere()`. + * + * @type {?Sphere} + * @default null + */ + boundingSphere: Sphere | null; + /** + * Determines the part of the geometry to render. This should not be set directly, + * instead use `setDrawRange()`. + * + * @type {{start:number,count:number}} + */ + drawRange: { + start: number; + count: number; + }; + /** + * An object that can be used to store custom data about the geometry. + * It should not hold references to functions as these will not be cloned. + * + * @type {Object} + */ + userData: Object; + /** + * Returns the index of this geometry. + * + * @return {?BufferAttribute} The index. Returns `null` if no index is defined. + */ + getIndex(): BufferAttribute | null; + /** + * Sets the given index to this geometry. + * + * @param {Array|BufferAttribute} index - The index to set. + * @return {BufferGeometry} A reference to this instance. + */ + setIndex(index: Array | BufferAttribute): BufferGeometry; + /** + * Sets the given indirect attribute to this geometry. + * + * @param {BufferAttribute} indirect - The attribute holding indirect draw calls. + * @param {number|Array} [indirectOffset=0] - The offset, in bytes, into the indirect drawing buffer where the value data begins. If an array is provided, multiple indirect draw calls will be made for each offset. + * @return {BufferGeometry} A reference to this instance. + */ + setIndirect(indirect: BufferAttribute, indirectOffset?: number | Array): BufferGeometry; + /** + * Returns the indirect attribute of this geometry. + * + * @return {?BufferAttribute} The indirect attribute. Returns `null` if no indirect attribute is defined. + */ + getIndirect(): BufferAttribute | null; + /** + * Returns the buffer attribute for the given name. + * + * @param {string} name - The attribute name. + * @return {BufferAttribute|InterleavedBufferAttribute|undefined} The buffer attribute. + * Returns `undefined` if not attribute has been found. + */ + getAttribute(name: string): BufferAttribute | InterleavedBufferAttribute | undefined; + /** + * Sets the given attribute for the given name. + * + * @param {string} name - The attribute name. + * @param {BufferAttribute|InterleavedBufferAttribute} attribute - The attribute to set. + * @return {BufferGeometry} A reference to this instance. + */ + setAttribute(name: string, attribute: BufferAttribute | InterleavedBufferAttribute): BufferGeometry; + /** + * Deletes the attribute for the given name. + * + * @param {string} name - The attribute name to delete. + * @return {BufferGeometry} A reference to this instance. + */ + deleteAttribute(name: string): BufferGeometry; + /** + * Returns `true` if this geometry has an attribute for the given name. + * + * @param {string} name - The attribute name. + * @return {boolean} Whether this geometry has an attribute for the given name or not. + */ + hasAttribute(name: string): boolean; + /** + * Adds a group to this geometry. + * + * @param {number} start - The first element in this draw call. That is the first + * vertex for non-indexed geometry, otherwise the first triangle index. + * @param {number} count - Specifies how many vertices (or indices) are part of this group. + * @param {number} [materialIndex=0] - The material array index to use. + */ + addGroup(start: number, count: number, materialIndex?: number): void; + /** + * Clears all groups. + */ + clearGroups(): void; + /** + * Sets the draw range for this geometry. + * + * @param {number} start - The first vertex for non-indexed geometry, otherwise the first triangle index. + * @param {number} count - For non-indexed BufferGeometry, `count` is the number of vertices to render. + * For indexed BufferGeometry, `count` is the number of indices to render. + */ + setDrawRange(start: number, count: number): void; + /** + * Applies the given 4x4 transformation matrix to the geometry. + * + * @param {Matrix4} matrix - The matrix to apply. + * @return {BufferGeometry} A reference to this instance. + */ + applyMatrix4(matrix: Matrix4): BufferGeometry; + /** + * Applies the rotation represented by the Quaternion to the geometry. + * + * @param {Quaternion} q - The Quaternion to apply. + * @return {BufferGeometry} A reference to this instance. + */ + applyQuaternion(q: Quaternion): BufferGeometry; + /** + * Rotates the geometry about the X axis. This is typically done as a one time + * operation, and not during a loop. Use {@link Object3D#rotation} for typical + * real-time mesh rotation. + * + * @param {number} angle - The angle in radians. + * @return {BufferGeometry} A reference to this instance. + */ + rotateX(angle: number): BufferGeometry; + /** + * Rotates the geometry about the Y axis. This is typically done as a one time + * operation, and not during a loop. Use {@link Object3D#rotation} for typical + * real-time mesh rotation. + * + * @param {number} angle - The angle in radians. + * @return {BufferGeometry} A reference to this instance. + */ + rotateY(angle: number): BufferGeometry; + /** + * Rotates the geometry about the Z axis. This is typically done as a one time + * operation, and not during a loop. Use {@link Object3D#rotation} for typical + * real-time mesh rotation. + * + * @param {number} angle - The angle in radians. + * @return {BufferGeometry} A reference to this instance. + */ + rotateZ(angle: number): BufferGeometry; + /** + * Translates the geometry. This is typically done as a one time + * operation, and not during a loop. Use {@link Object3D#position} for typical + * real-time mesh rotation. + * + * @param {number} x - The x offset. + * @param {number} y - The y offset. + * @param {number} z - The z offset. + * @return {BufferGeometry} A reference to this instance. + */ + translate(x: number, y: number, z: number): BufferGeometry; + /** + * Scales the geometry. This is typically done as a one time + * operation, and not during a loop. Use {@link Object3D#scale} for typical + * real-time mesh rotation. + * + * @param {number} x - The x scale. + * @param {number} y - The y scale. + * @param {number} z - The z scale. + * @return {BufferGeometry} A reference to this instance. + */ + scale(x: number, y: number, z: number): BufferGeometry; + /** + * Rotates the geometry to face a point in 3D space. This is typically done as a one time + * operation, and not during a loop. Use {@link Object3D#lookAt} for typical + * real-time mesh rotation. + * + * @param {Vector3} vector - The target point. + * @return {BufferGeometry} A reference to this instance. + */ + lookAt(vector: Vector3): BufferGeometry; + /** + * Center the geometry based on its bounding box. + * + * @return {BufferGeometry} A reference to this instance. + */ + center(): BufferGeometry; + /** + * Defines a geometry by creating a `position` attribute based on the given array of points. The array + * can hold 2D or 3D vectors. When using two-dimensional data, the `z` coordinate for all vertices is + * set to `0`. + * + * If the method is used with an existing `position` attribute, the vertex data are overwritten with the + * data from the array. The length of the array must match the vertex count. + * + * @param {Array|Array} points - The points. + * @return {BufferGeometry} A reference to this instance. + */ + setFromPoints(points: Array | Array): BufferGeometry; + /** + * Computes the bounding box of the geometry, and updates the `boundingBox` member. + * The bounding box is not computed by the engine; it must be computed by your app. + * You may need to recompute the bounding box if the geometry vertices are modified. + */ + computeBoundingBox(): void; + /** + * Computes the bounding sphere of the geometry, and updates the `boundingSphere` member. + * The engine automatically computes the bounding sphere when it is needed, e.g., for ray casting or view frustum culling. + * You may need to recompute the bounding sphere if the geometry vertices are modified. + */ + computeBoundingSphere(): void; + /** + * Calculates and adds a tangent attribute to this geometry. + * + * The computation is only supported for indexed geometries and if position, normal, and uv attributes + * are defined. When using a tangent space normal map, prefer the MikkTSpace algorithm provided by + * {@link BufferGeometryUtils#computeMikkTSpaceTangents} instead. + */ + computeTangents(): void; + /** + * Computes vertex normals for the given vertex data. For indexed geometries, the method sets + * each vertex normal to be the average of the face normals of the faces that share that vertex. + * For non-indexed geometries, vertices are not shared, and the method sets each vertex normal + * to be the same as the face normal. + */ + computeVertexNormals(): void; + /** + * Ensures every normal vector in a geometry will have a magnitude of `1`. This will + * correct lighting on the geometry surfaces. + */ + normalizeNormals(): void; + /** + * Return a new non-index version of this indexed geometry. If the geometry + * is already non-indexed, the method is a NOOP. + * + * @return {BufferGeometry} The non-indexed version of this indexed geometry. + */ + toNonIndexed(): BufferGeometry; + /** + * Serializes the geometry into JSON. + * + * @return {Object} A JSON object representing the serialized geometry. + */ + toJSON(): Object; + /** + * Returns a new geometry with copied values from this instance. + * + * @return {BufferGeometry} A clone of this instance. + */ + clone(): BufferGeometry; + /** + * Copies the values of the given geometry to this instance. + * + * @param {BufferGeometry} source - The geometry to copy. + * @return {BufferGeometry} A reference to this instance. + */ + copy(source: BufferGeometry): BufferGeometry; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + * + * @fires BufferGeometry#dispose + */ + dispose(): void; +} +import { EventDispatcher } from './EventDispatcher.js'; +import { BufferAttribute } from './BufferAttribute.js'; +import { Box3 } from '../math/Box3.js'; +import { Sphere } from '../math/Sphere.js'; +import { Matrix4 } from '../math/Matrix4.js'; +import { Vector3 } from '../math/Vector3.js'; +import { Vector2 } from '../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/core/Clock.d.ts b/jsdoc-testing/jsdoc/src/core/Clock.d.ts new file mode 100644 index 000000000..d8945c215 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/core/Clock.d.ts @@ -0,0 +1,73 @@ +/** + * Class for keeping track of time. + * + * @deprecated since r183. + */ +export class Clock { + /** + * Constructs a new clock. + * + * @deprecated since 183. + * @param {boolean} [autoStart=true] - Whether to automatically start the clock when + * `getDelta()` is called for the first time. + */ + constructor(autoStart?: boolean); + /** + * If set to `true`, the clock starts automatically when `getDelta()` is called + * for the first time. + * + * @type {boolean} + * @default true + */ + autoStart: boolean; + /** + * Holds the time at which the clock's `start()` method was last called. + * + * @type {number} + * @default 0 + */ + startTime: number; + /** + * Holds the time at which the clock's `start()`, `getElapsedTime()` or + * `getDelta()` methods were last called. + * + * @type {number} + * @default 0 + */ + oldTime: number; + /** + * Keeps track of the total time that the clock has been running. + * + * @type {number} + * @default 0 + */ + elapsedTime: number; + /** + * Whether the clock is running or not. + * + * @type {boolean} + * @default true + */ + running: boolean; + /** + * Starts the clock. When `autoStart` is set to `true`, the method is automatically + * called by the class. + */ + start(): void; + /** + * Stops the clock. + */ + stop(): void; + /** + * Returns the elapsed time in seconds. + * + * @return {number} The elapsed time. + */ + getElapsedTime(): number; + /** + * Returns the delta time in seconds. + * + * @return {number} The delta time. + */ + getDelta(): number; +} diff --git a/jsdoc-testing/jsdoc/src/core/EventDispatcher.d.ts b/jsdoc-testing/jsdoc/src/core/EventDispatcher.d.ts new file mode 100644 index 000000000..b53482ecc --- /dev/null +++ b/jsdoc-testing/jsdoc/src/core/EventDispatcher.d.ts @@ -0,0 +1,53 @@ +/** + * This modules allows to dispatch event objects on custom JavaScript objects. + * + * Main repository: [eventdispatcher.js](https://github.com/mrdoob/eventdispatcher.js/) + * + * Code Example: + * ```js + * class Car extends EventDispatcher { + * start() { + * this.dispatchEvent( { type: 'start', message: 'vroom vroom!' } ); + * } + *}; + * + * // Using events with the custom object + * const car = new Car(); + * car.addEventListener( 'start', function ( event ) { + * alert( event.message ); + * } ); + * + * car.start(); + * ``` + */ +export class EventDispatcher { + /** + * Adds the given event listener to the given event type. + * + * @param {string} type - The type of event to listen to. + * @param {Function} listener - The function that gets called when the event is fired. + */ + addEventListener(type: string, listener: Function): void; + _listeners: {} | undefined; + /** + * Returns `true` if the given event listener has been added to the given event type. + * + * @param {string} type - The type of event. + * @param {Function} listener - The listener to check. + * @return {boolean} Whether the given event listener has been added to the given event type. + */ + hasEventListener(type: string, listener: Function): boolean; + /** + * Removes the given event listener from the given event type. + * + * @param {string} type - The type of event. + * @param {Function} listener - The listener to remove. + */ + removeEventListener(type: string, listener: Function): void; + /** + * Dispatches an event object. + * + * @param {Object} event - The event that gets fired. + */ + dispatchEvent(event: Object): void; +} diff --git a/jsdoc-testing/jsdoc/src/core/GLBufferAttribute.d.ts b/jsdoc-testing/jsdoc/src/core/GLBufferAttribute.d.ts new file mode 100644 index 000000000..636d7b1e6 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/core/GLBufferAttribute.d.ts @@ -0,0 +1,122 @@ +/** + * An alternative version of a buffer attribute with more control over the VBO. + * + * The renderer does not construct a VBO for this kind of attribute. Instead, it uses + * whatever VBO is passed in constructor and can later be altered via the `buffer` property. + * + * The most common use case for this class is when some kind of GPGPU calculation interferes + * or even produces the VBOs in question. + * + * Notice that this class can only be used with {@link WebGLRenderer}. + */ +export class GLBufferAttribute { + /** + * Constructs a new GL buffer attribute. + * + * @param {WebGLBuffer} buffer - The native WebGL buffer. + * @param {number} type - The native data type (e.g. `gl.FLOAT`). + * @param {number} itemSize - The item size. + * @param {number} elementSize - The corresponding size (in bytes) for the given `type` parameter. + * @param {number} count - The expected number of vertices in VBO. + * @param {boolean} [normalized=false] - Whether the data are normalized or not. + */ + constructor(buffer: WebGLBuffer, type: number, itemSize: number, elementSize: number, count: number, normalized?: boolean); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isGLBufferAttribute: boolean; + /** + * The name of the buffer attribute. + * + * @type {string} + */ + name: string; + /** + * The native WebGL buffer. + * + * @type {WebGLBuffer} + */ + buffer: WebGLBuffer; + /** + * The native data type. + * + * @type {number} + */ + type: number; + /** + * The item size, see {@link BufferAttribute#itemSize}. + * + * @type {number} + */ + itemSize: number; + /** + * The corresponding size (in bytes) for the given `type` parameter. + * + * @type {number} + */ + elementSize: number; + /** + * The expected number of vertices in VBO. + * + * @type {number} + */ + count: number; + /** + * Applies to integer data only. Indicates how the underlying data in the buffer maps to + * the values in the GLSL code. For instance, if `buffer` contains data of `gl.UNSIGNED_SHORT`, + * and `normalized` is `true`, the values `0 - +65535` in the buffer data will be mapped to + * `0.0f - +1.0f` in the GLSL attribute. If `normalized` is `false`, the values will be converted + * to floats unmodified, i.e. `65535` becomes `65535.0f`. + * + * @type {boolean} + */ + normalized: boolean; + /** + * A version number, incremented every time the `needsUpdate` is set to `true`. + * + * @type {number} + */ + version: number; + /** + * Flag to indicate that this attribute has changed and should be re-sent to + * the GPU. Set this to `true` when you modify the value of the array. + * + * @type {number} + * @default false + * @param {boolean} value + */ + set needsUpdate(value: boolean); + /** + * Sets the given native WebGL buffer. + * + * @param {WebGLBuffer} buffer - The buffer to set. + * @return {BufferAttribute} A reference to this instance. + */ + setBuffer(buffer: WebGLBuffer): BufferAttribute; + /** + * Sets the given native data type and element size. + * + * @param {number} type - The native data type (e.g. `gl.FLOAT`). + * @param {number} elementSize - The corresponding size (in bytes) for the given `type` parameter. + * @return {BufferAttribute} A reference to this instance. + */ + setType(type: number, elementSize: number): BufferAttribute; + /** + * Sets the item size. + * + * @param {number} itemSize - The item size. + * @return {BufferAttribute} A reference to this instance. + */ + setItemSize(itemSize: number): BufferAttribute; + /** + * Sets the count (the expected number of vertices in VBO). + * + * @param {number} count - The count. + * @return {BufferAttribute} A reference to this instance. + */ + setCount(count: number): BufferAttribute; +} diff --git a/jsdoc-testing/jsdoc/src/core/InstancedBufferAttribute.d.ts b/jsdoc-testing/jsdoc/src/core/InstancedBufferAttribute.d.ts new file mode 100644 index 000000000..aed6b3ff4 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/core/InstancedBufferAttribute.d.ts @@ -0,0 +1,36 @@ +/** + * An instanced version of a buffer attribute. + * + * @augments BufferAttribute + */ +export class InstancedBufferAttribute extends BufferAttribute { + /** + * Constructs a new instanced buffer attribute. + * + * @param {TypedArray} array - The array holding the attribute data. + * @param {number} itemSize - The item size. + * @param {boolean} [normalized=false] - Whether the data are normalized or not. + * @param {number} [meshPerAttribute=1] - How often a value of this buffer attribute should be repeated. + */ + constructor(array: TypedArray, itemSize: number, normalized?: boolean, meshPerAttribute?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isInstancedBufferAttribute: boolean; + /** + * Defines how often a value of this buffer attribute should be repeated. A + * value of one means that each value of the instanced attribute is used for + * a single instance. A value of two means that each value is used for two + * consecutive instances (and so on). + * + * @type {number} + * @default 1 + */ + meshPerAttribute: number; + copy(source: any): this; +} +import { BufferAttribute } from './BufferAttribute.js'; diff --git a/jsdoc-testing/jsdoc/src/core/InstancedBufferGeometry.d.ts b/jsdoc-testing/jsdoc/src/core/InstancedBufferGeometry.d.ts new file mode 100644 index 000000000..4ea16abdd --- /dev/null +++ b/jsdoc-testing/jsdoc/src/core/InstancedBufferGeometry.d.ts @@ -0,0 +1,22 @@ +/** + * An instanced version of a geometry. + */ +export class InstancedBufferGeometry extends BufferGeometry { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isInstancedBufferGeometry: boolean; + /** + * The instance count. + * + * @type {number} + * @default Infinity + */ + instanceCount: number; + copy(source: any): this; +} +import { BufferGeometry } from './BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/core/InstancedInterleavedBuffer.d.ts b/jsdoc-testing/jsdoc/src/core/InstancedInterleavedBuffer.d.ts new file mode 100644 index 000000000..3f95ae1bb --- /dev/null +++ b/jsdoc-testing/jsdoc/src/core/InstancedInterleavedBuffer.d.ts @@ -0,0 +1,35 @@ +/** + * An instanced version of an interleaved buffer. + * + * @augments InterleavedBuffer + */ +export class InstancedInterleavedBuffer extends InterleavedBuffer { + /** + * Constructs a new instanced interleaved buffer. + * + * @param {TypedArray} array - A typed array with a shared buffer storing attribute data. + * @param {number} stride - The number of typed-array elements per vertex. + * @param {number} [meshPerAttribute=1] - Defines how often a value of this interleaved buffer should be repeated. + */ + constructor(array: TypedArray, stride: number, meshPerAttribute?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isInstancedInterleavedBuffer: boolean; + /** + * Defines how often a value of this buffer attribute should be repeated, + * see {@link InstancedBufferAttribute#meshPerAttribute}. + * + * @type {number} + * @default 1 + */ + meshPerAttribute: number; + copy(source: any): this; + clone(data: any): InterleavedBuffer; + toJSON(data: any): Object; +} +import { InterleavedBuffer } from './InterleavedBuffer.js'; diff --git a/jsdoc-testing/jsdoc/src/core/InterleavedBuffer.d.ts b/jsdoc-testing/jsdoc/src/core/InterleavedBuffer.d.ts new file mode 100644 index 000000000..c6054ce83 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/core/InterleavedBuffer.d.ts @@ -0,0 +1,153 @@ +/** + * "Interleaved" means that multiple attributes, possibly of different types, + * (e.g., position, normal, uv, color) are packed into a single array buffer. + * + * An introduction into interleaved arrays can be found here: [Interleaved array basics](https://blog.tojicode.com/2011/05/interleaved-array-basics.html) + */ +export class InterleavedBuffer { + /** + * Constructs a new interleaved buffer. + * + * @param {TypedArray} array - A typed array with a shared buffer storing attribute data. + * @param {number} stride - The number of typed-array elements per vertex. + */ + constructor(array: TypedArray, stride: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isInterleavedBuffer: boolean; + /** + * A typed array with a shared buffer storing attribute data. + * + * @type {TypedArray} + */ + array: TypedArray; + /** + * The number of typed-array elements per vertex. + * + * @type {number} + */ + stride: number; + /** + * The total number of elements in the array + * + * @type {number} + * @readonly + */ + readonly count: number; + /** + * Defines the intended usage pattern of the data store for optimization purposes. + * + * Note: After the initial use of a buffer, its usage cannot be changed. Instead, + * instantiate a new one and set the desired usage before the next render. + * + * @type {(StaticDrawUsage|DynamicDrawUsage|StreamDrawUsage|StaticReadUsage|DynamicReadUsage|StreamReadUsage|StaticCopyUsage|DynamicCopyUsage|StreamCopyUsage)} + * @default StaticDrawUsage + */ + usage: (number | DynamicDrawUsage | StreamDrawUsage | StaticReadUsage | DynamicReadUsage | StreamReadUsage | StaticCopyUsage | DynamicCopyUsage | StreamCopyUsage); + /** + * This can be used to only update some components of stored vectors (for example, just the + * component related to color). Use the `addUpdateRange()` function to add ranges to this array. + * + * @type {Array} + */ + updateRanges: Array; + /** + * A version number, incremented every time the `needsUpdate` is set to `true`. + * + * @type {number} + */ + version: number; + /** + * The UUID of the interleaved buffer. + * + * @type {string} + * @readonly + */ + readonly uuid: string; + /** + * A callback function that is executed after the renderer has transferred the attribute array + * data to the GPU. + */ + onUploadCallback(): void; + /** + * Flag to indicate that this attribute has changed and should be re-sent to + * the GPU. Set this to `true` when you modify the value of the array. + * + * @type {number} + * @default false + * @param {boolean} value + */ + set needsUpdate(value: boolean); + /** + * Sets the usage of this interleaved buffer. + * + * @param {(StaticDrawUsage|DynamicDrawUsage|StreamDrawUsage|StaticReadUsage|DynamicReadUsage|StreamReadUsage|StaticCopyUsage|DynamicCopyUsage|StreamCopyUsage)} value - The usage to set. + * @return {InterleavedBuffer} A reference to this interleaved buffer. + */ + setUsage(value: (number | DynamicDrawUsage | StreamDrawUsage | StaticReadUsage | DynamicReadUsage | StreamReadUsage | StaticCopyUsage | DynamicCopyUsage | StreamCopyUsage)): InterleavedBuffer; + /** + * Adds a range of data in the data array to be updated on the GPU. + * + * @param {number} start - Position at which to start update. + * @param {number} count - The number of components to update. + */ + addUpdateRange(start: number, count: number): void; + /** + * Clears the update ranges. + */ + clearUpdateRanges(): void; + /** + * Copies the values of the given interleaved buffer to this instance. + * + * @param {InterleavedBuffer} source - The interleaved buffer to copy. + * @return {InterleavedBuffer} A reference to this instance. + */ + copy(source: InterleavedBuffer): InterleavedBuffer; + /** + * Copies a vector from the given interleaved buffer to this one. The start + * and destination position in the attribute buffers are represented by the + * given indices. + * + * @param {number} index1 - The destination index into this interleaved buffer. + * @param {InterleavedBuffer} interleavedBuffer - The interleaved buffer to copy from. + * @param {number} index2 - The source index into the given interleaved buffer. + * @return {InterleavedBuffer} A reference to this instance. + */ + copyAt(index1: number, interleavedBuffer: InterleavedBuffer, index2: number): InterleavedBuffer; + /** + * Sets the given array data in the interleaved buffer. + * + * @param {(TypedArray|Array)} value - The array data to set. + * @param {number} [offset=0] - The offset in this interleaved buffer's array. + * @return {InterleavedBuffer} A reference to this instance. + */ + set(value: (TypedArray | any[]), offset?: number): InterleavedBuffer; + /** + * Returns a new interleaved buffer with copied values from this instance. + * + * @param {Object} [data] - An object with shared array buffers that allows to retain shared structures. + * @return {InterleavedBuffer} A clone of this instance. + */ + clone(data?: Object): InterleavedBuffer; + /** + * Sets the given callback function that is executed after the Renderer has transferred + * the array data to the GPU. Can be used to perform clean-up operations after + * the upload when data are not needed anymore on the CPU side. + * + * @param {Function} callback - The `onUpload()` callback. + * @return {InterleavedBuffer} A reference to this instance. + */ + onUpload(callback: Function): InterleavedBuffer; + /** + * Serializes the interleaved buffer into JSON. + * + * @param {Object} [data] - An optional value holding meta information about the serialization. + * @return {Object} A JSON object representing the serialized interleaved buffer. + */ + toJSON(data?: Object): Object; +} diff --git a/jsdoc-testing/jsdoc/src/core/InterleavedBufferAttribute.d.ts b/jsdoc-testing/jsdoc/src/core/InterleavedBufferAttribute.d.ts new file mode 100644 index 000000000..8fd60911e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/core/InterleavedBufferAttribute.d.ts @@ -0,0 +1,226 @@ +/** + * An alternative version of a buffer attribute with interleaved data. Interleaved + * attributes share a common interleaved data storage ({@link InterleavedBuffer}) and refer with + * different offsets into the buffer. + */ +export class InterleavedBufferAttribute { + /** + * Constructs a new interleaved buffer attribute. + * + * @param {InterleavedBuffer} interleavedBuffer - The buffer holding the interleaved data. + * @param {number} itemSize - The item size. + * @param {number} offset - The attribute offset into the buffer. + * @param {boolean} [normalized=false] - Whether the data are normalized or not. + */ + constructor(interleavedBuffer: InterleavedBuffer, itemSize: number, offset: number, normalized?: boolean); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isInterleavedBufferAttribute: boolean; + /** + * The name of the buffer attribute. + * + * @type {string} + */ + name: string; + /** + * The buffer holding the interleaved data. + * + * @type {InterleavedBuffer} + */ + data: InterleavedBuffer; + /** + * The item size, see {@link BufferAttribute#itemSize}. + * + * @type {number} + */ + itemSize: number; + /** + * The attribute offset into the buffer. + * + * @type {number} + */ + offset: number; + /** + * Whether the data are normalized or not, see {@link BufferAttribute#normalized} + * + * @type {InterleavedBuffer} + */ + normalized: InterleavedBuffer; + /** + * The item count of this buffer attribute. + * + * @type {number} + * @readonly + */ + readonly get count(): number; + /** + * The array holding the interleaved buffer attribute data. + * + * @type {TypedArray} + */ + get array(): TypedArray; + /** + * Flag to indicate that this attribute has changed and should be re-sent to + * the GPU. Set this to `true` when you modify the value of the array. + * + * @type {number} + * @default false + * @param {boolean} value + */ + set needsUpdate(value: boolean); + /** + * Applies the given 4x4 matrix to the given attribute. Only works with + * item size `3`. + * + * @param {Matrix4} m - The matrix to apply. + * @return {InterleavedBufferAttribute} A reference to this instance. + */ + applyMatrix4(m: Matrix4): InterleavedBufferAttribute; + /** + * Applies the given 3x3 normal matrix to the given attribute. Only works with + * item size `3`. + * + * @param {Matrix3} m - The normal matrix to apply. + * @return {InterleavedBufferAttribute} A reference to this instance. + */ + applyNormalMatrix(m: Matrix3): InterleavedBufferAttribute; + /** + * Applies the given 4x4 matrix to the given attribute. Only works with + * item size `3` and with direction vectors. + * + * @param {Matrix4} m - The matrix to apply. + * @return {InterleavedBufferAttribute} A reference to this instance. + */ + transformDirection(m: Matrix4): InterleavedBufferAttribute; + /** + * Returns the given component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @param {number} component - The component index. + * @return {number} The returned value. + */ + getComponent(index: number, component: number): number; + /** + * Sets the given value to the given component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @param {number} component - The component index. + * @param {number} value - The value to set. + * @return {InterleavedBufferAttribute} A reference to this instance. + */ + setComponent(index: number, component: number, value: number): InterleavedBufferAttribute; + /** + * Sets the x component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @param {number} x - The value to set. + * @return {InterleavedBufferAttribute} A reference to this instance. + */ + setX(index: number, x: number): InterleavedBufferAttribute; + /** + * Sets the y component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @param {number} y - The value to set. + * @return {InterleavedBufferAttribute} A reference to this instance. + */ + setY(index: number, y: number): InterleavedBufferAttribute; + /** + * Sets the z component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @param {number} z - The value to set. + * @return {InterleavedBufferAttribute} A reference to this instance. + */ + setZ(index: number, z: number): InterleavedBufferAttribute; + /** + * Sets the w component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @param {number} w - The value to set. + * @return {InterleavedBufferAttribute} A reference to this instance. + */ + setW(index: number, w: number): InterleavedBufferAttribute; + /** + * Returns the x component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @return {number} The x component. + */ + getX(index: number): number; + /** + * Returns the y component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @return {number} The y component. + */ + getY(index: number): number; + /** + * Returns the z component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @return {number} The z component. + */ + getZ(index: number): number; + /** + * Returns the w component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @return {number} The w component. + */ + getW(index: number): number; + /** + * Sets the x and y component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @param {number} x - The value for the x component to set. + * @param {number} y - The value for the y component to set. + * @return {InterleavedBufferAttribute} A reference to this instance. + */ + setXY(index: number, x: number, y: number): InterleavedBufferAttribute; + /** + * Sets the x, y and z component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @param {number} x - The value for the x component to set. + * @param {number} y - The value for the y component to set. + * @param {number} z - The value for the z component to set. + * @return {InterleavedBufferAttribute} A reference to this instance. + */ + setXYZ(index: number, x: number, y: number, z: number): InterleavedBufferAttribute; + /** + * Sets the x, y, z and w component of the vector at the given index. + * + * @param {number} index - The index into the buffer attribute. + * @param {number} x - The value for the x component to set. + * @param {number} y - The value for the y component to set. + * @param {number} z - The value for the z component to set. + * @param {number} w - The value for the w component to set. + * @return {InterleavedBufferAttribute} A reference to this instance. + */ + setXYZW(index: number, x: number, y: number, z: number, w: number): InterleavedBufferAttribute; + /** + * Returns a new buffer attribute with copied values from this instance. + * + * If no parameter is provided, cloning an interleaved buffer attribute will de-interleave buffer data. + * + * @param {Object} [data] - An object with interleaved buffers that allows to retain the interleaved property. + * @return {BufferAttribute|InterleavedBufferAttribute} A clone of this instance. + */ + clone(data?: Object): BufferAttribute | InterleavedBufferAttribute; + /** + * Serializes the buffer attribute into JSON. + * + * If no parameter is provided, cloning an interleaved buffer attribute will de-interleave buffer data. + * + * @param {Object} [data] - An optional value holding meta information about the serialization. + * @return {Object} A JSON object representing the serialized buffer attribute. + */ + toJSON(data?: Object): Object; +} +import { BufferAttribute } from './BufferAttribute.js'; diff --git a/jsdoc-testing/jsdoc/src/core/Layers.d.ts b/jsdoc-testing/jsdoc/src/core/Layers.d.ts new file mode 100644 index 000000000..34b3c6175 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/core/Layers.d.ts @@ -0,0 +1,68 @@ +/** + * A layers object assigns an 3D object to 1 or more of 32 + * layers numbered `0` to `31` - internally the layers are stored as a + * bit mask], and by default all 3D objects are a member of layer `0`. + * + * This can be used to control visibility - an object must share a layer with + * a camera to be visible when that camera's view is + * rendered. + * + * All classes that inherit from {@link Object3D} have an `layers` property which + * is an instance of this class. + */ +export class Layers { + /** + * A bit mask storing which of the 32 layers this layers object is currently + * a member of. + * + * @type {number} + */ + mask: number; + /** + * Sets membership to the given layer, and remove membership all other layers. + * + * @param {number} layer - The layer to set. + */ + set(layer: number): void; + /** + * Adds membership of the given layer. + * + * @param {number} layer - The layer to enable. + */ + enable(layer: number): void; + /** + * Adds membership to all layers. + */ + enableAll(): void; + /** + * Toggles the membership of the given layer. + * + * @param {number} layer - The layer to toggle. + */ + toggle(layer: number): void; + /** + * Removes membership of the given layer. + * + * @param {number} layer - The layer to enable. + */ + disable(layer: number): void; + /** + * Removes the membership from all layers. + */ + disableAll(): void; + /** + * Returns `true` if this and the given layers object have at least one + * layer in common. + * + * @param {Layers} layers - The layers to test. + * @return {boolean } Whether this and the given layers object have at least one layer in common or not. + */ + test(layers: Layers): boolean; + /** + * Returns `true` if the given layer is enabled. + * + * @param {number} layer - The layer to test. + * @return {boolean } Whether the given layer is enabled or not. + */ + isEnabled(layer: number): boolean; +} diff --git a/jsdoc-testing/jsdoc/src/core/Object3D.d.ts b/jsdoc-testing/jsdoc/src/core/Object3D.d.ts new file mode 100644 index 000000000..b6e8715c8 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/core/Object3D.d.ts @@ -0,0 +1,584 @@ +/** + * This is the base class for most objects in three.js and provides a set of + * properties and methods for manipulating objects in 3D space. + * + * @augments EventDispatcher + */ +export class Object3D extends EventDispatcher { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isObject3D: boolean; + /** + * The UUID of the 3D object. + * + * @type {string} + * @readonly + */ + readonly uuid: string; + /** + * The name of the 3D object. + * + * @type {string} + */ + name: string; + /** + * The type property is used for detecting the object type + * in context of serialization/deserialization. + * + * @type {string} + * @readonly + */ + readonly type: string; + /** + * A reference to the parent object. + * + * @type {?Object3D} + * @default null + */ + parent: Object3D | null; + /** + * An array holding the child 3D objects of this instance. + * + * @type {Array} + */ + children: Array; + /** + * Defines the `up` direction of the 3D object which influences + * the orientation via methods like {@link Object3D#lookAt}. + * + * The default values for all 3D objects is defined by `Object3D.DEFAULT_UP`. + * + * @type {Vector3} + */ + up: Vector3; + /** + * Represents the object's transformation matrix in local space. + * + * @type {Matrix4} + */ + matrix: Matrix4; + /** + * Represents the object's transformation matrix in world space. + * If the 3D object has no parent, then it's identical to the local transformation matrix + * + * @type {Matrix4} + */ + matrixWorld: Matrix4; + /** + * When set to `true`, the engine automatically computes the local matrix from position, + * rotation and scale every frame. If set to `false`, the app is responsible for recomputing + * the local matrix by calling `updateMatrix()`. + * + * The default values for all 3D objects is defined by `Object3D.DEFAULT_MATRIX_AUTO_UPDATE`. + * + * @type {boolean} + * @default true + */ + matrixAutoUpdate: boolean; + /** + * When set to `true`, the engine automatically computes the world matrix from the current local + * matrix and the object's transformation hierarchy. If set to `false`, the app is responsible for + * recomputing the world matrix by directly updating the `matrixWorld` property. + * + * The default values for all 3D objects is defined by `Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE`. + * + * @type {boolean} + * @default true + */ + matrixWorldAutoUpdate: boolean; + /** + * When set to `true`, it calculates the world matrix in that frame and resets this property + * to `false`. + * + * @type {boolean} + * @default false + */ + matrixWorldNeedsUpdate: boolean; + /** + * The layer membership of the 3D object. The 3D object is only visible if it has + * at least one layer in common with the camera in use. This property can also be + * used to filter out unwanted objects in ray-intersection tests when using {@link Raycaster}. + * + * @type {Layers} + */ + layers: Layers; + /** + * When set to `true`, the 3D object gets rendered. + * + * @type {boolean} + * @default true + */ + visible: boolean; + /** + * When set to `true`, the 3D object gets rendered into shadow maps. + * + * @type {boolean} + * @default false + */ + castShadow: boolean; + /** + * When set to `true`, the 3D object is affected by shadows in the scene. + * + * @type {boolean} + * @default false + */ + receiveShadow: boolean; + /** + * When set to `true`, the 3D object is honored by view frustum culling. + * + * @type {boolean} + * @default true + */ + frustumCulled: boolean; + /** + * This value allows the default rendering order of scene graph objects to be + * overridden although opaque and transparent objects remain sorted independently. + * When this property is set for an instance of {@link Group},all descendants + * objects will be sorted and rendered together. Sorting is from lowest to highest + * render order. + * + * @type {number} + * @default 0 + */ + renderOrder: number; + /** + * An array holding the animation clips of the 3D object. + * + * @type {Array} + */ + animations: Array; + /** + * Custom depth material to be used when rendering to the depth map. Can only be used + * in context of meshes. When shadow-casting with a {@link DirectionalLight} or {@link SpotLight}, + * if you are modifying vertex positions in the vertex shader you must specify a custom depth + * material for proper shadows. + * + * Only relevant in context of {@link WebGLRenderer}. + * + * @type {(Material|undefined)} + * @default undefined + */ + customDepthMaterial: (Material | undefined); + /** + * Same as {@link Object3D#customDepthMaterial}, but used with {@link PointLight}. + * + * Only relevant in context of {@link WebGLRenderer}. + * + * @type {(Material|undefined)} + * @default undefined + */ + customDistanceMaterial: (Material | undefined); + /** + * Whether the 3D object is supposed to be static or not. If set to `true`, it means + * the 3D object is not going to be changed after the initial renderer. This includes + * geometry and material settings. A static 3D object can be processed by the renderer + * slightly faster since certain state checks can be bypassed. + * + * Only relevant in context of {@link WebGPURenderer}. + * + * @type {boolean} + * @default false + */ + static: boolean; + /** + * An object that can be used to store custom data about the 3D object. It + * should not hold references to functions as these will not be cloned. + * + * @type {Object} + */ + userData: Object; + /** + * The pivot point for rotation and scale transformations. + * When set, rotation and scale are applied around this point + * instead of the object's origin. + * + * @type {?Vector3} + * @default null + */ + pivot: Vector3 | null; + /** + * A callback that is executed immediately before a 3D object is rendered to a shadow map. + * + * @param {Renderer|WebGLRenderer} renderer - The renderer. + * @param {Object3D} object - The 3D object. + * @param {Camera} camera - The camera that is used to render the scene. + * @param {Camera} shadowCamera - The shadow camera. + * @param {BufferGeometry} geometry - The 3D object's geometry. + * @param {Material} depthMaterial - The depth material. + * @param {Object} group - The geometry group data. + */ + onBeforeShadow(): void; + /** + * A callback that is executed immediately after a 3D object is rendered to a shadow map. + * + * @param {Renderer|WebGLRenderer} renderer - The renderer. + * @param {Object3D} object - The 3D object. + * @param {Camera} camera - The camera that is used to render the scene. + * @param {Camera} shadowCamera - The shadow camera. + * @param {BufferGeometry} geometry - The 3D object's geometry. + * @param {Material} depthMaterial - The depth material. + * @param {Object} group - The geometry group data. + */ + onAfterShadow(): void; + /** + * A callback that is executed immediately before a 3D object is rendered. + * + * @param {Renderer|WebGLRenderer} renderer - The renderer. + * @param {Object3D} object - The 3D object. + * @param {Camera} camera - The camera that is used to render the scene. + * @param {BufferGeometry} geometry - The 3D object's geometry. + * @param {Material} material - The 3D object's material. + * @param {Object} group - The geometry group data. + */ + onBeforeRender(): void; + /** + * A callback that is executed immediately after a 3D object is rendered. + * + * @param {Renderer|WebGLRenderer} renderer - The renderer. + * @param {Object3D} object - The 3D object. + * @param {Camera} camera - The camera that is used to render the scene. + * @param {BufferGeometry} geometry - The 3D object's geometry. + * @param {Material} material - The 3D object's material. + * @param {Object} group - The geometry group data. + */ + onAfterRender(): void; + /** + * Applies the given transformation matrix to the object and updates the object's position, + * rotation and scale. + * + * @param {Matrix4} matrix - The transformation matrix. + */ + applyMatrix4(matrix: Matrix4): void; + /** + * Applies a rotation represented by given the quaternion to the 3D object. + * + * @param {Quaternion} q - The quaternion. + * @return {Object3D} A reference to this instance. + */ + applyQuaternion(q: Quaternion): Object3D; + /** + * Sets the given rotation represented as an axis/angle couple to the 3D object. + * + * @param {Vector3} axis - The (normalized) axis vector. + * @param {number} angle - The angle in radians. + */ + setRotationFromAxisAngle(axis: Vector3, angle: number): void; + /** + * Sets the given rotation represented as Euler angles to the 3D object. + * + * @param {Euler} euler - The Euler angles. + */ + setRotationFromEuler(euler: Euler): void; + /** + * Sets the given rotation represented as rotation matrix to the 3D object. + * + * @param {Matrix4} m - Although a 4x4 matrix is expected, the upper 3x3 portion must be + * a pure rotation matrix (i.e, unscaled). + */ + setRotationFromMatrix(m: Matrix4): void; + /** + * Sets the given rotation represented as a Quaternion to the 3D object. + * + * @param {Quaternion} q - The Quaternion + */ + setRotationFromQuaternion(q: Quaternion): void; + /** + * Rotates the 3D object along an axis in local space. + * + * @param {Vector3} axis - The (normalized) axis vector. + * @param {number} angle - The angle in radians. + * @return {Object3D} A reference to this instance. + */ + rotateOnAxis(axis: Vector3, angle: number): Object3D; + /** + * Rotates the 3D object along an axis in world space. + * + * @param {Vector3} axis - The (normalized) axis vector. + * @param {number} angle - The angle in radians. + * @return {Object3D} A reference to this instance. + */ + rotateOnWorldAxis(axis: Vector3, angle: number): Object3D; + /** + * Rotates the 3D object around its X axis in local space. + * + * @param {number} angle - The angle in radians. + * @return {Object3D} A reference to this instance. + */ + rotateX(angle: number): Object3D; + /** + * Rotates the 3D object around its Y axis in local space. + * + * @param {number} angle - The angle in radians. + * @return {Object3D} A reference to this instance. + */ + rotateY(angle: number): Object3D; + /** + * Rotates the 3D object around its Z axis in local space. + * + * @param {number} angle - The angle in radians. + * @return {Object3D} A reference to this instance. + */ + rotateZ(angle: number): Object3D; + /** + * Translate the 3D object by a distance along the given axis in local space. + * + * @param {Vector3} axis - The (normalized) axis vector. + * @param {number} distance - The distance in world units. + * @return {Object3D} A reference to this instance. + */ + translateOnAxis(axis: Vector3, distance: number): Object3D; + /** + * Translate the 3D object by a distance along its X-axis in local space. + * + * @param {number} distance - The distance in world units. + * @return {Object3D} A reference to this instance. + */ + translateX(distance: number): Object3D; + /** + * Translate the 3D object by a distance along its Y-axis in local space. + * + * @param {number} distance - The distance in world units. + * @return {Object3D} A reference to this instance. + */ + translateY(distance: number): Object3D; + /** + * Translate the 3D object by a distance along its Z-axis in local space. + * + * @param {number} distance - The distance in world units. + * @return {Object3D} A reference to this instance. + */ + translateZ(distance: number): Object3D; + /** + * Converts the given vector from this 3D object's local space to world space. + * + * @param {Vector3} vector - The vector to convert. + * @return {Vector3} The converted vector. + */ + localToWorld(vector: Vector3): Vector3; + /** + * Converts the given vector from this 3D object's world space to local space. + * + * @param {Vector3} vector - The vector to convert. + * @return {Vector3} The converted vector. + */ + worldToLocal(vector: Vector3): Vector3; + /** + * Rotates the object to face a point in world space. + * + * This method does not support objects having non-uniformly-scaled parent(s). + * + * @param {number|Vector3} x - The x coordinate in world space. Alternatively, a vector representing a position in world space + * @param {number} [y] - The y coordinate in world space. + * @param {number} [z] - The z coordinate in world space. + */ + lookAt(x: number | Vector3, y?: number, z?: number): void; + /** + * Adds the given 3D object as a child to this 3D object. An arbitrary number of + * objects may be added. Any current parent on an object passed in here will be + * removed, since an object can have at most one parent. + * + * @fires Object3D#added + * @fires Object3D#childadded + * @param {Object3D} object - The 3D object to add. + * @return {Object3D} A reference to this instance. + */ + add(object: Object3D, ...args: any[]): Object3D; + /** + * Removes the given 3D object as child from this 3D object. + * An arbitrary number of objects may be removed. + * + * @fires Object3D#removed + * @fires Object3D#childremoved + * @param {Object3D} object - The 3D object to remove. + * @return {Object3D} A reference to this instance. + */ + remove(object: Object3D, ...args: any[]): Object3D; + /** + * Removes this 3D object from its current parent. + * + * @fires Object3D#removed + * @fires Object3D#childremoved + * @return {Object3D} A reference to this instance. + */ + removeFromParent(): Object3D; + /** + * Removes all child objects. + * + * @fires Object3D#removed + * @fires Object3D#childremoved + * @return {Object3D} A reference to this instance. + */ + clear(): Object3D; + /** + * Adds the given 3D object as a child of this 3D object, while maintaining the object's world + * transform. This method does not support scene graphs having non-uniformly-scaled nodes(s). + * + * @fires Object3D#added + * @fires Object3D#childadded + * @param {Object3D} object - The 3D object to attach. + * @return {Object3D} A reference to this instance. + */ + attach(object: Object3D): Object3D; + /** + * Searches through the 3D object and its children, starting with the 3D object + * itself, and returns the first with a matching ID. + * + * @param {number} id - The id. + * @return {Object3D|undefined} The found 3D object. Returns `undefined` if no 3D object has been found. + */ + getObjectById(id: number): Object3D | undefined; + /** + * Searches through the 3D object and its children, starting with the 3D object + * itself, and returns the first with a matching name. + * + * @param {string} name - The name. + * @return {Object3D|undefined} The found 3D object. Returns `undefined` if no 3D object has been found. + */ + getObjectByName(name: string): Object3D | undefined; + /** + * Searches through the 3D object and its children, starting with the 3D object + * itself, and returns the first with a matching property value. + * + * @param {string} name - The name of the property. + * @param {any} value - The value. + * @return {Object3D|undefined} The found 3D object. Returns `undefined` if no 3D object has been found. + */ + getObjectByProperty(name: string, value: any): Object3D | undefined; + /** + * Searches through the 3D object and its children, starting with the 3D object + * itself, and returns all 3D objects with a matching property value. + * + * @param {string} name - The name of the property. + * @param {any} value - The value. + * @param {Array} result - The method stores the result in this array. + * @return {Array} The found 3D objects. + */ + getObjectsByProperty(name: string, value: any, result?: Array): Array; + /** + * Returns a vector representing the position of the 3D object in world space. + * + * @param {Vector3} target - The target vector the result is stored to. + * @return {Vector3} The 3D object's position in world space. + */ + getWorldPosition(target: Vector3): Vector3; + /** + * Returns a Quaternion representing the position of the 3D object in world space. + * + * @param {Quaternion} target - The target Quaternion the result is stored to. + * @return {Quaternion} The 3D object's rotation in world space. + */ + getWorldQuaternion(target: Quaternion): Quaternion; + /** + * Returns a vector representing the scale of the 3D object in world space. + * + * @param {Vector3} target - The target vector the result is stored to. + * @return {Vector3} The 3D object's scale in world space. + */ + getWorldScale(target: Vector3): Vector3; + /** + * Returns a vector representing the ("look") direction of the 3D object in world space. + * + * @param {Vector3} target - The target vector the result is stored to. + * @return {Vector3} The 3D object's direction in world space. + */ + getWorldDirection(target: Vector3): Vector3; + /** + * Abstract method to get intersections between a casted ray and this + * 3D object. Renderable 3D objects such as {@link Mesh}, {@link Line} or {@link Points} + * implement this method in order to use raycasting. + * + * @abstract + * @param {Raycaster} raycaster - The raycaster. + * @param {Array} intersects - An array holding the result of the method. + */ + raycast(): void; + /** + * Executes the callback on this 3D object and all descendants. + * + * Note: Modifying the scene graph inside the callback is discouraged. + * + * @param {Function} callback - A callback function that allows to process the current 3D object. + */ + traverse(callback: Function): void; + /** + * Like {@link Object3D#traverse}, but the callback will only be executed for visible 3D objects. + * Descendants of invisible 3D objects are not traversed. + * + * Note: Modifying the scene graph inside the callback is discouraged. + * + * @param {Function} callback - A callback function that allows to process the current 3D object. + */ + traverseVisible(callback: Function): void; + /** + * Like {@link Object3D#traverse}, but the callback will only be executed for all ancestors. + * + * Note: Modifying the scene graph inside the callback is discouraged. + * + * @param {Function} callback - A callback function that allows to process the current 3D object. + */ + traverseAncestors(callback: Function): void; + /** + * Updates the transformation matrix in local space by computing it from the current + * position, rotation and scale values. + */ + updateMatrix(): void; + /** + * Updates the transformation matrix in world space of this 3D objects and its descendants. + * + * To ensure correct results, this method also recomputes the 3D object's transformation matrix in + * local space. The computation of the local and world matrix can be controlled with the + * {@link Object3D#matrixAutoUpdate} and {@link Object3D#matrixWorldAutoUpdate} flags which are both + * `true` by default. Set these flags to `false` if you need more control over the update matrix process. + * + * @param {boolean} [force=false] - When set to `true`, a recomputation of world matrices is forced even + * when {@link Object3D#matrixWorldNeedsUpdate} is `false`. + */ + updateMatrixWorld(force?: boolean): void; + /** + * An alternative version of {@link Object3D#updateMatrixWorld} with more control over the + * update of ancestor and descendant nodes. + * + * @param {boolean} [updateParents=false] Whether ancestor nodes should be updated or not. + * @param {boolean} [updateChildren=false] Whether descendant nodes should be updated or not. + */ + updateWorldMatrix(updateParents?: boolean, updateChildren?: boolean): void; + /** + * Serializes the 3D object into JSON. + * + * @param {?(Object|string)} meta - An optional value holding meta information about the serialization. + * @return {Object} A JSON object representing the serialized 3D object. + * @see {@link ObjectLoader#parse} + */ + toJSON(meta: (Object | string) | null): Object; + /** + * Returns a new 3D object with copied values from this instance. + * + * @param {boolean} [recursive=true] - When set to `true`, descendants of the 3D object are also cloned. + * @return {Object3D} A clone of this instance. + */ + clone(recursive?: boolean): Object3D; + /** + * Copies the values of the given 3D object to this instance. + * + * @param {Object3D} source - The 3D object to copy. + * @param {boolean} [recursive=true] - When set to `true`, descendants of the 3D object are cloned. + * @return {Object3D} A reference to this instance. + */ + copy(source: Object3D, recursive?: boolean): Object3D; +} +export namespace Object3D { + let DEFAULT_UP: Vector3; + let DEFAULT_MATRIX_AUTO_UPDATE: boolean; + let DEFAULT_MATRIX_WORLD_AUTO_UPDATE: boolean; +} +import { EventDispatcher } from './EventDispatcher.js'; +import { Vector3 } from '../math/Vector3.js'; +import { Matrix4 } from '../math/Matrix4.js'; +import { Layers } from './Layers.js'; +import { Quaternion } from '../math/Quaternion.js'; +import { Euler } from '../math/Euler.js'; diff --git a/jsdoc-testing/jsdoc/src/core/Raycaster.d.ts b/jsdoc-testing/jsdoc/src/core/Raycaster.d.ts new file mode 100644 index 000000000..aed4ba48a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/core/Raycaster.d.ts @@ -0,0 +1,145 @@ +/** + * This class is designed to assist with raycasting. Raycasting is used for + * mouse picking (working out what objects in the 3d space the mouse is over) + * amongst other things. + */ +export class Raycaster { + /** + * Constructs a new raycaster. + * + * @param {Vector3} origin - The origin vector where the ray casts from. + * @param {Vector3} direction - The (normalized) direction vector that gives direction to the ray. + * @param {number} [near=0] - All results returned are further away than near. Near can't be negative. + * @param {number} [far=Infinity] - All results returned are closer than far. Far can't be lower than near. + */ + constructor(origin: Vector3, direction: Vector3, near?: number, far?: number); + /** + * The ray used for raycasting. + * + * @type {Ray} + */ + ray: Ray; + /** + * All results returned are further away than near. Near can't be negative. + * + * @type {number} + * @default 0 + */ + near: number; + /** + * All results returned are closer than far. Far can't be lower than near. + * + * @type {number} + * @default Infinity + */ + far: number; + /** + * The camera to use when raycasting against view-dependent objects such as + * billboarded objects like sprites. This field can be set manually or + * is set when calling `setFromCamera()`. + * + * @type {?Camera} + * @default null + */ + camera: Camera | null; + /** + * Allows to selectively ignore 3D objects when performing intersection tests. + * The following code example ensures that only 3D objects on layer `1` will be + * honored by raycaster. + * ```js + * raycaster.layers.set( 1 ); + * object.layers.enable( 1 ); + * ``` + * + * @type {Layers} + */ + layers: Layers; + /** + * A parameter object that configures the raycasting. It has the structure: + * + * ``` + * { + * Mesh: {}, + * Line: { threshold: 1 }, + * LOD: {}, + * Points: { threshold: 1 }, + * Sprite: {} + * } + * ``` + * Where `threshold` is the precision of the raycaster when intersecting objects, in world units. + * + * @type {Object} + */ + params: Object; + /** + * Updates the ray with a new origin and direction by copying the values from the arguments. + * + * @param {Vector3} origin - The origin vector where the ray casts from. + * @param {Vector3} direction - The (normalized) direction vector that gives direction to the ray. + */ + set(origin: Vector3, direction: Vector3): void; + /** + * Uses the given coordinates and camera to compute a new origin and direction for the internal ray. + * + * @param {Vector2} coords - 2D coordinates of the mouse, in normalized device coordinates (NDC). + * X and Y components should be between `-1` and `1`. + * @param {Camera} camera - The camera from which the ray should originate. + */ + setFromCamera(coords: Vector2, camera: Camera): void; + /** + * Uses the given WebXR controller to compute a new origin and direction for the internal ray. + * + * @param {WebXRController} controller - The controller to copy the position and direction from. + * @return {Raycaster} A reference to this raycaster. + */ + setFromXRController(controller: WebXRController): Raycaster; + /** + * The intersection point of a raycaster intersection test. + * @typedef {Object} Raycaster~Intersection + * @property {number} distance - The distance from the ray's origin to the intersection point. + * @property {number} distanceToRay - Some 3D objects e.g. {@link Points} provide the distance of the + * intersection to the nearest point on the ray. For other objects it will be `undefined`. + * @property {Vector3} point - The intersection point, in world coordinates. + * @property {Object} face - The face that has been intersected. + * @property {number} faceIndex - The face index. + * @property {Object3D} object - The 3D object that has been intersected. + * @property {Vector2} uv - U,V coordinates at point of intersection. + * @property {Vector2} uv1 - Second set of U,V coordinates at point of intersection. + * @property {Vector3} normal - Interpolated normal vector at point of intersection. + * @property {number} instanceId - The index number of the instance where the ray + * intersects the {@link InstancedMesh}. + */ + /** + * Checks all intersection between the ray and the object with or without the + * descendants. Intersections are returned sorted by distance, closest first. + * + * `Raycaster` delegates to the `raycast()` method of the passed 3D object, when + * evaluating whether the ray intersects the object or not. This allows meshes to respond + * differently to ray casting than lines or points. + * + * Note that for meshes, faces must be pointed towards the origin of the ray in order + * to be detected; intersections of the ray passing through the back of a face will not + * be detected. To raycast against both faces of an object, you'll want to set {@link Material#side} + * to `THREE.DoubleSide`. + * + * @param {Object3D} object - The 3D object to check for intersection with the ray. + * @param {boolean} [recursive=true] - If set to `true`, it also checks all descendants. + * Otherwise it only checks intersection with the object. + * @param {Array} [intersects=[]] The target array that holds the result of the method. + * @return {Array} An array holding the intersection points. + */ + intersectObject(object: Object3D, recursive?: boolean, intersects?: any[]): Array; + /** + * Checks all intersection between the ray and the objects with or without + * the descendants. Intersections are returned sorted by distance, closest first. + * + * @param {Array} objects - The 3D objects to check for intersection with the ray. + * @param {boolean} [recursive=true] - If set to `true`, it also checks all descendants. + * Otherwise it only checks intersection with the object. + * @param {Array} [intersects=[]] The target array that holds the result of the method. + * @return {Array} An array holding the intersection points. + */ + intersectObjects(objects: Array, recursive?: boolean, intersects?: any[]): Array; +} +import { Ray } from '../math/Ray.js'; +import { Layers } from './Layers.js'; diff --git a/jsdoc-testing/jsdoc/src/core/RenderTarget.d.ts b/jsdoc-testing/jsdoc/src/core/RenderTarget.d.ts new file mode 100644 index 000000000..1b6fe91ad --- /dev/null +++ b/jsdoc-testing/jsdoc/src/core/RenderTarget.d.ts @@ -0,0 +1,207 @@ +/** + * A render target is a buffer where the video card draws pixels for a scene + * that is being rendered in the background. It is used in different effects, + * such as applying postprocessing to a rendered image before displaying it + * on the screen. + * + * @augments EventDispatcher + */ +export class RenderTarget extends EventDispatcher { + /** + * Render target options. + * + * @typedef {Object} RenderTarget~Options + * @property {boolean} [generateMipmaps=false] - Whether to generate mipmaps or not. + * @property {number} [magFilter=LinearFilter] - The mag filter. + * @property {number} [minFilter=LinearFilter] - The min filter. + * @property {number} [format=RGBAFormat] - The texture format. + * @property {number} [type=UnsignedByteType] - The texture type. + * @property {?string} [internalFormat=null] - The texture's internal format. + * @property {number} [wrapS=ClampToEdgeWrapping] - The texture's uv wrapping mode. + * @property {number} [wrapT=ClampToEdgeWrapping] - The texture's uv wrapping mode. + * @property {number} [anisotropy=1] - The texture's anisotropy value. + * @property {string} [colorSpace=NoColorSpace] - The texture's color space. + * @property {boolean} [depthBuffer=true] - Whether to allocate a depth buffer or not. + * @property {boolean} [stencilBuffer=false] - Whether to allocate a stencil buffer or not. + * @property {boolean} [resolveDepthBuffer=true] - Whether to resolve the depth buffer or not. + * @property {boolean} [resolveStencilBuffer=true] - Whether to resolve the stencil buffer or not. + * @property {?Texture} [depthTexture=null] - Reference to a depth texture. + * @property {number} [samples=0] - The MSAA samples count. + * @property {number} [count=1] - Defines the number of color attachments . Must be at least `1`. + * @property {number} [depth=1] - The texture depth. + * @property {boolean} [multiview=false] - Whether this target is used for multiview rendering (WebGL OVR_multiview2 extension). + * @property {boolean} [useArrayDepthTexture=false] - Whether to create the depth texture as an array texture for per-layer depth testing. This is separate from multiview so layered render targets can use array depth without the multiview extension. + */ + /** + * Constructs a new render target. + * + * @param {number} [width=1] - The width of the render target. + * @param {number} [height=1] - The height of the render target. + * @param {RenderTarget~Options} [options] - The configuration object. + */ + constructor(width?: number, height?: number, options?: {}); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isRenderTarget: boolean; + /** + * The width of the render target. + * + * @type {number} + * @default 1 + */ + width: number; + /** + * The height of the render target. + * + * @type {number} + * @default 1 + */ + height: number; + /** + * The depth of the render target. + * + * @type {number} + * @default 1 + */ + depth: number; + /** + * A rectangular area inside the render target's viewport. Fragments that are + * outside the area will be discarded. + * + * @type {Vector4} + * @default (0,0,width,height) + */ + scissor: Vector4; + /** + * Indicates whether the scissor test should be enabled when rendering into + * this render target or not. + * + * @type {boolean} + * @default false + */ + scissorTest: boolean; + /** + * A rectangular area representing the render target's viewport. + * + * @type {Vector4} + * @default (0,0,width,height) + */ + viewport: Vector4; + /** + * An array of textures. Each color attachment is represented as a separate texture. + * Has at least a single entry for the default color attachment. + * + * @type {Array} + */ + textures: Array; + /** + * Whether to allocate a depth buffer or not. + * + * @type {boolean} + * @default true + */ + depthBuffer: boolean; + /** + * Whether to allocate a stencil buffer or not. + * + * @type {boolean} + * @default false + */ + stencilBuffer: boolean; + /** + * Whether to resolve the depth buffer or not. + * + * @type {boolean} + * @default true + */ + resolveDepthBuffer: boolean; + /** + * Whether to resolve the stencil buffer or not. + * + * @type {boolean} + * @default true + */ + resolveStencilBuffer: boolean; + _depthTexture: any; + set depthTexture(current: DepthTexture | null); + /** + * Instead of saving the depth in a renderbuffer, a texture + * can be used instead which is useful for further processing + * e.g. in context of post-processing. + * + * @type {?DepthTexture} + * @default null + */ + get depthTexture(): DepthTexture | null; + /** + * The number of MSAA samples. + * + * A value of `0` disables MSAA. + * + * @type {number} + * @default 0 + */ + samples: number; + /** + * Whether to this target is used in multiview rendering. + * + * @type {boolean} + * @default false + */ + multiview: boolean; + /** + * Whether to create the depth texture as an array texture for per-layer depth testing. + * This is separate from multiview so layered render targets can use array depth without + * the multiview extension. + * + * @type {boolean} + * @default false + */ + useArrayDepthTexture: boolean; + _setTextureOptions(options?: {}): void; + set texture(value: Texture); + /** + * The texture representing the default color attachment. + * + * @type {Texture} + */ + get texture(): Texture; + /** + * Sets the size of this render target. + * + * @param {number} width - The width. + * @param {number} height - The height. + * @param {number} [depth=1] - The depth. + */ + setSize(width: number, height: number, depth?: number): void; + /** + * Returns a new render target with copied values from this instance. + * + * @return {RenderTarget} A clone of this instance. + */ + clone(): RenderTarget; + /** + * Copies the settings of the given render target. This is a structural copy so + * no resources are shared between render targets after the copy. That includes + * all MRT textures and the depth texture. + * + * @param {RenderTarget} source - The render target to copy. + * @return {RenderTarget} A reference to this instance. + */ + copy(source: RenderTarget): RenderTarget; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + * + * @fires RenderTarget#dispose + */ + dispose(): void; +} +import { EventDispatcher } from './EventDispatcher.js'; +import { Vector4 } from '../math/Vector4.js'; +import { Texture } from '../textures/Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/core/RenderTarget3D.d.ts b/jsdoc-testing/jsdoc/src/core/RenderTarget3D.d.ts new file mode 100644 index 000000000..11621efd2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/core/RenderTarget3D.d.ts @@ -0,0 +1,25 @@ +/** + * Represents a 3D render target. + * + * @augments RenderTarget + */ +export class RenderTarget3D extends RenderTarget { + /** + * Constructs a new 3D render target. + * + * @param {number} [width=1] - The width of the render target. + * @param {number} [height=1] - The height of the render target. + * @param {number} [depth=1] - The height of the render target. + * @param {RenderTarget~Options} [options] - The configuration object. + */ + constructor(width?: number, height?: number, depth?: number, options?: {}); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isRenderTarget3D: boolean; +} +import { RenderTarget } from './RenderTarget.js'; diff --git a/jsdoc-testing/jsdoc/src/core/Timer.d.ts b/jsdoc-testing/jsdoc/src/core/Timer.d.ts new file mode 100644 index 000000000..d47c2d4bd --- /dev/null +++ b/jsdoc-testing/jsdoc/src/core/Timer.d.ts @@ -0,0 +1,86 @@ +/** + * This class is an alternative to {@link Clock} with a different API design and behavior. + * The goal is to avoid the conceptual flaws that became apparent in `Clock` over time. + * + * - `Timer` has an `update()` method that updates its internal state. That makes it possible to + * call `getDelta()` and `getElapsed()` multiple times per simulation step without getting different values. + * - The class can make use of the Page Visibility API to avoid large time delta values when the app + * is inactive (e.g. tab switched or browser hidden). + * + * ```js + * const timer = new Timer(); + * timer.connect( document ); // use Page Visibility API + * ``` + */ +export class Timer { + _previousTime: number; + _currentTime: number; + _startTime: number; + _delta: number; + _elapsed: number; + _timescale: number; + _document: Document | null; + _pageVisibilityHandler: typeof handleVisibilityChange | null; + /** + * Connect the timer to the given document.Calling this method is not mandatory to + * use the timer but enables the usage of the Page Visibility API to avoid large time + * delta values. + * + * @param {Document} document - The document. + */ + connect(document: Document): void; + /** + * Disconnects the timer from the DOM and also disables the usage of the Page Visibility API. + */ + disconnect(): void; + /** + * Returns the time delta in seconds. + * + * @return {number} The time delta in second. + */ + getDelta(): number; + /** + * Returns the elapsed time in seconds. + * + * @return {number} The elapsed time in second. + */ + getElapsed(): number; + /** + * Returns the timescale. + * + * @return {number} The timescale. + */ + getTimescale(): number; + /** + * Sets the given timescale which scale the time delta computation + * in `update()`. + * + * @param {number} timescale - The timescale to set. + * @return {Timer} A reference to this timer. + */ + setTimescale(timescale: number): Timer; + /** + * Resets the time computation for the current simulation step. + * + * @return {Timer} A reference to this timer. + */ + reset(): Timer; + /** + * Can be used to free all internal resources. Usually called when + * the timer instance isn't required anymore. + */ + dispose(): void; + /** + * Updates the internal state of the timer. This method should be called + * once per simulation step and before you perform queries against the timer + * (e.g. via `getDelta()`). + * + * @param {number} timestamp - The current time in milliseconds. Can be obtained + * from the `requestAnimationFrame` callback argument. If not provided, the current + * time will be determined with `performance.now`. + * @return {Timer} A reference to this timer. + */ + update(timestamp: number): Timer; +} +declare function handleVisibilityChange(): void; +export {}; diff --git a/jsdoc-testing/jsdoc/src/core/Uniform.d.ts b/jsdoc-testing/jsdoc/src/core/Uniform.d.ts new file mode 100644 index 000000000..4febfde95 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/core/Uniform.d.ts @@ -0,0 +1,34 @@ +/** + * Represents a uniform which is a global shader variable. They are passed to shader programs. + * + * When declaring a uniform of a {@link ShaderMaterial}, it is declared by value or by object. + * ```js + * uniforms: { + * time: { value: 1.0 }, + * resolution: new Uniform( new Vector2() ) + * }; + * ``` + * Since this class can only be used in context of {@link ShaderMaterial}, it is only supported + * in {@link WebGLRenderer}. + */ +export class Uniform { + /** + * Constructs a new uniform. + * + * @param {any} value - The uniform value. + */ + constructor(value: any); + /** + * The uniform value. + * + * @type {any} + */ + value: any; + /** + * Returns a new uniform with copied values from this instance. + * If the value has a `clone()` method, the value is cloned as well. + * + * @return {Uniform} A clone of this instance. + */ + clone(): Uniform; +} diff --git a/jsdoc-testing/jsdoc/src/core/UniformsGroup.d.ts b/jsdoc-testing/jsdoc/src/core/UniformsGroup.d.ts new file mode 100644 index 000000000..fd08bb44b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/core/UniformsGroup.d.ts @@ -0,0 +1,87 @@ +/** + * A class for managing multiple uniforms in a single group. The renderer will process + * such a definition as a single UBO. + * + * Since this class can only be used in context of {@link ShaderMaterial}, it is only supported + * in {@link WebGLRenderer}. + * + * @augments EventDispatcher + */ +export class UniformsGroup extends EventDispatcher { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isUniformsGroup: boolean; + /** + * The name of the uniforms group. + * + * @type {string} + */ + name: string; + /** + * The buffer usage. + * + * @type {(StaticDrawUsage|DynamicDrawUsage|StreamDrawUsage|StaticReadUsage|DynamicReadUsage|StreamReadUsage|StaticCopyUsage|DynamicCopyUsage|StreamCopyUsage)} + * @default StaticDrawUsage + */ + usage: (number | DynamicDrawUsage | StreamDrawUsage | StaticReadUsage | DynamicReadUsage | StreamReadUsage | StaticCopyUsage | DynamicCopyUsage | StreamCopyUsage); + /** + * An array holding the uniforms. + * + * @type {Array} + */ + uniforms: Array; + /** + * Adds the given uniform to this uniforms group. + * + * @param {Uniform} uniform - The uniform to add. + * @return {UniformsGroup} A reference to this uniforms group. + */ + add(uniform: Uniform): UniformsGroup; + /** + * Removes the given uniform from this uniforms group. + * + * @param {Uniform} uniform - The uniform to remove. + * @return {UniformsGroup} A reference to this uniforms group. + */ + remove(uniform: Uniform): UniformsGroup; + /** + * Sets the name of this uniforms group. + * + * @param {string} name - The name to set. + * @return {UniformsGroup} A reference to this uniforms group. + */ + setName(name: string): UniformsGroup; + /** + * Sets the usage of this uniforms group. + * + * @param {(StaticDrawUsage|DynamicDrawUsage|StreamDrawUsage|StaticReadUsage|DynamicReadUsage|StreamReadUsage|StaticCopyUsage|DynamicCopyUsage|StreamCopyUsage)} value - The usage to set. + * @return {UniformsGroup} A reference to this uniforms group. + */ + setUsage(value: (number | DynamicDrawUsage | StreamDrawUsage | StaticReadUsage | DynamicReadUsage | StreamReadUsage | StaticCopyUsage | DynamicCopyUsage | StreamCopyUsage)): UniformsGroup; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + * + * @fires Texture#dispose + */ + dispose(): void; + /** + * Copies the values of the given uniforms group to this instance. + * + * @param {UniformsGroup} source - The uniforms group to copy. + * @return {UniformsGroup} A reference to this uniforms group. + */ + copy(source: UniformsGroup): UniformsGroup; + /** + * Returns a new uniforms group with copied values from this instance. + * + * @return {UniformsGroup} A clone of this instance. + */ + clone(): UniformsGroup; +} +import { EventDispatcher } from './EventDispatcher.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/Controls.d.ts b/jsdoc-testing/jsdoc/src/extras/Controls.d.ts new file mode 100644 index 000000000..f9b5a381f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/Controls.d.ts @@ -0,0 +1,93 @@ +/** + * Abstract base class for controls. + * + * @abstract + * @augments EventDispatcher + */ +export class Controls extends EventDispatcher { + /** + * Constructs a new controls instance. + * + * @param {Object3D} object - The object that is managed by the controls. + * @param {?HTMLElement} domElement - The HTML element used for event listeners. + */ + constructor(object: Object3D, domElement?: HTMLElement | null); + /** + * The object that is managed by the controls. + * + * @type {Object3D} + */ + object: Object3D; + /** + * The HTML element used for event listeners. + * + * @type {?HTMLElement} + * @default null + */ + domElement: HTMLElement | null; + /** + * Whether the controls responds to user input or not. + * + * @type {boolean} + * @default true + */ + enabled: boolean; + /** + * The internal state of the controls. + * + * @type {number} + * @default -1 + */ + state: number; + /** + * This object defines the keyboard input of the controls. + * + * @type {Object} + */ + keys: Object; + /** + * This object defines what type of actions are assigned to the available mouse buttons. + * It depends on the control implementation what kind of mouse buttons and actions are supported. + * + * @type {{LEFT: ?number, MIDDLE: ?number, RIGHT: ?number}} + */ + mouseButtons: { + LEFT: number | null; + MIDDLE: number | null; + RIGHT: number | null; + }; + /** + * This object defines what type of actions are assigned to what kind of touch interaction. + * It depends on the control implementation what kind of touch interaction and actions are supported. + * + * @type {{ONE: ?number, TWO: ?number}} + */ + touches: { + ONE: number | null; + TWO: number | null; + }; + /** + * Connects the controls to the DOM. This method has so called "side effects" since + * it adds the module's event listeners to the DOM. + * + * @param {HTMLElement} element - The DOM element to connect to. + */ + connect(element: HTMLElement): void; + /** + * Disconnects the controls from the DOM. + */ + disconnect(): void; + /** + * Call this method if you no longer want use to the controls. It frees all internal + * resources and removes all event listeners. + */ + dispose(): void; + /** + * Controls should implement this method if they have to update their internal state + * per simulation step. + * + * @param {number} [delta] - The time delta in seconds. + */ + update(): void; +} +import { EventDispatcher } from '../core/EventDispatcher.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/DataUtils.d.ts b/jsdoc-testing/jsdoc/src/extras/DataUtils.d.ts new file mode 100644 index 000000000..66cfe1590 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/DataUtils.d.ts @@ -0,0 +1,39 @@ +/** + * Returns a half precision floating point value (FP16) from the given single + * precision floating point value (FP32). + * + * @param {number} val - A single precision floating point value. + * @return {number} The FP16 value. + */ +export function toHalfFloat(val: number): number; +/** + * Returns a single precision floating point value (FP32) from the given half + * precision floating point value (FP16). + * + * @param {number} val - A half precision floating point value. + * @return {number} The FP32 value. + */ +export function fromHalfFloat(val: number): number; +/** + * A class containing utility functions for data. + * + * @hideconstructor + */ +export class DataUtils { + /** + * Returns a half precision floating point value (FP16) from the given single + * precision floating point value (FP32). + * + * @param {number} val - A single precision floating point value. + * @return {number} The FP16 value. + */ + static toHalfFloat(val: number): number; + /** + * Returns a single precision floating point value (FP32) from the given half + * precision floating point value (FP16). + * + * @param {number} val - A half precision floating point value. + * @return {number} The FP32 value. + */ + static fromHalfFloat(val: number): number; +} diff --git a/jsdoc-testing/jsdoc/src/extras/Earcut.d.ts b/jsdoc-testing/jsdoc/src/extras/Earcut.d.ts new file mode 100644 index 000000000..77d051e6a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/Earcut.d.ts @@ -0,0 +1,18 @@ +/** + * An implementation of the earcut polygon triangulation algorithm. + * The code is a port of [mapbox/earcut](https://github.com/mapbox/earcut). + * + * @see https://github.com/mapbox/earcut + */ +export class Earcut { + /** + * Triangulates the given shape definition by returning an array of triangles. + * + * @param {Array} data - An array with 2D points. + * @param {Array} holeIndices - An array with indices defining holes. + * @param {number} [dim=2] - The number of coordinates per vertex in the input array. + * @return {Array} An array representing the triangulated faces. Each face is defined by three consecutive numbers + * representing vertex indices. + */ + static triangulate(data: Array, holeIndices: Array, dim?: number): Array; +} diff --git a/jsdoc-testing/jsdoc/src/extras/ImageUtils.d.ts b/jsdoc-testing/jsdoc/src/extras/ImageUtils.d.ts new file mode 100644 index 000000000..26077e10c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/ImageUtils.d.ts @@ -0,0 +1,22 @@ +/** + * A class containing utility functions for images. + * + * @hideconstructor + */ +export class ImageUtils { + /** + * Returns a data URI containing a representation of the given image. + * + * @param {(HTMLImageElement|HTMLCanvasElement)} image - The image object. + * @param {string} [type='image/png'] - Indicates the image format. + * @return {string} The data URI. + */ + static getDataURL(image: (HTMLImageElement | HTMLCanvasElement), type?: string): string; + /** + * Converts the given sRGB image data to linear color space. + * + * @param {(HTMLImageElement|HTMLCanvasElement|ImageBitmap|Object)} image - The image object. + * @return {HTMLCanvasElement|Object} The converted image. + */ + static sRGBToLinear(image: (HTMLImageElement | HTMLCanvasElement | ImageBitmap | Object)): HTMLCanvasElement | Object; +} diff --git a/jsdoc-testing/jsdoc/src/extras/PMREMGenerator.d.ts b/jsdoc-testing/jsdoc/src/extras/PMREMGenerator.d.ts new file mode 100644 index 000000000..07465624d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/PMREMGenerator.d.ts @@ -0,0 +1,556 @@ +/** + * This class generates a Prefiltered, Mipmapped Radiance Environment Map + * (PMREM) from a cubeMap environment texture. This allows different levels of + * blur to be quickly accessed based on material roughness. It is packed into a + * special CubeUV format that allows us to perform custom interpolation so that + * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap + * chain, it only goes down to the LOD_MIN level (above), and then creates extra + * even more filtered 'mips' at the same LOD_MIN resolution, associated with + * higher roughness levels. In this way we maintain resolution to smoothly + * interpolate diffuse lighting while limiting sampling computation. + * + * The prefiltering uses GGX VNDF (Visible Normal Distribution Function) + * importance sampling based on "Sampling the GGX Distribution of Visible Normals" + * (Heitz, 2018) to generate environment maps that accurately match the GGX BRDF + * used in material rendering for physically-based image-based lighting. + */ +export class PMREMGenerator { + /** + * Constructs a new PMREM generator. + * + * @param {WebGLRenderer} renderer - The renderer. + */ + constructor(renderer: WebGLRenderer); + _renderer: WebGLRenderer; + _pingPongRenderTarget: any; + _lodMax: number; + _cubeSize: number; + _sizeLods: any[]; + _sigmas: any[]; + _lodMeshes: any[]; + _backgroundBox: Mesh | null; + _cubemapMaterial: { + readonly isShaderMaterial: boolean; + type: string; + defines: Object; + uniforms: Object; + uniformsGroups: Array; + vertexShader: string; + fragmentShader: string; + linewidth: number; + wireframe: boolean; + wireframeLinewidth: number; + fog: boolean; + lights: boolean; + clipping: boolean; + forceSinglePass: boolean; + extensions: { + clipCullDistance: false; + multiDraw: false; + }; + defaultAttributeValues: Object; + index0AttributeName: string | undefined; + uniformsNeedUpdate: boolean; + glslVersion: (GLSL1 | GLSL3) | null; + copy(source: any): /*elided*/ any; + toJSON(meta: any): Object; + readonly isMaterial: boolean; + readonly uuid: string; + name: string; + blending: (NoBlending /** + * This class generates a Prefiltered, Mipmapped Radiance Environment Map + * (PMREM) from a cubeMap environment texture. This allows different levels of + * blur to be quickly accessed based on material roughness. It is packed into a + * special CubeUV format that allows us to perform custom interpolation so that + * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap + * chain, it only goes down to the LOD_MIN level (above), and then creates extra + * even more filtered 'mips' at the same LOD_MIN resolution, associated with + * higher roughness levels. In this way we maintain resolution to smoothly + * interpolate diffuse lighting while limiting sampling computation. + * + * The prefiltering uses GGX VNDF (Visible Normal Distribution Function) + * importance sampling based on "Sampling the GGX Distribution of Visible Normals" + * (Heitz, 2018) to generate environment maps that accurately match the GGX BRDF + * used in material rendering for physically-based image-based lighting. + */ | number | AdditiveBlending | SubtractiveBlending | MultiplyBlending | CustomBlending); + side: (number | BackSide | DoubleSide); + vertexColors: boolean; + opacity: number; + transparent: boolean; + alphaHash: boolean; + blendSrc: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); + blendDst: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); + blendEquation: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation); + blendSrcAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; + blendDstAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; + blendEquationAlpha: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation) | null; + blendColor: Color; + blendAlpha: number; + depthFunc: (NeverDepth | AlwaysDepth | LessDepth | number | EqualDepth | GreaterEqualDepth | + /** + * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during + * your texture's network fetch for increased concurrency. + */ + GreaterDepth | NotEqualDepth); + depthTest: boolean; + depthWrite: boolean; + stencilWriteMask: number; + stencilFunc: NeverStencilFunc | LessStencilFunc | EqualStencilFunc | LessEqualStencilFunc | GreaterStencilFunc | NotEqualStencilFunc | GreaterEqualStencilFunc | number; + stencilRef: number; + stencilFuncMask: number; + stencilFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; + stencilZFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; + stencilZPass: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; + stencilWrite: boolean; + clippingPlanes: Array | null; + clipIntersection: boolean; + clipShadows: boolean; + shadowSide: (number | BackSide | DoubleSide) | null; + colorWrite: boolean; + precision: ("highp" | "mediump" | "lowp") | null; + polygonOffset: boolean; + polygonOffsetFactor: number; + polygonOffsetUnits: number; + dithering: boolean; + alphaToCoverage: boolean; + premultipliedAlpha: boolean; + allowOverride: boolean; + visible: boolean; + toneMapped: boolean; + userData: Object; + readonly version: number; + _alphaTest: number; + get alphaTest(): number; + set alphaTest(value: number); + onBeforeRender(): void; + onBeforeCompile(): void; + customProgramCacheKey(): string; + setValues(values?: Object): void; + clone(): Material; + dispose(): void; + set needsUpdate(value: boolean); + addEventListener(type: string, listener: Function): void; + _listeners: {} | undefined; + hasEventListener(type: string, listener: Function): boolean; + removeEventListener(type: string, listener: Function): void; + dispatchEvent(event: Object): void; + } | null; + _equirectMaterial: { + readonly isShaderMaterial: boolean; + type: string; + defines: Object; + uniforms: Object; + uniformsGroups: Array; + vertexShader: string; + fragmentShader: string; + linewidth: number; + wireframe: boolean; + wireframeLinewidth: number; + fog: boolean; + lights: boolean; + clipping: boolean; + forceSinglePass: boolean; + extensions: { + clipCullDistance: false; + multiDraw: false; + }; + defaultAttributeValues: Object; + index0AttributeName: string | undefined; + uniformsNeedUpdate: boolean; + glslVersion: (GLSL1 | GLSL3) | null; + copy(source: any): /*elided*/ any; + toJSON(meta: any): Object; + readonly isMaterial: boolean; + readonly uuid: string; + name: string; + blending: (NoBlending /** + * This class generates a Prefiltered, Mipmapped Radiance Environment Map + * (PMREM) from a cubeMap environment texture. This allows different levels of + * blur to be quickly accessed based on material roughness. It is packed into a + * special CubeUV format that allows us to perform custom interpolation so that + * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap + * chain, it only goes down to the LOD_MIN level (above), and then creates extra + * even more filtered 'mips' at the same LOD_MIN resolution, associated with + * higher roughness levels. In this way we maintain resolution to smoothly + * interpolate diffuse lighting while limiting sampling computation. + * + * The prefiltering uses GGX VNDF (Visible Normal Distribution Function) + * importance sampling based on "Sampling the GGX Distribution of Visible Normals" + * (Heitz, 2018) to generate environment maps that accurately match the GGX BRDF + * used in material rendering for physically-based image-based lighting. + */ | number | AdditiveBlending | SubtractiveBlending | MultiplyBlending | CustomBlending); + side: (number | BackSide | DoubleSide); + vertexColors: boolean; + opacity: number; + transparent: boolean; + alphaHash: boolean; + blendSrc: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); + blendDst: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); + blendEquation: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation); + blendSrcAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; + blendDstAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; + blendEquationAlpha: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation) | null; + blendColor: Color; + blendAlpha: number; + depthFunc: (NeverDepth | AlwaysDepth | LessDepth | number | EqualDepth | GreaterEqualDepth | + /** + * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during + * your texture's network fetch for increased concurrency. + */ + GreaterDepth | NotEqualDepth); + depthTest: boolean; + depthWrite: boolean; + stencilWriteMask: number; + stencilFunc: NeverStencilFunc | LessStencilFunc | EqualStencilFunc | LessEqualStencilFunc | GreaterStencilFunc | NotEqualStencilFunc | GreaterEqualStencilFunc | number; + stencilRef: number; + stencilFuncMask: number; + stencilFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; + stencilZFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; + stencilZPass: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; + stencilWrite: boolean; + clippingPlanes: Array | null; + clipIntersection: boolean; + clipShadows: boolean; + shadowSide: (number | BackSide | DoubleSide) | null; + colorWrite: boolean; + precision: ("highp" | "mediump" | "lowp") | null; + polygonOffset: boolean; + polygonOffsetFactor: number; + polygonOffsetUnits: number; + dithering: boolean; + alphaToCoverage: boolean; + premultipliedAlpha: boolean; + allowOverride: boolean; + visible: boolean; + toneMapped: boolean; + userData: Object; + readonly version: number; + _alphaTest: number; + get alphaTest(): number; + set alphaTest(value: number); + onBeforeRender(): void; + onBeforeCompile(): void; + customProgramCacheKey(): string; + setValues(values?: Object): void; + clone(): Material; + dispose(): void; + set needsUpdate(value: boolean); + addEventListener(type: string, listener: Function): void; + _listeners: {} | undefined; + hasEventListener(type: string, listener: Function): boolean; + removeEventListener(type: string, listener: Function): void; + dispatchEvent(event: Object): void; + } | null; + _blurMaterial: { + readonly isShaderMaterial: boolean; + type: string; + defines: Object; + uniforms: Object; + uniformsGroups: Array; + vertexShader: string; + fragmentShader: string; + linewidth: number; + wireframe: boolean; + wireframeLinewidth: number; + fog: boolean; + lights: boolean; + clipping: boolean; + forceSinglePass: boolean; + extensions: { + clipCullDistance: false; + multiDraw: false; + }; + defaultAttributeValues: Object; + index0AttributeName: string | undefined; + uniformsNeedUpdate: boolean; + glslVersion: (GLSL1 | GLSL3) | null; + copy(source: any): /*elided*/ any; + toJSON(meta: any): Object; + readonly isMaterial: boolean; + readonly uuid: string; + name: string; + blending: (NoBlending /** + * This class generates a Prefiltered, Mipmapped Radiance Environment Map + * (PMREM) from a cubeMap environment texture. This allows different levels of + * blur to be quickly accessed based on material roughness. It is packed into a + * special CubeUV format that allows us to perform custom interpolation so that + * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap + * chain, it only goes down to the LOD_MIN level (above), and then creates extra + * even more filtered 'mips' at the same LOD_MIN resolution, associated with + * higher roughness levels. In this way we maintain resolution to smoothly + * interpolate diffuse lighting while limiting sampling computation. + * + * The prefiltering uses GGX VNDF (Visible Normal Distribution Function) + * importance sampling based on "Sampling the GGX Distribution of Visible Normals" + * (Heitz, 2018) to generate environment maps that accurately match the GGX BRDF + * used in material rendering for physically-based image-based lighting. + */ | number | AdditiveBlending | SubtractiveBlending | MultiplyBlending | CustomBlending); + side: (number | BackSide | DoubleSide); + vertexColors: boolean; + opacity: number; + transparent: boolean; + alphaHash: boolean; + blendSrc: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); + blendDst: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); + blendEquation: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation); + blendSrcAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; + blendDstAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; + blendEquationAlpha: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation) | null; + blendColor: Color; + blendAlpha: number; + depthFunc: (NeverDepth | AlwaysDepth | LessDepth | number | EqualDepth | GreaterEqualDepth | + /** + * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during + * your texture's network fetch for increased concurrency. + */ + GreaterDepth | NotEqualDepth); + depthTest: boolean; + depthWrite: boolean; + stencilWriteMask: number; + stencilFunc: NeverStencilFunc | LessStencilFunc | EqualStencilFunc | LessEqualStencilFunc | GreaterStencilFunc | NotEqualStencilFunc | GreaterEqualStencilFunc | number; + stencilRef: number; + stencilFuncMask: number; + stencilFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; + stencilZFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; + stencilZPass: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; + stencilWrite: boolean; + clippingPlanes: Array | null; + clipIntersection: boolean; + clipShadows: boolean; + shadowSide: (number | BackSide | DoubleSide) | null; + colorWrite: boolean; + precision: ("highp" | "mediump" | "lowp") | null; + polygonOffset: boolean; + polygonOffsetFactor: number; + polygonOffsetUnits: number; + dithering: boolean; + alphaToCoverage: boolean; + premultipliedAlpha: boolean; + allowOverride: boolean; + visible: boolean; + toneMapped: boolean; + userData: Object; + readonly version: number; + _alphaTest: number; + get alphaTest(): number; + set alphaTest(value: number); + onBeforeRender(): void; + onBeforeCompile(): void; + customProgramCacheKey(): string; + setValues(values?: Object): void; + clone(): Material; + dispose(): void; + set needsUpdate(value: boolean); + addEventListener(type: string, listener: Function): void; + _listeners: {} | undefined; + hasEventListener(type: string, listener: Function): boolean; + removeEventListener(type: string, listener: Function): void; + dispatchEvent(event: Object): void; + } | null; + _ggxMaterial: { + readonly isShaderMaterial: boolean; + type: string; + defines: Object; + uniforms: Object; + uniformsGroups: Array; + vertexShader: string; + fragmentShader: string; + linewidth: number; + wireframe: boolean; + wireframeLinewidth: number; + fog: boolean; + lights: boolean; + clipping: boolean; + forceSinglePass: boolean; + extensions: { + clipCullDistance: false; + multiDraw: false; + }; + defaultAttributeValues: Object; + index0AttributeName: string | undefined; + uniformsNeedUpdate: boolean; + glslVersion: (GLSL1 | GLSL3) | null; + copy(source: any): /*elided*/ any; + toJSON(meta: any): Object; + readonly isMaterial: boolean; + readonly uuid: string; + name: string; + blending: (NoBlending /** + * This class generates a Prefiltered, Mipmapped Radiance Environment Map + * (PMREM) from a cubeMap environment texture. This allows different levels of + * blur to be quickly accessed based on material roughness. It is packed into a + * special CubeUV format that allows us to perform custom interpolation so that + * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap + * chain, it only goes down to the LOD_MIN level (above), and then creates extra + * even more filtered 'mips' at the same LOD_MIN resolution, associated with + * higher roughness levels. In this way we maintain resolution to smoothly + * interpolate diffuse lighting while limiting sampling computation. + * + * The prefiltering uses GGX VNDF (Visible Normal Distribution Function) + * importance sampling based on "Sampling the GGX Distribution of Visible Normals" + * (Heitz, 2018) to generate environment maps that accurately match the GGX BRDF + * used in material rendering for physically-based image-based lighting. + */ | number | AdditiveBlending | SubtractiveBlending | MultiplyBlending | CustomBlending); + side: (number | BackSide | DoubleSide); + vertexColors: boolean; + opacity: number; + transparent: boolean; + alphaHash: boolean; + blendSrc: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); + blendDst: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); + blendEquation: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation); + blendSrcAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; + blendDstAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; + blendEquationAlpha: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation) | null; + blendColor: Color; + blendAlpha: number; + depthFunc: (NeverDepth | AlwaysDepth | LessDepth | number | EqualDepth | GreaterEqualDepth | + /** + * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during + * your texture's network fetch for increased concurrency. + */ + GreaterDepth | NotEqualDepth); + depthTest: boolean; + depthWrite: boolean; + stencilWriteMask: number; + stencilFunc: NeverStencilFunc | LessStencilFunc | EqualStencilFunc | LessEqualStencilFunc | GreaterStencilFunc | NotEqualStencilFunc | GreaterEqualStencilFunc | number; + stencilRef: number; + stencilFuncMask: number; + stencilFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; + stencilZFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; + stencilZPass: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; + stencilWrite: boolean; + clippingPlanes: Array | null; + clipIntersection: boolean; + clipShadows: boolean; + shadowSide: (number | BackSide | DoubleSide) | null; + colorWrite: boolean; + precision: ("highp" | "mediump" | "lowp") | null; + polygonOffset: boolean; + polygonOffsetFactor: number; + polygonOffsetUnits: number; + dithering: boolean; + alphaToCoverage: boolean; + premultipliedAlpha: boolean; + allowOverride: boolean; + visible: boolean; + toneMapped: boolean; + userData: Object; + readonly version: number; + _alphaTest: number; + get alphaTest(): number; + set alphaTest(value: number); + onBeforeRender(): void; + onBeforeCompile(): void; + customProgramCacheKey(): string; + setValues(values?: Object): void; + clone(): Material; + dispose(): void; + set needsUpdate(value: boolean); + addEventListener(type: string, listener: Function): void; + _listeners: {} | undefined; + hasEventListener(type: string, listener: Function): boolean; + removeEventListener(type: string, listener: Function): void; + dispatchEvent(event: Object): void; + } | null; + /** + * Generates a PMREM from a supplied Scene, which can be faster than using an + * image if networking bandwidth is low. Optional sigma specifies a blur radius + * in radians to be applied to the scene before PMREM generation. Optional near + * and far planes ensure the scene is rendered in its entirety. + * + * @param {Scene} scene - The scene to be captured. + * @param {number} [sigma=0] - The blur radius in radians. + * @param {number} [near=0.1] - The near plane distance. + * @param {number} [far=100] - The far plane distance. + * @param {Object} [options={}] - The configuration options. + * @param {number} [options.size=256] - The texture size of the PMREM. + * @param {Vector3} [options.position=origin] - The position of the internal cube camera that renders the scene. + * @return {WebGLRenderTarget} The resulting PMREM. + */ + fromScene(scene: Scene, sigma?: number, near?: number, far?: number, options?: { + size?: number | undefined; + position?: Vector3 | undefined; + }): WebGLRenderTarget; + /** + * Generates a PMREM from an equirectangular texture, which can be either LDR + * or HDR. The ideal input image size is 1k (1024 x 512), as this matches best + * with the 256 x 256 cubemap output. The minimum supported input image size + * is 64 x 32. + * + * @param {Texture} equirectangular - The equirectangular texture to be converted. + * @param {?WebGLRenderTarget} [renderTarget=null] - The render target to use. + * @return {WebGLRenderTarget} The resulting PMREM. + */ + fromEquirectangular(equirectangular: Texture, renderTarget?: WebGLRenderTarget | null): WebGLRenderTarget; + /** + * Generates a PMREM from an cubemap texture, which can be either LDR + * or HDR. The ideal input cube size is 256 x 256, as this matches best + * with the 256 x 256 cubemap output. The minimum supported input cube + * size is 16 x 16 per face. + * + * @param {Texture} cubemap - The cubemap texture to be converted. + * @param {?WebGLRenderTarget} [renderTarget=null] - The render target to use. + * @return {WebGLRenderTarget} The resulting PMREM. + */ + fromCubemap(cubemap: Texture, renderTarget?: WebGLRenderTarget | null): WebGLRenderTarget; + /** + * Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during + * your texture's network fetch for increased concurrency. + */ + compileCubemapShader(): void; + /** + * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during + * your texture's network fetch for increased concurrency. + */ + compileEquirectangularShader(): void; + /** + * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class, + * so you should not need more than one PMREMGenerator object. If you do, calling dispose() on + * one of them will cause any others to also become unusable. + */ + dispose(): void; + _setSize(cubeSize: any): void; + _dispose(): void; + _cleanup(outputTarget: any): void; + _fromTexture(texture: any, renderTarget: any): any; + _allocateTargets(): WebGLRenderTarget; + _compileMaterial(material: any): void; + _sceneToCubeUV(scene: any, near: any, far: any, cubeUVRenderTarget: any, position: any): void; + _textureToCubeUV(texture: any, cubeUVRenderTarget: any): void; + _applyPMREM(cubeUVRenderTarget: any): void; + /** + * Applies GGX VNDF importance sampling filter to generate a prefiltered environment map. + * Uses Monte Carlo integration with VNDF importance sampling to accurately represent the + * GGX BRDF for physically-based rendering. Reads from the previous LOD level and + * applies incremental roughness filtering to avoid over-blurring. + * + * @private + * @param {WebGLRenderTarget} cubeUVRenderTarget + * @param {number} lodIn - Source LOD level to read from + * @param {number} lodOut - Target LOD level to write to + */ + private _applyGGXFilter; + /** + * This is a two-pass Gaussian blur for a cubemap. Normally this is done + * vertically and horizontally, but this breaks down on a cube. Here we apply + * the blur latitudinally (around the poles), and then longitudinally (towards + * the poles) to approximate the orthogonally-separable blur. It is least + * accurate at the poles, but still does a decent job. + * + * Used for initial scene blur in fromScene() method when sigma > 0. + * + * @private + * @param {WebGLRenderTarget} cubeUVRenderTarget + * @param {number} lodIn + * @param {number} lodOut + * @param {number} sigma + * @param {Vector3} [poleAxis] + */ + private _blur; + _halfBlur(targetIn: any, targetOut: any, lodIn: any, lodOut: any, sigmaRadians: any, direction: any, poleAxis: any): void; +} +import { Mesh } from '../objects/Mesh.js'; +import { Color } from '../math/Color.js'; +import { Vector3 } from '../math/Vector3.js'; +import { WebGLRenderTarget } from '../renderers/WebGLRenderTarget.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/ShapeUtils.d.ts b/jsdoc-testing/jsdoc/src/extras/ShapeUtils.d.ts new file mode 100644 index 000000000..333966c85 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/ShapeUtils.d.ts @@ -0,0 +1,29 @@ +/** + * A class containing utility functions for shapes. + * + * @hideconstructor + */ +export class ShapeUtils { + /** + * Calculate area of a ( 2D ) contour polygon. + * + * @param {Array} contour - An array of 2D points. + * @return {number} The area. + */ + static area(contour: Array): number; + /** + * Returns `true` if the given contour uses a clockwise winding order. + * + * @param {Array} pts - An array of 2D points defining a polygon. + * @return {boolean} Whether the given contour uses a clockwise winding order or not. + */ + static isClockWise(pts: Array): boolean; + /** + * Triangulates the given shape definition. + * + * @param {Array} contour - An array of 2D points defining the contour. + * @param {Array>} holes - An array that holds arrays of 2D points defining the holes. + * @return {Array>} An array that holds for each face definition an array with three indices. + */ + static triangulateShape(contour: Array, holes: Array>): Array>; +} diff --git a/jsdoc-testing/jsdoc/src/extras/TextureUtils.d.ts b/jsdoc-testing/jsdoc/src/extras/TextureUtils.d.ts new file mode 100644 index 000000000..5de7a1677 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/TextureUtils.d.ts @@ -0,0 +1,81 @@ +/** + * Scales the texture as large as possible within its surface without cropping + * or stretching the texture. The method preserves the original aspect ratio of + * the texture. Akin to CSS `object-fit: contain` + * + * @param {Texture} texture - The texture. + * @param {number} aspect - The texture's aspect ratio. + * @return {Texture} The updated texture. + */ +export function contain(texture: Texture, aspect: number): Texture; +/** + * Scales the texture to the smallest possible size to fill the surface, leaving + * no empty space. The method preserves the original aspect ratio of the texture. + * Akin to CSS `object-fit: cover`. + * + * @param {Texture} texture - The texture. + * @param {number} aspect - The texture's aspect ratio. + * @return {Texture} The updated texture. + */ +export function cover(texture: Texture, aspect: number): Texture; +/** + * Configures the texture to the default transformation. Akin to CSS `object-fit: fill`. + * + * @param {Texture} texture - The texture. + * @return {Texture} The updated texture. + */ +export function fill(texture: Texture): Texture; +/** + * Determines how many bytes must be used to represent the texture. + * + * @param {number} width - The width of the texture. + * @param {number} height - The height of the texture. + * @param {number} format - The texture's format. + * @param {number} type - The texture's type. + * @return {number} The byte length. + */ +export function getByteLength(width: number, height: number, format: number, type: number): number; +/** + * A class containing utility functions for textures. + * + * @hideconstructor + */ +export class TextureUtils { + /** + * Scales the texture as large as possible within its surface without cropping + * or stretching the texture. The method preserves the original aspect ratio of + * the texture. Akin to CSS `object-fit: contain` + * + * @param {Texture} texture - The texture. + * @param {number} aspect - The texture's aspect ratio. + * @return {Texture} The updated texture. + */ + static contain(texture: Texture, aspect: number): Texture; + /** + * Scales the texture to the smallest possible size to fill the surface, leaving + * no empty space. The method preserves the original aspect ratio of the texture. + * Akin to CSS `object-fit: cover`. + * + * @param {Texture} texture - The texture. + * @param {number} aspect - The texture's aspect ratio. + * @return {Texture} The updated texture. + */ + static cover(texture: Texture, aspect: number): Texture; + /** + * Configures the texture to the default transformation. Akin to CSS `object-fit: fill`. + * + * @param {Texture} texture - The texture. + * @return {Texture} The updated texture. + */ + static fill(texture: Texture): Texture; + /** + * Determines how many bytes must be used to represent the texture. + * + * @param {number} width - The width of the texture. + * @param {number} height - The height of the texture. + * @param {number} format - The texture's format. + * @param {number} type - The texture's type. + * @return {number} The byte length. + */ + static getByteLength(width: number, height: number, format: number, type: number): number; +} diff --git a/jsdoc-testing/jsdoc/src/extras/core/Curve.d.ts b/jsdoc-testing/jsdoc/src/extras/core/Curve.d.ts new file mode 100644 index 000000000..ff7e9b470 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/core/Curve.d.ts @@ -0,0 +1,170 @@ +/** + * An abstract base class for creating an analytic curve object that contains methods + * for interpolation. + * + * @abstract + */ +export class Curve { + /** + * The type property is used for detecting the object type + * in context of serialization/deserialization. + * + * @type {string} + * @readonly + */ + readonly type: string; + /** + * This value determines the amount of divisions when calculating the + * cumulative segment lengths of a curve via {@link Curve#getLengths}. To ensure + * precision when using methods like {@link Curve#getSpacedPoints}, it is + * recommended to increase the value of this property if the curve is very large. + * + * @type {number} + * @default 200 + */ + arcLengthDivisions: number; + /** + * Must be set to `true` if the curve parameters have changed. + * + * @type {boolean} + * @default false + */ + needsUpdate: boolean; + /** + * An internal cache that holds precomputed curve length values. + * + * @private + * @type {?Array} + * @default null + */ + private cacheArcLengths; + /** + * This method returns a vector in 2D or 3D space (depending on the curve definition) + * for the given interpolation factor. + * + * @abstract + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {(Vector2|Vector3)} [optionalTarget] - The optional target vector the result is written to. + * @return {(Vector2|Vector3)} The position on the curve. It can be a 2D or 3D vector depending on the curve definition. + */ + getPoint(): (Vector2 | Vector3); + /** + * This method returns a vector in 2D or 3D space (depending on the curve definition) + * for the given interpolation factor. Unlike {@link Curve#getPoint}, this method honors the length + * of the curve which equidistant samples. + * + * @param {number} u - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {(Vector2|Vector3)} [optionalTarget] - The optional target vector the result is written to. + * @return {(Vector2|Vector3)} The position on the curve. It can be a 2D or 3D vector depending on the curve definition. + */ + getPointAt(u: number, optionalTarget?: (Vector2 | Vector3)): (Vector2 | Vector3); + /** + * This method samples the curve via {@link Curve#getPoint} and returns an array of points representing + * the curve shape. + * + * @param {number} [divisions=5] - The number of divisions. + * @return {Array<(Vector2|Vector3)>} An array holding the sampled curve values. The number of points is `divisions + 1`. + */ + getPoints(divisions?: number): Array<(Vector2 | Vector3)>; + /** + * This method samples the curve via {@link Curve#getPointAt} and returns an array of points representing + * the curve shape. Unlike {@link Curve#getPoints}, this method returns equi-spaced points across the entire + * curve. + * + * @param {number} [divisions=5] - The number of divisions. + * @return {Array<(Vector2|Vector3)>} An array holding the sampled curve values. The number of points is `divisions + 1`. + */ + getSpacedPoints(divisions?: number): Array<(Vector2 | Vector3)>; + /** + * Returns the total arc length of the curve. + * + * @return {number} The length of the curve. + */ + getLength(): number; + /** + * Returns an array of cumulative segment lengths of the curve. + * + * @param {number} [divisions=this.arcLengthDivisions] - The number of divisions. + * @return {Array} An array holding the cumulative segment lengths. + */ + getLengths(divisions?: number): Array; + /** + * Update the cumulative segment distance cache. The method must be called + * every time curve parameters are changed. If an updated curve is part of a + * composed curve like {@link CurvePath}, this method must be called on the + * composed curve, too. + */ + updateArcLengths(): void; + /** + * Given an interpolation factor in the range `[0,1]`, this method returns an updated + * interpolation factor in the same range that can be ued to sample equidistant points + * from a curve. + * + * @param {number} u - The interpolation factor. + * @param {?number} distance - An optional distance on the curve. + * @return {number} The updated interpolation factor. + */ + getUtoTmapping(u: number, distance?: number | null): number; + /** + * Returns a unit vector tangent for the given interpolation factor. + * If the derived curve does not implement its tangent derivation, + * two points a small delta apart will be used to find its gradient + * which seems to give a reasonable approximation. + * + * @param {number} t - The interpolation factor. + * @param {(Vector2|Vector3)} [optionalTarget] - The optional target vector the result is written to. + * @return {(Vector2|Vector3)} The tangent vector. + */ + getTangent(t: number, optionalTarget?: (Vector2 | Vector3)): (Vector2 | Vector3); + /** + * Same as {@link Curve#getTangent} but with equidistant samples. + * + * @param {number} u - The interpolation factor. + * @param {(Vector2|Vector3)} [optionalTarget] - The optional target vector the result is written to. + * @return {(Vector2|Vector3)} The tangent vector. + * @see {@link Curve#getPointAt} + */ + getTangentAt(u: number, optionalTarget?: (Vector2 | Vector3)): (Vector2 | Vector3); + /** + * Generates the Frenet Frames. Requires a curve definition in 3D space. Used + * in geometries like {@link TubeGeometry} or {@link ExtrudeGeometry}. + * + * @param {number} segments - The number of segments. + * @param {boolean} [closed=false] - Whether the curve is closed or not. + * @return {{tangents: Array, normals: Array, binormals: Array}} The Frenet Frames. + */ + computeFrenetFrames(segments: number, closed?: boolean): { + tangents: Array; + normals: Array; + binormals: Array; + }; + /** + * Returns a new curve with copied values from this instance. + * + * @return {Curve} A clone of this instance. + */ + clone(): Curve; + /** + * Copies the values of the given curve to this instance. + * + * @param {Curve} source - The curve to copy. + * @return {Curve} A reference to this curve. + */ + copy(source: Curve): Curve; + /** + * Serializes the curve into JSON. + * + * @return {Object} A JSON object representing the serialized curve. + * @see {@link ObjectLoader#parse} + */ + toJSON(): Object; + /** + * Deserializes the curve from the given JSON. + * + * @param {Object} json - The JSON holding the serialized curve. + * @return {Curve} A reference to this curve. + */ + fromJSON(json: Object): Curve; +} +import { Vector2 } from '../../math/Vector2.js'; +import { Vector3 } from '../../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/core/CurvePath.d.ts b/jsdoc-testing/jsdoc/src/extras/core/CurvePath.d.ts new file mode 100644 index 000000000..a92079be5 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/core/CurvePath.d.ts @@ -0,0 +1,56 @@ +/** + * A base class extending {@link Curve}. `CurvePath` is simply an + * array of connected curves, but retains the API of a curve. + * + * @augments Curve + */ +export class CurvePath extends Curve { + type: string; + /** + * An array of curves defining the + * path. + * + * @type {Array} + */ + curves: Array; + /** + * Whether the path should automatically be closed + * by a line curve. + * + * @type {boolean} + * @default false + */ + autoClose: boolean; + /** + * Adds a curve to this curve path. + * + * @param {Curve} curve - The curve to add. + */ + add(curve: Curve): void; + /** + * Adds a line curve to close the path. + * + * @return {CurvePath} A reference to this curve path. + */ + closePath(): CurvePath; + /** + * This method returns a vector in 2D or 3D space (depending on the curve definitions) + * for the given interpolation factor. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {(Vector2|Vector3)} [optionalTarget] - The optional target vector the result is written to. + * @return {?(Vector2|Vector3)} The position on the curve. It can be a 2D or 3D vector depending on the curve definition. + */ + getPoint(t: number, optionalTarget?: (Vector2 | Vector3)): (Vector2 | Vector3) | null; + cacheLengths: number[] | null | undefined; + /** + * Returns list of cumulative curve lengths of the defined curves. + * + * @return {Array} The curve lengths. + */ + getCurveLengths(): Array; + getSpacedPoints(divisions?: number): any[]; + copy(source: any): this; + fromJSON(json: any): this; +} +import { Curve } from './Curve.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/core/Interpolations.d.ts b/jsdoc-testing/jsdoc/src/extras/core/Interpolations.d.ts new file mode 100644 index 000000000..aa80afbc8 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/core/Interpolations.d.ts @@ -0,0 +1,39 @@ +/** + * Interpolations contains spline and Bézier functions internally used by concrete curve classes. + * + * Bezier Curves formulas obtained from: https://en.wikipedia.org/wiki/B%C3%A9zier_curve + * + * @module Interpolations + */ +/** + * Computes a point on a Catmull-Rom spline. + * + * @param {number} t - The interpolation factor. + * @param {number} p0 - The first control point. + * @param {number} p1 - The second control point. + * @param {number} p2 - The third control point. + * @param {number} p3 - The fourth control point. + * @return {number} The calculated point on a Catmull-Rom spline. + */ +export function CatmullRom(t: number, p0: number, p1: number, p2: number, p3: number): number; +/** + * Computes a point on a Quadratic Bezier curve. + * + * @param {number} t - The interpolation factor. + * @param {number} p0 - The first control point. + * @param {number} p1 - The second control point. + * @param {number} p2 - The third control point. + * @return {number} The calculated point on a Quadratic Bezier curve. + */ +export function QuadraticBezier(t: number, p0: number, p1: number, p2: number): number; +/** + * Computes a point on a Cubic Bezier curve. + * + * @param {number} t - The interpolation factor. + * @param {number} p0 - The first control point. + * @param {number} p1 - The second control point. + * @param {number} p2 - The third control point. + * @param {number} p3 - The fourth control point. + * @return {number} The calculated point on a Cubic Bezier curve. + */ +export function CubicBezier(t: number, p0: number, p1: number, p2: number, p3: number): number; diff --git a/jsdoc-testing/jsdoc/src/extras/core/Path.d.ts b/jsdoc-testing/jsdoc/src/extras/core/Path.d.ts new file mode 100644 index 000000000..521287532 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/core/Path.d.ts @@ -0,0 +1,151 @@ +/** + * A 2D path representation. The class provides methods for creating paths + * and contours of 2D shapes similar to the 2D Canvas API. + * + * ```js + * const path = new THREE.Path(); + * + * path.lineTo( 0, 0.8 ); + * path.quadraticCurveTo( 0, 1, 0.2, 1 ); + * path.lineTo( 1, 1 ); + * + * const points = path.getPoints(); + * + * const geometry = new THREE.BufferGeometry().setFromPoints( points ); + * const material = new THREE.LineBasicMaterial( { color: 0xffffff } ); + * + * const line = new THREE.Line( geometry, material ); + * scene.add( line ); + * ``` + * + * @augments CurvePath + */ +export class Path extends CurvePath { + /** + * Constructs a new path. + * + * @param {Array} [points] - An array of 2D points defining the path. + */ + constructor(points?: Array); + /** + * The current offset of the path. Any new curve added will start here. + * + * @type {Vector2} + */ + currentPoint: Vector2; + /** + * Creates a path from the given list of points. The points are added + * to the path as instances of {@link LineCurve}. + * + * @param {Array} points - An array of 2D points. + * @return {Path} A reference to this path. + */ + setFromPoints(points: Array): Path; + /** + * Moves {@link Path#currentPoint} to the given point. + * + * @param {number} x - The x coordinate. + * @param {number} y - The y coordinate. + * @return {Path} A reference to this path. + */ + moveTo(x: number, y: number): Path; + /** + * Adds an instance of {@link LineCurve} to the path by connecting + * the current point with the given one. + * + * @param {number} x - The x coordinate of the end point. + * @param {number} y - The y coordinate of the end point. + * @return {Path} A reference to this path. + */ + lineTo(x: number, y: number): Path; + /** + * Adds an instance of {@link QuadraticBezierCurve} to the path by connecting + * the current point with the given one. + * + * @param {number} aCPx - The x coordinate of the control point. + * @param {number} aCPy - The y coordinate of the control point. + * @param {number} aX - The x coordinate of the end point. + * @param {number} aY - The y coordinate of the end point. + * @return {Path} A reference to this path. + */ + quadraticCurveTo(aCPx: number, aCPy: number, aX: number, aY: number): Path; + /** + * Adds an instance of {@link CubicBezierCurve} to the path by connecting + * the current point with the given one. + * + * @param {number} aCP1x - The x coordinate of the first control point. + * @param {number} aCP1y - The y coordinate of the first control point. + * @param {number} aCP2x - The x coordinate of the second control point. + * @param {number} aCP2y - The y coordinate of the second control point. + * @param {number} aX - The x coordinate of the end point. + * @param {number} aY - The y coordinate of the end point. + * @return {Path} A reference to this path. + */ + bezierCurveTo(aCP1x: number, aCP1y: number, aCP2x: number, aCP2y: number, aX: number, aY: number): Path; + /** + * Adds an instance of {@link SplineCurve} to the path by connecting + * the current point with the given list of points. + * + * @param {Array} pts - An array of points in 2D space. + * @return {Path} A reference to this path. + */ + splineThru(pts: Array): Path; + /** + * Adds an arc as an instance of {@link EllipseCurve} to the path, positioned relative + * to the current point. + * + * @param {number} [aX=0] - The x coordinate of the center of the arc offsetted from the previous curve. + * @param {number} [aY=0] - The y coordinate of the center of the arc offsetted from the previous curve. + * @param {number} [aRadius=1] - The radius of the arc. + * @param {number} [aStartAngle=0] - The start angle in radians. + * @param {number} [aEndAngle=Math.PI*2] - The end angle in radians. + * @param {boolean} [aClockwise=false] - Whether to sweep the arc clockwise or not. + * @return {Path} A reference to this path. + */ + arc(aX?: number, aY?: number, aRadius?: number, aStartAngle?: number, aEndAngle?: number, aClockwise?: boolean): Path; + /** + * Adds an absolutely positioned arc as an instance of {@link EllipseCurve} to the path. + * + * @param {number} [aX=0] - The x coordinate of the center of the arc. + * @param {number} [aY=0] - The y coordinate of the center of the arc. + * @param {number} [aRadius=1] - The radius of the arc. + * @param {number} [aStartAngle=0] - The start angle in radians. + * @param {number} [aEndAngle=Math.PI*2] - The end angle in radians. + * @param {boolean} [aClockwise=false] - Whether to sweep the arc clockwise or not. + * @return {Path} A reference to this path. + */ + absarc(aX?: number, aY?: number, aRadius?: number, aStartAngle?: number, aEndAngle?: number, aClockwise?: boolean): Path; + /** + * Adds an ellipse as an instance of {@link EllipseCurve} to the path, positioned relative + * to the current point + * + * @param {number} [aX=0] - The x coordinate of the center of the ellipse offsetted from the previous curve. + * @param {number} [aY=0] - The y coordinate of the center of the ellipse offsetted from the previous curve. + * @param {number} [xRadius=1] - The radius of the ellipse in the x axis. + * @param {number} [yRadius=1] - The radius of the ellipse in the y axis. + * @param {number} [aStartAngle=0] - The start angle in radians. + * @param {number} [aEndAngle=Math.PI*2] - The end angle in radians. + * @param {boolean} [aClockwise=false] - Whether to sweep the ellipse clockwise or not. + * @param {number} [aRotation=0] - The rotation angle of the ellipse in radians, counterclockwise from the positive X axis. + * @return {Path} A reference to this path. + */ + ellipse(aX?: number, aY?: number, xRadius?: number, yRadius?: number, aStartAngle?: number, aEndAngle?: number, aClockwise?: boolean, aRotation?: number): Path; + /** + * Adds an absolutely positioned ellipse as an instance of {@link EllipseCurve} to the path. + * + * @param {number} [aX=0] - The x coordinate of the absolute center of the ellipse. + * @param {number} [aY=0] - The y coordinate of the absolute center of the ellipse. + * @param {number} [xRadius=1] - The radius of the ellipse in the x axis. + * @param {number} [yRadius=1] - The radius of the ellipse in the y axis. + * @param {number} [aStartAngle=0] - The start angle in radians. + * @param {number} [aEndAngle=Math.PI*2] - The end angle in radians. + * @param {boolean} [aClockwise=false] - Whether to sweep the ellipse clockwise or not. + * @param {number} [aRotation=0] - The rotation angle of the ellipse in radians, counterclockwise from the positive X axis. + * @return {Path} A reference to this path. + */ + absellipse(aX?: number, aY?: number, xRadius?: number, yRadius?: number, aStartAngle?: number, aEndAngle?: number, aClockwise?: boolean, aRotation?: number): Path; + copy(source: any): this; + fromJSON(json: any): this; +} +import { CurvePath } from './CurvePath.js'; +import { Vector2 } from '../../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/core/Shape.d.ts b/jsdoc-testing/jsdoc/src/extras/core/Shape.d.ts new file mode 100644 index 000000000..056fdb610 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/core/Shape.d.ts @@ -0,0 +1,76 @@ +/** + * Defines an arbitrary 2d shape plane using paths with optional holes. It + * can be used with {@link ExtrudeGeometry}, {@link ShapeGeometry}, to get + * points, or to get triangulated faces. + * + * ```js + * const heartShape = new THREE.Shape(); + * + * heartShape.moveTo( 25, 25 ); + * heartShape.bezierCurveTo( 25, 25, 20, 0, 0, 0 ); + * heartShape.bezierCurveTo( - 30, 0, - 30, 35, - 30, 35 ); + * heartShape.bezierCurveTo( - 30, 55, - 10, 77, 25, 95 ); + * heartShape.bezierCurveTo( 60, 77, 80, 55, 80, 35 ); + * heartShape.bezierCurveTo( 80, 35, 80, 0, 50, 0 ); + * heartShape.bezierCurveTo( 35, 0, 25, 25, 25, 25 ); + * + * const extrudeSettings = { + * depth: 8, + * bevelEnabled: true, + * bevelSegments: 2, + * steps: 2, + * bevelSize: 1, + * bevelThickness: 1 + * }; + * + * const geometry = new THREE.ExtrudeGeometry( heartShape, extrudeSettings ); + * const mesh = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial() ); + * ``` + * + * @augments Path + */ +export class Shape extends Path { + /** + * Constructs a new shape. + * + * @param {Array} [points] - An array of 2D points defining the shape. + */ + constructor(points?: Array); + /** + * The UUID of the shape. + * + * @type {string} + * @readonly + */ + readonly uuid: string; + /** + * Defines the holes in the shape. Hole definitions must use the + * opposite winding order (CW/CCW) than the outer shape. + * + * @type {Array} + * @readonly + */ + readonly holes: Array; + /** + * Returns an array representing each contour of the holes + * as a list of 2D points. + * + * @param {number} divisions - The fineness of the result. + * @return {Array>} The holes as a series of 2D points. + */ + getPointsHoles(divisions: number): Array>; + /** + * Returns an object that holds contour data for the shape and its holes as + * arrays of 2D points. + * + * @param {number} divisions - The fineness of the result. + * @return {{shape:Array,holes:Array>}} An object with contour data. + */ + extractPoints(divisions: number): { + shape: Array; + holes: Array>; + }; + copy(source: any): this; + fromJSON(json: any): this; +} +import { Path } from './Path.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/core/ShapePath.d.ts b/jsdoc-testing/jsdoc/src/extras/core/ShapePath.d.ts new file mode 100644 index 000000000..04032cbd6 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/core/ShapePath.d.ts @@ -0,0 +1,93 @@ +/** + * This class is used to convert a series of paths to an array of + * shapes. It is specifically used in context of fonts and SVG. + */ +export class ShapePath { + type: string; + /** + * The color of the shape. + * + * @type {Color} + */ + color: Color; + /** + * The paths that have been generated for this shape. + * + * @type {Array} + * @default null + */ + subPaths: Array; + /** + * The current path that is being generated. + * + * @type {?Path} + * @default null + */ + currentPath: Path | null; + /** + * An object that can be used to store custom data about the shape path. + * Mainly used by SVGLoader to store style information. + * + * @type {Object} + */ + userData: Object; + /** + * Creates a new path and moves it current point to the given one. + * + * @param {number} x - The x coordinate. + * @param {number} y - The y coordinate. + * @return {ShapePath} A reference to this shape path. + */ + moveTo(x: number, y: number): ShapePath; + /** + * Adds an instance of {@link LineCurve} to the path by connecting + * the current point with the given one. + * + * @param {number} x - The x coordinate of the end point. + * @param {number} y - The y coordinate of the end point. + * @return {ShapePath} A reference to this shape path. + */ + lineTo(x: number, y: number): ShapePath; + /** + * Adds an instance of {@link QuadraticBezierCurve} to the path by connecting + * the current point with the given one. + * + * @param {number} aCPx - The x coordinate of the control point. + * @param {number} aCPy - The y coordinate of the control point. + * @param {number} aX - The x coordinate of the end point. + * @param {number} aY - The y coordinate of the end point. + * @return {ShapePath} A reference to this shape path. + */ + quadraticCurveTo(aCPx: number, aCPy: number, aX: number, aY: number): ShapePath; + /** + * Adds an instance of {@link CubicBezierCurve} to the path by connecting + * the current point with the given one. + * + * @param {number} aCP1x - The x coordinate of the first control point. + * @param {number} aCP1y - The y coordinate of the first control point. + * @param {number} aCP2x - The x coordinate of the second control point. + * @param {number} aCP2y - The y coordinate of the second control point. + * @param {number} aX - The x coordinate of the end point. + * @param {number} aY - The y coordinate of the end point. + * @return {ShapePath} A reference to this shape path. + */ + bezierCurveTo(aCP1x: number, aCP1y: number, aCP2x: number, aCP2y: number, aX: number, aY: number): ShapePath; + /** + * Adds an instance of {@link SplineCurve} to the path by connecting + * the current point with the given list of points. + * + * @param {Array} pts - An array of points in 2D space. + * @return {ShapePath} A reference to this shape path. + */ + splineThru(pts: Array): ShapePath; + /** + * Converts the paths into an array of shapes. + * + * @return {Array} An array of shapes. + */ + toShapes(): Array; +} +import { Color } from '../../math/Color.js'; +import { Path } from './Path.js'; +import { Vector2 } from '../../math/Vector2.js'; +import { Shape } from './Shape.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/ArcCurve.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/ArcCurve.d.ts new file mode 100644 index 000000000..3ae4feae2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/curves/ArcCurve.d.ts @@ -0,0 +1,27 @@ +/** + * A curve representing an arc. + * + * @augments EllipseCurve + */ +export class ArcCurve extends EllipseCurve { + /** + * Constructs a new arc curve. + * + * @param {number} [aX=0] - The X center of the ellipse. + * @param {number} [aY=0] - The Y center of the ellipse. + * @param {number} [aRadius=1] - The radius of the ellipse in the x direction. + * @param {number} [aStartAngle=0] - The start angle of the curve in radians starting from the positive X axis. + * @param {number} [aEndAngle=Math.PI*2] - The end angle of the curve in radians starting from the positive X axis. + * @param {boolean} [aClockwise=false] - Whether the ellipse is drawn clockwise or not. + */ + constructor(aX?: number, aY?: number, aRadius?: number, aStartAngle?: number, aEndAngle?: number, aClockwise?: boolean); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isArcCurve: boolean; +} +import { EllipseCurve } from './EllipseCurve.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/CatmullRomCurve3.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/CatmullRomCurve3.d.ts new file mode 100644 index 000000000..8798e6d39 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/curves/CatmullRomCurve3.d.ts @@ -0,0 +1,83 @@ +/** + * A curve representing a Catmull-Rom spline. + * + * ```js + * //Create a closed wavey loop + * const curve = new THREE.CatmullRomCurve3( [ + * new THREE.Vector3( -10, 0, 10 ), + * new THREE.Vector3( -5, 5, 5 ), + * new THREE.Vector3( 0, 0, 0 ), + * new THREE.Vector3( 5, -5, 5 ), + * new THREE.Vector3( 10, 0, 10 ) + * ] ); + * + * const points = curve.getPoints( 50 ); + * const geometry = new THREE.BufferGeometry().setFromPoints( points ); + * + * const material = new THREE.LineBasicMaterial( { color: 0xff0000 } ); + * + * // Create the final object to add to the scene + * const curveObject = new THREE.Line( geometry, material ); + * ``` + * + * @augments Curve + */ +export class CatmullRomCurve3 extends Curve { + /** + * Constructs a new Catmull-Rom curve. + * + * @param {Array} [points] - An array of 3D points defining the curve. + * @param {boolean} [closed=false] - Whether the curve is closed or not. + * @param {('centripetal'|'chordal'|'catmullrom')} [curveType='centripetal'] - The curve type. + * @param {number} [tension=0.5] - Tension of the curve. + */ + constructor(points?: Array, closed?: boolean, curveType?: ("centripetal" | "chordal" | "catmullrom"), tension?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isCatmullRomCurve3: boolean; + type: string; + /** + * An array of 3D points defining the curve. + * + * @type {Array} + */ + points: Array; + /** + * Whether the curve is closed or not. + * + * @type {boolean} + * @default false + */ + closed: boolean; + /** + * The curve type. + * + * @type {('centripetal'|'chordal'|'catmullrom')} + * @default 'centripetal' + */ + curveType: ("centripetal" | "chordal" | "catmullrom"); + /** + * Tension of the curve. + * + * @type {number} + * @default 0.5 + */ + tension: number; + /** + * Returns a point on the curve. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector3} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector3): Vector3; + copy(source: any): this; + fromJSON(json: any): this; +} +import { Curve } from '../core/Curve.js'; +import { Vector3 } from '../../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/CubicBezierCurve.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/CubicBezierCurve.d.ts new file mode 100644 index 000000000..434713a9f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/curves/CubicBezierCurve.d.ts @@ -0,0 +1,78 @@ +/** + * A curve representing a 2D Cubic Bezier curve. + * + * ```js + * const curve = new THREE.CubicBezierCurve( + * new THREE.Vector2( - 0, 0 ), + * new THREE.Vector2( - 5, 15 ), + * new THREE.Vector2( 20, 15 ), + * new THREE.Vector2( 10, 0 ) + * ); + * + * const points = curve.getPoints( 50 ); + * const geometry = new THREE.BufferGeometry().setFromPoints( points ); + * + * const material = new THREE.LineBasicMaterial( { color: 0xff0000 } ); + * + * // Create the final object to add to the scene + * const curveObject = new THREE.Line( geometry, material ); + * ``` + * + * @augments Curve + */ +export class CubicBezierCurve extends Curve { + /** + * Constructs a new Cubic Bezier curve. + * + * @param {Vector2} [v0] - The start point. + * @param {Vector2} [v1] - The first control point. + * @param {Vector2} [v2] - The second control point. + * @param {Vector2} [v3] - The end point. + */ + constructor(v0?: Vector2, v1?: Vector2, v2?: Vector2, v3?: Vector2); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isCubicBezierCurve: boolean; + type: string; + /** + * The start point. + * + * @type {Vector2} + */ + v0: Vector2; + /** + * The first control point. + * + * @type {Vector2} + */ + v1: Vector2; + /** + * The second control point. + * + * @type {Vector2} + */ + v2: Vector2; + /** + * The end point. + * + * @type {Vector2} + */ + v3: Vector2; + /** + * Returns a point on the curve. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector2} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector2} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector2): Vector2; + copy(source: any): this; + fromJSON(json: any): this; +} +import { Curve } from '../core/Curve.js'; +import { Vector2 } from '../../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/CubicBezierCurve3.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/CubicBezierCurve3.d.ts new file mode 100644 index 000000000..ccc99379e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/curves/CubicBezierCurve3.d.ts @@ -0,0 +1,61 @@ +/** + * A curve representing a 3D Cubic Bezier curve. + * + * @augments Curve + */ +export class CubicBezierCurve3 extends Curve { + /** + * Constructs a new Cubic Bezier curve. + * + * @param {Vector3} [v0] - The start point. + * @param {Vector3} [v1] - The first control point. + * @param {Vector3} [v2] - The second control point. + * @param {Vector3} [v3] - The end point. + */ + constructor(v0?: Vector3, v1?: Vector3, v2?: Vector3, v3?: Vector3); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isCubicBezierCurve3: boolean; + type: string; + /** + * The start point. + * + * @type {Vector3} + */ + v0: Vector3; + /** + * The first control point. + * + * @type {Vector3} + */ + v1: Vector3; + /** + * The second control point. + * + * @type {Vector3} + */ + v2: Vector3; + /** + * The end point. + * + * @type {Vector3} + */ + v3: Vector3; + /** + * Returns a point on the curve. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector3} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector3): Vector3; + copy(source: any): this; + fromJSON(json: any): this; +} +import { Curve } from '../core/Curve.js'; +import { Vector3 } from '../../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/Curves.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/Curves.d.ts new file mode 100644 index 000000000..ce726ca5a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/curves/Curves.d.ts @@ -0,0 +1,10 @@ +export { ArcCurve } from "./ArcCurve.js"; +export { CatmullRomCurve3 } from "./CatmullRomCurve3.js"; +export { CubicBezierCurve } from "./CubicBezierCurve.js"; +export { CubicBezierCurve3 } from "./CubicBezierCurve3.js"; +export { EllipseCurve } from "./EllipseCurve.js"; +export { LineCurve } from "./LineCurve.js"; +export { LineCurve3 } from "./LineCurve3.js"; +export { QuadraticBezierCurve } from "./QuadraticBezierCurve.js"; +export { QuadraticBezierCurve3 } from "./QuadraticBezierCurve3.js"; +export { SplineCurve } from "./SplineCurve.js"; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/EllipseCurve.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/EllipseCurve.d.ts new file mode 100644 index 000000000..4080dab88 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/curves/EllipseCurve.d.ts @@ -0,0 +1,117 @@ +/** + * A curve representing an ellipse. + * + * ```js + * const curve = new THREE.EllipseCurve( + * 0, 0, + * 10, 10, + * 0, 2 * Math.PI, + * false, + * 0 + * ); + * + * const points = curve.getPoints( 50 ); + * const geometry = new THREE.BufferGeometry().setFromPoints( points ); + * + * const material = new THREE.LineBasicMaterial( { color: 0xff0000 } ); + * + * // Create the final object to add to the scene + * const ellipse = new THREE.Line( geometry, material ); + * ``` + * + * @augments Curve + */ +export class EllipseCurve extends Curve { + /** + * Constructs a new ellipse curve. + * + * @param {number} [aX=0] - The X center of the ellipse. + * @param {number} [aY=0] - The Y center of the ellipse. + * @param {number} [xRadius=1] - The radius of the ellipse in the x direction. + * @param {number} [yRadius=1] - The radius of the ellipse in the y direction. + * @param {number} [aStartAngle=0] - The start angle of the curve in radians starting from the positive X axis. + * @param {number} [aEndAngle=Math.PI*2] - The end angle of the curve in radians starting from the positive X axis. + * @param {boolean} [aClockwise=false] - Whether the ellipse is drawn clockwise or not. + * @param {number} [aRotation=0] - The rotation angle of the ellipse in radians, counterclockwise from the positive X axis. + */ + constructor(aX?: number, aY?: number, xRadius?: number, yRadius?: number, aStartAngle?: number, aEndAngle?: number, aClockwise?: boolean, aRotation?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isEllipseCurve: boolean; + type: string; + /** + * The X center of the ellipse. + * + * @type {number} + * @default 0 + */ + aX: number; + /** + * The Y center of the ellipse. + * + * @type {number} + * @default 0 + */ + aY: number; + /** + * The radius of the ellipse in the x direction. + * Setting the this value equal to the {@link EllipseCurve#yRadius} will result in a circle. + * + * @type {number} + * @default 1 + */ + xRadius: number; + /** + * The radius of the ellipse in the y direction. + * Setting the this value equal to the {@link EllipseCurve#xRadius} will result in a circle. + * + * @type {number} + * @default 1 + */ + yRadius: number; + /** + * The start angle of the curve in radians starting from the positive X axis. + * + * @type {number} + * @default 0 + */ + aStartAngle: number; + /** + * The end angle of the curve in radians starting from the positive X axis. + * + * @type {number} + * @default Math.PI*2 + */ + aEndAngle: number; + /** + * Whether the ellipse is drawn clockwise or not. + * + * @type {boolean} + * @default false + */ + aClockwise: boolean; + /** + * The rotation angle of the ellipse in radians, counterclockwise from the positive X axis. + * + * @type {number} + * @default 0 + */ + aRotation: number; + /** + * Returns a point on the curve. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector2} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector2} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector2): Vector2; + copy(source: any): this; + fromJSON(json: any): this; +} +import { Curve } from '../core/Curve.js'; +import { Vector2 } from '../../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/LineCurve.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/LineCurve.d.ts new file mode 100644 index 000000000..3a0f08206 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/curves/LineCurve.d.ts @@ -0,0 +1,50 @@ +/** + * A curve representing a 2D line segment. + * + * @augments Curve + */ +export class LineCurve extends Curve { + /** + * Constructs a new line curve. + * + * @param {Vector2} [v1] - The start point. + * @param {Vector2} [v2] - The end point. + */ + constructor(v1?: Vector2, v2?: Vector2); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLineCurve: boolean; + type: string; + /** + * The start point. + * + * @type {Vector2} + */ + v1: Vector2; + /** + * The end point. + * + * @type {Vector2} + */ + v2: Vector2; + /** + * Returns a point on the line. + * + * @param {number} t - A interpolation factor representing a position on the line. Must be in the range `[0,1]`. + * @param {Vector2} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector2} The position on the line. + */ + getPoint(t: number, optionalTarget?: Vector2): Vector2; + getPointAt(u: any, optionalTarget: any): Vector2; + getTangent(t: any, optionalTarget?: Vector2): Vector2; + getTangentAt(u: any, optionalTarget: any): Vector2; + copy(source: any): this; + fromJSON(json: any): this; +} +import { Curve } from '../core/Curve.js'; +import { Vector2 } from '../../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/LineCurve3.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/LineCurve3.d.ts new file mode 100644 index 000000000..5f03eb30d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/curves/LineCurve3.d.ts @@ -0,0 +1,50 @@ +/** + * A curve representing a 3D line segment. + * + * @augments Curve + */ +export class LineCurve3 extends Curve { + /** + * Constructs a new line curve. + * + * @param {Vector3} [v1] - The start point. + * @param {Vector3} [v2] - The end point. + */ + constructor(v1?: Vector3, v2?: Vector3); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLineCurve3: boolean; + type: string; + /** + * The start point. + * + * @type {Vector3} + */ + v1: Vector3; + /** + * The end point. + * + * @type {Vector2} + */ + v2: Vector2; + /** + * Returns a point on the line. + * + * @param {number} t - A interpolation factor representing a position on the line. Must be in the range `[0,1]`. + * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector3} The position on the line. + */ + getPoint(t: number, optionalTarget?: Vector3): Vector3; + getPointAt(u: any, optionalTarget: any): Vector3; + getTangent(t: any, optionalTarget?: Vector3): Vector3; + getTangentAt(u: any, optionalTarget: any): Vector3; + copy(source: any): this; + fromJSON(json: any): this; +} +import { Curve } from '../core/Curve.js'; +import { Vector3 } from '../../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/QuadraticBezierCurve.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/QuadraticBezierCurve.d.ts new file mode 100644 index 000000000..d123a23b5 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/curves/QuadraticBezierCurve.d.ts @@ -0,0 +1,70 @@ +/** + * A curve representing a 2D Quadratic Bezier curve. + * + * ```js + * const curve = new THREE.QuadraticBezierCurve( + * new THREE.Vector2( - 10, 0 ), + * new THREE.Vector2( 20, 15 ), + * new THREE.Vector2( 10, 0 ) + * ) + * + * const points = curve.getPoints( 50 ); + * const geometry = new THREE.BufferGeometry().setFromPoints( points ); + * + * const material = new THREE.LineBasicMaterial( { color: 0xff0000 } ); + * + * // Create the final object to add to the scene + * const curveObject = new THREE.Line( geometry, material ); + * ``` + * + * @augments Curve + */ +export class QuadraticBezierCurve extends Curve { + /** + * Constructs a new Quadratic Bezier curve. + * + * @param {Vector2} [v0] - The start point. + * @param {Vector2} [v1] - The control point. + * @param {Vector2} [v2] - The end point. + */ + constructor(v0?: Vector2, v1?: Vector2, v2?: Vector2); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isQuadraticBezierCurve: boolean; + type: string; + /** + * The start point. + * + * @type {Vector2} + */ + v0: Vector2; + /** + * The control point. + * + * @type {Vector2} + */ + v1: Vector2; + /** + * The end point. + * + * @type {Vector2} + */ + v2: Vector2; + /** + * Returns a point on the curve. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector2} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector2} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector2): Vector2; + copy(source: any): this; + fromJSON(json: any): this; +} +import { Curve } from '../core/Curve.js'; +import { Vector2 } from '../../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/QuadraticBezierCurve3.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/QuadraticBezierCurve3.d.ts new file mode 100644 index 000000000..5166fe270 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/curves/QuadraticBezierCurve3.d.ts @@ -0,0 +1,54 @@ +/** + * A curve representing a 3D Quadratic Bezier curve. + * + * @augments Curve + */ +export class QuadraticBezierCurve3 extends Curve { + /** + * Constructs a new Quadratic Bezier curve. + * + * @param {Vector3} [v0] - The start point. + * @param {Vector3} [v1] - The control point. + * @param {Vector3} [v2] - The end point. + */ + constructor(v0?: Vector3, v1?: Vector3, v2?: Vector3); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isQuadraticBezierCurve3: boolean; + type: string; + /** + * The start point. + * + * @type {Vector3} + */ + v0: Vector3; + /** + * The control point. + * + * @type {Vector3} + */ + v1: Vector3; + /** + * The end point. + * + * @type {Vector3} + */ + v2: Vector3; + /** + * Returns a point on the curve. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector3} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector3): Vector3; + copy(source: any): this; + fromJSON(json: any): this; +} +import { Curve } from '../core/Curve.js'; +import { Vector3 } from '../../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/SplineCurve.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/SplineCurve.d.ts new file mode 100644 index 000000000..10e62e17d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/curves/SplineCurve.d.ts @@ -0,0 +1,59 @@ +/** + * A curve representing a 2D spline curve. + * + * ```js + * // Create a sine-like wave + * const curve = new THREE.SplineCurve( [ + * new THREE.Vector2( -10, 0 ), + * new THREE.Vector2( -5, 5 ), + * new THREE.Vector2( 0, 0 ), + * new THREE.Vector2( 5, -5 ), + * new THREE.Vector2( 10, 0 ) + * ] ); + * + * const points = curve.getPoints( 50 ); + * const geometry = new THREE.BufferGeometry().setFromPoints( points ); + * + * const material = new THREE.LineBasicMaterial( { color: 0xff0000 } ); + * + * // Create the final object to add to the scene + * const splineObject = new THREE.Line( geometry, material ); + * ``` + * + * @augments Curve + */ +export class SplineCurve extends Curve { + /** + * Constructs a new 2D spline curve. + * + * @param {Array} [points] - An array of 2D points defining the curve. + */ + constructor(points?: Array); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSplineCurve: boolean; + type: string; + /** + * An array of 2D points defining the curve. + * + * @type {Array} + */ + points: Array; + /** + * Returns a point on the curve. + * + * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. + * @param {Vector2} [optionalTarget] - The optional target vector the result is written to. + * @return {Vector2} The position on the curve. + */ + getPoint(t: number, optionalTarget?: Vector2): Vector2; + copy(source: any): this; + fromJSON(json: any): this; +} +import { Curve } from '../core/Curve.js'; +import { Vector2 } from '../../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/lib/earcut.d.ts b/jsdoc-testing/jsdoc/src/extras/lib/earcut.d.ts new file mode 100644 index 000000000..8cf03b1bf --- /dev/null +++ b/jsdoc-testing/jsdoc/src/extras/lib/earcut.d.ts @@ -0,0 +1,7 @@ +export default function earcut(data: any, holeIndices: any, dim?: number): any[]; +export function deviation(data: any, holeIndices: any, dim: any, triangles: any): number; +export function flatten(data: any): { + vertices: any[]; + holes: number[]; + dimensions: any; +}; diff --git a/jsdoc-testing/jsdoc/src/geometries/BoxGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/BoxGeometry.d.ts new file mode 100644 index 000000000..36fb50dad --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/BoxGeometry.d.ts @@ -0,0 +1,46 @@ +/** + * A geometry class for a rectangular cuboid with a given width, height, and depth. + * On creation, the cuboid is centred on the origin, with each edge parallel to one + * of the axes. + * + * ```js + * const geometry = new THREE.BoxGeometry( 1, 1, 1 ); + * const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); + * const cube = new THREE.Mesh( geometry, material ); + * scene.add( cube ); + * ``` + * + * @augments BufferGeometry + * @demo scenes/geometry-browser.html#BoxGeometry + */ +export class BoxGeometry extends BufferGeometry { + /** + * Factory method for creating an instance of this class from the given + * JSON object. + * + * @param {Object} data - A JSON object representing the serialized geometry. + * @return {BoxGeometry} A new instance. + */ + static fromJSON(data: Object): BoxGeometry; + /** + * Constructs a new box geometry. + * + * @param {number} [width=1] - The width. That is, the length of the edges parallel to the X axis. + * @param {number} [height=1] - The height. That is, the length of the edges parallel to the Y axis. + * @param {number} [depth=1] - The depth. That is, the length of the edges parallel to the Z axis. + * @param {number} [widthSegments=1] - Number of segmented rectangular faces along the width of the sides. + * @param {number} [heightSegments=1] - Number of segmented rectangular faces along the height of the sides. + * @param {number} [depthSegments=1] - Number of segmented rectangular faces along the depth of the sides. + */ + constructor(width?: number, height?: number, depth?: number, widthSegments?: number, heightSegments?: number, depthSegments?: number); + /** + * Holds the constructor parameters that have been + * used to generate the geometry. Any modification + * after instantiation does not change the geometry. + * + * @type {Object} + */ + parameters: Object; + copy(source: any): this; +} +import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/CapsuleGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/CapsuleGeometry.d.ts new file mode 100644 index 000000000..207ba310c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/CapsuleGeometry.d.ts @@ -0,0 +1,43 @@ +/** + * A geometry class for representing a capsule. + * + * ```js + * const geometry = new THREE.CapsuleGeometry( 1, 1, 4, 8, 1 ); + * const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); + * const capsule = new THREE.Mesh( geometry, material ); + * scene.add( capsule ); + * ``` + * + * @augments BufferGeometry + * @demo scenes/geometry-browser.html#CapsuleGeometry + */ +export class CapsuleGeometry extends BufferGeometry { + /** + * Factory method for creating an instance of this class from the given + * JSON object. + * + * @param {Object} data - A JSON object representing the serialized geometry. + * @return {CapsuleGeometry} A new instance. + */ + static fromJSON(data: Object): CapsuleGeometry; + /** + * Constructs a new capsule geometry. + * + * @param {number} [radius=1] - Radius of the capsule. + * @param {number} [height=1] - Height of the middle section. + * @param {number} [capSegments=4] - Number of curve segments used to build each cap. + * @param {number} [radialSegments=8] - Number of segmented faces around the circumference of the capsule. Must be an integer >= 3. + * @param {number} [heightSegments=1] - Number of rows of faces along the height of the middle section. Must be an integer >= 1. + */ + constructor(radius?: number, height?: number, capSegments?: number, radialSegments?: number, heightSegments?: number); + /** + * Holds the constructor parameters that have been + * used to generate the geometry. Any modification + * after instantiation does not change the geometry. + * + * @type {Object} + */ + parameters: Object; + copy(source: any): this; +} +import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/CircleGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/CircleGeometry.d.ts new file mode 100644 index 000000000..964d89897 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/CircleGeometry.d.ts @@ -0,0 +1,48 @@ +/** + * A simple shape of Euclidean geometry. It is constructed from a + * number of triangular segments that are oriented around a central point and + * extend as far out as a given radius. It is built counter-clockwise from a + * start angle and a given central angle. It can also be used to create + * regular polygons, where the number of segments determines the number of + * sides. + * + * ```js + * const geometry = new THREE.CircleGeometry( 5, 32 ); + * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); + * const circle = new THREE.Mesh( geometry, material ); + * scene.add( circle ) + * ``` + * + * @augments BufferGeometry + * @demo scenes/geometry-browser.html#CircleGeometry + */ +export class CircleGeometry extends BufferGeometry { + /** + * Factory method for creating an instance of this class from the given + * JSON object. + * + * @param {Object} data - A JSON object representing the serialized geometry. + * @return {CircleGeometry} A new instance. + */ + static fromJSON(data: Object): CircleGeometry; + /** + * Constructs a new circle geometry. + * + * @param {number} [radius=1] - Radius of the circle. + * @param {number} [segments=32] - Number of segments (triangles), minimum = `3`. + * @param {number} [thetaStart=0] - Start angle for first segment in radians. + * @param {number} [thetaLength=Math.PI*2] - The central angle, often called theta, + * of the circular sector in radians. The default value results in a complete circle. + */ + constructor(radius?: number, segments?: number, thetaStart?: number, thetaLength?: number); + /** + * Holds the constructor parameters that have been + * used to generate the geometry. Any modification + * after instantiation does not change the geometry. + * + * @type {Object} + */ + parameters: Object; + copy(source: any): this; +} +import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/ConeGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/ConeGeometry.d.ts new file mode 100644 index 000000000..0df48d532 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/ConeGeometry.d.ts @@ -0,0 +1,29 @@ +/** + * A geometry class for representing a cone. + * + * ```js + * const geometry = new THREE.ConeGeometry( 5, 20, 32 ); + * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); + * const cone = new THREE.Mesh(geometry, material ); + * scene.add( cone ); + * ``` + * + * @augments CylinderGeometry + * @demo scenes/geometry-browser.html#ConeGeometry + */ +export class ConeGeometry extends CylinderGeometry { + /** + * Constructs a new cone geometry. + * + * @param {number} [radius=1] - Radius of the cone base. + * @param {number} [height=1] - Height of the cone. + * @param {number} [radialSegments=32] - Number of segmented faces around the circumference of the cone. + * @param {number} [heightSegments=1] - Number of rows of faces along the height of the cone. + * @param {boolean} [openEnded=false] - Whether the base of the cone is open or capped. + * @param {number} [thetaStart=0] - Start angle for first segment, in radians. + * @param {number} [thetaLength=Math.PI*2] - The central angle, often called theta, of the circular sector, in radians. + * The default value results in a complete cone. + */ + constructor(radius?: number, height?: number, radialSegments?: number, heightSegments?: number, openEnded?: boolean, thetaStart?: number, thetaLength?: number); +} +import { CylinderGeometry } from './CylinderGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/CylinderGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/CylinderGeometry.d.ts new file mode 100644 index 000000000..6b28774bd --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/CylinderGeometry.d.ts @@ -0,0 +1,47 @@ +/** + * A geometry class for representing a cylinder. + * + * ```js + * const geometry = new THREE.CylinderGeometry( 5, 5, 20, 32 ); + * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); + * const cylinder = new THREE.Mesh( geometry, material ); + * scene.add( cylinder ); + * ``` + * + * @augments BufferGeometry + * @demo scenes/geometry-browser.html#CylinderGeometry + */ +export class CylinderGeometry extends BufferGeometry { + /** + * Factory method for creating an instance of this class from the given + * JSON object. + * + * @param {Object} data - A JSON object representing the serialized geometry. + * @return {CylinderGeometry} A new instance. + */ + static fromJSON(data: Object): CylinderGeometry; + /** + * Constructs a new cylinder geometry. + * + * @param {number} [radiusTop=1] - Radius of the cylinder at the top. + * @param {number} [radiusBottom=1] - Radius of the cylinder at the bottom. + * @param {number} [height=1] - Height of the cylinder. + * @param {number} [radialSegments=32] - Number of segmented faces around the circumference of the cylinder. + * @param {number} [heightSegments=1] - Number of rows of faces along the height of the cylinder. + * @param {boolean} [openEnded=false] - Whether the base of the cylinder is open or capped. + * @param {number} [thetaStart=0] - Start angle for first segment, in radians. + * @param {number} [thetaLength=Math.PI*2] - The central angle, often called theta, of the circular sector, in radians. + * The default value results in a complete cylinder. + */ + constructor(radiusTop?: number, radiusBottom?: number, height?: number, radialSegments?: number, heightSegments?: number, openEnded?: boolean, thetaStart?: number, thetaLength?: number); + /** + * Holds the constructor parameters that have been + * used to generate the geometry. Any modification + * after instantiation does not change the geometry. + * + * @type {Object} + */ + parameters: Object; + copy(source: any): this; +} +import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/DodecahedronGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/DodecahedronGeometry.d.ts new file mode 100644 index 000000000..dd5a084d9 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/DodecahedronGeometry.d.ts @@ -0,0 +1,23 @@ +/** + * A geometry class for representing a dodecahedron. + * + * ```js + * const geometry = new THREE.DodecahedronGeometry(); + * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); + * const dodecahedron = new THREE.Mesh( geometry, material ); + * scene.add( dodecahedron ); + * ``` + * + * @augments PolyhedronGeometry + * @demo scenes/geometry-browser.html#DodecahedronGeometry + */ +export class DodecahedronGeometry extends PolyhedronGeometry { + /** + * Constructs a new dodecahedron geometry. + * + * @param {number} [radius=1] - Radius of the dodecahedron. + * @param {number} [detail=0] - Setting this to a value greater than `0` adds vertices making it no longer a dodecahedron. + */ + constructor(radius?: number, detail?: number); +} +import { PolyhedronGeometry } from './PolyhedronGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/EdgesGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/EdgesGeometry.d.ts new file mode 100644 index 000000000..e8a57e60b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/EdgesGeometry.d.ts @@ -0,0 +1,34 @@ +/** + * Can be used as a helper object to view the edges of a geometry. + * + * ```js + * const geometry = new THREE.BoxGeometry(); + * const edges = new THREE.EdgesGeometry( geometry ); + * const line = new THREE.LineSegments( edges ); + * scene.add( line ); + * ``` + * + * Note: It is not yet possible to serialize/deserialize instances of this class. + * + * @augments BufferGeometry + */ +export class EdgesGeometry extends BufferGeometry { + /** + * Constructs a new edges geometry. + * + * @param {?BufferGeometry} [geometry=null] - The geometry. + * @param {number} [thresholdAngle=1] - An edge is only rendered if the angle (in degrees) + * between the face normals of the adjoining faces exceeds this value. + */ + constructor(geometry?: BufferGeometry | null, thresholdAngle?: number); + /** + * Holds the constructor parameters that have been + * used to generate the geometry. Any modification + * after instantiation does not change the geometry. + * + * @type {Object} + */ + parameters: Object; + copy(source: any): this; +} +import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/ExtrudeGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/ExtrudeGeometry.d.ts new file mode 100644 index 000000000..92ba6a8a5 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/ExtrudeGeometry.d.ts @@ -0,0 +1,97 @@ +/** + * ~Options + */ +export type ExtrudeGeometry = { + /** + * - Number of points on the curves. + */ + curveSegments?: number | undefined; + /** + * - Number of points used for subdividing segments along the depth of the extruded spline. + */ + steps?: number | undefined; + /** + * - Depth to extrude the shape. + */ + depth?: number | undefined; + /** + * - Whether to beveling to the shape or not. + */ + bevelEnabled?: boolean | undefined; + /** + * - How deep into the original shape the bevel goes. + */ + bevelThickness?: number | undefined; + /** + * - Distance from the shape outline that the bevel extends. + */ + bevelSize?: number | undefined; + /** + * - Distance from the shape outline that the bevel starts. + */ + bevelOffset?: number | undefined; + /** + * - Number of bevel layers. + */ + bevelSegments?: number | undefined; + /** + * - A 3D spline path along which the shape should be extruded. Bevels not supported for path extrusion. + */ + extrudePath?: Curve | null; + /** + * - An object that provides UV generator functions for custom UV generation. + */ + UVGenerator?: Object | undefined; +}; +/** + * Creates extruded geometry from a path shape. + * + * ```js + * const length = 12, width = 8; + * + * const shape = new THREE.Shape(); + * shape.moveTo( 0,0 ); + * shape.lineTo( 0, width ); + * shape.lineTo( length, width ); + * shape.lineTo( length, 0 ); + * shape.lineTo( 0, 0 ); + * + * const geometry = new THREE.ExtrudeGeometry( shape ); + * const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); + * const mesh = new THREE.Mesh( geometry, material ) ; + * scene.add( mesh ); + * ``` + * + * @augments BufferGeometry + * @demo scenes/geometry-browser.html#ExtrudeGeometry + */ +export class ExtrudeGeometry extends BufferGeometry { + /** + * Factory method for creating an instance of this class from the given + * JSON object. + * + * @param {Object} data - A JSON object representing the serialized geometry. + * @param {Array} shapes - An array of shapes. + * @return {ExtrudeGeometry} A new instance. + */ + static fromJSON(data: Object, shapes: Array): ExtrudeGeometry; + /** + * Constructs a new extrude geometry. + * + * @param {Shape|Array} [shapes] - A shape or an array of shapes. + * @param {ExtrudeGeometry~Options} [options] - The extrude settings. + */ + constructor(shapes?: Shape | Array, options?: {}); + /** + * Holds the constructor parameters that have been + * used to generate the geometry. Any modification + * after instantiation does not change the geometry. + * + * @type {Object} + */ + parameters: Object; + copy(source: any): this; + toJSON(): any; +} +import { BufferGeometry } from '../core/BufferGeometry.js'; +import { Shape } from '../extras/core/Shape.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/Geometries.d.ts b/jsdoc-testing/jsdoc/src/geometries/Geometries.d.ts new file mode 100644 index 000000000..b1be46c46 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/Geometries.d.ts @@ -0,0 +1,21 @@ +export * from "./BoxGeometry.js"; +export * from "./CapsuleGeometry.js"; +export * from "./CircleGeometry.js"; +export * from "./ConeGeometry.js"; +export * from "./CylinderGeometry.js"; +export * from "./DodecahedronGeometry.js"; +export * from "./EdgesGeometry.js"; +export * from "./ExtrudeGeometry.js"; +export * from "./IcosahedronGeometry.js"; +export * from "./LatheGeometry.js"; +export * from "./OctahedronGeometry.js"; +export * from "./PlaneGeometry.js"; +export * from "./PolyhedronGeometry.js"; +export * from "./RingGeometry.js"; +export * from "./ShapeGeometry.js"; +export * from "./SphereGeometry.js"; +export * from "./TetrahedronGeometry.js"; +export * from "./TorusGeometry.js"; +export * from "./TorusKnotGeometry.js"; +export * from "./TubeGeometry.js"; +export * from "./WireframeGeometry.js"; diff --git a/jsdoc-testing/jsdoc/src/geometries/IcosahedronGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/IcosahedronGeometry.d.ts new file mode 100644 index 000000000..fb50e77df --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/IcosahedronGeometry.d.ts @@ -0,0 +1,23 @@ +/** + * A geometry class for representing an icosahedron. + * + * ```js + * const geometry = new THREE.IcosahedronGeometry(); + * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); + * const icosahedron = new THREE.Mesh( geometry, material ); + * scene.add( icosahedron ); + * ``` + * + * @augments PolyhedronGeometry + * @demo scenes/geometry-browser.html#IcosahedronGeometry + */ +export class IcosahedronGeometry extends PolyhedronGeometry { + /** + * Constructs a new icosahedron geometry. + * + * @param {number} [radius=1] - Radius of the icosahedron. + * @param {number} [detail=0] - Setting this to a value greater than `0` adds vertices making it no longer a icosahedron. + */ + constructor(radius?: number, detail?: number); +} +import { PolyhedronGeometry } from './PolyhedronGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/LatheGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/LatheGeometry.d.ts new file mode 100644 index 000000000..cce939fca --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/LatheGeometry.d.ts @@ -0,0 +1,50 @@ +/** + * Creates meshes with axial symmetry like vases. The lathe rotates around the Y axis. + * + * ```js + * const points = []; + * for ( let i = 0; i < 10; i ++ ) { + * points.push( new THREE.Vector2( Math.sin( i * 0.2 ) * 10 + 5, ( i - 5 ) * 2 ) ); + * } + * const geometry = new THREE.LatheGeometry( points ); + * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); + * const lathe = new THREE.Mesh( geometry, material ); + * scene.add( lathe ); + * ``` + * + * @augments BufferGeometry + * @demo scenes/geometry-browser.html#LatheGeometry + */ +export class LatheGeometry extends BufferGeometry { + /** + * Factory method for creating an instance of this class from the given + * JSON object. + * + * @param {Object} data - A JSON object representing the serialized geometry. + * @return {LatheGeometry} A new instance. + */ + static fromJSON(data: Object): LatheGeometry; + /** + * Constructs a new lathe geometry. + * + * @param {Array} [points] - An array of points in 2D space. The x-coordinate of each point + * must be greater than zero. + * @param {number} [segments=12] - The number of circumference segments to generate. + * @param {number} [phiStart=0] - The starting angle in radians. + * @param {number} [phiLength=Math.PI*2] - The radian (0 to 2PI) range of the lathed section 2PI is a + * closed lathe, less than 2PI is a portion. + */ + constructor(points?: Array, segments?: number, phiStart?: number, phiLength?: number); + /** + * Holds the constructor parameters that have been + * used to generate the geometry. Any modification + * after instantiation does not change the geometry. + * + * @type {Object} + */ + parameters: Object; + copy(source: any): this; +} +import { BufferGeometry } from '../core/BufferGeometry.js'; +import { Vector2 } from '../math/Vector2.js'; +import { Vector3 } from '../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/OctahedronGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/OctahedronGeometry.d.ts new file mode 100644 index 000000000..d61fe28a2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/OctahedronGeometry.d.ts @@ -0,0 +1,23 @@ +/** + * A geometry class for representing an octahedron. + * + * ```js + * const geometry = new THREE.OctahedronGeometry(); + * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); + * const octahedron = new THREE.Mesh( geometry, material ); + * scene.add( octahedron ); + * ``` + * + * @augments PolyhedronGeometry + * @demo scenes/geometry-browser.html#OctahedronGeometry + */ +export class OctahedronGeometry extends PolyhedronGeometry { + /** + * Constructs a new octahedron geometry. + * + * @param {number} [radius=1] - Radius of the octahedron. + * @param {number} [detail=0] - Setting this to a value greater than `0` adds vertices making it no longer a octahedron. + */ + constructor(radius?: number, detail?: number); +} +import { PolyhedronGeometry } from './PolyhedronGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/PlaneGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/PlaneGeometry.d.ts new file mode 100644 index 000000000..d75a367ea --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/PlaneGeometry.d.ts @@ -0,0 +1,42 @@ +/** + * A geometry class for representing a plane. + * + * ```js + * const geometry = new THREE.PlaneGeometry( 1, 1 ); + * const material = new THREE.MeshBasicMaterial( { color: 0xffff00, side: THREE.DoubleSide } ); + * const plane = new THREE.Mesh( geometry, material ); + * scene.add( plane ); + * ``` + * + * @augments BufferGeometry + * @demo scenes/geometry-browser.html#PlaneGeometry + */ +export class PlaneGeometry extends BufferGeometry { + /** + * Factory method for creating an instance of this class from the given + * JSON object. + * + * @param {Object} data - A JSON object representing the serialized geometry. + * @return {PlaneGeometry} A new instance. + */ + static fromJSON(data: Object): PlaneGeometry; + /** + * Constructs a new plane geometry. + * + * @param {number} [width=1] - The width along the X axis. + * @param {number} [height=1] - The height along the Y axis + * @param {number} [widthSegments=1] - The number of segments along the X axis. + * @param {number} [heightSegments=1] - The number of segments along the Y axis. + */ + constructor(width?: number, height?: number, widthSegments?: number, heightSegments?: number); + /** + * Holds the constructor parameters that have been + * used to generate the geometry. Any modification + * after instantiation does not change the geometry. + * + * @type {Object} + */ + parameters: Object; + copy(source: any): this; +} +import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/PolyhedronGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/PolyhedronGeometry.d.ts new file mode 100644 index 000000000..c0ef0437c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/PolyhedronGeometry.d.ts @@ -0,0 +1,36 @@ +/** + * A polyhedron is a solid in three dimensions with flat faces. This class + * will take an array of vertices, project them onto a sphere, and then + * divide them up to the desired level of detail. + * + * @augments BufferGeometry + */ +export class PolyhedronGeometry extends BufferGeometry { + /** + * Factory method for creating an instance of this class from the given + * JSON object. + * + * @param {Object} data - A JSON object representing the serialized geometry. + * @return {PolyhedronGeometry} A new instance. + */ + static fromJSON(data: Object): PolyhedronGeometry; + /** + * Constructs a new polyhedron geometry. + * + * @param {Array} [vertices] - A flat array of vertices describing the base shape. + * @param {Array} [indices] - A flat array of indices describing the base shape. + * @param {number} [radius=1] - The radius of the shape. + * @param {number} [detail=0] - How many levels to subdivide the geometry. The more detail, the smoother the shape. + */ + constructor(vertices?: Array, indices?: Array, radius?: number, detail?: number); + /** + * Holds the constructor parameters that have been + * used to generate the geometry. Any modification + * after instantiation does not change the geometry. + * + * @type {Object} + */ + parameters: Object; + copy(source: any): this; +} +import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/RingGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/RingGeometry.d.ts new file mode 100644 index 000000000..3d54a0d1a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/RingGeometry.d.ts @@ -0,0 +1,44 @@ +/** + * A class for generating a two-dimensional ring geometry. + * + * ```js + * const geometry = new THREE.RingGeometry( 1, 5, 32 ); + * const material = new THREE.MeshBasicMaterial( { color: 0xffff00, side: THREE.DoubleSide } ); + * const mesh = new THREE.Mesh( geometry, material ); + * scene.add( mesh ); + * ``` + * + * @augments BufferGeometry + * @demo scenes/geometry-browser.html#RingGeometry + */ +export class RingGeometry extends BufferGeometry { + /** + * Factory method for creating an instance of this class from the given + * JSON object. + * + * @param {Object} data - A JSON object representing the serialized geometry. + * @return {RingGeometry} A new instance. + */ + static fromJSON(data: Object): RingGeometry; + /** + * Constructs a new ring geometry. + * + * @param {number} [innerRadius=0.5] - The inner radius of the ring. + * @param {number} [outerRadius=1] - The outer radius of the ring. + * @param {number} [thetaSegments=32] - Number of segments. A higher number means the ring will be more round. Minimum is `3`. + * @param {number} [phiSegments=1] - Number of segments per ring segment. Minimum is `1`. + * @param {number} [thetaStart=0] - Starting angle in radians. + * @param {number} [thetaLength=Math.PI*2] - Central angle in radians. + */ + constructor(innerRadius?: number, outerRadius?: number, thetaSegments?: number, phiSegments?: number, thetaStart?: number, thetaLength?: number); + /** + * Holds the constructor parameters that have been + * used to generate the geometry. Any modification + * after instantiation does not change the geometry. + * + * @type {Object} + */ + parameters: Object; + copy(source: any): this; +} +import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/ShapeGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/ShapeGeometry.d.ts new file mode 100644 index 000000000..335290e14 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/ShapeGeometry.d.ts @@ -0,0 +1,47 @@ +/** + * Creates an one-sided polygonal geometry from one or more path shapes. + * + * ```js + * const arcShape = new THREE.Shape() + * .moveTo( 5, 1 ) + * .absarc( 1, 1, 4, 0, Math.PI * 2, false ); + * + * const geometry = new THREE.ShapeGeometry( arcShape ); + * const material = new THREE.MeshBasicMaterial( { color: 0x00ff00, side: THREE.DoubleSide } ); + * const mesh = new THREE.Mesh( geometry, material ) ; + * scene.add( mesh ); + * ``` + * + * @augments BufferGeometry + * @demo scenes/geometry-browser.html#ShapeGeometry + */ +export class ShapeGeometry extends BufferGeometry { + /** + * Factory method for creating an instance of this class from the given + * JSON object. + * + * @param {Object} data - A JSON object representing the serialized geometry. + * @param {Array} shapes - An array of shapes. + * @return {ShapeGeometry} A new instance. + */ + static fromJSON(data: Object, shapes: Array): ShapeGeometry; + /** + * Constructs a new shape geometry. + * + * @param {Shape|Array} [shapes] - A shape or an array of shapes. + * @param {number} [curveSegments=12] - Number of segments per shape. + */ + constructor(shapes?: Shape | Array, curveSegments?: number); + /** + * Holds the constructor parameters that have been + * used to generate the geometry. Any modification + * after instantiation does not change the geometry. + * + * @type {Object} + */ + parameters: Object; + copy(source: any): this; + toJSON(): any; +} +import { BufferGeometry } from '../core/BufferGeometry.js'; +import { Shape } from '../extras/core/Shape.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/SphereGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/SphereGeometry.d.ts new file mode 100644 index 000000000..b150fa7df --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/SphereGeometry.d.ts @@ -0,0 +1,45 @@ +/** + * A class for generating a sphere geometry. + * + * ```js + * const geometry = new THREE.SphereGeometry( 15, 32, 16 ); + * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); + * const sphere = new THREE.Mesh( geometry, material ); + * scene.add( sphere ); + * ``` + * + * @augments BufferGeometry + * @demo scenes/geometry-browser.html#SphereGeometry + */ +export class SphereGeometry extends BufferGeometry { + /** + * Factory method for creating an instance of this class from the given + * JSON object. + * + * @param {Object} data - A JSON object representing the serialized geometry. + * @return {SphereGeometry} A new instance. + */ + static fromJSON(data: Object): SphereGeometry; + /** + * Constructs a new sphere geometry. + * + * @param {number} [radius=1] - The sphere radius. + * @param {number} [widthSegments=32] - The number of horizontal segments. Minimum value is `3`. + * @param {number} [heightSegments=16] - The number of vertical segments. Minimum value is `2`. + * @param {number} [phiStart=0] - The horizontal starting angle in radians. + * @param {number} [phiLength=Math.PI*2] - The horizontal sweep angle size. + * @param {number} [thetaStart=0] - The vertical starting angle in radians. + * @param {number} [thetaLength=Math.PI] - The vertical sweep angle size. + */ + constructor(radius?: number, widthSegments?: number, heightSegments?: number, phiStart?: number, phiLength?: number, thetaStart?: number, thetaLength?: number); + /** + * Holds the constructor parameters that have been + * used to generate the geometry. Any modification + * after instantiation does not change the geometry. + * + * @type {Object} + */ + parameters: Object; + copy(source: any): this; +} +import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/TetrahedronGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/TetrahedronGeometry.d.ts new file mode 100644 index 000000000..20b8cc1f3 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/TetrahedronGeometry.d.ts @@ -0,0 +1,23 @@ +/** + * A geometry class for representing an tetrahedron. + * + * ```js + * const geometry = new THREE.TetrahedronGeometry(); + * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); + * const tetrahedron = new THREE.Mesh( geometry, material ); + * scene.add( tetrahedron ); + * ``` + * + * @augments PolyhedronGeometry + * @demo scenes/geometry-browser.html#TetrahedronGeometry + */ +export class TetrahedronGeometry extends PolyhedronGeometry { + /** + * Constructs a new tetrahedron geometry. + * + * @param {number} [radius=1] - Radius of the tetrahedron. + * @param {number} [detail=0] - Setting this to a value greater than `0` adds vertices making it no longer a tetrahedron. + */ + constructor(radius?: number, detail?: number); +} +import { PolyhedronGeometry } from './PolyhedronGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/TorusGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/TorusGeometry.d.ts new file mode 100644 index 000000000..cb545919c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/TorusGeometry.d.ts @@ -0,0 +1,45 @@ +/** + * A geometry class for representing an torus. + * + * ```js + * const geometry = new THREE.TorusGeometry( 10, 3, 16, 100 ); + * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); + * const torus = new THREE.Mesh( geometry, material ); + * scene.add( torus ); + * ``` + * + * @augments BufferGeometry + * @demo scenes/geometry-browser.html#TorusGeometry + */ +export class TorusGeometry extends BufferGeometry { + /** + * Factory method for creating an instance of this class from the given + * JSON object. + * + * @param {Object} data - A JSON object representing the serialized geometry. + * @return {TorusGeometry} A new instance. + */ + static fromJSON(data: Object): TorusGeometry; + /** + * Constructs a new torus geometry. + * + * @param {number} [radius=1] - Radius of the torus, from the center of the torus to the center of the tube. + * @param {number} [tube=0.4] - Radius of the tube. Must be smaller than `radius`. + * @param {number} [radialSegments=12] - The number of radial segments. + * @param {number} [tubularSegments=48] - The number of tubular segments. + * @param {number} [arc=Math.PI*2] - Central angle in radians. + * @param {number} [thetaStart=0] - Start of the tubular sweep in radians. + * @param {number} [thetaLength=Math.PI*2] - Length of the tubular sweep in radians. + */ + constructor(radius?: number, tube?: number, radialSegments?: number, tubularSegments?: number, arc?: number, thetaStart?: number, thetaLength?: number); + /** + * Holds the constructor parameters that have been + * used to generate the geometry. Any modification + * after instantiation does not change the geometry. + * + * @type {Object} + */ + parameters: Object; + copy(source: any): this; +} +import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/TorusKnotGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/TorusKnotGeometry.d.ts new file mode 100644 index 000000000..5f7272dfe --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/TorusKnotGeometry.d.ts @@ -0,0 +1,46 @@ +/** + * Creates a torus knot, the particular shape of which is defined by a pair + * of coprime integers, p and q. If p and q are not coprime, the result will + * be a torus link. + * + * ```js + * const geometry = new THREE.TorusKnotGeometry( 10, 3, 100, 16 ); + * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); + * const torusKnot = new THREE.Mesh( geometry, material ); + * scene.add( torusKnot ); + * ``` + * + * @augments BufferGeometry + * @demo scenes/geometry-browser.html#TorusKnotGeometry + */ +export class TorusKnotGeometry extends BufferGeometry { + /** + * Factory method for creating an instance of this class from the given + * JSON object. + * + * @param {Object} data - A JSON object representing the serialized geometry. + * @return {TorusKnotGeometry} A new instance. + */ + static fromJSON(data: Object): TorusKnotGeometry; + /** + * Constructs a new torus knot geometry. + * + * @param {number} [radius=1] - Radius of the torus knot. + * @param {number} [tube=0.4] - Radius of the tube. + * @param {number} [tubularSegments=64] - The number of tubular segments. + * @param {number} [radialSegments=8] - The number of radial segments. + * @param {number} [p=2] - This value determines, how many times the geometry winds around its axis of rotational symmetry. + * @param {number} [q=3] - This value determines, how many times the geometry winds around a circle in the interior of the torus. + */ + constructor(radius?: number, tube?: number, tubularSegments?: number, radialSegments?: number, p?: number, q?: number); + /** + * Holds the constructor parameters that have been + * used to generate the geometry. Any modification + * after instantiation does not change the geometry. + * + * @type {Object} + */ + parameters: Object; + copy(source: any): this; +} +import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/TubeGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/TubeGeometry.d.ts new file mode 100644 index 000000000..f34277010 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/TubeGeometry.d.ts @@ -0,0 +1,60 @@ +/** + * Creates a tube that extrudes along a 3D curve. + * + * ```js + * class CustomSinCurve extends THREE.Curve { + * + * getPoint( t, optionalTarget = new THREE.Vector3() ) { + * + * const tx = t * 3 - 1.5; + * const ty = Math.sin( 2 * Math.PI * t ); + * const tz = 0; + * + * return optionalTarget.set( tx, ty, tz ); + * } + * + * } + * + * const path = new CustomSinCurve( 10 ); + * const geometry = new THREE.TubeGeometry( path, 20, 2, 8, false ); + * const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); + * const mesh = new THREE.Mesh( geometry, material ); + * scene.add( mesh ); + * ``` + * + * @augments BufferGeometry + * @demo scenes/geometry-browser.html#TubeGeometry + */ +export class TubeGeometry extends BufferGeometry { + /** + * Factory method for creating an instance of this class from the given + * JSON object. + * + * @param {Object} data - A JSON object representing the serialized geometry. + * @return {TubeGeometry} A new instance. + */ + static fromJSON(data: Object): TubeGeometry; + /** + * Constructs a new tube geometry. + * + * @param {Curve} [path=QuadraticBezierCurve3] - A 3D curve defining the path of the tube. + * @param {number} [tubularSegments=64] - The number of segments that make up the tube. + * @param {number} [radius=1] -The radius of the tube. + * @param {number} [radialSegments=8] - The number of segments that make up the cross-section. + * @param {boolean} [closed=false] - Whether the tube is closed or not. + */ + constructor(path?: Curve, tubularSegments?: number, radius?: number, radialSegments?: number, closed?: boolean); + /** + * Holds the constructor parameters that have been + * used to generate the geometry. Any modification + * after instantiation does not change the geometry. + * + * @type {Object} + */ + parameters: Object; + tangents: any; + normals: any; + binormals: any; + copy(source: any): this; +} +import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/WireframeGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/WireframeGeometry.d.ts new file mode 100644 index 000000000..39f9908ab --- /dev/null +++ b/jsdoc-testing/jsdoc/src/geometries/WireframeGeometry.d.ts @@ -0,0 +1,38 @@ +/** + * Can be used as a helper object to visualize a geometry as a wireframe. + * + * ```js + * const geometry = new THREE.SphereGeometry(); + * + * const wireframe = new THREE.WireframeGeometry( geometry ); + * + * const line = new THREE.LineSegments( wireframe ); + * line.material.depthWrite = false; + * line.material.opacity = 0.25; + * line.material.transparent = true; + * + * scene.add( line ); + * ``` + * + * Note: It is not yet possible to serialize/deserialize instances of this class. + * + * @augments BufferGeometry + */ +export class WireframeGeometry extends BufferGeometry { + /** + * Constructs a new wireframe geometry. + * + * @param {?BufferGeometry} [geometry=null] - The geometry. + */ + constructor(geometry?: BufferGeometry | null); + /** + * Holds the constructor parameters that have been + * used to generate the geometry. Any modification + * after instantiation does not change the geometry. + * + * @type {Object} + */ + parameters: Object; + copy(source: any): this; +} +import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/ArrowHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/ArrowHelper.d.ts new file mode 100644 index 000000000..302ccad5a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/helpers/ArrowHelper.d.ts @@ -0,0 +1,75 @@ +/** + * An 3D arrow object for visualizing directions. + * + * ```js + * const dir = new THREE.Vector3( 1, 2, 0 ); + * + * //normalize the direction vector (convert to vector of length 1) + * dir.normalize(); + * + * const origin = new THREE.Vector3( 0, 0, 0 ); + * const length = 1; + * const hex = 0xffff00; + * + * const arrowHelper = new THREE.ArrowHelper( dir, origin, length, hex ); + * scene.add( arrowHelper ); + * ``` + * + * @augments Object3D + */ +export class ArrowHelper extends Object3D { + /** + * Constructs a new arrow helper. + * + * @param {Vector3} [dir=(0, 0, 1)] - The (normalized) direction vector. + * @param {Vector3} [origin=(0, 0, 0)] - Point at which the arrow starts. + * @param {number} [length=1] - Length of the arrow in world units. + * @param {(number|Color|string)} [color=0xffff00] - Color of the arrow. + * @param {number} [headLength=length*0.2] - The length of the head of the arrow. + * @param {number} [headWidth=headLength*0.2] - The width of the head of the arrow. + */ + constructor(dir?: Vector3, origin?: Vector3, length?: number, color?: (number | Color | string), headLength?: number, headWidth?: number); + type: string; + /** + * The line part of the arrow helper. + * + * @type {Line} + */ + line: Line; + /** + * The cone part of the arrow helper. + * + * @type {Mesh} + */ + cone: Mesh; + /** + * Sets the direction of the helper. + * + * @param {Vector3} dir - The normalized direction vector. + */ + setDirection(dir: Vector3): void; + /** + * Sets the length of the helper. + * + * @param {number} length - Length of the arrow in world units. + * @param {number} [headLength=length*0.2] - The length of the head of the arrow. + * @param {number} [headWidth=headLength*0.2] - The width of the head of the arrow. + */ + setLength(length: number, headLength?: number, headWidth?: number): void; + /** + * Sets the color of the helper. + * + * @param {number|Color|string} color - The color to set. + */ + setColor(color: number | Color | string): void; + copy(source: any): this; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { Object3D } from '../core/Object3D.js'; +import { Line } from '../objects/Line.js'; +import { Mesh } from '../objects/Mesh.js'; +import { Vector3 } from '../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/AxesHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/AxesHelper.d.ts new file mode 100644 index 000000000..cc7858bfe --- /dev/null +++ b/jsdoc-testing/jsdoc/src/helpers/AxesHelper.d.ts @@ -0,0 +1,35 @@ +/** + * An axis object to visualize the 3 axes in a simple way. + * The X axis is red. The Y axis is green. The Z axis is blue. + * + * ```js + * const axesHelper = new THREE.AxesHelper( 5 ); + * scene.add( axesHelper ); + * ``` + * + * @augments LineSegments + */ +export class AxesHelper extends LineSegments { + /** + * Constructs a new axes helper. + * + * @param {number} [size=1] - Size of the lines representing the axes. + */ + constructor(size?: number); + /** + * Defines the colors of the axes helper. + * + * @param {number|Color|string} xAxisColor - The color for the x axis. + * @param {number|Color|string} yAxisColor - The color for the y axis. + * @param {number|Color|string} zAxisColor - The color for the z axis. + * @return {AxesHelper} A reference to this axes helper. + */ + setColors(xAxisColor: number | Color | string, yAxisColor: number | Color | string, zAxisColor: number | Color | string): AxesHelper; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { LineSegments } from '../objects/LineSegments.js'; +import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/Box3Helper.d.ts b/jsdoc-testing/jsdoc/src/helpers/Box3Helper.d.ts new file mode 100644 index 000000000..982072dbb --- /dev/null +++ b/jsdoc-testing/jsdoc/src/helpers/Box3Helper.d.ts @@ -0,0 +1,35 @@ +/** + * A helper object to visualize an instance of {@link Box3}. + * + * ```js + * const box = new THREE.Box3(); + * box.setFromCenterAndSize( new THREE.Vector3( 1, 1, 1 ), new THREE.Vector3( 2, 1, 3 ) ); + * + * const helper = new THREE.Box3Helper( box, 0xffff00 ); + * scene.add( helper ) + * ``` + * + * @augments LineSegments + */ +export class Box3Helper extends LineSegments { + /** + * Constructs a new box3 helper. + * + * @param {Box3} box - The box to visualize. + * @param {number|Color|string} [color=0xffff00] - The box's color. + */ + constructor(box: Box3, color?: number | Color | string); + /** + * The box being visualized. + * + * @type {Box3} + */ + box: Box3; + updateMatrixWorld(force: any): void; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { LineSegments } from '../objects/LineSegments.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/BoxHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/BoxHelper.d.ts new file mode 100644 index 000000000..0b864050e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/helpers/BoxHelper.d.ts @@ -0,0 +1,44 @@ +/** + * Helper object to graphically show the world-axis-aligned bounding box + * around an object. The actual bounding box is handled with {@link Box3}, + * this is just a visual helper for debugging. It can be automatically + * resized with {@link BoxHelper#update} when the object it's created from + * is transformed. Note that the object must have a geometry for this to work, + * so it won't work with sprites. + * + * ```js + * const sphere = new THREE.SphereGeometry(); + * const object = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( 0xff0000 ) ); + * const box = new THREE.BoxHelper( object, 0xffff00 ); + * scene.add( box ); + * ``` + * + * @augments LineSegments + */ +export class BoxHelper extends LineSegments { + /** + * The 3D object being visualized. + * + * @type {Object3D} + */ + object: Object3D; + /** + * Updates the helper's geometry to match the dimensions of the object, + * including any children. + */ + update(): void; + /** + * Updates the wireframe box for the passed object. + * + * @param {Object3D} object - The 3D object to create the helper for. + * @return {BoxHelper} A reference to this instance. + */ + setFromObject(object: Object3D): BoxHelper; + copy(source: any, recursive: any): this; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { LineSegments } from '../objects/LineSegments.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/CameraHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/CameraHelper.d.ts new file mode 100644 index 000000000..69f517585 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/helpers/CameraHelper.d.ts @@ -0,0 +1,64 @@ +/** + * This helps with visualizing what a camera contains in its frustum. It + * visualizes the frustum of a camera using a line segments. + * + * Based on frustum visualization in [lightgl.js shadowmap example](https://github.com/evanw/lightgl.js/blob/master/tests/shadowmap.html). + * + * `CameraHelper` must be a child of the scene. + * + * When the camera is transformed or its projection matrix is changed, it's necessary + * to call the `update()` method of the respective helper. + * + * ```js + * const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 ); + * const helper = new THREE.CameraHelper( camera ); + * scene.add( helper ); + * ``` + * + * @augments LineSegments + */ +export class CameraHelper extends LineSegments { + /** + * Constructs a new arrow helper. + * + * @param {Camera} camera - The camera to visualize. + */ + constructor(camera: Camera); + /** + * The camera being visualized. + * + * @type {Camera} + */ + camera: Camera; + /** + * This contains the points used to visualize the camera. + * + * @type {Object>} + */ + pointMap: { + [x: string]: number[]; + }; + /** + * Defines the colors of the helper. + * + * @param {Color} frustum - The frustum line color. + * @param {Color} cone - The cone line color. + * @param {Color} up - The up line color. + * @param {Color} target - The target line color. + * @param {Color} cross - The cross line color. + * @return {CameraHelper} A reference to this helper. + */ + setColors(frustum: Color, cone: Color, up: Color, target: Color, cross: Color): CameraHelper; + /** + * Updates the helper based on the projection matrix of the camera. + */ + update(): void; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { LineSegments } from '../objects/LineSegments.js'; +import { Camera } from '../cameras/Camera.js'; +import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/DirectionalLightHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/DirectionalLightHelper.d.ts new file mode 100644 index 000000000..edd4fa7ff --- /dev/null +++ b/jsdoc-testing/jsdoc/src/helpers/DirectionalLightHelper.d.ts @@ -0,0 +1,68 @@ +/** + * Helper object to assist with visualizing a {@link DirectionalLight}'s + * effect on the scene. This consists of a plane and a line representing the + * light's position and direction. + * + * When the directional light or its target are transformed or light properties + * are changed, it's necessary to call the `update()` method of the respective helper. + * + * ```js + * const light = new THREE.DirectionalLight( 0xFFFFFF ); + * scene.add( light ); + * + * const helper = new THREE.DirectionalLightHelper( light, 5 ); + * scene.add( helper ); + * ``` + * + * @augments Object3D + */ +export class DirectionalLightHelper extends Object3D { + /** + * Constructs a new directional light helper. + * + * @param {DirectionalLight} light - The light to be visualized. + * @param {number} [size=1] - The dimensions of the plane. + * @param {number|Color|string} [color] - The helper's color. If not set, the helper will take + * the color of the light. + */ + constructor(light: DirectionalLight, size?: number, color?: number | Color | string); + /** + * The light being visualized. + * + * @type {DirectionalLight} + */ + light: DirectionalLight; + matrix: any; + /** + * The color parameter passed in the constructor. + * If not set, the helper will take the color of the light. + * + * @type {number|Color|string} + */ + color: number | Color | string; + type: string; + /** + * Contains the line showing the location of the directional light. + * + * @type {Line} + */ + lightPlane: Line; + /** + * Represents the target line of the directional light. + * + * @type {Line} + */ + targetLine: Line; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; + /** + * Updates the helper to match the position and direction of the + * light being visualized. + */ + update(): void; +} +import { Object3D } from '../core/Object3D.js'; +import { Line } from '../objects/Line.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/GridHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/GridHelper.d.ts new file mode 100644 index 000000000..c0df154aa --- /dev/null +++ b/jsdoc-testing/jsdoc/src/helpers/GridHelper.d.ts @@ -0,0 +1,32 @@ +/** + * The helper is an object to define grids. Grids are two-dimensional + * arrays of lines. + * + * ```js + * const size = 10; + * const divisions = 10; + * + * const gridHelper = new THREE.GridHelper( size, divisions ); + * scene.add( gridHelper ); + * ``` + * + * @augments LineSegments + */ +export class GridHelper extends LineSegments { + /** + * Constructs a new grid helper. + * + * @param {number} [size=10] - The size of the grid. + * @param {number} [divisions=10] - The number of divisions across the grid. + * @param {number|Color|string} [color1=0x444444] - The color of the center line. + * @param {number|Color|string} [color2=0x888888] - The color of the lines of the grid. + */ + constructor(size?: number, divisions?: number, color1?: number | Color | string, color2?: number | Color | string); + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { LineSegments } from '../objects/LineSegments.js'; +import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/HemisphereLightHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/HemisphereLightHelper.d.ts new file mode 100644 index 000000000..5920f3014 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/helpers/HemisphereLightHelper.d.ts @@ -0,0 +1,55 @@ +/** + * Creates a visual aid consisting of a spherical mesh for a + * given {@link HemisphereLight}. + * + * When the hemisphere light is transformed or its light properties are changed, + * it's necessary to call the `update()` method of the respective helper. + * + * ```js + * const light = new THREE.HemisphereLight( 0xffffbb, 0x080820, 1 ); + * const helper = new THREE.HemisphereLightHelper( light, 5 ); + * scene.add( helper ); + * ``` + * + * @augments Object3D + */ +export class HemisphereLightHelper extends Object3D { + /** + * Constructs a new hemisphere light helper. + * + * @param {HemisphereLight} light - The light to be visualized. + * @param {number} [size=1] - The size of the mesh used to visualize the light. + * @param {number|Color|string} [color] - The helper's color. If not set, the helper will take + * the color of the light. + */ + constructor(light: HemisphereLight, size?: number, color?: number | Color | string); + /** + * The light being visualized. + * + * @type {HemisphereLight} + */ + light: HemisphereLight; + matrix: any; + /** + * The color parameter passed in the constructor. + * If not set, the helper will take the color of the light. + * + * @type {number|Color|string} + */ + color: number | Color | string; + type: string; + material: MeshBasicMaterial; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; + /** + * Updates the helper to match the position and direction of the + * light being visualized. + */ + update(): void; +} +import { Object3D } from '../core/Object3D.js'; +import { Color } from '../math/Color.js'; +import { MeshBasicMaterial } from '../materials/MeshBasicMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/PlaneHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/PlaneHelper.d.ts new file mode 100644 index 000000000..be6163223 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/helpers/PlaneHelper.d.ts @@ -0,0 +1,41 @@ +/** + * A helper object to visualize an instance of {@link Plane}. + * + * ```js + * const plane = new THREE.Plane( new THREE.Vector3( 1, 1, 0.2 ), 3 ); + * const helper = new THREE.PlaneHelper( plane, 1, 0xffff00 ); + * scene.add( helper ); + * ``` + * + * @augments Line + */ +export class PlaneHelper extends Line { + /** + * Constructs a new plane helper. + * + * @param {Plane} plane - The plane to be visualized. + * @param {number} [size=1] - The side length of plane helper. + * @param {number|Color|string} [hex=0xffff00] - The helper's color. + */ + constructor(plane: Plane, size?: number, hex?: number | Color | string); + /** + * The plane being visualized. + * + * @type {Plane} + */ + plane: Plane; + /** + * The side length of plane helper. + * + * @type {number} + * @default 1 + */ + size: number; + updateMatrixWorld(force: any): void; + /** + * Updates the helper to match the position and direction of the + * light being visualized. + */ + dispose(): void; +} +import { Line } from '../objects/Line.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/PointLightHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/PointLightHelper.d.ts new file mode 100644 index 000000000..f2f51e312 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/helpers/PointLightHelper.d.ts @@ -0,0 +1,52 @@ +/** + * This displays a helper object consisting of a spherical mesh for + * visualizing an instance of {@link PointLight}. + * + * ```js + * const pointLight = new THREE.PointLight( 0xff0000, 1, 100 ); + * pointLight.position.set( 10, 10, 10 ); + * scene.add( pointLight ); + * + * const sphereSize = 1; + * const pointLightHelper = new THREE.PointLightHelper( pointLight, sphereSize ); + * scene.add( pointLightHelper ); + * ``` + * + * @augments Mesh + */ +export class PointLightHelper extends Mesh { + /** + * Constructs a new point light helper. + * + * @param {PointLight} light - The light to be visualized. + * @param {number} [sphereSize=1] - The size of the sphere helper. + * @param {number|Color|string} [color] - The helper's color. If not set, the helper will take + * the color of the light. + */ + constructor(light: PointLight, sphereSize?: number, color?: number | Color | string); + /** + * The light being visualized. + * + * @type {PointLight} + */ + light: PointLight; + /** + * The color parameter passed in the constructor. + * If not set, the helper will take the color of the light. + * + * @type {number|Color|string} + */ + color: number | Color | string; + matrix: any; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; + /** + * Updates the helper to match the position of the + * light being visualized. + */ + update(): void; +} +import { Mesh } from '../objects/Mesh.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/PolarGridHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/PolarGridHelper.d.ts new file mode 100644 index 000000000..9d4caa9c7 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/helpers/PolarGridHelper.d.ts @@ -0,0 +1,36 @@ +/** + * This helper is an object to define polar grids. Grids are + * two-dimensional arrays of lines. + * + * ```js + * const radius = 10; + * const sectors = 16; + * const rings = 8; + * const divisions = 64; + * + * const helper = new THREE.PolarGridHelper( radius, sectors, rings, divisions ); + * scene.add( helper ); + * ``` + * + * @augments LineSegments + */ +export class PolarGridHelper extends LineSegments { + /** + * Constructs a new polar grid helper. + * + * @param {number} [radius=10] - The radius of the polar grid. This can be any positive number. + * @param {number} [sectors=16] - The number of sectors the grid will be divided into. This can be any positive integer. + * @param {number} [rings=16] - The number of rings. This can be any positive integer. + * @param {number} [divisions=64] - The number of line segments used for each circle. This can be any positive integer. + * @param {number|Color|string} [color1=0x444444] - The first color used for grid elements. + * @param {number|Color|string} [color2=0x888888] - The second color used for grid elements. + */ + constructor(radius?: number, sectors?: number, rings?: number, divisions?: number, color1?: number | Color | string, color2?: number | Color | string); + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { LineSegments } from '../objects/LineSegments.js'; +import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/SkeletonHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/SkeletonHelper.d.ts new file mode 100644 index 000000000..a129e99ab --- /dev/null +++ b/jsdoc-testing/jsdoc/src/helpers/SkeletonHelper.d.ts @@ -0,0 +1,56 @@ +/** + * A helper object to assist with visualizing a {@link Skeleton}. + * + * ```js + * const helper = new THREE.SkeletonHelper( skinnedMesh ); + * scene.add( helper ); + * ``` + * + * @augments LineSegments + */ +export class SkeletonHelper extends LineSegments { + /** + * Constructs a new skeleton helper. + * + * @param {Object3D} object - Usually an instance of {@link SkinnedMesh}. However, any 3D object + * can be used if it represents a hierarchy of bones (see {@link Bone}). + */ + constructor(object: Object3D); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSkeletonHelper: boolean; + /** + * The object being visualized. + * + * @type {Object3D} + */ + root: Object3D; + /** + * The list of bones that the helper visualizes. + * + * @type {Array} + */ + bones: Array; + matrix: any; + updateMatrixWorld(force: any): void; + /** + * Defines the colors of the helper. + * + * @param {Color} color1 - The first line color for each bone. + * @param {Color} color2 - The second line color for each bone. + * @return {SkeletonHelper} A reference to this helper. + */ + setColors(color1: Color, color2: Color): SkeletonHelper; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { LineSegments } from '../objects/LineSegments.js'; +import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/SpotLightHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/SpotLightHelper.d.ts new file mode 100644 index 000000000..7e73edcef --- /dev/null +++ b/jsdoc-testing/jsdoc/src/helpers/SpotLightHelper.d.ts @@ -0,0 +1,54 @@ +/** + * This displays a cone shaped helper object for a {@link SpotLight}. + * + * When the spot light or its target are transformed or light properties are + * changed, it's necessary to call the `update()` method of the respective helper. + * + * ```js + * const spotLight = new THREE.SpotLight( 0xffffff ); + * spotLight.position.set( 10, 10, 10 ); + * scene.add( spotLight ); + * + * const spotLightHelper = new THREE.SpotLightHelper( spotLight ); + * scene.add( spotLightHelper ); + * ``` + * + * @augments Object3D + */ +export class SpotLightHelper extends Object3D { + /** + * Constructs a new spot light helper. + * + * @param {HemisphereLight} light - The light to be visualized. + * @param {number|Color|string} [color] - The helper's color. If not set, the helper will take + * the color of the light. + */ + constructor(light: HemisphereLight, color?: number | Color | string); + /** + * The light being visualized. + * + * @type {SpotLight} + */ + light: SpotLight; + /** + * The color parameter passed in the constructor. + * If not set, the helper will take the color of the light. + * + * @type {number|Color|string} + */ + color: number | Color | string; + type: string; + cone: LineSegments; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; + /** + * Updates the helper to match the position and direction of the + * light being visualized. + */ + update(): void; +} +import { Object3D } from '../core/Object3D.js'; +import { LineSegments } from '../objects/LineSegments.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/AmbientLight.d.ts b/jsdoc-testing/jsdoc/src/lights/AmbientLight.d.ts new file mode 100644 index 000000000..78c3196fd --- /dev/null +++ b/jsdoc-testing/jsdoc/src/lights/AmbientLight.d.ts @@ -0,0 +1,30 @@ +/** + * This light globally illuminates all objects in the scene equally. + * + * It cannot be used to cast shadows as it does not have a direction. + * + * ```js + * const light = new THREE.AmbientLight( 0x404040 ); // soft white light + * scene.add( light ); + * ``` + * + * @augments Light + */ +export class AmbientLight extends Light { + /** + * Constructs a new ambient light. + * + * @param {(number|Color|string)} [color=0xffffff] - The light's color. + * @param {number} [intensity=1] - The light's strength/intensity. + */ + constructor(color?: (number | Color | string), intensity?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isAmbientLight: boolean; +} +import { Light } from './Light.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/DirectionalLight.d.ts b/jsdoc-testing/jsdoc/src/lights/DirectionalLight.d.ts new file mode 100644 index 000000000..753317423 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/lights/DirectionalLight.d.ts @@ -0,0 +1,67 @@ +/** + * A light that gets emitted in a specific direction. This light will behave + * as though it is infinitely far away and the rays produced from it are all + * parallel. The common use case for this is to simulate daylight; the sun is + * far enough away that its position can be considered to be infinite, and + * all light rays coming from it are parallel. + * + * A common point of confusion for directional lights is that setting the + * rotation has no effect. This is because three.js's DirectionalLight is the + * equivalent to what is often called a 'Target Direct Light' in other + * applications. + * + * This means that its direction is calculated as pointing from the light's + * {@link Object3D#position} to the {@link DirectionalLight#target} position + * (as opposed to a 'Free Direct Light' that just has a rotation + * component). + * + * This light can cast shadows - see the {@link DirectionalLightShadow} for details. + * + * ```js + * // White directional light at half intensity shining from the top. + * const directionalLight = new THREE.DirectionalLight( 0xffffff, 0.5 ); + * scene.add( directionalLight ); + * ``` + * + * @augments Light + */ +export class DirectionalLight extends Light { + /** + * Constructs a new directional light. + * + * @param {(number|Color|string)} [color=0xffffff] - The light's color. + * @param {number} [intensity=1] - The light's strength/intensity. + */ + constructor(color?: (number | Color | string), intensity?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isDirectionalLight: boolean; + /** + * The directional light points from its position to the + * target's position. + * + * For the target's position to be changed to anything other + * than the default, it must be added to the scene. + * + * It is also possible to set the target to be another 3D object + * in the scene. The light will now track the target object. + * + * @type {Object3D} + */ + target: Object3D; + /** + * This property holds the light's shadow configuration. + * + * @type {DirectionalLightShadow} + */ + shadow: DirectionalLightShadow; + copy(source: any): this; +} +import { Light } from './Light.js'; +import { Object3D } from '../core/Object3D.js'; +import { DirectionalLightShadow } from './DirectionalLightShadow.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/DirectionalLightShadow.d.ts b/jsdoc-testing/jsdoc/src/lights/DirectionalLightShadow.d.ts new file mode 100644 index 000000000..69d809ea1 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/lights/DirectionalLightShadow.d.ts @@ -0,0 +1,20 @@ +/** + * Represents the shadow configuration of directional lights. + * + * @augments LightShadow + */ +export class DirectionalLightShadow extends LightShadow { + /** + * Constructs a new directional light shadow. + */ + constructor(); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isDirectionalLightShadow: boolean; +} +import { LightShadow } from './LightShadow.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/HemisphereLight.d.ts b/jsdoc-testing/jsdoc/src/lights/HemisphereLight.d.ts new file mode 100644 index 000000000..9bffa0d03 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/lights/HemisphereLight.d.ts @@ -0,0 +1,40 @@ +/** + * A light source positioned directly above the scene, with color fading from + * the sky color to the ground color. + * + * This light cannot be used to cast shadows. + * + * ```js + * const light = new THREE.HemisphereLight( 0xffffbb, 0x080820, 1 ); + * scene.add( light ); + * ``` + * + * @augments Light + */ +export class HemisphereLight extends Light { + /** + * Constructs a new hemisphere light. + * + * @param {(number|Color|string)} [skyColor=0xffffff] - The light's sky color. + * @param {(number|Color|string)} [groundColor=0xffffff] - The light's ground color. + * @param {number} [intensity=1] - The light's strength/intensity. + */ + constructor(skyColor?: (number | Color | string), groundColor?: (number | Color | string), intensity?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isHemisphereLight: boolean; + /** + * The light's ground color. + * + * @type {Color} + */ + groundColor: Color; + copy(source: any, recursive: any): this; +} +import { Light } from './Light.js'; +import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/Light.d.ts b/jsdoc-testing/jsdoc/src/lights/Light.d.ts new file mode 100644 index 000000000..15a77b361 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/lights/Light.d.ts @@ -0,0 +1,47 @@ +/** + * Abstract base class for lights - all other light types inherit the + * properties and methods described here. + * + * @abstract + * @augments Object3D + */ +export class Light extends Object3D { + /** + * Constructs a new light. + * + * @param {(number|Color|string)} [color=0xffffff] - The light's color. + * @param {number} [intensity=1] - The light's strength/intensity. + */ + constructor(color?: (number | Color | string), intensity?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLight: boolean; + type: string; + /** + * The light's color. + * + * @type {Color} + */ + color: Color; + /** + * The light's intensity. + * + * @type {number} + * @default 1 + */ + intensity: number; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; + copy(source: any, recursive: any): this; + toJSON(meta: any): Object; +} +import { Object3D } from '../core/Object3D.js'; +import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/LightProbe.d.ts b/jsdoc-testing/jsdoc/src/lights/LightProbe.d.ts new file mode 100644 index 000000000..8a03aa8cf --- /dev/null +++ b/jsdoc-testing/jsdoc/src/lights/LightProbe.d.ts @@ -0,0 +1,45 @@ +/** + * Light probes are an alternative way of adding light to a 3D scene. Unlike + * classical light sources (e.g. directional, point or spot lights), light + * probes do not emit light. Instead they store information about light + * passing through 3D space. During rendering, the light that hits a 3D + * object is approximated by using the data from the light probe. + * + * Light probes are usually created from (radiance) environment maps. The + * class {@link LightProbeGenerator} can be used to create light probes from + * cube textures or render targets. However, light estimation data could also + * be provided in other forms e.g. by WebXR. This enables the rendering of + * augmented reality content that reacts to real world lighting. + * + * The current probe implementation in three.js supports so-called diffuse + * light probes. This type of light probe is functionally equivalent to an + * irradiance environment map. + * + * @augments Light + */ +export class LightProbe extends Light { + /** + * Constructs a new light probe. + * + * @param {SphericalHarmonics3} sh - The spherical harmonics which represents encoded lighting information. + * @param {number} [intensity=1] - The light's strength/intensity. + */ + constructor(sh?: SphericalHarmonics3, intensity?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLightProbe: boolean; + /** + * A light probe uses spherical harmonics to encode lighting information. + * + * @type {SphericalHarmonics3} + */ + sh: SphericalHarmonics3; + copy(source: any): this; +} +import { Light } from './Light.js'; +import { SphericalHarmonics3 } from '../math/SphericalHarmonics3.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/LightShadow.d.ts b/jsdoc-testing/jsdoc/src/lights/LightShadow.d.ts new file mode 100644 index 000000000..24ffaf5b3 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/lights/LightShadow.d.ts @@ -0,0 +1,198 @@ +/** + * Abstract base class for light shadow classes. These classes + * represent the shadow configuration for different light types. + * + * @abstract + */ +export class LightShadow { + /** + * Constructs a new light shadow. + * + * @param {Camera} camera - The light's view of the world. + */ + constructor(camera: Camera); + /** + * The light's view of the world. + * + * @type {Camera} + */ + camera: Camera; + /** + * The intensity of the shadow. The default is `1`. + * Valid values are in the range `[0, 1]`. + * + * @type {number} + * @default 1 + */ + intensity: number; + /** + * Shadow map bias, how much to add or subtract from the normalized depth + * when deciding whether a surface is in shadow. + * + * The default is `0`. Very tiny adjustments here (in the order of `0.0001`) + * may help reduce artifacts in shadows. + * + * @type {number} + * @default 0 + */ + bias: number; + /** + * A node version of `bias`. Only supported with `WebGPURenderer`. + * + * If a bias node is defined, `bias` has no effect. + * + * @type {?Node} + * @default null + */ + biasNode: Node | null; + /** + * Defines how much the position used to query the shadow map is offset along + * the object normal. The default is `0`. Increasing this value can be used to + * reduce shadow acne especially in large scenes where light shines onto + * geometry at a shallow angle. The cost is that shadows may appear distorted. + * + * @type {number} + * @default 0 + */ + normalBias: number; + /** + * Setting this to values greater than 1 will blur the edges of the shadow. + * High values will cause unwanted banding effects in the shadows - a greater + * map size will allow for a higher value to be used here before these effects + * become visible. + * + * The property has no effect when the shadow map type is `BasicShadowMap`. + * + * @type {number} + * @default 1 + */ + radius: number; + /** + * The amount of samples to use when blurring a VSM shadow map. + * + * @type {number} + * @default 8 + */ + blurSamples: number; + /** + * Defines the width and height of the shadow map. Higher values give better quality + * shadows at the cost of computation time. Values must be powers of two. + * + * @type {Vector2} + * @default (512,512) + */ + mapSize: Vector2; + /** + * The type of shadow texture. The default is `UnsignedByteType`. + * + * @type {number} + * @default UnsignedByteType + */ + mapType: number; + /** + * The depth map generated using the internal camera; a location beyond a + * pixel's depth is in shadow. Computed internally during rendering. + * + * @type {?RenderTarget} + * @default null + */ + map: RenderTarget | null; + /** + * The distribution map generated using the internal camera; an occlusion is + * calculated based on the distribution of depths. Computed internally during + * rendering. + * + * @type {?RenderTarget} + * @default null + */ + mapPass: RenderTarget | null; + /** + * Model to shadow camera space, to compute location and depth in shadow map. + * This is computed internally during rendering. + * + * @type {Matrix4} + */ + matrix: Matrix4; + /** + * Enables automatic updates of the light's shadow. If you do not require dynamic + * lighting / shadows, you may set this to `false`. + * + * @type {boolean} + * @default true + */ + autoUpdate: boolean; + /** + * When set to `true`, shadow maps will be updated in the next `render` call. + * If you have set {@link LightShadow#autoUpdate} to `false`, you will need to + * set this property to `true` and then make a render call to update the light's shadow. + * + * @type {boolean} + * @default false + */ + needsUpdate: boolean; + _frustum: Frustum; + _frameExtents: Vector2; + _viewportCount: number; + _viewports: Vector4[]; + /** + * Used internally by the renderer to get the number of viewports that need + * to be rendered for this shadow. + * + * @return {number} The viewport count. + */ + getViewportCount(): number; + /** + * Gets the shadow cameras frustum. Used internally by the renderer to cull objects. + * + * @return {Frustum} The shadow camera frustum. + */ + getFrustum(): Frustum; + /** + * Update the matrices for the camera and shadow, used internally by the renderer. + * + * @param {Light} light - The light for which the shadow is being rendered. + */ + updateMatrices(light: Light): void; + /** + * Returns a viewport definition for the given viewport index. + * + * @param {number} viewportIndex - The viewport index. + * @return {Vector4} The viewport. + */ + getViewport(viewportIndex: number): Vector4; + /** + * Returns the frame extends. + * + * @return {Vector2} The frame extends. + */ + getFrameExtents(): Vector2; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; + /** + * Copies the values of the given light shadow instance to this instance. + * + * @param {LightShadow} source - The light shadow to copy. + * @return {LightShadow} A reference to this light shadow instance. + */ + copy(source: LightShadow): LightShadow; + /** + * Returns a new light shadow instance with copied values from this instance. + * + * @return {LightShadow} A clone of this instance. + */ + clone(): LightShadow; + /** + * Serializes the light shadow into JSON. + * + * @return {Object} A JSON object representing the serialized light shadow. + * @see {@link ObjectLoader#parse} + */ + toJSON(): Object; +} +import { Vector2 } from '../math/Vector2.js'; +import { Matrix4 } from '../math/Matrix4.js'; +import { Frustum } from '../math/Frustum.js'; +import { Vector4 } from '../math/Vector4.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/PointLight.d.ts b/jsdoc-testing/jsdoc/src/lights/PointLight.d.ts new file mode 100644 index 000000000..f42ec0f7c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/lights/PointLight.d.ts @@ -0,0 +1,70 @@ +/** + * A light that gets emitted from a single point in all directions. A common + * use case for this is to replicate the light emitted from a bare + * lightbulb. + * + * This light can cast shadows - see the {@link PointLightShadow} for details. + * + * ```js + * const light = new THREE.PointLight( 0xff0000, 1, 100 ); + * light.position.set( 50, 50, 50 ); + * scene.add( light ); + * ``` + * + * @augments Light + */ +export class PointLight extends Light { + /** + * Constructs a new point light. + * + * @param {(number|Color|string)} [color=0xffffff] - The light's color. + * @param {number} [intensity=1] - The light's strength/intensity measured in candela (cd). + * @param {number} [distance=0] - Maximum range of the light. `0` means no limit. + * @param {number} [decay=2] - The amount the light dims along the distance of the light. + */ + constructor(color?: (number | Color | string), intensity?: number, distance?: number, decay?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isPointLight: boolean; + /** + * When distance is zero, light will attenuate according to inverse-square + * law to infinite distance. When distance is non-zero, light will attenuate + * according to inverse-square law until near the distance cutoff, where it + * will then attenuate quickly and smoothly to 0. Inherently, cutoffs are not + * physically correct. + * + * @type {number} + * @default 0 + */ + distance: number; + /** + * The amount the light dims along the distance of the light. In context of + * physically-correct rendering the default value should not be changed. + * + * @type {number} + * @default 2 + */ + decay: number; + /** + * This property holds the light's shadow configuration. + * + * @type {PointLightShadow} + */ + shadow: PointLightShadow; + set power(power: number); + /** + * The light's power. Power is the luminous power of the light measured in lumens (lm). + * Changing the power will also change the light's intensity. + * + * @type {number} + */ + get power(): number; + copy(source: any, recursive: any): this; +} +import { Light } from './Light.js'; +import { PointLightShadow } from './PointLightShadow.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/PointLightShadow.d.ts b/jsdoc-testing/jsdoc/src/lights/PointLightShadow.d.ts new file mode 100644 index 000000000..9157a63b8 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/lights/PointLightShadow.d.ts @@ -0,0 +1,20 @@ +/** + * Represents the shadow configuration of point lights. + * + * @augments LightShadow + */ +export class PointLightShadow extends LightShadow { + /** + * Constructs a new point light shadow. + */ + constructor(); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isPointLightShadow: boolean; +} +import { LightShadow } from './LightShadow.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/RectAreaLight.d.ts b/jsdoc-testing/jsdoc/src/lights/RectAreaLight.d.ts new file mode 100644 index 000000000..6d4b7b657 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/lights/RectAreaLight.d.ts @@ -0,0 +1,68 @@ +/** + * This class emits light uniformly across the face a rectangular plane. + * This light type can be used to simulate light sources such as bright + * windows or strip lighting. + * + * Important Notes: + * + * - There is no shadow support. + * - Only PBR materials are supported. + * - You have to include `RectAreaLightUniformsLib` (`WebGLRenderer`) or `RectAreaLightTexturesLib` (`WebGPURenderer`) + * into your app and init the uniforms/textures. + * + * ```js + * RectAreaLightUniformsLib.init(); // only relevant for WebGLRenderer + * THREE.RectAreaLightNode.setLTC( RectAreaLightTexturesLib.init() ); // only relevant for WebGPURenderer + * + * const intensity = 1; const width = 10; const height = 10; + * const rectLight = new THREE.RectAreaLight( 0xffffff, intensity, width, height ); + * rectLight.position.set( 5, 5, 0 ); + * rectLight.lookAt( 0, 0, 0 ); + * scene.add( rectLight ) + * ``` + * + * @augments Light + */ +export class RectAreaLight extends Light { + /** + * Constructs a new area light. + * + * @param {(number|Color|string)} [color=0xffffff] - The light's color. + * @param {number} [intensity=1] - The light's strength/intensity. + * @param {number} [width=10] - The width of the light. + * @param {number} [height=10] - The height of the light. + */ + constructor(color?: (number | Color | string), intensity?: number, width?: number, height?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isRectAreaLight: boolean; + /** + * The width of the light. + * + * @type {number} + * @default 10 + */ + width: number; + /** + * The height of the light. + * + * @type {number} + * @default 10 + */ + height: number; + set power(power: number); + /** + * The light's power. Power is the luminous power of the light measured in lumens (lm). + * Changing the power will also change the light's intensity. + * + * @type {number} + */ + get power(): number; + copy(source: any): this; +} +import { Light } from './Light.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/SpotLight.d.ts b/jsdoc-testing/jsdoc/src/lights/SpotLight.d.ts new file mode 100644 index 000000000..1197fdf27 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/lights/SpotLight.d.ts @@ -0,0 +1,116 @@ +/** + * This light gets emitted from a single point in one direction, along a cone + * that increases in size the further from the light it gets. + * + * This light can cast shadows - see the {@link SpotLightShadow} for details. + * + * ```js + * // white spotlight shining from the side, modulated by a texture + * const spotLight = new THREE.SpotLight( 0xffffff ); + * spotLight.position.set( 100, 1000, 100 ); + * spotLight.map = new THREE.TextureLoader().load( url ); + * + * spotLight.castShadow = true; + * spotLight.shadow.mapSize.width = 1024; + * spotLight.shadow.mapSize.height = 1024; + * spotLight.shadow.camera.near = 500; + * spotLight.shadow.camera.far = 4000; + * spotLight.shadow.camera.fov = 30;s + * ``` + * + * @augments Light + */ +export class SpotLight extends Light { + /** + * Constructs a new spot light. + * + * @param {(number|Color|string)} [color=0xffffff] - The light's color. + * @param {number} [intensity=1] - The light's strength/intensity measured in candela (cd). + * @param {number} [distance=0] - Maximum range of the light. `0` means no limit. + * @param {number} [angle=Math.PI/3] - Maximum angle of light dispersion from its direction whose upper bound is `Math.PI/2`. + * @param {number} [penumbra=0] - Percent of the spotlight cone that is attenuated due to penumbra. Value range is `[0,1]`. + * @param {number} [decay=2] - The amount the light dims along the distance of the light. + */ + constructor(color?: (number | Color | string), intensity?: number, distance?: number, angle?: number, penumbra?: number, decay?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSpotLight: boolean; + /** + * The spot light points from its position to the + * target's position. + * + * For the target's position to be changed to anything other + * than the default, it must be added to the scene. + * + * It is also possible to set the target to be another 3D object + * in the scene. The light will now track the target object. + * + * @type {Object3D} + */ + target: Object3D; + /** + * Maximum range of the light. `0` means no limit. + * + * @type {number} + * @default 0 + */ + distance: number; + /** + * Maximum angle of light dispersion from its direction whose upper bound is `Math.PI/2`. + * + * @type {number} + * @default Math.PI/3 + */ + angle: number; + /** + * Percent of the spotlight cone that is attenuated due to penumbra. + * Value range is `[0,1]`. + * + * @type {number} + * @default 0 + */ + penumbra: number; + /** + * The amount the light dims along the distance of the light. In context of + * physically-correct rendering the default value should not be changed. + * + * @type {number} + * @default 2 + */ + decay: number; + /** + * A texture used to modulate the color of the light. The spot light + * color is mixed with the RGB value of this texture, with a ratio + * corresponding to its alpha value. The cookie-like masking effect is + * reproduced using pixel values (0, 0, 0, 1-cookie_value). + * + * *Warning*: This property is disabled if {@link Object3D#castShadow} is set to `false`. + * + * @type {?Texture} + * @default null + */ + map: Texture | null; + /** + * This property holds the light's shadow configuration. + * + * @type {SpotLightShadow} + */ + shadow: SpotLightShadow; + set power(power: number); + /** + * The light's power. Power is the luminous power of the light measured in lumens (lm). + * Changing the power will also change the light's intensity. + * + * @type {number} + */ + get power(): number; + copy(source: any, recursive: any): this; +} +import { Light } from './Light.js'; +import { Object3D } from '../core/Object3D.js'; +import { SpotLightShadow } from './SpotLightShadow.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/SpotLightShadow.d.ts b/jsdoc-testing/jsdoc/src/lights/SpotLightShadow.d.ts new file mode 100644 index 000000000..0de4c95b0 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/lights/SpotLightShadow.d.ts @@ -0,0 +1,37 @@ +/** + * Represents the shadow configuration of directional lights. + * + * @augments LightShadow + */ +export class SpotLightShadow extends LightShadow { + /** + * Constructs a new spot light shadow. + */ + constructor(); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSpotLightShadow: boolean; + /** + * Used to focus the shadow camera. The camera's field of view is set as a + * percentage of the spotlight's field-of-view. Range is `[0, 1]`. + * + * @type {number} + * @default 1 + */ + focus: number; + /** + * Texture aspect ratio. + * + * @type {number} + * @default 1 + */ + aspect: number; + updateMatrices(light: any): void; + copy(source: any): this; +} +import { LightShadow } from './LightShadow.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/webgpu/IESSpotLight.d.ts b/jsdoc-testing/jsdoc/src/lights/webgpu/IESSpotLight.d.ts new file mode 100644 index 000000000..0e372ff20 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/lights/webgpu/IESSpotLight.d.ts @@ -0,0 +1,18 @@ +export default IESSpotLight; +/** + * A IES version of {@link SpotLight}. Can only be used with {@link WebGPURenderer}. + * + * @augments SpotLight + */ +declare class IESSpotLight extends SpotLight { + /** + * The IES map. It's a lookup table that stores normalized attenuation factors + * (0.0 to 1.0) that represent the light's intensity at a specific angle. + * + * @type {?Texture} + * @default null + */ + iesMap: Texture | null; + copy(source: any, recursive: any): this; +} +import { SpotLight } from '../SpotLight.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/webgpu/ProjectorLight.d.ts b/jsdoc-testing/jsdoc/src/lights/webgpu/ProjectorLight.d.ts new file mode 100644 index 000000000..f561855ff --- /dev/null +++ b/jsdoc-testing/jsdoc/src/lights/webgpu/ProjectorLight.d.ts @@ -0,0 +1,17 @@ +export default ProjectorLight; +/** + * A projector light version of {@link SpotLight}. Can only be used with {@link WebGPURenderer}. + * + * @augments SpotLight + */ +declare class ProjectorLight extends SpotLight { + /** + * Aspect ratio of the light. Set to `null` to use the texture aspect ratio. + * + * @type {?number} + * @default null + */ + aspect: number | null; + copy(source: any, recursive: any): this; +} +import { SpotLight } from '../SpotLight.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/AnimationLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/AnimationLoader.d.ts new file mode 100644 index 000000000..4bed37855 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/loaders/AnimationLoader.d.ts @@ -0,0 +1,32 @@ +/** + * Class for loading animation clips in the JSON format. The files are internally + * loaded via {@link FileLoader}. + * + * ```js + * const loader = new THREE.AnimationLoader(); + * const animations = await loader.loadAsync( 'animations/animation.js' ); + * ``` + * + * @augments Loader + */ +export class AnimationLoader extends Loader { + /** + * Starts loading from the given URL and pass the loaded animations as an array + * holding instances of {@link AnimationClip} to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Array)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: Array) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given JSON object and returns an array of animation clips. + * + * @param {Object} json - The serialized animation clips. + * @return {Array} The parsed animation clips. + */ + parse(json: Object): Array; +} +import { Loader } from './Loader.js'; +import { AnimationClip } from '../animation/AnimationClip.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/AudioLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/AudioLoader.d.ts new file mode 100644 index 000000000..c9c2c4c2c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/loaders/AudioLoader.d.ts @@ -0,0 +1,30 @@ +/** + * Class for loading audio buffers. Audios are internally + * loaded via {@link FileLoader}. + * + * ```js + * const audioListener = new THREE.AudioListener(); + * const ambientSound = new THREE.Audio( audioListener ); + * + * const loader = new THREE.AudioLoader(); + * const audioBuffer = await loader.loadAsync( 'audio/ambient_ocean.ogg' ); + * + * ambientSound.setBuffer( audioBuffer ); + * ambientSound.play(); + * ``` + * + * @augments Loader + */ +export class AudioLoader extends Loader { + /** + * Starts loading from the given URL and passes the loaded audio buffer + * to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(AudioBuffer)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: AudioBuffer) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; +} +import { Loader } from './Loader.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/BufferGeometryLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/BufferGeometryLoader.d.ts new file mode 100644 index 000000000..b85f471e0 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/loaders/BufferGeometryLoader.d.ts @@ -0,0 +1,35 @@ +/** + * Class for loading geometries. The files are internally + * loaded via {@link FileLoader}. + * + * ```js + * const loader = new THREE.BufferGeometryLoader(); + * const geometry = await loader.loadAsync( 'models/json/pressure.json' ); + * + * const material = new THREE.MeshBasicMaterial( { color: 0xF5F5F5 } ); + * const object = new THREE.Mesh( geometry, material ); + * scene.add( object ); + * ``` + * + * @augments Loader + */ +export class BufferGeometryLoader extends Loader { + /** + * Starts loading from the given URL and pass the loaded geometry to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(BufferGeometry)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: BufferGeometry) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given JSON object and returns a geometry. + * + * @param {Object} json - The serialized geometry. + * @return {BufferGeometry} The parsed geometry. + */ + parse(json: Object): BufferGeometry; +} +import { Loader } from './Loader.js'; +import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/CompressedTextureLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/CompressedTextureLoader.d.ts new file mode 100644 index 000000000..652d27243 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/loaders/CompressedTextureLoader.d.ts @@ -0,0 +1,61 @@ +/** + * ~TexData + */ +export type CompressedTextureLoader = { + /** + * - The width of the base mip. + */ + width: number; + /** + * - The width of the base mip. + */ + height: number; + /** + * - Whether the data represent a cubemap or not. + */ + isCubemap: boolean; + /** + * - The mipmap count. + */ + mipmapCount: number; + /** + * - An array holding the mipmaps. + * Each entry holds the data and the dimensions for each level. + */ + mipmaps: Array<{ + data: TypedArray; + width: number; + height: number; + }>; + /** + * - The texture format. + */ + format: number; +}; +/** + * Abstract base class for loading compressed texture formats S3TC, ASTC or ETC. + * Textures are internally loaded via {@link FileLoader}. + * + * Derived classes have to implement the `parse()` method which holds the parsing + * for the respective format. + * + * @abstract + * @augments Loader + */ +export class CompressedTextureLoader extends Loader { + /** + * Starts loading from the given URL and passes the loaded compressed texture + * to the `onLoad()` callback. The method also returns a new texture object which can + * directly be used for material creation. If you do it this way, the texture + * may pop up in your scene once the respective loading process is finished. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(CompressedTexture)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + * @return {CompressedTexture} The compressed texture. + */ + load(url: string, onLoad: (arg0: CompressedTexture) => any, onProgress: onProgressCallback, onError: onErrorCallback): CompressedTexture; +} +import { Loader } from './Loader.js'; +import { CompressedTexture } from '../textures/CompressedTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/CubeTextureLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/CubeTextureLoader.d.ts new file mode 100644 index 000000000..8ac41df2c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/loaders/CubeTextureLoader.d.ts @@ -0,0 +1,45 @@ +/** + * Class for loading cube textures. Images are internally loaded via {@link ImageLoader}. + * + * The loader returns an instance of {@link CubeTexture} and expects the cube map to + * be defined as six separate images representing the sides of a cube. Other cube map definitions + * like vertical and horizontal cross, column and row layouts are not supported. + * + * Note that, by convention, cube maps are specified in a coordinate system + * in which positive-x is to the right when looking up the positive-z axis -- + * in other words, using a left-handed coordinate system. Since three.js uses + * a right-handed coordinate system, environment maps used in three.js will + * have pos-x and neg-x swapped. + * + * The loaded cube texture is in sRGB color space. Meaning {@link Texture#colorSpace} + * is set to `SRGBColorSpace` by default. + * + * ```js + * const loader = new THREE.CubeTextureLoader().setPath( 'textures/cubeMaps/' ); + * const cubeTexture = await loader.loadAsync( [ + * 'px.png', 'nx.png', 'py.png', 'ny.png', 'pz.png', 'nz.png' + * ] ); + * scene.background = cubeTexture; + * ``` + * + * @augments Loader + */ +export class CubeTextureLoader extends Loader { + /** + * Starts loading from the given URL and pass the fully loaded cube texture + * to the `onLoad()` callback. The method also returns a new cube texture object which can + * directly be used for material creation. If you do it this way, the cube texture + * may pop up in your scene once the respective loading process is finished. + * + * @param {Array} urls - Array of 6 URLs to images, one for each side of the + * cube texture. The urls should be specified in the following order: pos-x, + * neg-x, pos-y, neg-y, pos-z, neg-z. An array of data URIs are allowed as well. + * @param {function(CubeTexture)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Unsupported in this loader. + * @param {onErrorCallback} onError - Executed when errors occur. + * @return {CubeTexture} The cube texture. + */ + load(urls: Array, onLoad: (arg0: CubeTexture) => any, onProgress: onProgressCallback, onError: onErrorCallback): CubeTexture; +} +import { Loader } from './Loader.js'; +import { CubeTexture } from '../textures/CubeTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/DataTextureLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/DataTextureLoader.d.ts new file mode 100644 index 000000000..5f26b0e5b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/loaders/DataTextureLoader.d.ts @@ -0,0 +1,92 @@ +/** + * ~TexData + */ +export type DataTextureLoader = { + /** + * - An object holding width, height and the texture data. + */ + image?: Object | undefined; + /** + * - The width of the base mip. + */ + width?: number | undefined; + /** + * - The width of the base mip. + */ + height?: number | undefined; + /** + * - The texture data. + */ + data?: TypedArray; + /** + * - The texture format. + */ + format?: number | undefined; + /** + * - The texture type. + */ + type?: number | undefined; + /** + * - If set to `true`, the texture is flipped along the vertical axis when uploaded to the GPU. + */ + flipY?: boolean | undefined; + /** + * - The wrapS value. + */ + wrapS?: number | undefined; + /** + * - The wrapT value. + */ + wrapT?: number | undefined; + /** + * - The anisotropy value. + */ + anisotropy?: number | undefined; + /** + * - Whether to generate mipmaps or not. + */ + generateMipmaps?: boolean | undefined; + /** + * - The color space. + */ + colorSpace?: string | undefined; + /** + * - The mag filter. + */ + magFilter?: number | undefined; + /** + * - The min filter. + */ + minFilter?: number | undefined; + /** + * - The mipmaps. + */ + mipmaps?: Object[] | undefined; +}; +/** + * Abstract base class for loading binary texture formats RGBE, EXR or TGA. + * Textures are internally loaded via {@link FileLoader}. + * + * Derived classes have to implement the `parse()` method which holds the parsing + * for the respective format. + * + * @abstract + * @augments Loader + */ +export class DataTextureLoader extends Loader { + /** + * Starts loading from the given URL and passes the loaded data texture + * to the `onLoad()` callback. The method also returns a new texture object which can + * directly be used for material creation. If you do it this way, the texture + * may pop up in your scene once the respective loading process is finished. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(DataTexture)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + * @return {DataTexture} The data texture. + */ + load(url: string, onLoad: (arg0: DataTexture) => any, onProgress: onProgressCallback, onError: onErrorCallback): DataTexture; +} +import { Loader } from './Loader.js'; +import { DataTexture } from '../textures/DataTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/FileLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/FileLoader.d.ts new file mode 100644 index 000000000..bdad7b69a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/loaders/FileLoader.d.ts @@ -0,0 +1,68 @@ +/** + * A low level class for loading resources with the Fetch API, used internally by + * most loaders. It can also be used directly to load any file type that does + * not have a loader. + * + * This loader supports caching. If you want to use it, add `THREE.Cache.enabled = true;` + * once to your application. + * + * ```js + * const loader = new THREE.FileLoader(); + * const data = await loader.loadAsync( 'example.txt' ); + * ``` + * + * @augments Loader + */ +export class FileLoader extends Loader { + /** + * The expected mime type. Valid values can be found + * [here](https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#mimetype) + * + * @type {string} + */ + mimeType: string; + /** + * The expected response type. + * + * @type {('arraybuffer'|'blob'|'document'|'json'|'')} + * @default '' + */ + responseType: ("arraybuffer" | "blob" | "document" | "json" | ""); + /** + * Used for aborting requests. + * + * @private + * @type {AbortController} + */ + private _abortController; + /** + * Starts loading from the given URL and pass the loaded response to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(any)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} [onProgress] - Executed while the loading is in progress. + * @param {onErrorCallback} [onError] - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: any) => any, onProgress?: onProgressCallback, onError?: onErrorCallback): void; + /** + * Sets the expected response type. + * + * @param {('arraybuffer'|'blob'|'document'|'json'|'')} value - The response type. + * @return {FileLoader} A reference to this file loader. + */ + setResponseType(value: ("arraybuffer" | "blob" | "document" | "json" | "")): FileLoader; + /** + * Sets the expected mime type of the loaded file. + * + * @param {string} value - The mime type. + * @return {FileLoader} A reference to this file loader. + */ + setMimeType(value: string): FileLoader; + /** + * Aborts ongoing fetch requests. + * + * @return {FileLoader} A reference to this instance. + */ + abort(): FileLoader; +} +import { Loader } from './Loader.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/ImageBitmapLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/ImageBitmapLoader.d.ts new file mode 100644 index 000000000..c060ff5b6 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/loaders/ImageBitmapLoader.d.ts @@ -0,0 +1,79 @@ +/** + * A loader for loading images as an [ImageBitmap](https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap). + * An `ImageBitmap` provides an asynchronous and resource efficient pathway to prepare + * textures for rendering. + * + * Note that {@link Texture#flipY} and {@link Texture#premultiplyAlpha} are ignored with image bitmaps. + * These options need to be configured via {@link ImageBitmapLoader#setOptions} prior to loading, + * unlike regular images which can be configured on the Texture to set these options on GPU upload instead. + * + * To match the default behaviour of {@link Texture}, the following options are needed: + * + * ```js + * { imageOrientation: 'flipY', premultiplyAlpha: 'none' } + * ``` + * + * Also note that unlike {@link FileLoader}, this loader will only avoid multiple concurrent requests to the same URL if {@link Cache} is enabled. + * + * ```js + * const loader = new THREE.ImageBitmapLoader(); + * loader.setOptions( { imageOrientation: 'flipY' } ); // set options if needed + * const imageBitmap = await loader.loadAsync( 'image.png' ); + * + * const texture = new THREE.Texture( imageBitmap ); + * texture.needsUpdate = true; + * ``` + * + * @augments Loader + */ +export class ImageBitmapLoader extends Loader { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isImageBitmapLoader: boolean; + /** + * Represents the loader options. + * + * @type {Object} + * @default {premultiplyAlpha:'none'} + */ + options: Object; + /** + * Used for aborting requests. + * + * @private + * @type {AbortController} + */ + private _abortController; + /** + * Sets the given loader options. The structure of the object must match the `options` parameter of + * [createImageBitmap](https://developer.mozilla.org/en-US/docs/Web/API/Window/createImageBitmap). + * + * Note: When caching is enabled, the cache key is based on the URL only. Loading the same URL with + * different options will return the cached result of the first request. + * + * @param {Object} options - The loader options to set. + * @return {ImageBitmapLoader} A reference to this image bitmap loader. + */ + setOptions(options: Object): ImageBitmapLoader; + /** + * Starts loading from the given URL and pass the loaded image bitmap to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(ImageBitmap)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Unsupported in this loader. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: ImageBitmap) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Aborts ongoing fetch requests. + * + * @return {ImageBitmapLoader} A reference to this instance. + */ + abort(): ImageBitmapLoader; +} +import { Loader } from './Loader.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/ImageLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/ImageLoader.d.ts new file mode 100644 index 000000000..0b4296abc --- /dev/null +++ b/jsdoc-testing/jsdoc/src/loaders/ImageLoader.d.ts @@ -0,0 +1,29 @@ +/** + * A loader for loading images. The class loads images with the HTML `Image` API. + * + * ```js + * const loader = new THREE.ImageLoader(); + * const image = await loader.loadAsync( 'image.png' ); + * ``` + * Please note that `ImageLoader` has dropped support for progress + * events in `r84`. For an `ImageLoader` that supports progress events, see + * [this thread](https://github.com/mrdoob/three.js/issues/10439#issuecomment-275785639). + * + * @augments Loader + */ +export class ImageLoader extends Loader { + /** + * Starts loading from the given URL and passes the loaded image + * to the `onLoad()` callback. The method also returns a new `Image` object which can + * directly be used for texture creation. If you do it this way, the texture + * may pop up in your scene once the respective loading process is finished. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Image)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Unsupported in this loader. + * @param {onErrorCallback} onError - Executed when errors occur. + * @return {Image} The image. + */ + load(url: string, onLoad: (arg0: new (width?: number, height?: number) => HTMLImageElement) => any, onProgress: onProgressCallback, onError: onErrorCallback): new (width?: number, height?: number) => HTMLImageElement; +} +import { Loader } from './Loader.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/Loader.d.ts b/jsdoc-testing/jsdoc/src/loaders/Loader.d.ts new file mode 100644 index 000000000..a1e704eb9 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/loaders/Loader.d.ts @@ -0,0 +1,141 @@ +/** + * Callback for onProgress in loaders. + */ +export type onProgressCallback = (event: ProgressEvent) => any; +/** + * Callback for onError in loaders. + */ +export type onErrorCallback = (error: Error) => any; +/** + * Abstract base class for loaders. + * + * @abstract + */ +export class Loader { + /** + * Constructs a new loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * The loading manager. + * + * @type {LoadingManager} + * @default DefaultLoadingManager + */ + manager: LoadingManager; + /** + * The crossOrigin string to implement CORS for loading the url from a + * different domain that allows CORS. + * + * @type {string} + * @default 'anonymous' + */ + crossOrigin: string; + /** + * Whether the XMLHttpRequest uses credentials. + * + * @type {boolean} + * @default false + */ + withCredentials: boolean; + /** + * The base path from which the asset will be loaded. + * + * @type {string} + */ + path: string; + /** + * The base path from which additional resources like textures will be loaded. + * + * @type {string} + */ + resourcePath: string; + /** + * The [request header](https://developer.mozilla.org/en-US/docs/Glossary/Request_header) + * used in HTTP request. + * + * @type {Object} + */ + requestHeader: { + [x: string]: any; + }; + /** + * This method needs to be implemented by all concrete loaders. It holds the + * logic for loading assets from the backend. + * + * @abstract + * @param {string} url - The path/URL of the file to be loaded. + * @param {Function} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} [onProgress] - Executed while the loading is in progress. + * @param {onErrorCallback} [onError] - Executed when errors occur. + */ + load(): void; + /** + * A async version of {@link Loader#load}. + * + * @param {string} url - The path/URL of the file to be loaded. + * @param {onProgressCallback} [onProgress] - Executed while the loading is in progress. + * @return {Promise} A Promise that resolves when the asset has been loaded. + */ + loadAsync(url: string, onProgress?: onProgressCallback): Promise; + /** + * This method needs to be implemented by all concrete loaders. It holds the + * logic for parsing the asset into three.js entities. + * + * @abstract + * @param {any} data - The data to parse. + */ + parse(): void; + /** + * Sets the `crossOrigin` String to implement CORS for loading the URL + * from a different domain that allows CORS. + * + * @param {string} crossOrigin - The `crossOrigin` value. + * @return {Loader} A reference to this instance. + */ + setCrossOrigin(crossOrigin: string): Loader; + /** + * Whether the XMLHttpRequest uses credentials such as cookies, authorization + * headers or TLS client certificates, see [XMLHttpRequest.withCredentials](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials). + * + * Note: This setting has no effect if you are loading files locally or from the same domain. + * + * @param {boolean} value - The `withCredentials` value. + * @return {Loader} A reference to this instance. + */ + setWithCredentials(value: boolean): Loader; + /** + * Sets the base path for the asset. + * + * @param {string} path - The base path. + * @return {Loader} A reference to this instance. + */ + setPath(path: string): Loader; + /** + * Sets the base path for dependent resources like textures. + * + * @param {string} resourcePath - The resource path. + * @return {Loader} A reference to this instance. + */ + setResourcePath(resourcePath: string): Loader; + /** + * Sets the given request header. + * + * @param {Object} requestHeader - A [request header](https://developer.mozilla.org/en-US/docs/Glossary/Request_header) + * for configuring the HTTP request. + * @return {Loader} A reference to this instance. + */ + setRequestHeader(requestHeader: Object): Loader; + /** + * This method can be implemented in loaders for aborting ongoing requests. + * + * @abstract + * @return {Loader} A reference to this instance. + */ + abort(): Loader; +} +export namespace Loader { + let DEFAULT_MATERIAL_NAME: string; +} diff --git a/jsdoc-testing/jsdoc/src/loaders/LoaderUtils.d.ts b/jsdoc-testing/jsdoc/src/loaders/LoaderUtils.d.ts new file mode 100644 index 000000000..ce241791d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/loaders/LoaderUtils.d.ts @@ -0,0 +1,22 @@ +/** + * A class with loader utility functions. + */ +export class LoaderUtils { + /** + * Extracts the base URL from the given URL. + * + * @param {string} url -The URL to extract the base URL from. + * @return {string} The extracted base URL. + */ + static extractUrlBase(url: string): string; + /** + * Resolves relative URLs against the given path. Absolute paths, data urls, + * and blob URLs will be returned as is. Invalid URLs will return an empty + * string. + * + * @param {string} url -The URL to resolve. + * @param {string} path - The base path for relative URLs to be resolved against. + * @return {string} The resolved URL. + */ + static resolveURL(url: string, path: string): string; +} diff --git a/jsdoc-testing/jsdoc/src/loaders/MaterialLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/MaterialLoader.d.ts new file mode 100644 index 000000000..ba72a5bee --- /dev/null +++ b/jsdoc-testing/jsdoc/src/loaders/MaterialLoader.d.ts @@ -0,0 +1,63 @@ +/** + * Class for loading materials. The files are internally + * loaded via {@link FileLoader}. + * + * ```js + * const loader = new THREE.MaterialLoader(); + * const material = await loader.loadAsync( 'material.json' ); + * ``` + * This loader does not support node materials. Use {@link NodeMaterialLoader} instead. + * + * @augments Loader + */ +export class MaterialLoader extends Loader { + /** + * Creates a material for the given type. + * + * @static + * @param {string} type - The material type. + * @return {Material} The new material. + */ + static createMaterialFromType(type: string): Material; + /** + * A dictionary holding textures used by the material. + * + * @type {Object} + */ + textures: { + [x: string]: Texture; + }; + /** + * Starts loading from the given URL and pass the loaded material to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Material)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: Material) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Parses the given JSON object and returns a material. + * + * @param {Object} json - The serialized material. + * @return {Material} The parsed material. + */ + parse(json: Object): Material; + /** + * Textures are not embedded in the material JSON so they have + * to be injected before the loading process starts. + * + * @param {Object} value - A dictionary holding textures for material properties. + * @return {MaterialLoader} A reference to this material loader. + */ + setTextures(value: Object): MaterialLoader; + /** + * Creates a material for the given type. + * + * @param {string} type - The material type. + * @return {Material} The new material. + */ + createMaterialFromType(type: string): Material; +} +import { Loader } from './Loader.js'; +import { Material } from '../materials/Materials.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/ObjectLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/ObjectLoader.d.ts new file mode 100644 index 000000000..def8eb4b2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/loaders/ObjectLoader.d.ts @@ -0,0 +1,91 @@ +/** + * A loader for loading a JSON resource in the [JSON Object/Scene format](https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4). + * The files are internally loaded via {@link FileLoader}. + * + * ```js + * const loader = new THREE.ObjectLoader(); + * const obj = await loader.loadAsync( 'models/json/example.json' ); + * scene.add( obj ); + * + * // Alternatively, to parse a previously loaded JSON structure + * const object = await loader.parseAsync( a_json_object ); + * scene.add( object ); + * ``` + * + * @augments Loader + */ +export class ObjectLoader extends Loader { + /** + * Registers the given geometry at the internal + * geometry library. + * + * @static + * @param {string} type - The geometry type. + * @param {BufferGeometry.constructor} geometryClass - The geometry class. + */ + static registerGeometry(type: string, geometryClass: BufferGeometry.constructor): void; + /** + * Constructs a new object loader. + * + * @param {LoadingManager} [manager] - The loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Starts loading from the given URL and pass the loaded 3D object to the `onLoad()` callback. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Object3D)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @param {onErrorCallback} onError - Executed when errors occur. + */ + load(url: string, onLoad: (arg0: Object3D) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; + /** + * Async version of {@link ObjectLoader#load}. + * + * @async + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {onProgressCallback} onProgress - Executed while the loading is in progress. + * @return {Promise} A Promise that resolves with the loaded 3D object. + */ + loadAsync(url: string, onProgress: onProgressCallback): Promise; + /** + * Parses the given JSON. This is used internally by {@link ObjectLoader#load} + * but can also be used directly to parse a previously loaded JSON structure. + * + * @param {Object} json - The serialized 3D object. + * @param {onLoad} onLoad - Executed when all resources (e.g. textures) have been fully loaded. + * @return {Object3D} The parsed 3D object. + */ + parse(json: Object, onLoad: any): Object3D; + /** + * Async version of {@link ObjectLoader#parse}. + * + * @param {Object} json - The serialized 3D object. + * @return {Promise} A Promise that resolves with the parsed 3D object. + */ + parseAsync(json: Object): Promise; + parseShapes(json: any): {}; + parseSkeletons(json: any, object: any): {}; + parseGeometries(json: any, shapes: any): {}; + parseMaterials(json: any, textures: any): {}; + parseAnimations(json: any): {}; + parseImages(json: any, onLoad: any): {}; + parseImagesAsync(json: any): Promise<{}>; + parseTextures(json: any, images: any): {}; + parseObject(data: any, geometries: any, materials: any, textures: any, animations: any): Object3D | Sprite | LOD | Mesh | SkinnedMesh | InstancedMesh | BatchedMesh | Line | Points | PerspectiveCamera | OrthographicCamera; + bindSkeletons(object: any, skeletons: any): void; + bindLightTargets(object: any): void; +} +import { Loader } from './Loader.js'; +import { Object3D } from '../core/Object3D.js'; +import { Sprite } from '../objects/Sprite.js'; +import { LOD } from '../objects/LOD.js'; +import { Mesh } from '../objects/Mesh.js'; +import { SkinnedMesh } from '../objects/SkinnedMesh.js'; +import { InstancedMesh } from '../objects/InstancedMesh.js'; +import { BatchedMesh } from '../objects/BatchedMesh.js'; +import { Line } from '../objects/Line.js'; +import { Points } from '../objects/Points.js'; +import { PerspectiveCamera } from '../cameras/PerspectiveCamera.js'; +import { OrthographicCamera } from '../cameras/OrthographicCamera.js'; +import { LoadingManager } from './LoadingManager.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/TextureLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/TextureLoader.d.ts new file mode 100644 index 000000000..8069b4948 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/loaders/TextureLoader.d.ts @@ -0,0 +1,33 @@ +/** + * Class for loading textures. Images are internally + * loaded via {@link ImageLoader}. + * + * ```js + * const loader = new THREE.TextureLoader(); + * const texture = await loader.loadAsync( 'textures/land_ocean_ice_cloud_2048.jpg' ); + * + * const material = new THREE.MeshBasicMaterial( { map:texture } ); + * ``` + * Please note that `TextureLoader` has dropped support for progress + * events in `r84`. For a `TextureLoader` that supports progress events, see + * [this thread](https://github.com/mrdoob/three.js/issues/10439#issuecomment-293260145). + * + * @augments Loader + */ +export class TextureLoader extends Loader { + /** + * Starts loading from the given URL and pass the fully loaded texture + * to the `onLoad()` callback. The method also returns a new texture object which can + * directly be used for material creation. If you do it this way, the texture + * may pop up in your scene once the respective loading process is finished. + * + * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. + * @param {function(Texture)} onLoad - Executed when the loading process has been finished. + * @param {onProgressCallback} onProgress - Unsupported in this loader. + * @param {onErrorCallback} onError - Executed when errors occur. + * @return {Texture} The texture. + */ + load(url: string, onLoad: (arg0: Texture) => any, onProgress: onProgressCallback, onError: onErrorCallback): Texture; +} +import { Loader } from './Loader.js'; +import { Texture } from '../textures/Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/nodes/NodeLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/nodes/NodeLoader.d.ts new file mode 100644 index 000000000..58b362d35 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/loaders/nodes/NodeLoader.d.ts @@ -0,0 +1,84 @@ +export default NodeLoader; +/** + * A loader for loading node objects in the three.js JSON Object/Scene format. + * + * @augments Loader + */ +declare class NodeLoader extends Loader { + /** + * Represents a dictionary of textures. + * + * @type {Object} + */ + textures: { + [x: string]: Texture; + }; + /** + * Represents a dictionary of node types. + * + * @type {Object} + */ + nodes: { + [x: string]: Node.constructor; + }; + /** + * Loads the node definitions from the given URL. + * + * @param {string} url - The path/URL of the file to be loaded. + * @param {Function} onLoad - Will be called when load completes. + * @param {Function} onProgress - Will be called while load progresses. + * @param {Function} onError - Will be called when errors are thrown during the loading process. + */ + load(url: string, onLoad: Function, onProgress: Function, onError: Function): void; + /** + * Parse the node dependencies for the loaded node. + * + * @param {Array} [json] - The JSON definition + * @return {Object} A dictionary with node dependencies. + */ + parseNodes(json?: Array): { + [x: string]: Node; + }; + /** + * Parses the node from the given JSON. + * + * @param {Object} json - The JSON definition + * @param {string} json.type - The node type. + * @param {string} json.uuid - The node UUID. + * @param {Array} [json.nodes] - The node dependencies. + * @param {Object} [json.meta] - The meta data. + * @return {Node} The parsed node. + */ + parse(json: { + type: string; + uuid: string; + nodes?: Object[] | undefined; + meta?: Object | undefined; + }): Node; + /** + * Defines the dictionary of textures. + * + * @param {Object} value - The texture library defines as ``. + * @return {NodeLoader} A reference to this loader. + */ + setTextures(value: { + [x: string]: Texture; + }): NodeLoader; + /** + * Defines the dictionary of node types. + * + * @param {Object} value - The node library defined as ``. + * @return {NodeLoader} A reference to this loader. + */ + setNodes(value: { + [x: string]: Node.constructor; + }): NodeLoader; + /** + * Creates a node object from the given type. + * + * @param {string} type - The node type. + * @return {Node} The created node instance. + */ + createNodeFromType(type: string): Node; +} +import { Loader } from '../Loader.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/nodes/NodeMaterialLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/nodes/NodeMaterialLoader.d.ts new file mode 100644 index 000000000..cf350a240 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/loaders/nodes/NodeMaterialLoader.d.ts @@ -0,0 +1,57 @@ +export default NodeMaterialLoader; +/** + * A special type of material loader for loading node materials. + * + * @augments MaterialLoader + */ +declare class NodeMaterialLoader extends MaterialLoader { + /** + * Represents a dictionary of node types. + * + * @type {Object} + */ + nodes: { + [x: string]: Node.constructor; + }; + /** + * Represents a dictionary of node material types. + * + * @type {Object} + */ + nodeMaterials: { + [x: string]: NodeMaterial.constructor; + }; + /** + * Parses the node material from the given JSON. + * + * @param {Object} json - The JSON definition + * @return {NodeMaterial}. The parsed material. + */ + parse(json: Object): NodeMaterial; + /** + * Defines the dictionary of node types. + * + * @param {Object} value - The node library defined as ``. + * @return {NodeLoader} A reference to this loader. + */ + setNodes(value: { + [x: string]: Node.constructor; + }): NodeLoader; + /** + * Defines the dictionary of node material types. + * + * @param {Object} value - The node material library defined as ``. + * @return {NodeLoader} A reference to this loader. + */ + setNodeMaterials(value: { + [x: string]: NodeMaterial.constructor; + }): NodeLoader; + /** + * Creates a node material from the given type. + * + * @param {string} type - The node material type. + * @return {Node} The created node material instance. + */ + createMaterialFromType(type: string): Node; +} +import { MaterialLoader } from '../../loaders/MaterialLoader.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/nodes/NodeObjectLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/nodes/NodeObjectLoader.d.ts new file mode 100644 index 000000000..b5954eab2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/loaders/nodes/NodeObjectLoader.d.ts @@ -0,0 +1,96 @@ +export default NodeObjectLoader; +/** + * A special type of object loader for loading 3D objects using + * node materials. + * + * @augments ObjectLoader + */ +declare class NodeObjectLoader extends ObjectLoader { + /** + * Constructs a new node object loader. + * + * @param {LoadingManager} [manager] - A reference to a loading manager. + */ + constructor(manager?: LoadingManager); + /** + * Represents a dictionary of node types. + * + * @type {Object} + */ + nodes: { + [x: string]: Node.constructor; + }; + /** + * Represents a dictionary of node material types. + * + * @type {Object} + */ + nodeMaterials: { + [x: string]: NodeMaterial.constructor; + }; + /** + * A reference to hold the `nodes` JSON property. + * + * @private + * @type {?Object[]} + */ + private _nodesJSON; + /** + * Defines the dictionary of node types. + * + * @param {Object} value - The node library defined as ``. + * @return {NodeObjectLoader} A reference to this loader. + */ + setNodes(value: { + [x: string]: Node.constructor; + }): NodeObjectLoader; + /** + * Defines the dictionary of node material types. + * + * @param {Object} value - The node material library defined as ``. + * @return {NodeObjectLoader} A reference to this loader. + */ + setNodeMaterials(value: { + [x: string]: NodeMaterial.constructor; + }): NodeObjectLoader; + /** + * Parses the node objects from the given JSON. + * + * @param {Object} json - The JSON definition + * @param {Function} onLoad - The onLoad callback function. + * @return {Object3D}. The parsed 3D object. + */ + parse(json: Object, onLoad: Function): Object3D; + /** + * Async version of {@link NodeObjectLoader#parse}. + * + * @param {Object} json - The JSON definition + * @return {Promise} A Promise that resolves with the parsed 3D object. + */ + parseAsync(json: Object): Promise; + /** + * Parses the node objects from the given JSON and textures. + * + * @param {Object[]} json - The JSON definition + * @param {Object} textures - The texture library. + * @return {Object}. The parsed nodes. + */ + parseNodes(json: Object[], textures: { + [x: string]: Texture; + }): { + [x: string]: Node; + }; + /** + * Parses the node objects from the given JSON and textures. + * + * @param {Object} json - The JSON definition + * @param {Object} textures - The texture library. + * @return {Object}. The parsed materials. + */ + parseMaterials(json: Object, textures: { + [x: string]: Texture; + }): { + [x: string]: NodeMaterial; + }; +} +import { ObjectLoader } from '../../loaders/ObjectLoader.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/LineBasicMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/LineBasicMaterial.d.ts new file mode 100644 index 000000000..64e5c7024 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/LineBasicMaterial.d.ts @@ -0,0 +1,86 @@ +/** + * A material for rendering line primitives. + * + * Materials define the appearance of renderable 3D objects. + * + * ```js + * const material = new THREE.LineBasicMaterial( { color: 0xffffff } ); + * ``` + * + * @augments Material + */ +export class LineBasicMaterial extends Material { + /** + * Constructs a new line basic material. + * + * @param {Object} [parameters] - An object with one or more properties + * defining the material's appearance. Any property of the material + * (including any property from inherited materials) can be passed + * in here. Color values can be passed any type of value accepted + * by {@link Color#set}. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLineBasicMaterial: boolean; + type: string; + /** + * Color of the material. + * + * @type {Color} + * @default (1,1,1) + */ + color: Color; + /** + * Sets the color of the lines using data from a texture. The texture map + * color is modulated by the diffuse `color`. + * + * @type {?Texture} + * @default null + */ + map: Texture | null; + /** + * Controls line thickness or lines. + * + * Can only be used with {@link SVGRenderer}. WebGL and WebGPU + * ignore this setting and always render line primitives with a + * width of one pixel. + * + * @type {number} + * @default 1 + */ + linewidth: number; + /** + * Defines appearance of line ends. + * + * Can only be used with {@link SVGRenderer}. + * + * @type {('butt'|'round'|'square')} + * @default 'round' + */ + linecap: ("butt" | "round" | "square"); + /** + * Defines appearance of line joints. + * + * Can only be used with {@link SVGRenderer}. + * + * @type {('round'|'bevel'|'miter')} + * @default 'round' + */ + linejoin: ("round" | "bevel" | "miter"); + /** + * Whether the material is affected by fog or not. + * + * @type {boolean} + * @default true + */ + fog: boolean; + copy(source: any): this; +} +import { Material } from './Material.js'; +import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/LineDashedMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/LineDashedMaterial.d.ts new file mode 100644 index 000000000..3cb1a34d8 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/LineDashedMaterial.d.ts @@ -0,0 +1,49 @@ +/** + * A material for rendering line primitives. + * + * Materials define the appearance of renderable 3D objects. + * + * ```js + * const material = new THREE.LineDashedMaterial( { + * color: 0xffffff, + * scale: 1, + * dashSize: 3, + * gapSize: 1, + * } ); + * ``` + * + * @augments LineBasicMaterial + */ +export class LineDashedMaterial extends LineBasicMaterial { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLineDashedMaterial: boolean; + /** + * The scale of the dashed part of a line. + * + * @type {number} + * @default 1 + */ + scale: number; + /** + * The size of the dash. This is both the gap with the stroke. + * + * @type {number} + * @default 3 + */ + dashSize: number; + /** + * The size of the gap. + * + * @type {number} + * @default 1 + */ + gapSize: number; + copy(source: any): this; +} +import { LineBasicMaterial } from './LineBasicMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/Material.d.ts b/jsdoc-testing/jsdoc/src/materials/Material.d.ts new file mode 100644 index 000000000..c05cd91f7 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/Material.d.ts @@ -0,0 +1,497 @@ +/** + * Abstract base class for materials. + * + * Materials define the appearance of renderable 3D objects. + * + * @abstract + * @augments EventDispatcher + */ +export class Material extends EventDispatcher { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMaterial: boolean; + /** + * The UUID of the material. + * + * @type {string} + * @readonly + */ + readonly uuid: string; + /** + * The name of the material. + * + * @type {string} + */ + name: string; + /** + * The type property is used for detecting the object type + * in context of serialization/deserialization. + * + * @type {string} + * @readonly + */ + readonly type: string; + /** + * Defines the blending type of the material. + * + * It must be set to `CustomBlending` if custom blending properties like + * {@link Material#blendSrc}, {@link Material#blendDst} or {@link Material#blendEquation} + * should have any effect. + * + * @type {(NoBlending|NormalBlending|AdditiveBlending|SubtractiveBlending|MultiplyBlending|CustomBlending)} + * @default NormalBlending + */ + blending: (NoBlending | number | AdditiveBlending | SubtractiveBlending | MultiplyBlending | CustomBlending); + /** + * Defines which side of faces will be rendered - front, back or both. + * + * @type {(FrontSide|BackSide|DoubleSide)} + * @default FrontSide + */ + side: (number | BackSide | DoubleSide); + /** + * If set to `true`, vertex colors should be used. + * + * The engine supports RGB and RGBA vertex colors depending on whether a three (RGB) or + * four (RGBA) component color buffer attribute is used. + * + * @type {boolean} + * @default false + */ + vertexColors: boolean; + /** + * Defines how transparent the material is. + * A value of `0.0` indicates fully transparent, `1.0` is fully opaque. + * + * If the {@link Material#transparent} is not set to `true`, + * the material will remain fully opaque and this value will only affect its color. + * + * @type {number} + * @default 1 + */ + opacity: number; + /** + * Defines whether this material is transparent. This has an effect on + * rendering as transparent objects need special treatment and are rendered + * after non-transparent objects. + * + * When set to true, the extent to which the material is transparent is + * controlled by {@link Material#opacity}. + * + * @type {boolean} + * @default false + */ + transparent: boolean; + /** + * Enables alpha hashed transparency, an alternative to {@link Material#transparent} or + * {@link Material#alphaTest}. The material will not be rendered if opacity is lower than + * a random threshold. Randomization introduces some grain or noise, but approximates alpha + * blending without the associated problems of sorting. Using TAA can reduce the resulting noise. + * + * @type {boolean} + * @default false + */ + alphaHash: boolean; + /** + * Defines the blending source factor. + * + * @type {(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} + * @default SrcAlphaFactor + */ + blendSrc: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); + /** + * Defines the blending destination factor. + * + * @type {(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} + * @default OneMinusSrcAlphaFactor + */ + blendDst: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); + /** + * Defines the blending equation. + * + * @type {(AddEquation|SubtractEquation|ReverseSubtractEquation|MinEquation|MaxEquation)} + * @default AddEquation + */ + blendEquation: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation); + /** + * Defines the blending source alpha factor. + * + * @type {?(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} + * @default null + */ + blendSrcAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; + /** + * Defines the blending destination alpha factor. + * + * @type {?(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} + * @default null + */ + blendDstAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; + /** + * Defines the blending equation of the alpha channel. + * + * @type {?(AddEquation|SubtractEquation|ReverseSubtractEquation|MinEquation|MaxEquation)} + * @default null + */ + blendEquationAlpha: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation) | null; + /** + * Represents the RGB values of the constant blend color. + * + * This property has only an effect when using custom blending with `ConstantColor` or `OneMinusConstantColor`. + * + * @type {Color} + * @default (0,0,0) + */ + blendColor: Color; + /** + * Represents the alpha value of the constant blend color. + * + * This property has only an effect when using custom blending with `ConstantAlpha` or `OneMinusConstantAlpha`. + * + * @type {number} + * @default 0 + */ + blendAlpha: number; + /** + * Defines the depth function. + * + * @type {(NeverDepth|AlwaysDepth|LessDepth|LessEqualDepth|EqualDepth|GreaterEqualDepth|GreaterDepth|NotEqualDepth)} + * @default LessEqualDepth + */ + depthFunc: (NeverDepth | AlwaysDepth | LessDepth | number | EqualDepth | GreaterEqualDepth | GreaterDepth | NotEqualDepth); + /** + * Whether to have depth test enabled when rendering this material. + * When the depth test is disabled, the depth write will also be implicitly disabled. + * + * @type {boolean} + * @default true + */ + depthTest: boolean; + /** + * Whether rendering this material has any effect on the depth buffer. + * + * When drawing 2D overlays it can be useful to disable the depth writing in + * order to layer several things together without creating z-index artifacts. + * + * @type {boolean} + * @default true + */ + depthWrite: boolean; + /** + * The bit mask to use when writing to the stencil buffer. + * + * @type {number} + * @default 0xff + */ + stencilWriteMask: number; + /** + * The stencil comparison function to use. + * + * @type {NeverStencilFunc|LessStencilFunc|EqualStencilFunc|LessEqualStencilFunc|GreaterStencilFunc|NotEqualStencilFunc|GreaterEqualStencilFunc|AlwaysStencilFunc} + * @default AlwaysStencilFunc + */ + stencilFunc: NeverStencilFunc | LessStencilFunc | EqualStencilFunc | LessEqualStencilFunc | GreaterStencilFunc | NotEqualStencilFunc | GreaterEqualStencilFunc | number; + /** + * The value to use when performing stencil comparisons or stencil operations. + * + * @type {number} + * @default 0 + */ + stencilRef: number; + /** + * The bit mask to use when comparing against the stencil buffer. + * + * @type {number} + * @default 0xff + */ + stencilFuncMask: number; + /** + * Which stencil operation to perform when the comparison function returns `false`. + * + * @type {ZeroStencilOp|KeepStencilOp|ReplaceStencilOp|IncrementStencilOp|DecrementStencilOp|IncrementWrapStencilOp|DecrementWrapStencilOp|InvertStencilOp} + * @default KeepStencilOp + */ + stencilFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; + /** + * Which stencil operation to perform when the comparison function returns + * `true` but the depth test fails. + * + * @type {ZeroStencilOp|KeepStencilOp|ReplaceStencilOp|IncrementStencilOp|DecrementStencilOp|IncrementWrapStencilOp|DecrementWrapStencilOp|InvertStencilOp} + * @default KeepStencilOp + */ + stencilZFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; + /** + * Which stencil operation to perform when the comparison function returns + * `true` and the depth test passes. + * + * @type {ZeroStencilOp|KeepStencilOp|ReplaceStencilOp|IncrementStencilOp|DecrementStencilOp|IncrementWrapStencilOp|DecrementWrapStencilOp|InvertStencilOp} + * @default KeepStencilOp + */ + stencilZPass: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; + /** + * Whether stencil operations are performed against the stencil buffer. In + * order to perform writes or comparisons against the stencil buffer this + * value must be `true`. + * + * @type {boolean} + * @default false + */ + stencilWrite: boolean; + /** + * User-defined clipping planes specified as THREE.Plane objects in world + * space. These planes apply to the objects this material is attached to. + * Points in space whose signed distance to the plane is negative are clipped + * (not rendered). This requires {@link WebGLRenderer#localClippingEnabled} to + * be `true`. + * + * @type {?Array} + * @default null + */ + clippingPlanes: Array | null; + /** + * Changes the behavior of clipping planes so that only their intersection is + * clipped, rather than their union. + * + * @type {boolean} + * @default false + */ + clipIntersection: boolean; + /** + * Defines whether to clip shadows according to the clipping planes specified + * on this material. + * + * @type {boolean} + * @default false + */ + clipShadows: boolean; + /** + * Defines which side of faces cast shadows. If `null`, the side casting shadows + * is determined as follows: + * + * - When {@link Material#side} is set to `FrontSide`, the back side cast shadows. + * - When {@link Material#side} is set to `BackSide`, the front side cast shadows. + * - When {@link Material#side} is set to `DoubleSide`, both sides cast shadows. + * + * @type {?(FrontSide|BackSide|DoubleSide)} + * @default null + */ + shadowSide: (number | BackSide | DoubleSide) | null; + /** + * Whether to render the material's color. + * + * This can be used in conjunction with {@link Object3D#renderOder} to create invisible + * objects that occlude other objects. + * + * @type {boolean} + * @default true + */ + colorWrite: boolean; + /** + * Override the renderer's default precision for this material. + * + * @type {?('highp'|'mediump'|'lowp')} + * @default null + */ + precision: ("highp" | "mediump" | "lowp") | null; + /** + * Whether to use polygon offset or not. When enabled, each fragment's depth value will + * be offset after it is interpolated from the depth values of the appropriate vertices. + * The offset is added before the depth test is performed and before the value is written + * into the depth buffer. + * + * Can be useful for rendering hidden-line images, for applying decals to surfaces, and for + * rendering solids with highlighted edges. + * + * @type {boolean} + * @default false + */ + polygonOffset: boolean; + /** + * Specifies a scale factor that is used to create a variable depth offset for each polygon. + * + * @type {number} + * @default 0 + */ + polygonOffsetFactor: number; + /** + * Is multiplied by an implementation-specific value to create a constant depth offset. + * + * @type {number} + * @default 0 + */ + polygonOffsetUnits: number; + /** + * Whether to apply dithering to the color to remove the appearance of banding. + * + * @type {boolean} + * @default false + */ + dithering: boolean; + /** + * Whether alpha to coverage should be enabled or not. Can only be used with MSAA-enabled contexts + * (meaning when the renderer was created with *antialias* parameter set to `true`). Enabling this + * will smooth aliasing on clip plane edges and alphaTest-clipped edges. + * + * @type {boolean} + * @default false + */ + alphaToCoverage: boolean; + /** + * Whether to premultiply the alpha (transparency) value. + * + * @type {boolean} + * @default false + */ + premultipliedAlpha: boolean; + /** + * Whether double-sided, transparent objects should be rendered with a single pass or not. + * + * The engine renders double-sided, transparent objects with two draw calls (back faces first, + * then front faces) to mitigate transparency artifacts. There are scenarios however where this + * approach produces no quality gains but still doubles draw calls e.g. when rendering flat + * vegetation like grass sprites. In these cases, set the `forceSinglePass` flag to `true` to + * disable the two pass rendering to avoid performance issues. + * + * @type {boolean} + * @default false + */ + forceSinglePass: boolean; + /** + * Whether it's possible to override the material with {@link Scene#overrideMaterial} or not. + * + * @type {boolean} + * @default true + */ + allowOverride: boolean; + /** + * Defines whether 3D objects using this material are visible. + * + * @type {boolean} + * @default true + */ + visible: boolean; + /** + * Defines whether this material is tone mapped according to the renderer's tone mapping setting. + * + * It is ignored when rendering to a render target or using post processing or when using + * `WebGPURenderer`. In all these cases, all materials are honored by tone mapping. + * + * @type {boolean} + * @default true + */ + toneMapped: boolean; + /** + * An object that can be used to store custom data about the Material. It + * should not hold references to functions as these will not be cloned. + * + * @type {Object} + */ + userData: Object; + /** + * This starts at `0` and counts how many times {@link Material#needsUpdate} is set to `true`. + * + * @type {number} + * @readonly + * @default 0 + */ + readonly version: number; + _alphaTest: number; + readonly set alphaTest(value: number); + /** + * Sets the alpha value to be used when running an alpha test. The material + * will not be rendered if the opacity is lower than this value. + * + * @type {number} + * @readonly + * @default 0 + */ + readonly get alphaTest(): number; + /** + * An optional callback that is executed immediately before the material is used to render a 3D object. + * + * This method can only be used when rendering with {@link WebGLRenderer}. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {Scene} scene - The scene. + * @param {Camera} camera - The camera that is used to render the scene. + * @param {BufferGeometry} geometry - The 3D object's geometry. + * @param {Object3D} object - The 3D object. + * @param {Object} group - The geometry group data. + */ + onBeforeRender(): void; + /** + * An optional callback that is executed immediately before the shader + * program is compiled. This function is called with the shader source code + * as a parameter. Useful for the modification of built-in materials. + * + * This method can only be used when rendering with {@link WebGLRenderer}. The + * recommended approach when customizing materials is to use `WebGPURenderer` with the new + * Node Material system and [TSL](https://github.com/mrdoob/three.js/wiki/Three.js-Shading-Language). + * + * @param {{vertexShader:string,fragmentShader:string,uniforms:Object}} shaderobject - The object holds the uniforms and the vertex and fragment shader source. + * @param {WebGLRenderer} renderer - A reference to the renderer. + */ + onBeforeCompile(): void; + /** + * In case {@link Material#onBeforeCompile} is used, this callback can be used to identify + * values of settings used in `onBeforeCompile()`, so three.js can reuse a cached + * shader or recompile the shader for this material as needed. + * + * This method can only be used when rendering with {@link WebGLRenderer}. + * + * @return {string} The custom program cache key. + */ + customProgramCacheKey(): string; + /** + * This method can be used to set default values from parameter objects. + * It is a generic implementation so it can be used with different types + * of materials. + * + * @param {Object} [values] - The material values to set. + */ + setValues(values?: Object): void; + /** + * Serializes the material into JSON. + * + * @param {?(Object|string)} meta - An optional value holding meta information about the serialization. + * @return {Object} A JSON object representing the serialized material. + * @see {@link ObjectLoader#parse} + */ + toJSON(meta: (Object | string) | null): Object; + /** + * Returns a new material with copied values from this instance. + * + * @return {Material} A clone of this instance. + */ + clone(): Material; + /** + * Copies the values of the given material to this instance. + * + * @param {Material} source - The material to copy. + * @return {Material} A reference to this instance. + */ + copy(source: Material): Material; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + * + * @fires Material#dispose + */ + dispose(): void; + /** + * Setting this property to `true` indicates the engine the material + * needs to be recompiled. + * + * @type {boolean} + * @default false + * @param {boolean} value + */ + set needsUpdate(value: boolean); +} +import { EventDispatcher } from '../core/EventDispatcher.js'; +import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/Materials.d.ts b/jsdoc-testing/jsdoc/src/materials/Materials.d.ts new file mode 100644 index 000000000..3f555b856 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/Materials.d.ts @@ -0,0 +1,19 @@ +import { ShadowMaterial } from './ShadowMaterial.js'; +import { SpriteMaterial } from './SpriteMaterial.js'; +import { RawShaderMaterial } from './RawShaderMaterial.js'; +import { ShaderMaterial } from './ShaderMaterial.js'; +import { PointsMaterial } from './PointsMaterial.js'; +import { MeshPhysicalMaterial } from './MeshPhysicalMaterial.js'; +import { MeshStandardMaterial } from './MeshStandardMaterial.js'; +import { MeshPhongMaterial } from './MeshPhongMaterial.js'; +import { MeshToonMaterial } from './MeshToonMaterial.js'; +import { MeshNormalMaterial } from './MeshNormalMaterial.js'; +import { MeshLambertMaterial } from './MeshLambertMaterial.js'; +import { MeshDepthMaterial } from './MeshDepthMaterial.js'; +import { MeshDistanceMaterial } from './MeshDistanceMaterial.js'; +import { MeshBasicMaterial } from './MeshBasicMaterial.js'; +import { MeshMatcapMaterial } from './MeshMatcapMaterial.js'; +import { LineDashedMaterial } from './LineDashedMaterial.js'; +import { LineBasicMaterial } from './LineBasicMaterial.js'; +import { Material } from './Material.js'; +export { ShadowMaterial, SpriteMaterial, RawShaderMaterial, ShaderMaterial, PointsMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshPhongMaterial, MeshToonMaterial, MeshNormalMaterial, MeshLambertMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshBasicMaterial, MeshMatcapMaterial, LineDashedMaterial, LineBasicMaterial, Material }; diff --git a/jsdoc-testing/jsdoc/src/materials/MeshBasicMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/MeshBasicMaterial.d.ts new file mode 100644 index 000000000..83636586f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/MeshBasicMaterial.d.ts @@ -0,0 +1,184 @@ +/** + * A material for drawing geometries in a simple shaded (flat or wireframe) way. + * + * This material is not affected by lights. + * + * @augments Material + * @demo scenes/material-browser.html#MeshBasicMaterial + */ +export class MeshBasicMaterial extends Material { + /** + * Constructs a new mesh basic material. + * + * @param {Object} [parameters] - An object with one or more properties + * defining the material's appearance. Any property of the material + * (including any property from inherited materials) can be passed + * in here. Color values can be passed any type of value accepted + * by {@link Color#set}. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshBasicMaterial: boolean; + type: string; + /** + * Color of the material. + * + * @type {Color} + * @default (1,1,1) + */ + color: Color; + /** + * The color map. May optionally include an alpha channel, typically combined + * with {@link Material#transparent} or {@link Material#alphaTest}. The texture map + * color is modulated by the diffuse `color`. + * + * @type {?Texture} + * @default null + */ + map: Texture | null; + /** + * The light map. Requires a second set of UVs. + * + * @type {?Texture} + * @default null + */ + lightMap: Texture | null; + /** + * Intensity of the baked light. + * + * @type {number} + * @default 1 + */ + lightMapIntensity: number; + /** + * The red channel of this texture is used as the ambient occlusion map. + * Requires a second set of UVs. + * + * @type {?Texture} + * @default null + */ + aoMap: Texture | null; + /** + * Intensity of the ambient occlusion effect. Range is `[0,1]`, where `0` + * disables ambient occlusion. Where intensity is `1` and the AO map's + * red channel is also `1`, ambient light is fully occluded on a surface. + * + * @type {number} + * @default 1 + */ + aoMapIntensity: number; + /** + * Specular map used by the material. + * + * @type {?Texture} + * @default null + */ + specularMap: Texture | null; + /** + * The alpha map is a grayscale texture that controls the opacity across the + * surface (black: fully transparent; white: fully opaque). + * + * Only the color of the texture is used, ignoring the alpha channel if one + * exists. For RGB and RGBA textures, the renderer will use the green channel + * when sampling this texture due to the extra bit of precision provided for + * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and + * luminance/alpha textures will also still work as expected. + * + * @type {?Texture} + * @default null + */ + alphaMap: Texture | null; + /** + * The environment map. + * + * @type {?Texture} + * @default null + */ + envMap: Texture | null; + /** + * The rotation of the environment map in radians. + * + * @type {Euler} + * @default (0,0,0) + */ + envMapRotation: Euler; + /** + * How to combine the result of the surface's color with the environment map, if any. + * + * When set to `MixOperation`, the {@link MeshBasicMaterial#reflectivity} is used to + * blend between the two colors. + * + * @type {(MultiplyOperation|MixOperation|AddOperation)} + * @default MultiplyOperation + */ + combine: (number | MixOperation | AddOperation); + /** + * How much the environment map affects the surface. + * The valid range is between `0` (no reflections) and `1` (full reflections). + * + * @type {number} + * @default 1 + */ + reflectivity: number; + /** + * The index of refraction (IOR) of air (approximately 1) divided by the + * index of refraction of the material. It is used with environment mapping + * modes {@link CubeRefractionMapping} and {@link EquirectangularRefractionMapping}. + * The refraction ratio should not exceed `1`. + * + * @type {number} + * @default 0.98 + */ + refractionRatio: number; + /** + * Renders the geometry as a wireframe. + * + * @type {boolean} + * @default false + */ + wireframe: boolean; + /** + * Controls the thickness of the wireframe. + * + * Can only be used with {@link SVGRenderer}. + * + * @type {number} + * @default 1 + */ + wireframeLinewidth: number; + /** + * Defines appearance of wireframe ends. + * + * Can only be used with {@link SVGRenderer}. + * + * @type {('round'|'bevel'|'miter')} + * @default 'round' + */ + wireframeLinecap: ("round" | "bevel" | "miter"); + /** + * Defines appearance of wireframe joints. + * + * Can only be used with {@link SVGRenderer}. + * + * @type {('round'|'bevel'|'miter')} + * @default 'round' + */ + wireframeLinejoin: ("round" | "bevel" | "miter"); + /** + * Whether the material is affected by fog or not. + * + * @type {boolean} + * @default true + */ + fog: boolean; + copy(source: any): this; +} +import { Material } from './Material.js'; +import { Color } from '../math/Color.js'; +import { Euler } from '../math/Euler.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/MeshDepthMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/MeshDepthMaterial.d.ts new file mode 100644 index 000000000..a85883a0e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/MeshDepthMaterial.d.ts @@ -0,0 +1,106 @@ +/** + * A material for drawing geometry by depth. Depth is based off of the camera + * near and far plane. White is nearest, black is farthest. + * + * @augments Material + * @demo scenes/material-browser.html#MeshDepthMaterial + */ +export class MeshDepthMaterial extends Material { + /** + * Constructs a new mesh depth material. + * + * @param {Object} [parameters] - An object with one or more properties + * defining the material's appearance. Any property of the material + * (including any property from inherited materials) can be passed + * in here. Color values can be passed any type of value accepted + * by {@link Color#set}. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshDepthMaterial: boolean; + type: string; + /** + * Type for depth packing. + * + * @type {(BasicDepthPacking|RGBADepthPacking|RGBDepthPacking|RGDepthPacking)} + * @default BasicDepthPacking + */ + depthPacking: (number | RGBADepthPacking | RGBDepthPacking | RGDepthPacking); + /** + * The color map. May optionally include an alpha channel, typically combined + * with {@link Material#transparent} or {@link Material#alphaTest}. + * + * @type {?Texture} + * @default null + */ + map: Texture | null; + /** + * The alpha map is a grayscale texture that controls the opacity across the + * surface (black: fully transparent; white: fully opaque). + * + * Only the color of the texture is used, ignoring the alpha channel if one + * exists. For RGB and RGBA textures, the renderer will use the green channel + * when sampling this texture due to the extra bit of precision provided for + * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and + * luminance/alpha textures will also still work as expected. + * + * @type {?Texture} + * @default null + */ + alphaMap: Texture | null; + /** + * The displacement map affects the position of the mesh's vertices. Unlike + * other maps which only affect the light and shade of the material the + * displaced vertices can cast shadows, block other objects, and otherwise + * act as real geometry. The displacement texture is an image where the value + * of each pixel (white being the highest) is mapped against, and + * repositions, the vertices of the mesh. + * + * @type {?Texture} + * @default null + */ + displacementMap: Texture | null; + /** + * How much the displacement map affects the mesh (where black is no + * displacement, and white is maximum displacement). Without a displacement + * map set, this value is not applied. + * + * @type {number} + * @default 0 + */ + displacementScale: number; + /** + * The offset of the displacement map's values on the mesh's vertices. + * The bias is added to the scaled sample of the displacement map. + * Without a displacement map set, this value is not applied. + * + * @type {number} + * @default 0 + */ + displacementBias: number; + /** + * Renders the geometry as a wireframe. + * + * @type {boolean} + * @default false + */ + wireframe: boolean; + /** + * Controls the thickness of the wireframe. + * + * WebGL and WebGPU ignore this property and always render + * 1 pixel wide lines. + * + * @type {number} + * @default 1 + */ + wireframeLinewidth: number; + copy(source: any): this; +} +import { Material } from './Material.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/MeshDistanceMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/MeshDistanceMaterial.d.ts new file mode 100644 index 000000000..bddc4ff5c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/MeshDistanceMaterial.d.ts @@ -0,0 +1,86 @@ +/** + * A material used internally for implementing shadow mapping with + * point lights. + * + * Can also be used to customize the shadow casting of an object by assigning + * an instance of `MeshDistanceMaterial` to {@link Object3D#customDistanceMaterial}. + * The following examples demonstrates this approach in order to ensure + * transparent parts of objects do not cast shadows. + * + * @augments Material + */ +export class MeshDistanceMaterial extends Material { + /** + * Constructs a new mesh distance material. + * + * @param {Object} [parameters] - An object with one or more properties + * defining the material's appearance. Any property of the material + * (including any property from inherited materials) can be passed + * in here. Color values can be passed any type of value accepted + * by {@link Color#set}. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshDistanceMaterial: boolean; + type: string; + /** + * The color map. May optionally include an alpha channel, typically combined + * with {@link Material#transparent} or {@link Material#alphaTest}. + * + * @type {?Texture} + * @default null + */ + map: Texture | null; + /** + * The alpha map is a grayscale texture that controls the opacity across the + * surface (black: fully transparent; white: fully opaque). + * + * Only the color of the texture is used, ignoring the alpha channel if one + * exists. For RGB and RGBA textures, the renderer will use the green channel + * when sampling this texture due to the extra bit of precision provided for + * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and + * luminance/alpha textures will also still work as expected. + * + * @type {?Texture} + * @default null + */ + alphaMap: Texture | null; + /** + * The displacement map affects the position of the mesh's vertices. Unlike + * other maps which only affect the light and shade of the material the + * displaced vertices can cast shadows, block other objects, and otherwise + * act as real geometry. The displacement texture is an image where the value + * of each pixel (white being the highest) is mapped against, and + * repositions, the vertices of the mesh. + * + * @type {?Texture} + * @default null + */ + displacementMap: Texture | null; + /** + * How much the displacement map affects the mesh (where black is no + * displacement, and white is maximum displacement). Without a displacement + * map set, this value is not applied. + * + * @type {number} + * @default 0 + */ + displacementScale: number; + /** + * The offset of the displacement map's values on the mesh's vertices. + * The bias is added to the scaled sample of the displacement map. + * Without a displacement map set, this value is not applied. + * + * @type {number} + * @default 0 + */ + displacementBias: number; + copy(source: any): this; +} +import { Material } from './Material.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/MeshLambertMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/MeshLambertMaterial.d.ts new file mode 100644 index 000000000..1fd0fda22 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/MeshLambertMaterial.d.ts @@ -0,0 +1,307 @@ +/** + * A material for non-shiny surfaces, without specular highlights. + * + * The material uses a non-physically based [Lambertian](https://en.wikipedia.org/wiki/Lambertian_reflectance) + * model for calculating reflectance. This can simulate some surfaces (such + * as untreated wood or stone) well, but cannot simulate shiny surfaces with + * specular highlights (such as varnished wood). `MeshLambertMaterial` uses per-fragment + * shading. + * + * Due to the simplicity of the reflectance and illumination models, + * performance will be greater when using this material over the + * {@link MeshPhongMaterial}, {@link MeshStandardMaterial} or + * {@link MeshPhysicalMaterial}, at the cost of some graphical accuracy. + * + * @augments Material + * @demo scenes/material-browser.html#MeshLambertMaterial + */ +export class MeshLambertMaterial extends Material { + /** + * Constructs a new mesh lambert material. + * + * @param {Object} [parameters] - An object with one or more properties + * defining the material's appearance. Any property of the material + * (including any property from inherited materials) can be passed + * in here. Color values can be passed any type of value accepted + * by {@link Color#set}. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshLambertMaterial: boolean; + type: string; + /** + * Color of the material. + * + * @type {Color} + * @default (1,1,1) + */ + color: Color; + /** + * The color map. May optionally include an alpha channel, typically combined + * with {@link Material#transparent} or {@link Material#alphaTest}. The texture map + * color is modulated by the diffuse `color`. + * + * @type {?Texture} + * @default null + */ + map: Texture | null; + /** + * The light map. Requires a second set of UVs. + * + * @type {?Texture} + * @default null + */ + lightMap: Texture | null; + /** + * Intensity of the baked light. + * + * @type {number} + * @default 1 + */ + lightMapIntensity: number; + /** + * The red channel of this texture is used as the ambient occlusion map. + * Requires a second set of UVs. + * + * @type {?Texture} + * @default null + */ + aoMap: Texture | null; + /** + * Intensity of the ambient occlusion effect. Range is `[0,1]`, where `0` + * disables ambient occlusion. Where intensity is `1` and the AO map's + * red channel is also `1`, ambient light is fully occluded on a surface. + * + * @type {number} + * @default 1 + */ + aoMapIntensity: number; + /** + * Emissive (light) color of the material, essentially a solid color + * unaffected by other lighting. + * + * @type {Color} + * @default (0,0,0) + */ + emissive: Color; + /** + * Intensity of the emissive light. Modulates the emissive color. + * + * @type {number} + * @default 1 + */ + emissiveIntensity: number; + /** + * Set emissive (glow) map. The emissive map color is modulated by the + * emissive color and the emissive intensity. If you have an emissive map, + * be sure to set the emissive color to something other than black. + * + * @type {?Texture} + * @default null + */ + emissiveMap: Texture | null; + /** + * The texture to create a bump map. The black and white values map to the + * perceived depth in relation to the lights. Bump doesn't actually affect + * the geometry of the object, only the lighting. If a normal map is defined + * this will be ignored. + * + * @type {?Texture} + * @default null + */ + bumpMap: Texture | null; + /** + * How much the bump map affects the material. Typical range is `[0,1]`. + * + * @type {number} + * @default 1 + */ + bumpScale: number; + /** + * The texture to create a normal map. The RGB values affect the surface + * normal for each pixel fragment and change the way the color is lit. Normal + * maps do not change the actual shape of the surface, only the lighting. In + * case the material has a normal map authored using the left handed + * convention, the `y` component of `normalScale` should be negated to compensate + * for the different handedness. + * + * @type {?Texture} + * @default null + */ + normalMap: Texture | null; + /** + * The type of normal map. + * + * @type {(TangentSpaceNormalMap|ObjectSpaceNormalMap)} + * @default TangentSpaceNormalMap + */ + normalMapType: (number | ObjectSpaceNormalMap); + /** + * How much the normal map affects the material. Typical value range is `[0,1]`. + * + * @type {Vector2} + * @default (1,1) + */ + normalScale: Vector2; + /** + * The displacement map affects the position of the mesh's vertices. Unlike + * other maps which only affect the light and shade of the material the + * displaced vertices can cast shadows, block other objects, and otherwise + * act as real geometry. The displacement texture is an image where the value + * of each pixel (white being the highest) is mapped against, and + * repositions, the vertices of the mesh. For best results, pair a + * displacement map with a matching normal map, since the renderer can + * not recompute surface normals from the displaced vertices. + * + * @type {?Texture} + * @default null + */ + displacementMap: Texture | null; + /** + * How much the displacement map affects the mesh (where black is no + * displacement, and white is maximum displacement). Without a displacement + * map set, this value is not applied. + * + * @type {number} + * @default 0 + */ + displacementScale: number; + /** + * The offset of the displacement map's values on the mesh's vertices. + * The bias is added to the scaled sample of the displacement map. + * Without a displacement map set, this value is not applied. + * + * @type {number} + * @default 0 + */ + displacementBias: number; + /** + * Specular map used by the material. + * + * @type {?Texture} + * @default null + */ + specularMap: Texture | null; + /** + * The alpha map is a grayscale texture that controls the opacity across the + * surface (black: fully transparent; white: fully opaque). + * + * Only the color of the texture is used, ignoring the alpha channel if one + * exists. For RGB and RGBA textures, the renderer will use the green channel + * when sampling this texture due to the extra bit of precision provided for + * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and + * luminance/alpha textures will also still work as expected. + * + * @type {?Texture} + * @default null + */ + alphaMap: Texture | null; + /** + * The environment map. + * + * @type {?Texture} + * @default null + */ + envMap: Texture | null; + /** + * The rotation of the environment map in radians. + * + * @type {Euler} + * @default (0,0,0) + */ + envMapRotation: Euler; + /** + * How to combine the result of the surface's color with the environment map, if any. + * + * When set to `MixOperation`, the {@link MeshBasicMaterial#reflectivity} is used to + * blend between the two colors. + * + * @type {(MultiplyOperation|MixOperation|AddOperation)} + * @default MultiplyOperation + */ + combine: (number | MixOperation | AddOperation); + /** + * How much the environment map affects the surface. + * The valid range is between `0` (no reflections) and `1` (full reflections). + * + * @type {number} + * @default 1 + */ + reflectivity: number; + /** + * Scales the effect of the environment map by multiplying its color. + * + * @type {number} + * @default 1 + */ + envMapIntensity: number; + /** + * The index of refraction (IOR) of air (approximately 1) divided by the + * index of refraction of the material. It is used with environment mapping + * modes {@link CubeRefractionMapping} and {@link EquirectangularRefractionMapping}. + * The refraction ratio should not exceed `1`. + * + * @type {number} + * @default 0.98 + */ + refractionRatio: number; + /** + * Renders the geometry as a wireframe. + * + * @type {boolean} + * @default false + */ + wireframe: boolean; + /** + * Controls the thickness of the wireframe. + * + * Can only be used with {@link SVGRenderer}. + * + * @type {number} + * @default 1 + */ + wireframeLinewidth: number; + /** + * Defines appearance of wireframe ends. + * + * Can only be used with {@link SVGRenderer}. + * + * @type {('round'|'bevel'|'miter')} + * @default 'round' + */ + wireframeLinecap: ("round" | "bevel" | "miter"); + /** + * Defines appearance of wireframe joints. + * + * Can only be used with {@link SVGRenderer}. + * + * @type {('round'|'bevel'|'miter')} + * @default 'round' + */ + wireframeLinejoin: ("round" | "bevel" | "miter"); + /** + * Whether the material is rendered with flat shading or not. + * + * @type {boolean} + * @default false + */ + flatShading: boolean; + /** + * Whether the material is affected by fog or not. + * + * @type {boolean} + * @default true + */ + fog: boolean; + copy(source: any): this; +} +import { Material } from './Material.js'; +import { Color } from '../math/Color.js'; +import { Vector2 } from '../math/Vector2.js'; +import { Euler } from '../math/Euler.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/MeshMatcapMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/MeshMatcapMaterial.d.ts new file mode 100644 index 000000000..8597043ad --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/MeshMatcapMaterial.d.ts @@ -0,0 +1,182 @@ +/** + * This material is defined by a MatCap (or Lit Sphere) texture, which encodes the + * material color and shading. + * + * `MeshMatcapMaterial` does not respond to lights since the matcap image file encodes + * baked lighting. It will cast a shadow onto an object that receives shadows + * (and shadow clipping works), but it will not self-shadow or receive + * shadows. + * + * @augments Material + * @demo scenes/material-browser.html#MeshMatcapMaterial + */ +export class MeshMatcapMaterial extends Material { + /** + * Constructs a new mesh matcap material. + * + * @param {Object} [parameters] - An object with one or more properties + * defining the material's appearance. Any property of the material + * (including any property from inherited materials) can be passed + * in here. Color values can be passed any type of value accepted + * by {@link Color#set}. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshMatcapMaterial: boolean; + defines: { + MATCAP: string; + }; + type: string; + /** + * Color of the material. + * + * @type {Color} + * @default (1,1,1) + */ + color: Color; + /** + * The matcap map. + * + * @type {?Texture} + * @default null + */ + matcap: Texture | null; + /** + * The color map. May optionally include an alpha channel, typically combined + * with {@link Material#transparent} or {@link Material#alphaTest}. The texture map + * color is modulated by the diffuse `color`. + * + * @type {?Texture} + * @default null + */ + map: Texture | null; + /** + * The texture to create a bump map. The black and white values map to the + * perceived depth in relation to the lights. Bump doesn't actually affect + * the geometry of the object, only the lighting. If a normal map is defined + * this will be ignored. + * + * @type {?Texture} + * @default null + */ + bumpMap: Texture | null; + /** + * How much the bump map affects the material. Typical range is `[0,1]`. + * + * @type {number} + * @default 1 + */ + bumpScale: number; + /** + * The texture to create a normal map. The RGB values affect the surface + * normal for each pixel fragment and change the way the color is lit. Normal + * maps do not change the actual shape of the surface, only the lighting. In + * case the material has a normal map authored using the left handed + * convention, the `y` component of `normalScale` should be negated to compensate + * for the different handedness. + * + * @type {?Texture} + * @default null + */ + normalMap: Texture | null; + /** + * The type of normal map. + * + * @type {(TangentSpaceNormalMap|ObjectSpaceNormalMap)} + * @default TangentSpaceNormalMap + */ + normalMapType: (number | ObjectSpaceNormalMap); + /** + * How much the normal map affects the material. Typical value range is `[0,1]`. + * + * @type {Vector2} + * @default (1,1) + */ + normalScale: Vector2; + /** + * The displacement map affects the position of the mesh's vertices. Unlike + * other maps which only affect the light and shade of the material the + * displaced vertices can cast shadows, block other objects, and otherwise + * act as real geometry. The displacement texture is an image where the value + * of each pixel (white being the highest) is mapped against, and + * repositions, the vertices of the mesh. For best results, pair a + * displacement map with a matching normal map, since the renderer can + * not recompute surface normals from the displaced vertices. + * + * @type {?Texture} + * @default null + */ + displacementMap: Texture | null; + /** + * How much the displacement map affects the mesh (where black is no + * displacement, and white is maximum displacement). Without a displacement + * map set, this value is not applied. + * + * @type {number} + * @default 0 + */ + displacementScale: number; + /** + * The offset of the displacement map's values on the mesh's vertices. + * The bias is added to the scaled sample of the displacement map. + * Without a displacement map set, this value is not applied. + * + * @type {number} + * @default 0 + */ + displacementBias: number; + /** + * The alpha map is a grayscale texture that controls the opacity across the + * surface (black: fully transparent; white: fully opaque). + * + * Only the color of the texture is used, ignoring the alpha channel if one + * exists. For RGB and RGBA textures, the renderer will use the green channel + * when sampling this texture due to the extra bit of precision provided for + * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and + * luminance/alpha textures will also still work as expected. + * + * @type {?Texture} + * @default null + */ + alphaMap: Texture | null; + /** + * Renders the geometry as a wireframe. + * + * @type {boolean} + * @default false + */ + wireframe: boolean; + /** + * Controls the thickness of the wireframe. + * + * Can only be used with {@link SVGRenderer}. + * + * @type {number} + * @default 1 + */ + wireframeLinewidth: number; + /** + * Whether the material is rendered with flat shading or not. + * + * @type {boolean} + * @default false + */ + flatShading: boolean; + /** + * Whether the material is affected by fog or not. + * + * @type {boolean} + * @default true + */ + fog: boolean; + copy(source: any): this; +} +import { Material } from './Material.js'; +import { Color } from '../math/Color.js'; +import { Vector2 } from '../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/MeshNormalMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/MeshNormalMaterial.d.ts new file mode 100644 index 000000000..50a3a855d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/MeshNormalMaterial.d.ts @@ -0,0 +1,129 @@ +/** + * A material that maps the normal vectors to RGB colors. + * + * @augments Material + * @demo scenes/material-browser.html#MeshNormalMaterial + */ +export class MeshNormalMaterial extends Material { + /** + * Constructs a new mesh normal material. + * + * @param {Object} [parameters] - An object with one or more properties + * defining the material's appearance. Any property of the material + * (including any property from inherited materials) can be passed + * in here. Color values can be passed any type of value accepted + * by {@link Color#set}. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshNormalMaterial: boolean; + type: string; + /** + * The texture to create a bump map. The black and white values map to the + * perceived depth in relation to the lights. Bump doesn't actually affect + * the geometry of the object, only the lighting. If a normal map is defined + * this will be ignored. + * + * @type {?Texture} + * @default null + */ + bumpMap: Texture | null; + /** + * How much the bump map affects the material. Typical range is `[0,1]`. + * + * @type {number} + * @default 1 + */ + bumpScale: number; + /** + * The texture to create a normal map. The RGB values affect the surface + * normal for each pixel fragment and change the way the color is lit. Normal + * maps do not change the actual shape of the surface, only the lighting. In + * case the material has a normal map authored using the left handed + * convention, the `y` component of `normalScale` should be negated to compensate + * for the different handedness. + * + * @type {?Texture} + * @default null + */ + normalMap: Texture | null; + /** + * The type of normal map. + * + * @type {(TangentSpaceNormalMap|ObjectSpaceNormalMap)} + * @default TangentSpaceNormalMap + */ + normalMapType: (number | ObjectSpaceNormalMap); + /** + * How much the normal map affects the material. Typical value range is `[0,1]`. + * + * @type {Vector2} + * @default (1,1) + */ + normalScale: Vector2; + /** + * The displacement map affects the position of the mesh's vertices. Unlike + * other maps which only affect the light and shade of the material the + * displaced vertices can cast shadows, block other objects, and otherwise + * act as real geometry. The displacement texture is an image where the value + * of each pixel (white being the highest) is mapped against, and + * repositions, the vertices of the mesh. For best results, pair a + * displacement map with a matching normal map, since the renderer can + * not recompute surface normals from the displaced vertices. + * + * @type {?Texture} + * @default null + */ + displacementMap: Texture | null; + /** + * How much the displacement map affects the mesh (where black is no + * displacement, and white is maximum displacement). Without a displacement + * map set, this value is not applied. + * + * @type {number} + * @default 0 + */ + displacementScale: number; + /** + * The offset of the displacement map's values on the mesh's vertices. + * The bias is added to the scaled sample of the displacement map. + * Without a displacement map set, this value is not applied. + * + * @type {number} + * @default 0 + */ + displacementBias: number; + /** + * Renders the geometry as a wireframe. + * + * @type {boolean} + * @default false + */ + wireframe: boolean; + /** + * Controls the thickness of the wireframe. + * + * WebGL and WebGPU ignore this property and always render + * 1 pixel wide lines. + * + * @type {number} + * @default 1 + */ + wireframeLinewidth: number; + /** + * Whether the material is rendered with flat shading or not. + * + * @type {boolean} + * @default false + */ + flatShading: boolean; + copy(source: any): this; +} +import { Material } from './Material.js'; +import { Vector2 } from '../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/MeshPhongMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/MeshPhongMaterial.d.ts new file mode 100644 index 000000000..187fcc1ec --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/MeshPhongMaterial.d.ts @@ -0,0 +1,322 @@ +/** + * A material for shiny surfaces with specular highlights. + * + * The material uses a non-physically based [Blinn-Phong](https://en.wikipedia.org/wiki/Blinn-Phong_shading_model) + * model for calculating reflectance. Unlike the Lambertian model used in the + * {@link MeshLambertMaterial} this can simulate shiny surfaces with specular + * highlights (such as varnished wood). `MeshPhongMaterial` uses per-fragment shading. + * + * Performance will generally be greater when using this material over the + * {@link MeshStandardMaterial} or {@link MeshPhysicalMaterial}, at the cost of + * some graphical accuracy. + * + * @augments Material + * @demo scenes/material-browser.html#MeshPhongMaterial + */ +export class MeshPhongMaterial extends Material { + /** + * Constructs a new mesh phong material. + * + * @param {Object} [parameters] - An object with one or more properties + * defining the material's appearance. Any property of the material + * (including any property from inherited materials) can be passed + * in here. Color values can be passed any type of value accepted + * by {@link Color#set}. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshPhongMaterial: boolean; + type: string; + /** + * Color of the material. + * + * @type {Color} + * @default (1,1,1) + */ + color: Color; + /** + * Specular color of the material. The default color is set to `0x111111` (very dark grey) + * + * This defines how shiny the material is and the color of its shine. + * + * @type {Color} + */ + specular: Color; + /** + * How shiny the specular highlight is; a higher value gives a sharper highlight. + * + * @type {number} + * @default 30 + */ + shininess: number; + /** + * The color map. May optionally include an alpha channel, typically combined + * with {@link Material#transparent} or {@link Material#alphaTest}. The texture map + * color is modulated by the diffuse `color`. + * + * @type {?Texture} + * @default null + */ + map: Texture | null; + /** + * The light map. Requires a second set of UVs. + * + * @type {?Texture} + * @default null + */ + lightMap: Texture | null; + /** + * Intensity of the baked light. + * + * @type {number} + * @default 1 + */ + lightMapIntensity: number; + /** + * The red channel of this texture is used as the ambient occlusion map. + * Requires a second set of UVs. + * + * @type {?Texture} + * @default null + */ + aoMap: Texture | null; + /** + * Intensity of the ambient occlusion effect. Range is `[0,1]`, where `0` + * disables ambient occlusion. Where intensity is `1` and the AO map's + * red channel is also `1`, ambient light is fully occluded on a surface. + * + * @type {number} + * @default 1 + */ + aoMapIntensity: number; + /** + * Emissive (light) color of the material, essentially a solid color + * unaffected by other lighting. + * + * @type {Color} + * @default (0,0,0) + */ + emissive: Color; + /** + * Intensity of the emissive light. Modulates the emissive color. + * + * @type {number} + * @default 1 + */ + emissiveIntensity: number; + /** + * Set emissive (glow) map. The emissive map color is modulated by the + * emissive color and the emissive intensity. If you have an emissive map, + * be sure to set the emissive color to something other than black. + * + * @type {?Texture} + * @default null + */ + emissiveMap: Texture | null; + /** + * The texture to create a bump map. The black and white values map to the + * perceived depth in relation to the lights. Bump doesn't actually affect + * the geometry of the object, only the lighting. If a normal map is defined + * this will be ignored. + * + * @type {?Texture} + * @default null + */ + bumpMap: Texture | null; + /** + * How much the bump map affects the material. Typical range is `[0,1]`. + * + * @type {number} + * @default 1 + */ + bumpScale: number; + /** + * The texture to create a normal map. The RGB values affect the surface + * normal for each pixel fragment and change the way the color is lit. Normal + * maps do not change the actual shape of the surface, only the lighting. In + * case the material has a normal map authored using the left handed + * convention, the `y` component of `normalScale` should be negated to compensate + * for the different handedness. + * + * @type {?Texture} + * @default null + */ + normalMap: Texture | null; + /** + * The type of normal map. + * + * @type {(TangentSpaceNormalMap|ObjectSpaceNormalMap)} + * @default TangentSpaceNormalMap + */ + normalMapType: (number | ObjectSpaceNormalMap); + /** + * How much the normal map affects the material. Typical value range is `[0,1]`. + * + * @type {Vector2} + * @default (1,1) + */ + normalScale: Vector2; + /** + * The displacement map affects the position of the mesh's vertices. Unlike + * other maps which only affect the light and shade of the material the + * displaced vertices can cast shadows, block other objects, and otherwise + * act as real geometry. The displacement texture is an image where the value + * of each pixel (white being the highest) is mapped against, and + * repositions, the vertices of the mesh. For best results, pair a + * displacement map with a matching normal map, since the renderer can + * not recompute surface normals from the displaced vertices. + * + * @type {?Texture} + * @default null + */ + displacementMap: Texture | null; + /** + * How much the displacement map affects the mesh (where black is no + * displacement, and white is maximum displacement). Without a displacement + * map set, this value is not applied. + * + * @type {number} + * @default 0 + */ + displacementScale: number; + /** + * The offset of the displacement map's values on the mesh's vertices. + * The bias is added to the scaled sample of the displacement map. + * Without a displacement map set, this value is not applied. + * + * @type {number} + * @default 0 + */ + displacementBias: number; + /** + * The specular map value affects both how much the specular surface + * highlight contributes and how much of the environment map affects the + * surface. + * + * @type {?Texture} + * @default null + */ + specularMap: Texture | null; + /** + * The alpha map is a grayscale texture that controls the opacity across the + * surface (black: fully transparent; white: fully opaque). + * + * Only the color of the texture is used, ignoring the alpha channel if one + * exists. For RGB and RGBA textures, the renderer will use the green channel + * when sampling this texture due to the extra bit of precision provided for + * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and + * luminance/alpha textures will also still work as expected. + * + * @type {?Texture} + * @default null + */ + alphaMap: Texture | null; + /** + * The environment map. + * + * @type {?Texture} + * @default null + */ + envMap: Texture | null; + /** + * The rotation of the environment map in radians. + * + * @type {Euler} + * @default (0,0,0) + */ + envMapRotation: Euler; + /** + * How to combine the result of the surface's color with the environment map, if any. + * + * When set to `MixOperation`, the {@link MeshBasicMaterial#reflectivity} is used to + * blend between the two colors. + * + * @type {(MultiplyOperation|MixOperation|AddOperation)} + * @default MultiplyOperation + */ + combine: (number | MixOperation | AddOperation); + /** + * How much the environment map affects the surface. + * The valid range is between `0` (no reflections) and `1` (full reflections). + * + * @type {number} + * @default 1 + */ + reflectivity: number; + /** + * Scales the effect of the environment map by multiplying its color. + * + * @type {number} + * @default 1 + */ + envMapIntensity: number; + /** + * The index of refraction (IOR) of air (approximately 1) divided by the + * index of refraction of the material. It is used with environment mapping + * modes {@link CubeRefractionMapping} and {@link EquirectangularRefractionMapping}. + * The refraction ratio should not exceed `1`. + * + * @type {number} + * @default 0.98 + */ + refractionRatio: number; + /** + * Renders the geometry as a wireframe. + * + * @type {boolean} + * @default false + */ + wireframe: boolean; + /** + * Controls the thickness of the wireframe. + * + * Can only be used with {@link SVGRenderer}. + * + * @type {number} + * @default 1 + */ + wireframeLinewidth: number; + /** + * Defines appearance of wireframe ends. + * + * Can only be used with {@link SVGRenderer}. + * + * @type {('round'|'bevel'|'miter')} + * @default 'round' + */ + wireframeLinecap: ("round" | "bevel" | "miter"); + /** + * Defines appearance of wireframe joints. + * + * Can only be used with {@link SVGRenderer}. + * + * @type {('round'|'bevel'|'miter')} + * @default 'round' + */ + wireframeLinejoin: ("round" | "bevel" | "miter"); + /** + * Whether the material is rendered with flat shading or not. + * + * @type {boolean} + * @default false + */ + flatShading: boolean; + /** + * Whether the material is affected by fog or not. + * + * @type {boolean} + * @default true + */ + fog: boolean; + copy(source: any): this; +} +import { Material } from './Material.js'; +import { Color } from '../math/Color.js'; +import { Vector2 } from '../math/Vector2.js'; +import { Euler } from '../math/Euler.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/MeshPhysicalMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/MeshPhysicalMaterial.d.ts new file mode 100644 index 000000000..3dd61375e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/MeshPhysicalMaterial.d.ts @@ -0,0 +1,310 @@ +/** + * An extension of the {@link MeshStandardMaterial}, providing more advanced + * physically-based rendering properties: + * + * - Anisotropy: Ability to represent the anisotropic property of materials + * as observable with brushed metals. + * - Clearcoat: Some materials — like car paints, carbon fiber, and wet surfaces — require + * a clear, reflective layer on top of another layer that may be irregular or rough. + * Clearcoat approximates this effect, without the need for a separate transparent surface. + * - Iridescence: Allows to render the effect where hue varies depending on the viewing + * angle and illumination angle. This can be seen on soap bubbles, oil films, or on the + * wings of many insects. + * - Physically-based transparency: One limitation of {@link Material#opacity} is that highly + * transparent materials are less reflective. Physically-based transmission provides a more + * realistic option for thin, transparent surfaces like glass. + * - Advanced reflectivity: More flexible reflectivity for non-metallic materials. + * - Sheen: Can be used for representing cloth and fabric materials. + * + * As a result of these complex shading features, `MeshPhysicalMaterial` has a + * higher performance cost, per pixel, than other three.js materials. Most + * effects are disabled by default, and add cost as they are enabled. For + * best results, always specify an environment map when using this material. + * + * @augments MeshStandardMaterial + * @demo scenes/material-browser.html#MeshPhysicalMaterial + */ +export class MeshPhysicalMaterial extends MeshStandardMaterial { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshPhysicalMaterial: boolean; + defines: { + STANDARD: string; + PHYSICAL: string; + }; + /** + * The rotation of the anisotropy in tangent, bitangent space, measured in radians + * counter-clockwise from the tangent. When `anisotropyMap` is present, this + * property provides additional rotation to the vectors in the texture. + * + * @type {number} + * @default 1 + */ + anisotropyRotation: number; + /** + * Red and green channels represent the anisotropy direction in `[-1, 1]` tangent, + * bitangent space, to be rotated by `anisotropyRotation`. The blue channel + * contains strength as `[0, 1]` to be multiplied by `anisotropy`. + * + * @type {?Texture} + * @default null + */ + anisotropyMap: Texture | null; + /** + * The red channel of this texture is multiplied against `clearcoat`, + * for per-pixel control over a coating's intensity. + * + * @type {?Texture} + * @default null + */ + clearcoatMap: Texture | null; + /** + * Roughness of the clear coat layer, from `0.0` to `1.0`. + * + * @type {number} + * @default 0 + */ + clearcoatRoughness: number; + /** + * The green channel of this texture is multiplied against + * `clearcoatRoughness`, for per-pixel control over a coating's roughness. + * + * @type {?Texture} + * @default null + */ + clearcoatRoughnessMap: Texture | null; + /** + * How much `clearcoatNormalMap` affects the clear coat layer, from + * `(0,0)` to `(1,1)`. + * + * @type {Vector2} + * @default (1,1) + */ + clearcoatNormalScale: Vector2; + /** + * Can be used to enable independent normals for the clear coat layer. + * + * @type {?Texture} + * @default null + */ + clearcoatNormalMap: Texture | null; + /** + * Index-of-refraction for non-metallic materials, from `1.0` to `2.333`. + * + * @type {number} + * @default 1.5 + */ + ior: number; + /** + * The red channel of this texture is multiplied against `iridescence`, for per-pixel + * control over iridescence. + * + * @type {?Texture} + * @default null + */ + iridescenceMap: Texture | null; + /** + * Strength of the iridescence RGB color shift effect, represented by an index-of-refraction. + * Between `1.0` to `2.333`. + * + * @type {number} + * @default 1.3 + */ + iridescenceIOR: number; + /** + *Array of exactly 2 elements, specifying minimum and maximum thickness of the iridescence layer. + Thickness of iridescence layer has an equivalent effect of the one `thickness` has on `ior`. + * + * @type {Array} + * @default [100,400] + */ + iridescenceThicknessRange: Array; + /** + * A texture that defines the thickness of the iridescence layer, stored in the green channel. + * Minimum and maximum values of thickness are defined by `iridescenceThicknessRange` array: + * - `0.0` in the green channel will result in thickness equal to first element of the array. + * - `1.0` in the green channel will result in thickness equal to second element of the array. + * - Values in-between will linearly interpolate between the elements of the array. + * + * @type {?Texture} + * @default null + */ + iridescenceThicknessMap: Texture | null; + /** + * The sheen tint. + * + * @type {Color} + * @default (0,0,0) + */ + sheenColor: Color; + /** + * The RGB channels of this texture are multiplied against `sheenColor`, for per-pixel control + * over sheen tint. + * + * @type {?Texture} + * @default null + */ + sheenColorMap: Texture | null; + /** + * Roughness of the sheen layer, from `0.0` to `1.0`. + * + * @type {number} + * @default 1 + */ + sheenRoughness: number; + /** + * The alpha channel of this texture is multiplied against `sheenRoughness`, for per-pixel control + * over sheen roughness. + * + * @type {?Texture} + * @default null + */ + sheenRoughnessMap: Texture | null; + /** + * The red channel of this texture is multiplied against `transmission`, for per-pixel control over + * optical transparency. + * + * @type {?Texture} + * @default null + */ + transmissionMap: Texture | null; + /** + * The thickness of the volume beneath the surface. The value is given in the + * coordinate space of the mesh. If the value is `0` the material is + * thin-walled. Otherwise the material is a volume boundary. + * + * @type {number} + * @default 0 + */ + thickness: number; + /** + * A texture that defines the thickness, stored in the green channel. This will + * be multiplied by `thickness`. + * + * @type {?Texture} + * @default null + */ + thicknessMap: Texture | null; + /** + * Density of the medium given as the average distance that light travels in + * the medium before interacting with a particle. The value is given in world + * space units, and must be greater than zero. + * + * @type {number} + * @default Infinity + */ + attenuationDistance: number; + /** + * The color that white light turns into due to absorption when reaching the + * attenuation distance. + * + * @type {Color} + * @default (1,1,1) + */ + attenuationColor: Color; + /** + * A float that scales the amount of specular reflection for non-metals only. + * When set to zero, the model is effectively Lambertian. From `0.0` to `1.0`. + * + * @type {number} + * @default 1 + */ + specularIntensity: number; + /** + * The alpha channel of this texture is multiplied against `specularIntensity`, + * for per-pixel control over specular intensity. + * + * @type {?Texture} + * @default null + */ + specularIntensityMap: Texture | null; + /** + * Tints the specular reflection at normal incidence for non-metals only. + * + * @type {Color} + * @default (1,1,1) + */ + specularColor: Color; + /** + * The RGB channels of this texture are multiplied against `specularColor`, + * for per-pixel control over specular color. + * + * @type {?Texture} + * @default null + */ + specularColorMap: Texture | null; + _anisotropy: number; + _clearcoat: number; + _dispersion: number; + _iridescence: number; + _sheen: number; + _transmission: number; + set anisotropy(value: number); + /** + * The anisotropy strength, from `0.0` to `1.0`. + * + * @type {number} + * @default 0 + */ + get anisotropy(): number; + set clearcoat(value: number); + /** + * Represents the intensity of the clear coat layer, from `0.0` to `1.0`. Use + * clear coat related properties to enable multilayer materials that have a + * thin translucent layer over the base layer. + * + * @type {number} + * @default 0 + */ + get clearcoat(): number; + set iridescence(value: number); + /** + * The intensity of the iridescence layer, simulating RGB color shift based on the angle between + * the surface and the viewer, from `0.0` to `1.0`. + * + * @type {number} + * @default 0 + */ + get iridescence(): number; + set dispersion(value: number); + /** + * Defines the strength of the angular separation of colors (chromatic aberration) transmitting + * through a relatively clear volume. Any value zero or larger is valid, the typical range of + * realistic values is `[0, 1]`. This property can be only be used with transmissive objects. + * + * @type {number} + * @default 0 + */ + get dispersion(): number; + set sheen(value: number); + /** + * The intensity of the sheen layer, from `0.0` to `1.0`. + * + * @type {number} + * @default 0 + */ + get sheen(): number; + set transmission(value: number); + /** + * Degree of transmission (or optical transparency), from `0.0` to `1.0`. + * + * Thin, transparent or semitransparent, plastic or glass materials remain + * largely reflective even if they are fully transmissive. The transmission + * property can be used to model these materials. + * + * When transmission is non-zero, `opacity` should be set to `1`. + * + * @type {number} + * @default 0 + */ + get transmission(): number; + copy(source: any): this; +} +import { MeshStandardMaterial } from './MeshStandardMaterial.js'; +import { Vector2 } from '../math/Vector2.js'; +import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/MeshStandardMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/MeshStandardMaterial.d.ts new file mode 100644 index 000000000..087811b7f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/MeshStandardMaterial.d.ts @@ -0,0 +1,328 @@ +/** + * A standard physically based material, using Metallic-Roughness workflow. + * + * Physically based rendering (PBR) has recently become the standard in many + * 3D applications, such as [Unity](https://blogs.unity3d.com/2014/10/29/physically-based-shading-in-unity-5-a-primer/), + * [Unreal](https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/PhysicallyBased/) and + * [3D Studio Max](http://area.autodesk.com/blogs/the-3ds-max-blog/what039s-new-for-rendering-in-3ds-max-2017). + * + * This approach differs from older approaches in that instead of using + * approximations for the way in which light interacts with a surface, a + * physically correct model is used. The idea is that, instead of tweaking + * materials to look good under specific lighting, a material can be created + * that will react 'correctly' under all lighting scenarios. + * + * In practice this gives a more accurate and realistic looking result than + * the {@link MeshLambertMaterial} or {@link MeshPhongMaterial}, at the cost of + * being somewhat more computationally expensive. `MeshStandardMaterial` uses per-fragment + * shading. + * + * Note that for best results you should always specify an environment map when using this material. + * + * For a non-technical introduction to the concept of PBR and how to set up a + * PBR material, check out these articles by the people at [marmoset](https://www.marmoset.co): + * + * - [Basic Theory of Physically Based Rendering](https://www.marmoset.co/posts/basic-theory-of-physically-based-rendering/) + * - [Physically Based Rendering and You Can Too](https://www.marmoset.co/posts/physically-based-rendering-and-you-can-too/) + * + * Technical details of the approach used in three.js (and most other PBR systems) can be found is this + * [paper from Disney](https://media.disneyanimation.com/uploads/production/publication_asset/48/asset/s2012_pbs_disney_brdf_notes_v3.pdf) + * (pdf), by Brent Burley. + * + * @augments Material + * @demo scenes/material-browser.html#MeshStandardMaterial + */ +export class MeshStandardMaterial extends Material { + /** + * Constructs a new mesh standard material. + * + * @param {Object} [parameters] - An object with one or more properties + * defining the material's appearance. Any property of the material + * (including any property from inherited materials) can be passed + * in here. Color values can be passed any type of value accepted + * by {@link Color#set}. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshStandardMaterial: boolean; + type: string; + defines: { + STANDARD: string; + }; + /** + * Color of the material. + * + * @type {Color} + * @default (1,1,1) + */ + color: Color; + /** + * How rough the material appears. `0.0` means a smooth mirror reflection, `1.0` + * means fully diffuse. If `roughnessMap` is also provided, + * both values are multiplied. + * + * @type {number} + * @default 1 + */ + roughness: number; + /** + * How much the material is like a metal. Non-metallic materials such as wood + * or stone use `0.0`, metallic use `1.0`, with nothing (usually) in between. + * A value between `0.0` and `1.0` could be used for a rusty metal look. + * If `metalnessMap` is also provided, both values are multiplied. + * + * @type {number} + * @default 0 + */ + metalness: number; + /** + * The color map. May optionally include an alpha channel, typically combined + * with {@link Material#transparent} or {@link Material#alphaTest}. The texture map + * color is modulated by the diffuse `color`. + * + * @type {?Texture} + * @default null + */ + map: Texture | null; + /** + * The light map. Requires a second set of UVs. + * + * @type {?Texture} + * @default null + */ + lightMap: Texture | null; + /** + * Intensity of the baked light. + * + * @type {number} + * @default 1 + */ + lightMapIntensity: number; + /** + * The red channel of this texture is used as the ambient occlusion map. + * Requires a second set of UVs. + * + * @type {?Texture} + * @default null + */ + aoMap: Texture | null; + /** + * Intensity of the ambient occlusion effect. Range is `[0,1]`, where `0` + * disables ambient occlusion. Where intensity is `1` and the AO map's + * red channel is also `1`, ambient light is fully occluded on a surface. + * + * @type {number} + * @default 1 + */ + aoMapIntensity: number; + /** + * Emissive (light) color of the material, essentially a solid color + * unaffected by other lighting. + * + * @type {Color} + * @default (0,0,0) + */ + emissive: Color; + /** + * Intensity of the emissive light. Modulates the emissive color. + * + * @type {number} + * @default 1 + */ + emissiveIntensity: number; + /** + * Set emissive (glow) map. The emissive map color is modulated by the + * emissive color and the emissive intensity. If you have an emissive map, + * be sure to set the emissive color to something other than black. + * + * @type {?Texture} + * @default null + */ + emissiveMap: Texture | null; + /** + * The texture to create a bump map. The black and white values map to the + * perceived depth in relation to the lights. Bump doesn't actually affect + * the geometry of the object, only the lighting. If a normal map is defined + * this will be ignored. + * + * @type {?Texture} + * @default null + */ + bumpMap: Texture | null; + /** + * How much the bump map affects the material. Typical range is `[0,1]`. + * + * @type {number} + * @default 1 + */ + bumpScale: number; + /** + * The texture to create a normal map. The RGB values affect the surface + * normal for each pixel fragment and change the way the color is lit. Normal + * maps do not change the actual shape of the surface, only the lighting. In + * case the material has a normal map authored using the left handed + * convention, the `y` component of `normalScale` should be negated to compensate + * for the different handedness. + * + * @type {?Texture} + * @default null + */ + normalMap: Texture | null; + /** + * The type of normal map. + * + * @type {(TangentSpaceNormalMap|ObjectSpaceNormalMap)} + * @default TangentSpaceNormalMap + */ + normalMapType: (number | ObjectSpaceNormalMap); + /** + * How much the normal map affects the material. Typical value range is `[0,1]`. + * + * @type {Vector2} + * @default (1,1) + */ + normalScale: Vector2; + /** + * The displacement map affects the position of the mesh's vertices. Unlike + * other maps which only affect the light and shade of the material the + * displaced vertices can cast shadows, block other objects, and otherwise + * act as real geometry. The displacement texture is an image where the value + * of each pixel (white being the highest) is mapped against, and + * repositions, the vertices of the mesh. For best results, pair a + * displacement map with a matching normal map, since the renderer can + * not recompute surface normals from the displaced vertices. + * + * @type {?Texture} + * @default null + */ + displacementMap: Texture | null; + /** + * How much the displacement map affects the mesh (where black is no + * displacement, and white is maximum displacement). Without a displacement + * map set, this value is not applied. + * + * @type {number} + * @default 0 + */ + displacementScale: number; + /** + * The offset of the displacement map's values on the mesh's vertices. + * The bias is added to the scaled sample of the displacement map. + * Without a displacement map set, this value is not applied. + * + * @type {number} + * @default 0 + */ + displacementBias: number; + /** + * The green channel of this texture is used to alter the roughness of the + * material. + * + * @type {?Texture} + * @default null + */ + roughnessMap: Texture | null; + /** + * The blue channel of this texture is used to alter the metalness of the + * material. + * + * @type {?Texture} + * @default null + */ + metalnessMap: Texture | null; + /** + * The alpha map is a grayscale texture that controls the opacity across the + * surface (black: fully transparent; white: fully opaque). + * + * Only the color of the texture is used, ignoring the alpha channel if one + * exists. For RGB and RGBA textures, the renderer will use the green channel + * when sampling this texture due to the extra bit of precision provided for + * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and + * luminance/alpha textures will also still work as expected. + * + * @type {?Texture} + * @default null + */ + alphaMap: Texture | null; + /** + * The environment map. To ensure a physically correct rendering, environment maps + * are internally pre-processed with {@link PMREMGenerator}. + * + * @type {?Texture} + * @default null + */ + envMap: Texture | null; + /** + * The rotation of the environment map in radians. + * + * @type {Euler} + * @default (0,0,0) + */ + envMapRotation: Euler; + /** + * Scales the effect of the environment map by multiplying its color. + * + * @type {number} + * @default 1 + */ + envMapIntensity: number; + /** + * Renders the geometry as a wireframe. + * + * @type {boolean} + * @default false + */ + wireframe: boolean; + /** + * Controls the thickness of the wireframe. + * + * Can only be used with {@link SVGRenderer}. + * + * @type {number} + * @default 1 + */ + wireframeLinewidth: number; + /** + * Defines appearance of wireframe ends. + * + * Can only be used with {@link SVGRenderer}. + * + * @type {('round'|'bevel'|'miter')} + * @default 'round' + */ + wireframeLinecap: ("round" | "bevel" | "miter"); + /** + * Defines appearance of wireframe joints. + * + * Can only be used with {@link SVGRenderer}. + * + * @type {('round'|'bevel'|'miter')} + * @default 'round' + */ + wireframeLinejoin: ("round" | "bevel" | "miter"); + /** + * Whether the material is rendered with flat shading or not. + * + * @type {boolean} + * @default false + */ + flatShading: boolean; + /** + * Whether the material is affected by fog or not. + * + * @type {boolean} + * @default true + */ + fog: boolean; + copy(source: any): this; +} +import { Material } from './Material.js'; +import { Color } from '../math/Color.js'; +import { Vector2 } from '../math/Vector2.js'; +import { Euler } from '../math/Euler.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/MeshToonMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/MeshToonMaterial.d.ts new file mode 100644 index 000000000..4003cc6aa --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/MeshToonMaterial.d.ts @@ -0,0 +1,244 @@ +/** + * A material implementing toon shading. + * + * @augments Material + * @demo scenes/material-browser.html#MeshToonMaterial + */ +export class MeshToonMaterial extends Material { + /** + * Constructs a new mesh toon material. + * + * @param {Object} [parameters] - An object with one or more properties + * defining the material's appearance. Any property of the material + * (including any property from inherited materials) can be passed + * in here. Color values can be passed any type of value accepted + * by {@link Color#set}. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshToonMaterial: boolean; + defines: { + TOON: string; + }; + type: string; + /** + * Color of the material. + * + * @type {Color} + * @default (1,1,1) + */ + color: Color; + /** + * The color map. May optionally include an alpha channel, typically combined + * with {@link Material#transparent} or {@link Material#alphaTest}. The texture map + * color is modulated by the diffuse `color`. + * + * @type {?Texture} + * @default null + */ + map: Texture | null; + /** + * Gradient map for toon shading. It's required to set + * {@link Texture#minFilter} and {@link Texture#magFilter} to {@link NearestFilter} + * when using this type of texture. + * + * @type {?Texture} + * @default null + */ + gradientMap: Texture | null; + /** + * The light map. Requires a second set of UVs. + * + * @type {?Texture} + * @default null + */ + lightMap: Texture | null; + /** + * Intensity of the baked light. + * + * @type {number} + * @default 1 + */ + lightMapIntensity: number; + /** + * The red channel of this texture is used as the ambient occlusion map. + * Requires a second set of UVs. + * + * @type {?Texture} + * @default null + */ + aoMap: Texture | null; + /** + * Intensity of the ambient occlusion effect. Range is `[0,1]`, where `0` + * disables ambient occlusion. Where intensity is `1` and the AO map's + * red channel is also `1`, ambient light is fully occluded on a surface. + * + * @type {number} + * @default 1 + */ + aoMapIntensity: number; + /** + * Emissive (light) color of the material, essentially a solid color + * unaffected by other lighting. + * + * @type {Color} + * @default (0,0,0) + */ + emissive: Color; + /** + * Intensity of the emissive light. Modulates the emissive color. + * + * @type {number} + * @default 1 + */ + emissiveIntensity: number; + /** + * Set emissive (glow) map. The emissive map color is modulated by the + * emissive color and the emissive intensity. If you have an emissive map, + * be sure to set the emissive color to something other than black. + * + * @type {?Texture} + * @default null + */ + emissiveMap: Texture | null; + /** + * The texture to create a bump map. The black and white values map to the + * perceived depth in relation to the lights. Bump doesn't actually affect + * the geometry of the object, only the lighting. If a normal map is defined + * this will be ignored. + * + * @type {?Texture} + * @default null + */ + bumpMap: Texture | null; + /** + * How much the bump map affects the material. Typical range is `[0,1]`. + * + * @type {number} + * @default 1 + */ + bumpScale: number; + /** + * The texture to create a normal map. The RGB values affect the surface + * normal for each pixel fragment and change the way the color is lit. Normal + * maps do not change the actual shape of the surface, only the lighting. In + * case the material has a normal map authored using the left handed + * convention, the `y` component of `normalScale` should be negated to compensate + * for the different handedness. + * + * @type {?Texture} + * @default null + */ + normalMap: Texture | null; + /** + * The type of normal map. + * + * @type {(TangentSpaceNormalMap|ObjectSpaceNormalMap)} + * @default TangentSpaceNormalMap + */ + normalMapType: (number | ObjectSpaceNormalMap); + /** + * How much the normal map affects the material. Typical value range is `[0,1]`. + * + * @type {Vector2} + * @default (1,1) + */ + normalScale: Vector2; + /** + * The displacement map affects the position of the mesh's vertices. Unlike + * other maps which only affect the light and shade of the material the + * displaced vertices can cast shadows, block other objects, and otherwise + * act as real geometry. The displacement texture is an image where the value + * of each pixel (white being the highest) is mapped against, and + * repositions, the vertices of the mesh. For best results, pair a + * displacement map with a matching normal map, since the renderer can + * not recompute surface normals from the displaced vertices. + * + * @type {?Texture} + * @default null + */ + displacementMap: Texture | null; + /** + * How much the displacement map affects the mesh (where black is no + * displacement, and white is maximum displacement). Without a displacement + * map set, this value is not applied. + * + * @type {number} + * @default 0 + */ + displacementScale: number; + /** + * The offset of the displacement map's values on the mesh's vertices. + * The bias is added to the scaled sample of the displacement map. + * Without a displacement map set, this value is not applied. + * + * @type {number} + * @default 0 + */ + displacementBias: number; + /** + * The alpha map is a grayscale texture that controls the opacity across the + * surface (black: fully transparent; white: fully opaque). + * + * Only the color of the texture is used, ignoring the alpha channel if one + * exists. For RGB and RGBA textures, the renderer will use the green channel + * when sampling this texture due to the extra bit of precision provided for + * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and + * luminance/alpha textures will also still work as expected. + * + * @type {?Texture} + * @default null + */ + alphaMap: Texture | null; + /** + * Renders the geometry as a wireframe. + * + * @type {boolean} + * @default false + */ + wireframe: boolean; + /** + * Controls the thickness of the wireframe. + * + * Can only be used with {@link SVGRenderer}. + * + * @type {number} + * @default 1 + */ + wireframeLinewidth: number; + /** + * Defines appearance of wireframe ends. + * + * Can only be used with {@link SVGRenderer}. + * + * @type {('round'|'bevel'|'miter')} + * @default 'round' + */ + wireframeLinecap: ("round" | "bevel" | "miter"); + /** + * Defines appearance of wireframe joints. + * + * Can only be used with {@link SVGRenderer}. + * + * @type {('round'|'bevel'|'miter')} + * @default 'round' + */ + wireframeLinejoin: ("round" | "bevel" | "miter"); + /** + * Whether the material is affected by fog or not. + * + * @type {boolean} + * @default true + */ + fog: boolean; + copy(source: any): this; +} +import { Material } from './Material.js'; +import { Color } from '../math/Color.js'; +import { Vector2 } from '../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/PointsMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/PointsMaterial.d.ts new file mode 100644 index 000000000..b6869b31b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/PointsMaterial.d.ts @@ -0,0 +1,102 @@ +/** + * A material for rendering point primitives. + * + * Materials define the appearance of renderable 3D objects. + * + * ```js + * const vertices = []; + * + * for ( let i = 0; i < 10000; i ++ ) { + * const x = THREE.MathUtils.randFloatSpread( 2000 ); + * const y = THREE.MathUtils.randFloatSpread( 2000 ); + * const z = THREE.MathUtils.randFloatSpread( 2000 ); + * + * vertices.push( x, y, z ); + * } + * + * const geometry = new THREE.BufferGeometry(); + * geometry.setAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) ); + * const material = new THREE.PointsMaterial( { color: 0x888888 } ); + * const points = new THREE.Points( geometry, material ); + * scene.add( points ); + * ``` + * + * @augments Material + */ +export class PointsMaterial extends Material { + /** + * Constructs a new points material. + * + * @param {Object} [parameters] - An object with one or more properties + * defining the material's appearance. Any property of the material + * (including any property from inherited materials) can be passed + * in here. Color values can be passed any type of value accepted + * by {@link Color#set}. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isPointsMaterial: boolean; + type: string; + /** + * Color of the material. + * + * @type {Color} + * @default (1,1,1) + */ + color: Color; + /** + * The color map. May optionally include an alpha channel, typically combined + * with {@link Material#transparent} or {@link Material#alphaTest}. The texture map + * color is modulated by the diffuse `color`. + * + * @type {?Texture} + * @default null + */ + map: Texture | null; + /** + * The alpha map is a grayscale texture that controls the opacity across the + * surface (black: fully transparent; white: fully opaque). + * + * Only the color of the texture is used, ignoring the alpha channel if one + * exists. For RGB and RGBA textures, the renderer will use the green channel + * when sampling this texture due to the extra bit of precision provided for + * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and + * luminance/alpha textures will also still work as expected. + * + * @type {?Texture} + * @default null + */ + alphaMap: Texture | null; + /** + * Defines the size of the points in pixels. + * + * Might be capped if the value exceeds hardware dependent parameters like [gl.ALIASED_POINT_SIZE_RANGE](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getParamete). + * + * @type {number} + * @default 1 + */ + size: number; + /** + * Specifies whether size of individual points is attenuated by the camera depth (perspective camera only). + * + * @type {boolean} + * @default true + */ + sizeAttenuation: boolean; + /** + * Whether the material is affected by fog or not. + * + * @type {boolean} + * @default true + */ + fog: boolean; + copy(source: any): this; +} +import { Material } from './Material.js'; +import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/RawShaderMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/RawShaderMaterial.d.ts new file mode 100644 index 000000000..0ce09ac16 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/RawShaderMaterial.d.ts @@ -0,0 +1,108 @@ +declare const RawShaderMaterial_base: { + new (parameters?: Object): { + readonly isShaderMaterial: boolean; + type: string; + defines: Object; + uniforms: Object; + uniformsGroups: Array; + vertexShader: string; + fragmentShader: string; + linewidth: number; + wireframe: boolean; + wireframeLinewidth: number; + fog: boolean; + lights: boolean; + clipping: boolean; + forceSinglePass: boolean; + extensions: { + clipCullDistance: false; + multiDraw: false; + }; + defaultAttributeValues: Object; + index0AttributeName: string | undefined; + uniformsNeedUpdate: boolean; + glslVersion: (GLSL1 | GLSL3) | null; + copy(source: any): /*elided*/ any; + toJSON(meta: any): Object; + readonly isMaterial: boolean; + readonly uuid: string; + name: string; + blending: (NoBlending | number | AdditiveBlending | SubtractiveBlending | MultiplyBlending | CustomBlending); + side: (number | BackSide | DoubleSide); + vertexColors: boolean; + opacity: number; + transparent: boolean; + alphaHash: boolean; + blendSrc: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); + blendDst: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); + blendEquation: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation); + blendSrcAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; + blendDstAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; + blendEquationAlpha: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation) | null; + blendColor: import("../Three.Core.js").Color; + blendAlpha: number; + depthFunc: (NeverDepth | AlwaysDepth | LessDepth | number | EqualDepth | GreaterEqualDepth | GreaterDepth | NotEqualDepth); + depthTest: boolean; + depthWrite: boolean; + stencilWriteMask: number; + stencilFunc: NeverStencilFunc | LessStencilFunc | EqualStencilFunc | LessEqualStencilFunc | GreaterStencilFunc | NotEqualStencilFunc | GreaterEqualStencilFunc | number; + stencilRef: number; + stencilFuncMask: number; + stencilFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; + stencilZFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; + stencilZPass: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; + stencilWrite: boolean; + clippingPlanes: Array | null; + clipIntersection: boolean; + clipShadows: boolean; + shadowSide: (number | BackSide | DoubleSide) | null; + colorWrite: boolean; + precision: ("highp" | "mediump" | "lowp") | null; + polygonOffset: boolean; + polygonOffsetFactor: number; + polygonOffsetUnits: number; + dithering: boolean; + alphaToCoverage: boolean; + premultipliedAlpha: boolean; + allowOverride: boolean; + visible: boolean; + toneMapped: boolean; + userData: Object; + readonly version: number; + _alphaTest: number; + get alphaTest(): number; + set alphaTest(value: number); + onBeforeRender(): void; + onBeforeCompile(): void; + customProgramCacheKey(): string; + setValues(values?: Object): void; + clone(): Material; + dispose(): void; + set needsUpdate(value: boolean); + addEventListener(type: string, listener: Function): void; + _listeners: {} | undefined; + hasEventListener(type: string, listener: Function): boolean; + removeEventListener(type: string, listener: Function): void; + dispatchEvent(event: Object): void; + }; +}; +/** + * This class works just like {@link ShaderMaterial}, except that definitions + * of built-in uniforms and attributes are not automatically prepended to the + * GLSL shader code. + * + * `RawShaderMaterial` can only be used with {@link WebGLRenderer}. + * + * @augments ShaderMaterial + */ +export class RawShaderMaterial extends RawShaderMaterial_base { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isRawShaderMaterial: boolean; +} +export {}; diff --git a/jsdoc-testing/jsdoc/src/materials/ShaderMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/ShaderMaterial.d.ts new file mode 100644 index 000000000..63d1da267 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/ShaderMaterial.d.ts @@ -0,0 +1,256 @@ +/** + * ~Shader + */ +export type ShaderMaterial = { + /** + * - The name of the shader. + */ + name: string; + /** + * - The uniforms of the shader. + */ + uniforms: { + [x: string]: Uniform; + }; + /** + * - The defines of the shader. + */ + defines: { + [x: string]: any; + }; + /** + * - The vertex shader code. + */ + vertexShader: string; + /** + * - The fragment shader code. + */ + fragmentShader: string; +}; +/** + * A material rendered with custom shaders. A shader is a small program written in GLSL. + * that runs on the GPU. You may want to use a custom shader if you need to implement an + * effect not included with any of the built-in materials. + * + * There are the following notes to bear in mind when using a `ShaderMaterial`: + * + * - `ShaderMaterial` can only be used with {@link WebGLRenderer}. + * - Built in attributes and uniforms are passed to the shaders along with your code. If + * you don't want that, use {@link RawShaderMaterial} instead. + * - You can use the directive `#pragma unroll_loop_start` and `#pragma unroll_loop_end` + * in order to unroll a `for` loop in GLSL by the shader preprocessor. The directive has + * to be placed right above the loop. The loop formatting has to correspond to a defined standard. + * - The loop has to be [normalized](https://en.wikipedia.org/wiki/Normalized_loop). + * - The loop variable has to be *i*. + * - The value `UNROLLED_LOOP_INDEX` will be replaced with the explicitly + * value of *i* for the given iteration and can be used in preprocessor + * statements. + * + * ```js + * const material = new THREE.ShaderMaterial( { + * uniforms: { + * time: { value: 1.0 }, + * resolution: { value: new THREE.Vector2() } + * }, + * vertexShader: document.getElementById( 'vertexShader' ).textContent, + * fragmentShader: document.getElementById( 'fragmentShader' ).textContent + * } ); + * ``` + * + * @augments Material + */ +export class ShaderMaterial extends Material { + /** + * Constructs a new shader material. + * + * @param {Object} [parameters] - An object with one or more properties + * defining the material's appearance. Any property of the material + * (including any property from inherited materials) can be passed + * in here. Color values can be passed any type of value accepted + * by {@link Color#set}. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isShaderMaterial: boolean; + type: string; + /** + * Defines custom constants using `#define` directives within the GLSL code + * for both the vertex shader and the fragment shader; each key/value pair + * yields another directive. + * ```js + * defines: { + * FOO: 15, + * BAR: true + * } + * ``` + * Yields the lines: + * ``` + * #define FOO 15 + * #define BAR true + * ``` + * + * @type {Object} + */ + defines: Object; + /** + * An object of the form: + * ```js + * { + * "uniform1": { value: 1.0 }, + * "uniform2": { value: 2 } + * } + * ``` + * specifying the uniforms to be passed to the shader code; keys are uniform + * names, values are definitions of the form + * ``` + * { + * value: 1.0 + * } + * ``` + * where `value` is the value of the uniform. Names must match the name of + * the uniform, as defined in the GLSL code. Note that uniforms are refreshed + * on every frame, so updating the value of the uniform will immediately + * update the value available to the GLSL code. + * + * @type {Object} + */ + uniforms: Object; + /** + * An array holding uniforms groups for configuring UBOs. + * + * @type {Array} + */ + uniformsGroups: Array; + /** + * Vertex shader GLSL code. This is the actual code for the shader. + * + * @type {string} + */ + vertexShader: string; + /** + * Fragment shader GLSL code. This is the actual code for the shader. + * + * @type {string} + */ + fragmentShader: string; + /** + * Controls line thickness or lines. + * + * WebGL and WebGPU ignore this setting and always render line primitives with a + * width of one pixel. + * + * @type {number} + * @default 1 + */ + linewidth: number; + /** + * Renders the geometry as a wireframe. + * + * @type {boolean} + * @default false + */ + wireframe: boolean; + /** + * Controls the thickness of the wireframe. + * + * WebGL and WebGPU ignore this property and always render + * 1 pixel wide lines. + * + * @type {number} + * @default 1 + */ + wireframeLinewidth: number; + /** + * Defines whether the material color is affected by global fog settings; `true` + * to pass fog uniforms to the shader. + * + * Setting this property to `true` requires the definition of fog uniforms. It is + * recommended to use `UniformsUtils.merge()` to combine the custom shader uniforms + * with predefined fog uniforms. + * + * ```js + * const material = new ShaderMaterial( { + * uniforms: UniformsUtils.merge( [ UniformsLib[ 'fog' ], shaderUniforms ] ); + * vertexShader: vertexShader, + * fragmentShader: fragmentShader, + * fog: true + * } ); + * ``` + * + * @type {boolean} + * @default false + */ + fog: boolean; + /** + * Defines whether this material uses lighting; `true` to pass uniform data + * related to lighting to this shader. + * + * @type {boolean} + * @default false + */ + lights: boolean; + /** + * Defines whether this material supports clipping; `true` to let the renderer + * pass the clippingPlanes uniform. + * + * @type {boolean} + * @default false + */ + clipping: boolean; + /** + * This object allows to enable certain WebGL 2 extensions. + * + * - clipCullDistance: set to `true` to use vertex shader clipping + * - multiDraw: set to `true` to use vertex shader multi_draw / enable gl_DrawID + * + * @type {{clipCullDistance:false,multiDraw:false}} + */ + extensions: { + clipCullDistance: false; + multiDraw: false; + }; + /** + * When the rendered geometry doesn't include these attributes but the + * material does, these default values will be passed to the shaders. This + * avoids errors when buffer data is missing. + * + * - color: [ 1, 1, 1 ] + * - uv: [ 0, 0 ] + * - uv1: [ 0, 0 ] + * + * @type {Object} + */ + defaultAttributeValues: Object; + /** + * If set, this calls [gl.bindAttribLocation](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bindAttribLocation) + * to bind a generic vertex index to an attribute variable. + * + * @type {string|undefined} + * @default undefined + */ + index0AttributeName: string | undefined; + /** + * Can be used to force a uniform update while changing uniforms in + * {@link Object3D#onBeforeRender}. + * + * @type {boolean} + * @default false + */ + uniformsNeedUpdate: boolean; + /** + * Defines the GLSL version of custom shader code. + * + * @type {?(GLSL1|GLSL3)} + * @default null + */ + glslVersion: (GLSL1 | GLSL3) | null; + copy(source: any): this; + toJSON(meta: any): Object; +} +import { Material } from './Material.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/ShadowMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/ShadowMaterial.d.ts new file mode 100644 index 000000000..2e66a5668 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/ShadowMaterial.d.ts @@ -0,0 +1,56 @@ +/** + * This material can receive shadows, but otherwise is completely transparent. + * + * ```js + * const geometry = new THREE.PlaneGeometry( 2000, 2000 ); + * geometry.rotateX( - Math.PI / 2 ); + * + * const material = new THREE.ShadowMaterial(); + * material.opacity = 0.2; + * + * const plane = new THREE.Mesh( geometry, material ); + * plane.position.y = -200; + * plane.receiveShadow = true; + * scene.add( plane ); + * ``` + * + * @augments Material + */ +export class ShadowMaterial extends Material { + /** + * Constructs a new shadow material. + * + * @param {Object} [parameters] - An object with one or more properties + * defining the material's appearance. Any property of the material + * (including any property from inherited materials) can be passed + * in here. Color values can be passed any type of value accepted + * by {@link Color#set}. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isShadowMaterial: boolean; + type: string; + /** + * Color of the material. + * + * @type {Color} + * @default (0,0,0) + */ + color: Color; + /** + * Whether the material is affected by fog or not. + * + * @type {boolean} + * @default true + */ + fog: boolean; + copy(source: any): this; +} +import { Material } from './Material.js'; +import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/SpriteMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/SpriteMaterial.d.ts new file mode 100644 index 000000000..e44d5d72d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/SpriteMaterial.d.ts @@ -0,0 +1,89 @@ +/** + * A material for rendering instances of {@link Sprite}. + * + * ```js + * const map = new THREE.TextureLoader().load( 'textures/sprite.png' ); + * const material = new THREE.SpriteMaterial( { map: map, color: 0xffffff } ); + * + * const sprite = new THREE.Sprite( material ); + * sprite.scale.set(200, 200, 1) + * scene.add( sprite ); + * ``` + * + * @augments Material + */ +export class SpriteMaterial extends Material { + /** + * Constructs a new sprite material. + * + * @param {Object} [parameters] - An object with one or more properties + * defining the material's appearance. Any property of the material + * (including any property from inherited materials) can be passed + * in here. Color values can be passed any type of value accepted + * by {@link Color#set}. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSpriteMaterial: boolean; + type: string; + /** + * Color of the material. + * + * @type {Color} + * @default (1,1,1) + */ + color: Color; + /** + * The color map. May optionally include an alpha channel, typically combined + * with {@link Material#transparent} or {@link Material#alphaTest}. The texture map + * color is modulated by the diffuse `color`. + * + * @type {?Texture} + * @default null + */ + map: Texture | null; + /** + * The alpha map is a grayscale texture that controls the opacity across the + * surface (black: fully transparent; white: fully opaque). + * + * Only the color of the texture is used, ignoring the alpha channel if one + * exists. For RGB and RGBA textures, the renderer will use the green channel + * when sampling this texture due to the extra bit of precision provided for + * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and + * luminance/alpha textures will also still work as expected. + * + * @type {?Texture} + * @default null + */ + alphaMap: Texture | null; + /** + * The rotation of the sprite in radians. + * + * @type {number} + * @default 0 + */ + rotation: number; + /** + * Specifies whether size of the sprite is attenuated by the camera depth (perspective camera only). + * + * @type {boolean} + * @default true + */ + sizeAttenuation: boolean; + /** + * Whether the material is affected by fog or not. + * + * @type {boolean} + * @default true + */ + fog: boolean; + copy(source: any): this; +} +import { Material } from './Material.js'; +import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/Line2NodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/Line2NodeMaterial.d.ts new file mode 100644 index 000000000..82f46fddc --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/nodes/Line2NodeMaterial.d.ts @@ -0,0 +1,93 @@ +export default Line2NodeMaterial; +/** + * This node material can be used to render lines with a size larger than one + * by representing them as instanced meshes. + * + * @augments NodeMaterial + */ +declare class Line2NodeMaterial extends NodeMaterial { + /** + * Constructs a new node material for wide line rendering. + * + * @param {Object} [parameters={}] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLine2NodeMaterial: boolean; + /** + * The dash offset. + * + * @type {number} + * @default 0 + */ + dashOffset: number; + /** + * Defines the lines color. + * + * @type {?Node} + * @default null + */ + lineColorNode: Node | null; + /** + * Defines the offset. + * + * @type {?Node} + * @default null + */ + offsetNode: Node | null; + /** + * Defines the dash scale. + * + * @type {?Node} + * @default null + */ + dashScaleNode: Node | null; + /** + * Defines the dash size. + * + * @type {?Node} + * @default null + */ + dashSizeNode: Node | null; + /** + * Defines the gap size. + * + * @type {?Node} + * @default null + */ + gapSizeNode: Node | null; + _useDash: any; + _useAlphaToCoverage: boolean; + _useWorldUnits: boolean; + set worldUnits(value: boolean); + /** + * Whether the lines should sized in world units or not. + * When set to `false` the unit is pixel. + * + * @type {boolean} + * @default false + */ + get worldUnits(): boolean; + set dashed(value: boolean); + /** + * Whether the lines should be dashed or not. + * + * @type {boolean} + * @default false + */ + get dashed(): boolean; + /** + * Copies the properties of the given material to this instance. + * + * @param {Line2NodeMaterial} source - The material to copy. + * @return {Line2NodeMaterial} A reference to this material. + */ + copy(source: Line2NodeMaterial): Line2NodeMaterial; +} +import NodeMaterial from './NodeMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/LineBasicNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/LineBasicNodeMaterial.d.ts new file mode 100644 index 000000000..da65dc888 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/nodes/LineBasicNodeMaterial.d.ts @@ -0,0 +1,23 @@ +export default LineBasicNodeMaterial; +/** + * Node material version of {@link LineBasicMaterial}. + * + * @augments NodeMaterial + */ +declare class LineBasicNodeMaterial extends NodeMaterial { + /** + * Constructs a new line basic node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLineBasicNodeMaterial: boolean; +} +import NodeMaterial from './NodeMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/LineDashedNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/LineDashedNodeMaterial.d.ts new file mode 100644 index 000000000..89820e463 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/nodes/LineDashedNodeMaterial.d.ts @@ -0,0 +1,78 @@ +export default LineDashedNodeMaterial; +/** + * Node material version of {@link LineDashedMaterial}. + * + * @augments NodeMaterial + */ +declare class LineDashedNodeMaterial extends NodeMaterial { + /** + * Constructs a new line dashed node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLineDashedNodeMaterial: boolean; + /** + * The dash offset. + * + * @type {number} + * @default 0 + */ + dashOffset: number; + /** + * The offset of dash materials is by default inferred from the `dashOffset` + * property. This node property allows to overwrite the default + * and define the offset with a node instead. + * + * If you don't want to overwrite the offset but modify the existing + * value instead, use {@link materialLineDashOffset}. + * + * @type {?Node} + * @default null + */ + offsetNode: Node | null; + /** + * The scale of dash materials is by default inferred from the `scale` + * property. This node property allows to overwrite the default + * and define the scale with a node instead. + * + * If you don't want to overwrite the scale but modify the existing + * value instead, use {@link materialLineScale}. + * + * @type {?Node} + * @default null + */ + dashScaleNode: Node | null; + /** + * The dash size of dash materials is by default inferred from the `dashSize` + * property. This node property allows to overwrite the default + * and define the dash size with a node instead. + * + * If you don't want to overwrite the dash size but modify the existing + * value instead, use {@link materialLineDashSize}. + * + * @type {?Node} + * @default null + */ + dashSizeNode: Node | null; + /** + * The gap size of dash materials is by default inferred from the `gapSize` + * property. This node property allows to overwrite the default + * and define the gap size with a node instead. + * + * If you don't want to overwrite the gap size but modify the existing + * value instead, use {@link materialLineGapSize}. + * + * @type {?Node} + * @default null + */ + gapSizeNode: Node | null; +} +import NodeMaterial from './NodeMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/MeshBasicNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/MeshBasicNodeMaterial.d.ts new file mode 100644 index 000000000..97d6b1cb4 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/nodes/MeshBasicNodeMaterial.d.ts @@ -0,0 +1,39 @@ +export default MeshBasicNodeMaterial; +/** + * Node material version of {@link MeshBasicMaterial}. + * + * @augments NodeMaterial + */ +declare class MeshBasicNodeMaterial extends NodeMaterial { + /** + * Constructs a new mesh basic node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshBasicNodeMaterial: boolean; + /** + * Overwritten since this type of material uses {@link BasicEnvironmentNode} + * to implement the default environment mapping. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {?BasicEnvironmentNode} The environment node. + */ + setupEnvironment(builder: NodeBuilder): BasicEnvironmentNode | null; + /** + * Setups the lighting model. + * + * @return {BasicLightingModel} The lighting model. + */ + setupLightingModel(): BasicLightingModel; +} +import NodeMaterial from './NodeMaterial.js'; +import BasicEnvironmentNode from '../../nodes/lighting/BasicEnvironmentNode.js'; +import BasicLightingModel from '../../nodes/functions/BasicLightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/MeshLambertNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/MeshLambertNodeMaterial.d.ts new file mode 100644 index 000000000..a5e110905 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/nodes/MeshLambertNodeMaterial.d.ts @@ -0,0 +1,39 @@ +export default MeshLambertNodeMaterial; +/** + * Node material version of {@link MeshLambertMaterial}. + * + * @augments NodeMaterial + */ +declare class MeshLambertNodeMaterial extends NodeMaterial { + /** + * Constructs a new mesh lambert node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshLambertNodeMaterial: boolean; + /** + * Overwritten since this type of material uses {@link BasicEnvironmentNode} + * to implement the default environment mapping. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {?BasicEnvironmentNode} The environment node. + */ + setupEnvironment(builder: NodeBuilder): BasicEnvironmentNode | null; + /** + * Setups the lighting model. + * + * @return {PhongLightingModel} The lighting model. + */ + setupLightingModel(): PhongLightingModel; +} +import NodeMaterial from './NodeMaterial.js'; +import BasicEnvironmentNode from '../../nodes/lighting/BasicEnvironmentNode.js'; +import PhongLightingModel from '../../nodes/functions/PhongLightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/MeshMatcapNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/MeshMatcapNodeMaterial.d.ts new file mode 100644 index 000000000..1a2d32c8c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/nodes/MeshMatcapNodeMaterial.d.ts @@ -0,0 +1,29 @@ +export default MeshMatcapNodeMaterial; +/** + * Node material version of {@link MeshMatcapMaterial}. + * + * @augments NodeMaterial + */ +declare class MeshMatcapNodeMaterial extends NodeMaterial { + /** + * Constructs a new mesh normal node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshMatcapNodeMaterial: boolean; + /** + * Setups the matcap specific node variables. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setupVariants(builder: NodeBuilder): void; +} +import NodeMaterial from './NodeMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/MeshNormalNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/MeshNormalNodeMaterial.d.ts new file mode 100644 index 000000000..effc5951b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/nodes/MeshNormalNodeMaterial.d.ts @@ -0,0 +1,28 @@ +export default MeshNormalNodeMaterial; +/** + * Node material version of {@link MeshNormalMaterial}. + * + * @augments NodeMaterial + */ +declare class MeshNormalNodeMaterial extends NodeMaterial { + /** + * Constructs a new mesh normal node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshNormalNodeMaterial: boolean; + /** + * Overwrites the default implementation by computing the diffuse color + * based on the normal data. + */ + setupDiffuseColor(): void; +} +import NodeMaterial from './NodeMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/MeshPhongNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/MeshPhongNodeMaterial.d.ts new file mode 100644 index 000000000..b55a9c942 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/nodes/MeshPhongNodeMaterial.d.ts @@ -0,0 +1,64 @@ +export default MeshPhongNodeMaterial; +/** + * Node material version of {@link MeshPhongMaterial}. + * + * @augments NodeMaterial + */ +declare class MeshPhongNodeMaterial extends NodeMaterial { + /** + * Constructs a new mesh lambert node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshPhongNodeMaterial: boolean; + /** + * The shininess of phong materials is by default inferred from the `shininess` + * property. This node property allows to overwrite the default + * and define the shininess with a node instead. + * + * If you don't want to overwrite the shininess but modify the existing + * value instead, use {@link materialShininess}. + * + * @type {?Node} + * @default null + */ + shininessNode: Node | null; + /** + * The specular color of phong materials is by default inferred from the + * `specular` property. This node property allows to overwrite the default + * and define the specular color with a node instead. + * + * If you don't want to overwrite the specular color but modify the existing + * value instead, use {@link materialSpecular}. + * + * @type {?Node} + * @default null + */ + specularNode: Node | null; + /** + * Overwritten since this type of material uses {@link BasicEnvironmentNode} + * to implement the default environment mapping. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {?BasicEnvironmentNode} The environment node. + */ + setupEnvironment(builder: NodeBuilder): BasicEnvironmentNode | null; + /** + * Setups the lighting model. + * + * @return {PhongLightingModel} The lighting model. + */ + setupLightingModel(): PhongLightingModel; + copy(source: any): NodeMaterial; +} +import NodeMaterial from './NodeMaterial.js'; +import BasicEnvironmentNode from '../../nodes/lighting/BasicEnvironmentNode.js'; +import PhongLightingModel from '../../nodes/functions/PhongLightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/MeshPhysicalNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/MeshPhysicalNodeMaterial.d.ts new file mode 100644 index 000000000..0545af43c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/nodes/MeshPhysicalNodeMaterial.d.ts @@ -0,0 +1,276 @@ +export default MeshPhysicalNodeMaterial; +/** + * Node material version of {@link MeshPhysicalMaterial}. + * + * @augments MeshStandardNodeMaterial + */ +declare class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshPhysicalNodeMaterial: boolean; + /** + * The clearcoat of physical materials is by default inferred from the `clearcoat` + * and `clearcoatMap` properties. This node property allows to overwrite the default + * and define the clearcoat with a node instead. + * + * If you don't want to overwrite the clearcoat but modify the existing + * value instead, use {@link materialClearcoat}. + * + * @type {?Node} + * @default null + */ + clearcoatNode: Node | null; + /** + * The clearcoat roughness of physical materials is by default inferred from the `clearcoatRoughness` + * and `clearcoatRoughnessMap` properties. This node property allows to overwrite the default + * and define the clearcoat roughness with a node instead. + * + * If you don't want to overwrite the clearcoat roughness but modify the existing + * value instead, use {@link materialClearcoatRoughness}. + * + * @type {?Node} + * @default null + */ + clearcoatRoughnessNode: Node | null; + /** + * The clearcoat normal of physical materials is by default inferred from the `clearcoatNormalMap` + * property. This node property allows to overwrite the default + * and define the clearcoat normal with a node instead. + * + * If you don't want to overwrite the clearcoat normal but modify the existing + * value instead, use {@link materialClearcoatNormal}. + * + * @type {?Node} + * @default null + */ + clearcoatNormalNode: Node | null; + /** + * The sheen of physical materials is by default inferred from the `sheen`, `sheenColor` + * and `sheenColorMap` properties. This node property allows to overwrite the default + * and define the sheen with a node instead. + * + * If you don't want to overwrite the sheen but modify the existing + * value instead, use {@link materialSheen}. + * + * @type {?Node} + * @default null + */ + sheenNode: Node | null; + /** + * The sheen roughness of physical materials is by default inferred from the `sheenRoughness` and + * `sheenRoughnessMap` properties. This node property allows to overwrite the default + * and define the sheen roughness with a node instead. + * + * If you don't want to overwrite the sheen roughness but modify the existing + * value instead, use {@link materialSheenRoughness}. + * + * @type {?Node} + * @default null + */ + sheenRoughnessNode: Node | null; + /** + * The iridescence of physical materials is by default inferred from the `iridescence` + * property. This node property allows to overwrite the default + * and define the iridescence with a node instead. + * + * If you don't want to overwrite the iridescence but modify the existing + * value instead, use {@link materialIridescence}. + * + * @type {?Node} + * @default null + */ + iridescenceNode: Node | null; + /** + * The iridescence IOR of physical materials is by default inferred from the `iridescenceIOR` + * property. This node property allows to overwrite the default + * and define the iridescence IOR with a node instead. + * + * If you don't want to overwrite the iridescence IOR but modify the existing + * value instead, use {@link materialIridescenceIOR}. + * + * @type {?Node} + * @default null + */ + iridescenceIORNode: Node | null; + /** + * The iridescence thickness of physical materials is by default inferred from the `iridescenceThicknessRange` + * and `iridescenceThicknessMap` properties. This node property allows to overwrite the default + * and define the iridescence thickness with a node instead. + * + * If you don't want to overwrite the iridescence thickness but modify the existing + * value instead, use {@link materialIridescenceThickness}. + * + * @type {?Node} + * @default null + */ + iridescenceThicknessNode: Node | null; + /** + * The specular intensity of physical materials is by default inferred from the `specularIntensity` + * and `specularIntensityMap` properties. This node property allows to overwrite the default + * and define the specular intensity with a node instead. + * + * If you don't want to overwrite the specular intensity but modify the existing + * value instead, use {@link materialSpecularIntensity}. + * + * @type {?Node} + * @default null + */ + specularIntensityNode: Node | null; + /** + * The specular color of physical materials is by default inferred from the `specularColor` + * and `specularColorMap` properties. This node property allows to overwrite the default + * and define the specular color with a node instead. + * + * If you don't want to overwrite the specular color but modify the existing + * value instead, use {@link materialSpecularColor}. + * + * @type {?Node} + * @default null + */ + specularColorNode: Node | null; + /** + * The ior of physical materials is by default inferred from the `ior` + * property. This node property allows to overwrite the default + * and define the ior with a node instead. + * + * If you don't want to overwrite the ior but modify the existing + * value instead, use {@link materialIOR}. + * + * @type {?Node} + * @default null + */ + iorNode: Node | null; + /** + * The transmission of physical materials is by default inferred from the `transmission` and + * `transmissionMap` properties. This node property allows to overwrite the default + * and define the transmission with a node instead. + * + * If you don't want to overwrite the transmission but modify the existing + * value instead, use {@link materialTransmission}. + * + * @type {?Node} + * @default null + */ + transmissionNode: Node | null; + /** + * The thickness of physical materials is by default inferred from the `thickness` and + * `thicknessMap` properties. This node property allows to overwrite the default + * and define the thickness with a node instead. + * + * If you don't want to overwrite the thickness but modify the existing + * value instead, use {@link materialThickness}. + * + * @type {?Node} + * @default null + */ + thicknessNode: Node | null; + /** + * The attenuation distance of physical materials is by default inferred from the + * `attenuationDistance` property. This node property allows to overwrite the default + * and define the attenuation distance with a node instead. + * + * If you don't want to overwrite the attenuation distance but modify the existing + * value instead, use {@link materialAttenuationDistance}. + * + * @type {?Node} + * @default null + */ + attenuationDistanceNode: Node | null; + /** + * The attenuation color of physical materials is by default inferred from the + * `attenuationColor` property. This node property allows to overwrite the default + * and define the attenuation color with a node instead. + * + * If you don't want to overwrite the attenuation color but modify the existing + * value instead, use {@link materialAttenuationColor}. + * + * @type {?Node} + * @default null + */ + attenuationColorNode: Node | null; + /** + * The dispersion of physical materials is by default inferred from the + * `dispersion` property. This node property allows to overwrite the default + * and define the dispersion with a node instead. + * + * If you don't want to overwrite the dispersion but modify the existing + * value instead, use {@link materialDispersion}. + * + * @type {?Node} + * @default null + */ + dispersionNode: Node | null; + /** + * The anisotropy of physical materials is by default inferred from the + * `anisotropy` property. This node property allows to overwrite the default + * and define the anisotropy with a node instead. + * + * If you don't want to overwrite the anisotropy but modify the existing + * value instead, use {@link materialAnisotropy}. + * + * @type {?Node} + * @default null + */ + anisotropyNode: Node | null; + /** + * Whether the lighting model should use clearcoat or not. + * + * @type {boolean} + * @default true + */ + get useClearcoat(): boolean; + /** + * Whether the lighting model should use iridescence or not. + * + * @type {boolean} + * @default true + */ + get useIridescence(): boolean; + /** + * Whether the lighting model should use sheen or not. + * + * @type {boolean} + * @default true + */ + get useSheen(): boolean; + /** + * Whether the lighting model should use anisotropy or not. + * + * @type {boolean} + * @default true + */ + get useAnisotropy(): boolean; + /** + * Whether the lighting model should use transmission or not. + * + * @type {boolean} + * @default true + */ + get useTransmission(): boolean; + /** + * Whether the lighting model should use dispersion or not. + * + * @type {boolean} + * @default true + */ + get useDispersion(): boolean; + /** + * Setups the physical specific node variables. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setupVariants(builder: NodeBuilder): void; + /** + * Setups the clearcoat normal node. + * + * @return {Node} The clearcoat normal. + */ + setupClearcoatNormal(): Node; + setup(builder: any): void; +} +import MeshStandardNodeMaterial from './MeshStandardNodeMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/MeshSSSNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/MeshSSSNodeMaterial.d.ts new file mode 100644 index 000000000..ca33d8128 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/nodes/MeshSSSNodeMaterial.d.ts @@ -0,0 +1,96 @@ +export default MeshSSSNodeMaterial; +/** + * This node material is an experimental extension of {@link MeshPhysicalNodeMaterial} + * that implements a Subsurface scattering (SSS) term. + * + * @augments MeshPhysicalNodeMaterial + */ +declare class MeshSSSNodeMaterial extends MeshPhysicalNodeMaterial { + /** + * Represents the thickness color. + * + * @type {?Node} + * @default null + */ + thicknessColorNode: Node | null; + /** + * Represents the distortion factor. + * + * @type {?Node} + */ + thicknessDistortionNode: Node | null; + /** + * Represents the thickness ambient factor. + * + * @type {?Node} + */ + thicknessAmbientNode: Node | null; + /** + * Represents the thickness attenuation. + * + * @type {?Node} + */ + thicknessAttenuationNode: Node | null; + /** + * Represents the thickness power. + * + * @type {?Node} + */ + thicknessPowerNode: Node | null; + /** + * Represents the thickness scale. + * + * @type {?Node} + */ + thicknessScaleNode: Node | null; + /** + * Whether the lighting model should use SSS or not. + * + * @type {boolean} + * @default true + */ + get useSSS(): boolean; + /** + * Setups the lighting model. + * + * @return {SSSLightingModel} The lighting model. + */ + setupLightingModel(): SSSLightingModel; +} +import MeshPhysicalNodeMaterial from './MeshPhysicalNodeMaterial.js'; +/** + * Represents the lighting model for {@link MeshSSSNodeMaterial}. + * + * @augments PhysicalLightingModel + */ +declare class SSSLightingModel extends PhysicalLightingModel { + /** + * Constructs a new physical lighting model. + * + * @param {boolean} [clearcoat=false] - Whether clearcoat is supported or not. + * @param {boolean} [sheen=false] - Whether sheen is supported or not. + * @param {boolean} [iridescence=false] - Whether iridescence is supported or not. + * @param {boolean} [anisotropy=false] - Whether anisotropy is supported or not. + * @param {boolean} [transmission=false] - Whether transmission is supported or not. + * @param {boolean} [dispersion=false] - Whether dispersion is supported or not. + * @param {boolean} [sss=false] - Whether SSS is supported or not. + */ + constructor(clearcoat?: boolean, sheen?: boolean, iridescence?: boolean, anisotropy?: boolean, transmission?: boolean, dispersion?: boolean, sss?: boolean); + /** + * Whether the lighting model should use SSS or not. + * + * @type {boolean} + * @default false + */ + useSSS: boolean; + /** + * Extends the default implementation with a SSS term. + * + * Reference: [Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look](https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/) + * + * @param {Object} input - The input data. + * @param {NodeBuilder} builder - The current node builder. + */ + direct({ lightDirection, lightColor, reflectedLight }: Object, builder: NodeBuilder): void; +} +import PhysicalLightingModel from '../../nodes/functions/PhysicalLightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/MeshStandardNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/MeshStandardNodeMaterial.d.ts new file mode 100644 index 000000000..2128d9631 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/nodes/MeshStandardNodeMaterial.d.ts @@ -0,0 +1,81 @@ +export default MeshStandardNodeMaterial; +/** + * Node material version of {@link MeshStandardMaterial}. + * + * @augments NodeMaterial + */ +declare class MeshStandardNodeMaterial extends NodeMaterial { + /** + * Constructs a new mesh standard node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshStandardNodeMaterial: boolean; + /** + * The emissive color of standard materials is by default inferred from the `emissive`, + * `emissiveIntensity` and `emissiveMap` properties. This node property allows to + * overwrite the default and define the emissive color with a node instead. + * + * If you don't want to overwrite the emissive color but modify the existing + * value instead, use {@link materialEmissive}. + * + * @type {?Node} + * @default null + */ + emissiveNode: Node | null; + /** + * The metalness of standard materials is by default inferred from the `metalness`, + * and `metalnessMap` properties. This node property allows to + * overwrite the default and define the metalness with a node instead. + * + * If you don't want to overwrite the metalness but modify the existing + * value instead, use {@link materialMetalness}. + * + * @type {?Node} + * @default null + */ + metalnessNode: Node | null; + /** + * The roughness of standard materials is by default inferred from the `roughness`, + * and `roughnessMap` properties. This node property allows to + * overwrite the default and define the roughness with a node instead. + * + * If you don't want to overwrite the roughness but modify the existing + * value instead, use {@link materialRoughness}. + * + * @type {?Node} + * @default null + */ + roughnessNode: Node | null; + /** + * Overwritten since this type of material uses {@link EnvironmentNode} + * to implement the PBR (PMREM based) environment mapping. Besides, the + * method honors `Scene.environment`. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {?EnvironmentNode} The environment node. + */ + setupEnvironment(builder: NodeBuilder): EnvironmentNode | null; + /** + * Setups the lighting model. + * + * @return {PhysicalLightingModel} The lighting model. + */ + setupLightingModel(): PhysicalLightingModel; + /** + * Setups the specular related node variables. + */ + setupSpecular(): void; + copy(source: any): NodeMaterial; +} +import NodeMaterial from './NodeMaterial.js'; +import EnvironmentNode from '../../nodes/lighting/EnvironmentNode.js'; +import PhysicalLightingModel from '../../nodes/functions/PhysicalLightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/MeshToonNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/MeshToonNodeMaterial.d.ts new file mode 100644 index 000000000..1ffe1bd1b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/nodes/MeshToonNodeMaterial.d.ts @@ -0,0 +1,30 @@ +export default MeshToonNodeMaterial; +/** + * Node material version of {@link MeshToonMaterial}. + * + * @augments NodeMaterial + */ +declare class MeshToonNodeMaterial extends NodeMaterial { + /** + * Constructs a new mesh toon node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMeshToonNodeMaterial: boolean; + /** + * Setups the lighting model. + * + * @return {ToonLightingModel} The lighting model. + */ + setupLightingModel(): ToonLightingModel; +} +import NodeMaterial from './NodeMaterial.js'; +import ToonLightingModel from '../../nodes/functions/ToonLightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/NodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/NodeMaterial.d.ts new file mode 100644 index 000000000..3c8a1d19f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/nodes/NodeMaterial.d.ts @@ -0,0 +1,505 @@ +export default NodeMaterial; +/** + * Base class for all node materials. + * + * @augments Material + */ +declare class NodeMaterial extends Material { + static get type(): string; + set type(_value: string); + /** + * Represents the type of the node material. + * + * @type {string} + */ + get type(): string; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isNodeMaterial: boolean; + /** + * Whether this material is affected by fog or not. + * + * @type {boolean} + * @default true + */ + fog: boolean; + /** + * Whether this material is affected by lights or not. + * + * @type {boolean} + * @default false + */ + lights: boolean; + /** + * Whether this material uses hardware clipping or not. + * This property is managed by the engine and should not be + * modified by apps. + * + * @type {boolean} + * @default false + */ + hardwareClipping: boolean; + /** + * Node materials which set their `lights` property to `true` + * are affected by all lights of the scene. Sometimes selective + * lighting is wanted which means only _some_ lights in the scene + * affect a material. This can be achieved by creating an instance + * of {@link LightsNode} with a list of selective + * lights and assign the node to this property. + * + * ```js + * const customLightsNode = lights( [ light1, light2 ] ); + * material.lightsNode = customLightsNode; + * ``` + * + * @type {?LightsNode} + * @default null + */ + lightsNode: LightsNode | null; + /** + * The environment of node materials can be defined by an environment + * map assigned to the `envMap` property or by `Scene.environment` + * if the node material is a PBR material. This node property allows to overwrite + * the default behavior and define the environment with a custom node. + * + * ```js + * material.envNode = pmremTexture( renderTarget.texture ); + * ``` + * + * @type {?Node} + * @default null + */ + envNode: Node | null; + /** + * The lighting of node materials might be influenced by ambient occlusion. + * The default AO is inferred from an ambient occlusion map assigned to `aoMap` + * and the respective `aoMapIntensity`. This node property allows to overwrite + * the default and define the ambient occlusion with a custom node instead. + * + * If you don't want to overwrite the diffuse color but modify the existing + * values instead, use {@link materialAO}. + * + * @type {?Node} + * @default null + */ + aoNode: Node | null; + /** + * The diffuse color of node materials is by default inferred from the + * `color` and `map` properties. This node property allows to overwrite the default + * and define the diffuse color with a node instead. + * + * ```js + * material.colorNode = color( 0xff0000 ); // define red color + * ``` + * + * If you don't want to overwrite the diffuse color but modify the existing + * values instead, use {@link materialColor}. + * + * ```js + * material.colorNode = materialColor.mul( color( 0xff0000 ) ); // give diffuse colors a red tint + * ``` + * + * @type {?Node} + * @default null + */ + colorNode: Node | null; + /** + * The normals of node materials are by default inferred from the `normalMap`/`normalScale` + * or `bumpMap`/`bumpScale` properties. This node property allows to overwrite the default + * and define the normals with a node instead. + * + * If you don't want to overwrite the normals but modify the existing values instead, + * use {@link materialNormal}. + * + * @type {?Node} + * @default null + */ + normalNode: Node | null; + /** + * The opacity of node materials is by default inferred from the `opacity` + * and `alphaMap` properties. This node property allows to overwrite the default + * and define the opacity with a node instead. + * + * If you don't want to overwrite the opacity but modify the existing + * value instead, use {@link materialOpacity}. + * + * @type {?Node} + * @default null + */ + opacityNode: Node | null; + /** + * This node can be used to implement a variety of filter-like effects. The idea is + * to store the current rendering into a texture e.g. via `viewportSharedTexture()`, use it + * to create an arbitrary effect and then assign the node composition to this property. + * Everything behind the object using this material will now be affected by a filter. + * + * ```js + * const material = new NodeMaterial() + * material.transparent = true; + * + * // everything behind the object will be monochromatic + * material.backdropNode = saturation( viewportSharedTexture().rgb, 0 ); + * ``` + * + * Backdrop computations are part of the lighting so only lit materials can use this property. + * + * @type {?Node} + * @default null + */ + backdropNode: Node | null; + /** + * This node allows to modulate the influence of `backdropNode` to the outgoing light. + * + * @type {?Node} + * @default null + */ + backdropAlphaNode: Node | null; + /** + * The alpha test of node materials is by default inferred from the `alphaTest` + * property. This node property allows to overwrite the default and define the + * alpha test with a node instead. + * + * If you don't want to overwrite the alpha test but modify the existing + * value instead, use {@link materialAlphaTest}. + * + * @type {?Node} + * @default null + */ + alphaTestNode: Node | null; + /** + * Discards the fragment if the mask value is `false`. + * + * @type {?Node} + * @default null + */ + maskNode: Node | null; + /** + * This node can be used to implement a shadow mask for the material. + * + * @type {?Node} + * @default null + */ + maskShadowNode: Node | null; + /** + * The local vertex positions are computed based on multiple factors like the + * attribute data, morphing or skinning. This node property allows to overwrite + * the default and define local vertex positions with nodes instead. + * + * If you don't want to overwrite the vertex positions but modify the existing + * values instead, use {@link positionLocal}. + * + *```js + * material.positionNode = positionLocal.add( displace ); + * ``` + * + * @type {?Node} + * @default null + */ + positionNode: Node | null; + /** + * This node property is intended for logic which modifies geometry data once or per animation step. + * Apps usually place such logic randomly in initialization routines or in the animation loop. + * `geometryNode` is intended as a dedicated API so there is an intended spot where geometry modifications + * can be implemented. + * + * The idea is to assign a `Fn` definition that holds the geometry modification logic. A typical example + * would be a GPU based particle system that provides a node material for usage on app level. The particle + * simulation would be implemented as compute shaders and managed inside a `Fn` function. This function is + * eventually assigned to `geometryNode`. + * + * @type {?Function} + * @default null + */ + geometryNode: Function | null; + /** + * Allows to overwrite depth values in the fragment shader. + * + * @type {?Node} + * @default null + */ + depthNode: Node | null; + /** + * Allows to overwrite the position used for shadow map rendering which + * is by default {@link positionWorld}, the vertex position + * in world space. + * + * @type {?Node} + * @default null + */ + receivedShadowPositionNode: Node | null; + /** + * Allows to overwrite the geometry position used for shadow map projection which + * is by default {@link positionLocal}, the vertex position in local space. + * + * @type {?Node} + * @default null + */ + castShadowPositionNode: Node | null; + /** + * This node can be used to influence how an object using this node material + * receive shadows. + * + * ```js + * const totalShadows = float( 1 ).toVar(); + * material.receivedShadowNode = Fn( ( [ shadow ] ) => { + * totalShadows.mulAssign( shadow ); + * //return float( 1 ); // bypass received shadows + * return shadow.mix( color( 0xff0000 ), 1 ); // modify shadow color + * } ); + * + * @type {?(Function|FunctionNode)} + * @default null + */ + receivedShadowNode: (Function | FunctionNode) | null; + /** + * This node can be used to influence how an object using this node material + * casts shadows. To apply a color to shadows, you can simply do: + * + * ```js + * material.castShadowNode = vec4( 1, 0, 0, 1 ); + * ``` + * + * Which can be nice to fake colored shadows of semi-transparent objects. It + * is also common to use the property with `Fn` function so checks are performed + * per fragment. + * + * ```js + * materialCustomShadow.castShadowNode = Fn( () => { + * hash( vertexIndex ).greaterThan( 0.5 ).discard(); + * return materialColor; + * } )(); + * ``` + * + * @type {?Node} + * @default null + */ + castShadowNode: Node | null; + /** + * This node can be used to define the final output of the material. + * + * TODO: Explain the differences to `fragmentNode`. + * + * @type {?Node} + * @default null + */ + outputNode: Node | null; + /** + * MRT configuration is done on renderer or pass level. This node allows to + * overwrite what values are written into MRT targets on material level. This + * can be useful for implementing selective FX features that should only affect + * specific objects. + * + * @type {?MRTNode} + * @default null + */ + mrtNode: MRTNode | null; + /** + * This node property can be used if you need complete freedom in implementing + * the fragment shader. Assigning a node will replace the built-in material + * logic used in the fragment stage. + * + * @type {?Node} + * @default null + */ + fragmentNode: Node | null; + /** + * This node property can be used if you need complete freedom in implementing + * the vertex shader. Assigning a node will replace the built-in material logic + * used in the vertex stage. + * + * @type {?Node} + * @default null + */ + vertexNode: Node | null; + /** + * This node can be used as a global context management component for this material. + * + * @type {?ContextNode} + * @default null + */ + contextNode: ContextNode | null; + /** + * Returns an array of child nodes for this material. + * + * @private + * @returns {Array<{property: string, childNode: Node}>} + */ + private _getNodeChildren; + /** + * Builds this material with the given node builder. + * + * @param {NodeBuilder} builder - The current node builder. + */ + build(builder: NodeBuilder): void; + /** + * Setups a node material observer with the given builder. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {NodeMaterialObserver} The node material observer. + */ + setupObserver(builder: NodeBuilder): NodeMaterialObserver; + /** + * Setups the vertex and fragment stage of this node material. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setup(builder: NodeBuilder): void; + /** + * Setups the clipping node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {ClippingNode} The clipping node. + */ + setupClipping(builder: NodeBuilder): ClippingNode; + /** + * Setups the hardware clipping if available on the current device. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setupHardwareClipping(builder: NodeBuilder): void; + /** + * Setups the depth of this material. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setupDepth(builder: NodeBuilder): void; + /** + * Setups the position node in view space. This method exists + * so derived node materials can modify the implementation e.g. sprite materials. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The position in view space. + */ + setupPositionView(): Node; + /** + * Setups the position in clip space. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The position in view space. + */ + setupModelViewProjection(): Node; + /** + * Setups the logic for the vertex stage. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The position in clip space. + */ + setupVertex(builder: NodeBuilder): Node; + /** + * Setups the computation of the position in local space. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The position in local space. + */ + setupPosition(builder: NodeBuilder): Node; + /** + * Setups the computation of the material's diffuse color. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {BufferGeometry} geometry - The geometry. + */ + setupDiffuseColor(builder: NodeBuilder): void; + /** + * Abstract interface method that can be implemented by derived materials + * to setup material-specific node variables. + * + * @abstract + * @param {NodeBuilder} builder - The current node builder. + */ + setupVariants(): void; + /** + * Setups the outgoing light node variable + * + * @return {Node} The outgoing light node. + */ + setupOutgoingLight(): Node; + /** + * Setups the normal node from the material. + * + * @return {Node} The normal node. + */ + setupNormal(): Node; + /** + * Setups the environment node from the material. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The environment node. + */ + setupEnvironment(): Node; + /** + * Setups the light map node from the material. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The light map node. + */ + setupLightMap(builder: NodeBuilder): Node; + /** + * Setups the lights node based on the scene, environment and material. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {LightsNode} The lights node. + */ + setupLights(builder: NodeBuilder): LightsNode; + /** + * This method should be implemented by most derived materials + * since it defines the material's lighting model. + * + * @abstract + * @param {NodeBuilder} builder - The current node builder. + * @return {LightingModel} The lighting model. + */ + setupLightingModel(): LightingModel; + /** + * Setups the outgoing light node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The outgoing light node. + */ + setupLighting(builder: NodeBuilder): Node; + /** + * Setup the fog. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {Node} outputNode - The existing output node. + * @return {Node} The output node. + */ + setupFog(builder: NodeBuilder, outputNode: Node): Node; + /** + * Setups premultiplied alpha. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {Node} outputNode - The existing output node. + * @return {Node} The output node. + */ + setupPremultipliedAlpha(builder: NodeBuilder, outputNode: Node): Node; + /** + * Setups the output node. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {Node} outputNode - The existing output node. + * @return {Node} The output node. + */ + setupOutput(builder: NodeBuilder, outputNode: Node): Node; + /** + * Most classic material types have a node pendant e.g. for `MeshBasicMaterial` + * there is `MeshBasicNodeMaterial`. This utility method is intended for + * defining all material properties of the classic type in the node type. + * + * @param {Material} material - The material to copy properties with their values to this node material. + */ + setDefaultValues(material: Material): void; + /** + * Copies the properties of the given node material to this instance. + * + * @param {NodeMaterial} source - The material to copy. + * @return {NodeMaterial} A reference to this node material. + */ + copy(source: NodeMaterial): NodeMaterial; +} +import { Material } from '../Material.js'; +import NodeMaterialObserver from './manager/NodeMaterialObserver.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/NodeMaterials.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/NodeMaterials.d.ts new file mode 100644 index 000000000..3ab3141d1 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/nodes/NodeMaterials.d.ts @@ -0,0 +1,18 @@ +export { default as NodeMaterialObserver } from "./manager/NodeMaterialObserver.js"; +export { default as NodeMaterial } from "./NodeMaterial.js"; +export { default as LineBasicNodeMaterial } from "./LineBasicNodeMaterial.js"; +export { default as LineDashedNodeMaterial } from "./LineDashedNodeMaterial.js"; +export { default as Line2NodeMaterial } from "./Line2NodeMaterial.js"; +export { default as MeshNormalNodeMaterial } from "./MeshNormalNodeMaterial.js"; +export { default as MeshBasicNodeMaterial } from "./MeshBasicNodeMaterial.js"; +export { default as MeshLambertNodeMaterial } from "./MeshLambertNodeMaterial.js"; +export { default as MeshPhongNodeMaterial } from "./MeshPhongNodeMaterial.js"; +export { default as MeshStandardNodeMaterial } from "./MeshStandardNodeMaterial.js"; +export { default as MeshPhysicalNodeMaterial } from "./MeshPhysicalNodeMaterial.js"; +export { default as MeshSSSNodeMaterial } from "./MeshSSSNodeMaterial.js"; +export { default as MeshToonNodeMaterial } from "./MeshToonNodeMaterial.js"; +export { default as MeshMatcapNodeMaterial } from "./MeshMatcapNodeMaterial.js"; +export { default as PointsNodeMaterial } from "./PointsNodeMaterial.js"; +export { default as SpriteNodeMaterial } from "./SpriteNodeMaterial.js"; +export { default as ShadowNodeMaterial } from "./ShadowNodeMaterial.js"; +export { default as VolumeNodeMaterial } from "./VolumeNodeMaterial.js"; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/PointsNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/PointsNodeMaterial.d.ts new file mode 100644 index 000000000..1a6e48eef --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/nodes/PointsNodeMaterial.d.ts @@ -0,0 +1,49 @@ +export default PointsNodeMaterial; +/** + * Node material version of {@link PointsMaterial}. + * + * This material can be used in two ways: + * + * - By rendering point primitives with {@link Points}. Since WebGPU only supports point primitives + * with a pixel size of `1`, it's not possible to define a size. + * + * ```js + * const pointCloud = new THREE.Points( geometry, new THREE.PointsNodeMaterial() ); + * ``` + * + * - By rendering point primitives with {@link Sprites}. In this case, size is honored, + * see {@link PointsNodeMaterial#sizeNode}. + * + * ```js + * const instancedPoints = new THREE.Sprite( new THREE.PointsNodeMaterial( { positionNode: instancedBufferAttribute( positionAttribute ) } ) ); + * ``` + * + * @augments SpriteNodeMaterial + */ +declare class PointsNodeMaterial extends SpriteNodeMaterial { + /** + * This node property provides an additional way to set the point size. + * + * Note that WebGPU only supports point primitives with 1 pixel size. Consequently, + * this node has no effect when the material is used with {@link Points} and a WebGPU + * backend. If an application wants to render points with a size larger than 1 pixel, + * the material should be used with {@link Sprite} and instancing. + * + * @type {?Node} + * @default null + */ + sizeNode: Node | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isPointsNodeMaterial: boolean; + setupPositionView(): any; + setupVertexSprite(builder: any): any; + setupVertex(builder: any): any; + _useAlphaToCoverage: any; +} +import SpriteNodeMaterial from './SpriteNodeMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/ShadowNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/ShadowNodeMaterial.d.ts new file mode 100644 index 000000000..edf904684 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/nodes/ShadowNodeMaterial.d.ts @@ -0,0 +1,30 @@ +export default ShadowNodeMaterial; +/** + * Node material version of {@link ShadowMaterial}. + * + * @augments NodeMaterial + */ +declare class ShadowNodeMaterial extends NodeMaterial { + /** + * Constructs a new shadow node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isShadowNodeMaterial: boolean; + /** + * Setups the lighting model. + * + * @return {ShadowMaskModel} The lighting model. + */ + setupLightingModel(): ShadowMaskModel; +} +import NodeMaterial from './NodeMaterial.js'; +import ShadowMaskModel from '../../nodes/functions/ShadowMaskModel.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/SpriteNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/SpriteNodeMaterial.d.ts new file mode 100644 index 000000000..7f8da84d3 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/nodes/SpriteNodeMaterial.d.ts @@ -0,0 +1,62 @@ +export default SpriteNodeMaterial; +/** + * Node material version of {@link SpriteMaterial}. + * + * @augments NodeMaterial + */ +declare class SpriteNodeMaterial extends NodeMaterial { + /** + * Constructs a new sprite node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSpriteNodeMaterial: boolean; + _useSizeAttenuation: boolean; + /** + * The rotation of sprite materials is by default inferred from the `rotation`, + * property. This node property allows to overwrite the default and define + * the rotation with a node instead. + * + * If you don't want to overwrite the rotation but modify the existing + * value instead, use {@link materialRotation}. + * + * @type {?Node} + * @default null + */ + rotationNode: Node | null; + /** + * This node property provides an additional way to scale sprites next to + * `Object3D.scale`. The scale transformation based in `Object3D.scale` + * is multiplied with the scale value of this node in the vertex shader. + * + * @type {?Node} + * @default null + */ + scaleNode: Node | null; + /** + * Setups the position node in view space. This method implements + * the sprite specific vertex shader. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The position in view space. + */ + setupPositionView(builder: NodeBuilder): Node; + copy(source: any): NodeMaterial; + set sizeAttenuation(value: boolean); + /** + * Whether to use size attenuation or not. + * + * @type {boolean} + * @default true + */ + get sizeAttenuation(): boolean; +} +import NodeMaterial from './NodeMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/VolumeNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/VolumeNodeMaterial.d.ts new file mode 100644 index 000000000..8b5885c3c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/nodes/VolumeNodeMaterial.d.ts @@ -0,0 +1,48 @@ +export default VolumeNodeMaterial; +/** + * Volume node material. + * + * @augments NodeMaterial + */ +declare class VolumeNodeMaterial extends NodeMaterial { + /** + * Constructs a new volume node material. + * + * @param {Object} [parameters] - The configuration parameter. + */ + constructor(parameters?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isVolumeNodeMaterial: boolean; + /** + * Number of steps used for raymarching. + * + * @type {number} + * @default 25 + */ + steps: number; + /** + * Offsets the distance a ray has been traveled through a volume. + * Can be used to implement dithering to reduce banding. + * + * @type {Node} + * @default null + */ + offsetNode: Node; + /** + * Node used for scattering calculations. + * + * @type {Function|FunctionNode} + * @default null + */ + scatteringNode: Function | FunctionNode; + side: number; + setupLightingModel(): VolumetricLightingModel; +} +import NodeMaterial from './NodeMaterial.js'; +import VolumetricLightingModel from '../../nodes/functions/VolumetricLightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/manager/NodeMaterialObserver.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/manager/NodeMaterialObserver.d.ts new file mode 100644 index 000000000..4d9e0160a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/materials/nodes/manager/NodeMaterialObserver.d.ts @@ -0,0 +1,131 @@ +export default NodeMaterialObserver; +/** + * This class is used by {@link WebGPURenderer} as management component. + * It's primary purpose is to determine whether render objects require a + * refresh right before they are going to be rendered or not. + */ +declare class NodeMaterialObserver { + /** + * Constructs a new node material observer. + * + * @param {NodeBuilder} builder - The node builder. + */ + constructor(builder: NodeBuilder); + /** + * A node material can be used by more than one render object so the + * monitor must maintain a list of render objects. + * + * @type {WeakMap} + */ + renderObjects: WeakMap; + /** + * Whether the material uses node objects or not. + * + * @type {boolean} + */ + hasNode: boolean; + /** + * Whether the node builder's 3D object is animated or not. + * + * @type {boolean} + */ + hasAnimation: boolean; + /** + * A list of all possible material uniforms + * + * @type {Array} + */ + refreshUniforms: Array; + /** + * Holds the current render ID from the node frame. + * + * @type {number} + * @default 0 + */ + renderId: number; + /** + * Returns `true` if the given render object is verified for the first time of this observer. + * + * @param {RenderObject} renderObject - The render object. + * @return {boolean} Whether the given render object is verified for the first time of this observer. + */ + firstInitialization(renderObject: RenderObject): boolean; + /** + * Returns `true` if the current rendering produces motion vectors. + * + * @param {Renderer} renderer - The renderer. + * @return {boolean} Whether the current rendering produces motion vectors or not. + */ + needsVelocity(renderer: Renderer): boolean; + /** + * Returns monitoring data for the given render object. + * + * @param {RenderObject} renderObject - The render object. + * @return {Object} The monitoring data. + */ + getRenderObjectData(renderObject: RenderObject): Object; + /** + * Returns an attribute data structure holding the attributes versions for + * monitoring. + * + * @param {Object} attributes - The geometry attributes. + * @return {Object} An object for monitoring the versions of attributes. + */ + getAttributesData(attributes: Object): Object; + /** + * Returns `true` if the node builder's material uses + * node properties. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {boolean} Whether the node builder's material uses node properties or not. + */ + containsNode(builder: NodeBuilder): boolean; + /** + * Returns a geometry data structure holding the geometry property values for + * monitoring. + * + * @param {BufferGeometry} geometry - The geometry. + * @return {Object} An object for monitoring geometry properties. + */ + getGeometryData(geometry: BufferGeometry): Object; + /** + * Returns a material data structure holding the material property values for + * monitoring. + * + * @param {Material} material - The material. + * @return {Object} An object for monitoring material properties. + */ + getMaterialData(material: Material): Object; + /** + * Returns `true` if the given render object has not changed its state. + * + * @param {RenderObject} renderObject - The render object. + * @param {Array} lightsData - The current material lights. + * @param {number} renderId - The current render ID. + * @return {boolean} Whether the given render object has changed its state or not. + */ + equals(renderObject: RenderObject, lightsData: Array, renderId: number): boolean; + /** + * Returns the lights data for the given material lights. + * + * @param {Array} materialLights - The material lights. + * @return {Array} The lights data for the given material lights. + */ + getLightsData(materialLights: Array, lights: any): Array; + /** + * Returns the lights for the given lights node and render ID. + * + * @param {LightsNode} lightsNode - The lights node. + * @param {number} renderId - The render ID. + * @return {Array} The lights for the given lights node and render ID. + */ + getLights(lightsNode: LightsNode, renderId: number): Array; + /** + * Checks if the given render object requires a refresh. + * + * @param {RenderObject} renderObject - The render object. + * @param {NodeFrame} nodeFrame - The current node frame. + * @return {boolean} Whether the given render object requires a refresh or not. + */ + needsRefresh(renderObject: RenderObject, nodeFrame: NodeFrame): boolean; +} diff --git a/jsdoc-testing/jsdoc/src/math/Box2.d.ts b/jsdoc-testing/jsdoc/src/math/Box2.d.ts new file mode 100644 index 000000000..cc99e0f2f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/Box2.d.ts @@ -0,0 +1,205 @@ +/** + * Represents an axis-aligned bounding box (AABB) in 2D space. + */ +export class Box2 { + /** + * Constructs a new bounding box. + * + * @param {Vector2} [min=(Infinity,Infinity)] - A vector representing the lower boundary of the box. + * @param {Vector2} [max=(-Infinity,-Infinity)] - A vector representing the upper boundary of the box. + */ + constructor(min?: Vector2, max?: Vector2); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBox2: boolean; + /** + * The lower boundary of the box. + * + * @type {Vector2} + */ + min: Vector2; + /** + * The upper boundary of the box. + * + * @type {Vector2} + */ + max: Vector2; + /** + * Sets the lower and upper boundaries of this box. + * Please note that this method only copies the values from the given objects. + * + * @param {Vector2} min - The lower boundary of the box. + * @param {Vector2} max - The upper boundary of the box. + * @return {Box2} A reference to this bounding box. + */ + set(min: Vector2, max: Vector2): Box2; + /** + * Sets the upper and lower bounds of this box so it encloses the position data + * in the given array. + * + * @param {Array} points - An array holding 2D position data as instances of {@link Vector2}. + * @return {Box2} A reference to this bounding box. + */ + setFromPoints(points: Array): Box2; + /** + * Centers this box on the given center vector and sets this box's width, height and + * depth to the given size values. + * + * @param {Vector2} center - The center of the box. + * @param {Vector2} size - The x and y dimensions of the box. + * @return {Box2} A reference to this bounding box. + */ + setFromCenterAndSize(center: Vector2, size: Vector2): Box2; + /** + * Returns a new box with copied values from this instance. + * + * @return {Box2} A clone of this instance. + */ + clone(): Box2; + /** + * Copies the values of the given box to this instance. + * + * @param {Box2} box - The box to copy. + * @return {Box2} A reference to this bounding box. + */ + copy(box: Box2): Box2; + /** + * Makes this box empty which means in encloses a zero space in 2D. + * + * @return {Box2} A reference to this bounding box. + */ + makeEmpty(): Box2; + /** + * Returns true if this box includes zero points within its bounds. + * Note that a box with equal lower and upper bounds still includes one + * point, the one both bounds share. + * + * @return {boolean} Whether this box is empty or not. + */ + isEmpty(): boolean; + /** + * Returns the center point of this box. + * + * @param {Vector2} target - The target vector that is used to store the method's result. + * @return {Vector2} The center point. + */ + getCenter(target: Vector2): Vector2; + /** + * Returns the dimensions of this box. + * + * @param {Vector2} target - The target vector that is used to store the method's result. + * @return {Vector2} The size. + */ + getSize(target: Vector2): Vector2; + /** + * Expands the boundaries of this box to include the given point. + * + * @param {Vector2} point - The point that should be included by the bounding box. + * @return {Box2} A reference to this bounding box. + */ + expandByPoint(point: Vector2): Box2; + /** + * Expands this box equilaterally by the given vector. The width of this + * box will be expanded by the x component of the vector in both + * directions. The height of this box will be expanded by the y component of + * the vector in both directions. + * + * @param {Vector2} vector - The vector that should expand the bounding box. + * @return {Box2} A reference to this bounding box. + */ + expandByVector(vector: Vector2): Box2; + /** + * Expands each dimension of the box by the given scalar. If negative, the + * dimensions of the box will be contracted. + * + * @param {number} scalar - The scalar value that should expand the bounding box. + * @return {Box2} A reference to this bounding box. + */ + expandByScalar(scalar: number): Box2; + /** + * Returns `true` if the given point lies within or on the boundaries of this box. + * + * @param {Vector2} point - The point to test. + * @return {boolean} Whether the bounding box contains the given point or not. + */ + containsPoint(point: Vector2): boolean; + /** + * Returns `true` if this bounding box includes the entirety of the given bounding box. + * If this box and the given one are identical, this function also returns `true`. + * + * @param {Box2} box - The bounding box to test. + * @return {boolean} Whether the bounding box contains the given bounding box or not. + */ + containsBox(box: Box2): boolean; + /** + * Returns a point as a proportion of this box's width and height. + * + * @param {Vector2} point - A point in 2D space. + * @param {Vector2} target - The target vector that is used to store the method's result. + * @return {Vector2} A point as a proportion of this box's width and height. + */ + getParameter(point: Vector2, target: Vector2): Vector2; + /** + * Returns `true` if the given bounding box intersects with this bounding box. + * + * @param {Box2} box - The bounding box to test. + * @return {boolean} Whether the given bounding box intersects with this bounding box. + */ + intersectsBox(box: Box2): boolean; + /** + * Clamps the given point within the bounds of this box. + * + * @param {Vector2} point - The point to clamp. + * @param {Vector2} target - The target vector that is used to store the method's result. + * @return {Vector2} The clamped point. + */ + clampPoint(point: Vector2, target: Vector2): Vector2; + /** + * Returns the euclidean distance from any edge of this box to the specified point. If + * the given point lies inside of this box, the distance will be `0`. + * + * @param {Vector2} point - The point to compute the distance to. + * @return {number} The euclidean distance. + */ + distanceToPoint(point: Vector2): number; + /** + * Computes the intersection of this bounding box and the given one, setting the upper + * bound of this box to the lesser of the two boxes' upper bounds and the + * lower bound of this box to the greater of the two boxes' lower bounds. If + * there's no overlap, makes this box empty. + * + * @param {Box2} box - The bounding box to intersect with. + * @return {Box2} A reference to this bounding box. + */ + intersect(box: Box2): Box2; + /** + * Computes the union of this box and another and the given one, setting the upper + * bound of this box to the greater of the two boxes' upper bounds and the + * lower bound of this box to the lesser of the two boxes' lower bounds. + * + * @param {Box2} box - The bounding box that will be unioned with this instance. + * @return {Box2} A reference to this bounding box. + */ + union(box: Box2): Box2; + /** + * Adds the given offset to both the upper and lower bounds of this bounding box, + * effectively moving it in 2D space. + * + * @param {Vector2} offset - The offset that should be used to translate the bounding box. + * @return {Box2} A reference to this bounding box. + */ + translate(offset: Vector2): Box2; + /** + * Returns `true` if this bounding box is equal with the given one. + * + * @param {Box2} box - The box to test for equality. + * @return {boolean} Whether this bounding box is equal with the given one. + */ + equals(box: Box2): boolean; +} +import { Vector2 } from './Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Box3.d.ts b/jsdoc-testing/jsdoc/src/math/Box3.d.ts new file mode 100644 index 000000000..b1c152106 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/Box3.d.ts @@ -0,0 +1,298 @@ +/** + * Represents an axis-aligned bounding box (AABB) in 3D space. + */ +export class Box3 { + /** + * Constructs a new bounding box. + * + * @param {Vector3} [min=(Infinity,Infinity,Infinity)] - A vector representing the lower boundary of the box. + * @param {Vector3} [max=(-Infinity,-Infinity,-Infinity)] - A vector representing the upper boundary of the box. + */ + constructor(min?: Vector3, max?: Vector3); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBox3: boolean; + /** + * The lower boundary of the box. + * + * @type {Vector3} + */ + min: Vector3; + /** + * The upper boundary of the box. + * + * @type {Vector3} + */ + max: Vector3; + /** + * Sets the lower and upper boundaries of this box. + * Please note that this method only copies the values from the given objects. + * + * @param {Vector3} min - The lower boundary of the box. + * @param {Vector3} max - The upper boundary of the box. + * @return {Box3} A reference to this bounding box. + */ + set(min: Vector3, max: Vector3): Box3; + /** + * Sets the upper and lower bounds of this box so it encloses the position data + * in the given array. + * + * @param {Array} array - An array holding 3D position data. + * @return {Box3} A reference to this bounding box. + */ + setFromArray(array: Array): Box3; + /** + * Sets the upper and lower bounds of this box so it encloses the position data + * in the given buffer attribute. + * + * @param {BufferAttribute} attribute - A buffer attribute holding 3D position data. + * @return {Box3} A reference to this bounding box. + */ + setFromBufferAttribute(attribute: BufferAttribute): Box3; + /** + * Sets the upper and lower bounds of this box so it encloses the position data + * in the given array. + * + * @param {Array} points - An array holding 3D position data as instances of {@link Vector3}. + * @return {Box3} A reference to this bounding box. + */ + setFromPoints(points: Array): Box3; + /** + * Centers this box on the given center vector and sets this box's width, height and + * depth to the given size values. + * + * @param {Vector3} center - The center of the box. + * @param {Vector3} size - The x, y and z dimensions of the box. + * @return {Box3} A reference to this bounding box. + */ + setFromCenterAndSize(center: Vector3, size: Vector3): Box3; + /** + * Computes the world-axis-aligned bounding box for the given 3D object + * (including its children), accounting for the object's, and children's, + * world transforms. The function may result in a larger box than strictly necessary. + * + * Note: To compute the correct bounding box, make sure the given 3D object + * has an up-to-date world matrix that reflects the current transformation of its + * ancestor nodes. Call `object.updateWorldMatrix( true, false )` beforehand if + * you're unsure. + * + * @param {Object3D} object - The 3D object to compute the bounding box for. + * @param {boolean} [precise=false] - If set to `true`, the method computes the smallest + * world-axis-aligned bounding box at the expense of more computation. + * @return {Box3} A reference to this bounding box. + */ + setFromObject(object: Object3D, precise?: boolean): Box3; + /** + * Returns a new box with copied values from this instance. + * + * @return {Box3} A clone of this instance. + */ + clone(): Box3; + /** + * Copies the values of the given box to this instance. + * + * @param {Box3} box - The box to copy. + * @return {Box3} A reference to this bounding box. + */ + copy(box: Box3): Box3; + /** + * Makes this box empty which means in encloses a zero space in 3D. + * + * @return {Box3} A reference to this bounding box. + */ + makeEmpty(): Box3; + /** + * Returns true if this box includes zero points within its bounds. + * Note that a box with equal lower and upper bounds still includes one + * point, the one both bounds share. + * + * @return {boolean} Whether this box is empty or not. + */ + isEmpty(): boolean; + /** + * Returns the center point of this box. + * + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The center point. + */ + getCenter(target: Vector3): Vector3; + /** + * Returns the dimensions of this box. + * + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The size. + */ + getSize(target: Vector3): Vector3; + /** + * Expands the boundaries of this box to include the given point. + * + * @param {Vector3} point - The point that should be included by the bounding box. + * @return {Box3} A reference to this bounding box. + */ + expandByPoint(point: Vector3): Box3; + /** + * Expands this box equilaterally by the given vector. The width of this + * box will be expanded by the x component of the vector in both + * directions. The height of this box will be expanded by the y component of + * the vector in both directions. The depth of this box will be + * expanded by the z component of the vector in both directions. + * + * @param {Vector3} vector - The vector that should expand the bounding box. + * @return {Box3} A reference to this bounding box. + */ + expandByVector(vector: Vector3): Box3; + /** + * Expands each dimension of the box by the given scalar. If negative, the + * dimensions of the box will be contracted. + * + * @param {number} scalar - The scalar value that should expand the bounding box. + * @return {Box3} A reference to this bounding box. + */ + expandByScalar(scalar: number): Box3; + /** + * Expands the boundaries of this box to include the given 3D object and + * its children, accounting for the object's, and children's, world + * transforms. The function may result in a larger box than strictly + * necessary (unless the precise parameter is set to true). + * + * @param {Object3D} object - The 3D object that should expand the bounding box. + * @param {boolean} precise - If set to `true`, the method expands the bounding box + * as little as necessary at the expense of more computation. + * @return {Box3} A reference to this bounding box. + */ + expandByObject(object: Object3D, precise?: boolean): Box3; + /** + * Returns `true` if the given point lies within or on the boundaries of this box. + * + * @param {Vector3} point - The point to test. + * @return {boolean} Whether the bounding box contains the given point or not. + */ + containsPoint(point: Vector3): boolean; + /** + * Returns `true` if this bounding box includes the entirety of the given bounding box. + * If this box and the given one are identical, this function also returns `true`. + * + * @param {Box3} box - The bounding box to test. + * @return {boolean} Whether the bounding box contains the given bounding box or not. + */ + containsBox(box: Box3): boolean; + /** + * Returns a point as a proportion of this box's width, height and depth. + * + * @param {Vector3} point - A point in 3D space. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} A point as a proportion of this box's width, height and depth. + */ + getParameter(point: Vector3, target: Vector3): Vector3; + /** + * Returns `true` if the given bounding box intersects with this bounding box. + * + * @param {Box3} box - The bounding box to test. + * @return {boolean} Whether the given bounding box intersects with this bounding box. + */ + intersectsBox(box: Box3): boolean; + /** + * Returns `true` if the given bounding sphere intersects with this bounding box. + * + * @param {Sphere} sphere - The bounding sphere to test. + * @return {boolean} Whether the given bounding sphere intersects with this bounding box. + */ + intersectsSphere(sphere: Sphere): boolean; + /** + * Returns `true` if the given plane intersects with this bounding box. + * + * @param {Plane} plane - The plane to test. + * @return {boolean} Whether the given plane intersects with this bounding box. + */ + intersectsPlane(plane: Plane): boolean; + /** + * Returns `true` if the given triangle intersects with this bounding box. + * + * @param {Triangle} triangle - The triangle to test. + * @return {boolean} Whether the given triangle intersects with this bounding box. + */ + intersectsTriangle(triangle: Triangle): boolean; + /** + * Clamps the given point within the bounds of this box. + * + * @param {Vector3} point - The point to clamp. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The clamped point. + */ + clampPoint(point: Vector3, target: Vector3): Vector3; + /** + * Returns the euclidean distance from any edge of this box to the specified point. If + * the given point lies inside of this box, the distance will be `0`. + * + * @param {Vector3} point - The point to compute the distance to. + * @return {number} The euclidean distance. + */ + distanceToPoint(point: Vector3): number; + /** + * Returns a bounding sphere that encloses this bounding box. + * + * @param {Sphere} target - The target sphere that is used to store the method's result. + * @return {Sphere} The bounding sphere that encloses this bounding box. + */ + getBoundingSphere(target: Sphere): Sphere; + /** + * Computes the intersection of this bounding box and the given one, setting the upper + * bound of this box to the lesser of the two boxes' upper bounds and the + * lower bound of this box to the greater of the two boxes' lower bounds. If + * there's no overlap, makes this box empty. + * + * @param {Box3} box - The bounding box to intersect with. + * @return {Box3} A reference to this bounding box. + */ + intersect(box: Box3): Box3; + /** + * Computes the union of this box and another and the given one, setting the upper + * bound of this box to the greater of the two boxes' upper bounds and the + * lower bound of this box to the lesser of the two boxes' lower bounds. + * + * @param {Box3} box - The bounding box that will be unioned with this instance. + * @return {Box3} A reference to this bounding box. + */ + union(box: Box3): Box3; + /** + * Transforms this bounding box by the given 4x4 transformation matrix. + * + * @param {Matrix4} matrix - The transformation matrix. + * @return {Box3} A reference to this bounding box. + */ + applyMatrix4(matrix: Matrix4): Box3; + /** + * Adds the given offset to both the upper and lower bounds of this bounding box, + * effectively moving it in 3D space. + * + * @param {Vector3} offset - The offset that should be used to translate the bounding box. + * @return {Box3} A reference to this bounding box. + */ + translate(offset: Vector3): Box3; + /** + * Returns `true` if this bounding box is equal with the given one. + * + * @param {Box3} box - The box to test for equality. + * @return {boolean} Whether this bounding box is equal with the given one. + */ + equals(box: Box3): boolean; + /** + * Returns a serialized structure of the bounding box. + * + * @return {Object} Serialized structure with fields representing the object state. + */ + toJSON(): Object; + /** + * Returns a serialized structure of the bounding box. + * + * @param {Object} json - The serialized json to set the box from. + * @return {Box3} A reference to this bounding box. + */ + fromJSON(json: Object): Box3; +} +import { Vector3 } from './Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Color.d.ts b/jsdoc-testing/jsdoc/src/math/Color.d.ts new file mode 100644 index 000000000..88445d822 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/Color.d.ts @@ -0,0 +1,538 @@ +/** + * A Color instance is represented by RGB components in the linear working + * color space, which defaults to `LinearSRGBColorSpace`. Inputs + * conventionally using `SRGBColorSpace` (such as hexadecimals and CSS + * strings) are converted to the working color space automatically. + * + * ```js + * // converted automatically from SRGBColorSpace to LinearSRGBColorSpace + * const color = new THREE.Color().setHex( 0x112233 ); + * ``` + * Source color spaces may be specified explicitly, to ensure correct conversions. + * ```js + * // assumed already LinearSRGBColorSpace; no conversion + * const color = new THREE.Color().setRGB( 0.5, 0.5, 0.5 ); + * + * // converted explicitly from SRGBColorSpace to LinearSRGBColorSpace + * const color = new THREE.Color().setRGB( 0.5, 0.5, 0.5, SRGBColorSpace ); + * ``` + * If THREE.ColorManagement is disabled, no conversions occur. For details, + * see Color management. Iterating through a Color instance will yield + * its components (r, g, b) in the corresponding order. A Color can be initialised + * in any of the following ways: + * ```js + * //empty constructor - will default white + * const color1 = new THREE.Color(); + * + * //Hexadecimal color (recommended) + * const color2 = new THREE.Color( 0xff0000 ); + * + * //RGB string + * const color3 = new THREE.Color("rgb(255, 0, 0)"); + * const color4 = new THREE.Color("rgb(100%, 0%, 0%)"); + * + * //X11 color name - all 140 color names are supported. + * //Note the lack of CamelCase in the name + * const color5 = new THREE.Color( 'skyblue' ); + * //HSL string + * const color6 = new THREE.Color("hsl(0, 100%, 50%)"); + * + * //Separate RGB values between 0 and 1 + * const color7 = new THREE.Color( 1, 0, 0 ); + * ``` + */ +export class Color { + /** + * Constructs a new color. + * + * Note that standard method of specifying color in three.js is with a hexadecimal triplet, + * and that method is used throughout the rest of the documentation. + * + * @param {(number|string|Color)} [r] - The red component of the color. If `g` and `b` are + * not provided, it can be hexadecimal triplet, a CSS-style string or another `Color` instance. + * @param {number} [g] - The green component. + * @param {number} [b] - The blue component. + */ + constructor(r?: (number | string | Color), g?: number, b?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isColor: boolean; + /** + * The red component. + * + * @type {number} + * @default 1 + */ + r: number; + /** + * The green component. + * + * @type {number} + * @default 1 + */ + g: number; + /** + * The blue component. + * + * @type {number} + * @default 1 + */ + b: number; + /** + * Sets the colors's components from the given values. + * + * @param {(number|string|Color)} [r] - The red component of the color. If `g` and `b` are + * not provided, it can be hexadecimal triplet, a CSS-style string or another `Color` instance. + * @param {number} [g] - The green component. + * @param {number} [b] - The blue component. + * @return {Color} A reference to this color. + */ + set(r?: (number | string | Color), g?: number, b?: number): Color; + /** + * Sets the colors's components to the given scalar value. + * + * @param {number} scalar - The scalar value. + * @return {Color} A reference to this color. + */ + setScalar(scalar: number): Color; + /** + * Sets this color from a hexadecimal value. + * + * @param {number} hex - The hexadecimal value. + * @param {string} [colorSpace=SRGBColorSpace] - The color space. + * @return {Color} A reference to this color. + */ + setHex(hex: number, colorSpace?: string): Color; + /** + * Sets this color from RGB values. + * + * @param {number} r - Red channel value between `0.0` and `1.0`. + * @param {number} g - Green channel value between `0.0` and `1.0`. + * @param {number} b - Blue channel value between `0.0` and `1.0`. + * @param {string} [colorSpace=ColorManagement.workingColorSpace] - The color space. + * @return {Color} A reference to this color. + */ + setRGB(r: number, g: number, b: number, colorSpace?: string): Color; + /** + * Sets this color from RGB values. + * + * @param {number} h - Hue value between `0.0` and `1.0`. + * @param {number} s - Saturation value between `0.0` and `1.0`. + * @param {number} l - Lightness value between `0.0` and `1.0`. + * @param {string} [colorSpace=ColorManagement.workingColorSpace] - The color space. + * @return {Color} A reference to this color. + */ + setHSL(h: number, s: number, l: number, colorSpace?: string): Color; + /** + * Sets this color from a CSS-style string. For example, `rgb(250, 0,0)`, + * `rgb(100%, 0%, 0%)`, `hsl(0, 100%, 50%)`, `#ff0000`, `#f00`, or `red` ( or + * any [X11 color name](https://en.wikipedia.org/wiki/X11_color_names#Color_name_chart) - + * all 140 color names are supported). + * + * @param {string} style - Color as a CSS-style string. + * @param {string} [colorSpace=SRGBColorSpace] - The color space. + * @return {Color} A reference to this color. + */ + setStyle(style: string, colorSpace?: string): Color; + /** + * Sets this color from a color name. Faster than {@link Color#setStyle} if + * you don't need the other CSS-style formats. + * + * For convenience, the list of names is exposed in `Color.NAMES` as a hash. + * ```js + * Color.NAMES.aliceblue // returns 0xF0F8FF + * ``` + * + * @param {string} style - The color name. + * @param {string} [colorSpace=SRGBColorSpace] - The color space. + * @return {Color} A reference to this color. + */ + setColorName(style: string, colorSpace?: string): Color; + /** + * Returns a new color with copied values from this instance. + * + * @return {Color} A clone of this instance. + */ + clone(): Color; + /** + * Copies the values of the given color to this instance. + * + * @param {Color} color - The color to copy. + * @return {Color} A reference to this color. + */ + copy(color: Color): Color; + /** + * Copies the given color into this color, and then converts this color from + * `SRGBColorSpace` to `LinearSRGBColorSpace`. + * + * @param {Color} color - The color to copy/convert. + * @return {Color} A reference to this color. + */ + copySRGBToLinear(color: Color): Color; + /** + * Copies the given color into this color, and then converts this color from + * `LinearSRGBColorSpace` to `SRGBColorSpace`. + * + * @param {Color} color - The color to copy/convert. + * @return {Color} A reference to this color. + */ + copyLinearToSRGB(color: Color): Color; + /** + * Converts this color from `SRGBColorSpace` to `LinearSRGBColorSpace`. + * + * @return {Color} A reference to this color. + */ + convertSRGBToLinear(): Color; + /** + * Converts this color from `LinearSRGBColorSpace` to `SRGBColorSpace`. + * + * @return {Color} A reference to this color. + */ + convertLinearToSRGB(): Color; + /** + * Returns the hexadecimal value of this color. + * + * @param {string} [colorSpace=SRGBColorSpace] - The color space. + * @return {number} The hexadecimal value. + */ + getHex(colorSpace?: string): number; + /** + * Returns the hexadecimal value of this color as a string (for example, 'FFFFFF'). + * + * @param {string} [colorSpace=SRGBColorSpace] - The color space. + * @return {string} The hexadecimal value as a string. + */ + getHexString(colorSpace?: string): string; + /** + * Converts the colors RGB values into the HSL format and stores them into the + * given target object. + * + * @param {{h:number,s:number,l:number}} target - The target object that is used to store the method's result. + * @param {string} [colorSpace=ColorManagement.workingColorSpace] - The color space. + * @return {{h:number,s:number,l:number}} The HSL representation of this color. + */ + getHSL(target: { + h: number; + s: number; + l: number; + }, colorSpace?: string): { + h: number; + s: number; + l: number; + }; + /** + * Returns the RGB values of this color and stores them into the given target object. + * + * @param {Color} target - The target color that is used to store the method's result. + * @param {string} [colorSpace=ColorManagement.workingColorSpace] - The color space. + * @return {Color} The RGB representation of this color. + */ + getRGB(target: Color, colorSpace?: string): Color; + /** + * Returns the value of this color as a CSS style string. Example: `rgb(255,0,0)`. + * + * @param {string} [colorSpace=SRGBColorSpace] - The color space. + * @return {string} The CSS representation of this color. + */ + getStyle(colorSpace?: string): string; + /** + * Adds the given HSL values to this color's values. + * Internally, this converts the color's RGB values to HSL, adds HSL + * and then converts the color back to RGB. + * + * @param {number} h - Hue value between `0.0` and `1.0`. + * @param {number} s - Saturation value between `0.0` and `1.0`. + * @param {number} l - Lightness value between `0.0` and `1.0`. + * @return {Color} A reference to this color. + */ + offsetHSL(h: number, s: number, l: number): Color; + /** + * Adds the RGB values of the given color to the RGB values of this color. + * + * @param {Color} color - The color to add. + * @return {Color} A reference to this color. + */ + add(color: Color): Color; + /** + * Adds the RGB values of the given colors and stores the result in this instance. + * + * @param {Color} color1 - The first color. + * @param {Color} color2 - The second color. + * @return {Color} A reference to this color. + */ + addColors(color1: Color, color2: Color): Color; + /** + * Adds the given scalar value to the RGB values of this color. + * + * @param {number} s - The scalar to add. + * @return {Color} A reference to this color. + */ + addScalar(s: number): Color; + /** + * Subtracts the RGB values of the given color from the RGB values of this color. + * + * @param {Color} color - The color to subtract. + * @return {Color} A reference to this color. + */ + sub(color: Color): Color; + /** + * Multiplies the RGB values of the given color with the RGB values of this color. + * + * @param {Color} color - The color to multiply. + * @return {Color} A reference to this color. + */ + multiply(color: Color): Color; + /** + * Multiplies the given scalar value with the RGB values of this color. + * + * @param {number} s - The scalar to multiply. + * @return {Color} A reference to this color. + */ + multiplyScalar(s: number): Color; + /** + * Linearly interpolates this color's RGB values toward the RGB values of the + * given color. The alpha argument can be thought of as the ratio between + * the two colors, where `0.0` is this color and `1.0` is the first argument. + * + * @param {Color} color - The color to converge on. + * @param {number} alpha - The interpolation factor in the closed interval `[0,1]`. + * @return {Color} A reference to this color. + */ + lerp(color: Color, alpha: number): Color; + /** + * Linearly interpolates between the given colors and stores the result in this instance. + * The alpha argument can be thought of as the ratio between the two colors, where `0.0` + * is the first and `1.0` is the second color. + * + * @param {Color} color1 - The first color. + * @param {Color} color2 - The second color. + * @param {number} alpha - The interpolation factor in the closed interval `[0,1]`. + * @return {Color} A reference to this color. + */ + lerpColors(color1: Color, color2: Color, alpha: number): Color; + /** + * Linearly interpolates this color's HSL values toward the HSL values of the + * given color. It differs from {@link Color#lerp} by not interpolating straight + * from one color to the other, but instead going through all the hues in between + * those two colors. The alpha argument can be thought of as the ratio between + * the two colors, where 0.0 is this color and 1.0 is the first argument. + * + * @param {Color} color - The color to converge on. + * @param {number} alpha - The interpolation factor in the closed interval `[0,1]`. + * @return {Color} A reference to this color. + */ + lerpHSL(color: Color, alpha: number): Color; + /** + * Sets the color's RGB components from the given 3D vector. + * + * @param {Vector3} v - The vector to set. + * @return {Color} A reference to this color. + */ + setFromVector3(v: Vector3): Color; + /** + * Transforms this color with the given 3x3 matrix. + * + * @param {Matrix3} m - The matrix. + * @return {Color} A reference to this color. + */ + applyMatrix3(m: Matrix3): Color; + /** + * Returns `true` if this color is equal with the given one. + * + * @param {Color} c - The color to test for equality. + * @return {boolean} Whether this bounding color is equal with the given one. + */ + equals(c: Color): boolean; + /** + * Sets this color's RGB components from the given array. + * + * @param {Array} array - An array holding the RGB values. + * @param {number} [offset=0] - The offset into the array. + * @return {Color} A reference to this color. + */ + fromArray(array: Array, offset?: number): Color; + /** + * Writes the RGB components of this color to the given array. If no array is provided, + * the method returns a new instance. + * + * @param {Array} [array=[]] - The target array holding the color components. + * @param {number} [offset=0] - Index of the first element in the array. + * @return {Array} The color components. + */ + toArray(array?: Array, offset?: number): Array; + /** + * Sets the components of this color from the given buffer attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute holding color data. + * @param {number} index - The index into the attribute. + * @return {Color} A reference to this color. + */ + fromBufferAttribute(attribute: BufferAttribute, index: number): Color; + /** + * This methods defines the serialization result of this class. Returns the color + * as a hexadecimal value. + * + * @return {number} The hexadecimal value. + */ + toJSON(): number; + [Symbol.iterator](): Generator; +} +export namespace Color { + export { _colorKeywords as NAMES }; +} +declare namespace _colorKeywords { + let aliceblue: number; + let antiquewhite: number; + let aqua: number; + let aquamarine: number; + let azure: number; + let beige: number; + let bisque: number; + let black: number; + let blanchedalmond: number; + let blue: number; + let blueviolet: number; + let brown: number; + let burlywood: number; + let cadetblue: number; + let chartreuse: number; + let chocolate: number; + let coral: number; + let cornflowerblue: number; + let cornsilk: number; + let crimson: number; + let cyan: number; + let darkblue: number; + let darkcyan: number; + let darkgoldenrod: number; + let darkgray: number; + let darkgreen: number; + let darkgrey: number; + let darkkhaki: number; + let darkmagenta: number; + let darkolivegreen: number; + let darkorange: number; + let darkorchid: number; + let darkred: number; + let darksalmon: number; + let darkseagreen: number; + let darkslateblue: number; + let darkslategray: number; + let darkslategrey: number; + let darkturquoise: number; + let darkviolet: number; + let deeppink: number; + let deepskyblue: number; + let dimgray: number; + let dimgrey: number; + let dodgerblue: number; + let firebrick: number; + let floralwhite: number; + let forestgreen: number; + let fuchsia: number; + let gainsboro: number; + let ghostwhite: number; + let gold: number; + let goldenrod: number; + let gray: number; + let green: number; + let greenyellow: number; + let grey: number; + let honeydew: number; + let hotpink: number; + let indianred: number; + let indigo: number; + let ivory: number; + let khaki: number; + let lavender: number; + let lavenderblush: number; + let lawngreen: number; + let lemonchiffon: number; + let lightblue: number; + let lightcoral: number; + let lightcyan: number; + let lightgoldenrodyellow: number; + let lightgray: number; + let lightgreen: number; + let lightgrey: number; + let lightpink: number; + let lightsalmon: number; + let lightseagreen: number; + let lightskyblue: number; + let lightslategray: number; + let lightslategrey: number; + let lightsteelblue: number; + let lightyellow: number; + let lime: number; + let limegreen: number; + let linen: number; + let magenta: number; + let maroon: number; + let mediumaquamarine: number; + let mediumblue: number; + let mediumorchid: number; + let mediumpurple: number; + let mediumseagreen: number; + let mediumslateblue: number; + let mediumspringgreen: number; + let mediumturquoise: number; + let mediumvioletred: number; + let midnightblue: number; + let mintcream: number; + let mistyrose: number; + let moccasin: number; + let navajowhite: number; + let navy: number; + let oldlace: number; + let olive: number; + let olivedrab: number; + let orange: number; + let orangered: number; + let orchid: number; + let palegoldenrod: number; + let palegreen: number; + let paleturquoise: number; + let palevioletred: number; + let papayawhip: number; + let peachpuff: number; + let peru: number; + let pink: number; + let plum: number; + let powderblue: number; + let purple: number; + let rebeccapurple: number; + let red: number; + let rosybrown: number; + let royalblue: number; + let saddlebrown: number; + let salmon: number; + let sandybrown: number; + let seagreen: number; + let seashell: number; + let sienna: number; + let silver: number; + let skyblue: number; + let slateblue: number; + let slategray: number; + let slategrey: number; + let snow: number; + let springgreen: number; + let steelblue: number; + let tan: number; + let teal: number; + let thistle: number; + let tomato: number; + let turquoise: number; + let violet: number; + let wheat: number; + let white: number; + let whitesmoke: number; + let yellow: number; + let yellowgreen: number; +} +export {}; diff --git a/jsdoc-testing/jsdoc/src/math/ColorManagement.d.ts b/jsdoc-testing/jsdoc/src/math/ColorManagement.d.ts new file mode 100644 index 000000000..63d1502b9 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/ColorManagement.d.ts @@ -0,0 +1,21 @@ +export function SRGBToLinear(c: any): number; +export function LinearToSRGB(c: any): number; +export namespace ColorManagement { + export let enabled: boolean; + export { LinearSRGBColorSpace as workingColorSpace }; + export let spaces: {}; + export function convert(color: any, sourceColorSpace: any, targetColorSpace: any): any; + export function workingToColorSpace(color: any, targetColorSpace: any): any; + export function colorSpaceToWorking(color: any, sourceColorSpace: any): any; + export function getPrimaries(colorSpace: any): any; + export function getTransfer(colorSpace: any): any; + export function getToneMappingMode(colorSpace: any): any; + export function getLuminanceCoefficients(target: any, colorSpace?: any): any; + export function define(colorSpaces: any): void; + export function _getMatrix(targetMatrix: any, sourceColorSpace: any, targetColorSpace: any): any; + export function _getDrawingBufferColorSpace(colorSpace: any): any; + export function _getUnpackColorSpace(colorSpace?: any): any; + export function fromWorkingColorSpace(color: any, targetColorSpace: any): any; + export function toWorkingColorSpace(color: any, sourceColorSpace: any): any; +} +import { LinearSRGBColorSpace } from '../constants.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Cylindrical.d.ts b/jsdoc-testing/jsdoc/src/math/Cylindrical.d.ts new file mode 100644 index 000000000..8c5d91627 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/Cylindrical.d.ts @@ -0,0 +1,74 @@ +/** + * This class can be used to represent points in 3D space as + * [Cylindrical coordinates](https://en.wikipedia.org/wiki/Cylindrical_coordinate_system). + */ +export class Cylindrical { + /** + * Constructs a new cylindrical. + * + * @param {number} [radius=1] - The distance from the origin to a point in the x-z plane. + * @param {number} [theta=0] - A counterclockwise angle in the x-z plane measured in radians from the positive z-axis. + * @param {number} [y=0] - The height above the x-z plane. + */ + constructor(radius?: number, theta?: number, y?: number); + /** + * The distance from the origin to a point in the x-z plane. + * + * @type {number} + * @default 1 + */ + radius: number; + /** + * A counterclockwise angle in the x-z plane measured in radians from the positive z-axis. + * + * @type {number} + * @default 0 + */ + theta: number; + /** + * The height above the x-z plane. + * + * @type {number} + * @default 0 + */ + y: number; + /** + * Sets the cylindrical components by copying the given values. + * + * @param {number} radius - The radius. + * @param {number} theta - The theta angle. + * @param {number} y - The height value. + * @return {Cylindrical} A reference to this cylindrical. + */ + set(radius: number, theta: number, y: number): Cylindrical; + /** + * Copies the values of the given cylindrical to this instance. + * + * @param {Cylindrical} other - The cylindrical to copy. + * @return {Cylindrical} A reference to this cylindrical. + */ + copy(other: Cylindrical): Cylindrical; + /** + * Sets the cylindrical components from the given vector which is assumed to hold + * Cartesian coordinates. + * + * @param {Vector3} v - The vector to set. + * @return {Cylindrical} A reference to this cylindrical. + */ + setFromVector3(v: Vector3): Cylindrical; + /** + * Sets the cylindrical components from the given Cartesian coordinates. + * + * @param {number} x - The x value. + * @param {number} y - The x value. + * @param {number} z - The x value. + * @return {Cylindrical} A reference to this cylindrical. + */ + setFromCartesianCoords(x: number, y: number, z: number): Cylindrical; + /** + * Returns a new cylindrical with copied values from this instance. + * + * @return {Cylindrical} A clone of this instance. + */ + clone(): Cylindrical; +} diff --git a/jsdoc-testing/jsdoc/src/math/Euler.d.ts b/jsdoc-testing/jsdoc/src/math/Euler.d.ts new file mode 100644 index 000000000..8ba21b0f2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/Euler.d.ts @@ -0,0 +1,164 @@ +/** + * A class representing Euler angles. + * + * Euler angles describe a rotational transformation by rotating an object on + * its various axes in specified amounts per axis, and a specified axis + * order. + * + * Iterating through an instance will yield its components (x, y, z, + * order) in the corresponding order. + * + * ```js + * const a = new THREE.Euler( 0, 1, 1.57, 'XYZ' ); + * const b = new THREE.Vector3( 1, 0, 1 ); + * b.applyEuler(a); + * ``` + */ +export class Euler { + /** + * Constructs a new euler instance. + * + * @param {number} [x=0] - The angle of the x axis in radians. + * @param {number} [y=0] - The angle of the y axis in radians. + * @param {number} [z=0] - The angle of the z axis in radians. + * @param {string} [order=Euler.DEFAULT_ORDER] - A string representing the order that the rotations are applied. + */ + constructor(x?: number, y?: number, z?: number, order?: string); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isEuler: boolean; + _x: number; + _y: number; + _z: number; + _order: string; + set x(value: number); + /** + * The angle of the x axis in radians. + * + * @type {number} + * @default 0 + */ + get x(): number; + set y(value: number); + /** + * The angle of the y axis in radians. + * + * @type {number} + * @default 0 + */ + get y(): number; + set z(value: number); + /** + * The angle of the z axis in radians. + * + * @type {number} + * @default 0 + */ + get z(): number; + set order(value: string); + /** + * A string representing the order that the rotations are applied. + * + * @type {string} + * @default 'XYZ' + */ + get order(): string; + /** + * Sets the Euler components. + * + * @param {number} x - The angle of the x axis in radians. + * @param {number} y - The angle of the y axis in radians. + * @param {number} z - The angle of the z axis in radians. + * @param {string} [order] - A string representing the order that the rotations are applied. + * @return {Euler} A reference to this Euler instance. + */ + set(x: number, y: number, z: number, order?: string): Euler; + /** + * Returns a new Euler instance with copied values from this instance. + * + * @return {Euler} A clone of this instance. + */ + clone(): Euler; + /** + * Copies the values of the given Euler instance to this instance. + * + * @param {Euler} euler - The Euler instance to copy. + * @return {Euler} A reference to this Euler instance. + */ + copy(euler: Euler): Euler; + /** + * Sets the angles of this Euler instance from a pure rotation matrix. + * + * @param {Matrix4} m - A 4x4 matrix of which the upper 3x3 of matrix is a pure rotation matrix (i.e. unscaled). + * @param {string} [order] - A string representing the order that the rotations are applied. + * @param {boolean} [update=true] - Whether the internal `onChange` callback should be executed or not. + * @return {Euler} A reference to this Euler instance. + */ + setFromRotationMatrix(m: Matrix4, order?: string, update?: boolean): Euler; + /** + * Sets the angles of this Euler instance from a normalized quaternion. + * + * @param {Quaternion} q - A normalized Quaternion. + * @param {string} [order] - A string representing the order that the rotations are applied. + * @param {boolean} [update=true] - Whether the internal `onChange` callback should be executed or not. + * @return {Euler} A reference to this Euler instance. + */ + setFromQuaternion(q: Quaternion, order?: string, update?: boolean): Euler; + /** + * Sets the angles of this Euler instance from the given vector. + * + * @param {Vector3} v - The vector. + * @param {string} [order] - A string representing the order that the rotations are applied. + * @return {Euler} A reference to this Euler instance. + */ + setFromVector3(v: Vector3, order?: string): Euler; + /** + * Resets the euler angle with a new order by creating a quaternion from this + * euler angle and then setting this euler angle with the quaternion and the + * new order. + * + * Warning: This discards revolution information. + * + * @param {string} [newOrder] - A string representing the new order that the rotations are applied. + * @return {Euler} A reference to this Euler instance. + */ + reorder(newOrder?: string): Euler; + /** + * Returns `true` if this Euler instance is equal with the given one. + * + * @param {Euler} euler - The Euler instance to test for equality. + * @return {boolean} Whether this Euler instance is equal with the given one. + */ + equals(euler: Euler): boolean; + /** + * Sets this Euler instance's components to values from the given array. The first three + * entries of the array are assign to the x,y and z components. An optional fourth entry + * defines the Euler order. + * + * @param {Array} array - An array holding the Euler component values. + * @return {Euler} A reference to this Euler instance. + */ + fromArray(array: Array): Euler; + /** + * Writes the components of this Euler instance to the given array. If no array is provided, + * the method returns a new instance. + * + * @param {Array} [array=[]] - The target array holding the Euler components. + * @param {number} [offset=0] - Index of the first element in the array. + * @return {Array} The Euler components. + */ + toArray(array?: Array, offset?: number): Array; + _onChange(callback: any): this; + _onChangeCallback(): void; + [Symbol.iterator](): Generator; +} +export namespace Euler { + let DEFAULT_ORDER: string; +} +import { Matrix4 } from './Matrix4.js'; +import { Quaternion } from './Quaternion.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Frustum.d.ts b/jsdoc-testing/jsdoc/src/math/Frustum.d.ts new file mode 100644 index 000000000..d6e9231b3 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/Frustum.d.ts @@ -0,0 +1,100 @@ +/** + * Frustums are used to determine what is inside the camera's field of view. + * They help speed up the rendering process - objects which lie outside a camera's + * frustum can safely be excluded from rendering. + * + * This class is mainly intended for use internally by a renderer. + */ +export class Frustum { + /** + * Constructs a new frustum. + * + * @param {Plane} [p0] - The first plane that encloses the frustum. + * @param {Plane} [p1] - The second plane that encloses the frustum. + * @param {Plane} [p2] - The third plane that encloses the frustum. + * @param {Plane} [p3] - The fourth plane that encloses the frustum. + * @param {Plane} [p4] - The fifth plane that encloses the frustum. + * @param {Plane} [p5] - The sixth plane that encloses the frustum. + */ + constructor(p0?: Plane, p1?: Plane, p2?: Plane, p3?: Plane, p4?: Plane, p5?: Plane); + /** + * This array holds the planes that enclose the frustum. + * + * @type {Array} + */ + planes: Array; + /** + * Sets the frustum planes by copying the given planes. + * + * @param {Plane} [p0] - The first plane that encloses the frustum. + * @param {Plane} [p1] - The second plane that encloses the frustum. + * @param {Plane} [p2] - The third plane that encloses the frustum. + * @param {Plane} [p3] - The fourth plane that encloses the frustum. + * @param {Plane} [p4] - The fifth plane that encloses the frustum. + * @param {Plane} [p5] - The sixth plane that encloses the frustum. + * @return {Frustum} A reference to this frustum. + */ + set(p0?: Plane, p1?: Plane, p2?: Plane, p3?: Plane, p4?: Plane, p5?: Plane): Frustum; + /** + * Copies the values of the given frustum to this instance. + * + * @param {Frustum} frustum - The frustum to copy. + * @return {Frustum} A reference to this frustum. + */ + copy(frustum: Frustum): Frustum; + /** + * Sets the frustum planes from the given projection matrix. + * + * @param {Matrix4} m - The projection matrix. + * @param {(WebGLCoordinateSystem|WebGPUCoordinateSystem)} coordinateSystem - The coordinate system. + * @param {boolean} [reversedDepth=false] - Whether to use a reversed depth. + * @return {Frustum} A reference to this frustum. + */ + setFromProjectionMatrix(m: Matrix4, coordinateSystem?: (number | number), reversedDepth?: boolean): Frustum; + /** + * Returns `true` if the 3D object's bounding sphere is intersecting this frustum. + * + * Note that the 3D object must have a geometry so that the bounding sphere can be calculated. + * + * @param {Object3D} object - The 3D object to test. + * @return {boolean} Whether the 3D object's bounding sphere is intersecting this frustum or not. + */ + intersectsObject(object: Object3D): boolean; + /** + * Returns `true` if the given sprite is intersecting this frustum. + * + * @param {Sprite} sprite - The sprite to test. + * @return {boolean} Whether the sprite is intersecting this frustum or not. + */ + intersectsSprite(sprite: Sprite): boolean; + /** + * Returns `true` if the given bounding sphere is intersecting this frustum. + * + * @param {Sphere} sphere - The bounding sphere to test. + * @return {boolean} Whether the bounding sphere is intersecting this frustum or not. + */ + intersectsSphere(sphere: Sphere): boolean; + /** + * Returns `true` if the given bounding box is intersecting this frustum. + * + * @param {Box3} box - The bounding box to test. + * @return {boolean} Whether the bounding box is intersecting this frustum or not. + */ + intersectsBox(box: Box3): boolean; + /** + * Returns `true` if the given point lies within the frustum. + * + * @param {Vector3} point - The point to test. + * @return {boolean} Whether the point lies within this frustum or not. + */ + containsPoint(point: Vector3): boolean; + /** + * Returns a new frustum with copied values from this instance. + * + * @return {Frustum} A clone of this instance. + */ + clone(): Frustum; +} +import { Plane } from './Plane.js'; +import { Sphere } from './Sphere.js'; +import { Vector3 } from './Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/math/FrustumArray.d.ts b/jsdoc-testing/jsdoc/src/math/FrustumArray.d.ts new file mode 100644 index 000000000..f5f5b4bd9 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/FrustumArray.d.ts @@ -0,0 +1,64 @@ +/** + * FrustumArray is used to determine if an object is visible in at least one camera + * from an array of cameras. This is particularly useful for multi-view renderers. +*/ +export class FrustumArray { + /** + * The coordinate system to use. + * + * @type {WebGLCoordinateSystem|WebGPUCoordinateSystem} + * @default WebGLCoordinateSystem + */ + coordinateSystem: number | WebGPUCoordinateSystem; + /** + * Returns `true` if the 3D object's bounding sphere is intersecting any frustum + * from the camera array. + * + * @param {Object3D} object - The 3D object to test. + * @param {Object} cameraArray - An object with a cameras property containing an array of cameras. + * @return {boolean} Whether the 3D object is visible in any camera. + */ + intersectsObject(object: Object3D, cameraArray: Object): boolean; + /** + * Returns `true` if the given sprite is intersecting any frustum + * from the camera array. + * + * @param {Sprite} sprite - The sprite to test. + * @param {Object} cameraArray - An object with a cameras property containing an array of cameras. + * @return {boolean} Whether the sprite is visible in any camera. + */ + intersectsSprite(sprite: Sprite, cameraArray: Object): boolean; + /** + * Returns `true` if the given bounding sphere is intersecting any frustum + * from the camera array. + * + * @param {Sphere} sphere - The bounding sphere to test. + * @param {Object} cameraArray - An object with a cameras property containing an array of cameras. + * @return {boolean} Whether the sphere is visible in any camera. + */ + intersectsSphere(sphere: Sphere, cameraArray: Object): boolean; + /** + * Returns `true` if the given bounding box is intersecting any frustum + * from the camera array. + * + * @param {Box3} box - The bounding box to test. + * @param {Object} cameraArray - An object with a cameras property containing an array of cameras. + * @return {boolean} Whether the box is visible in any camera. + */ + intersectsBox(box: Box3, cameraArray: Object): boolean; + /** + * Returns `true` if the given point lies within any frustum + * from the camera array. + * + * @param {Vector3} point - The point to test. + * @param {Object} cameraArray - An object with a cameras property containing an array of cameras. + * @return {boolean} Whether the point is visible in any camera. + */ + containsPoint(point: Vector3, cameraArray: Object): boolean; + /** + * Returns a new frustum array with copied values from this instance. + * + * @return {FrustumArray} A clone of this instance. + */ + clone(): FrustumArray; +} diff --git a/jsdoc-testing/jsdoc/src/math/Interpolant.d.ts b/jsdoc-testing/jsdoc/src/math/Interpolant.d.ts new file mode 100644 index 000000000..561415c0e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/Interpolant.d.ts @@ -0,0 +1,114 @@ +/** + * Abstract base class of interpolants over parametric samples. + * + * The parameter domain is one dimensional, typically the time or a path + * along a curve defined by the data. + * + * The sample values can have any dimensionality and derived classes may + * apply special interpretations to the data. + * + * This class provides the interval seek in a Template Method, deferring + * the actual interpolation to derived classes. + * + * Time complexity is O(1) for linear access crossing at most two points + * and O(log N) for random access, where N is the number of positions. + * + * References: {@link http://www.oodesign.com/template-method-pattern.html} + * + * @abstract + */ +export class Interpolant { + /** + * Constructs a new interpolant. + * + * @param {TypedArray} parameterPositions - The parameter positions hold the interpolation factors. + * @param {TypedArray} sampleValues - The sample values. + * @param {number} sampleSize - The sample size + * @param {TypedArray} [resultBuffer] - The result buffer. + */ + constructor(parameterPositions: TypedArray, sampleValues: TypedArray, sampleSize: number, resultBuffer?: TypedArray); + /** + * The parameter positions. + * + * @type {TypedArray} + */ + parameterPositions: TypedArray; + /** + * A cache index. + * + * @private + * @type {number} + * @default 0 + */ + private _cachedIndex; + /** + * The result buffer. + * + * @type {TypedArray} + */ + resultBuffer: TypedArray; + /** + * The sample values. + * + * @type {TypedArray} + */ + sampleValues: TypedArray; + /** + * The value size. + * + * @type {TypedArray} + */ + valueSize: TypedArray; + /** + * The interpolation settings. + * + * @type {?Object} + * @default null + */ + settings: Object | null; + /** + * The default settings object. + * + * @type {Object} + */ + DefaultSettings_: Object; + /** + * Evaluate the interpolant at position `t`. + * + * @param {number} t - The interpolation factor. + * @return {TypedArray} The result buffer. + */ + evaluate(t: number): TypedArray; + /** + * Returns the interpolation settings. + * + * @return {Object} The interpolation settings. + */ + getSettings_(): Object; + /** + * Copies a sample value to the result buffer. + * + * @param {number} index - An index into the sample value buffer. + * @return {TypedArray} The result buffer. + */ + copySampleValue_(index: number): TypedArray; + /** + * Copies a sample value to the result buffer. + * + * @abstract + * @param {number} i1 - An index into the sample value buffer. + * @param {number} t0 - The previous interpolation factor. + * @param {number} t - The current interpolation factor. + * @param {number} t1 - The next interpolation factor. + * @return {TypedArray} The result buffer. + */ + interpolate_(): TypedArray; + /** + * Optional method that is executed when the interval has changed. + * + * @param {number} i1 - An index into the sample value buffer. + * @param {number} t0 - The previous interpolation factor. + * @param {number} t - The current interpolation factor. + */ + intervalChanged_(): void; +} diff --git a/jsdoc-testing/jsdoc/src/math/Line3.d.ts b/jsdoc-testing/jsdoc/src/math/Line3.d.ts new file mode 100644 index 000000000..339e53546 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/Line3.d.ts @@ -0,0 +1,120 @@ +/** + * An analytical line segment in 3D space represented by a start and end point. + */ +export class Line3 { + /** + * Constructs a new line segment. + * + * @param {Vector3} [start=(0,0,0)] - Start of the line segment. + * @param {Vector3} [end=(0,0,0)] - End of the line segment. + */ + constructor(start?: Vector3, end?: Vector3); + /** + * Start of the line segment. + * + * @type {Vector3} + */ + start: Vector3; + /** + * End of the line segment. + * + * @type {Vector3} + */ + end: Vector3; + /** + * Sets the start and end values by copying the given vectors. + * + * @param {Vector3} start - The start point. + * @param {Vector3} end - The end point. + * @return {Line3} A reference to this line segment. + */ + set(start: Vector3, end: Vector3): Line3; + /** + * Copies the values of the given line segment to this instance. + * + * @param {Line3} line - The line segment to copy. + * @return {Line3} A reference to this line segment. + */ + copy(line: Line3): Line3; + /** + * Returns the center of the line segment. + * + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The center point. + */ + getCenter(target: Vector3): Vector3; + /** + * Returns the delta vector of the line segment's start and end point. + * + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The delta vector. + */ + delta(target: Vector3): Vector3; + /** + * Returns the squared Euclidean distance between the line' start and end point. + * + * @return {number} The squared Euclidean distance. + */ + distanceSq(): number; + /** + * Returns the Euclidean distance between the line' start and end point. + * + * @return {number} The Euclidean distance. + */ + distance(): number; + /** + * Returns a vector at a certain position along the line segment. + * + * @param {number} t - A value between `[0,1]` to represent a position along the line segment. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The delta vector. + */ + at(t: number, target: Vector3): Vector3; + /** + * Returns a point parameter based on the closest point as projected on the line segment. + * + * @param {Vector3} point - The point for which to return a point parameter. + * @param {boolean} clampToLine - Whether to clamp the result to the range `[0,1]` or not. + * @return {number} The point parameter. + */ + closestPointToPointParameter(point: Vector3, clampToLine: boolean): number; + /** + * Returns the closest point on the line for a given point. + * + * @param {Vector3} point - The point to compute the closest point on the line for. + * @param {boolean} clampToLine - Whether to clamp the result to the range `[0,1]` or not. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The closest point on the line. + */ + closestPointToPoint(point: Vector3, clampToLine: boolean, target: Vector3): Vector3; + /** + * Returns the closest squared distance between this line segment and the given one. + * + * @param {Line3} line - The line segment to compute the closest squared distance to. + * @param {Vector3} [c1] - The closest point on this line segment. + * @param {Vector3} [c2] - The closest point on the given line segment. + * @return {number} The squared distance between this line segment and the given one. + */ + distanceSqToLine3(line: Line3, c1?: Vector3, c2?: Vector3): number; + /** + * Applies a 4x4 transformation matrix to this line segment. + * + * @param {Matrix4} matrix - The transformation matrix. + * @return {Line3} A reference to this line segment. + */ + applyMatrix4(matrix: Matrix4): Line3; + /** + * Returns `true` if this line segment is equal with the given one. + * + * @param {Line3} line - The line segment to test for equality. + * @return {boolean} Whether this line segment is equal with the given one. + */ + equals(line: Line3): boolean; + /** + * Returns a new line segment with copied values from this instance. + * + * @return {Line3} A clone of this instance. + */ + clone(): Line3; +} +import { Vector3 } from './Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/math/MathUtils.d.ts b/jsdoc-testing/jsdoc/src/math/MathUtils.d.ts new file mode 100644 index 000000000..bc4d11f77 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/MathUtils.d.ts @@ -0,0 +1,224 @@ +export const DEG2RAD: number; +export const RAD2DEG: number; +/** + * Generate a [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) + * (universally unique identifier). + * + * @return {string} The UUID. + */ +export function generateUUID(): string; +/** + * Clamps the given value between min and max. + * + * @param {number} value - The value to clamp. + * @param {number} min - The min value. + * @param {number} max - The max value. + * @return {number} The clamped value. + */ +export function clamp(value: number, min: number, max: number): number; +/** + * Computes the Euclidean modulo of the given parameters that + * is `( ( n % m ) + m ) % m`. + * + * @param {number} n - The first parameter. + * @param {number} m - The second parameter. + * @return {number} The Euclidean modulo. + */ +export function euclideanModulo(n: number, m: number): number; +/** + * Performs a linear mapping from range `` to range `` + * for the given value. `a2` must be greater than `a1`. + * + * @param {number} x - The value to be mapped. + * @param {number} a1 - Minimum value for range A. + * @param {number} a2 - Maximum value for range A. + * @param {number} b1 - Minimum value for range B. + * @param {number} b2 - Maximum value for range B. + * @return {number} The mapped value. + */ +export function mapLinear(x: number, a1: number, a2: number, b1: number, b2: number): number; +/** + * Returns the percentage in the closed interval `[0, 1]` of the given value + * between the start and end point. + * + * @param {number} x - The start point + * @param {number} y - The end point. + * @param {number} value - A value between start and end. + * @return {number} The interpolation factor. + */ +export function inverseLerp(x: number, y: number, value: number): number; +/** + * Returns a value linearly interpolated from two known points based on the given interval - + * `t = 0` will return `x` and `t = 1` will return `y`. + * + * @param {number} x - The start point + * @param {number} y - The end point. + * @param {number} t - The interpolation factor in the closed interval `[0, 1]`. + * @return {number} The interpolated value. + */ +export function lerp(x: number, y: number, t: number): number; +/** + * Smoothly interpolate a number from `x` to `y` in a spring-like manner using a delta + * time to maintain frame rate independent movement. For details, see + * [Frame rate independent damping using lerp](http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/). + * + * @param {number} x - The current point. + * @param {number} y - The target point. + * @param {number} lambda - A higher lambda value will make the movement more sudden, + * and a lower value will make the movement more gradual. + * @param {number} dt - Delta time in seconds. + * @return {number} The interpolated value. + */ +export function damp(x: number, y: number, lambda: number, dt: number): number; +/** + * Returns a value that alternates between `0` and the given `length` parameter. + * + * @param {number} x - The value to pingpong. + * @param {number} [length=1] - The positive value the function will pingpong to. + * @return {number} The alternated value. + */ +export function pingpong(x: number, length?: number): number; +/** + * Returns a value in the range `[0,1]` that represents the percentage that `x` has + * moved between `min` and `max`, but smoothed or slowed down the closer `x` is to + * the `min` and `max`. + * + * See [Smoothstep](http://en.wikipedia.org/wiki/Smoothstep) for more details. + * + * @param {number} x - The value to evaluate based on its position between `min` and `max`. + * @param {number} min - The min value. Any `x` value below `min` will be `0`. `min` must be lower than `max`. + * @param {number} max - The max value. Any `x` value above `max` will be `1`. `max` must be greater than `min`. + * @return {number} The alternated value. + */ +export function smoothstep(x: number, min: number, max: number): number; +/** + * A [variation on smoothstep](https://en.wikipedia.org/wiki/Smoothstep#Variations) + * that has zero 1st and 2nd order derivatives at `x=0` and `x=1`. + * + * @param {number} x - The value to evaluate based on its position between `min` and `max`. + * @param {number} min - The min value. Any `x` value below `min` will be `0`. `min` must be lower than `max`. + * @param {number} max - The max value. Any `x` value above `max` will be `1`. `max` must be greater than `min`. + * @return {number} The alternated value. + */ +export function smootherstep(x: number, min: number, max: number): number; +/** + * Returns a random integer from `` interval. + * + * @param {number} low - The lower value boundary. + * @param {number} high - The upper value boundary + * @return {number} A random integer. + */ +export function randInt(low: number, high: number): number; +/** + * Returns a random float from `` interval. + * + * @param {number} low - The lower value boundary. + * @param {number} high - The upper value boundary + * @return {number} A random float. + */ +export function randFloat(low: number, high: number): number; +/** + * Returns a random integer from `<-range/2, range/2>` interval. + * + * @param {number} range - Defines the value range. + * @return {number} A random float. + */ +export function randFloatSpread(range: number): number; +/** + * Returns a deterministic pseudo-random float in the interval `[0, 1]`. + * + * @param {number} [s] - The integer seed. + * @return {number} A random float. + */ +export function seededRandom(s?: number): number; +/** + * Converts degrees to radians. + * + * @param {number} degrees - A value in degrees. + * @return {number} The converted value in radians. + */ +export function degToRad(degrees: number): number; +/** + * Converts radians to degrees. + * + * @param {number} radians - A value in radians. + * @return {number} The converted value in degrees. + */ +export function radToDeg(radians: number): number; +/** + * Returns `true` if the given number is a power of two. + * + * @param {number} value - The value to check. + * @return {boolean} Whether the given number is a power of two or not. + */ +export function isPowerOfTwo(value: number): boolean; +/** + * Returns the smallest power of two that is greater than or equal to the given number. + * + * @param {number} value - The value to find a POT for. Must be greater than `0`. + * @return {number} The smallest power of two that is greater than or equal to the given number. + */ +export function ceilPowerOfTwo(value: number): number; +/** + * Returns the largest power of two that is less than or equal to the given number. + * + * @param {number} value - The value to find a POT for. Must be greater than `0`. + * @return {number} The largest power of two that is less than or equal to the given number. + */ +export function floorPowerOfTwo(value: number): number; +/** + * Sets the given quaternion from the [Intrinsic Proper Euler Angles](https://en.wikipedia.org/wiki/Euler_angles) + * defined by the given angles and order. + * + * Rotations are applied to the axes in the order specified by order: + * rotation by angle `a` is applied first, then by angle `b`, then by angle `c`. + * + * @param {Quaternion} q - The quaternion to set. + * @param {number} a - The rotation applied to the first axis, in radians. + * @param {number} b - The rotation applied to the second axis, in radians. + * @param {number} c - The rotation applied to the third axis, in radians. + * @param {('XYX'|'XZX'|'YXY'|'YZY'|'ZXZ'|'ZYZ')} order - A string specifying the axes order. + */ +export function setQuaternionFromProperEuler(q: Quaternion, a: number, b: number, c: number, order: ("XYX" | "XZX" | "YXY" | "YZY" | "ZXZ" | "ZYZ")): void; +/** + * Normalizes the given value according to the given typed array. + * + * @param {number} value - The float value in the range `[0,1]` to normalize. + * @param {TypedArray} array - The typed array that defines the data type of the value. + * @return {number} The normalize value. + */ +export function normalize(value: number, array: TypedArray): number; +/** + * Denormalizes the given value according to the given typed array. + * + * @param {number} value - The value to denormalize. + * @param {TypedArray} array - The typed array that defines the data type of the value. + * @return {number} The denormalize (float) value in the range `[0,1]`. + */ +export function denormalize(value: number, array: TypedArray): number; +export namespace MathUtils { + export { DEG2RAD }; + export { RAD2DEG }; + export { generateUUID }; + export { clamp }; + export { euclideanModulo }; + export { mapLinear }; + export { inverseLerp }; + export { lerp }; + export { damp }; + export { pingpong }; + export { smoothstep }; + export { smootherstep }; + export { randInt }; + export { randFloat }; + export { randFloatSpread }; + export { seededRandom }; + export { degToRad }; + export { radToDeg }; + export { isPowerOfTwo }; + export { ceilPowerOfTwo }; + export { floorPowerOfTwo }; + export { setQuaternionFromProperEuler }; + export { normalize }; + export { denormalize }; +} diff --git a/jsdoc-testing/jsdoc/src/math/Matrix2.d.ts b/jsdoc-testing/jsdoc/src/math/Matrix2.d.ts new file mode 100644 index 000000000..7eac72d0b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/Matrix2.d.ts @@ -0,0 +1,70 @@ +/** + * Represents a 2x2 matrix. + * + * A Note on Row-Major and Column-Major Ordering: + * + * The constructor and {@link Matrix2#set} method take arguments in + * [row-major](https://en.wikipedia.org/wiki/Row-_and_column-major_order#Column-major_order) + * order, while internally they are stored in the {@link Matrix2#elements} array in column-major order. + * This means that calling: + * ```js + * const m = new THREE.Matrix2(); + * m.set( 11, 12, + * 21, 22 ); + * ``` + * will result in the elements array containing: + * ```js + * m.elements = [ 11, 21, + * 12, 22 ]; + * ``` + * and internally all calculations are performed using column-major ordering. + * However, as the actual ordering makes no difference mathematically and + * most people are used to thinking about matrices in row-major order, the + * three.js documentation shows matrices in row-major order. Just bear in + * mind that if you are reading the source code, you'll have to take the + * transpose of any matrices outlined here to make sense of the calculations. + */ +export class Matrix2 { + /** + * Constructs a new 2x2 matrix. The arguments are supposed to be + * in row-major order. If no arguments are provided, the constructor + * initializes the matrix as an identity matrix. + * + * @param {number} [n11] - 1-1 matrix element. + * @param {number} [n12] - 1-2 matrix element. + * @param {number} [n21] - 2-1 matrix element. + * @param {number} [n22] - 2-2 matrix element. + */ + constructor(n11?: number, n12?: number, n21?: number, n22?: number); + /** + * A column-major list of matrix values. + * + * @type {Array} + */ + elements: Array; + /** + * Sets this matrix to the 2x2 identity matrix. + * + * @return {Matrix2} A reference to this matrix. + */ + identity(): Matrix2; + /** + * Sets the elements of the matrix from the given array. + * + * @param {Array} array - The matrix elements in column-major order. + * @param {number} [offset=0] - Index of the first element in the array. + * @return {Matrix2} A reference to this matrix. + */ + fromArray(array: Array, offset?: number): Matrix2; + /** + * Sets the elements of the matrix.The arguments are supposed to be + * in row-major order. + * + * @param {number} n11 - 1-1 matrix element. + * @param {number} n12 - 1-2 matrix element. + * @param {number} n21 - 2-1 matrix element. + * @param {number} n22 - 2-2 matrix element. + * @return {Matrix2} A reference to this matrix. + */ + set(n11: number, n12: number, n21: number, n22: number): Matrix2; +} diff --git a/jsdoc-testing/jsdoc/src/math/Matrix3.d.ts b/jsdoc-testing/jsdoc/src/math/Matrix3.d.ts new file mode 100644 index 000000000..0aea68708 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/Matrix3.d.ts @@ -0,0 +1,251 @@ +/** + * Represents a 3x3 matrix. + * + * A Note on Row-Major and Column-Major Ordering: + * + * The constructor and {@link Matrix3#set} method take arguments in + * [row-major](https://en.wikipedia.org/wiki/Row-_and_column-major_order#Column-major_order) + * order, while internally they are stored in the {@link Matrix3#elements} array in column-major order. + * This means that calling: + * ```js + * const m = new THREE.Matrix(); + * m.set( 11, 12, 13, + * 21, 22, 23, + * 31, 32, 33 ); + * ``` + * will result in the elements array containing: + * ```js + * m.elements = [ 11, 21, 31, + * 12, 22, 32, + * 13, 23, 33 ]; + * ``` + * and internally all calculations are performed using column-major ordering. + * However, as the actual ordering makes no difference mathematically and + * most people are used to thinking about matrices in row-major order, the + * three.js documentation shows matrices in row-major order. Just bear in + * mind that if you are reading the source code, you'll have to take the + * transpose of any matrices outlined here to make sense of the calculations. + */ +export class Matrix3 { + /** + * Constructs a new 3x3 matrix. The arguments are supposed to be + * in row-major order. If no arguments are provided, the constructor + * initializes the matrix as an identity matrix. + * + * @param {number} [n11] - 1-1 matrix element. + * @param {number} [n12] - 1-2 matrix element. + * @param {number} [n13] - 1-3 matrix element. + * @param {number} [n21] - 2-1 matrix element. + * @param {number} [n22] - 2-2 matrix element. + * @param {number} [n23] - 2-3 matrix element. + * @param {number} [n31] - 3-1 matrix element. + * @param {number} [n32] - 3-2 matrix element. + * @param {number} [n33] - 3-3 matrix element. + */ + constructor(n11?: number, n12?: number, n13?: number, n21?: number, n22?: number, n23?: number, n31?: number, n32?: number, n33?: number); + /** + * A column-major list of matrix values. + * + * @type {Array} + */ + elements: Array; + /** + * Sets the elements of the matrix.The arguments are supposed to be + * in row-major order. + * + * @param {number} [n11] - 1-1 matrix element. + * @param {number} [n12] - 1-2 matrix element. + * @param {number} [n13] - 1-3 matrix element. + * @param {number} [n21] - 2-1 matrix element. + * @param {number} [n22] - 2-2 matrix element. + * @param {number} [n23] - 2-3 matrix element. + * @param {number} [n31] - 3-1 matrix element. + * @param {number} [n32] - 3-2 matrix element. + * @param {number} [n33] - 3-3 matrix element. + * @return {Matrix3} A reference to this matrix. + */ + set(n11?: number, n12?: number, n13?: number, n21?: number, n22?: number, n23?: number, n31?: number, n32?: number, n33?: number): Matrix3; + /** + * Sets this matrix to the 3x3 identity matrix. + * + * @return {Matrix3} A reference to this matrix. + */ + identity(): Matrix3; + /** + * Copies the values of the given matrix to this instance. + * + * @param {Matrix3} m - The matrix to copy. + * @return {Matrix3} A reference to this matrix. + */ + copy(m: Matrix3): Matrix3; + /** + * Extracts the basis of this matrix into the three axis vectors provided. + * + * @param {Vector3} xAxis - The basis's x axis. + * @param {Vector3} yAxis - The basis's y axis. + * @param {Vector3} zAxis - The basis's z axis. + * @return {Matrix3} A reference to this matrix. + */ + extractBasis(xAxis: Vector3, yAxis: Vector3, zAxis: Vector3): Matrix3; + /** + * Set this matrix to the upper 3x3 matrix of the given 4x4 matrix. + * + * @param {Matrix4} m - The 4x4 matrix. + * @return {Matrix3} A reference to this matrix. + */ + setFromMatrix4(m: Matrix4): Matrix3; + /** + * Post-multiplies this matrix by the given 3x3 matrix. + * + * @param {Matrix3} m - The matrix to multiply with. + * @return {Matrix3} A reference to this matrix. + */ + multiply(m: Matrix3): Matrix3; + /** + * Pre-multiplies this matrix by the given 3x3 matrix. + * + * @param {Matrix3} m - The matrix to multiply with. + * @return {Matrix3} A reference to this matrix. + */ + premultiply(m: Matrix3): Matrix3; + /** + * Multiples the given 3x3 matrices and stores the result + * in this matrix. + * + * @param {Matrix3} a - The first matrix. + * @param {Matrix3} b - The second matrix. + * @return {Matrix3} A reference to this matrix. + */ + multiplyMatrices(a: Matrix3, b: Matrix3): Matrix3; + /** + * Multiplies every component of the matrix by the given scalar. + * + * @param {number} s - The scalar. + * @return {Matrix3} A reference to this matrix. + */ + multiplyScalar(s: number): Matrix3; + /** + * Computes and returns the determinant of this matrix. + * + * @return {number} The determinant. + */ + determinant(): number; + /** + * Inverts this matrix, using the [analytic method](https://en.wikipedia.org/wiki/Invertible_matrix#Analytic_solution). + * You can not invert with a determinant of zero. If you attempt this, the method produces + * a zero matrix instead. + * + * @return {Matrix3} A reference to this matrix. + */ + invert(): Matrix3; + /** + * Transposes this matrix in place. + * + * @return {Matrix3} A reference to this matrix. + */ + transpose(): Matrix3; + /** + * Computes the normal matrix which is the inverse transpose of the upper + * left 3x3 portion of the given 4x4 matrix. + * + * @param {Matrix4} matrix4 - The 4x4 matrix. + * @return {Matrix3} A reference to this matrix. + */ + getNormalMatrix(matrix4: Matrix4): Matrix3; + /** + * Transposes this matrix into the supplied array, and returns itself unchanged. + * + * @param {Array} r - An array to store the transposed matrix elements. + * @return {Matrix3} A reference to this matrix. + */ + transposeIntoArray(r: Array): Matrix3; + /** + * Sets the UV transform matrix from offset, repeat, rotation, and center. + * + * @param {number} tx - Offset x. + * @param {number} ty - Offset y. + * @param {number} sx - Repeat x. + * @param {number} sy - Repeat y. + * @param {number} rotation - Rotation, in radians. Positive values rotate counterclockwise. + * @param {number} cx - Center x of rotation. + * @param {number} cy - Center y of rotation + * @return {Matrix3} A reference to this matrix. + */ + setUvTransform(tx: number, ty: number, sx: number, sy: number, rotation: number, cx: number, cy: number): Matrix3; + /** + * Scales this matrix with the given scalar values. + * + * @param {number} sx - The amount to scale in the X axis. + * @param {number} sy - The amount to scale in the Y axis. + * @return {Matrix3} A reference to this matrix. + */ + scale(sx: number, sy: number): Matrix3; + /** + * Rotates this matrix by the given angle. + * + * @param {number} theta - The rotation in radians. + * @return {Matrix3} A reference to this matrix. + */ + rotate(theta: number): Matrix3; + /** + * Translates this matrix by the given scalar values. + * + * @param {number} tx - The amount to translate in the X axis. + * @param {number} ty - The amount to translate in the Y axis. + * @return {Matrix3} A reference to this matrix. + */ + translate(tx: number, ty: number): Matrix3; + /** + * Sets this matrix as a 2D translation transform. + * + * @param {number|Vector2} x - The amount to translate in the X axis or alternatively a translation vector. + * @param {number} y - The amount to translate in the Y axis. + * @return {Matrix3} A reference to this matrix. + */ + makeTranslation(x: number | Vector2, y: number): Matrix3; + /** + * Sets this matrix as a 2D rotational transformation. + * + * @param {number} theta - The rotation in radians. + * @return {Matrix3} A reference to this matrix. + */ + makeRotation(theta: number): Matrix3; + /** + * Sets this matrix as a 2D scale transform. + * + * @param {number} x - The amount to scale in the X axis. + * @param {number} y - The amount to scale in the Y axis. + * @return {Matrix3} A reference to this matrix. + */ + makeScale(x: number, y: number): Matrix3; + /** + * Returns `true` if this matrix is equal with the given one. + * + * @param {Matrix3} matrix - The matrix to test for equality. + * @return {boolean} Whether this matrix is equal with the given one. + */ + equals(matrix: Matrix3): boolean; + /** + * Sets the elements of the matrix from the given array. + * + * @param {Array} array - The matrix elements in column-major order. + * @param {number} [offset=0] - Index of the first element in the array. + * @return {Matrix3} A reference to this matrix. + */ + fromArray(array: Array, offset?: number): Matrix3; + /** + * Writes the elements of this matrix to the given array. If no array is provided, + * the method returns a new instance. + * + * @param {Array} [array=[]] - The target array holding the matrix elements in column-major order. + * @param {number} [offset=0] - Index of the first element in the array. + * @return {Array} The matrix elements in column-major order. + */ + toArray(array?: Array, offset?: number): Array; + /** + * Returns a matrix with copied values from this instance. + * + * @return {Matrix3} A clone of this instance. + */ + clone(): Matrix3; +} diff --git a/jsdoc-testing/jsdoc/src/math/Matrix4.d.ts b/jsdoc-testing/jsdoc/src/math/Matrix4.d.ts new file mode 100644 index 000000000..6f15181df --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/Matrix4.d.ts @@ -0,0 +1,404 @@ +/** + * Represents a 4x4 matrix. + * + * The most common use of a 4x4 matrix in 3D computer graphics is as a transformation matrix. + * For an introduction to transformation matrices as used in WebGL, check out [this tutorial](https://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices) + * + * This allows a 3D vector representing a point in 3D space to undergo + * transformations such as translation, rotation, shear, scale, reflection, + * orthogonal or perspective projection and so on, by being multiplied by the + * matrix. This is known as `applying` the matrix to the vector. + * + * A Note on Row-Major and Column-Major Ordering: + * + * The constructor and {@link Matrix3#set} method take arguments in + * [row-major](https://en.wikipedia.org/wiki/Row-_and_column-major_order#Column-major_order) + * order, while internally they are stored in the {@link Matrix3#elements} array in column-major order. + * This means that calling: + * ```js + * const m = new THREE.Matrix4(); + * m.set( 11, 12, 13, 14, + * 21, 22, 23, 24, + * 31, 32, 33, 34, + * 41, 42, 43, 44 ); + * ``` + * will result in the elements array containing: + * ```js + * m.elements = [ 11, 21, 31, 41, + * 12, 22, 32, 42, + * 13, 23, 33, 43, + * 14, 24, 34, 44 ]; + * ``` + * and internally all calculations are performed using column-major ordering. + * However, as the actual ordering makes no difference mathematically and + * most people are used to thinking about matrices in row-major order, the + * three.js documentation shows matrices in row-major order. Just bear in + * mind that if you are reading the source code, you'll have to take the + * transpose of any matrices outlined here to make sense of the calculations. + */ +export class Matrix4 { + /** + * Constructs a new 4x4 matrix. The arguments are supposed to be + * in row-major order. If no arguments are provided, the constructor + * initializes the matrix as an identity matrix. + * + * @param {number} [n11] - 1-1 matrix element. + * @param {number} [n12] - 1-2 matrix element. + * @param {number} [n13] - 1-3 matrix element. + * @param {number} [n14] - 1-4 matrix element. + * @param {number} [n21] - 2-1 matrix element. + * @param {number} [n22] - 2-2 matrix element. + * @param {number} [n23] - 2-3 matrix element. + * @param {number} [n24] - 2-4 matrix element. + * @param {number} [n31] - 3-1 matrix element. + * @param {number} [n32] - 3-2 matrix element. + * @param {number} [n33] - 3-3 matrix element. + * @param {number} [n34] - 3-4 matrix element. + * @param {number} [n41] - 4-1 matrix element. + * @param {number} [n42] - 4-2 matrix element. + * @param {number} [n43] - 4-3 matrix element. + * @param {number} [n44] - 4-4 matrix element. + */ + constructor(n11?: number, n12?: number, n13?: number, n14?: number, n21?: number, n22?: number, n23?: number, n24?: number, n31?: number, n32?: number, n33?: number, n34?: number, n41?: number, n42?: number, n43?: number, n44?: number); + /** + * A column-major list of matrix values. + * + * @type {Array} + */ + elements: Array; + /** + * Sets the elements of the matrix.The arguments are supposed to be + * in row-major order. + * + * @param {number} [n11] - 1-1 matrix element. + * @param {number} [n12] - 1-2 matrix element. + * @param {number} [n13] - 1-3 matrix element. + * @param {number} [n14] - 1-4 matrix element. + * @param {number} [n21] - 2-1 matrix element. + * @param {number} [n22] - 2-2 matrix element. + * @param {number} [n23] - 2-3 matrix element. + * @param {number} [n24] - 2-4 matrix element. + * @param {number} [n31] - 3-1 matrix element. + * @param {number} [n32] - 3-2 matrix element. + * @param {number} [n33] - 3-3 matrix element. + * @param {number} [n34] - 3-4 matrix element. + * @param {number} [n41] - 4-1 matrix element. + * @param {number} [n42] - 4-2 matrix element. + * @param {number} [n43] - 4-3 matrix element. + * @param {number} [n44] - 4-4 matrix element. + * @return {Matrix4} A reference to this matrix. + */ + set(n11?: number, n12?: number, n13?: number, n14?: number, n21?: number, n22?: number, n23?: number, n24?: number, n31?: number, n32?: number, n33?: number, n34?: number, n41?: number, n42?: number, n43?: number, n44?: number): Matrix4; + /** + * Sets this matrix to the 4x4 identity matrix. + * + * @return {Matrix4} A reference to this matrix. + */ + identity(): Matrix4; + /** + * Returns a matrix with copied values from this instance. + * + * @return {Matrix4} A clone of this instance. + */ + clone(): Matrix4; + /** + * Copies the values of the given matrix to this instance. + * + * @param {Matrix4} m - The matrix to copy. + * @return {Matrix4} A reference to this matrix. + */ + copy(m: Matrix4): Matrix4; + /** + * Copies the translation component of the given matrix + * into this matrix's translation component. + * + * @param {Matrix4} m - The matrix to copy the translation component. + * @return {Matrix4} A reference to this matrix. + */ + copyPosition(m: Matrix4): Matrix4; + /** + * Set the upper 3x3 elements of this matrix to the values of given 3x3 matrix. + * + * @param {Matrix3} m - The 3x3 matrix. + * @return {Matrix4} A reference to this matrix. + */ + setFromMatrix3(m: Matrix3): Matrix4; + /** + * Extracts the basis of this matrix into the three axis vectors provided. + * + * @param {Vector3} xAxis - The basis's x axis. + * @param {Vector3} yAxis - The basis's y axis. + * @param {Vector3} zAxis - The basis's z axis. + * @return {Matrix4} A reference to this matrix. + */ + extractBasis(xAxis: Vector3, yAxis: Vector3, zAxis: Vector3): Matrix4; + /** + * Sets the given basis vectors to this matrix. + * + * @param {Vector3} xAxis - The basis's x axis. + * @param {Vector3} yAxis - The basis's y axis. + * @param {Vector3} zAxis - The basis's z axis. + * @return {Matrix4} A reference to this matrix. + */ + makeBasis(xAxis: Vector3, yAxis: Vector3, zAxis: Vector3): Matrix4; + /** + * Extracts the rotation component of the given matrix + * into this matrix's rotation component. + * + * Note: This method does not support reflection matrices. + * + * @param {Matrix4} m - The matrix. + * @return {Matrix4} A reference to this matrix. + */ + extractRotation(m: Matrix4): Matrix4; + /** + * Sets the rotation component (the upper left 3x3 matrix) of this matrix to + * the rotation specified by the given Euler angles. The rest of + * the matrix is set to the identity. Depending on the {@link Euler#order}, + * there are six possible outcomes. See [this page](https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix) + * for a complete list. + * + * @param {Euler} euler - The Euler angles. + * @return {Matrix4} A reference to this matrix. + */ + makeRotationFromEuler(euler: Euler): Matrix4; + /** + * Sets the rotation component of this matrix to the rotation specified by + * the given Quaternion as outlined [here](https://en.wikipedia.org/wiki/Rotation_matrix#Quaternion) + * The rest of the matrix is set to the identity. + * + * @param {Quaternion} q - The Quaternion. + * @return {Matrix4} A reference to this matrix. + */ + makeRotationFromQuaternion(q: Quaternion): Matrix4; + /** + * Sets the rotation component of the transformation matrix, looking from `eye` towards + * `target`, and oriented by the up-direction. + * + * @param {Vector3} eye - The eye vector. + * @param {Vector3} target - The target vector. + * @param {Vector3} up - The up vector. + * @return {Matrix4} A reference to this matrix. + */ + lookAt(eye: Vector3, target: Vector3, up: Vector3): Matrix4; + /** + * Post-multiplies this matrix by the given 4x4 matrix. + * + * @param {Matrix4} m - The matrix to multiply with. + * @return {Matrix4} A reference to this matrix. + */ + multiply(m: Matrix4): Matrix4; + /** + * Pre-multiplies this matrix by the given 4x4 matrix. + * + * @param {Matrix4} m - The matrix to multiply with. + * @return {Matrix4} A reference to this matrix. + */ + premultiply(m: Matrix4): Matrix4; + /** + * Multiples the given 4x4 matrices and stores the result + * in this matrix. + * + * @param {Matrix4} a - The first matrix. + * @param {Matrix4} b - The second matrix. + * @return {Matrix4} A reference to this matrix. + */ + multiplyMatrices(a: Matrix4, b: Matrix4): Matrix4; + /** + * Multiplies every component of the matrix by the given scalar. + * + * @param {number} s - The scalar. + * @return {Matrix4} A reference to this matrix. + */ + multiplyScalar(s: number): Matrix4; + /** + * Computes and returns the determinant of this matrix. + * + * Based on the method outlined [here](http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.html). + * + * @return {number} The determinant. + */ + determinant(): number; + /** + * Transposes this matrix in place. + * + * @return {Matrix4} A reference to this matrix. + */ + transpose(): Matrix4; + /** + * Sets the position component for this matrix from the given vector, + * without affecting the rest of the matrix. + * + * @param {number|Vector3} x - The x component of the vector or alternatively the vector object. + * @param {number} y - The y component of the vector. + * @param {number} z - The z component of the vector. + * @return {Matrix4} A reference to this matrix. + */ + setPosition(x: number | Vector3, y: number, z: number): Matrix4; + /** + * Inverts this matrix, using the [analytic method](https://en.wikipedia.org/wiki/Invertible_matrix#Analytic_solution). + * You can not invert with a determinant of zero. If you attempt this, the method produces + * a zero matrix instead. + * + * @return {Matrix4} A reference to this matrix. + */ + invert(): Matrix4; + /** + * Multiplies the columns of this matrix by the given vector. + * + * @param {Vector3} v - The scale vector. + * @return {Matrix4} A reference to this matrix. + */ + scale(v: Vector3): Matrix4; + /** + * Gets the maximum scale value of the three axes. + * + * @return {number} The maximum scale. + */ + getMaxScaleOnAxis(): number; + /** + * Sets this matrix as a translation transform from the given vector. + * + * @param {number|Vector3} x - The amount to translate in the X axis or alternatively a translation vector. + * @param {number} y - The amount to translate in the Y axis. + * @param {number} z - The amount to translate in the z axis. + * @return {Matrix4} A reference to this matrix. + */ + makeTranslation(x: number | Vector3, y: number, z: number): Matrix4; + /** + * Sets this matrix as a rotational transformation around the X axis by + * the given angle. + * + * @param {number} theta - The rotation in radians. + * @return {Matrix4} A reference to this matrix. + */ + makeRotationX(theta: number): Matrix4; + /** + * Sets this matrix as a rotational transformation around the Y axis by + * the given angle. + * + * @param {number} theta - The rotation in radians. + * @return {Matrix4} A reference to this matrix. + */ + makeRotationY(theta: number): Matrix4; + /** + * Sets this matrix as a rotational transformation around the Z axis by + * the given angle. + * + * @param {number} theta - The rotation in radians. + * @return {Matrix4} A reference to this matrix. + */ + makeRotationZ(theta: number): Matrix4; + /** + * Sets this matrix as a rotational transformation around the given axis by + * the given angle. + * + * This is a somewhat controversial but mathematically sound alternative to + * rotating via Quaternions. See the discussion [here](https://www.gamedev.net/articles/programming/math-and-physics/do-we-really-need-quaternions-r1199). + * + * @param {Vector3} axis - The normalized rotation axis. + * @param {number} angle - The rotation in radians. + * @return {Matrix4} A reference to this matrix. + */ + makeRotationAxis(axis: Vector3, angle: number): Matrix4; + /** + * Sets this matrix as a scale transformation. + * + * @param {number} x - The amount to scale in the X axis. + * @param {number} y - The amount to scale in the Y axis. + * @param {number} z - The amount to scale in the Z axis. + * @return {Matrix4} A reference to this matrix. + */ + makeScale(x: number, y: number, z: number): Matrix4; + /** + * Sets this matrix as a shear transformation. + * + * @param {number} xy - The amount to shear X by Y. + * @param {number} xz - The amount to shear X by Z. + * @param {number} yx - The amount to shear Y by X. + * @param {number} yz - The amount to shear Y by Z. + * @param {number} zx - The amount to shear Z by X. + * @param {number} zy - The amount to shear Z by Y. + * @return {Matrix4} A reference to this matrix. + */ + makeShear(xy: number, xz: number, yx: number, yz: number, zx: number, zy: number): Matrix4; + /** + * Sets this matrix to the transformation composed of the given position, + * rotation (Quaternion) and scale. + * + * @param {Vector3} position - The position vector. + * @param {Quaternion} quaternion - The rotation as a Quaternion. + * @param {Vector3} scale - The scale vector. + * @return {Matrix4} A reference to this matrix. + */ + compose(position: Vector3, quaternion: Quaternion, scale: Vector3): Matrix4; + /** + * Decomposes this matrix into its position, rotation and scale components + * and provides the result in the given objects. + * + * Note: Not all matrices are decomposable in this way. For example, if an + * object has a non-uniformly scaled parent, then the object's world matrix + * may not be decomposable, and this method may not be appropriate. + * + * @param {Vector3} position - The position vector. + * @param {Quaternion} quaternion - The rotation as a Quaternion. + * @param {Vector3} scale - The scale vector. + * @return {Matrix4} A reference to this matrix. + */ + decompose(position: Vector3, quaternion: Quaternion, scale: Vector3): Matrix4; + /** + * Creates a perspective projection matrix. This is used internally by + * {@link PerspectiveCamera#updateProjectionMatrix}. + + * @param {number} left - Left boundary of the viewing frustum at the near plane. + * @param {number} right - Right boundary of the viewing frustum at the near plane. + * @param {number} top - Top boundary of the viewing frustum at the near plane. + * @param {number} bottom - Bottom boundary of the viewing frustum at the near plane. + * @param {number} near - The distance from the camera to the near plane. + * @param {number} far - The distance from the camera to the far plane. + * @param {(WebGLCoordinateSystem|WebGPUCoordinateSystem)} [coordinateSystem=WebGLCoordinateSystem] - The coordinate system. + * @param {boolean} [reversedDepth=false] - Whether to use a reversed depth. + * @return {Matrix4} A reference to this matrix. + */ + makePerspective(left: number, right: number, top: number, bottom: number, near: number, far: number, coordinateSystem?: (number | number), reversedDepth?: boolean): Matrix4; + /** + * Creates a orthographic projection matrix. This is used internally by + * {@link OrthographicCamera#updateProjectionMatrix}. + + * @param {number} left - Left boundary of the viewing frustum at the near plane. + * @param {number} right - Right boundary of the viewing frustum at the near plane. + * @param {number} top - Top boundary of the viewing frustum at the near plane. + * @param {number} bottom - Bottom boundary of the viewing frustum at the near plane. + * @param {number} near - The distance from the camera to the near plane. + * @param {number} far - The distance from the camera to the far plane. + * @param {(WebGLCoordinateSystem|WebGPUCoordinateSystem)} [coordinateSystem=WebGLCoordinateSystem] - The coordinate system. + * @param {boolean} [reversedDepth=false] - Whether to use a reversed depth. + * @return {Matrix4} A reference to this matrix. + */ + makeOrthographic(left: number, right: number, top: number, bottom: number, near: number, far: number, coordinateSystem?: (number | number), reversedDepth?: boolean): Matrix4; + /** + * Returns `true` if this matrix is equal with the given one. + * + * @param {Matrix4} matrix - The matrix to test for equality. + * @return {boolean} Whether this matrix is equal with the given one. + */ + equals(matrix: Matrix4): boolean; + /** + * Sets the elements of the matrix from the given array. + * + * @param {Array} array - The matrix elements in column-major order. + * @param {number} [offset=0] - Index of the first element in the array. + * @return {Matrix4} A reference to this matrix. + */ + fromArray(array: Array, offset?: number): Matrix4; + /** + * Writes the elements of this matrix to the given array. If no array is provided, + * the method returns a new instance. + * + * @param {Array} [array=[]] - The target array holding the matrix elements in column-major order. + * @param {number} [offset=0] - Index of the first element in the array. + * @return {Array} The matrix elements in column-major order. + */ + toArray(array?: Array, offset?: number): Array; +} +import { Vector3 } from './Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Plane.d.ts b/jsdoc-testing/jsdoc/src/math/Plane.d.ts new file mode 100644 index 000000000..1c49071b2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/Plane.d.ts @@ -0,0 +1,190 @@ +/** + * A two dimensional surface that extends infinitely in 3D space, represented + * in [Hessian normal form](http://mathworld.wolfram.com/HessianNormalForm.html) + * by a unit length normal vector and a constant. + */ +export class Plane { + /** + * Constructs a new plane. + * + * @param {Vector3} [normal=(1,0,0)] - A unit length vector defining the normal of the plane. + * @param {number} [constant=0] - The signed distance from the origin to the plane. + */ + constructor(normal?: Vector3, constant?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isPlane: boolean; + /** + * A unit length vector defining the normal of the plane. + * + * @type {Vector3} + */ + normal: Vector3; + /** + * The signed distance from the origin to the plane. + * + * @type {number} + * @default 0 + */ + constant: number; + /** + * Sets the plane components by copying the given values. + * + * @param {Vector3} normal - The normal. + * @param {number} constant - The constant. + * @return {Plane} A reference to this plane. + */ + set(normal: Vector3, constant: number): Plane; + /** + * Sets the plane components by defining `x`, `y`, `z` as the + * plane normal and `w` as the constant. + * + * @param {number} x - The value for the normal's x component. + * @param {number} y - The value for the normal's y component. + * @param {number} z - The value for the normal's z component. + * @param {number} w - The constant value. + * @return {Plane} A reference to this plane. + */ + setComponents(x: number, y: number, z: number, w: number): Plane; + /** + * Sets the plane from the given normal and coplanar point (that is a point + * that lies onto the plane). + * + * @param {Vector3} normal - The normal. + * @param {Vector3} point - A coplanar point. + * @return {Plane} A reference to this plane. + */ + setFromNormalAndCoplanarPoint(normal: Vector3, point: Vector3): Plane; + /** + * Sets the plane from three coplanar points. The winding order is + * assumed to be counter-clockwise, and determines the direction of + * the plane normal. + * + * @param {Vector3} a - The first coplanar point. + * @param {Vector3} b - The second coplanar point. + * @param {Vector3} c - The third coplanar point. + * @return {Plane} A reference to this plane. + */ + setFromCoplanarPoints(a: Vector3, b: Vector3, c: Vector3): Plane; + /** + * Copies the values of the given plane to this instance. + * + * @param {Plane} plane - The plane to copy. + * @return {Plane} A reference to this plane. + */ + copy(plane: Plane): Plane; + /** + * Normalizes the plane normal and adjusts the constant accordingly. + * + * @return {Plane} A reference to this plane. + */ + normalize(): Plane; + /** + * Negates both the plane normal and the constant. + * + * @return {Plane} A reference to this plane. + */ + negate(): Plane; + /** + * Returns the signed distance from the given point to this plane. + * + * @param {Vector3} point - The point to compute the distance for. + * @return {number} The signed distance. + */ + distanceToPoint(point: Vector3): number; + /** + * Returns the signed distance from the given sphere to this plane. + * + * @param {Sphere} sphere - The sphere to compute the distance for. + * @return {number} The signed distance. + */ + distanceToSphere(sphere: Sphere): number; + /** + * Projects a the given point onto the plane. + * + * @param {Vector3} point - The point to project. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The projected point on the plane. + */ + projectPoint(point: Vector3, target: Vector3): Vector3; + /** + * Returns the intersection point of the passed line and the plane. Returns + * `null` if the line does not intersect. Returns the line's starting point if + * the line is coplanar with the plane. + * + * @param {Line3} line - The line to compute the intersection for. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @param {boolean} [clampToLine=true] - Whether to clamp the intersection to the line segment. + * @return {?Vector3} The intersection point. Returns `null` if no intersection is detected. + */ + intersectLine(line: Line3, target: Vector3, clampToLine?: boolean): Vector3 | null; + /** + * Returns `true` if the given line segment intersects with (passes through) the plane. + * + * @param {Line3} line - The line to test. + * @return {boolean} Whether the given line segment intersects with the plane or not. + */ + intersectsLine(line: Line3): boolean; + /** + * Returns `true` if the given bounding box intersects with the plane. + * + * @param {Box3} box - The bounding box to test. + * @return {boolean} Whether the given bounding box intersects with the plane or not. + */ + intersectsBox(box: Box3): boolean; + /** + * Returns `true` if the given bounding sphere intersects with the plane. + * + * @param {Sphere} sphere - The bounding sphere to test. + * @return {boolean} Whether the given bounding sphere intersects with the plane or not. + */ + intersectsSphere(sphere: Sphere): boolean; + /** + * Returns a coplanar vector to the plane, by calculating the + * projection of the normal at the origin onto the plane. + * + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The coplanar point. + */ + coplanarPoint(target: Vector3): Vector3; + /** + * Apply a 4x4 matrix to the plane. The matrix must be an affine, homogeneous transform. + * + * The optional normal matrix can be pre-computed like so: + * ```js + * const optionalNormalMatrix = new THREE.Matrix3().getNormalMatrix( matrix ); + * ``` + * + * @param {Matrix4} matrix - The transformation matrix. + * @param {Matrix4} [optionalNormalMatrix] - A pre-computed normal matrix. + * @return {Plane} A reference to this plane. + */ + applyMatrix4(matrix: Matrix4, optionalNormalMatrix?: Matrix4): Plane; + /** + * Translates the plane by the distance defined by the given offset vector. + * Note that this only affects the plane constant and will not affect the normal vector. + * + * @param {Vector3} offset - The offset vector. + * @return {Plane} A reference to this plane. + */ + translate(offset: Vector3): Plane; + /** + * Returns `true` if this plane is equal with the given one. + * + * @param {Plane} plane - The plane to test for equality. + * @return {boolean} Whether this plane is equal with the given one. + */ + equals(plane: Plane): boolean; + /** + * Returns a new plane with copied values from this instance. + * + * @return {Plane} A clone of this instance. + */ + clone(): Plane; +} +import { Vector3 } from './Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Quaternion.d.ts b/jsdoc-testing/jsdoc/src/math/Quaternion.d.ts new file mode 100644 index 000000000..214548cde --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/Quaternion.d.ts @@ -0,0 +1,310 @@ +/** + * Class for representing a Quaternion. Quaternions are used in three.js to represent rotations. + * + * Iterating through a vector instance will yield its components `(x, y, z, w)` in + * the corresponding order. + * + * Note that three.js expects Quaternions to be normalized. + * ```js + * const quaternion = new THREE.Quaternion(); + * quaternion.setFromAxisAngle( new THREE.Vector3( 0, 1, 0 ), Math.PI / 2 ); + * + * const vector = new THREE.Vector3( 1, 0, 0 ); + * vector.applyQuaternion( quaternion ); + * ``` + */ +export class Quaternion { + /** + * Interpolates between two quaternions via SLERP. This implementation assumes the + * quaternion data are managed in flat arrays. + * + * @param {Array} dst - The destination array. + * @param {number} dstOffset - An offset into the destination array. + * @param {Array} src0 - The source array of the first quaternion. + * @param {number} srcOffset0 - An offset into the first source array. + * @param {Array} src1 - The source array of the second quaternion. + * @param {number} srcOffset1 - An offset into the second source array. + * @param {number} t - The interpolation factor. A value in the range `[0,1]` will interpolate. A value outside the range `[0,1]` will extrapolate. + * @see {@link Quaternion#slerp} + */ + static slerpFlat(dst: Array, dstOffset: number, src0: Array, srcOffset0: number, src1: Array, srcOffset1: number, t: number): void; + /** + * Multiplies two quaternions. This implementation assumes the quaternion data are managed + * in flat arrays. + * + * @param {Array} dst - The destination array. + * @param {number} dstOffset - An offset into the destination array. + * @param {Array} src0 - The source array of the first quaternion. + * @param {number} srcOffset0 - An offset into the first source array. + * @param {Array} src1 - The source array of the second quaternion. + * @param {number} srcOffset1 - An offset into the second source array. + * @return {Array} The destination array. + * @see {@link Quaternion#multiplyQuaternions}. + */ + static multiplyQuaternionsFlat(dst: Array, dstOffset: number, src0: Array, srcOffset0: number, src1: Array, srcOffset1: number): Array; + /** + * Constructs a new quaternion. + * + * @param {number} [x=0] - The x value of this quaternion. + * @param {number} [y=0] - The y value of this quaternion. + * @param {number} [z=0] - The z value of this quaternion. + * @param {number} [w=1] - The w value of this quaternion. + */ + constructor(x?: number, y?: number, z?: number, w?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isQuaternion: boolean; + _x: number; + _y: number; + _z: number; + _w: number; + set x(value: number); + /** + * The x value of this quaternion. + * + * @type {number} + * @default 0 + */ + get x(): number; + set y(value: number); + /** + * The y value of this quaternion. + * + * @type {number} + * @default 0 + */ + get y(): number; + set z(value: number); + /** + * The z value of this quaternion. + * + * @type {number} + * @default 0 + */ + get z(): number; + set w(value: number); + /** + * The w value of this quaternion. + * + * @type {number} + * @default 1 + */ + get w(): number; + /** + * Sets the quaternion components. + * + * @param {number} x - The x value of this quaternion. + * @param {number} y - The y value of this quaternion. + * @param {number} z - The z value of this quaternion. + * @param {number} w - The w value of this quaternion. + * @return {Quaternion} A reference to this quaternion. + */ + set(x: number, y: number, z: number, w: number): Quaternion; + /** + * Returns a new quaternion with copied values from this instance. + * + * @return {Quaternion} A clone of this instance. + */ + clone(): Quaternion; + /** + * Copies the values of the given quaternion to this instance. + * + * @param {Quaternion} quaternion - The quaternion to copy. + * @return {Quaternion} A reference to this quaternion. + */ + copy(quaternion: Quaternion): Quaternion; + /** + * Sets this quaternion from the rotation specified by the given + * Euler angles. + * + * @param {Euler} euler - The Euler angles. + * @param {boolean} [update=true] - Whether the internal `onChange` callback should be executed or not. + * @return {Quaternion} A reference to this quaternion. + */ + setFromEuler(euler: Euler, update?: boolean): Quaternion; + /** + * Sets this quaternion from the given axis and angle. + * + * @param {Vector3} axis - The normalized axis. + * @param {number} angle - The angle in radians. + * @return {Quaternion} A reference to this quaternion. + */ + setFromAxisAngle(axis: Vector3, angle: number): Quaternion; + /** + * Sets this quaternion from the given rotation matrix. + * + * @param {Matrix4} m - A 4x4 matrix of which the upper 3x3 of matrix is a pure rotation matrix (i.e. unscaled). + * @return {Quaternion} A reference to this quaternion. + */ + setFromRotationMatrix(m: Matrix4): Quaternion; + /** + * Sets this quaternion to the rotation required to rotate the direction vector + * `vFrom` to the direction vector `vTo`. + * + * @param {Vector3} vFrom - The first (normalized) direction vector. + * @param {Vector3} vTo - The second (normalized) direction vector. + * @return {Quaternion} A reference to this quaternion. + */ + setFromUnitVectors(vFrom: Vector3, vTo: Vector3): Quaternion; + /** + * Returns the angle between this quaternion and the given one in radians. + * + * @param {Quaternion} q - The quaternion to compute the angle with. + * @return {number} The angle in radians. + */ + angleTo(q: Quaternion): number; + /** + * Rotates this quaternion by a given angular step to the given quaternion. + * The method ensures that the final quaternion will not overshoot `q`. + * + * @param {Quaternion} q - The target quaternion. + * @param {number} step - The angular step in radians. + * @return {Quaternion} A reference to this quaternion. + */ + rotateTowards(q: Quaternion, step: number): Quaternion; + /** + * Sets this quaternion to the identity quaternion; that is, to the + * quaternion that represents "no rotation". + * + * @return {Quaternion} A reference to this quaternion. + */ + identity(): Quaternion; + /** + * Inverts this quaternion via {@link Quaternion#conjugate}. The + * quaternion is assumed to have unit length. + * + * @return {Quaternion} A reference to this quaternion. + */ + invert(): Quaternion; + /** + * Returns the rotational conjugate of this quaternion. The conjugate of a + * quaternion represents the same rotation in the opposite direction about + * the rotational axis. + * + * @return {Quaternion} A reference to this quaternion. + */ + conjugate(): Quaternion; + /** + * Calculates the dot product of this quaternion and the given one. + * + * @param {Quaternion} v - The quaternion to compute the dot product with. + * @return {number} The result of the dot product. + */ + dot(v: Quaternion): number; + /** + * Computes the squared Euclidean length (straight-line length) of this quaternion, + * considered as a 4 dimensional vector. This can be useful if you are comparing the + * lengths of two quaternions, as this is a slightly more efficient calculation than + * {@link Quaternion#length}. + * + * @return {number} The squared Euclidean length. + */ + lengthSq(): number; + /** + * Computes the Euclidean length (straight-line length) of this quaternion, + * considered as a 4 dimensional vector. + * + * @return {number} The Euclidean length. + */ + length(): number; + /** + * Normalizes this quaternion - that is, calculated the quaternion that performs + * the same rotation as this one, but has a length equal to `1`. + * + * @return {Quaternion} A reference to this quaternion. + */ + normalize(): Quaternion; + /** + * Multiplies this quaternion by the given one. + * + * @param {Quaternion} q - The quaternion. + * @return {Quaternion} A reference to this quaternion. + */ + multiply(q: Quaternion): Quaternion; + /** + * Pre-multiplies this quaternion by the given one. + * + * @param {Quaternion} q - The quaternion. + * @return {Quaternion} A reference to this quaternion. + */ + premultiply(q: Quaternion): Quaternion; + /** + * Multiplies the given quaternions and stores the result in this instance. + * + * @param {Quaternion} a - The first quaternion. + * @param {Quaternion} b - The second quaternion. + * @return {Quaternion} A reference to this quaternion. + */ + multiplyQuaternions(a: Quaternion, b: Quaternion): Quaternion; + /** + * Performs a spherical linear interpolation between this quaternion and the target quaternion. + * + * @param {Quaternion} qb - The target quaternion. + * @param {number} t - The interpolation factor. A value in the range `[0,1]` will interpolate. A value outside the range `[0,1]` will extrapolate. + * @return {Quaternion} A reference to this quaternion. + */ + slerp(qb: Quaternion, t: number): Quaternion; + /** + * Performs a spherical linear interpolation between the given quaternions + * and stores the result in this quaternion. + * + * @param {Quaternion} qa - The source quaternion. + * @param {Quaternion} qb - The target quaternion. + * @param {number} t - The interpolation factor in the closed interval `[0, 1]`. + * @return {Quaternion} A reference to this quaternion. + */ + slerpQuaternions(qa: Quaternion, qb: Quaternion, t: number): Quaternion; + /** + * Sets this quaternion to a uniformly random, normalized quaternion. + * + * @return {Quaternion} A reference to this quaternion. + */ + random(): Quaternion; + /** + * Returns `true` if this quaternion is equal with the given one. + * + * @param {Quaternion} quaternion - The quaternion to test for equality. + * @return {boolean} Whether this quaternion is equal with the given one. + */ + equals(quaternion: Quaternion): boolean; + /** + * Sets this quaternion's components from the given array. + * + * @param {Array} array - An array holding the quaternion component values. + * @param {number} [offset=0] - The offset into the array. + * @return {Quaternion} A reference to this quaternion. + */ + fromArray(array: Array, offset?: number): Quaternion; + /** + * Writes the components of this quaternion to the given array. If no array is provided, + * the method returns a new instance. + * + * @param {Array} [array=[]] - The target array holding the quaternion components. + * @param {number} [offset=0] - Index of the first element in the array. + * @return {Array} The quaternion components. + */ + toArray(array?: Array, offset?: number): Array; + /** + * Sets the components of this quaternion from the given buffer attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute holding quaternion data. + * @param {number} index - The index into the attribute. + * @return {Quaternion} A reference to this quaternion. + */ + fromBufferAttribute(attribute: BufferAttribute, index: number): Quaternion; + /** + * This methods defines the serialization result of this class. Returns the + * numerical elements of this quaternion in an array of format `[x, y, z, w]`. + * + * @return {Array} The serialized quaternion. + */ + toJSON(): Array; + _onChange(callback: any): this; + _onChangeCallback(): void; + [Symbol.iterator](): Generator; +} diff --git a/jsdoc-testing/jsdoc/src/math/Ray.d.ts b/jsdoc-testing/jsdoc/src/math/Ray.d.ts new file mode 100644 index 000000000..02531c54e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/Ray.d.ts @@ -0,0 +1,185 @@ +/** + * A ray that emits from an origin in a certain direction. The class is used by + * {@link Raycaster} to assist with raycasting. Raycasting is used for + * mouse picking (working out what objects in the 3D space the mouse is over) + * amongst other things. + */ +export class Ray { + /** + * Constructs a new ray. + * + * @param {Vector3} [origin=(0,0,0)] - The origin of the ray. + * @param {Vector3} [direction=(0,0,-1)] - The (normalized) direction of the ray. + */ + constructor(origin?: Vector3, direction?: Vector3); + /** + * The origin of the ray. + * + * @type {Vector3} + */ + origin: Vector3; + /** + * The (normalized) direction of the ray. + * + * @type {Vector3} + */ + direction: Vector3; + /** + * Sets the ray's components by copying the given values. + * + * @param {Vector3} origin - The origin. + * @param {Vector3} direction - The direction. + * @return {Ray} A reference to this ray. + */ + set(origin: Vector3, direction: Vector3): Ray; + /** + * Copies the values of the given ray to this instance. + * + * @param {Ray} ray - The ray to copy. + * @return {Ray} A reference to this ray. + */ + copy(ray: Ray): Ray; + /** + * Returns a vector that is located at a given distance along this ray. + * + * @param {number} t - The distance along the ray to retrieve a position for. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} A position on the ray. + */ + at(t: number, target: Vector3): Vector3; + /** + * Adjusts the direction of the ray to point at the given vector in world space. + * + * @param {Vector3} v - The target position. + * @return {Ray} A reference to this ray. + */ + lookAt(v: Vector3): Ray; + /** + * Shift the origin of this ray along its direction by the given distance. + * + * @param {number} t - The distance along the ray to interpolate. + * @return {Ray} A reference to this ray. + */ + recast(t: number): Ray; + /** + * Returns the point along this ray that is closest to the given point. + * + * @param {Vector3} point - A point in 3D space to get the closet location on the ray for. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The closest point on this ray. + */ + closestPointToPoint(point: Vector3, target: Vector3): Vector3; + /** + * Returns the distance of the closest approach between this ray and the given point. + * + * @param {Vector3} point - A point in 3D space to compute the distance to. + * @return {number} The distance. + */ + distanceToPoint(point: Vector3): number; + /** + * Returns the squared distance of the closest approach between this ray and the given point. + * + * @param {Vector3} point - A point in 3D space to compute the distance to. + * @return {number} The squared distance. + */ + distanceSqToPoint(point: Vector3): number; + /** + * Returns the squared distance between this ray and the given line segment. + * + * @param {Vector3} v0 - The start point of the line segment. + * @param {Vector3} v1 - The end point of the line segment. + * @param {Vector3} [optionalPointOnRay] - When provided, it receives the point on this ray that is closest to the segment. + * @param {Vector3} [optionalPointOnSegment] - When provided, it receives the point on the line segment that is closest to this ray. + * @return {number} The squared distance. + */ + distanceSqToSegment(v0: Vector3, v1: Vector3, optionalPointOnRay?: Vector3, optionalPointOnSegment?: Vector3): number; + /** + * Intersects this ray with the given sphere, returning the intersection + * point or `null` if there is no intersection. + * + * @param {Sphere} sphere - The sphere to intersect. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {?Vector3} The intersection point. + */ + intersectSphere(sphere: Sphere, target: Vector3): Vector3 | null; + /** + * Returns `true` if this ray intersects with the given sphere. + * + * @param {Sphere} sphere - The sphere to intersect. + * @return {boolean} Whether this ray intersects with the given sphere or not. + */ + intersectsSphere(sphere: Sphere): boolean; + /** + * Computes the distance from the ray's origin to the given plane. Returns `null` if the ray + * does not intersect with the plane. + * + * @param {Plane} plane - The plane to compute the distance to. + * @return {?number} Whether this ray intersects with the given sphere or not. + */ + distanceToPlane(plane: Plane): number | null; + /** + * Intersects this ray with the given plane, returning the intersection + * point or `null` if there is no intersection. + * + * @param {Plane} plane - The plane to intersect. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {?Vector3} The intersection point. + */ + intersectPlane(plane: Plane, target: Vector3): Vector3 | null; + /** + * Returns `true` if this ray intersects with the given plane. + * + * @param {Plane} plane - The plane to intersect. + * @return {boolean} Whether this ray intersects with the given plane or not. + */ + intersectsPlane(plane: Plane): boolean; + /** + * Intersects this ray with the given bounding box, returning the intersection + * point or `null` if there is no intersection. + * + * @param {Box3} box - The box to intersect. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {?Vector3} The intersection point. + */ + intersectBox(box: Box3, target: Vector3): Vector3 | null; + /** + * Returns `true` if this ray intersects with the given box. + * + * @param {Box3} box - The box to intersect. + * @return {boolean} Whether this ray intersects with the given box or not. + */ + intersectsBox(box: Box3): boolean; + /** + * Intersects this ray with the given triangle, returning the intersection + * point or `null` if there is no intersection. + * + * @param {Vector3} a - The first vertex of the triangle. + * @param {Vector3} b - The second vertex of the triangle. + * @param {Vector3} c - The third vertex of the triangle. + * @param {boolean} backfaceCulling - Whether to use backface culling or not. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {?Vector3} The intersection point. + */ + intersectTriangle(a: Vector3, b: Vector3, c: Vector3, backfaceCulling: boolean, target: Vector3): Vector3 | null; + /** + * Transforms this ray with the given 4x4 transformation matrix. + * + * @param {Matrix4} matrix4 - The transformation matrix. + * @return {Ray} A reference to this ray. + */ + applyMatrix4(matrix4: Matrix4): Ray; + /** + * Returns `true` if this ray is equal with the given one. + * + * @param {Ray} ray - The ray to test for equality. + * @return {boolean} Whether this ray is equal with the given one. + */ + equals(ray: Ray): boolean; + /** + * Returns a new ray with copied values from this instance. + * + * @return {Ray} A clone of this instance. + */ + clone(): Ray; +} +import { Vector3 } from './Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Sphere.d.ts b/jsdoc-testing/jsdoc/src/math/Sphere.d.ts new file mode 100644 index 000000000..5d7e4ac67 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/Sphere.d.ts @@ -0,0 +1,185 @@ +/** + * An analytical 3D sphere defined by a center and radius. This class is mainly + * used as a Bounding Sphere for 3D objects. + */ +export class Sphere { + /** + * Constructs a new sphere. + * + * @param {Vector3} [center=(0,0,0)] - The center of the sphere + * @param {number} [radius=-1] - The radius of the sphere. + */ + constructor(center?: Vector3, radius?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSphere: boolean; + /** + * The center of the sphere + * + * @type {Vector3} + */ + center: Vector3; + /** + * The radius of the sphere. + * + * @type {number} + */ + radius: number; + /** + * Sets the sphere's components by copying the given values. + * + * @param {Vector3} center - The center. + * @param {number} radius - The radius. + * @return {Sphere} A reference to this sphere. + */ + set(center: Vector3, radius: number): Sphere; + /** + * Computes the minimum bounding sphere for list of points. + * If the optional center point is given, it is used as the sphere's + * center. Otherwise, the center of the axis-aligned bounding box + * encompassing the points is calculated. + * + * @param {Array} points - A list of points in 3D space. + * @param {Vector3} [optionalCenter] - The center of the sphere. + * @return {Sphere} A reference to this sphere. + */ + setFromPoints(points: Array, optionalCenter?: Vector3): Sphere; + /** + * Copies the values of the given sphere to this instance. + * + * @param {Sphere} sphere - The sphere to copy. + * @return {Sphere} A reference to this sphere. + */ + copy(sphere: Sphere): Sphere; + /** + * Returns `true` if the sphere is empty (the radius set to a negative number). + * + * Spheres with a radius of `0` contain only their center point and are not + * considered to be empty. + * + * @return {boolean} Whether this sphere is empty or not. + */ + isEmpty(): boolean; + /** + * Makes this sphere empty which means in encloses a zero space in 3D. + * + * @return {Sphere} A reference to this sphere. + */ + makeEmpty(): Sphere; + /** + * Returns `true` if this sphere contains the given point inclusive of + * the surface of the sphere. + * + * @param {Vector3} point - The point to check. + * @return {boolean} Whether this sphere contains the given point or not. + */ + containsPoint(point: Vector3): boolean; + /** + * Returns the closest distance from the boundary of the sphere to the + * given point. If the sphere contains the point, the distance will + * be negative. + * + * @param {Vector3} point - The point to compute the distance to. + * @return {number} The distance to the point. + */ + distanceToPoint(point: Vector3): number; + /** + * Returns `true` if this sphere intersects with the given one. + * + * @param {Sphere} sphere - The sphere to test. + * @return {boolean} Whether this sphere intersects with the given one or not. + */ + intersectsSphere(sphere: Sphere): boolean; + /** + * Returns `true` if this sphere intersects with the given box. + * + * @param {Box3} box - The box to test. + * @return {boolean} Whether this sphere intersects with the given box or not. + */ + intersectsBox(box: Box3): boolean; + /** + * Returns `true` if this sphere intersects with the given plane. + * + * @param {Plane} plane - The plane to test. + * @return {boolean} Whether this sphere intersects with the given plane or not. + */ + intersectsPlane(plane: Plane): boolean; + /** + * Clamps a point within the sphere. If the point is outside the sphere, it + * will clamp it to the closest point on the edge of the sphere. Points + * already inside the sphere will not be affected. + * + * @param {Vector3} point - The plane to clamp. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The clamped point. + */ + clampPoint(point: Vector3, target: Vector3): Vector3; + /** + * Returns a bounding box that encloses this sphere. + * + * @param {Box3} target - The target box that is used to store the method's result. + * @return {Box3} The bounding box that encloses this sphere. + */ + getBoundingBox(target: Box3): Box3; + /** + * Transforms this sphere with the given 4x4 transformation matrix. + * + * @param {Matrix4} matrix - The transformation matrix. + * @return {Sphere} A reference to this sphere. + */ + applyMatrix4(matrix: Matrix4): Sphere; + /** + * Translates the sphere's center by the given offset. + * + * @param {Vector3} offset - The offset. + * @return {Sphere} A reference to this sphere. + */ + translate(offset: Vector3): Sphere; + /** + * Expands the boundaries of this sphere to include the given point. + * + * @param {Vector3} point - The point to include. + * @return {Sphere} A reference to this sphere. + */ + expandByPoint(point: Vector3): Sphere; + /** + * Expands this sphere to enclose both the original sphere and the given sphere. + * + * @param {Sphere} sphere - The sphere to include. + * @return {Sphere} A reference to this sphere. + */ + union(sphere: Sphere): Sphere; + /** + * Returns `true` if this sphere is equal with the given one. + * + * @param {Sphere} sphere - The sphere to test for equality. + * @return {boolean} Whether this bounding sphere is equal with the given one. + */ + equals(sphere: Sphere): boolean; + /** + * Returns a new sphere with copied values from this instance. + * + * @return {Sphere} A clone of this instance. + */ + clone(): Sphere; + /** + * Returns a serialized structure of the bounding sphere. + * + * @return {Object} Serialized structure with fields representing the object state. + */ + toJSON(): Object; + /** + * Returns a serialized structure of the bounding sphere. + * + * @param {Object} json - The serialized json to set the sphere from. + * @return {Sphere} A reference to this bounding sphere. + */ + fromJSON(json: Object): Sphere; +} +import { Vector3 } from './Vector3.js'; +import { Box3 } from './Box3.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Spherical.d.ts b/jsdoc-testing/jsdoc/src/math/Spherical.d.ts new file mode 100644 index 000000000..300c0481a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/Spherical.d.ts @@ -0,0 +1,81 @@ +/** + * This class can be used to represent points in 3D space as + * [Spherical coordinates](https://en.wikipedia.org/wiki/Spherical_coordinate_system). + */ +export class Spherical { + /** + * Constructs a new spherical. + * + * @param {number} [radius=1] - The radius, or the Euclidean distance (straight-line distance) from the point to the origin. + * @param {number} [phi=0] - The polar angle in radians from the y (up) axis. + * @param {number} [theta=0] - The equator/azimuthal angle in radians around the y (up) axis. + */ + constructor(radius?: number, phi?: number, theta?: number); + /** + * The radius, or the Euclidean distance (straight-line distance) from the point to the origin. + * + * @type {number} + * @default 1 + */ + radius: number; + /** + * The polar angle in radians from the y (up) axis. + * + * @type {number} + * @default 0 + */ + phi: number; + /** + * The equator/azimuthal angle in radians around the y (up) axis. + * + * @type {number} + * @default 0 + */ + theta: number; + /** + * Sets the spherical components by copying the given values. + * + * @param {number} radius - The radius. + * @param {number} phi - The polar angle. + * @param {number} theta - The azimuthal angle. + * @return {Spherical} A reference to this spherical. + */ + set(radius: number, phi: number, theta: number): Spherical; + /** + * Copies the values of the given spherical to this instance. + * + * @param {Spherical} other - The spherical to copy. + * @return {Spherical} A reference to this spherical. + */ + copy(other: Spherical): Spherical; + /** + * Restricts the polar angle [page:.phi phi] to be between `0.000001` and pi - + * `0.000001`. + * + * @return {Spherical} A reference to this spherical. + */ + makeSafe(): Spherical; + /** + * Sets the spherical components from the given vector which is assumed to hold + * Cartesian coordinates. + * + * @param {Vector3} v - The vector to set. + * @return {Spherical} A reference to this spherical. + */ + setFromVector3(v: Vector3): Spherical; + /** + * Sets the spherical components from the given Cartesian coordinates. + * + * @param {number} x - The x value. + * @param {number} y - The y value. + * @param {number} z - The z value. + * @return {Spherical} A reference to this spherical. + */ + setFromCartesianCoords(x: number, y: number, z: number): Spherical; + /** + * Returns a new spherical with copied values from this instance. + * + * @return {Spherical} A clone of this instance. + */ + clone(): Spherical; +} diff --git a/jsdoc-testing/jsdoc/src/math/SphericalHarmonics3.d.ts b/jsdoc-testing/jsdoc/src/math/SphericalHarmonics3.d.ts new file mode 100644 index 000000000..307ff49fa --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/SphericalHarmonics3.d.ts @@ -0,0 +1,131 @@ +/** + * Represents a third-order spherical harmonics (SH). Light probes use this class + * to encode lighting information. + * + * - Primary reference: {@link https://graphics.stanford.edu/papers/envmap/envmap.pdf} + * - Secondary reference: {@link https://www.ppsloan.org/publications/StupidSH36.pdf} + */ +export class SphericalHarmonics3 { + /** + * Computes the SH basis for the given normal vector. + * + * @param {Vector3} normal - The normal. + * @param {Array} shBasis - The target array holding the SH basis. + */ + static getBasisAt(normal: Vector3, shBasis: Array): void; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSphericalHarmonics3: boolean; + /** + * An array holding the (9) SH coefficients. + * + * @type {Array} + */ + coefficients: Array; + /** + * Sets the given SH coefficients to this instance by copying + * the values. + * + * @param {Array} coefficients - The SH coefficients. + * @return {SphericalHarmonics3} A reference to this spherical harmonics. + */ + set(coefficients: Array): SphericalHarmonics3; + /** + * Sets all SH coefficients to `0`. + * + * @return {SphericalHarmonics3} A reference to this spherical harmonics. + */ + zero(): SphericalHarmonics3; + /** + * Returns the radiance in the direction of the given normal. + * + * @param {Vector3} normal - The normal vector (assumed to be unit length) + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The radiance. + */ + getAt(normal: Vector3, target: Vector3): Vector3; + /** + * Returns the irradiance (radiance convolved with cosine lobe) in the + * direction of the given normal. + * + * @param {Vector3} normal - The normal vector (assumed to be unit length) + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The irradiance. + */ + getIrradianceAt(normal: Vector3, target: Vector3): Vector3; + /** + * Adds the given SH to this instance. + * + * @param {SphericalHarmonics3} sh - The SH to add. + * @return {SphericalHarmonics3} A reference to this spherical harmonics. + */ + add(sh: SphericalHarmonics3): SphericalHarmonics3; + /** + * A convenience method for performing {@link SphericalHarmonics3#add} and + * {@link SphericalHarmonics3#scale} at once. + * + * @param {SphericalHarmonics3} sh - The SH to add. + * @param {number} s - The scale factor. + * @return {SphericalHarmonics3} A reference to this spherical harmonics. + */ + addScaledSH(sh: SphericalHarmonics3, s: number): SphericalHarmonics3; + /** + * Scales this SH by the given scale factor. + * + * @param {number} s - The scale factor. + * @return {SphericalHarmonics3} A reference to this spherical harmonics. + */ + scale(s: number): SphericalHarmonics3; + /** + * Linear interpolates between the given SH and this instance by the given + * alpha factor. + * + * @param {SphericalHarmonics3} sh - The SH to interpolate with. + * @param {number} alpha - The alpha factor. + * @return {SphericalHarmonics3} A reference to this spherical harmonics. + */ + lerp(sh: SphericalHarmonics3, alpha: number): SphericalHarmonics3; + /** + * Returns `true` if this spherical harmonics is equal with the given one. + * + * @param {SphericalHarmonics3} sh - The spherical harmonics to test for equality. + * @return {boolean} Whether this spherical harmonics is equal with the given one. + */ + equals(sh: SphericalHarmonics3): boolean; + /** + * Copies the values of the given spherical harmonics to this instance. + * + * @param {SphericalHarmonics3} sh - The spherical harmonics to copy. + * @return {SphericalHarmonics3} A reference to this spherical harmonics. + */ + copy(sh: SphericalHarmonics3): SphericalHarmonics3; + /** + * Returns a new spherical harmonics with copied values from this instance. + * + * @return {SphericalHarmonics3} A clone of this instance. + */ + clone(): SphericalHarmonics3; + /** + * Sets the SH coefficients of this instance from the given array. + * + * @param {Array} array - An array holding the SH coefficients. + * @param {number} [offset=0] - The array offset where to start copying. + * @return {SphericalHarmonics3} A clone of this instance. + */ + fromArray(array: Array, offset?: number): SphericalHarmonics3; + /** + * Returns an array with the SH coefficients, or copies them into the provided + * array. The coefficients are represented as numbers. + * + * @param {Array} [array=[]] - The target array. + * @param {number} [offset=0] - The array offset where to start copying. + * @return {Array} An array with flat SH coefficients. + */ + toArray(array?: Array, offset?: number): Array; +} +import { Vector3 } from './Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Triangle.d.ts b/jsdoc-testing/jsdoc/src/math/Triangle.d.ts new file mode 100644 index 000000000..3841d3852 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/Triangle.d.ts @@ -0,0 +1,231 @@ +/** + * A geometric triangle as defined by three vectors representing its three corners. + */ +export class Triangle { + /** + * Computes the normal vector of a triangle. + * + * @param {Vector3} a - The first corner of the triangle. + * @param {Vector3} b - The second corner of the triangle. + * @param {Vector3} c - The third corner of the triangle. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The triangle's normal. + */ + static getNormal(a: Vector3, b: Vector3, c: Vector3, target: Vector3): Vector3; + /** + * Computes a barycentric coordinates from the given vector. + * Returns `null` if the triangle is degenerate. + * + * @param {Vector3} point - A point in 3D space. + * @param {Vector3} a - The first corner of the triangle. + * @param {Vector3} b - The second corner of the triangle. + * @param {Vector3} c - The third corner of the triangle. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {?Vector3} The barycentric coordinates for the given point + */ + static getBarycoord(point: Vector3, a: Vector3, b: Vector3, c: Vector3, target: Vector3): Vector3 | null; + /** + * Returns `true` if the given point, when projected onto the plane of the + * triangle, lies within the triangle. + * + * @param {Vector3} point - The point in 3D space to test. + * @param {Vector3} a - The first corner of the triangle. + * @param {Vector3} b - The second corner of the triangle. + * @param {Vector3} c - The third corner of the triangle. + * @return {boolean} Whether the given point, when projected onto the plane of the + * triangle, lies within the triangle or not. + */ + static containsPoint(point: Vector3, a: Vector3, b: Vector3, c: Vector3): boolean; + /** + * Computes the value barycentrically interpolated for the given point on the + * triangle. Returns `null` if the triangle is degenerate. + * + * @param {Vector3} point - Position of interpolated point. + * @param {Vector3} p1 - The first corner of the triangle. + * @param {Vector3} p2 - The second corner of the triangle. + * @param {Vector3} p3 - The third corner of the triangle. + * @param {Vector3} v1 - Value to interpolate of first vertex. + * @param {Vector3} v2 - Value to interpolate of second vertex. + * @param {Vector3} v3 - Value to interpolate of third vertex. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {?Vector3} The interpolated value. + */ + static getInterpolation(point: Vector3, p1: Vector3, p2: Vector3, p3: Vector3, v1: Vector3, v2: Vector3, v3: Vector3, target: Vector3): Vector3 | null; + /** + * Computes the value barycentrically interpolated for the given attribute and indices. + * + * @param {BufferAttribute} attr - The attribute to interpolate. + * @param {number} i1 - Index of first vertex. + * @param {number} i2 - Index of second vertex. + * @param {number} i3 - Index of third vertex. + * @param {Vector3} barycoord - The barycoordinate value to use to interpolate. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The interpolated attribute value. + */ + static getInterpolatedAttribute(attr: BufferAttribute, i1: number, i2: number, i3: number, barycoord: Vector3, target: Vector3): Vector3; + /** + * Returns `true` if the triangle is oriented towards the given direction. + * + * @param {Vector3} a - The first corner of the triangle. + * @param {Vector3} b - The second corner of the triangle. + * @param {Vector3} c - The third corner of the triangle. + * @param {Vector3} direction - The (normalized) direction vector. + * @return {boolean} Whether the triangle is oriented towards the given direction or not. + */ + static isFrontFacing(a: Vector3, b: Vector3, c: Vector3, direction: Vector3): boolean; + /** + * Constructs a new triangle. + * + * @param {Vector3} [a=(0,0,0)] - The first corner of the triangle. + * @param {Vector3} [b=(0,0,0)] - The second corner of the triangle. + * @param {Vector3} [c=(0,0,0)] - The third corner of the triangle. + */ + constructor(a?: Vector3, b?: Vector3, c?: Vector3); + /** + * The first corner of the triangle. + * + * @type {Vector3} + */ + a: Vector3; + /** + * The second corner of the triangle. + * + * @type {Vector3} + */ + b: Vector3; + /** + * The third corner of the triangle. + * + * @type {Vector3} + */ + c: Vector3; + /** + * Sets the triangle's vertices by copying the given values. + * + * @param {Vector3} a - The first corner of the triangle. + * @param {Vector3} b - The second corner of the triangle. + * @param {Vector3} c - The third corner of the triangle. + * @return {Triangle} A reference to this triangle. + */ + set(a: Vector3, b: Vector3, c: Vector3): Triangle; + /** + * Sets the triangle's vertices by copying the given array values. + * + * @param {Array} points - An array with 3D points. + * @param {number} i0 - The array index representing the first corner of the triangle. + * @param {number} i1 - The array index representing the second corner of the triangle. + * @param {number} i2 - The array index representing the third corner of the triangle. + * @return {Triangle} A reference to this triangle. + */ + setFromPointsAndIndices(points: Array, i0: number, i1: number, i2: number): Triangle; + /** + * Sets the triangle's vertices by copying the given attribute values. + * + * @param {BufferAttribute} attribute - A buffer attribute with 3D points data. + * @param {number} i0 - The attribute index representing the first corner of the triangle. + * @param {number} i1 - The attribute index representing the second corner of the triangle. + * @param {number} i2 - The attribute index representing the third corner of the triangle. + * @return {Triangle} A reference to this triangle. + */ + setFromAttributeAndIndices(attribute: BufferAttribute, i0: number, i1: number, i2: number): Triangle; + /** + * Returns a new triangle with copied values from this instance. + * + * @return {Triangle} A clone of this instance. + */ + clone(): Triangle; + /** + * Copies the values of the given triangle to this instance. + * + * @param {Triangle} triangle - The triangle to copy. + * @return {Triangle} A reference to this triangle. + */ + copy(triangle: Triangle): Triangle; + /** + * Computes the area of the triangle. + * + * @return {number} The triangle's area. + */ + getArea(): number; + /** + * Computes the midpoint of the triangle. + * + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The triangle's midpoint. + */ + getMidpoint(target: Vector3): Vector3; + /** + * Computes the normal of the triangle. + * + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The triangle's normal. + */ + getNormal(target: Vector3): Vector3; + /** + * Computes a plane the triangle lies within. + * + * @param {Plane} target - The target vector that is used to store the method's result. + * @return {Plane} The plane the triangle lies within. + */ + getPlane(target: Plane): Plane; + /** + * Computes a barycentric coordinates from the given vector. + * Returns `null` if the triangle is degenerate. + * + * @param {Vector3} point - A point in 3D space. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {?Vector3} The barycentric coordinates for the given point + */ + getBarycoord(point: Vector3, target: Vector3): Vector3 | null; + /** + * Computes the value barycentrically interpolated for the given point on the + * triangle. Returns `null` if the triangle is degenerate. + * + * @param {Vector3} point - Position of interpolated point. + * @param {Vector3} v1 - Value to interpolate of first vertex. + * @param {Vector3} v2 - Value to interpolate of second vertex. + * @param {Vector3} v3 - Value to interpolate of third vertex. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {?Vector3} The interpolated value. + */ + getInterpolation(point: Vector3, v1: Vector3, v2: Vector3, v3: Vector3, target: Vector3): Vector3 | null; + /** + * Returns `true` if the given point, when projected onto the plane of the + * triangle, lies within the triangle. + * + * @param {Vector3} point - The point in 3D space to test. + * @return {boolean} Whether the given point, when projected onto the plane of the + * triangle, lies within the triangle or not. + */ + containsPoint(point: Vector3): boolean; + /** + * Returns `true` if the triangle is oriented towards the given direction. + * + * @param {Vector3} direction - The (normalized) direction vector. + * @return {boolean} Whether the triangle is oriented towards the given direction or not. + */ + isFrontFacing(direction: Vector3): boolean; + /** + * Returns `true` if this triangle intersects with the given box. + * + * @param {Box3} box - The box to intersect. + * @return {boolean} Whether this triangle intersects with the given box or not. + */ + intersectsBox(box: Box3): boolean; + /** + * Returns the closest point on the triangle to the given point. + * + * @param {Vector3} p - The point to compute the closest point for. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The closest point on the triangle. + */ + closestPointToPoint(p: Vector3, target: Vector3): Vector3; + /** + * Returns `true` if this triangle is equal with the given one. + * + * @param {Triangle} triangle - The triangle to test for equality. + * @return {boolean} Whether this triangle is equal with the given one. + */ + equals(triangle: Triangle): boolean; +} +import { Vector3 } from './Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Vector2.d.ts b/jsdoc-testing/jsdoc/src/math/Vector2.d.ts new file mode 100644 index 000000000..aeaeb509d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/Vector2.d.ts @@ -0,0 +1,440 @@ +/** + * Class representing a 2D vector. A 2D vector is an ordered pair of numbers + * (labeled x and y), which can be used to represent a number of things, such as: + * + * - A point in 2D space (i.e. a position on a plane). + * - A direction and length across a plane. In three.js the length will + * always be the Euclidean distance(straight-line distance) from `(0, 0)` to `(x, y)` + * and the direction is also measured from `(0, 0)` towards `(x, y)`. + * - Any arbitrary ordered pair of numbers. + * + * There are other things a 2D vector can be used to represent, such as + * momentum vectors, complex numbers and so on, however these are the most + * common uses in three.js. + * + * Iterating through a vector instance will yield its components `(x, y)` in + * the corresponding order. + * ```js + * const a = new THREE.Vector2( 0, 1 ); + * + * //no arguments; will be initialised to (0, 0) + * const b = new THREE.Vector2( ); + * + * const d = a.distanceTo( b ); + * ``` + */ +export class Vector2 { + /** + * Constructs a new 2D vector. + * + * @param {number} [x=0] - The x value of this vector. + * @param {number} [y=0] - The y value of this vector. + */ + constructor(x?: number, y?: number); + /** + * The x value of this vector. + * + * @type {number} + */ + x: number; + /** + * The y value of this vector. + * + * @type {number} + */ + y: number; + set width(value: number); + /** + * Alias for {@link Vector2#x}. + * + * @type {number} + */ + get width(): number; + set height(value: number); + /** + * Alias for {@link Vector2#y}. + * + * @type {number} + */ + get height(): number; + /** + * Sets the vector components. + * + * @param {number} x - The value of the x component. + * @param {number} y - The value of the y component. + * @return {Vector2} A reference to this vector. + */ + set(x: number, y: number): Vector2; + /** + * Sets the vector components to the same value. + * + * @param {number} scalar - The value to set for all vector components. + * @return {Vector2} A reference to this vector. + */ + setScalar(scalar: number): Vector2; + /** + * Sets the vector's x component to the given value + * + * @param {number} x - The value to set. + * @return {Vector2} A reference to this vector. + */ + setX(x: number): Vector2; + /** + * Sets the vector's y component to the given value + * + * @param {number} y - The value to set. + * @return {Vector2} A reference to this vector. + */ + setY(y: number): Vector2; + /** + * Allows to set a vector component with an index. + * + * @param {number} index - The component index. `0` equals to x, `1` equals to y. + * @param {number} value - The value to set. + * @return {Vector2} A reference to this vector. + */ + setComponent(index: number, value: number): Vector2; + /** + * Returns the value of the vector component which matches the given index. + * + * @param {number} index - The component index. `0` equals to x, `1` equals to y. + * @return {number} A vector component value. + */ + getComponent(index: number): number; + /** + * Returns a new vector with copied values from this instance. + * + * @return {Vector2} A clone of this instance. + */ + clone(): Vector2; + /** + * Copies the values of the given vector to this instance. + * + * @param {Vector2} v - The vector to copy. + * @return {Vector2} A reference to this vector. + */ + copy(v: Vector2): Vector2; + /** + * Adds the given vector to this instance. + * + * @param {Vector2} v - The vector to add. + * @return {Vector2} A reference to this vector. + */ + add(v: Vector2): Vector2; + /** + * Adds the given scalar value to all components of this instance. + * + * @param {number} s - The scalar to add. + * @return {Vector2} A reference to this vector. + */ + addScalar(s: number): Vector2; + /** + * Adds the given vectors and stores the result in this instance. + * + * @param {Vector2} a - The first vector. + * @param {Vector2} b - The second vector. + * @return {Vector2} A reference to this vector. + */ + addVectors(a: Vector2, b: Vector2): Vector2; + /** + * Adds the given vector scaled by the given factor to this instance. + * + * @param {Vector2} v - The vector. + * @param {number} s - The factor that scales `v`. + * @return {Vector2} A reference to this vector. + */ + addScaledVector(v: Vector2, s: number): Vector2; + /** + * Subtracts the given vector from this instance. + * + * @param {Vector2} v - The vector to subtract. + * @return {Vector2} A reference to this vector. + */ + sub(v: Vector2): Vector2; + /** + * Subtracts the given scalar value from all components of this instance. + * + * @param {number} s - The scalar to subtract. + * @return {Vector2} A reference to this vector. + */ + subScalar(s: number): Vector2; + /** + * Subtracts the given vectors and stores the result in this instance. + * + * @param {Vector2} a - The first vector. + * @param {Vector2} b - The second vector. + * @return {Vector2} A reference to this vector. + */ + subVectors(a: Vector2, b: Vector2): Vector2; + /** + * Multiplies the given vector with this instance. + * + * @param {Vector2} v - The vector to multiply. + * @return {Vector2} A reference to this vector. + */ + multiply(v: Vector2): Vector2; + /** + * Multiplies the given scalar value with all components of this instance. + * + * @param {number} scalar - The scalar to multiply. + * @return {Vector2} A reference to this vector. + */ + multiplyScalar(scalar: number): Vector2; + /** + * Divides this instance by the given vector. + * + * @param {Vector2} v - The vector to divide. + * @return {Vector2} A reference to this vector. + */ + divide(v: Vector2): Vector2; + /** + * Divides this vector by the given scalar. + * + * @param {number} scalar - The scalar to divide. + * @return {Vector2} A reference to this vector. + */ + divideScalar(scalar: number): Vector2; + /** + * Multiplies this vector (with an implicit 1 as the 3rd component) by + * the given 3x3 matrix. + * + * @param {Matrix3} m - The matrix to apply. + * @return {Vector2} A reference to this vector. + */ + applyMatrix3(m: Matrix3): Vector2; + /** + * If this vector's x or y value is greater than the given vector's x or y + * value, replace that value with the corresponding min value. + * + * @param {Vector2} v - The vector. + * @return {Vector2} A reference to this vector. + */ + min(v: Vector2): Vector2; + /** + * If this vector's x or y value is less than the given vector's x or y + * value, replace that value with the corresponding max value. + * + * @param {Vector2} v - The vector. + * @return {Vector2} A reference to this vector. + */ + max(v: Vector2): Vector2; + /** + * If this vector's x or y value is greater than the max vector's x or y + * value, it is replaced by the corresponding value. + * If this vector's x or y value is less than the min vector's x or y value, + * it is replaced by the corresponding value. + * + * @param {Vector2} min - The minimum x and y values. + * @param {Vector2} max - The maximum x and y values in the desired range. + * @return {Vector2} A reference to this vector. + */ + clamp(min: Vector2, max: Vector2): Vector2; + /** + * If this vector's x or y values are greater than the max value, they are + * replaced by the max value. + * If this vector's x or y values are less than the min value, they are + * replaced by the min value. + * + * @param {number} minVal - The minimum value the components will be clamped to. + * @param {number} maxVal - The maximum value the components will be clamped to. + * @return {Vector2} A reference to this vector. + */ + clampScalar(minVal: number, maxVal: number): Vector2; + /** + * If this vector's length is greater than the max value, it is replaced by + * the max value. + * If this vector's length is less than the min value, it is replaced by the + * min value. + * + * @param {number} min - The minimum value the vector length will be clamped to. + * @param {number} max - The maximum value the vector length will be clamped to. + * @return {Vector2} A reference to this vector. + */ + clampLength(min: number, max: number): Vector2; + /** + * The components of this vector are rounded down to the nearest integer value. + * + * @return {Vector2} A reference to this vector. + */ + floor(): Vector2; + /** + * The components of this vector are rounded up to the nearest integer value. + * + * @return {Vector2} A reference to this vector. + */ + ceil(): Vector2; + /** + * The components of this vector are rounded to the nearest integer value + * + * @return {Vector2} A reference to this vector. + */ + round(): Vector2; + /** + * The components of this vector are rounded towards zero (up if negative, + * down if positive) to an integer value. + * + * @return {Vector2} A reference to this vector. + */ + roundToZero(): Vector2; + /** + * Inverts this vector - i.e. sets x = -x and y = -y. + * + * @return {Vector2} A reference to this vector. + */ + negate(): Vector2; + /** + * Calculates the dot product of the given vector with this instance. + * + * @param {Vector2} v - The vector to compute the dot product with. + * @return {number} The result of the dot product. + */ + dot(v: Vector2): number; + /** + * Calculates the cross product of the given vector with this instance. + * + * @param {Vector2} v - The vector to compute the cross product with. + * @return {number} The result of the cross product. + */ + cross(v: Vector2): number; + /** + * Computes the square of the Euclidean length (straight-line length) from + * (0, 0) to (x, y). If you are comparing the lengths of vectors, you should + * compare the length squared instead as it is slightly more efficient to calculate. + * + * @return {number} The square length of this vector. + */ + lengthSq(): number; + /** + * Computes the Euclidean length (straight-line length) from (0, 0) to (x, y). + * + * @return {number} The length of this vector. + */ + length(): number; + /** + * Computes the Manhattan length of this vector. + * + * @return {number} The length of this vector. + */ + manhattanLength(): number; + /** + * Converts this vector to a unit vector - that is, sets it equal to a vector + * with the same direction as this one, but with a vector length of `1`. + * + * @return {Vector2} A reference to this vector. + */ + normalize(): Vector2; + /** + * Computes the angle in radians of this vector with respect to the positive x-axis. + * + * @return {number} The angle in radians. + */ + angle(): number; + /** + * Returns the angle between the given vector and this instance in radians. + * + * @param {Vector2} v - The vector to compute the angle with. + * @return {number} The angle in radians. + */ + angleTo(v: Vector2): number; + /** + * Computes the distance from the given vector to this instance. + * + * @param {Vector2} v - The vector to compute the distance to. + * @return {number} The distance. + */ + distanceTo(v: Vector2): number; + /** + * Computes the squared distance from the given vector to this instance. + * If you are just comparing the distance with another distance, you should compare + * the distance squared instead as it is slightly more efficient to calculate. + * + * @param {Vector2} v - The vector to compute the squared distance to. + * @return {number} The squared distance. + */ + distanceToSquared(v: Vector2): number; + /** + * Computes the Manhattan distance from the given vector to this instance. + * + * @param {Vector2} v - The vector to compute the Manhattan distance to. + * @return {number} The Manhattan distance. + */ + manhattanDistanceTo(v: Vector2): number; + /** + * Sets this vector to a vector with the same direction as this one, but + * with the specified length. + * + * @param {number} length - The new length of this vector. + * @return {Vector2} A reference to this vector. + */ + setLength(length: number): Vector2; + /** + * Linearly interpolates between the given vector and this instance, where + * alpha is the percent distance along the line - alpha = 0 will be this + * vector, and alpha = 1 will be the given one. + * + * @param {Vector2} v - The vector to interpolate towards. + * @param {number} alpha - The interpolation factor, typically in the closed interval `[0, 1]`. + * @return {Vector2} A reference to this vector. + */ + lerp(v: Vector2, alpha: number): Vector2; + /** + * Linearly interpolates between the given vectors, where alpha is the percent + * distance along the line - alpha = 0 will be first vector, and alpha = 1 will + * be the second one. The result is stored in this instance. + * + * @param {Vector2} v1 - The first vector. + * @param {Vector2} v2 - The second vector. + * @param {number} alpha - The interpolation factor, typically in the closed interval `[0, 1]`. + * @return {Vector2} A reference to this vector. + */ + lerpVectors(v1: Vector2, v2: Vector2, alpha: number): Vector2; + /** + * Returns `true` if this vector is equal with the given one. + * + * @param {Vector2} v - The vector to test for equality. + * @return {boolean} Whether this vector is equal with the given one. + */ + equals(v: Vector2): boolean; + /** + * Sets this vector's x value to be `array[ offset ]` and y + * value to be `array[ offset + 1 ]`. + * + * @param {Array} array - An array holding the vector component values. + * @param {number} [offset=0] - The offset into the array. + * @return {Vector2} A reference to this vector. + */ + fromArray(array: Array, offset?: number): Vector2; + /** + * Writes the components of this vector to the given array. If no array is provided, + * the method returns a new instance. + * + * @param {Array} [array=[]] - The target array holding the vector components. + * @param {number} [offset=0] - Index of the first element in the array. + * @return {Array} The vector components. + */ + toArray(array?: Array, offset?: number): Array; + /** + * Sets the components of this vector from the given buffer attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute holding vector data. + * @param {number} index - The index into the attribute. + * @return {Vector2} A reference to this vector. + */ + fromBufferAttribute(attribute: BufferAttribute, index: number): Vector2; + /** + * Rotates this vector around the given center by the given angle. + * + * @param {Vector2} center - The point around which to rotate. + * @param {number} angle - The angle to rotate, in radians. + * @return {Vector2} A reference to this vector. + */ + rotateAround(center: Vector2, angle: number): Vector2; + /** + * Sets each component of this vector to a pseudo-random value between `0` and + * `1`, excluding `1`. + * + * @return {Vector2} A reference to this vector. + */ + random(): Vector2; + [Symbol.iterator](): Generator; +} diff --git a/jsdoc-testing/jsdoc/src/math/Vector3.d.ts b/jsdoc-testing/jsdoc/src/math/Vector3.d.ts new file mode 100644 index 000000000..df65f7998 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/Vector3.d.ts @@ -0,0 +1,613 @@ +/** + * Class representing a 3D vector. A 3D vector is an ordered triplet of numbers + * (labeled x, y and z), which can be used to represent a number of things, such as: + * + * - A point in 3D space. + * - A direction and length in 3D space. In three.js the length will + * always be the Euclidean distance(straight-line distance) from `(0, 0, 0)` to `(x, y, z)` + * and the direction is also measured from `(0, 0, 0)` towards `(x, y, z)`. + * - Any arbitrary ordered triplet of numbers. + * + * There are other things a 3D vector can be used to represent, such as + * momentum vectors and so on, however these are the most + * common uses in three.js. + * + * Iterating through a vector instance will yield its components `(x, y, z)` in + * the corresponding order. + * ```js + * const a = new THREE.Vector3( 0, 1, 0 ); + * + * //no arguments; will be initialised to (0, 0, 0) + * const b = new THREE.Vector3( ); + * + * const d = a.distanceTo( b ); + * ``` + */ +export class Vector3 { + /** + * Constructs a new 3D vector. + * + * @param {number} [x=0] - The x value of this vector. + * @param {number} [y=0] - The y value of this vector. + * @param {number} [z=0] - The z value of this vector. + */ + constructor(x?: number, y?: number, z?: number); + /** + * The x value of this vector. + * + * @type {number} + */ + x: number; + /** + * The y value of this vector. + * + * @type {number} + */ + y: number; + /** + * The z value of this vector. + * + * @type {number} + */ + z: number; + /** + * Sets the vector components. + * + * @param {number} x - The value of the x component. + * @param {number} y - The value of the y component. + * @param {number} z - The value of the z component. + * @return {Vector3} A reference to this vector. + */ + set(x: number, y: number, z: number): Vector3; + /** + * Sets the vector components to the same value. + * + * @param {number} scalar - The value to set for all vector components. + * @return {Vector3} A reference to this vector. + */ + setScalar(scalar: number): Vector3; + /** + * Sets the vector's x component to the given value. + * + * @param {number} x - The value to set. + * @return {Vector3} A reference to this vector. + */ + setX(x: number): Vector3; + /** + * Sets the vector's y component to the given value. + * + * @param {number} y - The value to set. + * @return {Vector3} A reference to this vector. + */ + setY(y: number): Vector3; + /** + * Sets the vector's z component to the given value. + * + * @param {number} z - The value to set. + * @return {Vector3} A reference to this vector. + */ + setZ(z: number): Vector3; + /** + * Allows to set a vector component with an index. + * + * @param {number} index - The component index. `0` equals to x, `1` equals to y, `2` equals to z. + * @param {number} value - The value to set. + * @return {Vector3} A reference to this vector. + */ + setComponent(index: number, value: number): Vector3; + /** + * Returns the value of the vector component which matches the given index. + * + * @param {number} index - The component index. `0` equals to x, `1` equals to y, `2` equals to z. + * @return {number} A vector component value. + */ + getComponent(index: number): number; + /** + * Returns a new vector with copied values from this instance. + * + * @return {Vector3} A clone of this instance. + */ + clone(): Vector3; + /** + * Copies the values of the given vector to this instance. + * + * @param {Vector3} v - The vector to copy. + * @return {Vector3} A reference to this vector. + */ + copy(v: Vector3): Vector3; + /** + * Adds the given vector to this instance. + * + * @param {Vector3} v - The vector to add. + * @return {Vector3} A reference to this vector. + */ + add(v: Vector3): Vector3; + /** + * Adds the given scalar value to all components of this instance. + * + * @param {number} s - The scalar to add. + * @return {Vector3} A reference to this vector. + */ + addScalar(s: number): Vector3; + /** + * Adds the given vectors and stores the result in this instance. + * + * @param {Vector3} a - The first vector. + * @param {Vector3} b - The second vector. + * @return {Vector3} A reference to this vector. + */ + addVectors(a: Vector3, b: Vector3): Vector3; + /** + * Adds the given vector scaled by the given factor to this instance. + * + * @param {Vector3|Vector4} v - The vector. + * @param {number} s - The factor that scales `v`. + * @return {Vector3} A reference to this vector. + */ + addScaledVector(v: Vector3 | Vector4, s: number): Vector3; + /** + * Subtracts the given vector from this instance. + * + * @param {Vector3} v - The vector to subtract. + * @return {Vector3} A reference to this vector. + */ + sub(v: Vector3): Vector3; + /** + * Subtracts the given scalar value from all components of this instance. + * + * @param {number} s - The scalar to subtract. + * @return {Vector3} A reference to this vector. + */ + subScalar(s: number): Vector3; + /** + * Subtracts the given vectors and stores the result in this instance. + * + * @param {Vector3} a - The first vector. + * @param {Vector3} b - The second vector. + * @return {Vector3} A reference to this vector. + */ + subVectors(a: Vector3, b: Vector3): Vector3; + /** + * Multiplies the given vector with this instance. + * + * @param {Vector3} v - The vector to multiply. + * @return {Vector3} A reference to this vector. + */ + multiply(v: Vector3): Vector3; + /** + * Multiplies the given scalar value with all components of this instance. + * + * @param {number} scalar - The scalar to multiply. + * @return {Vector3} A reference to this vector. + */ + multiplyScalar(scalar: number): Vector3; + /** + * Multiplies the given vectors and stores the result in this instance. + * + * @param {Vector3} a - The first vector. + * @param {Vector3} b - The second vector. + * @return {Vector3} A reference to this vector. + */ + multiplyVectors(a: Vector3, b: Vector3): Vector3; + /** + * Applies the given Euler rotation to this vector. + * + * @param {Euler} euler - The Euler angles. + * @return {Vector3} A reference to this vector. + */ + applyEuler(euler: Euler): Vector3; + /** + * Applies a rotation specified by an axis and an angle to this vector. + * + * @param {Vector3} axis - A normalized vector representing the rotation axis. + * @param {number} angle - The angle in radians. + * @return {Vector3} A reference to this vector. + */ + applyAxisAngle(axis: Vector3, angle: number): Vector3; + /** + * Multiplies this vector with the given 3x3 matrix. + * + * @param {Matrix3} m - The 3x3 matrix. + * @return {Vector3} A reference to this vector. + */ + applyMatrix3(m: Matrix3): Vector3; + /** + * Multiplies this vector by the given normal matrix and normalizes + * the result. + * + * @param {Matrix3} m - The normal matrix. + * @return {Vector3} A reference to this vector. + */ + applyNormalMatrix(m: Matrix3): Vector3; + /** + * Multiplies this vector (with an implicit 1 in the 4th dimension) by m, and + * divides by perspective. + * + * @param {Matrix4} m - The matrix to apply. + * @return {Vector3} A reference to this vector. + */ + applyMatrix4(m: Matrix4): Vector3; + /** + * Applies the given Quaternion to this vector. + * + * @param {Quaternion} q - The Quaternion. + * @return {Vector3} A reference to this vector. + */ + applyQuaternion(q: Quaternion): Vector3; + /** + * Projects this vector from world space into the camera's normalized + * device coordinate (NDC) space. + * + * @param {Camera} camera - The camera. + * @return {Vector3} A reference to this vector. + */ + project(camera: Camera): Vector3; + /** + * Unprojects this vector from the camera's normalized device coordinate (NDC) + * space into world space. + * + * @param {Camera} camera - The camera. + * @return {Vector3} A reference to this vector. + */ + unproject(camera: Camera): Vector3; + /** + * Transforms the direction of this vector by a matrix (the upper left 3 x 3 + * subset of the given 4x4 matrix and then normalizes the result. + * + * @param {Matrix4} m - The matrix. + * @return {Vector3} A reference to this vector. + */ + transformDirection(m: Matrix4): Vector3; + /** + * Divides this instance by the given vector. + * + * @param {Vector3} v - The vector to divide. + * @return {Vector3} A reference to this vector. + */ + divide(v: Vector3): Vector3; + /** + * Divides this vector by the given scalar. + * + * @param {number} scalar - The scalar to divide. + * @return {Vector3} A reference to this vector. + */ + divideScalar(scalar: number): Vector3; + /** + * If this vector's x, y or z value is greater than the given vector's x, y or z + * value, replace that value with the corresponding min value. + * + * @param {Vector3} v - The vector. + * @return {Vector3} A reference to this vector. + */ + min(v: Vector3): Vector3; + /** + * If this vector's x, y or z value is less than the given vector's x, y or z + * value, replace that value with the corresponding max value. + * + * @param {Vector3} v - The vector. + * @return {Vector3} A reference to this vector. + */ + max(v: Vector3): Vector3; + /** + * If this vector's x, y or z value is greater than the max vector's x, y or z + * value, it is replaced by the corresponding value. + * If this vector's x, y or z value is less than the min vector's x, y or z value, + * it is replaced by the corresponding value. + * + * @param {Vector3} min - The minimum x, y and z values. + * @param {Vector3} max - The maximum x, y and z values in the desired range. + * @return {Vector3} A reference to this vector. + */ + clamp(min: Vector3, max: Vector3): Vector3; + /** + * If this vector's x, y or z values are greater than the max value, they are + * replaced by the max value. + * If this vector's x, y or z values are less than the min value, they are + * replaced by the min value. + * + * @param {number} minVal - The minimum value the components will be clamped to. + * @param {number} maxVal - The maximum value the components will be clamped to. + * @return {Vector3} A reference to this vector. + */ + clampScalar(minVal: number, maxVal: number): Vector3; + /** + * If this vector's length is greater than the max value, it is replaced by + * the max value. + * If this vector's length is less than the min value, it is replaced by the + * min value. + * + * @param {number} min - The minimum value the vector length will be clamped to. + * @param {number} max - The maximum value the vector length will be clamped to. + * @return {Vector3} A reference to this vector. + */ + clampLength(min: number, max: number): Vector3; + /** + * The components of this vector are rounded down to the nearest integer value. + * + * @return {Vector3} A reference to this vector. + */ + floor(): Vector3; + /** + * The components of this vector are rounded up to the nearest integer value. + * + * @return {Vector3} A reference to this vector. + */ + ceil(): Vector3; + /** + * The components of this vector are rounded to the nearest integer value + * + * @return {Vector3} A reference to this vector. + */ + round(): Vector3; + /** + * The components of this vector are rounded towards zero (up if negative, + * down if positive) to an integer value. + * + * @return {Vector3} A reference to this vector. + */ + roundToZero(): Vector3; + /** + * Inverts this vector - i.e. sets x = -x, y = -y and z = -z. + * + * @return {Vector3} A reference to this vector. + */ + negate(): Vector3; + /** + * Calculates the dot product of the given vector with this instance. + * + * @param {Vector3} v - The vector to compute the dot product with. + * @return {number} The result of the dot product. + */ + dot(v: Vector3): number; + /** + * Computes the square of the Euclidean length (straight-line length) from + * (0, 0, 0) to (x, y, z). If you are comparing the lengths of vectors, you should + * compare the length squared instead as it is slightly more efficient to calculate. + * + * @return {number} The square length of this vector. + */ + lengthSq(): number; + /** + * Computes the Euclidean length (straight-line length) from (0, 0, 0) to (x, y, z). + * + * @return {number} The length of this vector. + */ + length(): number; + /** + * Computes the Manhattan length of this vector. + * + * @return {number} The length of this vector. + */ + manhattanLength(): number; + /** + * Converts this vector to a unit vector - that is, sets it equal to a vector + * with the same direction as this one, but with a vector length of `1`. + * + * @return {Vector3} A reference to this vector. + */ + normalize(): Vector3; + /** + * Sets this vector to a vector with the same direction as this one, but + * with the specified length. + * + * @param {number} length - The new length of this vector. + * @return {Vector3} A reference to this vector. + */ + setLength(length: number): Vector3; + /** + * Linearly interpolates between the given vector and this instance, where + * alpha is the percent distance along the line - alpha = 0 will be this + * vector, and alpha = 1 will be the given one. + * + * @param {Vector3} v - The vector to interpolate towards. + * @param {number} alpha - The interpolation factor, typically in the closed interval `[0, 1]`. + * @return {Vector3} A reference to this vector. + */ + lerp(v: Vector3, alpha: number): Vector3; + /** + * Linearly interpolates between the given vectors, where alpha is the percent + * distance along the line - alpha = 0 will be first vector, and alpha = 1 will + * be the second one. The result is stored in this instance. + * + * @param {Vector3} v1 - The first vector. + * @param {Vector3} v2 - The second vector. + * @param {number} alpha - The interpolation factor, typically in the closed interval `[0, 1]`. + * @return {Vector3} A reference to this vector. + */ + lerpVectors(v1: Vector3, v2: Vector3, alpha: number): Vector3; + /** + * Calculates the cross product of the given vector with this instance. + * + * @param {Vector3} v - The vector to compute the cross product with. + * @return {Vector3} The result of the cross product. + */ + cross(v: Vector3): Vector3; + /** + * Calculates the cross product of the given vectors and stores the result + * in this instance. + * + * @param {Vector3} a - The first vector. + * @param {Vector3} b - The second vector. + * @return {Vector3} A reference to this vector. + */ + crossVectors(a: Vector3, b: Vector3): Vector3; + /** + * Projects this vector onto the given one. + * + * @param {Vector3} v - The vector to project to. + * @return {Vector3} A reference to this vector. + */ + projectOnVector(v: Vector3): Vector3; + /** + * Projects this vector onto a plane by subtracting this + * vector projected onto the plane's normal from this vector. + * + * @param {Vector3} planeNormal - The plane normal. + * @return {Vector3} A reference to this vector. + */ + projectOnPlane(planeNormal: Vector3): Vector3; + /** + * Reflects this vector off a plane orthogonal to the given normal vector. + * + * @param {Vector3} normal - The (normalized) normal vector. + * @return {Vector3} A reference to this vector. + */ + reflect(normal: Vector3): Vector3; + /** + * Returns the angle between the given vector and this instance in radians. + * + * @param {Vector3} v - The vector to compute the angle with. + * @return {number} The angle in radians. + */ + angleTo(v: Vector3): number; + /** + * Computes the distance from the given vector to this instance. + * + * @param {Vector3} v - The vector to compute the distance to. + * @return {number} The distance. + */ + distanceTo(v: Vector3): number; + /** + * Computes the squared distance from the given vector to this instance. + * If you are just comparing the distance with another distance, you should compare + * the distance squared instead as it is slightly more efficient to calculate. + * + * @param {Vector3} v - The vector to compute the squared distance to. + * @return {number} The squared distance. + */ + distanceToSquared(v: Vector3): number; + /** + * Computes the Manhattan distance from the given vector to this instance. + * + * @param {Vector3} v - The vector to compute the Manhattan distance to. + * @return {number} The Manhattan distance. + */ + manhattanDistanceTo(v: Vector3): number; + /** + * Sets the vector components from the given spherical coordinates. + * + * @param {Spherical} s - The spherical coordinates. + * @return {Vector3} A reference to this vector. + */ + setFromSpherical(s: Spherical): Vector3; + /** + * Sets the vector components from the given spherical coordinates. + * + * @param {number} radius - The radius. + * @param {number} phi - The phi angle in radians. + * @param {number} theta - The theta angle in radians. + * @return {Vector3} A reference to this vector. + */ + setFromSphericalCoords(radius: number, phi: number, theta: number): Vector3; + /** + * Sets the vector components from the given cylindrical coordinates. + * + * @param {Cylindrical} c - The cylindrical coordinates. + * @return {Vector3} A reference to this vector. + */ + setFromCylindrical(c: Cylindrical): Vector3; + /** + * Sets the vector components from the given cylindrical coordinates. + * + * @param {number} radius - The radius. + * @param {number} theta - The theta angle in radians. + * @param {number} y - The y value. + * @return {Vector3} A reference to this vector. + */ + setFromCylindricalCoords(radius: number, theta: number, y: number): Vector3; + /** + * Sets the vector components to the position elements of the + * given transformation matrix. + * + * @param {Matrix4} m - The 4x4 matrix. + * @return {Vector3} A reference to this vector. + */ + setFromMatrixPosition(m: Matrix4): Vector3; + /** + * Sets the vector components to the scale elements of the + * given transformation matrix. + * + * @param {Matrix4} m - The 4x4 matrix. + * @return {Vector3} A reference to this vector. + */ + setFromMatrixScale(m: Matrix4): Vector3; + /** + * Sets the vector components from the specified matrix column. + * + * @param {Matrix4} m - The 4x4 matrix. + * @param {number} index - The column index. + * @return {Vector3} A reference to this vector. + */ + setFromMatrixColumn(m: Matrix4, index: number): Vector3; + /** + * Sets the vector components from the specified matrix column. + * + * @param {Matrix3} m - The 3x3 matrix. + * @param {number} index - The column index. + * @return {Vector3} A reference to this vector. + */ + setFromMatrix3Column(m: Matrix3, index: number): Vector3; + /** + * Sets the vector components from the given Euler angles. + * + * @param {Euler} e - The Euler angles to set. + * @return {Vector3} A reference to this vector. + */ + setFromEuler(e: Euler): Vector3; + /** + * Sets the vector components from the RGB components of the + * given color. + * + * @param {Color} c - The color to set. + * @return {Vector3} A reference to this vector. + */ + setFromColor(c: Color): Vector3; + /** + * Returns `true` if this vector is equal with the given one. + * + * @param {Vector3} v - The vector to test for equality. + * @return {boolean} Whether this vector is equal with the given one. + */ + equals(v: Vector3): boolean; + /** + * Sets this vector's x value to be `array[ offset ]`, y value to be `array[ offset + 1 ]` + * and z value to be `array[ offset + 2 ]`. + * + * @param {Array} array - An array holding the vector component values. + * @param {number} [offset=0] - The offset into the array. + * @return {Vector3} A reference to this vector. + */ + fromArray(array: Array, offset?: number): Vector3; + /** + * Writes the components of this vector to the given array. If no array is provided, + * the method returns a new instance. + * + * @param {Array} [array=[]] - The target array holding the vector components. + * @param {number} [offset=0] - Index of the first element in the array. + * @return {Array} The vector components. + */ + toArray(array?: Array, offset?: number): Array; + /** + * Sets the components of this vector from the given buffer attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute holding vector data. + * @param {number} index - The index into the attribute. + * @return {Vector3} A reference to this vector. + */ + fromBufferAttribute(attribute: BufferAttribute, index: number): Vector3; + /** + * Sets each component of this vector to a pseudo-random value between `0` and + * `1`, excluding `1`. + * + * @return {Vector3} A reference to this vector. + */ + random(): Vector3; + /** + * Sets this vector to a uniformly random point on a unit sphere. + * + * @return {Vector3} A reference to this vector. + */ + randomDirection(): Vector3; + [Symbol.iterator](): Generator; +} +import { Quaternion } from './Quaternion.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Vector4.d.ts b/jsdoc-testing/jsdoc/src/math/Vector4.d.ts new file mode 100644 index 000000000..2360be77d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/Vector4.d.ts @@ -0,0 +1,443 @@ +/** + * Class representing a 4D vector. A 4D vector is an ordered quadruplet of numbers + * (labeled x, y, z and w), which can be used to represent a number of things, such as: + * + * - A point in 4D space. + * - A direction and length in 4D space. In three.js the length will + * always be the Euclidean distance(straight-line distance) from `(0, 0, 0, 0)` to `(x, y, z, w)` + * and the direction is also measured from `(0, 0, 0, 0)` towards `(x, y, z, w)`. + * - Any arbitrary ordered quadruplet of numbers. + * + * There are other things a 4D vector can be used to represent, however these + * are the most common uses in *three.js*. + * + * Iterating through a vector instance will yield its components `(x, y, z, w)` in + * the corresponding order. + * ```js + * const a = new THREE.Vector4( 0, 1, 0, 0 ); + * + * //no arguments; will be initialised to (0, 0, 0, 1) + * const b = new THREE.Vector4( ); + * + * const d = a.dot( b ); + * ``` + */ +export class Vector4 { + /** + * Constructs a new 4D vector. + * + * @param {number} [x=0] - The x value of this vector. + * @param {number} [y=0] - The y value of this vector. + * @param {number} [z=0] - The z value of this vector. + * @param {number} [w=1] - The w value of this vector. + */ + constructor(x?: number, y?: number, z?: number, w?: number); + /** + * The x value of this vector. + * + * @type {number} + */ + x: number; + /** + * The y value of this vector. + * + * @type {number} + */ + y: number; + /** + * The z value of this vector. + * + * @type {number} + */ + z: number; + /** + * The w value of this vector. + * + * @type {number} + */ + w: number; + set width(value: number); + /** + * Alias for {@link Vector4#z}. + * + * @type {number} + */ + get width(): number; + set height(value: number); + /** + * Alias for {@link Vector4#w}. + * + * @type {number} + */ + get height(): number; + /** + * Sets the vector components. + * + * @param {number} x - The value of the x component. + * @param {number} y - The value of the y component. + * @param {number} z - The value of the z component. + * @param {number} w - The value of the w component. + * @return {Vector4} A reference to this vector. + */ + set(x: number, y: number, z: number, w: number): Vector4; + /** + * Sets the vector components to the same value. + * + * @param {number} scalar - The value to set for all vector components. + * @return {Vector4} A reference to this vector. + */ + setScalar(scalar: number): Vector4; + /** + * Sets the vector's x component to the given value + * + * @param {number} x - The value to set. + * @return {Vector4} A reference to this vector. + */ + setX(x: number): Vector4; + /** + * Sets the vector's y component to the given value + * + * @param {number} y - The value to set. + * @return {Vector4} A reference to this vector. + */ + setY(y: number): Vector4; + /** + * Sets the vector's z component to the given value + * + * @param {number} z - The value to set. + * @return {Vector4} A reference to this vector. + */ + setZ(z: number): Vector4; + /** + * Sets the vector's w component to the given value + * + * @param {number} w - The value to set. + * @return {Vector4} A reference to this vector. + */ + setW(w: number): Vector4; + /** + * Allows to set a vector component with an index. + * + * @param {number} index - The component index. `0` equals to x, `1` equals to y, + * `2` equals to z, `3` equals to w. + * @param {number} value - The value to set. + * @return {Vector4} A reference to this vector. + */ + setComponent(index: number, value: number): Vector4; + /** + * Returns the value of the vector component which matches the given index. + * + * @param {number} index - The component index. `0` equals to x, `1` equals to y, + * `2` equals to z, `3` equals to w. + * @return {number} A vector component value. + */ + getComponent(index: number): number; + /** + * Returns a new vector with copied values from this instance. + * + * @return {Vector4} A clone of this instance. + */ + clone(): Vector4; + /** + * Copies the values of the given vector to this instance. + * + * @param {Vector3|Vector4} v - The vector to copy. + * @return {Vector4} A reference to this vector. + */ + copy(v: Vector3 | Vector4): Vector4; + /** + * Adds the given vector to this instance. + * + * @param {Vector4} v - The vector to add. + * @return {Vector4} A reference to this vector. + */ + add(v: Vector4): Vector4; + /** + * Adds the given scalar value to all components of this instance. + * + * @param {number} s - The scalar to add. + * @return {Vector4} A reference to this vector. + */ + addScalar(s: number): Vector4; + /** + * Adds the given vectors and stores the result in this instance. + * + * @param {Vector4} a - The first vector. + * @param {Vector4} b - The second vector. + * @return {Vector4} A reference to this vector. + */ + addVectors(a: Vector4, b: Vector4): Vector4; + /** + * Adds the given vector scaled by the given factor to this instance. + * + * @param {Vector4} v - The vector. + * @param {number} s - The factor that scales `v`. + * @return {Vector4} A reference to this vector. + */ + addScaledVector(v: Vector4, s: number): Vector4; + /** + * Subtracts the given vector from this instance. + * + * @param {Vector4} v - The vector to subtract. + * @return {Vector4} A reference to this vector. + */ + sub(v: Vector4): Vector4; + /** + * Subtracts the given scalar value from all components of this instance. + * + * @param {number} s - The scalar to subtract. + * @return {Vector4} A reference to this vector. + */ + subScalar(s: number): Vector4; + /** + * Subtracts the given vectors and stores the result in this instance. + * + * @param {Vector4} a - The first vector. + * @param {Vector4} b - The second vector. + * @return {Vector4} A reference to this vector. + */ + subVectors(a: Vector4, b: Vector4): Vector4; + /** + * Multiplies the given vector with this instance. + * + * @param {Vector4} v - The vector to multiply. + * @return {Vector4} A reference to this vector. + */ + multiply(v: Vector4): Vector4; + /** + * Multiplies the given scalar value with all components of this instance. + * + * @param {number} scalar - The scalar to multiply. + * @return {Vector4} A reference to this vector. + */ + multiplyScalar(scalar: number): Vector4; + /** + * Multiplies this vector with the given 4x4 matrix. + * + * @param {Matrix4} m - The 4x4 matrix. + * @return {Vector4} A reference to this vector. + */ + applyMatrix4(m: Matrix4): Vector4; + /** + * Divides this instance by the given vector. + * + * @param {Vector4} v - The vector to divide. + * @return {Vector4} A reference to this vector. + */ + divide(v: Vector4): Vector4; + /** + * Divides this vector by the given scalar. + * + * @param {number} scalar - The scalar to divide. + * @return {Vector4} A reference to this vector. + */ + divideScalar(scalar: number): Vector4; + /** + * Sets the x, y and z components of this + * vector to the quaternion's axis and w to the angle. + * + * @param {Quaternion} q - The Quaternion to set. + * @return {Vector4} A reference to this vector. + */ + setAxisAngleFromQuaternion(q: Quaternion): Vector4; + /** + * Sets the x, y and z components of this + * vector to the axis of rotation and w to the angle. + * + * @param {Matrix4} m - A 4x4 matrix of which the upper left 3x3 matrix is a pure rotation matrix. + * @return {Vector4} A reference to this vector. + */ + setAxisAngleFromRotationMatrix(m: Matrix4): Vector4; + /** + * Sets the vector components to the position elements of the + * given transformation matrix. + * + * @param {Matrix4} m - The 4x4 matrix. + * @return {Vector4} A reference to this vector. + */ + setFromMatrixPosition(m: Matrix4): Vector4; + /** + * If this vector's x, y, z or w value is greater than the given vector's x, y, z or w + * value, replace that value with the corresponding min value. + * + * @param {Vector4} v - The vector. + * @return {Vector4} A reference to this vector. + */ + min(v: Vector4): Vector4; + /** + * If this vector's x, y, z or w value is less than the given vector's x, y, z or w + * value, replace that value with the corresponding max value. + * + * @param {Vector4} v - The vector. + * @return {Vector4} A reference to this vector. + */ + max(v: Vector4): Vector4; + /** + * If this vector's x, y, z or w value is greater than the max vector's x, y, z or w + * value, it is replaced by the corresponding value. + * If this vector's x, y, z or w value is less than the min vector's x, y, z or w value, + * it is replaced by the corresponding value. + * + * @param {Vector4} min - The minimum x, y and z values. + * @param {Vector4} max - The maximum x, y and z values in the desired range. + * @return {Vector4} A reference to this vector. + */ + clamp(min: Vector4, max: Vector4): Vector4; + /** + * If this vector's x, y, z or w values are greater than the max value, they are + * replaced by the max value. + * If this vector's x, y, z or w values are less than the min value, they are + * replaced by the min value. + * + * @param {number} minVal - The minimum value the components will be clamped to. + * @param {number} maxVal - The maximum value the components will be clamped to. + * @return {Vector4} A reference to this vector. + */ + clampScalar(minVal: number, maxVal: number): Vector4; + /** + * If this vector's length is greater than the max value, it is replaced by + * the max value. + * If this vector's length is less than the min value, it is replaced by the + * min value. + * + * @param {number} min - The minimum value the vector length will be clamped to. + * @param {number} max - The maximum value the vector length will be clamped to. + * @return {Vector4} A reference to this vector. + */ + clampLength(min: number, max: number): Vector4; + /** + * The components of this vector are rounded down to the nearest integer value. + * + * @return {Vector4} A reference to this vector. + */ + floor(): Vector4; + /** + * The components of this vector are rounded up to the nearest integer value. + * + * @return {Vector4} A reference to this vector. + */ + ceil(): Vector4; + /** + * The components of this vector are rounded to the nearest integer value + * + * @return {Vector4} A reference to this vector. + */ + round(): Vector4; + /** + * The components of this vector are rounded towards zero (up if negative, + * down if positive) to an integer value. + * + * @return {Vector4} A reference to this vector. + */ + roundToZero(): Vector4; + /** + * Inverts this vector - i.e. sets x = -x, y = -y, z = -z, w = -w. + * + * @return {Vector4} A reference to this vector. + */ + negate(): Vector4; + /** + * Calculates the dot product of the given vector with this instance. + * + * @param {Vector4} v - The vector to compute the dot product with. + * @return {number} The result of the dot product. + */ + dot(v: Vector4): number; + /** + * Computes the square of the Euclidean length (straight-line length) from + * (0, 0, 0, 0) to (x, y, z, w). If you are comparing the lengths of vectors, you should + * compare the length squared instead as it is slightly more efficient to calculate. + * + * @return {number} The square length of this vector. + */ + lengthSq(): number; + /** + * Computes the Euclidean length (straight-line length) from (0, 0, 0, 0) to (x, y, z, w). + * + * @return {number} The length of this vector. + */ + length(): number; + /** + * Computes the Manhattan length of this vector. + * + * @return {number} The length of this vector. + */ + manhattanLength(): number; + /** + * Converts this vector to a unit vector - that is, sets it equal to a vector + * with the same direction as this one, but with a vector length of `1`. + * + * @return {Vector4} A reference to this vector. + */ + normalize(): Vector4; + /** + * Sets this vector to a vector with the same direction as this one, but + * with the specified length. + * + * @param {number} length - The new length of this vector. + * @return {Vector4} A reference to this vector. + */ + setLength(length: number): Vector4; + /** + * Linearly interpolates between the given vector and this instance, where + * alpha is the percent distance along the line - alpha = 0 will be this + * vector, and alpha = 1 will be the given one. + * + * @param {Vector4} v - The vector to interpolate towards. + * @param {number} alpha - The interpolation factor, typically in the closed interval `[0, 1]`. + * @return {Vector4} A reference to this vector. + */ + lerp(v: Vector4, alpha: number): Vector4; + /** + * Linearly interpolates between the given vectors, where alpha is the percent + * distance along the line - alpha = 0 will be first vector, and alpha = 1 will + * be the second one. The result is stored in this instance. + * + * @param {Vector4} v1 - The first vector. + * @param {Vector4} v2 - The second vector. + * @param {number} alpha - The interpolation factor, typically in the closed interval `[0, 1]`. + * @return {Vector4} A reference to this vector. + */ + lerpVectors(v1: Vector4, v2: Vector4, alpha: number): Vector4; + /** + * Returns `true` if this vector is equal with the given one. + * + * @param {Vector4} v - The vector to test for equality. + * @return {boolean} Whether this vector is equal with the given one. + */ + equals(v: Vector4): boolean; + /** + * Sets this vector's x value to be `array[ offset ]`, y value to be `array[ offset + 1 ]`, + * z value to be `array[ offset + 2 ]`, w value to be `array[ offset + 3 ]`. + * + * @param {Array} array - An array holding the vector component values. + * @param {number} [offset=0] - The offset into the array. + * @return {Vector4} A reference to this vector. + */ + fromArray(array: Array, offset?: number): Vector4; + /** + * Writes the components of this vector to the given array. If no array is provided, + * the method returns a new instance. + * + * @param {Array} [array=[]] - The target array holding the vector components. + * @param {number} [offset=0] - Index of the first element in the array. + * @return {Array} The vector components. + */ + toArray(array?: Array, offset?: number): Array; + /** + * Sets the components of this vector from the given buffer attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute holding vector data. + * @param {number} index - The index into the attribute. + * @return {Vector4} A reference to this vector. + */ + fromBufferAttribute(attribute: BufferAttribute, index: number): Vector4; + /** + * Sets each component of this vector to a pseudo-random value between `0` and + * `1`, excluding `1`. + * + * @return {Vector4} A reference to this vector. + */ + random(): Vector4; + [Symbol.iterator](): Generator; +} diff --git a/jsdoc-testing/jsdoc/src/math/interpolants/BezierInterpolant.d.ts b/jsdoc-testing/jsdoc/src/math/interpolants/BezierInterpolant.d.ts new file mode 100644 index 000000000..a3d1715dc --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/interpolants/BezierInterpolant.d.ts @@ -0,0 +1,21 @@ +/** + * A Bezier interpolant using cubic Bezier curves with 2D control points. + * + * This interpolant supports the COLLADA/Maya style of Bezier animation where + * each keyframe has explicit in/out tangent control points specified as + * 2D coordinates (time, value). + * + * Tangent data is read from `inTangents` and `outTangents` on the interpolant + * (populated by `KeyframeTrack.InterpolantFactoryMethodBezier`). + * + * For a track with N keyframes and stride S: + * - Each tangent array has N * S * 2 values + * - Layout: [k0_c0_time, k0_c0_value, k0_c1_time, k0_c1_value, ..., k0_cS_time, k0_cS_value, + * k1_c0_time, k1_c0_value, ...] + * + * @augments Interpolant + */ +export class BezierInterpolant extends Interpolant { + interpolate_(i1: any, t0: any, t: any, t1: any): TypedArray; +} +import { Interpolant } from '../Interpolant.js'; diff --git a/jsdoc-testing/jsdoc/src/math/interpolants/CubicInterpolant.d.ts b/jsdoc-testing/jsdoc/src/math/interpolants/CubicInterpolant.d.ts new file mode 100644 index 000000000..ca53c5e9a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/interpolants/CubicInterpolant.d.ts @@ -0,0 +1,22 @@ +/** + * Fast and simple cubic spline interpolant. + * + * It was derived from a Hermitian construction setting the first derivative + * at each sample position to the linear slope between neighboring positions + * over their parameter interval. + * + * @augments Interpolant + */ +export class CubicInterpolant extends Interpolant { + _weightPrev: number; + _offsetPrev: number; + _weightNext: number; + _offsetNext: number; + DefaultSettings_: { + endingStart: number; + endingEnd: number; + }; + intervalChanged_(i1: any, t0: any, t1: any): void; + interpolate_(i1: any, t0: any, t: any, t1: any): TypedArray; +} +import { Interpolant } from '../Interpolant.js'; diff --git a/jsdoc-testing/jsdoc/src/math/interpolants/DiscreteInterpolant.d.ts b/jsdoc-testing/jsdoc/src/math/interpolants/DiscreteInterpolant.d.ts new file mode 100644 index 000000000..04ce01eb6 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/interpolants/DiscreteInterpolant.d.ts @@ -0,0 +1,10 @@ +/** + * Interpolant that evaluates to the sample value at the position preceding + * the parameter. + * + * @augments Interpolant + */ +export class DiscreteInterpolant extends Interpolant { + interpolate_(i1: any): TypedArray; +} +import { Interpolant } from '../Interpolant.js'; diff --git a/jsdoc-testing/jsdoc/src/math/interpolants/LinearInterpolant.d.ts b/jsdoc-testing/jsdoc/src/math/interpolants/LinearInterpolant.d.ts new file mode 100644 index 000000000..d36003868 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/interpolants/LinearInterpolant.d.ts @@ -0,0 +1,9 @@ +/** + * A basic linear interpolant. + * + * @augments Interpolant + */ +export class LinearInterpolant extends Interpolant { + interpolate_(i1: any, t0: any, t: any, t1: any): TypedArray; +} +import { Interpolant } from '../Interpolant.js'; diff --git a/jsdoc-testing/jsdoc/src/math/interpolants/QuaternionLinearInterpolant.d.ts b/jsdoc-testing/jsdoc/src/math/interpolants/QuaternionLinearInterpolant.d.ts new file mode 100644 index 000000000..e8ddddc6e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/math/interpolants/QuaternionLinearInterpolant.d.ts @@ -0,0 +1,9 @@ +/** + * Spherical linear unit quaternion interpolant. + * + * @augments Interpolant + */ +export class QuaternionLinearInterpolant extends Interpolant { + interpolate_(i1: any, t0: any, t: any, t1: any): TypedArray; +} +import { Interpolant } from '../Interpolant.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/Nodes.d.ts b/jsdoc-testing/jsdoc/src/nodes/Nodes.d.ts new file mode 100644 index 000000000..ba6b08284 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/Nodes.d.ts @@ -0,0 +1,141 @@ +export * from "./core/constants.js"; +export { default as ArrayNode } from "./core/ArrayNode.js"; +export { default as AssignNode } from "./core/AssignNode.js"; +export { default as AttributeNode } from "./core/AttributeNode.js"; +export { default as BypassNode } from "./core/BypassNode.js"; +export { default as ConstNode } from "./core/ConstNode.js"; +export { default as ContextNode } from "./core/ContextNode.js"; +export { default as IndexNode } from "./core/IndexNode.js"; +export { default as InputNode } from "./core/InputNode.js"; +export { default as InspectorNode } from "./core/InspectorNode.js"; +export { default as IsolateNode } from "./core/IsolateNode.js"; +export { default as LightingModel } from "./core/LightingModel.js"; +export { default as MRTNode } from "./core/MRTNode.js"; +export { default as Node } from "./core/Node.js"; +export { default as NodeAttribute } from "./core/NodeAttribute.js"; +export { default as NodeBuilder } from "./core/NodeBuilder.js"; +export { default as NodeCache } from "./core/NodeCache.js"; +export { default as NodeCode } from "./core/NodeCode.js"; +export { default as NodeError } from "./core/NodeError.js"; +export { default as NodeFrame } from "./core/NodeFrame.js"; +export { default as NodeFunctionInput } from "./core/NodeFunctionInput.js"; +export { default as NodeUniform } from "./core/NodeUniform.js"; +export { default as NodeVar } from "./core/NodeVar.js"; +export { default as NodeVarying } from "./core/NodeVarying.js"; +export { default as OutputStructNode } from "./core/OutputStructNode.js"; +export { default as ParameterNode } from "./core/ParameterNode.js"; +export { default as PropertyNode } from "./core/PropertyNode.js"; +export { default as StackNode } from "./core/StackNode.js"; +export { default as StackTrace } from "./core/StackTrace.js"; +export { default as StructNode } from "./core/StructNode.js"; +export { default as StructTypeNode } from "./core/StructTypeNode.js"; +export { default as SubBuildNode } from "./core/SubBuildNode.js"; +export { default as TempNode } from "./core/TempNode.js"; +export { default as UniformGroupNode } from "./core/UniformGroupNode.js"; +export { default as UniformNode } from "./core/UniformNode.js"; +export { default as VarNode } from "./core/VarNode.js"; +export { default as VaryingNode } from "./core/VaryingNode.js"; +export { NodeUtils }; +export { default as BatchNode } from "./accessors/BatchNode.js"; +export { default as BufferAttributeNode } from "./accessors/BufferAttributeNode.js"; +export { default as BufferNode } from "./accessors/BufferNode.js"; +export { default as BuiltinNode } from "./accessors/BuiltinNode.js"; +export { default as ClippingNode } from "./accessors/ClippingNode.js"; +export { default as CubeTextureNode } from "./accessors/CubeTextureNode.js"; +export { default as InstanceNode } from "./accessors/InstanceNode.js"; +export { default as InstancedMeshNode } from "./accessors/InstancedMeshNode.js"; +export { default as MaterialNode } from "./accessors/MaterialNode.js"; +export { default as MaterialReferenceNode } from "./accessors/MaterialReferenceNode.js"; +export { default as ModelNode } from "./accessors/ModelNode.js"; +export { default as MorphNode } from "./accessors/MorphNode.js"; +export { default as Object3DNode } from "./accessors/Object3DNode.js"; +export { default as PointUVNode } from "./accessors/PointUVNode.js"; +export { default as ReferenceBaseNode } from "./accessors/ReferenceBaseNode.js"; +export { default as ReferenceNode } from "./accessors/ReferenceNode.js"; +export { default as RendererReferenceNode } from "./accessors/RendererReferenceNode.js"; +export { default as SkinningNode } from "./accessors/SkinningNode.js"; +export { default as StorageBufferNode } from "./accessors/StorageBufferNode.js"; +export { default as StorageTexture3DNode } from "./accessors/StorageTexture3DNode.js"; +export { default as StorageTextureNode } from "./accessors/StorageTextureNode.js"; +export { default as Texture3DNode } from "./accessors/Texture3DNode.js"; +export { default as TextureNode } from "./accessors/TextureNode.js"; +export { default as TextureSizeNode } from "./accessors/TextureSizeNode.js"; +export { default as UniformArrayNode } from "./accessors/UniformArrayNode.js"; +export { default as UserDataNode } from "./accessors/UserDataNode.js"; +export { default as VelocityNode } from "./accessors/VelocityNode.js"; +export { default as VertexColorNode } from "./accessors/VertexColorNode.js"; +export { default as CodeNode } from "./code/CodeNode.js"; +export { default as ExpressionNode } from "./code/ExpressionNode.js"; +export { default as FunctionCallNode } from "./code/FunctionCallNode.js"; +export { default as FunctionNode } from "./code/FunctionNode.js"; +export { default as BumpMapNode } from "./display/BumpMapNode.js"; +export { default as ColorSpaceNode } from "./display/ColorSpaceNode.js"; +export { default as FrontFacingNode } from "./display/FrontFacingNode.js"; +export { default as NormalMapNode } from "./display/NormalMapNode.js"; +export { default as PassNode } from "./display/PassNode.js"; +export { default as RenderOutputNode } from "./display/RenderOutputNode.js"; +export { default as ScreenNode } from "./display/ScreenNode.js"; +export { default as ToneMappingNode } from "./display/ToneMappingNode.js"; +export { default as ToonOutlinePassNode } from "./display/ToonOutlinePassNode.js"; +export { default as ViewportDepthNode } from "./display/ViewportDepthNode.js"; +export { default as ViewportDepthTextureNode } from "./display/ViewportDepthTextureNode.js"; +export { default as ViewportSharedTextureNode } from "./display/ViewportSharedTextureNode.js"; +export { default as ViewportTextureNode } from "./display/ViewportTextureNode.js"; +export { default as RangeNode } from "./geometry/RangeNode.js"; +export { default as AtomicFunctionNode } from "./gpgpu/AtomicFunctionNode.js"; +export { default as BarrierNode } from "./gpgpu/BarrierNode.js"; +export { default as ComputeBuiltinNode } from "./gpgpu/ComputeBuiltinNode.js"; +export { default as ComputeNode } from "./gpgpu/ComputeNode.js"; +export { default as SubgroupFunctionNode } from "./gpgpu/SubgroupFunctionNode.js"; +export { default as WorkgroupInfoNode } from "./gpgpu/WorkgroupInfoNode.js"; +export { default as AmbientLightNode } from "./lighting/AmbientLightNode.js"; +export { default as AnalyticLightNode } from "./lighting/AnalyticLightNode.js"; +export { default as AONode } from "./lighting/AONode.js"; +export { default as BasicEnvironmentNode } from "./lighting/BasicEnvironmentNode.js"; +export { default as BasicLightMapNode } from "./lighting/BasicLightMapNode.js"; +export { default as DirectionalLightNode } from "./lighting/DirectionalLightNode.js"; +export { default as EnvironmentNode } from "./lighting/EnvironmentNode.js"; +export { default as HemisphereLightNode } from "./lighting/HemisphereLightNode.js"; +export { default as IESSpotLightNode } from "./lighting/IESSpotLightNode.js"; +export { default as IrradianceNode } from "./lighting/IrradianceNode.js"; +export { default as LightingContextNode } from "./lighting/LightingContextNode.js"; +export { default as LightingNode } from "./lighting/LightingNode.js"; +export { default as LightProbeNode } from "./lighting/LightProbeNode.js"; +export { default as LightsNode } from "./lighting/LightsNode.js"; +export { default as PointLightNode } from "./lighting/PointLightNode.js"; +export { default as PointShadowNode } from "./lighting/PointShadowNode.js"; +export { default as ProjectorLightNode } from "./lighting/ProjectorLightNode.js"; +export { default as RectAreaLightNode } from "./lighting/RectAreaLightNode.js"; +export { default as ShadowBaseNode } from "./lighting/ShadowBaseNode.js"; +export { default as ShadowNode } from "./lighting/ShadowNode.js"; +export { default as SpotLightNode } from "./lighting/SpotLightNode.js"; +export { default as BitcastNode } from "./math/BitcastNode.js"; +export { default as BitcountNode } from "./math/BitcountNode.js"; +export { default as ConditionalNode } from "./math/ConditionalNode.js"; +export { default as MathNode } from "./math/MathNode.js"; +export { default as OperatorNode } from "./math/OperatorNode.js"; +export { default as PackFloatNode } from "./math/PackFloatNode.js"; +export { default as UnpackFloatNode } from "./math/UnpackFloatNode.js"; +export { default as GLSLNodeParser } from "./parsers/GLSLNodeParser.js"; +export { default as PMREMNode } from "./pmrem/PMREMNode.js"; +export { default as ArrayElementNode } from "./utils/ArrayElementNode.js"; +export { default as ConvertNode } from "./utils/ConvertNode.js"; +export { default as CubeMapNode } from "./utils/CubeMapNode.js"; +export { default as DebugNode } from "./utils/DebugNode.js"; +export { default as EventNode } from "./utils/EventNode.js"; +export { default as FlipNode } from "./utils/FlipNode.js"; +export { default as FunctionOverloadingNode } from "./utils/FunctionOverloadingNode.js"; +export { default as JoinNode } from "./utils/JoinNode.js"; +export { default as LoopNode } from "./utils/LoopNode.js"; +export { default as MaxMipLevelNode } from "./utils/MaxMipLevelNode.js"; +export { default as MemberNode } from "./utils/MemberNode.js"; +export { default as ReflectorNode } from "./utils/ReflectorNode.js"; +export { default as RotateNode } from "./utils/RotateNode.js"; +export { default as RTTNode } from "./utils/RTTNode.js"; +export { default as SampleNode } from "./utils/SampleNode.js"; +export { default as SetNode } from "./utils/SetNode.js"; +export { default as SplitNode } from "./utils/SplitNode.js"; +export { default as StorageArrayElementNode } from "./utils/StorageArrayElementNode.js"; +export { default as PhongLightingModel } from "./functions/PhongLightingModel.js"; +export { default as PhysicalLightingModel } from "./functions/PhysicalLightingModel.js"; +import * as NodeUtils from './core/NodeUtils.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/TSL.d.ts b/jsdoc-testing/jsdoc/src/nodes/TSL.d.ts new file mode 100644 index 000000000..6f297a21c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/TSL.d.ts @@ -0,0 +1,138 @@ +export * from "./core/constants.js"; +export * from "./core/AssignNode.js"; +export * from "./core/AttributeNode.js"; +export * from "./core/BypassNode.js"; +export * from "./core/IsolateNode.js"; +export * from "./core/ContextNode.js"; +export * from "./core/IndexNode.js"; +export * from "./core/ParameterNode.js"; +export * from "./core/PropertyNode.js"; +export * from "./core/StackNode.js"; +export * from "./core/StructNode.js"; +export * from "./core/UniformGroupNode.js"; +export * from "./core/UniformNode.js"; +export * from "./core/VaryingNode.js"; +export * from "./core/OutputStructNode.js"; +export * from "./core/MRTNode.js"; +export * from "./math/BitcastNode.js"; +export * from "./math/BitcountNode.js"; +export * from "./math/Hash.js"; +export * from "./math/MathUtils.js"; +export * from "./math/PackFloatNode.js"; +export * from "./math/UnpackFloatNode.js"; +export * from "./math/TriNoise3D.js"; +export * from "./utils/EquirectUV.js"; +export * from "./utils/FunctionOverloadingNode.js"; +export * from "./utils/LoopNode.js"; +export * from "./utils/MatcapUV.js"; +export * from "./utils/MaxMipLevelNode.js"; +export * from "./utils/Oscillators.js"; +export * from "./utils/Packing.js"; +export * from "./utils/Remap.js"; +export * from "./utils/UVUtils.js"; +export * from "./utils/SpriteUtils.js"; +export * from "./utils/ViewportUtils.js"; +export * from "./utils/RotateNode.js"; +export * from "./utils/SpriteSheetUV.js"; +export * from "./utils/Timer.js"; +export * from "./utils/TriplanarTextures.js"; +export * from "./utils/ReflectorNode.js"; +export * from "./utils/RTTNode.js"; +export * from "./utils/PostProcessingUtils.js"; +export * from "./utils/SampleNode.js"; +export * from "./utils/EventNode.js"; +export * from "./tsl/TSLBase.js"; +export * from "./accessors/AccessorsUtils.js"; +export * from "./accessors/Arrays.js"; +export * from "./accessors/UniformArrayNode.js"; +export * from "./accessors/Bitangent.js"; +export * from "./accessors/BufferAttributeNode.js"; +export * from "./accessors/BufferNode.js"; +export * from "./accessors/BuiltinNode.js"; +export * from "./accessors/Camera.js"; +export * from "./accessors/VertexColorNode.js"; +export * from "./accessors/CubeTextureNode.js"; +export * from "./accessors/InstanceNode.js"; +export * from "./accessors/InstancedMeshNode.js"; +export * from "./accessors/BatchNode.js"; +export * from "./accessors/MaterialNode.js"; +export * from "./accessors/MaterialProperties.js"; +export * from "./accessors/MaterialReferenceNode.js"; +export * from "./accessors/RendererReferenceNode.js"; +export * from "./accessors/MorphNode.js"; +export * from "./accessors/TextureBicubic.js"; +export * from "./accessors/ModelNode.js"; +export * from "./accessors/ModelViewProjectionNode.js"; +export * from "./accessors/Normal.js"; +export * from "./accessors/Object3DNode.js"; +export * from "./accessors/PointUVNode.js"; +export * from "./accessors/Position.js"; +export * from "./accessors/ReferenceNode.js"; +export * from "./accessors/ReflectVector.js"; +export * from "./accessors/SkinningNode.js"; +export * from "./accessors/SceneProperties.js"; +export * from "./accessors/StorageBufferNode.js"; +export * from "./accessors/StorageTexture3DNode.js"; +export * from "./accessors/StorageTextureNode.js"; +export * from "./accessors/Tangent.js"; +export * from "./accessors/TextureNode.js"; +export * from "./accessors/TextureSizeNode.js"; +export * from "./accessors/Texture3DNode.js"; +export * from "./accessors/UV.js"; +export * from "./accessors/UserDataNode.js"; +export * from "./accessors/VelocityNode.js"; +export * from "./display/BlendModes.js"; +export * from "./display/BumpMapNode.js"; +export * from "./display/ColorAdjustment.js"; +export * from "./display/ColorSpaceNode.js"; +export * from "./display/FrontFacingNode.js"; +export * from "./display/NormalMapNode.js"; +export * from "./display/PremultiplyAlphaFunctions.js"; +export * from "./display/ToneMappingNode.js"; +export * from "./display/ScreenNode.js"; +export * from "./display/ViewportTextureNode.js"; +export * from "./display/ViewportSharedTextureNode.js"; +export * from "./display/ViewportDepthTextureNode.js"; +export * from "./display/ViewportDepthNode.js"; +export * from "./display/RenderOutputNode.js"; +export * from "./display/ToonOutlinePassNode.js"; +export * from "./display/PassNode.js"; +export * from "./display/ColorSpaceFunctions.js"; +export * from "./display/ToneMappingFunctions.js"; +export * from "./code/ExpressionNode.js"; +export * from "./code/CodeNode.js"; +export * from "./code/FunctionCallNode.js"; +export * from "./code/FunctionNode.js"; +export * from "./fog/Fog.js"; +export * from "./geometry/RangeNode.js"; +export * from "./gpgpu/ComputeNode.js"; +export * from "./gpgpu/ComputeBuiltinNode.js"; +export * from "./gpgpu/BarrierNode.js"; +export * from "./gpgpu/WorkgroupInfoNode.js"; +export * from "./gpgpu/AtomicFunctionNode.js"; +export * from "./gpgpu/SubgroupFunctionNode.js"; +export * from "./accessors/Lights.js"; +export * from "./lighting/LightsNode.js"; +export * from "./lighting/LightingContextNode.js"; +export * from "./lighting/ShadowBaseNode.js"; +export * from "./lighting/ShadowNode.js"; +export * from "./lighting/ShadowFilterNode.js"; +export * from "./lighting/PointShadowNode.js"; +export * from "./lighting/PointLightNode.js"; +export * from "./pmrem/PMREMNode.js"; +export * from "./pmrem/PMREMUtils.js"; +export * from "./procedural/Checker.js"; +export * from "./shapes/Shapes.js"; +export * from "./materialx/MaterialXNodes.js"; +export * from "./lighting/LightUtils.js"; +export { default as BRDF_GGX } from "./functions/BSDF/BRDF_GGX.js"; +export { default as BRDF_Lambert } from "./functions/BSDF/BRDF_Lambert.js"; +export { default as D_GGX } from "./functions/BSDF/D_GGX.js"; +export { default as DFGLUT } from "./functions/BSDF/DFGLUT.js"; +export { default as F_Schlick } from "./functions/BSDF/F_Schlick.js"; +export { default as Schlick_to_F0 } from "./functions/BSDF/Schlick_to_F0.js"; +export { default as V_GGX_SmithCorrelated } from "./functions/BSDF/V_GGX_SmithCorrelated.js"; +export { default as getGeometryRoughness } from "./functions/material/getGeometryRoughness.js"; +export { default as getParallaxCorrectNormal } from "./functions/material/getParallaxCorrectNormal.js"; +export { default as getRoughness } from "./functions/material/getRoughness.js"; +export { default as getShIrradianceAt } from "./functions/material/getShIrradianceAt.js"; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/AccessorsUtils.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/AccessorsUtils.d.ts new file mode 100644 index 000000000..07177caec --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/AccessorsUtils.d.ts @@ -0,0 +1,23 @@ +/** + * TSL object that represents the TBN matrix in view space. + * + * @tsl + * @type {Node} + */ +export const TBNViewMatrix: Node; +/** + * TSL object that represents the parallax direction. + * + * @tsl + * @type {Node} + */ +export const parallaxDirection: Node; +export function parallaxUV(uv: Node, scale: Node): Node; +/** + * TSL function for computing bent normals. + * + * @tsl + * @function + * @returns {Node} Bent normals. + */ +export const bentNormalView: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/Arrays.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/Arrays.d.ts new file mode 100644 index 000000000..6c9184803 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/Arrays.d.ts @@ -0,0 +1,2 @@ +export function attributeArray(count: number | TypedArray, type?: string | Struct): StorageBufferNode; +export function instancedArray(count: number | TypedArray, type?: string | Struct): StorageBufferNode; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/BatchNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/BatchNode.d.ts new file mode 100644 index 000000000..1fa7fd4cc --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/BatchNode.d.ts @@ -0,0 +1,47 @@ +export default BatchNode; +/** + * TSL function for creating a batch node. + * + * @tsl + * @function + * @param {BatchedMesh} batchMesh - A reference to batched mesh. + * @returns {BatchNode} + */ +export const batch: any; +/** + * This node implements the vertex shader logic which is required + * when rendering 3D objects via batching. `BatchNode` must be used + * with instances of {@link BatchedMesh}. + * + * @augments Node + */ +declare class BatchNode extends Node { + /** + * Constructs a new batch node. + * + * @param {BatchedMesh} batchMesh - A reference to batched mesh. + */ + constructor(batchMesh: BatchedMesh); + /** + * A reference to batched mesh. + * + * @type {BatchedMesh} + */ + batchMesh: BatchedMesh; + /** + * The batching index node. + * + * @type {?IndexNode} + * @default null + */ + batchingIdNode: IndexNode | null; + /** + * Setups the internal buffers and nodes and assigns the transformed vertex data + * to predefined node variables for accumulation. That follows the same patterns + * like with morph and skinning nodes. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setup(builder: NodeBuilder): void; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/Bitangent.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/Bitangent.d.ts new file mode 100644 index 000000000..7694a53fc --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/Bitangent.d.ts @@ -0,0 +1,28 @@ +/** + * TSL object that represents the bitangent attribute of the current rendered object. + * + * @tsl + * @type {Node} + */ +export const bitangentGeometry: Node; +/** + * TSL object that represents the vertex bitangent in local space of the current rendered object. + * + * @tsl + * @type {Node} + */ +export const bitangentLocal: Node; +/** + * TSL object that represents the vertex bitangent in view space of the current rendered object. + * + * @tsl + * @type {Node} + */ +export const bitangentView: Node; +/** + * TSL object that represents the vertex bitangent in world space of the current rendered object. + * + * @tsl + * @type {Node} + */ +export const bitangentWorld: Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/BufferAttributeNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/BufferAttributeNode.d.ts new file mode 100644 index 000000000..60775a2a1 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/BufferAttributeNode.d.ts @@ -0,0 +1,143 @@ +export default BufferAttributeNode; +export function bufferAttribute(array: BufferAttribute | InterleavedBuffer | TypedArray, type?: string | null, stride?: number, offset?: number): BufferAttributeNode | Node; +export function dynamicBufferAttribute(array: BufferAttribute | InterleavedBuffer | TypedArray, type?: string | null, stride?: number, offset?: number): BufferAttributeNode | Node; +export function instancedBufferAttribute(array: BufferAttribute | InterleavedBuffer | TypedArray, type?: string | null, stride?: number, offset?: number): BufferAttributeNode | Node; +export function instancedDynamicBufferAttribute(array: BufferAttribute | InterleavedBuffer | TypedArray, type?: string | null, stride?: number, offset?: number): BufferAttributeNode | Node; +/** + * In earlier `three.js` versions it was only possible to define attribute data + * on geometry level. With `BufferAttributeNode`, it is also possible to do this + * on the node level. + * ```js + * const geometry = new THREE.PlaneGeometry(); + * const positionAttribute = geometry.getAttribute( 'position' ); + * + * const colors = []; + * for ( let i = 0; i < position.count; i ++ ) { + * colors.push( 1, 0, 0 ); + * } + * + * material.colorNode = bufferAttribute( new THREE.Float32BufferAttribute( colors, 3 ) ); + * ``` + * This new approach is especially interesting when geometry data are generated via + * compute shaders. The below line converts a storage buffer into an attribute node. + * ```js + * material.positionNode = positionBuffer.toAttribute(); + * ``` + * @augments InputNode + */ +declare class BufferAttributeNode extends InputNode { + /** + * Constructs a new buffer attribute node. + * + * @param {BufferAttribute|InterleavedBuffer|TypedArray} value - The attribute data. + * @param {?string} [bufferType=null] - The buffer type (e.g. `'vec3'`). + * @param {number} [bufferStride=0] - The buffer stride. + * @param {number} [bufferOffset=0] - The buffer offset. + */ + constructor(value: BufferAttribute | InterleavedBuffer | TypedArray, bufferType?: string | null, bufferStride?: number, bufferOffset?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBufferNode: boolean; + /** + * The buffer type (e.g. `'vec3'`). + * + * @type {?string} + * @default null + */ + bufferType: string | null; + /** + * The buffer stride. + * + * @type {number} + * @default 0 + */ + bufferStride: number; + /** + * The buffer offset. + * + * @type {number} + * @default 0 + */ + bufferOffset: number; + /** + * The usage property. Set this to `THREE.DynamicDrawUsage` via `.setUsage()`, + * if you are planning to update the attribute data per frame. + * + * @type {number} + * @default StaticDrawUsage + */ + usage: number; + /** + * Whether the attribute is instanced or not. + * + * @type {boolean} + * @default false + */ + instanced: boolean; + /** + * A reference to the buffer attribute. + * + * @type {?BufferAttribute} + * @default null + */ + attribute: BufferAttribute | null; + /** + * This method is overwritten since the attribute data might be shared + * and thus the hash should be shared as well. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The hash. + */ + getHash(builder: NodeBuilder): string; + /** + * This method is overwritten since the node type is inferred from + * the buffer attribute. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Depending on which value was passed to the node, `setup()` behaves + * differently. If no instance of `BufferAttribute` was passed, the method + * creates an internal attribute and configures it respectively. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setup(builder: NodeBuilder): void; + /** + * Generates the code snippet of the buffer attribute node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The generated code snippet. + */ + generate(builder: NodeBuilder): string; + /** + * Overwrites the default implementation to return a fixed value `'bufferAttribute'`. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The input type. + */ + getInputType(): string; + /** + * Sets the `usage` property to the given value. + * + * @param {number} value - The usage to set. + * @return {BufferAttributeNode} A reference to this node. + */ + setUsage(value: number): BufferAttributeNode; + /** + * Sets the `instanced` property to the given value. + * + * @param {boolean} value - The value to set. + * @return {BufferAttributeNode} A reference to this node. + */ + setInstanced(value: boolean): BufferAttributeNode; +} +import { InterleavedBuffer } from '../../core/InterleavedBuffer.js'; +import InputNode from '../core/InputNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/BufferNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/BufferNode.d.ts new file mode 100644 index 000000000..a0765ba1c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/BufferNode.d.ts @@ -0,0 +1,75 @@ +export default BufferNode; +export function buffer(value: Array, type: string, count: number): BufferNode; +/** + * A special type of uniform node which represents array-like data + * as uniform buffers. The access usually happens via `element()` + * which returns an instance of {@link ArrayElementNode}. For example: + * + * ```js + * const bufferNode = buffer( array, 'mat4', count ); + * const matrixNode = bufferNode.element( index ); // access a matrix from the buffer + * ``` + * In general, it is recommended to use the more managed {@link UniformArrayNode} + * since it handles more input types and automatically cares about buffer paddings. + * + * @augments UniformNode + */ +declare class BufferNode extends UniformNode { + /** + * Constructs a new buffer node. + * + * @param {Array} value - Array-like buffer data. + * @param {string} bufferType - The data type of the buffer. + * @param {number} [bufferCount=0] - The count of buffer elements. + */ + constructor(value: Array, bufferType: string, bufferCount?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBufferNode: boolean; + /** + * The data type of the buffer. + * + * @type {string} + */ + bufferType: string; + /** + * The uniform node that holds the value of the reference node. + * + * @type {number} + * @default 0 + */ + bufferCount: number; + /** + * An array of update ranges. + * + * @type {Array<{start: number, count: number}>} + */ + updateRanges: Array<{ + start: number; + count: number; + }>; + /** + * Adds a range of data in the data array to be updated on the GPU. + * + * @param {number} start - Position at which to start update. + * @param {number} count - The number of components to update. + */ + addUpdateRange(start: number, count: number): void; + /** + * Clears the update ranges. + */ + clearUpdateRanges(): void; + /** + * Overwrites the default implementation to return a fixed value `'buffer'`. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The input type. + */ + getInputType(): string; +} +import UniformNode from '../core/UniformNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/BuiltinNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/BuiltinNode.d.ts new file mode 100644 index 000000000..1081d0ec4 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/BuiltinNode.d.ts @@ -0,0 +1,40 @@ +export default BuiltinNode; +/** + * TSL function for creating a builtin node. + * + * @tsl + * @function + * @param {string} name - The name of the built-in shader variable. + * @returns {BuiltinNode} + */ +export const builtin: any; +/** + * The node allows to set values for built-in shader variables. That is + * required for features like hardware-accelerated vertex clipping. + * + * @augments Node + */ +declare class BuiltinNode extends Node { + /** + * Constructs a new builtin node. + * + * @param {string} name - The name of the built-in shader variable. + */ + constructor(name: string); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBuiltinNode: boolean; + /** + * Generates the code snippet of the builtin node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The generated code snippet. + */ + generate(): string; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/Camera.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/Camera.d.ts new file mode 100644 index 000000000..1af86bd26 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/Camera.d.ts @@ -0,0 +1,70 @@ +/** + * TSL object that represents the current `index` value of the camera if used ArrayCamera. + * + * @tsl + * @type {UniformNode} + */ +export const cameraIndex: UniformNode; +/** + * TSL object that represents the `near` value of the camera used for the current render. + * + * @tsl + * @type {UniformNode} + */ +export const cameraNear: UniformNode; +/** + * TSL object that represents the `far` value of the camera used for the current render. + * + * @tsl + * @type {UniformNode} + */ +export const cameraFar: UniformNode; +/** + * TSL object that represents the projection matrix of the camera used for the current render. + * + * @tsl + * @type {UniformNode} + */ +export const cameraProjectionMatrix: UniformNode; +/** + * TSL object that represents the inverse projection matrix of the camera used for the current render. + * + * @tsl + * @type {UniformNode} + */ +export const cameraProjectionMatrixInverse: UniformNode; +/** + * TSL object that represents the view matrix of the camera used for the current render. + * + * @tsl + * @type {UniformNode} + */ +export const cameraViewMatrix: UniformNode; +/** + * TSL object that represents the world matrix of the camera used for the current render. + * + * @tsl + * @type {UniformNode} + */ +export const cameraWorldMatrix: UniformNode; +/** + * TSL object that represents the normal matrix of the camera used for the current render. + * + * @tsl + * @type {UniformNode} + */ +export const cameraNormalMatrix: UniformNode; +/** + * TSL object that represents the position in world space of the camera used for the current render. + * + * @tsl + * @type {UniformNode} + */ +export const cameraPosition: UniformNode; +/** + * TSL object that represents the viewport of the camera used for the current render. + * + * @tsl + * @type {UniformNode} + */ +export const cameraViewport: UniformNode; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/ClippingNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/ClippingNode.d.ts new file mode 100644 index 000000000..5ee80d125 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/ClippingNode.d.ts @@ -0,0 +1,65 @@ +export default ClippingNode; +export function clipping(): ClippingNode; +export function clippingAlpha(): ClippingNode; +export function hardwareClipping(): ClippingNode; +/** + * This node is used in {@link NodeMaterial} to setup the clipping + * which can happen hardware-accelerated (if supported) and optionally + * use alpha-to-coverage for anti-aliasing clipped edges. + * + * @augments Node + */ +declare class ClippingNode extends Node { + /** + * Constructs a new clipping node. + * + * @param {('default'|'hardware'|'alphaToCoverage')} [scope='default'] - The node's scope. Similar to other nodes, + * the selected scope influences the behavior of the node and what type of code is generated. + */ + constructor(scope?: ("default" | "hardware" | "alphaToCoverage")); + /** + * The node's scope. Similar to other nodes, the selected scope influences + * the behavior of the node and what type of code is generated. + * + * @type {('default'|'hardware'|'alphaToCoverage')} + */ + scope: ("default" | "hardware" | "alphaToCoverage"); + /** + * Setups the node depending on the selected scope. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The result node. + */ + setup(builder: NodeBuilder): Node; + hardwareClipping: any; + /** + * Setups alpha to coverage. + * + * @param {Array} intersectionPlanes - The intersection planes. + * @param {Array} unionPlanes - The union planes. + * @return {Node} The result node. + */ + setupAlphaToCoverage(intersectionPlanes: Array, unionPlanes: Array): Node; + /** + * Setups the default clipping. + * + * @param {Array} intersectionPlanes - The intersection planes. + * @param {Array} unionPlanes - The union planes. + * @return {Node} The result node. + */ + setupDefault(intersectionPlanes: Array, unionPlanes: Array): Node; + /** + * Setups hardware clipping. + * + * @param {Array} unionPlanes - The union planes. + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The result node. + */ + setupHardwareClipping(unionPlanes: Array, builder: NodeBuilder): Node; +} +declare namespace ClippingNode { + let ALPHA_TO_COVERAGE: string; + let DEFAULT: string; + let HARDWARE: string; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/CubeTextureNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/CubeTextureNode.d.ts new file mode 100644 index 000000000..23a01c90a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/CubeTextureNode.d.ts @@ -0,0 +1,48 @@ +export default CubeTextureNode; +/** + * TSL function for creating a cube texture node. + * + * @tsl + * @function + * @param {CubeTexture} value - The cube texture. + * @param {?Node} [uvNode=null] - The uv node. + * @param {?Node} [levelNode=null] - The level node. + * @param {?Node} [biasNode=null] - The bias node. + * @returns {CubeTextureNode} + */ +export const cubeTextureBase: any; +export function cubeTexture(value?: (CubeTexture | CubeTextureNode) | null, uvNode?: Node | null, levelNode?: Node | null, biasNode?: Node | null): CubeTextureNode; +export function uniformCubeTexture(value?: CubeTexture | null): CubeTextureNode; +/** + * This type of uniform node represents a cube texture. + * + * @augments TextureNode + */ +declare class CubeTextureNode extends TextureNode { + /** + * Constructs a new cube texture node. + * + * @param {CubeTexture} value - The cube texture. + * @param {?Node} [uvNode=null] - The uv node. + * @param {?Node} [levelNode=null] - The level node. + * @param {?Node} [biasNode=null] - The bias node. + */ + constructor(value: CubeTexture, uvNode?: Node | null, levelNode?: Node | null, biasNode?: Node | null); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isCubeTextureNode: boolean; + /** + * Overwritten with an empty implementation since the `updateMatrix` flag is ignored + * for cube textures. The uv transformation matrix is not applied to cube textures. + * + * @param {boolean} value - The update toggle. + */ + setUpdateMatrix(): void; +} +import { CubeTexture } from '../../textures/CubeTexture.js'; +import TextureNode from './TextureNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/InstanceNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/InstanceNode.d.ts new file mode 100644 index 000000000..544f2e966 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/InstanceNode.d.ts @@ -0,0 +1,131 @@ +export default InstanceNode; +/** + * TSL function for creating an instance node. + * + * @tsl + * @function + * @param {number} count - The number of instances. + * @param {InstancedBufferAttribute|StorageInstancedBufferAttribute} instanceMatrix - Instanced buffer attribute representing the instance transformations. + * @param {?InstancedBufferAttribute|StorageInstancedBufferAttribute} instanceColor - Instanced buffer attribute representing the instance colors. + * @returns {InstanceNode} + */ +export const instance: any; +/** + * This node implements the vertex shader logic which is required + * when rendering 3D objects via instancing. The code makes sure + * vertex positions, normals and colors can be modified via instanced + * data. + * + * @augments Node + */ +declare class InstanceNode extends Node { + /** + * Constructs a new instance node. + * + * @param {number} count - The number of instances. + * @param {InstancedBufferAttribute|StorageInstancedBufferAttribute} instanceMatrix - Instanced buffer attribute representing the instance transformations. + * @param {?InstancedBufferAttribute|StorageInstancedBufferAttribute} instanceColor - Instanced buffer attribute representing the instance colors. + */ + constructor(count: number, instanceMatrix: InstancedBufferAttribute | StorageInstancedBufferAttribute, instanceColor?: (InstancedBufferAttribute | StorageInstancedBufferAttribute) | null); + /** + * The number of instances. + * + * @type {number} + */ + count: number; + /** + * Instanced buffer attribute representing the transformation of instances. + * + * @type {InstancedBufferAttribute} + */ + instanceMatrix: InstancedBufferAttribute; + /** + * Instanced buffer attribute representing the color of instances. + * + * @type {InstancedBufferAttribute} + */ + instanceColor: InstancedBufferAttribute; + /** + * The node that represents the instance matrix data. + * + * @type {?Node} + */ + instanceMatrixNode: Node | null; + /** + * The node that represents the instance color data. + * + * @type {?Node} + * @default null + */ + instanceColorNode: Node | null; + /** + * A reference to a buffer that is used by `instanceMatrixNode`. + * + * @type {?InstancedInterleavedBuffer} + */ + buffer: InstancedInterleavedBuffer | null; + /** + * A reference to a buffer that is used by `instanceColorNode`. + * + * @type {?InstancedBufferAttribute} + */ + bufferColor: InstancedBufferAttribute | null; + /** + * The previous instance matrices. Required for computing motion vectors. + * + * @type {?Node} + * @default null + */ + previousInstanceMatrixNode: Node | null; + /** + * Tracks whether the matrix data is provided via a storage buffer. + * + * @type {boolean} + */ + get isStorageMatrix(): boolean; + /** + * Tracks whether the color data is provided via a storage buffer. + * + * @type {boolean} + */ + get isStorageColor(): boolean; + /** + * Setups the internal buffers and nodes and assigns the transformed vertex data + * to predefined node variables for accumulation. That follows the same patterns + * like with morph and skinning nodes. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setup(builder: NodeBuilder): void; + /** + * Checks if the internal buffers require an update. + * + * @param {NodeFrame} frame - The current node frame. + */ + updateBefore(): void; + /** + * Updates velocity-related data if necessary. + * + * @param {NodeFrame} frame - The current node frame. + */ + update(frame: NodeFrame): void; + /** + * Computes the transformed/instanced vertex position of the previous frame. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The instanced position from the previous frame. + */ + getPreviousInstancedPosition(builder: NodeBuilder): Node; + /** + * Creates a node representing the instance matrix data. + * + * @private + * @param {boolean} assignBuffer - Whether the created interleaved buffer should be assigned to the `buffer` member or not. + * @param {NodeBuilder} builder - A reference to the current node builder. + * @return {Node} The instance matrix node. + */ + private _createInstanceMatrixNode; +} +import Node from '../core/Node.js'; +import { InstancedBufferAttribute } from '../../core/InstancedBufferAttribute.js'; +import { InstancedInterleavedBuffer } from '../../core/InstancedInterleavedBuffer.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/InstancedMeshNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/InstancedMeshNode.d.ts new file mode 100644 index 000000000..d9619f9e8 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/InstancedMeshNode.d.ts @@ -0,0 +1,31 @@ +export default InstancedMeshNode; +/** + * TSL function for creating an instanced mesh node. + * + * @tsl + * @function + * @param {InstancedMesh} instancedMesh - The instancedMesh. + * @returns {InstancedMeshNode} + */ +export const instancedMesh: any; +/** + * This is a special version of `InstanceNode` which requires the usage of {@link InstancedMesh}. + * It allows an easier setup of the instance node. + * + * @augments InstanceNode + */ +declare class InstancedMeshNode extends InstanceNode { + /** + * Constructs a new instanced mesh node. + * + * @param {InstancedMesh} instancedMesh - The instanced mesh. + */ + constructor(instancedMesh: InstancedMesh); + /** + * A reference to the instanced mesh. + * + * @type {InstancedMesh} + */ + instancedMesh: InstancedMesh; +} +import InstanceNode from './InstanceNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/Lights.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/Lights.d.ts new file mode 100644 index 000000000..1639939c2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/Lights.d.ts @@ -0,0 +1,48 @@ +/** + * TSL function for getting a shadow matrix uniform node for the given light. + * + * @tsl + * @function + * @param {Light} light -The light source. + * @returns {UniformNode} The shadow matrix uniform node. + */ +export function lightShadowMatrix(light: Light): UniformNode; +/** + * TSL function for getting projected uv coordinates for the given light. + * Relevant when using maps with spot lights. + * + * @tsl + * @function + * @param {Light} light -The light source. + * @param {Node} [position=positionWorld] -The position to project. + * @returns {Node} The projected uvs. + */ +export function lightProjectionUV(light: Light, position?: Node): Node; +/** + * TSL function for getting the position in world space for the given light. + * + * @tsl + * @function + * @param {Light} light -The light source. + * @returns {UniformNode} The light's position in world space. + */ +export function lightPosition(light: Light): UniformNode; +/** + * TSL function for getting the light target position in world space for the given light. + * + * @tsl + * @function + * @param {Light} light -The light source. + * @returns {UniformNode} The light target position in world space. + */ +export function lightTargetPosition(light: Light): UniformNode; +/** + * TSL function for getting the position in view space for the given light. + * + * @tsl + * @function + * @param {Light} light - The light source. + * @returns {UniformNode} The light's position in view space. + */ +export function lightViewPosition(light: Light): UniformNode; +export function lightTargetDirection(light: Light): Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/MaterialNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/MaterialNode.d.ts new file mode 100644 index 000000000..3bfbe299d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/MaterialNode.d.ts @@ -0,0 +1,384 @@ +export default MaterialNode; +/** + * TSL object that represents alpha test of the current material. + * + * @tsl + * @type {Node} + */ +export const materialAlphaTest: Node; +/** + * TSL object that represents the diffuse color of the current material. + * The value is composed via `color` * `map`. + * + * @tsl + * @type {Node} + */ +export const materialColor: Node; +/** + * TSL object that represents the shininess of the current material. + * + * @tsl + * @type {Node} + */ +export const materialShininess: Node; +/** + * TSL object that represents the emissive color of the current material. + * The value is composed via `emissive` * `emissiveIntensity` * `emissiveMap`. + * + * @tsl + * @type {Node} + */ +export const materialEmissive: Node; +/** + * TSL object that represents the opacity of the current material. + * The value is composed via `opacity` * `alphaMap`. + * + * @tsl + * @type {Node} + */ +export const materialOpacity: Node; +/** + * TSL object that represents the specular of the current material. + * + * @tsl + * @type {Node} + */ +export const materialSpecular: Node; +/** + * TSL object that represents the specular intensity of the current material. + * The value is composed via `specularIntensity` * `specularMap.a`. + * + * @tsl + * @type {Node} + */ +export const materialSpecularIntensity: Node; +/** + * TSL object that represents the specular color of the current material. + * The value is composed via `specularColor` * `specularMap.rgb`. + * + * @tsl + * @type {Node} + */ +export const materialSpecularColor: Node; +/** + * TSL object that represents the specular strength of the current material. + * The value is composed via `specularMap.r`. + * + * @tsl + * @type {Node} + */ +export const materialSpecularStrength: Node; +/** + * TSL object that represents the reflectivity of the current material. + * + * @tsl + * @type {Node} + */ +export const materialReflectivity: Node; +/** + * TSL object that represents the roughness of the current material. + * The value is composed via `roughness` * `roughnessMap.g`. + * + * @tsl + * @type {Node} + */ +export const materialRoughness: Node; +/** + * TSL object that represents the metalness of the current material. + * The value is composed via `metalness` * `metalnessMap.b`. + * + * @tsl + * @type {Node} + */ +export const materialMetalness: Node; +/** + * TSL object that represents the normal of the current material. + * The value will be either `normalMap` * `normalScale`, `bumpMap` * `bumpScale` or `normalView`. + * + * @tsl + * @type {Node} + */ +export const materialNormal: Node; +/** + * TSL object that represents the clearcoat of the current material. + * The value is composed via `clearcoat` * `clearcoatMap.r` + * + * @tsl + * @type {Node} + */ +export const materialClearcoat: Node; +/** + * TSL object that represents the clearcoat roughness of the current material. + * The value is composed via `clearcoatRoughness` * `clearcoatRoughnessMap.r`. + * + * @tsl + * @type {Node} + */ +export const materialClearcoatRoughness: Node; +/** + * TSL object that represents the clearcoat normal of the current material. + * The value will be either `clearcoatNormalMap` or `normalView`. + * + * @tsl + * @type {Node} + */ +export const materialClearcoatNormal: Node; +/** + * TSL object that represents the rotation of the current sprite material. + * + * @tsl + * @type {Node} + */ +export const materialRotation: Node; +/** + * TSL object that represents the sheen color of the current material. + * The value is composed via `sheen` * `sheenColor` * `sheenColorMap`. + * + * @tsl + * @type {Node} + */ +export const materialSheen: Node; +/** + * TSL object that represents the sheen roughness of the current material. + * The value is composed via `sheenRoughness` * `sheenRoughnessMap.a`. + * + * @tsl + * @type {Node} + */ +export const materialSheenRoughness: Node; +/** + * TSL object that represents the anisotropy of the current material. + * + * @tsl + * @type {Node} + */ +export const materialAnisotropy: Node; +/** + * TSL object that represents the iridescence of the current material. + * + * @tsl + * @type {Node} + */ +export const materialIridescence: Node; +/** + * TSL object that represents the iridescence IOR of the current material. + * + * @tsl + * @type {Node} + */ +export const materialIridescenceIOR: Node; +/** + * TSL object that represents the iridescence thickness of the current material. + * + * @tsl + * @type {Node} + */ +export const materialIridescenceThickness: Node; +/** + * TSL object that represents the transmission of the current material. + * The value is composed via `transmission` * `transmissionMap.r`. + * + * @tsl + * @type {Node} + */ +export const materialTransmission: Node; +/** + * TSL object that represents the thickness of the current material. + * The value is composed via `thickness` * `thicknessMap.g`. + * + * @tsl + * @type {Node} + */ +export const materialThickness: Node; +/** + * TSL object that represents the IOR of the current material. + * + * @tsl + * @type {Node} + */ +export const materialIOR: Node; +/** + * TSL object that represents the attenuation distance of the current material. + * + * @tsl + * @type {Node} + */ +export const materialAttenuationDistance: Node; +/** + * TSL object that represents the attenuation color of the current material. + * + * @tsl + * @type {Node} + */ +export const materialAttenuationColor: Node; +/** + * TSL object that represents the scale of the current dashed line material. + * + * @tsl + * @type {Node} + */ +export const materialLineScale: Node; +/** + * TSL object that represents the dash size of the current dashed line material. + * + * @tsl + * @type {Node} + */ +export const materialLineDashSize: Node; +/** + * TSL object that represents the gap size of the current dashed line material. + * + * @tsl + * @type {Node} + */ +export const materialLineGapSize: Node; +/** + * TSL object that represents the line width of the current line material. + * + * @tsl + * @type {Node} + */ +export const materialLineWidth: Node; +/** + * TSL object that represents the dash offset of the current line material. + * + * @tsl + * @type {Node} + */ +export const materialLineDashOffset: Node; +/** + * TSL object that represents the point size of the current points material. + * + * @tsl + * @type {Node} + */ +export const materialPointSize: Node; +/** + * TSL object that represents the dispersion of the current material. + * + * @tsl + * @type {Node} + */ +export const materialDispersion: Node; +/** + * TSL object that represents the light map of the current material. + * The value is composed via `lightMapIntensity` * `lightMap.rgb`. + * + * @tsl + * @type {Node} + */ +export const materialLightMap: Node; +/** + * TSL object that represents the ambient occlusion map of the current material. + * The value is composed via `aoMap.r` - 1 * `aoMapIntensity` + 1. + * + * @tsl + * @type {Node} + */ +export const materialAO: Node; +/** + * TSL object that represents the anisotropy vector of the current material. + * + * @tsl + * @type {Node} + */ +export const materialAnisotropyVector: Node; +/** + * This class should simplify the node access to material properties. + * It internal uses reference nodes to make sure changes to material + * properties are automatically reflected to predefined TSL objects + * like e.g. `materialColor`. + * + * @augments Node + */ +declare class MaterialNode extends Node { + /** + * Constructs a new material node. + * + * @param {string} scope - The scope defines what kind of material property is referred by the node. + */ + constructor(scope: string); + /** + * The scope defines what material property is referred by the node. + * + * @type {string} + */ + scope: string; + /** + * Returns a cached reference node for the given property and type. + * + * @param {string} property - The name of the material property. + * @param {string} type - The uniform type of the property. + * @return {MaterialReferenceNode} A material reference node representing the property access. + */ + getCache(property: string, type: string): MaterialReferenceNode; + /** + * Returns a float-typed material reference node for the given property name. + * + * @param {string} property - The name of the material property. + * @return {MaterialReferenceNode} A material reference node representing the property access. + */ + getFloat(property: string): MaterialReferenceNode; + /** + * Returns a color-typed material reference node for the given property name. + * + * @param {string} property - The name of the material property. + * @return {MaterialReferenceNode} A material reference node representing the property access. + */ + getColor(property: string): MaterialReferenceNode; + /** + * Returns a texture-typed material reference node for the given property name. + * + * @param {string} property - The name of the material property. + * @return {MaterialReferenceNode} A material reference node representing the property access. + */ + getTexture(property: string): MaterialReferenceNode; + /** + * The node setup is done depending on the selected scope. Multiple material properties + * might be grouped into a single node composition if they logically belong together. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The node representing the selected scope. + */ + setup(builder: NodeBuilder): Node; +} +declare namespace MaterialNode { + let ALPHA_TEST: string; + let COLOR: string; + let OPACITY: string; + let SHININESS: string; + let SPECULAR: string; + let SPECULAR_STRENGTH: string; + let SPECULAR_INTENSITY: string; + let SPECULAR_COLOR: string; + let REFLECTIVITY: string; + let ROUGHNESS: string; + let METALNESS: string; + let NORMAL: string; + let CLEARCOAT: string; + let CLEARCOAT_ROUGHNESS: string; + let CLEARCOAT_NORMAL: string; + let EMISSIVE: string; + let ROTATION: string; + let SHEEN: string; + let SHEEN_ROUGHNESS: string; + let ANISOTROPY: string; + let IRIDESCENCE: string; + let IRIDESCENCE_IOR: string; + let IRIDESCENCE_THICKNESS: string; + let IOR: string; + let TRANSMISSION: string; + let THICKNESS: string; + let ATTENUATION_DISTANCE: string; + let ATTENUATION_COLOR: string; + let LINE_SCALE: string; + let LINE_DASH_SIZE: string; + let LINE_GAP_SIZE: string; + let LINE_WIDTH: string; + let LINE_DASH_OFFSET: string; + let POINT_SIZE: string; + let DISPERSION: string; + let LIGHT_MAP: string; + let AO: string; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/MaterialProperties.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/MaterialProperties.d.ts new file mode 100644 index 000000000..0525adf5a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/MaterialProperties.d.ts @@ -0,0 +1,24 @@ +/** + * TSL object that represents the refraction ratio of the material used for rendering the current object. + * + * @tsl + * @type {UniformNode} + */ +export const materialRefractionRatio: UniformNode; +/** + * TSL object that represents the intensity of environment maps of PBR materials. + * When `material.envMap` is set, the value is `material.envMapIntensity` otherwise `scene.environmentIntensity`. + * + * @tsl + * @type {Node} + */ +export const materialEnvIntensity: Node; +/** + * TSL object that represents the rotation of environment maps. + * When `material.envMap` is set, the value is `material.envMapRotation`. `scene.environmentRotation` controls the + * rotation of `scene.environment` instead. + * + * @tsl + * @type {Node} + */ +export const materialEnvRotation: Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/MaterialReferenceNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/MaterialReferenceNode.d.ts new file mode 100644 index 000000000..7a6029df8 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/MaterialReferenceNode.d.ts @@ -0,0 +1,41 @@ +export default MaterialReferenceNode; +export function materialReference(name: string, type: string, material?: Material | null): MaterialReferenceNode; +/** + * This node is a special type of reference node which is intended + * for linking material properties with node values. + * ```js + * const opacityNode = materialReference( 'opacity', 'float', material ); + * ``` + * When changing `material.opacity`, the node value of `opacityNode` will + * automatically be updated. + * + * @augments ReferenceNode + */ +declare class MaterialReferenceNode extends ReferenceNode { + /** + * Constructs a new material reference node. + * + * @param {string} property - The name of the property the node refers to. + * @param {string} inputType - The uniform type that should be used to represent the property value. + * @param {?Material} [material=null] - The material the property belongs to. When no material is set, + * the node refers to the material of the current rendered object. + */ + constructor(property: string, inputType: string, material?: Material | null); + /** + * The material the property belongs to. When no material is set, + * the node refers to the material of the current rendered object. + * + * @type {?Material} + * @default null + */ + material: Material | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMaterialReferenceNode: boolean; +} +import ReferenceNode from './ReferenceNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/ModelNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/ModelNode.d.ts new file mode 100644 index 000000000..b5523dfa3 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/ModelNode.d.ts @@ -0,0 +1,104 @@ +export default ModelNode; +/** + * TSL object that represents the object's direction in world space. + * + * @tsl + * @type {ModelNode} + */ +export const modelDirection: ModelNode; +/** + * TSL object that represents the object's world matrix. + * + * @tsl + * @type {ModelNode} + */ +export const modelWorldMatrix: ModelNode; +/** + * TSL object that represents the object's position in world space. + * + * @tsl + * @type {ModelNode} + */ +export const modelPosition: ModelNode; +/** + * TSL object that represents the object's scale in world space. + * + * @tsl + * @type {ModelNode} + */ +export const modelScale: ModelNode; +/** + * TSL object that represents the object's position in view/camera space. + * + * @tsl + * @type {ModelNode} + */ +export const modelViewPosition: ModelNode; +/** + * TSL object that represents the object's radius. + * + * @tsl + * @type {ModelNode} + */ +export const modelRadius: ModelNode; +/** + * TSL object that represents the object's normal matrix. + * + * @tsl + * @type {UniformNode} + */ +export const modelNormalMatrix: UniformNode; +/** + * TSL object that represents the object's inverse world matrix. + * + * @tsl + * @type {UniformNode} + */ +export const modelWorldMatrixInverse: UniformNode; +/** + * TSL object that represents the object's model view matrix. + * + * @tsl + * @type {Node} + */ +export const modelViewMatrix: Node; +/** + * TSL object that represents the object's model view in `mediump` precision. + * + * @tsl + * @type {Node} + */ +export const mediumpModelViewMatrix: Node; +/** + * TSL object that represents the object's model view in `highp` precision + * which is achieved by computing the matrix in JS and not in the shader. + * + * @tsl + * @type {Node} + */ +export const highpModelViewMatrix: Node; +/** + * TSL object that represents the object's model normal view in `highp` precision + * which is achieved by computing the matrix in JS and not in the shader. + * + * @tsl + * @type {Node} + */ +export const highpModelNormalViewMatrix: Node; +/** + * This type of node is a specialized version of `Object3DNode` + * with larger set of model related metrics. Unlike `Object3DNode`, + * `ModelNode` extracts the reference to the 3D object from the + * current node frame state. + * + * @augments Object3DNode + */ +declare class ModelNode extends Object3DNode { + /** + * Constructs a new object model node. + * + * @param {('position'|'viewPosition'|'direction'|'scale'|'worldMatrix')} scope - The node represents a different type of transformation depending on the scope. + */ + constructor(scope: ("position" | "viewPosition" | "direction" | "scale" | "worldMatrix")); +} +import Object3DNode from './Object3DNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/ModelViewProjectionNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/ModelViewProjectionNode.d.ts new file mode 100644 index 000000000..40d0ac691 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/ModelViewProjectionNode.d.ts @@ -0,0 +1,7 @@ +/** + * TSL object that represents the position in clip space after the model-view-projection transform of the current rendered object. + * + * @tsl + * @type {VaryingNode} + */ +export const modelViewProjection: VaryingNode; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/MorphNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/MorphNode.d.ts new file mode 100644 index 000000000..70c2b991f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/MorphNode.d.ts @@ -0,0 +1,49 @@ +export default MorphNode; +/** + * TSL function for creating a morph node. + * + * @tsl + * @function + * @param {Mesh} mesh - The mesh holding the morph targets. + * @returns {MorphNode} + */ +export const morphReference: any; +/** + * This node implements the vertex transformation shader logic which is required + * for morph target animation. + * + * @augments Node + */ +declare class MorphNode extends Node { + /** + * Constructs a new morph node. + * + * @param {Mesh} mesh - The mesh holding the morph targets. + */ + constructor(mesh: Mesh); + /** + * The mesh holding the morph targets. + * + * @type {Mesh} + */ + mesh: Mesh; + /** + * A uniform node which represents the morph base influence value. + * + * @type {UniformNode} + */ + morphBaseInfluence: UniformNode; + /** + * Setups the morph node by assigning the transformed vertex data to predefined node variables. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setup(builder: NodeBuilder): void; + /** + * Updates the state of the morphed mesh by updating the base influence. + * + * @param {NodeFrame} frame - The current node frame. + */ + update(): void; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/Normal.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/Normal.d.ts new file mode 100644 index 000000000..b75ce8778 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/Normal.d.ts @@ -0,0 +1,100 @@ +/** + * TSL object that represents the normal attribute of the current rendered object in local space. + * + * @tsl + * @type {Node} + */ +export const normalGeometry: Node; +/** + * TSL object that represents the vertex normal of the current rendered object in local space. + * + * @tsl + * @type {Node} + */ +export const normalLocal: Node; +/** + * TSL object that represents the flat vertex normal of the current rendered object in view space. + * + * @tsl + * @type {Node} + */ +export const normalFlat: Node; +/** + * TSL object that represents the vertex normal of the current rendered object in view space. + * + * @tsl + * @type {Node} + */ +export const normalViewGeometry: Node; +/** + * TSL object that represents the vertex normal of the current rendered object in world space. + * + * @tsl + * @type {Node} + */ +export const normalWorldGeometry: Node; +/** + * TSL object that represents the vertex normal of the current rendered object in view space. + * + * @tsl + * @type {Node} + */ +export const normalView: Node; +/** + * TSL object that represents the vertex normal of the current rendered object in world space. + * + * @tsl + * @type {Node} + */ +export const normalWorld: Node; +/** + * TSL object that represents the clearcoat vertex normal of the current rendered object in view space. + * + * @tsl + * @type {Node} + */ +export const clearcoatNormalView: Node; +/** + * Transforms the normal with the given matrix. + * + * @tsl + * @function + * @param {Node} normal - The normal. + * @param {Node} [matrix=modelWorldMatrix] - The matrix. + * @return {Node} The transformed normal. + */ +export const transformNormal: () => void; +/** + * Transforms the given normal from local to view space. + * + * @tsl + * @function + * @param {Node} normal - The normal. + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The transformed normal. + */ +export const transformNormalToView: () => void; +/** + * TSL object that represents the transformed vertex normal of the current rendered object in view space. + * + * @tsl + * @type {Node} + * @deprecated since r178. Use `normalView` instead. + */ +export const transformedNormalView: Node; +/** + * TSL object that represents the transformed vertex normal of the current rendered object in world space. + * + * @tsl + * @type {Node} + * @deprecated since r178. Use `normalWorld` instead. + */ +export const transformedNormalWorld: Node; +/** + * TSL object that represents the transformed clearcoat vertex normal of the current rendered object in view space. + * + * @tsl + * @type {Node} + * @deprecated since r178. Use `clearcoatNormalView` instead. + */ +export const transformedClearcoatNormalView: Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/Object3DNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/Object3DNode.d.ts new file mode 100644 index 000000000..99b15b948 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/Object3DNode.d.ts @@ -0,0 +1,128 @@ +export default Object3DNode; +/** + * TSL function for creating an object 3D node that represents the object's direction in world space. + * + * @tsl + * @function + * @param {?Object3D} [object3d] - The 3D object. + * @returns {Object3DNode} + */ +export const objectDirection: any; +/** + * TSL function for creating an object 3D node that represents the object's world matrix. + * + * @tsl + * @function + * @param {?Object3D} [object3d] - The 3D object. + * @returns {Object3DNode} + */ +export const objectWorldMatrix: any; +/** + * TSL function for creating an object 3D node that represents the object's position in world space. + * + * @tsl + * @function + * @param {?Object3D} [object3d] - The 3D object. + * @returns {Object3DNode} + */ +export const objectPosition: any; +/** + * TSL function for creating an object 3D node that represents the object's scale in world space. + * + * @tsl + * @function + * @param {?Object3D} [object3d] - The 3D object. + * @returns {Object3DNode} + */ +export const objectScale: any; +/** + * TSL function for creating an object 3D node that represents the object's position in view/camera space. + * + * @tsl + * @function + * @param {?Object3D} [object3d] - The 3D object. + * @returns {Object3DNode} + */ +export const objectViewPosition: any; +/** + * TSL function for creating an object 3D node that represents the object's radius. + * + * @tsl + * @function + * @param {?Object3D} [object3d] - The 3D object. + * @returns {Object3DNode} + */ +export const objectRadius: any; +/** + * This node can be used to access transformation related metrics of 3D objects. + * Depending on the selected scope, a different metric is represented as a uniform + * in the shader. The following scopes are supported: + * + * - `POSITION`: The object's position in world space. + * - `VIEW_POSITION`: The object's position in view/camera space. + * - `DIRECTION`: The object's direction in world space. + * - `SCALE`: The object's scale in world space. + * - `WORLD_MATRIX`: The object's matrix in world space. + * + * @augments Node + */ +declare class Object3DNode extends Node { + /** + * Constructs a new object 3D node. + * + * @param {('position'|'viewPosition'|'direction'|'scale'|'worldMatrix')} scope - The node represents a different type of transformation depending on the scope. + * @param {?Object3D} [object3d=null] - The 3D object. + */ + constructor(scope: ("position" | "viewPosition" | "direction" | "scale" | "worldMatrix"), object3d?: Object3D | null); + /** + * The node reports a different type of transformation depending on the scope. + * + * @type {('position'|'viewPosition'|'direction'|'scale'|'worldMatrix')} + */ + scope: ("position" | "viewPosition" | "direction" | "scale" | "worldMatrix"); + /** + * The 3D object. + * + * @type {?Object3D} + * @default null + */ + object3d: Object3D | null; + /** + * Holds the value of the node as a uniform. + * + * @type {UniformNode} + */ + uniformNode: UniformNode; + /** + * Overwritten since the node type is inferred from the scope. + * + * @return {('mat4'|'vec3'|'float')} The node type. + */ + generateNodeType(): ("mat4" | "vec3" | "float"); + /** + * Updates the uniform value depending on the scope. + * + * @param {NodeFrame} frame - The current node frame. + */ + update(frame: NodeFrame): void; + /** + * Generates the code snippet of the uniform node. The node type of the uniform + * node also depends on the selected scope. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The generated code snippet. + */ + generate(builder: NodeBuilder): string; + serialize(data: any): void; + deserialize(data: any): void; +} +declare namespace Object3DNode { + let WORLD_MATRIX: string; + let POSITION: string; + let SCALE: string; + let VIEW_POSITION: string; + let DIRECTION: string; + let RADIUS: string; +} +import Node from '../core/Node.js'; +import UniformNode from '../core/UniformNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/PointUVNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/PointUVNode.d.ts new file mode 100644 index 000000000..67872c0e7 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/PointUVNode.d.ts @@ -0,0 +1,33 @@ +export default PointUVNode; +/** + * TSL object that represents the uv coordinates of points. + * + * @tsl + * @type {PointUVNode} + */ +export const pointUV: PointUVNode; +/** + * A node for representing the uv coordinates of points. + * + * Can only be used with a WebGL backend. In WebGPU, point + * primitives always have the size of one pixel and can thus + * can't be used as sprite-like objects that display textures. + * + * @augments Node + */ +declare class PointUVNode extends Node { + /** + * Constructs a new point uv node. + */ + constructor(); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isPointUVNode: boolean; + generate(): string; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/Position.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/Position.d.ts new file mode 100644 index 000000000..4562c2971 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/Position.d.ts @@ -0,0 +1,57 @@ +/** + * TSL object that represents the clip space position of the current rendered object. + * + * @tsl + * @type {VaryingNode} + */ +export const clipSpace: VaryingNode; +/** + * TSL object that represents the position attribute of the current rendered object. + * + * @tsl + * @type {AttributeNode} + */ +export const positionGeometry: AttributeNode; +/** + * TSL object that represents the vertex position in local space of the current rendered object. + * + * @tsl + * @type {AttributeNode} + */ +export const positionLocal: AttributeNode; +/** + * TSL object that represents the previous vertex position in local space of the current rendered object. + * Used in context of {@link VelocityNode} for rendering motion vectors. + * + * @tsl + * @type {AttributeNode} + */ +export const positionPrevious: AttributeNode; +/** + * TSL object that represents the vertex position in world space of the current rendered object. + * + * @tsl + * @type {VaryingNode} + */ +export const positionWorld: VaryingNode; +/** + * TSL object that represents the position world direction of the current rendered object. + * + * @tsl + * @type {Node} + */ +export const positionWorldDirection: Node; +/** + * TSL object that represents the vertex position in view space of the current rendered object. + * + * @tsl + * @type {VaryingNode} + */ +export const positionView: VaryingNode; +/** + * TSL object that represents the position view direction of the current rendered object. + * + * @tsl + * @type {VaryingNode} + */ +export const positionViewDirection: VaryingNode; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/ReferenceBaseNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/ReferenceBaseNode.d.ts new file mode 100644 index 000000000..413924422 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/ReferenceBaseNode.d.ts @@ -0,0 +1,181 @@ +export default ReferenceBaseNode; +export function reference(name: string, type: string, object: Object): ReferenceBaseNode; +export function referenceBuffer(name: string, type: string, count: number, object?: Object): ReferenceBaseNode; +/** + * Base class for nodes which establishes a reference to a property of another object. + * In this way, the value of the node is automatically linked to the value of + * referenced object. Reference nodes internally represent the linked value + * as a uniform. + * + * @augments Node + */ +declare class ReferenceBaseNode extends Node { + /** + * Constructs a new reference base node. + * + * @param {string} property - The name of the property the node refers to. + * @param {string} uniformType - The uniform type that should be used to represent the property value. + * @param {?Object} [object=null] - The object the property belongs to. + * @param {?number} [count=null] - When the linked property is an array-like, this parameter defines its length. + */ + constructor(property: string, uniformType: string, object?: Object | null, count?: number | null); + /** + * The name of the property the node refers to. + * + * @type {string} + */ + property: string; + /** + * The uniform type that should be used to represent the property value. + * + * @type {string} + */ + uniformType: string; + /** + * The object the property belongs to. + * + * @type {?Object} + * @default null + */ + object: Object | null; + /** + * When the linked property is an array, this parameter defines its length. + * + * @type {?number} + * @default null + */ + count: number | null; + /** + * The property name might have dots so nested properties can be referred. + * The hierarchy of the names is stored inside this array. + * + * @type {Array} + */ + properties: Array; + /** + * Points to the current referred object. This property exists next to {@link ReferenceNode#object} + * since the final reference might be updated from calling code. + * + * @type {?Object} + * @default null + */ + reference: Object | null; + /** + * The uniform node that holds the value of the reference node. + * + * @type {UniformNode} + * @default null + */ + node: UniformNode; + /** + * The uniform group of the internal uniform. + * + * @type {UniformGroupNode} + * @default null + */ + group: UniformGroupNode; + /** + * Sets the uniform group for this reference node. + * + * @param {UniformGroupNode} group - The uniform group to set. + * @return {ReferenceBaseNode} A reference to this node. + */ + setGroup(group: UniformGroupNode): ReferenceBaseNode; + /** + * When the referred property is array-like, this method can be used + * to access elements via an index node. + * + * @param {IndexNode} indexNode - indexNode. + * @return {ReferenceElementNode} A reference to an element. + */ + element(indexNode: IndexNode): ReferenceElementNode; + /** + * Sets the node type which automatically defines the internal + * uniform type. + * + * @param {string} uniformType - The type to set. + */ + setNodeType(uniformType: string): void; + /** + * This method is overwritten since the node type is inferred from + * the type of the reference node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Returns the property value from the given referred object. + * + * @param {Object} [object=this.reference] - The object to retrieve the property value from. + * @return {any} The value. + */ + getValueFromReference(object?: Object): any; + /** + * Allows to update the reference based on the given state. The state is only + * evaluated {@link ReferenceBaseNode#object} is not set. + * + * @param {(NodeFrame|NodeBuilder)} state - The current state. + * @return {Object} The updated reference. + */ + updateReference(state: (NodeFrame | NodeBuilder)): Object; + /** + * The output of the reference node is the internal uniform node. + * + * @return {UniformNode} The output node. + */ + setup(): UniformNode; + /** + * Overwritten to update the internal uniform value. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update(): void; + /** + * Retrieves the value from the referred object property and uses it + * to updated the internal uniform. + */ + updateValue(): void; +} +import Node from '../core/Node.js'; +/** + * This class is only relevant if the referenced property is array-like. + * In this case, `ReferenceElementNode` allows to refer to a specific + * element inside the data structure via an index. + * + * @augments ArrayElementNode + */ +declare class ReferenceElementNode extends ArrayElementNode { + /** + * Constructs a new reference element node. + * + * @param {ReferenceBaseNode} referenceNode - The reference node. + * @param {Node} indexNode - The index node that defines the element access. + */ + constructor(referenceNode: ReferenceBaseNode, indexNode: Node); + /** + * Similar to {@link ReferenceBaseNode#reference}, an additional + * property references to the current node. + * + * @type {?ReferenceBaseNode} + * @default null + */ + referenceNode: ReferenceBaseNode | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isReferenceElementNode: boolean; + /** + * This method is overwritten since the node type is inferred from + * the uniform type of the reference node. + * + * @return {string} The node type. + */ + generateNodeType(): string; + generate(builder: any): any; +} +import ArrayElementNode from '../utils/ArrayElementNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/ReferenceNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/ReferenceNode.d.ts new file mode 100644 index 000000000..7476c25c4 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/ReferenceNode.d.ts @@ -0,0 +1,197 @@ +export default ReferenceNode; +export function reference(name: string, type: string, object?: Object | null): ReferenceNode; +export function referenceBuffer(name: string, type: string, count: number, object: Object): ReferenceNode; +/** + * This type of node establishes a reference to a property of another object. + * In this way, the value of the node is automatically linked to the value of + * referenced object. Reference nodes internally represent the linked value + * as a uniform. + * + * @augments Node + */ +declare class ReferenceNode extends Node { + /** + * Constructs a new reference node. + * + * @param {string} property - The name of the property the node refers to. + * @param {string} uniformType - The uniform type that should be used to represent the property value. + * @param {?Object} [object=null] - The object the property belongs to. + * @param {?number} [count=null] - When the linked property is an array-like, this parameter defines its length. + */ + constructor(property: string, uniformType: string, object?: Object | null, count?: number | null); + /** + * The name of the property the node refers to. + * + * @type {string} + */ + property: string; + /** + * The uniform type that should be used to represent the property value. + * + * @type {string} + */ + uniformType: string; + /** + * The object the property belongs to. + * + * @type {?Object} + * @default null + */ + object: Object | null; + /** + * When the linked property is an array, this parameter defines its length. + * + * @type {?number} + * @default null + */ + count: number | null; + /** + * The property name might have dots so nested properties can be referred. + * The hierarchy of the names is stored inside this array. + * + * @type {Array} + */ + properties: Array; + /** + * Points to the current referred object. This property exists next to {@link ReferenceNode#object} + * since the final reference might be updated from calling code. + * + * @type {?Object} + * @default null + */ + reference: Object | null; + /** + * The uniform node that holds the value of the reference node. + * + * @type {UniformNode} + * @default null + */ + node: UniformNode; + /** + * The uniform group of the internal uniform. + * + * @type {UniformGroupNode} + * @default null + */ + group: UniformGroupNode; + /** + * When the referred property is array-like, this method can be used + * to access elements via an index node. + * + * @param {IndexNode} indexNode - indexNode. + * @return {ReferenceElementNode} A reference to an element. + */ + element(indexNode: IndexNode): ReferenceElementNode; + /** + * Sets the uniform group for this reference node. + * + * @param {UniformGroupNode} group - The uniform group to set. + * @return {ReferenceNode} A reference to this node. + */ + setGroup(group: UniformGroupNode): ReferenceNode; + /** + * Sets the name for the internal uniform. + * + * @param {string} name - The label to set. + * @return {ReferenceNode} A reference to this node. + */ + setName(name: string): ReferenceNode; + /** + * Sets the label for the internal uniform. + * + * @deprecated + * @param {string} name - The label to set. + * @return {ReferenceNode} A reference to this node. + */ + label(name: string): ReferenceNode; + /** + * Sets the node type which automatically defines the internal + * uniform type. + * + * @param {string} uniformType - The type to set. + */ + setNodeType(uniformType: string): void; + /** + * This method is overwritten since the node type is inferred from + * the type of the reference node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Returns the property value from the given referred object. + * + * @param {Object} [object=this.reference] - The object to retrieve the property value from. + * @return {any} The value. + */ + getValueFromReference(object?: Object): any; + /** + * Allows to update the reference based on the given state. The state is only + * evaluated {@link ReferenceNode#object} is not set. + * + * @param {(NodeFrame|NodeBuilder)} state - The current state. + * @return {Object} The updated reference. + */ + updateReference(state: (NodeFrame | NodeBuilder)): Object; + /** + * The output of the reference node is the internal uniform node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {UniformNode} The output node. + */ + setup(): UniformNode; + /** + * Overwritten to update the internal uniform value. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update(): void; + /** + * Retrieves the value from the referred object property and uses it + * to updated the internal uniform. + */ + updateValue(): void; +} +import Node from '../core/Node.js'; +/** + * This class is only relevant if the referenced property is array-like. + * In this case, `ReferenceElementNode` allows to refer to a specific + * element inside the data structure via an index. + * + * @augments ArrayElementNode + */ +declare class ReferenceElementNode extends ArrayElementNode { + /** + * Constructs a new reference element node. + * + * @param {?ReferenceNode} referenceNode - The reference node. + * @param {Node} indexNode - The index node that defines the element access. + */ + constructor(referenceNode: ReferenceNode | null, indexNode: Node); + /** + * Similar to {@link ReferenceNode#reference}, an additional + * property references to the current node. + * + * @type {?ReferenceNode} + * @default null + */ + referenceNode: ReferenceNode | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isReferenceElementNode: boolean; + /** + * This method is overwritten since the node type is inferred from + * the uniform type of the reference node. + * + * @return {string} The node type. + */ + generateNodeType(): string; + generate(builder: any): any; +} +import ArrayElementNode from '../utils/ArrayElementNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/ReflectVector.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/ReflectVector.d.ts new file mode 100644 index 000000000..6cf15717c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/ReflectVector.d.ts @@ -0,0 +1,28 @@ +/** + * The reflect vector in view space. + * + * @tsl + * @type {Node} + */ +export const reflectView: Node; +/** + * The refract vector in view space. + * + * @tsl + * @type {Node} + */ +export const refractView: Node; +/** + * Used for sampling cube maps when using cube reflection mapping. + * + * @tsl + * @type {Node} + */ +export const reflectVector: Node; +/** + * Used for sampling cube maps when using cube refraction mapping. + * + * @tsl + * @type {Node} + */ +export const refractVector: Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/RendererReferenceNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/RendererReferenceNode.d.ts new file mode 100644 index 000000000..43bd3b071 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/RendererReferenceNode.d.ts @@ -0,0 +1,33 @@ +export default RendererReferenceNode; +export function rendererReference(name: string, type: string, renderer?: Renderer | null): RendererReferenceNode; +/** + * This node is a special type of reference node which is intended + * for linking renderer properties with node values. + * ```js + * const exposureNode = rendererReference( 'toneMappingExposure', 'float', renderer ); + * ``` + * When changing `renderer.toneMappingExposure`, the node value of `exposureNode` will + * automatically be updated. + * + * @augments ReferenceBaseNode + */ +declare class RendererReferenceNode extends ReferenceBaseNode { + /** + * Constructs a new renderer reference node. + * + * @param {string} property - The name of the property the node refers to. + * @param {string} inputType - The uniform type that should be used to represent the property value. + * @param {?Renderer} [renderer=null] - The renderer the property belongs to. When no renderer is set, + * the node refers to the renderer of the current state. + */ + constructor(property: string, inputType: string, renderer?: Renderer | null); + /** + * The renderer the property belongs to. When no renderer is set, + * the node refers to the renderer of the current state. + * + * @type {?Renderer} + * @default null + */ + renderer: Renderer | null; +} +import ReferenceBaseNode from './ReferenceBaseNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/SceneProperties.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/SceneProperties.d.ts new file mode 100644 index 000000000..12f6b0aef --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/SceneProperties.d.ts @@ -0,0 +1,21 @@ +/** + * TSL object that represents the scene's background blurriness. + * + * @tsl + * @type {Node} + */ +export const backgroundBlurriness: Node; +/** + * TSL object that represents the scene's background intensity. + * + * @tsl + * @type {Node} + */ +export const backgroundIntensity: Node; +/** + * TSL object that represents the scene's background rotation. + * + * @tsl + * @type {Node} + */ +export const backgroundRotation: Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/SkinningNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/SkinningNode.d.ts new file mode 100644 index 000000000..d649f273b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/SkinningNode.d.ts @@ -0,0 +1,122 @@ +export default SkinningNode; +export function skinning(skinnedMesh: SkinnedMesh): SkinningNode; +export function computeSkinning(skinnedMesh: SkinnedMesh, toPosition?: Node): SkinningNode; +/** + * This node implements the vertex transformation shader logic which is required + * for skinning/skeletal animation. + * + * @augments Node + */ +declare class SkinningNode extends Node { + /** + * Constructs a new skinning node. + * + * @param {SkinnedMesh} skinnedMesh - The skinned mesh. + */ + constructor(skinnedMesh: SkinnedMesh); + /** + * The skinned mesh. + * + * @type {SkinnedMesh} + */ + skinnedMesh: SkinnedMesh; + /** + * The skin index attribute. + * + * @type {AttributeNode} + */ + skinIndexNode: AttributeNode; + /** + * The skin weight attribute. + * + * @type {AttributeNode} + */ + skinWeightNode: AttributeNode; + /** + * The bind matrix node. + * + * @type {Node} + */ + bindMatrixNode: Node; + /** + * The bind matrix inverse node. + * + * @type {Node} + */ + bindMatrixInverseNode: Node; + /** + * The bind matrices as a uniform buffer node. + * + * @type {Node} + */ + boneMatricesNode: Node; + /** + * The current vertex position in local space. + * + * @type {Node} + */ + positionNode: Node; + /** + * The result of vertex position in local space. + * + * @type {Node} + */ + toPositionNode: Node; + /** + * The previous bind matrices as a uniform buffer node. + * Required for computing motion vectors. + * + * @type {?Node} + * @default null + */ + previousBoneMatricesNode: Node | null; + /** + * Transforms the given vertex position via skinning. + * + * @param {Node} [boneMatrices=this.boneMatricesNode] - The bone matrices + * @param {Node} [position=this.positionNode] - The vertex position in local space. + * @return {Node} The transformed vertex position. + */ + getSkinnedPosition(boneMatrices?: Node, position?: Node): Node; + /** + * Transforms the given vertex normal and tangent via skinning. + * + * @param {Node} [boneMatrices=this.boneMatricesNode] - The bone matrices + * @param {Node} [normal=normalLocal] - The vertex normal in local space. + * @param {Node} [tangent=tangentLocal] - The vertex tangent in local space. + * @return {{skinNormal: Node, skinTangent:Node}} The transformed vertex normal and tangent. + */ + getSkinnedNormalAndTangent(boneMatrices?: Node, normal?: Node, tangent?: Node): { + skinNormal: Node; + skinTangent: Node; + }; + /** + * Computes the transformed/skinned vertex position of the previous frame. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The skinned position from the previous frame. + */ + getPreviousSkinnedPosition(builder: NodeBuilder): Node; + /** + * Setups the skinning node by assigning the transformed vertex data to predefined node variables. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The transformed vertex position. + */ + setup(builder: NodeBuilder): Node; + /** + * Generates the code snippet of the skinning node. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} output - The current output. + * @return {string} The generated code snippet. + */ + generate(builder: NodeBuilder, output: string): string; + /** + * Updates the state of the skinned mesh by updating the skeleton once per frame. + * + * @param {NodeFrame} frame - The current node frame. + */ + update(frame: NodeFrame): void; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/StorageBufferNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/StorageBufferNode.d.ts new file mode 100644 index 000000000..fea4f9cd4 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/StorageBufferNode.d.ts @@ -0,0 +1,183 @@ +export default StorageBufferNode; +export function storage(value: StorageBufferAttribute | StorageInstancedBufferAttribute | BufferAttribute, type?: (string | Struct) | null, count?: number): StorageBufferNode; +/** + * This node is used in context of compute shaders and allows to define a + * storage buffer for data. A typical workflow is to create instances of + * this node with the convenience functions `attributeArray()` or `instancedArray()`, + * setup up a compute shader that writes into the buffers and then convert + * the storage buffers to attribute nodes for rendering. + * + * ```js + * const positionBuffer = instancedArray( particleCount, 'vec3' ); // the storage buffer node + * + * const computeInit = Fn( () => { // the compute shader + * + * const position = positionBuffer.element( instanceIndex ); + * + * // compute position data + * + * position.x = 1; + * position.y = 1; + * position.z = 1; + * + * } )().compute( particleCount ); + * + * const particleMaterial = new THREE.SpriteNodeMaterial(); + * particleMaterial.positionNode = positionBuffer.toAttribute(); + * + * renderer.computeAsync( computeInit ); + * + * ``` + * + * @augments BufferNode + */ +declare class StorageBufferNode extends BufferNode { + /** + * Constructs a new storage buffer node. + * + * @param {StorageBufferAttribute|StorageInstancedBufferAttribute|BufferAttribute} value - The buffer data. + * @param {?(string|Struct)} [bufferType=null] - The buffer type (e.g. `'vec3'`). + * @param {number} [bufferCount=0] - The buffer count. + */ + constructor(value: StorageBufferAttribute | StorageInstancedBufferAttribute | BufferAttribute, bufferType?: (string | Struct) | null, bufferCount?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStorageBufferNode: boolean; + /** + * The buffer struct type. + * + * @type {?StructTypeNode} + * @default null + */ + structTypeNode: StructTypeNode | null; + /** + * The access type of the texture node. + * + * @type {string} + * @default 'readWrite' + */ + access: string; + /** + * Whether the node is atomic or not. + * + * @type {boolean} + * @default false + */ + isAtomic: boolean; + /** + * Whether the node represents a PBO or not. + * Only relevant for WebGL. + * + * @type {boolean} + * @default false + */ + isPBO: boolean; + /** + * A reference to the internal buffer attribute node. + * + * @private + * @type {?BufferAttributeNode} + * @default null + */ + private _attribute; + /** + * A reference to the internal varying node. + * + * @private + * @type {?VaryingNode} + * @default null + */ + private _varying; + /** + * This method is overwritten since the buffer data might be shared + * and thus the hash should be shared as well. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The hash. + */ + getHash(builder: NodeBuilder): string; + /** + * Enables element access with the given index node. + * + * @param {IndexNode} indexNode - The index node. + * @return {StorageArrayElementNode} A node representing the element access. + */ + element(indexNode: IndexNode): StorageArrayElementNode; + /** + * Defines whether this node is a PBO or not. Only relevant for WebGL. + * + * @param {boolean} value - The value so set. + * @return {StorageBufferNode} A reference to this node. + */ + setPBO(value: boolean): StorageBufferNode; + /** + * Returns the `isPBO` value. + * + * @return {boolean} Whether the node represents a PBO or not. + */ + getPBO(): boolean; + /** + * Defines the node access. + * + * @param {string} value - The node access. + * @return {StorageBufferNode} A reference to this node. + */ + setAccess(value: string): StorageBufferNode; + /** + * Convenience method for configuring a read-only node access. + * + * @return {StorageBufferNode} A reference to this node. + */ + toReadOnly(): StorageBufferNode; + /** + * Defines whether the node is atomic or not. + * + * @param {boolean} value - The atomic flag. + * @return {StorageBufferNode} A reference to this node. + */ + setAtomic(value: boolean): StorageBufferNode; + /** + * Convenience method for making this node atomic. + * + * @return {StorageBufferNode} A reference to this node. + */ + toAtomic(): StorageBufferNode; + /** + * Returns attribute data for this storage buffer node. + * + * @return {{attribute: BufferAttributeNode, varying: VaryingNode}} The attribute data. + */ + getAttributeData(): { + attribute: BufferAttributeNode; + varying: VaryingNode; + }; + /** + * This method is overwritten since the node type from the availability of storage buffers + * and the attribute data. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Returns the type of a member of the struct. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} name - The name of the member. + * @return {string} The type of the member. + */ + getMemberType(builder: NodeBuilder, name: string): string; + /** + * Generates the code snippet of the storage buffer node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The generated code snippet. + */ + generate(builder: NodeBuilder): string; +} +import BufferNode from './BufferNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/StorageTexture3DNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/StorageTexture3DNode.d.ts new file mode 100644 index 000000000..72f129b88 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/StorageTexture3DNode.d.ts @@ -0,0 +1,36 @@ +export default StorageTexture3DNode; +/** + * TSL function for creating a 3D storage texture node. + * + * @tsl + * @function + * @param {Storage3DTexture} value - The 3D storage texture. + * @param {?Node} [uvNode=null] - The uv node. + * @param {?Node} [storeNode=null] - The value node that should be stored in the texture. + * @returns {StorageTexture3DNode} + */ +export const storageTexture3D: any; +/** + * This special version of a texture node can be used to + * write data into a 3D storage texture with a compute shader. + * + * @augments StorageTextureNode + */ +declare class StorageTexture3DNode extends StorageTextureNode { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStorageTexture3DNode: boolean; + /** + * Overwritten with an empty implementation since the `updateMatrix` flag is ignored + * for 3D textures. The uv transformation matrix is not applied to 3D textures. + * + * @param {boolean} value - The update toggle. + */ + setUpdateMatrix(): void; +} +import StorageTextureNode from './StorageTextureNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/StorageTextureNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/StorageTextureNode.d.ts new file mode 100644 index 000000000..f1ac56640 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/StorageTextureNode.d.ts @@ -0,0 +1,146 @@ +export default StorageTextureNode; +/** + * TSL function for creating a storage texture node. + * + * @tsl + * @function + * @param {StorageTexture} value - The storage texture. + * @param {?Node} uvNode - The uv node. + * @param {?Node} [storeNode=null] - The value node that should be stored in the texture. + * @returns {StorageTextureNode} + */ +export const storageTexture: any; +export function textureStore(value: StorageTexture | StorageTextureNode, uvNode: Node, storeNode?: Node | null): StorageTextureNode; +/** + * This special version of a texture node can be used to + * write data into a storage texture with a compute shader. + * + * ```js + * const storageTexture = new THREE.StorageTexture( width, height ); + * + * const computeTexture = Fn( ( { storageTexture } ) => { + * + * const posX = instanceIndex.mod( width ); + * const posY = instanceIndex.div( width ); + * const indexUV = uvec2( posX, posY ); + * + * // generate RGB values + * + * const r = 1; + * const g = 1; + * const b = 1; + * + * textureStore( storageTexture, indexUV, vec4( r, g, b, 1 ) ).toWriteOnly(); + * + * } ); + * + * const computeNode = computeTexture( { storageTexture } ).compute( width * height ); + * renderer.computeAsync( computeNode ); + * ``` + * + * This node can only be used with a WebGPU backend. + * + * @augments TextureNode + */ +declare class StorageTextureNode extends TextureNode { + /** + * Constructs a new storage texture node. + * + * @param {StorageTexture} value - The storage texture. + * @param {Node} uvNode - The uv node. + * @param {?Node} [storeNode=null] - The value node that should be stored in the texture. + */ + constructor(value: StorageTexture, uvNode: Node, storeNode?: Node | null); + /** + * The value node that should be stored in the texture. + * + * @type {?Node} + * @default null + */ + storeNode: Node | null; + /** + * The mip level to write to for storage textures. + * + * @type {number} + * @default 0 + */ + mipLevel: number; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStorageTextureNode: boolean; + /** + * The access type of the texture node. + * + * @type {string} + * @default 'writeOnly' + */ + access: string; + setup(builder: any): any; + /** + * Defines the node access. + * + * @param {string} value - The node access. + * @return {StorageTextureNode} A reference to this node. + */ + setAccess(value: string): StorageTextureNode; + /** + * Sets the mip level to write to. + * + * @param {number} level - The mip level. + * @return {StorageTextureNode} A reference to this node. + */ + setMipLevel(level: number): StorageTextureNode; + /** + * Generates the snippet for the storage texture. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} textureProperty - The texture property. + * @param {string} uvSnippet - The uv snippet. + * @param {?string} levelSnippet - The level snippet. + * @param {?string} biasSnippet - The bias snippet. + * @param {?string} depthSnippet - The depth snippet. + * @param {?string} compareSnippet - The compare snippet. + * @param {?Array} gradSnippet - The grad snippet. + * @param {?string} offsetSnippet - The offset snippet. + * @return {string} The generated code snippet. + */ + generateSnippet(builder: NodeBuilder, textureProperty: string, uvSnippet: string, levelSnippet: string | null, biasSnippet: string | null, depthSnippet: string | null, compareSnippet: string | null, gradSnippet: Array | null, offsetSnippet: string | null): string; + /** + * Convenience method for configuring a read/write node access. + * + * @return {StorageTextureNode} A reference to this node. + */ + toReadWrite(): StorageTextureNode; + /** + * Convenience method for configuring a read-only node access. + * + * @return {StorageTextureNode} A reference to this node. + */ + toReadOnly(): StorageTextureNode; + /** + * Convenience method for configuring a write-only node access. + * + * @return {StorageTextureNode} A reference to this node. + */ + toWriteOnly(): StorageTextureNode; + /** + * Stores a value in this storage texture at the given coordinates. + * + * @param {Node} uvNode - The storage texture coordinates. + * @param {?Node} [storeNode=null] - The value node that should be stored in the texture. + * @return {StorageTextureNode} A storage texture node representing the store operation. + */ + store(uvNode: Node, storeNode?: Node | null): StorageTextureNode; + /** + * Generates the code snippet of the storage texture node. + * + * @param {NodeBuilder} builder - The current node builder. + */ + generateStore(builder: NodeBuilder): void; +} +import TextureNode from './TextureNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/Tangent.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/Tangent.d.ts new file mode 100644 index 000000000..fa48ada28 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/Tangent.d.ts @@ -0,0 +1,28 @@ +/** + * TSL object that represents the tangent attribute of the current rendered object. + * + * @tsl + * @type {Node} + */ +export const tangentGeometry: Node; +/** + * TSL object that represents the vertex tangent in local space of the current rendered object. + * + * @tsl + * @type {Node} + */ +export const tangentLocal: Node; +/** + * TSL object that represents the vertex tangent in view space of the current rendered object. + * + * @tsl + * @type {Node} + */ +export const tangentView: Node; +/** + * TSL object that represents the vertex tangent in world space of the current rendered object. + * + * @tsl + * @type {Node} + */ +export const tangentWorld: Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/TangentUtils.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/TangentUtils.d.ts new file mode 100644 index 000000000..5ae231172 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/TangentUtils.d.ts @@ -0,0 +1,20 @@ +/** + * Tangent vector in view space, computed dynamically from geometry and UV derivatives. + * Useful for normal mapping without precomputed tangents. + * + * Reference: http://www.thetenthplanet.de/archives/1180 + * + * @tsl + * @type {Node} + */ +export const tangentViewFrame: Node; +/** + * Bitangent vector in view space, computed dynamically from geometry and UV derivatives. + * Complements the tangentViewFrame for constructing the tangent space basis. + * + * Reference: http://www.thetenthplanet.de/archives/1180 + * + * @tsl + * @type {Node} + */ +export const bitangentViewFrame: Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/Texture3DNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/Texture3DNode.d.ts new file mode 100644 index 000000000..1b1066b8b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/Texture3DNode.d.ts @@ -0,0 +1,54 @@ +export default Texture3DNode; +/** + * TSL function for creating a 3D texture node. + * + * @tsl + * @function + * @param {Data3DTexture} value - The 3D texture. + * @param {?Node} [uvNode=null] - The uv node. + * @param {?Node} [levelNode=null] - The level node. + * @returns {Texture3DNode} + */ +export const texture3D: any; +export function texture3DLoad(...params: any[]): TextureNode; +export function texture3DLevel(value?: (Texture | TextureNode) | null, uvNode?: Node | null, levelNode?: Node | null): TextureNode; +/** + * This type of uniform node represents a 3D texture. + * + * @augments TextureNode + */ +declare class Texture3DNode extends TextureNode { + /** + * Constructs a new 3D texture node. + * + * @param {Data3DTexture} value - The 3D texture. + * @param {?Node} [uvNode=null] - The uv node. + * @param {?Node} [levelNode=null] - The level node. + */ + constructor(value: Data3DTexture, uvNode?: Node | null, levelNode?: Node | null); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isTexture3DNode: boolean; + /** + * Overwritten with an empty implementation since the `updateMatrix` flag is ignored + * for 3D textures. The uv transformation matrix is not applied to 3D textures. + * + * @param {boolean} value - The update toggle. + */ + setUpdateMatrix(): void; + /** + * Computes the normal for the given uv. These texture coordiantes represent a + * position inside the 3D texture. Unlike geometric normals, this normal + * represents a slope or gradient of scalar data inside the 3D texture. + * + * @param {Node} uvNode - The uv node that defines a position in the 3D texture. + * @return {Node} The normal representing the slope/gradient in the data. + */ + normal(uvNode: Node): Node; +} +import TextureNode from './TextureNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/TextureBicubic.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/TextureBicubic.d.ts new file mode 100644 index 000000000..ff3a05aad --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/TextureBicubic.d.ts @@ -0,0 +1,20 @@ +/** + * Applies mipped bicubic texture filtering to the given texture node. + * + * @tsl + * @function + * @param {TextureNode} textureNode - The texture node that should be filtered. + * @param {Node} lodNode - Defines the LOD to sample from. + * @return {Node} The filtered texture sample. + */ +export const textureBicubicLevel: () => void; +/** + * Applies mipped bicubic texture filtering to the given texture node. + * + * @tsl + * @function + * @param {TextureNode} textureNode - The texture node that should be filtered. + * @param {Node} [strength] - Defines the strength of the bicubic filtering. + * @return {Node} The filtered texture sample. + */ +export const textureBicubic: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/TextureNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/TextureNode.d.ts new file mode 100644 index 000000000..f82705bc7 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/TextureNode.d.ts @@ -0,0 +1,354 @@ +export default TextureNode; +export function texture(value?: (Texture | TextureNode) | null, uvNode?: Node | null, levelNode?: Node | null, biasNode?: Node | null): TextureNode; +export function uniformTexture(value?: Texture | null): TextureNode; +export function textureLoad(...params: any[]): TextureNode; +export function textureLevel(value: any, uv: any, level: any): TextureNode; +export function sampler(value: TextureNode | Texture): Node; +export function samplerComparison(value: TextureNode | Texture): Node; +/** + * This type of uniform node represents a 2D texture. + * + * @augments UniformNode + */ +declare class TextureNode extends UniformNode { + /** + * Constructs a new texture node. + * + * @param {Texture} [value=EmptyTexture] - The texture. + * @param {?Node} [uvNode=null] - The uv node. + * @param {?Node} [levelNode=null] - The level node. + * @param {?Node} [biasNode=null] - The bias node. + */ + constructor(value?: Texture, uvNode?: Node | null, levelNode?: Node | null, biasNode?: Node | null); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isTextureNode: boolean; + /** + * Represents the texture coordinates. + * + * @type {?Node} + * @default null + */ + uvNode: Node | null; + /** + * Represents the mip level that should be selected. + * + * @type {?Node} + * @default null + */ + levelNode: Node | null; + /** + * Represents the bias to be applied during level-of-detail computation. + * + * @type {?Node} + * @default null + */ + biasNode: Node | null; + /** + * Represents a reference value a texture sample is compared to. + * + * @type {?Node} + * @default null + */ + compareNode: Node | null; + /** + * When using texture arrays, the depth node defines the layer to select. + * + * @type {?Node} + * @default null + */ + depthNode: Node | null; + /** + * When defined, a texture is sampled using explicit gradients. + * + * @type {?Array>} + * @default null + */ + gradNode: Array> | null; + /** + * Represents the optional index constant of the channel to gather. + * This must be in range [0, 3] and a compile-time constant. + * + * @type {?Node} + * @default null + */ + gatherNode: Node | null; + /** + * Represents the optional texel offset applied to the unnormalized texture + * coordinate before sampling the texture. + * + * @type {?Node} + * @default null + */ + offsetNode: Node | null; + /** + * Whether texture values should be sampled or fetched. + * + * @type {boolean} + * @default true + */ + sampler: boolean; + /** + * Whether the uv transformation matrix should be + * automatically updated or not. Use `setUpdateMatrix()` + * if you want to change the value of the property. + * + * @type {boolean} + * @default false + */ + updateMatrix: boolean; + /** + * The reference node. + * + * @type {?Node} + * @default null + */ + referenceNode: Node | null; + /** + * The texture value is stored in a private property. + * + * @private + * @type {Texture} + */ + private _value; + /** + * The uniform node that represents the uv transformation matrix. + * + * @private + * @type {?UniformNode} + * @default null + */ + private _matrixUniform; + /** + * The uniform node that represents the y-flip. Only required for WebGL. + * + * @private + * @type {?UniformNode} + * @default null + */ + private _flipYUniform; + set value(value: Texture); + /** + * The texture value. + * + * @type {Texture} + */ + get value(): Texture; + /** + * Overwritten since the uniform hash is defined by the texture's UUID. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The uniform hash. + */ + getUniformHash(): string; + /** + * Overwritten since the node type is inferred from the texture type. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(): string; + /** + * Overwrites the default implementation to return a fixed value `'texture'`. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The input type. + */ + getInputType(): string; + /** + * Returns a default uvs based on the current texture's channel. + * + * @return {AttributeNode} The default uvs. + */ + getDefaultUV(): AttributeNode; + /** + * Overwritten to always return the texture reference of the node. + * + * @param {any} state - This method can be invocated in different contexts so `state` can refer to any object type. + * @return {Texture} The texture reference. + */ + updateReference(): Texture; + /** + * Transforms the given uv node with the texture transformation matrix. + * + * @param {Node} uvNode - The uv node to transform. + * @return {Node} The transformed uv node. + */ + getTransformedUV(uvNode: Node): Node; + /** + * Defines whether the uv transformation matrix should automatically be updated or not. + * + * @param {boolean} value - The update toggle. + * @return {TextureNode} A reference to this node. + */ + setUpdateMatrix(value: boolean): TextureNode; + /** + * Setups the uv node. Depending on the backend as well as texture's image and type, it might be necessary + * to modify the uv node for correct sampling. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {Node} uvNode - The uv node to setup. + * @return {Node} The updated uv node. + */ + setupUV(builder: NodeBuilder, uvNode: Node): Node; + /** + * Setups texture node by preparing the internal nodes for code generation. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setup(builder: NodeBuilder): void; + /** + * Generates the uv code snippet. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {Node} uvNode - The uv node to generate code for. + * @return {string} The generated code snippet. + */ + generateUV(builder: NodeBuilder, uvNode: Node): string; + /** + * Generates the offset code snippet. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {Node} offsetNode - The offset node to generate code for. + * @return {string} The generated code snippet. + */ + generateOffset(builder: NodeBuilder, offsetNode: Node): string; + /** + * Generates the snippet for the texture sampling. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} textureProperty - The texture property. + * @param {string} uvSnippet - The uv snippet. + * @param {?string} levelSnippet - The level snippet. + * @param {?string} biasSnippet - The bias snippet. + * @param {?string} depthSnippet - The depth snippet. + * @param {?string} compareSnippet - The compare snippet. + * @param {?Array} gradSnippet - The grad snippet. + * @param {?string} gatherSnippet - The gather snippet. + * @param {?string} offsetSnippet - The offset snippet. + * @param {?string} flipYSnippet - The y-flip snippet. Only used for WebGL. + * @return {string} The generated code snippet. + */ + generateSnippet(builder: NodeBuilder, textureProperty: string, uvSnippet: string, levelSnippet: string | null, biasSnippet: string | null, depthSnippet: string | null, compareSnippet: string | null, gradSnippet: Array | null, gatherSnippet: string | null, offsetSnippet: string | null, flipYSnippet: string | null): string; + /** + * Generates the code snippet of the texture node. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} output - The current output. + * @return {string} The generated code snippet. + */ + generate(builder: NodeBuilder, output: string): string; + /** + * Sets the sampler value. + * + * @param {boolean} value - The sampler value to set. + * @return {TextureNode} A reference to this texture node. + */ + setSampler(value: boolean): TextureNode; + /** + * Returns the sampler value. + * + * @return {boolean} The sampler value. + */ + getSampler(): boolean; + /** + * Samples the texture with the given uv node. + * + * @param {Node} uvNode - The uv node. + * @return {TextureNode} A texture node representing the texture sample. + */ + sample(uvNode: Node): TextureNode; + /** + * TSL function for creating a texture node that fetches/loads texels without interpolation. + * + * @param {Node} uvNode - The uv node. + * @returns {TextureNode} A texture node representing the texture load. + */ + load(uvNode: Node): TextureNode; + /** + * Samples a blurred version of the texture by defining an internal bias. + * + * @param {Node} amountNode - How blurred the texture should be. + * @return {TextureNode} A texture node representing the texture sample. + */ + blur(amountNode: Node): TextureNode; + /** + * Samples a specific mip of the texture. + * + * @param {Node} levelNode - The mip level to sample. + * @return {TextureNode} A texture node representing the texture sample. + */ + level(levelNode: Node): TextureNode; + /** + * Returns the texture size of the requested level. + * + * @param {Node} levelNode - The level to compute the size for. + * @return {TextureSizeNode} The texture size. + */ + size(levelNode: Node): TextureSizeNode; + /** + * Samples the texture with the given bias. + * + * @param {Node} biasNode - The bias node. + * @return {TextureNode} A texture node representing the texture sample. + */ + bias(biasNode: Node): TextureNode; + /** + * Returns the base texture of this node. + * @return {TextureNode} The base texture node. + */ + getBase(): TextureNode; + /** + * Samples the texture by executing a compare operation. + * + * @param {Node} compareNode - The node that defines the compare value. + * @return {TextureNode} A texture node representing the texture sample. + */ + compare(compareNode: Node): TextureNode; + /** + * Samples the texture using an explicit gradient. + * + * @param {Node} gradNodeX - The gradX node. + * @param {Node} gradNodeY - The gradY node. + * @return {TextureNode} A texture node representing the texture sample. + */ + grad(gradNodeX: Node, gradNodeY: Node): TextureNode; + /** + * Gathers four texels from the texture. + * + * @param {Node} gatherNode - The index of the channel to read. This must be in range [0, 3] and a compile-time constant. + * @return {TextureNode} A texture node representing the texture sample. + */ + gather(gatherNode?: Node): TextureNode; + /** + * Samples the texture by defining a depth node. + * + * @param {Node} depthNode - The depth node. + * @return {TextureNode} A texture node representing the texture sample. + */ + depth(depthNode: Node): TextureNode; + /** + * Samples the texture by defining an offset node. + * + * @param {Node} offsetNode - The offset node. + * @return {TextureNode} A texture node representing the texture sample. + */ + offset(offsetNode: Node): TextureNode; + /** + * The update is used to implement the update of the uv transformation matrix. + */ + update(): void; + /** + * Clones the texture node. + * + * @return {TextureNode} The cloned texture node. + */ + clone(): TextureNode; +} +import { Texture } from '../../textures/Texture.js'; +import UniformNode from '../core/UniformNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/TextureSizeNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/TextureSizeNode.d.ts new file mode 100644 index 000000000..994971036 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/TextureSizeNode.d.ts @@ -0,0 +1,50 @@ +export default TextureSizeNode; +/** + * TSL function for creating a texture size node. + * + * @tsl + * @function + * @param {TextureNode} textureNode - A texture node which size should be retrieved. + * @param {?Node} [levelNode=null] - A level node which defines the requested mip. + * @returns {TextureSizeNode} + */ +export const textureSize: any; +/** + * A node that represents the dimensions of a texture. The texture size is + * retrieved in the shader via built-in shader functions like `textureDimensions()` + * or `textureSize()`. + * + * @augments Node + */ +declare class TextureSizeNode extends Node { + /** + * Constructs a new texture size node. + * + * @param {TextureNode} textureNode - A texture node which size should be retrieved. + * @param {?Node} [levelNode=null] - A level node which defines the requested mip. + */ + constructor(textureNode: TextureNode, levelNode?: Node | null); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isTextureSizeNode: boolean; + /** + * A texture node which size should be retrieved. + * + * @type {TextureNode} + */ + textureNode: TextureNode; + /** + * A level node which defines the requested mip. + * + * @type {Node} + * @default null + */ + levelNode: Node; + generate(builder: any, output: any): any; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/UV.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/UV.d.ts new file mode 100644 index 000000000..959b2be65 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/UV.d.ts @@ -0,0 +1 @@ +export function uv(index?: number): AttributeNode; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/UniformArrayNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/UniformArrayNode.d.ts new file mode 100644 index 000000000..290ab3d93 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/UniformArrayNode.d.ts @@ -0,0 +1,125 @@ +export default UniformArrayNode; +export function uniformArray(values: Array, nodeType?: string | null): UniformArrayNode; +/** + * Similar to {@link BufferNode} this module represents array-like data as + * uniform buffers. Unlike {@link BufferNode}, it can handle more common + * data types in the array (e.g `three.js` primitives) and automatically + * manage buffer padding. It should be the first choice when working with + * uniforms buffers. + * ```js + * const tintColors = uniformArray( [ + * new Color( 1, 0, 0 ), + * new Color( 0, 1, 0 ), + * new Color( 0, 0, 1 ) + * ], 'color' ); + * + * const redColor = tintColors.element( 0 ); + * + * @augments BufferNode + */ +declare class UniformArrayNode extends BufferNode { + /** + * Constructs a new uniform array node. + * + * @param {Array} value - Array holding the buffer data. + * @param {?string} [elementType=null] - The data type of a buffer element. + */ + constructor(value: Array, elementType?: string | null); + /** + * Array holding the buffer data. Unlike {@link BufferNode}, the array can + * hold number primitives as well as three.js objects like vectors, matrices + * or colors. + * + * @type {Array} + */ + array: Array; + /** + * The data type of an array element. + * + * @type {string} + */ + elementType: string; + /** + * The padded type. Uniform buffers must conform to a certain buffer layout + * so a separate type is computed to ensure correct buffer size. + * + * @type {string} + */ + paddedType: string; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isArrayBufferNode: boolean; + /** + * This method is overwritten since the node type is inferred from the + * {@link UniformArrayNode#paddedType}. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(): string; + /** + * The data type of the array elements. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The element type. + */ + getElementType(): string; + /** + * Returns the padded type based on the element type. + * + * @return {string} The padded type. + */ + getPaddedType(): string; + /** + * The update makes sure to correctly transfer the data from the (complex) objects + * in the array to the internal, correctly padded value buffer. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update(): void; + /** + * Implement the value buffer creation based on the array data. + * + * @param {NodeBuilder} builder - A reference to the current node builder. + * @return {null} + */ + setup(builder: NodeBuilder): null; + /** + * Overwrites the default `element()` method to provide element access + * based on {@link UniformArrayNode}. + * + * @param {IndexNode} indexNode - The index node. + * @return {UniformArrayElementNode} + */ + element(indexNode: IndexNode): UniformArrayElementNode; +} +import BufferNode from './BufferNode.js'; +/** + * Represents the element access on uniform array nodes. + * + * @augments ArrayElementNode + */ +declare class UniformArrayElementNode extends ArrayElementNode { + /** + * Constructs a new buffer node. + * + * @param {UniformArrayNode} uniformArrayNode - The uniform array node to access. + * @param {IndexNode} indexNode - The index data that define the position of the accessed element in the array. + */ + constructor(uniformArrayNode: UniformArrayNode, indexNode: IndexNode); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isArrayBufferElementNode: boolean; + generate(builder: any): any; +} +import ArrayElementNode from '../utils/ArrayElementNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/UserDataNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/UserDataNode.d.ts new file mode 100644 index 000000000..e526f57c7 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/UserDataNode.d.ts @@ -0,0 +1,35 @@ +export default UserDataNode; +export function userData(name: string, inputType: string, userData: Object | null): UserDataNode; +/** + * A special type of reference node that allows to link values in + * `userData` fields to node objects. + * ```js + * sprite.userData.rotation = 1; // stores individual rotation per sprite + * + * const material = new THREE.SpriteNodeMaterial(); + * material.rotationNode = userData( 'rotation', 'float' ); + * ``` + * Since `UserDataNode` is extended from {@link ReferenceNode}, the node value + * will automatically be updated when the `rotation` user data field changes. + * + * @augments ReferenceNode + */ +declare class UserDataNode extends ReferenceNode { + /** + * Constructs a new user data node. + * + * @param {string} property - The property name that should be referenced by the node. + * @param {string} inputType - The node data type of the reference. + * @param {?Object} [userData=null] - A reference to the `userData` object. If not provided, the `userData` property of the 3D object that uses the node material is evaluated. + */ + constructor(property: string, inputType: string, userData?: Object | null); + /** + * A reference to the `userData` object. If not provided, the `userData` + * property of the 3D object that uses the node material is evaluated. + * + * @type {?Object} + * @default null + */ + userData: Object | null; +} +import ReferenceNode from './ReferenceNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/VelocityNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/VelocityNode.d.ts new file mode 100644 index 000000000..476ee206d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/VelocityNode.d.ts @@ -0,0 +1,79 @@ +export default VelocityNode; +/** + * TSL object that represents the velocity of a render pass. + * + * @tsl + * @type {VelocityNode} + */ +export const velocity: VelocityNode; +/** + * A node for representing motion or velocity vectors. Foundation + * for advanced post processing effects like motion blur or TRAA. + * + * The node keeps track of the model, view and projection matrices + * of the previous frame and uses them to compute offsets in NDC space. + * These offsets represent the final velocity. + * + * @augments TempNode + */ +declare class VelocityNode extends TempNode { + /** + * Constructs a new vertex color node. + */ + constructor(); + /** + * The current projection matrix. + * + * @type {?Matrix4} + * @default null + */ + projectionMatrix: Matrix4 | null; + /** + * Uniform node representing the previous model matrix in world space. + * + * @type {UniformNode} + * @default null + */ + previousModelWorldMatrix: UniformNode; + /** + * Uniform node representing the previous projection matrix. + * + * @type {UniformNode} + * @default null + */ + previousProjectionMatrix: UniformNode; + /** + * Uniform node representing the previous view matrix. + * + * @type {UniformNode} + * @default null + */ + previousCameraViewMatrix: UniformNode; + /** + * Sets the given projection matrix. + * + * @param {Matrix4} projectionMatrix - The projection matrix to set. + */ + setProjectionMatrix(projectionMatrix: Matrix4): void; + /** + * Updates velocity specific uniforms. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update({ frameId, camera, object }: NodeFrame): void; + /** + * Overwritten to updated velocity specific uniforms. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + updateAfter({ object }: NodeFrame): void; + /** + * Implements the velocity computation based on the previous and current vertex data. + * + * @param {NodeBuilder} builder - A reference to the current node builder. + * @return {Node} The motion vector. + */ + setup(): Node; +} +import TempNode from '../core/TempNode.js'; +import { Matrix4 } from '../../math/Matrix4.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/VertexColorNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/VertexColorNode.d.ts new file mode 100644 index 000000000..c55c763bd --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/accessors/VertexColorNode.d.ts @@ -0,0 +1,31 @@ +export default VertexColorNode; +export function vertexColor(index?: number): VertexColorNode; +/** + * An attribute node for representing vertex colors. + * + * @augments AttributeNode + */ +declare class VertexColorNode extends AttributeNode { + /** + * Constructs a new vertex color node. + * + * @param {number} index - The attribute index. + */ + constructor(index: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isVertexColorNode: boolean; + /** + * The attribute index to enable more than one sets of vertex colors. + * + * @type {number} + * @default 0 + */ + index: number; +} +import AttributeNode from '../core/AttributeNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/code/CodeNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/code/CodeNode.d.ts new file mode 100644 index 000000000..13ca56a3d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/code/CodeNode.d.ts @@ -0,0 +1,79 @@ +export default CodeNode; +/** + * TSL function for creating a code node. + * + * @tsl + * @function + * @param {string} [code] - The native code. + * @param {?Array} [includes=[]] - An array of includes. + * @param {?('js'|'wgsl'|'glsl')} [language=''] - The used language. + * @returns {CodeNode} + */ +export const code: any; +export function js(src: string, includes: Array): CodeNode; +export function wgsl(src: string, includes: Array): CodeNode; +export function glsl(src: string, includes: Array): CodeNode; +/** + * This class represents native code sections. It is the base + * class for modules like {@link FunctionNode} which allows to implement + * functions with native shader languages. + * + * @augments Node + */ +declare class CodeNode extends Node { + /** + * Constructs a new code node. + * + * @param {string} [code=''] - The native code. + * @param {Array} [includes=[]] - An array of includes. + * @param {('js'|'wgsl'|'glsl')} [language=''] - The used language. + */ + constructor(code?: string, includes?: Array, language?: ("js" | "wgsl" | "glsl")); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isCodeNode: boolean; + /** + * The native code. + * + * @type {string} + * @default '' + */ + code: string; + /** + * An array of includes + * + * @type {Array} + * @default [] + */ + includes: Array; + /** + * The used language. + * + * @type {('js'|'wgsl'|'glsl')} + * @default '' + */ + language: ("js" | "wgsl" | "glsl"); + /** + * Sets the includes of this code node. + * + * @param {Array} includes - The includes to set. + * @return {CodeNode} A reference to this node. + */ + setIncludes(includes: Array): CodeNode; + /** + * Returns the includes of this code node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Array} The includes. + */ + getIncludes(): Array; + generate(builder: any): any; + serialize(data: any): void; + deserialize(data: any): void; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/code/ExpressionNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/code/ExpressionNode.d.ts new file mode 100644 index 000000000..47f1180ff --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/code/ExpressionNode.d.ts @@ -0,0 +1,35 @@ +export default ExpressionNode; +/** + * TSL function for creating an expression node. + * + * @tsl + * @function + * @param {string} [snippet] - The native code snippet. + * @param {?string} [nodeType='void'] - The node type. + * @returns {ExpressionNode} + */ +export const expression: any; +/** + * This class can be used to implement basic expressions in shader code. + * Basic examples for that are `return`, `continue` or `discard` statements. + * + * @augments Node + */ +declare class ExpressionNode extends Node { + /** + * Constructs a new expression node. + * + * @param {string} [snippet=''] - The native code snippet. + * @param {string} [nodeType='void'] - The node type. + */ + constructor(snippet?: string, nodeType?: string); + /** + * The native code snippet. + * + * @type {string} + * @default '' + */ + snippet: string; + generate(builder: any, output: any): any; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/code/FunctionCallNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/code/FunctionCallNode.d.ts new file mode 100644 index 000000000..38783b5a5 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/code/FunctionCallNode.d.ts @@ -0,0 +1,70 @@ +export default FunctionCallNode; +export function call(func: any, ...params: any[]): FunctionCallNode; +/** + * This module represents the call of a {@link FunctionNode}. Developers are usually not confronted + * with this module since they use the predefined TSL syntax `wgslFn` and `glslFn` which encapsulate + * this logic. + * + * @augments TempNode + */ +declare class FunctionCallNode extends TempNode { + /** + * Constructs a new function call node. + * + * @param {?FunctionNode} functionNode - The function node. + * @param {Object} [parameters={}] - The parameters for the function call. + */ + constructor(functionNode?: FunctionNode | null, parameters?: { + [x: string]: Node; + }); + /** + * The function node. + * + * @type {?FunctionNode} + * @default null + */ + functionNode: FunctionNode | null; + /** + * The parameters of the function call. + * + * @type {Object} + * @default {} + */ + parameters: { + [x: string]: Node; + }; + /** + * Sets the parameters of the function call node. + * + * @param {Object} parameters - The parameters to set. + * @return {FunctionCallNode} A reference to this node. + */ + setParameters(parameters: { + [x: string]: Node; + }): FunctionCallNode; + /** + * Returns the parameters of the function call node. + * + * @return {Object} The parameters of this node. + */ + getParameters(): { + [x: string]: Node; + }; + /** + * Returns the type of this function call node. + * + * @param {NodeBuilder} builder - The current node builder. + * @returns {string} The type of this node. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Returns the function node of this function call node. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} [name] - The name of the member. + * @returns {string} The type of the member. + */ + getMemberType(builder: NodeBuilder, name?: string): string; + generate(builder: any): string; +} +import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/code/FunctionNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/code/FunctionNode.d.ts new file mode 100644 index 000000000..d17722e1f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/code/FunctionNode.d.ts @@ -0,0 +1,70 @@ +export default FunctionNode; +export function glslFn(code: any, includes: any): any; +export function wgslFn(code: any, includes: any): any; +/** + * This class represents a native shader function. It can be used to implement + * certain aspects of a node material with native shader code. There are two predefined + * TSL functions for easier usage. + * + * - `wgslFn`: Creates a WGSL function node. + * - `glslFn`: Creates a GLSL function node. + * + * A basic example with one include looks like so: + * + * ```js + * const desaturateWGSLFn = wgslFn( ` + * fn desaturate( color:vec3 ) -> vec3 { + * let lum = vec3( 0.299, 0.587, 0.114 ); + * return vec3( dot( lum, color ) ); + * }` + *); + * const someWGSLFn = wgslFn( ` + * fn someFn( color:vec3 ) -> vec3 { + * return desaturate( color ); + * } + * `, [ desaturateWGSLFn ] ); + * material.colorNode = someWGSLFn( { color: texture( map ) } ); + *``` + * @augments CodeNode + */ +declare class FunctionNode extends CodeNode { + /** + * Constructs a new function node. + * + * @param {string} [code=''] - The native code. + * @param {Array} [includes=[]] - An array of includes. + * @param {('js'|'wgsl'|'glsl')} [language=''] - The used language. + */ + constructor(code?: string, includes?: Array, language?: ("js" | "wgsl" | "glsl")); + /** + * Returns the type of this function node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The type. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Returns the type of a member of this function node. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} name - The name of the member. + * @return {string} The type of the member. + */ + getMemberType(builder: NodeBuilder, name: string): string; + /** + * Returns the inputs of this function node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Array} The inputs. + */ + getInputs(builder: NodeBuilder): Array; + /** + * Returns the node function for this function node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {NodeFunction} The node function. + */ + getNodeFunction(builder: NodeBuilder): NodeFunction; + generate(builder: any, output: any): any; +} +import CodeNode from './CodeNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/ArrayNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/ArrayNode.d.ts new file mode 100644 index 000000000..41339a0bd --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/ArrayNode.d.ts @@ -0,0 +1,76 @@ +export default ArrayNode; +export function array(...params: any[]): ArrayNode; +/** + * ArrayNode represents a collection of nodes, typically created using the {@link array} function. + * ```js + * const colors = array( [ + * vec3( 1, 0, 0 ), + * vec3( 0, 1, 0 ), + * vec3( 0, 0, 1 ) + * ] ); + * + * const redColor = tintColors.element( 0 ); + * ``` + * + * @augments TempNode + */ +declare class ArrayNode extends TempNode { + /** + * Constructs a new array node. + * + * @param {?string} nodeType - The data type of the elements. + * @param {number} count - Size of the array. + * @param {?Array} [values=null] - Array default values. + */ + constructor(nodeType: string | null, count: number, values?: Array | null); + /** + * Array size. + * + * @type {number} + */ + count: number; + /** + * Array default values. + * + * @type {?Array} + */ + values: Array | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isArrayNode: boolean; + /** + * Returns the number of elements in the node array. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {number} The number of elements in the node array. + */ + getArrayCount(): number; + /** + * Returns the node's type. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The type of the node. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Returns the type of a member variable. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} name - The name of the member variable. + * @return {string} The type of the member variable. + */ + getMemberType(builder: NodeBuilder, name: string): string; + /** + * This method builds the output node and returns the resulting array as a shader string. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The generated shader string. + */ + generate(builder: NodeBuilder): string; +} +import TempNode from './TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/AssignNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/AssignNode.d.ts new file mode 100644 index 000000000..3f1ab4808 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/AssignNode.d.ts @@ -0,0 +1,65 @@ +export default AssignNode; +/** + * TSL function for creating an assign node. + * + * @tsl + * @function + * @param {Node} targetNode - The target node. + * @param {Node} sourceNode - The source type. + * @returns {AssignNode} + */ +export const assign: any; +/** + * These node represents an assign operation. Meaning a node is assigned + * to another node. + * + * @augments TempNode + */ +declare class AssignNode extends TempNode { + /** + * Constructs a new assign node. + * + * @param {Node} targetNode - The target node. + * @param {Node} sourceNode - The source type. + */ + constructor(targetNode: Node, sourceNode: Node); + /** + * The target node. + * + * @type {Node} + */ + targetNode: Node; + /** + * The source node. + * + * @type {Node} + */ + sourceNode: Node; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isAssignNode: boolean; + /** + * Whether this node is used more than once in context of other nodes. This method + * is overwritten since it always returns `false` (assigns are unique). + * + * @return {boolean} A flag that indicates if there is more than one dependency to other nodes. Always `false`. + */ + hasDependencies(): boolean; + generateNodeType(builder: any, output: any): any; + /** + * Whether a split is required when assigning source to target. This can happen when the component length of + * target and source data type does not match. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {boolean} Whether a split is required when assigning source to target. + */ + needsSplitAssign(builder: NodeBuilder): boolean; + setup(builder: any): void; + generate(builder: any, output: any): any; +} +import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/AttributeNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/AttributeNode.d.ts new file mode 100644 index 000000000..0f8b0bf15 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/AttributeNode.d.ts @@ -0,0 +1,41 @@ +export default AttributeNode; +export function attribute(name: string, nodeType?: string | null): AttributeNode; +/** + * Base class for representing shader attributes as nodes. + * + * @augments Node + */ +declare class AttributeNode extends Node { + /** + * Constructs a new attribute node. + * + * @param {string} attributeName - The name of the attribute. + * @param {?string} nodeType - The node type. + */ + constructor(attributeName: string, nodeType?: string | null); + _attributeName: string; + getHash(builder: any): string; + generateNodeType(builder: any): string | null; + /** + * Sets the attribute name to the given value. The method can be + * overwritten in derived classes if the final name must be computed + * analytically. + * + * @param {string} attributeName - The name of the attribute. + * @return {AttributeNode} A reference to this node. + */ + setAttributeName(attributeName: string): AttributeNode; + /** + * Returns the attribute name of this node. The method can be + * overwritten in derived classes if the final name must be computed + * analytically. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The attribute name. + */ + getAttributeName(): string; + generate(builder: any): any; + serialize(data: any): void; + deserialize(data: any): void; +} +import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/BypassNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/BypassNode.d.ts new file mode 100644 index 000000000..db68f52f5 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/BypassNode.d.ts @@ -0,0 +1,54 @@ +export default BypassNode; +/** + * TSL function for creating a bypass node. + * + * @tsl + * @function + * @param {Node} outputNode - The output node. + * @param {Node} callNode - The call node. + * @returns {BypassNode} + */ +export const bypass: any; +/** + * The class generates the code of a given node but returns another node in the output. + * This can be used to call a method or node that does not return a value, i.e. + * type `void` on an input where returning a value is required. Example: + * + * ```js + * material.colorNode = myColor.bypass( runVoidFn() ) + *``` + * + * @augments Node + */ +declare class BypassNode extends Node { + /** + * Constructs a new bypass node. + * + * @param {Node} outputNode - The output node. + * @param {Node} callNode - The call node. + */ + constructor(outputNode: Node, callNode: Node); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBypassNode: boolean; + /** + * The output node. + * + * @type {Node} + */ + outputNode: Node; + /** + * The call node. + * + * @type {Node} + */ + callNode: Node; + generateNodeType(builder: any): string; + generate(builder: any): string | Node | null; +} +import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/ConstNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/ConstNode.d.ts new file mode 100644 index 000000000..f26ae9eb3 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/ConstNode.d.ts @@ -0,0 +1,25 @@ +export default ConstNode; +/** + * Class for representing a constant value in the shader. + * + * @augments InputNode + */ +declare class ConstNode extends InputNode { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isConstNode: boolean; + /** + * Generates the shader string of the value with the current node builder. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The generated value as a shader string. + */ + generateConst(builder: NodeBuilder): string; + generate(builder: any, output: any): any; +} +import InputNode from './InputNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/ContextNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/ContextNode.d.ts new file mode 100644 index 000000000..40becdbad --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/ContextNode.d.ts @@ -0,0 +1,107 @@ +/** + * TSL function for defining a built-in shadow context for a given node. + * + * @tsl + * @function + * @param {ShadowNode} shadowNode - The shadow node representing the light's shadow. + * @param {Light} light - The light associated with the shadow. + * @param {Node} [node=null] - The node whose context should be modified. + * @returns {ContextNode} + */ +export function builtinShadowContext(shadowNode: ShadowNode, light: Light, node?: Node): ContextNode; +/** + * TSL function for defining a built-in ambient occlusion context for a given node. + * + * @tsl + * @function + * @param {Node} aoNode - The ambient occlusion value node to apply. + * @param {Node} [node=null] - The node whose context should be modified. + * @returns {ContextNode} + */ +export function builtinAOContext(aoNode: Node, node?: Node): ContextNode; +/** + * TSL function for defining a label context value for a given node. + * + * @tsl + * @function + * @deprecated + * @param {Node} node - The node whose context should be modified. + * @param {string} name - The name/label to set. + * @returns {ContextNode} + */ +export function label(node: Node, name: string): ContextNode; +export default ContextNode; +export function context(nodeOrValue?: Node | Object, value?: Object): ContextNode; +export function uniformFlow(node: Node): ContextNode; +export function setName(node: Node, name: string): ContextNode; +import Node from './Node.js'; +/** + * This node can be used as a context management component for another node. + * {@link NodeBuilder} performs its node building process in a specific context and + * this node allows the modify the context. A typical use case is to overwrite `getUV()` e.g.: + * + * ```js + *node.context( { getUV: () => customCoord } ); + *\// or + *material.contextNode = context( { getUV: () => customCoord } ); + *\// or + *renderer.contextNode = context( { getUV: () => customCoord } ); + *\// or + *scenePass.contextNode = context( { getUV: () => customCoord } ); + *``` + * @augments Node + */ +declare class ContextNode extends Node { + /** + * Constructs a new context node. + * + * @param {Node} node - The node whose context should be modified. + * @param {Object} [value={}] - The modified context data. + */ + constructor(node?: Node, value?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isContextNode: boolean; + /** + * The node whose context should be modified. + * + * @type {Node} + */ + node: Node; + /** + * The modified context data. + * + * @type {Object} + * @default {} + */ + value: Object; + /** + * This method is overwritten to ensure it returns the type of {@link ContextNode#node}. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Gathers the context data from all parent context nodes. + * + * @return {Object} The gathered context data. + */ + getFlowContextData(): Object; + /** + * This method is overwritten to ensure it returns the member type of {@link ContextNode#node}. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} name - The member name. + * @returns {string} The member type. + */ + getMemberType(builder: NodeBuilder, name: string): string; + analyze(builder: any): void; + setup(builder: any): void; + generate(builder: any, output: any): string | Node | null; +} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/IndexNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/IndexNode.d.ts new file mode 100644 index 000000000..6117487c5 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/IndexNode.d.ts @@ -0,0 +1,88 @@ +export default IndexNode; +/** + * TSL object that represents the index of a vertex within a mesh. + * + * @tsl + * @type {IndexNode} + */ +export const vertexIndex: IndexNode; +/** + * TSL object that represents the index of either a mesh instance or an invocation of a compute shader. + * + * @tsl + * @type {IndexNode} + */ +export const instanceIndex: IndexNode; +/** + * TSL object that represents the index of the subgroup the current compute invocation belongs to. + * + * @tsl + * @type {IndexNode} + */ +export const subgroupIndex: IndexNode; +/** + * TSL object that represents the index of a compute invocation within the scope of a subgroup. + * + * @tsl + * @type {IndexNode} + */ +export const invocationSubgroupIndex: IndexNode; +/** + * TSL object that represents the index of a compute invocation within the scope of a workgroup load. + * + * @tsl + * @type {IndexNode} + */ +export const invocationLocalIndex: IndexNode; +/** + * TSL object that represents the index of a draw call. + * + * @tsl + * @type {IndexNode} + */ +export const drawIndex: IndexNode; +/** + * This class represents shader indices of different types. The following predefined node + * objects cover frequent use cases: + * + * - `vertexIndex`: The index of a vertex within a mesh. + * - `instanceIndex`: The index of either a mesh instance or an invocation of a compute shader. + * - `drawIndex`: The index of a draw call. + * - `invocationLocalIndex`: The index of a compute invocation within the scope of a workgroup load. + * - `invocationSubgroupIndex`: The index of a compute invocation within the scope of a subgroup. + * - `subgroupIndex`: The index of a compute invocation's subgroup within its workgroup. + * + * @augments Node + */ +declare class IndexNode extends Node { + /** + * Constructs a new index node. + * + * @param {('vertex'|'instance'|'subgroup'|'invocationLocal'|'invocationGlobal'|'invocationSubgroup'|'draw')} scope - The scope of the index node. + */ + constructor(scope: ("vertex" | "instance" | "subgroup" | "invocationLocal" | "invocationGlobal" | "invocationSubgroup" | "draw")); + /** + * The scope of the index node. + * + * @type {string} + */ + scope: string; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isIndexNode: boolean; + generate(builder: any): any; +} +declare namespace IndexNode { + let VERTEX: string; + let INSTANCE: string; + let SUBGROUP: string; + let INVOCATION_LOCAL: string; + let INVOCATION_SUBGROUP: string; + let DRAW: string; +} +import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/InputNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/InputNode.d.ts new file mode 100644 index 000000000..fc285a964 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/InputNode.d.ts @@ -0,0 +1,61 @@ +export default InputNode; +/** + * Base class for representing data input nodes. + * + * @augments Node + */ +declare class InputNode extends Node { + /** + * Constructs a new input node. + * + * @param {any} value - The value of this node. This can be any JS primitive, functions, array buffers or even three.js objects (vector, matrices, colors). + * @param {?string} nodeType - The node type. If no explicit type is defined, the node tries to derive the type from its value. + */ + constructor(value: any, nodeType?: string | null); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isInputNode: boolean; + /** + * The value of this node. This can be any JS primitive, functions, array buffers or even three.js objects (vector, matrices, colors). + * + * @type {any} + */ + value: any; + /** + * The precision of the value in the shader. + * + * @type {?('low'|'medium'|'high')} + * @default null + */ + precision: ("low" | "medium" | "high") | null; + generateNodeType(): string | null; + /** + * Returns the input type of the node which is by default the node type. Derived modules + * might overwrite this method and use a fixed type or compute one analytically. + * + * A typical example for different input and node types are textures. The input type of a + * normal RGBA texture is `texture` whereas its node type is `vec4`. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The input type. + */ + getInputType(builder: NodeBuilder): string; + /** + * Sets the precision to the given value. The method can be + * overwritten in derived classes if the final precision must be computed + * analytically. + * + * @param {('low'|'medium'|'high')} precision - The precision of the input value in the shader. + * @return {InputNode} A reference to this node. + */ + setPrecision(precision: ("low" | "medium" | "high")): InputNode; + serialize(data: any): void; + deserialize(data: any): void; + generate(): void; +} +import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/InspectorNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/InspectorNode.d.ts new file mode 100644 index 000000000..7fd327733 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/InspectorNode.d.ts @@ -0,0 +1,57 @@ +/** + * Creates an inspector node to wrap around a given node for inspection purposes. + * + * @tsl + * @param {Node} node - The node to inspect. + * @param {string} [name=''] - Optional name for the inspector node. + * @param {Function|null} [callback=null] - Optional callback to modify the node during setup. + * @returns {Node} The inspector node. + */ +export function inspector(node: Node, name?: string, callback?: Function | null): Node; +export default InspectorNode; +import Node from './Node.js'; +/** + * InspectorNode is a wrapper node that allows inspection of node values during rendering. + * It can be used to debug or analyze node outputs in the rendering pipeline. + * + * @augments Node + */ +declare class InspectorNode extends Node { + /** + * Creates an InspectorNode. + * + * @param {Node} node - The node to inspect. + * @param {string} [name=''] - Optional name for the inspector node. + * @param {Function|null} [callback=null] - Optional callback to modify the node during setup. + */ + constructor(node: Node, name?: string, callback?: Function | null); + node: Node; + callback: Function | null; + isInspectorNode: boolean; + /** + * Returns the name of the inspector node. + * + * @returns {string} + */ + getName(): string; + /** + * Updates the inspector node, allowing inspection of the wrapped node. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update(frame: NodeFrame): void; + /** + * Returns the type of the wrapped node. + * + * @param {NodeBuilder} builder - The node builder. + * @returns {string} + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Sets up the inspector node. + * + * @param {NodeBuilder} builder - The node builder. + * @returns {Node} The setup node. + */ + setup(builder: NodeBuilder): Node; +} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/IsolateNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/IsolateNode.d.ts new file mode 100644 index 000000000..23e65acba --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/IsolateNode.d.ts @@ -0,0 +1,55 @@ +/** + * TSL function for creating a cache node. + * + * @tsl + * @function + * @deprecated + * @param {Node} node - The node that should be cached. + * @param {boolean} [parent=true] - Whether this node refers to a shared parent cache or not. + * @returns {IsolateNode} + */ +export function cache(node: Node, parent?: boolean): IsolateNode; +export default IsolateNode; +export function isolate(node: Node): IsolateNode; +import Node from './Node.js'; +/** + * This node can be used as a cache management component for another node. + * Caching is in general used by default in {@link NodeBuilder} but this node + * allows the usage of a shared parent cache during the build process. + * + * @augments Node + */ +declare class IsolateNode extends Node { + /** + * Constructs a new cache node. + * + * @param {Node} node - The node that should be cached. + * @param {boolean} [parent=true] - Whether this node refers to a shared parent cache or not. + */ + constructor(node: Node, parent?: boolean); + /** + * The node that should be cached. + * + * @type {Node} + */ + node: Node; + /** + * Whether this node refers to a shared parent cache or not. + * + * @type {boolean} + * @default true + */ + parent: boolean; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isIsolateNode: boolean; + generateNodeType(builder: any): string; + build(builder: any, ...params: any[]): string | Node | null; + setParent(parent: any): this; + getParent(): boolean; +} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/LightingModel.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/LightingModel.d.ts new file mode 100644 index 000000000..e281d8a3c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/LightingModel.d.ts @@ -0,0 +1,59 @@ +export default LightingModel; +/** + * Abstract class for implementing lighting models. The module defines + * multiple methods that concrete lighting models can implement. These + * methods are executed at different points during the light evaluation + * process. + */ +declare class LightingModel { + /** + * This method is intended for setting up lighting model and context data + * which are later used in the evaluation process. + * + * @abstract + * @param {NodeBuilder} builder - The current node builder. + */ + start(builder: NodeBuilder): void; + /** + * This method is intended for executing final tasks like final updates + * to the outgoing light. + * + * @abstract + * @param {NodeBuilder} builder - The current node builder. + */ + finish(): void; + /** + * This method is intended for implementing the direct light term and + * executed during the build process of directional, point and spot light nodes. + * + * @abstract + * @param {Object} lightData - The light data. + * @param {NodeBuilder} builder - The current node builder. + */ + direct(): void; + /** + * This method is intended for implementing the direct light term for + * rect area light nodes. + * + * @abstract + * @param {Object} lightData - The light data. + * @param {NodeBuilder} builder - The current node builder. + */ + directRectArea(): void; + /** + * This method is intended for implementing the indirect light term. + * + * @abstract + * @param {NodeBuilder} builder - The current node builder. + */ + indirect(): void; + /** + * This method is intended for implementing the ambient occlusion term. + * Unlike other methods, this method must be called manually by the lighting + * model in its indirect term. + * + * @abstract + * @param {NodeBuilder} builder - The current node builder. + */ + ambientOcclusion(): void; +} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/MRTNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/MRTNode.d.ts new file mode 100644 index 000000000..8d1b4d0be --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/MRTNode.d.ts @@ -0,0 +1,106 @@ +/** + * Returns the MRT texture index for the given name. + * + * @param {Array} textures - The textures of a MRT-configured render target. + * @param {string} name - The name of the MRT texture which index is requested. + * @return {number} The texture index. + */ +export function getTextureIndex(textures: Array, name: string): number; +export default MRTNode; +/** + * TSL function for creating a MRT node. + * + * @tsl + * @function + * @param {Object} outputNodes - The MRT outputs. + * @returns {MRTNode} + */ +export const mrt: any; +/** + * This node can be used setup a MRT context for rendering. A typical MRT setup for + * post-processing is shown below: + * ```js + * const mrtNode = mrt( { + * output: output, + * normal: normalView + * } ) ; + * ``` + * The MRT output is defined as a dictionary. + * + * @augments OutputStructNode + */ +declare class MRTNode extends OutputStructNode { + /** + * Constructs a new output struct node. + * + * @param {Object} outputNodes - The MRT outputs. + */ + constructor(outputNodes: { + [x: string]: Node; + }); + /** + * A dictionary representing the MRT outputs. The key + * is the name of the output, the value the node which produces + * the output result. + * + * @type {Object} + */ + outputNodes: { + [x: string]: Node; + }; + /** + * A dictionary storing the blend modes for each output. + * + * @type {Object} + */ + blendModes: { + [x: string]: BlendMode; + }; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMRTNode: boolean; + /** + * Sets the blend mode for the given output name. + * + * @param {string} name - The name of the output. + * @param {BlendMode} blend - The blending mode. + * @return {MRTNode} The current MRT node. + */ + setBlendMode(name: string, blend: BlendMode): MRTNode; + /** + * Returns the blend mode for the given output name. + * + * @param {string} name - The name of the output. + * @return {BlendMode} The blend mode. + */ + getBlendMode(name: string): BlendMode; + /** + * Returns `true` if the MRT node has an output with the given name. + * + * @param {string} name - The name of the output. + * @return {NodeBuilder} Whether the MRT node has an output for the given name or not. + */ + has(name: string): NodeBuilder; + /** + * Returns the output node for the given name. + * + * @param {string} name - The name of the output. + * @return {Node} The output node. + */ + get(name: string): Node; + /** + * Merges the outputs of the given MRT node with the outputs of this node. + * + * @param {MRTNode} mrtNode - The MRT to merge. + * @return {MRTNode} A new MRT node with merged outputs.. + */ + merge(mrtNode: MRTNode): MRTNode; + setup(builder: any): import("./Node.js").default | null; +} +import OutputStructNode from './OutputStructNode.js'; +import BlendMode from '../../renderers/common/BlendMode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/Node.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/Node.d.ts new file mode 100644 index 000000000..8299d6c54 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/Node.d.ts @@ -0,0 +1,437 @@ +export default Node; +/** + * Base class for all nodes. + * + * @augments EventDispatcher + */ +declare class Node extends EventDispatcher { + static get type(): string; + /** + * Constructs a new node. + * + * @param {?string} nodeType - The node type. + */ + constructor(nodeType?: string | null); + /** + * The node type. This represents the result type of the node (e.g. `float` or `vec3`). + * + * @type {?string} + * @default null + */ + nodeType: string | null; + /** + * The update type of the node's {@link Node#update} method. Possible values are listed in {@link NodeUpdateType}. + * + * @type {string} + * @default 'none' + */ + updateType: string; + /** + * The update type of the node's {@link Node#updateBefore} method. Possible values are listed in {@link NodeUpdateType}. + * + * @type {string} + * @default 'none' + */ + updateBeforeType: string; + /** + * The update type of the node's {@link Node#updateAfter} method. Possible values are listed in {@link NodeUpdateType}. + * + * @type {string} + * @default 'none' + */ + updateAfterType: string; + /** + * The version of the node. The version automatically is increased when {@link Node#needsUpdate} is set to `true`. + * + * @type {number} + * @readonly + * @default 0 + */ + readonly version: number; + /** + * The name of the node. + * + * @type {string} + * @default '' + */ + name: string; + /** + * Whether this node is global or not. This property is relevant for the internal + * node caching system. All nodes which should be declared just once should + * set this flag to `true` (a typical example is {@link AttributeNode}). + * + * @type {boolean} + * @default false + */ + global: boolean; + /** + * Create a list of parents for this node during the build process. + * + * @type {boolean} + * @default false + */ + parents: boolean; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isNode: boolean; + _beforeNodes: any; + /** + * The cache key of this node. + * + * @private + * @type {?number} + * @default null + */ + private _cacheKey; + /** + * The UUID of the node. + * + * @type {string} + * @default null + * @private + */ + private _uuid; + /** + * The cache key's version. + * + * @private + * @type {number} + * @default 0 + */ + private _cacheKeyVersion; + /** + * The unique ID of the node. + * + * @type {number} + * @readonly + */ + readonly id: number; + /** + * The stack trace of the node for debugging purposes. + * + * @type {?string} + * @default null + */ + stackTrace: string | null; + /** + * Set this property to `true` when the node should be regenerated. + * + * @type {boolean} + * @default false + * @param {boolean} value + */ + set needsUpdate(value: boolean); + /** + * The UUID of the node. + * + * @type {string} + * @readonly + */ + readonly get uuid(): string; + /** + * The type of the class. The value is usually the constructor name. + * + * @type {string} + * @readonly + */ + readonly get type(): string; + /** + * Convenient method for defining {@link Node#update}. + * + * @param {Function} callback - The update method. + * @param {string} updateType - The update type. + * @return {Node} A reference to this node. + */ + onUpdate(callback: Function, updateType: string): Node; + /** + * The method can be implemented to update the node's internal state when it is used to render an object. + * The {@link Node#updateType} property defines how often the update is executed. + * + * @abstract + * @param {NodeFrame} frame - A reference to the current node frame. + * @return {?boolean} An optional bool that indicates whether the implementation actually performed an update or not (e.g. due to caching). + */ + update(): boolean | null; + /** + * Convenient method for defining {@link Node#update}. Similar to {@link Node#onUpdate}, but + * this method automatically sets the update type to `FRAME`. + * + * @param {Function} callback - The update method. + * @return {Node} A reference to this node. + */ + onFrameUpdate(callback: Function): Node; + /** + * Convenient method for defining {@link Node#update}. Similar to {@link Node#onUpdate}, but + * this method automatically sets the update type to `RENDER`. + * + * @param {Function} callback - The update method. + * @return {Node} A reference to this node. + */ + onRenderUpdate(callback: Function): Node; + /** + * Convenient method for defining {@link Node#update}. Similar to {@link Node#onUpdate}, but + * this method automatically sets the update type to `OBJECT`. + * + * @param {Function} callback - The update method. + * @return {Node} A reference to this node. + */ + onObjectUpdate(callback: Function): Node; + /** + * Convenient method for defining {@link Node#updateReference}. + * + * @param {Function} callback - The update method. + * @return {Node} A reference to this node. + */ + onReference(callback: Function): Node; + /** + * Nodes might refer to other objects like materials. This method allows to dynamically update the reference + * to such objects based on a given state (e.g. the current node frame or builder). + * + * @param {any} state - This method can be invocated in different contexts so `state` can refer to any object type. + * @return {any} The updated reference. + */ + updateReference(): any; + /** + * By default this method returns the value of the {@link Node#global} flag. This method + * can be overwritten in derived classes if an analytical way is required to determine the + * global cache referring to the current shader-stage. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {boolean} Whether this node is global or not. + */ + isGlobal(): boolean; + /** + * Generator function that can be used to iterate over the child nodes. + * + * @generator + * @yields {Node} A child node. + */ + getChildren(): Generator; + /** + * Calling this method dispatches the `dispose` event. This event can be used + * to register event listeners for clean up tasks. + */ + dispose(): void; + /** + * Callback for {@link Node#traverse}. + * + * @callback traverseCallback + * @param {Node} node - The current node. + */ + /** + * Can be used to traverse through the node's hierarchy. + * + * @param {traverseCallback} callback - A callback that is executed per node. + */ + traverse(callback: (node: Node) => any): void; + /** + * Returns the child nodes of this node. + * + * @private + * @param {Set} [ignores=new Set()] - A set of nodes to ignore during the search to avoid circular references. + * @returns {Array} An array of objects describing the child nodes. + */ + private _getChildren; + /** + * Returns the cache key for this node. + * + * @param {boolean} [force=false] - When set to `true`, a recomputation of the cache key is forced. + * @param {Set} [ignores=null] - A set of nodes to ignore during the computation of the cache key. + * @return {number} The cache key of the node. + */ + getCacheKey(force?: boolean, ignores?: Set): number; + /** + * Generate a custom cache key for this node. + * + * @return {number} The cache key of the node. + */ + customCacheKey(): number; + /** + * Returns the references to this node which is by default `this`. + * + * @return {Node} A reference to this node. + */ + getScope(): Node; + /** + * Returns the hash of the node which is used to identify the node. By default it's + * the {@link Node#uuid} however derived node classes might have to overwrite this method + * depending on their implementation. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The hash. + */ + getHash(): string; + /** + * Returns the update type of {@link Node#update}. + * + * @return {NodeUpdateType} The update type. + */ + getUpdateType(): { + NONE: string; + FRAME: string; + RENDER: string; + OBJECT: string; + }; + /** + * Returns the update type of {@link Node#updateBefore}. + * + * @return {NodeUpdateType} The update type. + */ + getUpdateBeforeType(): { + NONE: string; + FRAME: string; + RENDER: string; + OBJECT: string; + }; + /** + * Returns the update type of {@link Node#updateAfter}. + * + * @return {NodeUpdateType} The update type. + */ + getUpdateAfterType(): { + NONE: string; + FRAME: string; + RENDER: string; + OBJECT: string; + }; + /** + * Certain types are composed of multiple elements. For example a `vec3` + * is composed of three `float` values. This method returns the type of + * these elements. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The type of the node. + */ + getElementType(builder: NodeBuilder): string; + /** + * Returns the node member type for the given name. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} name - The name of the member. + * @return {string} The type of the node. + */ + getMemberType(): string; + /** + * Returns the node's type. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} [output=null] - The output of the node. + * @return {string} The type of the node. + */ + getNodeType(builder: NodeBuilder, output?: string): string; + /** + * Returns the node's type. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} [output=null] - The output of the node. + * @return {string} The type of the node. + */ + generateNodeType(builder: NodeBuilder, output?: string): string; + /** + * This method is used during the build process of a node and ensures + * equal nodes are not built multiple times but just once. For example if + * `attribute( 'uv' )` is used multiple times by the user, the build + * process makes sure to process just the first node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The shared node if possible. Otherwise `this` is returned. + */ + getShared(builder: NodeBuilder): Node; + /** + * Returns the number of elements in the node array. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {?number} The number of elements in the node array. + */ + getArrayCount(): number | null; + /** + * Represents the setup stage which is the first step of the build process, see {@link Node#build} method. + * This method is often overwritten in derived modules to prepare the node which is used as a node's output/result. + * If an output node is prepared, then it must be returned in the `return` statement of the derived module's setup function. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {?Node} The output node. + */ + setup(builder: NodeBuilder): Node | null; + /** + * Represents the analyze stage which is the second step of the build process, see {@link Node#build} method. + * This stage analyzes the node hierarchy and ensures descendent nodes are built. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {?Node} output - The target output node. + */ + analyze(builder: NodeBuilder, output?: Node | null): void; + /** + * Represents the generate stage which is the third step of the build process, see {@link Node#build} method. + * This state builds the output node and returns the resulting shader string. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {?string} [output] - Can be used to define the output type. + * @return {?string} The generated shader string. + */ + generate(builder: NodeBuilder, output?: string | null): string | null; + /** + * The method can be implemented to update the node's internal state before it is used to render an object. + * The {@link Node#updateBeforeType} property defines how often the update is executed. + * + * @abstract + * @param {NodeFrame} frame - A reference to the current node frame. + * @return {?boolean} An optional bool that indicates whether the implementation actually performed an update or not (e.g. due to caching). + */ + updateBefore(): boolean | null; + /** + * The method can be implemented to update the node's internal state after it was used to render an object. + * The {@link Node#updateAfterType} property defines how often the update is executed. + * + * @abstract + * @param {NodeFrame} frame - A reference to the current node frame. + * @return {?boolean} An optional bool that indicates whether the implementation actually performed an update or not (e.g. due to caching). + */ + updateAfter(): boolean | null; + before(node: any): this; + /** + * This method performs the build of a node. The behavior and return value depend on the current build stage: + * - **setup**: Prepares the node and its children for the build process. This process can also create new nodes. Returns the node itself or a variant. + * - **analyze**: Analyzes the node hierarchy for optimizations in the code generation stage. Returns `null`. + * - **generate**: Generates the shader code for the node. Returns the generated shader string. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {?(string|Node)} [output=null] - Can be used to define the output type. + * @return {?(Node|string)} The result of the build process, depending on the build stage. + */ + build(builder: NodeBuilder, output?: (string | Node) | null): (Node | string) | null; + /** + * Returns the child nodes as a JSON object. + * + * @return {Generator} An iterable list of serialized child objects as JSON. + */ + getSerializeChildren(): Generator; + /** + * Serializes the node to JSON. + * + * @param {Object} json - The output JSON object. + */ + serialize(json: Object): void; + /** + * Deserializes the node from the given JSON. + * + * @param {Object} json - The JSON object. + */ + deserialize(json: Object): void; + /** + * Serializes the node into the three.js JSON Object/Scene format. + * + * @param {?Object} meta - An optional JSON object that already holds serialized data from other scene objects. + * @return {Object} The serialized node. + */ + toJSON(meta: Object | null): Object; +} +declare namespace Node { + let captureStackTrace: boolean; +} +import { EventDispatcher } from '../../core/EventDispatcher.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeAttribute.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeAttribute.d.ts new file mode 100644 index 000000000..d6414185f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/NodeAttribute.d.ts @@ -0,0 +1,44 @@ +export default NodeAttribute; +/** + * {@link NodeBuilder} is going to create instances of this class during the build process + * of nodes. They represent the final shader attributes that are going to be generated + * by the builder. Arrays of node attributes is maintained in {@link NodeBuilder#attributes} + * and {@link NodeBuilder#bufferAttributes} for this purpose. + */ +declare class NodeAttribute { + /** + * Constructs a new node attribute. + * + * @param {string} name - The name of the attribute. + * @param {string} type - The type of the attribute. + * @param {?Node} node - An optional reference to the node. + */ + constructor(name: string, type: string, node?: Node | null); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isNodeAttribute: boolean; + /** + * The name of the attribute. + * + * @type {string} + */ + name: string; + /** + * The type of the attribute. + * + * @type {string} + */ + type: string; + /** + * An optional reference to the node. + * + * @type {?Node} + * @default null + */ + node: Node | null; +} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeBuilder.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeBuilder.d.ts new file mode 100644 index 000000000..998490e38 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/NodeBuilder.d.ts @@ -0,0 +1,1335 @@ +export default NodeBuilder; +/** + * Base class for builders which generate a shader program based + * on a 3D object and its node material definition. + */ +declare class NodeBuilder { + /** + * Constructs a new node builder. + * + * @param {Object3D} object - The 3D object. + * @param {Renderer} renderer - The current renderer. + * @param {NodeParser} parser - A reference to a node parser. + */ + constructor(object: Object3D, renderer: Renderer, parser: NodeParser); + /** + * The 3D object. + * + * @type {Object3D} + */ + object: Object3D; + /** + * The material of the 3D object. + * + * @type {?Material} + */ + material: Material | null; + /** + * The geometry of the 3D object. + * + * @type {?BufferGeometry} + */ + geometry: BufferGeometry | null; + /** + * The current renderer. + * + * @type {Renderer} + */ + renderer: Renderer; + /** + * A reference to a node parser. + * + * @type {NodeParser} + */ + parser: NodeParser; + /** + * The scene the 3D object belongs to. + * + * @type {?Scene} + * @default null + */ + scene: Scene | null; + /** + * The camera the 3D object is rendered with. + * + * @type {?Camera} + * @default null + */ + camera: Camera | null; + /** + * A list of all nodes the builder is processing + * for this 3D object. + * + * @type {Array} + */ + nodes: Array; + /** + * A list of all nodes the builder is processing in sequential order. + * + * This is used to determine the update order of nodes, which is important for + * {@link NodeUpdateType#UPDATE_BEFORE} and {@link NodeUpdateType#UPDATE_AFTER}. + * + * @type {Array} + */ + sequentialNodes: Array; + /** + * A list of all nodes which {@link Node#update} method should be executed. + * + * @type {Array} + */ + updateNodes: Array; + /** + * A list of all nodes which {@link Node#updateBefore} method should be executed. + * + * @type {Array} + */ + updateBeforeNodes: Array; + /** + * A list of all nodes which {@link Node#updateAfter} method should be executed. + * + * @type {Array} + */ + updateAfterNodes: Array; + /** + * A dictionary that assigns each node to a unique hash. + * + * @type {Object} + */ + hashNodes: { + [x: number]: Node; + }; + /** + * A reference to a node material observer. + * + * @type {?NodeMaterialObserver} + * @default null + */ + observer: NodeMaterialObserver | null; + /** + * A reference to the current lights node. + * + * @type {?LightsNode} + * @default null + */ + lightsNode: LightsNode | null; + /** + * A reference to the current environment node. + * + * @type {?Node} + * @default null + */ + environmentNode: Node | null; + /** + * A reference to the current fog node. + * + * @type {?Node} + * @default null + */ + fogNode: Node | null; + /** + * The current clipping context. + * + * @type {?ClippingContext} + */ + clippingContext: ClippingContext | null; + /** + * The generated vertex shader. + * + * @type {?string} + */ + vertexShader: string | null; + /** + * The generated fragment shader. + * + * @type {?string} + */ + fragmentShader: string | null; + /** + * The generated compute shader. + * + * @type {?string} + */ + computeShader: string | null; + /** + * Nodes used in the primary flow of code generation. + * + * @type {Object>} + */ + flowNodes: { + [x: string]: Node[]; + }; + /** + * Nodes code from `.flowNodes`. + * + * @type {Object} + */ + flowCode: { + [x: string]: string; + }; + /** + * This dictionary holds the node uniforms of the builder. + * The uniforms are maintained in an array for each shader stage. + * + * @type {Object} + */ + uniforms: Object; + /** + * This dictionary holds the output structs of the builder. + * The structs are maintained in an array for each shader stage. + * + * @type {Object} + */ + structs: Object; + /** + * This dictionary holds the types of the builder. + * + * @type {Object} + */ + types: Object; + /** + * This dictionary holds the bindings for each shader stage. + * + * @type {Object} + */ + bindings: Object; + /** + * This dictionary maintains the binding indices per bind group. + * + * @type {Object} + */ + bindingsIndexes: Object; + /** + * Reference to the array of bind groups. + * + * @type {?Array} + */ + bindGroups: Array | null; + /** + * This array holds the node attributes of this builder + * created via {@link AttributeNode}. + * + * @type {Array} + */ + attributes: Array; + /** + * This array holds the node attributes of this builder + * created via {@link BufferAttributeNode}. + * + * @type {Array} + */ + bufferAttributes: Array; + /** + * This array holds the node varyings of this builder. + * + * @type {Array} + */ + varyings: Array; + /** + * This dictionary holds the (native) node codes of this builder. + * The codes are maintained in an array for each shader stage. + * + * @type {Object>} + */ + codes: { + [x: string]: NodeCode[]; + }; + /** + * This dictionary holds the node variables of this builder. + * The variables are maintained in an array for each shader stage. + * This dictionary is also used to count the number of variables + * according to their type (const, vars). + * + * @type {Object|number>} + */ + vars: { + [x: string]: number | NodeVar[]; + }; + /** + * This dictionary holds the declarations for each shader stage. + * + * @type {Object} + */ + declarations: Object; + /** + * Current code flow. + * All code generated in this stack will be stored in `.flow`. + * + * @type {{code: string}} + */ + flow: { + code: string; + }; + /** + * A chain of nodes. + * Used to check recursive calls in node-graph. + * + * @type {Array} + */ + chaining: Array; + /** + * The current stack. + * This reflects the current process in the code block hierarchy, + * it is useful to know if the current process is inside a conditional for example. + * + * @type {StackNode} + */ + stack: StackNode; + /** + * List of stack nodes. + * The current stack hierarchy is stored in an array. + * + * @type {Array} + */ + stacks: Array; + /** + * A tab value. Used for shader string generation. + * + * @type {string} + * @default '\t' + */ + tab: string; + /** + * Reference to the current function node. + * + * @type {?FunctionNode} + * @default null + */ + currentFunctionNode: FunctionNode | null; + /** + * The builder's context. + * + * @type {Object} + */ + context: Object; + /** + * The builder's cache. + * + * @type {NodeCache} + */ + cache: NodeCache; + /** + * Since the {@link NodeBuilder#cache} might be temporarily + * overwritten by other caches, this member retains the reference + * to the builder's own cache. + * + * @type {NodeCache} + * @default this.cache + */ + globalCache: NodeCache; + flowsData: WeakMap; + /** + * The current shader stage. + * + * @type {?('vertex'|'fragment'|'compute'|'any')} + */ + shaderStage: ("vertex" | "fragment" | "compute" | "any") | null; + /** + * The current build stage. + * + * @type {?('setup'|'analyze'|'generate')} + */ + buildStage: ("setup" | "analyze" | "generate") | null; + /** + * The sub-build layers. + * + * @type {Array} + * @default [] + */ + subBuildLayers: Array; + /** + * The active stack nodes. + * + * @type {Array} + */ + activeStacks: Array; + /** + * The current sub-build TSL function(Fn). + * + * @type {?string} + * @default null + */ + subBuildFn: string | null; + /** + * The current TSL function(Fn) call node. + * + * @type {?Node} + * @default null + */ + fnCall: Node | null; + /** + * Whether the material is using flat shading or not. + * + * @returns {boolean} Whether the material is using flat shading or not. + */ + isFlatShading(): boolean; + /** + * Whether the material is opaque or not. + * + * @return {boolean} Whether the material is opaque or not. + */ + isOpaque(): boolean; + /** + * Factory method for creating an instance of {@link RenderTarget} with the given + * dimensions and options. + * + * @param {number} width - The width of the render target. + * @param {number} height - The height of the render target. + * @param {Object} options - The options of the render target. + * @return {RenderTarget} The render target. + */ + createRenderTarget(width: number, height: number, options: Object): RenderTarget; + /** + * Factory method for creating an instance of {@link CubeRenderTarget} with the given + * dimensions and options. + * + * @param {number} size - The size of the cube render target. + * @param {Object} options - The options of the cube render target. + * @return {CubeRenderTarget} The cube render target. + */ + createCubeRenderTarget(size: number, options: Object): CubeRenderTarget; + /** + * Whether the given node is included in the internal array of nodes or not. + * + * @param {Node} node - The node to test. + * @return {boolean} Whether the given node is included in the internal array of nodes or not. + */ + includes(node: Node): boolean; + /** + * Returns the type of the color output based on the renderer's render target. + * + * @param {number} [index=0] - The index of the render target texture. + * @return {string} The type. + */ + getOutputType(index?: number): string; + /** + * Returns the output struct name which is required by + * {@link OutputStructNode}. + * + * @abstract + * @return {string} The name of the output struct. + */ + getOutputStructName(): string; + /** + * Returns a bind group for the given group name and binding. + * + * @private + * @param {string} groupName - The group name. + * @param {Array} bindings - List of bindings. + * @return {BindGroup} The bind group + */ + private _getBindGroup; + /** + * Returns an array of node uniform groups for the given group name and shader stage. + * + * @param {string} groupName - The group name. + * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. + * @return {Array} The array of node uniform groups. + */ + getBindGroupArray(groupName: string, shaderStage: ("vertex" | "fragment" | "compute" | "any")): Array; + /** + * Returns a list bindings of all shader stages separated by groups. + * + * @return {Array} The list of bindings. + */ + getBindings(): Array; + /** + * Sorts the bind groups and updates {@link NodeBuilder#bindingsIndexes}. + */ + sortBindingGroups(): void; + /** + * The builder maintains each node in a hash-based dictionary. + * This method sets the given node (value) with the given hash (key) into this dictionary. + * + * @param {Node} node - The node to add. + * @param {number} hash - The hash of the node. + */ + setHashNode(node: Node, hash: number): void; + /** + * Adds a node to this builder. + * + * @param {Node} node - The node to add. + */ + addNode(node: Node): void; + /** + * It is used to add Nodes that will be used as FRAME and RENDER events, + * and need to follow a certain sequence in the calls to work correctly. + * This function should be called after 'setup()' in the 'build()' process to ensure that the child nodes are processed first. + * + * @param {Node} node - The node to add. + */ + addSequentialNode(node: Node): void; + /** + * Checks the update types of nodes + */ + buildUpdateNodes(): void; + /** + * A reference the current node which is the + * last node in the chain of nodes. + * + * @type {Node} + */ + get currentNode(): Node; + /** + * Whether the given texture is filtered or not. + * + * @param {Texture} texture - The texture to check. + * @return {boolean} Whether the given texture is filtered or not. + */ + isFilteredTexture(texture: Texture): boolean; + /** + * Returns the maximum number of bytes available for uniform buffers. + * + * @return {number} The maximum number of bytes available for uniform buffers. + */ + getUniformBufferLimit(): number; + /** + * Adds the given node to the internal node chain. + * This is used to check recursive calls in node-graph. + * + * @param {Node} node - The node to add. + */ + addChain(node: Node): void; + /** + * Removes the given node from the internal node chain. + * + * @param {Node} node - The node to remove. + */ + removeChain(node: Node): void; + /** + * Returns the native shader method name for a given generic name. E.g. + * the method name `textureDimensions` matches the WGSL name but must be + * resolved to `textureSize` in GLSL. + * + * @abstract + * @param {string} method - The method name to resolve. + * @return {string} The resolved method name. + */ + getMethod(method: string): string; + /** + * Returns the native snippet for a ternary operation. E.g. GLSL would output + * a ternary op as `cond ? x : y` whereas WGSL would output it as `select(y, x, cond)` + * + * @abstract + * @param {string} condSnippet - The condition determining which expression gets resolved. + * @param {string} ifSnippet - The expression to resolve to if the condition is true. + * @param {string} elseSnippet - The expression to resolve to if the condition is false. + * @return {string} The resolved method name. + */ + getTernary(): string; + /** + * Returns a node for the given hash, see {@link NodeBuilder#setHashNode}. + * + * @param {number} hash - The hash of the node. + * @return {Node} The found node. + */ + getNodeFromHash(hash: number): Node; + /** + * Adds the Node to a target flow so that it can generate code in the 'generate' process. + * + * @param {('vertex'|'fragment'|'compute')} shaderStage - The shader stage. + * @param {Node} node - The node to add. + * @return {Node} The node. + */ + addFlow(shaderStage: ("vertex" | "fragment" | "compute"), node: Node): Node; + /** + * Sets builder's context. + * + * @param {Object} context - The context to set. + */ + setContext(context: Object): void; + /** + * Returns the builder's current context. + * + * @return {Object} The builder's current context. + */ + getContext(): Object; + /** + * Adds context data to the builder's current context. + * + * @param {Object} context - The context to add. + * @return {Object} The previous context. + */ + addContext(context: Object): Object; + /** + * Gets a context used in shader construction that can be shared across different materials. + * This is necessary since the renderer cache can reuse shaders generated in one material and use them in another. + * + * @return {Object} The builder's current context without material. + */ + getSharedContext(): Object; + /** + * Sets builder's cache. + * + * @param {NodeCache} cache - The cache to set. + */ + setCache(cache: NodeCache): void; + /** + * Returns the builder's current cache. + * + * @return {NodeCache} The builder's current cache. + */ + getCache(): NodeCache; + /** + * Returns a cache for the given node. + * + * @param {Node} node - The node. + * @param {boolean} [parent=true] - Whether this node refers to a shared parent cache or not. + * @return {NodeCache} The cache. + */ + getCacheFromNode(node: Node, parent?: boolean): NodeCache; + /** + * Whether the requested feature is available or not. + * + * @abstract + * @param {string} name - The requested feature. + * @return {boolean} Whether the requested feature is supported or not. + */ + isAvailable(): boolean; + /** + * Returns the vertexIndex input variable as a native shader string. + * + * @abstract + * @return {string} The instanceIndex shader string. + */ + getVertexIndex(): string; + /** + * Contextually returns either the vertex stage instance index builtin + * or the linearized index of an compute invocation within a grid of workgroups. + * + * @abstract + * @return {string} The instanceIndex shader string. + */ + getInstanceIndex(): string; + /** + * Returns the drawIndex input variable as a native shader string. + * Only relevant for WebGL and its `WEBGL_multi_draw` extension. + * + * @abstract + * @return {?string} The drawIndex shader string. + */ + getDrawIndex(): string | null; + /** + * Returns the frontFacing input variable as a native shader string. + * + * @abstract + * @return {string} The frontFacing shader string. + */ + getFrontFacing(): string; + /** + * Returns the fragCoord input variable as a native shader string. + * + * @abstract + * @return {string} The fragCoord shader string. + */ + getFragCoord(): string; + /** + * Whether to flip texture data along its vertical axis or not. WebGL needs + * this method evaluate to `true`, WebGPU to `false`. + * + * @abstract + * @return {boolean} Whether to flip texture data along its vertical axis or not. + */ + isFlipY(): boolean; + /** + * Calling this method increases the usage count for the given node by one. + * + * @param {Node} node - The node to increase the usage count for. + * @return {number} The updated usage count. + */ + increaseUsage(node: Node): number; + /** + * Generates a texture sample shader string for the given texture data. + * + * @abstract + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The texture property name. + * @param {string} uvSnippet - Snippet defining the texture coordinates. + * @return {string} The generated shader string. + */ + generateTexture(): string; + /** + * Generates a texture LOD shader string for the given texture data. + * + * @abstract + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The texture property name. + * @param {string} uvSnippet - Snippet defining the texture coordinates. + * @param {?string} depthSnippet - Snippet defining the 0-based texture array index to sample. + * @param {string} levelSnippet - Snippet defining the mip level. + * @return {string} The generated shader string. + */ + generateTextureLod(): string; + /** + * Generates the array declaration string. + * + * @param {string} type - The type. + * @param {?number} [count] - The count. + * @return {string} The generated value as a shader string. + */ + generateArrayDeclaration(type: string, count?: number | null): string; + /** + * Generates the array shader string for the given type and value. + * + * @param {string} type - The type. + * @param {?number} [count] - The count. + * @param {?Array} [values=null] - The default values. + * @return {string} The generated value as a shader string. + */ + generateArray(type: string, count?: number | null, values?: Array | null): string; + /** + * Generates the struct shader string. + * + * @param {string} type - The type. + * @param {Array} [membersLayout] - The count. + * @param {?Array} [values=null] - The default values. + * @return {string} The generated value as a shader string. + */ + generateStruct(type: string, membersLayout?: Array, values?: Array | null): string; + /** + * Generates the shader string for the given type and value. + * + * @param {string} type - The type. + * @param {?any} [value=null] - The value. + * @return {string} The generated value as a shader string. + */ + generateConst(type: string, value?: any | null): string; + /** + * It might be necessary to convert certain data types to different ones + * so this method can be used to hide the conversion. + * + * @param {string} type - The type. + * @return {string} The updated type. + */ + getType(type: string): string; + /** + * Whether the given attribute name is defined in the geometry or not. + * + * @param {string} name - The attribute name. + * @return {boolean} Whether the given attribute name is defined in the geometry. + */ + hasGeometryAttribute(name: string): boolean; + /** + * Returns a node attribute for the given name and type. + * + * @param {string} name - The attribute's name. + * @param {string} type - The attribute's type. + * @return {NodeAttribute} The node attribute. + */ + getAttribute(name: string, type: string): NodeAttribute; + /** + * Returns for the given node and shader stage the property name for the shader. + * + * @param {Node} node - The node. + * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. + * @return {string} The property name. + */ + getPropertyName(node: Node): string; + /** + * Whether the given type is a vector type or not. + * + * @param {string} type - The type to check. + * @return {boolean} Whether the given type is a vector type or not. + */ + isVector(type: string): boolean; + /** + * Whether the given type is a matrix type or not. + * + * @param {string} type - The type to check. + * @return {boolean} Whether the given type is a matrix type or not. + */ + isMatrix(type: string): boolean; + /** + * Whether the given type is a reference type or not. + * + * @param {string} type - The type to check. + * @return {boolean} Whether the given type is a reference type or not. + */ + isReference(type: string): boolean; + /** + * Checks if the given texture requires a manual conversion to the working color space. + * + * @abstract + * @param {Texture} texture - The texture to check. + * @return {boolean} Whether the given texture requires a conversion to working color space or not. + */ + needsToWorkingColorSpace(): boolean; + /** + * Returns the component type of a given texture. + * + * @param {Texture} texture - The texture. + * @return {string} The component type. + */ + getComponentTypeFromTexture(texture: Texture): string; + /** + * Returns the element type for a given type. + * + * @param {string} type - The type. + * @return {string} The element type. + */ + getElementType(type: string): string; + /** + * Returns the component type for a given type. + * + * @param {string} type - The type. + * @return {string} The component type. + */ + getComponentType(type: string): string; + /** + * Returns the vector type for a given type. + * + * @param {string} type - The type. + * @return {string} The vector type. + */ + getVectorType(type: string): string; + /** + * Returns the data type for the given the length and component type. + * + * @param {number} length - The length. + * @param {string} [componentType='float'] - The component type. + * @return {string} The type. + */ + getTypeFromLength(length: number, componentType?: string): string; + /** + * Returns the type for a given typed array. + * + * @param {TypedArray} array - The typed array. + * @return {string} The type. + */ + getTypeFromArray(array: TypedArray): string; + /** + * Returns the type is an integer type. + * + * @param {string} type - The type. + * @return {boolean} Whether the type is an integer type or not. + */ + isInteger(type: string): boolean; + /** + * Returns the type for a given buffer attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + * @return {string} The type. + */ + getTypeFromAttribute(attribute: BufferAttribute): string; + /** + * Returns the length for the given data type. + * + * @param {string} type - The data type. + * @return {number} The length. + */ + getTypeLength(type: string): number; + /** + * Returns the vector type for a given matrix type. + * + * @param {string} type - The matrix type. + * @return {string} The vector type. + */ + getVectorFromMatrix(type: string): string; + /** + * For a given type this method changes the component type to the + * given value. E.g. `vec4` should be changed to the new component type + * `uint` which results in `uvec4`. + * + * @param {string} type - The type. + * @param {string} newComponentType - The new component type. + * @return {string} The new type. + */ + changeComponentType(type: string, newComponentType: string): string; + /** + * Returns the integer type pendant for the given type. + * + * @param {string} type - The type. + * @return {string} The integer type. + */ + getIntegerType(type: string): string; + /** + * Adds an active stack to the internal stack. + * + * @param {StackNode} stack - The stack node to add. + */ + setActiveStack(stack: StackNode): void; + /** + * Removes the active stack from the internal stack. + * + * @param {StackNode} stack - The stack node to remove. + */ + removeActiveStack(stack: StackNode): void; + /** + * Returns the active stack. + * + * @return {StackNode} The active stack. + */ + getActiveStack(): StackNode; + /** + * Returns the base stack. + * + * @return {StackNode} The base stack. + */ + getBaseStack(): StackNode; + /** + * Adds a stack node to the internal stack. + * + * @return {StackNode} The added stack node. + */ + addStack(): StackNode; + /** + * Removes the last stack node from the internal stack. + * + * @return {StackNode} The removed stack node. + */ + removeStack(): StackNode; + /** + * The builder maintains (cached) data for each node during the building process. This method + * can be used to get these data for a specific shader stage and cache. + * + * @param {Node} node - The node to get the data for. + * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. + * @param {?NodeCache} cache - An optional cache. + * @return {Object} The node data. + */ + getDataFromNode(node: Node, shaderStage?: ("vertex" | "fragment" | "compute" | "any"), cache?: NodeCache | null): Object; + /** + * Returns the properties for the given node and shader stage. + * + * Properties are typically used within a build stage to reference a node's + * child node or nodes manually assigned to the properties in a separate build stage. + * A typical usage pattern for defining nodes manually would be assigning dependency nodes + * to the current node's properties in the setup stage and building those properties in the generate stage. + * + * @param {Node} node - The node to get the properties for. + * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage='any'] - The shader stage. + * @return {Object} The node properties. + */ + getNodeProperties(node: Node, shaderStage?: ("vertex" | "fragment" | "compute" | "any")): Object; + /** + * Returns an instance of {@link NodeAttribute} for the given buffer attribute node. + * + * @param {BufferAttributeNode} node - The buffer attribute node. + * @param {string} type - The node type. + * @param {?string} [name=null] - The name of the buffer attribute. + * @return {NodeAttribute} The node attribute. + */ + getBufferAttributeFromNode(node: BufferAttributeNode, type: string, name?: string | null): NodeAttribute; + /** + * Returns an instance of {@link StructType} for the given struct name and shader stage + * or null if not found. + * + * @param {string} name - The name of the struct. + * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. + * @return {?StructType} The struct type or null if not found. + */ + getStructTypeNode(name: string, shaderStage?: ("vertex" | "fragment" | "compute" | "any")): StructType | null; + /** + * Returns an instance of {@link StructType} for the given output struct node. + * + * @param {OutputStructNode} node - The output struct node. + * @param {Array} membersLayout - The output struct types. + * @param {?string} [name=null] - The name of the struct. + * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. + * @return {StructType} The struct type attribute. + */ + getStructTypeFromNode(node: OutputStructNode, membersLayout: Array, name?: string | null, shaderStage?: ("vertex" | "fragment" | "compute" | "any")): StructType; + /** + * Returns an instance of {@link StructType} for the given output struct node. + * + * @param {OutputStructNode} node - The output struct node. + * @param {Array} membersLayout - The output struct types. + * @return {StructType} The struct type attribute. + */ + getOutputStructTypeFromNode(node: OutputStructNode, membersLayout: Array): StructType; + /** + * Returns an instance of {@link NodeUniform} for the given uniform node. + * + * @param {UniformNode} node - The uniform node. + * @param {string} type - The uniform type. + * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. + * @param {?string} name - The name of the uniform. + * @return {NodeUniform} The node uniform. + */ + getUniformFromNode(node: UniformNode, type: string, shaderStage?: ("vertex" | "fragment" | "compute" | "any"), name?: string | null): NodeUniform; + /** + * Returns an instance of {@link NodeVar} for the given variable node. + * + * @param {VarNode} node - The variable node. + * @param {?string} name - The variable's name. + * @param {string} [type=node.getNodeType( this )] - The variable's type. + * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. + * @param {boolean} [readOnly=false] - Whether the variable is read-only or not. + * + * @return {NodeVar} The node variable. + */ + getVarFromNode(node: VarNode, name?: string | null, type?: string, shaderStage?: ("vertex" | "fragment" | "compute" | "any"), readOnly?: boolean): NodeVar; + /** + * Returns whether a Node or its flow is deterministic, useful for use in `const`. + * + * @param {Node} node - The varying node. + * @return {boolean} Returns true if deterministic. + */ + isDeterministic(node: Node): boolean; + /** + * Returns an instance of {@link NodeVarying} for the given varying node. + * + * @param {(VaryingNode|PropertyNode)} node - The varying node. + * @param {?string} name - The varying's name. + * @param {string} [type=node.getNodeType( this )] - The varying's type. + * @param {?string} interpolationType - The interpolation type of the varying. + * @param {?string} interpolationSampling - The interpolation sampling type of the varying. + * @return {NodeVar} The node varying. + */ + getVaryingFromNode(node: (VaryingNode | PropertyNode), name?: string | null, type?: string, interpolationType?: string | null, interpolationSampling?: string | null): NodeVar; + /** + * Registers a node declaration in the current shader stage. + * + * @param {Object} node - The node to be registered. + */ + registerDeclaration(node: Object): void; + /** + * Returns an instance of {@link NodeCode} for the given code node. + * + * @param {CodeNode} node - The code node. + * @param {string} type - The node type. + * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. + * @return {NodeCode} The node code. + */ + getCodeFromNode(node: CodeNode, type: string, shaderStage?: ("vertex" | "fragment" | "compute" | "any")): NodeCode; + /** + * Adds a code flow based on the code-block hierarchy. + + * This is used so that code-blocks like If,Else create their variables locally if the Node + * is only used inside one of these conditionals in the current shader stage. + * + * @param {Node} node - The node to add. + * @param {Node} nodeBlock - Node-based code-block. Usually 'ConditionalNode'. + */ + addFlowCodeHierarchy(node: Node, nodeBlock: Node): void; + /** + * Add a inline-code to the current flow code-block. + * + * @param {Node} node - The node to add. + * @param {string} code - The code to add. + * @param {Node} nodeBlock - Current ConditionalNode + */ + addLineFlowCodeBlock(node: Node, code: string, nodeBlock: Node): void; + /** + * Add a inline-code to the current flow. + * + * @param {string} code - The code to add. + * @param {?Node} [node= null] - Optional Node, can help the system understand if the Node is part of a code-block. + * @return {NodeBuilder} A reference to this node builder. + */ + addLineFlowCode(code: string, node?: Node | null): NodeBuilder; + /** + * Adds a code to the current code flow. + * + * @param {string} code - Shader code. + * @return {NodeBuilder} A reference to this node builder. + */ + addFlowCode(code: string): NodeBuilder; + /** + * Add tab in the code that will be generated so that other snippets respect the current tabulation. + * Typically used in codes with If,Else. + * + * @return {NodeBuilder} A reference to this node builder. + */ + addFlowTab(): NodeBuilder; + /** + * Removes a tab. + * + * @return {NodeBuilder} A reference to this node builder. + */ + removeFlowTab(): NodeBuilder; + /** + * Gets the current flow data based on a Node. + * + * @param {Node} node - Node that the flow was started. + * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. + * @return {Object} The flow data. + */ + getFlowData(node: Node): Object; + /** + * Executes the node flow based on a root node to generate the final shader code. + * + * @param {Node} node - The node to execute. + * @return {Object} The code flow. + */ + flowNode(node: Node): Object; + /** + * Includes a node in the current function node. + * + * @param {Node} node - The node to include. + * @returns {void} + */ + addInclude(node: Node): void; + /** + * Returns the native shader operator name for a given generic name. + * It is a similar type of method like {@link NodeBuilder#getMethod}. + * + * @param {ShaderNodeInternal} shaderNode - The shader node to build the function node with. + * @return {FunctionNode} The build function node. + */ + buildFunctionNode(shaderNode: ShaderNodeInternal): FunctionNode; + /** + * Generates a code flow based on a TSL function: Fn(). + * + * @param {ShaderNodeInternal} shaderNode - A function code will be generated based on the input. + * @return {Object} + */ + flowShaderNode(shaderNode: ShaderNodeInternal): Object; + /** + * Executes the node in a specific build stage. + * + * This function can be used to arbitrarily execute the specified build stage + * outside of the standard build process. For instance, if a node's type depends + * on properties created by the 'setup' stage, then flowBuildStage(node, 'setup') + * can be used to execute the setup build stage and access its generated nodes + * before the standard build process begins. + * + * @param {Node} node - The node to execute. + * @param {string} buildStage - The build stage to execute the node in. + * @param {?(Node|string)} [output=null] - Expected output type. For example 'vec3'. + * @return {?(Node|string)} The result of the node build. + */ + flowBuildStage(node: Node, buildStage: string, output?: (Node | string) | null): (Node | string) | null; + /** + * Runs the node flow through all the steps of creation, 'setup', 'analyze', 'generate'. + * + * @param {Node} node - The node to execute. + * @param {?string} output - Expected output type. For example 'vec3'. + * @return {Object} + */ + flowStagesNode(node: Node, output?: string | null): Object; + /** + * Returns the native shader operator name for a given generic name. + * It is a similar type of method like {@link NodeBuilder#getMethod}. + * + * @abstract + * @param {string} op - The operator name to resolve. + * @return {?string} The resolved operator name. + */ + getFunctionOperator(): string | null; + /** + * Builds the given shader node. + * + * @abstract + * @param {ShaderNodeInternal} shaderNode - The shader node. + * @return {string} The function code. + */ + buildFunctionCode(): string; + /** + * Generates a code flow based on a child Node. + * + * @param {Node} node - The node to execute. + * @param {?string} output - Expected output type. For example 'vec3'. + * @return {Object} The code flow. + */ + flowChildNode(node: Node, output?: string | null): Object; + /** + * Executes a flow of code in a different stage. + * + * Some nodes like `varying()` have the ability to compute code in vertex-stage and + * return the value in fragment-stage even if it is being executed in an input fragment. + * + * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. + * @param {Node} node - The node to execute. + * @param {?string} output - Expected output type. For example 'vec3'. + * @param {?string} propertyName - The property name to assign the result. + * @return {?(Object|Node)} The code flow or node.build() result. + */ + flowNodeFromShaderStage(shaderStage: ("vertex" | "fragment" | "compute" | "any"), node: Node, output?: string | null, propertyName?: string | null): (Object | Node) | null; + /** + * Returns an array holding all node attributes of this node builder. + * + * @return {Array} The node attributes of this builder. + */ + getAttributesArray(): Array; + /** + * Returns the attribute definitions as a shader string for the given shader stage. + * + * @abstract + * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. + * @return {string} The attribute code section. + */ + getAttributes(): string; + /** + * Returns the varying definitions as a shader string for the given shader stage. + * + * @abstract + * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. + * @return {string} The varying code section. + */ + getVaryings(): string; + /** + * Returns a single variable definition as a shader string for the given variable type and name. + * + * @param {string} type - The variable's type. + * @param {string} name - The variable's name. + * @param {?number} [count=null] - The array length. + * @return {string} The shader string. + */ + getVar(type: string, name: string, count?: number | null): string; + /** + * Returns the variable definitions as a shader string for the given shader stage. + * + * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. + * @param {boolean} [global=false] - Whether the variables are global. + * @return {string} The variable code section. + */ + getVars(shaderStage: ("vertex" | "fragment" | "compute" | "any"), global?: boolean): string; + /** + * Returns the uniform definitions as a shader string for the given shader stage. + * + * @abstract + * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. + * @return {string} The uniform code section. + */ + getUniforms(): string; + /** + * Returns the native code definitions as a shader string for the given shader stage. + * + * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. + * @return {string} The native code section. + */ + getCodes(shaderStage: ("vertex" | "fragment" | "compute" | "any")): string; + /** + * Returns the hash of this node builder. + * + * @return {string} The hash. + */ + getHash(): string; + /** + * Sets the current shader stage. + * + * @param {?('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage to set. + */ + setShaderStage(shaderStage: ("vertex" | "fragment" | "compute" | "any") | null): void; + /** + * Returns the current shader stage. + * + * @return {?('vertex'|'fragment'|'compute'|'any')} The current shader stage. + */ + getShaderStage(): ("vertex" | "fragment" | "compute" | "any") | null; + /** + * Sets the current build stage. + * + * @param {?('setup'|'analyze'|'generate')} buildStage - The build stage to set. + */ + setBuildStage(buildStage: ("setup" | "analyze" | "generate") | null): void; + /** + * Returns the current build stage. + * + * @return {?('setup'|'analyze'|'generate')} The current build stage. + */ + getBuildStage(): ("setup" | "analyze" | "generate") | null; + /** + * Controls the code build of the shader stages. + * + * @abstract + */ + buildCode(): void; + /** + * Returns the current sub-build layer. + * + * @return {SubBuildNode} The current sub-build layers. + */ + get subBuild(): SubBuildNode; + /** + * Adds a sub-build layer to the node builder. + * + * @param {SubBuildNode} subBuild - The sub-build layer to add. + */ + addSubBuild(subBuild: SubBuildNode): void; + /** + * Removes the last sub-build layer from the node builder. + * + * @return {SubBuildNode} The removed sub-build layer. + */ + removeSubBuild(): SubBuildNode; + /** + * Returns the closest sub-build layer for the given data. + * + * @param {Node|Set|Array} data - The data to get the closest sub-build layer from. + * @return {?string} The closest sub-build name or null if none found. + */ + getClosestSubBuild(data: Node | Set | Array): string | null; + /** + * Returns the output node of a sub-build layer. + * + * @param {Node} node - The node to get the output from. + * @return {string} The output node name. + */ + getSubBuildOutput(node: Node): string; + /** + * Returns the sub-build property name for the given property and node. + * + * @param {string} [property=''] - The property name. + * @param {?Node} [node=null] - The node to get the sub-build from. + * @return {string} The sub-build property name. + */ + getSubBuildProperty(property?: string, node?: Node | null): string; + /** + * Prebuild the node builder. + */ + prebuild(): void; + /** + * Central build method which controls the build for the given object. + * + * @return {NodeBuilder} A reference to this node builder. + */ + build(): NodeBuilder; + /** + * Async version of build() that yields to main thread between shader stages. + * Use this in compileAsync() to prevent blocking the main thread. + * + * @return {Promise} A promise that resolves to this node builder. + */ + buildAsync(): Promise; + /** + * Returns shared data object for the given node. + * + * @param {Node} node - The node to get shared data from. + * @return {Object} The shared data. + */ + getSharedDataFromNode(node: Node): Object; + /** + * Returns a uniform representation which is later used for UBO generation and rendering. + * + * @param {NodeUniform} uniformNode - The uniform node. + * @param {string} type - The requested type. + * @return {Uniform} The uniform. + */ + getNodeUniform(uniformNode: NodeUniform, type: string): Uniform; + /** + * Formats the given shader snippet from a given type into another one. E.g. + * this method might be used to convert a simple float string `"1.0"` into a + * `vec3` representation: `"vec3( 1.0 )"`. + * + * @param {string} snippet - The shader snippet. + * @param {string} fromType - The source type. + * @param {string} toType - The target type. + * @return {string} The updated shader string. + */ + format(snippet: string, fromType: string, toType: string): string; + /** + * Returns a signature with the engine's current revision. + * + * @return {string} The signature. + */ + getSignature(): string; + /** + * Returns `true` if data from the previous frame are required. Relevant + * when computing motion vectors with {@link VelocityNode}. + * + * @return {boolean} Whether data from the previous frame are required or not. + */ + needsPreviousData(): boolean; +} +import BindGroup from '../../renderers/common/BindGroup.js'; +import NodeAttribute from './NodeAttribute.js'; +import NodeVarying from './NodeVarying.js'; +import NodeCode from './NodeCode.js'; +import NodeVar from './NodeVar.js'; +import FunctionNode from '../code/FunctionNode.js'; +import NodeCache from './NodeCache.js'; +import { RenderTarget } from '../../core/RenderTarget.js'; +import CubeRenderTarget from '../../renderers/common/CubeRenderTarget.js'; +import StructType from './StructType.js'; +import NodeUniform from './NodeUniform.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeCache.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeCache.d.ts new file mode 100644 index 000000000..0c192004d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/NodeCache.d.ts @@ -0,0 +1,47 @@ +export default NodeCache; +/** + * This utility class is used in {@link NodeBuilder} as an internal + * cache data structure for node data. + */ +declare class NodeCache { + /** + * Constructs a new node cache. + * + * @param {?NodeCache} parent - A reference to a parent cache. + */ + constructor(parent?: NodeCache | null); + /** + * The id of the cache. + * + * @type {number} + * @readonly + */ + readonly id: number; + /** + * A weak map for managing node data. + * + * @type {WeakMap} + */ + nodesData: WeakMap; + /** + * Reference to a parent node cache. + * + * @type {?NodeCache} + * @default null + */ + parent: NodeCache | null; + /** + * Returns the data for the given node. + * + * @param {Node} node - The node. + * @return {?Object} The data for the node. + */ + getData(node: Node): Object | null; + /** + * Sets the data for a given node. + * + * @param {Node} node - The node. + * @param {Object} data - The data that should be cached. + */ + setData(node: Node, data: Object): void; +} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeCode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeCode.d.ts new file mode 100644 index 000000000..f96665f26 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/NodeCode.d.ts @@ -0,0 +1,36 @@ +export default NodeCode; +/** + * {@link NodeBuilder} is going to create instances of this class during the build process + * of nodes. They represent user-defined, native shader code portions that are going to be + * injected by the builder. A dictionary of node codes is maintained in {@link NodeBuilder#codes} + * for this purpose. + */ +declare class NodeCode { + /** + * Constructs a new code node. + * + * @param {string} name - The name of the code. + * @param {string} type - The node type. + * @param {string} [code=''] - The native shader code. + */ + constructor(name: string, type: string, code?: string); + /** + * The name of the code. + * + * @type {string} + */ + name: string; + /** + * The node type. + * + * @type {string} + */ + type: string; + /** + * The native shader code. + * + * @type {string} + * @default '' + */ + code: string; +} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeError.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeError.d.ts new file mode 100644 index 000000000..71d14d55f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/NodeError.d.ts @@ -0,0 +1,13 @@ +export default NodeError; +/** + * Custom error class for node-related errors, including stack trace information. + */ +declare class NodeError extends Error { + constructor(message: any, stackTrace?: null); + /** + * The stack trace associated with the error. + * + * @type {?StackTrace} + */ + stackTrace: StackTrace | null; +} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeFrame.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeFrame.d.ts new file mode 100644 index 000000000..afaee4fe4 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/NodeFrame.d.ts @@ -0,0 +1,133 @@ +export default NodeFrame; +/** + * Management class for updating nodes. The module tracks metrics like + * the elapsed time, delta time, the render and frame ID to correctly + * call the node update methods {@link Node#updateBefore}, {@link Node#update} + * and {@link Node#updateAfter} depending on the node's configuration. + */ +declare class NodeFrame { + /** + * The elapsed time in seconds. + * + * @type {number} + * @default 0 + */ + time: number; + /** + * The delta time in seconds. + * + * @type {number} + * @default 0 + */ + deltaTime: number; + /** + * The frame ID. + * + * @type {number} + * @default 0 + */ + frameId: number; + /** + * The render ID. + * + * @type {number} + * @default 0 + */ + renderId: number; + /** + * Used to control the {@link Node#update} call. + * + * @type {WeakMap} + */ + updateMap: WeakMap; + /** + * Used to control the {@link Node#updateBefore} call. + * + * @type {WeakMap} + */ + updateBeforeMap: WeakMap; + /** + * Used to control the {@link Node#updateAfter} call. + * + * @type {WeakMap} + */ + updateAfterMap: WeakMap; + /** + * A reference to the current renderer. + * + * @type {?Renderer} + * @default null + */ + renderer: Renderer | null; + /** + * A reference to the current material. + * + * @type {?Material} + * @default null + */ + material: Material | null; + /** + * A reference to the current camera. + * + * @type {?Camera} + * @default null + */ + camera: Camera | null; + /** + * A reference to the current 3D object. + * + * @type {?Object3D} + * @default null + */ + object: Object3D | null; + /** + * A reference to the current scene. + * + * @type {?Scene} + * @default null + */ + scene: Scene | null; + /** + * Returns a dictionary for a given node and update map which + * is used to correctly call node update methods per frame or render. + * + * @private + * @param {WeakMap} referenceMap - The reference weak map. + * @param {Node} nodeRef - The reference to the current node. + * @return {Object>} The dictionary. + */ + private _getMaps; + /** + * This method executes the {@link Node#updateBefore} for the given node. + * It makes sure {@link Node#updateBeforeType} is honored meaning the update + * is only executed once per frame, render or object depending on the update + * type. + * + * @param {Node} node - The node that should be updated. + */ + updateBeforeNode(node: Node): void; + /** + * This method executes the {@link Node#updateAfter} for the given node. + * It makes sure {@link Node#updateAfterType} is honored meaning the update + * is only executed once per frame, render or object depending on the update + * type. + * + * @param {Node} node - The node that should be updated. + */ + updateAfterNode(node: Node): void; + /** + * This method executes the {@link Node#update} for the given node. + * It makes sure {@link Node#updateType} is honored meaning the update + * is only executed once per frame, render or object depending on the update + * type. + * + * @param {Node} node - The node that should be updated. + */ + updateNode(node: Node): void; + /** + * Updates the internal state of the node frame. This method is + * called by the renderer in its internal animation loop. + */ + update(): void; + lastTime: number | undefined; +} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeFunction.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeFunction.d.ts new file mode 100644 index 000000000..ef2cdbc0a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/NodeFunction.d.ts @@ -0,0 +1,55 @@ +export default NodeFunction; +/** + * Base class for node functions. A derived module must be implemented + * for each supported native shader language. Similar to other `Node*` modules, + * this class is only relevant during the building process and not used + * in user-level code. + */ +declare class NodeFunction { + /** + * Constructs a new node function. + * + * @param {string} type - The node type. This type is the return type of the node function. + * @param {Array} inputs - The function's inputs. + * @param {string} [name=''] - The function's name. + * @param {string} [precision=''] - The precision qualifier. + */ + constructor(type: string, inputs: Array, name?: string, precision?: string); + /** + * The node type. This type is the return type of the node function. + * + * @type {string} + */ + type: string; + /** + * The function's inputs. + * + * @type {Array} + */ + inputs: Array; + /** + * The name of the uniform. + * + * @type {string} + * @default '' + */ + name: string; + /** + * The precision qualifier. + * + * @type {string} + * @default '' + */ + precision: string; + /** + * This method returns the native code of the node function. + * + * @abstract + * @param {string} name - The function's name. + * @return {string} A shader code. + */ + getCode(): string; +} +declare namespace NodeFunction { + let isNodeFunction: boolean; +} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeFunctionInput.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeFunctionInput.d.ts new file mode 100644 index 000000000..3df5a1b75 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/NodeFunctionInput.d.ts @@ -0,0 +1,52 @@ +export default NodeFunctionInput; +/** + * Describes the input of a {@link NodeFunction}. + */ +declare class NodeFunctionInput { + /** + * Constructs a new node function input. + * + * @param {string} type - The input type. + * @param {string} name - The input name. + * @param {?number} [count=null] - If the input is an Array, count will be the length. + * @param {('in'|'out'|'inout')} [qualifier=''] - The parameter qualifier (only relevant for GLSL). + * @param {boolean} [isConst=false] - Whether the input uses a const qualifier or not (only relevant for GLSL). + */ + constructor(type: string, name: string, count?: number | null, qualifier?: ("in" | "out" | "inout"), isConst?: boolean); + /** + * The input type. + * + * @type {string} + */ + type: string; + /** + * The input name. + * + * @type {string} + */ + name: string; + /** + * If the input is an Array, count will be the length. + * + * @type {?number} + * @default null + */ + count: number | null; + /** + *The parameter qualifier (only relevant for GLSL). + * + * @type {('in'|'out'|'inout')} + * @default '' + */ + qualifier: ("in" | "out" | "inout"); + /** + * Whether the input uses a const qualifier or not (only relevant for GLSL). + * + * @type {boolean} + * @default false + */ + isConst: boolean; +} +declare namespace NodeFunctionInput { + let isNodeFunctionInput: boolean; +} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeParser.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeParser.d.ts new file mode 100644 index 000000000..f15875899 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/NodeParser.d.ts @@ -0,0 +1,15 @@ +export default NodeParser; +/** + * Base class for node parsers. A derived parser must be implemented + * for each supported native shader language. + */ +declare class NodeParser { + /** + * The method parses the given native code an returns a node function. + * + * @abstract + * @param {string} source - The native shader code. + * @return {NodeFunction} A node function. + */ + parseFunction(): NodeFunction; +} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeUniform.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeUniform.d.ts new file mode 100644 index 000000000..3f872f033 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/NodeUniform.d.ts @@ -0,0 +1,62 @@ +export default NodeUniform; +/** + * {@link NodeBuilder} is going to create instances of this class during the build process + * of nodes. They represent the final shader uniforms that are going to be generated + * by the builder. A dictionary of node uniforms is maintained in {@link NodeBuilder#uniforms} + * for this purpose. + */ +declare class NodeUniform { + /** + * Constructs a new node uniform. + * + * @param {string} name - The name of the uniform. + * @param {string} type - The type of the uniform. + * @param {UniformNode} node - An reference to the node. + */ + constructor(name: string, type: string, node: UniformNode); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isNodeUniform: boolean; + /** + * The name of the uniform. + * + * @type {string} + */ + name: string; + /** + * The type of the uniform. + * + * @type {string} + */ + type: string; + /** + * An reference to the node. + * + * @type {UniformNode} + */ + node: UniformNode; + set value(val: any); + /** + * The value of the uniform node. + * + * @type {any} + */ + get value(): any; + /** + * The id of the uniform node. + * + * @type {number} + */ + get id(): number; + /** + * The uniform node's group. + * + * @type {UniformGroupNode} + */ + get groupNode(): UniformGroupNode; +} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeUtils.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeUtils.d.ts new file mode 100644 index 000000000..a5265224d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/NodeUtils.d.ts @@ -0,0 +1,93 @@ +/** + * Returns the data type for the given the length. + * + * @private + * @method + * @param {number} length - The length. + * @return {string} The data type. + */ +export function getTypeFromLength(length: number): string; +/** + * Returns the typed array for the given data type. + * + * @private + * @method + * @param {string} type - The data type. + * @return {TypedArray} The typed array. + */ +export function getTypedArrayFromType(type: string): TypedArray; +/** + * Returns the length for the given data type. + * + * @private + * @method + * @param {string} type - The data type. + * @return {number} The length. + */ +export function getLengthFromType(type: string): number; +/** + * Returns the gpu memory length for the given data type in 4-byte elements. + * + * @private + * @method + * @param {string} type - The data type. + * @return {number} The memory length in 4-byte elements. + */ +export function getMemoryLengthFromType(type: string): number; +/** + * Returns the alignment requirement for the given data type in 4-byte elements. + * + * @private + * @method + * @param {string} type - The data type. + * @return {number} The alignment requirement in 4-byte elements. + */ +export function getAlignmentFromType(type: string): number; +/** + * Returns the data type for the given value. + * + * @private + * @method + * @param {any} value - The value. + * @return {?string} The data type. + */ +export function getValueType(value: any): string | null; +/** + * Returns the value/object for the given data type and parameters. + * + * @private + * @method + * @param {string} type - The given type. + * @param {...any} params - A parameter list. + * @return {any} The value/object. + */ +export function getValueFromType(type: string, ...params: any[]): any; +/** + * Gets the object data that can be shared between different rendering steps. + * + * @private + * @param {Object} object - The object to get the data for. + * @return {Object} The object data. + */ +export function getDataFromObject(object: Object): Object; +/** + * Converts the given array buffer to a Base64 string. + * + * @private + * @method + * @param {ArrayBuffer} arrayBuffer - The array buffer. + * @return {string} The Base64 string. + */ +export function arrayBufferToBase64(arrayBuffer: ArrayBuffer): string; +/** + * Converts the given Base64 string to an array buffer. + * + * @private + * @method + * @param {string} base64 - The Base64 string. + * @return {ArrayBuffer} The array buffer. + */ +export function base64ToArrayBuffer(base64: string): ArrayBuffer; +export function hashString(str: string): number; +export function hashArray(array: Array): number; +export function hash(...params: number[]): number; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeVar.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeVar.d.ts new file mode 100644 index 000000000..43e82262f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/NodeVar.d.ts @@ -0,0 +1,50 @@ +export default NodeVar; +/** + * {@link NodeBuilder} is going to create instances of this class during the build process + * of nodes. They represent the final shader variables that are going to be generated + * by the builder. A dictionary of node variables is maintained in {@link NodeBuilder#vars} for + * this purpose. + */ +declare class NodeVar { + /** + * Constructs a new node variable. + * + * @param {string} name - The name of the variable. + * @param {string} type - The type of the variable. + * @param {boolean} [readOnly=false] - The read-only flag. + * @param {?number} [count=null] - The size. + */ + constructor(name: string, type: string, readOnly?: boolean, count?: number | null); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isNodeVar: boolean; + /** + * The name of the variable. + * + * @type {string} + */ + name: string; + /** + * The type of the variable. + * + * @type {string} + */ + type: string; + /** + * The read-only flag. + * + * @type {boolean} + */ + readOnly: boolean; + /** + * The size. + * + * @type {?number} + */ + count: number | null; +} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeVarying.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeVarying.d.ts new file mode 100644 index 000000000..587fb0896 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/NodeVarying.d.ts @@ -0,0 +1,51 @@ +export default NodeVarying; +/** + * {@link NodeBuilder} is going to create instances of this class during the build process + * of nodes. They represent the final shader varyings that are going to be generated + * by the builder. An array of node varyings is maintained in {@link NodeBuilder#varyings} for + * this purpose. + * + * @augments NodeVar + */ +declare class NodeVarying extends NodeVar { + /** + * Constructs a new node varying. + * + * @param {string} name - The name of the varying. + * @param {string} type - The type of the varying. + * @param {?string} interpolationType - The interpolation type of the varying. + * @param {?string} interpolationSampling - The interpolation sampling type of the varying. + */ + constructor(name: string, type: string, interpolationType?: string | null, interpolationSampling?: string | null); + /** + * Whether this varying requires interpolation or not. This property can be used + * to check if the varying can be optimized for a variable. + * + * @type {boolean} + * @default false + */ + needsInterpolation: boolean; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isNodeVarying: boolean; + /** + * The interpolation type of the varying data. + * + * @type {?string} + * @default null + */ + interpolationType: string | null; + /** + * The interpolation sampling type of varying data. + * + * @type {?string} + * @default null + */ + interpolationSampling: string | null; +} +import NodeVar from './NodeVar.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/OutputStructNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/OutputStructNode.d.ts new file mode 100644 index 000000000..ea5448089 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/OutputStructNode.d.ts @@ -0,0 +1,41 @@ +export default OutputStructNode; +/** + * TSL function for creating an output struct node. + * + * @tsl + * @function + * @param {...Node} members - A parameter list of nodes. + * @returns {OutputStructNode} + */ +export const outputStruct: any; +/** + * This node can be used to define multiple outputs in a shader programs. + * + * @augments Node + */ +declare class OutputStructNode extends Node { + /** + * Constructs a new output struct node. The constructor can be invoked with an + * arbitrary number of nodes representing the members. + * + * @param {...Node} members - A parameter list of nodes. + */ + constructor(...members: Node[]); + /** + * An array of nodes which defines the output. + * + * @type {Array} + */ + members: Array; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isOutputStructNode: boolean; + generateNodeType(): string; + generate(builder: any): any; +} +import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/ParameterNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/ParameterNode.d.ts new file mode 100644 index 000000000..6ab531096 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/ParameterNode.d.ts @@ -0,0 +1,35 @@ +export default ParameterNode; +export function parameter(type: string, name: string | null): ParameterNode; +/** + * Special version of {@link PropertyNode} which is used for parameters. + * + * @augments PropertyNode + */ +declare class ParameterNode extends PropertyNode { + /** + * Constructs a new parameter node. + * + * @param {string} nodeType - The type of the node. + * @param {?string} [name=null] - The name of the parameter in the shader. + */ + constructor(nodeType: string, name?: string | null); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isParameterNode: boolean; + /** + * Gets the type of a member variable in the parameter node. + * + * @param {NodeBuilder} builder - The node builder. + * @param {string} name - The name of the member variable. + * @returns {string} + */ + getMemberType(builder: NodeBuilder, name: string): string; + getHash(): string; + generate(): string; +} +import PropertyNode from './PropertyNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/PropertyNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/PropertyNode.d.ts new file mode 100644 index 000000000..b781c6217 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/PropertyNode.d.ts @@ -0,0 +1,254 @@ +export default PropertyNode; +export function property(type: string, name?: string | null): PropertyNode; +export function varyingProperty(type: string, name?: string | null): PropertyNode; +/** + * TSL object that represents the shader variable `DiffuseColor`. + * + * @tsl + * @type {PropertyNode} + */ +export const diffuseColor: PropertyNode; +/** + * TSL object that represents the shader variable `DiffuseContribution`. + * + * @tsl + * @type {PropertyNode} + */ +export const diffuseContribution: PropertyNode; +/** + * TSL object that represents the shader variable `EmissiveColor`. + * + * @tsl + * @type {PropertyNode} + */ +export const emissive: PropertyNode; +/** + * TSL object that represents the shader variable `Roughness`. + * + * @tsl + * @type {PropertyNode} + */ +export const roughness: PropertyNode; +/** + * TSL object that represents the shader variable `Metalness`. + * + * @tsl + * @type {PropertyNode} + */ +export const metalness: PropertyNode; +/** + * TSL object that represents the shader variable `Clearcoat`. + * + * @tsl + * @type {PropertyNode} + */ +export const clearcoat: PropertyNode; +/** + * TSL object that represents the shader variable `ClearcoatRoughness`. + * + * @tsl + * @type {PropertyNode} + */ +export const clearcoatRoughness: PropertyNode; +/** + * TSL object that represents the shader variable `Sheen`. + * + * @tsl + * @type {PropertyNode} + */ +export const sheen: PropertyNode; +/** + * TSL object that represents the shader variable `SheenRoughness`. + * + * @tsl + * @type {PropertyNode} + */ +export const sheenRoughness: PropertyNode; +/** + * TSL object that represents the shader variable `Iridescence`. + * + * @tsl + * @type {PropertyNode} + */ +export const iridescence: PropertyNode; +/** + * TSL object that represents the shader variable `IridescenceIOR`. + * + * @tsl + * @type {PropertyNode} + */ +export const iridescenceIOR: PropertyNode; +/** + * TSL object that represents the shader variable `IridescenceThickness`. + * + * @tsl + * @type {PropertyNode} + */ +export const iridescenceThickness: PropertyNode; +/** + * TSL object that represents the shader variable `AlphaT`. + * + * @tsl + * @type {PropertyNode} + */ +export const alphaT: PropertyNode; +/** + * TSL object that represents the shader variable `Anisotropy`. + * + * @tsl + * @type {PropertyNode} + */ +export const anisotropy: PropertyNode; +/** + * TSL object that represents the shader variable `AnisotropyT`. + * + * @tsl + * @type {PropertyNode} + */ +export const anisotropyT: PropertyNode; +/** + * TSL object that represents the shader variable `AnisotropyB`. + * + * @tsl + * @type {PropertyNode} + */ +export const anisotropyB: PropertyNode; +/** + * TSL object that represents the shader variable `SpecularColor`. + * + * @tsl + * @type {PropertyNode} + */ +export const specularColor: PropertyNode; +/** + * TSL object that represents the shader variable `SpecularColorBlended`. + * + * @tsl + * @type {PropertyNode} + */ +export const specularColorBlended: PropertyNode; +/** + * TSL object that represents the shader variable `SpecularF90`. + * + * @tsl + * @type {PropertyNode} + */ +export const specularF90: PropertyNode; +/** + * TSL object that represents the shader variable `Shininess`. + * + * @tsl + * @type {PropertyNode} + */ +export const shininess: PropertyNode; +/** + * TSL object that represents the shader variable `Output`. + * + * @tsl + * @type {PropertyNode} + */ +export const output: PropertyNode; +/** + * TSL object that represents the shader variable `dashSize`. + * + * @tsl + * @type {PropertyNode} + */ +export const dashSize: PropertyNode; +/** + * TSL object that represents the shader variable `gapSize`. + * + * @tsl + * @type {PropertyNode} + */ +export const gapSize: PropertyNode; +/** + * TSL object that represents the shader variable `pointWidth`. + * + * @tsl + * @type {PropertyNode} + */ +export const pointWidth: PropertyNode; +/** + * TSL object that represents the shader variable `IOR`. + * + * @tsl + * @type {PropertyNode} + */ +export const ior: PropertyNode; +/** + * TSL object that represents the shader variable `Transmission`. + * + * @tsl + * @type {PropertyNode} + */ +export const transmission: PropertyNode; +/** + * TSL object that represents the shader variable `Thickness`. + * + * @tsl + * @type {PropertyNode} + */ +export const thickness: PropertyNode; +/** + * TSL object that represents the shader variable `AttenuationDistance`. + * + * @tsl + * @type {PropertyNode} + */ +export const attenuationDistance: PropertyNode; +/** + * TSL object that represents the shader variable `AttenuationColor`. + * + * @tsl + * @type {PropertyNode} + */ +export const attenuationColor: PropertyNode; +/** + * TSL object that represents the shader variable `Dispersion`. + * + * @tsl + * @type {PropertyNode} + */ +export const dispersion: PropertyNode; +/** + * This class represents a shader property. It can be used + * to explicitly define a property and assign a value to it. + * + * ```js + * const threshold = property( 'float', 'threshold' ).assign( THRESHOLD ); + *``` + * `PropertyNode` is used by the engine to predefined common material properties + * for TSL code. + * + * @augments Node + */ +declare class PropertyNode extends Node { + /** + * Constructs a new property node. + * + * @param {string} nodeType - The type of the node. + * @param {?string} [name=null] - The name of the property in the shader. + * @param {boolean} [varying=false] - Whether this property is a varying or not. + */ + constructor(nodeType: string, name?: string | null, varying?: boolean); + /** + * Whether this property is a varying or not. + * + * @type {boolean} + * @default false + */ + varying: boolean; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isPropertyNode: boolean; + getNodeType(builder: any): any; + getHash(builder: any): string; + generate(builder: any): any; +} +import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/StackNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/StackNode.d.ts new file mode 100644 index 000000000..f15deeef5 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/StackNode.d.ts @@ -0,0 +1,151 @@ +export default StackNode; +/** + * TSL function for creating a stack node. + * + * @tsl + * @function + * @param {?StackNode} [parent=null] - The parent stack node. + * @returns {StackNode} + */ +export const stack: any; +/** + * Stack is a helper for Nodes that need to produce stack-based code instead of continuous flow. + * They are usually needed in cases like `If`, `Else`. + * + * @augments Node + */ +declare class StackNode extends Node { + /** + * Constructs a new stack node. + * + * @param {?StackNode} [parent=null] - The parent stack node. + */ + constructor(parent?: StackNode | null); + /** + * List of nodes. + * + * @type {Array} + */ + nodes: Array; + /** + * The output node. + * + * @type {?Node} + * @default null + */ + outputNode: Node | null; + /** + * The parent stack node. + * + * @type {?StackNode} + * @default null + */ + parent: StackNode | null; + /** + * The current conditional node. + * + * @private + * @type {ConditionalNode} + * @default null + */ + private _currentCond; + /** + * The expression node. Only + * relevant for Switch/Case. + * + * @private + * @type {Node} + * @default null + */ + private _expressionNode; + /** + * The current node being processed. + * + * @private + * @type {Node} + * @default null + */ + private _currentNode; + /** + * Stores additional data for nodes that are added to the stack. + * + * @private + * @type {Map} + */ + private _nodeDataLibrary; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStackNode: boolean; + getElementType(builder: any): string; + generateNodeType(builder: any): string; + getMemberType(builder: any, name: any): string; + /** + * Adds a node to this stack. + * + * @param {Node} node - The node to add. + * @param {number} [index=-1] - The index of the node. If not specified, the node will be added to the end of the stack. + * @return {StackNode} A reference to this stack node. + */ + addToStack(node: Node, index?: number): StackNode; + /** + * Adds a node to the stack before the current node. + * + * @param {Node} node - The node to add. + * @return {StackNode} A reference to this stack node. + */ + addToStackBefore(node: Node): StackNode; + /** + * Represent an `if` statement in TSL. + * + * @param {Node} boolNode - Represents the condition. + * @param {Function} method - TSL code which is executed if the condition evaluates to `true`. + * @return {StackNode} A reference to this stack node. + */ + If(boolNode: Node, method: Function): StackNode; + /** + * Represent an `elseif` statement in TSL. + * + * @param {Node} boolNode - Represents the condition. + * @param {Function} method - TSL code which is executed if the condition evaluates to `true`. + * @return {StackNode} A reference to this stack node. + */ + ElseIf(boolNode: Node, method: Function): StackNode; + /** + * Represent an `else` statement in TSL. + * + * @param {Function} method - TSL code which is executed in the `else` case. + * @return {StackNode} A reference to this stack node. + */ + Else(method: Function): StackNode; + /** + * Represents a `switch` statement in TSL. + * + * @param {any} expression - Represents the expression. + * @param {Function} method - TSL code which is executed if the condition evaluates to `true`. + * @return {StackNode} A reference to this stack node. + */ + Switch(expression: any): StackNode; + /** + * Represents a `case` statement in TSL. The TSL version accepts an arbitrary numbers of values. + * The last parameter must be the callback method that should be executed in the `true` case. + * + * @param {...any} params - The values of the `Case()` statement as well as the callback method. + * @return {StackNode} A reference to this stack node. + */ + Case(...params: any[]): StackNode; + /** + * Represents the default code block of a Switch/Case statement. + * + * @param {Function} method - TSL code which is executed in the `else` case. + * @return {StackNode} A reference to this stack node. + */ + Default(method: Function): StackNode; + setup(builder: any): any; + build(builder: any, ...params: any[]): string | Node | null | undefined; +} +import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/StackTrace.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/StackTrace.d.ts new file mode 100644 index 000000000..d870b1d2f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/StackTrace.d.ts @@ -0,0 +1,44 @@ +export default StackTrace; +/** + * Class representing a stack trace for debugging purposes. + */ +declare class StackTrace { + /** + * Creates a StackTrace instance by capturing and filtering the current stack trace. + * + * @param {Error|string|null} stackMessage - An optional stack trace to use instead of capturing a new one. + */ + constructor(stackMessage?: Error | string | null); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStackTrace: boolean; + /** + * The stack trace. + * + * @type {Array<{fn: string, file: string, line: number, column: number}>} + */ + stack: Array<{ + fn: string; + file: string; + line: number; + column: number; + }>; + /** + * Returns a formatted location string of the top stack frame. + * + * @returns {string} The formatted stack trace message. + */ + getLocation(): string; + /** + * Returns the full error message including the stack trace. + * + * @param {string} message - The error message. + * @returns {string} The full error message with stack trace. + */ + getError(message: string): string; +} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/StructNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/StructNode.d.ts new file mode 100644 index 000000000..0b9c6e2d8 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/StructNode.d.ts @@ -0,0 +1,33 @@ +export default StructNode; +export function struct(membersLayout: Object, name?: string | null): Function; +/** + * StructNode allows to create custom structures with multiple members. + * This can also be used to define structures in attribute and uniform data. + * + * ```js + * // Define a custom struct + * const BoundingBox = struct( { min: 'vec3', max: 'vec3' } ); + * + * // Create a new instance of the struct + * const bb = BoundingBox( vec3( 0 ), vec3( 1 ) ); // style 1 + * const bb = BoundingBox( { min: vec3( 0 ), max: vec3( 1 ) } ); // style 2 + * + * // Access the struct members + * const min = bb.get( 'min' ); + * + * // Assign a new value to a member + * min.assign( vec3() ); + * ``` + * @augments Node + */ +declare class StructNode extends Node { + constructor(structTypeNode: any, values: any); + structTypeNode: any; + values: any; + isStructNode: boolean; + generateNodeType(builder: any): any; + getMemberType(builder: any, name: any): any; + _getChildren(): Object[]; + generate(builder: any): any; +} +import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/StructType.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/StructType.d.ts new file mode 100644 index 000000000..af08042f6 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/StructType.d.ts @@ -0,0 +1,7 @@ +export default StructType; +declare class StructType { + constructor(name: any, members: any); + name: any; + members: any; + output: boolean; +} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/StructTypeNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/StructTypeNode.d.ts new file mode 100644 index 000000000..7fb5881df --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/StructTypeNode.d.ts @@ -0,0 +1,49 @@ +export default StructTypeNode; +/** + * Represents a struct type node in the node-based system. + * This class is used to define and manage the layout and types of struct members. + * It extends the base Node class and provides methods to get the length of the struct, + * retrieve member types, and generate the struct type for a builder. + * + * @augments Node + */ +declare class StructTypeNode extends Node { + /** + * Creates an instance of StructTypeNode. + * + * @param {Object} membersLayout - The layout of the members for the struct. + * @param {?string} [name=null] - The optional name of the struct. + */ + constructor(membersLayout: Object, name?: string | null); + /** + * The layout of the members for the struct + * + * @type {Array.<{name: string, type: string, atomic: boolean}>} + */ + membersLayout: Array<{ + name: string; + type: string; + atomic: boolean; + }>; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStructTypeNode: boolean; + /** + * Returns the length of the struct in 4-byte elements (e.g. float or int components). + * The length is calculated by summing the lengths of the struct's members, accounting for memory alignment. + * To get the size in bytes, multiply the returned value by 4. + * + * @returns {number} The length of the struct in 4-byte elements. + */ + getLength(): number; + getMemberType(builder: any, name: any): string; + generateNodeType(builder: any): any; + setup(builder: any): void; + generate(builder: any): string; +} +import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/SubBuildNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/SubBuildNode.d.ts new file mode 100644 index 000000000..a5227f1b6 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/SubBuildNode.d.ts @@ -0,0 +1,30 @@ +export default SubBuildNode; +export function subBuild(node: Node, name: string, type?: string | null): Node; +/** + * This node is used to build a sub-build in the node system. + * + * @augments Node + * @param {Node} node - The node to be built in the sub-build. + * @param {string} name - The name of the sub-build. + * @param {?string} [nodeType=null] - The type of the node, if known. + */ +declare class SubBuildNode extends Node { + constructor(node: any, name: any, nodeType?: null); + /** + * The node to be built in the sub-build. + * + * @type {Node} + */ + node: Node; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSubBuildNode: boolean; + generateNodeType(builder: any): string; + build(builder: any, ...params: any[]): string | Node | null; +} +import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/TempNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/TempNode.d.ts new file mode 100644 index 000000000..ed3119f09 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/TempNode.d.ts @@ -0,0 +1,28 @@ +export default TempNode; +/** + * This module uses cache management to create temporary variables + * if the node is used more than once to prevent duplicate calculations. + * + * The class acts as a base class for many other nodes types. + * + * @augments Node + */ +declare class TempNode extends Node { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isTempNode: boolean; + /** + * Whether this node is used more than once in context of other nodes. + * + * @param {NodeBuilder} builder - The node builder. + * @return {boolean} A flag that indicates if there is more than one dependency to other nodes. + */ + hasDependencies(builder: NodeBuilder): boolean; + build(builder: any, output: any): any; +} +import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/UniformGroupNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/UniformGroupNode.d.ts new file mode 100644 index 000000000..f61fdbe5b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/UniformGroupNode.d.ts @@ -0,0 +1,77 @@ +export default UniformGroupNode; +export function uniformGroup(name: string, order?: number, updateType?: null): UniformGroupNode; +export function sharedUniformGroup(name: string, order?: number, updateType?: null): UniformGroupNode; +/** + * TSL object that represents a shared uniform group node which is updated once per frame. + * + * @tsl + * @type {UniformGroupNode} + */ +export const frameGroup: UniformGroupNode; +/** + * TSL object that represents a shared uniform group node which is updated once per render. + * + * @tsl + * @type {UniformGroupNode} + */ +export const renderGroup: UniformGroupNode; +/** + * TSL object that represents a uniform group node which is updated once per object. + * + * @tsl + * @type {UniformGroupNode} + */ +export const objectGroup: UniformGroupNode; +/** + * This node can be used to group single instances of {@link UniformNode} + * and manage them as a uniform buffer. + * + * In most cases, the predefined nodes `objectGroup`, `renderGroup` and `frameGroup` + * will be used when defining the {@link UniformNode#groupNode} property. + * + * - `objectGroup`: Uniform buffer per object. + * - `renderGroup`: Shared uniform buffer, updated once per render call. + * - `frameGroup`: Shared uniform buffer, updated once per frame. + * + * @augments Node + */ +declare class UniformGroupNode extends Node { + /** + * Constructs a new uniform group node. + * + * @param {string} name - The name of the uniform group node. + * @param {boolean} [shared=false] - Whether this uniform group node is shared or not. + * @param {number} [order=1] - Influences the internal sorting. + * @param {string|null} [updateType=null] - The update type of the uniform group node. + */ + constructor(name: string, shared?: boolean, order?: number, updateType?: string | null); + /** + * Whether this uniform group node is shared or not. + * + * @type {boolean} + * @default false + */ + shared: boolean; + /** + * Influences the internal sorting. + * TODO: Add details when this property should be changed. + * + * @type {number} + * @default 1 + */ + order: number; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isUniformGroup: boolean; + /** + * Marks the uniform group node as needing an update. + * This will trigger the necessary updates in the rendering process. + */ + update(): void; +} +import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/UniformNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/UniformNode.d.ts new file mode 100644 index 000000000..f4cb493fb --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/UniformNode.d.ts @@ -0,0 +1,65 @@ +export default UniformNode; +export function uniform(value: any | string, type?: string): UniformNode; +/** + * Class for representing a uniform. + * + * @augments InputNode + */ +declare class UniformNode extends InputNode { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isUniformNode: boolean; + /** + * The uniform group of this uniform. By default, uniforms are + * managed per object but they might belong to a shared group + * which is updated per frame or render call. + * + * @type {UniformGroupNode} + */ + groupNode: UniformGroupNode; + /** + * Sets the {@link UniformNode#name} property. + * + * @param {string} name - The name of the uniform. + * @return {UniformNode} A reference to this node. + */ + setName(name: string): UniformNode; + /** + * Sets the {@link UniformNode#name} property. + * + * @deprecated + * @param {string} name - The name of the uniform. + * @return {UniformNode} A reference to this node. + */ + label(name: string): UniformNode; + /** + * Sets the {@link UniformNode#groupNode} property. + * + * @param {UniformGroupNode} group - The uniform group. + * @return {UniformNode} A reference to this node. + */ + setGroup(group: UniformGroupNode): UniformNode; + /** + * Returns the {@link UniformNode#groupNode}. + * + * @return {UniformGroupNode} The uniform group. + */ + getGroup(): UniformGroupNode; + /** + * By default, this method returns the result of {@link Node#getHash} but derived + * classes might overwrite this method with a different implementation. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The uniform hash. + */ + getUniformHash(builder: NodeBuilder): string; + onUpdate(callback: any, updateType: any): import("./Node.js").default; + getInputType(builder: any): string; + generate(builder: any, output: any): any; +} +import InputNode from './InputNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/VarNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/VarNode.d.ts new file mode 100644 index 000000000..5e200133c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/VarNode.d.ts @@ -0,0 +1,88 @@ +export default VarNode; +export function Var(node: Node, name?: string | null): VarNode; +export function Const(node: Node, name?: string | null): VarNode; +export function VarIntent(node: Node): VarNode; +/** + * Class for representing shader variables as nodes. Variables are created from + * existing nodes like the following: + * + * ```js + * const depth = sampleDepth( uvNode ).toVar( 'depth' ); + * ``` + * + * @augments Node + */ +declare class VarNode extends Node { + /** + * Constructs a new variable node. + * + * @param {Node} node - The node for which a variable should be created. + * @param {?string} [name=null] - The name of the variable in the shader. + * @param {boolean} [readOnly=false] - The read-only flag. + */ + constructor(node: Node, name?: string | null, readOnly?: boolean); + /** + * The node for which a variable should be created. + * + * @type {Node} + */ + node: Node; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isVarNode: boolean; + /** + * + * The read-only flag. + * + * @type {boolean} + * @default false + */ + readOnly: boolean; + /** + * This flag is used to indicate that this node is used for intent. + * + * @type {boolean} + * @default false + */ + intent: boolean; + /** + * Sets the intent flag for this node. + * + * This flag is used to indicate that this node is used for intent + * and should not be built directly. Instead, it is used to indicate that + * the node should be treated as a variable intent. + * + * It's useful for assigning variables without needing creating a new variable node. + * + * @param {boolean} value - The value to set for the intent flag. + * @returns {VarNode} This node. + */ + setIntent(value: boolean): VarNode; + /** + * Checks if this node is used for intent. + * + * @param {NodeBuilder} builder - The node builder. + * @returns {boolean} Whether this node is used for intent. + */ + isIntent(builder: NodeBuilder): boolean; + /** + * Returns the intent flag of this node. + * + * @return {boolean} The intent flag. + */ + getIntent(): boolean; + getMemberType(builder: any, name: any): string; + getElementType(builder: any): string; + generateNodeType(builder: any): string; + getArrayCount(builder: any): number | null; + isAssign(builder: any): any; + build(...params: any[]): string | Node | null; + generate(builder: any): any; + _hasStack(builder: any): boolean; +} +import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/VaryingNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/VaryingNode.d.ts new file mode 100644 index 000000000..4833ad311 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/VaryingNode.d.ts @@ -0,0 +1,80 @@ +export default VaryingNode; +/** + * TSL function for creating a varying node. + * + * @tsl + * @function + * @param {Node} node - The node for which a varying should be created. + * @param {?string} name - The name of the varying in the shader. + * @returns {VaryingNode} + */ +export const varying: any; +export function vertexStage(node: Node): VaryingNode; +/** + * Class for representing shader varyings as nodes. Varyings are create from + * existing nodes like the following: + * + * ```js + * const positionLocal = positionGeometry.toVarying( 'vPositionLocal' ); + * ``` + * + * @augments Node + */ +declare class VaryingNode extends Node { + /** + * Constructs a new varying node. + * + * @param {Node} node - The node for which a varying should be created. + * @param {?string} name - The name of the varying in the shader. + */ + constructor(node: Node, name?: string | null); + /** + * The node for which a varying should be created. + * + * @type {Node} + */ + node: Node; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isVaryingNode: boolean; + /** + * The interpolation type of the varying data. + * + * @type {?string} + * @default null + */ + interpolationType: string | null; + /** + * The interpolation sampling type of varying data. + * + * @type {?string} + * @default null + */ + interpolationSampling: string | null; + /** + * Defines the interpolation type of the varying. + * + * @param {string} type - The interpolation type. + * @param {?string} sampling - The interpolation sampling type + * @return {VaryingNode} A reference to this node. + */ + setInterpolation(type: string, sampling?: string | null): VaryingNode; + getHash(builder: any): string; + generateNodeType(builder: any): string; + /** + * This method performs the setup of a varying node with the current node builder. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {NodeVarying} The node varying from the node builder. + */ + setupVarying(builder: NodeBuilder): NodeVarying; + setup(builder: any): void; + analyze(builder: any): void; + generate(builder: any): any; +} +import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/constants.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/constants.d.ts new file mode 100644 index 000000000..5d342ff3a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/core/constants.d.ts @@ -0,0 +1,30 @@ +export namespace NodeShaderStage { + let VERTEX: string; + let FRAGMENT: string; +} +export namespace NodeUpdateType { + let NONE: string; + let FRAME: string; + let RENDER: string; + let OBJECT: string; +} +export namespace NodeType { + let BOOLEAN: string; + let INTEGER: string; + let FLOAT: string; + let VECTOR2: string; + let VECTOR3: string; + let VECTOR4: string; + let MATRIX2: string; + let MATRIX3: string; + let MATRIX4: string; +} +export namespace NodeAccess { + let READ_ONLY: string; + let WRITE_ONLY: string; + let READ_WRITE: string; +} +export const defaultShaderStages: string[]; +export const defaultBuildStages: string[]; +export const shaderStages: string[]; +export const vectorComponents: string[]; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/BlendModes.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/BlendModes.d.ts new file mode 100644 index 000000000..243a98ae5 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/display/BlendModes.d.ts @@ -0,0 +1,67 @@ +/** + * Represents a "Color Burn" blend mode. + * + * It's designed to darken the base layer's colors based on the color of the blend layer. + * It significantly increases the contrast of the base layer, making the colors more vibrant and saturated. + * The darker the color in the blend layer, the stronger the darkening and contrast effect on the base layer. + * + * @tsl + * @function + * @param {Node} base - The base color. + * @param {Node} blend - The blend color. A white (#ffffff) blend color does not alter the base color. + * @return {Node} The result. + */ +export const blendBurn: any; +/** + * Represents a "Color Dodge" blend mode. + * + * It's designed to lighten the base layer's colors based on the color of the blend layer. + * It significantly increases the brightness of the base layer, making the colors lighter and more vibrant. + * The brighter the color in the blend layer, the stronger the lightening and contrast effect on the base layer. + * + * @tsl + * @function + * @param {Node} base - The base color. + * @param {Node} blend - The blend color. A black (#000000) blend color does not alter the base color. + * @return {Node} The result. + */ +export const blendDodge: any; +/** + * Represents a "Screen" blend mode. + * + * Similar to `blendDodge()`, this mode also lightens the base layer's colors based on the color of the blend layer. + * The "Screen" blend mode is better for general brightening whereas the "Dodge" results in more subtle and nuanced + * effects. + * + * @tsl + * @function + * @param {Node} base - The base color. + * @param {Node} blend - The blend color. A black (#000000) blend color does not alter the base color. + * @return {Node} The result. + */ +export const blendScreen: any; +/** + * Represents a "Overlay" blend mode. + * + * It's designed to increase the contrast of the base layer based on the color of the blend layer. + * It amplifies the existing colors and contrast in the base layer, making lighter areas lighter and darker areas darker. + * The color of the blend layer significantly influences the resulting contrast and color shift in the base layer. + * + * @tsl + * @function + * @param {Node} base - The base color. + * @param {Node} blend - The blend color + * @return {Node} The result. + */ +export const blendOverlay: any; +/** + * This function blends two color based on their alpha values by replicating the behavior of `THREE.NormalBlending`. + * It assumes both input colors have non-premultiplied alpha. + * + * @tsl + * @function + * @param {Node} base - The base color. + * @param {Node} blend - The blend color + * @return {Node} The result. + */ +export const blendColor: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/BumpMapNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/BumpMapNode.d.ts new file mode 100644 index 000000000..08aa47f62 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/display/BumpMapNode.d.ts @@ -0,0 +1,44 @@ +export default BumpMapNode; +/** + * TSL function for creating a bump map node. + * + * @tsl + * @function + * @param {Node} textureNode - Represents the bump map data. + * @param {?Node} [scaleNode=null] - Controls the intensity of the bump effect. + * @returns {BumpMapNode} + */ +export const bumpMap: any; +/** + * This class can be used for applying bump maps to materials. + * + * ```js + * material.normalNode = bumpMap( texture( bumpTex ) ); + * ``` + * + * @augments TempNode + */ +declare class BumpMapNode extends TempNode { + /** + * Constructs a new bump map node. + * + * @param {Node} textureNode - Represents the bump map data. + * @param {?Node} [scaleNode=null] - Controls the intensity of the bump effect. + */ + constructor(textureNode: Node, scaleNode?: Node | null); + /** + * Represents the bump map data. + * + * @type {Node} + */ + textureNode: Node; + /** + * Controls the intensity of the bump effect. + * + * @type {?Node} + * @default null + */ + scaleNode: Node | null; + setup(): void; +} +import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ColorAdjustment.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ColorAdjustment.d.ts new file mode 100644 index 000000000..342c82742 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/display/ColorAdjustment.d.ts @@ -0,0 +1,76 @@ +/** + * Computes a grayscale value for the given RGB color value. + * + * @tsl + * @function + * @param {Node} color - The color value to compute the grayscale for. + * @return {Node} The grayscale color. + */ +export const grayscale: () => void; +/** + * Super-saturates or desaturates the given RGB color. + * + * @tsl + * @function + * @param {Node} color - The input color. + * @param {Node} [adjustment=1] - Specifies the amount of the conversion. A value under `1` desaturates the color, a value over `1` super-saturates it. + * @return {Node} The saturated color. + */ +export const saturation: () => void; +/** + * Selectively enhance the intensity of less saturated RGB colors. Can result + * in a more natural and visually appealing image with enhanced color depth + * compared to {@link ColorAdjustment#saturation}. + * + * @tsl + * @function + * @param {Node} color - The input color. + * @param {Node} [adjustment=1] - Controls the intensity of the vibrance effect. + * @return {Node} The updated color. + */ +export const vibrance: () => void; +/** + * Updates the hue component of the given RGB color while preserving its luminance and saturation. + * + * @tsl + * @function + * @param {Node} color - The input color. + * @param {Node} [adjustment=1] - Defines the degree of hue rotation in radians. A positive value rotates the hue clockwise, while a negative value rotates it counterclockwise. + * @return {Node} The updated color. + */ +export const hue: () => void; +export function luminance(color: Node, luminanceCoefficients?: Node | null): Node; +/** + * Color Decision List (CDL) v1.2 + * + * Compact representation of color grading information, defined by slope, offset, power, and + * saturation. The CDL should be typically be given input in a log space (such as LogC, ACEScc, + * or AgX Log), and will return output in the same space. Output may require clamping >=0. + * + * @tsl + * @function + * @param {Node} color Input (-Infinity < input < +Infinity) + * @param {Node} slope Slope (0 ≤ slope < +Infinity) + * @param {Node} offset Offset (-Infinity < offset < +Infinity; typically -1 < offset < 1) + * @param {Node} power Power (0 < power < +Infinity) + * @param {Node} saturation Saturation (0 ≤ saturation < +Infinity; typically 0 ≤ saturation < 4) + * @param {Node} luminanceCoefficients Luminance coefficients for saturation term, typically Rec. 709 + * @return {Node} Output, -Infinity < output < +Infinity + * + * References: + * - ASC CDL v1.2 + * - {@link https://blender.stackexchange.com/a/55239/43930} + * - {@link https://docs.acescentral.com/specifications/acescc/} + */ +export const cdl: () => void; +/** + * TSL function for creating a posterize effect which reduces the number of colors + * in an image, resulting in a more blocky and stylized appearance. + * + * @tsl + * @function + * @param {Node} sourceNode - The input color. + * @param {Node} stepsNode - Controls the intensity of the posterization effect. A lower number results in a more blocky appearance. + * @returns {Node} The posterized color. + */ +export const posterize: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ColorSpaceFunctions.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ColorSpaceFunctions.d.ts new file mode 100644 index 000000000..2677fb978 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/display/ColorSpaceFunctions.d.ts @@ -0,0 +1,18 @@ +/** + * Converts the given color value from sRGB to linear-sRGB color space. + * + * @tsl + * @function + * @param {Node} color - The sRGB color. + * @return {Node} The linear-sRGB color. + */ +export const sRGBTransferEOTF: any; +/** + * Converts the given color value from linear-sRGB to sRGB color space. + * + * @tsl + * @function + * @param {Node} color - The linear-sRGB color. + * @return {Node} The sRGB color. + */ +export const sRGBTransferOETF: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ColorSpaceNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ColorSpaceNode.d.ts new file mode 100644 index 000000000..37eaac303 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/display/ColorSpaceNode.d.ts @@ -0,0 +1,50 @@ +export default ColorSpaceNode; +export function workingToColorSpace(node: Node, targetColorSpace: string): ColorSpaceNode; +export function colorSpaceToWorking(node: Node, sourceColorSpace: string): ColorSpaceNode; +export function convertColorSpace(node: Node, sourceColorSpace: string, targetColorSpace: string): ColorSpaceNode; +/** + * This node represents a color space conversion. Meaning it converts + * a color value from a source to a target color space. + * + * @augments TempNode + */ +declare class ColorSpaceNode extends TempNode { + /** + * Constructs a new color space node. + * + * @param {Node} colorNode - Represents the color to convert. + * @param {string} source - The source color space. + * @param {string} target - The target color space. + */ + constructor(colorNode: Node, source: string, target: string); + /** + * Represents the color to convert. + * + * @type {Node} + */ + colorNode: Node; + /** + * The source color space. + * + * @type {string} + */ + source: string; + /** + * The target color space. + * + * @type {string} + */ + target: string; + /** + * This method resolves the constants `WORKING_COLOR_SPACE` and + * `OUTPUT_COLOR_SPACE` based on the current configuration of the + * color management and renderer. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} colorSpace - The color space to resolve. + * @return {string} The resolved color space. + */ + resolveColorSpace(builder: NodeBuilder, colorSpace: string): string; + setup(builder: any): Node; +} +import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/FrontFacingNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/FrontFacingNode.d.ts new file mode 100644 index 000000000..8a54e2d33 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/display/FrontFacingNode.d.ts @@ -0,0 +1,48 @@ +export default FrontFacingNode; +/** + * TSL object that represents whether a primitive is front or back facing + * + * @tsl + * @type {FrontFacingNode} + */ +export const frontFacing: FrontFacingNode; +/** + * TSL object that represents the front facing status as a number instead of a bool. + * `1` means front facing, `-1` means back facing. + * + * @tsl + * @type {Node} + */ +export const faceDirection: Node; +/** + * Converts a direction vector to a face direction vector based on the material's side. + * + * If the material is set to `BackSide`, the direction is inverted. + * If the material is set to `DoubleSide`, the direction is multiplied by `faceDirection`. + * + * @tsl + * @param {Node} direction - The direction vector to convert. + * @returns {Node} The converted direction vector. + */ +export const directionToFaceDirection: () => void; +/** + * This node can be used to evaluate whether a primitive is front or back facing. + * + * @augments Node + */ +declare class FrontFacingNode extends Node { + /** + * Constructs a new front facing node. + */ + constructor(); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isFrontFacingNode: boolean; + generate(builder: any): any; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/NormalMapNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/NormalMapNode.d.ts new file mode 100644 index 000000000..a87be475f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/display/NormalMapNode.d.ts @@ -0,0 +1,58 @@ +export default NormalMapNode; +/** + * TSL function for creating a normal map node. + * + * @tsl + * @function + * @param {Node} node - Represents the normal map data. + * @param {?Node} [scaleNode=null] - Controls the intensity of the effect. + * @returns {NormalMapNode} + */ +export const normalMap: any; +/** + * This class can be used for applying normals maps to materials. + * + * ```js + * material.normalNode = normalMap( texture( normalTex ) ); + * ``` + * + * @augments TempNode + */ +declare class NormalMapNode extends TempNode { + /** + * Constructs a new normal map node. + * + * @param {Node} node - Represents the normal map data. + * @param {?Node} [scaleNode=null] - Controls the intensity of the effect. + */ + constructor(node: Node, scaleNode?: Node | null); + /** + * Represents the normal map data. + * + * @type {Node} + */ + node: Node; + /** + * Controls the intensity of the effect. + * + * @type {?Node} + * @default null + */ + scaleNode: Node | null; + /** + * The normal map type. + * + * @type {(TangentSpaceNormalMap|ObjectSpaceNormalMap)} + * @default TangentSpaceNormalMap + */ + normalMapType: (number | number); + /** + * Controls how to unpack the sampled normal map values. + * + * @type {string} + * @default NoNormalPacking + */ + unpackNormalMode: string; + setup(builder: any): any; +} +import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/PassNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/PassNode.d.ts new file mode 100644 index 000000000..2942924e3 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/display/PassNode.d.ts @@ -0,0 +1,403 @@ +export default PassNode; +export function pass(scene: Scene, camera: Camera, options: Object): PassNode; +export function passTexture(pass: PassNode, texture: Texture): PassTextureNode; +export function depthPass(scene: Scene, camera: Camera, options: Object): PassNode; +/** + * Represents a render pass (sometimes called beauty pass) in context of post processing. + * This pass produces a render for the given scene and camera and can provide multiple outputs + * via MRT for further processing. + * + * ```js + * const postProcessing = new RenderPipeline( renderer ); + * + * const scenePass = pass( scene, camera ); + * + * postProcessing.outputNode = scenePass; + * ``` + * + * @augments TempNode + */ +declare class PassNode extends TempNode { + /** + * Constructs a new pass node. + * + * @param {('color'|'depth')} scope - The scope of the pass. The scope determines whether the node outputs color or depth. + * @param {Scene} scene - A reference to the scene. + * @param {Camera} camera - A reference to the camera. + * @param {Object} options - Options for the internal render target. + */ + constructor(scope: ("color" | "depth"), scene: Scene, camera: Camera, options?: Object); + /** + * The scope of the pass. The scope determines whether the node outputs color or depth. + * + * @type {('color'|'depth')} + */ + scope: ("color" | "depth"); + /** + * A reference to the scene. + * + * @type {Scene} + */ + scene: Scene; + /** + * A reference to the camera. + * + * @type {Camera} + */ + camera: Camera; + /** + * Options for the internal render target. + * + * @type {Object} + */ + options: Object; + /** + * The pass's pixel width. Will be kept automatically kept in sync with the renderer's width. + * @private + * @type {number} + * @default 1 + */ + private _width; + /** + * The pass's pixel height. Will be kept automatically kept in sync with the renderer's height. + * @private + * @type {number} + * @default 1 + */ + private _height; + /** + * The pass's render target. + * + * @type {RenderTarget} + */ + renderTarget: RenderTarget; + /** + * An optional override material for the pass. + * + * @type {Material|null} + */ + overrideMaterial: Material | null; + /** + * Whether the pass is transparent. + * + * @type {boolean} + * @default false + */ + transparent: boolean; + /** + * Whether the pass is opaque. + * + * @type {boolean} + * @default true + */ + opaque: boolean; + /** + * An optional global context for the pass. + * + * @type {ContextNode|null} + */ + contextNode: ContextNode | null; + /** + * A cache for the context node. + * + * @private + * @type {?Object} + * @default null + */ + private _contextNodeCache; + /** + * A dictionary holding the internal result textures. + * + * @private + * @type {{ output: Texture, depth: ?DepthTexture }} + */ + private _textures; + /** + * A dictionary holding the internal texture nodes. + * + * @private + * @type {Object} + */ + private _textureNodes; + /** + * A dictionary holding the internal depth nodes. + * + * @private + * @type {Object} + */ + private _linearDepthNodes; + /** + * A dictionary holding the internal viewZ nodes. + * + * @private + * @type {Object} + */ + private _viewZNodes; + /** + * A dictionary holding the texture data of the previous frame. + * Used for computing velocity/motion vectors. + * + * @private + * @type {Object} + */ + private _previousTextures; + /** + * A dictionary holding the texture nodes of the previous frame. + * Used for computing velocity/motion vectors. + * + * @private + * @type {Object} + */ + private _previousTextureNodes; + /** + * The `near` property of the camera as a uniform. + * + * @private + * @type {UniformNode} + */ + private _cameraNear; + /** + * The `far` property of the camera as a uniform. + * + * @private + * @type {UniformNode} + */ + private _cameraFar; + /** + * A MRT node configuring the MRT settings. + * + * @private + * @type {?MRTNode} + * @default null + */ + private _mrt; + /** + * Layer object for configuring the camera that is used + * to produce the pass. + * + * @private + * @type {?Layers} + * @default null + */ + private _layers; + /** + * Scales the resolution of the internal render target. + * + * @private + * @type {number} + * @default 1 + */ + private _resolutionScale; + /** + * Custom viewport definition. + * + * @private + * @type {?Vector4} + * @default null + */ + private _viewport; + /** + * Custom scissor definition. + * + * @private + * @type {?Vector4} + * @default null + */ + private _scissor; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isPassNode: boolean; + /** + * Sets the resolution scale for the pass. + * The resolution scale is a factor that is multiplied with the renderer's width and height. + * + * @param {number} resolutionScale - The resolution scale to set. A value of `1` means full resolution. + * @return {PassNode} A reference to this pass. + */ + setResolutionScale(resolutionScale: number): PassNode; + /** + * Gets the current resolution scale of the pass. + * + * @return {number} The current resolution scale. A value of `1` means full resolution. + */ + getResolutionScale(): number; + /** + * Sets the resolution for the pass. + * The resolution is a factor that is multiplied with the renderer's width and height. + * + * @param {number} resolution - The resolution to set. A value of `1` means full resolution. + * @return {PassNode} A reference to this pass. + * @deprecated since r181. Use {@link PassNode#setResolutionScale `setResolutionScale()`} instead. + */ + setResolution(resolution: number): PassNode; + /** + * Gets the current resolution of the pass. + * + * @return {number} The current resolution. A value of `1` means full resolution. + * @deprecated since r181. Use {@link PassNode#getResolutionScale `getResolutionScale()`} instead. + */ + getResolution(): number; + /** + * Sets the layer configuration that should be used when rendering the pass. + * + * @param {Layers} layers - The layers object to set. + * @return {PassNode} A reference to this pass. + */ + setLayers(layers: Layers): PassNode; + /** + * Gets the current layer configuration of the pass. + * + * @return {?Layers} . + */ + getLayers(): Layers | null; + /** + * Sets the given MRT node to setup MRT for this pass. + * + * @param {MRTNode} mrt - The MRT object. + * @return {PassNode} A reference to this pass. + */ + setMRT(mrt: MRTNode): PassNode; + /** + * Returns the current MRT node. + * + * @return {MRTNode} The current MRT node. + */ + getMRT(): MRTNode; + /** + * Returns the texture for the given output name. + * + * @param {string} name - The output name to get the texture for. + * @return {Texture} The texture. + */ + getTexture(name: string): Texture; + /** + * Returns the texture holding the data of the previous frame for the given output name. + * + * @param {string} name - The output name to get the texture for. + * @return {Texture} The texture holding the data of the previous frame. + */ + getPreviousTexture(name: string): Texture; + /** + * Switches current and previous textures for the given output name. + * + * @param {string} name - The output name. + */ + toggleTexture(name: string): void; + /** + * Returns the texture node for the given output name. + * + * @param {string} [name='output'] - The output name to get the texture node for. + * @return {TextureNode} The texture node. + */ + getTextureNode(name?: string): TextureNode; + /** + * Returns the previous texture node for the given output name. + * + * @param {string} [name='output'] - The output name to get the previous texture node for. + * @return {TextureNode} The previous texture node. + */ + getPreviousTextureNode(name?: string): TextureNode; + /** + * Returns a viewZ node of this pass. + * + * @param {string} [name='depth'] - The output name to get the viewZ node for. In most cases the default `'depth'` can be used however the parameter exists for custom depth outputs. + * @return {Node} The viewZ node. + */ + getViewZNode(name?: string): Node; + /** + * Returns a linear depth node of this pass. + * + * @param {string} [name='depth'] - The output name to get the linear depth node for. In most cases the default `'depth'` can be used however the parameter exists for custom depth outputs. + * @return {Node} The linear depth node. + */ + getLinearDepthNode(name?: string): Node; + /** + * Precompiles the pass. + * + * Note that this method must be called after the pass configuration is complete. + * So calls like `setMRT()` and `getTextureNode()` must proceed the precompilation. + * + * @async + * @param {Renderer} renderer - The renderer. + * @return {Promise} A Promise that resolves when the compile has been finished. + * @see {@link Renderer#compileAsync} + */ + compileAsync(renderer: Renderer): Promise; + setup({ renderer }: { + renderer: any; + }): Node | TextureNode; + updateBefore(frame: any): void; + /** + * Sets the size of the pass's render target. Honors the pixel ratio. + * + * @param {number} width - The width to set. + * @param {number} height - The height to set. + */ + setSize(width: number, height: number): void; + /** + * This method allows to define the pass's scissor rectangle. By default, the scissor rectangle is kept + * in sync with the pass's dimensions. To reverse the process and use auto-sizing again, call the method + * with `null` as the single argument. + * + * @param {?(number | Vector4)} x - The horizontal coordinate for the lower left corner of the box in logical pixel unit. + * Instead of passing four arguments, the method also works with a single four-dimensional vector. + * @param {number} y - The vertical coordinate for the lower left corner of the box in logical pixel unit. + * @param {number} width - The width of the scissor box in logical pixel unit. + * @param {number} height - The height of the scissor box in logical pixel unit. + */ + setScissor(x: (number | Vector4) | null, y: number, width: number, height: number): void; + /** + * This method allows to define the pass's viewport. By default, the viewport is kept in sync + * with the pass's dimensions. To reverse the process and use auto-sizing again, call the method + * with `null` as the single argument. + * + * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the viewport origin in logical pixel unit. + * @param {number} y - The vertical coordinate for the lower left corner of the viewport origin in logical pixel unit. + * @param {number} width - The width of the viewport in logical pixel unit. + * @param {number} height - The height of the viewport in logical pixel unit. + */ + setViewport(x: number | Vector4, y: number, width: number, height: number): void; +} +declare namespace PassNode { + let COLOR: "color"; + let DEPTH: "depth"; +} +/** + * Represents the texture of a pass node. + * + * @augments TextureNode + */ +declare class PassTextureNode extends TextureNode { + /** + * Constructs a new pass texture node. + * + * @param {PassNode} passNode - The pass node. + * @param {Texture} texture - The output texture. + */ + constructor(passNode: PassNode, texture: Texture); + /** + * A reference to the pass node. + * + * @type {PassNode} + */ + passNode: PassNode; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @default true + * @readonly + */ + readonly isPassTextureNode: boolean; + setup(builder: any): void; + clone(): any; +} +import TempNode from '../core/TempNode.js'; +import { RenderTarget } from '../../core/RenderTarget.js'; +import { default as TextureNode } from '../accessors/TextureNode.js'; +import { Vector4 } from '../../math/Vector4.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/PremultiplyAlphaFunctions.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/PremultiplyAlphaFunctions.d.ts new file mode 100644 index 000000000..bcf1b8bef --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/display/PremultiplyAlphaFunctions.d.ts @@ -0,0 +1,28 @@ +/** + * Premultiplies the RGB channels of a color by its alpha channel. + * + * This function is useful for converting a non-premultiplied alpha color + * into a premultiplied alpha format, where the RGB values are scaled + * by the alpha value. Premultiplied alpha is often used in graphics + * rendering for certain operations, such as compositing and image processing. + * + * @tsl + * @function + * @param {Node} color - The input color with non-premultiplied alpha. + * @return {Node} The color with premultiplied alpha. + */ +export const premultiplyAlpha: () => void; +/** + * Unpremultiplies the RGB channels of a color by its alpha channel. + * + * This function is useful for converting a premultiplied alpha color + * back into a non-premultiplied alpha format, where the RGB values are + * divided by the alpha value. Unpremultiplied alpha is often used in graphics + * rendering for certain operations, such as compositing and image processing. + * + * @tsl + * @function + * @param {Node} color - The input color with premultiplied alpha. + * @return {Node} The color with non-premultiplied alpha. + */ +export const unpremultiplyAlpha: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/RenderOutputNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/RenderOutputNode.d.ts new file mode 100644 index 000000000..d469787e9 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/display/RenderOutputNode.d.ts @@ -0,0 +1,79 @@ +export default RenderOutputNode; +export function renderOutput(color: Node, toneMapping?: number | null, outputColorSpace?: string | null): RenderOutputNode; +/** + * Normally, tone mapping and color conversion happens automatically just + * before outputting a pixel to the default (screen) framebuffer. In certain + * post processing setups this is too late because some effects such as FXAA + * require e.g. sRGB input. For such scenarios, `RenderOutputNode` can be used + * to apply tone mapping and color space conversion at an arbitrary point + * in the effect chain. + * + * When applying tone mapping and color space conversion manually with this node, + * you have to set {@link RenderPipeline#outputColorTransform} to `false`. + * + * ```js + * const postProcessing = new RenderPipeline( renderer ); + * postProcessing.outputColorTransform = false; + * + * const scenePass = pass( scene, camera ); + * const outputPass = renderOutput( scenePass ); + * + * postProcessing.outputNode = outputPass; + * ``` + * + * @augments TempNode + */ +declare class RenderOutputNode extends TempNode { + /** + * Constructs a new render output node. + * + * @param {Node} colorNode - The color node to process. + * @param {?number} toneMapping - The tone mapping type. + * @param {?string} outputColorSpace - The output color space. + */ + constructor(colorNode: Node, toneMapping: number | null, outputColorSpace: string | null); + /** + * The color node to process. + * + * @type {Node} + */ + colorNode: Node; + /** + * The tone mapping type. + * + * @private + * @type {?number} + */ + private _toneMapping; + /** + * The output color space. + * + * @type {?string} + */ + outputColorSpace: string | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isRenderOutputNode: boolean; + /** + * Sets the tone mapping type. + * + * @param {number} value - The tone mapping type. + * @return {ToneMappingNode} A reference to this node. + */ + setToneMapping(value: number): ToneMappingNode; + /** + * Gets the tone mapping type. + * + * @returns {number} The tone mapping type. + */ + getToneMapping(): number; + setup({ context }: { + context: any; + }): Node; +} +import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ScreenNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ScreenNode.d.ts new file mode 100644 index 000000000..b721d4072 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/display/ScreenNode.d.ts @@ -0,0 +1,127 @@ +export default ScreenNode; +/** + * TSL object that represents the current DPR. + * + * @tsl + * @type {ScreenNode} + */ +export const screenDPR: ScreenNode; +/** + * TSL object that represents normalized screen coordinates, unitless in `[0, 1]`. + * + * @tsl + * @type {ScreenNode} + */ +export const screenUV: ScreenNode; +/** + * TSL object that represents the screen resolution in physical pixel units. + * + * @tsl + * @type {ScreenNode} + */ +export const screenSize: ScreenNode; +/** + * TSL object that represents the current `x`/`y` pixel position on the screen in physical pixel units. + * + * @tsl + * @type {ScreenNode} + */ +export const screenCoordinate: ScreenNode; +/** + * TSL object that represents the viewport rectangle as `x`, `y`, `width` and `height` in physical pixel units. + * + * @tsl + * @type {ScreenNode} + */ +export const viewport: ScreenNode; +/** + * TSL object that represents the viewport resolution in physical pixel units. + * + * @tsl + * @type {ScreenNode} + */ +export const viewportSize: ScreenNode; +/** + * TSL object that represents the current `x`/`y` pixel position on the viewport in physical pixel units. + * + * @tsl + * @type {ScreenNode} + */ +export const viewportCoordinate: ScreenNode; +/** + * TSL object that represents normalized viewport coordinates, unitless in `[0, 1]`. + * + * @tsl + * @type {ScreenNode} + */ +export const viewportUV: ScreenNode; +/** + * @deprecated since r169. Use {@link screenSize} instead. + */ +export const viewportResolution: any; +/** + * This node provides a collection of screen related metrics. + * Depending on {@link ScreenNode#scope}, the nodes can represent + * resolution or viewport data as well as fragment or uv coordinates. + * + * @augments Node + */ +declare class ScreenNode extends Node { + /** + * Constructs a new screen node. + * + * @param {('coordinate'|'viewport'|'size'|'uv'|'dpr')} scope - The node's scope. + */ + constructor(scope: ("coordinate" | "viewport" | "size" | "uv" | "dpr")); + /** + * The node represents different metric depending on which scope is selected. + * + * - `ScreenNode.COORDINATE`: Window-relative coordinates of the current fragment according to WebGPU standards. + * - `ScreenNode.VIEWPORT`: The current viewport defined as a four-dimensional vector. + * - `ScreenNode.SIZE`: The dimensions of the current bound framebuffer. + * - `ScreenNode.UV`: Normalized coordinates. + * - `ScreenNode.DPR`: Device pixel ratio. + * + * @type {('coordinate'|'viewport'|'size'|'uv'|'dpr')} + */ + scope: ("coordinate" | "viewport" | "size" | "uv" | "dpr"); + /** + * This output node. + * + * @private + * @type {?Node} + * @default null + */ + private _output; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isViewportNode: boolean; + /** + * This method is overwritten since the node type depends on the selected scope. + * + * @return {('float'|'vec2'|'vec4')} The node type. + */ + generateNodeType(): ("float" | "vec2" | "vec4"); + /** + * `ScreenNode` implements {@link Node#update} to retrieve viewport and size information + * from the current renderer. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update({ renderer }: NodeFrame): void; + setup(): any; + generate(builder: any): any; +} +declare namespace ScreenNode { + let COORDINATE: string; + let VIEWPORT: string; + let SIZE: string; + let UV: string; + let DPR: string; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ToneMappingFunctions.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ToneMappingFunctions.d.ts new file mode 100644 index 000000000..2d04148f4 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/display/ToneMappingFunctions.d.ts @@ -0,0 +1,68 @@ +/** + * Linear tone mapping, exposure only. + * + * @tsl + * @function + * @param {Node} color - The color that should be tone mapped. + * @param {Node} exposure - The exposure. + * @return {Node} The tone mapped color. + */ +export const linearToneMapping: any; +/** + * Reinhard tone mapping. + * + * Reference: {@link https://www.cs.utah.edu/docs/techreports/2002/pdf/UUCS-02-001.pdf} + * + * @tsl + * @function + * @param {Node} color - The color that should be tone mapped. + * @param {Node} exposure - The exposure. + * @return {Node} The tone mapped color. + */ +export const reinhardToneMapping: any; +/** + * Cineon tone mapping. + * + * Reference: {@link http://filmicworlds.com/blog/filmic-tonemapping-operators/} + * + * @tsl + * @function + * @param {Node} color - The color that should be tone mapped. + * @param {Node} exposure - The exposure. + * @return {Node} The tone mapped color. + */ +export const cineonToneMapping: any; +/** + * ACESFilmic tone mapping. + * + * Reference: {@link https://github.com/selfshadow/ltc_code/blob/master/webgl/shaders/ltc/ltc_blit.fs} + * + * @tsl + * @function + * @param {Node} color - The color that should be tone mapped. + * @param {Node} exposure - The exposure. + * @return {Node} The tone mapped color. + */ +export const acesFilmicToneMapping: any; +/** + * AgX tone mapping. + * + * @tsl + * @function + * @param {Node} color - The color that should be tone mapped. + * @param {Node} exposure - The exposure. + * @return {Node} The tone mapped color. + */ +export const agxToneMapping: any; +/** + * Neutral tone mapping. + * + * Reference: {@link https://modelviewer.dev/examples/tone-mapping} + * + * @tsl + * @function + * @param {Node} color - The color that should be tone mapped. + * @param {Node} exposure - The exposure. + * @return {Node} The tone mapped color. + */ +export const neutralToneMapping: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ToneMappingNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ToneMappingNode.d.ts new file mode 100644 index 000000000..7e8ca1871 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/display/ToneMappingNode.d.ts @@ -0,0 +1,60 @@ +export default ToneMappingNode; +export function toneMapping(mapping: number, exposure: Node | number, color: Node | Color): ToneMappingNode; +/** + * TSL object that represents the global tone mapping exposure of the renderer. + * + * @tsl + * @type {RendererReferenceNode} + */ +export const toneMappingExposure: RendererReferenceNode; +/** + * This node represents a tone mapping operation. + * + * @augments TempNode + */ +declare class ToneMappingNode extends TempNode { + /** + * Constructs a new tone mapping node. + * + * @param {number} toneMapping - The tone mapping type. + * @param {Node} exposureNode - The tone mapping exposure. + * @param {Node} [colorNode=null] - The color node to process. + */ + constructor(toneMapping: number, exposureNode?: Node, colorNode?: Node); + /** + * The tone mapping type. + * + * @private + * @type {number} + */ + private _toneMapping; + /** + * The tone mapping exposure. + * + * @type {Node} + * @default null + */ + exposureNode: Node; + /** + * Represents the color to process. + * + * @type {?Node} + * @default null + */ + colorNode: Node | null; + /** + * Sets the tone mapping type. + * + * @param {number} value - The tone mapping type. + * @return {ToneMappingNode} A reference to this node. + */ + setToneMapping(value: number): ToneMappingNode; + /** + * Gets the tone mapping type. + * + * @returns {number} The tone mapping type. + */ + getToneMapping(): number; + setup(builder: any): any; +} +import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ToonOutlinePassNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ToonOutlinePassNode.d.ts new file mode 100644 index 000000000..cb934f4cb --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/display/ToonOutlinePassNode.d.ts @@ -0,0 +1,71 @@ +export default ToonOutlinePassNode; +export function toonOutlinePass(scene: Scene, camera: Camera, color?: Color, thickness?: number, alpha?: number): ToonOutlinePassNode; +/** + * Represents a render pass for producing a toon outline effect on compatible objects. + * Only 3D objects with materials of type `MeshToonMaterial` and `MeshToonNodeMaterial` + * will receive the outline. + * + * ```js + * const postProcessing = new RenderPipeline( renderer ); + * + * const scenePass = toonOutlinePass( scene, camera ); + * + * postProcessing.outputNode = scenePass; + * ``` + * @augments PassNode + */ +declare class ToonOutlinePassNode extends PassNode { + /** + * Constructs a new outline pass node. + * + * @param {Scene} scene - A reference to the scene. + * @param {Camera} camera - A reference to the camera. + * @param {Node} colorNode - Defines the outline's color. + * @param {Node} thicknessNode - Defines the outline's thickness. + * @param {Node} alphaNode - Defines the outline's alpha. + */ + constructor(scene: Scene, camera: Camera, colorNode: Node, thicknessNode: Node, alphaNode: Node); + /** + * Defines the outline's color. + * + * @type {Node} + */ + colorNode: Node; + /** + * Defines the outline's thickness. + * + * @type {Node} + */ + thicknessNode: Node; + /** + * Defines the outline's alpha. + * + * @type {Node} + */ + alphaNode: Node; + /** + * An internal material cache. + * + * @private + * @type {WeakMap} + */ + private _materialCache; + /** + * Creates the material used for outline rendering. + * + * @private + * @return {NodeMaterial} The outline material. + */ + private _createMaterial; + /** + * For the given toon material, this method returns a corresponding + * outline material. + * + * @private + * @param {(MeshToonMaterial|MeshToonNodeMaterial)} originalMaterial - The toon material. + * @return {NodeMaterial} The outline material. + */ + private _getOutlineMaterial; +} +import { Color } from '../../math/Color.js'; +import PassNode from './PassNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ViewportDepthNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ViewportDepthNode.d.ts new file mode 100644 index 000000000..6b0693f40 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/display/ViewportDepthNode.d.ts @@ -0,0 +1,105 @@ +export default ViewportDepthNode; +export function viewZToOrthographicDepth(viewZ: Node, near: Node, far: Node): Node; +export function viewZToReversedOrthographicDepth(viewZ: Node, near: Node, far: Node): Node; +/** + * TSL function for converting an orthographic depth value to a viewZ value. + * + * @tsl + * @function + * @param {Node} depth - The orthographic depth. + * @param {Node} near - The camera's near value. + * @param {Node} far - The camera's far value. + * @returns {Node} + */ +export const orthographicDepthToViewZ: () => void; +export function viewZToPerspectiveDepth(viewZ: Node, near: Node, far: Node): Node; +export function viewZToReversedPerspectiveDepth(viewZ: Node, near: Node, far: Node): Node; +/** + * TSL function for converting a perspective depth value to a viewZ value. + * + * @tsl + * @function + * @param {Node} depth - The perspective depth. + * @param {Node} near - The camera's near value. + * @param {Node} far - The camera's far value. + * @returns {Node} + */ +export const perspectiveDepthToViewZ: () => void; +export function viewZToLogarithmicDepth(viewZ: Node, near: Node, far: Node): Node; +export function logarithmicDepthToViewZ(depth: Node, near: Node, far: Node): Node; +/** + * TSL object that represents the depth value for the current fragment. + * + * @tsl + * @type {ViewportDepthNode} + */ +export const depth: ViewportDepthNode; +/** + * TSL function for converting a perspective depth value to linear depth. + * + * @tsl + * @function + * @param {?Node} [value=null] - The perspective depth. If `null` is provided, the current fragment's depth is used. + * @returns {ViewportDepthNode} + */ +export const linearDepth: any; +/** + * TSL object that represents the linear (orthographic) depth value of the current fragment + * + * @tsl + * @type {ViewportDepthNode} + */ +export const viewportLinearDepth: ViewportDepthNode; +/** + * This node offers a collection of features in context of the depth logic in the fragment shader. + * Depending on {@link ViewportDepthNode#scope}, it can be used to define a depth value for the current + * fragment or for depth evaluation purposes. + * + * @augments Node + */ +declare class ViewportDepthNode extends Node { + /** + * Constructs a new viewport depth node. + * + * @param {('depth'|'depthBase'|'linearDepth')} scope - The node's scope. + * @param {?Node} [valueNode=null] - The value node. + */ + constructor(scope: ("depth" | "depthBase" | "linearDepth"), valueNode?: Node | null); + /** + * The node behaves differently depending on which scope is selected. + * + * - `ViewportDepthNode.DEPTH_BASE`: Allows to define a value for the current fragment's depth. + * - `ViewportDepthNode.DEPTH`: Represents the depth value for the current fragment (`valueNode` is ignored). + * - `ViewportDepthNode.LINEAR_DEPTH`: Represents the linear (orthographic) depth value of the current fragment. + * If a `valueNode` is set, the scope can be used to convert perspective depth data to linear data. + * + * @type {('depth'|'depthBase'|'linearDepth')} + */ + scope: ("depth" | "depthBase" | "linearDepth"); + /** + * Can be used to define a custom depth value. + * The property is ignored in the `ViewportDepthNode.DEPTH` scope. + * + * @type {?Node} + * @default null + */ + valueNode: Node | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isViewportDepthNode: boolean; + generate(builder: any): any; + setup({ camera }: { + camera: any; + }): any; +} +declare namespace ViewportDepthNode { + let DEPTH_BASE: string; + let DEPTH: string; + let LINEAR_DEPTH: string; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ViewportDepthTextureNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ViewportDepthTextureNode.d.ts new file mode 100644 index 000000000..c70252a7e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/display/ViewportDepthTextureNode.d.ts @@ -0,0 +1,31 @@ +export default ViewportDepthTextureNode; +/** + * TSL function for a viewport depth texture node. + * + * @tsl + * @function + * @param {?Node} [uvNode=screenUV] - The uv node. + * @param {?Node} [levelNode=null] - The level node. + * @param {?DepthTexture} [depthTexture=null] - A depth texture. If not provided, a depth texture is created automatically. + * @returns {ViewportDepthTextureNode} + */ +export const viewportDepthTexture: any; +/** + * Represents the depth of the current viewport as a texture. This module + * can be used in combination with viewport texture to achieve effects + * that require depth evaluation. + * + * @augments ViewportTextureNode + */ +declare class ViewportDepthTextureNode extends ViewportTextureNode { + /** + * Constructs a new viewport depth texture node. + * + * @param {Node} [uvNode=screenUV] - The uv node. + * @param {?Node} [levelNode=null] - The level node. + * @param {?DepthTexture} [depthTexture=null] - A depth texture. If not provided, uses a shared depth texture. + */ + constructor(uvNode?: Node, levelNode?: Node | null, depthTexture?: DepthTexture | null); +} +import ViewportTextureNode from './ViewportTextureNode.js'; +import { DepthTexture } from '../../textures/DepthTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ViewportSharedTextureNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ViewportSharedTextureNode.d.ts new file mode 100644 index 000000000..46859c337 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/display/ViewportSharedTextureNode.d.ts @@ -0,0 +1,37 @@ +export default ViewportSharedTextureNode; +/** + * TSL function for creating a shared viewport texture node. + * + * @tsl + * @function + * @param {?Node} [uvNode=screenUV] - The uv node. + * @param {?Node} [levelNode=null] - The level node. + * @returns {ViewportSharedTextureNode} + */ +export const viewportSharedTexture: any; +/** + * `ViewportTextureNode` creates an internal texture for each node instance. This module + * shares a texture across all instances of `ViewportSharedTextureNode`. It should + * be the first choice when using data of the default/screen framebuffer for performance reasons. + * + * @augments ViewportTextureNode + */ +declare class ViewportSharedTextureNode extends ViewportTextureNode { + /** + * Constructs a new viewport shared texture node. + * + * @param {Node} [uvNode=screenUV] - The uv node. + * @param {?Node} [levelNode=null] - The level node. + */ + constructor(uvNode?: Node, levelNode?: Node | null); + /** + * Overwritten so the method always returns the unique shared + * framebuffer texture. + * + * @return {FramebufferTexture} The shared framebuffer texture. + */ + getTextureForReference(): FramebufferTexture; + updateReference(): this; +} +import ViewportTextureNode from './ViewportTextureNode.js'; +import { FramebufferTexture } from '../../textures/FramebufferTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ViewportTextureNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ViewportTextureNode.d.ts new file mode 100644 index 000000000..e679f9d6a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/display/ViewportTextureNode.d.ts @@ -0,0 +1,89 @@ +export default ViewportTextureNode; +/** + * TSL function for creating a viewport texture node. + * + * @tsl + * @function + * @param {?Node} [uvNode=screenUV] - The uv node. + * @param {?Node} [levelNode=null] - The level node. + * @param {?Texture} [framebufferTexture=null] - A framebuffer texture holding the viewport data. If not provided, a framebuffer texture is created automatically. + * @returns {ViewportTextureNode} + */ +export const viewportTexture: any; +/** + * TSL function for creating a viewport texture node with enabled mipmap generation. + * + * @tsl + * @function + * @param {?Node} [uvNode=screenUV] - The uv node. + * @param {?Node} [levelNode=null] - The level node. + * @param {?Texture} [framebufferTexture=null] - A framebuffer texture holding the viewport data. If not provided, a framebuffer texture is created automatically. + * @returns {ViewportTextureNode} + */ +export const viewportMipTexture: any; +export function viewportOpaqueMipTexture(uv?: Node | null, level?: Node | null): ViewportTextureNode; +/** + * A special type of texture node which represents the data of the current viewport + * as a texture. The module extracts data from the current bound framebuffer with + * a copy operation so no extra render pass is required to produce the texture data + * (which is good for performance). `ViewportTextureNode` can be used as an input for a + * variety of effects like refractive or transmissive materials. + * + * @augments TextureNode + */ +declare class ViewportTextureNode extends TextureNode { + /** + * Constructs a new viewport texture node. + * + * @param {Node} [uvNode=screenUV] - The uv node. + * @param {?Node} [levelNode=null] - The level node. + * @param {?Texture} [framebufferTexture=null] - A framebuffer texture holding the viewport data. If not provided, a framebuffer texture is created automatically. + */ + constructor(uvNode?: Node, levelNode?: Node | null, framebufferTexture?: Texture | null); + /** + * Whether to generate mipmaps or not. + * + * @type {boolean} + * @default false + */ + generateMipmaps: boolean; + /** + * The reference framebuffer texture. This is used to store the framebuffer texture + * for the current render target. If the render target changes, a new framebuffer texture + * is created automatically. + * + * @type {FramebufferTexture} + * @default null + */ + defaultFramebuffer: FramebufferTexture; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isOutputTextureNode: boolean; + /** + * The framebuffer texture for the current renderer context. + * + * @type {WeakMap} + * @private + */ + private _cacheTextures; + /** + * This methods returns a texture for the given render target or canvas target reference. + * + * To avoid rendering errors, `ViewportTextureNode` must use unique framebuffer textures + * for different render contexts. + * + * @param {?(RenderTarget|CanvasTarget)} [reference=null] - The render target or canvas target reference. + * @return {Texture} The framebuffer texture. + */ + getTextureForReference(reference?: (RenderTarget | CanvasTarget) | null): Texture; + updateReference(frame: any): import("../../Three.Core.js").Texture; + updateBefore(frame: any): void; + clone(): any; +} +import TextureNode from '../accessors/TextureNode.js'; +import { FramebufferTexture } from '../../textures/FramebufferTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/fog/Fog.d.ts b/jsdoc-testing/jsdoc/src/nodes/fog/Fog.d.ts new file mode 100644 index 000000000..34f7636b6 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/fog/Fog.d.ts @@ -0,0 +1,38 @@ +/** + * Constructs a new range factor node. + * + * @tsl + * @function + * @param {Node} near - Defines the near value. + * @param {Node} far - Defines the far value. + */ +export const rangeFogFactor: () => void; +/** + * Represents an exponential squared fog. This type of fog gives + * a clear view near the camera and a faster than exponentially + * densening fog farther from the camera. + * + * @tsl + * @function + * @param {Node} density - Defines the fog density. + */ +export const densityFogFactor: () => void; +/** + * Constructs a new height fog factor node. This fog factor requires a Y-up coordinate system. + * + * @tsl + * @function + * @param {Node} density - Defines the fog density. + * @param {Node} height - The height threshold in world space. Everything below this y-coordinate is affected by fog. + */ +export const exponentialHeightFogFactor: () => void; +/** + * This class can be used to configure a fog for the scene. + * Nodes of this type are assigned to `Scene.fogNode`. + * + * @tsl + * @function + * @param {Node} color - Defines the color of the fog. + * @param {Node} factor - Defines how the fog is factored in the scene. + */ +export const fog: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_GGX.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_GGX.d.ts new file mode 100644 index 000000000..c47f5559a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_GGX.d.ts @@ -0,0 +1,2 @@ +export default BRDF_GGX; +declare const BRDF_GGX: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_GGX_Multiscatter.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_GGX_Multiscatter.d.ts new file mode 100644 index 000000000..7da6ffd76 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_GGX_Multiscatter.d.ts @@ -0,0 +1,2 @@ +export default BRDF_GGX_Multiscatter; +declare const BRDF_GGX_Multiscatter: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_Lambert.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_Lambert.d.ts new file mode 100644 index 000000000..71b76485d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_Lambert.d.ts @@ -0,0 +1,2 @@ +export default BRDF_Lambert; +declare const BRDF_Lambert: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_Sheen.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_Sheen.d.ts new file mode 100644 index 000000000..eb31b60ad --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_Sheen.d.ts @@ -0,0 +1,2 @@ +export default BRDF_Sheen; +declare const BRDF_Sheen: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/DFGLUT.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/DFGLUT.d.ts new file mode 100644 index 000000000..5a20667ef --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/DFGLUT.d.ts @@ -0,0 +1,2 @@ +export default DFGLUT; +declare const DFGLUT: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/D_GGX.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/D_GGX.d.ts new file mode 100644 index 000000000..ee1081261 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/D_GGX.d.ts @@ -0,0 +1,2 @@ +export default D_GGX; +declare const D_GGX: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts new file mode 100644 index 000000000..788dd6c3b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts @@ -0,0 +1,2 @@ +export default D_GGX_Anisotropic; +declare const D_GGX_Anisotropic: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/EnvironmentBRDF.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/EnvironmentBRDF.d.ts new file mode 100644 index 000000000..ebc316a79 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/EnvironmentBRDF.d.ts @@ -0,0 +1,2 @@ +export default EnvironmentBRDF; +declare const EnvironmentBRDF: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/F_Schlick.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/F_Schlick.d.ts new file mode 100644 index 000000000..a1d2caea7 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/F_Schlick.d.ts @@ -0,0 +1,2 @@ +export default F_Schlick; +declare const F_Schlick: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/LTC.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/LTC.d.ts new file mode 100644 index 000000000..3f41af9a6 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/LTC.d.ts @@ -0,0 +1,3 @@ +export const LTC_Evaluate: any; +export const LTC_Evaluate_Volume: any; +export const LTC_Uv: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/Schlick_to_F0.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/Schlick_to_F0.d.ts new file mode 100644 index 000000000..316542c93 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/Schlick_to_F0.d.ts @@ -0,0 +1,2 @@ +export default Schlick_to_F0; +declare const Schlick_to_F0: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts new file mode 100644 index 000000000..aeaeb6109 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts @@ -0,0 +1,2 @@ +export default V_GGX_SmithCorrelated; +declare const V_GGX_SmithCorrelated: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts new file mode 100644 index 000000000..7c2c87243 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts @@ -0,0 +1,2 @@ +export default V_GGX_SmithCorrelated_Anisotropic; +declare const V_GGX_SmithCorrelated_Anisotropic: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BasicLightingModel.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BasicLightingModel.d.ts new file mode 100644 index 000000000..3db9024d7 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/BasicLightingModel.d.ts @@ -0,0 +1,23 @@ +export default BasicLightingModel; +/** + * Represents the lighting model for unlit materials. The only light contribution + * is baked indirect lighting modulated with ambient occlusion and the material's + * diffuse color. Environment mapping is supported. Used in {@link MeshBasicNodeMaterial}. + * + * @augments LightingModel + */ +declare class BasicLightingModel extends LightingModel { + /** + * Implements the baked indirect lighting with its modulation. + * + * @param {NodeBuilder} builder - The current node builder. + */ + indirect({ context }: NodeBuilder): void; + /** + * Implements the environment mapping. + * + * @param {NodeBuilder} builder - The current node builder. + */ + finish(builder: NodeBuilder): void; +} +import LightingModel from '../core/LightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/PhongLightingModel.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/PhongLightingModel.d.ts new file mode 100644 index 000000000..8d016e0a0 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/PhongLightingModel.d.ts @@ -0,0 +1,31 @@ +export default PhongLightingModel; +/** + * Represents the lighting model for a phong material. Used in {@link MeshPhongNodeMaterial}. + * + * @augments BasicLightingModel + */ +declare class PhongLightingModel extends BasicLightingModel { + /** + * Constructs a new phong lighting model. + * + * @param {boolean} [specular=true] - Whether specular is supported or not. + */ + constructor(specular?: boolean); + /** + * Whether specular is supported or not. Set this to `false` if you are + * looking for a Lambert-like material meaning a material for non-shiny + * surfaces, without specular highlights. + * + * @type {boolean} + * @default true + */ + specular: boolean; + /** + * Implements the direct lighting. The specular portion is optional an can be controlled + * with the {@link PhongLightingModel#specular} flag. + * + * @param {Object} lightData - The light data. + */ + direct({ lightDirection, lightColor, reflectedLight }: Object): void; +} +import BasicLightingModel from './BasicLightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/PhysicalLightingModel.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/PhysicalLightingModel.d.ts new file mode 100644 index 000000000..3b3294a26 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/PhysicalLightingModel.d.ts @@ -0,0 +1,171 @@ +export default PhysicalLightingModel; +/** + * Represents the lighting model for a PBR material. + * + * @augments LightingModel + */ +declare class PhysicalLightingModel extends LightingModel { + /** + * Constructs a new physical lighting model. + * + * @param {boolean} [clearcoat=false] - Whether clearcoat is supported or not. + * @param {boolean} [sheen=false] - Whether sheen is supported or not. + * @param {boolean} [iridescence=false] - Whether iridescence is supported or not. + * @param {boolean} [anisotropy=false] - Whether anisotropy is supported or not. + * @param {boolean} [transmission=false] - Whether transmission is supported or not. + * @param {boolean} [dispersion=false] - Whether dispersion is supported or not. + */ + constructor(clearcoat?: boolean, sheen?: boolean, iridescence?: boolean, anisotropy?: boolean, transmission?: boolean, dispersion?: boolean); + /** + * Whether clearcoat is supported or not. + * + * @type {boolean} + * @default false + */ + clearcoat: boolean; + /** + * Whether sheen is supported or not. + * + * @type {boolean} + * @default false + */ + sheen: boolean; + /** + * Whether iridescence is supported or not. + * + * @type {boolean} + * @default false + */ + iridescence: boolean; + /** + * Whether anisotropy is supported or not. + * + * @type {boolean} + * @default false + */ + anisotropy: boolean; + /** + * Whether transmission is supported or not. + * + * @type {boolean} + * @default false + */ + transmission: boolean; + /** + * Whether dispersion is supported or not. + * + * @type {boolean} + * @default false + */ + dispersion: boolean; + /** + * The clear coat radiance. + * + * @type {?Node} + * @default null + */ + clearcoatRadiance: Node | null; + /** + * The clear coat specular direct. + * + * @type {?Node} + * @default null + */ + clearcoatSpecularDirect: Node | null; + /** + * The clear coat specular indirect. + * + * @type {?Node} + * @default null + */ + clearcoatSpecularIndirect: Node | null; + /** + * The sheen specular direct. + * + * @type {?Node} + * @default null + */ + sheenSpecularDirect: Node | null; + /** + * The sheen specular indirect. + * + * @type {?Node} + * @default null + */ + sheenSpecularIndirect: Node | null; + /** + * The iridescence Fresnel. + * + * @type {?Node} + * @default null + */ + iridescenceFresnel: Node | null; + /** + * The iridescence F0. + * + * @type {?Node} + * @default null + */ + iridescenceF0: Node | null; + /** + * The iridescence F0 dielectric. + * + * @type {?Node} + * @default null + */ + iridescenceF0Dielectric: Node | null; + /** + * The iridescence F0 metallic. + * + * @type {?Node} + * @default null + */ + iridescenceF0Metallic: Node | null; + computeMultiscattering(singleScatter: any, multiScatter: any, specularF90: any, f0: any, iridescenceF0?: null): void; + /** + * Implements the direct light. + * + * @param {Object} lightData - The light data. + * @param {NodeBuilder} builder - The current node builder. + */ + direct({ lightDirection, lightColor, reflectedLight }: Object): void; + /** + * This method is intended for implementing the direct light term for + * rect area light nodes. + * + * @param {Object} input - The input data. + * @param {NodeBuilder} builder - The current node builder. + */ + directRectArea({ lightColor, lightPosition, halfWidth, halfHeight, reflectedLight, ltc_1, ltc_2 }: Object): void; + /** + * Implements the indirect lighting. + * + * @param {NodeBuilder} builder - The current node builder. + */ + indirect(builder: NodeBuilder): void; + /** + * Implements the indirect diffuse term. + * + * @param {NodeBuilder} builder - The current node builder. + */ + indirectDiffuse(builder: NodeBuilder): void; + /** + * Implements the indirect specular term. + * + * @param {NodeBuilder} builder - The current node builder. + */ + indirectSpecular(builder: NodeBuilder): void; + /** + * Implements the ambient occlusion term. + * + * @param {NodeBuilder} builder - The current node builder. + */ + ambientOcclusion(builder: NodeBuilder): void; + /** + * Used for final lighting accumulations depending on the requested features. + * + * @param {NodeBuilder} builder - The current node builder. + */ + finish({ context }: NodeBuilder): void; +} +import LightingModel from '../core/LightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/ShadowMaskModel.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/ShadowMaskModel.d.ts new file mode 100644 index 000000000..84e3d6ecf --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/ShadowMaskModel.d.ts @@ -0,0 +1,27 @@ +export default ShadowMaskModel; +/** + * Represents lighting model for a shadow material. Used in {@link ShadowNodeMaterial}. + * + * @augments LightingModel + */ +declare class ShadowMaskModel extends LightingModel { + /** + * The shadow mask node. + * + * @type {Node} + */ + shadowNode: Node; + /** + * Only used to save the shadow mask. + * + * @param {Object} input - The input data. + */ + direct({ lightNode }: Object): void; + /** + * Uses the shadow mask to produce the final color. + * + * @param {NodeBuilder} builder - The current node builder. + */ + finish({ context }: NodeBuilder): void; +} +import LightingModel from '../core/LightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/ToonLightingModel.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/ToonLightingModel.d.ts new file mode 100644 index 000000000..420e9ee87 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/ToonLightingModel.d.ts @@ -0,0 +1,23 @@ +export default ToonLightingModel; +/** + * Represents the lighting model for a toon material. Used in {@link MeshToonNodeMaterial}. + * + * @augments LightingModel + */ +declare class ToonLightingModel extends LightingModel { + /** + * Implements the direct lighting. Instead of using a conventional smooth irradiance, the irradiance is + * reduced to a small number of discrete shades to create a comic-like, flat look. + * + * @param {Object} lightData - The light data. + * @param {NodeBuilder} builder - The current node builder. + */ + direct({ lightDirection, lightColor, reflectedLight }: Object, builder: NodeBuilder): void; + /** + * Implements the indirect lighting. + * + * @param {NodeBuilder} builder - The current node builder. + */ + indirect(builder: NodeBuilder): void; +} +import LightingModel from '../core/LightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/VolumetricLightingModel.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/VolumetricLightingModel.d.ts new file mode 100644 index 000000000..1cf33cba5 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/VolumetricLightingModel.d.ts @@ -0,0 +1,25 @@ +export default VolumetricLightingModel; +/** + * VolumetricLightingModel class extends the LightingModel to implement volumetric lighting effects. + * This model calculates the scattering and transmittance of light through a volumetric medium. + * It dynamically adjusts the direction of the ray based on the camera and object positions. + * The model supports custom scattering and depth nodes to enhance the lighting effects. + * + * @augments LightingModel + */ +declare class VolumetricLightingModel extends LightingModel { + start(builder: any): void; + scatteringLight(lightColor: any, builder: any): void; + direct({ lightNode, lightColor }: { + lightNode: any; + lightColor: any; + }, builder: any): void; + directRectArea({ lightColor, lightPosition, halfWidth, halfHeight }: { + lightColor: any; + lightPosition: any; + halfWidth: any; + halfHeight: any; + }, builder: any): void; + finish(builder: any): void; +} +import LightingModel from '../core/LightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/material/getAlphaHashThreshold.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/material/getAlphaHashThreshold.d.ts new file mode 100644 index 000000000..30b15c98e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/material/getAlphaHashThreshold.d.ts @@ -0,0 +1,2 @@ +export default getAlphaHashThreshold; +declare const getAlphaHashThreshold: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/material/getGeometryRoughness.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/material/getGeometryRoughness.d.ts new file mode 100644 index 000000000..30ea57be5 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/material/getGeometryRoughness.d.ts @@ -0,0 +1,2 @@ +export default getGeometryRoughness; +declare const getGeometryRoughness: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/material/getParallaxCorrectNormal.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/material/getParallaxCorrectNormal.d.ts new file mode 100644 index 000000000..4c4a103a4 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/material/getParallaxCorrectNormal.d.ts @@ -0,0 +1,19 @@ +export default getParallaxCorrectNormal; +/** + * This computes a parallax corrected normal which is used for box-projected cube mapping (BPCEM). + * + * Reference: {@link https://devlog-martinsh.blogspot.com/2011/09/box-projected-cube-environment-mapping.html} + * + * ```js + * const uvNode = getParallaxCorrectNormal( reflectVector, vec3( 200, 100, 100 ), vec3( 0, - 50, 0 ) ); + * material.envNode = pmremTexture( renderTarget.texture, uvNode ); + * ``` + * + * @tsl + * @function + * @param {Node} normal - The normal to correct. + * @param {Node} cubeSize - The cube size should reflect the size of the environment (BPCEM is usually applied in closed environments like rooms). + * @param {Node} cubePos - The cube position. + * @return {Node} The parallax corrected normal. + */ +declare const getParallaxCorrectNormal: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/material/getRoughness.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/material/getRoughness.d.ts new file mode 100644 index 000000000..18eff5982 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/material/getRoughness.d.ts @@ -0,0 +1,2 @@ +export default getRoughness; +declare const getRoughness: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/material/getShIrradianceAt.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/material/getShIrradianceAt.d.ts new file mode 100644 index 000000000..627b15982 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/functions/material/getShIrradianceAt.d.ts @@ -0,0 +1,2 @@ +export default getShIrradianceAt; +declare const getShIrradianceAt: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/geometry/RangeNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/geometry/RangeNode.d.ts new file mode 100644 index 000000000..3630a9978 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/geometry/RangeNode.d.ts @@ -0,0 +1,68 @@ +export default RangeNode; +/** + * TSL function for creating a range node. + * + * @tsl + * @function + * @param {Node} [minNode=float()] - A node defining the lower bound of the range. + * @param {Node} [maxNode=float()] - A node defining the upper bound of the range. + * @returns {RangeNode} + */ +export const range: any; +/** + * `RangeNode` generates random instanced attribute data in a defined range. + * An exemplary use case for this utility node is to generate random per-instance + * colors: + * ```js + * const material = new MeshBasicNodeMaterial(); + * material.colorNode = range( new Color( 0x000000 ), new Color( 0xFFFFFF ) ); + * const mesh = new InstancedMesh( geometry, material, count ); + * ``` + * @augments Node + */ +declare class RangeNode extends Node { + /** + * Constructs a new range node. + * + * @param {Node} [minNode=float()] - A node defining the lower bound of the range. + * @param {Node} [maxNode=float()] - A node defining the upper bound of the range. + */ + constructor(minNode?: Node, maxNode?: Node); + /** + * A node defining the lower bound of the range. + * + * @type {Node} + * @default float() + */ + minNode: Node; + /** + * A node defining the upper bound of the range. + * + * @type {Node} + * @default float() + */ + maxNode: Node; + /** + * Returns the vector length which is computed based on the range definition. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {number} The vector length. + */ + getVectorLength(builder: NodeBuilder): number; + /** + * This method is overwritten since the node type is inferred from range definition. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Returns a constant node from the given node by traversing it. + * + * @param {Node} node - The node to traverse. + * @returns {Node} The constant node, if found. + */ + getConstNode(node: Node): Node; + setup(builder: any): any; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/gpgpu/AtomicFunctionNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/gpgpu/AtomicFunctionNode.d.ts new file mode 100644 index 000000000..956f26c33 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/gpgpu/AtomicFunctionNode.d.ts @@ -0,0 +1,78 @@ +export default AtomicFunctionNode; +export function atomicFunc(method: string, pointerNode: Node, valueNode: Node): AtomicFunctionNode; +export function atomicLoad(pointerNode: Node): AtomicFunctionNode; +export function atomicStore(pointerNode: Node, valueNode: Node): AtomicFunctionNode; +export function atomicAdd(pointerNode: Node, valueNode: Node): AtomicFunctionNode; +export function atomicSub(pointerNode: Node, valueNode: Node): AtomicFunctionNode; +export function atomicMax(pointerNode: Node, valueNode: Node): AtomicFunctionNode; +export function atomicMin(pointerNode: Node, valueNode: Node): AtomicFunctionNode; +export function atomicAnd(pointerNode: Node, valueNode: Node): AtomicFunctionNode; +export function atomicOr(pointerNode: Node, valueNode: Node): AtomicFunctionNode; +export function atomicXor(pointerNode: Node, valueNode: Node): AtomicFunctionNode; +/** + * `AtomicFunctionNode` represents any function that can operate on atomic variable types + * within a shader. In an atomic function, any modification to an atomic variable will + * occur as an indivisible step with a defined order relative to other modifications. + * Accordingly, even if multiple atomic functions are modifying an atomic variable at once + * atomic operations will not interfere with each other. + * + * This node can only be used with a WebGPU backend. + * + * @augments Node + */ +declare class AtomicFunctionNode extends Node { + /** + * Constructs a new atomic function node. + * + * @param {string} method - The signature of the atomic function to construct. + * @param {Node} pointerNode - An atomic variable or element of an atomic buffer. + * @param {Node} valueNode - The value that mutates the atomic variable. + */ + constructor(method: string, pointerNode: Node, valueNode: Node); + /** + * The signature of the atomic function to construct. + * + * @type {string} + */ + method: string; + /** + * An atomic variable or element of an atomic buffer. + * + * @type {Node} + */ + pointerNode: Node; + /** + * A value that modifies the atomic variable. + * + * @type {Node} + */ + valueNode: Node; + /** + * Overwrites the default implementation to return the type of + * the pointer node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The input type. + */ + getInputType(builder: NodeBuilder): string; + /** + * Overwritten since the node type is inferred from the input type. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + generate(builder: any): any; +} +declare namespace AtomicFunctionNode { + let ATOMIC_LOAD: string; + let ATOMIC_STORE: string; + let ATOMIC_ADD: string; + let ATOMIC_SUB: string; + let ATOMIC_MAX: string; + let ATOMIC_MIN: string; + let ATOMIC_AND: string; + let ATOMIC_OR: string; + let ATOMIC_XOR: string; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/gpgpu/BarrierNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/gpgpu/BarrierNode.d.ts new file mode 100644 index 000000000..6879cc29f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/gpgpu/BarrierNode.d.ts @@ -0,0 +1,24 @@ +export default BarrierNode; +export function workgroupBarrier(): BarrierNode; +export function storageBarrier(): BarrierNode; +export function textureBarrier(): BarrierNode; +/** + * Represents a GPU control barrier that synchronizes compute operations within a given scope. + * + * This node can only be used with a WebGPU backend. + * + * @augments Node + */ +declare class BarrierNode extends Node { + /** + * Constructs a new barrier node. + * + * @param {string} scope - The scope defines the behavior of the node. + */ + constructor(scope: string); + scope: string; + isBarrierNode: boolean; + setup(builder: any): void; + generate(builder: any): void; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/gpgpu/ComputeBuiltinNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/gpgpu/ComputeBuiltinNode.d.ts new file mode 100644 index 000000000..d5dbfe59e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/gpgpu/ComputeBuiltinNode.d.ts @@ -0,0 +1,135 @@ +export default ComputeBuiltinNode; +/** + * Represents the number of workgroups dispatched by the compute shader. + * ```js + * // Run 512 invocations/threads with a workgroup size of 128. + * const computeFn = Fn(() => { + * + * // numWorkgroups.x = 4 + * storageBuffer.element(0).assign(numWorkgroups.x) + * + * })().compute(512, [128]); + * + * // Run 512 invocations/threads with the default workgroup size of 64. + * const computeFn = Fn(() => { + * + * // numWorkgroups.x = 8 + * storageBuffer.element(0).assign(numWorkgroups.x) + * + * })().compute(512); + * ``` + * + * @tsl + * @type {ComputeBuiltinNode} + */ +export const numWorkgroups: ComputeBuiltinNode; +/** + * Represents the 3-dimensional index of the workgroup the current compute invocation belongs to. + * ```js + * // Execute 12 compute threads with a workgroup size of 3. + * const computeFn = Fn( () => { + * + * If( workgroupId.x.mod( 2 ).equal( 0 ), () => { + * + * storageBuffer.element( instanceIndex ).assign( instanceIndex ); + * + * } ).Else( () => { + * + * storageBuffer.element( instanceIndex ).assign( 0 ); + * + * } ); + * + * } )().compute( 12, [ 3 ] ); + * + * // workgroupId.x = [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3]; + * // Buffer Output = [0, 1, 2, 0, 0, 0, 6, 7, 8, 0, 0, 0]; + * ``` + * + * @tsl + * @type {ComputeBuiltinNode} + */ +export const workgroupId: ComputeBuiltinNode; +/** + * A non-linearized 3-dimensional representation of the current invocation's position within a 3D global grid. + * + * @tsl + * @type {ComputeBuiltinNode} + */ +export const globalId: ComputeBuiltinNode; +/** + * A non-linearized 3-dimensional representation of the current invocation's position within a 3D workgroup grid. + * + * @tsl + * @type {ComputeBuiltinNode} + */ +export const localId: ComputeBuiltinNode; +/** + * A device dependent variable that exposes the size of the current invocation's subgroup. + * + * @tsl + * @type {ComputeBuiltinNode} + */ +export const subgroupSize: ComputeBuiltinNode; +/** + * `ComputeBuiltinNode` represents a compute-scope builtin value that expose information + * about the currently running dispatch and/or the device it is running on. + * + * This node can only be used with a WebGPU backend. + * + * @augments Node + */ +declare class ComputeBuiltinNode extends Node { + /** + * Constructs a new compute builtin node. + * + * @param {string} builtinName - The built-in name. + * @param {string} nodeType - The node type. + */ + constructor(builtinName: string, nodeType: string); + /** + * The built-in name. + * + * @private + * @type {string} + */ + private _builtinName; + /** + * This method is overwritten since hash is derived from the built-in name. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The hash. + */ + getHash(builder: NodeBuilder): string; + /** + * This method is overwritten since the node type is simply derived from `nodeType`.. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(): string; + /** + * Sets the builtin name. + * + * @param {string} builtinName - The built-in name. + * @return {ComputeBuiltinNode} A reference to this node. + */ + setBuiltinName(builtinName: string): ComputeBuiltinNode; + /** + * Returns the builtin name. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The builtin name. + */ + getBuiltinName(): string; + /** + * Whether the current node builder has the builtin or not. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {boolean} Whether the builder has the builtin or not. + */ + hasBuiltin(builder: NodeBuilder): boolean; + generate(builder: any, output: any): any; + serialize(data: any): void; + deserialize(data: any): void; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/gpgpu/ComputeNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/gpgpu/ComputeNode.d.ts new file mode 100644 index 000000000..66213c478 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/gpgpu/ComputeNode.d.ts @@ -0,0 +1,96 @@ +export default ComputeNode; +export function computeKernel(node: Node, workgroupSize?: Array): ComputeNode; +export function compute(node: Node, count: number | Array, workgroupSize?: Array): ComputeNode; +/** + * Represents a compute shader node. + * + * @augments Node + */ +declare class ComputeNode extends Node { + /** + * Constructs a new compute node. + * + * @param {Node} computeNode - The node that defines the compute shader logic. + * @param {Array} workgroupSize - An array defining the X, Y, and Z dimensions of the workgroup for compute shader execution. + */ + constructor(computeNode: Node, workgroupSize: Array); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isComputeNode: boolean; + /** + * The node that defines the compute shader logic. + * + * @type {Node} + */ + computeNode: Node; + /** + * An array defining the X, Y, and Z dimensions of the workgroup for compute shader execution. + * + * @type {Array} + * @default [ 64 ] + */ + workgroupSize: Array; + /** + * The total number of threads (invocations) to execute. If it is a number, it will be used + * to automatically generate bounds checking against `instanceIndex`. + * + * @type {number|Array} + */ + count: number | Array; + /** + * The dispatch size for workgroups on X, Y, and Z axes. + * Used directly if `count` is not provided. + * + * @type {number|Array} + */ + dispatchSize: number | Array; + /** + * A callback executed when the compute node finishes initialization. + * + * @type {?Function} + */ + onInitFunction: Function | null; + /** + * A uniform node holding the dispatch count for bounds checking. + * Created automatically when `count` is a number. + * + * @type {?UniformNode} + */ + countNode: UniformNode | null; + /** + * Sets the {@link ComputeNode#name} property. + * + * @param {string} name - The name of the uniform. + * @return {ComputeNode} A reference to this node. + */ + setName(name: string): ComputeNode; + /** + * Sets the {@link ComputeNode#name} property. + * + * @deprecated + * @param {string} name - The name of the uniform. + * @return {ComputeNode} A reference to this node. + */ + label(name: string): ComputeNode; + /** + * Sets the callback to run during initialization. + * + * @param {Function} callback - The callback function. + * @return {ComputeNode} A reference to this node. + */ + onInit(callback: Function): ComputeNode; + /** + * The method execute the compute for this node. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + updateBefore({ renderer }: NodeFrame): void; + setup(builder: any): string | Node | null; + generate(builder: any, output: any): any; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/gpgpu/SubgroupFunctionNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/gpgpu/SubgroupFunctionNode.d.ts new file mode 100644 index 000000000..19c603f9b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/gpgpu/SubgroupFunctionNode.d.ts @@ -0,0 +1,303 @@ +export default SubgroupFunctionNode; +/** + * Returns true if this invocation has the lowest subgroup_invocation_id + * among active invocations in the subgroup. + * + * @tsl + * @method + * @return {bool} The result of the computation. + */ +export const subgroupElect: any; +/** + * Returns a set of bitfields where the bit corresponding to subgroup_invocation_id + * is 1 if pred is true for that active invocation and 0 otherwise. + * + * @tsl + * @method + * @param {bool} pred - A boolean that sets the bit corresponding to the invocations subgroup invocation id. + * @return {vec4}- A bitfield corresponding to the pred value of each subgroup invocation. + */ +export const subgroupBallot: any; +/** + * A reduction that adds e among all active invocations and returns that result. + * + * @tsl + * @method + * @param {number} e - The value provided to the reduction by the current invocation. + * @return {number} The accumulated result of the reduction operation. + */ +export const subgroupAdd: any; +/** + * An inclusive scan returning the sum of e for all active invocations with subgroup_invocation_id less than or equal to this invocation. + * + * @tsl + * @method + * @param {number} e - The value provided to the inclusive scan by the current invocation. + * @return {number} The accumulated result of the inclusive scan operation. + */ +export const subgroupInclusiveAdd: any; +/** + * An exclusive scan that returns the sum of e for all active invocations with subgroup_invocation_id less than this invocation. + * + * @tsl + * @method + * @param {number} e - The value provided to the exclusive scan by the current invocation. + * @return {number} The accumulated result of the exclusive scan operation. + */ +export const subgroupExclusiveAdd: any; +/** + * A reduction that multiplies e among all active invocations and returns that result. + * + * @tsl + * @method + * @param {number} e - The value provided to the reduction by the current invocation. + * @return {number} The accumulated result of the reduction operation. + */ +export const subgroupMul: any; +/** + * An inclusive scan returning the product of e for all active invocations with subgroup_invocation_id less than or equal to this invocation. + * + * @tsl + * @method + * @param {number} e - The value provided to the inclusive scan by the current invocation. + * @return {number} The accumulated result of the inclusive scan operation. + */ +export const subgroupInclusiveMul: any; +/** + * An exclusive scan that returns the product of e for all active invocations with subgroup_invocation_id less than this invocation. + * + * @tsl + * @method + * @param {number} e - The value provided to the exclusive scan by the current invocation. + * @return {number} The accumulated result of the exclusive scan operation. + */ +export const subgroupExclusiveMul: any; +/** + * A reduction that performs a bitwise and of e among all active invocations and returns that result. + * + * @tsl + * @method + * @param {number} e - The value provided to the reduction by the current invocation. + * @return {number} The result of the reduction operation. + */ +export const subgroupAnd: any; +/** + * A reduction that performs a bitwise or of e among all active invocations and returns that result. + * + * @tsl + * @method + * @param {number} e - The value provided to the reduction by the current invocation. + * @return {number} The result of the reduction operation. + */ +export const subgroupOr: any; +/** + * A reduction that performs a bitwise xor of e among all active invocations and returns that result. + * + * @tsl + * @method + * @param {number} e - The value provided to the reduction by the current invocation. + * @return {number} The result of the reduction operation. + */ +export const subgroupXor: any; +/** + * A reduction that performs a min of e among all active invocations and returns that result. + * + * @tsl + * @method + * @param {number} e - The value provided to the reduction by the current invocation. + * @return {number} The result of the reduction operation. + */ +export const subgroupMin: any; +/** + * A reduction that performs a max of e among all active invocations and returns that result. + * + * @tsl + * @method + * @param {number} e - The value provided to the reduction by the current invocation. + * @return {number} The result of the reduction operation. + */ +export const subgroupMax: any; +/** + * Returns true if e is true for all active invocations in the subgroup. + * + * @tsl + * @method + * @return {bool} The result of the computation. + */ +export const subgroupAll: any; +/** + * Returns true if e is true for any active invocation in the subgroup + * + * @tsl + * @method + * @return {bool} The result of the computation. + */ +export const subgroupAny: any; +/** + * Broadcasts e from the active invocation with the lowest subgroup_invocation_id in the subgroup to all other active invocations. + * + * @tsl + * @method + * @param {number} e - The value to broadcast from the lowest subgroup invocation. + * @param {number} id - The subgroup invocation to broadcast from. + * @return {number} The broadcast value. + */ +export const subgroupBroadcastFirst: any; +/** + * Swaps e between invocations in the quad in the X direction. + * + * @tsl + * @method + * @param {number} e - The value to swap from the current invocation. + * @return {number} The value received from the swap operation. + */ +export const quadSwapX: any; +/** + * Swaps e between invocations in the quad in the Y direction. + * + * @tsl + * @method + * @param {number} e - The value to swap from the current invocation. + * @return {number} The value received from the swap operation. + */ +export const quadSwapY: any; +/** + * Swaps e between invocations in the quad diagonally. + * + * @tsl + * @method + * @param {number} e - The value to swap from the current invocation. + * @return {number} The value received from the swap operation. + */ +export const quadSwapDiagonal: any; +/** + * Broadcasts e from the invocation whose subgroup_invocation_id matches id, to all active invocations. + * + * @tsl + * @method + * @param {number} e - The value to broadcast from subgroup invocation 'id'. + * @param {number} id - The subgroup invocation to broadcast from. + * @return {number} The broadcast value. + */ +export const subgroupBroadcast: any; +/** + * Returns v from the active invocation whose subgroup_invocation_id matches id + * + * @tsl + * @method + * @param {number} v - The value to return from subgroup invocation id^mask. + * @param {number} id - The subgroup invocation which returns the value v. + * @return {number} The broadcast value. + */ +export const subgroupShuffle: any; +/** + * Returns v from the active invocation whose subgroup_invocation_id matches subgroup_invocation_id ^ mask. + * + * @tsl + * @method + * @param {number} v - The value to return from subgroup invocation id^mask. + * @param {number} mask - A bitmask that determines the target invocation via a XOR operation. + * @return {number} The broadcast value. + */ +export const subgroupShuffleXor: any; +/** + * Returns v from the active invocation whose subgroup_invocation_id matches subgroup_invocation_id - delta + * + * @tsl + * @method + * @param {number} v - The value to return from subgroup invocation id^mask. + * @param {number} delta - A value that offsets the current in. + * @return {number} The broadcast value. + */ +export const subgroupShuffleUp: any; +/** + * Returns v from the active invocation whose subgroup_invocation_id matches subgroup_invocation_id + delta + * + * @tsl + * @method + * @param {number} v - The value to return from subgroup invocation id^mask. + * @param {number} delta - A value that offsets the current subgroup invocation. + * @return {number} The broadcast value. + */ +export const subgroupShuffleDown: any; +/** + * Broadcasts e from the quad invocation with id equal to id. + * + * @tsl + * @method + * @param {number} e - The value to broadcast. + * @return {number} The broadcast value. + */ +export const quadBroadcast: any; +/** + * This class represents a set of built in WGSL shader functions that sync + * synchronously execute an operation across a subgroup, or 'warp', of compute + * or fragment shader invocations within a workgroup. Typically, these functions + * will synchronously execute an operation using data from all active invocations + * within the subgroup, then broadcast that result to all active invocations. In + * other graphics APIs, subgroup functions are also referred to as wave intrinsics + * (DirectX/HLSL) or warp intrinsics (CUDA). + * + * @augments TempNode + */ +declare class SubgroupFunctionNode extends TempNode { + /** + * Constructs a new function node. + * + * @param {string} method - The subgroup/wave intrinsic method to construct. + * @param {Node} [aNode=null] - The method's first argument. + * @param {Node} [bNode=null] - The method's second argument. + */ + constructor(method: string, aNode?: Node, bNode?: Node); + /** + * The subgroup/wave intrinsic method to construct. + * + * @type {string} + */ + method: string; + /** + * The method's first argument. + * + * @type {Node} + */ + aNode: Node; + /** + * The method's second argument. + * + * @type {Node} + */ + bNode: Node; + getInputType(builder: any): any; + generateNodeType(builder: any): any; + generate(builder: any, output: any): any; + serialize(data: any): void; + deserialize(data: any): void; +} +declare namespace SubgroupFunctionNode { + let SUBGROUP_ELECT: string; + let SUBGROUP_BALLOT: string; + let SUBGROUP_ADD: string; + let SUBGROUP_INCLUSIVE_ADD: string; + let SUBGROUP_EXCLUSIVE_AND: string; + let SUBGROUP_MUL: string; + let SUBGROUP_INCLUSIVE_MUL: string; + let SUBGROUP_EXCLUSIVE_MUL: string; + let SUBGROUP_AND: string; + let SUBGROUP_OR: string; + let SUBGROUP_XOR: string; + let SUBGROUP_MIN: string; + let SUBGROUP_MAX: string; + let SUBGROUP_ALL: string; + let SUBGROUP_ANY: string; + let SUBGROUP_BROADCAST_FIRST: string; + let QUAD_SWAP_X: string; + let QUAD_SWAP_Y: string; + let QUAD_SWAP_DIAGONAL: string; + let SUBGROUP_BROADCAST: string; + let SUBGROUP_SHUFFLE: string; + let SUBGROUP_SHUFFLE_XOR: string; + let SUBGROUP_SHUFFLE_UP: string; + let SUBGROUP_SHUFFLE_DOWN: string; + let QUAD_BROADCAST: string; +} +import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/gpgpu/WorkgroupInfoNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/gpgpu/WorkgroupInfoNode.d.ts new file mode 100644 index 000000000..2d1de77bc --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/gpgpu/WorkgroupInfoNode.d.ts @@ -0,0 +1,119 @@ +export default WorkgroupInfoNode; +export function workgroupArray(type: string, count?: number): WorkgroupInfoNode; +/** + * A node allowing the user to create a 'workgroup' scoped buffer within the + * context of a compute shader. Typically, workgroup scoped buffers are + * created to hold data that is transferred from a global storage scope into + * a local workgroup scope. For invocations within a workgroup, data + * access speeds on 'workgroup' scoped buffers can be significantly faster + * than similar access operations on globally accessible storage buffers. + * + * This node can only be used with a WebGPU backend. + * + * @augments Node + */ +declare class WorkgroupInfoNode extends Node { + /** + * Constructs a new buffer scoped to type scope. + * + * @param {string} scope - TODO. + * @param {string} bufferType - The data type of a 'workgroup' scoped buffer element. + * @param {number} [bufferCount=0] - The number of elements in the buffer. + */ + constructor(scope: string, bufferType: string, bufferCount?: number); + /** + * The buffer type. + * + * @type {string} + */ + bufferType: string; + /** + * The buffer count. + * + * @type {number} + * @default 0 + */ + bufferCount: number; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWorkgroupInfoNode: boolean; + /** + * The data type of the array buffer. + * + * @type {string} + */ + elementType: string; + /** + * TODO. + * + * @type {string} + */ + scope: string; + /** + * Sets the name of this node. + * + * @param {string} name - The name to set. + * @return {WorkgroupInfoNode} A reference to this node. + */ + setName(name: string): WorkgroupInfoNode; + /** + * Sets the name/label of this node. + * + * @deprecated + * @param {string} name - The name to set. + * @return {WorkgroupInfoNode} A reference to this node. + */ + label(name: string): WorkgroupInfoNode; + /** + * Sets the scope of this node. + * + * @param {string} scope - The scope to set. + * @return {WorkgroupInfoNode} A reference to this node. + */ + setScope(scope: string): WorkgroupInfoNode; + /** + * The data type of the array buffer. + * + * @return {string} The element type. + */ + getElementType(): string; + /** + * Overwrites the default implementation since the input type + * is inferred from the scope. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The input type. + */ + getInputType(): string; + /** + * This method can be used to access elements via an index node. + * + * @param {IndexNode} indexNode - indexNode. + * @return {WorkgroupInfoElementNode} A reference to an element. + */ + element(indexNode: IndexNode): WorkgroupInfoElementNode; + generate(builder: any): any; +} +import Node from '../core/Node.js'; +/** + * Represents an element of a 'workgroup' scoped buffer. + * + * @augments ArrayElementNode + */ +declare class WorkgroupInfoElementNode extends ArrayElementNode { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWorkgroupInfoElementNode: boolean; + generate(builder: any, output: any): any; +} +import ArrayElementNode from '../utils/ArrayElementNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/AONode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/AONode.d.ts new file mode 100644 index 000000000..5c4e49ae2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/AONode.d.ts @@ -0,0 +1,25 @@ +export default AONode; +/** + * A generic class that can be used by nodes which contribute + * ambient occlusion to the scene. E.g. an ambient occlusion map + * node can be used as input for this module. Used in {@link NodeMaterial}. + * + * @augments LightingNode + */ +declare class AONode extends LightingNode { + /** + * Constructs a new AO node. + * + * @param {?Node} [aoNode=null] - The ambient occlusion node. + */ + constructor(aoNode?: Node | null); + /** + * The ambient occlusion node. + * + * @type {?Node} + * @default null + */ + aoNode: Node | null; + setup(builder: any): void; +} +import LightingNode from './LightingNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/AmbientLightNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/AmbientLightNode.d.ts new file mode 100644 index 000000000..5705b1d91 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/AmbientLightNode.d.ts @@ -0,0 +1,12 @@ +export default AmbientLightNode; +/** + * Module for representing ambient lights as nodes. + * + * @augments AnalyticLightNode + */ +declare class AmbientLightNode extends AnalyticLightNode { + setup({ context }: { + context: any; + }): void; +} +import AnalyticLightNode from './AnalyticLightNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/AnalyticLightNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/AnalyticLightNode.d.ts new file mode 100644 index 000000000..e1c0209aa --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/AnalyticLightNode.d.ts @@ -0,0 +1,127 @@ +export default AnalyticLightNode; +/** + * Base class for analytic light nodes. + * + * @augments LightingNode + */ +declare class AnalyticLightNode extends LightingNode { + /** + * Constructs a new analytic light node. + * + * @param {?Light} [light=null] - The light source. + */ + constructor(light?: Light | null); + /** + * The light source. + * + * @type {?Light} + * @default null + */ + light: Light | null; + /** + * The light's color value. + * + * @type {Color} + */ + color: Color; + /** + * The light's color node. Points to `colorNode` of the light source, if set. Otherwise + * it creates a uniform node based on {@link AnalyticLightNode#color}. + * + * @type {Node} + */ + colorNode: Node; + /** + * This property is used to retain a reference to the original value of {@link AnalyticLightNode#colorNode}. + * The final color node is represented by a different node when using shadows. + * + * @type {?Node} + * @default null + */ + baseColorNode: Node | null; + /** + * Represents the light's shadow. + * + * @type {?ShadowNode} + * @default null + */ + shadowNode: ShadowNode | null; + /** + * Represents the light's shadow color. + * + * @type {?Node} + * @default null + */ + shadowColorNode: Node | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isAnalyticLightNode: boolean; + _shadowDisposeListener: (() => void) | undefined; + /** + * Frees internal resources related to shadows. + */ + disposeShadow(): void; + getHash(): any; + /** + * Returns a node representing a direction vector which points from the current + * position in view space to the light's position in view space. + * + * @param {NodeBuilder} builder - The builder object used for setting up the light. + * @return {Node} The light vector node. + */ + getLightVector(builder: NodeBuilder): Node; + /** + * Sets up the direct lighting for the analytic light node. + * + * @abstract + * @param {NodeBuilder} builder - The builder object used for setting up the light. + * @return {Object|undefined} The direct light data (color and direction). + */ + setupDirect(): Object | undefined; + /** + * Sets up the direct rect area lighting for the analytic light node. + * + * @abstract + * @param {NodeBuilder} builder - The builder object used for setting up the light. + * @return {Object|undefined} The direct rect area light data. + */ + setupDirectRectArea(): Object | undefined; + /** + * Setups the shadow node for this light. The method exists so concrete light classes + * can setup different types of shadow nodes. + * + * @return {ShadowNode} The created shadow node. + */ + setupShadowNode(): ShadowNode; + /** + * Setups the shadow for this light. This method is only executed if the light + * cast shadows and the current build object receives shadows. It incorporates + * shadows into the lighting computation. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setupShadow(builder: NodeBuilder): void; + /** + * Unlike most other nodes, lighting nodes do not return a output node in {@link Node#setup}. + * The main purpose of lighting nodes is to configure the current {@link LightingModel} and/or + * invocate the respective interface methods. + * + * @param {NodeBuilder} builder - The current node builder. + */ + setup(builder: NodeBuilder): void; + /** + * The update method is used to update light uniforms per frame. + * Potentially overwritten in concrete light nodes to update light + * specific uniforms. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update(): void; +} +import LightingNode from './LightingNode.js'; +import { Color } from '../../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/BasicEnvironmentNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/BasicEnvironmentNode.d.ts new file mode 100644 index 000000000..701118341 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/BasicEnvironmentNode.d.ts @@ -0,0 +1,26 @@ +export default BasicEnvironmentNode; +/** + * Represents a basic model for Image-based lighting (IBL). The environment + * is defined via environment maps in the equirectangular or cube map format. + * `BasicEnvironmentNode` is intended for non-PBR materials like {@link MeshBasicNodeMaterial} + * or {@link MeshPhongNodeMaterial}. + * + * @augments LightingNode + */ +declare class BasicEnvironmentNode extends LightingNode { + /** + * Constructs a new basic environment node. + * + * @param {Node} [envNode=null] - A node representing the environment. + */ + constructor(envNode?: Node); + /** + * A node representing the environment. + * + * @type {Node} + * @default null + */ + envNode: Node; + setup(builder: any): void; +} +import LightingNode from './LightingNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/BasicLightMapNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/BasicLightMapNode.d.ts new file mode 100644 index 000000000..b5173c497 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/BasicLightMapNode.d.ts @@ -0,0 +1,24 @@ +export default BasicLightMapNode; +/** + * A specific version of {@link IrradianceNode} that is only relevant + * for {@link MeshBasicNodeMaterial}. Since the material is unlit, it + * requires a special scaling factor for the light map. + * + * @augments LightingNode + */ +declare class BasicLightMapNode extends LightingNode { + /** + * Constructs a new basic light map node. + * + * @param {?Node} [lightMapNode=null] - The light map node. + */ + constructor(lightMapNode?: Node | null); + /** + * The light map node. + * + * @type {?Node} + */ + lightMapNode: Node | null; + setup(builder: any): void; +} +import LightingNode from './LightingNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/DirectionalLightNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/DirectionalLightNode.d.ts new file mode 100644 index 000000000..723a2afc6 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/DirectionalLightNode.d.ts @@ -0,0 +1,13 @@ +export default DirectionalLightNode; +/** + * Module for representing directional lights as nodes. + * + * @augments AnalyticLightNode + */ +declare class DirectionalLightNode extends AnalyticLightNode { + setupDirect(): { + lightDirection: any; + lightColor: Node; + }; +} +import AnalyticLightNode from './AnalyticLightNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/EnvironmentNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/EnvironmentNode.d.ts new file mode 100644 index 000000000..6b87431fc --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/EnvironmentNode.d.ts @@ -0,0 +1,33 @@ +export default EnvironmentNode; +/** + * Represents a physical model for Image-based lighting (IBL). The environment + * is defined via environment maps in the equirectangular, cube map or cubeUV (PMREM) format. + * `EnvironmentNode` is intended for PBR materials like {@link MeshStandardNodeMaterial}. + * + * @augments LightingNode + */ +declare class EnvironmentNode extends LightingNode { + /** + * Constructs a new environment node. + * + * @param {Node} [envNode=null] - A node representing the environment. + */ + constructor(envNode?: Node); + /** + * A node representing the environment. + * + * @type {?Node} + * @default null + */ + envNode: Node | null; + setup(builder: any): void; + /** + * Returns the PMREM node cache of the current renderer. + * + * @private + * @param {Renderer} renderer - The current renderer. + * @return {WeakMap} The node cache. + */ + private _getPMREMNodeCache; +} +import LightingNode from './LightingNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/HemisphereLightNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/HemisphereLightNode.d.ts new file mode 100644 index 000000000..6612f6067 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/HemisphereLightNode.d.ts @@ -0,0 +1,34 @@ +export default HemisphereLightNode; +/** + * Module for representing hemisphere lights as nodes. + * + * @augments AnalyticLightNode + */ +declare class HemisphereLightNode extends AnalyticLightNode { + /** + * Uniform node representing the light's position. + * + * @type {UniformNode} + */ + lightPositionNode: UniformNode; + /** + * A node representing the light's direction. + * + * @type {Node} + */ + lightDirectionNode: Node; + /** + * Uniform node representing the light's ground color. + * + * @type {UniformNode} + */ + groundColorNode: UniformNode; + /** + * Overwritten to updated hemisphere light specific uniforms. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update(frame: NodeFrame): void; + setup(builder: any): void; +} +import AnalyticLightNode from './AnalyticLightNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/IESSpotLightNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/IESSpotLightNode.d.ts new file mode 100644 index 000000000..28a59eced --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/IESSpotLightNode.d.ts @@ -0,0 +1,16 @@ +export default IESSpotLightNode; +/** + * An IES version of the default spot light node. + * + * @augments SpotLightNode + */ +declare class IESSpotLightNode extends SpotLightNode { + /** + * The texture node representing the IES texture. + * + * @type {?TextureNode} + * @default null + */ + _iesTextureNode: TextureNode | null; +} +import SpotLightNode from './SpotLightNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/IrradianceNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/IrradianceNode.d.ts new file mode 100644 index 000000000..0498aea05 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/IrradianceNode.d.ts @@ -0,0 +1,24 @@ +export default IrradianceNode; +/** + * A generic class that can be used by nodes which contribute + * irradiance to the scene. E.g. a light map node can be used + * as input for this module. Used in {@link NodeMaterial}. + * + * @augments LightingNode + */ +declare class IrradianceNode extends LightingNode { + /** + * Constructs a new irradiance node. + * + * @param {Node} node - A node contributing irradiance. + */ + constructor(node: Node); + /** + * A node contributing irradiance. + * + * @type {Node} + */ + node: Node; + setup(builder: any): void; +} +import LightingNode from './LightingNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/LightProbeNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/LightProbeNode.d.ts new file mode 100644 index 000000000..02fd000fd --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/LightProbeNode.d.ts @@ -0,0 +1,22 @@ +export default LightProbeNode; +/** + * Module for representing light probes as nodes. + * + * @augments AnalyticLightNode + */ +declare class LightProbeNode extends AnalyticLightNode { + /** + * Light probe represented as a uniform of spherical harmonics. + * + * @type {UniformArrayNode} + */ + lightProbe: UniformArrayNode; + /** + * Overwritten to updated light probe specific uniforms. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update(frame: NodeFrame): void; + setup(builder: any): void; +} +import AnalyticLightNode from './AnalyticLightNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/LightUtils.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/LightUtils.d.ts new file mode 100644 index 000000000..9a60548b3 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/LightUtils.d.ts @@ -0,0 +1,11 @@ +/** + * Represents a `discard` shader operation in TSL. + * + * @method + * @param {Object} inputs - The input parameter object. + * @param {Node} inputs.lightDistance - The distance of the light's position to the current fragment position. + * @param {Node} inputs.cutoffDistance - The light's cutoff distance. + * @param {Node} inputs.decayExponent - The light's decay exponent. + * @return {Node} The distance falloff. + */ +export const getDistanceAttenuation: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/LightingContextNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/LightingContextNode.d.ts new file mode 100644 index 000000000..2917f05e4 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/LightingContextNode.d.ts @@ -0,0 +1,83 @@ +export default LightingContextNode; +export const lightingContext: any; +/** + * `LightingContextNode` represents an extension of the {@link ContextNode} module + * by adding lighting specific context data. It represents the runtime context of + * {@link LightsNode}. + * + * @augments ContextNode + */ +declare class LightingContextNode extends ContextNode { + /** + * Constructs a new lighting context node. + * + * @param {LightsNode} lightsNode - The lights node. + * @param {?LightingModel} [lightingModel=null] - The current lighting model. + * @param {?Node} [backdropNode=null] - A backdrop node. + * @param {?Node} [backdropAlphaNode=null] - A backdrop alpha node. + */ + constructor(lightsNode: LightsNode, lightingModel?: LightingModel | null, backdropNode?: Node | null, backdropAlphaNode?: Node | null); + /** + * The current lighting model. + * + * @type {?LightingModel} + * @default null + */ + lightingModel: LightingModel | null; + /** + * A backdrop node. + * + * @type {?Node} + * @default null + */ + backdropNode: Node | null; + /** + * A backdrop alpha node. + * + * @type {?Node} + * @default null + */ + backdropAlphaNode: Node | null; + _value: { + radiance: Node; + irradiance: Node; + iblIrradiance: Node; + ambientOcclusion: Node; + reflectedLight: { + directDiffuse: Node; + directSpecular: Node; + indirectDiffuse: Node; + indirectSpecular: Node; + }; + backdrop: Node; + backdropAlpha: Node; + } | null; + /** + * Returns a lighting context object. + * + * @return {{ + * radiance: Node, + * irradiance: Node, + * iblIrradiance: Node, + * ambientOcclusion: Node, + * reflectedLight: {directDiffuse: Node, directSpecular: Node, indirectDiffuse: Node, indirectSpecular: Node}, + * backdrop: Node, + * backdropAlpha: Node + * }} The lighting context object. + */ + getContext(): { + radiance: Node; + irradiance: Node; + iblIrradiance: Node; + ambientOcclusion: Node; + reflectedLight: { + directDiffuse: Node; + directSpecular: Node; + indirectDiffuse: Node; + indirectSpecular: Node; + }; + backdrop: Node; + backdropAlpha: Node; + }; +} +import ContextNode from '../core/ContextNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/LightingNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/LightingNode.d.ts new file mode 100644 index 000000000..adc145155 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/LightingNode.d.ts @@ -0,0 +1,21 @@ +export default LightingNode; +/** + * Base class for lighting nodes. + * + * @augments Node + */ +declare class LightingNode extends Node { + /** + * Constructs a new lighting node. + */ + constructor(); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLightingNode: boolean; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/LightsNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/LightsNode.d.ts new file mode 100644 index 000000000..6ecec5a31 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/LightsNode.d.ts @@ -0,0 +1,119 @@ +export default LightsNode; +export function lights(lights?: Array): LightsNode; +/** + * This node represents the scene's lighting and manages the lighting model's life cycle + * for the current build 3D object. It is responsible for computing the total outgoing + * light in a given lighting context. + * + * @augments Node + */ +declare class LightsNode extends Node { + /** + * Constructs a new lights node. + */ + constructor(); + /** + * A node representing the total diffuse light. + * + * @type {Node} + */ + totalDiffuseNode: Node; + /** + * A node representing the total specular light. + * + * @type {Node} + */ + totalSpecularNode: Node; + /** + * A node representing the outgoing light. + * + * @type {Node} + */ + outgoingLightNode: Node; + /** + * An array representing the lights in the scene. + * + * @private + * @type {Array} + */ + private _lights; + /** + * For each light in the scene, this node will create a + * corresponding light node. + * + * @private + * @type {?Array} + * @default null + */ + private _lightNodes; + /** + * A hash for identifying the current light nodes setup. + * + * @private + * @type {?string} + * @default null + */ + private _lightNodesHash; + /** + * Computes a hash value for identifying the current light nodes setup. + * + * @param {NodeBuilder} builder - A reference to the current node builder. + * @return {string} The computed hash. + */ + getHash(builder: NodeBuilder): string; + analyze(builder: any): void; + /** + * Creates lighting nodes for each scene light. This makes it possible to further + * process lights in the node system. + * + * @param {NodeBuilder} builder - A reference to the current node builder. + */ + setupLightsNode(builder: NodeBuilder): void; + /** + * Sets up a direct light in the lighting model. + * + * @param {Object} builder - The builder object containing the context and stack. + * @param {Object} lightNode - The light node. + * @param {Object} lightData - The light object containing color and direction properties. + */ + setupDirectLight(builder: Object, lightNode: Object, lightData: Object): void; + setupDirectRectAreaLight(builder: any, lightNode: any, lightData: any): void; + /** + * Setups the internal lights by building all respective + * light nodes. + * + * @param {NodeBuilder} builder - A reference to the current node builder. + * @param {Array} lightNodes - An array of lighting nodes. + */ + setupLights(builder: NodeBuilder, lightNodes: Array): void; + getLightNodes(builder: any): LightingNode[] | null; + /** + * The implementation makes sure that for each light in the scene + * there is a corresponding light node. By building the light nodes + * and evaluating the lighting model the outgoing light is computed. + * + * @param {NodeBuilder} builder - A reference to the current node builder. + * @return {Node} A node representing the outgoing light. + */ + setup(builder: NodeBuilder): Node; + /** + * Configures this node with an array of lights. + * + * @param {Array} lights - An array of lights. + * @return {LightsNode} A reference to this node. + */ + setLights(lights: Array): LightsNode; + /** + * Returns an array of the scene's lights. + * + * @return {Array} The scene's lights. + */ + getLights(): Array; + /** + * Whether the scene has lights or not. + * + * @type {boolean} + */ + get hasLights(): boolean; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/PointLightNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/PointLightNode.d.ts new file mode 100644 index 000000000..4dee5e49c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/PointLightNode.d.ts @@ -0,0 +1,40 @@ +export function directPointLight({ color, lightVector, cutoffDistance, decayExponent }: { + color: any; + lightVector: any; + cutoffDistance: any; + decayExponent: any; +}): { + lightDirection: any; + lightColor: any; +}; +export default PointLightNode; +/** + * Module for representing point lights as nodes. + * + * @augments AnalyticLightNode + */ +declare class PointLightNode extends AnalyticLightNode { + /** + * Uniform node representing the cutoff distance. + * + * @type {UniformNode} + */ + cutoffDistanceNode: UniformNode; + /** + * Uniform node representing the decay exponent. + * + * @type {UniformNode} + */ + decayExponentNode: UniformNode; + /** + * Overwritten to updated point light specific uniforms. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update(frame: NodeFrame): void; + setupDirect(builder: any): { + lightDirection: any; + lightColor: any; + }; +} +import AnalyticLightNode from './AnalyticLightNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/PointShadowNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/PointShadowNode.d.ts new file mode 100644 index 000000000..6215b48a3 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/PointShadowNode.d.ts @@ -0,0 +1,52 @@ +export const BasicPointShadowFilter: () => void; +/** + * A shadow filtering function for point lights using Vogel disk sampling and IGN. + * + * Uses 5 samples distributed via Vogel disk pattern in tangent space around the + * sample direction, rotated per-pixel using Interleaved Gradient Noise (IGN). + * + * @method + * @param {Object} inputs - The input parameter object. + * @param {CubeDepthTexture} inputs.depthTexture - A reference to the shadow cube map. + * @param {Node} inputs.bd3D - The normalized direction from light to fragment. + * @param {Node} inputs.dp - The depth value to compare against. + * @param {LightShadow} inputs.shadow - The light shadow. + * @return {Node} The filtering result. + */ +export const PointShadowFilter: () => void; +export default PointShadowNode; +export function pointShadow(light: PointLight, shadow?: PointLightShadow | null): PointShadowNode; +/** + * Represents the shadow implementation for point light nodes. + * + * @augments ShadowNode + */ +declare class PointShadowNode extends ShadowNode { + /** + * Overwrites the default implementation to only use point light specific + * shadow filter functions. + * + * @param {NodeBuilder} builder - A reference to the current node builder. + * @param {Object} inputs - A configuration object that defines the shadow filtering. + * @param {Function} inputs.filterFn - This function defines the filtering type of the shadow map e.g. PCF. + * @param {DepthTexture} inputs.depthTexture - A reference to the shadow map's depth texture. + * @param {Node} inputs.shadowCoord - Shadow coordinates which are used to sample from the shadow map. + * @param {LightShadow} inputs.shadow - The light shadow. + * @return {Node} The result node of the shadow filtering. + */ + setupShadowFilter(builder: NodeBuilder, { filterFn, depthTexture, shadowCoord, shadow }: { + filterFn: Function; + depthTexture: DepthTexture; + shadowCoord: Node; + shadow: LightShadow; + }): Node; + /** + * Overwrites the default implementation to create a CubeRenderTarget with CubeDepthTexture. + * + * @param {LightShadow} shadow - The light shadow object. + * @param {NodeBuilder} builder - A reference to the current node builder. + * @return {Object} An object containing the shadow map and depth texture. + */ + setupRenderTarget(shadow: LightShadow, builder: NodeBuilder): Object; +} +import ShadowNode from './ShadowNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/ProjectorLightNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/ProjectorLightNode.d.ts new file mode 100644 index 000000000..22f3ffe8b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/ProjectorLightNode.d.ts @@ -0,0 +1,17 @@ +export default ProjectorLightNode; +/** + * An implementation of a projector light node. + * + * @augments SpotLightNode + */ +declare class ProjectorLightNode extends SpotLightNode { + update(frame: any): void; + /** + * Overwrites the default implementation to compute projection attenuation. + * + * @param {NodeBuilder} builder - The node builder. + * @return {Node} The spot attenuation. + */ + getSpotAttenuation(builder: NodeBuilder): Node; +} +import SpotLightNode from './SpotLightNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/RectAreaLightNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/RectAreaLightNode.d.ts new file mode 100644 index 000000000..0b4d56420 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/RectAreaLightNode.d.ts @@ -0,0 +1,41 @@ +export default RectAreaLightNode; +/** + * Module for representing rect area lights as nodes. + * + * @augments AnalyticLightNode + */ +declare class RectAreaLightNode extends AnalyticLightNode { + /** + * Used to configure the internal BRDF approximation texture data. + * + * @param {RectAreaLightTexturesLib} ltc - The BRDF approximation texture data. + */ + static setLTC(ltc: RectAreaLightTexturesLib): void; + /** + * Uniform node representing the half height of the are light. + * + * @type {UniformNode} + */ + halfHeight: UniformNode; + /** + * Uniform node representing the half width of the are light. + * + * @type {UniformNode} + */ + halfWidth: UniformNode; + /** + * Overwritten to updated rect area light specific uniforms. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update(frame: NodeFrame): void; + setupDirectRectArea(builder: any): { + lightColor: Node; + lightPosition: UniformNode; + halfWidth: UniformNode; + halfHeight: UniformNode; + ltc_1: import("../accessors/TextureNode.js").default; + ltc_2: import("../accessors/TextureNode.js").default; + }; +} +import AnalyticLightNode from './AnalyticLightNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/ShadowBaseNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/ShadowBaseNode.d.ts new file mode 100644 index 000000000..fbbfa5fd2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/ShadowBaseNode.d.ts @@ -0,0 +1,46 @@ +/** + * TSL object that represents the vertex position in world space during the shadow pass. + * + * @tsl + * @type {Node} + */ +export const shadowPositionWorld: Node; +export default ShadowBaseNode; +import Node from '../core/Node.js'; +/** + * Base class for all shadow nodes. + * + * Shadow nodes encapsulate shadow related logic and are always coupled to lighting nodes. + * Lighting nodes might share the same shadow node type or use specific ones depending on + * their requirements. + * + * @augments Node + */ +declare class ShadowBaseNode extends Node { + /** + * Constructs a new shadow base node. + * + * @param {Light} light - The shadow casting light. + */ + constructor(light: Light); + /** + * The shadow casting light. + * + * @type {Light} + */ + light: Light; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isShadowBaseNode: boolean; + /** + * Setups the shadow position node which is by default the predefined TSL node object `shadowPositionWorld`. + * + * @param {NodeBuilder} object - A configuration object that must at least hold a material reference. + */ + setupShadowPosition({ context, material }: NodeBuilder): void; +} diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/ShadowFilterNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/ShadowFilterNode.d.ts new file mode 100644 index 000000000..2fb0664f6 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/ShadowFilterNode.d.ts @@ -0,0 +1,50 @@ +/** + * A shadow filtering function performing basic filtering. This is in fact an unfiltered version of the shadow map + * with a binary `[0,1]` result. + * + * @method + * @param {Object} inputs - The input parameter object. + * @param {DepthTexture} inputs.depthTexture - A reference to the shadow map's texture data. + * @param {Node} inputs.shadowCoord - The shadow coordinates. + * @return {Node} The filtering result. + */ +export const BasicShadowFilter: () => void; +/** + * A shadow filtering function performing PCF filtering with Vogel disk sampling and IGN. + * + * Uses 5 samples distributed via Vogel disk pattern, rotated per-pixel using Interleaved + * Gradient Noise (IGN) to break up banding artifacts. Combined with hardware PCF (4-tap + * filtering per sample), this effectively provides 20 filtered taps with better distribution. + * + * @method + * @param {Object} inputs - The input parameter object. + * @param {DepthTexture} inputs.depthTexture - A reference to the shadow map's texture data. + * @param {Node} inputs.shadowCoord - The shadow coordinates. + * @param {LightShadow} inputs.shadow - The light shadow. + * @return {Node} The filtering result. + */ +export const PCFShadowFilter: () => void; +/** + * A shadow filtering function performing PCF soft filtering. + * + * @method + * @param {Object} inputs - The input parameter object. + * @param {DepthTexture} inputs.depthTexture - A reference to the shadow map's texture data. + * @param {Node} inputs.shadowCoord - The shadow coordinates. + * @param {LightShadow} inputs.shadow - The light shadow. + * @return {Node} The filtering result. + */ +export const PCFSoftShadowFilter: () => void; +/** + * A shadow filtering function performing VSM filtering. + * + * @method + * @param {Object} inputs - The input parameter object. + * @param {DepthTexture} inputs.depthTexture - A reference to the shadow map's texture data. + * @param {Node} inputs.shadowCoord - The shadow coordinates. + * @return {Node} The filtering result. + */ +export const VSMShadowFilter: () => void; +export function getShadowMaterial(light: Light): NodeMaterial; +export function disposeShadowMaterial(light: Light): void; +import NodeMaterial from '../../materials/nodes/NodeMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/ShadowNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/ShadowNode.d.ts new file mode 100644 index 000000000..d98fa7418 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/ShadowNode.d.ts @@ -0,0 +1,193 @@ +export function getShadowRenderObjectFunction(renderer: Renderer, shadow: LightShadow, shadowType: number, useVelocity: boolean): shadowRenderObjectFunction; +export default ShadowNode; +export function shadow(light: Light, shadow?: LightShadow | null): ShadowNode; +/** + * Represents the default shadow implementation for lighting nodes. + * + * @augments ShadowBaseNode + */ +declare class ShadowNode extends ShadowBaseNode { + /** + * Constructs a new shadow node. + * + * @param {Light} light - The shadow casting light. + * @param {?LightShadow} [shadow=null] - An optional light shadow. + */ + constructor(light: Light, shadow?: LightShadow | null); + /** + * The light shadow which defines the properties light's + * shadow. + * + * @type {?LightShadow} + * @default null + */ + shadow: LightShadow | null; + /** + * A reference to the shadow map which is a render target. + * + * @type {?RenderTarget} + * @default null + */ + shadowMap: RenderTarget | null; + /** + * Only relevant for VSM shadows. Render target for the + * first VSM render pass. + * + * @type {?RenderTarget} + * @default null + */ + vsmShadowMapVertical: RenderTarget | null; + /** + * Only relevant for VSM shadows. Render target for the + * second VSM render pass. + * + * @type {?RenderTarget} + * @default null + */ + vsmShadowMapHorizontal: RenderTarget | null; + /** + * Only relevant for VSM shadows. Node material which + * is used to render the first VSM pass. + * + * @type {?NodeMaterial} + * @default null + */ + vsmMaterialVertical: NodeMaterial | null; + /** + * Only relevant for VSM shadows. Node material which + * is used to render the second VSM pass. + * + * @type {?NodeMaterial} + * @default null + */ + vsmMaterialHorizontal: NodeMaterial | null; + /** + * A reference to the output node which defines the + * final result of this shadow node. + * + * @type {?Node} + * @private + * @default null + */ + private _node; + /** + * The current shadow map type of this shadow node. + * + * @type {?number} + * @private + * @default null + */ + private _currentShadowType; + /** + * A Weak Map holding the current frame ID per camera. Used + * to control the update of shadow maps. + * + * @type {WeakMap} + * @private + */ + private _cameraFrameId; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isShadowNode: boolean; + /** + * This index can be used when overriding setupRenderTarget with a RenderTarget Array to specify the depth layer. + * + * @type {number} + * @readonly + * @default true + */ + readonly depthLayer: number; + /** + * Setups the shadow filtering. + * + * @param {NodeBuilder} builder - A reference to the current node builder. + * @param {Object} inputs - A configuration object that defines the shadow filtering. + * @param {Function} inputs.filterFn - This function defines the filtering type of the shadow map e.g. PCF. + * @param {DepthTexture} inputs.depthTexture - A reference to the shadow map's texture data. + * @param {Node} inputs.shadowCoord - Shadow coordinates which are used to sample from the shadow map. + * @param {LightShadow} inputs.shadow - The light shadow. + * @return {Node} The result node of the shadow filtering. + */ + setupShadowFilter(builder: NodeBuilder, { filterFn, depthTexture, shadowCoord, shadow, depthLayer }: { + filterFn: Function; + depthTexture: DepthTexture; + shadowCoord: Node; + shadow: LightShadow; + }): Node; + /** + * Setups the shadow coordinates. + * + * @param {NodeBuilder} builder - A reference to the current node builder. + * @param {Node} shadowPosition - A node representing the shadow position. + * @return {Node} The shadow coordinates. + */ + setupShadowCoord(builder: NodeBuilder, shadowPosition: Node): Node; + /** + * Returns the shadow filtering function for the given shadow type. + * + * @param {number} type - The shadow type. + * @return {Function} The filtering function. + */ + getShadowFilterFn(type: number): Function; + setupRenderTarget(shadow: any, builder: any): { + shadowMap: any; + depthTexture: DepthTexture; + }; + /** + * Setups the shadow output node. + * + * @param {NodeBuilder} builder - A reference to the current node builder. + * @return {Node} The shadow output node. + */ + setupShadow(builder: NodeBuilder): Node; + /** + * The implementation performs the setup of the output node. An output is only + * produces if shadow mapping is globally enabled in the renderer. + * + * @param {NodeBuilder} builder - A reference to the current node builder. + * @return {ShaderCallNodeInternal} The output node. + */ + setup(builder: NodeBuilder): ShaderCallNodeInternal; + /** + * Renders the shadow. The logic of this function could be included + * into {@link ShadowNode#updateShadow} however more specialized shadow + * nodes might require a custom shadow map rendering. By having a + * dedicated method, it's easier to overwrite the default behavior. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + renderShadow(frame: NodeFrame): void; + /** + * Updates the shadow. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + updateShadow(frame: NodeFrame): void; + _depthVersionCached: any; + /** + * For VSM additional render passes are required. + * + * @param {Renderer} renderer - A reference to the current renderer. + */ + vsmPass(renderer: Renderer): void; + /** + * Resets the resouce state of this shadow node. + * + * @private + */ + private _reset; + /** + * The implementation performs the update of the shadow map if necessary. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + updateBefore(frame: NodeFrame): void; +} +import ShadowBaseNode from './ShadowBaseNode.js'; +import NodeMaterial from '../../materials/nodes/NodeMaterial.js'; +import { DepthTexture } from '../../textures/DepthTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/SpotLightNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/SpotLightNode.d.ts new file mode 100644 index 000000000..84f17e937 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/lighting/SpotLightNode.d.ts @@ -0,0 +1,52 @@ +export default SpotLightNode; +/** + * Module for representing spot lights as nodes. + * + * @augments AnalyticLightNode + */ +declare class SpotLightNode extends AnalyticLightNode { + /** + * Uniform node representing the cone cosine. + * + * @type {UniformNode} + */ + coneCosNode: UniformNode; + /** + * Uniform node representing the penumbra cosine. + * + * @type {UniformNode} + */ + penumbraCosNode: UniformNode; + /** + * Uniform node representing the cutoff distance. + * + * @type {UniformNode} + */ + cutoffDistanceNode: UniformNode; + /** + * Uniform node representing the decay exponent. + * + * @type {UniformNode} + */ + decayExponentNode: UniformNode; + /** + * Overwritten to updated spot light specific uniforms. + * + * @param {NodeFrame} frame - A reference to the current node frame. + */ + update(frame: NodeFrame): void; + /** + * Computes the spot attenuation for the given angle. + * + * @param {NodeBuilder} builder - The node builder. + * @param {Node} angleCosine - The angle to compute the spot attenuation for. + * @return {Node} The spot attenuation. + */ + getSpotAttenuation(builder: NodeBuilder, angleCosine: Node): Node; + getLightCoord(builder: any): any; + setupDirect(builder: any): { + lightColor: any; + lightDirection: any; + }; +} +import AnalyticLightNode from './AnalyticLightNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/materialx/MaterialXNodes.d.ts b/jsdoc-testing/jsdoc/src/nodes/materialx/MaterialXNodes.d.ts new file mode 100644 index 000000000..c994857f8 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/materialx/MaterialXNodes.d.ts @@ -0,0 +1,44 @@ +export function mx_aastep(threshold: any, value: any): any; +export function mx_ramplr(valuel: any, valuer: any, texcoord?: AttributeNode): any; +export function mx_ramptb(valuet: any, valueb: any, texcoord?: AttributeNode): any; +export function mx_ramp4(valuetl: any, valuetr: any, valuebl: any, valuebr: any, texcoord?: AttributeNode): any; +export function mx_splitlr(valuel: any, valuer: any, center: any, texcoord?: AttributeNode): any; +export function mx_splittb(valuet: any, valueb: any, center: any, texcoord?: AttributeNode): any; +export function mx_transform_uv(uv_scale?: number, uv_offset?: number, uv_geo?: AttributeNode): any; +export function mx_safepower(in1: any, in2?: number): any; +export function mx_contrast(input: any, amount?: number, pivot?: number): any; +export function mx_noise_float(texcoord?: AttributeNode, amplitude?: number, pivot?: number): any; +export function mx_noise_vec3(texcoord?: AttributeNode, amplitude?: number, pivot?: number): any; +export function mx_noise_vec4(texcoord?: AttributeNode, amplitude?: number, pivot?: number): any; +export function mx_unifiednoise2d(noiseType: any, texcoord?: AttributeNode, freq?: any, offset?: any, jitter?: number, outmin?: number, outmax?: number, clampoutput?: boolean, octaves?: number, lacunarity?: number, diminish?: number): any; +export function mx_unifiednoise3d(noiseType: any, texcoord?: AttributeNode, freq?: any, offset?: any, jitter?: number, outmin?: number, outmax?: number, clampoutput?: boolean, octaves?: number, lacunarity?: number, diminish?: number): any; +export function mx_worley_noise_float(texcoord?: AttributeNode, jitter?: number): any; +export function mx_worley_noise_vec2(texcoord?: AttributeNode, jitter?: number): any; +export function mx_worley_noise_vec3(texcoord?: AttributeNode, jitter?: number): any; +export function mx_cell_noise_float(texcoord?: AttributeNode): any; +export function mx_fractal_noise_float(position?: AttributeNode, octaves?: number, lacunarity?: number, diminish?: number, amplitude?: number): any; +export function mx_fractal_noise_vec2(position?: AttributeNode, octaves?: number, lacunarity?: number, diminish?: number, amplitude?: number): any; +export function mx_fractal_noise_vec3(position?: AttributeNode, octaves?: number, lacunarity?: number, diminish?: number, amplitude?: number): any; +export function mx_fractal_noise_vec4(position?: AttributeNode, octaves?: number, lacunarity?: number, diminish?: number, amplitude?: number): any; +export function mx_add(in1: any, in2?: any): any; +export function mx_subtract(in1: any, in2?: any): any; +export function mx_multiply(in1: any, in2?: any): any; +export function mx_divide(in1: any, in2?: any): any; +export function mx_modulo(in1: any, in2?: any): any; +export function mx_power(in1: any, in2?: any): any; +export function mx_atan2(in1?: any, in2?: any): any; +export function mx_timer(): UniformNode; +export function mx_frame(): UniformNode; +export function mx_invert(in1: any, amount?: any): any; +export function mx_ifgreater(value1: any, value2: any, in1: any, in2: any): any; +export function mx_ifgreatereq(value1: any, value2: any, in1: any, in2: any): any; +export function mx_ifequal(value1: any, value2: any, in1: any, in2: any): any; +export function mx_separate(in1: any, channelOrOut?: null): any; +export function mx_place2d(texcoord: any, pivot?: any, scale?: any, rotate?: any, offset?: any): any; +export function mx_rotate2d(input: any, amount: any): any; +export function mx_rotate3d(input: any, amount: any, axis: any): any; +export function mx_heighttonormal(input: any, scale: any): any; +import { mx_hsvtorgb } from './lib/mx_hsv.js'; +import { mx_rgbtohsv } from './lib/mx_hsv.js'; +import { mx_srgb_texture_to_lin_rec709 } from './lib/mx_transform_color.js'; +export { mx_hsvtorgb, mx_rgbtohsv, mx_srgb_texture_to_lin_rec709 }; diff --git a/jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_hsv.d.ts b/jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_hsv.d.ts new file mode 100644 index 000000000..27d194964 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_hsv.d.ts @@ -0,0 +1,2 @@ +export const mx_hsvtorgb: any; +export const mx_rgbtohsv: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_noise.d.ts b/jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_noise.d.ts new file mode 100644 index 000000000..d22a57d41 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_noise.d.ts @@ -0,0 +1,70 @@ +export const mx_select: any; +export const mx_negate_if: any; +export const mx_floor: any; +export const mx_floorfrac: () => void; +export const mx_bilerp_0: any; +export const mx_bilerp_1: any; +export const mx_bilerp: import("../../utils/FunctionOverloadingNode.js").default; +export const mx_trilerp_0: any; +export const mx_trilerp_1: any; +export const mx_trilerp: import("../../utils/FunctionOverloadingNode.js").default; +export const mx_gradient_float_0: any; +export const mx_gradient_float_1: any; +export const mx_gradient_float: import("../../utils/FunctionOverloadingNode.js").default; +export const mx_gradient_vec3_0: any; +export const mx_gradient_vec3_1: any; +export const mx_gradient_vec3: import("../../utils/FunctionOverloadingNode.js").default; +export const mx_gradient_scale2d_0: any; +export const mx_gradient_scale3d_0: any; +export const mx_gradient_scale2d_1: any; +export const mx_gradient_scale2d: import("../../utils/FunctionOverloadingNode.js").default; +export const mx_gradient_scale3d_1: any; +export const mx_gradient_scale3d: import("../../utils/FunctionOverloadingNode.js").default; +export const mx_rotl32: any; +export const mx_bjmix: () => void; +export const mx_bjfinal: any; +export const mx_bits_to_01: any; +export const mx_fade: any; +export const mx_hash_int_0: any; +export const mx_hash_int_1: any; +export const mx_hash_int_2: any; +export const mx_hash_int_3: any; +export const mx_hash_int_4: any; +export const mx_hash_int: import("../../utils/FunctionOverloadingNode.js").default; +export const mx_hash_vec3_0: any; +export const mx_hash_vec3_1: any; +export const mx_hash_vec3: import("../../utils/FunctionOverloadingNode.js").default; +export const mx_perlin_noise_float_0: any; +export const mx_perlin_noise_float_1: any; +export const mx_perlin_noise_float: import("../../utils/FunctionOverloadingNode.js").default; +export const mx_perlin_noise_vec3_0: any; +export const mx_perlin_noise_vec3_1: any; +export const mx_perlin_noise_vec3: import("../../utils/FunctionOverloadingNode.js").default; +export const mx_cell_noise_float_0: any; +export const mx_cell_noise_float_1: any; +export const mx_cell_noise_float_2: any; +export const mx_cell_noise_float_3: any; +export const mx_cell_noise_float: import("../../utils/FunctionOverloadingNode.js").default; +export const mx_cell_noise_vec3_0: any; +export const mx_cell_noise_vec3_1: any; +export const mx_cell_noise_vec3_2: any; +export const mx_cell_noise_vec3_3: any; +export const mx_cell_noise_vec3: import("../../utils/FunctionOverloadingNode.js").default; +export const mx_fractal_noise_float: any; +export const mx_fractal_noise_vec3: any; +export const mx_fractal_noise_vec2: any; +export const mx_fractal_noise_vec4: any; +export const mx_worley_distance_0: any; +export const mx_worley_distance_1: any; +export const mx_worley_distance: import("../../utils/FunctionOverloadingNode.js").default; +export const mx_worley_noise_float_0: any; +export const mx_worley_noise_vec2_0: any; +export const mx_worley_noise_vec3_0: any; +export const mx_worley_noise_float_1: any; +export const mx_worley_noise_float: import("../../utils/FunctionOverloadingNode.js").default; +export const mx_worley_noise_vec2_1: any; +export const mx_worley_noise_vec2: import("../../utils/FunctionOverloadingNode.js").default; +export const mx_worley_noise_vec3_1: any; +export const mx_worley_noise_vec3: import("../../utils/FunctionOverloadingNode.js").default; +export const mx_unifiednoise2d: any; +export const mx_unifiednoise3d: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_transform_color.d.ts b/jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_transform_color.d.ts new file mode 100644 index 000000000..521d93346 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_transform_color.d.ts @@ -0,0 +1 @@ +export const mx_srgb_texture_to_lin_rec709: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/math/BitcastNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/math/BitcastNode.d.ts new file mode 100644 index 000000000..f15d7989b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/math/BitcastNode.d.ts @@ -0,0 +1,62 @@ +export default BitcastNode; +/** + * Reinterpret the bit representation of a value in one type as a value in another type. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @param {string} y - The new type. + * @returns {Node} + */ +export const bitcast: any; +export function floatBitsToInt(value: Node): BitcastNode; +export function floatBitsToUint(value: Node): BitcastNode; +export function intBitsToFloat(value: Node): BitcastNode; +export function uintBitsToFloat(value: Node): BitcastNode; +/** + * This node represents an operation that reinterprets the bit representation of a value + * in one type as a value in another type. + * + * @augments TempNode + */ +declare class BitcastNode extends TempNode { + /** + * Constructs a new bitcast node. + * + * @param {Node} valueNode - The value to convert. + * @param {string} conversionType - The type to convert to. + * @param {?string} [inputType = null] - The expected input data type of the bitcast operation. + */ + constructor(valueNode: Node, conversionType: string, inputType?: string | null); + /** + * The data to bitcast to a new type. + * + * @type {Node} + */ + valueNode: Node; + /** + * The type the value will be converted to. + * + * @type {string} + */ + conversionType: string; + /** + * The expected input data type of the bitcast operation. + * + * + * @type {string} + * @default null + */ + inputType: string; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBitcastNode: boolean; + generateNodeType(builder: any): any; + generate(builder: any): string; +} +import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/math/BitcountNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/math/BitcountNode.d.ts new file mode 100644 index 000000000..5a85b0585 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/math/BitcountNode.d.ts @@ -0,0 +1,111 @@ +export default BitcountNode; +/** + * Finds the number of consecutive 0 bits from the least significant bit of the input value, + * which is also the index of the least significant bit of the input value. + * + * Can only be used with {@link WebGPURenderer} and a WebGPU backend. + * + * @tsl + * @function + * @param {Node | number} x - The input value. + * @returns {Node} + */ +export const countTrailingZeros: any; +/** + * Finds the number of consecutive 0 bits starting from the most significant bit of the input value. + * + * Can only be used with {@link WebGPURenderer} and a WebGPU backend. + * + * @tsl + * @function + * @param {Node | number} x - The input value. + * @returns {Node} + */ +export const countLeadingZeros: any; +/** + * Finds the number of '1' bits set in the input value + * + * Can only be used with {@link WebGPURenderer} and a WebGPU backend. + * + * @tsl + * @function + * @returns {Node} + */ +export const countOneBits: any; +/** + * This node represents an operation that counts the bits of a piece of shader data. + * + * @augments MathNode + */ +declare class BitcountNode extends MathNode { + /** + * Constructs a new math node. + * + * @param {'countTrailingZeros'|'countLeadingZeros'|'countOneBits'} method - The method name. + * @param {Node} aNode - The first input. + */ + constructor(method: "countTrailingZeros" | "countLeadingZeros" | "countOneBits", aNode: Node); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBitcountNode: boolean; + /** + * Casts the input value of the function to an integer if necessary. + * + * @private + * @param {Node|Node} inputNode - The input value. + * @param {Node} outputNode - The output value. + * @param {string} elementType - The type of the input value. + */ + private _resolveElementType; + _returnDataNode(inputType: any): any; + /** + * Creates and registers a reusable GLSL function that emulates the behavior of countTrailingZeros. + * + * @private + * @param {string} method - The name of the function to create. + * @param {string} elementType - The type of the input value. + * @returns {Function} - The generated function + */ + private _createTrailingZerosBaseLayout; + /** + * Creates and registers a reusable GLSL function that emulates the behavior of countLeadingZeros. + * + * @private + * @param {string} method - The name of the function to create. + * @param {string} elementType - The type of the input value. + * @returns {Function} - The generated function + */ + private _createLeadingZerosBaseLayout; + /** + * Creates and registers a reusable GLSL function that emulates the behavior of countOneBits. + * + * @private + * @param {string} method - The name of the function to create. + * @param {string} elementType - The type of the input value. + * @returns {Function} - The generated function + */ + private _createOneBitsBaseLayout; + /** + * Creates and registers a reusable GLSL function that emulates the behavior of the specified bitcount function. + * including considerations for component-wise bitcounts on vector type inputs. + * + * @private + * @param {string} method - The name of the function to create. + * @param {string} inputType - The type of the input value. + * @param {number} typeLength - The vec length of the input value. + * @param {Function} baseFn - The base function that operates on an individual component of the vector. + * @returns {Function} - The alias function for the specified bitcount method. + */ + private _createMainLayout; +} +declare namespace BitcountNode { + let COUNT_TRAILING_ZEROS: string; + let COUNT_LEADING_ZEROS: string; + let COUNT_ONE_BITS: string; +} +import MathNode from './MathNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/math/ConditionalNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/math/ConditionalNode.d.ts new file mode 100644 index 000000000..25e21f3e9 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/math/ConditionalNode.d.ts @@ -0,0 +1,65 @@ +export default ConditionalNode; +/** + * TSL function for creating a conditional node. + * + * @tsl + * @function + * @param {Node} condNode - The node that defines the condition. + * @param {Node} ifNode - The node that is evaluate when the condition ends up `true`. + * @param {?Node} [elseNode=null] - The node that is evaluate when the condition ends up `false`. + * @returns {ConditionalNode} + */ +export const select: any; +/** + * Represents a logical `if/else` statement. Can be used as an alternative + * to the `If()`/`Else()` syntax. + * + * The `select()` method is called in a chaining fashion on a condition. The parameter nodes of `select()` + * determine the outcome of the entire statement. + * + * ```js + * velocity = position.greaterThanEqual( limit ).select( velocity.negate(), velocity ); + * ``` + * + * @augments Node + */ +declare class ConditionalNode extends Node { + /** + * Constructs a new conditional node. + * + * @param {Node} condNode - The node that defines the condition. + * @param {Node} ifNode - The node that is evaluate when the condition ends up `true`. + * @param {?Node} [elseNode=null] - The node that is evaluate when the condition ends up `false`. + */ + constructor(condNode: Node, ifNode: Node, elseNode?: Node | null); + /** + * The node that defines the condition. + * + * @type {Node} + */ + condNode: Node; + /** + * The node that is evaluate when the condition ends up `true`. + * + * @type {Node} + */ + ifNode: Node; + /** + * The node that is evaluate when the condition ends up `false`. + * + * @type {?Node} + * @default null + */ + elseNode: Node | null; + /** + * This method is overwritten since the node type is inferred from the if/else + * nodes. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + setup(builder: any): void; + generate(builder: any, output: any): any; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/math/Hash.d.ts b/jsdoc-testing/jsdoc/src/nodes/math/Hash.d.ts new file mode 100644 index 000000000..e42866ba8 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/math/Hash.d.ts @@ -0,0 +1,9 @@ +/** + * Generates a hash value in the range `[0, 1]` from the given seed. + * + * @tsl + * @function + * @param {Node} seed - The seed. + * @return {Node} The hash value. + */ +export const hash: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/math/MathNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/math/MathNode.d.ts new file mode 100644 index 000000000..8cdc4720d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/math/MathNode.d.ts @@ -0,0 +1,701 @@ +export default MathNode; +/** + * A small value used to handle floating-point precision errors. + * + * @tsl + * @type {Node} + */ +export const EPSILON: Node; +/** + * Represents infinity. + * + * @tsl + * @type {Node} + */ +export const INFINITY: Node; +/** + * Represents PI. + * + * @tsl + * @type {Node} + */ +export const PI: Node; +/** + * Represents PI * 2. Please use the non-deprecated version `TWO_PI`. + * + * @tsl + * @deprecated + * @type {Node} + */ +export const PI2: Node; +/** + * Represents PI * 2. + * + * @tsl + * @type {Node} + */ +export const TWO_PI: Node; +/** + * Represents PI / 2. + * + * @tsl + * @type {Node} + */ +export const HALF_PI: Node; +/** + * Returns `true` if all components of `x` are `true`. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const all: any; +/** + * Returns `true` if any components of `x` are `true`. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const any: any; +/** + * Converts a quantity in degrees to radians. + * + * @tsl + * @function + * @param {Node | number} x - The input in degrees. + * @returns {Node} + */ +export const radians: any; +/** + * Convert a quantity in radians to degrees. + * + * @tsl + * @function + * @param {Node | number} x - The input in radians. + * @returns {Node} + */ +export const degrees: any; +/** + * Returns the natural exponentiation of the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const exp: any; +/** + * Returns 2 raised to the power of the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const exp2: any; +/** + * Returns the natural logarithm of the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const log: any; +/** + * Returns the base 2 logarithm of the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const log2: any; +/** + * Returns the square root of the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const sqrt: any; +/** + * Returns the inverse of the square root of the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const inverseSqrt: any; +/** + * Finds the nearest integer less than or equal to the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const floor: any; +/** + * Finds the nearest integer that is greater than or equal to the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const ceil: any; +/** + * Calculates the unit vector in the same direction as the original vector. + * + * @tsl + * @function + * @param {Node} x - The input vector. + * @returns {Node} + */ +export const normalize: any; +/** + * Computes the fractional part of the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const fract: any; +/** + * Returns the sine of the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const sin: any; +/** + * Returns the hyperbolic sine of the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const sinh: any; +/** + * Returns the cosine of the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const cos: any; +/** + * Returns the hyperbolic cosine of the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const cosh: any; +/** + * Returns the tangent of the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const tan: any; +/** + * Returns the hyperbolic tangent of the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const tanh: any; +/** + * Returns the arcsine of the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const asin: any; +/** + * Returns the inverse hyperbolic sine of the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const asinh: any; +/** + * Returns the arccosine of the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const acos: any; +/** + * Returns the inverse hyperbolic cosine of the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const acosh: any; +/** + * Returns the arc-tangent of the parameter. + * If two parameters are provided, the result is `atan2(y/x)`. + * + * @tsl + * @function + * @param {Node | number} y - The y parameter. + * @param {?(Node | number)} x - The x parameter. + * @returns {Node} + */ +export const atan: any; +/** + * Returns the inverse hyperbolic tangent of the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const atanh: any; +/** + * Returns the absolute value of the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const abs: any; +/** + * Extracts the sign of the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const sign: any; +/** + * Calculates the length of a vector. + * + * @tsl + * @function + * @param {Node} x - The parameter. + * @returns {Node} + */ +export const length: any; +/** + * Negates the value of the parameter (-x). + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const negate: any; +/** + * Return `1` minus the parameter. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const oneMinus: any; +/** + * Returns the partial derivative of the parameter with respect to x. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const dFdx: any; +/** + * Returns the partial derivative of the parameter with respect to y. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const dFdy: any; +/** + * Rounds the parameter to the nearest integer. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const round: any; +/** + * Returns the reciprocal of the parameter `(1/x)`. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const reciprocal: any; +/** + * Truncates the parameter, removing the fractional part. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const trunc: any; +/** + * Returns the sum of the absolute derivatives in x and y. + * + * @tsl + * @function + * @param {Node | number} x - The parameter. + * @returns {Node} + */ +export const fwidth: any; +/** + * Returns the transpose of a matrix. + * + * @tsl + * @function + * @param {Node} x - The parameter. + * @returns {Node} + */ +export const transpose: any; +/** + * Returns the determinant of a matrix. + * + * @tsl + * @function + * @param {Node} x - The parameter. + * @returns {Node} + */ +export const determinant: any; +/** + * Returns the inverse of a matrix. + * + * @tsl + * @function + * @param {Node} x - The parameter. + * @returns {Node} + */ +export const inverse: any; +/** + * Returns the least of the given values. + * + * @tsl + * @function + * @param {...(Node | number)} values - The values to compare. + * @returns {Node} + */ +export const min: any; +/** + * Returns the greatest of the given values. + * + * @tsl + * @function + * @param {...(Node | number)} values - The values to compare. + * @returns {Node} + */ +export const max: any; +/** + * Generate a step function by comparing two values. + * + * @tsl + * @function + * @param {Node | number} x - The y parameter. + * @param {Node | number} y - The x parameter. + * @returns {Node} + */ +export const step: any; +/** + * Calculates the reflection direction for an incident vector. + * + * @tsl + * @function + * @param {Node} I - The incident vector. + * @param {Node} N - The normal vector. + * @returns {Node} + */ +export const reflect: any; +/** + * Calculates the distance between two points. + * + * @tsl + * @function + * @param {Node} x - The first point. + * @param {Node} y - The second point. + * @returns {Node} + */ +export const distance: any; +/** + * Calculates the absolute difference between two values. + * + * @tsl + * @function + * @param {Node | number} x - The first parameter. + * @param {Node | number} y - The second parameter. + * @returns {Node} + */ +export const difference: any; +/** + * Calculates the dot product of two vectors. + * + * @tsl + * @function + * @param {Node} x - The first vector. + * @param {Node} y - The second vector. + * @returns {Node} + */ +export const dot: any; +/** + * Calculates the cross product of two vectors. + * + * @tsl + * @function + * @param {Node} x - The first vector. + * @param {Node} y - The second vector. + * @returns {Node} + */ +export const cross: any; +/** + * Return the value of the first parameter raised to the power of the second one. + * + * @tsl + * @function + * @param {Node | number} x - The first parameter. + * @param {Node | number} y - The second parameter. + * @returns {Node} + */ +export const pow: any; +export function pow2(x: Node | number): Node; +export function pow3(x: Node | number): Node; +export function pow4(x: Node | number): Node; +/** + * Transforms the direction of a vector by a matrix and then normalizes the result. + * + * @tsl + * @function + * @param {Node} direction - The direction vector. + * @param {Node} matrix - The transformation matrix. + * @returns {Node} + */ +export const transformDirection: any; +export function cbrt(a: Node | number): Node; +export function lengthSq(a: Node): Node; +/** + * Linearly interpolates between two values. + * + * @tsl + * @function + * @param {Node | number} a - The first parameter. + * @param {Node | number} b - The second parameter. + * @param {Node | number} t - The interpolation value. + * @returns {Node} + */ +export const mix: any; +export function clamp(value: Node | number, low?: Node | number, high?: Node | number): Node; +export function saturate(value: Node | number): Node; +/** + * Calculates the refraction direction for an incident vector. + * + * @tsl + * @function + * @param {Node} I - The incident vector. + * @param {Node} N - The normal vector. + * @param {Node} eta - The ratio of indices of refraction. + * @returns {Node} + */ +export const refract: any; +/** + * Performs a Hermite interpolation between two values. + * + * @tsl + * @function + * @param {Node | number} low - The value of the lower edge of the Hermite function. + * @param {Node | number} high - The value of the upper edge of the Hermite function. + * @param {Node | number} x - The source value for interpolation. + * @returns {Node} + */ +export const smoothstep: any; +/** + * Returns a vector pointing in the same direction as another. + * + * @tsl + * @function + * @param {Node} N - The vector to orient. + * @param {Node} I - The incident vector. + * @param {Node} Nref - The reference vector. + * @returns {Node} + */ +export const faceForward: any; +/** + * Returns a random value for the given uv. + * + * @tsl + * @function + * @param {Node} uv - The uv node. + * @returns {Node} + */ +export const rand: () => void; +export function mixElement(t: Node | number, e1: Node | number, e2: Node | number): Node; +export function smoothstepElement(x: Node | number, low: Node | number, high: Node | number): Node; +export function stepElement(x: Node | number, edge: Node | number): Node; +export const faceforward: any; +export const inversesqrt: any; +/** + * This node represents a variety of mathematical methods available in shaders. + * They are divided into three categories: + * + * - Methods with one input like `sin`, `cos` or `normalize`. + * - Methods with two inputs like `dot`, `cross` or `pow`. + * - Methods with three inputs like `mix`, `clamp` or `smoothstep`. + * + * @augments TempNode + */ +declare class MathNode extends TempNode { + /** + * Constructs a new math node. + * + * @param {string} method - The method name. + * @param {Node} aNode - The first input. + * @param {?Node} [bNode=null] - The second input. + * @param {?Node} [cNode=null] - The third input. + */ + constructor(method: string, aNode: Node, bNode?: Node | null, cNode?: Node | null, ...args: any[]); + /** + * The method name. + * + * @type {string} + */ + method: string; + /** + * The first input. + * + * @type {Node} + */ + aNode: Node; + /** + * The second input. + * + * @type {?Node} + * @default null + */ + bNode: Node | null; + /** + * The third input. + * + * @type {?Node} + * @default null + */ + cNode: Node | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMathNode: boolean; + /** + * The input type is inferred from the node types of the input nodes. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The input type. + */ + getInputType(builder: NodeBuilder): string; + /** + * The selected method as well as the input type determine the node type of this node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + setup(builder: any): any; + generate(builder: any, output: any): any; + serialize(data: any): void; + deserialize(data: any): void; +} +declare namespace MathNode { + let ALL: string; + let ANY: string; + let RADIANS: string; + let DEGREES: string; + let EXP: string; + let EXP2: string; + let LOG: string; + let LOG2: string; + let SQRT: string; + let INVERSE_SQRT: string; + let FLOOR: string; + let CEIL: string; + let NORMALIZE: string; + let FRACT: string; + let SIN: string; + let SINH: string; + let COS: string; + let COSH: string; + let TAN: string; + let TANH: string; + let ASIN: string; + let ASINH: string; + let ACOS: string; + let ACOSH: string; + let ATAN: string; + let ATANH: string; + let ABS: string; + let SIGN: string; + let LENGTH: string; + let NEGATE: string; + let ONE_MINUS: string; + let DFDX: string; + let DFDY: string; + let ROUND: string; + let RECIPROCAL: string; + let TRUNC: string; + let FWIDTH: string; + let TRANSPOSE: string; + let DETERMINANT: string; + let INVERSE: string; + let EQUALS: string; + let MIN: string; + let MAX: string; + let STEP: string; + let REFLECT: string; + let DISTANCE: string; + let DIFFERENCE: string; + let DOT: string; + let CROSS: string; + let POW: string; + let TRANSFORM_DIRECTION: string; + let MIX: string; + let CLAMP: string; + let REFRACT: string; + let SMOOTHSTEP: string; + let FACEFORWARD: string; +} +import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/math/MathUtils.d.ts b/jsdoc-testing/jsdoc/src/nodes/math/MathUtils.d.ts new file mode 100644 index 000000000..69ed7ec52 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/math/MathUtils.d.ts @@ -0,0 +1,4 @@ +export function parabola(x: Node, k: Node): Node; +export function gain(x: Node, k: Node): Node; +export function pcurve(x: Node, a: Node, b: Node): Node; +export function sinc(x: Node, k: Node): Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/math/OperatorNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/math/OperatorNode.d.ts new file mode 100644 index 000000000..34ed2e4b4 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/math/OperatorNode.d.ts @@ -0,0 +1,312 @@ +export default OperatorNode; +/** + * Returns the addition of two or more value. + * + * @tsl + * @function + * @param {Node} a - The first input. + * @param {Node} b - The second input. + * @param {...Node} params - Additional input parameters. + * @returns {OperatorNode} + */ +export const add: any; +/** + * Returns the subtraction of two or more value. + * + * @tsl + * @function + * @param {Node} a - The first input. + * @param {Node} b - The second input. + * @param {...Node} params - Additional input parameters. + * @returns {OperatorNode} + */ +export const sub: any; +/** + * Returns the multiplication of two or more value. + * + * @tsl + * @function + * @param {Node} a - The first input. + * @param {Node} b - The second input. + * @param {...Node} params - Additional input parameters. + * @returns {OperatorNode} + */ +export const mul: any; +/** + * Returns the division of two or more value. + * + * @tsl + * @function + * @param {Node} a - The first input. + * @param {Node} b - The second input. + * @param {...Node} params - Additional input parameters. + * @returns {OperatorNode} + */ +export const div: any; +/** + * Computes the remainder of dividing the first node by the second one. + * + * @tsl + * @function + * @param {Node} a - The first input. + * @param {Node} b - The second input. + * @returns {OperatorNode} + */ +export const mod: any; +/** + * Checks if two nodes are equal. + * + * @tsl + * @function + * @param {Node} a - The first input. + * @param {Node} b - The second input. + * @returns {OperatorNode} + */ +export const equal: any; +/** + * Checks if two nodes are not equal. + * + * @tsl + * @function + * @param {Node} a - The first input. + * @param {Node} b - The second input. + * @returns {OperatorNode} + */ +export const notEqual: any; +/** + * Checks if the first node is less than the second. + * + * @tsl + * @function + * @param {Node} a - The first input. + * @param {Node} b - The second input. + * @returns {OperatorNode} + */ +export const lessThan: any; +/** + * Checks if the first node is greater than the second. + * + * @tsl + * @function + * @param {Node} a - The first input. + * @param {Node} b - The second input. + * @returns {OperatorNode} + */ +export const greaterThan: any; +/** + * Checks if the first node is less than or equal to the second. + * + * @tsl + * @function + * @param {Node} a - The first input. + * @param {Node} b - The second input. + * @returns {OperatorNode} + */ +export const lessThanEqual: any; +/** + * Checks if the first node is greater than or equal to the second. + * + * @tsl + * @function + * @param {Node} a - The first input. + * @param {Node} b - The second input. + * @returns {OperatorNode} + */ +export const greaterThanEqual: any; +/** + * Performs a logical AND operation on multiple nodes. + * + * @tsl + * @function + * @param {...Node} nodes - The input nodes to be combined using AND. + * @returns {OperatorNode} + */ +export const and: any; +/** + * Performs a logical OR operation on multiple nodes. + * + * @tsl + * @function + * @param {...Node} nodes - The input nodes to be combined using OR. + * @returns {OperatorNode} + */ +export const or: any; +/** + * Performs logical NOT on a node. + * + * @tsl + * @function + * @param {Node} value - The value. + * @returns {OperatorNode} + */ +export const not: any; +/** + * Performs logical XOR on two nodes. + * + * @tsl + * @function + * @param {Node} a - The first input. + * @param {Node} b - The second input. + * @returns {OperatorNode} + */ +export const xor: any; +/** + * Performs bitwise AND on two nodes. + * + * @tsl + * @function + * @param {Node} a - The first input. + * @param {Node} b - The second input. + * @returns {OperatorNode} + */ +export const bitAnd: any; +/** + * Performs bitwise NOT on a node. + * + * @tsl + * @function + * @param {Node} a - The first input. + * @param {Node} b - The second input. + * @returns {OperatorNode} + */ +export const bitNot: any; +/** + * Performs bitwise OR on two nodes. + * + * @tsl + * @function + * @param {Node} a - The first input. + * @param {Node} b - The second input. + * @returns {OperatorNode} + */ +export const bitOr: any; +/** + * Performs bitwise XOR on two nodes. + * + * @tsl + * @function + * @param {Node} a - The first input. + * @param {Node} b - The second input. + * @returns {OperatorNode} + */ +export const bitXor: any; +/** + * Shifts a node to the left. + * + * @tsl + * @function + * @param {Node} a - The node to shift. + * @param {Node} b - The value to shift. + * @returns {OperatorNode} + */ +export const shiftLeft: any; +/** + * Shifts a node to the right. + * + * @tsl + * @function + * @param {Node} a - The node to shift. + * @param {Node} b - The value to shift. + * @returns {OperatorNode} + */ +export const shiftRight: any; +/** + * Increments a node by 1. + * + * @tsl + * @function + * @param {Node} a - The node to increment. + * @returns {OperatorNode} + */ +export const incrementBefore: () => void; +/** + * Decrements a node by 1. + * + * @tsl + * @function + * @param {Node} a - The node to decrement. + * @returns {OperatorNode} + */ +export const decrementBefore: () => void; +/** + * Increments a node by 1 and returns the previous value. + * + * @tsl + * @function + * @param {Node} a - The node to increment. + * @returns {OperatorNode} + */ +export const increment: () => void; +/** + * Decrements a node by 1 and returns the previous value. + * + * @tsl + * @function + * @param {Node} a - The node to decrement. + * @returns {OperatorNode} + */ +export const decrement: () => void; +/** + * This node represents basic mathematical and logical operations like addition, + * subtraction or comparisons (e.g. `equal()`). + * + * @augments TempNode + */ +declare class OperatorNode extends TempNode { + /** + * Constructs a new operator node. + * + * @param {string} op - The operator. + * @param {Node} aNode - The first input. + * @param {Node} bNode - The second input. + * @param {...Node} params - Additional input parameters. + */ + constructor(op: string, aNode: Node, bNode: Node, ...params: Node[]); + /** + * The operator. + * + * @type {string} + */ + op: string; + /** + * The first input. + * + * @type {Node} + */ + aNode: Node; + /** + * The second input. + * + * @type {Node} + */ + bNode: Node; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isOperatorNode: boolean; + /** + * Returns the operator method name. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} output - The output type. + * @returns {string} The operator method name. + */ + getOperatorMethod(builder: NodeBuilder, output: string): string; + /** + * This method is overwritten since the node type is inferred from the operator + * and the input node types. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {?string} [output=null] - The output type. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder, output?: string | null): string; + generate(builder: any, output: any): any; + serialize(data: any): void; + deserialize(data: any): void; +} +import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/math/PackFloatNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/math/PackFloatNode.d.ts new file mode 100644 index 000000000..d59976ffb --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/math/PackFloatNode.d.ts @@ -0,0 +1,66 @@ +export default PackFloatNode; +/** + * Converts each component of the normalized float to 16-bit integer values. The results are packed into a single unsigned integer. + * round(clamp(c, -1, +1) * 32767.0) + * + * @tsl + * @function + * @param {Node} value - The 2-component vector to be packed + * @returns {Node} + */ +export const packSnorm2x16: any; +/** + * Converts each component of the normalized float to 16-bit integer values. The results are packed into a single unsigned integer. + * round(clamp(c, 0, +1) * 65535.0) + * + * @tsl + * @function + * @param {Node} value - The 2-component vector to be packed + * @returns {Node} + */ +export const packUnorm2x16: any; +/** + * Converts each component of the vec2 to 16-bit floating-point values. The results are packed into a single unsigned integer. + * + * @tsl + * @function + * @param {Node} value - The 2-component vector to be packed + * @returns {Node} + */ +export const packHalf2x16: any; +/** + * This node represents an operation that packs floating-point values of a vector into an unsigned 32-bit integer + * + * @augments TempNode + */ +declare class PackFloatNode extends TempNode { + /** + * + * @param {'snorm' | 'unorm' | 'float16'} encoding - The numeric encoding that describes how the float values are mapped to the integer range. + * @param {Node} vectorNode - The vector node to be packed + */ + constructor(encoding: "snorm" | "unorm" | "float16", vectorNode: Node); + /** + * The vector to be packed. + * + * @type {Node} + */ + vectorNode: Node; + /** + * The numeric encoding. + * + * @type {string} + */ + encoding: string; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isPackFloatNode: boolean; + generateNodeType(): string; + generate(builder: any): string; +} +import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/math/TriNoise3D.d.ts b/jsdoc-testing/jsdoc/src/nodes/math/TriNoise3D.d.ts new file mode 100644 index 000000000..15dad5e5f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/math/TriNoise3D.d.ts @@ -0,0 +1,11 @@ +/** + * Generates a noise value from the given position, speed and time parameters. + * + * @tsl + * @function + * @param {Node} position - The position. + * @param {Node} speed - The speed. + * @param {Node} time - The time. + * @return {Node} The generated noise. + */ +export const triNoise3D: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/math/UnpackFloatNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/math/UnpackFloatNode.d.ts new file mode 100644 index 000000000..9a47ed9e4 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/math/UnpackFloatNode.d.ts @@ -0,0 +1,64 @@ +export default UnpackFloatNode; +/** + * Unpacks a 32-bit unsigned integer into two 16-bit values, interpreted as normalized signed integers. Returns a vec2 with both values. + * + * @tsl + * @function + * @param {Node} value - The unsigned integer to be unpacked + * @returns {Node} + */ +export const unpackSnorm2x16: any; +/** + * Unpacks a 32-bit unsigned integer into two 16-bit values, interpreted as normalized unsigned integers. Returns a vec2 with both values. + * + * @tsl + * @function + * @param {Node} value - The unsigned integer to be unpacked + * @returns {Node} + */ +export const unpackUnorm2x16: any; +/** + * Unpacks a 32-bit unsigned integer into two 16-bit values, interpreted as 16-bit floating-point numbers. Returns a vec2 with both values. + * + * @tsl + * @function + * @param {Node} value - The unsigned integer to be unpacked + * @returns {Node} + */ +export const unpackHalf2x16: any; +/** + * This node represents an operation that unpacks values from a 32-bit unsigned integer, reinterpreting the results as a floating-point vector + * + * @augments TempNode + */ +declare class UnpackFloatNode extends TempNode { + /** + * + * @param {'snorm' | 'unorm' | 'float16'} encoding - The numeric encoding that describes how the integer values are mapped to the float range + * @param {Node} uintNode - The uint node to be unpacked + */ + constructor(encoding: "snorm" | "unorm" | "float16", uintNode: Node); + /** + * The unsigned integer to be unpacked. + * + * @type {Node} + */ + uintNode: Node; + /** + * The numeric encoding. + * + * @type {string} + */ + encoding: string; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isUnpackFloatNode: boolean; + generateNodeType(): string; + generate(builder: any): string; +} +import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/parsers/GLSLNodeFunction.d.ts b/jsdoc-testing/jsdoc/src/nodes/parsers/GLSLNodeFunction.d.ts new file mode 100644 index 000000000..3b3ed5efe --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/parsers/GLSLNodeFunction.d.ts @@ -0,0 +1,25 @@ +export default GLSLNodeFunction; +/** + * This class represents a GLSL node function. + * + * @augments NodeFunction + */ +declare class GLSLNodeFunction extends NodeFunction { + /** + * Constructs a new GLSL node function. + * + * @param {string} source - The GLSL source. + */ + constructor(source: string); + inputsCode: any; + blockCode: any; + headerCode: any; + /** + * This method returns the GLSL code of the node function. + * + * @param {string} [name=this.name] - The function's name. + * @return {string} The shader code. + */ + getCode(name?: string): string; +} +import NodeFunction from '../core/NodeFunction.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/parsers/GLSLNodeParser.d.ts b/jsdoc-testing/jsdoc/src/nodes/parsers/GLSLNodeParser.d.ts new file mode 100644 index 000000000..4219e9d0e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/parsers/GLSLNodeParser.d.ts @@ -0,0 +1,17 @@ +export default GLSLNodeParser; +/** + * A GLSL node parser. + * + * @augments NodeParser + */ +declare class GLSLNodeParser extends NodeParser { + /** + * The method parses the given GLSL code an returns a node function. + * + * @param {string} source - The GLSL code. + * @return {GLSLNodeFunction} A node function. + */ + parseFunction(source: string): GLSLNodeFunction; +} +import NodeParser from '../core/NodeParser.js'; +import GLSLNodeFunction from './GLSLNodeFunction.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/pmrem/PMREMNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/pmrem/PMREMNode.d.ts new file mode 100644 index 000000000..0ddba7546 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/pmrem/PMREMNode.d.ts @@ -0,0 +1,113 @@ +export default PMREMNode; +/** + * TSL function for creating a PMREM node. + * + * @tsl + * @function + * @param {Texture} value - The input texture. + * @param {?Node} [uvNode=null] - The uv node. + * @param {?Node} [levelNode=null] - The level node. + * @returns {PMREMNode} + */ +export const pmremTexture: any; +/** + * This node represents a PMREM which is a special type of preprocessed + * environment map intended for PBR materials. + * + * ```js + * const material = new MeshStandardNodeMaterial(); + * material.envNode = pmremTexture( envMap ); + * ``` + * + * @augments TempNode + */ +declare class PMREMNode extends TempNode { + /** + * Constructs a new function overloading node. + * + * @param {Texture} value - The input texture. + * @param {Node} [uvNode=null] - The uv node. + * @param {Node} [levelNode=null] - The level node. + */ + constructor(value: Texture, uvNode?: Node, levelNode?: Node); + /** + * Reference to the input texture. + * + * @private + * @type {Texture} + */ + private _value; + /** + * Reference to the generated PMREM. + * + * @private + * @type {Texture | null} + * @default null + */ + private _pmrem; + /** + * The uv node. + * + * @type {Node} + */ + uvNode: Node; + /** + * The level node. + * + * @type {Node} + */ + levelNode: Node; + /** + * Reference to a PMREM generator. + * + * @private + * @type {?PMREMGenerator} + * @default null + */ + private _generator; + /** + * The texture node holding the generated PMREM. + * + * @private + * @type {TextureNode} + */ + private _texture; + /** + * A uniform representing the PMREM's width. + * + * @private + * @type {UniformNode} + */ + private _width; + /** + * A uniform representing the PMREM's height. + * + * @private + * @type {UniformNode} + */ + private _height; + /** + * A uniform representing the PMREM's max Mip. + * + * @private + * @type {UniformNode} + */ + private _maxMip; + set value(value: Texture); + /** + * The node's texture value. + * + * @type {Texture} + */ + get value(): Texture; + /** + * Uses the given PMREM texture to update internal values. + * + * @param {Texture} texture - The PMREM texture. + */ + updateFromTexture(texture: Texture): void; + updateBefore(frame: any): void; + setup(builder: any): void; +} +import TempNode from '../core/TempNode.js'; +import { Texture } from '../../textures/Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/pmrem/PMREMUtils.d.ts b/jsdoc-testing/jsdoc/src/nodes/pmrem/PMREMUtils.d.ts new file mode 100644 index 000000000..8c287ef83 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/pmrem/PMREMUtils.d.ts @@ -0,0 +1,4 @@ +export const getDirection: any; +export const textureCubeUV: () => void; +export const blur: () => void; +export const ggxConvolution: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/procedural/Checker.d.ts b/jsdoc-testing/jsdoc/src/nodes/procedural/Checker.d.ts new file mode 100644 index 000000000..622cf3968 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/procedural/Checker.d.ts @@ -0,0 +1,9 @@ +/** + * Creates a 2x2 checkerboard pattern that can be used as procedural texture data. + * + * @tsl + * @function + * @param {Node} coord - The uv coordinates. + * @return {Node} The result data. + */ +export const checker: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/shapes/Shapes.d.ts b/jsdoc-testing/jsdoc/src/nodes/shapes/Shapes.d.ts new file mode 100644 index 000000000..0777cf76d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/shapes/Shapes.d.ts @@ -0,0 +1,9 @@ +/** + * Generates a circle based on the uv coordinates. + * + * @tsl + * @function + * @param {Node} coord - The uv to generate the circle. + * @return {Node} The circle shape. + */ +export const shapeCircle: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/tsl/TSLBase.d.ts b/jsdoc-testing/jsdoc/src/nodes/tsl/TSLBase.d.ts new file mode 100644 index 000000000..cbad0a788 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/tsl/TSLBase.d.ts @@ -0,0 +1,26 @@ +export function addNodeElement(name: any): void; +export * from "./TSLCore.js"; +export * from "../core/ArrayNode.js"; +export * from "../core/UniformNode.js"; +export * from "../core/PropertyNode.js"; +export * from "../core/AssignNode.js"; +export * from "../code/FunctionCallNode.js"; +export * from "../math/OperatorNode.js"; +export * from "../math/MathNode.js"; +export * from "../math/ConditionalNode.js"; +export * from "../core/ContextNode.js"; +export * from "../core/VarNode.js"; +export * from "../core/VaryingNode.js"; +export * from "../display/ColorSpaceNode.js"; +export * from "../display/ToneMappingNode.js"; +export * from "../accessors/BufferAttributeNode.js"; +export * from "../gpgpu/ComputeNode.js"; +export * from "../core/IsolateNode.js"; +export * from "../core/BypassNode.js"; +export * from "../utils/Remap.js"; +export * from "../code/ExpressionNode.js"; +export * from "../utils/Discard.js"; +export * from "../display/RenderOutputNode.js"; +export * from "../utils/DebugNode.js"; +export * from "../core/SubBuildNode.js"; +export * from "../core/InspectorNode.js"; diff --git a/jsdoc-testing/jsdoc/src/nodes/tsl/TSLCore.d.ts b/jsdoc-testing/jsdoc/src/nodes/tsl/TSLCore.d.ts new file mode 100644 index 000000000..e78f515c5 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/tsl/TSLCore.d.ts @@ -0,0 +1,75 @@ +export function addMethodChaining(name: any, nodeElement: any): void; +export function defined(value: any): boolean; +export function ShaderNode(jsFunc: any, nodeType: any): ShaderNodeInternal; +export function Fn(jsFunc: any, layout?: null): () => void; +/** + * Add the given node to the current stack. + * + * @param {Node} node - The node to add. + * @returns {Node} The node that was added to the stack. + */ +export function Stack(node: Node): Node; +export function getConstNodeType(value: any): any; +export function nodeObject(val: any, altType?: null): any; +export function nodeObjectIntent(val: any, altType?: null): any; +export function nodeObjects(val: any, altType?: null): any; +export function nodeArray(val: any, altType?: null): any; +export function nodeProxy(NodeClass: any, scope?: null, factor?: null, settings?: null): any; +export function nodeImmutable(NodeClass: any, ...params: any[]): any; +export function nodeProxyIntent(NodeClass: any, scope?: null, factor?: null, settings?: {}): any; +export function nodeProxyConstructor(constructorFunction: any, nodeInstance: any): any; +export function setCurrentStack(stack: any): void; +export function getCurrentStack(): any; +export function If(...params: any[]): StackNode; +export function Switch(...params: any[]): StackNode; +export const color: any; +export const float: any; +export const int: any; +export const uint: any; +export const bool: any; +export const vec2: any; +export const ivec2: any; +export const uvec2: any; +export const bvec2: any; +export const vec3: any; +export const ivec3: any; +export const uvec3: any; +export const bvec3: any; +export const vec4: any; +export const ivec4: any; +export const uvec4: any; +export const bvec4: any; +export const mat2: any; +export const mat3: any; +export const mat4: any; +export const element: any; +export function convert(node: any, types: any): ConvertNode; +export function split(node: any, channels: any): SplitNode; +export function append(node: Node): Function; +declare class ShaderNodeInternal extends Node { + constructor(jsFunc: any, nodeType: any); + jsFunc: any; + layout: any; + once: boolean; + setLayout(layout: any): this; + getLayout(): any; + call(rawInputs?: null): ShaderCallNodeInternal; + setup(): ShaderCallNodeInternal; +} +import Node from '../core/Node.js'; +import ConvertNode from '../utils/ConvertNode.js'; +import SplitNode from '../utils/SplitNode.js'; +declare class ShaderCallNodeInternal extends Node { + constructor(shaderNode: any, rawInputs: any); + shaderNode: any; + rawInputs: any; + isShaderCallNodeInternal: boolean; + generateNodeType(builder: any): any; + getElementType(builder: any): any; + getMemberType(builder: any, name: any): any; + call(builder: any): any; + setupOutput(builder: any): any; + getOutputNode(builder: any): any; + build(builder: any, output?: null): any; +} +export {}; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/ArrayElementNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/ArrayElementNode.d.ts new file mode 100644 index 000000000..e5669d2f2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/ArrayElementNode.d.ts @@ -0,0 +1,53 @@ +export default ArrayElementNode; +/** + * Base class for representing element access on an array-like + * node data structures. + * + * @augments Node + */ +declare class ArrayElementNode extends Node { + /** + * Constructs an array element node. + * + * @param {Node} node - The array-like node. + * @param {Node} indexNode - The index node that defines the element access. + */ + constructor(node: Node, indexNode: Node); + /** + * The array-like node. + * + * @type {Node} + */ + node: Node; + /** + * The index node that defines the element access. + * + * @type {Node} + */ + indexNode: Node; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isArrayElementNode: boolean; + /** + * This method is overwritten since the node type is inferred from the array-like node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * This method is overwritten since the member type is inferred from the array-like node. + * + * @param {NodeBuilder} builder - The current node builder. + * @param {string} name - The member name. + * @return {string} The member type. + */ + getMemberType(builder: NodeBuilder, name: string): string; + generate(builder: any): string; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/ConvertNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/ConvertNode.d.ts new file mode 100644 index 000000000..77f0ea2f7 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/ConvertNode.d.ts @@ -0,0 +1,41 @@ +export default ConvertNode; +/** + * This module is part of the TSL core and usually not used in app level code. + * It represents a convert operation during the shader generation process + * meaning it converts the data type of a node to a target data type. + * + * @augments Node + */ +declare class ConvertNode extends Node { + /** + * Constructs a new convert node. + * + * @param {Node} node - The node which type should be converted. + * @param {string} convertTo - The target node type. Multiple types can be defined by separating them with a `|` sign. + */ + constructor(node: Node, convertTo: string); + /** + * The node which type should be converted. + * + * @type {Node} + */ + node: Node; + /** + * The target node type. Multiple types can be defined by separating them with a `|` sign. + * + * @type {string} + */ + convertTo: string; + /** + * This method is overwritten since the implementation tries to infer the best + * matching type from the {@link ConvertNode#convertTo} property. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + serialize(data: any): void; + deserialize(data: any): void; + generate(builder: any, output: any): any; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/CubeMapNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/CubeMapNode.d.ts new file mode 100644 index 000000000..a24a72427 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/CubeMapNode.d.ts @@ -0,0 +1,57 @@ +export default CubeMapNode; +/** + * TSL function for creating a cube map node. + * + * @tsl + * @function + * @param {Node} envNode - The node representing the environment map. + * @returns {CubeMapNode} + */ +export const cubeMapNode: any; +/** + * This node can be used to automatically convert environment maps in the + * equirectangular format into the cube map format. + * + * @augments TempNode + */ +declare class CubeMapNode extends TempNode { + /** + * Constructs a new cube map node. + * + * @param {Node} envNode - The node representing the environment map. + */ + constructor(envNode: Node); + /** + * The node representing the environment map. + * + * @type {Node} + */ + envNode: Node; + /** + * A reference to the internal cube texture. + * + * @private + * @type {?CubeTexture} + * @default null + */ + private _cubeTexture; + /** + * A reference to the internal cube texture node. + * + * @private + * @type {CubeTextureNode} + */ + private _cubeTextureNode; + /** + * A default cube texture that acts as a placeholder. + * It is used when the conversion from equirectangular to cube + * map has not finished yet for a given texture. + * + * @private + * @type {CubeTexture} + */ + private _defaultTexture; + updateBefore(frame: any): void; + setup(builder: any): CubeTextureNode; +} +import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/DebugNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/DebugNode.d.ts new file mode 100644 index 000000000..526033e08 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/DebugNode.d.ts @@ -0,0 +1,12 @@ +export default DebugNode; +export function debug(node: Node, callback?: Function | null): DebugNode; +declare class DebugNode extends TempNode { + constructor(node: any, callback?: null); + node: any; + callback: any; + generateNodeType(builder: any): any; + setup(builder: any): any; + analyze(builder: any): any; + generate(builder: any): any; +} +import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/Discard.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/Discard.d.ts new file mode 100644 index 000000000..2d21a4048 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/Discard.d.ts @@ -0,0 +1,2 @@ +export function Discard(conditional: ConditionalNode | null): Node; +export function Return(): ExpressionNode; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/EquirectUV.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/EquirectUV.d.ts new file mode 100644 index 000000000..a3e78acf6 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/EquirectUV.d.ts @@ -0,0 +1,17 @@ +/** + * TSL function for creating an equirect uv node. + * + * Can be used to compute texture coordinates for projecting an + * equirectangular texture onto a mesh for using it as the scene's + * background. + * + * ```js + * scene.backgroundNode = texture( equirectTexture, equirectUV() ); + * ``` + * + * @tsl + * @function + * @param {?Node} [dirNode=positionWorldDirection] - A direction vector for sampling which is by default `positionWorldDirection`. + * @returns {Node} + */ +export const equirectUV: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/EventNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/EventNode.d.ts new file mode 100644 index 000000000..c81ea099b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/EventNode.d.ts @@ -0,0 +1,34 @@ +export default EventNode; +export function OnObjectUpdate(callback: Function): EventNode; +export function OnMaterialUpdate(callback: Function): EventNode; +export function OnFrameUpdate(callback: Function): EventNode; +export function OnBeforeObjectUpdate(callback: Function): EventNode; +export function OnBeforeMaterialUpdate(callback: Function): EventNode; +export function OnBeforeFrameUpdate(callback: Function): EventNode; +/** + * EventNode is a node that executes a callback during specific update phases. + * + * @augments Node + */ +declare class EventNode extends Node { + /** + * Creates an EventNode. + * + * @param {string} eventType - The type of event + * @param {Function} callback - The callback to execute on update. + */ + constructor(eventType: string, callback: Function); + eventType: string; + callback: Function; + update(frame: any): void; + updateBefore(frame: any): void; +} +declare namespace EventNode { + let OBJECT: string; + let MATERIAL: string; + let FRAME: string; + let BEFORE_OBJECT: string; + let BEFORE_MATERIAL: string; + let BEFORE_FRAME: string; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/FlipNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/FlipNode.d.ts new file mode 100644 index 000000000..15e36f325 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/FlipNode.d.ts @@ -0,0 +1,46 @@ +export default FlipNode; +/** + * This module is part of the TSL core and usually not used in app level code. + * It represents a flip operation during the shader generation process + * meaning it flips normalized values with the following formula: + * ``` + * x = 1 - x; + * ``` + * `FlipNode` is internally used to implement any `flipXYZW()`, `flipRGBA()` and + * `flipSTPQ()` method invocations on node objects. For example: + * ```js + * uvNode = uvNode.flipY(); + * ``` + * + * @augments TempNode + */ +declare class FlipNode extends TempNode { + /** + * Constructs a new flip node. + * + * @param {Node} sourceNode - The node which component(s) should be flipped. + * @param {string} components - The components that should be flipped e.g. `'x'` or `'xy'`. + */ + constructor(sourceNode: Node, components: string); + /** + * The node which component(s) should be flipped. + * + * @type {Node} + */ + sourceNode: Node; + /** + * The components that should be flipped e.g. `'x'` or `'xy'`. + * + * @type {string} + */ + components: string; + /** + * This method is overwritten since the node type is inferred from the source node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + generate(builder: any): string; +} +import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/FunctionOverloadingNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/FunctionOverloadingNode.d.ts new file mode 100644 index 000000000..765ca535c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/FunctionOverloadingNode.d.ts @@ -0,0 +1,60 @@ +export default FunctionOverloadingNode; +export function overloadingFn(functionNodes: Array): FunctionOverloadingNode; +/** + * This class allows to define multiple overloaded versions + * of the same function. Depending on the parameters of the function + * call, the node picks the best-fit overloaded version. + * + * @augments Node + */ +declare class FunctionOverloadingNode extends Node { + /** + * Constructs a new function overloading node. + * + * @param {Array} functionNodes - Array of `Fn` function definitions. + * @param {...Node} parametersNodes - A list of parameter nodes. + */ + constructor(functionNodes?: Array, ...parametersNodes: Node[]); + /** + * Array of `Fn` function definitions. + * + * @type {Array} + */ + functionNodes: Array; + /** + * A list of parameter nodes. + * + * @type {Array} + */ + parametersNodes: Array; + /** + * The selected overloaded function call. + * + * @private + * @type {ShaderCallNodeInternal} + */ + private _candidateFn; + /** + * This method is overwritten since the node type is inferred from + * the function's return type. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + /** + * Returns the candidate function for the current parameters. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {FunctionNode} The candidate function. + */ + getCandidateFn(builder: NodeBuilder): FunctionNode; + /** + * Sets up the node for the current parameters. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Node} The setup node. + */ + setup(builder: NodeBuilder): Node; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/JoinNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/JoinNode.d.ts new file mode 100644 index 000000000..70dfe5537 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/JoinNode.d.ts @@ -0,0 +1,33 @@ +export default JoinNode; +/** + * This module is part of the TSL core and usually not used in app level code. + * It represents a join operation during the shader generation process. + * For example in can compose/join two single floats into a `vec2` type. + * + * @augments TempNode + */ +declare class JoinNode extends TempNode { + /** + * Constructs a new join node. + * + * @param {Array} nodes - An array of nodes that should be joined. + * @param {?string} [nodeType=null] - The node type. + */ + constructor(nodes?: Array, nodeType?: string | null); + /** + * An array of nodes that should be joined. + * + * @type {Array} + */ + nodes: Array; + /** + * This method is overwritten since the node type must be inferred from the + * joined data length if not explicitly defined. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + generate(builder: any, output: any): any; +} +import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/LoopNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/LoopNode.d.ts new file mode 100644 index 000000000..84ca0c5f4 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/LoopNode.d.ts @@ -0,0 +1,67 @@ +export default LoopNode; +export function Loop(...params: any[]): LoopNode; +export function Continue(): ExpressionNode; +export function Break(): ExpressionNode; +/** + * This module offers a variety of ways to implement loops in TSL. In it's basic form it's: + * ```js + * Loop( count, ( { i } ) => { + * + * } ); + * ``` + * However, it is also possible to define a start and end ranges, data types and loop conditions: + * ```js + * Loop( { start: int( 0 ), end: int( 10 ), type: 'int', condition: '<' }, ( { i } ) => { + * + * } ); + *``` + * Nested loops can be defined in a compacted form: + * ```js + * Loop( 10, 5, ( { i, j } ) => { + * + * } ); + * ``` + * Loops that should run backwards can be defined like so: + * ```js + * Loop( { start: 10 }, () => {} ); + * ``` + * It is possible to execute with boolean values, similar to the `while` syntax. + * ```js + * const value = float( 0 ).toVar(); + * + * Loop( value.lessThan( 10 ), () => { + * + * value.addAssign( 1 ); + * + * } ); + * ``` + * The module also provides `Break()` and `Continue()` TSL expression for loop control. + * @augments Node + */ +declare class LoopNode extends Node { + /** + * Constructs a new loop node. + * + * @param {Array} params - Depending on the loop type, array holds different parameterization values for the loop. + */ + constructor(params?: Array); + params: any[]; + /** + * Returns a loop variable name based on an index. The pattern is + * `0` = `i`, `1`= `j`, `2`= `k` and so on. + * + * @param {number} index - The index. + * @return {string} The loop variable name. + */ + getVarName(index: number): string; + /** + * Returns properties about this node. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {Object} The node properties. + */ + getProperties(builder: NodeBuilder): Object; + setup(builder: any): void; + generate(builder: any): void; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/MatcapUV.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/MatcapUV.d.ts new file mode 100644 index 000000000..11ccf7d5a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/MatcapUV.d.ts @@ -0,0 +1,11 @@ +/** + * TSL function for creating a matcap uv node. + * + * Can be used to compute texture coordinates for projecting a + * matcap onto a mesh. Used by {@link MeshMatcapNodeMaterial}. + * + * @tsl + * @function + * @returns {Node} The matcap UV coordinates. + */ +export const matcapUV: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/MaxMipLevelNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/MaxMipLevelNode.d.ts new file mode 100644 index 000000000..a54346cc2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/MaxMipLevelNode.d.ts @@ -0,0 +1,51 @@ +export default MaxMipLevelNode; +/** + * TSL function for creating a max mip level node. + * + * @tsl + * @function + * @param {TextureNode} textureNode - The texture node to compute the max mip level for. + * @returns {MaxMipLevelNode} + */ +export const maxMipLevel: any; +/** + * A special type of uniform node that computes the + * maximum mipmap level for a given texture node. + * + * ```js + * const level = maxMipLevel( textureNode ); + * ``` + * + * @augments UniformNode + */ +declare class MaxMipLevelNode extends UniformNode { + /** + * Constructs a new max mip level node. + * + * @param {TextureNode} textureNode - The texture node to compute the max mip level for. + */ + constructor(textureNode: TextureNode); + /** + * The texture node to compute the max mip level for. + * + * @private + * @type {TextureNode} + */ + private _textureNode; + /** + * The texture node to compute the max mip level for. + * + * @readonly + * @type {TextureNode} + */ + readonly get textureNode(): TextureNode; + /** + * The texture. + * + * @readonly + * @type {Texture} + */ + readonly get texture(): Texture; + update(): void; +} +import UniformNode from '../core/UniformNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/MemberNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/MemberNode.d.ts new file mode 100644 index 000000000..45fabbe06 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/MemberNode.d.ts @@ -0,0 +1,41 @@ +export default MemberNode; +/** + * Base class for representing member access on an object-like + * node data structures. + * + * @augments Node + */ +declare class MemberNode extends Node { + /** + * Constructs a member node. + * + * @param {Node} structNode - The struct node. + * @param {string} property - The property name. + */ + constructor(structNode: Node, property: string); + /** + * The struct node. + * + * @type {Node} + */ + structNode: Node; + /** + * The property name. + * + * @type {Node} + */ + property: Node; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMemberNode: boolean; + hasMember(builder: any): boolean; + generateNodeType(builder: any): string; + getMemberType(builder: any, name: any): any; + generate(builder: any): any; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/Oscillators.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/Oscillators.d.ts new file mode 100644 index 000000000..08bd81824 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/Oscillators.d.ts @@ -0,0 +1,4 @@ +export function oscSine(t?: Node): Node; +export function oscSquare(t?: Node): Node; +export function oscTriangle(t?: Node): Node; +export function oscSawtooth(t?: Node): Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/Packing.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/Packing.d.ts new file mode 100644 index 000000000..dcae33557 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/Packing.d.ts @@ -0,0 +1,3 @@ +export function directionToColor(node: Node): Node; +export function colorToDirection(node: Node): Node; +export function unpackNormal(xy: Node): Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/PostProcessingUtils.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/PostProcessingUtils.d.ts new file mode 100644 index 000000000..2e88343c5 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/PostProcessingUtils.d.ts @@ -0,0 +1,66 @@ +/** + * Computes a position in view space based on a fragment's screen position expressed as uv coordinates, the fragments + * depth value and the camera's inverse projection matrix. + * + * @tsl + * @function + * @param {Node} screenPosition - The fragment's screen position expressed as uv coordinates. + * @param {Node} depth - The fragment's depth value. + * @param {Node} projectionMatrixInverse - The camera's inverse projection matrix. + * @return {Node} The fragments position in view space. + */ +export const getViewPosition: () => void; +/** + * Computes a screen position expressed as uv coordinates based on a fragment's position in view space + * and the camera's projection matrix + * + * @tsl + * @function + * @param {Node} viewPosition - The fragments position in view space. + * @param {Node} projectionMatrix - The camera's projection matrix. + * @return {Node} The fragment's screen position expressed as uv coordinates. + */ +export const getScreenPosition: () => void; +/** + * Computes a normal vector based on depth data. Can be used as a fallback when no normal render + * target is available or if flat surface normals are required. + * + * @tsl + * @function + * @param {Node} uv - The texture coordinate. + * @param {DepthTexture} depthTexture - The depth texture. + * @param {Node} projectionMatrixInverse - The camera's inverse projection matrix. + * @return {Node} The computed normal vector. + */ +export const getNormalFromDepth: () => void; +/** + * Interleaved Gradient Noise (IGN) from Jimenez 2014. + * + * IGN has "low discrepancy" resulting in evenly distributed samples. It's superior compared to + * default white noise, blue noise or Bayer. + * + * References: + * - {@link https://www.iryoku.com/next-generation-post-processing-in-call-of-duty-advanced-warfare/} + * - {@link https://blog.demofox.org/2022/01/01/interleaved-gradient-noise-a-different-kind-of-low-discrepancy-sequence/} + * + * @tsl + * @function + * @param {Node} position - The input position, usually screen coordinates. + * @return {Node} The noise value. + */ +export const interleavedGradientNoise: any; +/** + * Vogel disk sampling for uniform circular distribution. + * + * This function generates sample points distributed uniformly on a disk using the golden angle, + * resulting in an efficient low-discrepancy sequence for sampling. The rotation parameter (phi) + * allows randomizing the pattern per-pixel when combined with IGN. + * + * @tsl + * @function + * @param {Node} sampleIndex - The index of the current sample (0-based). + * @param {Node} samplesCount - The total number of samples. + * @param {Node} phi - Rotation angle in radians (typically from IGN * 2π). + * @return {Node} A 2D point on the unit disk. + */ +export const vogelDiskSample: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/RTTNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/RTTNode.d.ts new file mode 100644 index 000000000..7d9e10f5c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/RTTNode.d.ts @@ -0,0 +1,129 @@ +export default RTTNode; +export function rtt(node: Node, ...params: any[]): RTTNode; +export function convertToTexture(node: Node, ...params: any[]): RTTNode; +/** + * `RTTNode` takes another node and uses it with a `QuadMesh` to render into a texture (RTT). + * This module is especially relevant in context of post processing where certain nodes require + * texture input for their effects. With the helper function `convertToTexture()` which is based + * on this module, the node system can automatically ensure texture input if required. + * + * @augments TextureNode + */ +declare class RTTNode extends TextureNode { + /** + * Constructs a new RTT node. + * + * @param {Node} node - The node to render a texture with. + * @param {?number} [width=null] - The width of the internal render target. If not width is applied, the render target is automatically resized. + * @param {?number} [height=null] - The height of the internal render target. + * @param {Object} [options={type:HalfFloatType}] - The options for the internal render target. + */ + constructor(node: Node, width?: number | null, height?: number | null, options?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isRTTNode: boolean; + /** + * The node to render a texture with. + * + * @type {Node} + */ + node: Node; + /** + * The width of the internal render target. + * If not width is applied, the render target is automatically resized. + * + * @type {?number} + * @default null + */ + width: number | null; + /** + * The height of the internal render target. + * + * @type {?number} + * @default null + */ + height: number | null; + /** + * The render target + * + * @type {RenderTarget} + */ + renderTarget: RenderTarget; + /** + * Whether the texture requires an update or not. + * + * @type {boolean} + * @default true + */ + textureNeedsUpdate: boolean; + /** + * Whether the texture should automatically be updated or not. + * + * @type {boolean} + * @default true + */ + autoUpdate: boolean; + /** + * The resolution scale + * + * @private + * @type {number} + * @default 1 + */ + private _resolutionScale; + /** + * The node which is used with the quad mesh for RTT. + * + * @private + * @type {Node} + * @default null + */ + private _rttNode; + /** + * The internal quad mesh for RTT. + * + * @private + * @type {QuadMesh} + */ + private _quadMesh; + /** + * Whether the internal render target should automatically be resized or not. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly get autoResize(): boolean; + setup(builder: any): void; + /** + * Sets the size of the internal render target + * + * @param {number} width - The width to set. + * @param {number} height - The width to set. + */ + setSize(width: number, height: number): void; + /** + * Sets the resolution scale. + * The resolution scale is a factor that is multiplied with the renderer's width and height. + * + * @param {number} resolutionScale - The resolution scale to set. A value of `1` means full resolution. + * @returns {RTTNode} A reference to this node. + */ + setResolutionScale(resolutionScale: number): RTTNode; + /** + * Gets the resolution scale. + * + * @returns {number} The resolution scale. + */ + getResolutionScale(): number; + updateBefore({ renderer }: { + renderer: any; + }): void; +} +import TextureNode from '../accessors/TextureNode.js'; +import { RenderTarget } from '../../core/RenderTarget.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/ReflectorNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/ReflectorNode.d.ts new file mode 100644 index 000000000..0ea38a3c6 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/ReflectorNode.d.ts @@ -0,0 +1,233 @@ +export function reflector(parameters?: { + target?: Object3D | undefined; + resolution?: number | undefined; + generateMipmaps?: boolean | undefined; + bounces?: boolean | undefined; + depth?: boolean | undefined; + samples?: number | undefined; + defaultTexture?: TextureNode | undefined; + reflector?: ReflectorBaseNode | undefined; +}): ReflectorNode; +export default ReflectorNode; +import { Object3D } from '../../core/Object3D.js'; +import TextureNode from '../accessors/TextureNode.js'; +/** + * Holds the actual implementation of the reflector. + * + * TODO: Explain why `ReflectorBaseNode`. Originally the entire logic was implemented + * in `ReflectorNode`, see #29619. + * + * @private + * @augments Node + */ +declare class ReflectorBaseNode extends Node { + /** + * Constructs a new reflector base node. + * + * @param {TextureNode} textureNode - Represents the rendered reflections as a texture node. + * @param {Object} [parameters={}] - An object holding configuration parameters. + * @param {Object3D} [parameters.target=new Object3D()] - The 3D object the reflector is linked to. + * @param {number} [parameters.resolutionScale=1] - The resolution scale. + * @param {boolean} [parameters.generateMipmaps=false] - Whether mipmaps should be generated or not. + * @param {boolean} [parameters.bounces=true] - Whether reflectors can render other reflector nodes or not. + * @param {boolean} [parameters.depth=false] - Whether depth data should be generated or not. + * @param {number} [parameters.samples] - Anti-Aliasing samples of the internal render-target. + */ + constructor(textureNode: TextureNode, parameters?: { + target?: Object3D | undefined; + resolutionScale?: number | undefined; + generateMipmaps?: boolean | undefined; + bounces?: boolean | undefined; + depth?: boolean | undefined; + samples?: number | undefined; + }); + /** + * Represents the rendered reflections as a texture node. + * + * @type {TextureNode} + */ + textureNode: TextureNode; + /** + * The 3D object the reflector is linked to. + * + * @type {Object3D} + * @default {new Object3D()} + */ + target: Object3D; + /** + * The resolution scale. + * + * @type {number} + * @default {1} + */ + resolutionScale: number; + /** + * Whether mipmaps should be generated or not. + * + * @type {boolean} + * @default {false} + */ + generateMipmaps: boolean; + /** + * Whether reflectors can render other reflector nodes or not. + * + * @type {boolean} + * @default {true} + */ + bounces: boolean; + /** + * Whether depth data should be generated or not. + * + * @type {boolean} + * @default {false} + */ + depth: boolean; + /** + * The number of anti-aliasing samples for the render-target + * + * @type {number} + * @default {0} + */ + samples: number; + /** + * Weak map for managing virtual cameras. + * + * @type {WeakMap} + */ + virtualCameras: WeakMap; + /** + * Weak map for managing render targets. + * + * @type {Map} + */ + renderTargets: Map; + /** + * Force render even if reflector is facing away from camera. + * + * @type {boolean} + * @default {false} + */ + forceUpdate: boolean; + /** + * Whether the reflector has been rendered or not. + * + * When the reflector is facing away from the camera, + * this flag is set to `false` and the texture will be empty(black). + * + * @type {boolean} + * @default {false} + */ + hasOutput: boolean; + /** + * Updates the resolution of the internal render target. + * + * @private + * @param {RenderTarget} renderTarget - The render target to resize. + * @param {Renderer} renderer - The renderer that is used to determine the new size. + */ + private _updateResolution; + setup(builder: any): Node | null; + /** + * Returns a virtual camera for the given camera. The virtual camera is used to + * render the scene from the reflector's view so correct reflections can be produced. + * + * @param {Camera} camera - The scene's camera. + * @return {Camera} The corresponding virtual camera. + */ + getVirtualCamera(camera: Camera): Camera; + /** + * Returns a render target for the given camera. The reflections are rendered + * into this render target. + * + * @param {Camera} camera - The scene's camera. + * @return {RenderTarget} The render target. + */ + getRenderTarget(camera: Camera): RenderTarget; + updateBefore(frame: any): false | undefined; + set resolution(value: number); + /** + * The resolution scale. + * + * @deprecated + * @type {number} + * @default {1} + */ + get resolution(): number; +} +/** + * This node can be used to implement mirror-like flat reflective surfaces. + * + * ```js + * const groundReflector = reflector(); + * material.colorNode = groundReflector; + * + * const plane = new Mesh( geometry, material ); + * plane.add( groundReflector.target ); + * ``` + * + * @augments TextureNode + */ +declare class ReflectorNode extends TextureNode { + /** + * Constructs a new reflector node. + * + * @param {Object} [parameters={}] - An object holding configuration parameters. + * @param {Object3D} [parameters.target=new Object3D()] - The 3D object the reflector is linked to. + * @param {number} [parameters.resolutionScale=1] - The resolution scale. + * @param {boolean} [parameters.generateMipmaps=false] - Whether mipmaps should be generated or not. + * @param {boolean} [parameters.bounces=true] - Whether reflectors can render other reflector nodes or not. + * @param {boolean} [parameters.depth=false] - Whether depth data should be generated or not. + * @param {number} [parameters.samples] - Anti-Aliasing samples of the internal render-target. + * @param {TextureNode} [parameters.defaultTexture] - The default texture node. + * @param {ReflectorBaseNode} [parameters.reflector] - The reflector base node. + */ + constructor(parameters?: { + target?: Object3D | undefined; + resolutionScale?: number | undefined; + generateMipmaps?: boolean | undefined; + bounces?: boolean | undefined; + depth?: boolean | undefined; + samples?: number | undefined; + defaultTexture?: TextureNode | undefined; + reflector?: ReflectorBaseNode | undefined; + }); + /** + * A reference to the internal reflector base node which holds the actual implementation. + * + * @private + * @type {ReflectorBaseNode} + * @default ReflectorBaseNode + */ + private _reflectorBaseNode; + /** + * A reference to the internal depth node. + * + * @private + * @type {?Node} + * @default null + */ + private _depthNode; + /** + * A reference to the internal reflector node. + * + * @type {ReflectorBaseNode} + */ + get reflector(): ReflectorBaseNode; + /** + * A reference to 3D object the reflector is linked to. + * + * @type {Object3D} + */ + get target(): Object3D; + /** + * Returns a node representing the mirror's depth. That can be used + * to implement more advanced reflection effects like distance attenuation. + * + * @return {Node} The depth node. + */ + getDepthNode(): Node; + setup(builder: any): void; + clone(): any; +} +import Node from '../core/Node.js'; +import { RenderTarget } from '../../core/RenderTarget.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/Remap.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/Remap.d.ts new file mode 100644 index 000000000..b6aacd043 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/Remap.d.ts @@ -0,0 +1,30 @@ +/** + * This node allows to remap a node value from one range into another but with enabled clamping. E.g a value of + * `0.4` in the range `[ 0.3, 0.5 ]` should be remapped into the normalized range `[ 0, 1 ]`. + * `remapClamp` takes care of that and converts the original value of `0.4` to `0.5`. + * + * @tsl + * @function + * @param {Node} node - The node that should be remapped. + * @param {Node} inLowNode - The source or current lower bound of the range. + * @param {Node} inHighNode - The source or current upper bound of the range. + * @param {?Node} [outLowNode=float(0)] - The target lower bound of the range. + * @param {?Node} [outHighNode=float(1)] - The target upper bound of the range. + * @returns {Node} + */ +export function remapClamp(node: Node, inLowNode: Node, inHighNode: Node, outLowNode?: Node | null, outHighNode?: Node | null): Node; +/** + * This node allows to remap a node value from one range into another. E.g a value of + * `0.4` in the range `[ 0.3, 0.5 ]` should be remapped into the normalized range `[ 0, 1 ]`. + * `remap` takes care of that and converts the original value of `0.4` to `0.5`. + * + * @tsl + * @function + * @param {Node} node - The node that should be remapped. + * @param {Node} inLowNode - The source or current lower bound of the range. + * @param {Node} inHighNode - The source or current upper bound of the range. + * @param {?Node} [outLowNode=float(0)] - The target lower bound of the range. + * @param {?Node} [outHighNode=float(1)] - The target upper bound of the range. + * @returns {Node} + */ +export const remap: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/RotateNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/RotateNode.d.ts new file mode 100644 index 000000000..ed6dfe36b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/RotateNode.d.ts @@ -0,0 +1,49 @@ +export default RotateNode; +/** + * TSL function for creating a rotate node. + * + * @tsl + * @function + * @param {Node} positionNode - The position node. + * @param {Node} rotationNode - Represents the rotation that is applied to the position node. Depending + * on whether the position data are 2D or 3D, the rotation is expressed a single float value or an Euler value. + * @returns {RotateNode} + */ +export const rotate: any; +/** + * Applies a rotation to the given position node. + * + * @augments TempNode + */ +declare class RotateNode extends TempNode { + /** + * Constructs a new rotate node. + * + * @param {Node} positionNode - The position node. + * @param {Node} rotationNode - Represents the rotation that is applied to the position node. Depending + * on whether the position data are 2D or 3D, the rotation is expressed a single float value or an Euler value. + */ + constructor(positionNode: Node, rotationNode: Node); + /** + * The position node. + * + * @type {Node} + */ + positionNode: Node; + /** + * Represents the rotation that is applied to the position node. + * Depending on whether the position data are 2D or 3D, the rotation is expressed a single float value or an Euler value. + * + * @type {Node} + */ + rotationNode: Node; + /** + * The type of the {@link RotateNode#positionNode} defines the node's type. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node's type. + */ + generateNodeType(builder: NodeBuilder): string; + setup(builder: any): any; +} +import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/SampleNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/SampleNode.d.ts new file mode 100644 index 000000000..6fb9d738c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/SampleNode.d.ts @@ -0,0 +1,46 @@ +export default SampleNode; +export function sample(callback: Function, uv?: Node | null): SampleNode; +/** + * Class representing a node that samples a value using a provided callback function. + * + * @extends Node + */ +declare class SampleNode extends Node { + /** + * Creates an instance of SampleNode. + * + * @param {Function} callback - The function to be called when sampling. Should accept a UV node and return a value. + * @param {?Node} [uvNode=null] - The UV node to be used in the texture sampling. + */ + constructor(callback: Function, uvNode?: Node | null); + callback: Function; + /** + * Represents the texture coordinates. + * + * @type {?Node} + * @default null + */ + uvNode: Node | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSampleNode: boolean; + /** + * Sets up the node by sampling with the default UV accessor. + * + * @returns {Node} The result of the callback function when called with the UV node. + */ + setup(): Node; + /** + * Calls the callback function with the provided UV node. + * + * @param {Node} uv - The UV node or value to be passed to the callback. + * @returns {Node} The result of the callback function. + */ + sample(uv: Node): Node; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/SetNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/SetNode.d.ts new file mode 100644 index 000000000..4dcfbd1b9 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/SetNode.d.ts @@ -0,0 +1,49 @@ +export default SetNode; +/** + * This module is part of the TSL core and usually not used in app level code. + * `SetNode` represents a set operation which means it is used to implement any + * `setXYZW()`, `setRGBA()` and `setSTPQ()` method invocations on node objects. + * For example: + * ```js + * materialLine.colorNode = color( 0, 0, 0 ).setR( float( 1 ) ); + * ``` + * + * @augments TempNode + */ +declare class SetNode extends TempNode { + /** + * Constructs a new set node. + * + * @param {Node} sourceNode - The node that should be updated. + * @param {string} components - The components that should be updated. + * @param {Node} targetNode - The value node. + */ + constructor(sourceNode: Node, components: string, targetNode: Node); + /** + * The node that should be updated. + * + * @type {Node} + */ + sourceNode: Node; + /** + * The components that should be updated. + * + * @type {string} + */ + components: string; + /** + * The value node. + * + * @type {Node} + */ + targetNode: Node; + /** + * This method is overwritten since the node type is inferred from {@link SetNode#sourceNode}. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + generate(builder: any): string; +} +import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/SplitNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/SplitNode.d.ts new file mode 100644 index 000000000..9941f1852 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/SplitNode.d.ts @@ -0,0 +1,65 @@ +export default SplitNode; +/** + * This module is part of the TSL core and usually not used in app level code. + * `SplitNode` represents a property access operation which means it is + * used to implement any `.xyzw`, `.rgba` and `stpq` usage on node objects. + * For example: + * ```js + * const redValue = color.r; + * ``` + * + * @augments Node + */ +declare class SplitNode extends Node { + /** + * Constructs a new split node. + * + * @param {Node} node - The node that should be accessed. + * @param {string} [components='x'] - The components that should be accessed. + */ + constructor(node: Node, components?: string); + /** + * The node that should be accessed. + * + * @type {Node} + */ + node: Node; + /** + * The components that should be accessed. + * + * @type {string} + */ + components: string; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSplitNode: boolean; + /** + * Returns the vector length which is computed based on the requested components. + * + * @return {number} The vector length. + */ + getVectorLength(): number; + /** + * Returns the component type of the node's type. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The component type. + */ + getComponentType(builder: NodeBuilder): string; + /** + * This method is overwritten since the node type is inferred from requested components. + * + * @param {NodeBuilder} builder - The current node builder. + * @return {string} The node type. + */ + generateNodeType(builder: NodeBuilder): string; + generate(builder: any, output: any): any; + serialize(data: any): void; + deserialize(data: any): void; +} +import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/SpriteSheetUV.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/SpriteSheetUV.d.ts new file mode 100644 index 000000000..572dccc2c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/SpriteSheetUV.d.ts @@ -0,0 +1,17 @@ +/** + * TSL function for computing texture coordinates for animated sprite sheets. + * + * ```js + * const uvNode = spritesheetUV( vec2( 6, 6 ), uv(), time.mul( animationSpeed ) ); + * + * material.colorNode = texture( spriteSheet, uvNode ); + * ``` + * + * @tsl + * @function + * @param {Node} countNode - The node that defines the number of sprites in the x and y direction (e.g 6x6). + * @param {?Node} [uvNode=uv()] - The uv node. + * @param {?Node} [frameNode=float(0)] - The node that defines the current frame/sprite. + * @returns {Node} + */ +export const spritesheetUV: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/SpriteUtils.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/SpriteUtils.d.ts new file mode 100644 index 000000000..5350a7581 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/SpriteUtils.d.ts @@ -0,0 +1,17 @@ +/** + * This can be used to achieve a billboarding behavior for flat meshes. That means they are + * oriented always towards the camera. + * + * ```js + * material.vertexNode = billboarding(); + * ``` + * + * @tsl + * @function + * @param {Object} config - The configuration object. + * @param {?Node} [config.position=null] - Can be used to define the vertex positions in world space. + * @param {boolean} [config.horizontal=true] - Whether to follow the camera rotation horizontally or not. + * @param {boolean} [config.vertical=false] - Whether to follow the camera rotation vertically or not. + * @return {Node} The updated vertex position in clip space. + */ +export const billboarding: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/StorageArrayElementNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/StorageArrayElementNode.d.ts new file mode 100644 index 000000000..5257eebfd --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/StorageArrayElementNode.d.ts @@ -0,0 +1,51 @@ +export default StorageArrayElementNode; +/** + * TSL function for creating a storage element node. + * + * @tsl + * @function + * @param {StorageBufferNode} storageBufferNode - The storage buffer node. + * @param {Node} indexNode - The index node that defines the element access. + * @returns {StorageArrayElementNode} + */ +export const storageElement: any; +/** + * This class enables element access on instances of {@link StorageBufferNode}. + * In most cases, it is indirectly used when accessing elements with the + * {@link StorageBufferNode#element} method. + * + * ```js + * const position = positionStorage.element( instanceIndex ); + * ``` + * + * @augments ArrayElementNode + */ +declare class StorageArrayElementNode extends ArrayElementNode { + /** + * Constructs storage buffer element node. + * + * @param {StorageBufferNode} storageBufferNode - The storage buffer node. + * @param {Node} indexNode - The index node that defines the element access. + */ + constructor(storageBufferNode: StorageBufferNode, indexNode: Node); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStorageArrayElementNode: boolean; + /** + * The storage buffer node. + * + * @param {Node} value + * @type {StorageBufferNode} + */ + set storageBufferNode(value: Node); + get storageBufferNode(): Node; + getMemberType(builder: any, name: any): any; + setup(builder: any): import("../Nodes.js").Node | null; + generate(builder: any, output: any): any; +} +import ArrayElementNode from './ArrayElementNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/Timer.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/Timer.d.ts new file mode 100644 index 000000000..9131612ca --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/Timer.d.ts @@ -0,0 +1,21 @@ +/** + * Represents the elapsed time in seconds. + * + * @tsl + * @type {UniformNode} + */ +export const time: UniformNode; +/** + * Represents the delta time in seconds. + * + * @tsl + * @type {UniformNode} + */ +export const deltaTime: UniformNode; +/** + * Represents the current frame ID. + * + * @tsl + * @type {UniformNode} + */ +export const frameId: UniformNode; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/TriplanarTextures.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/TriplanarTextures.d.ts new file mode 100644 index 000000000..df819d30b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/TriplanarTextures.d.ts @@ -0,0 +1,21 @@ +/** + * TSL function for creating a triplanar textures node. + * + * Can be used for triplanar texture mapping. + * + * ```js + * material.colorNode = triplanarTexture( texture( diffuseMap ) ); + * ``` + * + * @tsl + * @function + * @param {Node} textureXNode - First texture node. + * @param {?Node} [textureYNode=null] - Second texture node. When not set, the shader will sample from `textureXNode` instead. + * @param {?Node} [textureZNode=null] - Third texture node. When not set, the shader will sample from `textureXNode` instead. + * @param {?Node} [scaleNode=float(1)] - The scale node. + * @param {?Node} [positionNode=positionLocal] - Vertex positions in local space. + * @param {?Node} [normalNode=normalLocal] - Normals in local space. + * @returns {Node} + */ +export const triplanarTextures: () => void; +export function triplanarTexture(...params: any[]): Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/UVUtils.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/UVUtils.d.ts new file mode 100644 index 000000000..fb078e354 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/UVUtils.d.ts @@ -0,0 +1,42 @@ +/** + * Replaces the default UV coordinates used in texture lookups. + * + * ```js + *material.contextNode = replaceDefaultUV( ( textureNode ) => { + * + * // ... + * return customUVCoordinates; + * + *} ); + *``` + * + * @tsl + * @function + * @param {function(Node):Node|Node} callback - A callback that receives the texture node + * and must return the new uv coordinates. + * @param {Node} [node=null] - An optional node to which the context will be applied. + * @return {ContextNode} A context node that replaces the default UV coordinates. + */ +export function replaceDefaultUV(callback: (arg0: Node) => Node | Node, node?: Node): ContextNode; +/** + * Rotates the given uv coordinates around a center point + * + * @tsl + * @function + * @param {Node} uv - The uv coordinates. + * @param {Node} rotation - The rotation defined in radians. + * @param {Node} center - The center of rotation + * @return {Node} The rotated uv coordinates. + */ +export const rotateUV: () => void; +/** + * Applies a spherical warping effect to the given uv coordinates. + * + * @tsl + * @function + * @param {Node} uv - The uv coordinates. + * @param {Node} strength - The strength of the effect. + * @param {Node} center - The center point + * @return {Node} The updated uv coordinates. + */ +export const spherizeUV: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/ViewportUtils.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/ViewportUtils.d.ts new file mode 100644 index 000000000..8622c377b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/nodes/utils/ViewportUtils.d.ts @@ -0,0 +1,13 @@ +/** + * A special version of a screen uv function that involves a depth comparison + * when computing the final uvs. The function mitigates visual errors when + * using viewport texture nodes for refraction purposes. Without this function + * objects in front of a refractive surface might appear on the refractive surface + * which is incorrect. + * + * @tsl + * @function + * @param {?Node} uv - Optional uv coordinates. By default `screenUV` is used. + * @return {Node} The update uv coordinates. + */ +export const viewportSafeUV: () => void; diff --git a/jsdoc-testing/jsdoc/src/objects/BatchedMesh.d.ts b/jsdoc-testing/jsdoc/src/objects/BatchedMesh.d.ts new file mode 100644 index 000000000..df6bdda31 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/objects/BatchedMesh.d.ts @@ -0,0 +1,366 @@ +/** + * A special version of a mesh with multi draw batch rendering support. Use + * this class if you have to render a large number of objects with the same + * material but with different geometries or world transformations. The usage of + * `BatchedMesh` will help you to reduce the number of draw calls and thus improve the overall + * rendering performance in your application. + * + * ```js + * const box = new THREE.BoxGeometry( 1, 1, 1 ); + * const sphere = new THREE.SphereGeometry( 1, 12, 12 ); + * const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); + * + * // initialize and add geometries into the batched mesh + * const batchedMesh = new BatchedMesh( 10, 5000, 10000, material ); + * const boxGeometryId = batchedMesh.addGeometry( box ); + * const sphereGeometryId = batchedMesh.addGeometry( sphere ); + * + * // create instances of those geometries + * const boxInstancedId1 = batchedMesh.addInstance( boxGeometryId ); + * const boxInstancedId2 = batchedMesh.addInstance( boxGeometryId ); + * + * const sphereInstancedId1 = batchedMesh.addInstance( sphereGeometryId ); + * const sphereInstancedId2 = batchedMesh.addInstance( sphereGeometryId ); + * + * // position the geometries + * batchedMesh.setMatrixAt( boxInstancedId1, boxMatrix1 ); + * batchedMesh.setMatrixAt( boxInstancedId2, boxMatrix2 ); + * + * batchedMesh.setMatrixAt( sphereInstancedId1, sphereMatrix1 ); + * batchedMesh.setMatrixAt( sphereInstancedId2, sphereMatrix2 ); + * + * scene.add( batchedMesh ); + * ``` + * + * @augments Mesh + */ +export class BatchedMesh extends Mesh { + /** + * Constructs a new batched mesh. + * + * @param {number} maxInstanceCount - The maximum number of individual instances planned to be added and rendered. + * @param {number} maxVertexCount - The maximum number of vertices to be used by all unique geometries. + * @param {number} [maxIndexCount=maxVertexCount*2] - The maximum number of indices to be used by all unique geometries + * @param {Material|Array} [material] - The mesh material. + */ + constructor(maxInstanceCount: number, maxVertexCount: number, maxIndexCount?: number, material?: Material | Array); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBatchedMesh: boolean; + /** + * When set ot `true`, the individual objects of a batch are frustum culled. + * + * @type {boolean} + * @default true + */ + perObjectFrustumCulled: boolean; + /** + * When set to `true`, the individual objects of a batch are sorted to improve overdraw-related artifacts. + * If the material is marked as "transparent" objects are rendered back to front and if not then they are + * rendered front to back. + * + * @type {boolean} + * @default true + */ + sortObjects: boolean; + /** + * The bounding box of the batched mesh. Can be computed via {@link BatchedMesh#computeBoundingBox}. + * + * @type {?Box3} + * @default null + */ + boundingBox: Box3 | null; + /** + * The bounding sphere of the batched mesh. Can be computed via {@link BatchedMesh#computeBoundingSphere}. + * + * @type {?Sphere} + * @default null + */ + boundingSphere: Sphere | null; + /** + * Takes a sort a function that is run before render. The function takes a list of instances to + * sort and a camera. The objects in the list include a "z" field to perform a depth-ordered + * sort with. + * + * @type {?Function} + * @default null + */ + customSort: Function | null; + _instanceInfo: any[]; + _geometryInfo: any[]; + _availableInstanceIds: any[]; + _availableGeometryIds: any[]; + _nextIndexStart: number; + _nextVertexStart: number; + _geometryCount: number; + _visibilityChanged: boolean; + _geometryInitialized: boolean; + _maxInstanceCount: number; + _maxVertexCount: number; + _maxIndexCount: number; + _multiDrawCounts: Int32Array; + _multiDrawStarts: Int32Array; + _multiDrawCount: number; + _matricesTexture: any; + _indirectTexture: any; + _colorsTexture: any; + /** + * The maximum number of individual instances that can be stored in the batch. + * + * @type {number} + * @readonly + */ + readonly get maxInstanceCount(): number; + /** + * The instance count. + * + * @type {number} + * @readonly + */ + readonly get instanceCount(): number; + /** + * The number of unused vertices. + * + * @type {number} + * @readonly + */ + readonly get unusedVertexCount(): number; + /** + * The number of unused indices. + * + * @type {number} + * @readonly + */ + readonly get unusedIndexCount(): number; + _initMatricesTexture(): void; + _initIndirectTexture(): void; + _initColorsTexture(): void; + _initializeGeometry(reference: any): void; + _validateGeometry(geometry: any): void; + /** + * Validates the instance defined by the given ID. + * + * @param {number} instanceId - The instance to validate. + */ + validateInstanceId(instanceId: number): void; + /** + * Validates the geometry defined by the given ID. + * + * @param {number} geometryId - The geometry to validate. + */ + validateGeometryId(geometryId: number): void; + /** + * Takes a sort a function that is run before render. The function takes a list of instances to + * sort and a camera. The objects in the list include a "z" field to perform a depth-ordered sort with. + * + * @param {Function} func - The custom sort function. + * @return {BatchedMesh} A reference to this batched mesh. + */ + setCustomSort(func: Function): BatchedMesh; + /** + * Computes the bounding box, updating {@link BatchedMesh#boundingBox}. + * Bounding boxes aren't computed by default. They need to be explicitly computed, + * otherwise they are `null`. + */ + computeBoundingBox(): void; + /** + * Computes the bounding sphere, updating {@link BatchedMesh#boundingSphere}. + * Bounding spheres aren't computed by default. They need to be explicitly computed, + * otherwise they are `null`. + */ + computeBoundingSphere(): void; + /** + * Adds a new instance to the batch using the geometry of the given ID and returns + * a new id referring to the new instance to be used by other functions. + * + * @param {number} geometryId - The ID of a previously added geometry via {@link BatchedMesh#addGeometry}. + * @return {number} The instance ID. + */ + addInstance(geometryId: number): number; + /** + * Adds the given geometry to the batch and returns the associated + * geometry id referring to it to be used in other functions. + * + * @param {BufferGeometry} geometry - The geometry to add. + * @param {number} [reservedVertexCount=-1] - Optional parameter specifying the amount of + * vertex buffer space to reserve for the added geometry. This is necessary if it is planned + * to set a new geometry at this index at a later time that is larger than the original geometry. + * Defaults to the length of the given geometry vertex buffer. + * @param {number} [reservedIndexCount=-1] - Optional parameter specifying the amount of index + * buffer space to reserve for the added geometry. This is necessary if it is planned to set a + * new geometry at this index at a later time that is larger than the original geometry. Defaults to + * the length of the given geometry index buffer. + * @return {number} The geometry ID. + */ + addGeometry(geometry: BufferGeometry, reservedVertexCount?: number, reservedIndexCount?: number): number; + /** + * Replaces the geometry at the given ID with the provided geometry. Throws an error if there + * is not enough space reserved for geometry. Calling this will change all instances that are + * rendering that geometry. + * + * @param {number} geometryId - The ID of the geometry that should be replaced with the given geometry. + * @param {BufferGeometry} geometry - The new geometry. + * @return {number} The geometry ID. + */ + setGeometryAt(geometryId: number, geometry: BufferGeometry): number; + /** + * Deletes the geometry defined by the given ID from this batch. Any instances referencing + * this geometry will also be removed as a side effect. + * + * @param {number} geometryId - The ID of the geometry to remove from the batch. + * @return {BatchedMesh} A reference to this batched mesh. + */ + deleteGeometry(geometryId: number): BatchedMesh; + /** + * Deletes an existing instance from the batch using the given ID. + * + * @param {number} instanceId - The ID of the instance to remove from the batch. + * @return {BatchedMesh} A reference to this batched mesh. + */ + deleteInstance(instanceId: number): BatchedMesh; + /** + * Repacks the sub geometries in BatchedMesh to remove any unused space remaining from + * previously deleted geometry, freeing up space to add new geometry. + * + * @return {BatchedMesh} A reference to this batched mesh. + */ + optimize(): BatchedMesh; + /** + * Returns the bounding box for the given geometry. + * + * @param {number} geometryId - The ID of the geometry to return the bounding box for. + * @param {Box3} target - The target object that is used to store the method's result. + * @return {?Box3} The geometry's bounding box. Returns `null` if no geometry has been found for the given ID. + */ + getBoundingBoxAt(geometryId: number, target: Box3): Box3 | null; + /** + * Returns the bounding sphere for the given geometry. + * + * @param {number} geometryId - The ID of the geometry to return the bounding sphere for. + * @param {Sphere} target - The target object that is used to store the method's result. + * @return {?Sphere} The geometry's bounding sphere. Returns `null` if no geometry has been found for the given ID. + */ + getBoundingSphereAt(geometryId: number, target: Sphere): Sphere | null; + /** + * Sets the given local transformation matrix to the defined instance. + * Negatively scaled matrices are not supported. + * + * @param {number} instanceId - The ID of an instance to set the matrix of. + * @param {Matrix4} matrix - A 4x4 matrix representing the local transformation of a single instance. + * @return {BatchedMesh} A reference to this batched mesh. + */ + setMatrixAt(instanceId: number, matrix: Matrix4): BatchedMesh; + /** + * Returns the local transformation matrix of the defined instance. + * + * @param {number} instanceId - The ID of an instance to get the matrix of. + * @param {Matrix4} matrix - The target object that is used to store the method's result. + * @return {Matrix4} The instance's local transformation matrix. + */ + getMatrixAt(instanceId: number, matrix: Matrix4): Matrix4; + /** + * Sets the given color to the defined instance. + * + * @param {number} instanceId - The ID of an instance to set the color of. + * @param {Color|Vector4} color - The color to set the instance to. Use a `Vector4` to also define alpha. + * @return {BatchedMesh} A reference to this batched mesh. + */ + setColorAt(instanceId: number, color: Color | Vector4): BatchedMesh; + /** + * Returns the color of the defined instance. + * + * @param {number} instanceId - The ID of an instance to get the color of. + * @param {Color|Vector4} color - The target object that is used to store the method's result. + * @return {Color|Vector4} The instance's color. Use a `Vector4` to also retrieve alpha. + */ + getColorAt(instanceId: number, color: Color | Vector4): Color | Vector4; + /** + * Sets the visibility of the instance. + * + * @param {number} instanceId - The id of the instance to set the visibility of. + * @param {boolean} visible - Whether the instance is visible or not. + * @return {BatchedMesh} A reference to this batched mesh. + */ + setVisibleAt(instanceId: number, visible: boolean): BatchedMesh; + /** + * Returns the visibility state of the defined instance. + * + * @param {number} instanceId - The ID of an instance to get the visibility state of. + * @return {boolean} Whether the instance is visible or not. + */ + getVisibleAt(instanceId: number): boolean; + /** + * Sets the geometry ID of the instance at the given index. + * + * @param {number} instanceId - The ID of the instance to set the geometry ID of. + * @param {number} geometryId - The geometry ID to be use by the instance. + * @return {BatchedMesh} A reference to this batched mesh. + */ + setGeometryIdAt(instanceId: number, geometryId: number): BatchedMesh; + /** + * Returns the geometry ID of the defined instance. + * + * @param {number} instanceId - The ID of an instance to get the geometry ID of. + * @return {number} The instance's geometry ID. + */ + getGeometryIdAt(instanceId: number): number; + /** + * Get the range representing the subset of triangles related to the attached geometry, + * indicating the starting offset and count, or `null` if invalid. + * + * @param {number} geometryId - The id of the geometry to get the range of. + * @param {Object} [target] - The target object that is used to store the method's result. + * @return {{ + * vertexStart:number,vertexCount:number,reservedVertexCount:number, + * indexStart:number,indexCount:number,reservedIndexCount:number, + * start:number,count:number + * }} The result object with range data. + */ + getGeometryRangeAt(geometryId: number, target?: Object): { + vertexStart: number; + vertexCount: number; + reservedVertexCount: number; + indexStart: number; + indexCount: number; + reservedIndexCount: number; + start: number; + count: number; + }; + /** + * Resizes the necessary buffers to support the provided number of instances. + * If the provided arguments shrink the number of instances but there are not enough + * unused Ids at the end of the list then an error is thrown. + * + * @param {number} maxInstanceCount - The max number of individual instances that can be added and rendered by the batch. + */ + setInstanceCount(maxInstanceCount: number): void; + /** + * Resizes the available space in the batch's vertex and index buffer attributes to the provided sizes. + * If the provided arguments shrink the geometry buffers but there is not enough unused space at the + * end of the geometry attributes then an error is thrown. + * + * @param {number} maxVertexCount - The maximum number of vertices to be used by all unique geometries to resize to. + * @param {number} maxIndexCount - The maximum number of indices to be used by all unique geometries to resize to. + */ + setGeometrySize(maxVertexCount: number, maxIndexCount: number): void; + raycast(raycaster: any, intersects: any): void; + copy(source: any): this; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; + onBeforeRender(renderer: any, scene: any, camera: any, geometry: any, material: any): void; + onBeforeShadow(renderer: any, object: any, camera: any, shadowCamera: any, geometry: any, depthMaterial: any): void; +} +import { Mesh } from './Mesh.js'; +import { Box3 } from '../math/Box3.js'; +import { Sphere } from '../math/Sphere.js'; +import { BufferGeometry } from '../core/BufferGeometry.js'; +import { Matrix4 } from '../math/Matrix4.js'; +import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/Bone.d.ts b/jsdoc-testing/jsdoc/src/objects/Bone.d.ts new file mode 100644 index 000000000..5d0be09bc --- /dev/null +++ b/jsdoc-testing/jsdoc/src/objects/Bone.d.ts @@ -0,0 +1,26 @@ +/** + * A bone which is part of a {@link Skeleton}. The skeleton in turn is used by + * the {@link SkinnedMesh}. + * + * ```js + * const root = new THREE.Bone(); + * const child = new THREE.Bone(); + * + * root.add( child ); + * child.position.y = 5; + * ``` + * + * @augments Object3D + */ +export class Bone extends Object3D { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBone: boolean; + type: string; +} +import { Object3D } from '../core/Object3D.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/ClippingGroup.d.ts b/jsdoc-testing/jsdoc/src/objects/ClippingGroup.d.ts new file mode 100644 index 000000000..6183e90a1 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/objects/ClippingGroup.d.ts @@ -0,0 +1,50 @@ +/** + * In earlier three.js versions, clipping was defined globally + * on the renderer or on material level. This special version of + * `THREE.Group` allows to encode the clipping state into the scene + * graph. Meaning if you create an instance of this group, all + * descendant 3D objects will be affected by the respective clipping + * planes. + * + * Note: `ClippingGroup` can only be used with `WebGPURenderer`. + * + * @augments Group + */ +export class ClippingGroup extends Group { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isClippingGroup: boolean; + /** + * An array with clipping planes. + * + * @type {Array} + */ + clippingPlanes: Array; + /** + * Whether clipping should be enabled or not. + * + * @type {boolean} + * @default true + */ + enabled: boolean; + /** + * Whether the intersection of the clipping planes is used to clip objects, rather than their union. + * + * @type {boolean} + * @default false + */ + clipIntersection: boolean; + /** + * Whether shadows should be clipped or not. + * + * @type {boolean} + * @default false + */ + clipShadows: boolean; +} +import { Group } from './Group.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/Group.d.ts b/jsdoc-testing/jsdoc/src/objects/Group.d.ts new file mode 100644 index 000000000..4def40910 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/objects/Group.d.ts @@ -0,0 +1,29 @@ +/** + * This is almost identical to an {@link Object3D}. Its purpose is to + * make working with groups of objects syntactically clearer. + * + * ```js + * // Create a group and add the two cubes. + * // These cubes can now be rotated / scaled etc as a group. + * const group = new THREE.Group(); + * + * group.add( meshA ); + * group.add( meshB ); + * + * scene.add( group ); + * ``` + * + * @augments Object3D + */ +export class Group extends Object3D { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isGroup: boolean; + type: string; +} +import { Object3D } from '../core/Object3D.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/InstancedMesh.d.ts b/jsdoc-testing/jsdoc/src/objects/InstancedMesh.d.ts new file mode 100644 index 000000000..926cab0e0 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/objects/InstancedMesh.d.ts @@ -0,0 +1,151 @@ +/** + * A special version of a mesh with instanced rendering support. Use + * this class if you have to render a large number of objects with the same + * geometry and material(s) but with different world transformations. The usage + * of 'InstancedMesh' will help you to reduce the number of draw calls and thus + * improve the overall rendering performance in your application. + * + * @augments Mesh + */ +export class InstancedMesh extends Mesh { + /** + * Constructs a new instanced mesh. + * + * @param {BufferGeometry} [geometry] - The mesh geometry. + * @param {Material|Array} [material] - The mesh material. + * @param {number} count - The number of instances. + */ + constructor(geometry?: BufferGeometry, material?: Material | Array, count: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isInstancedMesh: boolean; + /** + * Represents the local transformation of all instances. You have to set its + * {@link BufferAttribute#needsUpdate} flag to true if you modify instanced data + * via {@link InstancedMesh#setMatrixAt}. + * + * @type {InstancedBufferAttribute} + */ + instanceMatrix: InstancedBufferAttribute; + /** + * Represents the local transformation of all instances of the previous frame. + * Required for computing velocity. Maintained in {@link InstanceNode}. + * + * @type {?InstancedBufferAttribute} + * @default null + */ + previousInstanceMatrix: InstancedBufferAttribute | null; + /** + * Represents the color of all instances. You have to set its + * {@link BufferAttribute#needsUpdate} flag to true if you modify instanced data + * via {@link InstancedMesh#setColorAt}. + * + * @type {?InstancedBufferAttribute} + * @default null + */ + instanceColor: InstancedBufferAttribute | null; + /** + * Represents the morph target weights of all instances. You have to set its + * {@link Texture#needsUpdate} flag to true if you modify instanced data + * via {@link InstancedMesh#setMorphAt}. + * + * @type {?DataTexture} + * @default null + */ + morphTexture: DataTexture | null; + /** + * The bounding box of the instanced mesh. Can be computed via {@link InstancedMesh#computeBoundingBox}. + * + * @type {?Box3} + * @default null + */ + boundingBox: Box3 | null; + /** + * The bounding sphere of the instanced mesh. Can be computed via {@link InstancedMesh#computeBoundingSphere}. + * + * @type {?Sphere} + * @default null + */ + boundingSphere: Sphere | null; + /** + * Computes the bounding box of the instanced mesh, and updates {@link InstancedMesh#boundingBox}. + * The bounding box is not automatically computed by the engine; this method must be called by your app. + * You may need to recompute the bounding box if an instance is transformed via {@link InstancedMesh#setMatrixAt}. + */ + computeBoundingBox(): void; + /** + * Computes the bounding sphere of the instanced mesh, and updates {@link InstancedMesh#boundingSphere} + * The engine automatically computes the bounding sphere when it is needed, e.g., for ray casting or view frustum culling. + * You may need to recompute the bounding sphere if an instance is transformed via {@link InstancedMesh#setMatrixAt}. + */ + computeBoundingSphere(): void; + copy(source: any, recursive: any): this; + /** + * Gets the color of the defined instance. + * + * @param {number} index - The instance index. + * @param {Color} color - The target object that is used to store the method's result. + * @return {Color} A reference to the target color. + */ + getColorAt(index: number, color: Color): Color; + /** + * Gets the local transformation matrix of the defined instance. + * + * @param {number} index - The instance index. + * @param {Matrix4} matrix - The target object that is used to store the method's result. + * @return {Matrix4} A reference to the target matrix. + */ + getMatrixAt(index: number, matrix: Matrix4): Matrix4; + /** + * Gets the morph target weights of the defined instance. + * + * @param {number} index - The instance index. + * @param {Mesh} object - The target object that is used to store the method's result. + */ + getMorphAt(index: number, object: Mesh): void; + raycast(raycaster: any, intersects: any): void; + /** + * Sets the given color to the defined instance. Make sure you set the `needsUpdate` flag of + * {@link InstancedMesh#instanceColor} to `true` after updating all the colors. + * + * @param {number} index - The instance index. + * @param {Color} color - The instance color. + * @return {InstancedMesh} A reference to this instanced mesh. + */ + setColorAt(index: number, color: Color): InstancedMesh; + /** + * Sets the given local transformation matrix to the defined instance. Make sure you set the `needsUpdate` flag of + * {@link InstancedMesh#instanceMatrix} to `true` after updating all the matrices. + * + * @param {number} index - The instance index. + * @param {Matrix4} matrix - The local transformation. + * @return {InstancedMesh} A reference to this instanced mesh. + */ + setMatrixAt(index: number, matrix: Matrix4): InstancedMesh; + /** + * Sets the morph target weights to the defined instance. Make sure you set the `needsUpdate` flag of + * {@link InstancedMesh#morphTexture} to `true` after updating all the influences. + * + * @param {number} index - The instance index. + * @param {Mesh} object - A mesh which `morphTargetInfluences` property containing the morph target weights + * of a single instance. + * @return {InstancedMesh} A reference to this instanced mesh. + */ + setMorphAt(index: number, object: Mesh): InstancedMesh; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; +} +import { Mesh } from './Mesh.js'; +import { InstancedBufferAttribute } from '../core/InstancedBufferAttribute.js'; +import { DataTexture } from '../textures/DataTexture.js'; +import { Box3 } from '../math/Box3.js'; +import { Sphere } from '../math/Sphere.js'; +import { Matrix4 } from '../math/Matrix4.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/LOD.d.ts b/jsdoc-testing/jsdoc/src/objects/LOD.d.ts new file mode 100644 index 000000000..d2f7d1004 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/objects/LOD.d.ts @@ -0,0 +1,103 @@ +/** + * A component for providing a basic Level of Detail (LOD) mechanism. + * + * Every LOD level is associated with an object, and rendering can be switched + * between them at the distances specified. Typically you would create, say, + * three meshes, one for far away (low detail), one for mid range (medium + * detail) and one for close up (high detail). + * + * ```js + * const lod = new THREE.LOD(); + * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); + * + * //Create spheres with 3 levels of detail and create new LOD levels for them + * for( let i = 0; i < 3; i++ ) { + * + * const geometry = new THREE.IcosahedronGeometry( 10, 3 - i ); + * const mesh = new THREE.Mesh( geometry, material ); + * lod.addLevel( mesh, i * 75 ); + * + * } + * + * scene.add( lod ); + * ``` + * + * @augments Object3D + */ +export class LOD extends Object3D { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLOD: boolean; + /** + * The current LOD index. + * + * @private + * @type {number} + * @default 0 + */ + private _currentLevel; + type: string; + /** + * Whether the LOD object is updated automatically by the renderer per frame + * or not. If set to `false`, you have to call {@link LOD#update} in the + * render loop by yourself. + * + * @type {boolean} + * @default true + */ + autoUpdate: boolean; + copy(source: any): this; + /** + * Adds a mesh that will display at a certain distance and greater. Typically + * the further away the distance, the lower the detail on the mesh. + * + * @param {Object3D} object - The 3D object to display at this level. + * @param {number} [distance=0] - The distance at which to display this level of detail. + * @param {number} [hysteresis=0] - Threshold used to avoid flickering at LOD boundaries, as a fraction of distance. + * @return {LOD} A reference to this instance. + */ + addLevel(object: Object3D, distance?: number, hysteresis?: number): LOD; + /** + * Removes an existing level, based on the distance from the camera. + * Returns `true` when the level has been removed. Otherwise `false`. + * + * @param {number} distance - Distance of the level to remove. + * @return {boolean} Whether the level has been removed or not. + */ + removeLevel(distance: number): boolean; + /** + * Returns the currently active LOD level index. + * + * @return {number} The current active LOD level index. + */ + getCurrentLevel(): number; + /** + * Returns a reference to the first 3D object that is greater than + * the given distance. + * + * @param {number} distance - The LOD distance. + * @return {?Object3D} The found 3D object. `null` if no 3D object has been found. + */ + getObjectForDistance(distance: number): Object3D | null; + /** + * Computes intersection points between a casted ray and this LOD. + * + * @param {Raycaster} raycaster - The raycaster. + * @param {Array} intersects - The target array that holds the intersection points. + */ + raycast(raycaster: Raycaster, intersects: Array): void; + /** + * Updates the LOD by computing which LOD level should be visible according + * to the current distance of the given camera. + * + * @param {Camera} camera - The camera the scene is rendered with. + */ + update(camera: Camera): void; + toJSON(meta: any): Object; +} +import { Object3D } from '../core/Object3D.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/Line.d.ts b/jsdoc-testing/jsdoc/src/objects/Line.d.ts new file mode 100644 index 000000000..204db3fa8 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/objects/Line.d.ts @@ -0,0 +1,94 @@ +/** + * A continuous line. The line are rendered by connecting consecutive + * vertices with straight lines. + * + * ```js + * const material = new THREE.LineBasicMaterial( { color: 0x0000ff } ); + * + * const points = []; + * points.push( new THREE.Vector3( - 10, 0, 0 ) ); + * points.push( new THREE.Vector3( 0, 10, 0 ) ); + * points.push( new THREE.Vector3( 10, 0, 0 ) ); + * + * const geometry = new THREE.BufferGeometry().setFromPoints( points ); + * + * const line = new THREE.Line( geometry, material ); + * scene.add( line ); + * ``` + * + * @augments Object3D + */ +export class Line extends Object3D { + /** + * Constructs a new line. + * + * @param {BufferGeometry} [geometry] - The line geometry. + * @param {Material|Array} [material] - The line material. + */ + constructor(geometry?: BufferGeometry, material?: Material | Array); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLine: boolean; + type: string; + /** + * The line geometry. + * + * @type {BufferGeometry} + */ + geometry: BufferGeometry; + /** + * The line material. + * + * @type {Material|Array} + * @default LineBasicMaterial + */ + material: Material | Array; + /** + * A dictionary representing the morph targets in the geometry. The key is the + * morph targets name, the value its attribute index. This member is `undefined` + * by default and only set when morph targets are detected in the geometry. + * + * @type {Object|undefined} + * @default undefined + */ + morphTargetDictionary: { + [x: string]: number; + } | undefined; + /** + * An array of weights typically in the range `[0,1]` that specify how much of the morph + * is applied. This member is `undefined` by default and only set when morph targets are + * detected in the geometry. + * + * @type {Array|undefined} + * @default undefined + */ + morphTargetInfluences: Array | undefined; + copy(source: any, recursive: any): this; + /** + * Computes an array of distance values which are necessary for rendering dashed lines. + * For each vertex in the geometry, the method calculates the cumulative length from the + * current point to the very beginning of the line. + * + * @return {Line} A reference to this line. + */ + computeLineDistances(): Line; + /** + * Computes intersection points between a casted ray and this line. + * + * @param {Raycaster} raycaster - The raycaster. + * @param {Array} intersects - The target array that holds the intersection points. + */ + raycast(raycaster: Raycaster, intersects: Array): void; + /** + * Sets the values of {@link Line#morphTargetDictionary} and {@link Line#morphTargetInfluences} + * to make sure existing morph targets can influence this 3D object. + */ + updateMorphTargets(): void; +} +import { Object3D } from '../core/Object3D.js'; +import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/LineLoop.d.ts b/jsdoc-testing/jsdoc/src/objects/LineLoop.d.ts new file mode 100644 index 000000000..2f08cb084 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/objects/LineLoop.d.ts @@ -0,0 +1,25 @@ +/** + * A continuous line. This is nearly the same as {@link Line} the only difference + * is that the last vertex is connected with the first vertex in order to close + * the line to form a loop. + * + * @augments Line + */ +export class LineLoop extends Line { + /** + * Constructs a new line loop. + * + * @param {BufferGeometry} [geometry] - The line geometry. + * @param {Material|Array} [material] - The line material. + */ + constructor(geometry?: BufferGeometry, material?: Material | Array); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLineLoop: boolean; +} +import { Line } from './Line.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/LineSegments.d.ts b/jsdoc-testing/jsdoc/src/objects/LineSegments.d.ts new file mode 100644 index 000000000..88df8f57f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/objects/LineSegments.d.ts @@ -0,0 +1,24 @@ +/** + * A series of lines drawn between pairs of vertices. + * + * @augments Line + */ +export class LineSegments extends Line { + /** + * Constructs a new line segments. + * + * @param {BufferGeometry} [geometry] - The line geometry. + * @param {Material|Array} [material] - The line material. + */ + constructor(geometry?: BufferGeometry, material?: Material | Array); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isLineSegments: boolean; + computeLineDistances(): this; +} +import { Line } from './Line.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/Mesh.d.ts b/jsdoc-testing/jsdoc/src/objects/Mesh.d.ts new file mode 100644 index 000000000..a377e9c7d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/objects/Mesh.d.ts @@ -0,0 +1,97 @@ +/** + * Class representing triangular polygon mesh based objects. + * + * ```js + * const geometry = new THREE.BoxGeometry( 1, 1, 1 ); + * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); + * const mesh = new THREE.Mesh( geometry, material ); + * scene.add( mesh ); + * ``` + * + * @augments Object3D + */ +export class Mesh extends Object3D { + /** + * Constructs a new mesh. + * + * @param {BufferGeometry} [geometry] - The mesh geometry. + * @param {Material|Array} [material] - The mesh material. + */ + constructor(geometry?: BufferGeometry, material?: Material | Array); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMesh: boolean; + type: string; + /** + * The mesh geometry. + * + * @type {BufferGeometry} + */ + geometry: BufferGeometry; + /** + * The mesh material. + * + * @type {Material|Array} + * @default MeshBasicMaterial + */ + material: Material | Array; + /** + * A dictionary representing the morph targets in the geometry. The key is the + * morph targets name, the value its attribute index. This member is `undefined` + * by default and only set when morph targets are detected in the geometry. + * + * @type {Object|undefined} + * @default undefined + */ + morphTargetDictionary: { + [x: string]: number; + } | undefined; + /** + * An array of weights typically in the range `[0,1]` that specify how much of the morph + * is applied. This member is `undefined` by default and only set when morph targets are + * detected in the geometry. + * + * @type {Array|undefined} + * @default undefined + */ + morphTargetInfluences: Array | undefined; + /** + * The number of instances of this mesh. + * Can only be used with {@link WebGPURenderer}. + * + * @type {number} + * @default 1 + */ + count: number; + copy(source: any, recursive: any): this; + /** + * Sets the values of {@link Mesh#morphTargetDictionary} and {@link Mesh#morphTargetInfluences} + * to make sure existing morph targets can influence this 3D object. + */ + updateMorphTargets(): void; + /** + * Returns the local-space position of the vertex at the given index, taking into + * account the current animation state of both morph targets and skinning. + * + * @param {number} index - The vertex index. + * @param {Vector3} target - The target object that is used to store the method's result. + * @return {Vector3} The vertex position in local space. + */ + getVertexPosition(index: number, target: Vector3): Vector3; + /** + * Computes intersection points between a casted ray and this line. + * + * @param {Raycaster} raycaster - The raycaster. + * @param {Array} intersects - The target array that holds the intersection points. + */ + raycast(raycaster: Raycaster, intersects: Array): void; + _computeIntersections(raycaster: any, intersects: any, rayLocalSpace: any): void; +} +import { Object3D } from '../core/Object3D.js'; +import { BufferGeometry } from '../core/BufferGeometry.js'; +import { Vector3 } from '../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/Points.d.ts b/jsdoc-testing/jsdoc/src/objects/Points.d.ts new file mode 100644 index 000000000..68548e3e2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/objects/Points.d.ts @@ -0,0 +1,71 @@ +/** + * A class for displaying points or point clouds. + * + * @augments Object3D + */ +export class Points extends Object3D { + /** + * Constructs a new point cloud. + * + * @param {BufferGeometry} [geometry] - The points geometry. + * @param {Material|Array} [material] - The points material. + */ + constructor(geometry?: BufferGeometry, material?: Material | Array); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isPoints: boolean; + type: string; + /** + * The points geometry. + * + * @type {BufferGeometry} + */ + geometry: BufferGeometry; + /** + * The line material. + * + * @type {Material|Array} + * @default PointsMaterial + */ + material: Material | Array; + /** + * A dictionary representing the morph targets in the geometry. The key is the + * morph targets name, the value its attribute index. This member is `undefined` + * by default and only set when morph targets are detected in the geometry. + * + * @type {Object|undefined} + * @default undefined + */ + morphTargetDictionary: { + [x: string]: number; + } | undefined; + /** + * An array of weights typically in the range `[0,1]` that specify how much of the morph + * is applied. This member is `undefined` by default and only set when morph targets are + * detected in the geometry. + * + * @type {Array|undefined} + * @default undefined + */ + morphTargetInfluences: Array | undefined; + copy(source: any, recursive: any): this; + /** + * Computes intersection points between a casted ray and this point cloud. + * + * @param {Raycaster} raycaster - The raycaster. + * @param {Array} intersects - The target array that holds the intersection points. + */ + raycast(raycaster: Raycaster, intersects: Array): void; + /** + * Sets the values of {@link Points#morphTargetDictionary} and {@link Points#morphTargetInfluences} + * to make sure existing morph targets can influence this 3D object. + */ + updateMorphTargets(): void; +} +import { Object3D } from '../core/Object3D.js'; +import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/Skeleton.d.ts b/jsdoc-testing/jsdoc/src/objects/Skeleton.d.ts new file mode 100644 index 000000000..7bab62ed2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/objects/Skeleton.d.ts @@ -0,0 +1,134 @@ +/** + * Class for representing the armatures in `three.js`. The skeleton + * is defined by a hierarchy of bones. + * + * ```js + * const bones = []; + * + * const shoulder = new THREE.Bone(); + * const elbow = new THREE.Bone(); + * const hand = new THREE.Bone(); + * + * shoulder.add( elbow ); + * elbow.add( hand ); + * + * bones.push( shoulder , elbow, hand); + * + * shoulder.position.y = -5; + * elbow.position.y = 0; + * hand.position.y = 5; + * + * const armSkeleton = new THREE.Skeleton( bones ); + * ``` + */ +export class Skeleton { + /** + * Constructs a new skeleton. + * + * @param {Array} [bones] - An array of bones. + * @param {Array} [boneInverses] - An array of bone inverse matrices. + * If not provided, these matrices will be computed automatically via {@link Skeleton#calculateInverses}. + */ + constructor(bones?: Array, boneInverses?: Array); + uuid: string; + /** + * An array of bones defining the skeleton. + * + * @type {Array} + */ + bones: Array; + /** + * An array of bone inverse matrices. + * + * @type {Array} + */ + boneInverses: Array; + /** + * An array buffer holding the bone data. + * Input data for {@link Skeleton#boneTexture}. + * + * @type {?Float32Array} + * @default null + */ + boneMatrices: Float32Array | null; + /** + * An array buffer holding the bone data of the previous frame. + * Required for computing velocity. Maintained in {@link SkinningNode}. + * + * @type {?Float32Array} + * @default null + */ + previousBoneMatrices: Float32Array | null; + /** + * A texture holding the bone data for use + * in the vertex shader. + * + * @type {?DataTexture} + * @default null + */ + boneTexture: DataTexture | null; + /** + * Initializes the skeleton. This method gets automatically called by the constructor + * but depending on how the skeleton is created it might be necessary to call this method + * manually. + */ + init(): void; + /** + * Computes the bone inverse matrices. This method resets {@link Skeleton#boneInverses} + * and fills it with new matrices. + */ + calculateInverses(): void; + /** + * Resets the skeleton to the base pose. + */ + pose(): void; + /** + * Resets the skeleton to the base pose. + */ + update(): void; + /** + * Returns a new skeleton with copied values from this instance. + * + * @return {Skeleton} A clone of this instance. + */ + clone(): Skeleton; + /** + * Computes a data texture for passing bone data to the vertex shader. + * + * @return {Skeleton} A reference of this instance. + */ + computeBoneTexture(): Skeleton; + /** + * Searches through the skeleton's bone array and returns the first with a + * matching name. + * + * @param {string} name - The name of the bone. + * @return {Bone|undefined} The found bone. `undefined` if no bone has been found. + */ + getBoneByName(name: string): Bone | undefined; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose(): void; + /** + * Setups the skeleton by the given JSON and bones. + * + * @param {Object} json - The skeleton as serialized JSON. + * @param {Object} bones - An array of bones. + * @return {Skeleton} A reference of this instance. + */ + fromJSON(json: Object, bones: { + [x: string]: Bone; + }): Skeleton; + /** + * Serializes the skeleton into JSON. + * + * @return {Object} A JSON object representing the serialized skeleton. + * @see {@link ObjectLoader#parse} + */ + toJSON(): Object; +} +import { Bone } from './Bone.js'; +import { Matrix4 } from '../math/Matrix4.js'; +import { DataTexture } from '../textures/DataTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/SkinnedMesh.d.ts b/jsdoc-testing/jsdoc/src/objects/SkinnedMesh.d.ts new file mode 100644 index 000000000..77cf71c4e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/objects/SkinnedMesh.d.ts @@ -0,0 +1,118 @@ +/** + * A mesh that has a {@link Skeleton} that can then be used to animate the + * vertices of the geometry with skinning/skeleton animation. + * + * Next to a valid skeleton, the skinned mesh requires skin indices and weights + * as buffer attributes in its geometry. These attribute define which bones affect a single + * vertex to a certain extend. + * + * Typically skinned meshes are not created manually but loaders like {@link GLTFLoader} + * or {@link FBXLoader } import respective models. + * + * @augments Mesh + * @demo scenes/bones-browser.html + */ +export class SkinnedMesh extends Mesh { + /** + * Constructs a new skinned mesh. + * + * @param {BufferGeometry} [geometry] - The mesh geometry. + * @param {Material|Array} [material] - The mesh material. + */ + constructor(geometry?: BufferGeometry, material?: Material | Array); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSkinnedMesh: boolean; + /** + * `AttachedBindMode` means the skinned mesh shares the same world space as the skeleton. + * This is not true when using `DetachedBindMode` which is useful when sharing a skeleton + * across multiple skinned meshes. + * + * @type {(AttachedBindMode|DetachedBindMode)} + * @default AttachedBindMode + */ + bindMode: (string | string); + /** + * The base matrix that is used for the bound bone transforms. + * + * @type {Matrix4} + */ + bindMatrix: Matrix4; + /** + * The base matrix that is used for resetting the bound bone transforms. + * + * @type {Matrix4} + */ + bindMatrixInverse: Matrix4; + /** + * The bounding box of the skinned mesh. Can be computed via {@link SkinnedMesh#computeBoundingBox}. + * + * @type {?Box3} + * @default null + */ + boundingBox: Box3 | null; + /** + * The bounding sphere of the skinned mesh. Can be computed via {@link SkinnedMesh#computeBoundingSphere}. + * + * @type {?Sphere} + * @default null + */ + boundingSphere: Sphere | null; + /** + * Computes the bounding box of the skinned mesh, and updates {@link SkinnedMesh#boundingBox}. + * The bounding box is not automatically computed by the engine; this method must be called by your app. + * If the skinned mesh is animated, the bounding box should be recomputed per frame in order to reflect + * the current animation state. + */ + computeBoundingBox(): void; + /** + * Computes the bounding sphere of the skinned mesh, and updates {@link SkinnedMesh#boundingSphere}. + * The bounding sphere is automatically computed by the engine once when it is needed, e.g., for ray casting + * and view frustum culling. If the skinned mesh is animated, the bounding sphere should be recomputed + * per frame in order to reflect the current animation state. + */ + computeBoundingSphere(): void; + copy(source: any, recursive: any): this; + skeleton: any; + raycast(raycaster: any, intersects: any): void; + getVertexPosition(index: any, target: any): any; + /** + * Binds the given skeleton to the skinned mesh. + * + * @param {Skeleton} skeleton - The skeleton to bind. + * @param {Matrix4} [bindMatrix] - The bind matrix. If no bind matrix is provided, + * the skinned mesh's world matrix will be used instead. + */ + bind(skeleton: Skeleton, bindMatrix?: Matrix4): void; + /** + * This method sets the skinned mesh in the rest pose). + */ + pose(): void; + /** + * Normalizes the skin weights which are defined as a buffer attribute + * in the skinned mesh's geometry. + */ + normalizeSkinWeights(): void; + updateMatrixWorld(force: any): void; + /** + * Applies the bone transform associated with the given index to the given + * vector. Can be used to transform positions or direction vectors by providing + * a Vector4 with 1 or 0 in the w component respectively. Returns the updated vector. + * + * @param {number} index - The vertex index. + * @param {Vector3|Vector4} target - The target object that is used to store the method's result. + * @return {Vector3|Vector4} The updated vertex attribute data. + */ + applyBoneTransform(index: number, target: Vector3 | Vector4): Vector3 | Vector4; +} +import { Mesh } from './Mesh.js'; +import { Matrix4 } from '../math/Matrix4.js'; +import { Box3 } from '../math/Box3.js'; +import { Sphere } from '../math/Sphere.js'; +import { Vector3 } from '../math/Vector3.js'; +import { Vector4 } from '../math/Vector4.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/Sprite.d.ts b/jsdoc-testing/jsdoc/src/objects/Sprite.d.ts new file mode 100644 index 000000000..adbf06c9b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/objects/Sprite.d.ts @@ -0,0 +1,75 @@ +/** + * A sprite is a plane that always faces towards the camera, generally with a + * partially transparent texture applied. + * + * Sprites do not cast shadows, setting {@link Object3D#castShadow} to `true` will + * have no effect. + * + * ```js + * const map = new THREE.TextureLoader().load( 'sprite.png' ); + * const material = new THREE.SpriteMaterial( { map: map } ); + * + * const sprite = new THREE.Sprite( material ); + * scene.add( sprite ); + * ``` + * + * @augments Object3D + */ +export class Sprite extends Object3D { + /** + * Constructs a new sprite. + * + * @param {(SpriteMaterial|SpriteNodeMaterial)} [material] - The sprite material. + */ + constructor(material?: (SpriteMaterial | SpriteNodeMaterial)); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSprite: boolean; + type: string; + /** + * The sprite geometry. + * + * @type {BufferGeometry} + */ + geometry: BufferGeometry; + /** + * The sprite material. + * + * @type {(SpriteMaterial|SpriteNodeMaterial)} + */ + material: (SpriteMaterial | SpriteNodeMaterial); + /** + * The sprite's anchor point, and the point around which the sprite rotates. + * A value of `(0.5, 0.5)` corresponds to the midpoint of the sprite. A value + * of `(0, 0)` corresponds to the lower left corner of the sprite. + * + * @type {Vector2} + * @default (0.5,0.5) + */ + center: Vector2; + /** + * The number of instances of this sprite. + * Can only be used with {@link WebGPURenderer}. + * + * @type {number} + * @default 1 + */ + count: number; + /** + * Computes intersection points between a casted ray and this sprite. + * + * @param {Raycaster} raycaster - The raycaster. + * @param {Array} intersects - The target array that holds the intersection points. + */ + raycast(raycaster: Raycaster, intersects: Array): void; + copy(source: any, recursive: any): this; +} +import { Object3D } from '../core/Object3D.js'; +import { BufferGeometry } from '../core/BufferGeometry.js'; +import { SpriteMaterial } from '../materials/SpriteMaterial.js'; +import { Vector2 } from '../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/WebGL3DRenderTarget.d.ts b/jsdoc-testing/jsdoc/src/renderers/WebGL3DRenderTarget.d.ts new file mode 100644 index 000000000..e27e8a964 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/WebGL3DRenderTarget.d.ts @@ -0,0 +1,25 @@ +/** + * A 3D render target used in context of {@link WebGLRenderer}. + * + * @augments WebGLRenderTarget + */ +export class WebGL3DRenderTarget extends WebGLRenderTarget { + /** + * Constructs a new 3D render target. + * + * @param {number} [width=1] - The width of the render target. + * @param {number} [height=1] - The height of the render target. + * @param {number} [depth=1] - The height of the render target. + * @param {RenderTarget~Options} [options] - The configuration object. + */ + constructor(width?: number, height?: number, depth?: number, options?: {}); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWebGL3DRenderTarget: boolean; +} +import { WebGLRenderTarget } from './WebGLRenderTarget.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/WebGLArrayRenderTarget.d.ts b/jsdoc-testing/jsdoc/src/renderers/WebGLArrayRenderTarget.d.ts new file mode 100644 index 000000000..22f9b0da1 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/WebGLArrayRenderTarget.d.ts @@ -0,0 +1,25 @@ +/** + * An array render target used in context of {@link WebGLRenderer}. + * + * @augments WebGLRenderTarget + */ +export class WebGLArrayRenderTarget extends WebGLRenderTarget { + /** + * Constructs a new array render target. + * + * @param {number} [width=1] - The width of the render target. + * @param {number} [height=1] - The height of the render target. + * @param {number} [depth=1] - The height of the render target. + * @param {RenderTarget~Options} [options] - The configuration object. + */ + constructor(width?: number, height?: number, depth?: number, options?: {}); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWebGLArrayRenderTarget: boolean; +} +import { WebGLRenderTarget } from './WebGLRenderTarget.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/WebGLCubeRenderTarget.d.ts b/jsdoc-testing/jsdoc/src/renderers/WebGLCubeRenderTarget.d.ts new file mode 100644 index 000000000..c112d383d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/WebGLCubeRenderTarget.d.ts @@ -0,0 +1,40 @@ +/** + * A cube render target used in context of {@link WebGLRenderer}. + * + * @augments WebGLRenderTarget + */ +export class WebGLCubeRenderTarget extends WebGLRenderTarget { + /** + * Constructs a new cube render target. + * + * @param {number} [size=1] - The size of the render target. + * @param {RenderTarget~Options} [options] - The configuration object. + */ + constructor(size?: number, options?: {}); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWebGLCubeRenderTarget: boolean; + /** + * Converts the given equirectangular texture to a cube map. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {Texture} texture - The equirectangular texture. + * @return {WebGLCubeRenderTarget} A reference to this cube render target. + */ + fromEquirectangularTexture(renderer: WebGLRenderer, texture: Texture): WebGLCubeRenderTarget; + /** + * Clears this cube render target. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {boolean} [color=true] - Whether the color buffer should be cleared or not. + * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not. + * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not. + */ + clear(renderer: WebGLRenderer, color?: boolean, depth?: boolean, stencil?: boolean): void; +} +import { WebGLRenderTarget } from './WebGLRenderTarget.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/WebGLRenderTarget.d.ts b/jsdoc-testing/jsdoc/src/renderers/WebGLRenderTarget.d.ts new file mode 100644 index 000000000..f20262ff0 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/WebGLRenderTarget.d.ts @@ -0,0 +1,16 @@ +/** + * A render target used in context of {@link WebGLRenderer}. + * + * @augments RenderTarget + */ +export class WebGLRenderTarget extends RenderTarget { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWebGLRenderTarget: boolean; +} +import { RenderTarget } from '../core/RenderTarget.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/WebGLRenderer.d.ts b/jsdoc-testing/jsdoc/src/renderers/WebGLRenderer.d.ts new file mode 100644 index 000000000..7ed2e8df3 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/WebGLRenderer.d.ts @@ -0,0 +1,580 @@ +/** + * ~Options + */ +export type WebGLRenderer = { + /** + * - A canvas element where the renderer draws its output. If not passed in here, a new canvas element will be created by the renderer. + */ + canvas?: HTMLCanvasElement | OffscreenCanvas | undefined; + /** + * - Can be used to attach an existing rendering context to this renderer. + */ + context?: WebGL2RenderingContext | undefined; + /** + * - The default shader precision. Uses `highp` if supported by the device. + */ + precision?: "highp" | "mediump" | "lowp" | undefined; + /** + * - Controls the default clear alpha value. When set to`true`, the value is `0`. Otherwise it's `1`. + */ + alpha?: boolean | undefined; + /** + * Whether the renderer will assume colors have premultiplied alpha or not. + */ + premultipliedAlpha?: boolean | undefined; + /** + * Whether to use the default MSAA or not. + */ + antialias?: boolean | undefined; + /** + * Whether the drawing buffer has a stencil buffer of at least 8 bits or not. + */ + stencil?: boolean | undefined; + /** + * Whether to preserve the buffer until manually cleared or overwritten. + */ + preserveDrawingBuffer?: boolean | undefined; + /** + * Provides a hint to the user agent indicating what configuration of GPU is suitable for this WebGL context. + */ + powerPreference?: "default" | "high-performance" | "low-power" | undefined; + /** + * Whether the renderer creation will fail upon low performance is detected. + */ + failIfMajorPerformanceCaveat?: boolean | undefined; + /** + * Whether the drawing buffer has a depth buffer of at least 16 bits. + */ + depth?: boolean | undefined; + /** + * Whether to use a logarithmic depth buffer. It may be necessary to use this if dealing with huge differences in scale in a single scene. + * Note that this setting uses `gl_FragDepth` if available which disables the Early Fragment Test optimization and can cause a decrease in performance. + */ + logarithmicDepthBuffer?: boolean | undefined; + /** + * Whether to use a reverse depth buffer. Requires the `EXT_clip_control` extension. + * This is a more faster and accurate version than logarithmic depth buffer. + */ + reversedDepthBuffer?: boolean | undefined; + /** + * Defines the type of the output buffer. Use `HalfFloatType` for HDR rendering with tone mapping and post-processing support. + */ + outputBufferType?: number | undefined; +}; +/** + * This renderer uses WebGL 2 to display scenes. + * + * WebGL 1 is not supported since `r163`. + */ +export class WebGLRenderer { + /** + * Constructs a new WebGL renderer. + * + * @param {WebGLRenderer~Options} [parameters] - The configuration parameter. + */ + constructor(parameters?: {}); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWebGLRenderer: boolean; + /** + * A canvas where the renderer draws its output. This is automatically created by the renderer + * in the constructor (if not provided already); you just need to add it to your page like so: + * ```js + * document.body.appendChild( renderer.domElement ); + * ``` + * + * @type {HTMLCanvasElement|OffscreenCanvas} + */ + domElement: HTMLCanvasElement | OffscreenCanvas; + /** + * A object with debug configuration settings. + * + * - `checkShaderErrors`: If it is `true`, defines whether material shader programs are + * checked for errors during compilation and linkage process. It may be useful to disable + * this check in production for performance gain. It is strongly recommended to keep these + * checks enabled during development. If the shader does not compile and link, it will not + * work and associated material will not render. + * - `onShaderError(gl, program, glVertexShader,glFragmentShader)`: A callback function that + * can be used for custom error reporting. The callback receives the WebGL context, an instance + * of WebGLProgram as well two instances of WebGLShader representing the vertex and fragment shader. + * Assigning a custom function disables the default error reporting. + * + * @type {Object} + */ + debug: Object; + /** + * Whether the renderer should automatically clear its output before rendering a frame or not. + * + * @type {boolean} + * @default true + */ + autoClear: boolean; + /** + * If {@link WebGLRenderer#autoClear} set to `true`, whether the renderer should clear + * the color buffer or not. + * + * @type {boolean} + * @default true + */ + autoClearColor: boolean; + /** + * If {@link WebGLRenderer#autoClear} set to `true`, whether the renderer should clear + * the depth buffer or not. + * + * @type {boolean} + * @default true + */ + autoClearDepth: boolean; + /** + * If {@link WebGLRenderer#autoClear} set to `true`, whether the renderer should clear + * the stencil buffer or not. + * + * @type {boolean} + * @default true + */ + autoClearStencil: boolean; + /** + * Whether the renderer should sort objects or not. + * + * Note: Sorting is used to attempt to properly render objects that have some + * degree of transparency. By definition, sorting objects may not work in all + * cases. Depending on the needs of application, it may be necessary to turn + * off sorting and use other methods to deal with transparency rendering e.g. + * manually determining each object's rendering order. + * + * @type {boolean} + * @default true + */ + sortObjects: boolean; + /** + * User-defined clipping planes specified in world space. These planes apply globally. + * Points in space whose dot product with the plane is negative are cut away. + * + * @type {Array} + */ + clippingPlanes: Array; + /** + * Whether the renderer respects object-level clipping planes or not. + * + * @type {boolean} + * @default false + */ + localClippingEnabled: boolean; + /** + * The tone mapping technique of the renderer. + * + * @type {(NoToneMapping|LinearToneMapping|ReinhardToneMapping|CineonToneMapping|ACESFilmicToneMapping|CustomToneMapping|AgXToneMapping|NeutralToneMapping)} + * @default NoToneMapping + */ + toneMapping: (number | LinearToneMapping | ReinhardToneMapping | CineonToneMapping | ACESFilmicToneMapping | CustomToneMapping | AgXToneMapping | NeutralToneMapping); + /** + * Exposure level of tone mapping. + * + * @type {number} + * @default 1 + */ + toneMappingExposure: number; + /** + * The normalized resolution scale for the transmission render target, measured in percentage + * of viewport dimensions. Lowering this value can result in significant performance improvements + * when using {@link MeshPhysicalMaterial#transmission}. + * + * @type {number} + * @default 1 + */ + transmissionResolutionScale: number; + _outputColorSpace: string; + /** + * A reference to the XR manager. + * + * @type {WebXRManager} + */ + xr: WebXRManager; + /** + * Returns the rendering context. + * + * @return {WebGL2RenderingContext} The rendering context. + */ + getContext: () => WebGL2RenderingContext; + /** + * Returns the rendering context attributes. + * + * @return {WebGLContextAttributes} The rendering context attributes. + */ + getContextAttributes: () => WebGLContextAttributes; + /** + * Simulates a loss of the WebGL context. This requires support for the `WEBGL_lose_context` extension. + */ + forceContextLoss: () => void; + /** + * Simulates a restore of the WebGL context. This requires support for the `WEBGL_lose_context` extension. + */ + forceContextRestore: () => void; + /** + * Returns the pixel ratio. + * + * @return {number} The pixel ratio. + */ + getPixelRatio: () => number; + /** + * Sets the given pixel ratio and resizes the canvas if necessary. + * + * @param {number} value - The pixel ratio. + */ + setPixelRatio: (value: number) => void; + /** + * Returns the renderer's size in logical pixels. This method does not honor the pixel ratio. + * + * @param {Vector2} target - The method writes the result in this target object. + * @return {Vector2} The renderer's size in logical pixels. + */ + getSize: (target: Vector2) => Vector2; + /** + * Resizes the output canvas to (width, height) with device pixel ratio taken + * into account, and also sets the viewport to fit that size, starting in (0, + * 0). Setting `updateStyle` to false prevents any style changes to the output canvas. + * + * @param {number} width - The width in logical pixels. + * @param {number} height - The height in logical pixels. + * @param {boolean} [updateStyle=true] - Whether to update the `style` attribute of the canvas or not. + */ + setSize: (width: number, height: number, updateStyle?: boolean) => void; + /** + * Returns the drawing buffer size in physical pixels. This method honors the pixel ratio. + * + * @param {Vector2} target - The method writes the result in this target object. + * @return {Vector2} The drawing buffer size. + */ + getDrawingBufferSize: (target: Vector2) => Vector2; + /** + * This method allows to define the drawing buffer size by specifying + * width, height and pixel ratio all at once. The size of the drawing + * buffer is computed with this formula: + * ```js + * size.x = width * pixelRatio; + * size.y = height * pixelRatio; + * ``` + * + * @param {number} width - The width in logical pixels. + * @param {number} height - The height in logical pixels. + * @param {number} pixelRatio - The pixel ratio. + */ + setDrawingBufferSize: (width: number, height: number, pixelRatio: number) => void; + /** + * Sets the post-processing effects to be applied after rendering. + * + * @param {Array} effects - An array of post-processing effects. + */ + setEffects: (effects: any[]) => void; + /** + * Returns the current viewport definition. + * + * @param {Vector2} target - The method writes the result in this target object. + * @return {Vector2} The current viewport definition. + */ + getCurrentViewport: (target: Vector2) => Vector2; + /** + * Returns the viewport definition. + * + * @param {Vector4} target - The method writes the result in this target object. + * @return {Vector4} The viewport definition. + */ + getViewport: (target: Vector4) => Vector4; + /** + * Sets the viewport to render from `(x, y)` to `(x + width, y + height)`. + * + * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the viewport origin in logical pixel unit. + * Or alternatively a four-component vector specifying all the parameters of the viewport. + * @param {number} y - The vertical coordinate for the lower left corner of the viewport origin in logical pixel unit. + * @param {number} width - The width of the viewport in logical pixel unit. + * @param {number} height - The height of the viewport in logical pixel unit. + */ + setViewport: (x: number | Vector4, y: number, width: number, height: number) => void; + /** + * Returns the scissor region. + * + * @param {Vector4} target - The method writes the result in this target object. + * @return {Vector4} The scissor region. + */ + getScissor: (target: Vector4) => Vector4; + /** + * Sets the scissor region to render from `(x, y)` to `(x + width, y + height)`. + * + * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the scissor region origin in logical pixel unit. + * Or alternatively a four-component vector specifying all the parameters of the scissor region. + * @param {number} y - The vertical coordinate for the lower left corner of the scissor region origin in logical pixel unit. + * @param {number} width - The width of the scissor region in logical pixel unit. + * @param {number} height - The height of the scissor region in logical pixel unit. + */ + setScissor: (x: number | Vector4, y: number, width: number, height: number) => void; + /** + * Returns `true` if the scissor test is enabled. + * + * @return {boolean} Whether the scissor test is enabled or not. + */ + getScissorTest: () => boolean; + /** + * Enable or disable the scissor test. When this is enabled, only the pixels + * within the defined scissor area will be affected by further renderer + * actions. + * + * @param {boolean} boolean - Whether the scissor test is enabled or not. + */ + setScissorTest: (boolean: boolean) => void; + /** + * Sets a custom opaque sort function for the render lists. Pass `null` + * to use the default `painterSortStable` function. + * + * @param {?Function} method - The opaque sort function. + */ + setOpaqueSort: (method: Function | null) => void; + /** + * Sets a custom transparent sort function for the render lists. Pass `null` + * to use the default `reversePainterSortStable` function. + * + * @param {?Function} method - The opaque sort function. + */ + setTransparentSort: (method: Function | null) => void; + /** + * Returns the clear color. + * + * @param {Color} target - The method writes the result in this target object. + * @return {Color} The clear color. + */ + getClearColor: (target: Color) => Color; + /** + * Sets the clear color and alpha. + * + * @param {Color} color - The clear color. + * @param {number} [alpha=1] - The clear alpha. + */ + setClearColor: (...args: any[]) => void; + /** + * Returns the clear alpha. Ranges within `[0,1]`. + * + * @return {number} The clear alpha. + */ + getClearAlpha: () => number; + /** + * Sets the clear alpha. + * + * @param {number} alpha - The clear alpha. + */ + setClearAlpha: (...args: any[]) => void; + /** + * Tells the renderer to clear its color, depth or stencil drawing buffer(s). + * This method initializes the buffers to the current clear color values. + * + * @param {boolean} [color=true] - Whether the color buffer should be cleared or not. + * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not. + * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not. + */ + clear: (color?: boolean, depth?: boolean, stencil?: boolean) => void; + /** + * Clears the color buffer. Equivalent to calling `renderer.clear( true, false, false )`. + */ + clearColor: () => void; + /** + * Clears the depth buffer. Equivalent to calling `renderer.clear( false, true, false )`. + */ + clearDepth: () => void; + /** + * Clears the stencil buffer. Equivalent to calling `renderer.clear( false, false, true )`. + */ + clearStencil: () => void; + /** + * Sets a compatibility node builder for rendering node materials with WebGLRenderer. + * This enables using TSL (Three.js Shading Language) node materials to prepare + * for migration to WebGPURenderer. + * + * @param {WebGLNodesHandler} nodesHandler - The node builder instance. + */ + setNodesHandler: (nodesHandler: WebGLNodesHandler) => void; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + */ + dispose: () => void; + renderBufferDirect: (camera: any, scene: any, geometry: any, material: any, object: any, group: any) => void; + /** + * Compiles all materials in the scene with the camera. This is useful to precompile shaders + * before the first rendering. If you want to add a 3D object to an existing scene, use the third + * optional parameter for applying the target scene. + * + * Note that the (target) scene's lighting and environment must be configured before calling this method. + * + * @param {Object3D} scene - The scene or another type of 3D object to precompile. + * @param {Camera} camera - The camera. + * @param {?Scene} [targetScene=null] - The target scene. + * @return {Set} The precompiled materials. + */ + compile: (scene: Object3D, camera: Camera, targetScene?: Scene | null) => Set; + /** + * Asynchronous version of {@link WebGLRenderer#compile}. + * + * This method makes use of the `KHR_parallel_shader_compile` WebGL extension. Hence, + * it is recommended to use this version of `compile()` whenever possible. + * + * @async + * @param {Object3D} scene - The scene or another type of 3D object to precompile. + * @param {Camera} camera - The camera. + * @param {?Scene} [targetScene=null] - The target scene. + * @return {Promise} A Promise that resolves when the given scene can be rendered without unnecessary stalling due to shader compilation. + */ + compileAsync: (scene: Object3D, camera: Camera, targetScene?: Scene | null) => Promise; + /** + * Applications are advised to always define the animation loop + * with this method and not manually with `requestAnimationFrame()` + * for best compatibility. + * + * @param {?onAnimationCallback} callback - The application's animation loop. + */ + setAnimationLoop: (callback: onAnimationCallback | null) => void; + /** + * Renders the given scene (or other type of 3D object) using the given camera. + * + * The render is done to a previously specified render target set by calling {@link WebGLRenderer#setRenderTarget} + * or to the canvas as usual. + * + * By default render buffers are cleared before rendering but you can prevent + * this by setting the property `autoClear` to `false`. If you want to prevent + * only certain buffers being cleared you can `autoClearColor`, `autoClearDepth` + * or `autoClearStencil` to `false`. To force a clear, use {@link WebGLRenderer#clear}. + * + * @param {Object3D} scene - The scene to render. + * @param {Camera} camera - The camera. + */ + render: (scene: Object3D, camera: Camera) => void; + /** + * Returns the active cube face. + * + * @return {number} The active cube face. + */ + getActiveCubeFace: () => number; + /** + * Returns the active mipmap level. + * + * @return {number} The active mipmap level. + */ + getActiveMipmapLevel: () => number; + /** + * Returns the active render target. + * + * @return {?WebGLRenderTarget} The active render target. Returns `null` if no render target + * is currently set. + */ + getRenderTarget: () => WebGLRenderTarget | null; + setRenderTargetTextures: (renderTarget: any, colorTexture: any, depthTexture: any) => void; + setRenderTargetFramebuffer: (renderTarget: any, defaultFramebuffer: any) => void; + /** + * Sets the active rendertarget. + * + * @param {?WebGLRenderTarget} renderTarget - The render target to set. When `null` is given, + * the canvas is set as the active render target instead. + * @param {number} [activeCubeFace=0] - The active cube face when using a cube render target. + * Indicates the z layer to render in to when using 3D or array render targets. + * @param {number} [activeMipmapLevel=0] - The active mipmap level. + */ + setRenderTarget: (renderTarget: WebGLRenderTarget | null, activeCubeFace?: number, activeMipmapLevel?: number) => void; + /** + * Reads the pixel data from the given render target into the given buffer. + * + * @param {WebGLRenderTarget} renderTarget - The render target to read from. + * @param {number} x - The `x` coordinate of the copy region's origin. + * @param {number} y - The `y` coordinate of the copy region's origin. + * @param {number} width - The width of the copy region. + * @param {number} height - The height of the copy region. + * @param {TypedArray} buffer - The result buffer. + * @param {number} [activeCubeFaceIndex] - The active cube face index. + * @param {number} [textureIndex=0] - The texture index of an MRT render target. + */ + readRenderTargetPixels: (renderTarget: WebGLRenderTarget, x: number, y: number, width: number, height: number, buffer: TypedArray, activeCubeFaceIndex?: number, textureIndex?: number) => void; + /** + * Asynchronous, non-blocking version of {@link WebGLRenderer#readRenderTargetPixels}. + * + * It is recommended to use this version of `readRenderTargetPixels()` whenever possible. + * + * @async + * @param {WebGLRenderTarget} renderTarget - The render target to read from. + * @param {number} x - The `x` coordinate of the copy region's origin. + * @param {number} y - The `y` coordinate of the copy region's origin. + * @param {number} width - The width of the copy region. + * @param {number} height - The height of the copy region. + * @param {TypedArray} buffer - The result buffer. + * @param {number} [activeCubeFaceIndex] - The active cube face index. + * @param {number} [textureIndex=0] - The texture index of an MRT render target. + * @return {Promise} A Promise that resolves when the read has been finished. The resolve provides the read data as a typed array. + */ + readRenderTargetPixelsAsync: (renderTarget: WebGLRenderTarget, x: number, y: number, width: number, height: number, buffer: TypedArray, activeCubeFaceIndex?: number, textureIndex?: number) => Promise; + /** + * Copies pixels from the current bound framebuffer into the given texture. + * + * @param {FramebufferTexture} texture - The texture. + * @param {?Vector2} [position=null] - The start position of the copy operation. + * @param {number} [level=0] - The mip level. The default represents the base mip. + */ + copyFramebufferToTexture: (texture: FramebufferTexture, position?: Vector2 | null, level?: number) => void; + /** + * Copies data of the given source texture into a destination texture. + * + * When using render target textures as `srcTexture` and `dstTexture`, you must make sure both render targets are initialized + * {@link WebGLRenderer#initRenderTarget}. + * + * @param {Texture} srcTexture - The source texture. + * @param {Texture} dstTexture - The destination texture. + * @param {?(Box2|Box3)} [srcRegion=null] - A bounding box which describes the source region. Can be two or three-dimensional. + * @param {?(Vector2|Vector3)} [dstPosition=null] - A vector that represents the origin of the destination region. Can be two or three-dimensional. + * @param {number} [srcLevel=0] - The source mipmap level to copy. + * @param {?number} [dstLevel=0] - The destination mipmap level. + */ + copyTextureToTexture: (srcTexture: Texture, dstTexture: Texture, srcRegion?: (Box2 | Box3) | null, dstPosition?: (Vector2 | Vector3) | null, srcLevel?: number, dstLevel?: number | null) => void; + /** + * Initializes the given WebGLRenderTarget memory. Useful for initializing a render target so data + * can be copied into it using {@link WebGLRenderer#copyTextureToTexture} before it has been + * rendered to. + * + * @param {WebGLRenderTarget} target - The render target. + */ + initRenderTarget: (target: WebGLRenderTarget) => void; + /** + * Initializes the given texture. Useful for preloading a texture rather than waiting until first + * render (which can cause noticeable lags due to decode and GPU upload overhead). + * + * @param {Texture} texture - The texture. + */ + initTexture: (texture: Texture) => void; + /** + * Can be used to reset the internal WebGL state. This method is mostly + * relevant for applications which share a single WebGL context across + * multiple WebGL libraries. + */ + resetState: () => void; + /** + * Defines the coordinate system of the renderer. + * + * In `WebGLRenderer`, the value is always `WebGLCoordinateSystem`. + * + * @type {WebGLCoordinateSystem|WebGPUCoordinateSystem} + * @default WebGLCoordinateSystem + * @readonly + */ + readonly get coordinateSystem(): number | WebGPUCoordinateSystem; + set outputColorSpace(colorSpace: string | LinearSRGBColorSpace); + /** + * Defines the output color space of the renderer. + * + * @type {SRGBColorSpace|LinearSRGBColorSpace} + * @default SRGBColorSpace + */ + get outputColorSpace(): string | LinearSRGBColorSpace; +} +import { WebXRManager } from './webxr/WebXRManager.js'; +import { Vector4 } from '../math/Vector4.js'; +import { Color } from '../math/Color.js'; +import { WebGLRenderTarget } from './WebGLRenderTarget.js'; +import { Vector3 } from '../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Animation.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Animation.d.ts new file mode 100644 index 000000000..276e5a64c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/Animation.d.ts @@ -0,0 +1,92 @@ +export default Animation; +/** + * This module manages the internal animation loop of the renderer. + * + * @private + */ +declare class Animation { + /** + * Constructs a new animation loop management component. + * + * @param {Renderer} renderer - A reference to the main renderer. + * @param {NodeManager} nodes - Renderer component for managing nodes related logic. + * @param {Info} info - Renderer component for managing metrics and monitoring data. + */ + constructor(renderer: Renderer, nodes: NodeManager, info: Info); + /** + * A reference to the main renderer. + * + * @type {Renderer} + */ + renderer: Renderer; + /** + * Renderer component for managing nodes related logic. + * + * @type {NodeManager} + */ + nodes: NodeManager; + /** + * Renderer component for managing metrics and monitoring data. + * + * @type {Info} + */ + info: Info; + /** + * A reference to the context from `requestAnimationFrame()` can + * be called (usually `window`). + * + * @type {?(Window|XRSession)} + */ + _context: (Window | XRSession) | null; + /** + * The user-defined animation loop. + * + * @type {?Function} + * @default null + */ + _animationLoop: Function | null; + /** + * The requestId which is returned from the `requestAnimationFrame()` call. + * Can be used to cancel the stop the animation loop. + * + * @type {?number} + * @default null + */ + _requestId: number | null; + /** + * Starts the internal animation loop. + */ + start(): void; + /** + * Stops the internal animation loop. + */ + stop(): void; + /** + * Returns the user-level animation loop. + * + * @return {?Function} The animation loop. + */ + getAnimationLoop(): Function | null; + /** + * Defines the user-level animation loop. + * + * @param {?Function} callback - The animation loop. + */ + setAnimationLoop(callback: Function | null): void; + /** + * Returns the animation context. + * + * @return {Window|XRSession} The animation context. + */ + getContext(): Window | XRSession; + /** + * Defines the context in which `requestAnimationFrame()` is executed. + * + * @param {Window|XRSession} context - The context to set. + */ + setContext(context: Window | XRSession): void; + /** + * Frees all internal resources and stops the animation loop. + */ + dispose(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Attributes.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Attributes.d.ts new file mode 100644 index 000000000..40b80e84c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/Attributes.d.ts @@ -0,0 +1,52 @@ +export default Attributes; +/** + * This renderer module manages geometry attributes. + * + * @private + * @augments DataMap + */ +declare class Attributes extends DataMap { + /** + * Constructs a new attribute management component. + * + * @param {Backend} backend - The renderer's backend. + * @param {Info} info - Renderer component for managing metrics and monitoring data. + */ + constructor(backend: Backend, info: Info); + /** + * The renderer's backend. + * + * @type {Backend} + */ + backend: Backend; + /** + * Renderer component for managing metrics and monitoring data. + * + * @type {Info} + */ + info: Info; + /** + * Deletes the data for the given attribute. + * + * @param {BufferAttribute} attribute - The attribute. + * @return {?Object} The deleted attribute data. + */ + delete(attribute: BufferAttribute): Object | null; + /** + * Updates the given attribute. This method creates attribute buffers + * for new attributes and updates data for existing ones. + * + * @param {BufferAttribute} attribute - The attribute to update. + * @param {number} type - The attribute type. + */ + update(attribute: BufferAttribute, type: number): void; + /** + * Utility method for handling interleaved buffer attributes correctly. + * To process them, their `InterleavedBuffer` is returned. + * + * @param {BufferAttribute} attribute - The attribute. + * @return {BufferAttribute|InterleavedBuffer} + */ + _getBufferAttribute(attribute: BufferAttribute): BufferAttribute | InterleavedBuffer; +} +import DataMap from './DataMap.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Backend.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Backend.d.ts new file mode 100644 index 000000000..fa76217f3 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/Backend.d.ts @@ -0,0 +1,554 @@ +export default Backend; +/** + * Most of the rendering related logic is implemented in the + * {@link Renderer} module and related management components. + * Sometimes it is required though to execute commands which are + * specific to the current 3D backend (which is WebGPU or WebGL 2). + * This abstract base class defines an interface that encapsulates + * all backend-related logic. Derived classes for each backend must + * implement the interface. + * + * @abstract + * @private + */ +declare class Backend { + /** + * Constructs a new backend. + * + * @param {Object} parameters - An object holding parameters for the backend. + */ + constructor(parameters?: Object); + /** + * The parameters of the backend. + * + * @type {Object} + */ + parameters: Object; + /** + * This weak map holds backend-specific data of objects + * like textures, attributes or render targets. + * + * @type {WeakMap} + */ + data: WeakMap; + /** + * A reference to the renderer. + * + * @type {?Renderer} + * @default null + */ + renderer: Renderer | null; + /** + * A reference to the canvas element the renderer is drawing to. + * + * @type {?(HTMLCanvasElement|OffscreenCanvas)} + * @default null + */ + domElement: (HTMLCanvasElement | OffscreenCanvas) | null; + /** + * A reference to the timestamp query pool. + * + * @type {{render: ?TimestampQueryPool, compute: ?TimestampQueryPool}} + */ + timestampQueryPool: { + render: TimestampQueryPool | null; + compute: TimestampQueryPool | null; + }; + /** + * Whether to track timestamps with a Timestamp Query API or not. + * + * @type {boolean} + * @default false + */ + trackTimestamp: boolean; + /** + * Initializes the backend so it is ready for usage. Concrete backends + * are supposed to implement their rendering context creation and related + * operations in this method. + * + * @async + * @param {Renderer} renderer - The renderer. + * @return {Promise} A Promise that resolves when the backend has been initialized. + */ + init(renderer: Renderer): Promise; + /** + * The coordinate system of the backend. + * + * @abstract + * @type {number} + * @readonly + */ + readonly get coordinateSystem(): number; + /** + * This method is executed at the beginning of a render call and + * can be used by the backend to prepare the state for upcoming + * draw calls. + * + * @abstract + * @param {RenderContext} renderContext - The render context. + */ + beginRender(): void; + /** + * This method is executed at the end of a render call and + * can be used by the backend to finalize work after draw + * calls. + * + * @abstract + * @param {RenderContext} renderContext - The render context. + */ + finishRender(): void; + /** + * Sets the XR rendering destination. + * + * Backends that render directly into XR framebuffers can override this hook. + * + * @param {?Object} xrTarget - The XR rendering destination. + */ + setXRTarget(): void; + /** + * This method is executed at the beginning of a compute call and + * can be used by the backend to prepare the state for upcoming + * compute tasks. + * + * @abstract + * @param {Node|Array} computeGroup - The compute node(s). + */ + beginCompute(): void; + /** + * This method is executed at the end of a compute call and + * can be used by the backend to finalize work after compute + * tasks. + * + * @abstract + * @param {Node|Array} computeGroup - The compute node(s). + */ + finishCompute(): void; + /** + * Executes a draw command for the given render object. + * + * @abstract + * @param {RenderObject} renderObject - The render object to draw. + * @param {Info} info - Holds a series of statistical information about the GPU memory and the rendering process. + */ + draw(): void; + /** + * Executes a compute command for the given compute node. + * + * @abstract + * @param {Node|Array} computeGroup - The group of compute nodes of a compute call. Can be a single compute node. + * @param {Node} computeNode - The compute node. + * @param {Array} bindings - The bindings. + * @param {ComputePipeline} computePipeline - The compute pipeline. + */ + compute(): void; + /** + * Creates a shader program from the given programmable stage. + * + * @abstract + * @param {ProgrammableStage} program - The programmable stage. + */ + createProgram(): void; + /** + * Destroys the shader program of the given programmable stage. + * + * @abstract + * @param {ProgrammableStage} program - The programmable stage. + */ + destroyProgram(): void; + /** + * Creates bindings from the given bind group definition. + * + * @abstract + * @param {BindGroup} bindGroup - The bind group. + * @param {Array} bindings - Array of bind groups. + * @param {number} cacheIndex - The cache index. + * @param {number} version - The version. + */ + createBindings(): void; + /** + * Updates the given bind group definition. + * + * @abstract + * @param {BindGroup} bindGroup - The bind group. + * @param {Array} bindings - Array of bind groups. + * @param {number} cacheIndex - The cache index. + * @param {number} version - The version. + */ + updateBindings(): void; + /** + * Updates a buffer binding. + * + * @abstract + * @param {Buffer} binding - The buffer binding to update. + */ + updateBinding(): void; + /** + * Creates a render pipeline for the given render object. + * + * @abstract + * @param {RenderObject} renderObject - The render object. + * @param {Array} promises - An array of compilation promises which are used in `compileAsync()`. + */ + createRenderPipeline(): void; + /** + * Creates a compute pipeline for the given compute node. + * + * @abstract + * @param {ComputePipeline} computePipeline - The compute pipeline. + * @param {Array} bindings - The bindings. + */ + createComputePipeline(): void; + /** + * Returns `true` if the render pipeline requires an update. + * + * @abstract + * @param {RenderObject} renderObject - The render object. + * @return {boolean} Whether the render pipeline requires an update or not. + */ + needsRenderUpdate(): boolean; + /** + * Returns a cache key that is used to identify render pipelines. + * + * @abstract + * @param {RenderObject} renderObject - The render object. + * @return {string} The cache key. + */ + getRenderCacheKey(): string; + /** + * Returns a node builder for the given render object. + * + * @abstract + * @param {RenderObject} renderObject - The render object. + * @param {Renderer} renderer - The renderer. + * @return {NodeBuilder} The node builder. + */ + createNodeBuilder(): NodeBuilder; + /** + * Updates a GPU sampler for the given texture. + * + * @abstract + * @param {Texture} texture - The texture to update the sampler for. + * @param {TextureNode} textureNode - The texture node to update the sampler with. + * @return {string} The current sampler key. + */ + updateSampler(): string; + /** + * Creates a default texture for the given texture that can be used + * as a placeholder until the actual texture is ready for usage. + * + * @abstract + * @param {Texture} texture - The texture to create a default texture for. + */ + createDefaultTexture(): void; + /** + * Defines a texture on the GPU for the given texture object. + * + * @abstract + * @param {Texture} texture - The texture. + * @param {Object} [options={}] - Optional configuration parameter. + */ + createTexture(): void; + /** + * Uploads the updated texture data to the GPU. + * + * @abstract + * @param {Texture} texture - The texture. + * @param {Object} [options={}] - Optional configuration parameter. + */ + updateTexture(): void; + /** + * Generates mipmaps for the given texture. + * + * @abstract + * @param {Texture} texture - The texture. + */ + generateMipmaps(): void; + /** + * Destroys the GPU data for the given texture object. + * + * @abstract + * @param {Texture} texture - The texture. + * @param {boolean} [isDefaultTexture=false] - Whether the texture uses a default GPU texture or not. + */ + destroyTexture(): void; + /** + * Returns texture data as a typed array. + * + * @abstract + * @async + * @param {Texture} texture - The texture to copy. + * @param {number} x - The x coordinate of the copy origin. + * @param {number} y - The y coordinate of the copy origin. + * @param {number} width - The width of the copy. + * @param {number} height - The height of the copy. + * @param {number} faceIndex - The face index. + * @return {Promise} A Promise that resolves with a typed array when the copy operation has finished. + */ + copyTextureToBuffer(): Promise; + /** + * Copies data of the given source texture to the given destination texture. + * + * @abstract + * @param {Texture} srcTexture - The source texture. + * @param {Texture} dstTexture - The destination texture. + * @param {?(Box3|Box2)} [srcRegion=null] - The region of the source texture to copy. + * @param {?(Vector2|Vector3)} [dstPosition=null] - The destination position of the copy. + * @param {number} [srcLevel=0] - The source mip level to copy from. + * @param {number} [dstLevel=0] - The destination mip level to copy to. + */ + copyTextureToTexture(): void; + /** + * Copies the current bound framebuffer to the given texture. + * + * @abstract + * @param {Texture} texture - The destination texture. + * @param {RenderContext} renderContext - The render context. + * @param {Vector4} rectangle - A four dimensional vector defining the origin and dimension of the copy. + */ + copyFramebufferToTexture(): void; + /** + * Creates the GPU buffer of a shader attribute. + * + * @abstract + * @param {BufferAttribute} attribute - The buffer attribute. + */ + createAttribute(): void; + /** + * Creates the GPU buffer of an indexed shader attribute. + * + * @abstract + * @param {BufferAttribute} attribute - The indexed buffer attribute. + */ + createIndexAttribute(): void; + /** + * Creates the GPU buffer of a storage attribute. + * + * @abstract + * @param {BufferAttribute} attribute - The buffer attribute. + */ + createStorageAttribute(): void; + /** + * Creates a uniform buffer. + * + * @abstract + * @param {Buffer} uniformBuffer - The uniform buffer. + */ + createUniformBuffer(): void; + /** + * Destroys a uniform buffer. + * + * @abstract + * @param {Buffer} uniformBuffer - The uniform buffer. + */ + destroyUniformBuffer(): void; + /** + * Updates the GPU buffer of a shader attribute. + * + * @abstract + * @param {BufferAttribute} attribute - The buffer attribute to update. + */ + updateAttribute(): void; + /** + * Destroys the GPU buffer of a shader attribute. + * + * @abstract + * @param {BufferAttribute} attribute - The buffer attribute to destroy. + */ + destroyAttribute(): void; + /** + * Returns the backend's rendering context. + * + * @abstract + * @return {Object} The rendering context. + */ + getContext(): Object; + /** + * Backends can use this method if they have to run + * logic when the renderer gets resized. + * + * @abstract + */ + updateSize(): void; + /** + * Updates the viewport with the values from the given render context. + * + * @abstract + * @param {RenderContext} renderContext - The render context. + */ + updateViewport(): void; + /** + * Updates a unique identifier for the given render context that can be used + * to allocate resources like occlusion queries or timestamp queries. + * + * @param {RenderContext|ComputeNode} abstractRenderContext - The render context. + */ + updateTimeStampUID(abstractRenderContext: RenderContext | ComputeNode): void; + /** + * Returns a unique identifier for the given render context that can be used + * to allocate resources like occlusion queries or timestamp queries. + * + * @param {RenderContext|ComputeNode} abstractRenderContext - The render context. + * @return {string} The unique identifier. + */ + getTimestampUID(abstractRenderContext: RenderContext | ComputeNode): string; + /** + * Returns all timestamp frames for the given type. + * + * @param {string} type - The type of the time stamp. + * @return {Array} The timestamp frames. + */ + getTimestampFrames(type: string): Array; + /** + * Returns the query pool for the given uid. + * + * @param {string} uid - The unique identifier. + * @return {TimestampQueryPool} The query pool. + */ + _getQueryPool(uid: string): TimestampQueryPool; + /** + * Returns the timestamp for the given uid. + * + * @param {string} uid - The unique identifier. + * @return {number} The timestamp. + */ + getTimestamp(uid: string): number; + /** + * Returns `true` if a timestamp for the given uid is available. + * + * @param {string} uid - The unique identifier. + * @return {boolean} Whether the timestamp is available or not. + */ + hasTimestamp(uid: string): boolean; + /** + * Returns `true` if the given 3D object is fully occluded by other + * 3D objects in the scene. Backends must implement this method by using + * a Occlusion Query API. + * + * @abstract + * @param {RenderContext} renderContext - The render context. + * @param {Object3D} object - The 3D object to test. + * @return {boolean} Whether the 3D object is fully occluded or not. + */ + isOccluded(): boolean; + /** + * Resolves the time stamp for the given render context and type. + * + * @async + * @abstract + * @param {string} [type='render'] - The type of the time stamp. + * @return {Promise} A Promise that resolves with the time stamp. + */ + resolveTimestampsAsync(type?: string): Promise; + /** + * This method performs a readback operation by moving buffer data from + * a storage buffer attribute from the GPU to the CPU. + * + * @async + * @param {StorageBufferAttribute} attribute - The storage buffer attribute. + * @return {Promise} A promise that resolves with the buffer data when the data are ready. + */ + getArrayBufferAsync(): Promise; + /** + * Checks if the given feature is supported by the backend. + * + * @async + * @abstract + * @param {string} name - The feature's name. + * @return {Promise} A Promise that resolves with a bool that indicates whether the feature is supported or not. + */ + hasFeatureAsync(): Promise; + /** + * Checks if the given feature is supported by the backend. + * + * @abstract + * @param {string} name - The feature's name. + * @return {boolean} Whether the feature is supported or not. + */ + hasFeature(): boolean; + /** + * Returns the drawing buffer size. + * + * @return {Vector2} The drawing buffer size. + */ + getDrawingBufferSize(): Vector2; + /** + * Defines the scissor test. + * + * @abstract + * @param {boolean} boolean - Whether the scissor test should be enabled or not. + */ + setScissorTest(): void; + /** + * Returns the clear color and alpha into a single + * color object. + * + * @return {Color4} The clear color. + */ + getClearColor(): Color4; + /** + * Returns the DOM element. If no DOM element exists, the backend + * creates a new one. + * + * @return {HTMLCanvasElement} The DOM element. + */ + getDomElement(): HTMLCanvasElement; + /** + * Checks if the backend has the given compatibility. + * + * @abstract + * @param {string} name - The compatibility. + * @return {boolean} Whether the backend has the given compatibility or not. + */ + hasCompatibility(): boolean; + /** + * Initializes the render target defined in the given render context. + * + * @abstract + * @param {RenderContext} renderContext - The render context. + */ + initRenderTarget(): void; + /** + * Sets a dictionary for the given object into the + * internal data structure. + * + * @param {Object} object - The object. + * @param {Object} value - The dictionary to set. + */ + set(object: Object, value: Object): void; + /** + * Returns the dictionary for the given object. + * + * @param {Object} object - The object. + * @return {Object} The object's dictionary. + */ + get(object: Object): Object; + /** + * Checks if the given object has a dictionary + * with data defined. + * + * @param {Object} object - The object. + * @return {boolean} Whether a dictionary for the given object as been defined or not. + */ + has(object: Object): boolean; + /** + * Deletes an object from the internal data structure. + * + * @param {Object} object - The object to delete. + */ + delete(object: Object): void; + /** + * Delete GPU data associated with a bind group. + * + * @abstract + * @param {BindGroup} bindGroup - The bind group. + */ + deleteBindGroupData(): void; + /** + * Frees internal resources. + * + * @abstract + */ + dispose(): void; +} +import { Vector2 } from '../../math/Vector2.js'; +import Color4 from './Color4.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Background.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Background.d.ts new file mode 100644 index 000000000..f8262c348 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/Background.d.ts @@ -0,0 +1,40 @@ +export default Background; +/** + * This renderer module manages the background. + * + * @private + * @augments DataMap + */ +declare class Background extends DataMap { + /** + * Constructs a new background management component. + * + * @param {Renderer} renderer - The renderer. + * @param {NodeManager} nodes - Renderer component for managing nodes related logic. + */ + constructor(renderer: Renderer, nodes: NodeManager); + /** + * The renderer. + * + * @type {Renderer} + */ + renderer: Renderer; + /** + * Renderer component for managing nodes related logic. + * + * @type {NodeManager} + */ + nodes: NodeManager; + /** + * Updates the background for the given scene. Depending on how `Scene.background` + * or `Scene.backgroundNode` are configured, this method might configure a simple clear + * or add a mesh to the render list for rendering the background as a textured plane + * or skybox. + * + * @param {Scene} scene - The scene. + * @param {RenderList} renderList - The current render list. + * @param {RenderContext} renderContext - The current render context. + */ + update(scene: Scene, renderList: RenderList, renderContext: RenderContext): void; +} +import DataMap from './DataMap.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/BindGroup.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/BindGroup.d.ts new file mode 100644 index 000000000..b31f45e55 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/BindGroup.d.ts @@ -0,0 +1,36 @@ +export default BindGroup; +/** + * A bind group represents a collection of bindings and thus a collection + * or resources. Bind groups are assigned to pipelines to provide them + * with the required resources (like uniform buffers or textures). + * + * @private + */ +declare class BindGroup { + /** + * Constructs a new bind group. + * + * @param {string} name - The bind group's name. + * @param {Array} bindings - An array of bindings. + * @param {number} index - The group index. + */ + constructor(name?: string, bindings?: Array); + /** + * The bind group's name. + * + * @type {string} + */ + name: string; + /** + * An array of bindings. + * + * @type {Array} + */ + bindings: Array; + /** + * The group's ID. + * + * @type {number} + */ + id: number; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Binding.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Binding.d.ts new file mode 100644 index 000000000..46356fdc4 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/Binding.d.ts @@ -0,0 +1,49 @@ +export default Binding; +/** + * A binding represents the connection between a resource (like a texture, sampler + * or uniform buffer) and the resource definition in a shader stage. + * + * This module is an abstract base class for all concrete bindings types. + * + * @abstract + * @private + */ +declare class Binding { + /** + * Constructs a new binding. + * + * @param {string} [name=''] - The binding's name. + */ + constructor(name?: string); + /** + * The binding's name. + * + * @type {string} + */ + name: string; + /** + * A bitmask that defines in what shader stages the + * binding's resource is accessible. + * + * @type {number} + */ + visibility: number; + /** + * Makes sure binding's resource is visible for the given shader stage. + * + * @param {number} visibility - The shader stage. + */ + setVisibility(visibility: number): void; + /** + * The shader stages in which the binding's resource is visible. + * + * @return {number} The visibility bitmask. + */ + getVisibility(): number; + /** + * Clones the binding. + * + * @return {Binding} The cloned binding. + */ + clone(): Binding; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Bindings.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Bindings.d.ts new file mode 100644 index 000000000..b7e63fd9b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/Bindings.d.ts @@ -0,0 +1,120 @@ +export default Bindings; +/** + * This renderer module manages the bindings of the renderer. + * + * @private + * @augments DataMap + */ +declare class Bindings extends DataMap { + /** + * Constructs a new bindings management component. + * + * @param {Backend} backend - The renderer's backend. + * @param {NodeManager} nodes - Renderer component for managing nodes related logic. + * @param {Textures} textures - Renderer component for managing textures. + * @param {Attributes} attributes - Renderer component for managing attributes. + * @param {Pipelines} pipelines - Renderer component for managing pipelines. + * @param {Info} info - Renderer component for managing metrics and monitoring data. + */ + constructor(backend: Backend, nodes: NodeManager, textures: Textures, attributes: Attributes, pipelines: Pipelines, info: Info); + /** + * The renderer's backend. + * + * @type {Backend} + */ + backend: Backend; + /** + * Renderer component for managing textures. + * + * @type {Textures} + */ + textures: Textures; + /** + * Renderer component for managing pipelines. + * + * @type {Pipelines} + */ + pipelines: Pipelines; + /** + * Renderer component for managing attributes. + * + * @type {Attributes} + */ + attributes: Attributes; + /** + * Renderer component for managing nodes related logic. + * + * @type {NodeManager} + */ + nodes: NodeManager; + /** + * Renderer component for managing metrics and monitoring data. + * + * @type {Info} + */ + info: Info; + /** + * Returns the bind groups for the given render object. + * + * @param {RenderObject} renderObject - The render object. + * @return {Array} The bind groups. + */ + getForRender(renderObject: RenderObject): Array; + /** + * Returns the bind groups for the given compute node. + * + * @param {Node} computeNode - The compute node. + * @return {Array} The bind groups. + */ + getForCompute(computeNode: Node): Array; + /** + * Updates the bindings for the given compute node. + * + * @param {Node} computeNode - The compute node. + */ + updateForCompute(computeNode: Node): void; + /** + * Updates the bindings for the given render object. + * + * @param {RenderObject} renderObject - The render object. + */ + updateForRender(renderObject: RenderObject): void; + /** + * Deletes the bindings for the given compute node. + * + * @param {Node} computeNode - The compute node. + */ + deleteForCompute(computeNode: Node): void; + /** + * Deletes the bindings for the given renderObject node. + * + * @param {RenderObject} renderObject - The renderObject. + */ + deleteForRender(renderObject: RenderObject): void; + /** + * Creates the bindings for the given array of bindings. + * + * @param {Array} bindings - The bind groups. + */ + _createBindings(bindings: Array): void; + /** + * Deletes the given array of bindings. + * + * @param {Array} bindings - The bind groups. + */ + _destroyBindings(bindings: Array): void; + /** + * Updates the given array of bindings. + * + * @param {Array} bindings - The bind groups. + */ + _updateBindings(bindings: Array): void; + /** + * Updates the given bind group. + * + * @param {BindGroup} bindGroup - The bind group to update. + * @param {Array} bindings - The bind groups. + */ + _update(bindGroup: BindGroup, bindings: Array): void; +} +import DataMap from './DataMap.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/BlendMode.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/BlendMode.d.ts new file mode 100644 index 000000000..29223086e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/BlendMode.d.ts @@ -0,0 +1,109 @@ +export default BlendMode; +/** + * Represents blending configuration. + * + * This class encapsulates all blending-related properties that control how + * a material's colors are combined with the colors already in the frame buffer. + */ +declare class BlendMode { + /** + * Constructs a new blending configuration. + * + * @param {(NoBlending|NormalBlending|AdditiveBlending|SubtractiveBlending|MultiplyBlending|CustomBlending|MaterialBlending)} [blending=NormalBlending] - The blending mode. + */ + constructor(blending?: (NoBlending | number | AdditiveBlending | SubtractiveBlending | MultiplyBlending | CustomBlending | MaterialBlending)); + /** + * Defines the blending type. + * + * It must be set to `CustomBlending` if custom blending properties like + * {@link BlendMode#blendSrc}, {@link BlendMode#blendDst} or {@link BlendMode#blendEquation} + * should have any effect. + * + * @type {(NoBlending|NormalBlending|AdditiveBlending|SubtractiveBlending|MultiplyBlending|CustomBlending|MaterialBlending)} + * @default NormalBlending + */ + blending: (NoBlending | number | AdditiveBlending | SubtractiveBlending | MultiplyBlending | CustomBlending | MaterialBlending); + /** + * Defines the blending source factor. + * + * This determines how the source (incoming) fragment color is factored before being added + * to the destination (existing) fragment color in the frame buffer. + * + * @type {(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} + * @default SrcAlphaFactor + */ + blendSrc: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); + /** + * Defines the blending destination factor. + * + * This determines how the destination (existing) fragment color in the frame buffer + * is factored before being combined with the source (incoming) fragment color. + * + * @type {(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} + * @default OneMinusSrcAlphaFactor + */ + blendDst: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); + /** + * Defines the blending equation. + * + * This determines how the source and destination colors are combined. + * + * @type {(AddEquation|SubtractEquation|ReverseSubtractEquation|MinEquation|MaxEquation)} + * @default AddEquation + */ + blendEquation: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation); + /** + * Defines the blending source alpha factor. + * + * When set, this allows separate control of the alpha channel's source blending factor. + * If `null`, {@link BlendMode#blendSrc} is used for the alpha channel as well. + * + * @type {?(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} + * @default null + */ + blendSrcAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; + /** + * Defines the blending destination alpha factor. + * + * When set, this allows separate control of the alpha channel's destination blending factor. + * If `null`, {@link BlendMode#blendDst} is used for the alpha channel as well. + * + * @type {?(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} + * @default null + */ + blendDstAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; + /** + * Defines the blending equation of the alpha channel. + * + * When set, this allows separate control of the alpha channel's blending equation. + * If `null`, {@link BlendMode#blendEquation} is used for the alpha channel as well. + * + * @type {?(AddEquation|SubtractEquation|ReverseSubtractEquation|MinEquation|MaxEquation)} + * @default null + */ + blendEquationAlpha: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation) | null; + /** + * Defines whether to premultiply the alpha (transparency) value. + * + * If `true`, the RGB color of the texture or material is multiplied by its alpha value. + * This is useful for transparent textures/materials where the color data + * should already include the transparency information. + * + * @type {boolean} + * @default false + */ + premultiplyAlpha: boolean; + /** + * Copies the blending properties from the given source to this instance. + * + * @param {BlendMode} source - The blending configuration to copy from. + * @return {BlendMode} A reference to this instance. + */ + copy(source: BlendMode): BlendMode; + /** + * Returns a clone of this blending configuration. + * + * @return {BlendMode} A new Blending instance with the same properties. + */ + clone(): BlendMode; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Buffer.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Buffer.d.ts new file mode 100644 index 000000000..907f0ad0b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/Buffer.d.ts @@ -0,0 +1,91 @@ +export default Buffer; +/** + * Represents a buffer binding type. + * + * @private + * @abstract + * @augments Binding + */ +declare class Buffer extends Binding { + /** + * Constructs a new buffer. + * + * @param {string} name - The buffer's name. + * @param {TypedArray} [buffer=null] - The buffer. + */ + constructor(name: string, buffer?: TypedArray); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBuffer: boolean; + /** + * The bytes per element. + * + * @type {number} + */ + bytesPerElement: number; + /** + * A reference to the internal buffer. + * + * @private + * @type {TypedArray} + */ + private _buffer; + /** + * An array of update ranges. + * + * @private + * @type {Array<{start: number, count: number}>} + */ + private _updateRanges; + /** + * The array of update ranges. + * + * @type {Array<{start: number, count: number}>} + */ + get updateRanges(): Array<{ + start: number; + count: number; + }>; + /** + * Adds an update range. + * + * @param {number} start - The start index. + * @param {number} count - The number of elements. + */ + addUpdateRange(start: number, count: number): void; + /** + * Clears all update ranges. + */ + clearUpdateRanges(): void; + /** + * The buffer's byte length. + * + * @type {number} + * @readonly + */ + readonly get byteLength(): number; + /** + * A reference to the internal buffer. + * + * @type {Float32Array} + * @readonly + */ + readonly get buffer(): Float32Array; + /** + * Updates the binding. + * + * @return {boolean} Whether the buffer has been updated and must be + * uploaded to the GPU. + */ + update(): boolean; + /** + * Releases the buffer. + */ + release(): void; +} +import Binding from './Binding.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/BufferUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/BufferUtils.d.ts new file mode 100644 index 000000000..4d149b3a7 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/BufferUtils.d.ts @@ -0,0 +1,28 @@ +/** + * This function is usually called with the length in bytes of an array buffer. + * It returns an padded value which ensure chunk size alignment according to STD140 layout. + * + * @function + * @param {number} floatLength - The buffer length. + * @return {number} The padded length. + */ +export function getFloatLength(floatLength: number): number; +/** + * Given the count of vectors and their vector length, this function computes + * a total length in bytes with buffer alignment according to STD140 layout. + * + * @function + * @param {number} count - The number of vectors. + * @param {number} [vectorLength=4] - The vector length. + * @return {number} The padded length. + */ +export function getVectorLength(count: number, vectorLength?: number): number; +/** + * This function is called with a vector length and ensure the computed length + * matches a predefined stride (in this case `4`). + * + * @function + * @param {number} vectorLength - The vector length. + * @return {number} The padded length. + */ +export function getStrideLength(vectorLength: number): number; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/BundleGroup.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/BundleGroup.d.ts new file mode 100644 index 000000000..90e98b1aa --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/BundleGroup.d.ts @@ -0,0 +1,40 @@ +export default BundleGroup; +/** + * A specialized group which enables applications access to the + * Render Bundle API of WebGPU. The group with all its descendant nodes + * are considered as one render bundle and processed as such by + * the renderer. + * + * This module is only fully supported by `WebGPURenderer` with a WebGPU backend. + * With a WebGL backend, the group can technically be rendered but without + * any performance improvements. + * + * @augments Group + */ +declare class BundleGroup extends Group { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBundleGroup: boolean; + /** + * The bundle group's version. + * + * @type {number} + * @readonly + * @default 0 + */ + readonly version: number; + /** + * Set this property to `true` when the bundle group has changed. + * + * @type {boolean} + * @default false + * @param {boolean} value + */ + set needsUpdate(value: boolean); +} +import { Group } from '../../objects/Group.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/CanvasTarget.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/CanvasTarget.d.ts new file mode 100644 index 000000000..9932067a0 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/CanvasTarget.d.ts @@ -0,0 +1,189 @@ +export default CanvasTarget; +/** + * CanvasTarget is a class that represents the final output destination of the renderer. + * + * @augments EventDispatcher + */ +declare class CanvasTarget extends EventDispatcher { + /** + * Constructs a new CanvasTarget. + * + * @param {HTMLCanvasElement|OffscreenCanvas} domElement - The canvas element to render to. + */ + constructor(domElement: HTMLCanvasElement | OffscreenCanvas); + /** + * A reference to the canvas element the renderer is drawing to. + * This value of this property will automatically be created by + * the renderer. + * + * @type {HTMLCanvasElement|OffscreenCanvas} + */ + domElement: HTMLCanvasElement | OffscreenCanvas; + /** + * The renderer's pixel ratio. + * + * @private + * @type {number} + * @default 1 + */ + private _pixelRatio; + /** + * The width of the renderer's default framebuffer in logical pixel unit. + * + * @private + * @type {number} + */ + private _width; + /** + * The height of the renderer's default framebuffer in logical pixel unit. + * + * @private + * @type {number} + */ + private _height; + /** + * The viewport of the renderer in logical pixel unit. + * + * @private + * @type {Vector4} + */ + private _viewport; + /** + * The scissor rectangle of the renderer in logical pixel unit. + * + * @private + * @type {Vector4} + */ + private _scissor; + /** + * Whether the scissor test should be enabled or not. + * + * @private + * @type {boolean} + */ + private _scissorTest; + /** + * The color texture of the default framebuffer. + * + * @type {FramebufferTexture} + */ + colorTexture: FramebufferTexture; + /** + * The depth texture of the default framebuffer. + * + * @type {DepthTexture} + */ + depthTexture: DepthTexture; + /** + * Returns the pixel ratio. + * + * @return {number} The pixel ratio. + */ + getPixelRatio(): number; + /** + * Returns the drawing buffer size in physical pixels. This method honors the pixel ratio. + * + * @param {Vector2} target - The method writes the result in this target object. + * @return {Vector2} The drawing buffer size. + */ + getDrawingBufferSize(target: Vector2): Vector2; + /** + * Returns the renderer's size in logical pixels. This method does not honor the pixel ratio. + * + * @param {Vector2} target - The method writes the result in this target object. + * @return {Vector2} The renderer's size in logical pixels. + */ + getSize(target: Vector2): Vector2; + /** + * Sets the given pixel ratio and resizes the canvas if necessary. + * + * @param {number} [value=1] - The pixel ratio. + */ + setPixelRatio(value?: number): void; + /** + * This method allows to define the drawing buffer size by specifying + * width, height and pixel ratio all at once. The size of the drawing + * buffer is computed with this formula: + * ```js + * size.x = width * pixelRatio; + * size.y = height * pixelRatio; + * ``` + * + * @param {number} width - The width in logical pixels. + * @param {number} height - The height in logical pixels. + * @param {number} pixelRatio - The pixel ratio. + */ + setDrawingBufferSize(width: number, height: number, pixelRatio: number): void; + /** + * Sets the size of the renderer. + * + * @param {number} width - The width in logical pixels. + * @param {number} height - The height in logical pixels. + * @param {boolean} [updateStyle=true] - Whether to update the `style` attribute of the canvas or not. + */ + setSize(width: number, height: number, updateStyle?: boolean): void; + /** + * Returns the scissor rectangle. + * + * @param {Vector4} target - The method writes the result in this target object. + * @return {Vector4} The scissor rectangle. + */ + getScissor(target: Vector4): Vector4; + /** + * Defines the scissor rectangle. + * + * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the box in logical pixel unit. + * Instead of passing four arguments, the method also works with a single four-dimensional vector. + * @param {number} y - The vertical coordinate for the lower left corner of the box in logical pixel unit. + * @param {number} width - The width of the scissor box in logical pixel unit. + * @param {number} height - The height of the scissor box in logical pixel unit. + */ + setScissor(x: number | Vector4, y: number, width: number, height: number): void; + /** + * Returns the scissor test value. + * + * @return {boolean} Whether the scissor test should be enabled or not. + */ + getScissorTest(): boolean; + /** + * Defines the scissor test. + * + * @param {boolean} boolean - Whether the scissor test should be enabled or not. + */ + setScissorTest(boolean: boolean): void; + /** + * Returns the viewport definition. + * + * @param {Vector4} target - The method writes the result in this target object. + * @return {Vector4} The viewport definition. + */ + getViewport(target: Vector4): Vector4; + /** + * Defines the viewport. + * + * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the viewport origin in logical pixel unit. + * @param {number} y - The vertical coordinate for the lower left corner of the viewport origin in logical pixel unit. + * @param {number} width - The width of the viewport in logical pixel unit. + * @param {number} height - The height of the viewport in logical pixel unit. + * @param {number} minDepth - The minimum depth value of the viewport. WebGPU only. + * @param {number} maxDepth - The maximum depth value of the viewport. WebGPU only. + */ + setViewport(x: number | Vector4, y: number, width: number, height: number, minDepth?: number, maxDepth?: number): void; + /** + * Dispatches the resize event. + * + * @private + */ + private _dispatchResize; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + * + * @fires RenderTarget#dispose + */ + dispose(): void; +} +import { EventDispatcher } from '../../core/EventDispatcher.js'; +import { FramebufferTexture } from '../../textures/FramebufferTexture.js'; +import { DepthTexture } from '../../textures/DepthTexture.js'; +import { Vector4 } from '../../math/Vector4.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/ChainMap.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/ChainMap.d.ts new file mode 100644 index 000000000..97e504734 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/ChainMap.d.ts @@ -0,0 +1,48 @@ +export default ChainMap; +/** + * Data structure for the renderer. It allows defining values + * with chained, hierarchical keys. Keys are meant to be + * objects since the module internally works with Weak Maps + * for performance reasons. + * + * @private + */ +declare class ChainMap { + /** + * A map of Weak Maps by their key length. + * + * @type {Object} + */ + weakMaps: { + [x: number]: WeakMap; + }; + /** + * Returns the Weak Map for the given keys. + * + * @param {Array} keys - List of keys. + * @return {WeakMap} The weak map. + */ + _getWeakMap(keys: Array): WeakMap; + /** + * Returns the value for the given array of keys. + * + * @param {Array} keys - List of keys. + * @return {any} The value. Returns `undefined` if no value was found. + */ + get(keys: Array): any; + /** + * Sets the value for the given keys. + * + * @param {Array} keys - List of keys. + * @param {any} value - The value to set. + * @return {ChainMap} A reference to this Chain Map. + */ + set(keys: Array, value: any): ChainMap; + /** + * Deletes a value for the given keys. + * + * @param {Array} keys - The keys. + * @return {boolean} Returns `true` if the value has been removed successfully and `false` if the value has not be found. + */ + delete(keys: Array): boolean; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/ClippingContext.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/ClippingContext.d.ts new file mode 100644 index 000000000..db3046a90 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/ClippingContext.d.ts @@ -0,0 +1,122 @@ +export default ClippingContext; +/** + * Represents the state that is used to perform clipping via clipping planes. + * There is a default clipping context for each render context. When the + * scene holds instances of `ClippingGroup`, there will be a context for each + * group. + * + * @private + */ +declare class ClippingContext { + /** + * Constructs a new clipping context. + * + * @param {?ClippingContext} [parentContext=null] - A reference to the parent clipping context. + */ + constructor(parentContext?: ClippingContext | null); + /** + * The clipping context's version. + * + * @type {number} + * @readonly + */ + readonly version: number; + /** + * Whether the intersection of the clipping planes is used to clip objects, rather than their union. + * + * @type {?boolean} + * @default null + */ + clipIntersection: boolean | null; + /** + * The clipping context's cache key. + * + * @type {string} + */ + cacheKey: string; + /** + * Whether the shadow pass is active or not. + * + * @type {boolean} + * @default false + */ + shadowPass: boolean; + /** + * The view matrix. + * + * @type {Matrix4} + */ + viewMatrix: Matrix4; + /** + * The view normal matrix. + * + * @type {Matrix3} + */ + viewNormalMatrix: Matrix3; + /** + * Internal cache for maintaining clipping contexts. + * + * @type {WeakMap} + */ + clippingGroupContexts: WeakMap; + /** + * The intersection planes. + * + * @type {Array} + */ + intersectionPlanes: Array; + /** + * The intersection planes. + * + * @type {Array} + */ + unionPlanes: Array; + /** + * The version of the clipping context's parent context. + * + * @type {?number} + * @readonly + */ + readonly parentVersion: number | null; + /** + * Projects the given source clipping planes and writes the result into the + * destination array. + * + * @param {Array} source - The source clipping planes. + * @param {Array} destination - The destination. + * @param {number} offset - The offset. + */ + projectPlanes(source: Array, destination: Array, offset: number): void; + /** + * Updates the root clipping context of a scene. + * + * @param {Scene} scene - The scene. + * @param {Camera} camera - The camera that is used to render the scene. + */ + updateGlobal(scene: Scene, camera: Camera): void; + /** + * Updates the clipping context. + * + * @param {ClippingContext} parentContext - The parent context. + * @param {ClippingGroup} clippingGroup - The clipping group this context belongs to. + */ + update(parentContext: ClippingContext, clippingGroup: ClippingGroup): void; + /** + * Returns a clipping context for the given clipping group. + * + * @param {ClippingGroup} clippingGroup - The clipping group. + * @return {ClippingContext} The clipping context. + */ + getGroupContext(clippingGroup: ClippingGroup): ClippingContext; + /** + * The count of union clipping planes. + * + * @type {number} + * @readonly + */ + readonly get unionClippingCount(): number; +} +import { Matrix4 } from '../../math/Matrix4.js'; +import { Matrix3 } from '../../math/Matrix3.js'; +import { Vector4 } from '../../math/Vector4.js'; +import { Plane } from '../../math/Plane.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Color4.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Color4.d.ts new file mode 100644 index 000000000..6f01003df --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/Color4.d.ts @@ -0,0 +1,49 @@ +export default Color4; +/** + * A four-component version of {@link Color} which is internally + * used by the renderer to represents clear color with alpha as + * one object. + * + * @private + * @augments Color + */ +declare class Color4 extends Color { + /** + * Constructs a new four-component color. + * You can also pass a single THREE.Color, hex or + * string argument to this constructor. + * + * @param {number|string} [r=1] - The red value. + * @param {number} [g=1] - The green value. + * @param {number} [b=1] - The blue value. + * @param {number} [a=1] - The alpha value. + */ + constructor(r?: number | string, g?: number, b?: number, a?: number); + a: number; + /** + * Overwrites the default to honor alpha. + * You can also pass a single THREE.Color, hex or + * string argument to this method. + * + * @param {number|string|Color} r - The red value. + * @param {number} [g] - The green value. + * @param {number} [b] - The blue value. + * @param {number} [a=1] - The alpha value. + * @return {Color4} A reference to this object. + */ + set(r: number | string | Color, g?: number, b?: number, a?: number): Color4; + /** + * Overwrites the default to honor alpha. + * + * @param {Color4} color - The color to copy. + * @return {Color4} A reference to this object. + */ + copy(color: Color4): Color4; + /** + * Overwrites the default to honor alpha. + * + * @return {Color4} The cloned color. + */ + clone(): Color4; +} +import { Color } from '../../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/ComputePipeline.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/ComputePipeline.d.ts new file mode 100644 index 000000000..c8740c38d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/ComputePipeline.d.ts @@ -0,0 +1,31 @@ +export default ComputePipeline; +/** + * Class for representing compute pipelines. + * + * @private + * @augments Pipeline + */ +declare class ComputePipeline extends Pipeline { + /** + * Constructs a new compute pipeline. + * + * @param {string} cacheKey - The pipeline's cache key. + * @param {ProgrammableStage} computeProgram - The pipeline's compute shader. + */ + constructor(cacheKey: string, computeProgram: ProgrammableStage); + /** + * The pipeline's compute shader. + * + * @type {ProgrammableStage} + */ + computeProgram: ProgrammableStage; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isComputePipeline: boolean; +} +import Pipeline from './Pipeline.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Constants.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Constants.d.ts new file mode 100644 index 000000000..cf3261af0 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/Constants.d.ts @@ -0,0 +1,9 @@ +export namespace AttributeType { + let VERTEX: number; + let INDEX: number; + let STORAGE: number; + let INDIRECT: number; +} +export const GPU_CHUNK_BYTES: 16; +export const BlendColorFactor: 211; +export const OneMinusBlendColorFactor: 212; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/CubeRenderTarget.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/CubeRenderTarget.d.ts new file mode 100644 index 000000000..e6cad71cf --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/CubeRenderTarget.d.ts @@ -0,0 +1,42 @@ +export default CubeRenderTarget; +/** + * This class represents a cube render target. It is a special version + * of `WebGLCubeRenderTarget` which is compatible with `WebGPURenderer`. + * + * @augments RenderTarget + */ +declare class CubeRenderTarget extends RenderTarget { + /** + * Constructs a new cube render target. + * + * @param {number} [size=1] - The size of the render target. + * @param {RenderTarget~Options} [options] - The configuration object. + */ + constructor(size?: number, options?: {}); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isCubeRenderTarget: boolean; + /** + * Converts the given equirectangular texture to a cube map. + * + * @param {Renderer} renderer - The renderer. + * @param {Texture} texture - The equirectangular texture. + * @return {CubeRenderTarget} A reference to this cube render target. + */ + fromEquirectangularTexture(renderer: Renderer, texture: Texture): CubeRenderTarget; + /** + * Clears this cube render target. + * + * @param {Renderer} renderer - The renderer. + * @param {boolean} [color=true] - Whether the color buffer should be cleared or not. + * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not. + * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not. + */ + clear(renderer: Renderer, color?: boolean, depth?: boolean, stencil?: boolean): void; +} +import { RenderTarget } from '../../core/RenderTarget.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/DataMap.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/DataMap.d.ts new file mode 100644 index 000000000..5b407575a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/DataMap.d.ts @@ -0,0 +1,41 @@ +export default DataMap; +/** + * Data structure for the renderer. It is intended to manage + * data of objects in dictionaries. + * + * @private + */ +declare class DataMap { + /** + * `DataMap` internally uses a weak map + * to manage its data. + * + * @type {WeakMap} + */ + data: WeakMap; + /** + * Returns the dictionary for the given object. + * + * @param {Object} object - The object. + * @return {Object} The dictionary. + */ + get(object: Object): Object; + /** + * Deletes the dictionary for the given object. + * + * @param {Object} object - The object. + * @return {?Object} The deleted dictionary. + */ + delete(object: Object): Object | null; + /** + * Returns `true` if the given object has a dictionary defined. + * + * @param {Object} object - The object to test. + * @return {boolean} Whether a dictionary is defined or not. + */ + has(object: Object): boolean; + /** + * Frees internal resources. + */ + dispose(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Geometries.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Geometries.d.ts new file mode 100644 index 000000000..a1cd970c9 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/Geometries.d.ts @@ -0,0 +1,103 @@ +export default Geometries; +/** + * This renderer module manages geometries. + * + * @private + * @augments DataMap + */ +declare class Geometries extends DataMap { + /** + * Constructs a new geometry management component. + * + * @param {Attributes} attributes - Renderer component for managing attributes. + * @param {Info} info - Renderer component for managing metrics and monitoring data. + */ + constructor(attributes: Attributes, info: Info); + /** + * Renderer component for managing attributes. + * + * @type {Attributes} + */ + attributes: Attributes; + /** + * Renderer component for managing metrics and monitoring data. + * + * @type {Info} + */ + info: Info; + /** + * Weak Map for managing attributes for wireframe rendering. + * + * @type {WeakMap} + */ + wireframes: WeakMap; + /** + * This Weak Map is used to make sure buffer attributes are + * updated only once per render call. + * + * @type {WeakMap} + */ + attributeCall: WeakMap; + /** + * Stores the event listeners attached to geometries. + * + * @private + * @type {Map} + */ + private _geometryDisposeListeners; + /** + * Returns `true` if the given render object has an initialized geometry. + * + * @param {RenderObject} renderObject - The render object. + * @return {boolean} Whether if the given render object has an initialized geometry or not. + */ + has(renderObject: RenderObject): boolean; + /** + * Prepares the geometry of the given render object for rendering. + * + * @param {RenderObject} renderObject - The render object. + */ + updateForRender(renderObject: RenderObject): void; + /** + * Initializes the geometry of the given render object. + * + * @param {RenderObject} renderObject - The render object. + */ + initGeometry(renderObject: RenderObject): void; + /** + * Updates the geometry attributes of the given render object. + * + * @param {RenderObject} renderObject - The render object. + */ + updateAttributes(renderObject: RenderObject): void; + /** + * Updates the given attribute. + * + * @param {BufferAttribute} attribute - The attribute to update. + * @param {number} type - The attribute type. + */ + updateAttribute(attribute: BufferAttribute, type: number): void; + /** + * Returns the indirect buffer attribute of the given render object. + * + * @param {RenderObject} renderObject - The render object. + * @return {?BufferAttribute} The indirect attribute. `null` if no indirect drawing is used. + */ + getIndirect(renderObject: RenderObject): BufferAttribute | null; + /** + * Returns the byte offset into the indirect attribute buffer of the given render object. + * + * @param {RenderObject} renderObject - The render object. + * @return {number} The byte offset into the indirect attribute buffer. + */ + getIndirectOffset(renderObject: RenderObject): number; + /** + * Returns the index of the given render object's geometry. This is implemented + * in a method to return a wireframe index if necessary. + * + * @param {RenderObject} renderObject - The render object. + * @return {?BufferAttribute} The index. Returns `null` for non-indexed geometries. + */ + getIndex(renderObject: RenderObject): BufferAttribute | null; +} +import DataMap from './DataMap.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/IndirectStorageBufferAttribute.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/IndirectStorageBufferAttribute.d.ts new file mode 100644 index 000000000..9084444e7 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/IndirectStorageBufferAttribute.d.ts @@ -0,0 +1,29 @@ +export default IndirectStorageBufferAttribute; +/** + * This special type of buffer attribute is intended for compute shaders. + * It can be used to encode draw parameters for indirect draw calls. + * + * Note: This type of buffer attribute can only be used with `WebGPURenderer` + * and a WebGPU backend. + * + * @augments StorageBufferAttribute + */ +declare class IndirectStorageBufferAttribute extends StorageBufferAttribute { + /** + * Constructs a new storage buffer attribute. + * + * @param {number|Uint32Array} count - The item count. It is also valid to pass a `Uint32Array` as an argument. + * The subsequent parameter is then obsolete. + * @param {number} itemSize - The item size. + */ + constructor(count: number | Uint32Array, itemSize: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isIndirectStorageBufferAttribute: boolean; +} +import StorageBufferAttribute from './StorageBufferAttribute.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Info.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Info.d.ts new file mode 100644 index 000000000..6f3fa816f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/Info.d.ts @@ -0,0 +1,211 @@ +export default Info; +/** + * This renderer module provides a series of statistical information + * about the GPU memory and the rendering process. Useful for debugging + * and monitoring. + */ +declare class Info { + /** + * Whether frame related metrics should automatically + * be resetted or not. This property should be set to `false` + * by apps which manage their own animation loop. They must + * then call `renderer.info.reset()` once per frame manually. + * + * @type {boolean} + * @default true + */ + autoReset: boolean; + /** + * The current frame ID. This ID is managed + * by `NodeFrame`. + * + * @type {number} + * @readonly + * @default 0 + */ + readonly frame: number; + /** + * The number of render calls since the + * app has been started. + * + * @type {number} + * @readonly + * @default 0 + */ + readonly calls: number; + /** + * Render related metrics. + * + * @type {Object} + * @readonly + * @property {number} calls - The number of render calls since the app has been started. + * @property {number} frameCalls - The number of render calls of the current frame. + * @property {number} drawCalls - The number of draw calls of the current frame. + * @property {number} triangles - The number of rendered triangle primitives of the current frame. + * @property {number} points - The number of rendered point primitives of the current frame. + * @property {number} lines - The number of rendered line primitives of the current frame. + * @property {number} timestamp - The timestamp of the frame. + */ + readonly render: Object; + /** + * Compute related metrics. + * + * @type {Object} + * @readonly + * @property {number} calls - The number of compute calls since the app has been started. + * @property {number} frameCalls - The number of compute calls of the current frame. + * @property {number} timestamp - The timestamp of the frame when using `renderer.computeAsync()`. + */ + readonly compute: Object; + /** + * Memory related metrics. + * + * @type {Object} + * @readonly + * @property {number} attributes - The number of active attributes. + * @property {number} attributesSize - The memory size of active attributes in bytes. + * @property {number} geometries - The number of active geometries. + * @property {number} indexAttributes - The number of active index attributes. + * @property {number} indexAttributesSize - The memory size of active index attributes in bytes. + * @property {number} indirectStorageAttributes - The number of active indirect storage attributes. + * @property {number} indirectStorageAttributesSize - The memory size of active indirect storage attributes in bytes. + * @property {number} programs - The number of active programs. + * @property {number} programsSize - The memory size of active programs in bytes. + * @property {number} readbackBuffers - The number of active readback buffers. + * @property {number} readbackBuffersSize - The memory size of active readback buffers in bytes. + * @property {number} renderTargets - The number of active renderTargets. + * @property {number} storageAttributes - The number of active storage attributes. + * @property {number} storageAttributesSize - The memory size of active storage attributes in bytes. + * @property {number} textures - The number of active textures. + * @property {number} texturesSize - The memory size of active textures in bytes. + * @property {number} uniformBuffers - The number of active uniform buffers. + * @property {number} uniformBuffersSize - The memory size of active uniform buffers in bytes. + * @property {number} total - The total memory size in bytes. + */ + readonly memory: Object; + /** + * Map for storing calculated byte sizes of tracked objects. + * + * @type {Map} + * @private + */ + private memoryMap; + /** + * This method should be executed per draw call and updates the corresponding metrics. + * + * @param {Object3D} object - The 3D object that is going to be rendered. + * @param {number} count - The vertex or index count. + * @param {number} instanceCount - The instance count. + */ + update(object: Object3D, count: number, instanceCount: number): void; + /** + * Resets frame related metrics. + */ + reset(): void; + /** + * Performs a complete reset of the object. + */ + dispose(): void; + /** + * Tracks texture memory explicitly, updating counts and byte tracking. + * + * @param {Texture} texture + */ + createTexture(texture: Texture): void; + /** + * Tracks texture memory explicitly, updating counts and byte tracking. + * + * @param {Texture} texture + */ + destroyTexture(texture: Texture): void; + /** + * Tracks attribute memory explicitly, updating counts and byte tracking. + * + * @param {BufferAttribute} attribute + * @param {string} type - type of attribute + * @private + */ + private _createAttribute; + /** + * Tracks a regular attribute memory explicitly. + * + * @param {BufferAttribute} attribute - The attribute to track. + */ + createAttribute(attribute: BufferAttribute): void; + /** + * Tracks an index attribute memory explicitly. + * + * @param {BufferAttribute} attribute - The index attribute to track. + */ + createIndexAttribute(attribute: BufferAttribute): void; + /** + * Tracks a storage attribute memory explicitly. + * + * @param {BufferAttribute} attribute - The storage attribute to track. + */ + createStorageAttribute(attribute: BufferAttribute): void; + /** + * Tracks an indirect storage attribute memory explicitly. + * + * @param {BufferAttribute} attribute - The indirect storage attribute to track. + */ + createIndirectStorageAttribute(attribute: BufferAttribute): void; + /** + * Tracks attribute memory explicitly, updating counts and byte tracking. + * + * @param {BufferAttribute} attribute + */ + destroyAttribute(attribute: BufferAttribute): void; + /** + * Tracks a readback buffer memory explicitly. + * + * @param {ReadbackBuffer} readbackBuffer - The readback buffer to track. + */ + createReadbackBuffer(readbackBuffer: ReadbackBuffer): void; + /** + * Tracks a readback buffer memory explicitly. + * + * @param {ReadbackBuffer} readbackBuffer - The readback buffer to track. + */ + destroyReadbackBuffer(readbackBuffer: ReadbackBuffer): void; + /** + * Tracks a uniform buffer memory explicitly. + * + * @param {UniformBuffer} uniformBuffer - The uniform buffer to track. + */ + createUniformBuffer(uniformBuffer: UniformBuffer): void; + /** + * Tracks a uniform buffer memory explicitly. + * + * @param {UniformBuffer} uniformBuffer - The uniform buffer to track. + */ + destroyUniformBuffer(uniformBuffer: UniformBuffer): void; + /** + * Tracks program memory explicitly, updating counts and byte tracking. + * + * @param {ProgrammableStage} program - The program to track. + */ + createProgram(program: ProgrammableStage): void; + /** + * Tracks program memory explicitly, updating counts and byte tracking. + * + * @param {Object} program - The program to track. + */ + destroyProgram(program: Object): void; + /** + * Calculates the memory size of a texture in bytes. + * + * @param {Texture} texture - The texture to calculate the size for. + * @return {number} The calculated size in bytes. + * @private + */ + private _getTextureMemorySize; + /** + * Calculates the memory size of an attribute in bytes. + * + * @param {BufferAttribute} attribute - The attribute to calculate the size for. + * @return {number} The calculated size in bytes. + * @private + */ + private _getAttributeMemorySize; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/InspectorBase.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/InspectorBase.d.ts new file mode 100644 index 000000000..7deedcbb7 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/InspectorBase.d.ts @@ -0,0 +1,109 @@ +export default InspectorBase; +/** + * InspectorBase is the base class for all inspectors. + * + * @class InspectorBase + * @augments EventDispatcher + */ +declare class InspectorBase extends EventDispatcher { + /** + * The renderer associated with this inspector. + * + * @type {WebGLRenderer} + * @private + */ + private _renderer; + /** + * The current frame being processed. + * + * @type {Object} + */ + currentFrame: Object; + /** + * Returns the node frame for the current renderer. + * + * @return {Object} The node frame. + */ + get nodeFrame(): Object; + /** + * Sets the renderer for this inspector. + * + * @param {WebGLRenderer} renderer - The renderer to associate with this inspector. + * @return {InspectorBase} This inspector instance. + */ + setRenderer(renderer: WebGLRenderer): InspectorBase; + /** + * Returns the renderer associated with this inspector. + * + * @return {WebGLRenderer} The associated renderer. + */ + getRenderer(): WebGLRenderer; + /** + * Initializes the inspector. + */ + init(): void; + /** + * Called when a frame begins. + */ + begin(): void; + /** + * Called when a frame ends. + */ + finish(): void; + /** + * Inspects a node. + * + * @param {Node} node - The node to inspect. + */ + inspect(): void; + /** + * When a compute operation is performed. + * + * @param {ComputeNode} computeNode - The compute node being executed. + * @param {number|Array} dispatchSizeOrCount - The dispatch size or count. + */ + computeAsync(): void; + /** + * Called when a compute operation begins. + * + * @param {string} uid - A unique identifier for the render context. + * @param {ComputeNode} computeNode - The compute node being executed. + */ + beginCompute(): void; + /** + * Called when a compute operation ends. + * + * @param {string} uid - A unique identifier for the render context. + * @param {ComputeNode} computeNode - The compute node being executed. + */ + finishCompute(): void; + /** + * Called when a render operation begins. + * + * @param {string} uid - A unique identifier for the render context. + * @param {Scene} scene - The scene being rendered. + * @param {Camera} camera - The camera being used for rendering. + * @param {?WebGLRenderTarget} renderTarget - The render target, if any. + */ + beginRender(): void; + /** + * Called when an animation loop ends. + * + * @param {string} uid - A unique identifier for the render context. + */ + finishRender(): void; + /** + * Called when a texture copy operation is performed. + * + * @param {Texture} srcTexture - The source texture. + * @param {Texture} dstTexture - The destination texture. + */ + copyTextureToTexture(): void; + /** + * Called when a framebuffer copy operation is performed. + * + * @param {Texture} framebufferTexture - The texture associated with the framebuffer. + */ + copyFramebufferToTexture(): void; +} +import { EventDispatcher } from '../../core/EventDispatcher.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Lighting.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Lighting.d.ts new file mode 100644 index 000000000..b15d96025 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/Lighting.d.ts @@ -0,0 +1,28 @@ +export default Lighting; +/** + * This renderer module manages the lights nodes which are unique + * per scene and camera combination. + * + * The lights node itself is later configured in the render list + * with the actual lights from the scene. + * + * @private + */ +declare class Lighting { + /** + * Creates a new lights node for the given array of lights. + * + * @param {Array} lights - The render object. + * @return {LightsNode} The lights node. + */ + createNode(lights?: Array): LightsNode; + /** + * Returns a lights node for the given scene and camera. + * + * @param {Scene} scene - The scene. + * @param {Camera} camera - The camera. + * @return {LightsNode} The lights node. + */ + getNode(scene: Scene): LightsNode; +} +import { LightsNode } from '../../nodes/Nodes.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Pipeline.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Pipeline.d.ts new file mode 100644 index 000000000..db30b30a6 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/Pipeline.d.ts @@ -0,0 +1,28 @@ +export default Pipeline; +/** + * Abstract class for representing pipelines. + * + * @private + * @abstract + */ +declare class Pipeline { + /** + * Constructs a new pipeline. + * + * @param {string} cacheKey - The pipeline's cache key. + */ + constructor(cacheKey: string); + /** + * The pipeline's cache key. + * + * @type {string} + */ + cacheKey: string; + /** + * How often the pipeline is currently in use. + * + * @type {number} + * @default 0 + */ + usedTimes: number; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Pipelines.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Pipelines.d.ts new file mode 100644 index 000000000..182374e08 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/Pipelines.d.ts @@ -0,0 +1,174 @@ +export default Pipelines; +/** + * This renderer module manages the pipelines of the renderer. + * + * @private + * @augments DataMap + */ +declare class Pipelines extends DataMap { + /** + * Constructs a new pipeline management component. + * + * @param {Backend} backend - The renderer's backend. + * @param {NodeManager} nodes - Renderer component for managing nodes related logic. + * @param {Info} info - Renderer component for managing metrics and monitoring data. + */ + constructor(backend: Backend, nodes: NodeManager, info: Info); + /** + * The renderer's backend. + * + * @type {Backend} + */ + backend: Backend; + /** + * Renderer component for managing nodes related logic. + * + * @type {NodeManager} + */ + nodes: NodeManager; + /** + * Renderer component for managing metrics and monitoring data. + * + * @type {Info} + */ + info: Info; + /** + * A references to the bindings management component. + * This reference will be set inside the `Bindings` + * constructor. + * + * @type {?Bindings} + * @default null + */ + bindings: Bindings | null; + /** + * Internal cache for maintaining pipelines. + * The key of the map is a cache key, the value the pipeline. + * + * @type {Map} + */ + caches: Map; + /** + * This dictionary maintains for each shader stage type (vertex, + * fragment and compute) the programmable stage objects which + * represent the actual shader code. + * + * @type {Object>} + */ + programs: { + [x: string]: Map; + }; + /** + * Returns a compute pipeline for the given compute node. + * + * @param {Node} computeNode - The compute node. + * @param {Array} bindings - The bindings. + * @return {ComputePipeline} The compute pipeline. + */ + getForCompute(computeNode: Node, bindings: Array): ComputePipeline; + /** + * Returns a render pipeline for the given render object. + * + * @param {RenderObject} renderObject - The render object. + * @param {?Array} [promises=null] - An array of compilation promises which is only relevant in context of `Renderer.compileAsync()`. + * @return {RenderObjectPipeline} The render pipeline. + */ + getForRender(renderObject: RenderObject, promises?: Array> | null): RenderObjectPipeline; + /** + * Checks if the render pipeline for the given render object is ready for drawing. + * Returns false if the GPU pipeline is still being compiled asynchronously. + * + * @param {RenderObject} renderObject - The render object. + * @return {boolean} True if the pipeline is ready for drawing. + */ + isReady(renderObject: RenderObject): boolean; + /** + * Deletes the pipeline for the given render object. + * + * @param {RenderObject} object - The render object. + * @return {?Object} The deleted dictionary. + */ + delete(object: RenderObject): Object | null; + /** + * Updates the pipeline for the given render object. + * + * @param {RenderObject} renderObject - The render object. + */ + updateForRender(renderObject: RenderObject): void; + /** + * Returns a compute pipeline for the given parameters. + * + * @private + * @param {Node} computeNode - The compute node. + * @param {ProgrammableStage} stageCompute - The programmable stage representing the compute shader. + * @param {string} cacheKey - The cache key. + * @param {Array} bindings - The bindings. + * @return {ComputePipeline} The compute pipeline. + */ + private _getComputePipeline; + /** + * Returns a render pipeline for the given parameters. + * + * @private + * @param {RenderObject} renderObject - The render object. + * @param {ProgrammableStage} stageVertex - The programmable stage representing the vertex shader. + * @param {ProgrammableStage} stageFragment - The programmable stage representing the fragment shader. + * @param {string} cacheKey - The cache key. + * @param {?Array} promises - An array of compilation promises which is only relevant in context of `Renderer.compileAsync()`. + * @return {RenderObjectPipeline} The render pipeline. + */ + private _getRenderPipeline; + /** + * Computes a cache key representing a compute pipeline. + * + * @private + * @param {Node} computeNode - The compute node. + * @param {ProgrammableStage} stageCompute - The programmable stage representing the compute shader. + * @return {string} The cache key. + */ + private _getComputeCacheKey; + /** + * Computes a cache key representing a render pipeline. + * + * @private + * @param {RenderObject} renderObject - The render object. + * @param {ProgrammableStage} stageVertex - The programmable stage representing the vertex shader. + * @param {ProgrammableStage} stageFragment - The programmable stage representing the fragment shader. + * @return {string} The cache key. + */ + private _getRenderCacheKey; + /** + * Releases the given pipeline. + * + * @private + * @param {Pipeline} pipeline - The pipeline to release. + */ + private _releasePipeline; + /** + * Releases the shader program. + * + * @private + * @param {Object} program - The shader program to release. + */ + private _releaseProgram; + /** + * Returns `true` if the compute pipeline for the given compute node requires an update. + * + * @private + * @param {Node} computeNode - The compute node. + * @return {boolean} Whether the compute pipeline for the given compute node requires an update or not. + */ + private _needsComputeUpdate; + /** + * Returns `true` if the render pipeline for the given render object requires an update. + * + * @private + * @param {RenderObject} renderObject - The render object. + * @return {boolean} Whether the render object for the given render object requires an update or not. + */ + private _needsRenderUpdate; +} +import DataMap from './DataMap.js'; +import ProgrammableStage from './ProgrammableStage.js'; +import ComputePipeline from './ComputePipeline.js'; +import RenderObjectPipeline from './RenderObjectPipeline.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/PostProcessing.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/PostProcessing.d.ts new file mode 100644 index 000000000..7bf242f58 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/PostProcessing.d.ts @@ -0,0 +1,17 @@ +export default PostProcessing; +/** + * @deprecated since r183. Use {@link RenderPipeline} instead. PostProcessing has been renamed to RenderPipeline. + * + * This class is a wrapper for backward compatibility and will be removed in a future version. + */ +declare class PostProcessing extends RenderPipeline { + /** + * Constructs a new post processing management module. + * + * @param {Renderer} renderer - A reference to the renderer. + * @param {Node} outputNode - An optional output node. + * @deprecated since r183. Use {@link RenderPipeline} instead. + */ + constructor(renderer: Renderer, outputNode: Node); +} +import RenderPipeline from './RenderPipeline.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/ProgrammableStage.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/ProgrammableStage.d.ts new file mode 100644 index 000000000..5fdbd4d68 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/ProgrammableStage.d.ts @@ -0,0 +1,64 @@ +export default ProgrammableStage; +/** + * Class for representing programmable stages which are vertex, + * fragment or compute shaders. Unlike fixed-function states (like blending), + * they represent the programmable part of a pipeline. + * + * @private + */ +declare class ProgrammableStage { + /** + * Constructs a new programmable stage. + * + * @param {string} code - The shader code. + * @param {('vertex'|'fragment'|'compute')} stage - The type of stage. + * @param {string} name - The name of the shader. + * @param {?Array} [transforms=null] - The transforms (only relevant for compute stages with WebGL 2 which uses Transform Feedback). + * @param {?Array} [attributes=null] - The attributes (only relevant for compute stages with WebGL 2 which uses Transform Feedback). + */ + constructor(code: string, stage: ("vertex" | "fragment" | "compute"), name: string, transforms?: Array | null, attributes?: Array | null); + /** + * The id of the programmable stage. + * + * @type {number} + */ + id: number; + /** + * The shader code. + * + * @type {string} + */ + code: string; + /** + * The type of stage. + * + * @type {string} + */ + stage: string; + /** + * The name of the stage. + * This is used for debugging purposes. + * + * @type {string} + */ + name: string; + /** + * The transforms (only relevant for compute stages with WebGL 2 which uses Transform Feedback). + * + * @type {?Array} + */ + transforms: Array | null; + /** + * The attributes (only relevant for compute stages with WebGL 2 which uses Transform Feedback). + * + * @type {?Array} + */ + attributes: Array | null; + /** + * How often the programmable stage is currently in use. + * + * @type {number} + * @default 0 + */ + usedTimes: number; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/QuadMesh.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/QuadMesh.d.ts new file mode 100644 index 000000000..5e42e77e0 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/QuadMesh.d.ts @@ -0,0 +1,52 @@ +export default QuadMesh; +/** + * This module is a helper for passes which need to render a full + * screen effect which is quite common in context of post processing. + * + * The intended usage is to reuse a single quad mesh for rendering + * subsequent passes by just reassigning the `material` reference. + * + * Note: This module can only be used with `WebGPURenderer`. + * + * @augments Mesh + */ +declare class QuadMesh extends Mesh { + /** + * Constructs a new quad mesh. + * + * @param {?Material} [material=null] - The material to render the quad mesh with. + */ + constructor(material?: Material | null); + /** + * The camera to render the quad mesh with. + * + * @type {OrthographicCamera} + * @readonly + */ + readonly camera: OrthographicCamera; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isQuadMesh: boolean; + /** + * Async version of `render()`. + * + * @async + * @deprecated + * @param {Renderer} renderer - The renderer. + * @return {Promise} A Promise that resolves when the render has been finished. + */ + renderAsync(renderer: Renderer): Promise; + /** + * Renders the quad mesh + * + * @param {Renderer} renderer - The renderer. + */ + render(renderer: Renderer): void; +} +import { Mesh } from '../../objects/Mesh.js'; +import { OrthographicCamera } from '../../cameras/OrthographicCamera.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/ReadbackBuffer.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/ReadbackBuffer.d.ts new file mode 100644 index 000000000..70218d55a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/ReadbackBuffer.d.ts @@ -0,0 +1,55 @@ +export default ReadbackBuffer; +/** + * A readback buffer is used to transfer data from the GPU to the CPU. + * It is primarily used to read back compute shader results. + * + * @augments EventDispatcher + */ +declare class ReadbackBuffer extends EventDispatcher { + /** + * Constructs a new readback buffer. + * + * @param {number} maxByteLength - The maximum size of the buffer to be read back. + */ + constructor(maxByteLength: number); + /** + * Name used for debugging purposes. + * + * @type {string} + */ + name: string; + /** + * The mapped, read back array buffer. + * + * @type {ArrayBuffer|null} + */ + buffer: ArrayBuffer | null; + /** + * The maximum size of the buffer to be read back. + * + * @type {number} + */ + maxByteLength: number; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isReadbackBuffer: boolean; + _mapped: boolean; + /** + * Releases the mapped buffer data so the GPU buffer can be + * used by the GPU again. + * + * Note: Any `ArrayBuffer` data associated with this readback buffer + * are removed and no longer accessible after calling this method. + */ + release(): void; + /** + * Frees internal resources. + */ + dispose(): void; +} +import { EventDispatcher } from '../../core/EventDispatcher.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RenderBundle.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RenderBundle.d.ts new file mode 100644 index 000000000..aca8cbee1 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/RenderBundle.d.ts @@ -0,0 +1,20 @@ +export default RenderBundle; +/** + * This module is used to represent render bundles inside the renderer + * for further processing. + * + * @private + */ +declare class RenderBundle { + /** + * Constructs a new bundle group. + * + * @param {BundleGroup} bundleGroup - The bundle group. + * @param {Camera} camera - The camera the bundle group is rendered with. + * @param {RenderContext} renderContext - The render context the bundle is rendered with. + */ + constructor(bundleGroup: BundleGroup, camera: Camera, renderContext: RenderContext); + bundleGroup: BundleGroup; + camera: Camera; + renderContext: RenderContext; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RenderBundles.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RenderBundles.d.ts new file mode 100644 index 000000000..ec46ba6ca --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/RenderBundles.d.ts @@ -0,0 +1,29 @@ +export default RenderBundles; +/** + * This renderer module manages render bundles. + * + * @private + */ +declare class RenderBundles { + /** + * A chain map for maintaining the render bundles. + * + * @type {ChainMap} + */ + bundles: ChainMap; + /** + * Returns a render bundle for the given bundle group and camera. + * + * @param {BundleGroup} bundleGroup - The bundle group. + * @param {Camera} camera - The camera the bundle group is rendered with. + * @param {RenderContext} renderContext - The render context the bundle is rendered with. + * @return {RenderBundle} The render bundle. + */ + get(bundleGroup: BundleGroup, camera: Camera, renderContext: RenderContext): RenderBundle; + /** + * Frees all internal resources. + */ + dispose(): void; +} +import ChainMap from './ChainMap.js'; +import RenderBundle from './RenderBundle.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RenderContext.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RenderContext.d.ts new file mode 100644 index 000000000..f0ef10337 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/RenderContext.d.ts @@ -0,0 +1,221 @@ +/** + * Computes a cache key for the given render context. This key + * should identify the render target state so it is possible to + * configure the correct attachments in the respective backend. + * + * @param {RenderContext} renderContext - The render context. + * @return {number} The cache key. + */ +export function getCacheKey(renderContext: RenderContext): number; +export default RenderContext; +/** + * Any render or compute command is executed in a specific context that defines + * the state of the renderer and its backend. Typical examples for such context + * data are the current clear values or data from the active framebuffer. This + * module is used to represent these contexts as objects. + * + * @private + */ +declare class RenderContext { + /** + * The context's ID. + * + * @type {number} + */ + id: number; + /** + * The MRT configuration. + * + * @type {?MRTNode} + * @default null + */ + mrt: MRTNode | null; + /** + * Whether the current active framebuffer has a color attachment. + * + * @type {boolean} + * @default true + */ + color: boolean; + /** + * Whether the color attachment should be cleared or not. + * + * @type {boolean} + * @default true + */ + clearColor: boolean; + /** + * The clear color value. + * + * @type {Object} + * @default true + */ + clearColorValue: Object; + /** + * Whether the current active framebuffer has a depth attachment. + * + * @type {boolean} + * @default true + */ + depth: boolean; + /** + * Whether the depth attachment should be cleared or not. + * + * @type {boolean} + * @default true + */ + clearDepth: boolean; + /** + * The clear depth value. + * + * @type {number} + * @default 1 + */ + clearDepthValue: number; + /** + * Whether the current active framebuffer has a stencil attachment. + * + * @type {boolean} + * @default false + */ + stencil: boolean; + /** + * Whether the stencil attachment should be cleared or not. + * + * @type {boolean} + * @default true + */ + clearStencil: boolean; + /** + * The clear stencil value. + * + * @type {number} + * @default 1 + */ + clearStencilValue: number; + /** + * By default the viewport encloses the entire framebuffer If a smaller + * viewport is manually defined, this property is to `true` by the renderer. + * + * @type {boolean} + * @default false + */ + viewport: boolean; + /** + * The viewport value. This value is in physical pixels meaning it incorporates + * the renderer's pixel ratio. The viewport property of render targets or + * the renderer is in logical pixels. + * + * @type {Vector4} + */ + viewportValue: Vector4; + /** + * When the scissor test is active and scissor rectangle smaller than the + * framebuffers dimensions, this property is to `true` by the renderer. + * + * @type {boolean} + * @default false + */ + scissor: boolean; + /** + * The scissor rectangle. + * + * @type {Vector4} + */ + scissorValue: Vector4; + /** + * The active render target. + * + * @type {?RenderTarget} + * @default null + */ + renderTarget: RenderTarget | null; + /** + * The textures of the active render target. + * `null` when no render target is set. + * + * @type {?Array} + * @default null + */ + textures: Array | null; + /** + * The depth texture of the active render target. + * `null` when no render target is set. + * + * @type {?DepthTexture} + * @default null + */ + depthTexture: DepthTexture | null; + /** + * The active cube face. + * + * @type {number} + * @default 0 + */ + activeCubeFace: number; + /** + * The active mipmap level. + * + * @type {number} + * @default 0 + */ + activeMipmapLevel: number; + /** + * The number of MSAA samples. This value is always `1` when + * MSAA isn't used. + * + * @type {number} + * @default 1 + */ + sampleCount: number; + /** + * The active render target's width in physical pixels. + * + * @type {number} + * @default 0 + */ + width: number; + /** + * The active render target's height in physical pixels. + * + * @type {number} + * @default 0 + */ + height: number; + /** + * The occlusion query count. + * + * @type {number} + * @default 0 + */ + occlusionQueryCount: number; + /** + * The current clipping context. + * + * @type {?ClippingContext} + * @default null + */ + clippingContext: ClippingContext | null; + /** + * The current camera. + * + * @type {?Camera} + * @default null + */ + camera: Camera | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isRenderContext: boolean; + /** + * Returns the cache key of this render context. + * + * @return {number} The cache key. + */ + getCacheKey(): number; +} +import { Vector4 } from '../../math/Vector4.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RenderContexts.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RenderContexts.d.ts new file mode 100644 index 000000000..ff6dfc870 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/RenderContexts.d.ts @@ -0,0 +1,42 @@ +export default RenderContexts; +/** + * This module manages the render contexts of the renderer. + * + * @private + */ +declare class RenderContexts { + /** + * Constructs a new render context management component. + * + * @param {Renderer} renderer - The renderer. + */ + constructor(renderer: Renderer); + /** + * The renderer. + * + * @type {Renderer} + */ + renderer: Renderer; + /** + * A dictionary that manages render contexts. + * + * @type {Object} + */ + _renderContexts: { + [x: string]: RenderContext; + }; + /** + * Returns a render context for the given scene, camera and render target. + * + * @param {?RenderTarget} [renderTarget=null] - The active render target. + * @param {?MRTNode} [mrt=null] - The MRT configuration + * @param {?number} [callDepth=0] - The call depth of the renderer. + * @return {RenderContext} The render context. + */ + get(renderTarget?: RenderTarget | null, mrt?: MRTNode | null, callDepth?: number | null): RenderContext; + /** + * Frees internal resources. + */ + dispose(): void; +} +import RenderContext from './RenderContext.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RenderList.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RenderList.d.ts new file mode 100644 index 000000000..bc360b020 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/RenderList.d.ts @@ -0,0 +1,169 @@ +export default RenderList; +/** + * When the renderer analyzes the scene at the beginning of a render call, + * it stores 3D object for further processing in render lists. Depending on the + * properties of a 3D objects (like their transformation or material state), the + * objects are maintained in ordered lists for the actual rendering. + * + * Render lists are unique per scene and camera combination. + * + * @private + * @augments Pipeline + */ +declare class RenderList { + /** + * Constructs a render list. + * + * @param {Lighting} lighting - The lighting management component. + * @param {Scene} scene - The scene. + * @param {Camera} camera - The camera the scene is rendered with. + */ + constructor(lighting: Lighting, scene: Scene, camera: Camera); + /** + * 3D objects are transformed into render items and stored in this array. + * + * @type {Array} + */ + renderItems: Array; + /** + * The current render items index. + * + * @type {number} + * @default 0 + */ + renderItemsIndex: number; + /** + * A list with opaque render items. + * + * @type {Array} + */ + opaque: Array; + /** + * A list with transparent render items which require + * double pass rendering (e.g. transmissive objects). + * + * @type {Array} + */ + transparentDoublePass: Array; + /** + * A list with transparent render items. + * + * @type {Array} + */ + transparent: Array; + /** + * A list with transparent render bundle data. + * + * @type {Array} + */ + bundles: Array; + /** + * The render list's lights node. This node is later + * relevant for the actual analytical light nodes which + * compute the scene's lighting in the shader. + * + * @type {LightsNode} + */ + lightsNode: LightsNode; + /** + * The scene's lights stored in an array. This array + * is used to setup the lights node. + * + * @type {Array} + */ + lightsArray: Array; + /** + * The scene. + * + * @type {Scene} + */ + scene: Scene; + /** + * The camera the scene is rendered with. + * + * @type {Camera} + */ + camera: Camera; + /** + * How many objects perform occlusion query tests. + * + * @type {number} + * @default 0 + */ + occlusionQueryCount: number; + /** + * This method is called right at the beginning of a render call + * before the scene is analyzed. It prepares the internal data + * structures for the upcoming render lists generation. + * + * @return {RenderList} A reference to this render list. + */ + begin(): RenderList; + /** + * Returns a render item for the giving render item state. The state is defined + * by a series of object-related parameters. + * + * The method avoids object creation by holding render items and reusing them in + * subsequent render calls (just with different property values). + * + * @param {Object3D} object - The 3D object. + * @param {BufferGeometry} geometry - The 3D object's geometry. + * @param {Material} material - The 3D object's material. + * @param {number} groupOrder - The current group order. + * @param {number} z - Th 3D object's depth value (z value in clip space). + * @param {?number} group - {?Object} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. + * @param {ClippingContext} clippingContext - The current clipping context. + * @return {Object} The render item. + */ + getNextRenderItem(object: Object3D, geometry: BufferGeometry, material: Material, groupOrder: number, z: number, group: number | null, clippingContext: ClippingContext): Object; + /** + * Pushes the given object as a render item to the internal render lists. + * The selected lists depend on the object properties. + * + * @param {Object3D} object - The 3D object. + * @param {BufferGeometry} geometry - The 3D object's geometry. + * @param {Material} material - The 3D object's material. + * @param {number} groupOrder - The current group order. + * @param {number} z - Th 3D object's depth value (z value in clip space). + * @param {?number} group - {?Object} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. + * @param {ClippingContext} clippingContext - The current clipping context. + */ + push(object: Object3D, geometry: BufferGeometry, material: Material, groupOrder: number, z: number, group: number | null, clippingContext: ClippingContext): void; + /** + * Inserts the given object as a render item at the start of the internal render lists. + * The selected lists depend on the object properties. + * + * @param {Object3D} object - The 3D object. + * @param {BufferGeometry} geometry - The 3D object's geometry. + * @param {Material} material - The 3D object's material. + * @param {number} groupOrder - The current group order. + * @param {number} z - Th 3D object's depth value (z value in clip space). + * @param {?number} group - {?Object} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. + * @param {ClippingContext} clippingContext - The current clipping context. + */ + unshift(object: Object3D, geometry: BufferGeometry, material: Material, groupOrder: number, z: number, group: number | null, clippingContext: ClippingContext): void; + /** + * Pushes render bundle group data into the render list. + * + * @param {Object} group - Bundle group data. + */ + pushBundle(group: Object): void; + /** + * Pushes a light into the render list. + * + * @param {Light} light - The light. + */ + pushLight(light: Light): void; + /** + * Sorts the internal render lists. + * + * @param {?function(any, any): number} customOpaqueSort - A custom sort function for opaque objects. + * @param {?function(any, any): number} customTransparentSort - A custom sort function for transparent objects. + */ + sort(customOpaqueSort: ((arg0: any, arg1: any) => number) | null, customTransparentSort: ((arg0: any, arg1: any) => number) | null): void; + /** + * This method performs finalizing tasks right after the render lists + * have been generated. + */ + finish(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RenderLists.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RenderLists.d.ts new file mode 100644 index 000000000..d8d26670c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/RenderLists.d.ts @@ -0,0 +1,41 @@ +export default RenderLists; +/** + * This renderer module manages the render lists which are unique + * per scene and camera combination. + * + * @private + */ +declare class RenderLists { + /** + * Constructs a render lists management component. + * + * @param {Lighting} lighting - The lighting management component. + */ + constructor(lighting: Lighting); + /** + * The lighting management component. + * + * @type {Lighting} + */ + lighting: Lighting; + /** + * The internal chain map which holds the render lists. + * + * @type {ChainMap} + */ + lists: ChainMap; + /** + * Returns a render list for the given scene and camera. + * + * @param {Scene} scene - The scene. + * @param {Camera} camera - The camera. + * @return {RenderList} The render list. + */ + get(scene: Scene, camera: Camera): RenderList; + /** + * Frees all internal resources. + */ + dispose(): void; +} +import ChainMap from './ChainMap.js'; +import RenderList from './RenderList.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RenderObject.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RenderObject.d.ts new file mode 100644 index 000000000..36c013119 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/RenderObject.d.ts @@ -0,0 +1,409 @@ +export default RenderObject; +/** + * A render object is the renderer's representation of single entity that gets drawn + * with a draw command. There is no unique mapping of render objects to 3D objects in the + * scene since render objects also depend from the used material, the current render context + * and the current scene's lighting. + * + * In general, the basic process of the renderer is: + * + * - Analyze the 3D objects in the scene and generate render lists containing render items. + * - Process the render lists by calling one or more render commands for each render item. + * - For each render command, request a render object and perform the draw. + * + * The module provides an interface to get data required for the draw command like the actual + * draw parameters or vertex buffers. It also holds a series of caching related methods since + * creating render objects should only be done when necessary. + * + * @private + */ +declare class RenderObject { + /** + * Constructs a new render object. + * + * @param {NodeManager} nodes - Renderer component for managing nodes related logic. + * @param {Geometries} geometries - Renderer component for managing geometries. + * @param {Renderer} renderer - The renderer. + * @param {Object3D} object - The 3D object. + * @param {Material} material - The 3D object's material. + * @param {Scene} scene - The scene the 3D object belongs to. + * @param {Camera} camera - The camera the object should be rendered with. + * @param {LightsNode} lightsNode - The lights node. + * @param {RenderContext} renderContext - The render context. + * @param {ClippingContext} clippingContext - The clipping context. + */ + constructor(nodes: NodeManager, geometries: Geometries, renderer: Renderer, object: Object3D, material: Material, scene: Scene, camera: Camera, lightsNode: LightsNode, renderContext: RenderContext, clippingContext: ClippingContext); + id: number; + /** + * Renderer component for managing nodes related logic. + * + * @type {NodeManager} + * @private + */ + private _nodes; + /** + * Renderer component for managing geometries. + * + * @type {Geometries} + * @private + */ + private _geometries; + /** + * The renderer. + * + * @type {Renderer} + */ + renderer: Renderer; + /** + * The 3D object. + * + * @type {Object3D} + */ + object: Object3D; + /** + * The 3D object's material. + * + * @type {Material} + */ + material: Material; + /** + * The scene the 3D object belongs to. + * + * @type {Scene} + */ + scene: Scene; + /** + * The camera the 3D object should be rendered with. + * + * @type {Camera} + */ + camera: Camera; + /** + * The lights node. + * + * @type {LightsNode} + */ + lightsNode: LightsNode; + /** + * The render context. + * + * @type {RenderContext} + */ + context: RenderContext; + /** + * The 3D object's geometry. + * + * @type {BufferGeometry} + */ + geometry: BufferGeometry; + /** + * The render object's version. + * + * @type {number} + */ + version: number; + /** + * The draw range of the geometry. + * + * @type {?Object} + * @default null + */ + drawRange: Object | null; + /** + * An array holding the buffer attributes + * of the render object. This entails attribute + * definitions on geometry and node level. + * + * @type {?Array} + * @default null + */ + attributes: Array | null; + /** + * An object holding the version of the + * attributes. The keys are the attribute names + * and the values are the attribute versions. + * + * @type {?Object} + * @default null + */ + attributesId: { + [x: string]: number; + } | null; + /** + * A reference to a render pipeline the render + * object is processed with. + * + * @type {RenderPipeline} + * @default null + */ + pipeline: RenderPipeline; + /** + * Only relevant for objects using + * multiple materials. This represents a group entry + * from the respective `BufferGeometry`. + * + * @type {?{start: number, count: number}} + * @default null + */ + group: { + start: number; + count: number; + } | null; + /** + * An array holding the vertex buffers which can + * be buffer attributes but also interleaved buffers. + * + * @type {?Array} + * @default null + */ + vertexBuffers: Array | null; + /** + * The parameters for the draw command. + * + * @type {?Object} + * @default null + */ + drawParams: Object | null; + /** + * If this render object is used inside a render bundle, + * this property points to the respective bundle group. + * + * @type {?BundleGroup} + * @default null + */ + bundle: BundleGroup | null; + /** + * The clipping context. + * + * @type {ClippingContext} + */ + clippingContext: ClippingContext; + /** + * The clipping context's cache key. + * + * @type {string} + */ + clippingContextCacheKey: string; + /** + * The initial node cache key. + * + * @type {number} + */ + initialNodesCacheKey: number; + /** + * The initial cache key. + * + * @type {number} + */ + initialCacheKey: number; + /** + * The node builder state. + * + * @type {?NodeBuilderState} + * @private + * @default null + */ + private _nodeBuilderState; + /** + * An array of bindings. + * + * @type {?Array} + * @private + * @default null + */ + private _bindings; + /** + * Reference to the node material observer. + * + * @type {?NodeMaterialObserver} + * @private + * @default null + */ + private _monitor; + /** + * An event listener which is defined by `RenderObjects`. It performs + * clean up tasks when `dispose()` on this render object. + * + * @method + */ + onDispose: any; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isRenderObject: boolean; + /** + * An event listener which is executed when `dispose()` is called on + * the material of this render object. + * + * @method + */ + onMaterialDispose: () => void; + /** + * An event listener which is executed when `dispose()` is called on + * the geometry of this render object. + * + * @method + */ + onGeometryDispose: () => void; + /** + * Updates the clipping context. + * + * @param {ClippingContext} context - The clipping context to set. + */ + updateClipping(context: ClippingContext): void; + /** + * Whether the clipping requires an update or not. + * + * @type {boolean} + * @readonly + */ + readonly get clippingNeedsUpdate(): boolean; + /** + * The number of clipping planes defined in context of hardware clipping. + * + * @type {number} + * @readonly + */ + readonly get hardwareClippingPlanes(): number; + /** + * Returns the node builder state of this render object. + * + * @return {NodeBuilderState} The node builder state. + */ + getNodeBuilderState(): NodeBuilderState; + /** + * Returns the node material observer of this render object. + * + * @return {NodeMaterialObserver} The node material observer. + */ + getMonitor(): NodeMaterialObserver; + /** + * Returns an array of bind groups of this render object. + * + * @return {Array} The bindings. + */ + getBindings(): Array; + /** + * Returns a binding group by group name of this render object. + * + * @param {string} name - The name of the binding group. + * @return {?BindGroup} The bindings. + */ + getBindingGroup(name: string): BindGroup | null; + /** + * Returns the index of the render object's geometry. + * + * @return {?BufferAttribute} The index. Returns `null` for non-indexed geometries. + */ + getIndex(): BufferAttribute | null; + /** + * Returns the indirect buffer attribute. + * + * @return {?BufferAttribute} The indirect attribute. `null` if no indirect drawing is used. + */ + getIndirect(): BufferAttribute | null; + /** + * Returns the byte offset into the indirect attribute buffer. + * + * @return {number|Array} The byte offset into the indirect attribute buffer. + */ + getIndirectOffset(): number | Array; + /** + * Returns an array that acts as a key for identifying the render object in a chain map. + * + * @return {Array} An array with object references. + */ + getChainArray(): Array; + /** + * This method is used when the geometry of a 3D object has been exchanged and the + * respective render object now requires an update. + * + * @param {BufferGeometry} geometry - The geometry to set. + */ + setGeometry(geometry: BufferGeometry): void; + /** + * Returns the buffer attributes of the render object. The returned array holds + * attribute definitions on geometry and node level. + * + * @return {Array} An array with buffer attributes. + */ + getAttributes(): Array; + /** + * Returns the vertex buffers of the render object. + * + * @return {Array} An array with buffer attribute or interleaved buffers. + */ + getVertexBuffers(): Array; + /** + * Returns the draw parameters for the render object. + * + * @return {?{vertexCount: number, firstVertex: number, instanceCount: number, firstInstance: number}} The draw parameters. + */ + getDrawParameters(): { + vertexCount: number; + firstVertex: number; + instanceCount: number; + firstInstance: number; + } | null; + /** + * Returns the render object's geometry cache key. + * + * The geometry cache key is part of the material cache key. + * + * @return {string} The geometry cache key. + */ + getGeometryCacheKey(): string; + /** + * Returns the render object's material cache key. + * + * The material cache key is part of the render object cache key. + * + * @return {number} The material cache key. + */ + getMaterialCacheKey(): number; + /** + * Whether the geometry requires an update or not. + * + * @type {boolean} + * @readonly + */ + readonly get needsGeometryUpdate(): boolean; + /** + * Whether the render object requires an update or not. + * + * Note: There are two distinct places where render objects are checked for an update. + * + * 1. In `RenderObjects.get()` which is executed when the render object is request. This + * method checks the `needsUpdate` flag and recreates the render object if necessary. + * 2. In `Renderer._renderObjectDirect()` right after getting the render object via + * `RenderObjects.get()`. The render object's NodeMaterialObserver is then used to detect + * a need for a refresh due to material, geometry or object related value changes. + * + * TODO: Investigate if it's possible to merge both steps so there is only a single place + * that performs the 'needsUpdate' check. + * + * @type {boolean} + * @readonly + */ + readonly get needsUpdate(): boolean; + /** + * Returns the dynamic cache key which represents a key that is computed per draw command. + * + * @return {number} The cache key. + */ + getDynamicCacheKey(): number; + /** + * Returns the render object's cache key. + * + * @return {number} The cache key. + */ + getCacheKey(): number; + /** + * Frees internal resources. + */ + dispose(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RenderObjectPipeline.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RenderObjectPipeline.d.ts new file mode 100644 index 000000000..d9631c32e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/RenderObjectPipeline.d.ts @@ -0,0 +1,30 @@ +export default RenderObjectPipeline; +/** + * Class for representing render pipelines. + * + * @private + * @augments Pipeline + */ +declare class RenderObjectPipeline extends Pipeline { + /** + * Constructs a new render object pipeline. + * + * @param {string} cacheKey - The pipeline's cache key. + * @param {ProgrammableStage} vertexProgram - The pipeline's vertex shader. + * @param {ProgrammableStage} fragmentProgram - The pipeline's fragment shader. + */ + constructor(cacheKey: string, vertexProgram: ProgrammableStage, fragmentProgram: ProgrammableStage); + /** + * The pipeline's vertex shader. + * + * @type {ProgrammableStage} + */ + vertexProgram: ProgrammableStage; + /** + * The pipeline's fragment shader. + * + * @type {ProgrammableStage} + */ + fragmentProgram: ProgrammableStage; +} +import Pipeline from './Pipeline.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RenderObjects.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RenderObjects.d.ts new file mode 100644 index 000000000..fcb34a2e6 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/RenderObjects.d.ts @@ -0,0 +1,108 @@ +export default RenderObjects; +/** + * This module manages the render objects of the renderer. + * + * @private + */ +declare class RenderObjects { + /** + * Constructs a new render object management component. + * + * @param {Renderer} renderer - The renderer. + * @param {NodeManager} nodes - Renderer component for managing nodes related logic. + * @param {Geometries} geometries - Renderer component for managing geometries. + * @param {Pipelines} pipelines - Renderer component for managing pipelines. + * @param {Bindings} bindings - Renderer component for managing bindings. + * @param {Info} info - Renderer component for managing metrics and monitoring data. + */ + constructor(renderer: Renderer, nodes: NodeManager, geometries: Geometries, pipelines: Pipelines, bindings: Bindings, info: Info); + /** + * The renderer. + * + * @type {Renderer} + */ + renderer: Renderer; + /** + * Renderer component for managing nodes related logic. + * + * @type {NodeManager} + */ + nodes: NodeManager; + /** + * Renderer component for managing geometries. + * + * @type {Geometries} + */ + geometries: Geometries; + /** + * Renderer component for managing pipelines. + * + * @type {Pipelines} + */ + pipelines: Pipelines; + /** + * Renderer component for managing bindings. + * + * @type {Bindings} + */ + bindings: Bindings; + /** + * Renderer component for managing metrics and monitoring data. + * + * @type {Info} + */ + info: Info; + /** + * A dictionary that manages render contexts in chain maps + * for each pass ID. + * + * @type {Object} + */ + chainMaps: { + [x: string]: ChainMap; + }; + /** + * Returns a render object for the given object and state data. + * + * @param {Object3D} object - The 3D object. + * @param {Material} material - The 3D object's material. + * @param {Scene} scene - The scene the 3D object belongs to. + * @param {Camera} camera - The camera the 3D object should be rendered with. + * @param {LightsNode} lightsNode - The lights node. + * @param {RenderContext} renderContext - The render context. + * @param {ClippingContext} clippingContext - The clipping context. + * @param {string} [passId] - An optional ID for identifying the pass. + * @return {RenderObject} The render object. + */ + get(object: Object3D, material: Material, scene: Scene, camera: Camera, lightsNode: LightsNode, renderContext: RenderContext, clippingContext: ClippingContext, passId?: string): RenderObject; + /** + * Returns a chain map for the given pass ID. + * + * @param {string} [passId='default'] - The pass ID. + * @return {ChainMap} The chain map. + */ + getChainMap(passId?: string): ChainMap; + /** + * Frees internal resources. + */ + dispose(): void; + /** + * Factory method for creating render objects with the given list of parameters. + * + * @param {NodeManager} nodes - Renderer component for managing nodes related logic. + * @param {Geometries} geometries - Renderer component for managing geometries. + * @param {Renderer} renderer - The renderer. + * @param {Object3D} object - The 3D object. + * @param {Material} material - The object's material. + * @param {Scene} scene - The scene the 3D object belongs to. + * @param {Camera} camera - The camera the object should be rendered with. + * @param {LightsNode} lightsNode - The lights node. + * @param {RenderContext} renderContext - The render context. + * @param {ClippingContext} clippingContext - The clipping context. + * @param {string} [passId] - An optional ID for identifying the pass. + * @return {RenderObject} The render object. + */ + createRenderObject(nodes: NodeManager, geometries: Geometries, renderer: Renderer, object: Object3D, material: Material, scene: Scene, camera: Camera, lightsNode: LightsNode, renderContext: RenderContext, clippingContext: ClippingContext, passId?: string): RenderObject; +} +import ChainMap from './ChainMap.js'; +import RenderObject from './RenderObject.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RenderPipeline.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RenderPipeline.d.ts new file mode 100644 index 000000000..51a232c3c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/RenderPipeline.d.ts @@ -0,0 +1,126 @@ +export default RenderPipeline; +/** + * This module is responsible to manage the rendering pipeline setups in apps. + * You usually create a single instance of this class and use it to define + * the output of your render pipeline and post processing effect chain. + * ```js + * const renderPipeline = new RenderPipeline( renderer ); + * + * const scenePass = pass( scene, camera ); + * + * renderPipeline.outputNode = scenePass; + * ``` + * + * Note: This module can only be used with `WebGPURenderer`. + */ +declare class RenderPipeline { + /** + * Constructs a new render pipeline management module. + * + * @param {Renderer} renderer - A reference to the renderer. + * @param {Node} outputNode - An optional output node. + */ + constructor(renderer: Renderer, outputNode?: Node); + /** + * A reference to the renderer. + * + * @type {Renderer} + */ + renderer: Renderer; + /** + * A node which defines the final output of the rendering + * pipeline. This is usually the last node in a chain + * of effect nodes. + * + * @type {Node} + */ + outputNode: Node; + /** + * Whether the default output tone mapping and color + * space transformation should be enabled or not. + * + * This is enabled by default but it must be disabled for + * effects that expect to be executed after tone mapping and color + * space conversion. A typical example is FXAA which + * requires sRGB input. + * + * When set to `false`, the app must control the output + * transformation with `RenderOutputNode`. + * + * ```js + * const outputPass = renderOutput( scenePass ); + * ``` + * + * @type {boolean} + */ + outputColorTransform: boolean; + /** + * Must be set to `true` when the output node changes. + * + * @type {Node} + */ + needsUpdate: Node; + /** + * The full screen quad that is used to render + * the effects. + * + * @private + * @type {QuadMesh} + */ + private _quadMesh; + /** + * The context of the render pipeline stack. + * + * @private + * @type {?Object} + * @default null + */ + private _context; + /** + * The current tone mapping. + * + * @private + * @type {ToneMapping} + */ + private _toneMapping; + /** + * The current output color space. + * + * @private + * @type {ColorSpace} + */ + private _outputColorSpace; + /** + * When `RenderPipeline` is used to apply rendering pipeline and post processing effects, + * the application must use this version of `render()` inside + * its animation loop (not the one from the renderer). + */ + render(): void; + /** + * Returns the current context of the render pipeline stack. + * + * @readonly + * @type {?Object} + */ + readonly get context(): Object | null; + /** + * Frees internal resources. + */ + dispose(): void; + /** + * Updates the state of the module. + * + * @private + */ + private _update; + /** + * When `RenderPipeline` is used to apply rendering pipeline and post processing effects, + * the application must use this version of `renderAsync()` inside + * its animation loop (not the one from the renderer). + * + * @async + * @deprecated + * @return {Promise} A Promise that resolves when the render has been finished. + */ + renderAsync(): Promise; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Renderer.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Renderer.d.ts new file mode 100644 index 000000000..9ac08a6de --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/Renderer.d.ts @@ -0,0 +1,1422 @@ +export default Renderer; +/** + * Animation loop parameter of `renderer.setAnimationLoop()`. + */ +export type onAnimationCallback = (time: DOMHighResTimeStamp, frame?: XRFrame) => any; +/** + * Base class for renderers. + */ +declare class Renderer { + /** + * Renderer options. + * + * @typedef {Object} Renderer~Options + * @property {boolean} [logarithmicDepthBuffer=false] - Whether logarithmic depth buffer is enabled or not. + * @property {boolean} [reversedDepthBuffer=false] - Whether reversed depth buffer is enabled or not. + * @property {boolean} [alpha=true] - Whether the default framebuffer (which represents the final contents of the canvas) should be transparent or opaque. + * @property {boolean} [depth=true] - Whether the default framebuffer should have a depth buffer or not. + * @property {boolean} [stencil=false] - Whether the default framebuffer should have a stencil buffer or not. + * @property {boolean} [antialias=false] - Whether MSAA as the default anti-aliasing should be enabled or not. + * @property {number} [samples=0] - When `antialias` is `true`, `4` samples are used by default. This parameter can set to any other integer value than 0 + * to overwrite the default. + * @property {?Function} [getFallback=null] - This callback function can be used to provide a fallback backend, if the primary backend can't be targeted. + * @property {number} [outputBufferType=HalfFloatType] - Defines the type of output buffers. The default `HalfFloatType` is recommend for best + * quality. To save memory and bandwidth, `UnsignedByteType` might be used. This will reduce rendering quality though. + * @property {boolean} [multiview=false] - If set to `true`, the renderer will use multiview during WebXR rendering if supported. + */ + /** + * Constructs a new renderer. + * + * @param {Backend} backend - The backend the renderer is targeting (e.g. WebGPU or WebGL 2). + * @param {Renderer~Options} [parameters] - The configuration parameter. + + */ + constructor(backend: Backend, parameters?: {}); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isRenderer: boolean; + /** + * A reference to the current backend. + * + * @type {Backend} + */ + backend: Backend; + /** + * Whether the renderer should automatically clear the current rendering target + * before execute a `render()` call. The target can be the canvas (default framebuffer) + * or the current bound render target (custom framebuffer). + * + * @type {boolean} + * @default true + */ + autoClear: boolean; + /** + * When `autoClear` is set to `true`, this property defines whether the renderer + * should clear the color buffer. + * + * @type {boolean} + * @default true + */ + autoClearColor: boolean; + /** + * When `autoClear` is set to `true`, this property defines whether the renderer + * should clear the depth buffer. + * + * @type {boolean} + * @default true + */ + autoClearDepth: boolean; + /** + * When `autoClear` is set to `true`, this property defines whether the renderer + * should clear the stencil buffer. + * + * @type {boolean} + * @default true + */ + autoClearStencil: boolean; + /** + * Whether the default framebuffer should be transparent or opaque. + * + * @type {boolean} + * @default true + */ + alpha: boolean; + /** + * Whether logarithmic depth buffer is enabled or not. + * + * @type {boolean} + * @default false + * @readonly + */ + readonly logarithmicDepthBuffer: boolean; + /** + * Whether reversed depth buffer is enabled or not. + * + * @type {boolean} + * @default false + * @readonly + */ + readonly reversedDepthBuffer: boolean; + /** + * Defines the output color space of the renderer. + * + * @type {string} + * @default SRGBColorSpace + */ + outputColorSpace: string; + /** + * Defines the tone mapping of the renderer. + * + * @type {number} + * @default NoToneMapping + */ + toneMapping: number; + /** + * Defines the tone mapping exposure. + * + * @type {number} + * @default 1 + */ + toneMappingExposure: number; + /** + * Whether the renderer should sort its render lists or not. + * + * Note: Sorting is used to attempt to properly render objects that have some degree of transparency. + * By definition, sorting objects may not work in all cases. Depending on the needs of application, + * it may be necessary to turn off sorting and use other methods to deal with transparency rendering + * e.g. manually determining each object's rendering order. + * + * @type {boolean} + * @default true + */ + sortObjects: boolean; + /** + * Whether the default framebuffer should have a depth buffer or not. + * + * @type {boolean} + * @default true + */ + depth: boolean; + /** + * Whether the default framebuffer should have a stencil buffer or not. + * + * @type {boolean} + * @default false + */ + stencil: boolean; + /** + * Holds a series of statistical information about the GPU memory + * and the rendering process. Useful for debugging and monitoring. + * + * @type {Info} + */ + info: Info; + /** + * A global context node that stores override nodes for specific transformations or calculations. + * These nodes can be used to replace default behavior in the rendering pipeline. + * + * @type {ContextNode} + * @property {Object} value - The context value object. + */ + contextNode: ContextNode; + /** + * The node library defines how certain library objects like materials, lights + * or tone mapping functions are mapped to node types. This is required since + * although instances of classes like `MeshBasicMaterial` or `PointLight` can + * be part of the scene graph, they are internally represented as nodes for + * further processing. + * + * @type {NodeLibrary} + */ + library: NodeLibrary; + /** + * A map-like data structure for managing lights. + * + * @type {Lighting} + */ + lighting: Lighting; + /** + * The number of MSAA samples. + * + * @private + * @type {number} + * @default 0 + */ + private _samples; + /** + * Callback when the canvas has been resized. + * + * @private + */ + private _onCanvasTargetResize; + /** + * The canvas target for rendering. + * + * @private + * @type {CanvasTarget} + */ + private _canvasTarget; + /** + * The inspector provides information about the internal renderer state. + * + * @private + * @type {InspectorBase} + */ + private _inspector; + /** + * This callback function can be used to provide a fallback backend, if the primary backend can't be targeted. + * + * @private + * @type {?Function} + */ + private _getFallback; + /** + * A reference to a renderer module for managing shader attributes. + * + * @private + * @type {?Attributes} + * @default null + */ + private _attributes; + /** + * A reference to a renderer module for managing geometries. + * + * @private + * @type {?Geometries} + * @default null + */ + private _geometries; + /** + * A reference to a renderer module for managing node related logic. + * + * @private + * @type {?NodeManager} + * @default null + */ + private _nodes; + /** + * A reference to a renderer module for managing the internal animation loop. + * + * @private + * @type {?Animation} + * @default null + */ + private _animation; + /** + * A reference to a renderer module for managing shader program bindings. + * + * @private + * @type {?Bindings} + * @default null + */ + private _bindings; + /** + * A reference to a renderer module for managing render objects. + * + * @private + * @type {?RenderObjects} + * @default null + */ + private _objects; + /** + * A reference to a renderer module for managing render and compute pipelines. + * + * @private + * @type {?Pipelines} + * @default null + */ + private _pipelines; + /** + * A reference to a renderer module for managing render bundles. + * + * @private + * @type {?RenderBundles} + * @default null + */ + private _bundles; + /** + * A reference to a renderer module for managing render lists. + * + * @private + * @type {?RenderLists} + * @default null + */ + private _renderLists; + /** + * A reference to a renderer module for managing render contexts. + * + * @private + * @type {?RenderContexts} + * @default null + */ + private _renderContexts; + /** + * A reference to a renderer module for managing textures. + * + * @private + * @type {?Textures} + * @default null + */ + private _textures; + /** + * A reference to a renderer module for backgrounds. + * + * @private + * @type {?Background} + * @default null + */ + private _background; + /** + * Cache for the fullscreen quad. + * This fullscreen quad is used for internal render passes + * like the tone mapping and color space output pass. + * + * @private + * @type {Map} + */ + private _quadCache; + /** + * A reference to the current render context. + * + * @private + * @type {?RenderContext} + * @default null + */ + private _currentRenderContext; + /** + * A custom sort function for the opaque render list. + * + * @private + * @type {?Function} + * @default null + */ + private _opaqueSort; + /** + * A custom sort function for the transparent render list. + * + * @private + * @type {?Function} + * @default null + */ + private _transparentSort; + /** + * Cache of framebuffer targets per canvas target. + * + * @private + * @type {Map} + */ + private _frameBufferTargets; + /** + * The clear color value. + * + * @private + * @type {Color4} + */ + private _clearColor; + /** + * The clear depth value. + * + * @private + * @type {number} + * @default 1 + */ + private _clearDepth; + /** + * The clear stencil value. + * + * @private + * @type {number} + * @default 0 + */ + private _clearStencil; + /** + * The current render target. + * + * @private + * @type {?RenderTarget} + * @default null + */ + private _renderTarget; + /** + * The active cube face. + * + * @private + * @type {number} + * @default 0 + */ + private _activeCubeFace; + /** + * The active mipmap level. + * + * @private + * @type {number} + * @default 0 + */ + private _activeMipmapLevel; + /** + * The current output render target. + * + * @private + * @type {?RenderTarget} + * @default null + */ + private _outputRenderTarget; + /** + * The MRT setting. + * + * @private + * @type {?MRTNode} + * @default null + */ + private _mrt; + /** + * This function defines how a render object is going + * to be rendered. + * + * @private + * @type {?Function} + * @default null + */ + private _renderObjectFunction; + /** + * Used to keep track of the current render object function. + * + * @private + * @type {?Function} + * @default null + */ + private _currentRenderObjectFunction; + /** + * Used to keep track of the current render bundle. + * + * @private + * @type {?RenderBundle} + * @default null + */ + private _currentRenderBundle; + /** + * Next to `_renderObjectFunction()`, this function provides another hook + * for influencing the render process of a render object. It is meant for internal + * use and only relevant for `compileAsync()` right now. Instead of using + * the default logic of `_renderObjectDirect()` which actually draws the render object, + * a different function might be used which performs no draw but just the node + * and pipeline updates. + * + * @private + * @type {Function} + */ + private _handleObjectFunction; + /** + * Indicates whether the device has been lost or not. In WebGL terms, the device + * lost is considered as a context lost. When this is set to `true`, rendering + * isn't possible anymore. + * + * @private + * @type {boolean} + * @default false + */ + private _isDeviceLost; + /** + * A callback function that defines what should happen when a device/context lost occurs. + * + * @type {Function} + */ + onDeviceLost: Function; + /** + * A callback function that defines what should happen when an uncaptured + * backend error is reported (e.g. a WebGPU validation/out-of-memory/internal + * error raised outside an error scope). Applications can override this to + * surface errors in their own UI without letting them escalate to a device + * loss. The default implementation logs to the console. + * + * @type {Function} + */ + onError: Function; + /** + * Defines the type of output buffers. The default `HalfFloatType` is recommend for + * best quality. To save memory and bandwidth, `UnsignedByteType` might be used. + * This will reduce rendering quality though. + * + * @private + * @type {number} + * @default HalfFloatType + */ + private _outputBufferType; + /** + * A cache for shadow nodes per material + * + * @private + * @type {WeakMap} + */ + private _cacheShadowNodes; + /** + * Whether the renderer has been initialized or not. + * + * @private + * @type {boolean} + * @default false + */ + private _initialized; + /** + * The call depth of the renderer. Counts the number of + * nested render calls. + * + * @private + * @type {number} + * @default - 1 + */ + private _callDepth; + /** + * A reference to the promise which initializes the renderer. + * + * @private + * @type {?Promise} + * @default null + */ + private _initPromise; + /** + * An array of compilation promises which are used in `compileAsync()`. + * + * @private + * @type {?Array} + * @default null + */ + private _compilationPromises; + /** + * Whether the renderer should render transparent render objects or not. + * + * @type {boolean} + * @default true + */ + transparent: boolean; + /** + * Whether the renderer should render opaque render objects or not. + * + * @type {boolean} + * @default true + */ + opaque: boolean; + /** + * Shadow map configuration + * @typedef {Object} ShadowMapConfig + * @property {boolean} enabled - Whether to globally enable shadows or not. + * @property {boolean} transmitted - Whether to enable light transmission through non-opaque materials. + * @property {number} type - The shadow map type. + */ + /** + * The renderer's shadow configuration. + * + * @type {ShadowMapConfig} + */ + shadowMap: { + /** + * - Whether to globally enable shadows or not. + */ + enabled: boolean; + /** + * - Whether to enable light transmission through non-opaque materials. + */ + transmitted: boolean; + /** + * - The shadow map type. + */ + type: number; + }; + /** + * XR configuration. + * @typedef {Object} XRConfig + * @property {boolean} enabled - Whether to globally enable XR or not. + */ + /** + * The renderer's XR manager. + * + * @type {XRManager} + */ + xr: XRManager; + /** + * Debug configuration. + * @typedef {Object} DebugConfig + * @property {boolean} checkShaderErrors - Whether shader errors should be checked or not. + * @property {?Function} onShaderError - A callback function that is executed when a shader error happens. Only supported with WebGL 2 right now. + * @property {Function} getShaderAsync - Allows the get the raw shader code for the given scene, camera and 3D object. + */ + /** + * The renderer's debug configuration. + * + * @type {DebugConfig} + */ + debug: { + /** + * - Whether shader errors should be checked or not. + */ + checkShaderErrors: boolean; + /** + * - A callback function that is executed when a shader error happens. Only supported with WebGL 2 right now. + */ + onShaderError: Function | null; + /** + * - Allows the get the raw shader code for the given scene, camera and 3D object. + */ + getShaderAsync: Function; + }; + /** + * Initializes the renderer so it is ready for usage. + * + * @async + * @return {Promise} A Promise that resolves when the renderer has been initialized. + */ + init(): Promise; + /** + * A reference to the canvas element the renderer is drawing to. + * This value of this property will automatically be created by + * the renderer. + * + * @type {HTMLCanvasElement|OffscreenCanvas} + */ + get domElement(): HTMLCanvasElement | OffscreenCanvas; + /** + * The coordinate system of the renderer. The value of this property + * depends on the selected backend. Either `THREE.WebGLCoordinateSystem` or + * `THREE.WebGPUCoordinateSystem`. + * + * @readonly + * @type {number} + */ + readonly get coordinateSystem(): number; + /** + * Compiles all materials in the given scene. This can be useful to avoid a + * phenomenon which is called "shader compilation stutter", which occurs when + * rendering an object with a new shader for the first time. + * + * If you want to add a 3D object to an existing scene, use the third optional + * parameter for applying the target scene. Note that the (target) scene's lighting + * and environment must be configured before calling this method. + * + * @async + * @param {Object3D} scene - The scene or 3D object to precompile. + * @param {Camera} camera - The camera that is used to render the scene. + * @param {?Scene} targetScene - If the first argument is a 3D object, this parameter must represent the scene the 3D object is going to be added. + * @return {Promise} A Promise that resolves when the compile has been finished. + */ + compileAsync(scene: Object3D, camera: Camera, targetScene?: Scene | null): Promise; + /** + * Renders the scene in an async fashion. + * + * @async + * @deprecated + * @param {Object3D} scene - The scene or 3D object to render. + * @param {Camera} camera - The camera. + * @return {Promise} A Promise that resolves when the render has been finished. + */ + renderAsync(scene: Object3D, camera: Camera): Promise; + /** + * Can be used to synchronize CPU operations with GPU tasks. So when this method is called, + * the CPU waits for the GPU to complete its operation (e.g. a compute task). + * + * @async + * @deprecated + * @return {Promise} A Promise that resolves when synchronization has been finished. + */ + waitForGPU(): Promise; + set inspector(value: InspectorBase); + /** + * The inspector instance. The inspector can be any class that extends from `InspectorBase`. + * + * @type {InspectorBase} + */ + get inspector(): InspectorBase; + /** + * Enables or disables high precision for model-view and normal-view matrices. + * When enabled, will use CPU 64-bit precision for higher precision instead of GPU 32-bit for higher performance. + * + * NOTE: 64-bit precision is not compatible with `InstancedMesh` and `SkinnedMesh`. + * + * @param {boolean} value - Whether to enable or disable high precision. + * @type {boolean} + */ + set highPrecision(value: boolean); + /** + * Returns whether high precision is enabled or not. + * + * @return {boolean} Whether high precision is enabled or not. + * @type {boolean} + */ + get highPrecision(): boolean; + /** + * Sets the given MRT configuration. + * + * @param {MRTNode} mrt - The MRT node to set. + * @return {Renderer} A reference to this renderer. + */ + setMRT(mrt: MRTNode): Renderer; + /** + * Returns the MRT configuration. + * + * @return {MRTNode} The MRT configuration. + */ + getMRT(): MRTNode; + /** + * Returns the output buffer type. + * + * @return {number} The output buffer type. + */ + getOutputBufferType(): number; + /** + * Returns the output buffer type. + * + * @deprecated since r182. Use `.getOutputBufferType()` instead. + * @return {number} The output buffer type. + */ + getColorBufferType(): number; + /** + * Default implementation of the device lost callback. + * + * @private + * @param {Object} info - Information about the context lost. + */ + private _onDeviceLost; + /** + * Default implementation of the uncaptured backend error callback. + * + * @private + * @param {Object} info - Information about the uncaptured error. + */ + private _onError; + /** + * Renders the given render bundle. + * + * @private + * @param {Object} bundle - Render bundle data. + * @param {Scene} sceneRef - The scene the render bundle belongs to. + * @param {LightsNode} lightsNode - The lights node. + */ + private _renderBundle; + /** + * Renders the scene or 3D object with the given camera. This method can only be called + * if the renderer has been initialized. When using `render()` inside an animation loop, + * it's guaranteed the renderer will be initialized. The animation loop must be defined + * with {@link Renderer#setAnimationLoop} though. + * + * For all other use cases (like when using on-demand rendering), you must call + * {@link Renderer#init} before rendering. + * + * The target of the method is the default framebuffer (meaning the canvas) + * or alternatively a render target when specified via `setRenderTarget()`. + * + * @param {Object3D} scene - The scene or 3D object to render. + * @param {Camera} camera - The camera to render the scene with. + */ + render(scene: Object3D, camera: Camera): void; + /** + * Returns whether the renderer has been initialized or not. + * + * @readonly + * @return {boolean} Whether the renderer has been initialized or not. + */ + readonly get initialized(): boolean; + _renderOutputLayers(quad: any, renderTarget: any): void; + /** + * Returns an internal render target which is used when computing the output tone mapping + * and color space conversion. Unlike in `WebGLRenderer`, this is done in a separate render + * pass and not inline to achieve more correct results. + * + * @private + * @return {?RenderTarget} The render target. The method returns `null` if no output conversion should be applied. + */ + private _getFrameBufferTarget; + /** + * Renders the scene or 3D object with the given camera. + * + * @private + * @param {Object3D} scene - The scene or 3D object to render. + * @param {Camera} camera - The camera to render the scene with. + * @param {boolean} [useFrameBufferTarget=true] - Whether to use a framebuffer target or not. + * @return {RenderContext} The current render context. + */ + private _renderScene; + _setXRLayerSize(width: any, height: any): void; + /** + * The output pass performs tone mapping and color space conversion. + * + * @private + * @param {RenderTarget} renderTarget - The current render target. + */ + private _renderOutput; + /** + * Returns the maximum available anisotropy for texture filtering. + * + * @return {number} The maximum available anisotropy. + */ + getMaxAnisotropy(): number; + /** + * Returns the active cube face. + * + * @return {number} The active cube face. + */ + getActiveCubeFace(): number; + /** + * Returns the active mipmap level. + * + * @return {number} The active mipmap level. + */ + getActiveMipmapLevel(): number; + /** + * Applications are advised to always define the animation loop + * with this method and not manually with `requestAnimationFrame()` + * for best compatibility. + * + * @async + * @param {?onAnimationCallback} callback - The application's animation loop. + * @return {Promise} A Promise that resolves when the set has been executed. + */ + setAnimationLoop(callback: onAnimationCallback | null): Promise; + /** + * Returns the current animation loop callback. + * + * @return {?Function} The current animation loop callback. + */ + getAnimationLoop(): Function | null; + /** + * Can be used to transfer buffer data from a storage buffer attribute + * from the GPU to the CPU in context of compute shaders. + * + * @async + * @param {BufferAttribute} attribute - The storage buffer attribute to read frm. + * @param {ReadbackBuffer|ArrayBuffer} target - The storage buffer attribute. + * @param {number} offset - The storage buffer attribute. + * @param {number} count - The offset from which to start reading the + * @return {Promise} A promise that resolves with the buffer data when the data are ready. + */ + getArrayBufferAsync(attribute: BufferAttribute, target?: ReadbackBuffer | ArrayBuffer, offset?: number, count?: number): Promise; + /** + * Returns the rendering context. + * + * @return {GPUCanvasContext|WebGL2RenderingContext} The rendering context. + */ + getContext(): GPUCanvasContext | WebGL2RenderingContext; + /** + * Returns the pixel ratio. + * + * @return {number} The pixel ratio. + */ + getPixelRatio(): number; + /** + * Returns the drawing buffer size in physical pixels. This method honors the pixel ratio. + * + * @param {Vector2} target - The method writes the result in this target object. + * @return {Vector2} The drawing buffer size. + */ + getDrawingBufferSize(target: Vector2): Vector2; + /** + * Returns the renderer's size in logical pixels. This method does not honor the pixel ratio. + * + * @param {Vector2} target - The method writes the result in this target object. + * @return {Vector2} The renderer's size in logical pixels. + */ + getSize(target: Vector2): Vector2; + /** + * Sets the given pixel ratio and resizes the canvas if necessary. + * + * @param {number} [value=1] - The pixel ratio. + */ + setPixelRatio(value?: number): void; + /** + * This method allows to define the drawing buffer size by specifying + * width, height and pixel ratio all at once. The size of the drawing + * buffer is computed with this formula: + * ```js + * size.x = width * pixelRatio; + * size.y = height * pixelRatio; + * ``` + * + * @param {number} width - The width in logical pixels. + * @param {number} height - The height in logical pixels. + * @param {number} pixelRatio - The pixel ratio. + */ + setDrawingBufferSize(width: number, height: number, pixelRatio: number): void; + /** + * Sets the size of the renderer. + * + * @param {number} width - The width in logical pixels. + * @param {number} height - The height in logical pixels. + * @param {boolean} [updateStyle=true] - Whether to update the `style` attribute of the canvas or not. + */ + setSize(width: number, height: number, updateStyle?: boolean): void; + /** + * Defines a manual sort function for the opaque render list. + * Pass `null` to use the default sort. + * + * @param {Function} method - The sort function. + */ + setOpaqueSort(method: Function): void; + /** + * Defines a manual sort function for the transparent render list. + * Pass `null` to use the default sort. + * + * @param {Function} method - The sort function. + */ + setTransparentSort(method: Function): void; + /** + * Returns the scissor rectangle. + * + * @param {Vector4} target - The method writes the result in this target object. + * @return {Vector4} The scissor rectangle. + */ + getScissor(target: Vector4): Vector4; + /** + * Defines the scissor rectangle. + * + * @param {number | Vector4} x - The horizontal coordinate for the upper left corner of the box in logical pixel unit. + * Instead of passing four arguments, the method also works with a single four-dimensional vector. + * @param {number} y - The vertical coordinate for the upper left corner of the box in logical pixel unit. + * @param {number} width - The width of the scissor box in logical pixel unit. + * @param {number} height - The height of the scissor box in logical pixel unit. + */ + setScissor(x: number | Vector4, y: number, width: number, height: number): void; + /** + * Returns the scissor test value. + * + * @return {boolean} Whether the scissor test should be enabled or not. + */ + getScissorTest(): boolean; + /** + * Defines the scissor test. + * + * @param {boolean} boolean - Whether the scissor test should be enabled or not. + */ + setScissorTest(boolean: boolean): void; + /** + * Returns the viewport definition. + * + * @param {Vector4} target - The method writes the result in this target object. + * @return {Vector4} The viewport definition. + */ + getViewport(target: Vector4): Vector4; + /** + * Defines the viewport. + * + * @param {number | Vector4} x - The horizontal coordinate for the upper left corner of the viewport origin in logical pixel unit. + * @param {number} y - The vertical coordinate for the upper left corner of the viewport origin in logical pixel unit. + * @param {number} width - The width of the viewport in logical pixel unit. + * @param {number} height - The height of the viewport in logical pixel unit. + * @param {number} minDepth - The minimum depth value of the viewport. WebGPU only. + * @param {number} maxDepth - The maximum depth value of the viewport. WebGPU only. + */ + setViewport(x: number | Vector4, y: number, width: number, height: number, minDepth?: number, maxDepth?: number): void; + /** + * Returns the clear color. + * + * @param {Color} target - The method writes the result in this target object. + * @return {Color} The clear color. + */ + getClearColor(target: Color): Color; + /** + * Defines the clear color and optionally the clear alpha. + * + * @param {Color} color - The clear color. + * @param {number} [alpha=1] - The clear alpha. + */ + setClearColor(color: Color, alpha?: number): void; + /** + * Returns the clear alpha. + * + * @return {number} The clear alpha. + */ + getClearAlpha(): number; + /** + * Defines the clear alpha. + * + * @param {number} alpha - The clear alpha. + */ + setClearAlpha(alpha: number): void; + /** + * Returns the clear depth. + * + * @return {number} The clear depth. + */ + getClearDepth(): number; + /** + * Defines the clear depth. + * + * @param {number} depth - The clear depth. + */ + setClearDepth(depth: number): void; + /** + * Returns the clear stencil. + * + * @return {number} The clear stencil. + */ + getClearStencil(): number; + /** + * Defines the clear stencil. + * + * @param {number} stencil - The clear stencil. + */ + setClearStencil(stencil: number): void; + /** + * This method performs an occlusion query for the given 3D object. + * It returns `true` if the given 3D object is fully occluded by other + * 3D objects in the scene. + * + * @param {Object3D} object - The 3D object to test. + * @return {boolean} Whether the 3D object is fully occluded or not. + */ + isOccluded(object: Object3D): boolean; + /** + * Performs a manual clear operation. This method ignores `autoClear` properties. + * + * @param {boolean} [color=true] - Whether the color buffer should be cleared or not. + * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not. + * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not. + */ + clear(color?: boolean, depth?: boolean, stencil?: boolean): void; + /** + * Performs a manual clear operation of the color buffer. This method ignores `autoClear` properties. + */ + clearColor(): void; + /** + * Performs a manual clear operation of the depth buffer. This method ignores `autoClear` properties. + */ + clearDepth(): void; + /** + * Performs a manual clear operation of the stencil buffer. This method ignores `autoClear` properties. + */ + clearStencil(): void; + /** + * Async version of {@link Renderer#clear}. + * + * @async + * @deprecated + * @param {boolean} [color=true] - Whether the color buffer should be cleared or not. + * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not. + * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not. + * @return {Promise} A Promise that resolves when the clear operation has been executed. + */ + clearAsync(color?: boolean, depth?: boolean, stencil?: boolean): Promise; + /** + * Async version of {@link Renderer#clearColor}. + * + * @async + * @deprecated + * @return {Promise} A Promise that resolves when the clear operation has been executed. + */ + clearColorAsync(): Promise; + /** + * Async version of {@link Renderer#clearDepth}. + * + * @async + * @deprecated + * @return {Promise} A Promise that resolves when the clear operation has been executed. + */ + clearDepthAsync(): Promise; + /** + * Async version of {@link Renderer#clearStencil}. + * + * @async + * @deprecated + * @return {Promise} A Promise that resolves when the clear operation has been executed. + */ + clearStencilAsync(): Promise; + /** + * Returns `true` if a framebuffer target is needed to perform tone mapping or color space conversion. + * If this is the case, the renderer allocates an internal render target for that purpose. + * + */ + get needsFrameBufferTarget(): boolean; + /** + * The number of samples used for multi-sample anti-aliasing (MSAA). + * + * @type {number} + * @default 0 + */ + get samples(): number; + /** + * The current number of samples used for multi-sample anti-aliasing (MSAA). + * + * When rendering to a custom render target, the number of samples of that render target is used. + * If the renderer needs an internal framebuffer target for tone mapping or color space conversion, + * the number of samples is set to 0. + * + * @type {number} + */ + get currentSamples(): number; + /** + * The current tone mapping of the renderer. When not producing screen output, + * the tone mapping is always `NoToneMapping`. + * + * @type {number} + */ + get currentToneMapping(): number; + /** + * The current color space of the renderer. When not producing screen output, + * the color space is always the working color space. + * + * @type {string} + */ + get currentColorSpace(): string; + /** + * Returns `true` if the rendering settings are set to screen output. + * + * @returns {boolean} True if the current render target is the same of output render target or `null`, otherwise false. + */ + get isOutputTarget(): boolean; + /** + * Frees all internal resources of the renderer. Call this method if the renderer + * is no longer in use by your app. + */ + dispose(): void; + /** + * Sets the given render target. Calling this method means the renderer does not + * target the default framebuffer (meaning the canvas) anymore but a custom framebuffer. + * Use `null` as the first argument to reset the state. + * + * @param {?RenderTarget} renderTarget - The render target to set. + * @param {number} [activeCubeFace=0] - The active cube face. + * @param {number} [activeMipmapLevel=0] - The active mipmap level. + */ + setRenderTarget(renderTarget: RenderTarget | null, activeCubeFace?: number, activeMipmapLevel?: number): void; + /** + * Returns the current render target. + * + * @return {?RenderTarget} The render target. Returns `null` if no render target is set. + */ + getRenderTarget(): RenderTarget | null; + /** + * Sets the output render target for the renderer. + * + * @param {?RenderTarget} renderTarget - The render target to set as the output target. + */ + setOutputRenderTarget(renderTarget: RenderTarget | null): void; + /** + * Returns the current output target. + * + * @return {?RenderTarget} The current output render target. Returns `null` if no output target is set. + */ + getOutputRenderTarget(): RenderTarget | null; + /** + * Sets the canvas target. The canvas target manages the HTML canvas + * or the offscreen canvas the renderer draws into. + * + * @param {CanvasTarget} canvasTarget - The canvas target. + */ + setCanvasTarget(canvasTarget: CanvasTarget): void; + /** + * Returns the current canvas target. + * + * @return {CanvasTarget} The current canvas target. + */ + getCanvasTarget(): CanvasTarget; + /** + * Resets the renderer to the initial state before WebXR started. + * + * @private + */ + private _resetXRState; + /** + * Callback for {@link Renderer#setRenderObjectFunction}. + * + * @callback renderObjectFunction + * @param {Object3D} object - The 3D object. + * @param {Scene} scene - The scene the 3D object belongs to. + * @param {Camera} camera - The camera the object should be rendered with. + * @param {BufferGeometry} geometry - The object's geometry. + * @param {Material} material - The object's material. + * @param {?Object} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. + * @param {LightsNode} lightsNode - The current lights node. + * @param {ClippingContext} clippingContext - The clipping context. + * @param {?string} [passId=null] - An optional ID for identifying the pass. + */ + /** + * Sets the given render object function. Calling this method overwrites the default implementation + * which is {@link Renderer#renderObject}. Defining a custom function can be useful + * if you want to modify the way objects are rendered. For example you can define things like "every + * object that has material of a certain type should perform a pre-pass with a special overwrite material". + * The custom function must always call `renderObject()` in its implementation. + * + * Use `null` as the first argument to reset the state. + * + * @param {?renderObjectFunction} renderObjectFunction - The render object function. + */ + setRenderObjectFunction(renderObjectFunction: ((object: Object3D, scene: Scene, camera: Camera, geometry: BufferGeometry, material: Material, group: Object | null, lightsNode: LightsNode, clippingContext: ClippingContext, passId?: string | null | undefined) => any) | null): void; + /** + * Returns the current render object function. + * + * @return {?Function} The current render object function. Returns `null` if no function is set. + */ + getRenderObjectFunction(): Function | null; + /** + * Execute a single or an array of compute nodes. This method can only be called + * if the renderer has been initialized. + * + * @param {Node|Array} computeNodes - The compute node(s). + * @param {number|Array|IndirectStorageBufferAttribute} [dispatchSize=null] + * - A single number representing count, or + * - An array [x, y, z] representing dispatch size, or + * - A IndirectStorageBufferAttribute for indirect dispatch size. + * @return {Promise|undefined} A Promise that resolve when the compute has finished. Only returned when the renderer has not been initialized. + */ + compute(computeNodes: Node | Array, dispatchSize?: number | Array | IndirectStorageBufferAttribute): Promise | undefined; + /** + * Execute a single or an array of compute nodes. + * + * @async + * @param {Node|Array} computeNodes - The compute node(s). + * @param {number|Array|IndirectStorageBufferAttribute} [dispatchSize=null] + * - A single number representing count, or + * - An array [x, y, z] representing dispatch size, or + * - A IndirectStorageBufferAttribute for indirect dispatch size. + * @return {Promise} A Promise that resolve when the compute has finished. + */ + computeAsync(computeNodes: Node | Array, dispatchSize?: number | Array | IndirectStorageBufferAttribute): Promise; + /** + * Checks if the given feature is supported by the selected backend. + * + * @async + * @deprecated + * @param {string} name - The feature's name. + * @return {Promise} A Promise that resolves with a bool that indicates whether the feature is supported or not. + */ + hasFeatureAsync(name: string): Promise; + resolveTimestampsAsync(type?: string): Promise; + /** + * Checks if the given feature is supported by the selected backend. If the + * renderer has not been initialized, this method always returns `false`. + * + * @param {string} name - The feature's name. + * @return {boolean} Whether the feature is supported or not. + */ + hasFeature(name: string): boolean; + /** + * Returns `true` when the renderer has been initialized. + * + * @return {boolean} Whether the renderer has been initialized or not. + */ + hasInitialized(): boolean; + /** + * Initializes the given textures. Useful for preloading a texture rather than waiting until first render + * (which can cause noticeable lags due to decode and GPU upload overhead). + * + * @async + * @deprecated + * @param {Texture} texture - The texture. + * @return {Promise} A Promise that resolves when the texture has been initialized. + */ + initTextureAsync(texture: Texture): Promise; + /** + * Initializes the given texture. Useful for preloading a texture rather than waiting until first render + * (which can cause noticeable lags due to decode and GPU upload overhead). + * + * This method can only be used if the renderer has been initialized. + * + * @param {Texture} texture - The texture. + */ + initTexture(texture: Texture): void; + /** + * Initializes the given render target. + * + * @param {RenderTarget} renderTarget - The render target to intialize. + */ + initRenderTarget(renderTarget: RenderTarget): void; + /** + * Copies the current bound framebuffer into the given texture. + * + * @param {FramebufferTexture} framebufferTexture - The texture. + * @param {?(Vector2|Vector4)} [rectangle=null] - A two or four dimensional vector that defines the rectangular portion of the framebuffer that should be copied. + */ + copyFramebufferToTexture(framebufferTexture: FramebufferTexture, rectangle?: (Vector2 | Vector4) | null): void; + /** + * Copies data of the given source texture into a destination texture. + * + * @param {Texture} srcTexture - The source texture. + * @param {Texture} dstTexture - The destination texture. + * @param {Box2|Box3} [srcRegion=null] - A bounding box which describes the source region. Can be two or three-dimensional. + * @param {Vector2|Vector3} [dstPosition=null] - A vector that represents the origin of the destination region. Can be two or three-dimensional. + * @param {number} [srcLevel=0] - The source mip level to copy from. + * @param {number} [dstLevel=0] - The destination mip level to copy to. + */ + copyTextureToTexture(srcTexture: Texture, dstTexture: Texture, srcRegion?: Box2 | Box3, dstPosition?: Vector2 | Vector3, srcLevel?: number, dstLevel?: number): void; + /** + * Reads pixel data from the given render target. + * + * @async + * @param {RenderTarget} renderTarget - The render target to read from. + * @param {number} x - The `x` coordinate of the copy region's origin. + * @param {number} y - The `y` coordinate of the copy region's origin. + * @param {number} width - The width of the copy region. + * @param {number} height - The height of the copy region. + * @param {number} [textureIndex=0] - The texture index of a MRT render target. + * @param {number} [faceIndex=0] - The active cube face index. + * @return {Promise} A Promise that resolves when the read has been finished. The resolve provides the read data as a typed array. + */ + readRenderTargetPixelsAsync(renderTarget: RenderTarget, x: number, y: number, width: number, height: number, textureIndex?: number, faceIndex?: number): Promise; + /** + * Analyzes the given 3D object's hierarchy and builds render lists from the + * processed hierarchy. + * + * @private + * @param {Object3D} object - The 3D object to process (usually a scene). + * @param {Camera} camera - The camera the object is rendered with. + * @param {number} groupOrder - The group order is derived from the `renderOrder` of groups and is used to group 3D objects within groups. + * @param {RenderList} renderList - The current render list. + * @param {ClippingContext} clippingContext - The current clipping context. + */ + private _projectObject; + /** + * Renders the given render bundles. + * + * @private + * @param {Array} bundles - Array with render bundle data. + * @param {Scene} sceneRef - The scene the render bundles belong to. + * @param {LightsNode} lightsNode - The current lights node. + */ + private _renderBundles; + /** + * Renders the transparent objects from the given render lists. + * + * @private + * @param {Array} renderList - The transparent render list. + * @param {Array} doublePassList - The list of transparent objects which require a double pass (e.g. because of transmission). + * @param {Camera} camera - The camera the render list should be rendered with. + * @param {Scene} scene - The scene the render list belongs to. + * @param {LightsNode} lightsNode - The current lights node. + */ + private _renderTransparents; + /** + * Renders the objects from the given render list. + * + * @private + * @param {Array} renderList - The render list. + * @param {Camera} camera - The camera the render list should be rendered with. + * @param {Scene} scene - The scene the render list belongs to. + * @param {LightsNode} lightsNode - The current lights node. + * @param {?string} [passId=null] - An optional ID for identifying the pass. + */ + private _renderObjects; + /** + * Retrieves shadow nodes for the given material. This is used to setup shadow passes. + * The result is cached per material and updated when the material's version changes. + * + * @private + * @param {Material} material + * @returns {Object} - The shadow nodes for the material. + */ + private _getShadowNodes; + /** + * This method represents the default render object function that manages the render lifecycle + * of the object. + * + * @param {Object3D} object - The 3D object. + * @param {Scene} scene - The scene the 3D object belongs to. + * @param {Camera} camera - The camera the object should be rendered with. + * @param {BufferGeometry} geometry - The object's geometry. + * @param {Material} material - The object's material. + * @param {?Object} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. + * @param {LightsNode} lightsNode - The current lights node. + * @param {?ClippingContext} clippingContext - The clipping context. + * @param {?string} [passId=null] - An optional ID for identifying the pass. + */ + renderObject(object: Object3D, scene: Scene, camera: Camera, geometry: BufferGeometry, material: Material, group: Object | null, lightsNode: LightsNode, clippingContext?: ClippingContext | null, passId?: string | null): void; + /** + * Checks if the given compatibility is supported by the selected backend. + * + * @param {string} name - The compatibility's name. + * @return {boolean} Whether the compatibility is supported or not. + */ + hasCompatibility(name: string): boolean; + /** + * This method represents the default `_handleObjectFunction` implementation which creates + * a render object from the given data and performs the draw command with the selected backend. + * + * @private + * @param {Object3D} object - The 3D object. + * @param {Material} material - The object's material. + * @param {Scene} scene - The scene the 3D object belongs to. + * @param {Camera} camera - The camera the object should be rendered with. + * @param {LightsNode} lightsNode - The current lights node. + * @param {?{start: number, count: number}} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. + * @param {ClippingContext} clippingContext - The clipping context. + * @param {string} [passId] - An optional ID for identifying the pass. + */ + private _renderObjectDirect; + /** + * A different implementation for `_handleObjectFunction` which only makes sure the object is ready for rendering. + * Used in `compileAsync()`. + * + * @private + * @param {Object3D} object - The 3D object. + * @param {Material} material - The object's material. + * @param {Scene} scene - The scene the 3D object belongs to. + * @param {Camera} camera - The camera the object should be rendered with. + * @param {LightsNode} lightsNode - The current lights node. + * @param {?{start: number, count: number}} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. + * @param {ClippingContext} clippingContext - The clipping context. + * @param {string} [passId] - An optional ID for identifying the pass. + */ + private _createObjectPipeline; + /** + * Alias for `compileAsync()`. + * + * @method + * @param {Object3D} scene - The scene or 3D object to precompile. + * @param {Camera} camera - The camera that is used to render the scene. + * @param {Scene} targetScene - If the first argument is a 3D object, this parameter must represent the scene the 3D object is going to be added. + * @return {function(Object3D, Camera, ?Scene): Promise|undefined} A Promise that resolves when the compile has been finished. + */ + get compile(): (arg0: Object3D, arg1: Camera, arg2: Scene | null) => Promise | undefined; +} +import Info from './Info.js'; +import NodeLibrary from './nodes/NodeLibrary.js'; +import Lighting from './Lighting.js'; +import XRManager from './XRManager.js'; +import { Scene } from '../../scenes/Scene.js'; +import InspectorBase from './InspectorBase.js'; +import { Vector2 } from '../../math/Vector2.js'; +import { Vector4 } from '../../math/Vector4.js'; +import { RenderTarget } from '../../core/RenderTarget.js'; +import CanvasTarget from './CanvasTarget.js'; +import ClippingContext from './ClippingContext.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RendererUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RendererUtils.d.ts new file mode 100644 index 000000000..8809693b3 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/RendererUtils.d.ts @@ -0,0 +1,105 @@ +/** + * Saves the state of the given renderer and stores it into the given state object. + * + * If not state object is provided, the function creates one. + * + * @private + * @function + * @param {Renderer} renderer - The renderer. + * @param {Object} [state={}] - The state. + * @return {Object} The state. + */ +export function saveRendererState(renderer: Renderer, state?: Object): Object; +/** + * Saves the state of the given renderer and stores it into the given state object. + * Besides, the function also resets the state of the renderer to its default values. + * + * If not state object is provided, the function creates one. + * + * @private + * @function + * @param {Renderer} renderer - The renderer. + * @param {Object} [state={}] - The state. + * @return {Object} The state. + */ +export function resetRendererState(renderer: Renderer, state?: Object): Object; +/** + * Restores the state of the given renderer from the given state object. + * + * @private + * @function + * @param {Renderer} renderer - The renderer. + * @param {Object} state - The state to restore. + */ +export function restoreRendererState(renderer: Renderer, state: Object): void; +/** + * Saves the state of the given scene and stores it into the given state object. + * + * If not state object is provided, the function creates one. + * + * @private + * @function + * @param {Scene} scene - The scene. + * @param {Object} [state={}] - The state. + * @return {Object} The state. + */ +export function saveSceneState(scene: Scene, state?: Object): Object; +/** + * Saves the state of the given scene and stores it into the given state object. + * Besides, the function also resets the state of the scene to its default values. + * + * If not state object is provided, the function creates one. + * + * @private + * @function + * @param {Scene} scene - The scene. + * @param {Object} [state={}] - The state. + * @return {Object} The state. + */ +export function resetSceneState(scene: Scene, state?: Object): Object; +/** + * Restores the state of the given scene from the given state object. + * + * @private + * @function + * @param {Scene} scene - The scene. + * @param {Object} state - The state to restore. + */ +export function restoreSceneState(scene: Scene, state: Object): void; +/** + * Saves the state of the given renderer and scene and stores it into the given state object. + * + * If not state object is provided, the function creates one. + * + * @private + * @function + * @param {Renderer} renderer - The renderer. + * @param {Scene} scene - The scene. + * @param {Object} [state={}] - The state. + * @return {Object} The state. + */ +export function saveRendererAndSceneState(renderer: Renderer, scene: Scene, state?: Object): Object; +/** + * Saves the state of the given renderer and scene and stores it into the given state object. + * Besides, the function also resets the state of the renderer and scene to its default values. + * + * If not state object is provided, the function creates one. + * + * @private + * @function + * @param {Renderer} renderer - The renderer. + * @param {Scene} scene - The scene. + * @param {Object} [state={}] - The state. + * @return {Object} The state. + */ +export function resetRendererAndSceneState(renderer: Renderer, scene: Scene, state?: Object): Object; +/** + * Restores the state of the given renderer and scene from the given state object. + * + * @private + * @function + * @param {Renderer} renderer - The renderer. + * @param {Scene} scene - The scene. + * @param {Object} state - The state to restore. + */ +export function restoreRendererAndSceneState(renderer: Renderer, scene: Scene, state: Object): void; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/SampledTexture.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/SampledTexture.d.ts new file mode 100644 index 000000000..990534644 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/SampledTexture.d.ts @@ -0,0 +1,85 @@ +/** + * Represents a sampled texture binding type. + * + * @private + * @augments Sampler + */ +export class SampledTexture extends Sampler { + /** + * This identifier. + * + * @type {number} + */ + id: number; + /** + * Whether the texture is a storage texture or not. + * + * @type {boolean} + * @default false + */ + store: boolean; + /** + * The mip level to bind for storage textures. + * + * @type {number} + * @default 0 + */ + mipLevel: number; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSampledTexture: boolean; +} +/** + * Represents a sampled array texture binding type. + * + * @private + * @augments SampledTexture + */ +export class SampledArrayTexture extends SampledTexture { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSampledArrayTexture: boolean; +} +/** + * Represents a sampled 3D texture binding type. + * + * @private + * @augments SampledTexture + */ +export class Sampled3DTexture extends SampledTexture { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSampled3DTexture: boolean; +} +/** + * Represents a sampled cube texture binding type. + * + * @private + * @augments SampledTexture + */ +export class SampledCubeTexture extends SampledTexture { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSampledCubeTexture: boolean; +} +import Sampler from './Sampler.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Sampler.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Sampler.d.ts new file mode 100644 index 000000000..0d197829c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/Sampler.d.ts @@ -0,0 +1,76 @@ +export default Sampler; +/** + * Represents a sampler binding type. + * + * @private + * @augments Binding + */ +declare class Sampler extends Binding { + /** + * Constructs a new sampler. + * + * @param {string} name - The samplers's name. + * @param {?Texture} texture - The texture this binding is referring to. + */ + constructor(name: string, texture: Texture | null); + /** + * The texture the sampler is referring to. + * + * @private + * @type {?Texture} + */ + private _texture; + /** + * The binding's version. + * + * @type {number} + */ + version: number; + /** + * The binding's generation which is an additional version + * qualifier. + * + * @type {?number} + * @default null + */ + generation: number | null; + /** + * The binding's sampler key. + * + * @type {string} + * @default '' + */ + samplerKey: string; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSampler: boolean; + /** + * Sets the texture of this sampler. + * + * @param {Texture} value - The texture to set. + */ + set texture(value: Texture); + /** + * Gets the texture of this sampler. + * @return {?Texture} The texture. + */ + get texture(): Texture | null; + /** + * Updates the binding. + * + * @return {boolean} Whether the texture has been updated and must be + * uploaded to the GPU. + */ + update(): boolean; + /** + * Resets the version and generation. This is used when the texture + * the binding is pointing to is disposed or exchanged. + */ + reset(): void; +} +import Binding from './Binding.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Storage3DTexture.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Storage3DTexture.d.ts new file mode 100644 index 000000000..5ea5a3e6b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/Storage3DTexture.d.ts @@ -0,0 +1,52 @@ +export default Storage3DTexture; +/** + * This special type of texture is intended for compute shaders. + * It can be used to compute the data of a texture with a compute shader. + * + * Note: This type of texture can only be used with `WebGPURenderer` + * and a WebGPU backend. + * + * @augments Texture + */ +declare class Storage3DTexture extends Texture { + /** + * Constructs a new storage texture. + * + * @param {number} [width=1] - The storage texture's width. + * @param {number} [height=1] - The storage texture's height. + * @param {number} [depth=1] - The storage texture's depth. + */ + constructor(width?: number, height?: number, depth?: number); + isArrayTexture: boolean; + /** + * This defines how the texture is wrapped in the depth direction and corresponds to + * *W* in UVW mapping. + * + * @type {number} + */ + wrapR: number; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStorageTexture: boolean; + /** + * Indicates whether this texture is a 3D texture. + * + * @type {boolean} + * + */ + is3DTexture: boolean; + /** + * Sets the size of the storage 3d texture. + * + * @param {number} width - The new width of the storage texture. + * @param {number} height - The new height of the storage texture. + * @param {number} depth - The new depth of the storage texture. + */ + setSize(width: number, height: number, depth: number): void; +} +import { Texture } from '../../textures/Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/StorageArrayTexture.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/StorageArrayTexture.d.ts new file mode 100644 index 000000000..27581e2fc --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/StorageArrayTexture.d.ts @@ -0,0 +1,38 @@ +export default StorageArrayTexture; +/** + * This special type of texture is intended for compute shaders. + * It can be used to compute the data of a texture with a compute shader. + * + * Note: This type of texture can only be used with `WebGPURenderer` + * and a WebGPU backend. + * + * @augments Texture + */ +declare class StorageArrayTexture extends Texture { + /** + * Constructs a new storage texture. + * + * @param {number} [width=1] - The storage texture's width. + * @param {number} [height=1] - The storage texture's height. + * @param {number} [depth=1] - The storage texture's depth. + */ + constructor(width?: number, height?: number, depth?: number); + isArrayTexture: boolean; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStorageTexture: boolean; + /** + * Sets the size of the storage array texture. + * + * @param {number} width - The new width of the storage texture. + * @param {number} height - The new height of the storage texture. + * @param {number} depth - The new depth of the storage texture. + */ + setSize(width: number, height: number, depth: number): void; +} +import { Texture } from '../../textures/Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/StorageBuffer.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/StorageBuffer.d.ts new file mode 100644 index 000000000..d4de63398 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/StorageBuffer.d.ts @@ -0,0 +1,38 @@ +export default StorageBuffer; +/** + * Represents a storage buffer binding type. + * + * @private + * @augments Buffer + */ +declare class StorageBuffer extends Buffer { + /** + * Constructs a new uniform buffer. + * + * @param {string} name - The buffer's name. + * @param {BufferAttribute} attribute - The buffer attribute. + */ + constructor(name: string, attribute: BufferAttribute); + /** + * This flag can be used for type testing. + * + * @private + * @type {BufferAttribute} + */ + private _attribute; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStorageBuffer: boolean; + /** + * The storage buffer attribute. + * + * @type {BufferAttribute} + */ + get attribute(): BufferAttribute; +} +import Buffer from './Buffer.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/StorageBufferAttribute.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/StorageBufferAttribute.d.ts new file mode 100644 index 000000000..d53cac3dc --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/StorageBufferAttribute.d.ts @@ -0,0 +1,35 @@ +export default StorageBufferAttribute; +/** + * This special type of buffer attribute is intended for compute shaders. + * In earlier three.js versions it was only possible to update attribute data + * on the CPU via JavaScript and then upload the data to the GPU. With the + * new material system and renderer it is now possible to use compute shaders + * to compute the data for an attribute more efficiently on the GPU. + * + * The idea is to create an instance of this class and provide it as an input + * to {@link StorageBufferNode}. + * + * Note: This type of buffer attribute can only be used with `WebGPURenderer`. + * + * @augments BufferAttribute + */ +declare class StorageBufferAttribute extends BufferAttribute { + /** + * Constructs a new storage buffer attribute. + * + * @param {number|TypedArray} count - The item count. It is also valid to pass a typed array as an argument. + * The subsequent parameters are then obsolete. + * @param {number} itemSize - The item size. + * @param {TypedArray.constructor} [typeClass=Float32Array] - A typed array constructor. + */ + constructor(count: number | TypedArray, itemSize: number, typeClass?: TypedArray.constructor); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStorageBufferAttribute: boolean; +} +import { BufferAttribute } from '../../core/BufferAttribute.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/StorageInstancedBufferAttribute.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/StorageInstancedBufferAttribute.d.ts new file mode 100644 index 000000000..6f8614323 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/StorageInstancedBufferAttribute.d.ts @@ -0,0 +1,35 @@ +export default StorageInstancedBufferAttribute; +/** + * This special type of instanced buffer attribute is intended for compute shaders. + * In earlier three.js versions it was only possible to update attribute data + * on the CPU via JavaScript and then upload the data to the GPU. With the + * new material system and renderer it is now possible to use compute shaders + * to compute the data for an attribute more efficiently on the GPU. + * + * The idea is to create an instance of this class and provide it as an input + * to {@link StorageBufferNode}. + * + * Note: This type of buffer attribute can only be used with `WebGPURenderer`. + * + * @augments InstancedBufferAttribute + */ +declare class StorageInstancedBufferAttribute extends InstancedBufferAttribute { + /** + * Constructs a new storage instanced buffer attribute. + * + * @param {number|TypedArray} count - The item count. It is also valid to pass a typed array as an argument. + * The subsequent parameters are then obsolete. + * @param {number} itemSize - The item size. + * @param {TypedArray.constructor} [typeClass=Float32Array] - A typed array constructor. + */ + constructor(count: number | TypedArray, itemSize: number, typeClass?: TypedArray.constructor); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStorageInstancedBufferAttribute: boolean; +} +import { InstancedBufferAttribute } from '../../core/InstancedBufferAttribute.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/StorageTexture.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/StorageTexture.d.ts new file mode 100644 index 000000000..a369bd6e8 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/StorageTexture.d.ts @@ -0,0 +1,43 @@ +export default StorageTexture; +/** + * This special type of texture is intended for compute shaders. + * It can be used to compute the data of a texture with a compute shader. + * + * Note: This type of texture can only be used with `WebGPURenderer` + * and a WebGPU backend. + * + * @augments Texture + */ +declare class StorageTexture extends Texture { + /** + * Constructs a new storage texture. + * + * @param {number} [width=1] - The storage texture's width. + * @param {number} [height=1] - The storage texture's height. + */ + constructor(width?: number, height?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isStorageTexture: boolean; + /** + * When `true`, mipmaps will be auto-generated after compute writes. + * When `false`, mipmaps must be written manually via compute shaders. + * + * @type {boolean} + * @default true + */ + mipmapsAutoUpdate: boolean; + /** + * Sets the size of the storage texture. + * + * @param {number} width - The new width of the storage texture. + * @param {number} height - The new height of the storage texture. + */ + setSize(width: number, height: number): void; +} +import { Texture } from '../../textures/Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Textures.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Textures.d.ts new file mode 100644 index 000000000..b88fdc6a7 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/Textures.d.ts @@ -0,0 +1,117 @@ +export default Textures; +/** + * This module manages the textures of the renderer. + * + * @private + * @augments DataMap + */ +declare class Textures extends DataMap { + /** + * Constructs a new texture management component. + * + * @param {Renderer} renderer - The renderer. + * @param {Backend} backend - The renderer's backend. + * @param {Info} info - Renderer component for managing metrics and monitoring data. + */ + constructor(renderer: Renderer, backend: Backend, info: Info); + /** + * The renderer. + * + * @type {Renderer} + */ + renderer: Renderer; + /** + * The backend. + * + * @type {Backend} + */ + backend: Backend; + /** + * Renderer component for managing metrics and monitoring data. + * + * @type {Info} + */ + info: Info; + /** + * A set of HTMLTextures that need paint updates. + * + * @type {Set} + */ + _htmlTextures: Set; + /** + * Updates the given render target. Based on the given render target configuration, + * it updates the texture states representing the attachments of the framebuffer. + * + * @param {RenderTarget} renderTarget - The render target to update. + * @param {number} [activeMipmapLevel=0] - The active mipmap level. + */ + updateRenderTarget(renderTarget: RenderTarget, activeMipmapLevel?: number): void; + /** + * Updates the given texture. Depending on the texture state, this method + * triggers the upload of texture data to the GPU memory. If the texture data are + * not yet ready for the upload, it uses default texture data for as a placeholder. + * + * @param {Texture} texture - The texture to update. + * @param {Object} [options={}] - The options. + */ + updateTexture(texture: Texture, options?: Object): void; + /** + * Updates the sampler for the given texture. This method has no effect + * for the WebGL backend since it has no concept of samplers. Texture + * parameters are configured with the `texParameter()` command for each + * texture. + * + * In WebGPU, samplers are objects like textures and it's possible to share + * them when the texture parameters match. + * + * @param {Texture} texture - The texture to update the sampler for. + * @param {TextureNode} textureNode - The texture node to update the sampler with. + * @return {string} The current sampler key. + */ + updateSampler(texture: Texture, textureNode: TextureNode): string; + /** + * Computes the size of the given texture and writes the result + * into the target vector. This vector is also returned by the + * method. + * + * If no texture data are available for the compute yet, the method + * returns default size values. + * + * @param {Texture} texture - The texture to compute the size for. + * @param {Vector3} target - The target vector. + * @return {Vector3} The target vector. + */ + getSize(texture: Texture, target?: Vector3): Vector3; + /** + * Computes the number of mipmap levels for the given texture. + * + * @param {Texture} texture - The texture. + * @param {number} width - The texture's width. + * @param {number} height - The texture's height. + * @return {number} The number of mipmap levels. + */ + getMipLevels(texture: Texture, width: number, height: number): number; + /** + * Returns `true` if the given texture makes use of mipmapping. + * + * @param {Texture} texture - The texture. + * @return {boolean} Whether mipmaps are required or not. + */ + needsMipmaps(texture: Texture): boolean; + /** + * Frees internal resources when the given render target isn't + * required anymore. + * + * @param {RenderTarget} renderTarget - The render target to destroy. + */ + _destroyRenderTarget(renderTarget: RenderTarget): void; + /** + * Frees internal resource when the given texture isn't + * required anymore. + * + * @param {Texture} texture - The texture to destroy. + */ + _destroyTexture(texture: Texture): void; +} +import DataMap from './DataMap.js'; +import { Vector3 } from '../../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/TimestampQueryPool.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/TimestampQueryPool.d.ts new file mode 100644 index 000000000..82eedbdd9 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/TimestampQueryPool.d.ts @@ -0,0 +1,119 @@ +export default TimestampQueryPool; +/** + * Abstract base class of a timestamp query pool. + * + * @abstract + */ +declare class TimestampQueryPool { + /** + * Creates a new timestamp query pool. + * + * @param {number} [maxQueries=256] - Maximum number of queries this pool can hold. + */ + constructor(maxQueries?: number); + /** + * Whether to track timestamps or not. + * + * @type {boolean} + * @default true + */ + trackTimestamp: boolean; + /** + * Maximum number of queries this pool can hold. + * + * @type {number} + * @default 256 + */ + maxQueries: number; + /** + * How many queries allocated so far. + * + * @type {number} + * @default 0 + */ + currentQueryIndex: number; + /** + * Tracks offsets for different contexts. + * + * @type {Map} + */ + queryOffsets: Map; + /** + * Whether the pool has been disposed or not. + * + * @type {boolean} + * @default false + */ + isDisposed: boolean; + /** + * The total frame duration until the next update. + * + * @type {number} + * @default 0 + */ + lastValue: number; + /** + * Stores all timestamp frames. + * + * @type {Array} + */ + frames: Array; + /** + * This property is used to avoid multiple concurrent resolve operations. + * The WebGL backend uses it as a boolean flag. In context of WebGPU, it holds + * the promise of the current resolve operation. + * + * @type {boolean|Promise} + * @default false + */ + pendingResolve: boolean | Promise; + /** + * Stores the latest timestamp for each render context. + * + * @type {Map} + */ + timestamps: Map; + /** + * Returns all timestamp frames. + * + * @return {Array} The timestamp frames. + */ + getTimestampFrames(): Array; + /** + * Returns the timestamp for a given render context. + * + * @param {string} uid - A unique identifier for the render context. + * @return {?number} The timestamp, or undefined if not available. + */ + getTimestamp(uid: string): number | null; + /** + * Returns whether a timestamp is available for a given render context. + * + * @param {string} uid - A unique identifier for the render context. + * @return {boolean} True if a timestamp is available, false otherwise. + */ + hasTimestamp(uid: string): boolean; + /** + * Allocate queries for a specific uid. + * + * @abstract + * @param {string} uid - A unique identifier for the render context. + * @param {number} frameId - The current frame identifier. + * @returns {?number} + */ + allocateQueriesForContext(): number | null; + /** + * Resolve all timestamps and return data (or process them). + * + * @abstract + * @async + * @returns {Promise|number} The resolved timestamp value. + */ + resolveQueriesAsync(): Promise | number; + /** + * Dispose of the query pool. + * + * @abstract + */ + dispose(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Uniform.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Uniform.d.ts new file mode 100644 index 000000000..d8d107299 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/Uniform.d.ts @@ -0,0 +1,260 @@ +/** + * Represents a Number uniform. + * + * @private + * @augments Uniform + */ +export class NumberUniform extends Uniform { + /** + * Constructs a new Number uniform. + * + * @param {string} name - The uniform's name. + * @param {number} value - The uniform's value. + */ + constructor(name: string, value?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isNumberUniform: boolean; +} +/** + * Represents a Vector2 uniform. + * + * @private + * @augments Uniform + */ +export class Vector2Uniform extends Uniform { + /** + * Constructs a new Number uniform. + * + * @param {string} name - The uniform's name. + * @param {Vector2} value - The uniform's value. + */ + constructor(name: string, value?: Vector2); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isVector2Uniform: boolean; +} +/** + * Represents a Vector3 uniform. + * + * @private + * @augments Uniform + */ +export class Vector3Uniform extends Uniform { + /** + * Constructs a new Number uniform. + * + * @param {string} name - The uniform's name. + * @param {Vector3} value - The uniform's value. + */ + constructor(name: string, value?: Vector3); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isVector3Uniform: boolean; +} +/** + * Represents a Vector4 uniform. + * + * @private + * @augments Uniform + */ +export class Vector4Uniform extends Uniform { + /** + * Constructs a new Number uniform. + * + * @param {string} name - The uniform's name. + * @param {Vector4} value - The uniform's value. + */ + constructor(name: string, value?: Vector4); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isVector4Uniform: boolean; +} +/** + * Represents a Color uniform. + * + * @private + * @augments Uniform + */ +export class ColorUniform extends Uniform { + /** + * Constructs a new Number uniform. + * + * @param {string} name - The uniform's name. + * @param {Color} value - The uniform's value. + */ + constructor(name: string, value?: Color); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isColorUniform: boolean; +} +/** + * Represents a Matrix2 uniform. + * + * @private + * @augments Uniform + */ +export class Matrix2Uniform extends Uniform { + /** + * Constructs a new Number uniform. + * + * @param {string} name - The uniform's name. + * @param {Matrix2} value - The uniform's value. + */ + constructor(name: string, value?: Matrix2); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMatrix2Uniform: boolean; +} +/** + * Represents a Matrix3 uniform. + * + * @private + * @augments Uniform + */ +export class Matrix3Uniform extends Uniform { + /** + * Constructs a new Number uniform. + * + * @param {string} name - The uniform's name. + * @param {Matrix3} value - The uniform's value. + */ + constructor(name: string, value?: Matrix3); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMatrix3Uniform: boolean; +} +/** + * Represents a Matrix4 uniform. + * + * @private + * @augments Uniform + */ +export class Matrix4Uniform extends Uniform { + /** + * Constructs a new Number uniform. + * + * @param {string} name - The uniform's name. + * @param {Matrix4} value - The uniform's value. + */ + constructor(name: string, value?: Matrix4); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isMatrix4Uniform: boolean; +} +/** + * Abstract base class for uniforms. + * + * @abstract + * @private + */ +declare class Uniform { + /** + * Constructs a new uniform. + * + * @param {string} name - The uniform's name. + * @param {any} value - The uniform's value. + */ + constructor(name: string, value: any); + /** + * The uniform's name. + * + * @type {string} + */ + name: string; + /** + * The uniform's value. + * + * @type {any} + */ + value: any; + /** + * Used to build the uniform buffer according to the STD140 layout. + * Derived uniforms will set this property to a data type specific + * value. + * + * @type {number} + */ + boundary: number; + /** + * The item size. Derived uniforms will set this property to a data + * type specific value. + * + * @type {number} + */ + itemSize: number; + /** + * This property is set by {@link UniformsGroup} and marks + * the start position in the uniform buffer. + * + * @type {number} + */ + offset: number; + /** + * This property is set by {@link UniformsGroup} and marks + * the index position in the uniform array. + * + * @type {number} + */ + index: number; + /** + * Sets the uniform's value. + * + * @param {any} value - The value to set. + */ + setValue(value: any): void; + /** + * Returns the uniform's value. + * + * @return {any} The value. + */ + getValue(): any; +} +import { Vector2 } from '../../math/Vector2.js'; +import { Vector3 } from '../../math/Vector3.js'; +import { Vector4 } from '../../math/Vector4.js'; +import { Color } from '../../math/Color.js'; +import { Matrix2 } from '../../math/Matrix2.js'; +import { Matrix3 } from '../../math/Matrix3.js'; +import { Matrix4 } from '../../math/Matrix4.js'; +export {}; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/UniformBuffer.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/UniformBuffer.d.ts new file mode 100644 index 000000000..15af25d88 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/UniformBuffer.d.ts @@ -0,0 +1,18 @@ +export default UniformBuffer; +/** + * Represents a uniform buffer binding type. + * + * @private + * @augments Buffer + */ +declare class UniformBuffer extends Buffer { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isUniformBuffer: boolean; +} +import Buffer from './Buffer.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/UniformsGroup.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/UniformsGroup.d.ts new file mode 100644 index 000000000..8990101e7 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/UniformsGroup.d.ts @@ -0,0 +1,147 @@ +export default UniformsGroup; +/** + * This class represents a uniform buffer binding but with + * an API that allows to maintain individual uniform objects. + * + * @private + * @augments UniformBuffer + */ +declare class UniformsGroup extends UniformBuffer { + /** + * Constructs a new uniforms group. + * + * @param {string} name - The group's name. + */ + constructor(name: string); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isUniformsGroup: boolean; + /** + * An array with the raw uniform values. + * + * @private + * @type {?Array} + * @default null + */ + private _values; + /** + * An array of uniform objects. + * + * The order of uniforms in this array must match the order of uniforms in the shader. + * + * @type {Array} + */ + uniforms: Array; + /** + * A cache for the uniform update ranges. + * + * @private + * @type {Map} + */ + private _updateRangeCache; + /** + * Uniform indices whose range has already been pushed into `updateRanges` + * during the current update cycle. Reset on `clearUpdateRanges()`. + * + * @private + * @type {Set} + */ + private _addedIndices; + /** + * Adds a uniform's update range to this buffer. + * + * @param {Uniform} uniform - The uniform. + */ + addUniformUpdateRange(uniform: Uniform): void; + /** + * Adds a uniform to this group. + * + * @param {Uniform} uniform - The uniform to add. + * @return {UniformsGroup} A reference to this group. + */ + addUniform(uniform: Uniform): UniformsGroup; + /** + * Removes a uniform from this group. + * + * @param {Uniform} uniform - The uniform to remove. + * @return {UniformsGroup} A reference to this group. + */ + removeUniform(uniform: Uniform): UniformsGroup; + /** + * An array with the raw uniform values. + * + * @type {Array} + */ + get values(): Array; + /** + * Updates a given uniform by calling an update method matching + * the uniforms type. + * + * @param {Uniform} uniform - The uniform to update. + * @return {boolean} Whether the uniform has been updated or not. + */ + updateByType(uniform: Uniform): boolean; + /** + * Updates a given Number uniform. + * + * @param {NumberUniform} uniform - The Number uniform. + * @return {boolean} Whether the uniform has been updated or not. + */ + updateNumber(uniform: NumberUniform): boolean; + /** + * Updates a given Vector2 uniform. + * + * @param {Vector2Uniform} uniform - The Vector2 uniform. + * @return {boolean} Whether the uniform has been updated or not. + */ + updateVector2(uniform: Vector2Uniform): boolean; + /** + * Updates a given Vector3 uniform. + * + * @param {Vector3Uniform} uniform - The Vector3 uniform. + * @return {boolean} Whether the uniform has been updated or not. + */ + updateVector3(uniform: Vector3Uniform): boolean; + /** + * Updates a given Vector4 uniform. + * + * @param {Vector4Uniform} uniform - The Vector4 uniform. + * @return {boolean} Whether the uniform has been updated or not. + */ + updateVector4(uniform: Vector4Uniform): boolean; + /** + * Updates a given Color uniform. + * + * @param {ColorUniform} uniform - The Color uniform. + * @return {boolean} Whether the uniform has been updated or not. + */ + updateColor(uniform: ColorUniform): boolean; + /** + * Updates a given Matrix3 uniform. + * + * @param {Matrix3Uniform} uniform - The Matrix3 uniform. + * @return {boolean} Whether the uniform has been updated or not. + */ + updateMatrix3(uniform: Matrix3Uniform): boolean; + /** + * Updates a given Matrix4 uniform. + * + * @param {Matrix4Uniform} uniform - The Matrix4 uniform. + * @return {boolean} Whether the uniform has been updated or not. + */ + updateMatrix4(uniform: Matrix4Uniform): boolean; + /** + * Returns a typed array that matches the given data type. + * + * @private + * @param {string} type - The data type. + * @return {TypedArray} The typed array. + */ + private _getBufferForType; +} +import UniformBuffer from './UniformBuffer.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/XRManager.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/XRManager.d.ts new file mode 100644 index 000000000..8581c09f6 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/XRManager.d.ts @@ -0,0 +1,596 @@ +export default XRManager; +/** + * The XR manager is built on top of the WebXR Device API to + * manage XR sessions with renderer backends. + * + * @augments EventDispatcher + */ +declare class XRManager extends EventDispatcher { + /** + * Constructs a new XR manager. + * + * @param {Renderer} renderer - The renderer. + * @param {boolean} [multiview=false] - Enables multiview if the device supports it. + */ + constructor(renderer: Renderer, multiview?: boolean); + /** + * This flag globally enables XR rendering. + * + * @type {boolean} + * @default false + */ + enabled: boolean; + /** + * Whether the XR device is currently presenting or not. + * + * @type {boolean} + * @default false + * @readonly + */ + readonly isPresenting: boolean; + /** + * Whether the XR camera should automatically be updated or not. + * + * @type {boolean} + * @default true + */ + cameraAutoUpdate: boolean; + /** + * The renderer. + * + * @private + * @type {Renderer} + */ + private _renderer; + /** + * Represents the camera for the left eye. + * + * @private + * @type {PerspectiveCamera} + */ + private _cameraL; + /** + * Represents the camera for the right eye. + * + * @private + * @type {PerspectiveCamera} + */ + private _cameraR; + /** + * A list of cameras used for rendering the XR views. + * + * @private + * @type {Array} + */ + private _cameras; + /** + * The main XR camera. + * + * @private + * @type {ArrayCamera} + */ + private _cameraXR; + /** + * The current near value of the XR camera. + * + * @private + * @type {?number} + * @default null + */ + private _currentDepthNear; + /** + * The current far value of the XR camera. + * + * @private + * @type {?number} + * @default null + */ + private _currentDepthFar; + /** + * A list of WebXR controllers requested by the application. + * + * @private + * @type {Array} + */ + private _controllers; + /** + * A list of XR input source. Each input source belongs to + * an instance of WebXRController. + * + * @private + * @type {Array} + */ + private _controllerInputSources; + /** + * The XR render target that represents the rendering destination + * during an active XR session. + * + * @private + * @type {?RenderTarget} + * @default null + */ + private _xrRenderTarget; + /** + * An array holding all the non-projection layers + * + * @private + * @type {Array} + * @default [] + */ + private _layers; + /** + * Whether the XR session uses layers. + * + * @private + * @type {boolean} + * @default false + */ + private _sessionUsesLayers; + /** + * Whether the device supports binding gl objects. + * + * @private + * @type {boolean} + * @readonly + */ + private readonly _supportsGlBinding; + _supportsWebGPUBinding: boolean; + /** + * Helper function to create native WebXR Layer. + * + * @private + * @type {Function} + */ + private _createXRLayer; + /** + * The current WebGL context. + * + * @private + * @type {?WebGL2RenderingContext} + * @default null + */ + private _gl; + /** + * The current animation context. + * + * @private + * @type {?Window} + * @default null + */ + private _currentAnimationContext; + /** + * The current animation loop. + * + * @private + * @type {?Function} + * @default null + */ + private _currentAnimationLoop; + /** + * The current pixel ratio. + * + * @private + * @type {?number} + * @default null + */ + private _currentPixelRatio; + /** + * The renderer's sample count before XR temporarily overrides it. + * + * @private + * @type {?number} + * @default null + */ + private _currentSamples; + /** + * The current size of the renderer's canvas + * in logical pixel unit. + * + * @private + * @type {Vector2} + */ + private _currentSize; + /** + * The default event listener for handling events inside a XR session. + * + * @private + * @type {Function} + */ + private _onSessionEvent; + /** + * The event listener for handling the end of a XR session. + * + * @private + * @type {Function} + */ + private _onSessionEnd; + /** + * The event listener for handling the `inputsourceschange` event. + * + * @private + * @type {Function} + */ + private _onInputSourcesChange; + /** + * The animation loop which is used as a replacement for the default + * animation loop of the application. It is only used when a XR session + * is active. + * + * @private + * @type {Function} + */ + private _onAnimationFrame; + /** + * The current XR reference space. + * + * @private + * @type {?XRReferenceSpace} + * @default null + */ + private _referenceSpace; + /** + * The current XR reference space type. + * + * @private + * @type {XRReferenceSpaceType} + * @default 'local-floor' + */ + private _referenceSpaceType; + /** + * A custom reference space defined by the application. + * + * @private + * @type {?XRReferenceSpace} + * @default null + */ + private _customReferenceSpace; + /** + * The framebuffer scale factor. + * + * @private + * @type {number} + * @default 1 + */ + private _framebufferScaleFactor; + /** + * The foveation factor. + * + * @private + * @type {number} + * @default 1 + */ + private _foveation; + /** + * A reference to the current XR session. + * + * @private + * @type {?XRSession} + * @default null + */ + private _session; + /** + * A reference to the current XR base layer. + * + * @private + * @type {?XRWebGLLayer} + * @default null + */ + private _glBaseLayer; + /** + * A reference to the current XR binding. + * + * @private + * @type {?XRWebGLBinding} + * @default null + */ + private _glBinding; + /** + * A reference to the current XR WebGPU binding. + * + * @private + * @type {?XRGPUBinding} + * @default null + */ + private _webgpuBinding; + /** + * A reference to the current XR projection layer. + * + * @private + * @type {?XRProjectionLayer} + * @default null + */ + private _glProjLayer; + /** + * A reference to the current XR frame. + * + * @private + * @type {?XRFrame} + * @default null + */ + private _xrFrame; + /** + * Whether the browser supports the APIs necessary to use XRProjectionLayers. + * + * Note: this does not represent XRSession explicitly requesting + * `'layers'` as a feature - see `_sessionUsesLayers` and #30112 + * + * @private + * @type {boolean} + * @readonly + */ + private readonly _supportsLayers; + /** + * Whether the usage of multiview has been requested by the application or not. + * + * @private + * @type {boolean} + * @default false + * @readonly + */ + private readonly _useMultiviewIfPossible; + /** + * Whether the usage of multiview is actually enabled. This flag only evaluates to `true` + * if multiview has been requested by the application and the `OVR_multiview2` is available. + * + * @private + * @type {boolean} + * @readonly + */ + private readonly _useMultiview; + /** + * Returns an instance of `THREE.Group` that represents the transformation + * of a XR controller in target ray space. The requested controller is defined + * by the given index. + * + * @param {number} index - The index of the XR controller. + * @return {Group} A group that represents the controller's transformation. + */ + getController(index: number): Group; + /** + * Returns an instance of `THREE.Group` that represents the transformation + * of a XR controller in grip space. The requested controller is defined + * by the given index. + * + * @param {number} index - The index of the XR controller. + * @return {Group} A group that represents the controller's transformation. + */ + getControllerGrip(index: number): Group; + /** + * Returns an instance of `THREE.Group` that represents the transformation + * of a XR controller in hand space. The requested controller is defined + * by the given index. + * + * @param {number} index - The index of the XR controller. + * @return {Group} A group that represents the controller's transformation. + */ + getHand(index: number): Group; + /** + * Returns the foveation value. + * + * @return {number|undefined} The foveation value. + */ + getFoveation(): number | undefined; + /** + * Sets the foveation value. + * + * @param {number} foveation - A number in the range `[0,1]` where `0` means no foveation (full resolution) + * and `1` means maximum foveation (the edges render at lower resolution). + */ + setFoveation(foveation: number): void; + /** + * Returns the framebuffer scale factor. + * + * @return {number} The framebuffer scale factor. + */ + getFramebufferScaleFactor(): number; + /** + * Sets the framebuffer scale factor. + * + * This method can not be used during a XR session. + * + * @param {number} factor - The framebuffer scale factor. + */ + setFramebufferScaleFactor(factor: number): void; + /** + * Returns the reference space type. + * + * @return {XRReferenceSpaceType} The reference space type. + */ + getReferenceSpaceType(): XRReferenceSpaceType; + /** + * Sets the reference space type. + * + * This method can not be used during a XR session. + * + * @param {XRReferenceSpaceType} type - The reference space type. + */ + setReferenceSpaceType(type: XRReferenceSpaceType): void; + /** + * Returns the XR reference space. + * + * @return {XRReferenceSpace} The XR reference space. + */ + getReferenceSpace(): XRReferenceSpace; + /** + * Sets a custom XR reference space. + * + * @param {XRReferenceSpace} space - The XR reference space. + */ + setReferenceSpace(space: XRReferenceSpace): void; + /** + * Returns the XR camera. + * + * @return {ArrayCamera} The XR camera. + */ + getCamera(): ArrayCamera; + /** + * Returns the environment blend mode from the current XR session. + * + * @return {'opaque'|'additive'|'alpha-blend'|undefined} The environment blend mode. Returns `undefined` when used outside of a XR session. + */ + getEnvironmentBlendMode(): "opaque" | "additive" | "alpha-blend" | undefined; + /** + * Returns the current base layer. + * + * This is an `XRProjectionLayer` when the targeted XR device supports the + * WebXR Layers API, or an `XRWebGLLayer` otherwise. + * + * @return {?(XRWebGLLayer|XRProjectionLayer)} The XR base layer. + */ + getBaseLayer(): (XRWebGLLayer | XRProjectionLayer) | null; + /** + * Returns the current XR binding. + * + * Creates a new binding if needed and the browser is + * capable of doing so. + * + * @return {?XRWebGLBinding} The XR binding. Returns `null` if one cannot be created. + */ + getBinding(): XRWebGLBinding | null; + /** + * Applies WebXR fixed foveation to the internal post-processing render target + * used by the first XR render pass before compositing into a projection layer. + * + * Browser-side `XRWebGLBinding.foveateBoundTexture()` failures are treated as + * non-fatal so they do not interrupt rendering. + * + * @param {RenderTarget} renderTarget - The internal render target. + */ + foveateBoundTexture(renderTarget: RenderTarget): void; + /** + * Returns the current XR WebGPU binding. + * + * Creates a new binding if needed and the browser is + * capable of doing so. + * + * @return {?XRGPUBinding} The XR WebGPU binding. Returns `null` if one cannot be created. + */ + getWebGPUBinding(): XRGPUBinding | null; + /** + * Returns whether the current XR session is using WebGPU. + * + * @private + * @return {boolean} Whether the current session uses the WebGPU backend and the `webgpu` session feature. + */ + private _isWebGPUSession; + /** + * Validates the current WebGPU XR session requirements. + * + * @private + */ + private _validateWebGPUSession; + /** + * Initializes the WebGPU XR projection layer and render target. + * + * @private + * @async + * @param {XRSession} session - The XR session. + * @return {Promise} + */ + private _initWebGPUSession; + /** + * Releases WebGPU XR resources associated with the current session. + * + * @private + */ + private _disposeWebGPUSession; + /** + * Collects WebGPU XR sub-image data for the current frame. + * + * @private + * @param {Array} views - The XR views for the current pose. + * @return {{colorTexture:?GPUTexture, viewDescriptors:Array, viewports:Array}} The WebGPU XR view data. + */ + private _getWebGPUViewData; + /** + * Returns the current XR frame. + * + * @return {?XRFrame} The XR frame. Returns `null` when used outside a XR session. + */ + getFrame(): XRFrame | null; + /** + * Returns `true` if the engine renders to a multiview target. + * + * @return {boolean} Whether the engine renders to a multiview render target or not. + */ + useMultiview(): boolean; + /** + * This method can be used in XR applications to create a quadratic layer that presents a separate + * rendered scene. + * + * @param {number} width - The width of the layer plane in world units. + * @param {number} height - The height of the layer plane in world units. + * @param {Vector3} translation - The position/translation of the layer plane in world units. + * @param {Quaternion} quaternion - The orientation of the layer plane expressed as a quaternion. + * @param {number} pixelwidth - The width of the layer's render target in pixels. + * @param {number} pixelheight - The height of the layer's render target in pixels. + * @param {Function} rendercall - A callback function that renders the layer. Similar to code in + * the default animation loop, this method can be used to update/transform 3D object in the layer's scene. + * @param {Object} [attributes={}] - Allows to configure the layer's render target. + * @return {Mesh} A mesh representing the quadratic XR layer. This mesh should be added to the XR scene. + */ + createQuadLayer(width: number, height: number, translation: Vector3, quaternion: Quaternion, pixelwidth: number, pixelheight: number, rendercall: Function, attributes?: Object): Mesh; + /** + * This method can be used in XR applications to create a cylindrical layer that presents a separate + * rendered scene. + * + * @param {number} radius - The radius of the cylinder in world units. + * @param {number} centralAngle - The central angle of the cylinder in radians. + * @param {number} aspectratio - The aspect ratio. + * @param {Vector3} translation - The position/translation of the layer plane in world units. + * @param {Quaternion} quaternion - The orientation of the layer plane expressed as a quaternion. + * @param {number} pixelwidth - The width of the layer's render target in pixels. + * @param {number} pixelheight - The height of the layer's render target in pixels. + * @param {Function} rendercall - A callback function that renders the layer. Similar to code in + * the default animation loop, this method can be used to update/transform 3D object in the layer's scene. + * @param {Object} [attributes={}] - Allows to configure the layer's render target. + * @return {Mesh} A mesh representing the cylindrical XR layer. This mesh should be added to the XR scene. + */ + createCylinderLayer(radius: number, centralAngle: number, aspectratio: number, translation: Vector3, quaternion: Quaternion, pixelwidth: number, pixelheight: number, rendercall: Function, attributes?: Object): Mesh; + /** + * Renders the XR layers that have been previously added to the scene. + * + * This method is usually called in your animation loop before rendering + * the actual scene via `renderer.render( scene, camera );`. + */ + renderLayers(): void; + /** + * Returns the current XR session. + * + * @return {?XRSession} The XR session. Returns `null` when used outside a XR session. + */ + getSession(): XRSession | null; + /** + * After a XR session has been requested usually with one of the `*Button` modules, it + * is injected into the renderer with this method. This method triggers the start of + * the actual XR rendering. + * + * @async + * @param {XRSession} session - The XR session to set. + * @return {Promise} A Promise that resolves when the session has been set. + */ + setSession(session: XRSession): Promise; + /** + * This method is called by the renderer per frame and updates the XR camera + * and it sub cameras based on the given camera. The given camera is the "user" + * camera created on application level and used for non-XR rendering. + * + * @param {PerspectiveCamera} camera - The camera. + */ + updateCamera(camera: PerspectiveCamera): void; + /** + * Returns a WebXR controller for the given controller index. + * + * @private + * @param {number} index - The controller index. + * @return {WebXRController} The XR controller. + */ + private _getController; +} +import { EventDispatcher } from '../../core/EventDispatcher.js'; +import { ArrayCamera } from '../../cameras/ArrayCamera.js'; +import { RenderTarget } from '../../core/RenderTarget.js'; +import { Vector3 } from '../../math/Vector3.js'; +import { Quaternion } from '../../math/Quaternion.js'; +import { Mesh } from '../../objects/Mesh.js'; +import { PerspectiveCamera } from '../../cameras/PerspectiveCamera.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/XRRenderTarget.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/XRRenderTarget.d.ts new file mode 100644 index 000000000..e397d7c26 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/XRRenderTarget.d.ts @@ -0,0 +1,66 @@ +/** + * A special type of render target that is used when rendering + * with the WebXR Device API. + * + * @private + * @augments RenderTarget + */ +export class XRRenderTarget extends RenderTarget { + /** + * Constructs a new XR render target. + * + * @param {number} [width=1] - The width of the render target. + * @param {number} [height=1] - The height of the render target. + * @param {Object} [options={}] - The configuration options. + */ + constructor(width?: number, height?: number, options?: Object); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isXRRenderTarget: boolean; + /** + * Whether the attachments of the render target + * are defined by external textures. This flag is + * set to `true` when using the WebXR Layers API. + * + * @private + * @type {boolean} + * @default false + */ + private _hasExternalTextures; + /** + * Whether a depth buffer should automatically be allocated + * for this XR render target or not. + * + * Allocating a depth buffer is the default behavior of XR render + * targets. However, when using the WebXR Layers API, this flag + * must be set to `false` when the `ignoreDepthValues` property of + * the projection layers evaluates to `false`. + * + * Reference: {@link https://www.w3.org/TR/webxrlayers-1/#dom-xrprojectionlayer-ignoredepthvalues}. + * + * @private + * @type {boolean} + * @default true + */ + private _autoAllocateDepthBuffer; + /** + * Whether this render target is associated with a XRWebGLLayer. + * + * A XRWebGLLayer points to an opaque framebuffer. Basically, + * this means that you don't have access to its bound color, + * stencil and depth buffers. We need to handle this framebuffer + * differently since its textures are always bound. + * + * @private + * @type {boolean} + * @default false + * */ + private _isOpaqueFramebuffer; + copy(source: any): this; +} +import { RenderTarget } from '../../core/RenderTarget.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/extras/PMREMGenerator.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/extras/PMREMGenerator.d.ts new file mode 100644 index 000000000..f288b2e6f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/extras/PMREMGenerator.d.ts @@ -0,0 +1,198 @@ +export default PMREMGenerator; +/** + * This class generates a Prefiltered, Mipmapped Radiance Environment Map + * (PMREM) from a cubeMap environment texture. This allows different levels of + * blur to be quickly accessed based on material roughness. It is packed into a + * special CubeUV format that allows us to perform custom interpolation so that + * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap + * chain, it only goes down to the LOD_MIN level (above), and then creates extra + * even more filtered 'mips' at the same LOD_MIN resolution, associated with + * higher roughness levels. In this way we maintain resolution to smoothly + * interpolate diffuse lighting while limiting sampling computation. + * + * The prefiltering uses GGX VNDF (Visible Normal Distribution Function) + * importance sampling based on "Sampling the GGX Distribution of Visible Normals" + * (Heitz, 2018) to generate environment maps that accurately match the GGX BRDF + * used in material rendering for physically-based image-based lighting. + */ +declare class PMREMGenerator { + /** + * Constructs a new PMREM generator. + * + * @param {Renderer} renderer - The renderer. + */ + constructor(renderer: Renderer); + _renderer: Renderer; + _pingPongRenderTarget: RenderTarget | null; + _lodMax: number; + _cubeSize: number; + _sizeLods: any[]; + _sigmas: any[]; + _lodMeshes: any[]; + _blurMaterial: NodeMaterial | null; + _ggxMaterial: NodeMaterial | null; + _cubemapMaterial: NodeMaterial | null; + _equirectMaterial: NodeMaterial | null; + _backgroundBox: Mesh | null; + get _hasInitialized(): any; + /** + * Generates a PMREM from a supplied Scene, which can be faster than using an + * image if networking bandwidth is low. Optional sigma specifies a blur radius + * in radians to be applied to the scene before PMREM generation. Optional near + * and far planes ensure the scene is rendered in its entirety. + * + * @param {Scene} scene - The scene to be captured. + * @param {number} [sigma=0] - The blur radius in radians. + * @param {number} [near=0.1] - The near plane distance. + * @param {number} [far=100] - The far plane distance. + * @param {Object} [options={}] - The configuration options. + * @param {number} [options.size=256] - The texture size of the PMREM. + * @param {Vector3} [options.renderTarget=origin] - The position of the internal cube camera that renders the scene. + * @param {?RenderTarget} [options.renderTarget=null] - The render target to use. + * @return {RenderTarget} The resulting PMREM. + * @see {@link PMREMGenerator#fromScene} + */ + fromScene(scene: Scene, sigma?: number, near?: number, far?: number, options?: { + size?: number | undefined; + renderTarget?: Vector3 | undefined; + renderTarget?: Vector3 | undefined; + }): RenderTarget; + /** + * Generates a PMREM from a supplied Scene, which can be faster than using an + * image if networking bandwidth is low. Optional sigma specifies a blur radius + * in radians to be applied to the scene before PMREM generation. Optional near + * and far planes ensure the scene is rendered in its entirety (the cubeCamera + * is placed at the origin). + * + * @deprecated + * @param {Scene} scene - The scene to be captured. + * @param {number} [sigma=0] - The blur radius in radians. + * @param {number} [near=0.1] - The near plane distance. + * @param {number} [far=100] - The far plane distance. + * @param {Object} [options={}] - The configuration options. + * @param {number} [options.size=256] - The texture size of the PMREM. + * @param {Vector3} [options.position=origin] - The position of the internal cube camera that renders the scene. + * @param {?RenderTarget} [options.renderTarget=null] - The render target to use. + * @return {Promise} A Promise that resolve with the PMREM when the generation has been finished. + * @see {@link PMREMGenerator#fromScene} + */ + fromSceneAsync(scene: Scene, sigma?: number, near?: number, far?: number, options?: { + size?: number | undefined; + position?: Vector3 | undefined; + renderTarget?: RenderTarget | null | undefined; + }): Promise; + /** + * Generates a PMREM from an equirectangular texture, which can be either LDR + * or HDR. The ideal input image size is 1k (1024 x 512), as this matches best + * with the 256 x 256 cubemap output. The minimum supported input image size + * is 64 x 32. + * + * @param {Texture} equirectangular - The equirectangular texture to be converted. + * @param {?RenderTarget} [renderTarget=null] - The render target to use. + * @return {RenderTarget} The resulting PMREM. + * @see {@link PMREMGenerator#fromEquirectangularAsync} + */ + fromEquirectangular(equirectangular: Texture, renderTarget?: RenderTarget | null): RenderTarget; + /** + * Generates a PMREM from an equirectangular texture, which can be either LDR + * or HDR. The ideal input image size is 1k (1024 x 512), + * as this matches best with the 256 x 256 cubemap output. + * + * @deprecated + * @param {Texture} equirectangular - The equirectangular texture to be converted. + * @param {?RenderTarget} [renderTarget=null] - The render target to use. + * @return {Promise} The resulting PMREM. + * @see {@link PMREMGenerator#fromEquirectangular} + */ + fromEquirectangularAsync(equirectangular: Texture, renderTarget?: RenderTarget | null): Promise; + /** + * Generates a PMREM from an cubemap texture, which can be either LDR + * or HDR. The ideal input cube size is 256 x 256, as this matches best + * with the 256 x 256 cubemap output. The minimum supported input cube + * size is 16 x 16 per face. + * + * @param {Texture} cubemap - The cubemap texture to be converted. + * @param {?RenderTarget} [renderTarget=null] - The render target to use. + * @return {RenderTarget} The resulting PMREM. + * @see {@link PMREMGenerator#fromCubemapAsync} + */ + fromCubemap(cubemap: Texture, renderTarget?: RenderTarget | null): RenderTarget; + /** + * Generates a PMREM from an cubemap texture, which can be either LDR + * or HDR. The ideal input cube size is 256 x 256, + * with the 256 x 256 cubemap output. + * + * @deprecated + * @param {Texture} cubemap - The cubemap texture to be converted. + * @param {?RenderTarget} [renderTarget=null] - The render target to use. + * @return {Promise} The resulting PMREM. + * @see {@link PMREMGenerator#fromCubemap} + */ + fromCubemapAsync(cubemap: Texture, renderTarget?: RenderTarget | null): Promise; + /** + * Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during + * your texture's network fetch for increased concurrency. + * + * @returns {Promise} + */ + compileCubemapShader(): Promise; + /** + * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during + * your texture's network fetch for increased concurrency. + * + * @returns {Promise} + */ + compileEquirectangularShader(): Promise; + /** + * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class, + * so you should not need more than one PMREMGenerator object. If you do, calling dispose() on + * one of them will cause any others to also become unusable. + */ + dispose(): void; + _setSizeFromTexture(texture: any): void; + _setSize(cubeSize: any): void; + _dispose(): void; + _cleanup(outputTarget: any): void; + _fromTexture(texture: any, renderTarget: any): any; + _allocateTarget(depthBuffer: any): RenderTarget; + _init(renderTarget: any): void; + _compileMaterial(material: any): Promise; + _sceneToCubeUV(scene: any, near: any, far: any, cubeUVRenderTarget: any, position: any): void; + _textureToCubeUV(texture: any, cubeUVRenderTarget: any): void; + _applyPMREM(cubeUVRenderTarget: any): void; + /** + * Applies GGX VNDF importance sampling filter to generate a prefiltered environment map. + * Uses Monte Carlo integration with VNDF importance sampling to accurately represent the + * GGX BRDF for physically-based rendering. Reads from the previous LOD level and + * applies incremental roughness filtering to avoid over-blurring. + * + * @private + * @param {RenderTarget} cubeUVRenderTarget + * @param {number} lodIn - Source LOD level to read from + * @param {number} lodOut - Target LOD level to write to + */ + private _applyGGXFilter; + /** + * This is a two-pass Gaussian blur for a cubemap. Normally this is done + * vertically and horizontally, but this breaks down on a cube. Here we apply + * the blur latitudinally (around the poles), and then longitudinally (towards + * the poles) to approximate the orthogonally-separable blur. It is least + * accurate at the poles, but still does a decent job. + * + * Used for initial scene blur in fromScene() method when sigma > 0. + * + * @private + * @param {RenderTarget} cubeUVRenderTarget - The cubemap render target. + * @param {number} lodIn - The input level-of-detail. + * @param {number} lodOut - The output level-of-detail. + * @param {number} sigma - The blur radius in radians. + * @param {Vector3} [poleAxis] - The pole axis. + */ + private _blur; + _halfBlur(targetIn: any, targetOut: any, lodIn: any, lodOut: any, sigmaRadians: any, direction: any, poleAxis: any): void; + _setViewport(target: any, x: any, y: any, width: any, height: any): void; +} +import { RenderTarget } from '../../../core/RenderTarget.js'; +import NodeMaterial from '../../../materials/nodes/NodeMaterial.js'; +import { Mesh } from '../../../objects/Mesh.js'; +import { Vector3 } from '../../../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeBuilderState.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeBuilderState.d.ts new file mode 100644 index 000000000..876698dc2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeBuilderState.d.ts @@ -0,0 +1,105 @@ +export default NodeBuilderState; +/** + * This module represents the state of a node builder after it was + * used to build the nodes for a render object. The state holds the + * results of the build for further processing in the renderer. + * + * Render objects with identical cache keys share the same node builder state. + * + * @private + */ +declare class NodeBuilderState { + /** + * Constructs a new node builder state. + * + * @param {string} vertexShader - The native vertex shader code. + * @param {string} fragmentShader - The native fragment shader code. + * @param {string} computeShader - The native compute shader code. + * @param {Array} nodeAttributes - An array of node attributes. + * @param {Array} bindings - An array of bind groups. + * @param {Array} updateNodes - An array of nodes that implement their `update()` method. + * @param {Array} updateBeforeNodes - An array of nodes that implement their `updateBefore()` method. + * @param {Array} updateAfterNodes - An array of nodes that implement their `updateAfter()` method. + * @param {NodeMaterialObserver} observer - A node material observer. + * @param {Array} transforms - An array with transform attribute objects. Only relevant when using compute shaders with WebGL 2. + */ + constructor(vertexShader: string, fragmentShader: string, computeShader: string, nodeAttributes: Array, bindings: Array, updateNodes: Array, updateBeforeNodes: Array, updateAfterNodes: Array, observer: NodeMaterialObserver, transforms?: Array); + /** + * The native vertex shader code. + * + * @type {string} + */ + vertexShader: string; + /** + * The native fragment shader code. + * + * @type {string} + */ + fragmentShader: string; + /** + * The native compute shader code. + * + * @type {string} + */ + computeShader: string; + /** + * An array with transform attribute objects. + * Only relevant when using compute shaders with WebGL 2. + * + * @type {Array} + */ + transforms: Array; + /** + * An array of node attributes representing + * the attributes of the shaders. + * + * @type {Array} + */ + nodeAttributes: Array; + /** + * An array of bind groups representing the uniform or storage + * buffers, texture or samplers of the shader. + * + * @type {Array} + */ + bindings: Array; + /** + * An array of nodes that implement their `update()` method. + * + * @type {Array} + */ + updateNodes: Array; + /** + * An array of nodes that implement their `updateBefore()` method. + * + * @type {Array} + */ + updateBeforeNodes: Array; + /** + * An array of nodes that implement their `updateAfter()` method. + * + * @type {Array} + */ + updateAfterNodes: Array; + /** + * A node material observer. + * + * @type {NodeMaterialObserver} + */ + observer: NodeMaterialObserver; + /** + * How often this state is used by render objects. + * + * @type {number} + */ + usedTimes: number; + /** + * This method is used to create a array of bind groups based + * on the existing bind groups of this state. Shared groups are + * not cloned. + * + * @return {Array} A array of bind groups. + */ + createBindings(): Array; +} +import BindGroup from '../BindGroup.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeLibrary.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeLibrary.d.ts new file mode 100644 index 000000000..0121dd34b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeLibrary.d.ts @@ -0,0 +1,99 @@ +export default NodeLibrary; +/** + * The purpose of a node library is to assign node implementations + * to existing library features. In `WebGPURenderer` lights, materials + * which are not based on `NodeMaterial` as well as tone mapping techniques + * are implemented with node-based modules. + * + * @private + */ +declare class NodeLibrary { + /** + * A weak map that maps lights to light nodes. + * + * @type {WeakMap} + */ + lightNodes: WeakMap; + /** + * A map that maps materials to node materials. + * + * @type {Map} + */ + materialNodes: Map; + /** + * A map that maps tone mapping techniques (constants) + * to tone mapping node functions. + * + * @type {Map} + */ + toneMappingNodes: Map; + /** + * Returns a matching node material instance for the given material object. + * + * This method also assigns/copies the properties of the given material object + * to the node material. This is done to make sure the current material + * configuration carries over to the node version. + * + * @param {Material} material - A material. + * @return {NodeMaterial} The corresponding node material. + */ + fromMaterial(material: Material): NodeMaterial; + /** + * Adds a tone mapping node function for a tone mapping technique (constant). + * + * @param {Function} toneMappingNode - The tone mapping node function. + * @param {number} toneMapping - The tone mapping. + */ + addToneMapping(toneMappingNode: Function, toneMapping: number): void; + /** + * Returns a tone mapping node function for a tone mapping technique (constant). + * + * @param {number} toneMapping - The tone mapping. + * @return {?Function} The tone mapping node function. Returns `null` if no node function is found. + */ + getToneMappingFunction(toneMapping: number): Function | null; + /** + * Returns a node material class definition for a material type. + * + * @param {string} materialType - The material type. + * @return {?NodeMaterial.constructor} The node material class definition. Returns `null` if no node material is found. + */ + getMaterialNodeClass(materialType: string): NodeMaterial.constructor | null; + /** + * Adds a node material class definition for a given material type. + * + * @param {NodeMaterial.constructor} materialNodeClass - The node material class definition. + * @param {string} materialClassType - The material type. + */ + addMaterial(materialNodeClass: NodeMaterial.constructor, materialClassType: string): void; + /** + * Returns a light node class definition for a light class definition. + * + * @param {Light.constructor} light - The light class definition. + * @return {?AnalyticLightNode.constructor} The light node class definition. Returns `null` if no light node is found. + */ + getLightNodeClass(light: Light.constructor): AnalyticLightNode.constructor | null; + /** + * Adds a light node class definition for a given light class definition. + * + * @param {AnalyticLightNode.constructor} lightNodeClass - The light node class definition. + * @param {Light.constructor} lightClass - The light class definition. + */ + addLight(lightNodeClass: AnalyticLightNode.constructor, lightClass: Light.constructor): void; + /** + * Adds a node class definition for the given type to the provided type library. + * + * @param {Node.constructor} nodeClass - The node class definition. + * @param {number|string} type - The object type. + * @param {Map} library - The type library. + */ + addType(nodeClass: Node.constructor, type: number | string, library: Map): void; + /** + * Adds a node class definition for the given class definition to the provided type library. + * + * @param {Node.constructor} nodeClass - The node class definition. + * @param {Node.constructor} baseClass - The class definition. + * @param {WeakMap} library - The type library. + */ + addClass(nodeClass: Node.constructor, baseClass: Node.constructor, library: WeakMap): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeManager.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeManager.d.ts new file mode 100644 index 000000000..68ca1edfe --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeManager.d.ts @@ -0,0 +1,287 @@ +export default NodeManager; +/** + * This renderer module manages node-related objects and is the + * primary interface between the renderer and the node system. + * + * @private + * @augments DataMap + */ +declare class NodeManager extends DataMap { + /** + * Constructs a new nodes management component. + * + * @param {Renderer} renderer - The renderer. + * @param {Backend} backend - The renderer's backend. + */ + constructor(renderer: Renderer, backend: Backend); + /** + * The renderer. + * + * @type {Renderer} + */ + renderer: Renderer; + /** + * The renderer's backend. + * + * @type {Backend} + */ + backend: Backend; + /** + * The node frame. + * + * @type {Renderer} + */ + nodeFrame: Renderer; + /** + * A cache for managing node builder states. + * + * @type {Map} + */ + nodeBuilderCache: Map; + /** + * A cache for managing data cache key data. + * + * @type {ChainMap} + */ + callHashCache: ChainMap; + /** + * A cache for managing node uniforms group data. + * + * @type {ChainMap} + */ + groupsData: ChainMap; + /** + * Queue for pending async builds to limit concurrent compilation. + * + * @private + * @type {Array} + */ + private _buildQueue; + /** + * Whether an async build is currently in progress. + * + * @private + * @type {boolean} + */ + private _buildInProgress; + /** + * A cache for managing node objects of + * scene properties like fog or environments. + * + * @type {Object} + */ + cacheLib: { + [x: string]: WeakMap; + }; + /** + * Returns `true` if the given node uniforms group must be updated or not. + * + * @param {NodeUniformsGroup} nodeUniformsGroup - The node uniforms group. + * @return {boolean} Whether the node uniforms group requires an update or not. + */ + updateGroup(nodeUniformsGroup: NodeUniformsGroup): boolean; + /** + * Returns the cache key for the given render object. + * + * @param {RenderObject} renderObject - The render object. + * @return {number} The cache key. + */ + getForRenderCacheKey(renderObject: RenderObject): number; + /** + * Creates a node builder configured for the given render object and material. + * + * @private + * @param {RenderObject} renderObject - The render object. + * @param {Material} material - The material to use. + * @return {NodeBuilder} The configured node builder. + */ + private _createNodeBuilder; + /** + * Returns a node builder state for the given render object. + * + * @param {RenderObject} renderObject - The render object. + * @param {boolean} [useAsync=false] - Whether to use async build with yielding. + * @return {NodeBuilderState|Promise} The node builder state (or Promise if async). + */ + getForRender(renderObject: RenderObject, useAsync?: boolean): NodeBuilderState | Promise; + /** + * Async version of getForRender() that yields to main thread during build. + * Use this in compileAsync() to prevent blocking the main thread. + * + * @param {RenderObject} renderObject - The render object. + * @return {Promise} A promise that resolves to the node builder state. + */ + getForRenderAsync(renderObject: RenderObject): Promise; + /** + * Returns nodeBuilderState if ready, null if pending async build. + * Queues async build on first call for cache miss. + * Use this in render() path to enable non-blocking compilation. + * + * @param {RenderObject} renderObject - The render object. + * @return {?NodeBuilderState} The node builder state, or null if still building. + */ + getForRenderDeferred(renderObject: RenderObject): NodeBuilderState | null; + /** + * Processes the build queue one item at a time. + * This ensures builds don't all run simultaneously and freeze the main thread. + * + * @private + */ + private _processBuildQueue; + /** + * Deletes the given object from the internal data map + * + * @param {any} object - The object to delete. + * @return {?Object} The deleted dictionary. + */ + delete(object: any): Object | null; + /** + * Returns a node builder state for the given compute node. + * + * @param {Node} computeNode - The compute node. + * @return {NodeBuilderState} The node builder state. + */ + getForCompute(computeNode: Node): NodeBuilderState; + /** + * Creates a node builder state for the given node builder. + * + * @private + * @param {NodeBuilder} nodeBuilder - The node builder. + * @return {NodeBuilderState} The node builder state. + */ + private _createNodeBuilderState; + /** + * Returns an environment node for the current configured + * scene environment. + * + * @param {Scene} scene - The scene. + * @return {Node} A node representing the current scene environment. + */ + getEnvironmentNode(scene: Scene): Node; + /** + * Returns a background node for the current configured + * scene background. + * + * @param {Scene} scene - The scene. + * @return {Node} A node representing the current scene background. + */ + getBackgroundNode(scene: Scene): Node; + /** + * Returns a fog node for the current configured scene fog. + * + * @param {Scene} scene - The scene. + * @return {Node} A node representing the current scene fog. + */ + getFogNode(scene: Scene): Node; + /** + * Returns a cache key for the given scene and lights node. + * This key is used by `RenderObject` as a part of the dynamic + * cache key (a key that must be checked every time the render + * objects is drawn). + * + * @param {Scene} scene - The scene. + * @param {LightsNode} lightsNode - The lights node. + * @return {number} The cache key. + */ + getCacheKey(scene: Scene, lightsNode: LightsNode): number; + /** + * A boolean that indicates whether tone mapping should be enabled + * or not. + * + * @type {boolean} + */ + get isToneMappingState(): boolean; + /** + * If a scene background is configured, this method makes sure to + * represent the background with a corresponding node-based implementation. + * + * @param {Scene} scene - The scene. + */ + updateBackground(scene: Scene): void; + /** + * This method is part of the caching of nodes which are used to represents the + * scene's background, fog or environment. + * + * @param {string} type - The type of object to cache. + * @param {Object} object - The object. + * @param {Function} callback - A callback that produces a node representation for the given object. + * @param {boolean} [forceUpdate=false] - Whether an update should be enforced or not. + * @return {Node} The node representation. + */ + getCacheNode(type: string, object: Object, callback: Function, forceUpdate?: boolean): Node; + /** + * If a scene fog is configured, this method makes sure to + * represent the fog with a corresponding node-based implementation. + * + * @param {Scene} scene - The scene. + */ + updateFog(scene: Scene): void; + /** + * If a scene environment is configured, this method makes sure to + * represent the environment with a corresponding node-based implementation. + * + * @param {Scene} scene - The scene. + */ + updateEnvironment(scene: Scene): void; + getNodeFrame(renderer?: Renderer, scene?: null, object?: null, camera?: null, material?: null): Renderer; + getNodeFrameForRender(renderObject: any): Renderer; + /** + * Returns the current output cache key. + * + * @return {string} The output cache key. + */ + getOutputCacheKey(): string; + /** + * Returns a node that represents the output configuration (tone mapping and + * color space) for the current target. + * + * @param {Texture} outputTarget - The output target. + * @return {Node} The output node. + */ + getOutputNode(outputTarget: Texture): Node; + /** + * Sets the output layer index for array texture output pass. + * This should be called before each layer render during the output pass. + * + * @param {number} index - The layer index. + */ + setOutputLayerIndex(index: number): void; + /** + * Triggers the call of `updateBefore()` methods + * for all nodes of the given render object. + * + * @param {RenderObject} renderObject - The render object. + */ + updateBefore(renderObject: RenderObject): void; + /** + * Triggers the call of `updateAfter()` methods + * for all nodes of the given render object. + * + * @param {RenderObject} renderObject - The render object. + */ + updateAfter(renderObject: RenderObject): void; + /** + * Triggers the call of `update()` methods + * for all nodes of the given compute node. + * + * @param {Node} computeNode - The compute node. + */ + updateForCompute(computeNode: Node): void; + /** + * Triggers the call of `update()` methods + * for all nodes of the given render object. + * + * @param {RenderObject} renderObject - The render object. + */ + updateForRender(renderObject: RenderObject): void; + /** + * Returns `true` if the given render object requires a refresh. + * + * @param {RenderObject} renderObject - The render object. + * @return {boolean} Whether the given render object requires a refresh or not. + */ + needsRefresh(renderObject: RenderObject): boolean; +} +import DataMap from '../DataMap.js'; +import NodeBuilderState from './NodeBuilderState.js'; +import ChainMap from '../ChainMap.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeSampledTexture.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeSampledTexture.d.ts new file mode 100644 index 000000000..3c380c248 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeSampledTexture.d.ts @@ -0,0 +1,72 @@ +/** + * A special form of sampled texture binding type. + * It's texture value is managed by a node object. + * + * @private + * @augments SampledTexture + */ +export class NodeSampledTexture extends SampledTexture { + /** + * Constructs a new node-based sampled texture. + * + * @param {string} name - The textures's name. + * @param {TextureNode} textureNode - The texture node. + * @param {UniformGroupNode} groupNode - The uniform group node. + * @param {?string} [access=null] - The access type. + */ + constructor(name: string, textureNode: TextureNode, groupNode: UniformGroupNode, access?: string | null); + /** + * The texture node. + * + * @type {TextureNode} + */ + textureNode: TextureNode; + /** + * The uniform group node. + * + * @type {UniformGroupNode} + */ + groupNode: UniformGroupNode; + /** + * The access type. + * + * @type {?string} + * @default null + */ + access: string | null; +} +/** + * A special form of sampled cube texture binding type. + * It's texture value is managed by a node object. + * + * @private + * @augments NodeSampledTexture + */ +export class NodeSampledCubeTexture extends NodeSampledTexture { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSampledCubeTexture: boolean; +} +/** + * A special form of sampled 3D texture binding type. + * It's texture value is managed by a node object. + * + * @private + * @augments NodeSampledTexture + */ +export class NodeSampledTexture3D extends NodeSampledTexture { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSampledTexture3D: boolean; +} +import { SampledTexture } from '../SampledTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeSampler.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeSampler.d.ts new file mode 100644 index 000000000..b5ad4701d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeSampler.d.ts @@ -0,0 +1,31 @@ +export default NodeSampler; +/** + * A special form of sampler binding type. + * It's texture value is managed by a node object. + * + * @private + * @augments Sampler + */ +declare class NodeSampler extends Sampler { + /** + * Constructs a new node-based sampler. + * + * @param {string} name - The samplers's name. + * @param {TextureNode} textureNode - The texture node. + * @param {UniformGroupNode} groupNode - The uniform group node. + */ + constructor(name: string, textureNode: TextureNode, groupNode: UniformGroupNode); + /** + * The texture node. + * + * @type {TextureNode} + */ + textureNode: TextureNode; + /** + * The uniform group node. + * + * @type {UniformGroupNode} + */ + groupNode: UniformGroupNode; +} +import Sampler from '../Sampler.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeStorageBuffer.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeStorageBuffer.d.ts new file mode 100644 index 000000000..ca5196126 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeStorageBuffer.d.ts @@ -0,0 +1,36 @@ +export default NodeStorageBuffer; +/** + * A special form of storage buffer binding type. + * It's buffer value is managed by a node object. + * + * @private + * @augments StorageBuffer + */ +declare class NodeStorageBuffer extends StorageBuffer { + /** + * Constructs a new node-based storage buffer. + * + * @param {StorageBufferNode} nodeUniform - The storage buffer node. + * @param {UniformGroupNode} groupNode - The uniform group node. + */ + constructor(nodeUniform: StorageBufferNode, groupNode: UniformGroupNode); + /** + * The node uniform. + * + * @type {StorageBufferNode} + */ + nodeUniform: StorageBufferNode; + /** + * The access type. + * + * @type {string} + */ + access: string; + /** + * The uniform group node. + * + * @type {UniformGroupNode} + */ + groupNode: UniformGroupNode; +} +import StorageBuffer from '../StorageBuffer.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniform.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniform.d.ts new file mode 100644 index 000000000..47673f68d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniform.d.ts @@ -0,0 +1,230 @@ +/** + * A special form of Number uniform binding type. + * It's value is managed by a node object. + * + * @private + * @augments NumberUniform + */ +export class NumberNodeUniform extends NumberUniform { + /** + * Constructs a new node-based Number uniform. + * + * @param {NodeUniform} nodeUniform - The node uniform. + */ + constructor(nodeUniform: NodeUniform); + /** + * The node uniform. + * + * @type {NodeUniform} + */ + nodeUniform: NodeUniform; + /** + * Overwritten to return the value of the node uniform. + * + * @return {number} The value. + */ + getValue(): number; + /** + * Returns the node uniform data type. + * + * @return {string} The data type. + */ + getType(): string; +} +/** + * A special form of Vector2 uniform binding type. + * It's value is managed by a node object. + * + * @private + * @augments Vector2Uniform + */ +export class Vector2NodeUniform extends Vector2Uniform { + /** + * Constructs a new node-based Vector2 uniform. + * + * @param {NodeUniform} nodeUniform - The node uniform. + */ + constructor(nodeUniform: NodeUniform); + /** + * The node uniform. + * + * @type {NodeUniform} + */ + nodeUniform: NodeUniform; + /** + * Returns the node uniform data type. + * + * @return {string} The data type. + */ + getType(): string; +} +/** + * A special form of Vector3 uniform binding type. + * It's value is managed by a node object. + * + * @private + * @augments Vector3Uniform + */ +export class Vector3NodeUniform extends Vector3Uniform { + /** + * Constructs a new node-based Vector3 uniform. + * + * @param {NodeUniform} nodeUniform - The node uniform. + */ + constructor(nodeUniform: NodeUniform); + /** + * The node uniform. + * + * @type {NodeUniform} + */ + nodeUniform: NodeUniform; + /** + * Returns the node uniform data type. + * + * @return {string} The data type. + */ + getType(): string; +} +/** + * A special form of Vector4 uniform binding type. + * It's value is managed by a node object. + * + * @private + * @augments Vector4Uniform + */ +export class Vector4NodeUniform extends Vector4Uniform { + /** + * Constructs a new node-based Vector4 uniform. + * + * @param {NodeUniform} nodeUniform - The node uniform. + */ + constructor(nodeUniform: NodeUniform); + /** + * The node uniform. + * + * @type {NodeUniform} + */ + nodeUniform: NodeUniform; + /** + * Returns the node uniform data type. + * + * @return {string} The data type. + */ + getType(): string; +} +/** + * A special form of Color uniform binding type. + * It's value is managed by a node object. + * + * @private + * @augments ColorUniform + */ +export class ColorNodeUniform extends ColorUniform { + /** + * Constructs a new node-based Color uniform. + * + * @param {NodeUniform} nodeUniform - The node uniform. + */ + constructor(nodeUniform: NodeUniform); + /** + * The node uniform. + * + * @type {NodeUniform} + */ + nodeUniform: NodeUniform; + /** + * Returns the node uniform data type. + * + * @return {string} The data type. + */ + getType(): string; +} +/** + * A special form of Matrix2 uniform binding type. + * It's value is managed by a node object. + * + * @private + * @augments Matrix2Uniform + */ +export class Matrix2NodeUniform extends Matrix2Uniform { + /** + * Constructs a new node-based Matrix2 uniform. + * + * @param {NodeUniform} nodeUniform - The node uniform. + */ + constructor(nodeUniform: NodeUniform); + /** + * The node uniform. + * + * @type {NodeUniform} + */ + nodeUniform: NodeUniform; + /** + * Returns the node uniform data type. + * + * @return {string} The data type. + */ + getType(): string; +} +/** + * A special form of Matrix3 uniform binding type. + * It's value is managed by a node object. + * + * @private + * @augments Matrix3Uniform + */ +export class Matrix3NodeUniform extends Matrix3Uniform { + /** + * Constructs a new node-based Matrix3 uniform. + * + * @param {NodeUniform} nodeUniform - The node uniform. + */ + constructor(nodeUniform: NodeUniform); + /** + * The node uniform. + * + * @type {NodeUniform} + */ + nodeUniform: NodeUniform; + /** + * Returns the node uniform data type. + * + * @return {string} The data type. + */ + getType(): string; +} +/** + * A special form of Matrix4 uniform binding type. + * It's value is managed by a node object. + * + * @private + * @augments Matrix4Uniform + */ +export class Matrix4NodeUniform extends Matrix4Uniform { + /** + * Constructs a new node-based Matrix4 uniform. + * + * @param {NodeUniform} nodeUniform - The node uniform. + */ + constructor(nodeUniform: NodeUniform); + /** + * The node uniform. + * + * @type {NodeUniform} + */ + nodeUniform: NodeUniform; + /** + * Returns the node uniform data type. + * + * @return {string} The data type. + */ + getType(): string; +} +import { NumberUniform } from '../Uniform.js'; +import { Vector2Uniform } from '../Uniform.js'; +import { Vector3Uniform } from '../Uniform.js'; +import { Vector4Uniform } from '../Uniform.js'; +import { ColorUniform } from '../Uniform.js'; +import { Matrix2Uniform } from '../Uniform.js'; +import { Matrix3Uniform } from '../Uniform.js'; +import { Matrix4Uniform } from '../Uniform.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniformBuffer.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniformBuffer.d.ts new file mode 100644 index 000000000..495dc5d8c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniformBuffer.d.ts @@ -0,0 +1,56 @@ +export default NodeUniformBuffer; +/** + * A special form of uniform buffer binding type. + * It's buffer value is managed by a node object. + * + * @private + * @augments UniformBuffer + */ +declare class NodeUniformBuffer extends UniformBuffer { + /** + * Constructs a new node-based uniform buffer. + * + * @param {BufferNode} nodeUniform - The uniform buffer node. + * @param {UniformGroupNode} groupNode - The uniform group node. + */ + constructor(nodeUniform: BufferNode, groupNode: UniformGroupNode); + /** + * The uniform buffer node. + * + * @type {BufferNode} + */ + nodeUniform: BufferNode; + /** + * The uniform group node. + * + * @type {UniformGroupNode} + */ + groupNode: UniformGroupNode; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isNodeUniformBuffer: boolean; + /** + * The array of update ranges. + * + * @param {Array<{start: number, count: number}>} value - The update ranges. + */ + set updateRanges(value: Array<{ + start: number; + count: number; + }>); + /** + * The array of update ranges. + * + * @type {Array<{start: number, count: number}>} + */ + get updateRanges(): Array<{ + start: number; + count: number; + }>; +} +import UniformBuffer from '../UniformBuffer.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniformsGroup.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniformsGroup.d.ts new file mode 100644 index 000000000..c196bbe56 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniformsGroup.d.ts @@ -0,0 +1,38 @@ +export default NodeUniformsGroup; +/** + * A special form of uniforms group that represents + * the individual uniforms as node-based uniforms. + * + * @private + * @augments UniformsGroup + */ +declare class NodeUniformsGroup extends UniformsGroup { + /** + * Constructs a new node-based uniforms group. + * + * @param {string} name - The group's name. + * @param {UniformGroupNode} groupNode - The uniform group node. + */ + constructor(name: string, groupNode: UniformGroupNode); + /** + * The group's ID. + * + * @type {number} + */ + id: number; + /** + * The uniform group node. + * + * @type {UniformGroupNode} + */ + groupNode: UniformGroupNode; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isNodeUniformsGroup: boolean; +} +import UniformsGroup from '../UniformsGroup.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/DFGLUTData.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/DFGLUTData.d.ts new file mode 100644 index 000000000..408609494 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/DFGLUTData.d.ts @@ -0,0 +1 @@ +export function getDFGLUT(): any; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk.d.ts new file mode 100644 index 000000000..8fb607cb0 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk.d.ts @@ -0,0 +1,252 @@ +export namespace ShaderChunk { + export { alphahash_fragment }; + export { alphahash_pars_fragment }; + export { alphamap_fragment }; + export { alphamap_pars_fragment }; + export { alphatest_fragment }; + export { alphatest_pars_fragment }; + export { aomap_fragment }; + export { aomap_pars_fragment }; + export { batching_pars_vertex }; + export { batching_vertex }; + export { begin_vertex }; + export { beginnormal_vertex }; + export { bsdfs }; + export { iridescence_fragment }; + export { bumpmap_pars_fragment }; + export { clipping_planes_fragment }; + export { clipping_planes_pars_fragment }; + export { clipping_planes_pars_vertex }; + export { clipping_planes_vertex }; + export { color_fragment }; + export { color_pars_fragment }; + export { color_pars_vertex }; + export { color_vertex }; + export { common }; + export { cube_uv_reflection_fragment }; + export { defaultnormal_vertex }; + export { displacementmap_pars_vertex }; + export { displacementmap_vertex }; + export { emissivemap_fragment }; + export { emissivemap_pars_fragment }; + export { colorspace_fragment }; + export { colorspace_pars_fragment }; + export { envmap_fragment }; + export { envmap_common_pars_fragment }; + export { envmap_pars_fragment }; + export { envmap_pars_vertex }; + export { envmap_physical_pars_fragment }; + export { envmap_vertex }; + export { fog_vertex }; + export { fog_pars_vertex }; + export { fog_fragment }; + export { fog_pars_fragment }; + export { gradientmap_pars_fragment }; + export { lightmap_pars_fragment }; + export { lights_lambert_fragment }; + export { lights_lambert_pars_fragment }; + export { lights_pars_begin }; + export { lights_toon_fragment }; + export { lights_toon_pars_fragment }; + export { lights_phong_fragment }; + export { lights_phong_pars_fragment }; + export { lights_physical_fragment }; + export { lights_physical_pars_fragment }; + export { lights_fragment_begin }; + export { lights_fragment_maps }; + export { lights_fragment_end }; + export { lightprobes_pars_fragment }; + export { logdepthbuf_fragment }; + export { logdepthbuf_pars_fragment }; + export { logdepthbuf_pars_vertex }; + export { logdepthbuf_vertex }; + export { map_fragment }; + export { map_pars_fragment }; + export { map_particle_fragment }; + export { map_particle_pars_fragment }; + export { metalnessmap_fragment }; + export { metalnessmap_pars_fragment }; + export { morphinstance_vertex }; + export { morphcolor_vertex }; + export { morphnormal_vertex }; + export { morphtarget_pars_vertex }; + export { morphtarget_vertex }; + export { normal_fragment_begin }; + export { normal_fragment_maps }; + export { normal_pars_fragment }; + export { normal_pars_vertex }; + export { normal_vertex }; + export { normalmap_pars_fragment }; + export { clearcoat_normal_fragment_begin }; + export { clearcoat_normal_fragment_maps }; + export { clearcoat_pars_fragment }; + export { iridescence_pars_fragment }; + export { opaque_fragment }; + export { packing }; + export { premultiplied_alpha_fragment }; + export { project_vertex }; + export { dithering_fragment }; + export { dithering_pars_fragment }; + export { roughnessmap_fragment }; + export { roughnessmap_pars_fragment }; + export { shadowmap_pars_fragment }; + export { shadowmap_pars_vertex }; + export { shadowmap_vertex }; + export { shadowmask_pars_fragment }; + export { skinbase_vertex }; + export { skinning_pars_vertex }; + export { skinning_vertex }; + export { skinnormal_vertex }; + export { specularmap_fragment }; + export { specularmap_pars_fragment }; + export { tonemapping_fragment }; + export { tonemapping_pars_fragment }; + export { transmission_fragment }; + export { transmission_pars_fragment }; + export { uv_pars_fragment }; + export { uv_pars_vertex }; + export { uv_vertex }; + export { worldpos_vertex }; + export let background_vert: string; + export let background_frag: string; + export let backgroundCube_vert: string; + export let backgroundCube_frag: string; + export let cube_vert: string; + export let cube_frag: string; + export let depth_vert: string; + export let depth_frag: string; + export let distance_vert: string; + export let distance_frag: string; + export let equirect_vert: string; + export let equirect_frag: string; + export let linedashed_vert: string; + export let linedashed_frag: string; + export let meshbasic_vert: string; + export let meshbasic_frag: string; + export let meshlambert_vert: string; + export let meshlambert_frag: string; + export let meshmatcap_vert: string; + export let meshmatcap_frag: string; + export let meshnormal_vert: string; + export let meshnormal_frag: string; + export let meshphong_vert: string; + export let meshphong_frag: string; + export let meshphysical_vert: string; + export let meshphysical_frag: string; + export let meshtoon_vert: string; + export let meshtoon_frag: string; + export let points_vert: string; + export let points_frag: string; + export let shadow_vert: string; + export let shadow_frag: string; + export let sprite_vert: string; + export let sprite_frag: string; +} +import alphahash_fragment from './ShaderChunk/alphahash_fragment.glsl.js'; +import alphahash_pars_fragment from './ShaderChunk/alphahash_pars_fragment.glsl.js'; +import alphamap_fragment from './ShaderChunk/alphamap_fragment.glsl.js'; +import alphamap_pars_fragment from './ShaderChunk/alphamap_pars_fragment.glsl.js'; +import alphatest_fragment from './ShaderChunk/alphatest_fragment.glsl.js'; +import alphatest_pars_fragment from './ShaderChunk/alphatest_pars_fragment.glsl.js'; +import aomap_fragment from './ShaderChunk/aomap_fragment.glsl.js'; +import aomap_pars_fragment from './ShaderChunk/aomap_pars_fragment.glsl.js'; +import batching_pars_vertex from './ShaderChunk/batching_pars_vertex.glsl.js'; +import batching_vertex from './ShaderChunk/batching_vertex.glsl.js'; +import begin_vertex from './ShaderChunk/begin_vertex.glsl.js'; +import beginnormal_vertex from './ShaderChunk/beginnormal_vertex.glsl.js'; +import bsdfs from './ShaderChunk/bsdfs.glsl.js'; +import iridescence_fragment from './ShaderChunk/iridescence_fragment.glsl.js'; +import bumpmap_pars_fragment from './ShaderChunk/bumpmap_pars_fragment.glsl.js'; +import clipping_planes_fragment from './ShaderChunk/clipping_planes_fragment.glsl.js'; +import clipping_planes_pars_fragment from './ShaderChunk/clipping_planes_pars_fragment.glsl.js'; +import clipping_planes_pars_vertex from './ShaderChunk/clipping_planes_pars_vertex.glsl.js'; +import clipping_planes_vertex from './ShaderChunk/clipping_planes_vertex.glsl.js'; +import color_fragment from './ShaderChunk/color_fragment.glsl.js'; +import color_pars_fragment from './ShaderChunk/color_pars_fragment.glsl.js'; +import color_pars_vertex from './ShaderChunk/color_pars_vertex.glsl.js'; +import color_vertex from './ShaderChunk/color_vertex.glsl.js'; +import common from './ShaderChunk/common.glsl.js'; +import cube_uv_reflection_fragment from './ShaderChunk/cube_uv_reflection_fragment.glsl.js'; +import defaultnormal_vertex from './ShaderChunk/defaultnormal_vertex.glsl.js'; +import displacementmap_pars_vertex from './ShaderChunk/displacementmap_pars_vertex.glsl.js'; +import displacementmap_vertex from './ShaderChunk/displacementmap_vertex.glsl.js'; +import emissivemap_fragment from './ShaderChunk/emissivemap_fragment.glsl.js'; +import emissivemap_pars_fragment from './ShaderChunk/emissivemap_pars_fragment.glsl.js'; +import colorspace_fragment from './ShaderChunk/colorspace_fragment.glsl.js'; +import colorspace_pars_fragment from './ShaderChunk/colorspace_pars_fragment.glsl.js'; +import envmap_fragment from './ShaderChunk/envmap_fragment.glsl.js'; +import envmap_common_pars_fragment from './ShaderChunk/envmap_common_pars_fragment.glsl.js'; +import envmap_pars_fragment from './ShaderChunk/envmap_pars_fragment.glsl.js'; +import envmap_pars_vertex from './ShaderChunk/envmap_pars_vertex.glsl.js'; +import envmap_physical_pars_fragment from './ShaderChunk/envmap_physical_pars_fragment.glsl.js'; +import envmap_vertex from './ShaderChunk/envmap_vertex.glsl.js'; +import fog_vertex from './ShaderChunk/fog_vertex.glsl.js'; +import fog_pars_vertex from './ShaderChunk/fog_pars_vertex.glsl.js'; +import fog_fragment from './ShaderChunk/fog_fragment.glsl.js'; +import fog_pars_fragment from './ShaderChunk/fog_pars_fragment.glsl.js'; +import gradientmap_pars_fragment from './ShaderChunk/gradientmap_pars_fragment.glsl.js'; +import lightmap_pars_fragment from './ShaderChunk/lightmap_pars_fragment.glsl.js'; +import lights_lambert_fragment from './ShaderChunk/lights_lambert_fragment.glsl.js'; +import lights_lambert_pars_fragment from './ShaderChunk/lights_lambert_pars_fragment.glsl.js'; +import lights_pars_begin from './ShaderChunk/lights_pars_begin.glsl.js'; +import lights_toon_fragment from './ShaderChunk/lights_toon_fragment.glsl.js'; +import lights_toon_pars_fragment from './ShaderChunk/lights_toon_pars_fragment.glsl.js'; +import lights_phong_fragment from './ShaderChunk/lights_phong_fragment.glsl.js'; +import lights_phong_pars_fragment from './ShaderChunk/lights_phong_pars_fragment.glsl.js'; +import lights_physical_fragment from './ShaderChunk/lights_physical_fragment.glsl.js'; +import lights_physical_pars_fragment from './ShaderChunk/lights_physical_pars_fragment.glsl.js'; +import lights_fragment_begin from './ShaderChunk/lights_fragment_begin.glsl.js'; +import lights_fragment_maps from './ShaderChunk/lights_fragment_maps.glsl.js'; +import lights_fragment_end from './ShaderChunk/lights_fragment_end.glsl.js'; +import lightprobes_pars_fragment from './ShaderChunk/lightprobes_pars_fragment.glsl.js'; +import logdepthbuf_fragment from './ShaderChunk/logdepthbuf_fragment.glsl.js'; +import logdepthbuf_pars_fragment from './ShaderChunk/logdepthbuf_pars_fragment.glsl.js'; +import logdepthbuf_pars_vertex from './ShaderChunk/logdepthbuf_pars_vertex.glsl.js'; +import logdepthbuf_vertex from './ShaderChunk/logdepthbuf_vertex.glsl.js'; +import map_fragment from './ShaderChunk/map_fragment.glsl.js'; +import map_pars_fragment from './ShaderChunk/map_pars_fragment.glsl.js'; +import map_particle_fragment from './ShaderChunk/map_particle_fragment.glsl.js'; +import map_particle_pars_fragment from './ShaderChunk/map_particle_pars_fragment.glsl.js'; +import metalnessmap_fragment from './ShaderChunk/metalnessmap_fragment.glsl.js'; +import metalnessmap_pars_fragment from './ShaderChunk/metalnessmap_pars_fragment.glsl.js'; +import morphinstance_vertex from './ShaderChunk/morphinstance_vertex.glsl.js'; +import morphcolor_vertex from './ShaderChunk/morphcolor_vertex.glsl.js'; +import morphnormal_vertex from './ShaderChunk/morphnormal_vertex.glsl.js'; +import morphtarget_pars_vertex from './ShaderChunk/morphtarget_pars_vertex.glsl.js'; +import morphtarget_vertex from './ShaderChunk/morphtarget_vertex.glsl.js'; +import normal_fragment_begin from './ShaderChunk/normal_fragment_begin.glsl.js'; +import normal_fragment_maps from './ShaderChunk/normal_fragment_maps.glsl.js'; +import normal_pars_fragment from './ShaderChunk/normal_pars_fragment.glsl.js'; +import normal_pars_vertex from './ShaderChunk/normal_pars_vertex.glsl.js'; +import normal_vertex from './ShaderChunk/normal_vertex.glsl.js'; +import normalmap_pars_fragment from './ShaderChunk/normalmap_pars_fragment.glsl.js'; +import clearcoat_normal_fragment_begin from './ShaderChunk/clearcoat_normal_fragment_begin.glsl.js'; +import clearcoat_normal_fragment_maps from './ShaderChunk/clearcoat_normal_fragment_maps.glsl.js'; +import clearcoat_pars_fragment from './ShaderChunk/clearcoat_pars_fragment.glsl.js'; +import iridescence_pars_fragment from './ShaderChunk/iridescence_pars_fragment.glsl.js'; +import opaque_fragment from './ShaderChunk/opaque_fragment.glsl.js'; +import packing from './ShaderChunk/packing.glsl.js'; +import premultiplied_alpha_fragment from './ShaderChunk/premultiplied_alpha_fragment.glsl.js'; +import project_vertex from './ShaderChunk/project_vertex.glsl.js'; +import dithering_fragment from './ShaderChunk/dithering_fragment.glsl.js'; +import dithering_pars_fragment from './ShaderChunk/dithering_pars_fragment.glsl.js'; +import roughnessmap_fragment from './ShaderChunk/roughnessmap_fragment.glsl.js'; +import roughnessmap_pars_fragment from './ShaderChunk/roughnessmap_pars_fragment.glsl.js'; +import shadowmap_pars_fragment from './ShaderChunk/shadowmap_pars_fragment.glsl.js'; +import shadowmap_pars_vertex from './ShaderChunk/shadowmap_pars_vertex.glsl.js'; +import shadowmap_vertex from './ShaderChunk/shadowmap_vertex.glsl.js'; +import shadowmask_pars_fragment from './ShaderChunk/shadowmask_pars_fragment.glsl.js'; +import skinbase_vertex from './ShaderChunk/skinbase_vertex.glsl.js'; +import skinning_pars_vertex from './ShaderChunk/skinning_pars_vertex.glsl.js'; +import skinning_vertex from './ShaderChunk/skinning_vertex.glsl.js'; +import skinnormal_vertex from './ShaderChunk/skinnormal_vertex.glsl.js'; +import specularmap_fragment from './ShaderChunk/specularmap_fragment.glsl.js'; +import specularmap_pars_fragment from './ShaderChunk/specularmap_pars_fragment.glsl.js'; +import tonemapping_fragment from './ShaderChunk/tonemapping_fragment.glsl.js'; +import tonemapping_pars_fragment from './ShaderChunk/tonemapping_pars_fragment.glsl.js'; +import transmission_fragment from './ShaderChunk/transmission_fragment.glsl.js'; +import transmission_pars_fragment from './ShaderChunk/transmission_pars_fragment.glsl.js'; +import uv_pars_fragment from './ShaderChunk/uv_pars_fragment.glsl.js'; +import uv_pars_vertex from './ShaderChunk/uv_pars_vertex.glsl.js'; +import uv_vertex from './ShaderChunk/uv_vertex.glsl.js'; +import worldpos_vertex from './ShaderChunk/worldpos_vertex.glsl.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphahash_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphahash_fragment.glsl.d.ts new file mode 100644 index 000000000..2fbc8585e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphahash_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_ALPHAHASH\n\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphahash_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphahash_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..22f68c64c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphahash_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_ALPHAHASH\n\n\t/**\n\t * See: https://casual-effects.com/research/Wyman2017Hashed/index.html\n\t */\n\n\tconst float ALPHA_HASH_SCALE = 0.05; // Derived from trials only, and may be changed.\n\n\tfloat hash2D( vec2 value ) {\n\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\n\t}\n\n\tfloat hash3D( vec3 value ) {\n\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\n\t}\n\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\n\t\t// Find the discretized derivatives of our coordinates\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\n\t\t// Find two nearest log-discretized noise scales\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\n\t\t// Compute alpha thresholds at our two noise scales\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\n\t\t// Factor to interpolate lerp with\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\n\t\t// Interpolate alpha threshold from noise at two scales\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\n\t\t// Pass into CDF to compute uniformly distrib threshold\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\n\t\t// Find our final, uniformly distributed alpha threshold (\u03B1\u03C4)\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\n\t\t// Avoids \u03B1\u03C4 == 0. Could also do \u03B1\u03C4 =1-\u03B1\u03C4\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\n\t}\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphamap_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphamap_fragment.glsl.d.ts new file mode 100644 index 000000000..307a3304f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphamap_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_ALPHAMAP\n\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphamap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphamap_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..adb0fb573 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphamap_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_ALPHAMAP\n\n\tuniform sampler2D alphaMap;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphatest_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphatest_fragment.glsl.d.ts new file mode 100644 index 000000000..92b21922a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphatest_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_ALPHATEST\n\n\t#ifdef ALPHA_TO_COVERAGE\n\n\tdiffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n\tif ( diffuseColor.a == 0.0 ) discard;\n\n\t#else\n\n\tif ( diffuseColor.a < alphaTest ) discard;\n\n\t#endif\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphatest_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphatest_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..af0e29861 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphatest_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/aomap_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/aomap_fragment.glsl.d.ts new file mode 100644 index 000000000..13933984f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/aomap_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_AOMAP\n\n\t// reads channel R, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\n\t#if defined( USE_CLEARCOAT ) \n\t\tclearcoatSpecularIndirect *= ambientOcclusion;\n\t#endif\n\n\t#if defined( USE_SHEEN ) \n\t\tsheenSpecularIndirect *= ambientOcclusion;\n\t#endif\n\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\n\t#endif\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/aomap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/aomap_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..3d9728bad --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/aomap_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_AOMAP\n\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/batching_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/batching_pars_vertex.glsl.d.ts new file mode 100644 index 000000000..745b7477f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/batching_pars_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_BATCHING\n\t#if ! defined( GL_ANGLE_multi_draw )\n\t#define gl_DrawID _gl_DrawID\n\tuniform int _gl_DrawID;\n\t#endif\n\n\tuniform highp sampler2D batchingTexture;\n\tuniform highp usampler2D batchingIdTexture;\n\tmat4 getBatchingMatrix( const in float i ) {\n\n\t\tint size = textureSize( batchingTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\n\t}\n\n\tfloat getIndirectIndex( const in int i ) {\n\n\t\tint size = textureSize( batchingIdTexture, 0 ).x;\n\t\tint x = i % size;\n\t\tint y = i / size;\n\t\treturn float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );\n\n\t}\n\n#endif\n\n#ifdef USE_BATCHING_COLOR\n\n\tuniform sampler2D batchingColorTexture;\n\tvec4 getBatchingColor( const in float i ) {\n\n\t\tint size = textureSize( batchingColorTexture, 0 ).x;\n\t\tint j = int( i );\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\treturn texelFetch( batchingColorTexture, ivec2( x, y ), 0 );\n\n\t}\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/batching_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/batching_vertex.glsl.d.ts new file mode 100644 index 000000000..b472ee778 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/batching_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_BATCHING\n\tmat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/begin_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/begin_vertex.glsl.d.ts new file mode 100644 index 000000000..06db803d3 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/begin_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\nvec3 transformed = vec3( position );\n\n#ifdef USE_ALPHAHASH\n\n\tvPosition = vec3( position );\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/beginnormal_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/beginnormal_vertex.glsl.d.ts new file mode 100644 index 000000000..3da7db7fa --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/beginnormal_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\nvec3 objectNormal = vec3( normal );\n\n#ifdef USE_TANGENT\n\n\tvec3 objectTangent = vec3( tangent.xyz );\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/bsdfs.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/bsdfs.glsl.d.ts new file mode 100644 index 000000000..2ad3ea62c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/bsdfs.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n\nfloat G_BlinnPhong_Implicit( /* const in float dotNL, const in float dotNV */ ) {\n\n\t// geometry term is (n dot l)(n dot v) / 4(n dot l)(n dot v)\n\treturn 0.25;\n\n}\n\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n\n}\n\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\n\tfloat G = G_BlinnPhong_Implicit( /* dotNL, dotNV */ );\n\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\n\treturn F * ( G * D );\n\n} // validated\n\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/bumpmap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/bumpmap_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..f19431cdb --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/bumpmap_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_BUMPMAP\n\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\n\t// Bump Mapping Unparametrized Surfaces on the GPU by Morten S. Mikkelsen\n\t// https://mmikk.github.io/papers3d/mm_sfgrad_bump.pdf\n\n\t// Evaluate the derivative of the height w.r.t. screen-space using forward differencing (listing 2)\n\n\tvec2 dHdxy_fwd() {\n\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\n\t\treturn vec2( dBx, dBy );\n\n\t}\n\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\n\t\t// normalize is done to ensure that the bump map looks the same regardless of the texture's scale\n\t\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n\t\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n\t\tvec3 vN = surf_norm; // normalized\n\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\n\t}\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_begin.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_begin.glsl.d.ts new file mode 100644 index 000000000..956542f38 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_begin.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_CLEARCOAT\n\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_maps.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_maps.glsl.d.ts new file mode 100644 index 000000000..f16ddc371 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_maps.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_CLEARCOAT_NORMALMAP\n\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..2ca80fed2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n\n#ifdef USE_CLEARCOATMAP\n\n\tuniform sampler2D clearcoatMap;\n\n#endif\n\n#ifdef USE_CLEARCOAT_NORMALMAP\n\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n\n#endif\n\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\n\tuniform sampler2D clearcoatRoughnessMap;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_fragment.glsl.d.ts new file mode 100644 index 000000000..aaa2b23f9 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#if NUM_CLIPPING_PLANES > 0\n\n\tvec4 plane;\n\n\t#ifdef ALPHA_TO_COVERAGE\n\n\t\tfloat distanceToPlane, distanceGradient;\n\t\tfloat clipOpacity = 1.0;\n\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\tclipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\n\t\t\tif ( clipOpacity == 0.0 ) discard;\n\n\t\t}\n\t\t#pragma unroll_loop_end\n\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\n\t\t\tfloat unionClipOpacity = 1.0;\n\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\t\tunionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\n\t\t\tclipOpacity *= 1.0 - unionClipOpacity;\n\n\t\t#endif\n\n\t\tdiffuseColor.a *= clipOpacity;\n\n\t\tif ( diffuseColor.a == 0.0 ) discard;\n\n\t#else\n\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\n\t\t}\n\t\t#pragma unroll_loop_end\n\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\n\t\t\tbool clipped = true;\n\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\n\t\t\tif ( clipped ) discard;\n\n\t\t#endif\n\n\t#endif\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..ae5f26dfe --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#if NUM_CLIPPING_PLANES > 0\n\n\tvarying vec3 vClipPosition;\n\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_pars_vertex.glsl.d.ts new file mode 100644 index 000000000..d5b3da410 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_pars_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#if NUM_CLIPPING_PLANES > 0\n\n\tvarying vec3 vClipPosition;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_vertex.glsl.d.ts new file mode 100644 index 000000000..20c123ce6 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#if NUM_CLIPPING_PLANES > 0\n\n\tvClipPosition = - mvPosition.xyz;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_fragment.glsl.d.ts new file mode 100644 index 000000000..8feede5ff --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA )\n\n\tdiffuseColor *= vColor;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..34020cf10 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA )\n\n\tvarying vec4 vColor;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_pars_vertex.glsl.d.ts new file mode 100644 index 000000000..90280cde7 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_pars_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\n\tvarying vec4 vColor;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_vertex.glsl.d.ts new file mode 100644 index 000000000..18cabec6a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\n\tvColor = vec4( 1.0 );\n\n#endif\n\n#ifdef USE_COLOR_ALPHA\n\n\tvColor *= color;\n\n#elif defined( USE_COLOR )\n\n\tvColor.rgb *= color;\n\n#endif\n\n#ifdef USE_INSTANCING_COLOR\n\n\tvColor.rgb *= instanceColor.rgb;\n\n#endif\n\n#ifdef USE_BATCHING_COLOR\n\n\tvColor *= getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/colorspace_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/colorspace_fragment.glsl.d.ts new file mode 100644 index 000000000..9046950c1 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/colorspace_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\ngl_FragColor = linearToOutputTexel( gl_FragColor );\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/colorspace_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/colorspace_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..0421d40c8 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/colorspace_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\n\nvec4 sRGBTransferEOTF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\n\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\n\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/common.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/common.glsl.d.ts new file mode 100644 index 000000000..c1b304ac8 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/common.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n\n#ifndef saturate\n// may have defined saturate() already\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\n\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\n\n// expects values in the range of [0,1]x[0,1], returns values in the [0,1] range.\n// do not collapse into a single function per: http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/\nhighp float rand( const in vec2 uv ) {\n\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\n\treturn fract( sin( sn ) * c );\n\n}\n\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\n\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\n\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n\n#ifdef USE_ALPHAHASH\n\n\tvarying vec3 vPosition;\n\n#endif\n\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n}\n\n#define inverseTransformDirection transformDirectionByInverseViewMatrix // keeping this for backwards compatibility\n\nvec3 transformNormalByInverseViewMatrix( in vec3 normal, in mat4 viewMatrix ) {\n\n\t// upper-left 3x3 of view matrix is assumed to be orthogonal\n\n\treturn normalize( ( vec4( normal, 0.0 ) * viewMatrix ).xyz );\n\n}\n\nvec3 transformDirectionByInverseViewMatrix( in vec3 dir, in mat4 viewMatrix ) {\n\n\t// upper-left 3x3 of view matrix is assumed to be orthogonal\n\n\treturn normalize( ( vec4( dir, 0.0 ) * viewMatrix ).xyz );\n\n}\n\nbool isPerspectiveMatrix( mat4 m ) {\n\n\treturn m[ 2 ][ 3 ] == - 1.0;\n\n}\n\nvec2 equirectUv( in vec3 dir ) {\n\n\t// dir is assumed to be unit length\n\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\n\treturn vec2( u, v );\n\n}\n\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\n\treturn RECIPROCAL_PI * diffuseColor;\n\n} // validated\n\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\n\t// Original approximation by Christophe Schlick '94\n\t// float fresnel = pow( 1.0 - dotVH, 5.0 );\n\n\t// Optimized variant (presented by Epic at SIGGRAPH '13)\n\t// https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n\n} // validated\n\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\n\t// Original approximation by Christophe Schlick '94\n\t// float fresnel = pow( 1.0 - dotVH, 5.0 );\n\n\t// Optimized variant (presented by Epic at SIGGRAPH '13)\n\t// https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n\n} // validated\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/cube_uv_reflection_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/cube_uv_reflection_fragment.glsl.d.ts new file mode 100644 index 000000000..679dc7c37 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/cube_uv_reflection_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef ENVMAP_TYPE_CUBE_UV\n\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\n\t// These shader functions convert between the UV coordinates of a single face of\n\t// a cubemap, the 0-5 integer index of a cube face, and the direction vector for\n\t// sampling a textureCube (not generally normalized ).\n\n\tfloat getFace( vec3 direction ) {\n\n\t\tvec3 absDirection = abs( direction );\n\n\t\tfloat face = - 1.0;\n\n\t\tif ( absDirection.x > absDirection.z ) {\n\n\t\t\tif ( absDirection.x > absDirection.y )\n\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t} else {\n\n\t\t\tif ( absDirection.z > absDirection.y )\n\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t}\n\n\t\treturn face;\n\n\t}\n\n\t// RH coordinate system; PMREM face-indexing convention\n\tvec2 getUV( vec3 direction, float face ) {\n\n\t\tvec2 uv;\n\n\t\tif ( face == 0.0 ) {\n\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x ); // pos x\n\n\t\t} else if ( face == 1.0 ) {\n\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y ); // pos y\n\n\t\t} else if ( face == 2.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z ); // pos z\n\n\t\t} else if ( face == 3.0 ) {\n\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x ); // neg x\n\n\t\t} else if ( face == 4.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y ); // neg y\n\n\t\t} else {\n\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z ); // neg z\n\n\t\t}\n\n\t\treturn 0.5 * ( uv + 1.0 );\n\n\t}\n\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\n\t\tfloat face = getFace( direction );\n\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\n\t\tfloat faceSize = exp2( mipInt );\n\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; // #25071\n\n\t\tif ( face > 2.0 ) {\n\n\t\t\tuv.y += faceSize;\n\n\t\t\tface -= 3.0;\n\n\t\t}\n\n\t\tuv.x += face * faceSize;\n\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\n\t\t#ifdef texture2DGradEXT\n\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; // disable anisotropic filtering\n\n\t\t#else\n\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\n\t\t#endif\n\n\t}\n\n\t// These defines must match with PMREMGenerator\n\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\n\tfloat roughnessToMip( float roughness ) {\n\n\t\tfloat mip = 0.0;\n\n\t\tif ( roughness >= cubeUV_r1 ) {\n\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\n\t\t} else {\n\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness ); // 1.16 = 1.79^0.25\n\t\t}\n\n\t\treturn mip;\n\n\t}\n\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\n\t\tfloat mipF = fract( mip );\n\n\t\tfloat mipInt = floor( mip );\n\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\n\t\tif ( mipF == 0.0 ) {\n\n\t\t\treturn vec4( color0, 1.0 );\n\n\t\t} else {\n\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\n\t\t}\n\n\t}\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/default_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/default_fragment.glsl.d.ts new file mode 100644 index 000000000..0ec477406 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/default_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\nvoid main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/default_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/default_vertex.glsl.d.ts new file mode 100644 index 000000000..c8a2405ff --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/default_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\nvoid main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/defaultnormal_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/defaultnormal_vertex.glsl.d.ts new file mode 100644 index 000000000..d07874c8b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/defaultnormal_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n\nvec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\n\tvec3 transformedTangent = objectTangent;\n\n#endif\n\n#ifdef USE_BATCHING\n\n\t// this is in lieu of a per-instance normal-matrix\n\t// shear transforms in the instance matrix are not supported\n\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\n\t#ifdef USE_TANGENT\n\n\t\ttransformedTangent = bm * transformedTangent;\n\n\t#endif\n\n#endif\n\n#ifdef USE_INSTANCING\n\n\t// this is in lieu of a per-instance normal-matrix\n\t// shear transforms in the instance matrix are not supported\n\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\n\t#ifdef USE_TANGENT\n\n\t\ttransformedTangent = im * transformedTangent;\n\n\t#endif\n\n#endif\n\ntransformedNormal = normalMatrix * transformedNormal;\n\n#ifdef FLIP_SIDED\n\n\ttransformedNormal = - transformedNormal;\n\n#endif\n\n#ifdef USE_TANGENT\n\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\n\t#ifdef FLIP_SIDED\n\n\t\ttransformedTangent = - transformedTangent;\n\n\t#endif\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/displacementmap_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/displacementmap_pars_vertex.glsl.d.ts new file mode 100644 index 000000000..11548436c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/displacementmap_pars_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_DISPLACEMENTMAP\n\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/displacementmap_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/displacementmap_vertex.glsl.d.ts new file mode 100644 index 000000000..00cd8f00c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/displacementmap_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_DISPLACEMENTMAP\n\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/dithering_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/dithering_fragment.glsl.d.ts new file mode 100644 index 000000000..79105cddc --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/dithering_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef DITHERING\n\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/dithering_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/dithering_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..a209611c6 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/dithering_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef DITHERING\n\n\t// based on https://www.shadertoy.com/view/MslGR8\n\tvec3 dithering( vec3 color ) {\n\t\t//Calculate grid position\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\n\t\t//Shift the individual colors differently, thus making it even harder to see the dithering pattern\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\n\t\t//modify shift according to grid position.\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\n\t\t//shift the color by dither_shift\n\t\treturn color + dither_shift_RGB;\n\t}\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/emissivemap_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/emissivemap_fragment.glsl.d.ts new file mode 100644 index 000000000..c78635cd5 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/emissivemap_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_EMISSIVEMAP\n\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\n\t#ifdef DECODE_VIDEO_TEXTURE_EMISSIVE\n\n\t\t// use inline sRGB decode until browsers properly support SRGB8_ALPHA8 with video textures (#26516)\n\n\t\temissiveColor = sRGBTransferEOTF( emissiveColor );\n\n\t#endif\n\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/emissivemap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/emissivemap_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..a3cb247c1 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/emissivemap_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_EMISSIVEMAP\n\n\tuniform sampler2D emissiveMap;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_common_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_common_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..b5a4b088e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_common_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_ENVMAP\n\n\tuniform float envMapIntensity;\n\tuniform mat3 envMapRotation;\n\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_fragment.glsl.d.ts new file mode 100644 index 000000000..f91032c79 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_ENVMAP\n\n\t#ifdef ENV_WORLDPOS\n\n\t\tvec3 cameraToFrag;\n\n\t\tif ( isOrthographic ) {\n\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\n\t\t} else {\n\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\n\t\t}\n\n\t\t// Transforming Normal Vectors with the Inverse Transformation\n\t\tvec3 worldNormal = transformNormalByInverseViewMatrix( normal, viewMatrix );\n\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\n\t\t#else\n\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\n\t\t#endif\n\n\t#else\n\n\t\tvec3 reflectVec = vReflect;\n\n\t#endif\n\n\t#ifdef ENVMAP_TYPE_CUBE\n\n\t\tvec4 envColor = textureCube( envMap, envMapRotation * reflectVec );\n\n\t\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\n\t\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\n\t\t#elif defined( ENVMAP_BLENDING_MIX )\n\n\t\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\n\t\t#elif defined( ENVMAP_BLENDING_ADD )\n\n\t\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\n\t\t#endif\n\n\t#endif\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..402c73014 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_ENVMAP\n\n\tuniform float reflectivity;\n\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\n\t\t#define ENV_WORLDPOS\n\n\t#endif\n\n\t#ifdef ENV_WORLDPOS\n\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_pars_vertex.glsl.d.ts new file mode 100644 index 000000000..9ff38842e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_pars_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_ENVMAP\n\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\n\t\t#define ENV_WORLDPOS\n\n\t#endif\n\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\n\t#else\n\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\n\t#endif\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..6b2783dda --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_ENVMAP\n\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\n\t\t\tvec3 worldNormal = transformNormalByInverseViewMatrix( normal, viewMatrix );\n\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\n\t\t#else\n\n\t\t\treturn vec3( 0.0 );\n\n\t\t#endif\n\n\t}\n\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\n\t\t\t// Mixing the reflection with the normal is more accurate and keeps rough objects from gathering light from behind their tangent plane.\n\t\t\treflectVec = normalize( mix( reflectVec, normal, pow4( roughness ) ) );\n\n\t\t\treflectVec = transformDirectionByInverseViewMatrix( reflectVec, viewMatrix );\n\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\n\t\t#else\n\n\t\t\treturn vec3( 0.0 );\n\n\t\t#endif\n\n\t}\n\n\t#ifdef USE_ANISOTROPY\n\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\n\t\t\t // https://google.github.io/filament/Filament.md.html#lighting/imagebasedlights/anisotropy\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\n\t\t\t#else\n\n\t\t\t\treturn vec3( 0.0 );\n\n\t\t\t#endif\n\n\t\t}\n\n\t#endif\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_vertex.glsl.d.ts new file mode 100644 index 000000000..af6e18f7e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_ENVMAP\n\n\t#ifdef ENV_WORLDPOS\n\n\t\tvWorldPosition = worldPosition.xyz;\n\n\t#else\n\n\t\tvec3 cameraToVertex;\n\n\t\tif ( isOrthographic ) {\n\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\n\t\t} else {\n\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\n\t\t}\n\n\t\tvec3 worldNormal = transformNormalByInverseViewMatrix( transformedNormal, viewMatrix );\n\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\n\t\t#else\n\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\n\t\t#endif\n\n\t#endif\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_fragment.glsl.d.ts new file mode 100644 index 000000000..a402de6ab --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_FOG\n\n\t#ifdef FOG_EXP2\n\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\n\t#else\n\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\n\t#endif\n\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..2d1b3c615 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_FOG\n\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\n\t#ifdef FOG_EXP2\n\n\t\tuniform float fogDensity;\n\n\t#else\n\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\n\t#endif\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_pars_vertex.glsl.d.ts new file mode 100644 index 000000000..683bfb933 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_pars_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_FOG\n\n\tvarying float vFogDepth;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_vertex.glsl.d.ts new file mode 100644 index 000000000..5193d77e2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_FOG\n\n\tvFogDepth = - mvPosition.z;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/gradientmap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/gradientmap_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..64ffea6e5 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/gradientmap_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n\n#ifdef USE_GRADIENTMAP\n\n\tuniform sampler2D gradientMap;\n\n#endif\n\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\n\t// dotNL will be from -1.0 to 1.0\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\n\t#ifdef USE_GRADIENTMAP\n\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\n\t#else\n\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\n\t#endif\n\n}\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/iridescence_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/iridescence_fragment.glsl.d.ts new file mode 100644 index 000000000..ee7f019ab --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/iridescence_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n\n#ifdef USE_IRIDESCENCE\n\n\t// XYZ to linear-sRGB color space\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\n\t// Assume air interface for top\n\t// Note: We don't handle the case fresnel0 == 1\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\n\t}\n\n\t// Conversion FO/IOR\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\n\t}\n\n\t// ior is a value between 1.0 and 3.0. 1.0 is air interface\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\n\t}\n\n\t// Fresnel equations for dielectric/dielectric interfaces.\n\t// Ref: https://belcour.github.io/blog/research/2017/05/01/brdf-thin-film.html\n\t// Evaluation XYZ sensitivity curves in Fourier space\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\n\t}\n\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\n\t\tvec3 I;\n\n\t\t// Force iridescenceIOR -> outsideIOR when thinFilmThickness -> 0.0\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\t// Evaluate the cosTheta on the base layer (Snell law)\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\n\t\t// Handle TIR:\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\n\t\t\treturn vec3( 1.0 );\n\n\t\t}\n\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\n\t\t// First interface\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\n\t\t// Second interface\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); // guard against 1.0\n\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\n\t\t// Phase shift\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\n\t\t// Compound terms\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\n\t\t// Reflectance term for m = 0 (DC term amplitude)\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\n\t\t// Reflectance term for m > 0 (pairs of diracs)\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\n\t\t}\n\n\t\t// Since out of gamut colors might be produced, negative color values are clamped to 0.\n\t\treturn max( I, vec3( 0.0 ) );\n\n\t}\n\n#endif\n\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/iridescence_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/iridescence_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..53cec2b86 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/iridescence_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n\n#ifdef USE_IRIDESCENCEMAP\n\n\tuniform sampler2D iridescenceMap;\n\n#endif\n\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\n\tuniform sampler2D iridescenceThicknessMap;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lightmap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lightmap_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..16bdb81bf --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lightmap_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_LIGHTMAP\n\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lightprobes_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lightprobes_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..feb145c93 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lightprobes_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_LIGHT_PROBES_GRID\n\n// Single atlas 3D texture that stores all 7 SH sub-volumes stacked along Z.\n// Atlas depth = 7 * ( nz + 2 ) where nz = probesResolution.z.\n// Each sub-volume occupies ( nz + 2 ) slices: 1 padding + nz data + 1 padding.\n// Padding is a copy of the first / last data slice and prevents color bleeding\n// when the hardware linear filter reads across a sub-volume boundary.\nuniform highp sampler3D probesSH;\n\nuniform vec3 probesMin;\nuniform vec3 probesMax;\nuniform vec3 probesResolution;\n\nvec3 getLightProbeGridIrradiance( vec3 worldPos, vec3 worldNormal ) {\n\n\tvec3 res = probesResolution;\n\tvec3 gridRange = probesMax - probesMin;\n\tvec3 resMinusOne = res - 1.0;\n\tvec3 probeSpacing = gridRange / resMinusOne;\n\n\t// Offset sample position along normal by half a probe spacing\n\tvec3 samplePos = worldPos + worldNormal * probeSpacing * 0.5;\n\tvec3 uvw = clamp( ( samplePos - probesMin ) / gridRange, 0.0, 1.0 );\n\n\t// Remap to texel centers of the probe grid (XY and Z)\n\tuvw = uvw * resMinusOne / res + 0.5 / res;\n\n\t// Atlas UV mapping along Z:\n\t// paddedSlices = nz + 2 (1 padding texel at each end of every sub-volume)\n\t// atlasDepth = 7 * paddedSlices\n\t// For sub-volume t the first DATA texel sits at atlas slice t*paddedSlices + 1.\n\t// Given probe-grid texel-centre UVZ = ( iz + 0.5 ) / nz the atlas UV is:\n\t// atlasUvZ = ( uvw.z * nz + t * paddedSlices + 1 ) / atlasDepth\n\t//\n\t// uvZBase encodes the nz-scaled Z plus the intra-volume offset (+ 1 for padding),\n\t// so adding t*paddedSlices steps to each successive sub-volume.\n\tfloat nz = res.z;\n\tfloat paddedSlices = nz + 2.0;\n\tfloat atlasDepth = 7.0 * paddedSlices;\n\tfloat uvZBase = uvw.z * nz + 1.0;\n\n\tvec4 s0 = texture( probesSH, vec3( uvw.xy, ( uvZBase ) / atlasDepth ) );\n\tvec4 s1 = texture( probesSH, vec3( uvw.xy, ( uvZBase + paddedSlices ) / atlasDepth ) );\n\tvec4 s2 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 2.0 * paddedSlices ) / atlasDepth ) );\n\tvec4 s3 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 3.0 * paddedSlices ) / atlasDepth ) );\n\tvec4 s4 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 4.0 * paddedSlices ) / atlasDepth ) );\n\tvec4 s5 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 5.0 * paddedSlices ) / atlasDepth ) );\n\tvec4 s6 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 6.0 * paddedSlices ) / atlasDepth ) );\n\n\t// Unpack 9 vec3 SH L2 coefficients\n\tvec3 c0 = s0.xyz;\n\tvec3 c1 = vec3( s0.w, s1.xy );\n\tvec3 c2 = vec3( s1.zw, s2.x );\n\tvec3 c3 = s2.yzw;\n\tvec3 c4 = s3.xyz;\n\tvec3 c5 = vec3( s3.w, s4.xy );\n\tvec3 c6 = vec3( s4.zw, s5.x );\n\tvec3 c7 = s5.yzw;\n\tvec3 c8 = s6.xyz;\n\n\t// Evaluate L2 irradiance\n\tfloat x = worldNormal.x, y = worldNormal.y, z = worldNormal.z;\n\n\tvec3 result = c0 * 0.886227;\n\tresult += c1 * 2.0 * 0.511664 * y;\n\tresult += c2 * 2.0 * 0.511664 * z;\n\tresult += c3 * 2.0 * 0.511664 * x;\n\tresult += c4 * 2.0 * 0.429043 * x * y;\n\tresult += c5 * 2.0 * 0.429043 * y * z;\n\tresult += c6 * ( 0.743125 * z * z - 0.247708 );\n\tresult += c7 * 2.0 * 0.429043 * x * z;\n\tresult += c8 * 0.429043 * ( x * x - y * y );\n\n\treturn max( result, vec3( 0.0 ) );\n\n}\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_begin.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_begin.glsl.d.ts new file mode 100644 index 000000000..2293478f4 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_begin.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n/**\n * This is a template that can be used to light a material, it uses pluggable\n * RenderEquations (RE)for specific lighting scenarios.\n *\n * Instructions for use:\n * - Ensure that both RE_Direct, RE_IndirectDiffuse and RE_IndirectSpecular are defined\n * - Create a material parameter that is to be passed as the third parameter to your lighting functions.\n *\n * TODO:\n * - Add area light support.\n * - Add sphere light support.\n * - Add diffuse light probe (irradiance cubemap) support.\n */\n\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n\n#ifdef USE_CLEARCOAT\n\n\tgeometryClearcoatNormal = clearcoatNormal;\n\n#endif\n\n#ifdef USE_IRIDESCENCE\n\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\n\tif ( material.iridescenceThickness == 0.0 ) {\n\n\t\tmaterial.iridescence = 0.0;\n\n\t} else {\n\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\n\t}\n\n\tif ( material.iridescence > 0.0 ) {\n\n\t\tmaterial.iridescenceFresnelDielectric = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceFresnelMetallic = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.diffuseColor );\n\n\t\tmaterial.iridescenceFresnel = mix( material.iridescenceFresnelDielectric, material.iridescenceFresnelMetallic, material.metalness );\n\n\t\t// Iridescence F0 approximation\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\n\t}\n\n#endif\n\nIncidentLight directLight;\n\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\n\t\tpointLight = pointLights[ i ];\n\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\n\t\tspotLight = spotLights[ i ];\n\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\n\t\t// spot lights are ordered [shadows with maps, shadows without maps, maps without shadows, none]\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\n\t\tdirectionalLight = directionalLights[ i ];\n\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\n\tRectAreaLight rectAreaLight;\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if defined( RE_IndirectDiffuse )\n\n\tvec3 iblIrradiance = vec3( 0.0 );\n\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\n\t#if defined( USE_LIGHT_PROBES )\n\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\n\t#endif\n\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\n\t\t}\n\t\t#pragma unroll_loop_end\n\n\t#endif\n\n\t#ifdef USE_LIGHT_PROBES_GRID\n\n\t\tvec3 probeWorldPos = ( ( vec4( geometryPosition, 1.0 ) - viewMatrix[ 3 ] ) * viewMatrix ).xyz;\n\t\tvec3 probeWorldNormal = inverseTransformDirection( geometryNormal, viewMatrix );\n\t\tirradiance += getLightProbeGridIrradiance( probeWorldPos, probeWorldNormal );\n\n\t#endif\n\n#endif\n\n#if defined( RE_IndirectSpecular )\n\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_end.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_end.glsl.d.ts new file mode 100644 index 000000000..247915d2a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_end.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#if defined( RE_IndirectDiffuse )\n\n\t#if defined( LAMBERT ) || defined( PHONG )\n\n\t\tirradiance += iblIrradiance;\n\n\t#endif\n\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\n#endif\n\n#if defined( RE_IndirectSpecular )\n\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_maps.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_maps.glsl.d.ts new file mode 100644 index 000000000..be37cbe29 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_maps.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#if defined( RE_IndirectDiffuse )\n\n\t#ifdef USE_LIGHTMAP\n\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\n\t\tirradiance += lightMapIrradiance;\n\n\t#endif\n\n\t#if defined( USE_ENVMAP ) && defined( ENVMAP_TYPE_CUBE_UV )\n\n\t\t#if defined( STANDARD ) || defined( LAMBERT ) || defined( PHONG )\n\n\t\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\n\t\t#endif\n\n\t#endif\n\n#endif\n\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\n\t#ifdef USE_ANISOTROPY\n\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\n\t#else\n\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\n\t#endif\n\n\t#ifdef USE_CLEARCOAT\n\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\n\t#endif\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_lambert_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_lambert_fragment.glsl.d.ts new file mode 100644 index 000000000..7d7c7ceeb --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_lambert_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\nLambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_lambert_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_lambert_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..5ea7d176c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_lambert_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\nvarying vec3 vViewPosition;\n\nstruct LambertMaterial {\n\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n\n};\n\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\n}\n\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\n}\n\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_pars_begin.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_pars_begin.glsl.d.ts new file mode 100644 index 000000000..c6169e6a1 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_pars_begin.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\nuniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n\n#if defined( USE_LIGHT_PROBES )\n\n\tuniform vec3 lightProbe[ 9 ];\n\n#endif\n\n// get the irradiance (radiance convolved with cosine lobe) at the point 'normal' on the unit sphere\n// source: https://graphics.stanford.edu/papers/envmap/envmap.pdf\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\n\t// normal is assumed to have unit length\n\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\n\t// band 0\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\n\t// band 1\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\n\t// band 2\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\n\treturn result;\n\n}\n\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\n\tvec3 worldNormal = transformNormalByInverseViewMatrix( normal, viewMatrix );\n\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\n\treturn irradiance;\n\n}\n\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\n\tvec3 irradiance = ambientLightColor;\n\n\treturn irradiance;\n\n}\n\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\n\t// based upon Frostbite 3 Moving to Physically-based Rendering\n\t// page 32, equation 26: E[window1]\n\t// https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\n\tif ( cutoffDistance > 0.0 ) {\n\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\n\t}\n\n\treturn distanceFalloff;\n\n}\n\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n\n}\n\n#if NUM_DIR_LIGHTS > 0\n\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\n\t}\n\n#endif\n\n\n#if NUM_POINT_LIGHTS > 0\n\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\n\t// light is an out parameter as having it as a return value caused compiler errors on some devices\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\n\t\tlight.direction = normalize( lVector );\n\n\t\tfloat lightDistance = length( lVector );\n\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\n\t}\n\n#endif\n\n\n#if NUM_SPOT_LIGHTS > 0\n\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\n\t// light is an out parameter as having it as a return value caused compiler errors on some devices\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\n\t\tlight.direction = normalize( lVector );\n\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\n\t\tif ( spotAttenuation > 0.0 ) {\n\n\t\t\tfloat lightDistance = length( lVector );\n\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\n\t\t} else {\n\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\n\t\t}\n\n\t}\n\n#endif\n\n\n#if NUM_RECT_AREA_LIGHTS > 0\n\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\n\t// Pre-computed values of LinearTransformedCosine approximation of BRDF\n\t// BRDF approximation Texture is 64x64\n\tuniform sampler2D ltc_1; // RGBA Float\n\tuniform sampler2D ltc_2; // RGBA Float\n\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n\n#endif\n\n\n#if NUM_HEMI_LIGHTS > 0\n\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\n\t\treturn irradiance;\n\n\t}\n\n#endif\n\n#include \n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_phong_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_phong_fragment.glsl.d.ts new file mode 100644 index 000000000..da03357bf --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_phong_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\nBlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_phong_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_phong_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..be47604ec --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_phong_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\nvarying vec3 vViewPosition;\n\nstruct BlinnPhongMaterial {\n\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n\n};\n\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n\n}\n\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\n}\n\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.d.ts new file mode 100644 index 000000000..0d87feeb4 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\nPhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.diffuseContribution = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.metalness = metalnessFactor;\n\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\n\nmaterial.roughness = max( roughnessFactor, 0.0525 );// 0.0525 corresponds to the base mip of a 256 cubemap.\nmaterial.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n\n#ifdef IOR\n\n\tmaterial.ior = ior;\n\n\t#ifdef USE_SPECULAR\n\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\n\t\t#endif\n\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\n\t\t#endif\n\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\n\t#else\n\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\n\t#endif\n\n\tmaterial.specularColor = min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor;\n\tmaterial.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );\n\n#else\n\n\tmaterial.specularColor = vec3( 0.04 );\n\tmaterial.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n\n#endif\n\n#ifdef USE_CLEARCOAT\n\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\n\t#ifdef USE_CLEARCOATMAP\n\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\n\t#endif\n\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\n\t#endif\n\n\tmaterial.clearcoat = saturate( material.clearcoat ); // Burley clearcoat model\n\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n\n#endif\n\n#ifdef USE_DISPERSION\n\n\tmaterial.dispersion = dispersion;\n\n#endif\n\n#ifdef USE_IRIDESCENCE\n\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\n\t#ifdef USE_IRIDESCENCEMAP\n\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\n\t#endif\n\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\n\t#else\n\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\n\t#endif\n\n#endif\n\n#ifdef USE_SHEEN\n\n\tmaterial.sheenColor = sheenColor;\n\n\t#ifdef USE_SHEEN_COLORMAP\n\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\n\t#endif\n\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.0001, 1.0 );\n\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\n\t#endif\n\n#endif\n\n#ifdef USE_ANISOTROPY\n\n\t#ifdef USE_ANISOTROPYMAP\n\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\n\t#else\n\n\t\tvec2 anisotropyV = anisotropyVector;\n\n\t#endif\n\n\tmaterial.anisotropy = length( anisotropyV );\n\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\n\t// Roughness along the anisotropy bitangent is the material roughness, while the tangent roughness increases with anisotropy.\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..5bb0391c8 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n\nuniform sampler2D dfgLUT;\n\nstruct PhysicalMaterial {\n\n\tvec3 diffuseColor;\n\tvec3 diffuseContribution;\n\tvec3 specularColor;\n\tvec3 specularColorBlended;\n\n\tfloat roughness;\n\tfloat metalness;\n\tfloat specularF90;\n\tfloat dispersion;\n\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t\tvec3 iridescenceFresnelDielectric;\n\t\tvec3 iridescenceFresnelMetallic;\n\t#endif\n\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n\n};\n\n// temporary\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\n\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\n\n// Moving Frostbite to Physically Based Rendering 3.0 - page 12, listing 2\n// https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\n\treturn 0.5 / max( gv + gl, EPSILON );\n\n}\n\n// Microfacet Models for Refraction through Rough Surfaces - equation (33)\n// http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html\n// alpha is \"roughness squared\" in Disney\u2019s reparameterization\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\n\tfloat a2 = pow2( alpha );\n\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; // avoid alpha = 0 with dotNH = 1\n\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n\n}\n\n// https://google.github.io/filament/Filament.md.html#materialsystem/anisotropicmodel/anisotropicspecularbrdf\n#ifdef USE_ANISOTROPY\n\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\treturn 0.5 / max( gv + gl, EPSILON );\n\n\t}\n\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\n\t}\n\n#endif\n\n#ifdef USE_CLEARCOAT\n\n\t// GGX Distribution, Schlick Fresnel, GGX_SmithCorrelated Visibility\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\n\t\tfloat alpha = pow2( roughness ); // UE4's roughness\n\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\n\t\tfloat D = D_GGX( alpha, dotNH );\n\n\t\treturn F * ( V * D );\n\n\t}\n\n#endif\n\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\n\tvec3 f0 = material.specularColorBlended;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\n\tfloat alpha = pow2( roughness ); // UE4's roughness\n\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\n\t#ifdef USE_IRIDESCENCE\n\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\n\t#endif\n\n\t#ifdef USE_ANISOTROPY\n\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\n\t#else\n\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\n\t\tfloat D = D_GGX( alpha, dotNH );\n\n\t#endif\n\n\treturn F * ( V * D );\n\n}\n\n// Rect Area Light\n\n// Real-Time Polygonal-Light Shading with Linearly Transformed Cosines\n// by Eric Heitz, Jonathan Dupuy, Stephen Hill and David Neubelt\n// code: https://github.com/selfshadow/ltc_code/\n\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\n\tfloat dotNV = saturate( dot( N, V ) );\n\n\t// texture parameterized by sqrt( GGX alpha ) and sqrt( 1 - cos( theta ) )\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\n\treturn uv;\n\n}\n\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\n\t// Real-Time Area Lighting: a Journey from Research to Production (p.102)\n\t// An approximation of the form factor of a horizon-clipped rectangle.\n\n\tfloat l = length( f );\n\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n\n}\n\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\n\tfloat x = dot( v1, v2 );\n\n\tfloat y = abs( x );\n\n\t// rational polynomial approximation to theta / sin( theta ) / 2PI\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\n\treturn cross( v1, v2 ) * theta_sintheta;\n\n}\n\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\n\t// bail if point is on back side of plane of light\n\t// assumes ccw winding order of light vertices\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\n\t// construct orthonormal basis around N\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 ); // negated from paper; possibly due to a different handedness of world coordinate system\n\n\t// compute transform\n\tmat3 mat = mInv * transpose( mat3( T1, T2, N ) );\n\n\t// transform rect\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\n\t// project rect onto sphere\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\n\t// calculate vector form factor\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\n\t// adjust for horizon clipping\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\n/*\n\t// alternate method of adjusting for horizon clipping (see reference)\n\t// refactoring required\n\tfloat len = length( vectorFormFactor );\n\tfloat z = vectorFormFactor.z / len;\n\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\n\t// tabulated horizon-clipped sphere, apparently...\n\tvec2 uv = vec2( z * 0.5 + 0.5, len );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\n\tfloat scale = texture2D( ltc_2, uv ).w;\n\n\tfloat result = len * scale;\n*/\n\n\treturn vec3( result );\n\n}\n\n// End Rect Area Light\n\n#if defined( USE_SHEEN )\n\n// https://github.com/google/filament/blob/master/shaders/src/brdf.fs\nfloat D_Charlie( float roughness, float dotNH ) {\n\n\tfloat alpha = pow2( roughness );\n\n\t// Estevez and Kulla 2017, \"Production Friendly Microfacet Sheen BRDF\"\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 ); // 2^(-14/2), so sin2h^2 > 0 in fp16\n\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n\n}\n\n// https://github.com/google/filament/blob/master/shaders/src/brdf.fs\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\n\t// Neubelt and Pettineo 2013, \"Crafting a Next-gen Material Pipeline for The Order: 1886\"\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n\n}\n\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\n\treturn sheenColor * ( D * V );\n\n}\n\n#endif\n\n// This is a curve-fit approximation to the \"Charlie sheen\" BRDF integrated over the hemisphere from\n// Estevez and Kulla 2017, \"Production Friendly Microfacet Sheen BRDF\".\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\n\tfloat r2 = roughness * roughness;\n\tfloat rInv = 1.0 / ( roughness + 0.1 );\n\n\tfloat a = -1.9362 + 1.0678 * roughness + 0.4573 * r2 - 0.8469 * rInv;\n\tfloat b = -0.6014 + 0.5538 * roughness - 0.4670 * r2 - 0.1255 * rInv;\n\n\tfloat DG = exp( a * dotNV + b );\n\n\treturn saturate( DG );\n\n}\n\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;\n\n\treturn specularColor * fab.x + specularF90 * fab.y;\n\n}\n\n// Fdez-Ag\u00FCera's \"Multiple-Scattering Microfacet Model for Real-Time Image Based Lighting\"\n// Approximates multiscattering in order to preserve energy.\n// http://www.jcgt.org/published/0008/01/03/\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;\n\n\t#ifdef USE_IRIDESCENCE\n\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\n\t#else\n\n\t\tvec3 Fr = specularColor;\n\n\t#endif\n\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; // 1/21\n\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n\n}\n\n// GGX BRDF with multi-scattering energy compensation for direct lighting\n// Based on \"Practical Multiple Scattering Compensation for Microfacet Models\"\n// https://blog.selfshadow.com/publications/turquin/ms_comp_final.pdf\nvec3 BRDF_GGX_Multiscatter( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\n\t// Single-scattering BRDF (standard GGX)\n\tvec3 singleScatter = BRDF_GGX( lightDir, viewDir, normal, material );\n\n\t// Multi-scattering compensation\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\n\t// Precomputed DFG values for view and light directions\n\tvec2 dfgV = texture2D( dfgLUT, vec2( material.roughness, dotNV ) ).rg;\n\tvec2 dfgL = texture2D( dfgLUT, vec2( material.roughness, dotNL ) ).rg;\n\n\t// Single-scattering energy for view and light\n\tvec3 FssEss_V = material.specularColorBlended * dfgV.x + material.specularF90 * dfgV.y;\n\tvec3 FssEss_L = material.specularColorBlended * dfgL.x + material.specularF90 * dfgL.y;\n\n\tfloat Ess_V = dfgV.x + dfgV.y;\n\tfloat Ess_L = dfgL.x + dfgL.y;\n\n\t// Energy lost to multiple scattering\n\tfloat Ems_V = 1.0 - Ess_V;\n\tfloat Ems_L = 1.0 - Ess_L;\n\n\t// Average Fresnel reflectance\n\tvec3 Favg = material.specularColorBlended + ( 1.0 - material.specularColorBlended ) * 0.047619; // 1/21\n\n\t// Multiple scattering contribution\n\tvec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg + EPSILON );\n\n\t// Energy compensation factor\n\tfloat compensationFactor = Ems_V * Ems_L;\n\n\tvec3 multiScatter = Fms * compensationFactor;\n\n\treturn singleScatter + multiScatter;\n\n}\n\n#if NUM_RECT_AREA_LIGHTS > 0\n\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight; // counterclockwise; light shines in local neg z direction\n\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\n\t\t// LTC Fresnel Approximation by Stephen Hill\n\t\t// http://blog.selfshadow.com/publications/s2016-advances/s2016_ltc_fresnel.pdf\n\t\tvec3 fresnel = ( material.specularColorBlended * t2.x + ( material.specularF90 - material.specularColorBlended ) * t2.y );\n\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseContribution * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\n\t\t#ifdef USE_CLEARCOAT\n\n\t\t\tvec3 Ncc = geometryClearcoatNormal;\n\n\t\t\tvec2 uvClearcoat = LTC_Uv( Ncc, viewDir, material.clearcoatRoughness );\n\n\t\t\tvec4 t1Clearcoat = texture2D( ltc_1, uvClearcoat );\n\t\t\tvec4 t2Clearcoat = texture2D( ltc_2, uvClearcoat );\n\n\t\t\tmat3 mInvClearcoat = mat3(\n\t\t\t\tvec3( t1Clearcoat.x, 0, t1Clearcoat.y ),\n\t\t\t\tvec3( 0, 1, 0 ),\n\t\t\t\tvec3( t1Clearcoat.z, 0, t1Clearcoat.w )\n\t\t\t);\n\n\t\t\t// LTC Fresnel Approximation for clearcoat\n\t\t\tvec3 fresnelClearcoat = material.clearcoatF0 * t2Clearcoat.x + ( material.clearcoatF90 - material.clearcoatF0 ) * t2Clearcoat.y;\n\n\t\t\tclearcoatSpecularDirect += lightColor * fresnelClearcoat * LTC_Evaluate( Ncc, viewDir, position, mInvClearcoat, rectCoords );\n\n\t\t#endif\n\n\t}\n\n#endif\n\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\n\tvec3 irradiance = dotNL * directLight.color;\n\n\t#ifdef USE_CLEARCOAT\n\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\n\t#endif\n\n\t#ifdef USE_SHEEN\n \n \t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n \n \t\tfloat sheenAlbedoV = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n \t\tfloat sheenAlbedoL = IBLSheenBRDF( geometryNormal, directLight.direction, material.sheenRoughness );\n \n \t\tfloat sheenEnergyComp = 1.0 - max3( material.sheenColor ) * max( sheenAlbedoV, sheenAlbedoL );\n \n \t\tirradiance *= sheenEnergyComp;\n \n \t#endif\n\n\treflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material );\n\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseContribution );\n}\n\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\n\tvec3 diffuse = irradiance * BRDF_Lambert( material.diffuseContribution );\n\n\t#ifdef USE_SHEEN\n\n\t\tfloat sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\n\t\tfloat sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;\n\n\t\tdiffuse *= sheenEnergyComp;\n\n\t#endif\n\n\treflectedLight.indirectDiffuse += diffuse;\n\n}\n\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\n\t#ifdef USE_CLEARCOAT\n\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\n\t#endif\n\n\t#ifdef USE_SHEEN\n\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ) * RECIPROCAL_PI;\n\n \t#endif\n\n\t// Both indirect specular and indirect diffuse light accumulate here\n\t// Compute multiscattering separately for dielectric and metallic, then mix\n\n\tvec3 singleScatteringDielectric = vec3( 0.0 );\n\tvec3 multiScatteringDielectric = vec3( 0.0 );\n\n\tvec3 singleScatteringMetallic = vec3( 0.0 );\n\tvec3 multiScatteringMetallic = vec3( 0.0 );\n\n\t#ifdef USE_IRIDESCENCE\n\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnelDielectric, material.roughness, singleScatteringDielectric, multiScatteringDielectric );\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.iridescence, material.iridescenceFresnelMetallic, material.roughness, singleScatteringMetallic, multiScatteringMetallic );\n\n\t#else\n\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScatteringDielectric, multiScatteringDielectric );\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.roughness, singleScatteringMetallic, multiScatteringMetallic );\n\n\t#endif\n\n\t// Mix based on metalness\n\tvec3 singleScattering = mix( singleScatteringDielectric, singleScatteringMetallic, material.metalness );\n\tvec3 multiScattering = mix( multiScatteringDielectric, multiScatteringMetallic, material.metalness );\n\n\t// Diffuse energy conservation uses dielectric path\n\tvec3 totalScatteringDielectric = singleScatteringDielectric + multiScatteringDielectric;\n\tvec3 diffuse = material.diffuseContribution * ( 1.0 - totalScatteringDielectric );\n\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\n\tvec3 indirectSpecular = radiance * singleScattering;\n\tindirectSpecular += multiScattering * cosineWeightedIrradiance;\n\n\tvec3 indirectDiffuse = diffuse * cosineWeightedIrradiance;\n\n\t#ifdef USE_SHEEN\n\n\t\tfloat sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\n\t\tfloat sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;\n\n\t\tindirectSpecular *= sheenEnergyComp;\n\t\tindirectDiffuse *= sheenEnergyComp;\n\n\t#endif\n\n\treflectedLight.indirectSpecular += indirectSpecular;\n\treflectedLight.indirectDiffuse += indirectDiffuse;\n\n}\n\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n\n// ref: https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n\n}\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_toon_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_toon_fragment.glsl.d.ts new file mode 100644 index 000000000..a113ed7ee --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_toon_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\nToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_toon_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_toon_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..20ff9bef9 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_toon_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\nvarying vec3 vViewPosition;\n\nstruct ToonMaterial {\n\n\tvec3 diffuseColor;\n\n};\n\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\n}\n\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\n}\n\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_fragment.glsl.d.ts new file mode 100644 index 000000000..20e28af12 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )\n\n\t// Doing a strict comparison with == 1.0 can cause noise artifacts\n\t// on some platforms. See issue #17623.\n\tgl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..69a279337 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )\n\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_vertex.glsl.d.ts new file mode 100644 index 000000000..ee342c244 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\n\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_vertex.glsl.d.ts new file mode 100644 index 000000000..582385491 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\n\n\tvFragDepth = 1.0 + gl_Position.w;\n\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_fragment.glsl.d.ts new file mode 100644 index 000000000..c433444b0 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_MAP\n\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\n\t#ifdef DECODE_VIDEO_TEXTURE\n\n\t\t// use inline sRGB decode until browsers properly support SRGB8_ALPHA8 with video textures (#26516)\n\n\t\tsampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );\n\n\t#endif\n\n\tdiffuseColor *= sampledDiffuseColor;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..1bcb0e9fd --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_MAP\n\n\tuniform sampler2D map;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_particle_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_particle_fragment.glsl.d.ts new file mode 100644 index 000000000..274c1350e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_particle_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\n\t#if defined( USE_POINTS_UV )\n\n\t\tvec2 uv = vUv;\n\n\t#else\n\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\n\t#endif\n\n#endif\n\n#ifdef USE_MAP\n\n\tdiffuseColor *= texture2D( map, uv );\n\n#endif\n\n#ifdef USE_ALPHAMAP\n\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_particle_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_particle_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..2cf3023a2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_particle_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#if defined( USE_POINTS_UV )\n\n\tvarying vec2 vUv;\n\n#else\n\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\n\t\tuniform mat3 uvTransform;\n\n\t#endif\n\n#endif\n\n#ifdef USE_MAP\n\n\tuniform sampler2D map;\n\n#endif\n\n#ifdef USE_ALPHAMAP\n\n\tuniform sampler2D alphaMap;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/metalnessmap_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/metalnessmap_fragment.glsl.d.ts new file mode 100644 index 000000000..a1169d5f9 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/metalnessmap_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\nfloat metalnessFactor = metalness;\n\n#ifdef USE_METALNESSMAP\n\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\n\t// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tmetalnessFactor *= texelMetalness.b;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/metalnessmap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/metalnessmap_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..1f17ea17d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/metalnessmap_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_METALNESSMAP\n\n\tuniform sampler2D metalnessMap;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphcolor_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphcolor_vertex.glsl.d.ts new file mode 100644 index 000000000..2bbdcb4bb --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphcolor_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#if defined( USE_MORPHCOLORS )\n\n\t// morphTargetBaseInfluence is set based on BufferGeometry.morphTargetsRelative value:\n\t// When morphTargetsRelative is false, this is set to 1 - sum(influences); this results in normal = sum((target - base) * influence)\n\t// When morphTargetsRelative is true, this is set to 1; as a result, all morph targets are simply added to the base after weighting\n\tvColor *= morphTargetBaseInfluence;\n\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\n\t\t#if defined( USE_COLOR_ALPHA )\n\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\n\t\t#elif defined( USE_COLOR )\n\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\n\t\t#endif\n\n\t}\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphinstance_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphinstance_vertex.glsl.d.ts new file mode 100644 index 000000000..e90281801 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphinstance_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_INSTANCING_MORPH\n\n\tfloat morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\n\tfloat morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\n\t\tmorphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n\n\t}\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphnormal_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphnormal_vertex.glsl.d.ts new file mode 100644 index 000000000..9e1a7c480 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphnormal_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_MORPHNORMALS\n\n\t// morphTargetBaseInfluence is set based on BufferGeometry.morphTargetsRelative value:\n\t// When morphTargetsRelative is false, this is set to 1 - sum(influences); this results in normal = sum((target - base) * influence)\n\t// When morphTargetsRelative is true, this is set to 1; as a result, all morph targets are simply added to the base after weighting\n\tobjectNormal *= morphTargetBaseInfluence;\n\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\n\t}\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphtarget_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphtarget_pars_vertex.glsl.d.ts new file mode 100644 index 000000000..66bb19332 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphtarget_pars_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_MORPHTARGETS\n\n\t#ifndef USE_INSTANCING_MORPH\n\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\n\t#endif\n\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\n\t}\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphtarget_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphtarget_vertex.glsl.d.ts new file mode 100644 index 000000000..e65f0a031 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphtarget_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_MORPHTARGETS\n\n\t// morphTargetBaseInfluence is set based on BufferGeometry.morphTargetsRelative value:\n\t// When morphTargetsRelative is false, this is set to 1 - sum(influences); this results in position = sum((target - base) * influence)\n\t// When morphTargetsRelative is true, this is set to 1; as a result, all morph targets are simply added to the base after weighting\n\ttransformed *= morphTargetBaseInfluence;\n\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\n\t}\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_fragment_begin.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_fragment_begin.glsl.d.ts new file mode 100644 index 000000000..148a7b65c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_fragment_begin.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\nfloat faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n\n#ifdef FLAT_SHADED\n\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n\n#else\n\n\tvec3 normal = normalize( vNormal );\n\n\t#ifdef DOUBLE_SIDED\n\n\t\tnormal *= faceDirection;\n\n\t#endif\n\n#endif\n\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\n\t#ifdef USE_TANGENT\n\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\n\t#else\n\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\n\t#endif\n\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\n\t#endif\n\n#endif\n\n#ifdef USE_CLEARCOAT_NORMALMAP\n\n\t#ifdef USE_TANGENT\n\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\n\t#else\n\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\n\t#endif\n\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\n\t#endif\n\n#endif\n\n// non perturbed normal for clearcoat among others\n\nvec3 nonPerturbedNormal = normal;\n\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_fragment_maps.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_fragment_maps.glsl.d.ts new file mode 100644 index 000000000..69ee51c6d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_fragment_maps.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; // overrides both flatShading and attribute normals\n\n\t#ifdef FLIP_SIDED\n\n\t\tnormal = - normal;\n\n\t#endif\n\n\t#ifdef DOUBLE_SIDED\n\n\t\tnormal = normal * faceDirection;\n\n\t#endif\n\n\tnormal = normalize( normalMatrix * normal );\n\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\n\t#if defined( USE_PACKED_NORMALMAP )\n\n\t\tmapN = vec3( mapN.xy, sqrt( saturate( 1.0 - dot( mapN.xy, mapN.xy ) ) ) );\n\n\t#endif\n\n\tmapN.xy *= normalScale;\n\n\tnormal = normalize( tbn * mapN );\n\n#elif defined( USE_BUMPMAP )\n\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..069c529cd --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifndef FLAT_SHADED\n\n\tvarying vec3 vNormal;\n\n\t#ifdef USE_TANGENT\n\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\n\t#endif\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_pars_vertex.glsl.d.ts new file mode 100644 index 000000000..069c529cd --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_pars_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifndef FLAT_SHADED\n\n\tvarying vec3 vNormal;\n\n\t#ifdef USE_TANGENT\n\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\n\t#endif\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_vertex.glsl.d.ts new file mode 100644 index 000000000..a0137068f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifndef FLAT_SHADED // normal is computed with derivatives when FLAT_SHADED\n\n\tvNormal = normalize( transformedNormal );\n\n\t#ifdef USE_TANGENT\n\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\n\t#endif\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normalmap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normalmap_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..34eba1c99 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normalmap_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_NORMALMAP\n\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\n#endif\n\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\n\tuniform mat3 normalMatrix;\n\n#endif\n\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\n\t// Normal Mapping Without Precomputed Tangents\n\t// http://www.thetenthplanet.de/archives/1180\n\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\n\t\tvec3 N = surf_norm; // normalized\n\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\n\t\treturn mat3( T * scale, B * scale, N );\n\n\t}\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/opaque_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/opaque_fragment.glsl.d.ts new file mode 100644 index 000000000..30b98b9ed --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/opaque_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\n\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/packing.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/packing.glsl.d.ts new file mode 100644 index 000000000..3d9dc4d37 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/packing.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\nvec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\n\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\n\nconst float PackUpscale = 256. / 255.; // fraction -> 0..1 (including 1)\nconst float UnpackDownscale = 255. / 256.; // 0..1 -> fraction (excluding 1)\nconst float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\n\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\n\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\n\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\n\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\t// the 0.9999 tweak is unimportant, very tiny empirical improvement\n\t// return vec3( vuf * Inv255, gf * PackUpscale, bf * 0.9999 );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\n\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\n\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\n\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\n\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\n\nvec4 pack2HalfToRGBA( const in vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\n\nvec2 unpackRGBATo2Half( const in vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\n\n// NOTE: viewZ, the z-coordinate in camera space, is negative for points in front of the camera\n\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\t// -near maps to 0; -far maps to 1\n\treturn ( viewZ + near ) / ( near - far );\n}\n\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\n\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\n\t\treturn depth * ( far - near ) - far;\n\n\t#else\n\n\t\treturn depth * ( near - far ) - near;\n\n\t#endif\n}\n\n// NOTE: https://twitter.com/gonnavis/status/1377183786949959682\n\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\t// -near maps to 0; -far maps to 1\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\n\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\t\n\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\n\t\treturn ( near * far ) / ( ( near - far ) * depth - near );\n\n\t#else\n\n\t\treturn ( near * far ) / ( ( far - near ) * depth - far );\n\n\t#endif\n}\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/premultiplied_alpha_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/premultiplied_alpha_fragment.glsl.d.ts new file mode 100644 index 000000000..72a909a98 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/premultiplied_alpha_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef PREMULTIPLIED_ALPHA\n\n\tgl_FragColor.rgb *= gl_FragColor.a;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/project_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/project_vertex.glsl.d.ts new file mode 100644 index 000000000..69daad77e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/project_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\nvec4 mvPosition = vec4( transformed, 1.0 );\n\n#ifdef USE_BATCHING\n\n\tmvPosition = batchingMatrix * mvPosition;\n\n#endif\n\n#ifdef USE_INSTANCING\n\n\tmvPosition = instanceMatrix * mvPosition;\n\n#endif\n\nmvPosition = modelViewMatrix * mvPosition;\n\ngl_Position = projectionMatrix * mvPosition;\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/roughnessmap_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/roughnessmap_fragment.glsl.d.ts new file mode 100644 index 000000000..51df63905 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/roughnessmap_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\nfloat roughnessFactor = roughness;\n\n#ifdef USE_ROUGHNESSMAP\n\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\n\t// reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\troughnessFactor *= texelRoughness.g;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/roughnessmap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/roughnessmap_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..41e9d78a5 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/roughnessmap_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_ROUGHNESSMAP\n\n\tuniform sampler2D roughnessMap;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..2f86cbb4a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#if NUM_SPOT_LIGHT_COORDS > 0\n\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n\n#endif\n\n#if NUM_SPOT_LIGHT_MAPS > 0\n\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n\n#endif\n\n#ifdef USE_SHADOWMAP\n\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\n\t\t\tuniform sampler2DShadow directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\n\t\t#else\n\n\t\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\n\t\t#endif\n\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\n\t#endif\n\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\n\t\t\tuniform sampler2DShadow spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\n\t\t#else\n\n\t\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\n\t\t#endif\n\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\n\t#endif\n\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\n\t\t\tuniform samplerCubeShadow pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\n\t\t#elif defined( SHADOWMAP_TYPE_BASIC )\n\n\t\t\tuniform samplerCube pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\n\t\t#endif\n\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\n\t#endif\n\n\t#if defined( SHADOWMAP_TYPE_PCF )\n\n\t\t// Interleaved Gradient Noise for randomizing sampling patterns\n\t\tfloat interleavedGradientNoise( vec2 position ) {\n\n\t\t\treturn fract( 52.9829189 * fract( dot( position, vec2( 0.06711056, 0.00583715 ) ) ) );\n\n\t\t}\n\n\t\t// Vogel disk sampling for uniform circular distribution\n\t\tvec2 vogelDiskSample( int sampleIndex, int samplesCount, float phi ) {\n\n\t\t\tconst float goldenAngle = 2.399963229728653;\n\t\t\tfloat r = sqrt( ( float( sampleIndex ) + 0.5 ) / float( samplesCount ) );\n\t\t\tfloat theta = float( sampleIndex ) * goldenAngle + phi;\n\t\t\treturn vec2( cos( theta ), sin( theta ) ) * r;\n\n\t\t}\n\n\t#endif\n\n\t#if defined( SHADOWMAP_TYPE_PCF )\n\n\t\tfloat getShadow( sampler2DShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\n\t\t\tfloat shadow = 1.0;\n\n\t\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\t\tshadowCoord.z += shadowBias;\n\n\t\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\n\t\t\tif ( frustumTest ) {\n\n\t\t\t\t// Hardware PCF with LinearFilter gives us 4-tap filtering per sample\n\t\t\t\t// 5 samples using Vogel disk + IGN = effectively 20 filtered taps with better distribution\n\t\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\t\tfloat radius = shadowRadius * texelSize.x;\n\n\t\t\t\t// Use IGN to rotate sampling pattern per pixel\n\t\t\t\tfloat phi = interleavedGradientNoise( gl_FragCoord.xy ) * PI2;\n\n\t\t\t\tshadow = (\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 0, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 1, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 2, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 3, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 4, 5, phi ) * radius, shadowCoord.z ) )\n\t\t\t\t) * 0.2;\n\n\t\t\t}\n\n\t\t\treturn mix( 1.0, shadow, shadowIntensity );\n\n\t\t}\n\n\t#elif defined( SHADOWMAP_TYPE_VSM )\n\n\t\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\n\t\t\tfloat shadow = 1.0;\n\n\t\t\tshadowCoord.xyz /= shadowCoord.w;\n\n\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\n\t\t\t\tshadowCoord.z -= shadowBias;\n\n\t\t\t#else\n\n\t\t\t\tshadowCoord.z += shadowBias;\n\n\t\t\t#endif\n\n\t\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\n\t\t\tif ( frustumTest ) {\n\n\t\t\t\tvec2 distribution = texture2D( shadowMap, shadowCoord.xy ).rg;\n\n\t\t\t\tfloat mean = distribution.x;\n\t\t\t\tfloat variance = distribution.y * distribution.y;\n\n\t\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\n\t\t\t\t\tfloat hard_shadow = step( mean, shadowCoord.z );\n\n\t\t\t\t#else\n\n\t\t\t\t\tfloat hard_shadow = step( shadowCoord.z, mean );\n\n\t\t\t\t#endif\n\t\t\t\t\n\t\t\t\t// Early return if fully lit\n\t\t\t\tif ( hard_shadow == 1.0 ) {\n\n\t\t\t\t\tshadow = 1.0;\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// Variance must be non-zero to avoid division by zero\n\t\t\t\t\tvariance = max( variance, 0.0000001 );\n\n\t\t\t\t\t// Distance from mean\n\t\t\t\t\tfloat d = shadowCoord.z - mean;\n\n\t\t\t\t\t// Chebyshev's inequality for upper bound on probability\n\t\t\t\t\tfloat p_max = variance / ( variance + d * d );\n\n\t\t\t\t\t// Reduce light bleeding by remapping [amount, 1] to [0, 1]\n\t\t\t\t\tp_max = clamp( ( p_max - 0.3 ) / 0.65, 0.0, 1.0 );\n\n\t\t\t\t\tshadow = max( hard_shadow, p_max );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn mix( 1.0, shadow, shadowIntensity );\n\n\t\t}\n\n\t#else // SHADOWMAP_TYPE_BASIC\n\n\t\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\n\t\t\tfloat shadow = 1.0;\n\n\t\t\tshadowCoord.xyz /= shadowCoord.w;\n\n\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\n\t\t\t\tshadowCoord.z -= shadowBias;\n\n\t\t\t#else\n\n\t\t\t\tshadowCoord.z += shadowBias;\n\n\t\t\t#endif\n\n\t\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\n\t\t\tif ( frustumTest ) {\n\n\t\t\t\tfloat depth = texture2D( shadowMap, shadowCoord.xy ).r;\n\n\t\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\n\t\t\t\t\tshadow = step( depth, shadowCoord.z );\n\n\t\t\t\t#else\n\n\t\t\t\t\tshadow = step( shadowCoord.z, depth );\n\n\t\t\t\t#endif\n\n\t\t\t}\n\n\t\t\treturn mix( 1.0, shadow, shadowIntensity );\n\n\t\t}\n\n\t#endif\n\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\n\t#if defined( SHADOWMAP_TYPE_PCF )\n\n\tfloat getPointShadow( samplerCubeShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\n\t\tfloat shadow = 1.0;\n\n\t\t// for point lights, the uniform @vShadowCoord is re-purposed to hold\n\t\t// the vector from the light to the world-space position of the fragment.\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\n\t\t// Direction from light to fragment\n\t\tvec3 bd3D = normalize( lightToPosition );\n\n\t\t// For cube shadow maps, depth is stored as distance along each face's view axis, not radial distance\n\t\t// The view-space depth is the maximum component of the direction vector (which face is sampled)\n\t\tvec3 absVec = abs( lightToPosition );\n\t\tfloat viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );\n\n\t\tif ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {\n\n\t\t\t// viewZ to perspective depth\n\n\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\n\t\t\t\tfloat dp = ( shadowCameraNear * ( shadowCameraFar - viewSpaceZ ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );\n\t\t\t\tdp -= shadowBias;\n\n\t\t\t#else\n\n\t\t\t\tfloat dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );\n\t\t\t\tdp += shadowBias;\n\n\t\t\t#endif\n\n\t\t\t// Hardware PCF with LinearFilter gives us 4-tap filtering per sample\n\t\t\t// Use Vogel disk + IGN sampling for better quality\n\t\t\tfloat texelSize = shadowRadius / shadowMapSize.x;\n\n\t\t\t// Build a tangent-space coordinate system for applying offsets\n\t\t\tvec3 absDir = abs( bd3D );\n\t\t\tvec3 tangent = absDir.x > absDir.z ? vec3( 0.0, 1.0, 0.0 ) : vec3( 1.0, 0.0, 0.0 );\n\t\t\ttangent = normalize( cross( bd3D, tangent ) );\n\t\t\tvec3 bitangent = cross( bd3D, tangent );\n\n\t\t\t// Use IGN to rotate sampling pattern per pixel\n\t\t\tfloat phi = interleavedGradientNoise( gl_FragCoord.xy ) * PI2;\n\n\t\t\tvec2 sample0 = vogelDiskSample( 0, 5, phi );\n\t\t\tvec2 sample1 = vogelDiskSample( 1, 5, phi );\n\t\t\tvec2 sample2 = vogelDiskSample( 2, 5, phi );\n\t\t\tvec2 sample3 = vogelDiskSample( 3, 5, phi );\n\t\t\tvec2 sample4 = vogelDiskSample( 4, 5, phi );\n\n\t\t\tshadow = (\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * sample0.x + bitangent * sample0.y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * sample1.x + bitangent * sample1.y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * sample2.x + bitangent * sample2.y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * sample3.x + bitangent * sample3.y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * sample4.x + bitangent * sample4.y ) * texelSize, dp ) )\n\t\t\t) * 0.2;\n\n\t\t}\n\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\n\t}\n\n\t#elif defined( SHADOWMAP_TYPE_BASIC )\n\n\tfloat getPointShadow( samplerCube shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\n\t\tfloat shadow = 1.0;\n\n\t\t// for point lights, the uniform @vShadowCoord is re-purposed to hold\n\t\t// the vector from the light to the world-space position of the fragment.\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\n\t\t// For cube shadow maps, depth is stored as distance along each face's view axis, not radial distance\n\t\t// The view-space depth is the maximum component of the direction vector (which face is sampled)\n\t\tvec3 absVec = abs( lightToPosition );\n\t\tfloat viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );\n\n\t\tif ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {\n\n\t\t\t// viewZ to perspective depth\n\n\t\t\tfloat dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );\n\t\t\tdp += shadowBias;\n\n\t\t\t// Direction from light to fragment\n\t\t\tvec3 bd3D = normalize( lightToPosition );\n\n\t\t\tfloat depth = textureCube( shadowMap, bd3D ).r;\n\n\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\n\t\t\t\tdepth = 1.0 - depth;\n\n\t\t\t#endif\n\n\t\t\tshadow = step( dp, depth );\n\n\t\t}\n\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\n\t}\n\n\t#endif\n\n\t#endif\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_pars_vertex.glsl.d.ts new file mode 100644 index 000000000..2d89c27ce --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_pars_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n\n#if NUM_SPOT_LIGHT_COORDS > 0\n\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n\n#endif\n\n#ifdef USE_SHADOWMAP\n\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\n\t#endif\n\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\n\t#endif\n\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\n\t#endif\n\n\t/*\n\t#if NUM_RECT_AREA_LIGHTS > 0\n\n\t\t// TODO (abelnation): uniforms for area light shadows\n\n\t#endif\n\t*/\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_vertex.glsl.d.ts new file mode 100644 index 000000000..83b0570c8 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n\n#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\n\t#ifdef HAS_NORMAL\n\n\t\t// Offsetting the position used for querying occlusion along the world normal can be used to reduce shadow acne.\n\n\t\tvec3 shadowWorldNormal = transformNormalByInverseViewMatrix( transformedNormal, viewMatrix );\n\n\t#else\n\n\t\tvec3 shadowWorldNormal = vec3( 0.0 ); // fallback, see #21483\n\n\t#endif\n\n\tvec4 shadowWorldPosition;\n\n#endif\n\n#if defined( USE_SHADOWMAP )\n\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\n\t\t}\n\t\t#pragma unroll_loop_end\n\n\t#endif\n\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\n\t\t}\n\t\t#pragma unroll_loop_end\n\n\t#endif\n\n\t/*\n\t#if NUM_RECT_AREA_LIGHTS > 0\n\n\t\t// TODO (abelnation): update vAreaShadowCoord with area light info\n\n\t#endif\n\t*/\n\n#endif\n\n// spot lights can be evaluated without active shadow mapping (when SpotLight.map is used)\n\n#if NUM_SPOT_LIGHT_COORDS > 0\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmask_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmask_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..d8f408fc2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmask_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\nfloat getShadowMask() {\n\n\tfloat shadow = 1.0;\n\n\t#ifdef USE_SHADOWMAP\n\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\n\tDirectionalLightShadow directionalLight;\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\n\t}\n\t#pragma unroll_loop_end\n\n\t#endif\n\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\n\tSpotLightShadow spotLight;\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\n\t}\n\t#pragma unroll_loop_end\n\n\t#endif\n\n\t#if NUM_POINT_LIGHT_SHADOWS > 0 && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )\n\n\tPointLightShadow pointLight;\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\n\t}\n\t#pragma unroll_loop_end\n\n\t#endif\n\n\t/*\n\t#if NUM_RECT_AREA_LIGHTS > 0\n\n\t\t// TODO (abelnation): update shadow for Area light\n\n\t#endif\n\t*/\n\n\t#endif\n\n\treturn shadow;\n\n}\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinbase_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinbase_vertex.glsl.d.ts new file mode 100644 index 000000000..17f2cd5a8 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinbase_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_SKINNING\n\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinning_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinning_pars_vertex.glsl.d.ts new file mode 100644 index 000000000..95a28ff80 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinning_pars_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_SKINNING\n\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\n\tuniform highp sampler2D boneTexture;\n\n\tmat4 getBoneMatrix( const in float i ) {\n\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\n\t\treturn mat4( v1, v2, v3, v4 );\n\n\t}\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinning_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinning_vertex.glsl.d.ts new file mode 100644 index 000000000..34b9a3566 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinning_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_SKINNING\n\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinnormal_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinnormal_vertex.glsl.d.ts new file mode 100644 index 000000000..853e7bfd7 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinnormal_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_SKINNING\n\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\n\t#ifdef USE_TANGENT\n\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\n\t#endif\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/specularmap_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/specularmap_fragment.glsl.d.ts new file mode 100644 index 000000000..cf125b322 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/specularmap_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\nfloat specularStrength;\n\n#ifdef USE_SPECULARMAP\n\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n\n#else\n\n\tspecularStrength = 1.0;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/specularmap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/specularmap_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..c2212b978 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/specularmap_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_SPECULARMAP\n\n\tuniform sampler2D specularMap;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/tonemapping_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/tonemapping_fragment.glsl.d.ts new file mode 100644 index 000000000..a48659853 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/tonemapping_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#if defined( TONE_MAPPING )\n\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/tonemapping_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/tonemapping_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..6f9412747 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/tonemapping_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifndef saturate\n// may have defined saturate() already\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n\nuniform float toneMappingExposure;\n\n// exposure only\nvec3 LinearToneMapping( vec3 color ) {\n\n\treturn saturate( toneMappingExposure * color );\n\n}\n\n// source: https://www.cs.utah.edu/docs/techreports/2002/pdf/UUCS-02-001.pdf\nvec3 ReinhardToneMapping( vec3 color ) {\n\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n\n}\n\n// source: http://filmicworlds.com/blog/filmic-tonemapping-operators/\nvec3 CineonToneMapping( vec3 color ) {\n\n\t// filmic operator by Jim Hejl and Richard Burgess-Dawson\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n\n}\n\n// source: https://github.com/selfshadow/ltc_code/blob/master/webgl/shaders/ltc/ltc_blit.fs\nvec3 RRTAndODTFit( vec3 v ) {\n\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n\n}\n\n// this implementation of ACES is modified to accommodate a brighter viewing environment.\n// the scale factor of 1/0.6 is subjective. see discussion in #19621.\n\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\n\t// sRGB => XYZ => D65_2_D60 => AP1 => RRT_SAT\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ), // transposed from source\n\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\n\t// ODT_SAT => XYZ => D60_2_D65 => sRGB\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ), // transposed from source\n\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\n\tcolor *= toneMappingExposure / 0.6;\n\n\tcolor = ACESInputMat * color;\n\n\t// Apply RRT and ODT\n\tcolor = RRTAndODTFit( color );\n\n\tcolor = ACESOutputMat * color;\n\n\t// Clamp to [0, 1]\n\treturn saturate( color );\n\n}\n\n// Matrices for rec 2020 <> rec 709 color space conversion\n// matrix provided in row-major order so it has been transposed\n// https://www.itu.int/pub/R-REP-BT.2407-2017\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\n\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\n\n// https://iolite-engine.com/blog_posts/minimal_agx_implementation\n// Mean error^2: 3.6705141e-06\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n\n}\n\n// AgX Tone Mapping implementation based on Filament, which in turn is based\n// on Blender's implementation using rec 2020 primaries\n// https://github.com/google/filament/pull/7236\n// Inputs and outputs are encoded as Linear-sRGB.\n\nvec3 AgXToneMapping( vec3 color ) {\n\n\t// AgX constants\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\n\t// explicit AgXOutsetMatrix generated from Filaments AgXOutsetMatrixInv\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\n\t// LOG2_MIN = -10.0\n\t// LOG2_MAX = +6.5\n\t// MIDDLE_GRAY = 0.18\n\tconst float AgxMinEv = - 12.47393; // log2( pow( 2, LOG2_MIN ) * MIDDLE_GRAY )\n\tconst float AgxMaxEv = 4.026069; // log2( pow( 2, LOG2_MAX ) * MIDDLE_GRAY )\n\n\tcolor *= toneMappingExposure;\n\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\n\tcolor = AgXInsetMatrix * color;\n\n\t// Log2 encoding\n\tcolor = max( color, 1e-10 ); // avoid 0 or negative numbers for log2\n\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\n\tcolor = clamp( color, 0.0, 1.0 );\n\n\t// Apply sigmoid\n\tcolor = agxDefaultContrastApprox( color );\n\n\t// Apply AgX look\n\t// v = agxLook(v, look);\n\n\tcolor = AgXOutsetMatrix * color;\n\n\t// Linearize\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\n\t// Gamut mapping. Simple clamp for now.\n\tcolor = clamp( color, 0.0, 1.0 );\n\n\treturn color;\n\n}\n\n// https://modelviewer.dev/examples/tone-mapping\n\nvec3 NeutralToneMapping( vec3 color ) {\n\n\tconst float StartCompression = 0.8 - 0.04;\n\tconst float Desaturation = 0.15;\n\n\tcolor *= toneMappingExposure;\n\n\tfloat x = min( color.r, min( color.g, color.b ) );\n\n\tfloat offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n\n\tcolor -= offset;\n\n\tfloat peak = max( color.r, max( color.g, color.b ) );\n\n\tif ( peak < StartCompression ) return color;\n\n\tfloat d = 1. - StartCompression;\n\n\tfloat newPeak = 1. - d * d / ( peak + d - StartCompression );\n\n\tcolor *= newPeak / peak;\n\n\tfloat g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n\n\treturn mix( color, vec3( newPeak ), g );\n\n}\n\nvec3 CustomToneMapping( vec3 color ) { return color; }\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/transmission_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/transmission_fragment.glsl.d.ts new file mode 100644 index 000000000..5fa885d5f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/transmission_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_TRANSMISSION\n\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\n\t#ifdef USE_TRANSMISSIONMAP\n\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\n\t#endif\n\n\t#ifdef USE_THICKNESSMAP\n\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\n\t#endif\n\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = transformNormalByInverseViewMatrix( normal, viewMatrix );\n\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseContribution, material.specularColorBlended, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/transmission_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/transmission_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..a96404940 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/transmission_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#ifdef USE_TRANSMISSION\n\n\t// Transmission code is based on glTF-Sampler-Viewer\n\t// https://github.com/KhronosGroup/glTF-Sample-Viewer\n\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\n\t#ifdef USE_TRANSMISSIONMAP\n\n\t\tuniform sampler2D transmissionMap;\n\n\t#endif\n\n\t#ifdef USE_THICKNESSMAP\n\n\t\tuniform sampler2D thicknessMap;\n\n\t#endif\n\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\n\tvarying vec3 vWorldPosition;\n\n\t// Mipped Bicubic Texture Filtering by N8\n\t// https://www.shadertoy.com/view/Dl2SDW\n\n\tfloat w0( float a ) {\n\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\n\t}\n\n\tfloat w1( float a ) {\n\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\n\t}\n\n\tfloat w2( float a ){\n\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\n\t}\n\n\tfloat w3( float a ) {\n\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\n\t}\n\n\t// g0 and g1 are the two amplitude functions\n\tfloat g0( float a ) {\n\n\t\treturn w0( a ) + w1( a );\n\n\t}\n\n\tfloat g1( float a ) {\n\n\t\treturn w2( a ) + w3( a );\n\n\t}\n\n\t// h0 and h1 are the two offset functions\n\tfloat h0( float a ) {\n\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\n\t}\n\n\tfloat h1( float a ) {\n\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\n\t}\n\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\n\t\tuv = uv * texelSize.zw + 0.5;\n\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\n\t}\n\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\n\t}\n\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\n\t\t// Direction of refracted light.\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\n\t\t// Compute rotation-independent scaling of the model matrix.\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\n\t\t// The thickness is specified in local space.\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\n\t}\n\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\n\t\t// Scale roughness with IOR so that an IOR of 1.0 results in no microfacet refraction and\n\t\t// an IOR of 1.5 results in the default amount of microfacet refraction.\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\n\t}\n\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\n\t}\n\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\n\t\tif ( isinf( attenuationDistance ) ) {\n\n\t\t\t// Attenuation distance is +\u221E, i.e. the transmitted color is not attenuated at all.\n\t\t\treturn vec3( 1.0 );\n\n\t\t} else {\n\n\t\t\t// Compute light attenuation using Beer's law.\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); // Beer's law\n\t\t\treturn transmittance;\n\n\t\t}\n\n\t}\n\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\n\t\t#ifdef USE_DISPERSION\n\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\n\t\t\t\t// Project refracted vector on the framebuffer, while mapping to normalized device coordinates.\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\n\t\t\t\t// Sample framebuffer to get pixel the refracted ray hits.\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\n\t\t\t}\n\n\t\t\ttransmittedLight.a /= 3.0;\n\n\t\t#else\n\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\n\t\t\t// Project refracted vector on the framebuffer, while mapping to normalized device coordinates.\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\n\t\t\t// Sample framebuffer to get pixel the refracted ray hits.\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\n\t\t#endif\n\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\n\t\t// Get the specular component.\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\n\t\t// As less light is transmitted, the opacity should be increased. This simple approximation does a decent job\n\t\t// of modulating a CSS background, and has no effect when the buffer is opaque, due to a solid object or clear color.\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\n\t}\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_pars_fragment.glsl.d.ts new file mode 100644 index 000000000..aa5001c0e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_pars_fragment.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\n\tvarying vec2 vUv;\n\n#endif\n#ifdef USE_MAP\n\n\tvarying vec2 vMapUv;\n\n#endif\n#ifdef USE_ALPHAMAP\n\n\tvarying vec2 vAlphaMapUv;\n\n#endif\n#ifdef USE_LIGHTMAP\n\n\tvarying vec2 vLightMapUv;\n\n#endif\n#ifdef USE_AOMAP\n\n\tvarying vec2 vAoMapUv;\n\n#endif\n#ifdef USE_BUMPMAP\n\n\tvarying vec2 vBumpMapUv;\n\n#endif\n#ifdef USE_NORMALMAP\n\n\tvarying vec2 vNormalMapUv;\n\n#endif\n#ifdef USE_EMISSIVEMAP\n\n\tvarying vec2 vEmissiveMapUv;\n\n#endif\n#ifdef USE_METALNESSMAP\n\n\tvarying vec2 vMetalnessMapUv;\n\n#endif\n#ifdef USE_ROUGHNESSMAP\n\n\tvarying vec2 vRoughnessMapUv;\n\n#endif\n#ifdef USE_ANISOTROPYMAP\n\n\tvarying vec2 vAnisotropyMapUv;\n\n#endif\n#ifdef USE_CLEARCOATMAP\n\n\tvarying vec2 vClearcoatMapUv;\n\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\n\tvarying vec2 vClearcoatNormalMapUv;\n\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\n\tvarying vec2 vClearcoatRoughnessMapUv;\n\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\n\tvarying vec2 vIridescenceMapUv;\n\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\n\tvarying vec2 vIridescenceThicknessMapUv;\n\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\n\tvarying vec2 vSheenColorMapUv;\n\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\n\tvarying vec2 vSheenRoughnessMapUv;\n\n#endif\n#ifdef USE_SPECULARMAP\n\n\tvarying vec2 vSpecularMapUv;\n\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\n\tvarying vec2 vSpecularColorMapUv;\n\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\n\tvarying vec2 vSpecularIntensityMapUv;\n\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n\n#endif\n#ifdef USE_THICKNESSMAP\n\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_pars_vertex.glsl.d.ts new file mode 100644 index 000000000..5439faba3 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_pars_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\n\tvarying vec2 vUv;\n\n#endif\n#ifdef USE_MAP\n\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n\n#endif\n#ifdef USE_ALPHAMAP\n\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n\n#endif\n#ifdef USE_LIGHTMAP\n\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n\n#endif\n#ifdef USE_AOMAP\n\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n\n#endif\n#ifdef USE_BUMPMAP\n\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n\n#endif\n#ifdef USE_NORMALMAP\n\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n\n#endif\n#ifdef USE_EMISSIVEMAP\n\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n\n#endif\n#ifdef USE_METALNESSMAP\n\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n\n#endif\n#ifdef USE_ROUGHNESSMAP\n\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n\n#endif\n#ifdef USE_ANISOTROPYMAP\n\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n\n#endif\n#ifdef USE_CLEARCOATMAP\n\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n\n#endif\n#ifdef USE_SPECULARMAP\n\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n\n#endif\n#ifdef USE_THICKNESSMAP\n\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_vertex.glsl.d.ts new file mode 100644 index 000000000..62229e16f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\n\tvUv = vec3( uv, 1 ).xy;\n\n#endif\n#ifdef USE_MAP\n\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_ALPHAMAP\n\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_LIGHTMAP\n\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_AOMAP\n\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_BUMPMAP\n\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_NORMALMAP\n\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_EMISSIVEMAP\n\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_METALNESSMAP\n\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_ROUGHNESSMAP\n\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_ANISOTROPYMAP\n\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_CLEARCOATMAP\n\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_SPECULARMAP\n\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_THICKNESSMAP\n\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/worldpos_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/worldpos_vertex.glsl.d.ts new file mode 100644 index 000000000..83ecd5b37 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/worldpos_vertex.glsl.d.ts @@ -0,0 +1,2 @@ +declare const _default: "\n#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\n\t#ifdef USE_BATCHING\n\n\t\tworldPosition = batchingMatrix * worldPosition;\n\n\t#endif\n\n\t#ifdef USE_INSTANCING\n\n\t\tworldPosition = instanceMatrix * worldPosition;\n\n\t#endif\n\n\tworldPosition = modelMatrix * worldPosition;\n\n#endif\n"; +export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib.d.ts new file mode 100644 index 000000000..7aeb3f49e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib.d.ts @@ -0,0 +1,7 @@ +export namespace ShaderLib { + namespace physical { + let uniforms: Object; + let vertexShader: string; + let fragmentShader: string; + } +} diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/background.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/background.glsl.d.ts new file mode 100644 index 000000000..28f6e3d08 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/background.glsl.d.ts @@ -0,0 +1,2 @@ +export const vertex: "\nvarying vec2 vUv;\nuniform mat3 uvTransform;\n\nvoid main() {\n\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n\n}\n"; +export const fragment: "\nuniform sampler2D t2D;\nuniform float backgroundIntensity;\n\nvarying vec2 vUv;\n\nvoid main() {\n\n\tvec4 texColor = texture2D( t2D, vUv );\n\n\t#ifdef DECODE_VIDEO_TEXTURE\n\n\t\t// use inline sRGB decode until browsers properly support SRGB8_ALPHA8 with video textures\n\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\n\t#endif\n\n\ttexColor.rgb *= backgroundIntensity;\n\n\tgl_FragColor = texColor;\n\n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/backgroundCube.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/backgroundCube.glsl.d.ts new file mode 100644 index 000000000..1e2625bfe --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/backgroundCube.glsl.d.ts @@ -0,0 +1,2 @@ +export const vertex: "\nvarying vec3 vWorldDirection;\n\n#include \n\nvoid main() {\n\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t#include \n\t#include \n\n\tgl_Position.z = gl_Position.w; // set z to camera.far\n\n}\n"; +export const fragment: "\n\n#ifdef ENVMAP_TYPE_CUBE\n\n\tuniform samplerCube envMap;\n\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\n\tuniform sampler2D envMap;\n\n#endif\n\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\n\nvarying vec3 vWorldDirection;\n\n#include \n\nvoid main() {\n\n\t#ifdef ENVMAP_TYPE_CUBE\n\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vWorldDirection );\n\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\n\t#else\n\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\n\t#endif\n\n\ttexColor.rgb *= backgroundIntensity;\n\n\tgl_FragColor = texColor;\n\n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/cube.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/cube.glsl.d.ts new file mode 100644 index 000000000..1db8a9081 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/cube.glsl.d.ts @@ -0,0 +1,2 @@ +export const vertex: "\nvarying vec3 vWorldDirection;\n\n#include \n\nvoid main() {\n\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t#include \n\t#include \n\n\tgl_Position.z = gl_Position.w; // set z to camera.far\n\n}\n"; +export const fragment: "\nuniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\n\nvarying vec3 vWorldDirection;\n\nvoid main() {\n\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/depth.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/depth.glsl.d.ts new file mode 100644 index 000000000..b3c2e87e5 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/depth.glsl.d.ts @@ -0,0 +1,2 @@ +export const vertex: "\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n// This is used for computing an equivalent of gl_FragCoord.z that is as high precision as possible.\n// Some platforms compute gl_FragCoord at a lower precision which makes the manually computed value better for\n// depth-based postprocessing effects. Reproduced on iPad with A10 processor / iPadOS 13.3.1.\nvarying vec2 vHighPrecisionZW;\n\nvoid main() {\n\n\t#include \n\n\t#include \n\t#include \n\n\t#include \n\n\t#ifdef USE_DISPLACEMENTMAP\n\n\t\t#include \n\t\t#include \n\t\t#include \n\n\t#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tvHighPrecisionZW = gl_Position.zw;\n\n}\n"; +export const fragment: "\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvarying vec2 vHighPrecisionZW;\n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\n\t// Higher precision equivalent of gl_FragCoord.z\n\n\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\n\t\tfloat fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ];\n\n\t#else\n\n\t\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5;\n\n\t#endif\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\t// TODO Deprecate\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#elif DEPTH_PACKING == 3202\n\n\t\t// TODO Deprecate\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\n\t#elif DEPTH_PACKING == 3203\n\n\t\t// TODO Deprecate\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\n\n\t#endif\n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/distance.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/distance.glsl.d.ts new file mode 100644 index 000000000..cb252359b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/distance.glsl.d.ts @@ -0,0 +1,2 @@ +export const vertex: "\n#define DISTANCE\n\nvarying vec3 vWorldPosition;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\t#include \n\t#include \n\n\t#include \n\n\t#ifdef USE_DISPLACEMENTMAP\n\n\t\t#include \n\t\t#include \n\t\t#include \n\n\t#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tvWorldPosition = worldPosition.xyz;\n\n}\n"; +export const fragment: "\n#define DISTANCE\n\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main () {\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\n\n\tgl_FragColor = vec4( dist, 0.0, 0.0, 1.0 );\n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/equirect.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/equirect.glsl.d.ts new file mode 100644 index 000000000..4e98c6662 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/equirect.glsl.d.ts @@ -0,0 +1,2 @@ +export const vertex: "\nvarying vec3 vWorldDirection;\n\n#include \n\nvoid main() {\n\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t#include \n\t#include \n\n}\n"; +export const fragment: "\nuniform sampler2D tEquirect;\n\nvarying vec3 vWorldDirection;\n\n#include \n\nvoid main() {\n\n\tvec3 direction = normalize( vWorldDirection );\n\n\tvec2 sampleUV = equirectUv( direction );\n\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/linedashed.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/linedashed.glsl.d.ts new file mode 100644 index 000000000..765f1bb14 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/linedashed.glsl.d.ts @@ -0,0 +1,2 @@ +export const vertex: "\nuniform float scale;\nattribute float lineDistance;\n\nvarying float vLineDistance;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvLineDistance = scale * lineDistance;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; +export const fragment: "\nuniform vec3 diffuse;\nuniform float opacity;\n\nuniform float dashSize;\nuniform float totalSize;\n\nvarying float vLineDistance;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\n\t\tdiscard;\n\n\t}\n\n\tvec3 outgoingLight = vec3( 0.0 );\n\n\t#include \n\t#include \n\t#include \n\n\toutgoingLight = diffuseColor.rgb; // simple shader\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshbasic.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshbasic.glsl.d.ts new file mode 100644 index 000000000..23471acee --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshbasic.glsl.d.ts @@ -0,0 +1,2 @@ +export const vertex: "\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\n\t#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\n}\n"; +export const fragment: "\nuniform vec3 diffuse;\nuniform float opacity;\n\n#ifndef FLAT_SHADED\n\n\tvarying vec3 vNormal;\n\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\n\t// accumulation (baked indirect lighting only)\n\t#ifdef USE_LIGHTMAP\n\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\n\t#else\n\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\n\t#endif\n\n\t// modulation\n\t#include \n\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshlambert.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshlambert.glsl.d.ts new file mode 100644 index 000000000..698ee0dd6 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshlambert.glsl.d.ts @@ -0,0 +1,2 @@ +export const vertex: "\n#define LAMBERT\n\nvarying vec3 vViewPosition;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tvViewPosition = - mvPosition.xyz;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; +export const fragment: "\n#define LAMBERT\n\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t// accumulation\n\t#include \n\t#include \n\t#include \n\t#include \n\n\t// modulation\n\t#include \n\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshmatcap.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshmatcap.glsl.d.ts new file mode 100644 index 000000000..a2e4cbe2e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshmatcap.glsl.d.ts @@ -0,0 +1,2 @@ +export const vertex: "\n#define MATCAP\n\nvarying vec3 vViewPosition;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n#include \n#include \n\nvoid main() {\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\n\tvViewPosition = - mvPosition.xyz;\n\n}\n"; +export const fragment: "\n#define MATCAP\n\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\n\nvarying vec3 vViewPosition;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; // 0.495 to remove artifacts caused by undersized matcap disks\n\n\t#ifdef USE_MATCAP\n\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\n\t#else\n\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); // default if matcap is missing\n\n\t#endif\n\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshnormal.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshnormal.glsl.d.ts new file mode 100644 index 000000000..1961afdbe --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshnormal.glsl.d.ts @@ -0,0 +1,2 @@ +export const vertex: "\n#define NORMAL\n\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\n\tvarying vec3 vViewPosition;\n\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\n\tvViewPosition = - mvPosition.xyz;\n\n#endif\n\n}\n"; +export const fragment: "\n#define NORMAL\n\nuniform float opacity;\n\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\n\tvarying vec3 vViewPosition;\n\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n\tgl_FragColor = vec4( normalize( normal ) * 0.5 + 0.5, diffuseColor.a );\n\n\t#ifdef OPAQUE\n\n\t\tgl_FragColor.a = 1.0;\n\n\t#endif\n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshphong.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshphong.glsl.d.ts new file mode 100644 index 000000000..22dc16023 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshphong.glsl.d.ts @@ -0,0 +1,2 @@ +export const vertex: "\n#define PHONG\n\nvarying vec3 vViewPosition;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tvViewPosition = - mvPosition.xyz;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; +export const fragment: "\n#define PHONG\n\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t// accumulation\n\t#include \n\t#include \n\t#include \n\t#include \n\n\t// modulation\n\t#include \n\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshphysical.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshphysical.glsl.d.ts new file mode 100644 index 000000000..749385aed --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshphysical.glsl.d.ts @@ -0,0 +1,2 @@ +export const vertex: "\n#define STANDARD\n\nvarying vec3 vViewPosition;\n\n#ifdef USE_TRANSMISSION\n\n\tvarying vec3 vWorldPosition;\n\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tvViewPosition = - mvPosition.xyz;\n\n\t#include \n\t#include \n\t#include \n\n#ifdef USE_TRANSMISSION\n\n\tvWorldPosition = worldPosition.xyz;\n\n#endif\n}\n"; +export const fragment: "\n#define STANDARD\n\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\n\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n\n#ifdef IOR\n\tuniform float ior;\n#endif\n\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n\n#ifdef USE_DISPERSION\n\tuniform float dispersion;\n#endif\n\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\n\nvarying vec3 vViewPosition;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t// accumulation\n\t#include \n\t#include \n\t#include \n\t#include \n\n\t// modulation\n\t#include \n\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\n\t#include \n\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\n\t#ifdef USE_SHEEN\n \n\t\toutgoingLight = outgoingLight + sheenSpecularDirect + sheenSpecularIndirect;\n \n \t#endif\n\n\t#ifdef USE_CLEARCOAT\n\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\n\t#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshtoon.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshtoon.glsl.d.ts new file mode 100644 index 000000000..bccb5d045 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshtoon.glsl.d.ts @@ -0,0 +1,2 @@ +export const vertex: "\n#define TOON\n\nvarying vec3 vViewPosition;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tvViewPosition = - mvPosition.xyz;\n\n\t#include \n\t#include \n\t#include \n\n}\n"; +export const fragment: "\n#define TOON\n\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t// accumulation\n\t#include \n\t#include \n\t#include \n\t#include \n\n\t// modulation\n\t#include \n\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/points.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/points.glsl.d.ts new file mode 100644 index 000000000..384b2516f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/points.glsl.d.ts @@ -0,0 +1,2 @@ +export const vertex: "\nuniform float size;\nuniform float scale;\n\n#include \n#include \n#include \n#include \n#include \n#include \n\n#ifdef USE_POINTS_UV\n\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n\n#endif\n\nvoid main() {\n\n\t#ifdef USE_POINTS_UV\n\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\n\t#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tgl_PointSize = size;\n\n\t#ifdef USE_SIZEATTENUATION\n\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\n\t#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; +export const fragment: "\nuniform vec3 diffuse;\nuniform float opacity;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\n\tvec3 outgoingLight = vec3( 0.0 );\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\toutgoingLight = diffuseColor.rgb;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/shadow.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/shadow.glsl.d.ts new file mode 100644 index 000000000..49c051900 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/shadow.glsl.d.ts @@ -0,0 +1,2 @@ +export const vertex: "\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\n}\n"; +export const fragment: "\nuniform vec3 color;\nuniform float opacity;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/sprite.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/sprite.glsl.d.ts new file mode 100644 index 000000000..921ca31df --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/sprite.glsl.d.ts @@ -0,0 +1,2 @@ +export const vertex: "\nuniform float rotation;\nuniform vec2 center;\n\n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\tvec4 mvPosition = modelViewMatrix[ 3 ];\n\n\tvec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );\n\n\t#ifndef USE_SIZEATTENUATION\n\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\n\t#endif\n\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\n\tmvPosition.xy += rotatedPosition;\n\n\tgl_Position = projectionMatrix * mvPosition;\n\n\t#include \n\t#include \n\t#include \n\n}\n"; +export const fragment: "\nuniform vec3 diffuse;\nuniform float opacity;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\n\tvec3 outgoingLight = vec3( 0.0 );\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\toutgoingLight = diffuseColor.rgb;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/vsm.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/vsm.glsl.d.ts new file mode 100644 index 000000000..b19167e8f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/vsm.glsl.d.ts @@ -0,0 +1,2 @@ +export const vertex: "\nvoid main() {\n\n\tgl_Position = vec4( position, 1.0 );\n\n}\n"; +export const fragment: "\nuniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n\nvoid main() {\n\n\tconst float samples = float( VSM_SAMPLES );\n\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\n\t\t#ifdef HORIZONTAL_PASS\n\n\t\t\tvec2 distribution = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ).rg;\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\n\t\t#else\n\n\t\t\tfloat depth = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ).r;\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\n\t\t#endif\n\n\t}\n\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\n\tfloat std_dev = sqrt( max( 0.0, squared_mean - mean * mean ) );\n\n\tgl_FragColor = vec4( mean, std_dev, 0.0, 1.0 );\n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/UniformsLib.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/UniformsLib.d.ts new file mode 100644 index 000000000..1737307e2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/UniformsLib.d.ts @@ -0,0 +1,449 @@ +export namespace UniformsLib { + namespace common { + namespace diffuse { + let value: Color; + } + namespace opacity { + let value_1: number; + export { value_1 as value }; + } + namespace map { + let value_2: null; + export { value_2 as value }; + } + namespace mapTransform { + let value_3: Matrix3; + export { value_3 as value }; + } + namespace alphaMap { + let value_4: null; + export { value_4 as value }; + } + namespace alphaMapTransform { + let value_5: Matrix3; + export { value_5 as value }; + } + namespace alphaTest { + let value_6: number; + export { value_6 as value }; + } + } + namespace specularmap { + namespace specularMap { + let value_7: null; + export { value_7 as value }; + } + namespace specularMapTransform { + let value_8: Matrix3; + export { value_8 as value }; + } + } + namespace envmap { + namespace envMap { + let value_9: null; + export { value_9 as value }; + } + namespace envMapRotation { + let value_10: Matrix3; + export { value_10 as value }; + } + namespace reflectivity { + let value_11: number; + export { value_11 as value }; + } + namespace ior { + let value_12: number; + export { value_12 as value }; + } + namespace refractionRatio { + let value_13: number; + export { value_13 as value }; + } + namespace dfgLUT { + let value_14: null; + export { value_14 as value }; + } + } + namespace aomap { + namespace aoMap { + let value_15: null; + export { value_15 as value }; + } + namespace aoMapIntensity { + let value_16: number; + export { value_16 as value }; + } + namespace aoMapTransform { + let value_17: Matrix3; + export { value_17 as value }; + } + } + namespace lightmap { + namespace lightMap { + let value_18: null; + export { value_18 as value }; + } + namespace lightMapIntensity { + let value_19: number; + export { value_19 as value }; + } + namespace lightMapTransform { + let value_20: Matrix3; + export { value_20 as value }; + } + } + namespace bumpmap { + namespace bumpMap { + let value_21: null; + export { value_21 as value }; + } + namespace bumpMapTransform { + let value_22: Matrix3; + export { value_22 as value }; + } + namespace bumpScale { + let value_23: number; + export { value_23 as value }; + } + } + namespace normalmap { + namespace normalMap { + let value_24: null; + export { value_24 as value }; + } + namespace normalMapTransform { + let value_25: Matrix3; + export { value_25 as value }; + } + namespace normalScale { + let value_26: Vector2; + export { value_26 as value }; + } + } + namespace displacementmap { + namespace displacementMap { + let value_27: null; + export { value_27 as value }; + } + namespace displacementMapTransform { + let value_28: Matrix3; + export { value_28 as value }; + } + namespace displacementScale { + let value_29: number; + export { value_29 as value }; + } + namespace displacementBias { + let value_30: number; + export { value_30 as value }; + } + } + namespace emissivemap { + namespace emissiveMap { + let value_31: null; + export { value_31 as value }; + } + namespace emissiveMapTransform { + let value_32: Matrix3; + export { value_32 as value }; + } + } + namespace metalnessmap { + namespace metalnessMap { + let value_33: null; + export { value_33 as value }; + } + namespace metalnessMapTransform { + let value_34: Matrix3; + export { value_34 as value }; + } + } + namespace roughnessmap { + namespace roughnessMap { + let value_35: null; + export { value_35 as value }; + } + namespace roughnessMapTransform { + let value_36: Matrix3; + export { value_36 as value }; + } + } + namespace gradientmap { + namespace gradientMap { + let value_37: null; + export { value_37 as value }; + } + } + namespace fog { + namespace fogDensity { + let value_38: number; + export { value_38 as value }; + } + namespace fogNear { + let value_39: number; + export { value_39 as value }; + } + namespace fogFar { + let value_40: number; + export { value_40 as value }; + } + namespace fogColor { + let value_41: Color; + export { value_41 as value }; + } + } + namespace lights { + namespace ambientLightColor { + let value_42: never[]; + export { value_42 as value }; + } + namespace lightProbe { + let value_43: never[]; + export { value_43 as value }; + } + namespace directionalLights { + let value_44: never[]; + export { value_44 as value }; + export namespace properties { + let direction: {}; + let color: {}; + } + } + namespace directionalLightShadows { + let value_45: never[]; + export { value_45 as value }; + export namespace properties_1 { + let shadowIntensity: number; + let shadowBias: {}; + let shadowNormalBias: {}; + let shadowRadius: {}; + let shadowMapSize: {}; + } + export { properties_1 as properties }; + } + namespace directionalShadowMatrix { + let value_46: never[]; + export { value_46 as value }; + } + namespace spotLights { + let value_47: never[]; + export { value_47 as value }; + export namespace properties_2 { + let color_1: {}; + export { color_1 as color }; + export let position: {}; + let direction_1: {}; + export { direction_1 as direction }; + export let distance: {}; + export let coneCos: {}; + export let penumbraCos: {}; + export let decay: {}; + } + export { properties_2 as properties }; + } + namespace spotLightShadows { + let value_48: never[]; + export { value_48 as value }; + export namespace properties_3 { + let shadowIntensity_1: number; + export { shadowIntensity_1 as shadowIntensity }; + let shadowBias_1: {}; + export { shadowBias_1 as shadowBias }; + let shadowNormalBias_1: {}; + export { shadowNormalBias_1 as shadowNormalBias }; + let shadowRadius_1: {}; + export { shadowRadius_1 as shadowRadius }; + let shadowMapSize_1: {}; + export { shadowMapSize_1 as shadowMapSize }; + } + export { properties_3 as properties }; + } + namespace spotLightMap { + let value_49: never[]; + export { value_49 as value }; + } + namespace spotLightMatrix { + let value_50: never[]; + export { value_50 as value }; + } + namespace pointLights { + let value_51: never[]; + export { value_51 as value }; + export namespace properties_4 { + let color_2: {}; + export { color_2 as color }; + let position_1: {}; + export { position_1 as position }; + let decay_1: {}; + export { decay_1 as decay }; + let distance_1: {}; + export { distance_1 as distance }; + } + export { properties_4 as properties }; + } + namespace pointLightShadows { + let value_52: never[]; + export { value_52 as value }; + export namespace properties_5 { + let shadowIntensity_2: number; + export { shadowIntensity_2 as shadowIntensity }; + let shadowBias_2: {}; + export { shadowBias_2 as shadowBias }; + let shadowNormalBias_2: {}; + export { shadowNormalBias_2 as shadowNormalBias }; + let shadowRadius_2: {}; + export { shadowRadius_2 as shadowRadius }; + let shadowMapSize_2: {}; + export { shadowMapSize_2 as shadowMapSize }; + export let shadowCameraNear: {}; + export let shadowCameraFar: {}; + } + export { properties_5 as properties }; + } + namespace pointShadowMatrix { + let value_53: never[]; + export { value_53 as value }; + } + namespace hemisphereLights { + let value_54: never[]; + export { value_54 as value }; + export namespace properties_6 { + let direction_2: {}; + export { direction_2 as direction }; + export let skyColor: {}; + export let groundColor: {}; + } + export { properties_6 as properties }; + } + namespace rectAreaLights { + let value_55: never[]; + export { value_55 as value }; + export namespace properties_7 { + let color_3: {}; + export { color_3 as color }; + let position_2: {}; + export { position_2 as position }; + export let width: {}; + export let height: {}; + } + export { properties_7 as properties }; + } + namespace ltc_1 { + let value_56: null; + export { value_56 as value }; + } + namespace ltc_2 { + let value_57: null; + export { value_57 as value }; + } + namespace probesSH { + let value_58: null; + export { value_58 as value }; + } + namespace probesMin { + let value_59: Vector3; + export { value_59 as value }; + } + namespace probesMax { + let value_60: Vector3; + export { value_60 as value }; + } + namespace probesResolution { + let value_61: Vector3; + export { value_61 as value }; + } + } + namespace points { + export namespace diffuse_1 { + let value_62: Color; + export { value_62 as value }; + } + export { diffuse_1 as diffuse }; + export namespace opacity_1 { + let value_63: number; + export { value_63 as value }; + } + export { opacity_1 as opacity }; + export namespace size { + let value_64: number; + export { value_64 as value }; + } + export namespace scale { + let value_65: number; + export { value_65 as value }; + } + export namespace map_1 { + let value_66: null; + export { value_66 as value }; + } + export { map_1 as map }; + export namespace alphaMap_1 { + let value_67: null; + export { value_67 as value }; + } + export { alphaMap_1 as alphaMap }; + export namespace alphaMapTransform_1 { + let value_68: Matrix3; + export { value_68 as value }; + } + export { alphaMapTransform_1 as alphaMapTransform }; + export namespace alphaTest_1 { + let value_69: number; + export { value_69 as value }; + } + export { alphaTest_1 as alphaTest }; + export namespace uvTransform { + let value_70: Matrix3; + export { value_70 as value }; + } + } + namespace sprite { + export namespace diffuse_2 { + let value_71: Color; + export { value_71 as value }; + } + export { diffuse_2 as diffuse }; + export namespace opacity_2 { + let value_72: number; + export { value_72 as value }; + } + export { opacity_2 as opacity }; + export namespace center { + let value_73: Vector2; + export { value_73 as value }; + } + export namespace rotation { + let value_74: number; + export { value_74 as value }; + } + export namespace map_2 { + let value_75: null; + export { value_75 as value }; + } + export { map_2 as map }; + export namespace mapTransform_1 { + let value_76: Matrix3; + export { value_76 as value }; + } + export { mapTransform_1 as mapTransform }; + export namespace alphaMap_2 { + let value_77: null; + export { value_77 as value }; + } + export { alphaMap_2 as alphaMap }; + export namespace alphaMapTransform_2 { + let value_78: Matrix3; + export { value_78 as value }; + } + export { alphaMapTransform_2 as alphaMapTransform }; + export namespace alphaTest_2 { + let value_79: number; + export { value_79 as value }; + } + export { alphaTest_2 as alphaTest }; + } +} +import { Color } from '../../math/Color.js'; +import { Matrix3 } from '../../math/Matrix3.js'; +import { Vector2 } from '../../math/Vector2.js'; +import { Vector3 } from '../../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/UniformsUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/UniformsUtils.d.ts new file mode 100644 index 000000000..2789a045c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/shaders/UniformsUtils.d.ts @@ -0,0 +1,29 @@ +/** + * Provides utility functions for managing uniforms. + * + * @module UniformsUtils + */ +/** + * Clones the given uniform definitions by performing a deep-copy. That means + * if the value of a uniform refers to an object like a Vector3 or Texture, + * the cloned uniform will refer to a new object reference. + * + * @param {Object} src - An object representing uniform definitions. + * @return {Object} The cloned uniforms. + */ +export function cloneUniforms(src: Object): Object; +/** + * Merges the given uniform definitions into a single object. Since the + * method internally uses cloneUniforms(), it performs a deep-copy when + * producing the merged uniform definitions. + * + * @param {Array} uniforms - An array of objects containing uniform definitions. + * @return {Object} The merged uniforms. + */ +export function mergeUniforms(uniforms: any[]): Object; +export function cloneUniformsGroups(src: any): any[]; +export function getUnlitUniformColorSpace(renderer: any): any; +export namespace UniformsUtils { + export { cloneUniforms as clone }; + export { mergeUniforms as merge }; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/WebGLBackend.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/WebGLBackend.d.ts new file mode 100644 index 000000000..d8e36a458 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/WebGLBackend.d.ts @@ -0,0 +1,649 @@ +export default WebGLBackend; +/** + * A backend implementation targeting WebGL 2. + * + * @private + * @augments Backend + */ +declare class WebGLBackend extends Backend { + /** + * WebGLBackend options. + * + * @typedef {Object} WebGLBackend~Options + * @property {boolean} [logarithmicDepthBuffer=false] - Whether logarithmic depth buffer is enabled or not. + * @property {boolean} [reversedDepthBuffer=false] - Whether reversed depth buffer is enabled or not. + * @property {boolean} [alpha=true] - Whether the default framebuffer (which represents the final contents of the canvas) should be transparent or opaque. + * @property {boolean} [depth=true] - Whether the default framebuffer should have a depth buffer or not. + * @property {boolean} [stencil=false] - Whether the default framebuffer should have a stencil buffer or not. + * @property {boolean} [antialias=false] - Whether MSAA as the default anti-aliasing should be enabled or not. + * @property {number} [samples=0] - When `antialias` is `true`, `4` samples are used by default. Set this parameter to any other integer value than 0 to overwrite the default. + * @property {boolean} [forceWebGL=false] - If set to `true`, the renderer uses a WebGL 2 backend no matter if WebGPU is supported or not. + * @property {WebGL2RenderingContext} [context=undefined] - A WebGL 2 rendering context. + */ + /** + * Constructs a new WebGPU backend. + * + * @param {WebGLBackend~Options} [parameters] - The configuration parameter. + */ + constructor(parameters?: {}); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWebGLBackend: boolean; + /** + * A reference to a backend module holding shader attribute-related + * utility functions. + * + * @type {?WebGLAttributeUtils} + * @default null + */ + attributeUtils: WebGLAttributeUtils | null; + /** + * A reference to a backend module holding extension-related + * utility functions. + * + * @type {?WebGLExtensions} + * @default null + */ + extensions: WebGLExtensions | null; + /** + * A reference to a backend module holding capability-related + * utility functions. + * + * @type {?WebGLCapabilities} + * @default null + */ + capabilities: WebGLCapabilities | null; + /** + * A reference to a backend module holding texture-related + * utility functions. + * + * @type {?WebGLTextureUtils} + * @default null + */ + textureUtils: WebGLTextureUtils | null; + /** + * A reference to a backend module holding renderer-related + * utility functions. + * + * @type {?WebGLBufferRenderer} + * @default null + */ + bufferRenderer: WebGLBufferRenderer | null; + /** + * A reference to the rendering context. + * + * @type {?WebGL2RenderingContext} + * @default null + */ + gl: WebGL2RenderingContext | null; + /** + * A reference to a backend module holding state-related + * utility functions. + * + * @type {?WebGLState} + * @default null + */ + state: WebGLState | null; + /** + * A reference to a backend module holding common + * utility functions. + * + * @type {?WebGLUtils} + * @default null + */ + utils: WebGLUtils | null; + /** + * Dictionary for caching VAOs. + * + * @type {Object} + */ + vaoCache: { + [x: string]: WebGLVertexArrayObject; + }; + /** + * Dictionary for caching transform feedback objects. + * + * @type {Object} + */ + transformFeedbackCache: { + [x: string]: WebGLTransformFeedback; + }; + /** + * Controls if `gl.RASTERIZER_DISCARD` should be enabled or not. + * Only relevant when using compute shaders. + * + * @type {boolean} + * @default false + */ + discard: boolean; + /** + * A reference to the `EXT_disjoint_timer_query_webgl2` extension. `null` if the + * device does not support the extension. + * + * @type {?EXTDisjointTimerQueryWebGL2} + * @default null + */ + disjoint: EXTDisjointTimerQueryWebGL2 | null; + /** + * A reference to the `KHR_parallel_shader_compile` extension. `null` if the + * device does not support the extension. + * + * @type {?KHRParallelShaderCompile} + * @default null + */ + parallel: KHRParallelShaderCompile | null; + /** + * A reference to the current render context. + * + * @private + * @type {RenderContext} + * @default null + */ + private _currentContext; + /** + * A unique collection of bindings. + * + * @private + * @type {WeakSet>} + */ + private _knownBindings; + /** + * Whether the device supports framebuffers invalidation or not. + * + * @private + * @type {boolean} + */ + private _supportsInvalidateFramebuffer; + /** + * The target framebuffer when rendering with + * the WebXR device API. + * + * @private + * @type {?WebGLFramebuffer} + * @default null + */ + private _xrFramebuffer; + /** + * Initializes the backend so it is ready for usage. + * + * @param {Renderer} renderer - The renderer. + */ + init(renderer: Renderer): void; + _onContextLost: ((event: any) => void) | undefined; + drawBuffersIndexedExt: Object | undefined; + /** + * This method performs a readback operation by moving buffer data from + * a storage buffer attribute from the GPU to the CPU. ReadbackBuffer can + * be used to retain and reuse handles to the intermediate buffers and prevent + * new allocation. + * + * @async + * @param {BufferAttribute} attribute - The storage buffer attribute to read frm. + * @param {ReadbackBuffer|ArrayBuffer} target - The storage buffer attribute. + * @param {number} offset - The storage buffer attribute. + * @param {number} count - The offset from which to start reading the + * @return {Promise} A promise that resolves with the buffer data when the data are ready. + */ + getArrayBufferAsync(attribute: BufferAttribute, target?: ReadbackBuffer | ArrayBuffer, offset?: number, count?: number): Promise; + /** + * Ensures the backend is XR compatible. + * + * @async + * @return {Promise} A Promise that resolve when the renderer is XR compatible. + */ + makeXRCompatible(): Promise; + /** + * Sets the XR rendering destination. + * + * @param {WebGLFramebuffer} xrFramebuffer - The XR framebuffer. + */ + setXRTarget(xrFramebuffer: WebGLFramebuffer): void; + /** + * Configures the given XR render target with external textures. + * + * This method is only relevant when using the WebXR Layers API. + * + * @param {XRRenderTarget} renderTarget - The XR render target. + * @param {WebGLTexture} colorTexture - A native color texture. + * @param {?WebGLTexture} [depthTexture=null] - A native depth texture. + */ + setXRRenderTargetTextures(renderTarget: XRRenderTarget, colorTexture: WebGLTexture, depthTexture?: WebGLTexture | null): void; + /** + * Inits a time stamp query for the given render context. + * + * @param {string} type - The type of the timestamp query. + * @param {string} uid - A unique identifier for the timestamp query. + */ + initTimestampQuery(type: string, uid: string): void; + /** + * Prepares the timestamp buffer. + * + * @param {string} type - The type of the timestamp query. + * @param {string} uid - A unique identifier for the timestamp query. + */ + prepareTimestampBuffer(type: string, uid: string): void; + /** + * Returns the backend's rendering context. + * + * @return {WebGL2RenderingContext} The rendering context. + */ + getContext(): WebGL2RenderingContext; + /** + * This method is executed at the beginning of a render call and prepares + * the WebGL state for upcoming render calls + * + * @param {RenderContext} renderContext - The render context. + */ + beginRender(renderContext: RenderContext): void; + /** + * This method is executed at the end of a render call and finalizes work + * after draw calls. + * + * @param {RenderContext} renderContext - The render context. + */ + finishRender(renderContext: RenderContext): void; + /** + * This method processes the result of occlusion queries and writes it + * into render context data. + * + * @async + * @param {RenderContext} renderContext - The render context. + */ + resolveOccludedAsync(renderContext: RenderContext): void; + /** + * Returns `true` if the given 3D object is fully occluded by other + * 3D objects in the scene. + * + * @param {RenderContext} renderContext - The render context. + * @param {Object3D} object - The 3D object to test. + * @return {boolean} Whether the 3D object is fully occluded or not. + */ + isOccluded(renderContext: RenderContext, object: Object3D): boolean; + /** + * Updates the viewport with the values from the given render context. + * + * @param {RenderContext} renderContext - The render context. + */ + updateViewport(renderContext: RenderContext): void; + /** + * Updates the scissor with the values from the given render context. + * + * @param {RenderContext} renderContext - The render context. + */ + updateScissor(renderContext: RenderContext): void; + /** + * Defines the scissor test. + * + * @param {boolean} boolean - Whether the scissor test should be enabled or not. + */ + setScissorTest(boolean: boolean): void; + /** + * Returns the clear color and alpha into a single + * color object. + * + * @return {Color4} The clear color. + */ + getClearColor(): Color4; + /** + * Performs a clear operation. + * + * @param {boolean} color - Whether the color buffer should be cleared or not. + * @param {boolean} depth - Whether the depth buffer should be cleared or not. + * @param {boolean} stencil - Whether the stencil buffer should be cleared or not. + * @param {?Object} [descriptor=null] - The render context of the current set render target. + * @param {boolean} [setFrameBuffer=true] - Controls whether the intermediate framebuffer should be set or not. + * @param {boolean} [resolveRenderTarget=true] - Controls whether an active render target should be resolved + * or not. Only relevant for explicit clears. + */ + clear(color: boolean, depth: boolean, stencil: boolean, descriptor?: Object | null, setFrameBuffer?: boolean, resolveRenderTarget?: boolean): void; + /** + * This method is executed at the beginning of a compute call and + * prepares the state for upcoming compute tasks. + * + * @param {Node|Array} computeGroup - The compute node(s). + */ + beginCompute(computeGroup: Node | Array): void; + /** + * Executes a compute command for the given compute node. + * + * @param {Node|Array} computeGroup - The group of compute nodes of a compute call. Can be a single compute node. + * @param {Node} computeNode - The compute node. + * @param {Array} bindings - The bindings. + * @param {ComputePipeline} pipeline - The compute pipeline. + * @param {?number} [count=null] - The count of compute invocations. If `null`, the count is determined by the compute node. + */ + compute(computeGroup: Node | Array, computeNode: Node, bindings: Array, pipeline: ComputePipeline, count?: number | null): void; + /** + * This method is executed at the end of a compute call and + * finalizes work after compute tasks. + * + * @param {Node|Array} computeGroup - The compute node(s). + */ + finishCompute(computeGroup: Node | Array): void; + /** + * Internal to determine if the current render target is a render target array with depth 2D array texture. + * + * @param {RenderContext} renderContext - The render context. + * @return {boolean} Whether the render target is a render target array with depth 2D array texture. + * + * @private + */ + private _isRenderCameraDepthArray; + /** + * Internal draw function. + * + * @private + * @param {Object3D} object - The object to render. + * @param {WebGLBufferRenderer} renderer - The internal renderer. + * @param {number} firstVertex - The first vertex to render. + * @param {number} vertexCount - The vertex count. + * @param {number} instanceCount - The intance count. + * @param {WebGLProgram} programGPU - The raw WebGL shader program. + */ + private _draw; + /** + * Executes a draw command for the given render object. + * + * @param {RenderObject} renderObject - The render object to draw. + * @param {Info} info - Holds a series of statistical information about the GPU memory and the rendering process. + */ + draw(renderObject: RenderObject): void; + /** + * Creates a default texture for the given texture that can be used + * as a placeholder until the actual texture is ready for usage. + * + * @param {Texture} texture - The texture to create a default texture for. + */ + createDefaultTexture(texture: Texture): void; + /** + * Defines a texture on the GPU for the given texture object. + * + * @param {Texture} texture - The texture. + * @param {Object} [options={}] - Optional configuration parameter. + */ + createTexture(texture: Texture, options?: Object): void; + /** + * Uploads the updated texture data to the GPU. + * + * @param {Texture} texture - The texture. + * @param {Object} [options={}] - Optional configuration parameter. + */ + updateTexture(texture: Texture, options?: Object): void; + /** + * Generates mipmaps for the given texture. + * + * @param {Texture} texture - The texture. + */ + generateMipmaps(texture: Texture): void; + /** + * Destroys the GPU data for the given texture object. + * + * @param {Texture} texture - The texture. + * @param {boolean} [isDefaultTexture=false] - Whether the texture uses a default GPU texture or not. + */ + destroyTexture(texture: Texture, isDefaultTexture?: boolean): void; + /** + * Returns texture data as a typed array. + * + * @async + * @param {Texture} texture - The texture to copy. + * @param {number} x - The x coordinate of the copy origin. + * @param {number} y - The y coordinate of the copy origin. + * @param {number} width - The width of the copy. + * @param {number} height - The height of the copy. + * @param {number} faceIndex - The face index. + * @return {Promise} A Promise that resolves with a typed array when the copy operation has finished. + */ + copyTextureToBuffer(texture: Texture, x: number, y: number, width: number, height: number, faceIndex: number): Promise; + /** + * Returns a node builder for the given render object. + * + * @param {RenderObject} object - The render object. + * @param {Renderer} renderer - The renderer. + * @return {GLSLNodeBuilder} The node builder. + */ + createNodeBuilder(object: RenderObject, renderer: Renderer): GLSLNodeBuilder; + /** + * Creates a shader program from the given programmable stage. + * + * @param {ProgrammableStage} program - The programmable stage. + */ + createProgram(program: ProgrammableStage): void; + /** + * Destroys the shader program of the given programmable stage. + * + * @param {ProgrammableStage} program - The programmable stage. + */ + destroyProgram(program: ProgrammableStage): void; + /** + * Creates a render pipeline for the given render object. + * + * @param {RenderObject} renderObject - The render object. + * @param {Array} promises - An array of compilation promises which are used in `compileAsync()`. + */ + createRenderPipeline(renderObject: RenderObject, promises: Array>): void; + /** + * Formats the source code of error messages. + * + * @private + * @param {string} string - The code. + * @param {number} errorLine - The error line. + * @return {string} The formatted code. + */ + private _handleSource; + /** + * Gets the shader compilation errors from the info log. + * + * @private + * @param {WebGL2RenderingContext} gl - The rendering context. + * @param {WebGLShader} shader - The WebGL shader object. + * @param {string} type - The shader type. + * @return {string} The shader errors. + */ + private _getShaderErrors; + /** + * Logs shader compilation errors. + * + * @private + * @param {WebGLProgram} programGPU - The WebGL program. + * @param {WebGLShader} glFragmentShader - The fragment shader as a native WebGL shader object. + * @param {WebGLShader} glVertexShader - The vertex shader as a native WebGL shader object. + */ + private _logProgramError; + /** + * Completes the shader program setup for the given render object. + * + * @private + * @param {RenderObject} renderObject - The render object. + * @param {RenderPipeline} pipeline - The render pipeline. + */ + private _completeCompile; + /** + * Creates a compute pipeline for the given compute node. + * + * @param {ComputePipeline} computePipeline - The compute pipeline. + * @param {Array} bindings - The bindings. + */ + createComputePipeline(computePipeline: ComputePipeline, bindings: Array): void; + /** + * Creates bindings from the given bind group definition. + * + * @param {BindGroup} bindGroup - The bind group. + * @param {Array} bindings - Array of bind groups. + * @param {number} cacheIndex - The cache index. + * @param {number} version - The version. + */ + createBindings(bindGroup: BindGroup, bindings: Array): void; + /** + * Updates the given bind group definition. + * + * @param {BindGroup} bindGroup - The bind group. + * @param {Array} bindings - Array of bind groups. + * @param {number} cacheIndex - The cache index. + * @param {number} version - The version. + */ + updateBindings(bindGroup: BindGroup): void; + /** + * Updates a buffer binding. + * + * @param {Buffer} binding - The buffer binding to update. + */ + updateBinding(binding: Buffer): void; + /** + * Creates a uniform buffer. + * + * @param {Buffer} uniformBuffer - The uniform buffer. + */ + createUniformBuffer(uniformBuffer: Buffer): void; + /** + * Destroys the GPU data for the given uniform buffer. + * + * @param {Buffer} uniformBuffer - The uniform buffer. + */ + destroyUniformBuffer(uniformBuffer: Buffer): void; + /** + * Creates the GPU buffer of an indexed shader attribute. + * + * @param {BufferAttribute} attribute - The indexed buffer attribute. + */ + createIndexAttribute(attribute: BufferAttribute): void; + /** + * Creates the GPU buffer of a shader attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + */ + createAttribute(attribute: BufferAttribute): void; + /** + * Creates the GPU buffer of a storage attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + */ + createStorageAttribute(attribute: BufferAttribute): void; + /** + * Updates the GPU buffer of a shader attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute to update. + */ + updateAttribute(attribute: BufferAttribute): void; + /** + * Destroys the GPU buffer of a shader attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute to destroy. + */ + destroyAttribute(attribute: BufferAttribute): void; + /** + * Checks if the given feature is supported by the backend. + * + * @param {string} name - The feature's name. + * @return {boolean} Whether the feature is supported or not. + */ + hasFeature(name: string): boolean; + /** + * Copies data of the given source texture to the given destination texture. + * + * @param {Texture} srcTexture - The source texture. + * @param {Texture} dstTexture - The destination texture. + * @param {?(Box3|Box2)} [srcRegion=null] - The region of the source texture to copy. + * @param {?(Vector2|Vector3)} [dstPosition=null] - The destination position of the copy. + * @param {number} [srcLevel=0] - The source mip level to copy from. + * @param {number} [dstLevel=0] - The destination mip level to copy to. + */ + copyTextureToTexture(srcTexture: Texture, dstTexture: Texture, srcRegion?: (Box3 | Box2) | null, dstPosition?: (Vector2 | Vector3) | null, srcLevel?: number, dstLevel?: number): void; + /** + * Copies the current bound framebuffer to the given texture. + * + * @param {Texture} texture - The destination texture. + * @param {RenderContext} renderContext - The render context. + * @param {Vector4} rectangle - A four dimensional vector defining the origin and dimension of the copy. + */ + copyFramebufferToTexture(texture: Texture, renderContext: RenderContext, rectangle: Vector4): void; + /** + * Checks if the given compatibility is supported by the backend. + * + * @param {string} name - The compatibility name. + * @return {boolean} Whether the compatibility is supported or not. + */ + hasCompatibility(name: string): boolean; + /** + * Initializes the render target defined in the given render context. + * + * @param {RenderContext} renderContext - The render context. + */ + initRenderTarget(renderContext: RenderContext): void; + /** + * Configures the active framebuffer from the given render context. + * + * @private + * @param {RenderContext} descriptor - The render context. + */ + private _setFramebuffer; + /** + * Computes the VAO key for the given index and attributes. + * + * @private + * @param {Array} attributes - An array of buffer attributes. + * @return {string} The VAO key. + */ + private _getVaoKey; + /** + * Creates a VAO from the index and attributes. + * + * @private + * @param {Array} attributes - An array of buffer attributes. + * @return {Object} The VAO data. + */ + private _createVao; + /** + * Creates a transform feedback from the given transform buffers. + * + * @private + * @param {Array} transformBuffers - The transform buffers. + * @return {WebGLTransformFeedback} The transform feedback. + */ + private _getTransformFeedback; + /** + * Setups the given bindings. + * + * @private + * @param {Array} bindings - The bindings. + * @param {WebGLProgram} programGPU - The WebGL program. + */ + private _setupBindings; + /** + * Binds the given uniforms. + * + * @private + * @param {Array} bindings - The bindings. + */ + private _bindUniforms; + /** + * The method ensures multisampled render targets are resolved. + * + * @private + * @param {RenderContext} renderContext - The render context. + */ + private _resolveRenderTarget; + /** + * Returns `true` if the `WEBGL_multisampled_render_to_texture` extension + * should be used when MSAA is enabled. + * + * @private + * @param {RenderTarget} renderTarget - The render target that should be multisampled. + * @return {boolean} Whether to use the `WEBGL_multisampled_render_to_texture` extension for MSAA or not. + */ + private _useMultisampledExtension; +} +import Backend from '../common/Backend.js'; +import WebGLAttributeUtils from './utils/WebGLAttributeUtils.js'; +import WebGLExtensions from './utils/WebGLExtensions.js'; +import WebGLCapabilities from './utils/WebGLCapabilities.js'; +import WebGLTextureUtils from './utils/WebGLTextureUtils.js'; +import { WebGLBufferRenderer } from './WebGLBufferRenderer.js'; +import WebGLState from './utils/WebGLState.js'; +import WebGLUtils from './utils/WebGLUtils.js'; +import GLSLNodeBuilder from './nodes/GLSLNodeBuilder.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/WebGLBufferRenderer.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/WebGLBufferRenderer.d.ts new file mode 100644 index 000000000..c297252cb --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/WebGLBufferRenderer.d.ts @@ -0,0 +1,13 @@ +export class WebGLBufferRenderer { + constructor(backend: any); + gl: any; + extensions: any; + info: any; + mode: any; + index: number; + type: any; + object: any; + render(start: any, count: any): void; + renderInstances(start: any, count: any, primcount: any): void; + renderMultiDraw(starts: any, counts: any, drawCount: any): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.d.ts new file mode 100644 index 000000000..c918b1ac0 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.d.ts @@ -0,0 +1,384 @@ +export default GLSLNodeBuilder; +/** + * A node builder targeting GLSL. + * + * This module generates GLSL shader code from node materials and also + * generates the respective bindings and vertex buffer definitions. These + * data are later used by the renderer to create render and compute pipelines + * for render objects. + * + * @augments NodeBuilder + */ +declare class GLSLNodeBuilder extends NodeBuilder { + /** + * Constructs a new GLSL node builder renderer. + * + * @param {Object3D} object - The 3D object. + * @param {Renderer} renderer - The renderer. + */ + constructor(object: Object3D, renderer: Renderer); + /** + * A dictionary holds for each shader stage ('vertex', 'fragment', 'compute') + * another dictionary which manages UBOs per group ('render','frame','object'). + * + * @type {Object>} + */ + uniformGroups: { + [x: string]: { + [x: string]: NodeUniformsGroup; + }; + }; + /** + * An array that holds objects defining the varying and attribute data in + * context of Transform Feedback. + * + * @type {Array>} + */ + transforms: Array<{ + [x: string]: AttributeNode | string; + }>; + /** + * A dictionary that holds for each shader stage a Map of used extensions. + * + * @type {Object>} + */ + extensions: { + [x: string]: Map; + }; + /** + * A dictionary that holds for each shader stage an Array of used builtins. + * + * @type {Object>} + */ + builtins: { + [x: string]: string[]; + }; + /** + * Checks if the given texture requires a manual conversion to the working color space. + * + * @param {Texture} texture - The texture to check. + * @return {boolean} Whether the given texture requires a conversion to working color space or not. + */ + needsToWorkingColorSpace(texture: Texture): boolean; + /** + * Includes the given method name into the current + * function node. + * + * @private + * @param {string} name - The method name to include. + * @return {CodeNode} The respective code node. + */ + private _include; + /** + * Returns the bitcast method name for a given input and outputType. + * + * @param {string} type - The output type to bitcast to. + * @param {string} inputType - The input type of the. + * @return {string} The resolved GLSL bitcast invocation. + */ + getBitcastMethod(type: string, inputType: string): string; + /** + * Returns the float packing method name for a given numeric encoding. + * + * @param {string} encoding - The numeric encoding that describes how the float values are mapped to the integer range. + * @returns {string} The resolved GLSL float packing method name. + */ + getFloatPackingMethod(encoding: string): string; + /** + * Returns the float unpacking method name for a given numeric encoding. + * + * @param {string} encoding - The numeric encoding that describes how the integer values are mapped to the float range. + * @returns {string} The resolved GLSL float unpacking method name. + */ + getFloatUnpackingMethod(encoding: string): string; + /** + * Returns the native snippet for a ternary operation. + * + * @param {string} condSnippet - The condition determining which expression gets resolved. + * @param {string} ifSnippet - The expression to resolve to if the condition is true. + * @param {string} elseSnippet - The expression to resolve to if the condition is false. + * @return {string} The resolved method name. + */ + getTernary(condSnippet: string, ifSnippet: string, elseSnippet: string): string; + /** + * Builds the given shader node. + * + * @param {ShaderNodeInternal} shaderNode - The shader node. + * @return {string} The GLSL function code. + */ + buildFunctionCode(shaderNode: ShaderNodeInternal): string; + /** + * Setups the Pixel Buffer Object (PBO) for the given storage + * buffer node. + * + * @param {StorageBufferNode} storageBufferNode - The storage buffer node. + */ + setupPBO(storageBufferNode: StorageBufferNode): void; + /** + * Returns a GLSL snippet that represents the property name of the given node. + * + * @param {Node} node - The node. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {string} The property name. + */ + getPropertyName(node: Node, shaderStage?: string): string; + /** + * Setups the Pixel Buffer Object (PBO) for the given storage + * buffer node. + * + * @param {StorageArrayElementNode} storageArrayElementNode - The storage array element node. + * @return {string} The property name. + */ + generatePBO(storageArrayElementNode: StorageArrayElementNode): string; + /** + * Generates the GLSL snippet that reads a single texel from a texture without sampling or filtering. + * + * @param {?Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvIndexSnippet - A GLSL snippet that represents texture coordinates used for sampling. + * @param {?string} levelSnippet - A GLSL snippet that represents the mip level, with level 0 containing a full size version of the texture. + * @param {?string} depthSnippet - A GLSL snippet that represents the 0-based texture array index to sample. + * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @return {string} The GLSL snippet. + */ + generateTextureLoad(texture: Texture | null, textureProperty: string, uvIndexSnippet: string, levelSnippet: string | null, depthSnippet: string | null, offsetSnippet: string | null): string; + /** + * Generates the GLSL snippet for sampling/loading the given texture. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. + * @param {?string} depthSnippet - A GLSL snippet that represents the 0-based texture array index to sample. + * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @return {string} The GLSL snippet. + */ + generateTexture(texture: Texture, textureProperty: string, uvSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; + /** + * Generates the GLSL snippet when sampling textures with explicit mip level. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. + * @param {string} levelSnippet - A GLSL snippet that represents the mip level, with level 0 containing a full size version of the texture. + * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @return {string} The GLSL snippet. + */ + generateTextureLevel(texture: Texture, textureProperty: string, uvSnippet: string, levelSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; + /** + * Generates the GLSL snippet when sampling textures with a bias to the mip level. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. + * @param {string} biasSnippet - A GLSL snippet that represents the bias to apply to the mip level before sampling. + * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @return {string} The GLSL snippet. + */ + generateTextureBias(texture: Texture, textureProperty: string, uvSnippet: string, biasSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; + /** + * Generates the GLSL snippet for sampling/loading the given texture using explicit gradients. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. + * @param {Array} gradSnippet - An array holding both gradient GLSL snippets. + * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @return {string} The GLSL snippet. + */ + generateTextureGrad(texture: Texture, textureProperty: string, uvSnippet: string, gradSnippet: Array, depthSnippet: string | null, offsetSnippet: string | null): string; + /** + * Generates the GLSL snippet for sampling a depth texture and comparing the sampled depth values + * against a reference value. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. + * @param {string} compareSnippet - A GLSL snippet that represents the reference value. + * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {string} The GLSL snippet. + */ + generateTextureCompare(texture: Texture, textureProperty: string, uvSnippet: string, compareSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, shaderStage?: string): string; + /** + * Generates the GLSL snippet for gathering four texels from the given texture. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. + * @param {string} gatherSnippet - A GLSL snippet that represents the index of the channel to read. + * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {?string} flipYSnippet - A GLSL snippet that represents the y-flip. Only used for WebGL. + * @return {string} The GLSL snippet. + */ + generateTextureGather(texture: Texture, textureProperty: string, uvSnippet: string, gatherSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, flipYSnippet: string | null): string; + /** + * Generates the GLSL snippet for performing a depth comparison on four texels in the given depth texture. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. + * @param {string} compareSnippet - A GLSL snippet that represents the reference value. + * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {?string} flipYSnippet - A GLSL snippet that represents the y-flip. Only used for WebGL. + * @return {string} The GLSL snippet. + */ + generateTextureGatherCompare(texture: Texture, textureProperty: string, uvSnippet: string, compareSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, flipYSnippet: string | null): string; + /** + * Returns the uniforms of the given shader stage as a GLSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The GLSL snippet that defines the uniforms. + */ + getUniforms(shaderStage: string): string; + /** + * Returns the shader attributes of the given shader stage as a GLSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The GLSL snippet that defines the shader attributes. + */ + getAttributes(shaderStage: string): string; + /** + * Returns the members of the given struct type node as a GLSL string. + * + * @param {StructTypeNode} struct - The struct type node. + * @return {string} The GLSL snippet that defines the struct members. + */ + getStructMembers(struct: StructTypeNode): string; + /** + * Returns the structs of the given shader stage as a GLSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The GLSL snippet that defines the structs. + */ + getStructs(shaderStage: string): string; + /** + * Returns the varyings of the given shader stage as a GLSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The GLSL snippet that defines the varyings. + */ + getVaryings(shaderStage: string): string; + /** + * Returns a builtin representing the index of an invocation within its workgroup. + * + * @return {string} The invocation local index. + */ + getInvocationLocalIndex(): string; + /** + * Returns a builtin representing the size of a subgroup within the current shader. + */ + getSubgroupSize(): void; + /** + * Returns a builtin representing the index of an invocation within its subgroup. + */ + getInvocationSubgroupIndex(): void; + /** + * Returns a builtin representing the index of the current invocation's subgroup within its workgroup. + */ + getSubgroupIndex(): void; + /** + * Returns the frag depth builtin. + * + * @return {string} The frag depth builtin. + */ + getFragDepth(): string; + /** + * Enables the given extension. + * + * @param {string} name - The extension name. + * @param {string} behavior - The extension behavior. + * @param {string} [shaderStage=this.shaderStage] - The shader stage. + */ + enableExtension(name: string, behavior: string, shaderStage?: string): void; + /** + * Returns the enabled extensions of the given shader stage as a GLSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The GLSL snippet that defines the enabled extensions. + */ + getExtensions(shaderStage: string): string; + /** + * Returns the clip distances builtin. + * + * @return {string} The clip distances builtin. + */ + getClipDistance(): string; + /** + * Whether the requested feature is available or not. + * + * @param {string} name - The requested feature. + * @return {boolean} Whether the requested feature is supported or not. + */ + isAvailable(name: string): boolean; + /** + * Enables hardware clipping. + * + * @param {string} planeCount - The clipping plane count. + */ + enableHardwareClipping(planeCount: string): void; + /** + * Enables multiview. + */ + enableMultiview(): void; + /** + * Registers a transform in context of Transform Feedback. + * + * @param {string} varyingName - The varying name. + * @param {AttributeNode} attributeNode - The attribute node. + */ + registerTransform(varyingName: string, attributeNode: AttributeNode): void; + /** + * Returns the transforms of the given shader stage as a GLSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The GLSL snippet that defines the transforms. + */ + getTransforms(): string; + /** + * Returns a GLSL struct based on the given name and variables. + * + * @private + * @param {string} name - The struct name. + * @param {string} vars - The struct variables. + * @return {string} The GLSL snippet representing a struct. + */ + private _getGLSLUniformStruct; + /** + * Returns a GLSL vertex shader based on the given shader data. + * + * @private + * @param {Object} shaderData - The shader data. + * @return {string} The vertex shader. + */ + private _getGLSLVertexCode; + /** + * Returns a GLSL fragment shader based on the given shader data. + * + * @private + * @param {Object} shaderData - The shader data. + * @return {string} The vertex shader. + */ + private _getGLSLFragmentCode; + /** + * This method is one of the more important ones since it's responsible + * for generating a matching binding instance for the given uniform node. + * + * These bindings are later used in the renderer to create bind groups + * and layouts. + * + * @param {UniformNode} node - The uniform node. + * @param {string} type - The node data type. + * @param {string} shaderStage - The shader stage. + * @param {?string} [name=null] - An optional uniform name. + * @return {NodeUniform} The node uniform object. + */ + getUniformFromNode(node: UniformNode, type: string, shaderStage: string, name?: string | null): NodeUniform; +} +import { NodeBuilder } from '../../../nodes/Nodes.js'; +import NodeUniformsGroup from '../../common/nodes/NodeUniformsGroup.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLAttributeUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLAttributeUtils.d.ts new file mode 100644 index 000000000..80d81e2f3 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLAttributeUtils.d.ts @@ -0,0 +1,64 @@ +export default WebGLAttributeUtils; +/** + * A WebGL 2 backend utility module for managing shader attributes. + * + * @private + */ +declare class WebGLAttributeUtils { + /** + * Constructs a new utility object. + * + * @param {WebGLBackend} backend - The WebGL 2 backend. + */ + constructor(backend: WebGLBackend); + /** + * A reference to the WebGL 2 backend. + * + * @type {WebGLBackend} + */ + backend: WebGLBackend; + /** + * Creates the GPU buffer for the given buffer attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + * @param {GLenum } bufferType - A flag that indicates the buffer type and thus binding point target. + */ + createAttribute(attribute: BufferAttribute, bufferType: GLenum): void; + /** + * Updates the GPU buffer of the given buffer attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + */ + updateAttribute(attribute: BufferAttribute): void; + /** + * Destroys the GPU buffer of the given buffer attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + */ + destroyAttribute(attribute: BufferAttribute): void; + /** + * This method performs a readback operation by moving buffer data from + * a storage buffer attribute from the GPU to the CPU. ReadbackBuffer can + * be used to retain and reuse handles to the intermediate buffers and prevent + * new allocation. + * + * @async + * @param {BufferAttribute} attribute - The storage buffer attribute to read frm. + * @param {ReadbackBuffer|ArrayBuffer} target - The storage buffer attribute. + * @param {number} offset - The storage buffer attribute. + * @param {number} count - The offset from which to start reading the + * @return {Promise} A promise that resolves with the buffer data when the data are ready. + */ + getArrayBufferAsync(attribute: BufferAttribute, target?: ReadbackBuffer | ArrayBuffer, offset?: number, count?: number): Promise; + /** + * Creates a WebGL buffer with the given data. + * + * @private + * @param {WebGL2RenderingContext} gl - The rendering context. + * @param {GLenum } bufferType - A flag that indicates the buffer type and thus binding point target. + * @param {TypedArray} array - The array of the buffer attribute. + * @param {GLenum} usage - The usage. + * @return {WebGLBuffer} The WebGL buffer. + */ + private _createBuffer; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLCapabilities.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLCapabilities.d.ts new file mode 100644 index 000000000..095e4ee8c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLCapabilities.d.ts @@ -0,0 +1,48 @@ +export default WebGLCapabilities; +/** + * A WebGL 2 backend utility module for managing the device's capabilities. + * + * @private + */ +declare class WebGLCapabilities { + /** + * Constructs a new utility object. + * + * @param {WebGLBackend} backend - The WebGL 2 backend. + */ + constructor(backend: WebGLBackend); + /** + * A reference to the WebGL 2 backend. + * + * @type {WebGLBackend} + */ + backend: WebGLBackend; + /** + * This value holds the cached max anisotropy value. + * + * @type {?number} + * @default null + */ + maxAnisotropy: number | null; + /** + * This value holds the cached max uniform block size value. + * + * @type {?number} + * @default null + */ + maxUniformBlockSize: number | null; + /** + * Returns the maximum anisotropy texture filtering value. This value + * depends on the device and is reported by the `EXT_texture_filter_anisotropic` + * WebGL extension. + * + * @return {number} The maximum anisotropy texture filtering value. + */ + getMaxAnisotropy(): number; + /** + * Returns the maximum number of bytes available for uniform buffers. + * + * @return {number} The maximum number of bytes available for uniform buffers. + */ + getUniformBufferLimit(): number; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLConstants.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLConstants.d.ts new file mode 100644 index 000000000..d8093bad2 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLConstants.d.ts @@ -0,0 +1,11 @@ +export namespace GLFeatureName { + let WEBGL_multi_draw: string; + let WEBGL_compressed_texture_astc: string; + let WEBGL_compressed_texture_etc: string; + let WEBGL_compressed_texture_etc1: string; + let WEBGL_compressed_texture_pvrtc: string; + let WEBGL_compressed_texture_s3tc: string; + let EXT_texture_compression_bptc: string; + let EXT_disjoint_timer_query_webgl2: string; + let OVR_multiview2: string; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLExtensions.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLExtensions.d.ts new file mode 100644 index 000000000..be5b14a6e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLExtensions.d.ts @@ -0,0 +1,56 @@ +export default WebGLExtensions; +/** + * A WebGL 2 backend utility module for managing extensions. + * + * @private + */ +declare class WebGLExtensions { + /** + * Constructs a new utility object. + * + * @param {WebGLBackend} backend - The WebGL 2 backend. + */ + constructor(backend: WebGLBackend); + /** + * A reference to the WebGL 2 backend. + * + * @type {WebGLBackend} + */ + backend: WebGLBackend; + /** + * A reference to the rendering context. + * + * @type {WebGL2RenderingContext} + */ + gl: WebGL2RenderingContext; + /** + * A list with all the supported WebGL extensions. + * + * @type {Array} + */ + availableExtensions: Array; + /** + * A dictionary with requested WebGL extensions. + * The key is the name of the extension, the value + * the requested extension object. + * + * @type {Object} + */ + extensions: { + [x: string]: Object; + }; + /** + * Returns the extension object for the given extension name. + * + * @param {string} name - The extension name. + * @return {Object} The extension object. + */ + get(name: string): Object; + /** + * Returns `true` if the requested extension is available. + * + * @param {string} name - The extension name. + * @return {boolean} Whether the given extension is available or not. + */ + has(name: string): boolean; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLState.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLState.d.ts new file mode 100644 index 000000000..2aca5c6c5 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLState.d.ts @@ -0,0 +1,372 @@ +export default WebGLState; +/** + * A WebGL 2 backend utility module for managing the WebGL state. + * + * The major goal of this module is to reduce the number of state changes + * by caching the WEbGL state with a series of variables. In this way, the + * renderer only executes state change commands when necessary which + * improves the overall performance. + * + * @private + */ +declare class WebGLState { + /** + * Constructs a new utility object. + * + * @param {WebGLBackend} backend - The WebGL 2 backend. + */ + constructor(backend: WebGLBackend); + /** + * A reference to the WebGL 2 backend. + * + * @type {WebGLBackend} + */ + backend: WebGLBackend; + /** + * A reference to the rendering context. + * + * @type {WebGL2RenderingContext} + */ + gl: WebGL2RenderingContext; + enabled: {}; + parameters: {}; + currentFlipSided: any; + currentCullFace: any; + currentProgram: any; + currentBlendingEnabled: boolean; + currentBlending: any; + currentBlendSrc: any; + currentBlendDst: number | null; + currentBlendSrcAlpha: number | null; + currentBlendDstAlpha: number | null; + currentPremultipledAlpha: boolean | null; + currentPolygonOffsetFactor: any; + currentPolygonOffsetUnits: number | null; + currentColorMask: any; + currentDepthReversed: boolean; + currentDepthFunc: any; + currentDepthMask: any; + currentStencilFunc: any; + currentStencilRef: number | null; + currentStencilFuncMask: number | null; + currentStencilFail: any; + currentStencilZFail: number | null; + currentStencilZPass: number | null; + currentStencilMask: any; + currentLineWidth: any; + currentClippingPlanes: number; + currentVAO: any; + currentIndex: WebGLBuffer | null; + currentBoundFramebuffers: {}; + currentDrawbuffers: WeakMap; + maxTextures: any; + currentTextureSlot: any; + currentBoundTextures: {}; + currentBoundBufferBases: {}; + /** + * Inits the state of the utility. + * + * @private + */ + private _init; + currentScissor: Vector4 | undefined; + currentViewport: Vector4 | undefined; + _tempVec4: Vector4 | undefined; + /** + * Enables the given WebGL capability. + * + * This method caches the capability state so + * `gl.enable()` is only called when necessary. + * + * @param {GLenum} id - The capability to enable. + */ + enable(id: GLenum): void; + /** + * Disables the given WebGL capability. + * + * This method caches the capability state so + * `gl.disable()` is only called when necessary. + * + * @param {GLenum} id - The capability to enable. + */ + disable(id: GLenum): void; + /** + * Specifies whether polygons are front- or back-facing + * by setting the winding orientation. + * + * This method caches the state so `gl.frontFace()` is only + * called when necessary. + * + * @param {boolean} flipSided - Whether triangles flipped their sides or not. + */ + setFlipSided(flipSided: boolean): void; + /** + * Specifies whether or not front- and/or back-facing + * polygons can be culled. + * + * This method caches the state so `gl.cullFace()` is only + * called when necessary. + * + * @param {number} cullFace - Defines which polygons are candidates for culling. + */ + setCullFace(cullFace: number): void; + /** + * Specifies the width of line primitives. + * + * This method caches the state so `gl.lineWidth()` is only + * called when necessary. + * + * @param {number} width - The line width. + */ + setLineWidth(width: number): void; + setMRTBlending(textures: any, mrt: any, material: any): void; + /** + * Applies blending configuration for a specific draw buffer index. + * + * @private + * @param {number} index - The draw buffer index. + * @param {Object} blending - The blending configuration (material or BlendMode). + */ + private _setMRTBlendingIndex; + /** + * Defines the blending. + * + * This method caches the state so `gl.blendEquation()`, `gl.blendEquationSeparate()`, + * `gl.blendFunc()` and `gl.blendFuncSeparate()` are only called when necessary. + * + * @param {number} blending - The blending type. + * @param {number} blendEquation - The blending equation. + * @param {number} blendSrc - Only relevant for custom blending. The RGB source blending factor. + * @param {number} blendDst - Only relevant for custom blending. The RGB destination blending factor. + * @param {number} blendEquationAlpha - Only relevant for custom blending. The blending equation for alpha. + * @param {number} blendSrcAlpha - Only relevant for custom blending. The alpha source blending factor. + * @param {number} blendDstAlpha - Only relevant for custom blending. The alpha destination blending factor. + * @param {boolean} premultipliedAlpha - Whether premultiplied alpha is enabled or not. + */ + setBlending(blending: number, blendEquation: number, blendSrc: number, blendDst: number, blendEquationAlpha: number, blendSrcAlpha: number, blendDstAlpha: number, premultipliedAlpha: boolean): void; + currentBlendEquation: any; + currentBlendEquationAlpha: number | undefined; + /** + * Specifies whether colors can be written when rendering + * into a framebuffer or not. + * + * This method caches the state so `gl.colorMask()` is only + * called when necessary. + * + * @param {boolean} colorMask - The color mask. + */ + setColorMask(colorMask: boolean): void; + /** + * Specifies whether the depth test is enabled or not. + * + * @param {boolean} depthTest - Whether the depth test is enabled or not. + */ + setDepthTest(depthTest: boolean): void; + /** + * Configures the WebGL state to use a reversed depth buffer. + * + * @param {boolean} reversed - Whether the depth buffer is reversed or not. + */ + setReversedDepth(reversed: boolean): void; + /** + * Specifies whether depth values can be written when rendering + * into a framebuffer or not. + * + * This method caches the state so `gl.depthMask()` is only + * called when necessary. + * + * @param {boolean} depthMask - The depth mask. + */ + setDepthMask(depthMask: boolean): void; + /** + * Specifies the depth compare function. + * + * This method caches the state so `gl.depthFunc()` is only + * called when necessary. + * + * @param {number} depthFunc - The depth compare function. + */ + setDepthFunc(depthFunc: number): void; + /** + * Specifies the scissor box. + * + * @param {number} x - The x-coordinate of the lower left corner of the viewport. + * @param {number} y - The y-coordinate of the lower left corner of the viewport. + * @param {number} width - The width of the viewport. + * @param {number} height - The height of the viewport. + * + */ + scissor(x: number, y: number, width: number, height: number): void; + /** + * Specifies the viewport. + * + * @param {number} x - The x-coordinate of the lower left corner of the viewport. + * @param {number} y - The y-coordinate of the lower left corner of the viewport. + * @param {number} width - The width of the viewport. + * @param {number} height - The height of the viewport. + * + */ + viewport(x: number, y: number, width: number, height: number): void; + /** + * Defines the scissor test. + * + * @param {boolean} boolean - Whether the scissor test should be enabled or not. + */ + setScissorTest(boolean: boolean): void; + /** + * Specifies whether the stencil test is enabled or not. + * + * @param {boolean} stencilTest - Whether the stencil test is enabled or not. + */ + setStencilTest(stencilTest: boolean): void; + /** + * Specifies whether stencil values can be written when rendering + * into a framebuffer or not. + * + * This method caches the state so `gl.stencilMask()` is only + * called when necessary. + * + * @param {boolean} stencilMask - The stencil mask. + */ + setStencilMask(stencilMask: boolean): void; + /** + * Specifies whether the stencil test functions. + * + * This method caches the state so `gl.stencilFunc()` is only + * called when necessary. + * + * @param {number} stencilFunc - The stencil compare function. + * @param {number} stencilRef - The reference value for the stencil test. + * @param {number} stencilMask - A bit-wise mask that is used to AND the reference value and the stored stencil value when the test is done. + */ + setStencilFunc(stencilFunc: number, stencilRef: number, stencilMask: number): void; + /** + * Specifies whether the stencil test operation. + * + * This method caches the state so `gl.stencilOp()` is only + * called when necessary. + * + * @param {number} stencilFail - The function to use when the stencil test fails. + * @param {number} stencilZFail - The function to use when the stencil test passes, but the depth test fail. + * @param {number} stencilZPass - The function to use when both the stencil test and the depth test pass, + * or when the stencil test passes and there is no depth buffer or depth testing is disabled. + */ + setStencilOp(stencilFail: number, stencilZFail: number, stencilZPass: number): void; + /** + * Configures the WebGL state for the given material. + * + * @param {Material} material - The material to configure the state for. + * @param {number} frontFaceCW - Whether the front faces are counter-clockwise or not. + * @param {number} hardwareClippingPlanes - The number of hardware clipping planes. + */ + setMaterial(material: Material, frontFaceCW: number, hardwareClippingPlanes: number): void; + /** + * Specifies the polygon offset. + * + * This method caches the state so `gl.polygonOffset()` is only + * called when necessary. + * + * @param {boolean} polygonOffset - Whether polygon offset is enabled or not. + * @param {number} factor - The scale factor for the variable depth offset for each polygon. + * @param {number} units - The multiplier by which an implementation-specific value is multiplied with to create a constant depth offset. + */ + setPolygonOffset(polygonOffset: boolean, factor: number, units: number): void; + /** + * Defines the usage of the given WebGL program. + * + * This method caches the state so `gl.useProgram()` is only + * called when necessary. + * + * @param {WebGLProgram} program - The WebGL program to use. + * @return {boolean} Whether a program change has been executed or not. + */ + useProgram(program: WebGLProgram): boolean; + /** + * Sets the vertex state by binding the given VAO and element buffer. + * + * @param {WebGLVertexArrayObject} vao - The VAO. + * @param {?WebGLBuffer} indexBuffer - The index buffer. + * @return {boolean} Whether a vertex state has been changed or not. + */ + setVertexState(vao: WebGLVertexArrayObject, indexBuffer?: WebGLBuffer | null): boolean; + /** + * Resets the vertex array state by resetting the VAO and element buffer. + */ + resetVertexState(): void; + /** + * Binds the given framebuffer. + * + * This method caches the state so `gl.bindFramebuffer()` is only + * called when necessary. + * + * @param {number} target - The binding point (target). + * @param {WebGLFramebuffer} framebuffer - The WebGL framebuffer to bind. + * @return {boolean} Whether a bind has been executed or not. + */ + bindFramebuffer(target: number, framebuffer: WebGLFramebuffer): boolean; + /** + * Defines draw buffers to which fragment colors are written into. + * Configures the MRT setup of custom framebuffers. + * + * This method caches the state so `gl.drawBuffers()` is only + * called when necessary. + * + * @param {RenderContext} renderContext - The render context. + * @param {WebGLFramebuffer} framebuffer - The WebGL framebuffer. + */ + drawBuffers(renderContext: RenderContext, framebuffer: WebGLFramebuffer): void; + /** + * Makes the given texture unit active. + * + * This method caches the state so `gl.activeTexture()` is only + * called when necessary. + * + * @param {number} webglSlot - The texture unit to make active. + */ + activeTexture(webglSlot: number): void; + /** + * Binds the given WebGL texture to a target. + * + * This method caches the state so `gl.bindTexture()` is only + * called when necessary. + * + * @param {number} webglType - The binding point (target). + * @param {WebGLTexture} webglTexture - The WebGL texture to bind. + * @param {number} webglSlot - The texture. + */ + bindTexture(webglType: number, webglTexture: WebGLTexture, webglSlot: number): void; + /** + * Binds a given WebGL buffer to a given binding point (target) at a given index. + * + * This method caches the state so `gl.bindBufferBase()` is only + * called when necessary. + * + * @param {number} target - The target for the bind operation. + * @param {number} index - The index of the target. + * @param {WebGLBuffer} buffer - The WebGL buffer. + * @return {boolean} Whether a bind has been executed or not. + */ + bindBufferBase(target: number, index: number, buffer: WebGLBuffer): boolean; + /** + * Unbinds the current bound texture. + * + * This method caches the state so `gl.bindTexture()` is only + * called when necessary. + */ + unbindTexture(): void; + /** + * Returns the value for the given parameter. + * + * @param {number} name - The paramter to get the value for. + * @return {any} The value for the given parameter. + */ + getParameter(name: number): any; + /** + * Specifies a pixel storage mode. + * + * @param {number} name - The parameter to set. + * @param {any} value - A value to set the parameter to. + */ + pixelStorei(name: number, value: any): void; +} +import { Vector4 } from '../../../math/Vector4.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLTextureUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLTextureUtils.d.ts new file mode 100644 index 000000000..75add928e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLTextureUtils.d.ts @@ -0,0 +1,197 @@ +export default WebGLTextureUtils; +/** + * A WebGL 2 backend utility module for managing textures. + * + * @private + */ +declare class WebGLTextureUtils { + /** + * Constructs a new utility object. + * + * @param {WebGLBackend} backend - The WebGL 2 backend. + */ + constructor(backend: WebGLBackend); + /** + * A reference to the WebGL 2 backend. + * + * @type {WebGLBackend} + */ + backend: WebGLBackend; + /** + * A reference to the rendering context. + * + * @type {WebGL2RenderingContext} + */ + gl: WebGL2RenderingContext; + /** + * A reference to a backend module holding extension-related + * utility functions. + * + * @type {WebGLExtensions} + */ + extensions: WebGLExtensions; + /** + * A dictionary for managing default textures. The key + * is the binding point (target), the value the WEbGL texture object. + * + * @type {Object} + */ + defaultTextures: any; + /** + * A scratch framebuffer used for attaching the source texture in + * {@link copyTextureToTexture}. + * + * @private + * @type {?WebGLFramebuffer} + */ + private _srcFramebuffer; + /** + * A scratch framebuffer used for attaching the destination texture in + * {@link copyTextureToTexture}. + * + * @private + * @type {?WebGLFramebuffer} + */ + private _dstFramebuffer; + /** + * Inits the state of the utility. + * + * @private + */ + private _init; + /** + * Returns the native texture type for the given texture. + * + * @param {Texture} texture - The texture. + * @return {GLenum} The native texture type. + */ + getGLTextureType(texture: Texture): GLenum; + /** + * Returns the native texture type for the given texture. + * + * @param {?string} internalFormatName - The internal format name. When `null`, the internal format is derived from the subsequent parameters. + * @param {GLenum} glFormat - The WebGL format. + * @param {GLenum} glType - The WebGL type. + * @param {string} colorSpace - The texture's color space. + * @param {boolean} [forceLinearTransfer=false] - Whether to force a linear transfer or not. + * @return {GLenum} The internal format. + */ + getInternalFormat(internalFormatName: string | null, glFormat: GLenum, glType: GLenum, normalized: any, colorSpace: string, forceLinearTransfer?: boolean): GLenum; + /** + * Sets the texture parameters for the given texture. + * + * @param {GLenum} textureType - The texture type. + * @param {Texture} texture - The texture. + */ + setTextureParameters(textureType: GLenum, texture: Texture): void; + /** + * Creates a default texture for the given texture that can be used + * as a placeholder until the actual texture is ready for usage. + * + * @param {Texture} texture - The texture to create a default texture for. + */ + createDefaultTexture(texture: Texture): void; + /** + * Defines a texture on the GPU for the given texture object. + * + * @param {Texture} texture - The texture. + * @param {Object} [options={}] - Optional configuration parameter. + * @return {undefined} + */ + createTexture(texture: Texture, options?: Object): undefined; + /** + * Uploads texture buffer data to the GPU memory. + * + * @param {WebGLBuffer} buffer - The buffer data. + * @param {Texture} texture - The texture, + */ + copyBufferToTexture(buffer: WebGLBuffer, texture: Texture): void; + /** + * Uploads the updated texture data to the GPU. + * + * @param {Texture} texture - The texture. + * @param {Object} [options={}] - Optional configuration parameter. + */ + updateTexture(texture: Texture, options?: Object): void; + /** + * Generates mipmaps for the given texture. + * + * @param {Texture} texture - The texture. + */ + generateMipmaps(texture: Texture): void; + /** + * Deallocates the render buffers of the given render target. + * + * @param {RenderTarget} renderTarget - The render target. + */ + deallocateRenderBuffers(renderTarget: RenderTarget): void; + /** + * Destroys the GPU data for the given texture object. + * + * @param {Texture} texture - The texture. + * @param {boolean} [isDefaultTexture=false] - Whether the texture uses a default GPU texture or not. + */ + destroyTexture(texture: Texture, isDefaultTexture?: boolean): void; + /** + * Copies data of the given source texture to the given destination texture. + * + * @param {Texture} srcTexture - The source texture. + * @param {Texture} dstTexture - The destination texture. + * @param {?(Box3|Box2)} [srcRegion=null] - The region of the source texture to copy. + * @param {?(Vector2|Vector3)} [dstPosition=null] - The destination position of the copy. + * @param {number} [srcLevel=0] - The source mip level to copy from. + * @param {number} [dstLevel=0] - The destination mip level to copy to. + */ + copyTextureToTexture(srcTexture: Texture, dstTexture: Texture, srcRegion?: (Box3 | Box2) | null, dstPosition?: (Vector2 | Vector3) | null, srcLevel?: number, dstLevel?: number): void; + /** + * Copies the current bound framebuffer to the given texture. + * + * @param {Texture} texture - The destination texture. + * @param {RenderContext} renderContext - The render context. + * @param {Vector4} rectangle - A four dimensional vector defining the origin and dimension of the copy. + */ + copyFramebufferToTexture(texture: Texture, renderContext: RenderContext, rectangle: Vector4): void; + /** + * SetupS storage for internal depth/stencil buffers and bind to correct framebuffer. + * + * @param {WebGLRenderbuffer} renderbuffer - The render buffer. + * @param {RenderContext} renderContext - The render context. + * @param {number} samples - The MSAA sample count. + * @param {boolean} [useMultisampledRTT=false] - Whether to use WEBGL_multisampled_render_to_texture or not. + */ + setupRenderBufferStorage(renderbuffer: WebGLRenderbuffer, renderContext: RenderContext, samples: number, useMultisampledRTT?: boolean): void; + /** + * Returns texture data as a typed array. + * + * @async + * @param {Texture} texture - The texture to copy. + * @param {number} x - The x coordinate of the copy origin. + * @param {number} y - The y coordinate of the copy origin. + * @param {number} width - The width of the copy. + * @param {number} height - The height of the copy. + * @param {number} faceIndex - The face index. + * @return {Promise} A Promise that resolves with a typed array when the copy operation has finished. + */ + copyTextureToBuffer(texture: Texture, x: number, y: number, width: number, height: number, faceIndex: number): Promise; + /** + * Returns the corresponding typed array type for the given WebGL data type. + * + * @private + * @param {GLenum} glType - The WebGL data type. + * @return {TypedArray.constructor} The typed array type. + */ + private _getTypedArrayType; + /** + * Returns the bytes-per-texel value for the given WebGL data type and texture format. + * + * @private + * @param {GLenum} glType - The WebGL data type. + * @param {GLenum} glFormat - The WebGL texture format. + * @return {number} The bytes-per-texel. + */ + private _getBytesPerTexel; + /** + * Frees the internal resources. + */ + dispose(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLTimestampQueryPool.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLTimestampQueryPool.d.ts new file mode 100644 index 000000000..c6a325c47 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLTimestampQueryPool.d.ts @@ -0,0 +1,58 @@ +export default WebGLTimestampQueryPool; +/** + * Manages a pool of WebGL timestamp queries for performance measurement. + * Handles creation, execution, and resolution of timer queries using WebGL extensions. + * + * @augments TimestampQueryPool + */ +declare class WebGLTimestampQueryPool extends TimestampQueryPool { + /** + * Creates a new WebGL timestamp query pool. + * + * @param {WebGLRenderingContext|WebGL2RenderingContext} gl - The WebGL context. + * @param {string} type - The type identifier for this query pool. + * @param {number} [maxQueries=2048] - Maximum number of queries this pool can hold. + */ + constructor(gl: WebGLRenderingContext | WebGL2RenderingContext, type: string, maxQueries?: number); + gl: WebGLRenderingContext | WebGL2RenderingContext; + type: string; + ext: any; + queries: any[] | undefined; + activeQuery: number | null; + queryStates: Map | undefined; + /** + * Allocates a pair of queries for a given render context. + * + * @param {string} uid - A unique identifier for the render context. + * @returns {?number} The base offset for the allocated queries, or null if allocation failed. + */ + allocateQueriesForContext(uid: string): number | null; + /** + * Begins a timestamp query for the specified render context. + * + * @param {string} uid - A unique identifier for the render context. + */ + beginQuery(uid: string): void; + /** + * Ends the active timestamp query for the specified render context. + * + * @param {string} uid - A unique identifier for the render context. + */ + endQuery(uid: string): void; + /** + * Asynchronously resolves all completed queries and returns the total duration. + * + * @async + * @returns {Promise} The total duration in milliseconds, or the last valid value if resolution fails. + */ + resolveQueriesAsync(): Promise; + /** + * Resolves a single query, checking for completion and disjoint operation. + * + * @async + * @param {WebGLQuery} query - The query object to resolve. + * @returns {Promise} The elapsed time in milliseconds. + */ + resolveQuery(query: WebGLQuery): Promise; +} +import TimestampQueryPool from '../../common/TimestampQueryPool.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLUtils.d.ts new file mode 100644 index 000000000..1f75ec7e8 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLUtils.d.ts @@ -0,0 +1,51 @@ +export default WebGLUtils; +/** + * A WebGL 2 backend utility module with common helpers. + * + * @private + */ +declare class WebGLUtils { + /** + * Constructs a new utility object. + * + * @param {WebGLBackend} backend - The WebGL 2 backend. + */ + constructor(backend: WebGLBackend); + /** + * A reference to the WebGL 2 backend. + * + * @type {WebGLBackend} + */ + backend: WebGLBackend; + /** + * A reference to the rendering context. + * + * @type {WebGL2RenderingContext} + */ + gl: WebGL2RenderingContext; + /** + * A reference to a backend module holding extension-related + * utility functions. + * + * @type {WebGLExtensions} + */ + extensions: WebGLExtensions; + /** + * Converts the given three.js constant into a WebGL constant. + * The method currently supports the conversion of texture formats + * and types. + * + * @param {number} p - The three.js constant. + * @param {string} [colorSpace=NoColorSpace] - The color space. + * @return {?number} The corresponding WebGL constant. + */ + convert(p: number, colorSpace?: string): number | null; + /** + * This method can be used to synchronize the CPU with the GPU by waiting until + * ongoing GPU commands have been completed. + * + * @private + * @return {Promise} A promise that resolves when all ongoing GPU commands have been completed. + */ + private _clientWaitAsync; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLAnimation.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLAnimation.d.ts new file mode 100644 index 000000000..8c234dea3 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLAnimation.d.ts @@ -0,0 +1,6 @@ +export function WebGLAnimation(): { + start: () => void; + stop: () => void; + setAnimationLoop: (callback: any) => void; + setContext: (value: any) => void; +}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLAttributes.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLAttributes.d.ts new file mode 100644 index 000000000..74dfcf7fd --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLAttributes.d.ts @@ -0,0 +1,5 @@ +export function WebGLAttributes(gl: any): { + get: (attribute: any) => any; + remove: (attribute: any) => void; + update: (attribute: any, bufferType: any) => void; +}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBackground.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBackground.d.ts new file mode 100644 index 000000000..a05a75907 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBackground.d.ts @@ -0,0 +1,10 @@ +export function WebGLBackground(renderer: any, environments: any, state: any, objects: any, alpha: any, premultipliedAlpha: any): { + getClearColor: () => Color; + setClearColor: (color: any, alpha?: number) => void; + getClearAlpha: () => number; + setClearAlpha: (alpha: any) => void; + render: (scene: any) => void; + addToRenderList: (renderList: any, scene: any) => void; + dispose: () => void; +}; +import { Color } from '../../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBindingStates.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBindingStates.d.ts new file mode 100644 index 000000000..73ea033cc --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBindingStates.d.ts @@ -0,0 +1,12 @@ +export function WebGLBindingStates(gl: any, attributes: any): { + setup: (object: any, material: any, program: any, geometry: any, index: any) => void; + reset: () => void; + resetDefaultState: () => void; + dispose: () => void; + releaseStatesOfGeometry: (geometry: any) => void; + releaseStatesOfObject: (object: any) => void; + releaseStatesOfProgram: (program: any) => void; + initAttributes: () => void; + enableAttribute: (attribute: any) => void; + disableUnusedAttributes: () => void; +}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBufferRenderer.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBufferRenderer.d.ts new file mode 100644 index 000000000..8182d4ea9 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBufferRenderer.d.ts @@ -0,0 +1,8 @@ +export function WebGLBufferRenderer(gl: any, extensions: any, info: any): void; +export class WebGLBufferRenderer { + constructor(gl: any, extensions: any, info: any); + setMode: (value: any) => void; + render: (start: any, count: any) => void; + renderInstances: (start: any, count: any, primcount: any) => void; + renderMultiDraw: (starts: any, counts: any, drawCount: any) => void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLCapabilities.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLCapabilities.d.ts new file mode 100644 index 000000000..1367f224b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLCapabilities.d.ts @@ -0,0 +1,20 @@ +export function WebGLCapabilities(gl: any, extensions: any, parameters: any, utils: any): { + isWebGL2: boolean; + getMaxAnisotropy: () => any; + getMaxPrecision: (precision: any) => "highp" | "mediump" | "lowp"; + textureFormatReadable: (textureFormat: any) => boolean; + textureTypeReadable: (textureType: any) => boolean; + precision: any; + logarithmicDepthBuffer: boolean; + reversedDepthBuffer: any; + maxTextures: any; + maxVertexTextures: any; + maxTextureSize: any; + maxCubemapSize: any; + maxAttributes: any; + maxVertexUniforms: any; + maxVaryings: any; + maxFragmentUniforms: any; + maxSamples: any; + samples: any; +}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLEnvironments.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLEnvironments.d.ts new file mode 100644 index 000000000..5cda7553c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLEnvironments.d.ts @@ -0,0 +1,4 @@ +export function WebGLEnvironments(renderer: any): { + get: (texture: any, usePMREM?: boolean) => any; + dispose: () => void; +}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLExtensions.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLExtensions.d.ts new file mode 100644 index 000000000..485025fbb --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLExtensions.d.ts @@ -0,0 +1,5 @@ +export function WebGLExtensions(gl: any): { + has: (name: any) => boolean; + init: () => void; + get: (name: any) => any; +}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLGeometries.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLGeometries.d.ts new file mode 100644 index 000000000..6dc941500 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLGeometries.d.ts @@ -0,0 +1,5 @@ +export function WebGLGeometries(gl: any, attributes: any, info: any, bindingStates: any): { + get: (object: any, geometry: any) => any; + update: (geometry: any) => void; + getWireframeAttribute: (geometry: any) => any; +}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts new file mode 100644 index 000000000..344fcb256 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts @@ -0,0 +1,9 @@ +export function WebGLIndexedBufferRenderer(gl: any, extensions: any, info: any): void; +export class WebGLIndexedBufferRenderer { + constructor(gl: any, extensions: any, info: any); + setMode: (value: any) => void; + setIndex: (value: any) => void; + render: (start: any, count: any) => void; + renderInstances: (start: any, count: any, primcount: any) => void; + renderMultiDraw: (starts: any, counts: any, drawCount: any) => void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLInfo.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLInfo.d.ts new file mode 100644 index 000000000..dd5ad7dac --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLInfo.d.ts @@ -0,0 +1,17 @@ +export function WebGLInfo(gl: any): { + memory: { + geometries: number; + textures: number; + }; + render: { + frame: number; + calls: number; + triangles: number; + points: number; + lines: number; + }; + programs: null; + autoReset: boolean; + reset: () => void; + update: (count: any, mode: any, instanceCount: any) => void; +}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLLights.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLLights.d.ts new file mode 100644 index 000000000..3c823d28b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLLights.d.ts @@ -0,0 +1,40 @@ +export function WebGLLights(extensions: any): { + setup: (lights: any) => void; + setupView: (lights: any, camera: any) => void; + state: { + version: number; + hash: { + directionalLength: number; + pointLength: number; + spotLength: number; + rectAreaLength: number; + hemiLength: number; + numDirectionalShadows: number; + numPointShadows: number; + numSpotShadows: number; + numSpotMaps: number; + numLightProbes: number; + }; + ambient: number[]; + probe: never[]; + directional: never[]; + directionalShadow: never[]; + directionalShadowMap: never[]; + directionalShadowMatrix: never[]; + spot: never[]; + spotLightMap: never[]; + spotShadow: never[]; + spotShadowMap: never[]; + spotLightMatrix: never[]; + rectArea: never[]; + rectAreaLTC1: null; + rectAreaLTC2: null; + point: never[]; + pointShadow: never[]; + pointShadowMap: never[]; + pointShadowMatrix: never[]; + hemi: never[]; + numSpotLightShadowsWithMaps: number; + numLightProbes: number; + }; +}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLMaterials.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLMaterials.d.ts new file mode 100644 index 000000000..2db593304 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLMaterials.d.ts @@ -0,0 +1,4 @@ +export function WebGLMaterials(renderer: any, properties: any): { + refreshFogUniforms: (uniforms: any, fog: any) => void; + refreshMaterialUniforms: (uniforms: any, material: any, pixelRatio: any, height: any, transmissionRenderTarget: any) => void; +}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLMorphtargets.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLMorphtargets.d.ts new file mode 100644 index 000000000..1882f060b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLMorphtargets.d.ts @@ -0,0 +1,3 @@ +export function WebGLMorphtargets(gl: any, capabilities: any, textures: any): { + update: (object: any, geometry: any, program: any) => void; +}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLObjects.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLObjects.d.ts new file mode 100644 index 000000000..50c005398 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLObjects.d.ts @@ -0,0 +1,4 @@ +export function WebGLObjects(gl: any, geometries: any, attributes: any, bindingStates: any, info: any): { + update: (object: any) => any; + dispose: () => void; +}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLOutput.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLOutput.d.ts new file mode 100644 index 000000000..2977b038f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLOutput.d.ts @@ -0,0 +1,11 @@ +export function WebGLOutput(type: any, width: any, height: any, antialias: any, depth: any, stencil: any): void; +export class WebGLOutput { + constructor(type: any, width: any, height: any, antialias: any, depth: any, stencil: any); + setSize: (width: any, height: any) => void; + setEffects: (effects: any) => void; + begin: (renderer: any, renderTarget: any) => boolean; + hasRenderPass: () => boolean; + end: (renderer: any, deltaTime: any) => void; + isCompositing: () => boolean; + dispose: () => void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLPrograms.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLPrograms.d.ts new file mode 100644 index 000000000..f66a01e0f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLPrograms.d.ts @@ -0,0 +1,141 @@ +export function WebGLPrograms(renderer: any, environments: any, extensions: any, capabilities: any, bindingStates: any, clipping: any): { + getParameters: (material: any, lights: any, shadows: any, scene: any, object: any, lightProbeGrids: any) => { + shaderID: any; + shaderType: any; + shaderName: any; + vertexShader: any; + fragmentShader: any; + defines: any; + customVertexShaderID: any; + customFragmentShaderID: any; + isRawShaderMaterial: boolean; + glslVersion: any; + precision: any; + batching: boolean; + batchingColor: boolean; + instancing: boolean; + instancingColor: boolean; + instancingMorph: boolean; + outputColorSpace: any; + alphaToCoverage: boolean; + map: boolean; + matcap: boolean; + envMap: boolean; + envMapMode: any; + envMapCubeUVHeight: any; + aoMap: boolean; + lightMap: boolean; + bumpMap: boolean; + normalMap: boolean; + displacementMap: boolean; + emissiveMap: boolean; + normalMapObjectSpace: boolean; + normalMapTangentSpace: boolean; + packedNormalMap: boolean; + metalnessMap: boolean; + roughnessMap: boolean; + anisotropy: boolean; + anisotropyMap: boolean; + clearcoat: boolean; + clearcoatMap: boolean; + clearcoatNormalMap: boolean; + clearcoatRoughnessMap: boolean; + dispersion: boolean; + iridescence: boolean; + iridescenceMap: boolean; + iridescenceThicknessMap: boolean; + sheen: boolean; + sheenColorMap: boolean; + sheenRoughnessMap: boolean; + specularMap: boolean; + specularColorMap: boolean; + specularIntensityMap: boolean; + transmission: boolean; + transmissionMap: boolean; + thicknessMap: boolean; + gradientMap: boolean; + opaque: boolean; + alphaMap: boolean; + alphaTest: boolean; + alphaHash: boolean; + combine: any; + mapUv: string | false; + aoMapUv: string | false; + lightMapUv: string | false; + bumpMapUv: string | false; + normalMapUv: string | false; + displacementMapUv: string | false; + emissiveMapUv: string | false; + metalnessMapUv: string | false; + roughnessMapUv: string | false; + anisotropyMapUv: string | false; + clearcoatMapUv: string | false; + clearcoatNormalMapUv: string | false; + clearcoatRoughnessMapUv: string | false; + iridescenceMapUv: string | false; + iridescenceThicknessMapUv: string | false; + sheenColorMapUv: string | false; + sheenRoughnessMapUv: string | false; + specularMapUv: string | false; + specularColorMapUv: string | false; + specularIntensityMapUv: string | false; + transmissionMapUv: string | false; + thicknessMapUv: string | false; + alphaMapUv: string | false; + vertexTangents: boolean; + vertexNormals: boolean; + vertexColors: any; + vertexAlphas: boolean; + pointsUvs: boolean; + fog: boolean; + useFog: boolean; + fogExp2: any; + flatShading: any; + sizeAttenuation: boolean; + logarithmicDepthBuffer: any; + reversedDepthBuffer: any; + skinning: boolean; + morphTargets: boolean; + morphNormals: boolean; + morphColors: boolean; + morphTargetsCount: any; + morphTextureStride: number; + numDirLights: any; + numPointLights: any; + numSpotLights: any; + numSpotLightMaps: any; + numRectAreaLights: any; + numHemiLights: any; + numDirLightShadows: any; + numPointLightShadows: any; + numSpotLightShadows: any; + numSpotLightShadowsWithMaps: any; + numLightProbes: any; + numLightProbeGrids: any; + numClippingPlanes: any; + numClipIntersection: any; + dithering: any; + shadowMapEnabled: any; + shadowMapType: any; + toneMapping: number; + decodeVideoTexture: boolean; + decodeVideoTextureEmissive: boolean; + premultipliedAlpha: any; + doubleSided: boolean; + flipSided: boolean; + useDepthPacking: boolean; + depthPacking: any; + index0AttributeName: any; + extensionClipCullDistance: any; + extensionMultiDraw: any; + rendererExtensionParallelShaderCompile: any; + customProgramCacheKey: any; + }; + getProgramCacheKey: (parameters: any) => string; + getUniforms: (material: any) => any; + acquireProgram: (parameters: any, cacheKey: any) => any; + releaseProgram: (program: any) => void; + releaseShaderCache: (material: any) => void; + programs: any[]; + dispose: () => void; +}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLProperties.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLProperties.d.ts new file mode 100644 index 000000000..85512905d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLProperties.d.ts @@ -0,0 +1,7 @@ +export function WebGLProperties(): { + has: (object: any) => boolean; + get: (object: any) => any; + remove: (object: any) => void; + update: (object: any, key: any, value: any) => void; + dispose: () => void; +}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLRenderLists.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLRenderLists.d.ts new file mode 100644 index 000000000..b6e0f377c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLRenderLists.d.ts @@ -0,0 +1,14 @@ +export function WebGLRenderLists(): { + get: (scene: any, renderCallDepth: any) => any; + dispose: () => void; +}; +export function WebGLRenderList(): { + opaque: any[]; + transmissive: any[]; + transparent: any[]; + init: () => void; + push: (object: any, geometry: any, material: any, groupOrder: any, z: any, group: any) => void; + unshift: (object: any, geometry: any, material: any, groupOrder: any, z: any, group: any) => void; + finish: () => void; + sort: (customOpaqueSort: any, customTransparentSort: any) => void; +}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLRenderStates.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLRenderStates.d.ts new file mode 100644 index 000000000..f6d5a471a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLRenderStates.d.ts @@ -0,0 +1,4 @@ +export function WebGLRenderStates(extensions: any): { + get: (scene: any, renderCallDepth?: number) => any; + dispose: () => void; +}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLShader.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLShader.d.ts new file mode 100644 index 000000000..c4b1be0cc --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLShader.d.ts @@ -0,0 +1 @@ +export function WebGLShader(gl: any, type: any, string: any): any; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLShaderCache.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLShaderCache.d.ts new file mode 100644 index 000000000..b3c358d02 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLShaderCache.d.ts @@ -0,0 +1,11 @@ +export class WebGLShaderCache { + shaderCache: Map; + materialCache: Map; + update(material: any): this; + remove(material: any): this; + getVertexShaderID(material: any): any; + getFragmentShaderID(material: any): any; + dispose(): void; + _getShaderCacheForMaterial(material: any): any; + _getShaderStage(code: any): any; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLState.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLState.d.ts new file mode 100644 index 000000000..2915facbf --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLState.d.ts @@ -0,0 +1,39 @@ +export function WebGLState(gl: any, extensions: any): { + buffers: { + color: any; + depth: any; + stencil: any; + }; + enable: (id: any) => void; + disable: (id: any) => void; + bindFramebuffer: (target: any, framebuffer: any) => boolean; + drawBuffers: (renderTarget: any, framebuffer: any) => void; + useProgram: (program: any) => boolean; + setBlending: (blending: any, blendEquation: any, blendSrc: any, blendDst: any, blendEquationAlpha: any, blendSrcAlpha: any, blendDstAlpha: any, blendColor: any, blendAlpha: any, premultipliedAlpha: any) => void; + setMaterial: (material: any, frontFaceCW: any) => void; + setFlipSided: (flipSided: any) => void; + setCullFace: (cullFace: any) => void; + setLineWidth: (width: any) => void; + setPolygonOffset: (polygonOffset: any, factor: any, units: any) => void; + setScissorTest: (scissorTest: any) => void; + activeTexture: (webglSlot: any) => void; + bindTexture: (webglType: any, webglTexture: any, webglSlot: any) => void; + unbindTexture: () => void; + compressedTexImage2D: (...args: any[]) => void; + compressedTexImage3D: (...args: any[]) => void; + texImage2D: (...args: any[]) => void; + texImage3D: (...args: any[]) => void; + pixelStorei: (name: any, value: any) => void; + getParameter: (name: any) => any; + updateUBOMapping: (uniformsGroup: any, program: any) => void; + uniformBlockBinding: (uniformsGroup: any, program: any) => void; + texStorage2D: (...args: any[]) => void; + texStorage3D: (...args: any[]) => void; + texSubImage2D: (...args: any[]) => void; + texSubImage3D: (...args: any[]) => void; + compressedTexSubImage2D: (...args: any[]) => void; + compressedTexSubImage3D: (...args: any[]) => void; + scissor: (scissor: any) => void; + viewport: (viewport: any) => void; + reset: () => void; +}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLTextures.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLTextures.d.ts new file mode 100644 index 000000000..8d958b7ae --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLTextures.d.ts @@ -0,0 +1,20 @@ +export function WebGLTextures(_gl: any, extensions: any, state: any, properties: any, capabilities: any, utils: any, info: any): void; +export class WebGLTextures { + constructor(_gl: any, extensions: any, state: any, properties: any, capabilities: any, utils: any, info: any); + allocateTextureUnit: () => number; + resetTextureUnits: () => void; + getTextureUnits: () => number; + setTextureUnits: (value: any) => void; + setTexture2D: (texture: any, slot: any) => void; + setTexture2DArray: (texture: any, slot: any) => void; + setTexture3D: (texture: any, slot: any) => void; + setTextureCube: (texture: any, slot: any) => void; + rebindTextures: (renderTarget: any, colorTexture: any, depthTexture: any) => void; + setupRenderTarget: (renderTarget: any) => void; + updateRenderTargetMipmap: (renderTarget: any) => void; + updateMultisampleRenderTarget: (renderTarget: any) => void; + setupDepthRenderbuffer: (renderTarget: any) => void; + setupFrameBufferTexture: (framebuffer: any, renderTarget: any, texture: any, attachment: any, textureTarget: any, level: any) => void; + useMultisampledRTT: (renderTarget: any) => boolean; + isReversedDepthBuffer: () => any; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUniforms.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUniforms.d.ts new file mode 100644 index 000000000..8535725df --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUniforms.d.ts @@ -0,0 +1,9 @@ +export class WebGLUniforms { + static upload(gl: any, seq: any, values: any, textures: any): void; + static seqWithValue(seq: any, values: any): any[]; + constructor(gl: any, program: any); + seq: any[]; + map: {}; + setValue(gl: any, name: any, value: any, textures: any): void; + setOptional(gl: any, object: any, name: any): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUniformsGroups.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUniformsGroups.d.ts new file mode 100644 index 000000000..3eb1deb18 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUniformsGroups.d.ts @@ -0,0 +1,5 @@ +export function WebGLUniformsGroups(gl: any, info: any, capabilities: any, state: any): { + bind: (uniformsGroup: any, program: any) => void; + update: (uniformsGroup: any, program: any) => void; + dispose: () => void; +}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUtils.d.ts new file mode 100644 index 000000000..4c3bac4b4 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUtils.d.ts @@ -0,0 +1,3 @@ +export function WebGLUtils(gl: any, extensions: any): { + convert: (p: any, colorSpace?: string) => any; +}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPUBackend.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPUBackend.d.ts new file mode 100644 index 000000000..76ecdbec3 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPUBackend.d.ts @@ -0,0 +1,580 @@ +export default WebGPUBackend; +/** + * A backend implementation targeting WebGPU. + * + * @private + * @augments Backend + */ +declare class WebGPUBackend extends Backend { + /** + * WebGPUBackend options. + * + * @typedef {Object} WebGPUBackend~Options + * @property {boolean} [logarithmicDepthBuffer=false] - Whether logarithmic depth buffer is enabled or not. + * @property {boolean} [reversedDepthBuffer=false] - Whether reversed depth buffer is enabled or not. + * @property {boolean} [alpha=true] - Whether the default framebuffer (which represents the final contents of the canvas) should be transparent or opaque. + * @property {boolean} [depth=true] - Whether the default framebuffer should have a depth buffer or not. + * @property {boolean} [stencil=false] - Whether the default framebuffer should have a stencil buffer or not. + * @property {boolean} [antialias=false] - Whether MSAA as the default anti-aliasing should be enabled or not. + * @property {number} [samples=0] - When `antialias` is `true`, `4` samples are used by default. Set this parameter to any other integer value than 0 to overwrite the default. + * @property {boolean} [forceWebGL=false] - If set to `true`, the renderer uses a WebGL 2 backend no matter if WebGPU is supported or not. + * @property {boolean} [trackTimestamp=false] - Whether to track timestamps with a Timestamp Query API or not. + * @property {string} [powerPreference=undefined] - The power preference. + * @property {Object} [requiredLimits=undefined] - Specifies the limits that are required by the device request. The request will fail if the adapter cannot provide these limits. + * @property {GPUDevice} [device=undefined] - If there is an existing GPU device on app level, it can be passed to the renderer as a parameter. + * @property {number} [outputType=undefined] - Texture type for output to canvas. By default, device's preferred format is used; other formats may incur overhead. + */ + /** + * Constructs a new WebGPU backend. + * + * @param {WebGPUBackend~Options} [parameters] - The configuration parameter. + */ + constructor(parameters?: {}); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWebGPUBackend: boolean; + /** + * Indicates whether the backend is in WebGPU compatibility mode or not. + * The backend must be initialized before the property can be evaluated. + * + * @type {?boolean} + * @readonly + * @default null + */ + readonly compatibilityMode: boolean | null; + /** + * A reference to the device. + * + * @type {?GPUDevice} + * @default null + */ + device: GPUDevice | null; + /** + * A reference to the default render pass descriptor. + * + * @type {?Object} + * @default null + */ + defaultRenderPassdescriptor: Object | null; + /** + * A reference to a backend module holding common utility functions. + * + * @type {WebGPUUtils} + */ + utils: WebGPUUtils; + /** + * A reference to a backend module holding shader attribute-related + * utility functions. + * + * @type {WebGPUAttributeUtils} + */ + attributeUtils: WebGPUAttributeUtils; + /** + * A reference to a backend module holding shader binding-related + * utility functions. + * + * @type {WebGPUBindingUtils} + */ + bindingUtils: WebGPUBindingUtils; + /** + * A reference to a backend module holding device capability related + * utility functions. + * + * @type {WebGPUCapabilities} + */ + capabilities: WebGPUCapabilities; + /** + * A reference to a backend module holding shader pipeline-related + * utility functions. + * + * @type {WebGPUPipelineUtils} + */ + pipelineUtils: WebGPUPipelineUtils; + /** + * A reference to a backend module holding shader texture-related + * utility functions. + * + * @type {WebGPUTextureUtils} + */ + textureUtils: WebGPUTextureUtils; + /** + * A map that manages the resolve buffers for occlusion queries. + * + * @type {Map} + */ + occludedResolveCache: Map; + /** + * A map of compatibility checks. + * + * @type {Object} + */ + _compatibility: Object; + /** + * Registers external GPU textures from `XRGPUBinding` for use in rendering. + * + * @param {RenderTarget} renderTarget - The render target to register the textures for. + * @param {GPUTexture} colorTexture - The shared XR color GPUTexture. + * @param {?Array} [viewDescriptors=null] - Optional view descriptors, one per XR view. + */ + setXRRenderTargetTextures(renderTarget: RenderTarget, colorTexture: GPUTexture, viewDescriptors?: Array | null): void; + /** + * A reference to the context. + * + * @type {?GPUCanvasContext} + * @default null + */ + get context(): GPUCanvasContext | null; + /** + * This method performs a readback operation by moving buffer data from + * a storage buffer attribute from the GPU to the CPU. ReadbackBuffer can + * be used to retain and reuse handles to the intermediate buffers and prevent + * new allocation. + * + * @async + * @param {BufferAttribute} attribute - The storage buffer attribute to read frm. + * @param {number} count - The offset from which to start reading the + * @param {number} offset - The storage buffer attribute. + * @param {ReadbackBuffer|ArrayBuffer} target - The storage buffer attribute. + * @return {Promise} A promise that resolves with the buffer data when the data are ready. + */ + getArrayBufferAsync(attribute: BufferAttribute, target?: ReadbackBuffer | ArrayBuffer, offset?: number, count?: number): Promise; + /** + * Returns the backend's rendering context. + * + * @return {GPUCanvasContext} The rendering context. + */ + getContext(): GPUCanvasContext; + /** + * Returns the default render pass descriptor. + * + * In WebGPU, the default framebuffer must be configured + * like custom framebuffers so the backend needs a render + * pass descriptor even when rendering directly to screen. + * + * @private + * @return {Object} The render pass descriptor. + */ + private _getDefaultRenderPassDescriptor; + /** + * Returns whether the render target is a render target array with depth 2D array texture. + * + * @param {RenderContext} renderContext - The render context. + * @return {boolean} Whether the render target is a render target array with depth 2D array texture. + * + * @private + */ + private _isRenderCameraDepthArray; + /** + * Returns whether the current render context references external textures. + * + * External textures can change every frame, so their descriptors must not be cached. + * + * @private + * @param {RenderContext} renderContext - The render context. + * @return {boolean} Whether the render context uses external textures. + */ + private _hasExternalTexture; + /** + * Creates attachment views for an external texture render target. + * + * @private + * @param {RenderContext} renderContext - The render context. + * @param {Object} textureData - The backend data for the texture. + * @return {Array} The attachment view descriptors. + */ + private _createExternalTextureViews; + /** + * Returns the render pass descriptor for the given render context. + * + * @private + * @param {RenderContext} renderContext - The render context. + * @param {Object} colorAttachmentsConfig - Configuration object for the color attachments. + * @return {Object} The render pass descriptor. + */ + private _getRenderPassDescriptor; + /** + * This method is executed at the beginning of a render call and prepares + * the WebGPU state for upcoming render calls + * + * @param {RenderContext} renderContext - The render context. + */ + beginRender(renderContext: RenderContext): void; + /** + * Creates render pass descriptors for each camera in an array camera. + * + * @param {RenderContext} renderContext - The render context. + * @param {Object} renderContextData - The render context data. + * @param {Object} descriptor - The render pass descriptor. + * @param {ArrayCamera} cameras - The array camera. + * + * @private + */ + private _createArrayCameraLayerDescriptors; + /** + * Updates render pass descriptors for each camera in an array camera. + * + * @param {RenderContext} renderContext - The render context. + * @param {Object} renderContextData - The render context data. + * @param {ArrayCamera} cameras - The array camera. + * + */ + _updateArrayCameraLayerDescriptors(renderContext: RenderContext, renderContextData: Object, cameras: ArrayCamera): void; + /** + * This method is executed at the end of a render call and finalizes work + * after draw calls. + * + * @param {RenderContext} renderContext - The render context. + */ + finishRender(renderContext: RenderContext): void; + /** + * Returns `true` if the given 3D object is fully occluded by other + * 3D objects in the scene. + * + * @param {RenderContext} renderContext - The render context. + * @param {Object3D} object - The 3D object to test. + * @return {boolean} Whether the 3D object is fully occluded or not. + */ + isOccluded(renderContext: RenderContext, object: Object3D): boolean; + /** + * This method processes the result of occlusion queries and writes it + * into render context data. + * + * @async + * @param {RenderContext} renderContext - The render context. + * @return {Promise} A Promise that resolves when the occlusion query results have been processed. + */ + resolveOccludedAsync(renderContext: RenderContext): Promise; + /** + * Updates the viewport with the values from the given render context. + * + * @param {RenderContext} renderContext - The render context. + */ + updateViewport(renderContext: RenderContext): void; + /** + * Updates the scissor with the values from the given render context. + * + * @param {RenderContext} renderContext - The render context. + */ + updateScissor(renderContext: RenderContext): void; + /** + * Returns the clear color and alpha into a single + * color object. + * + * @return {Color4} The clear color. + */ + getClearColor(): Color4; + /** + * Performs a clear operation. + * + * @param {boolean} color - Whether the color buffer should be cleared or not. + * @param {boolean} depth - Whether the depth buffer should be cleared or not. + * @param {boolean} stencil - Whether the stencil buffer should be cleared or not. + * @param {?RenderContext} [renderTargetContext=null] - The render context of the current set render target. + */ + clear(color: boolean, depth: boolean, stencil: boolean, renderTargetContext?: RenderContext | null): void; + /** + * This method is executed at the beginning of a compute call and + * prepares the state for upcoming compute tasks. + * + * @param {Node|Array} computeGroup - The compute node(s). + */ + beginCompute(computeGroup: Node | Array): void; + /** + * Executes a compute command for the given compute node. + * + * @param {Node|Array} computeGroup - The group of compute nodes of a compute call. Can be a single compute node. + * @param {Node} computeNode - The compute node. + * @param {Array} bindings - The bindings. + * @param {ComputePipeline} pipeline - The compute pipeline. + * @param {number|Array|IndirectStorageBufferAttribute} [dispatchSize=null] + * - A single number representing count, or + * - An array [x, y, z] representing dispatch size, or + * - A IndirectStorageBufferAttribute for indirect dispatch size. + */ + compute(computeGroup: Node | Array, computeNode: Node, bindings: Array, pipeline: ComputePipeline, dispatchSize?: number | Array | IndirectStorageBufferAttribute): void; + /** + * This method is executed at the end of a compute call and + * finalizes work after compute tasks. + * + * @param {Node|Array} computeGroup - The compute node(s). + */ + finishCompute(computeGroup: Node | Array): void; + /** + * Internal draw function that performs the draw with the given pass encoder. + * + * @private + * @param {RenderObject} renderObject - The render object. + * @param {Info} info - Holds a series of statistical information about the GPU memory and the rendering process. + * @param {Object} renderContextData - The render context data object, holding current pass state and occlusion query tracking. + * @param {GPURenderPipeline} pipelineGPU - The GPU render pipeline. + * @param {Array} bindings - The bind groups. + * @param {Array} vertexBuffers - The vertex buffers. + * @param {{vertexCount: number, firstVertex: number, instanceCount: number, firstInstance: number}} drawParams - The draw parameters. + * @param {GPURenderPassEncoder|GPURenderBundleEncoder} passEncoderGPU - The GPU pass encoder used for recording draw commands. + * @param {Object} currentSets - Tracking object for currently set pipeline, attributes, bind groups, and index state. + */ + private _draw; + /** + * Executes a draw command for the given render object. + * + * @param {RenderObject} renderObject - The render object to draw. + * @param {Info} info - Holds a series of statistical information about the GPU memory and the rendering process. + */ + draw(renderObject: RenderObject, info: Info): void; + /** + * Returns `true` if the render pipeline requires an update. + * + * @param {RenderObject} renderObject - The render object. + * @return {boolean} Whether the render pipeline requires an update or not. + */ + needsRenderUpdate(renderObject: RenderObject): boolean; + /** + * Returns a cache key that is used to identify render pipelines. + * + * @param {RenderObject} renderObject - The render object. + * @return {string} The cache key. + */ + getRenderCacheKey(renderObject: RenderObject): string; + /** + * Updates a GPU sampler for the given texture. + * + * @param {Texture} texture - The texture to update the sampler for. + * @param {TextureNode} textureNode - The texture node to update the sampler with. + * @return {string} The current sampler key. + */ + updateSampler(texture: Texture, textureNode: TextureNode): string; + /** + * Creates a default texture for the given texture that can be used + * as a placeholder until the actual texture is ready for usage. + * + * @param {Texture} texture - The texture to create a default texture for. + * @return {boolean} Whether the sampler has been updated or not. + */ + createDefaultTexture(texture: Texture): boolean; + /** + * Defines a texture on the GPU for the given texture object. + * + * @param {Texture} texture - The texture. + * @param {Object} [options={}] - Optional configuration parameter. + */ + createTexture(texture: Texture, options?: Object): void; + /** + * Uploads the updated texture data to the GPU. + * + * @param {Texture} texture - The texture. + * @param {Object} [options={}] - Optional configuration parameter. + */ + updateTexture(texture: Texture, options?: Object): void; + /** + * Generates mipmaps for the given texture. + * + * @param {Texture} texture - The texture. + */ + generateMipmaps(texture: Texture): void; + /** + * Destroys the GPU data for the given texture object. + * + * @param {Texture} texture - The texture. + * @param {boolean} [isDefaultTexture=false] - Whether the texture uses a default GPU texture or not. + */ + destroyTexture(texture: Texture, isDefaultTexture?: boolean): void; + /** + * Returns texture data as a typed array. + * + * @async + * @param {Texture} texture - The texture to copy. + * @param {number} x - The x coordinate of the copy origin. + * @param {number} y - The y coordinate of the copy origin. + * @param {number} width - The width of the copy. + * @param {number} height - The height of the copy. + * @param {number} faceIndex - The face index. + * @return {Promise} A Promise that resolves with a typed array when the copy operation has finished. + */ + copyTextureToBuffer(texture: Texture, x: number, y: number, width: number, height: number, faceIndex: number): Promise; + /** + * Inits a time stamp query for the given render context. + * + * @param {string} type - The type of the timestamp query (e.g. 'render', 'compute'). + * @param {number} uid - Unique id for the context (e.g. render context id). + * @param {Object} descriptor - The query descriptor. + */ + initTimestampQuery(type: string, uid: number, descriptor: Object): void; + /** + * Returns a node builder for the given render object. + * + * @param {RenderObject} object - The render object. + * @param {Renderer} renderer - The renderer. + * @return {WGSLNodeBuilder} The node builder. + */ + createNodeBuilder(object: RenderObject, renderer: Renderer): WGSLNodeBuilder; + /** + * Creates a shader program from the given programmable stage. + * + * @param {ProgrammableStage} program - The programmable stage. + */ + createProgram(program: ProgrammableStage): void; + /** + * Destroys the shader program of the given programmable stage. + * + * @param {ProgrammableStage} program - The programmable stage. + */ + destroyProgram(program: ProgrammableStage): void; + /** + * Creates a render pipeline for the given render object. + * + * @param {RenderObject} renderObject - The render object. + * @param {Array} promises - An array of compilation promises which are used in `compileAsync()`. + */ + createRenderPipeline(renderObject: RenderObject, promises: Array>): void; + /** + * Creates a compute pipeline for the given compute node. + * + * @param {ComputePipeline} computePipeline - The compute pipeline. + * @param {Array} bindings - The bindings. + */ + createComputePipeline(computePipeline: ComputePipeline, bindings: Array): void; + /** + * Prepares the state for encoding render bundles. + * + * @param {RenderContext} renderContext - The render context. + */ + beginBundle(renderContext: RenderContext): void; + /** + * After processing render bundles this method finalizes related work. + * + * @param {RenderContext} renderContext - The render context. + * @param {RenderBundle} bundle - The render bundle. + */ + finishBundle(renderContext: RenderContext, bundle: RenderBundle): void; + /** + * Adds a render bundle to the render context data. + * + * @param {RenderContext} renderContext - The render context. + * @param {RenderBundle} bundle - The render bundle to add. + */ + addBundle(renderContext: RenderContext, bundle: RenderBundle): void; + /** + * Creates a uniform buffer. + * + * @param {Buffer} uniformBuffer - The uniform buffer. + */ + createUniformBuffer(uniformBuffer: Buffer): void; + /** + * Destroys the GPU data for the given uniform buffer. + * + * @param {Buffer} uniformBuffer - The uniform buffer. + */ + destroyUniformBuffer(uniformBuffer: Buffer): void; + /** + * Creates bindings from the given bind group definition. + * + * @param {BindGroup} bindGroup - The bind group. + * @param {Array} bindings - Array of bind groups. + * @param {number} cacheIndex - The cache index. + * @param {number} version - The version. + */ + createBindings(bindGroup: BindGroup, bindings: Array, cacheIndex: number, version: number): void; + /** + * Updates the given bind group definition. + * + * @param {BindGroup} bindGroup - The bind group. + * @param {Array} bindings - Array of bind groups. + * @param {number} cacheIndex - The cache index. + * @param {number} version - The version. + */ + updateBindings(bindGroup: BindGroup, bindings: Array, cacheIndex: number, version: number): void; + /** + * Updates a buffer binding. + * + * @param {Buffer} binding - The buffer binding to update. + */ + updateBinding(binding: Buffer): void; + /** + * Delete data associated with the current bind group. + * + * @param {BindGroup} bindGroup - The bind group. + */ + deleteBindGroupData(bindGroup: BindGroup): void; + /** + * Creates the buffer of an indexed shader attribute. + * + * @param {BufferAttribute} attribute - The indexed buffer attribute. + */ + createIndexAttribute(attribute: BufferAttribute): void; + /** + * Creates the GPU buffer of a shader attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + */ + createAttribute(attribute: BufferAttribute): void; + /** + * Creates the GPU buffer of a storage attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + */ + createStorageAttribute(attribute: BufferAttribute): void; + /** + * Creates the GPU buffer of an indirect storage attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + */ + createIndirectStorageAttribute(attribute: BufferAttribute): void; + /** + * Updates the GPU buffer of a shader attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute to update. + */ + updateAttribute(attribute: BufferAttribute): void; + /** + * Destroys the GPU buffer of a shader attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute to destroy. + */ + destroyAttribute(attribute: BufferAttribute): void; + /** + * Checks if the given feature is supported by the backend. + * + * @param {string} name - The feature's name. + * @return {boolean} Whether the feature is supported or not. + */ + hasFeature(name: string): boolean; + /** + * Copies data of the given source texture to the given destination texture. + * + * @param {Texture} srcTexture - The source texture. + * @param {Texture} dstTexture - The destination texture. + * @param {?(Box3|Box2)} [srcRegion=null] - The region of the source texture to copy. + * @param {?(Vector2|Vector3)} [dstPosition=null] - The destination position of the copy. + * @param {number} [srcLevel=0] - The mipmap level to copy. + * @param {number} [dstLevel=0] - The destination mip level to copy to. + */ + copyTextureToTexture(srcTexture: Texture, dstTexture: Texture, srcRegion?: (Box3 | Box2) | null, dstPosition?: (Vector2 | Vector3) | null, srcLevel?: number, dstLevel?: number): void; + /** + * Copies the current bound framebuffer to the given texture. + * + * @param {Texture} texture - The destination texture. + * @param {RenderContext} renderContext - The render context. + * @param {Vector4} rectangle - A four dimensional vector defining the origin and dimension of the copy. + */ + copyFramebufferToTexture(texture: Texture, renderContext: RenderContext, rectangle: Vector4): void; + /** + * Checks if the given compatibility is supported by the backend. + * + * @param {string} name - The compatibility name. + * @return {boolean} Whether the compatibility is supported or not. + */ + hasCompatibility(name: string): boolean; +} +import Backend from '../common/Backend.js'; +import WebGPUUtils from './utils/WebGPUUtils.js'; +import WebGPUAttributeUtils from './utils/WebGPUAttributeUtils.js'; +import WebGPUBindingUtils from './utils/WebGPUBindingUtils.js'; +import WebGPUCapabilities from './utils/WebGPUCapabilities.js'; +import WebGPUPipelineUtils from './utils/WebGPUPipelineUtils.js'; +import WebGPUTextureUtils from './utils/WebGPUTextureUtils.js'; +import WGSLNodeBuilder from './nodes/WGSLNodeBuilder.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPURenderer.Nodes.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPURenderer.Nodes.d.ts new file mode 100644 index 000000000..dfbe8d022 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPURenderer.Nodes.d.ts @@ -0,0 +1,25 @@ +export default WebGPURenderer; +/** + * This alternative version of {@link WebGPURenderer} only supports node materials. + * So classes like `MeshBasicMaterial` are not compatible. + * + * @private + * @augments Renderer + */ +declare class WebGPURenderer extends Renderer { + /** + * Constructs a new WebGPU renderer. + * + * @param {WebGPURenderer~Options} [parameters] - The configuration parameter. + */ + constructor(parameters?: {}); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWebGPURenderer: boolean; +} +import Renderer from '../common/Renderer.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPURenderer.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPURenderer.d.ts new file mode 100644 index 000000000..546c6744b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPURenderer.d.ts @@ -0,0 +1,42 @@ +export default WebGPURenderer; +/** + * This renderer is the new alternative of `WebGLRenderer`. `WebGPURenderer` has the ability + * to target different backends. By default, the renderer tries to use a WebGPU backend if the + * browser supports WebGPU. If not, `WebGPURenderer` falls backs to a WebGL 2 backend. + * + * @augments Renderer + */ +declare class WebGPURenderer extends Renderer { + /** + * WebGPURenderer options. + * + * @typedef {Object} WebGPURenderer~Options + * @property {boolean} [logarithmicDepthBuffer=false] - Whether logarithmic depth buffer is enabled or not. + * @property {boolean} [reversedDepthBuffer=false] - Whether reversed depth buffer is enabled or not. + * @property {boolean} [alpha=true] - Whether the default framebuffer (which represents the final contents of the canvas) should be transparent or opaque. + * @property {boolean} [depth=true] - Whether the default framebuffer should have a depth buffer or not. + * @property {boolean} [stencil=false] - Whether the default framebuffer should have a stencil buffer or not. + * @property {boolean} [antialias=false] - Whether MSAA as the default anti-aliasing should be enabled or not. + * @property {number} [samples=0] - When `antialias` is `true`, `4` samples are used by default. Set this parameter to any other integer value than 0 to overwrite the default. + * @property {boolean} [forceWebGL=false] - If set to `true`, the renderer uses a WebGL 2 backend no matter if WebGPU is supported or not. + * @property {boolean} [multiview=false] - If set to `true`, the renderer will use multiview during WebXR rendering if supported. + * @property {number} [outputType=undefined] - Texture type for output to canvas. By default, device's preferred format is used; other formats may incur overhead. + * @property {number} [outputBufferType=HalfFloatType] - Defines the type of output buffers. The default `HalfFloatType` is recommend for best + * quality. To save memory and bandwidth, `UnsignedByteType` might be used. This will reduce rendering quality though. + */ + /** + * Constructs a new WebGPU renderer. + * + * @param {WebGPURenderer~Options} [parameters] - The configuration parameter. + */ + constructor(parameters?: {}); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isWebGPURenderer: boolean; +} +import Renderer from '../common/Renderer.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUBindGroupDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUBindGroupDescriptor.d.ts new file mode 100644 index 000000000..1bd559d39 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUBindGroupDescriptor.d.ts @@ -0,0 +1,32 @@ +export default GPUBindGroupDescriptor; +/** + * Reusable descriptor for `GPUDevice.createBindGroup()`. + * + * @private + */ +declare class GPUBindGroupDescriptor { + /** + * The label of the bind group. + * + * @type {string} + */ + label: string; + /** + * The bind group layout the bind group conforms to. + * + * @type {?GPUBindGroupLayout} + * @default null + */ + layout: GPUBindGroupLayout | null; + /** + * The bind group entries. + * + * @type {Array} + */ + entries: Array; + /** + * Resets the descriptor to its default state. The internal `entries` array + * is emptied without releasing its backing storage. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUBufferDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUBufferDescriptor.d.ts new file mode 100644 index 000000000..b53c868a8 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUBufferDescriptor.d.ts @@ -0,0 +1,39 @@ +export default GPUBufferDescriptor; +/** + * Reusable descriptor for `GPUDevice.createBuffer()`. + * + * @private + */ +declare class GPUBufferDescriptor { + /** + * The label of the buffer. + * + * @type {string} + */ + label: string; + /** + * The size of the buffer in bytes. + * + * @type {number} + * @default 0 + */ + size: number; + /** + * The allowed usages for the buffer. + * + * @type {number} + * @default 0 + */ + usage: number; + /** + * Whether the buffer is in the mapped state at creation. + * + * @type {boolean} + * @default false + */ + mappedAtCreation: boolean; + /** + * Resets the descriptor to its default state. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCommandEncoderDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCommandEncoderDescriptor.d.ts new file mode 100644 index 000000000..3e3be9d44 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCommandEncoderDescriptor.d.ts @@ -0,0 +1,18 @@ +export default GPUCommandEncoderDescriptor; +/** + * Reusable descriptor for `GPUDevice.createCommandEncoder()`. + * + * @private + */ +declare class GPUCommandEncoderDescriptor { + /** + * The label of the command encoder. + * + * @type {string} + */ + label: string; + /** + * Resets the descriptor to its default state. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUComputePassDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUComputePassDescriptor.d.ts new file mode 100644 index 000000000..ab1ccf90e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUComputePassDescriptor.d.ts @@ -0,0 +1,24 @@ +export default GPUComputePassDescriptor; +/** + * Reusable descriptor for `GPUCommandEncoder.beginComputePass()`. + * + * @private + */ +declare class GPUComputePassDescriptor { + /** + * The label of the compute pass. + * + * @type {string} + */ + label: string; + /** + * Defines which timestamp values are written and where. + * + * @type {Object|undefined} + */ + timestampWrites: Object | undefined; + /** + * Resets the descriptor to its default state. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUComputePipelineDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUComputePipelineDescriptor.d.ts new file mode 100644 index 000000000..738679592 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUComputePipelineDescriptor.d.ts @@ -0,0 +1,32 @@ +export default GPUComputePipelineDescriptor; +/** + * Reusable descriptor for `GPUDevice.createComputePipeline()`. + * + * @private + */ +declare class GPUComputePipelineDescriptor { + /** + * The label of the compute pipeline. + * + * @type {string} + */ + label: string; + /** + * The pipeline layout the pipeline conforms to, or `'auto'`. + * + * @type {?GPUPipelineLayout|string} + * @default null + */ + layout: (GPUPipelineLayout | string) | null; + /** + * The programmable compute stage. + * + * @type {?Object} + * @default null + */ + compute: Object | null; + /** + * Resets the descriptor to its default state. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCopyExternalImageDestInfo.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCopyExternalImageDestInfo.d.ts new file mode 100644 index 000000000..49adfbc13 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCopyExternalImageDestInfo.d.ts @@ -0,0 +1,25 @@ +export default GPUCopyExternalImageDestInfo; +/** + * Reusable descriptor for `GPUCopyExternalImageDestInfo`, the destination + * argument to `GPUQueue.copyExternalImageToTexture()`. + * + * @private + * @augments GPUTexelCopyTextureInfo + */ +declare class GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo { + /** + * The predefined color space the destination texture is interpreted in. + * + * @type {string} + * @default 'srgb' + */ + colorSpace: string; + /** + * Whether the destination texture has premultiplied alpha. + * + * @type {boolean} + * @default false + */ + premultipliedAlpha: boolean; +} +import GPUTexelCopyTextureInfo from './GPUTexelCopyTextureInfo.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCopyExternalImageSourceInfo.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCopyExternalImageSourceInfo.d.ts new file mode 100644 index 000000000..ade0e6661 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCopyExternalImageSourceInfo.d.ts @@ -0,0 +1,36 @@ +export default GPUCopyExternalImageSourceInfo; +/** + * Reusable descriptor for `GPUCopyExternalImageSourceInfo`, the source argument + * to `GPUQueue.copyExternalImageToTexture()`. + * + * @private + */ +declare class GPUCopyExternalImageSourceInfo { + /** + * The image-like source. + * + * @type {?(ImageBitmap|ImageData|HTMLImageElement|HTMLVideoElement|VideoFrame|HTMLCanvasElement|OffscreenCanvas)} + * @default null + */ + source: (ImageBitmap | ImageData | HTMLImageElement | HTMLVideoElement | VideoFrame | HTMLCanvasElement | OffscreenCanvas) | null; + /** + * The origin offset within the source. + * + * @type {{x: number, y: number}} + */ + origin: { + x: number; + y: number; + }; + /** + * Whether the source is flipped vertically before copying. + * + * @type {boolean} + * @default false + */ + flipY: boolean; + /** + * Resets the descriptor to its default state. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUExtent3D.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUExtent3D.d.ts new file mode 100644 index 000000000..ad73dea82 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUExtent3D.d.ts @@ -0,0 +1,35 @@ +export default GPUExtent3D; +/** + * Reusable descriptor for `GPUExtent3D` in its dictionary form, used by + * `GPUQueue.writeTexture()`, `GPUQueue.copyExternalImageToTexture()` and + * the various `GPUCommandEncoder` copy methods. + * + * @private + */ +declare class GPUExtent3D { + /** + * The width of the extent. + * + * @type {number} + * @default 0 + */ + width: number; + /** + * The height of the extent. + * + * @type {number} + * @default 1 + */ + height: number; + /** + * The depth (for 3D textures) or number of array layers. + * + * @type {number} + * @default 1 + */ + depthOrArrayLayers: number; + /** + * Resets the descriptor to its default state. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUPipelineLayoutDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUPipelineLayoutDescriptor.d.ts new file mode 100644 index 000000000..a2263550f --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUPipelineLayoutDescriptor.d.ts @@ -0,0 +1,25 @@ +export default GPUPipelineLayoutDescriptor; +/** + * Reusable descriptor for `GPUDevice.createPipelineLayout()`. + * + * @private + */ +declare class GPUPipelineLayoutDescriptor { + /** + * The label of the pipeline layout. + * + * @type {string} + */ + label: string; + /** + * The set of bind group layouts the pipeline layout describes. + * + * @type {?Array} + * @default null + */ + bindGroupLayouts: Array | null; + /** + * Resets the descriptor to its default state. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUQuerySetDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUQuerySetDescriptor.d.ts new file mode 100644 index 000000000..6e44a65da --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUQuerySetDescriptor.d.ts @@ -0,0 +1,31 @@ +export default GPUQuerySetDescriptor; +/** + * Reusable descriptor for `GPUDevice.createQuerySet()`. + * + * @private + */ +declare class GPUQuerySetDescriptor { + /** + * The label of the query set. + * + * @type {string} + */ + label: string; + /** + * The type of queries managed by the set. + * + * @type {string|undefined} + */ + type: string | undefined; + /** + * The number of queries managed by the set. + * + * @type {number} + * @default 0 + */ + count: number; + /** + * Resets the descriptor to its default state. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderBundleEncoderDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderBundleEncoderDescriptor.d.ts new file mode 100644 index 000000000..b027f82ca --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderBundleEncoderDescriptor.d.ts @@ -0,0 +1,52 @@ +export default GPURenderBundleEncoderDescriptor; +/** + * Reusable descriptor for `GPUDevice.createRenderBundleEncoder()`. + * + * @private + */ +declare class GPURenderBundleEncoderDescriptor { + /** + * The label of the render bundle encoder. + * + * @type {string} + */ + label: string; + /** + * The formats of the color attachments the bundle is compatible with. + * + * @type {?Array} + * @default null + */ + colorFormats: Array | null; + /** + * The format of the depth/stencil attachment the bundle is compatible with. + * + * @type {string|undefined} + */ + depthStencilFormat: string | undefined; + /** + * The number of samples per pixel the bundle is compatible with. + * + * @type {number} + * @default 1 + */ + sampleCount: number; + /** + * Whether the depth attachment is read-only. + * + * @type {boolean} + * @default false + */ + depthReadOnly: boolean; + /** + * Whether the stencil attachment is read-only. + * + * @type {boolean} + * @default false + */ + stencilReadOnly: boolean; + /** + * Resets the descriptor to its default state. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassColorAttachment.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassColorAttachment.d.ts new file mode 100644 index 000000000..a6aa47714 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassColorAttachment.d.ts @@ -0,0 +1,50 @@ +export default GPURenderPassColorAttachment; +/** + * Reusable descriptor for `GPURenderPassColorAttachment`, the type of each + * entry in `GPURenderPassDescriptor.colorAttachments`. + * + * @private + */ +declare class GPURenderPassColorAttachment { + /** + * The texture view the pass renders into. + * + * @type {?GPUTextureView} + * @default null + */ + view: GPUTextureView | null; + /** + * The depth slice the pass renders into. + * + * @type {number|undefined} + */ + depthSlice: number | undefined; + /** + * The texture view that receives the resolved output of multisampled rendering. + * + * @type {?GPUTextureView|undefined} + */ + resolveTarget: (GPUTextureView | undefined) | null; + /** + * The clear value used when `loadOp` is `'clear'`. + * + * @type {Object|undefined} + */ + clearValue: Object | undefined; + /** + * The load operation performed at the start of the pass. + * + * @type {string|undefined} + */ + loadOp: string | undefined; + /** + * The store operation performed at the end of the pass. + * + * @type {string|undefined} + */ + storeOp: string | undefined; + /** + * Resets the descriptor to its default state. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassDepthStencilAttachment.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassDepthStencilAttachment.d.ts new file mode 100644 index 000000000..3bc5d785d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassDepthStencilAttachment.d.ts @@ -0,0 +1,71 @@ +export default GPURenderPassDepthStencilAttachment; +/** + * Reusable descriptor for `GPURenderPassDepthStencilAttachment`, the + * `depthStencilAttachment` field of `GPURenderPassDescriptor`. + * + * @private + */ +declare class GPURenderPassDepthStencilAttachment { + /** + * The depth/stencil texture view the pass renders into. + * + * @type {?GPUTextureView} + * @default null + */ + view: GPUTextureView | null; + /** + * The load operation applied to the depth aspect at the start of the pass. + * + * @type {string|undefined} + */ + depthLoadOp: string | undefined; + /** + * The store operation applied to the depth aspect at the end of the pass. + * + * @type {string|undefined} + */ + depthStoreOp: string | undefined; + /** + * The clear value used when `depthLoadOp` is `'clear'`. + * + * @type {number|undefined} + */ + depthClearValue: number | undefined; + /** + * Whether the depth aspect is read-only. + * + * @type {boolean} + * @default false + */ + depthReadOnly: boolean; + /** + * The load operation applied to the stencil aspect at the start of the pass. + * + * @type {string|undefined} + */ + stencilLoadOp: string | undefined; + /** + * The store operation applied to the stencil aspect at the end of the pass. + * + * @type {string|undefined} + */ + stencilStoreOp: string | undefined; + /** + * The clear value used when `stencilLoadOp` is `'clear'`. + * + * @type {number} + * @default 0 + */ + stencilClearValue: number; + /** + * Whether the stencil aspect is read-only. + * + * @type {boolean} + * @default false + */ + stencilReadOnly: boolean; + /** + * Resets the descriptor to its default state. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassDescriptor.d.ts new file mode 100644 index 000000000..34e775c38 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassDescriptor.d.ts @@ -0,0 +1,50 @@ +export default GPURenderPassDescriptor; +/** + * Reusable descriptor for `GPUCommandEncoder.beginRenderPass()`. + * + * @private + */ +declare class GPURenderPassDescriptor { + /** + * The label of the render pass. + * + * @type {string} + */ + label: string; + /** + * The color attachments of the render pass. + * + * @type {Array} + */ + colorAttachments: Array; + /** + * The depth-stencil attachment of the render pass. + * + * @type {Object|undefined} + */ + depthStencilAttachment: Object | undefined; + /** + * The query set used for occlusion queries during the pass. + * + * @type {?GPUQuerySet|undefined} + */ + occlusionQuerySet: (GPUQuerySet | undefined) | null; + /** + * Defines which timestamp values are written and where. + * + * @type {Object|undefined} + */ + timestampWrites: Object | undefined; + /** + * The maximum number of draw calls that can be issued during the pass. + * + * @type {number} + * @default 50000000 + */ + maxDrawCount: number; + /** + * Resets the descriptor to its default state. The internal `colorAttachments` + * array is emptied without releasing its backing storage. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassTimestampWrites.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassTimestampWrites.d.ts new file mode 100644 index 000000000..f7199f492 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassTimestampWrites.d.ts @@ -0,0 +1,33 @@ +export default GPURenderPassTimestampWrites; +/** + * Reusable descriptor for `GPURenderPassTimestampWrites`, the + * `timestampWrites` field of `GPURenderPassDescriptor`. The same shape is + * also accepted as `GPUComputePassTimestampWrites`. + * + * @private + */ +declare class GPURenderPassTimestampWrites { + /** + * The query set the timestamps are written to. + * + * @type {?GPUQuerySet} + * @default null + */ + querySet: GPUQuerySet | null; + /** + * The index in the query set the beginning timestamp is written to. + * + * @type {number|undefined} + */ + beginningOfPassWriteIndex: number | undefined; + /** + * The index in the query set the ending timestamp is written to. + * + * @type {number|undefined} + */ + endOfPassWriteIndex: number | undefined; + /** + * Resets the descriptor to its default state. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPipelineDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPipelineDescriptor.d.ts new file mode 100644 index 000000000..e7139e818 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPipelineDescriptor.d.ts @@ -0,0 +1,90 @@ +export default GPURenderPipelineDescriptor; +/** + * Reusable descriptor for `GPUDevice.createRenderPipeline()` and + * `createRenderPipelineAsync()`. + * + * @private + */ +declare class GPURenderPipelineDescriptor { + /** + * The label of the render pipeline. + * + * @type {string} + */ + label: string; + /** + * The pipeline layout the pipeline conforms to, or `'auto'`. + * + * @type {?GPUPipelineLayout|string} + * @default null + */ + layout: (GPUPipelineLayout | string) | null; + /** + * The programmable vertex stage. + * + * @type {?Object} + * @default null + */ + vertex: Object | null; + /** + * The primitive-assembly state. + * + * @type {Object} + */ + primitive: Object; + /** + * The depth/stencil state, omitted when the pipeline has no depth or stencil aspect. + * + * @type {Object|undefined} + */ + depthStencil: Object | undefined; + /** + * The multisample state. + * + * @type {GPUMultisampleState} + */ + multisample: GPUMultisampleState; + /** + * The programmable fragment stage. Omitted for vertex-only pipelines. + * + * @type {?Object} + * @default null + */ + fragment: Object | null; + /** + * Resets the descriptor to its default state. + */ + reset(): void; +} +/** + * Reusable nested state for `GPURenderPipelineDescriptor.multisample`. + * + * @private + */ +declare class GPUMultisampleState { + /** + * The number of samples per pixel. + * + * @type {number} + * @default 1 + */ + count: number; + /** + * A bitmask determining which samples are written to. + * + * @type {number} + * @default 0xFFFFFFFF + */ + mask: number; + /** + * Whether a fragment's alpha channel is used to generate a sample coverage mask. + * + * @type {boolean} + * @default false + */ + alphaToCoverageEnabled: boolean; + /** + * Resets the state to its default values. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUSamplerDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUSamplerDescriptor.d.ts new file mode 100644 index 000000000..a3b28563b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUSamplerDescriptor.d.ts @@ -0,0 +1,87 @@ +export default GPUSamplerDescriptor; +/** + * Reusable descriptor for `GPUDevice.createSampler()`. + * + * @private + */ +declare class GPUSamplerDescriptor { + /** + * The label of the sampler. + * + * @type {string} + */ + label: string; + /** + * The address mode for the sampler's U coordinate. + * + * @type {string} + * @default 'clamp-to-edge' + */ + addressModeU: string; + /** + * The address mode for the sampler's V coordinate. + * + * @type {string} + * @default 'clamp-to-edge' + */ + addressModeV: string; + /** + * The address mode for the sampler's W coordinate. + * + * @type {string} + * @default 'clamp-to-edge' + */ + addressModeW: string; + /** + * The magnification filter mode. + * + * @type {string} + * @default 'nearest' + */ + magFilter: string; + /** + * The minification filter mode. + * + * @type {string} + * @default 'nearest' + */ + minFilter: string; + /** + * The mipmap filter mode. + * + * @type {string} + * @default 'nearest' + */ + mipmapFilter: string; + /** + * The minimum level of detail used to sample. + * + * @type {number} + * @default 0 + */ + lodMinClamp: number; + /** + * The maximum level of detail used to sample. + * + * @type {number} + * @default 32 + */ + lodMaxClamp: number; + /** + * The compare function used by the sampler. + * + * @type {string|undefined} + */ + compare: string | undefined; + /** + * The maximum allowed anisotropic filtering. + * + * @type {number} + * @default 1 + */ + maxAnisotropy: number; + /** + * Resets the descriptor to its default state. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUShaderModuleDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUShaderModuleDescriptor.d.ts new file mode 100644 index 000000000..25b481010 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUShaderModuleDescriptor.d.ts @@ -0,0 +1,30 @@ +export default GPUShaderModuleDescriptor; +/** + * Reusable descriptor for `GPUDevice.createShaderModule()`. + * + * @private + */ +declare class GPUShaderModuleDescriptor { + /** + * The label of the shader module. + * + * @type {string} + */ + label: string; + /** + * The WGSL source code of the shader module. + * + * @type {string} + */ + code: string; + /** + * Compilation hints that may help the implementation produce optimized code. + * + * @type {Array} + */ + compilationHints: Array; + /** + * Resets the descriptor to its default state. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyBufferInfo.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyBufferInfo.d.ts new file mode 100644 index 000000000..8e7a5e2aa --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyBufferInfo.d.ts @@ -0,0 +1,39 @@ +export default GPUTexelCopyBufferInfo; +/** + * Reusable descriptor for `GPUTexelCopyBufferInfo`, the buffer side of + * `GPUCommandEncoder.copyTextureToBuffer()` and `copyBufferToTexture()`. + * + * @private + */ +declare class GPUTexelCopyBufferInfo { + /** + * The target buffer. + * + * @type {?GPUBuffer} + * @default null + */ + buffer: GPUBuffer | null; + /** + * The byte offset within the buffer where the texel data begins. + * + * @type {number} + * @default 0 + */ + offset: number; + /** + * The stride, in bytes, between rows of texel blocks. + * + * @type {number|undefined} + */ + bytesPerRow: number | undefined; + /** + * The number of texel block rows per single image of the texture. + * + * @type {number|undefined} + */ + rowsPerImage: number | undefined; + /** + * Resets the descriptor to its default state. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyBufferLayout.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyBufferLayout.d.ts new file mode 100644 index 000000000..a78ad019e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyBufferLayout.d.ts @@ -0,0 +1,32 @@ +export default GPUTexelCopyBufferLayout; +/** + * Reusable descriptor for `GPUTexelCopyBufferLayout`, the data-layout argument + * to `GPUQueue.writeTexture()`. + * + * @private + */ +declare class GPUTexelCopyBufferLayout { + /** + * The byte offset within the source data where the texel data begins. + * + * @type {number} + * @default 0 + */ + offset: number; + /** + * The stride, in bytes, between rows of texel blocks. + * + * @type {number|undefined} + */ + bytesPerRow: number | undefined; + /** + * The number of texel block rows per single image of the texture. + * + * @type {number|undefined} + */ + rowsPerImage: number | undefined; + /** + * Resets the descriptor to its default state. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyTextureInfo.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyTextureInfo.d.ts new file mode 100644 index 000000000..b57669f02 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyTextureInfo.d.ts @@ -0,0 +1,45 @@ +export default GPUTexelCopyTextureInfo; +/** + * Reusable descriptor for `GPUTexelCopyTextureInfo`, the texture side of + * `GPUCommandEncoder.copyTextureToTexture()`, `copyTextureToBuffer()` and + * `GPUQueue.writeTexture()`. + * + * @private + */ +declare class GPUTexelCopyTextureInfo { + /** + * The target texture. + * + * @type {?GPUTexture} + * @default null + */ + texture: GPUTexture | null; + /** + * The mipmap level of the texture. + * + * @type {number} + * @default 0 + */ + mipLevel: number; + /** + * The origin offset within the texture. + * + * @type {{x: number, y: number, z: number}} + */ + origin: { + x: number; + y: number; + z: number; + }; + /** + * Which aspect of the texture is referenced. + * + * @type {string} + * @default 'all' + */ + aspect: string; + /** + * Resets the descriptor to its default state. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTextureDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTextureDescriptor.d.ts new file mode 100644 index 000000000..a9507b721 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTextureDescriptor.d.ts @@ -0,0 +1,73 @@ +export default GPUTextureDescriptor; +/** + * Reusable descriptor for `GPUDevice.createTexture()`. + * + * @private + */ +declare class GPUTextureDescriptor { + /** + * The label of the texture. + * + * @type {string} + */ + label: string; + /** + * The size of the texture. + * + * @type {{width: number, height: number, depthOrArrayLayers: number}} + */ + size: { + width: number; + height: number; + depthOrArrayLayers: number; + }; + /** + * The number of mip levels the texture will contain. + * + * @type {number} + * @default 1 + */ + mipLevelCount: number; + /** + * The sample count of the texture. + * + * @type {number} + * @default 1 + */ + sampleCount: number; + /** + * The dimension of the set of texel coordinates. + * + * @type {string} + * @default '2d' + */ + dimension: string; + /** + * The format of the texture. + * + * @type {string|undefined} + */ + format: string | undefined; + /** + * The allowed usages for the texture. + * + * @type {number|undefined} + */ + usage: number | undefined; + /** + * The formats that views of this texture may use. + * + * @type {Array} + */ + viewFormats: Array; + /** + * The view dimension to use when binding the texture (compatibility mode). + * + * @type {string|undefined} + */ + textureBindingViewDimension: string | undefined; + /** + * Resets the descriptor to its default state. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTextureViewDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTextureViewDescriptor.d.ts new file mode 100644 index 000000000..a70410284 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTextureViewDescriptor.d.ts @@ -0,0 +1,78 @@ +export default GPUTextureViewDescriptor; +/** + * Reusable descriptor for `GPUTexture.createView()`. + * + * @private + */ +declare class GPUTextureViewDescriptor { + /** + * The label of the texture view. + * + * @type {string} + */ + label: string; + /** + * The format of the texture view. + * + * @type {string|undefined} + */ + format: string | undefined; + /** + * The dimension of the texture view. + * + * @type {string|undefined} + */ + dimension: string | undefined; + /** + * The allowed usages for the texture view. + * + * @type {number} + * @default 0 + */ + usage: number; + /** + * Which aspect of the texture is referenced. + * + * @type {string} + * @default 'all' + */ + aspect: string; + /** + * The first mip level accessible to the texture view. + * + * @type {number} + * @default 0 + */ + baseMipLevel: number; + /** + * The number of mip levels accessible to the texture view. + * + * @type {number|undefined} + */ + mipLevelCount: number | undefined; + /** + * The first array layer accessible to the texture view. + * + * @type {number} + * @default 0 + */ + baseArrayLayer: number; + /** + * The number of array layers accessible to the texture view. + * + * @type {number|undefined} + */ + arrayLayerCount: number | undefined; + /** + * The component swizzle to apply when sampling the texture view. + * Requires the `'texture-component-swizzle'` feature; ignored otherwise. + * + * @type {string} + * @default 'rgba' + */ + swizzle: string; + /** + * Resets the descriptor to its default state. + */ + reset(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts new file mode 100644 index 000000000..f6f699f14 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts @@ -0,0 +1,11 @@ +export default BasicNodeLibrary; +/** + * This version of a node library represents a basic version + * just focusing on lights and tone mapping techniques. + * + * @private + * @augments NodeLibrary + */ +declare class BasicNodeLibrary extends NodeLibrary { +} +import NodeLibrary from '../../common/nodes/NodeLibrary.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts new file mode 100644 index 000000000..1d2893798 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts @@ -0,0 +1,12 @@ +export default StandardNodeLibrary; +/** + * This version of a node library represents the standard version + * used in {@link WebGPURenderer}. It maps lights, tone mapping + * techniques and materials to node-based implementations. + * + * @private + * @augments NodeLibrary + */ +declare class StandardNodeLibrary extends NodeLibrary { +} +import NodeLibrary from '../../common/nodes/NodeLibrary.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts new file mode 100644 index 000000000..101807f28 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts @@ -0,0 +1,633 @@ +export default WGSLNodeBuilder; +/** + * A node builder targeting WGSL. + * + * This module generates WGSL shader code from node materials and also + * generates the respective bindings and vertex buffer definitions. These + * data are later used by the renderer to create render and compute pipelines + * for render objects. + * + * @augments NodeBuilder + */ +declare class WGSLNodeBuilder extends NodeBuilder { + /** + * Constructs a new WGSL node builder renderer. + * + * @param {Object3D} object - The 3D object. + * @param {Renderer} renderer - The renderer. + */ + constructor(object: Object3D, renderer: Renderer); + /** + * A dictionary that holds for each shader stage ('vertex', 'fragment', 'compute') + * another dictionary which manages UBOs per group ('render','frame','object'). + * + * @type {Object>} + */ + uniformGroups: { + [x: string]: { + [x: string]: NodeUniformsGroup; + }; + }; + /** + * A dictionary that holds the assigned binding indices for each uniform group. + * This ensures the same binding index is used across all shader stages. + * + * @type {Object} + */ + uniformGroupsBindings: { + [x: string]: { + index: number; + id: number; + }; + }; + /** + * A dictionary that holds for each shader stage a Map of builtins. + * + * @type {Object>} + */ + builtins: { + [x: string]: Map; + }; + /** + * A dictionary that holds for each shader stage a Set of directives. + * + * @type {Object>} + */ + directives: { + [x: string]: Set; + }; + /** + * A map for managing scope arrays. Only relevant for when using + * {@link WorkgroupInfoNode} in context of compute shaders. + * + * @type {Map} + */ + scopedArrays: Map; + /** + * A flag that indicates that early returns are allowed. + * + * @type {boolean} + * @default true + */ + allowEarlyReturns: boolean; + /** + * A flag that indicates that global variables are allowed. + * + * @type {boolean} + * @default true + */ + allowGlobalVariables: boolean; + /** + * Generates the WGSL snippet for sampled textures. + * + * @private + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {string} The WGSL snippet. + */ + private _generateTextureSample; + /** + * Generates the WGSL snippet when sampling textures with explicit mip level. + * + * @private + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {string} levelSnippet - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. + * @param {string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @return {string} The WGSL snippet. + */ + private generateTextureSampleLevel; + /** + * Generates a wrap function used in context of textures. + * + * @param {Texture} texture - The texture to generate the function for. + * @return {string} The name of the generated function. + */ + generateWrapFunction(texture: Texture): string; + /** + * Generates a WGSL variable that holds the texture dimension of the given texture. + * It also returns information about the number of layers (elements) of an arrayed + * texture as well as the cube face count of cube textures. + * + * @param {Texture} texture - The texture to generate the function for. + * @param {string} textureProperty - The name of the video texture uniform in the shader. + * @param {string} levelSnippet - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. + * @return {string} The name of the dimension variable. + */ + generateTextureDimension(texture: Texture, textureProperty: string, levelSnippet: string): string; + /** + * Generates the WGSL snippet for a manual filtered texture. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {string} [levelSnippet='0u'] - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @return {string} The WGSL snippet. + */ + generateFilteredTexture(texture: Texture, textureProperty: string, uvSnippet: string, offsetSnippet: string | null, levelSnippet?: string, depthSnippet: string | null): string; + /** + * Generates the WGSL snippet for a texture lookup with explicit level-of-detail. + * Since it's a lookup, no sampling or filtering is applied. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {string} [levelSnippet='0u'] - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. + * @return {string} The WGSL snippet. + */ + generateTextureLod(texture: Texture, textureProperty: string, uvSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, levelSnippet?: string): string; + /** + * Generates the WGSL snippet that reads a single texel from a storage texture. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvIndexSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {?string} levelSnippet - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @return {string} The WGSL snippet. + */ + generateStorageTextureLoad(texture: Texture, textureProperty: string, uvIndexSnippet: string, levelSnippet: string | null, depthSnippet: string | null, offsetSnippet: string | null): string; + /** + * Generates the WGSL snippet that reads a single texel from a texture without sampling or filtering. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvIndexSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {?string} levelSnippet - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @return {string} The WGSL snippet. + */ + generateTextureLoad(texture: Texture, textureProperty: string, uvIndexSnippet: string, levelSnippet: string | null, depthSnippet: string | null, offsetSnippet: string | null): string; + /** + * Generates the WGSL snippet that writes a single texel to a texture. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvIndexSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {string} valueSnippet - A WGSL snippet that represent the new texel value. + * @return {string} The WGSL snippet. + */ + generateTextureStore(texture: Texture, textureProperty: string, uvIndexSnippet: string, depthSnippet: string | null, valueSnippet: string): string; + /** + * Returns `true` if the sampled values of the given texture should be compared against a reference value. + * + * @param {Texture} texture - The texture. + * @return {boolean} Whether the sampled values of the given texture should be compared against a reference value or not. + */ + isSampleCompare(texture: Texture): boolean; + /** + * Returns `true` if the given texture is unfilterable. + * + * @param {Texture} texture - The texture. + * @return {boolean} Whether the given texture is unfilterable or not. + */ + isUnfilterable(texture: Texture): boolean; + /** + * Generates the WGSL snippet for sampling/loading the given texture. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {string} The WGSL snippet. + */ + generateTexture(texture: Texture, textureProperty: string, uvSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, shaderStage?: string): string; + /** + * Generates the WGSL snippet for sampling/loading the given texture using explicit gradients. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {Array} gradSnippet - An array holding both gradient WGSL snippets. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {string} The WGSL snippet. + */ + generateTextureGrad(texture: Texture, textureProperty: string, uvSnippet: string, gradSnippet: Array, depthSnippet: string | null, offsetSnippet: string | null, shaderStage?: string): string; + /** + * Generates the WGSL snippet for sampling a depth texture and comparing the sampled depth values + * against a reference value. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {string} compareSnippet - A WGSL snippet that represents the reference value. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {string} The WGSL snippet. + */ + generateTextureCompare(texture: Texture, textureProperty: string, uvSnippet: string, compareSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, shaderStage?: string): string; + /** + * Generates the WGSL snippet for gathering four texels from the given texture. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {string} gatherSnippet - A WGSL snippet that represents the index of the channel to read. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {?string} flipYSnippet - A WGSL snippet that represents the y-flip. Only used for WebGL. + * @return {string} The WGSL snippet. + */ + generateTextureGather(texture: Texture, textureProperty: string, uvSnippet: string, gatherSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; + /** + * Generates the WGSL snippet for performing a depth comparison on four texels in the given depth texture. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {string} compareSnippet - A WGSL snippet that represents the reference value. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {?string} flipYSnippet - A WGSL snippet that represents the y-flip. Only used for WebGL. + * @return {string} The WGSL snippet. + */ + generateTextureGatherCompare(texture: Texture, textureProperty: string, uvSnippet: string, compareSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; + /** + * Generates the WGSL snippet when sampling textures with explicit mip level. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {string} levelSnippet - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {string} The WGSL snippet. + */ + generateTextureLevel(texture: Texture, textureProperty: string, uvSnippet: string, levelSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; + /** + * Generates the WGSL snippet when sampling textures with a bias to the mip level. + * + * @param {Texture} texture - The texture. + * @param {string} textureProperty - The name of the texture uniform in the shader. + * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. + * @param {string} biasSnippet - A WGSL snippet that represents the bias to apply to the mip level before sampling. + * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. + * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {string} The WGSL snippet. + */ + generateTextureBias(texture: Texture, textureProperty: string, uvSnippet: string, biasSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, shaderStage?: string): string; + /** + * Returns a WGSL snippet that represents the property name of the given node. + * + * @param {Node} node - The node. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {string} The property name. + */ + getPropertyName(node: Node, shaderStage?: string): string; + /** + * Returns the native shader operator name for a given generic name. + * + * @param {string} op - The operator name to resolve. + * @return {?string} The resolved operator name. + */ + getFunctionOperator(op: string): string | null; + /** + * Returns the node access for the given node and shader stage. + * + * @param {StorageTextureNode|StorageBufferNode} node - The storage node. + * @param {string} shaderStage - The shader stage. + * @return {string} The node access. + */ + getNodeAccess(node: StorageTextureNode | StorageBufferNode, shaderStage: string): string; + /** + * Returns A WGSL snippet representing the storage access. + * + * @param {StorageTextureNode|StorageBufferNode} node - The storage node. + * @param {string} shaderStage - The shader stage. + * @return {string} The WGSL snippet representing the storage access. + */ + getStorageAccess(node: StorageTextureNode | StorageBufferNode, shaderStage: string): string; + /** + * This method is one of the more important ones since it's responsible + * for generating a matching binding instance for the given uniform node. + * + * These bindings are later used in the renderer to create bind groups + * and layouts. + * + * @param {UniformNode} node - The uniform node. + * @param {string} type - The node data type. + * @param {string} shaderStage - The shader stage. + * @param {?string} [name=null] - An optional uniform name. + * @return {NodeUniform} The node uniform object. + */ + getUniformFromNode(node: UniformNode, type: string, shaderStage: string, name?: string | null): NodeUniform; + /** + * This method should be used whenever builtins are required in nodes. + * The internal builtins data structure will make sure builtins are + * defined in the WGSL source. + * + * @param {string} name - The builtin name. + * @param {string} property - The property name. + * @param {string} type - The node data type. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {string} The property name. + */ + getBuiltin(name: string, property: string, type: string, shaderStage?: string): string; + /** + * Returns `true` if the given builtin is defined in the given shader stage. + * + * @param {string} name - The builtin name. + * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. + * @return {boolean} Whether the given builtin is defined in the given shader stage or not. + */ + hasBuiltin(name: string, shaderStage?: string): boolean; + /** + * Builds the given shader node. + * + * @param {ShaderNodeInternal} shaderNode - The shader node. + * @return {string} The WGSL function code. + */ + buildFunctionCode(shaderNode: ShaderNodeInternal): string; + /** + * Returns a builtin representing the index of a compute invocation within the scope of a workgroup load. + * + * @return {string} The invocation local index. + */ + getInvocationLocalIndex(): string; + /** + * Returns a builtin representing the size of a subgroup within the current shader. + * + * @return {string} The subgroup size. + */ + getSubgroupSize(): string; + /** + * Returns a builtin representing the index of a compute invocation within the scope of a subgroup. + * + * @return {string} The invocation subgroup index. + */ + getInvocationSubgroupIndex(): string; + /** + * Returns a builtin representing the index of a compute invocation's subgroup within its workgroup. + * + * @return {string} The subgroup index. + */ + getSubgroupIndex(): string; + /** + * Overwritten as a NOP since this method is intended for the WebGL 2 backend. + * + * @return {null} Null. + */ + getDrawIndex(): null; + /** + * Returns the frag depth builtin. + * + * @return {string} The frag depth builtin. + */ + getFragDepth(): string; + /** + * Returns the clip distances builtin. + * + * @return {string} The clip distances builtin. + */ + getClipDistance(): string; + /** + * Enables the given directive for the given shader stage. + * + * @param {string} name - The directive name. + * @param {string} [shaderStage=this.shaderStage] - The shader stage to enable the directive for. + */ + enableDirective(name: string, shaderStage?: string): void; + /** + * Returns the directives of the given shader stage as a WGSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} A WGSL snippet that enables the directives of the given stage. + */ + getDirectives(shaderStage: string): string; + /** + * Enables the 'subgroups' directive. + */ + enableSubGroups(): void; + /** + * Enables the 'subgroups-f16' directive. + */ + enableSubgroupsF16(): void; + /** + * Enables the 'clip_distances' directive. + */ + enableClipDistances(): void; + /** + * Enables the 'f16' directive. + */ + enableShaderF16(): void; + /** + * Enables the 'dual_source_blending' directive. + */ + enableDualSourceBlending(): void; + /** + * Enables hardware clipping. + * + * @param {string} planeCount - The clipping plane count. + */ + enableHardwareClipping(planeCount: string): void; + /** + * Returns the builtins of the given shader stage as a WGSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} A WGSL snippet that represents the builtins of the given stage. + */ + getBuiltins(shaderStage: string): string; + /** + * This method should be used when a new scoped buffer is used in context of + * compute shaders. It adds the array to the internal data structure which is + * later used to generate the respective WGSL. + * + * @param {string} name - The array name. + * @param {string} scope - The scope. + * @param {string} bufferType - The buffer type. + * @param {string} bufferCount - The buffer count. + * @return {string} The array name. + */ + getScopedArray(name: string, scope: string, bufferType: string, bufferCount: string): string; + /** + * Returns the scoped arrays of the given shader stage as a WGSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string|undefined} The WGSL snippet that defines the scoped arrays. + * Returns `undefined` when used in the vertex or fragment stage. + */ + getScopedArrays(shaderStage: string): string | undefined; + /** + * Returns the shader attributes of the given shader stage as a WGSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The WGSL snippet that defines the shader attributes. + */ + getAttributes(shaderStage: string): string; + /** + * Returns the members of the given struct type node as a WGSL string. + * + * @param {StructTypeNode} struct - The struct type node. + * @return {string} The WGSL snippet that defines the struct members. + */ + getStructMembers(struct: StructTypeNode): string; + /** + * Returns the structs of the given shader stage as a WGSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The WGSL snippet that defines the structs. + */ + getStructs(shaderStage: string): string; + /** + * Returns a WGSL string representing a variable. + * + * @param {string} type - The variable's type. + * @param {string} name - The variable's name. + * @param {?number} [count=null] - The array length. + * @param {string} [qualifier=''] - The variable's qualifier. + * @return {string} The WGSL snippet that defines a variable. + */ + getVar(type: string, name: string, count?: number | null, qualifier?: string): string; + /** + * Returns the variables of the given shader stage as a WGSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The WGSL snippet that defines the variables. + */ + getVars(shaderStage: string, global?: boolean): string; + /** + * Returns the varyings of the given shader stage as a WGSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The WGSL snippet that defines the varyings. + */ + getVaryings(shaderStage: string): string; + isCustomStruct(nodeUniform: any): any; + /** + * Returns the uniforms of the given shader stage as a WGSL string. + * + * @param {string} shaderStage - The shader stage. + * @return {string} The WGSL snippet that defines the uniforms. + */ + getUniforms(shaderStage: string): string; + /** + * Returns the native shader method name for a given generic name. + * + * @param {string} method - The method name to resolve. + * @param {?string} [output=null] - An optional output. + * @return {string} The resolved WGSL method name. + */ + getMethod(method: string, output?: string | null): string; + /** + * Returns the bitcast method name for a given input and outputType. + * + * @param {string} type - The output type to bitcast to. + * @return {string} The resolved WGSL bitcast invocation. + */ + getBitcastMethod(type: string): string; + /** + * Returns the float packing method name for a given numeric encoding. + * + * @param {string} encoding - The numeric encoding that describes how the float values are mapped to the integer range. + * @returns {string} The resolve WGSL float packing method name. + */ + getFloatPackingMethod(encoding: string): string; + /** + * Returns the float unpacking method name for a given numeric encoding. + * + * @param {string} encoding - The numeric encoding that describes how the integer values are mapped to the float range. + * @returns {string} The resolve WGSL float unpacking method name. + */ + getFloatUnpackingMethod(encoding: string): string; + /** + * Returns the native snippet for a ternary operation. + * + * @param {string} condSnippet - The condition determining which expression gets resolved. + * @param {string} ifSnippet - The expression to resolve to if the condition is true. + * @param {string} elseSnippet - The expression to resolve to if the condition is false. + * @return {string} The resolved method name. + */ + getTernary(condSnippet: string, ifSnippet: string, elseSnippet: string): string; + /** + * Whether the requested feature is available or not. + * + * @param {string} name - The requested feature. + * @return {boolean} Whether the requested feature is supported or not. + */ + isAvailable(name: string): boolean; + /** + * Returns the native shader method name for a given generic name. + * + * @private + * @param {string} method - The method name to resolve. + * @return {string} The resolved WGSL method name. + */ + private _getWGSLMethod; + /** + * Includes the given method name into the current + * function node. + * + * @private + * @param {string} name - The method name to include. + * @return {CodeNode} The respective code node. + */ + private _include; + /** + * Returns a WGSL vertex shader based on the given shader data. + * + * @private + * @param {Object} shaderData - The shader data. + * @return {string} The vertex shader. + */ + private _getWGSLVertexCode; + /** + * Returns a WGSL fragment shader based on the given shader data. + * + * @private + * @param {Object} shaderData - The shader data. + * @return {string} The vertex shader. + */ + private _getWGSLFragmentCode; + /** + * Returns a WGSL compute shader based on the given shader data. + * + * @private + * @param {Object} shaderData - The shader data. + * @param {string} workgroupSize - The workgroup size. + * @return {string} The vertex shader. + */ + private _getWGSLComputeCode; + /** + * Returns a WGSL struct based on the given name and variables. + * + * @private + * @param {string} name - The struct name. + * @param {string} vars - The struct variables. + * @return {string} The WGSL snippet representing a struct. + */ + private _getWGSLStruct; + /** + * Returns a WGSL struct binding. + * + * @private + * @param {string} name - The struct name. + * @param {string} vars - The struct variables. + * @param {string} access - The access. + * @param {number} [binding=0] - The binding index. + * @param {number} [group=0] - The group index. + * @return {string} The WGSL snippet representing a struct binding. + */ + private _getWGSLStructBinding; +} +import { NodeBuilder } from '../../../nodes/Nodes.js'; +import NodeUniformsGroup from '../../common/nodes/NodeUniformsGroup.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeFunction.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeFunction.d.ts new file mode 100644 index 000000000..3cbe9f2f5 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeFunction.d.ts @@ -0,0 +1,25 @@ +export default WGSLNodeFunction; +/** + * This class represents a WSL node function. + * + * @augments NodeFunction + */ +declare class WGSLNodeFunction extends NodeFunction { + /** + * Constructs a new WGSL node function. + * + * @param {string} source - The WGSL source. + */ + constructor(source: string); + inputsCode: any; + blockCode: any; + outputType: any; + /** + * This method returns the WGSL code of the node function. + * + * @param {string} [name=this.name] - The function's name. + * @return {string} The shader code. + */ + getCode(name?: string): string; +} +import NodeFunction from '../../../nodes/core/NodeFunction.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeParser.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeParser.d.ts new file mode 100644 index 000000000..58ab25284 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeParser.d.ts @@ -0,0 +1,17 @@ +export default WGSLNodeParser; +/** + * A WGSL node parser. + * + * @augments NodeParser + */ +declare class WGSLNodeParser extends NodeParser { + /** + * The method parses the given WGSL code an returns a node function. + * + * @param {string} source - The WGSL code. + * @return {WGSLNodeFunction} A node function. + */ + parseFunction(source: string): WGSLNodeFunction; +} +import NodeParser from '../../../nodes/core/NodeParser.js'; +import WGSLNodeFunction from './WGSLNodeFunction.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUAttributeUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUAttributeUtils.d.ts new file mode 100644 index 000000000..6f286dacf --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUAttributeUtils.d.ts @@ -0,0 +1,78 @@ +export default WebGPUAttributeUtils; +/** + * A WebGPU backend utility module for managing shader attributes. + * + * @private + */ +declare class WebGPUAttributeUtils { + /** + * Constructs a new utility object. + * + * @param {WebGPUBackend} backend - The WebGPU backend. + */ + constructor(backend: WebGPUBackend); + /** + * A reference to the WebGPU backend. + * + * @type {WebGPUBackend} + */ + backend: WebGPUBackend; + /** + * Creates the GPU buffer for the given buffer attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + * @param {GPUBufferUsage} usage - A flag that indicates how the buffer may be used after its creation. + */ + createAttribute(attribute: BufferAttribute, usage: GPUBufferUsage): void; + /** + * Updates the GPU buffer of the given buffer attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + */ + updateAttribute(attribute: BufferAttribute): void; + /** + * This method creates the vertex buffer layout data which are + * require when creating a render pipeline for the given render object. + * + * @param {RenderObject} renderObject - The render object. + * @return {Array} An array holding objects which describe the vertex buffer layout. + */ + createShaderVertexBuffers(renderObject: RenderObject): Array; + /** + * Destroys the GPU buffer of the given buffer attribute. + * + * @param {BufferAttribute} attribute - The buffer attribute. + */ + destroyAttribute(attribute: BufferAttribute): void; + /** + * This method performs a readback operation by moving buffer data from + * a storage buffer attribute from the GPU to the CPU. ReadbackBuffer can + * be used to retain and reuse handles to the intermediate buffers and prevent + * new allocation. + * + * @async + * @param {BufferAttribute} attribute - The storage buffer attribute to read frm. + * @param {number} count - The offset from which to start reading the + * @param {number} offset - The storage buffer attribute. + * @param {ReadbackBuffer|ArrayBuffer} target - The storage buffer attribute. + * @return {Promise} A promise that resolves with the buffer data when the data are ready. + */ + getArrayBufferAsync(attribute: BufferAttribute, target?: ReadbackBuffer | ArrayBuffer, offset?: number, count?: number): Promise; + /** + * Returns the vertex format of the given buffer attribute. + * + * @private + * @param {BufferAttribute} geometryAttribute - The buffer attribute. + * @return {string|undefined} The vertex format (e.g. 'float32x3'). + */ + private _getVertexFormat; + /** + * Utility method for handling interleaved buffer attributes correctly. + * To process them, their `InterleavedBuffer` is returned. + * + * @private + * @param {BufferAttribute} attribute - The attribute. + * @return {BufferAttribute|InterleavedBuffer} + */ + private _getBufferAttribute; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUBindingUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUBindingUtils.d.ts new file mode 100644 index 000000000..9c5208097 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUBindingUtils.d.ts @@ -0,0 +1,88 @@ +export default WebGPUBindingUtils; +/** + * A WebGPU backend utility module for managing bindings. + * + * When reading the documentation it's helpful to keep in mind that + * all class definitions starting with 'GPU*' are modules from the + * WebGPU API. So for example `BindGroup` is a class from the engine + * whereas `GPUBindGroup` is a class from WebGPU. + * + * @private + */ +declare class WebGPUBindingUtils { + /** + * Constructs a new utility object. + * + * @param {WebGPUBackend} backend - The WebGPU backend. + */ + constructor(backend: WebGPUBackend); + /** + * A reference to the WebGPU backend. + * + * @type {WebGPUBackend} + */ + backend: WebGPUBackend; + /** + * A cache that maps combinations of layout entries to existing bind group layouts. + * + * @private + * @type {Map} + */ + private _bindGroupLayoutCache; + /** + * Creates a GPU bind group layout for the given bind group. + * + * @param {BindGroup} bindGroup - The bind group. + * @return {GPUBindGroupLayout} The GPU bind group layout. + */ + createBindingsLayout(bindGroup: BindGroup): GPUBindGroupLayout; + /** + * Creates bindings from the given bind group definition. + * + * @param {BindGroup} bindGroup - The bind group. + * @param {Array} bindings - Array of bind groups. + * @param {number} cacheIndex - The cache index. + * @param {number} version - The version. + */ + createBindings(bindGroup: BindGroup, bindings: Array, cacheIndex: number, version?: number): void; + /** + * Updates a buffer binding. + * + * @param {Buffer} binding - The buffer binding to update. + */ + updateBinding(binding: Buffer): void; + /** + * Creates a GPU bind group for the camera index. + * + * @param {Uint32Array} data - The index data. + * @param {GPUBindGroupLayout} layoutGPU - The GPU bind group layout. + * @return {GPUBindGroup} The GPU bind group. + */ + createBindGroupIndex(data: Uint32Array, layoutGPU: GPUBindGroupLayout): GPUBindGroup; + /** + * Creates a GPU bind group for the given bind group and GPU layout. + * + * @param {BindGroup} bindGroup - The bind group. + * @param {GPUBindGroupLayout} layoutGPU - The GPU bind group layout. + * @return {GPUBindGroup} The GPU bind group. + */ + createBindGroup(bindGroup: BindGroup, layoutGPU: GPUBindGroupLayout): GPUBindGroup; + /** + * Creates a GPU bind group layout entries for the given bind group. + * + * @private + * @param {BindGroup} bindGroup - The bind group. + * @return {Array} The GPU bind group layout entries. + */ + private _createLayoutEntries; + /** + * Delete the data associated with a bind group. + * + * @param {BindGroup} bindGroup - The bind group. + */ + deleteBindGroupData(bindGroup: BindGroup): void; + /** + * Frees internal resources. + */ + dispose(): void; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUCapabilities.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUCapabilities.d.ts new file mode 100644 index 000000000..c56d99d65 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUCapabilities.d.ts @@ -0,0 +1,32 @@ +export default WebGPUCapabilities; +/** + * A WebGPU backend utility module for managing the device's capabilities. + * + * @private + */ +declare class WebGPUCapabilities { + /** + * Constructs a new utility object. + * + * @param {WebGPUBackend} backend - The WebGPU backend. + */ + constructor(backend: WebGPUBackend); + /** + * A reference to the WebGPU backend. + * + * @type {WebGPUBackend} + */ + backend: WebGPUBackend; + /** + * Returns the maximum anisotropy texture filtering value. + * + * @return {number} The maximum anisotropy texture filtering value. + */ + getMaxAnisotropy(): number; + /** + * Returns the maximum number of bytes available for uniform buffers. + * + * @return {number} The maximum number of bytes available for uniform buffers. + */ + getUniformBufferLimit(): number; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUConstants.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUConstants.d.ts new file mode 100644 index 000000000..b8fc49536 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUConstants.d.ts @@ -0,0 +1,301 @@ +export namespace GPUPrimitiveTopology { + let PointList: string; + let LineList: string; + let LineStrip: string; + let TriangleList: string; + let TriangleStrip: string; +} +export const GPUShaderStage: any; +export namespace GPUCompareFunction { + let Never: string; + let Less: string; + let Equal: string; + let LessEqual: string; + let Greater: string; + let NotEqual: string; + let GreaterEqual: string; + let Always: string; +} +export namespace GPUStoreOp { + let Store: string; + let Discard: string; +} +export namespace GPULoadOp { + let Load: string; + let Clear: string; +} +export namespace GPUFrontFace { + let CCW: string; + let CW: string; +} +export namespace GPUCullMode { + let None: string; + let Front: string; + let Back: string; +} +export namespace GPUIndexFormat { + let Uint16: string; + let Uint32: string; +} +export namespace GPUVertexFormat { + export let Uint8x2: string; + export let Uint8x4: string; + export let Sint8x2: string; + export let Sint8x4: string; + export let Unorm8x2: string; + export let Unorm8x4: string; + export let Snorm8x2: string; + export let Snorm8x4: string; + export let Uint16x2: string; + export let Uint16x4: string; + export let Sint16x2: string; + export let Sint16x4: string; + export let Unorm16x2: string; + export let Unorm16x4: string; + export let Snorm16x2: string; + export let Snorm16x4: string; + export let Float16x2: string; + export let Float16x4: string; + export let Float32: string; + export let Float32x2: string; + export let Float32x3: string; + export let Float32x4: string; + let Uint32_1: string; + export { Uint32_1 as Uint32 }; + export let Uint32x2: string; + export let Uint32x3: string; + export let Uint32x4: string; + export let Sint32: string; + export let Sint32x2: string; + export let Sint32x3: string; + export let Sint32x4: string; +} +export namespace GPUTextureFormat { + let R8Unorm: string; + let R8Snorm: string; + let R8Uint: string; + let R8Sint: string; + let R16Uint: string; + let R16Sint: string; + let R16Float: string; + let RG8Unorm: string; + let RG8Snorm: string; + let RG8Uint: string; + let RG8Sint: string; + let R16Unorm: string; + let R16Snorm: string; + let R32Uint: string; + let R32Sint: string; + let R32Float: string; + let RG16Uint: string; + let RG16Sint: string; + let RG16Float: string; + let RGBA8Unorm: string; + let RGBA8UnormSRGB: string; + let RGBA8Snorm: string; + let RGBA8Uint: string; + let RGBA8Sint: string; + let BGRA8Unorm: string; + let BGRA8UnormSRGB: string; + let RG16Unorm: string; + let RG16Snorm: string; + let RGB9E5UFloat: string; + let RGB10A2Unorm: string; + let RG11B10UFloat: string; + let RG32Uint: string; + let RG32Sint: string; + let RG32Float: string; + let RGBA16Uint: string; + let RGBA16Sint: string; + let RGBA16Float: string; + let RGBA16Unorm: string; + let RGBA16Snorm: string; + let RGBA32Uint: string; + let RGBA32Sint: string; + let RGBA32Float: string; + let Stencil8: string; + let Depth16Unorm: string; + let Depth24Plus: string; + let Depth24PlusStencil8: string; + let Depth32Float: string; + let Depth32FloatStencil8: string; + let BC1RGBAUnorm: string; + let BC1RGBAUnormSRGB: string; + let BC2RGBAUnorm: string; + let BC2RGBAUnormSRGB: string; + let BC3RGBAUnorm: string; + let BC3RGBAUnormSRGB: string; + let BC4RUnorm: string; + let BC4RSnorm: string; + let BC5RGUnorm: string; + let BC5RGSnorm: string; + let BC6HRGBUFloat: string; + let BC6HRGBFloat: string; + let BC7RGBAUnorm: string; + let BC7RGBAUnormSRGB: string; + let ETC2RGB8Unorm: string; + let ETC2RGB8UnormSRGB: string; + let ETC2RGB8A1Unorm: string; + let ETC2RGB8A1UnormSRGB: string; + let ETC2RGBA8Unorm: string; + let ETC2RGBA8UnormSRGB: string; + let EACR11Unorm: string; + let EACR11Snorm: string; + let EACRG11Unorm: string; + let EACRG11Snorm: string; + let ASTC4x4Unorm: string; + let ASTC4x4UnormSRGB: string; + let ASTC5x4Unorm: string; + let ASTC5x4UnormSRGB: string; + let ASTC5x5Unorm: string; + let ASTC5x5UnormSRGB: string; + let ASTC6x5Unorm: string; + let ASTC6x5UnormSRGB: string; + let ASTC6x6Unorm: string; + let ASTC6x6UnormSRGB: string; + let ASTC8x5Unorm: string; + let ASTC8x5UnormSRGB: string; + let ASTC8x6Unorm: string; + let ASTC8x6UnormSRGB: string; + let ASTC8x8Unorm: string; + let ASTC8x8UnormSRGB: string; + let ASTC10x5Unorm: string; + let ASTC10x5UnormSRGB: string; + let ASTC10x6Unorm: string; + let ASTC10x6UnormSRGB: string; + let ASTC10x8Unorm: string; + let ASTC10x8UnormSRGB: string; + let ASTC10x10Unorm: string; + let ASTC10x10UnormSRGB: string; + let ASTC12x10Unorm: string; + let ASTC12x10UnormSRGB: string; + let ASTC12x12Unorm: string; + let ASTC12x12UnormSRGB: string; +} +export namespace GPUAddressMode { + let ClampToEdge: string; + let Repeat: string; + let MirrorRepeat: string; +} +export namespace GPUFilterMode { + let Linear: string; + let Nearest: string; +} +export namespace GPUBlendFactor { + let Zero: string; + let One: string; + let Src: string; + let OneMinusSrc: string; + let SrcAlpha: string; + let OneMinusSrcAlpha: string; + let Dst: string; + let OneMinusDst: string; + let DstAlpha: string; + let OneMinusDstAlpha: string; + let SrcAlphaSaturated: string; + let Constant: string; + let OneMinusConstant: string; +} +export namespace GPUBlendOperation { + let Add: string; + let Subtract: string; + let ReverseSubtract: string; + let Min: string; + let Max: string; +} +export namespace GPUColorWriteFlags { + let None_1: number; + export { None_1 as None }; + export let Red: number; + export let Green: number; + export let Blue: number; + export let Alpha: number; + export let All: number; +} +export namespace GPUStencilOperation { + export let Keep: string; + let Zero_1: string; + export { Zero_1 as Zero }; + export let Replace: string; + export let Invert: string; + export let IncrementClamp: string; + export let DecrementClamp: string; + export let IncrementWrap: string; + export let DecrementWrap: string; +} +export namespace GPUBufferBindingType { + let Uniform: string; + let Storage: string; + let ReadOnlyStorage: string; +} +export namespace GPUStorageTextureAccess { + let WriteOnly: string; + let ReadOnly: string; + let ReadWrite: string; +} +export namespace GPUSamplerBindingType { + let Filtering: string; + let NonFiltering: string; + let Comparison: string; +} +export namespace GPUTextureSampleType { + let Float: string; + let UnfilterableFloat: string; + let Depth: string; + let SInt: string; + let UInt: string; +} +export namespace GPUTextureDimension { + let OneD: string; + let TwoD: string; + let ThreeD: string; +} +export namespace GPUTextureViewDimension { + let OneD_1: string; + export { OneD_1 as OneD }; + let TwoD_1: string; + export { TwoD_1 as TwoD }; + export let TwoDArray: string; + export let Cube: string; + export let CubeArray: string; + let ThreeD_1: string; + export { ThreeD_1 as ThreeD }; +} +export namespace GPUTextureAspect { + let All_1: string; + export { All_1 as All }; + export let StencilOnly: string; + export let DepthOnly: string; +} +export namespace GPUInputStepMode { + let Vertex: string; + let Instance: string; +} +export namespace GPUFeatureName { + export let CoreFeaturesAndLimits: string; + export let DepthClipControl: string; + let Depth32FloatStencil8_1: string; + export { Depth32FloatStencil8_1 as Depth32FloatStencil8 }; + export let TextureCompressionBC: string; + export let TextureCompressionBCSliced3D: string; + export let TextureCompressionETC2: string; + export let TextureCompressionASTC: string; + export let TextureCompressionASTCSliced3D: string; + export let TimestampQuery: string; + export let IndirectFirstInstance: string; + export let ShaderF16: string; + let RG11B10UFloat_1: string; + export { RG11B10UFloat_1 as RG11B10UFloat }; + export let BGRA8UNormStorage: string; + export let Float32Filterable: string; + export let Float32Blendable: string; + export let ClipDistances: string; + export let DualSourceBlending: string; + export let Subgroups: string; + export let TextureFormatsTier1: string; + export let TextureFormatsTier2: string; +} +export const GPUFeatureMap: { + 'texture-compression-s3tc': string; + 'texture-compression-etc1': string; +}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUPipelineUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUPipelineUtils.d.ts new file mode 100644 index 000000000..12321c42b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUPipelineUtils.d.ts @@ -0,0 +1,144 @@ +export default WebGPUPipelineUtils; +/** + * A WebGPU backend utility module for managing pipelines. + * + * @private + */ +declare class WebGPUPipelineUtils { + /** + * Constructs a new utility object. + * + * @param {WebGPUBackend} backend - The WebGPU backend. + */ + constructor(backend: WebGPUBackend); + /** + * A reference to the WebGPU backend. + * + * @type {WebGPUBackend} + */ + backend: WebGPUBackend; + /** + * A Weak Map that tracks the active pipeline for render or compute passes. + * + * @private + * @type {WeakMap<(GPURenderPassEncoder|GPUComputePassEncoder),(GPURenderPipeline|GPUComputePipeline)>} + */ + private _activePipelines; + /** + * Sets the given pipeline for the given pass. The method makes sure to only set the + * pipeline when necessary. + * + * @param {(GPURenderPassEncoder|GPUComputePassEncoder)} pass - The pass encoder. + * @param {(GPURenderPipeline|GPUComputePipeline)} pipeline - The pipeline. + */ + setPipeline(pass: (GPURenderPassEncoder | GPUComputePassEncoder), pipeline: (GPURenderPipeline | GPUComputePipeline)): void; + /** + * Returns the sample count derived from the given render context. + * + * @private + * @param {RenderContext} renderContext - The render context. + * @return {number} The sample count. + */ + private _getSampleCount; + /** + * Creates a render pipeline for the given render object. + * + * @param {RenderObject} renderObject - The render object. + * @param {Array} promises - An array of compilation promises which are used in `compileAsync()`. + */ + createRenderPipeline(renderObject: RenderObject, promises: Array>): void; + /** + * Creates GPU render bundle encoder for the given render context. + * + * @param {RenderContext} renderContext - The render context. + * @param {?string} [label='renderBundleEncoder'] - The label. + * @return {GPURenderBundleEncoder} The GPU render bundle encoder. + */ + createBundleEncoder(renderContext: RenderContext, label?: string | null): GPURenderBundleEncoder; + /** + * Creates a compute pipeline for the given compute node. + * + * @param {ComputePipeline} pipeline - The compute pipeline. + * @param {Array} bindings - The bindings. + */ + createComputePipeline(pipeline: ComputePipeline, bindings: Array): void; + /** + * Reads line-accurate diagnostics from shader modules and logs them. + * Called from pipeline creation error paths to turn opaque validation + * failures into actionable WGSL feedback. + * + * @private + * @param {Array<{program: ProgrammableStage, module: GPUShaderModule}>} stages - Pairs of program + compiled shader module. + * @param {string} pipelineLabel - Label of the owning pipeline, used as log prefix. + * @return {Promise} + */ + private _reportShaderDiagnostics; + /** + * Returns the blending state as a descriptor object required + * for the pipeline creation. + * + * @private + * @param {Material|BlendMode} object - The object containing blending information. + * @return {Object} The blending state. + */ + private _getBlending; + /** + * Returns the GPU blend factor which is required for the pipeline creation. + * + * @private + * @param {number} blend - The blend factor as a three.js constant. + * @return {string} The GPU blend factor. + */ + private _getBlendFactor; + /** + * Returns the GPU stencil compare function which is required for the pipeline creation. + * + * @private + * @param {Material} material - The material. + * @return {string} The GPU stencil compare function. + */ + private _getStencilCompare; + /** + * Returns the GPU stencil operation which is required for the pipeline creation. + * + * @private + * @param {number} op - A three.js constant defining the stencil operation. + * @return {string} The GPU stencil operation. + */ + private _getStencilOperation; + /** + * Returns the GPU blend operation which is required for the pipeline creation. + * + * @private + * @param {number} blendEquation - A three.js constant defining the blend equation. + * @return {string} The GPU blend operation. + */ + private _getBlendOperation; + /** + * Returns the primitive state as a descriptor object required + * for the pipeline creation. + * + * @private + * @param {Object3D} object - The 3D object. + * @param {BufferGeometry} geometry - The geometry. + * @param {Material} material - The material. + * @return {Object} The primitive state. + */ + private _getPrimitiveState; + /** + * Returns the GPU color write mask which is required for the pipeline creation. + * + * @private + * @param {Material} material - The material. + * @return {number} The GPU color write mask. + */ + private _getColorWriteMask; + /** + * Returns the GPU depth compare function which is required for the pipeline creation. + * + * @private + * @param {Material} material - The material. + * @return {string} The GPU depth compare function. + */ + private _getDepthCompare; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTexturePassUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTexturePassUtils.d.ts new file mode 100644 index 000000000..e2d05d692 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTexturePassUtils.d.ts @@ -0,0 +1,84 @@ +export default WebGPUTexturePassUtils; +/** + * A WebGPU backend utility module used by {@link WebGPUTextureUtils}. + * + * @private + */ +declare class WebGPUTexturePassUtils extends DataMap { + /** + * Constructs a new utility object. + * + * @param {GPUDevice} device - The WebGPU device. + */ + constructor(device: GPUDevice); + /** + * The WebGPU device. + * + * @type {GPUDevice} + */ + device: GPUDevice; + /** + * The mipmap GPU sampler. + * + * @type {GPUSampler} + */ + mipmapSampler: GPUSampler; + /** + * The flipY GPU sampler. + * + * @type {GPUSampler} + */ + flipYSampler: GPUSampler; + flipUniformBuffer: GPUBuffer; + noFlipUniformBuffer: GPUBuffer; + /** + * A cache for GPU render pipelines used for copy/transfer passes. + * Every texture format and textureBindingViewDimension combo requires a unique pipeline. + * + * @type {Object} + */ + transferPipelines: { + [x: string]: GPURenderPipeline; + }; + mipmapShaderModule: GPUShaderModule; + /** + * Returns a render pipeline for the internal copy render pass. The pass + * requires a unique render pipeline for each texture format. + * + * @param {string} format - The GPU texture format + * @param {string?} textureBindingViewDimension - The GPU texture binding view dimension + * @return {GPURenderPipeline} The GPU render pipeline. + */ + getTransferPipeline(format: string, textureBindingViewDimension: string | null): GPURenderPipeline; + /** + * Flip the contents of the given GPU texture along its vertical axis. + * + * @param {GPUTexture} textureGPU - The GPU texture object. + * @param {Object} textureGPUDescriptor - The texture descriptor. + * @param {number} [baseArrayLayer=0] - The index of the first array layer accessible to the texture view. + */ + flipY(textureGPU: GPUTexture, textureGPUDescriptor: Object, baseArrayLayer?: number): void; + /** + * Generates mipmaps for the given GPU texture. + * + * @param {GPUTexture} textureGPU - The GPU texture object. + * @param {?GPUCommandEncoder} [encoder=null] - An optional command encoder used to generate mipmaps. + */ + generateMipmaps(textureGPU: GPUTexture, encoder?: GPUCommandEncoder | null): void; + /** + * Since multiple copy render passes are required to generate mipmaps, the passes + * are managed as render bundles to improve performance. + * + * @param {GPUTexture} textureGPU - The GPU texture object. + * @return {Array} An array of render bundles. + */ + _mipmapCreateBundles(textureGPU: GPUTexture): Array; + /** + * Executes the render bundles. + * + * @param {GPUCommandEncoder} commandEncoder - The GPU command encoder. + * @param {Array} passes - An array of render bundles. + */ + _mipmapRunBundles(commandEncoder: GPUCommandEncoder, passes: Array): void; +} +import DataMap from '../../common/DataMap.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTextureUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTextureUtils.d.ts new file mode 100644 index 000000000..6bf2a9f38 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTextureUtils.d.ts @@ -0,0 +1,289 @@ +/** + * Returns the GPU format for the given texture. + * + * @param {Texture} texture - The texture. + * @param {GPUDevice} [device] - The GPU device which is used for feature detection. + * @return {string} The GPU format. + */ +export function getFormat(texture: Texture, device?: GPUDevice): string; +export default WebGPUTextureUtils; +import { Texture } from '../../../textures/Texture.js'; +/** + * A WebGPU backend utility module for managing textures. + * + * @private + */ +declare class WebGPUTextureUtils { + /** + * Constructs a new utility object. + * + * @param {WebGPUBackend} backend - The WebGPU backend. + */ + constructor(backend: WebGPUBackend); + /** + * A reference to the WebGPU backend. + * + * @type {WebGPUBackend} + */ + backend: WebGPUBackend; + /** + * A reference to the pass utils. + * + * @type {?WebGPUTexturePassUtils} + * @default null + */ + _passUtils: WebGPUTexturePassUtils | null; + /** + * A dictionary for managing default textures. The key + * is the texture format, the value the texture object. + * + * @type {Object} + */ + defaultTexture: { + [x: string]: Texture; + }; + /** + * A dictionary for managing default cube textures. The key + * is the texture format, the value the texture object. + * + * @type {Object} + */ + defaultCubeTexture: { + [x: string]: CubeTexture; + }; + /** + * A default video frame. + * + * @type {?VideoFrame} + * @default null + */ + defaultVideoFrame: VideoFrame | null; + /** + * A cache of shared texture samplers. + * + * @type {Map} + */ + _samplerCache: Map; + /** + * Creates a GPU sampler for the given texture. + * + * @param {Texture} texture - The texture to create the sampler for. + * @param {TextureNode} textureNode - The texture node to update the sampler with. + * @return {string} The current sampler key. + */ + updateSampler(texture: Texture, textureNode: TextureNode): string; + /** + * Creates a default texture for the given texture that can be used + * as a placeholder until the actual texture is ready for usage. + * + * @param {Texture} texture - The texture to create a default texture for. + */ + createDefaultTexture(texture: Texture): void; + /** + * Defines a texture on the GPU for the given texture object. + * + * @param {Texture} texture - The texture. + * @param {Object} [options={}] - Optional configuration parameter. + */ + createTexture(texture: Texture, options?: Object): void; + /** + * Destroys the GPU data for the given texture object. + * + * @param {Texture} texture - The texture. + * @param {boolean} [isDefaultTexture=false] - Whether the texture uses a default GPU texture or not. + */ + destroyTexture(texture: Texture, isDefaultTexture?: boolean): void; + /** + * Generates mipmaps for the given texture. + * + * @param {Texture} texture - The texture. + * @param {?GPUCommandEncoder} [encoder=null] - An optional command encoder used to generate mipmaps. + */ + generateMipmaps(texture: Texture, encoder?: GPUCommandEncoder | null): void; + /** + * Returns the color buffer representing the color + * attachment of the default framebuffer. + * + * @return {GPUTexture} The color buffer. + */ + getColorBuffer(): GPUTexture; + /** + * Returns the depth buffer representing the depth + * attachment of the default framebuffer. + * + * @param {boolean} [depth=true] - Whether depth is enabled or not. + * @param {boolean} [stencil=false] - Whether stencil is enabled or not. + * @return {GPUTexture} The depth buffer. + */ + getDepthBuffer(depth?: boolean, stencil?: boolean): GPUTexture; + /** + * Uploads the updated texture data to the GPU. + * + * @param {Texture} texture - The texture. + * @param {Object} [options={}] - Optional configuration parameter. + */ + updateTexture(texture: Texture, options?: Object): void; + /** + * Returns texture data as a typed array. + * + * @async + * @param {Texture} texture - The texture to copy. + * @param {number} x - The x coordinate of the copy origin. + * @param {number} y - The y coordinate of the copy origin. + * @param {number} width - The width of the copy. + * @param {number} height - The height of the copy. + * @param {number} faceIndex - The face index. + * @return {Promise} A Promise that resolves with a typed array when the copy operation has finished. + */ + copyTextureToBuffer(texture: Texture, x: number, y: number, width: number, height: number, faceIndex: number): Promise; + /** + * Frees all internal resources. + */ + dispose(): void; + /** + * Returns the default GPU texture for the given format. + * + * @private + * @param {string} format - The GPU format. + * @return {GPUTexture} The GPU texture. + */ + private _getDefaultTextureGPU; + /** + * Returns the default GPU cube texture for the given format. + * + * @private + * @param {string} format - The GPU format. + * @return {GPUTexture} The GPU texture. + */ + private _getDefaultCubeTextureGPU; + /** + * Uploads cube texture image data to the GPU memory. + * + * @private + * @param {CubeTexture} texture - The cube texture. + * @param {GPUTexture} textureGPU - The GPU texture. + * @param {Object} textureDescriptorGPU - The GPU texture descriptor. + */ + private _copyCubeMapToTexture; + /** + * Uploads texture image data to the GPU memory. + * + * @private + * @param {HTMLImageElement|ImageBitmap|HTMLCanvasElement} image - The image data. + * @param {GPUTexture} textureGPU - The GPU texture. + * @param {Object} textureDescriptorGPU - The GPU texture descriptor. + * @param {number} originDepth - The origin depth. + * @param {boolean} flipY - Whether to flip texture data along their vertical axis or not. + * @param {boolean} premultiplyAlpha - Whether the texture should have its RGB channels premultiplied by the alpha channel or not. + * @param {number} [mipLevel=0] - The mip level where the data should be copied to. + */ + private _copyImageToTexture; + /** + * Returns the pass utils singleton. + * + * @private + * @return {WebGPUTexturePassUtils} The utils instance. + */ + private _getPassUtils; + /** + * Generates mipmaps for the given GPU texture. + * + * @private + * @param {GPUTexture} textureGPU - The GPU texture object. + * @param {?GPUCommandEncoder} [encoder=null] - An optional command encoder used to generate mipmaps. + */ + private _generateMipmaps; + /** + * Flip the contents of the given GPU texture along its vertical axis. + * + * @private + * @param {GPUTexture} textureGPU - The GPU texture object. + * @param {Object} textureDescriptorGPU - The texture descriptor. + * @param {number} [originDepth=0] - The origin depth. + */ + private _flipY; + /** + * Uploads texture buffer data to the GPU memory. + * + * @private + * @param {Object} image - An object defining the image buffer data. + * @param {GPUTexture} textureGPU - The GPU texture. + * @param {Object} textureDescriptorGPU - The GPU texture descriptor. + * @param {number} originDepth - The origin depth. + * @param {boolean} flipY - Whether to flip texture data along their vertical axis or not. + * @param {number} [depth=0] - The depth offset when copying array or 3D texture data. + * @param {number} [mipLevel=0] - The mip level where the data should be copied to. + */ + private _copyBufferToTexture; + /** + * Uploads compressed texture data to the GPU memory. + * + * @private + * @param {Array} mipmaps - An array with mipmap data. + * @param {GPUTexture} textureGPU - The GPU texture. + * @param {Object} textureDescriptorGPU - The GPU texture descriptor. + * @param {?Set} [layerUpdates=null] - The layer indices to update. + */ + private _copyCompressedBufferToTexture; + /** + * This method is only relevant for compressed texture formats. It returns a block + * data descriptor for the given GPU compressed texture format. + * + * @private + * @param {string} format - The GPU compressed texture format. + * @return {Object} The block data descriptor. + */ + private _getBlockData; + /** + * Converts the three.js uv wrapping constants to GPU address mode constants. + * + * @private + * @param {number} value - The three.js constant defining a uv wrapping mode. + * @return {string} The GPU address mode. + */ + private _convertAddressMode; + /** + * Converts the three.js filter constants to GPU filter constants. + * + * @private + * @param {number} value - The three.js constant defining a filter mode. + * @return {string} The GPU filter mode. + */ + private _convertFilterMode; + /** + * Converts the three.js filter constants to a GPU mipmap filter constant. + * Unlike `_convertFilterMode`, this extracts the between-mip-level filtering + * axis from the combined three.js constant rather than the within-level axis. + * + * @private + * @param {number} value - The three.js constant defining a filter mode. + * @return {string} The GPU mipmap filter mode. + */ + private _convertMipmapFilterMode; + /** + * Returns the bytes-per-texel value for the given GPU texture format. + * + * @private + * @param {string} format - The GPU texture format. + * @return {number} The bytes-per-texel. + */ + private _getBytesPerTexel; + /** + * Returns the corresponding typed array type for the given GPU texture format. + * + * @private + * @param {string} format - The GPU texture format. + * @return {TypedArray.constructor} The typed array type. + */ + private _getTypedArrayType; + /** + * Returns the GPU dimensions for the given texture. + * + * @private + * @param {Texture} texture - The texture. + * @return {string} The GPU dimension. + */ + private _getDimension; +} +import WebGPUTexturePassUtils from './WebGPUTexturePassUtils.js'; +import { CubeTexture } from '../../../textures/CubeTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.d.ts new file mode 100644 index 000000000..dcc48eded --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.d.ts @@ -0,0 +1,53 @@ +export default WebGPUTimestampQueryPool; +/** + * Manages a pool of WebGPU timestamp queries for performance measurement. + * Extends the base TimestampQueryPool to provide WebGPU-specific implementation. + * + * @augments TimestampQueryPool + */ +declare class WebGPUTimestampQueryPool extends TimestampQueryPool { + /** + * Creates a new WebGPU timestamp query pool. + * + * @param {GPUDevice} device - The WebGPU device to create queries on. + * @param {string} type - The type identifier for this query pool. + * @param {number} [maxQueries=2048] - Maximum number of queries this pool can hold. + */ + constructor(device: GPUDevice, type: string, maxQueries?: number); + device: GPUDevice; + type: string; + querySet: GPUQuerySet; + resolveBuffer: GPUBuffer; + resultBuffer: GPUBuffer; + /** + * Allocates a pair of queries for a given render context. + * + * @param {string} uid - A unique identifier for the render context. + * @returns {?number} The base offset for the allocated queries, or null if allocation failed. + */ + allocateQueriesForContext(uid: string): number | null; + /** + * Asynchronously resolves all pending queries and returns the total duration. + * If there's already a pending resolve operation, returns that promise instead. + * + * @async + * @returns {Promise} The total duration in milliseconds, or the last valid value if resolution fails. + */ + resolveQueriesAsync(): Promise; + /** + * Internal method to resolve queries and calculate total duration. + * + * @async + * @private + * @returns {Promise} The total duration in milliseconds. + */ + private _resolveQueries; + /** + * Dispose of the query pool. + * + * @async + * @returns {Promise} A Promise that resolves when the dispose has been executed. + */ + dispose(): Promise; +} +import TimestampQueryPool from '../../common/TimestampQueryPool.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUUtils.d.ts new file mode 100644 index 000000000..b367efa5a --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUUtils.d.ts @@ -0,0 +1,104 @@ +/** + * Submits a single GPU command to the device queue using a shared, module-scoped + * array to avoid per-call array allocations. + * + * @private + * @param {GPUDevice} device - The GPU device. + * @param {GPUCommandBuffer} command - The command buffer to submit. + */ +export function submit(device: GPUDevice, command: GPUCommandBuffer): void; +export default WebGPUUtils; +/** + * A WebGPU backend utility module with common helpers. + * + * @private + */ +declare class WebGPUUtils { + /** + * Constructs a new utility object. + * + * @param {WebGPUBackend} backend - The WebGPU backend. + */ + constructor(backend: WebGPUBackend); + /** + * A reference to the WebGPU backend. + * + * @type {WebGPUBackend} + */ + backend: WebGPUBackend; + /** + * Returns the depth/stencil GPU format for the given render context. + * + * @param {RenderContext} renderContext - The render context. + * @return {string} The depth/stencil GPU texture format. + */ + getCurrentDepthStencilFormat(renderContext: RenderContext): string; + /** + * Returns the GPU format for the given texture. + * + * @param {Texture} texture - The texture. + * @return {string} The GPU texture format. + */ + getTextureFormatGPU(texture: Texture): string; + /** + * Returns an object that defines the multi-sampling state of the given texture. + * + * @param {Texture} texture - The texture. + * @return {Object} The multi-sampling state. + */ + getTextureSampleData(texture: Texture): Object; + /** + * Returns the default color attachment's GPU format of the current render context. + * + * @param {RenderContext} renderContext - The render context. + * @return {string} The GPU texture format of the default color attachment. + */ + getCurrentColorFormat(renderContext: RenderContext): string; + /** + * Returns the GPU formats of all color attachments of the current render context. + * + * @param {RenderContext} renderContext - The render context. + * @return {Array} The GPU texture formats of all color attachments. + */ + getCurrentColorFormats(renderContext: RenderContext): Array; + /** + * Returns the output color space of the current render context. + * + * @param {RenderContext} renderContext - The render context. + * @return {string} The output color space. + */ + getCurrentColorSpace(renderContext: RenderContext): string; + /** + * Returns GPU primitive topology for the given object and material. + * + * @param {Object3D} object - The 3D object. + * @param {Material} material - The material. + * @return {string} The GPU primitive topology. + */ + getPrimitiveTopology(object: Object3D, material: Material): string; + /** + * Returns a modified sample count from the given sample count value. + * + * That is required since WebGPU only supports either 1 or 4. + * + * @param {number} sampleCount - The input sample count. + * @return {number} The (potentially updated) output sample count. + */ + getSampleCount(sampleCount: number): number; + /** + * Returns the sample count of the given render context. + * + * @param {RenderContext} renderContext - The render context. + * @return {number} The sample count. + */ + getSampleCountRenderContext(renderContext: RenderContext): number; + /** + * Returns the preferred canvas format. + * + * There is a separate method for this so it's possible to + * honor edge cases for specific devices. + * + * @return {string} The GPU texture format of the canvas. + */ + getPreferredCanvasFormat(): string; +} diff --git a/jsdoc-testing/jsdoc/src/renderers/webxr/WebXRController.d.ts b/jsdoc-testing/jsdoc/src/renderers/webxr/WebXRController.d.ts new file mode 100644 index 000000000..91dbb3340 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webxr/WebXRController.d.ts @@ -0,0 +1,96 @@ +/** + * Class for representing a XR controller with its + * different coordinate systems. + * + * @private + */ +export class WebXRController { + /** + * A group representing the target ray space + * of the XR controller. + * + * @private + * @type {?Group} + * @default null + */ + private _targetRay; + /** + * A group representing the grip space + * of the XR controller. + * + * @private + * @type {?Group} + * @default null + */ + private _grip; + /** + * A group representing the hand space + * of the XR controller. + * + * @private + * @type {?Group} + * @default null + */ + private _hand; + /** + * Returns a group representing the hand space of the XR controller. + * + * @return {Group} A group representing the hand space of the XR controller. + */ + getHandSpace(): Group; + /** + * Returns a group representing the target ray space of the XR controller. + * + * @return {Group} A group representing the target ray space of the XR controller. + */ + getTargetRaySpace(): Group; + /** + * Returns a group representing the grip space of the XR controller. + * + * @return {Group} A group representing the grip space of the XR controller. + */ + getGripSpace(): Group; + /** + * Dispatches the given event to the groups representing + * the different coordinate spaces of the XR controller. + * + * @param {Object} event - The event to dispatch. + * @return {WebXRController} A reference to this instance. + */ + dispatchEvent(event: Object): WebXRController; + /** + * Connects the controller with the given XR input source. + * + * @param {XRInputSource} inputSource - The input source. + * @return {WebXRController} A reference to this instance. + */ + connect(inputSource: XRInputSource): WebXRController; + /** + * Disconnects the controller from the given XR input source. + * + * @param {XRInputSource} inputSource - The input source. + * @return {WebXRController} A reference to this instance. + */ + disconnect(inputSource: XRInputSource): WebXRController; + /** + * Updates the controller with the given input source, XR frame and reference space. + * This updates the transformations of the groups that represent the different + * coordinate systems of the controller. + * + * @param {XRInputSource} inputSource - The input source. + * @param {XRFrame} frame - The XR frame. + * @param {XRReferenceSpace} referenceSpace - The reference space. + * @return {WebXRController} A reference to this instance. + */ + update(inputSource: XRInputSource, frame: XRFrame, referenceSpace: XRReferenceSpace): WebXRController; + /** + * Returns a group representing the hand joint for the given input joint. + * + * @private + * @param {Group} hand - The group representing the hand space. + * @param {XRJointSpace} inputjoint - The hand joint data. + * @return {Group} A group representing the hand joint for the given input joint. + */ + private _getHandJoint; +} +import { Group } from '../../objects/Group.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webxr/WebXRDepthSensing.d.ts b/jsdoc-testing/jsdoc/src/renderers/webxr/WebXRDepthSensing.d.ts new file mode 100644 index 000000000..aaa8ad7cf --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webxr/WebXRDepthSensing.d.ts @@ -0,0 +1,55 @@ +/** + * A XR module that manages the access to the Depth Sensing API. + */ +export class WebXRDepthSensing { + /** + * An opaque texture representing the depth of the user's environment. + * + * @type {?ExternalTexture} + */ + texture: ExternalTexture | null; + /** + * A plane mesh for visualizing the depth texture. + * + * @type {?Mesh} + */ + mesh: Mesh | null; + /** + * The depth near value. + * + * @type {number} + */ + depthNear: number; + /** + * The depth near far. + * + * @type {number} + */ + depthFar: number; + /** + * Inits the depth sensing module + * + * @param {XRWebGLDepthInformation} depthData - The XR depth data. + * @param {XRRenderState} renderState - The XR render state. + */ + init(depthData: XRWebGLDepthInformation, renderState: XRRenderState): void; + /** + * Returns a plane mesh that visualizes the depth texture. + * + * @param {ArrayCamera} cameraXR - The XR camera. + * @return {?Mesh} The plane mesh. + */ + getMesh(cameraXR: ArrayCamera): Mesh | null; + /** + * Resets the module + */ + reset(): void; + /** + * Returns a texture representing the depth of the user's environment. + * + * @return {?ExternalTexture} The depth texture. + */ + getDepthTexture(): ExternalTexture | null; +} +import { ExternalTexture } from '../../textures/ExternalTexture.js'; +import { Mesh } from '../../objects/Mesh.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webxr/WebXRManager.d.ts b/jsdoc-testing/jsdoc/src/renderers/webxr/WebXRManager.d.ts new file mode 100644 index 000000000..edab6f90c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/renderers/webxr/WebXRManager.d.ts @@ -0,0 +1,220 @@ +/** + * This class represents an abstraction of the WebXR Device API and is + * internally used by {@link WebGLRenderer}. `WebXRManager` also provides a public + * interface that allows users to enable/disable XR and perform XR related + * tasks like for instance retrieving controllers. + * + * @augments EventDispatcher + * @hideconstructor + */ +export class WebXRManager extends EventDispatcher { + /** + * Constructs a new WebGL renderer. + * + * @param {WebGLRenderer} renderer - The renderer. + * @param {WebGL2RenderingContext} gl - The rendering context. + */ + constructor(renderer: WebGLRenderer, gl: WebGL2RenderingContext); + /** + * Whether the manager's XR camera should be automatically updated or not. + * + * @type {boolean} + * @default true + */ + cameraAutoUpdate: boolean; + /** + * This flag notifies the renderer to be ready for XR rendering. Set it to `true` + * if you are going to use XR in your app. + * + * @type {boolean} + * @default false + */ + enabled: boolean; + /** + * Whether XR presentation is active or not. + * + * @type {boolean} + * @readonly + * @default false + */ + readonly isPresenting: boolean; + /** + * Returns a group representing the `target ray` space of the XR controller. + * Use this space for visualizing 3D objects that support the user in pointing + * tasks like UI interaction. + * + * @param {number} index - The index of the controller. + * @return {Group} A group representing the `target ray` space. + */ + getController: (index: number) => Group; + /** + * Returns a group representing the `grip` space of the XR controller. + * Use this space for visualizing 3D objects that support the user in pointing + * tasks like UI interaction. + * + * Note: If you want to show something in the user's hand AND offer a + * pointing ray at the same time, you'll want to attached the handheld object + * to the group returned by `getControllerGrip()` and the ray to the + * group returned by `getController()`. The idea is to have two + * different groups in two different coordinate spaces for the same WebXR + * controller. + * + * @param {number} index - The index of the controller. + * @return {Group} A group representing the `grip` space. + */ + getControllerGrip: (index: number) => Group; + /** + * Returns a group representing the `hand` space of the XR controller. + * Use this space for visualizing 3D objects that support the user in pointing + * tasks like UI interaction. + * + * @param {number} index - The index of the controller. + * @return {Group} A group representing the `hand` space. + */ + getHand: (index: number) => Group; + /** + * Sets the framebuffer scale factor. + * + * This method can not be used during a XR session. + * + * @param {number} value - The framebuffer scale factor. + */ + setFramebufferScaleFactor: (value: number) => void; + /** + * Sets the reference space type. Can be used to configure a spatial relationship with the user's physical + * environment. Depending on how the user moves in 3D space, setting an appropriate reference space can + * improve tracking. Default is `local-floor`. Valid values can be found here + * https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpace#reference_space_types. + * + * This method can not be used during a XR session. + * + * @param {string} value - The reference space type. + */ + setReferenceSpaceType: (value: string) => void; + /** + * Returns the XR reference space. + * + * @return {XRReferenceSpace} The XR reference space. + */ + getReferenceSpace: () => XRReferenceSpace; + /** + * Sets a custom XR reference space. + * + * @param {XRReferenceSpace} space - The XR reference space. + */ + setReferenceSpace: (space: XRReferenceSpace) => void; + /** + * Returns the current base layer. + * + * This is an `XRProjectionLayer` when the targeted XR device supports the + * WebXR Layers API, or an `XRWebGLLayer` otherwise. + * + * @return {?(XRWebGLLayer|XRProjectionLayer)} The XR base layer. + */ + getBaseLayer: () => (XRWebGLLayer | XRProjectionLayer) | null; + /** + * Returns the current XR binding. + * + * Creates a new binding if needed and the browser is + * capable of doing so. + * + * @return {?XRWebGLBinding} The XR binding. Returns `null` if one cannot be created. + */ + getBinding: () => XRWebGLBinding | null; + /** + * Returns the current XR frame. + * + * @return {?XRFrame} The XR frame. Returns `null` when used outside a XR session. + */ + getFrame: () => XRFrame | null; + /** + * Returns the current XR session. + * + * @return {?XRSession} The XR session. Returns `null` when used outside a XR session. + */ + getSession: () => XRSession | null; + /** + * After a XR session has been requested usually with one of the `*Button` modules, it + * is injected into the renderer with this method. This method triggers the start of + * the actual XR rendering. + * + * @async + * @param {XRSession} value - The XR session to set. + * @return {Promise} A Promise that resolves when the session has been set. + */ + setSession: (value: XRSession) => Promise; + /** + * Returns the environment blend mode from the current XR session. + * + * @return {'opaque'|'additive'|'alpha-blend'|undefined} The environment blend mode. Returns `undefined` when used outside of a XR session. + */ + getEnvironmentBlendMode: () => "opaque" | "additive" | "alpha-blend" | undefined; + /** + * Returns the current depth texture computed via depth sensing. + * + * See {@link WebXRDepthSensing#getDepthTexture}. + * + * @return {?Texture} The depth texture. + */ + getDepthTexture: () => Texture | null; + /** + * Updates the state of the XR camera. Use this method on app level if you + * set `cameraAutoUpdate` to `false`. The method requires the non-XR + * camera of the scene as a parameter. The passed in camera's transformation + * is automatically adjusted to the position of the XR camera when calling + * this method. + * + * @param {Camera} camera - The camera. + */ + updateCamera: (camera: Camera) => void; + /** + * Returns an instance of {@link ArrayCamera} which represents the XR camera + * of the active XR session. For each view it holds a separate camera object. + * + * The camera's `fov` is currently not used and does not reflect the fov of + * the XR camera. If you need the fov on app level, you have to compute in + * manually from the XR camera's projection matrices. + * + * @return {ArrayCamera} The XR camera. + */ + getCamera: () => ArrayCamera; + /** + * Returns the amount of foveation used by the XR compositor for the projection layer. + * + * @return {number|undefined} The amount of foveation. + */ + getFoveation: () => number | undefined; + /** + * Sets the foveation value. + * + * @param {number} value - A number in the range `[0,1]` where `0` means no foveation (full resolution) + * and `1` means maximum foveation (the edges render at lower resolution). + */ + setFoveation: (value: number) => void; + /** + * Returns `true` if depth sensing is supported. + * + * @return {boolean} Whether depth sensing is supported or not. + */ + hasDepthSensing: () => boolean; + /** + * Returns the depth sensing mesh. + * + * See {@link WebXRDepthSensing#getMesh}. + * + * @return {Mesh} The depth sensing mesh. + */ + getDepthSensingMesh: () => Mesh; + /** + * Retrieves an opaque texture from the view-aligned {@link XRCamera}. + * Only available during the current animation loop. + * + * @param {XRCamera} xrCamera - The camera to query. + * @return {?Texture} An opaque texture representing the current raw camera frame. + */ + getCameraTexture: (xrCamera: XRCamera) => Texture | null; + setAnimationLoop: (callback: any) => void; + dispose: () => void; +} +import { EventDispatcher } from '../../core/EventDispatcher.js'; +import { ArrayCamera } from '../../cameras/ArrayCamera.js'; diff --git a/jsdoc-testing/jsdoc/src/scenes/Fog.d.ts b/jsdoc-testing/jsdoc/src/scenes/Fog.d.ts new file mode 100644 index 000000000..3c17089bd --- /dev/null +++ b/jsdoc-testing/jsdoc/src/scenes/Fog.d.ts @@ -0,0 +1,70 @@ +/** + * This class can be used to define a linear fog that grows linearly denser + * with the distance. + * + * ```js + * const scene = new THREE.Scene(); + * scene.fog = new THREE.Fog( 0xcccccc, 10, 15 ); + * ``` + */ +export class Fog { + /** + * Constructs a new fog. + * + * @param {number|Color} color - The fog's color. + * @param {number} [near=1] - The minimum distance to start applying fog. + * @param {number} [far=1000] - The maximum distance at which fog stops being calculated and applied. + */ + constructor(color: number | Color, near?: number, far?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isFog: boolean; + /** + * The name of the fog. + * + * @type {string} + */ + name: string; + /** + * The fog's color. + * + * @type {Color} + */ + color: Color; + /** + * The minimum distance to start applying fog. Objects that are less than + * `near` units from the active camera won't be affected by fog. + * + * @type {number} + * @default 1 + */ + near: number; + /** + * The maximum distance at which fog stops being calculated and applied. + * Objects that are more than `far` units away from the active camera won't + * be affected by fog. + * + * @type {number} + * @default 1000 + */ + far: number; + /** + * Returns a new fog with copied values from this instance. + * + * @return {Fog} A clone of this instance. + */ + clone(): Fog; + /** + * Serializes the fog into JSON. + * + * @param {?(Object|string)} meta - An optional value holding meta information about the serialization. + * @return {Object} A JSON object representing the serialized fog + */ + toJSON(): Object; +} +import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/scenes/FogExp2.d.ts b/jsdoc-testing/jsdoc/src/scenes/FogExp2.d.ts new file mode 100644 index 000000000..e11462391 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/scenes/FogExp2.d.ts @@ -0,0 +1,60 @@ +/** + * This class can be used to define an exponential squared fog, + * which gives a clear view near the camera and a faster than exponentially + * densening fog farther from the camera. + * + * ```js + * const scene = new THREE.Scene(); + * scene.fog = new THREE.FogExp2( 0xcccccc, 0.002 ); + * ``` + */ +export class FogExp2 { + /** + * Constructs a new fog. + * + * @param {number|Color} color - The fog's color. + * @param {number} [density=0.00025] - Defines how fast the fog will grow dense. + */ + constructor(color: number | Color, density?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isFogExp2: boolean; + /** + * The name of the fog. + * + * @type {string} + */ + name: string; + /** + * The fog's color. + * + * @type {Color} + */ + color: Color; + /** + * Defines how fast the fog will grow dense. + * + * @type {number} + * @default 0.00025 + */ + density: number; + /** + * Returns a new fog with copied values from this instance. + * + * @return {FogExp2} A clone of this instance. + */ + clone(): FogExp2; + /** + * Serializes the fog into JSON. + * + * @param {?(Object|string)} meta - An optional value holding meta information about the serialization. + * @return {Object} A JSON object representing the serialized fog + */ + toJSON(): Object; +} +import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/scenes/Scene.d.ts b/jsdoc-testing/jsdoc/src/scenes/Scene.d.ts new file mode 100644 index 000000000..91ed09ab6 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/scenes/Scene.d.ts @@ -0,0 +1,97 @@ +/** + * Scenes allow you to set up what is to be rendered and where by three.js. + * This is where you place 3D objects like meshes, lines or lights. + * + * @augments Object3D + */ +export class Scene extends Object3D { + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isScene: boolean; + type: string; + /** + * Defines the background of the scene. Valid inputs are: + * + * - A color for defining a uniform colored background. + * - A texture for defining a (flat) textured background. + * - Cube textures or equirectangular textures for defining a skybox. + * + * @type {?(Color|Texture)} + * @default null + */ + background: (Color | Texture) | null; + /** + * Sets the environment map for all physical materials in the scene. However, + * it's not possible to overwrite an existing texture assigned to the `envMap` + * material property. + * + * @type {?Texture} + * @default null + */ + environment: Texture | null; + /** + * A fog instance defining the type of fog that affects everything + * rendered in the scene. + * + * @type {?(Fog|FogExp2)} + * @default null + */ + fog: (Fog | FogExp2) | null; + /** + * Sets the blurriness of the background. Only influences environment maps + * assigned to {@link Scene#background}. Valid input is a float between `0` + * and `1`. + * + * @type {number} + * @default 0 + */ + backgroundBlurriness: number; + /** + * Attenuates the color of the background. Only applies to background textures. + * + * @type {number} + * @default 1 + */ + backgroundIntensity: number; + /** + * The rotation of the background in radians. Only influences environment maps + * assigned to {@link Scene#background}. + * + * @type {Euler} + * @default (0,0,0) + */ + backgroundRotation: Euler; + /** + * Attenuates the color of the environment. Only influences environment maps + * assigned to {@link Scene#environment}. + * + * @type {number} + * @default 1 + */ + environmentIntensity: number; + /** + * The rotation of the environment map in radians. Only influences physical materials + * in the scene when {@link Scene#environment} is used. + * + * @type {Euler} + * @default (0,0,0) + */ + environmentRotation: Euler; + /** + * Forces everything in the scene to be rendered with the defined material. It is possible + * to exclude materials from override by setting {@link Material#allowOverride} to `false`. + * + * @type {?Material} + * @default null + */ + overrideMaterial: Material | null; + copy(source: any, recursive: any): this; + toJSON(meta: any): Object; +} +import { Object3D } from '../core/Object3D.js'; +import { Euler } from '../math/Euler.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/CanvasTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/CanvasTexture.d.ts new file mode 100644 index 000000000..ee88d4d2b --- /dev/null +++ b/jsdoc-testing/jsdoc/src/textures/CanvasTexture.d.ts @@ -0,0 +1,33 @@ +/** + * Creates a texture from a canvas element. + * + * This is almost the same as the base texture class, except that it sets {@link Texture#needsUpdate} + * to `true` immediately since a canvas can directly be used for rendering. + * + * @augments Texture + */ +export class CanvasTexture extends Texture { + /** + * Constructs a new texture. + * + * @param {HTMLCanvasElement} [canvas] - The HTML canvas element. + * @param {number} [mapping=Texture.DEFAULT_MAPPING] - The texture mapping. + * @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value. + * @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value. + * @param {number} [magFilter=LinearFilter] - The mag filter value. + * @param {number} [minFilter=LinearMipmapLinearFilter] - The min filter value. + * @param {number} [format=RGBAFormat] - The texture format. + * @param {number} [type=UnsignedByteType] - The texture type. + * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value. + */ + constructor(canvas?: HTMLCanvasElement, mapping?: number, wrapS?: number, wrapT?: number, magFilter?: number, minFilter?: number, format?: number, type?: number, anisotropy?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isCanvasTexture: boolean; +} +import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/CompressedArrayTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/CompressedArrayTexture.d.ts new file mode 100644 index 000000000..5e6a9f0f9 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/textures/CompressedArrayTexture.d.ts @@ -0,0 +1,58 @@ +/** + * Creates a texture 2D array based on data in compressed form. + * + * These texture are usually loaded with {@link CompressedTextureLoader}. + * + * @augments CompressedTexture + */ +export class CompressedArrayTexture extends CompressedTexture { + /** + * Constructs a new compressed array texture. + * + * @param {Array} mipmaps - This array holds for all mipmaps (including the bases mip) + * the data and dimensions. + * @param {number} width - The width of the texture. + * @param {number} height - The height of the texture. + * @param {number} depth - The depth of the texture. + * @param {number} [format=RGBAFormat] - The min filter value. + * @param {number} [type=UnsignedByteType] - The min filter value. + */ + constructor(mipmaps: Array, width: number, height: number, depth: number, format?: number, type?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isCompressedArrayTexture: boolean; + /** + * This defines how the texture is wrapped in the depth and corresponds to + * *W* in UVW mapping. + * + * @type {(RepeatWrapping|ClampToEdgeWrapping|MirroredRepeatWrapping)} + * @default ClampToEdgeWrapping + */ + wrapR: (RepeatWrapping | number | MirroredRepeatWrapping); + /** + * A set of all layers which need to be updated in the texture. + * + * @type {Set} + */ + layerUpdates: Set; + /** + * Describes that a specific layer of the texture needs to be updated. + * Normally when {@link Texture#needsUpdate} is set to `true`, the + * entire compressed texture array is sent to the GPU. Marking specific + * layers will only transmit subsets of all mipmaps associated with a + * specific depth in the array which is often much more performant. + * + * @param {number} layerIndex - The layer index that should be updated. + */ + addLayerUpdate(layerIndex: number): void; + /** + * Resets the layer updates registry. + */ + clearLayerUpdates(): void; +} +import { CompressedTexture } from './CompressedTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/CompressedCubeTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/CompressedCubeTexture.d.ts new file mode 100644 index 000000000..05f09fbfb --- /dev/null +++ b/jsdoc-testing/jsdoc/src/textures/CompressedCubeTexture.d.ts @@ -0,0 +1,35 @@ +/** + * Creates a cube texture based on data in compressed form. + * + * These texture are usually loaded with {@link CompressedTextureLoader}. + * + * @augments CompressedTexture + */ +export class CompressedCubeTexture extends CompressedTexture { + /** + * Constructs a new compressed texture. + * + * @param {Array} images - An array of compressed textures. + * @param {number} [format=RGBAFormat] - The texture format. + * @param {number} [type=UnsignedByteType] - The texture type. + */ + constructor(images: Array, format?: number, type?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isCompressedCubeTexture: boolean; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isCubeTexture: boolean; + image: CompressedTexture[]; +} +import { CompressedTexture } from './CompressedTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/CompressedTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/CompressedTexture.d.ts new file mode 100644 index 000000000..3d1d77673 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/textures/CompressedTexture.d.ts @@ -0,0 +1,36 @@ +/** + * Creates a texture based on data in compressed form. + * + * These texture are usually loaded with {@link CompressedTextureLoader}. + * + * @augments Texture + */ +export class CompressedTexture extends Texture { + /** + * Constructs a new compressed texture. + * + * @param {Array} mipmaps - This array holds for all mipmaps (including the bases mip) + * the data and dimensions. + * @param {number} width - The width of the texture. + * @param {number} height - The height of the texture. + * @param {number} [format=RGBAFormat] - The texture format. + * @param {number} [type=UnsignedByteType] - The texture type. + * @param {number} [mapping=Texture.DEFAULT_MAPPING] - The texture mapping. + * @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value. + * @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value. + * @param {number} [magFilter=LinearFilter] - The mag filter value. + * @param {number} [minFilter=LinearMipmapLinearFilter] - The min filter value. + * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value. + * @param {string} [colorSpace=NoColorSpace] - The color space. + */ + constructor(mipmaps: Array, width: number, height: number, format?: number, type?: number, mapping?: number, wrapS?: number, wrapT?: number, magFilter?: number, minFilter?: number, anisotropy?: number, colorSpace?: string); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isCompressedTexture: boolean; +} +import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/CubeDepthTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/CubeDepthTexture.d.ts new file mode 100644 index 000000000..c436fb9e7 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/textures/CubeDepthTexture.d.ts @@ -0,0 +1,51 @@ +/** + * This class can be used to automatically save the depth information of a + * cube rendering into a cube texture with depth format. Used for PointLight shadows. + * + * @augments DepthTexture + */ +export class CubeDepthTexture extends DepthTexture { + /** + * Constructs a new cube depth texture. + * + * @param {number} size - The size (width and height) of each cube face. + * @param {number} [type=UnsignedIntType] - The texture type. + * @param {number} [mapping=CubeReflectionMapping] - The texture mapping. + * @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value. + * @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value. + * @param {number} [magFilter=NearestFilter] - The mag filter value. + * @param {number} [minFilter=NearestFilter] - The min filter value. + * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value. + * @param {number} [format=DepthFormat] - The texture format. + */ + constructor(size: number, type?: number, mapping?: number, wrapS?: number, wrapT?: number, magFilter?: number, minFilter?: number, anisotropy?: number, format?: number); + image: { + width: number; + height: number; + depth: number; + }[]; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isCubeDepthTexture: boolean; + /** + * Set to true for cube texture handling in WebGLTextures. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isCubeTexture: boolean; + set images(value: Array HTMLImageElement>); + /** + * Alias for {@link CubeDepthTexture#image}. + * + * @type {Array} + */ + get images(): Array HTMLImageElement>; +} +import { DepthTexture } from './DepthTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/CubeTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/CubeTexture.d.ts new file mode 100644 index 000000000..76c1ce43d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/textures/CubeTexture.d.ts @@ -0,0 +1,49 @@ +/** + * Creates a cube texture made up of six images. + * + * ```js + * const loader = new THREE.CubeTextureLoader(); + * loader.setPath( 'textures/cube/pisa/' ); + * + * const textureCube = loader.load( [ + * 'px.png', 'nx.png', 'py.png', 'ny.png', 'pz.png', 'nz.png' + * ] ); + * + * const material = new THREE.MeshBasicMaterial( { color: 0xffffff, envMap: textureCube } ); + * ``` + * + * @augments Texture + */ +export class CubeTexture extends Texture { + /** + * Constructs a new cube texture. + * + * @param {Array} [images=[]] - An array holding a image for each side of a cube. + * @param {number} [mapping=CubeReflectionMapping] - The texture mapping. + * @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value. + * @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value. + * @param {number} [magFilter=LinearFilter] - The mag filter value. + * @param {number} [minFilter=LinearMipmapLinearFilter] - The min filter value. + * @param {number} [format=RGBAFormat] - The texture format. + * @param {number} [type=UnsignedByteType] - The texture type. + * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value. + * @param {string} [colorSpace=NoColorSpace] - The color space value. + */ + constructor(images?: Array HTMLImageElement>, mapping?: number, wrapS?: number, wrapT?: number, magFilter?: number, minFilter?: number, format?: number, type?: number, anisotropy?: number, colorSpace?: string); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isCubeTexture: boolean; + set images(value: Array HTMLImageElement>); + /** + * Alias for {@link CubeTexture#image}. + * + * @type {Array} + */ + get images(): Array HTMLImageElement>; +} +import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/Data3DTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/Data3DTexture.d.ts new file mode 100644 index 000000000..877df941e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/textures/Data3DTexture.d.ts @@ -0,0 +1,34 @@ +/** + * Creates a three-dimensional texture from raw data, with parameters to + * divide it into width, height, and depth. + * + * @augments Texture + */ +export class Data3DTexture extends Texture { + /** + * Constructs a new data array texture. + * + * @param {?TypedArray} [data=null] - The buffer data. + * @param {number} [width=1] - The width of the texture. + * @param {number} [height=1] - The height of the texture. + * @param {number} [depth=1] - The depth of the texture. + */ + constructor(data?: TypedArray | null, width?: number, height?: number, depth?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isData3DTexture: boolean; + /** + * This defines how the texture is wrapped in the depth and corresponds to + * *W* in UVW mapping. + * + * @type {(RepeatWrapping|ClampToEdgeWrapping|MirroredRepeatWrapping)} + * @default ClampToEdgeWrapping + */ + wrapR: (RepeatWrapping | number | MirroredRepeatWrapping); +} +import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/DataArrayTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/DataArrayTexture.d.ts new file mode 100644 index 000000000..7b9225b8e --- /dev/null +++ b/jsdoc-testing/jsdoc/src/textures/DataArrayTexture.d.ts @@ -0,0 +1,53 @@ +/** + * Creates an array of textures directly from raw buffer data. + * + * @augments Texture + */ +export class DataArrayTexture extends Texture { + /** + * Constructs a new data array texture. + * + * @param {?TypedArray} [data=null] - The buffer data. + * @param {number} [width=1] - The width of the texture. + * @param {number} [height=1] - The height of the texture. + * @param {number} [depth=1] - The depth of the texture. + */ + constructor(data?: TypedArray | null, width?: number, height?: number, depth?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isDataArrayTexture: boolean; + /** + * This defines how the texture is wrapped in the depth and corresponds to + * *W* in UVW mapping. + * + * @type {(RepeatWrapping|ClampToEdgeWrapping|MirroredRepeatWrapping)} + * @default ClampToEdgeWrapping + */ + wrapR: (RepeatWrapping | number | MirroredRepeatWrapping); + /** + * A set of all layers which need to be updated in the texture. + * + * @type {Set} + */ + layerUpdates: Set; + /** + * Describes that a specific layer of the texture needs to be updated. + * Normally when {@link Texture#needsUpdate} is set to `true`, the + * entire data texture array is sent to the GPU. Marking specific + * layers will only transmit subsets of all mipmaps associated with a + * specific depth in the array which is often much more performant. + * + * @param {number} layerIndex - The layer index that should be updated. + */ + addLayerUpdate(layerIndex: number): void; + /** + * Resets the layer updates registry. + */ + clearLayerUpdates(): void; +} +import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/DataTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/DataTexture.d.ts new file mode 100644 index 000000000..8bec07e5d --- /dev/null +++ b/jsdoc-testing/jsdoc/src/textures/DataTexture.d.ts @@ -0,0 +1,38 @@ +/** + * Creates a texture directly from raw buffer data. + * + * The interpretation of the data depends on type and format: If the type is + * `UnsignedByteType`, a `Uint8Array` will be useful for addressing the + * texel data. If the format is `RGBAFormat`, data needs four values for + * one texel; Red, Green, Blue and Alpha (typically the opacity). + * + * @augments Texture + */ +export class DataTexture extends Texture { + /** + * Constructs a new data texture. + * + * @param {?TypedArray} [data=null] - The buffer data. + * @param {number} [width=1] - The width of the texture. + * @param {number} [height=1] - The height of the texture. + * @param {number} [format=RGBAFormat] - The texture format. + * @param {number} [type=UnsignedByteType] - The texture type. + * @param {number} [mapping=Texture.DEFAULT_MAPPING] - The texture mapping. + * @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value. + * @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value. + * @param {number} [magFilter=NearestFilter] - The mag filter value. + * @param {number} [minFilter=NearestFilter] - The min filter value. + * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value. + * @param {string} [colorSpace=NoColorSpace] - The color space. + */ + constructor(data?: TypedArray | null, width?: number, height?: number, format?: number, type?: number, mapping?: number, wrapS?: number, wrapT?: number, magFilter?: number, minFilter?: number, anisotropy?: number, colorSpace?: string); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isDataTexture: boolean; +} +import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/DepthTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/DepthTexture.d.ts new file mode 100644 index 000000000..7d3a969ed --- /dev/null +++ b/jsdoc-testing/jsdoc/src/textures/DepthTexture.d.ts @@ -0,0 +1,42 @@ +/** + * This class can be used to automatically save the depth information of a + * rendering into a texture. + * + * @augments Texture + */ +export class DepthTexture extends Texture { + /** + * Constructs a new depth texture. + * + * @param {number} width - The width of the texture. + * @param {number} height - The height of the texture. + * @param {number} [type=UnsignedIntType] - The texture type. + * @param {number} [mapping=Texture.DEFAULT_MAPPING] - The texture mapping. + * @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value. + * @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value. + * @param {number} [magFilter=LinearFilter] - The mag filter value. + * @param {number} [minFilter=LinearFilter] - The min filter value. + * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value. + * @param {number} [format=DepthFormat] - The texture format. + * @param {number} [depth=1] - The depth of the texture. + */ + constructor(width: number, height: number, type?: number, mapping?: number, wrapS?: number, wrapT?: number, magFilter?: number, minFilter?: number, anisotropy?: number, format?: number, depth?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isDepthTexture: boolean; + /** + * Code corresponding to the depth compare function. + * + * @type {?(NeverCompare|LessCompare|EqualCompare|LessEqualCompare|GreaterCompare|NotEqualCompare|GreaterEqualCompare|AlwaysCompare)} + * @default null + */ + compareFunction: (NeverCompare | LessCompare | EqualCompare | LessEqualCompare | GreaterCompare | NotEqualCompare | GreaterEqualCompare | AlwaysCompare) | null; + copy(source: any): this; + toJSON(meta: any): Object; +} +import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/ExternalTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/ExternalTexture.d.ts new file mode 100644 index 000000000..e14a5d7b9 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/textures/ExternalTexture.d.ts @@ -0,0 +1,36 @@ +/** + * Represents a texture created externally with the same renderer context. + * + * This may be a texture from a protected media stream, device camera feed, + * or other data feeds like a depth sensor. + * + * Note that this class is only supported in {@link WebGLRenderer}, and in + * the {@link WebGPURenderer} WebGPU backend. + * + * @augments Texture + */ +export class ExternalTexture extends Texture { + /** + * Creates a new raw texture. + * + * @param {?(WebGLTexture|GPUTexture)} [sourceTexture=null] - The external texture. + */ + constructor(sourceTexture?: (WebGLTexture | GPUTexture) | null); + /** + * The external source texture. + * + * @type {?(WebGLTexture|GPUTexture)} + * @default null + */ + sourceTexture: (WebGLTexture | GPUTexture) | null; + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isExternalTexture: boolean; + copy(source: any): this; +} +import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/FramebufferTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/FramebufferTexture.d.ts new file mode 100644 index 000000000..0de9064c8 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/textures/FramebufferTexture.d.ts @@ -0,0 +1,42 @@ +/** + * This class can only be used in combination with `copyFramebufferToTexture()` methods + * of renderers. It extracts the contents of the current bound framebuffer and provides it + * as a texture for further usage. + * + * ```js + * const pixelRatio = window.devicePixelRatio; + * const textureSize = 128 * pixelRatio; + * + * const frameTexture = new FramebufferTexture( textureSize, textureSize ); + * + * // calculate start position for copying part of the frame data + * const vector = new Vector2(); + * vector.x = ( window.innerWidth * pixelRatio / 2 ) - ( textureSize / 2 ); + * vector.y = ( window.innerHeight * pixelRatio / 2 ) - ( textureSize / 2 ); + * + * renderer.render( scene, camera ); + * + * // copy part of the rendered frame into the framebuffer texture + * renderer.copyFramebufferToTexture( frameTexture, vector ); + * ``` + * + * @augments Texture + */ +export class FramebufferTexture extends Texture { + /** + * Constructs a new framebuffer texture. + * + * @param {number} [width] - The width of the texture. + * @param {number} [height] - The height of the texture. + */ + constructor(width?: number, height?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isFramebufferTexture: boolean; +} +import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/HTMLTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/HTMLTexture.d.ts new file mode 100644 index 000000000..bdf594cf7 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/textures/HTMLTexture.d.ts @@ -0,0 +1,33 @@ +/** + * Creates a texture from an HTML element. + * + * This is almost the same as the base texture class, except that it sets {@link Texture#needsUpdate} + * to `true` immediately and listens for the parent canvas's paint events to trigger updates. + * + * @augments Texture + */ +export class HTMLTexture extends Texture { + /** + * Constructs a new texture. + * + * @param {HTMLElement} [element] - The HTML element. + * @param {number} [mapping=Texture.DEFAULT_MAPPING] - The texture mapping. + * @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value. + * @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value. + * @param {number} [magFilter=LinearFilter] - The mag filter value. + * @param {number} [minFilter=LinearMipmapLinearFilter] - The min filter value. + * @param {number} [format=RGBAFormat] - The texture format. + * @param {number} [type=UnsignedByteType] - The texture type. + * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value. + */ + constructor(element?: HTMLElement, mapping?: number, wrapS?: number, wrapT?: number, magFilter?: number, minFilter?: number, format?: number, type?: number, anisotropy?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isHTMLTexture: boolean; +} +import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/Source.d.ts b/jsdoc-testing/jsdoc/src/textures/Source.d.ts new file mode 100644 index 000000000..d4fbed15c --- /dev/null +++ b/jsdoc-testing/jsdoc/src/textures/Source.d.ts @@ -0,0 +1,78 @@ +/** + * Represents the data source of a texture. + * + * The main purpose of this class is to decouple the data definition from the texture + * definition so the same data can be used with multiple texture instances. + */ +export class Source { + /** + * Constructs a new video texture. + * + * @param {any} [data=null] - The data definition of a texture. + */ + constructor(data?: any); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isSource: boolean; + /** + * The UUID of the source. + * + * @type {string} + * @readonly + */ + readonly uuid: string; + /** + * The data definition of a texture. + * + * @type {any} + */ + data: any; + /** + * This property is only relevant when {@link Source#needsUpdate} is set to `true` and + * provides more control on how texture data should be processed. When `dataReady` is set + * to `false`, the engine performs the memory allocation (if necessary) but does not transfer + * the data into the GPU memory. + * + * @type {boolean} + * @default true + */ + dataReady: boolean; + /** + * This starts at `0` and counts how many times {@link Source#needsUpdate} is set to `true`. + * + * @type {number} + * @readonly + * @default 0 + */ + readonly version: number; + /** + * Returns the dimensions of the source into the given target vector. + * + * @param {(Vector2|Vector3)} target - The target object the result is written into. + * @return {(Vector2|Vector3)} The dimensions of the source. + */ + getSize(target: (Vector2 | Vector3)): (Vector2 | Vector3); + /** + * When the property is set to `true`, the engine allocates the memory + * for the texture (if necessary) and triggers the actual texture upload + * to the GPU next time the source is used. + * + * @type {boolean} + * @default false + * @param {boolean} value + */ + set needsUpdate(value: boolean); + /** + * Serializes the source into JSON. + * + * @param {?(Object|string)} meta - An optional value holding meta information about the serialization. + * @return {Object} A JSON object representing the serialized source. + * @see {@link ObjectLoader#parse} + */ + toJSON(meta: (Object | string) | null): Object; +} diff --git a/jsdoc-testing/jsdoc/src/textures/Texture.d.ts b/jsdoc-testing/jsdoc/src/textures/Texture.d.ts new file mode 100644 index 000000000..dbf4420fe --- /dev/null +++ b/jsdoc-testing/jsdoc/src/textures/Texture.d.ts @@ -0,0 +1,413 @@ +/** + * Base class for all textures. + * + * Note: After the initial use of a texture, its dimensions, format, and type + * cannot be changed. Instead, call {@link Texture#dispose} on the texture and instantiate a new one. + * + * @augments EventDispatcher + */ +export class Texture extends EventDispatcher { + /** + * Constructs a new texture. + * + * @param {?Object} [image=Texture.DEFAULT_IMAGE] - The image holding the texture data. + * @param {number} [mapping=Texture.DEFAULT_MAPPING] - The texture mapping. + * @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value. + * @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value. + * @param {number} [magFilter=LinearFilter] - The mag filter value. + * @param {number} [minFilter=LinearMipmapLinearFilter] - The min filter value. + * @param {number} [format=RGBAFormat] - The texture format. + * @param {number} [type=UnsignedByteType] - The texture type. + * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value. + * @param {string} [colorSpace=NoColorSpace] - The color space. + */ + constructor(image?: Object | null, mapping?: number, wrapS?: number, wrapT?: number, magFilter?: number, minFilter?: number, format?: number, type?: number, anisotropy?: number, colorSpace?: string); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isTexture: boolean; + /** + * The UUID of the texture. + * + * @type {string} + * @readonly + */ + readonly uuid: string; + /** + * The name of the texture. + * + * @type {string} + */ + name: string; + /** + * The data definition of a texture. A reference to the data source can be + * shared across textures. This is often useful in context of spritesheets + * where multiple textures render the same data but with different texture + * transformations. + * + * @type {Source} + */ + source: Source; + /** + * An array holding user-defined mipmaps. + * + * @type {Array} + */ + mipmaps: Array; + /** + * How the texture is applied to the object. The value `UVMapping` + * is the default, where texture or uv coordinates are used to apply the map. + * + * @type {(UVMapping|CubeReflectionMapping|CubeRefractionMapping|EquirectangularReflectionMapping|EquirectangularRefractionMapping|CubeUVReflectionMapping)} + * @default UVMapping + */ + mapping: (number | CubeReflectionMapping | CubeRefractionMapping | EquirectangularReflectionMapping | EquirectangularRefractionMapping | CubeUVReflectionMapping); + /** + * Lets you select the uv attribute to map the texture to. `0` for `uv`, + * `1` for `uv1`, `2` for `uv2` and `3` for `uv3`. + * + * @type {number} + * @default 0 + */ + channel: number; + /** + * This defines how the texture is wrapped horizontally and corresponds to + * *U* in UV mapping. + * + * @type {(RepeatWrapping|ClampToEdgeWrapping|MirroredRepeatWrapping)} + * @default ClampToEdgeWrapping + */ + wrapS: (number | number | number); + /** + * This defines how the texture is wrapped horizontally and corresponds to + * *V* in UV mapping. + * + * @type {(RepeatWrapping|ClampToEdgeWrapping|MirroredRepeatWrapping)} + * @default ClampToEdgeWrapping + */ + wrapT: (number | number | number); + /** + * How the texture is sampled when a texel covers more than one pixel. + * + * @type {(NearestFilter|NearestMipmapNearestFilter|NearestMipmapLinearFilter|LinearFilter|LinearMipmapNearestFilter|LinearMipmapLinearFilter)} + * @default LinearFilter + */ + magFilter: (NearestFilter | NearestMipmapNearestFilter | NearestMipmapLinearFilter | number | LinearMipmapNearestFilter | number); + /** + * How the texture is sampled when a texel covers less than one pixel. + * + * @type {(NearestFilter|NearestMipmapNearestFilter|NearestMipmapLinearFilter|LinearFilter|LinearMipmapNearestFilter|LinearMipmapLinearFilter)} + * @default LinearMipmapLinearFilter + */ + minFilter: (NearestFilter | NearestMipmapNearestFilter | NearestMipmapLinearFilter | number | LinearMipmapNearestFilter | number); + /** + * The number of samples taken along the axis through the pixel that has the + * highest density of texels. By default, this value is `1`. A higher value + * gives a less blurry result than a basic mipmap, at the cost of more + * texture samples being used. + * + * @type {number} + * @default Texture.DEFAULT_ANISOTROPY + */ + anisotropy: number; + /** + * The format of the texture. + * + * @type {number} + * @default RGBAFormat + */ + format: number; + /** + * The default internal format is derived from {@link Texture#format} and {@link Texture#type} and + * defines how the texture data is going to be stored on the GPU. + * + * This property allows to overwrite the default format. + * + * @type {?string} + * @default null + */ + internalFormat: string | null; + /** + * The data type of the texture. + * + * @type {number} + * @default UnsignedByteType + */ + type: number; + /** + * How much a single repetition of the texture is offset from the beginning, + * in each direction U and V. Typical range is `0.0` to `1.0`. + * + * @type {Vector2} + * @default (0,0) + */ + offset: Vector2; + /** + * How many times the texture is repeated across the surface, in each + * direction U and V. If repeat is set greater than `1` in either direction, + * the corresponding wrap parameter should also be set to `RepeatWrapping` + * or `MirroredRepeatWrapping` to achieve the desired tiling effect. + * + * @type {Vector2} + * @default (1,1) + */ + repeat: Vector2; + /** + * The point around which rotation occurs. A value of `(0.5, 0.5)` corresponds + * to the center of the texture. Default is `(0, 0)`, the lower left. + * + * @type {Vector2} + * @default (0,0) + */ + center: Vector2; + /** + * How much the texture is rotated around the center point, in radians. + * Positive values are counter-clockwise. + * + * @type {number} + * @default 0 + */ + rotation: number; + /** + * Whether to update the texture's uv-transformation {@link Texture#matrix} + * from the properties {@link Texture#offset}, {@link Texture#repeat}, + * {@link Texture#rotation}, and {@link Texture#center}. + * + * Set this to `false` if you are specifying the uv-transform matrix directly. + * + * @type {boolean} + * @default true + */ + matrixAutoUpdate: boolean; + /** + * The uv-transformation matrix of the texture. + * + * @type {Matrix3} + */ + matrix: Matrix3; + /** + * Whether to generate mipmaps (if possible) for a texture. + * + * Set this to `false` if you are creating mipmaps manually. + * + * @type {boolean} + * @default true + */ + generateMipmaps: boolean; + /** + * If set to `true`, the alpha channel, if present, is multiplied into the + * color channels when the texture is uploaded to the GPU. + * + * Note that this property has no effect when using `ImageBitmap`. You need to + * configure premultiply alpha on bitmap creation instead. + * + * @type {boolean} + * @default false + */ + premultiplyAlpha: boolean; + /** + * If set to `true`, the texture is flipped along the vertical axis when + * uploaded to the GPU. + * + * Note that this property has no effect when using `ImageBitmap`. You need to + * configure the flip on bitmap creation instead. + * + * @type {boolean} + * @default true + */ + flipY: boolean; + /** + * Specifies the alignment requirements for the start of each pixel row in memory. + * The allowable values are `1` (byte-alignment), `2` (rows aligned to even-numbered bytes), + * `4` (word-alignment), and `8` (rows start on double-word boundaries). + * + * @type {number} + * @default 4 + */ + unpackAlignment: number; + /** + * Textures containing color data should be annotated with `SRGBColorSpace` or `LinearSRGBColorSpace`. + * + * @type {string} + * @default NoColorSpace + */ + colorSpace: string; + /** + * An object that can be used to store custom data about the texture. It + * should not hold references to functions as these will not be cloned. + * + * @type {Object} + */ + userData: Object; + /** + * This can be used to only update a subregion or specific rows of the texture (for example, just the + * first 3 rows). Use the `addUpdateRange()` function to add ranges to this array. + * + * @type {Array} + */ + updateRanges: Array; + /** + * This starts at `0` and counts how many times {@link Texture#needsUpdate} is set to `true`. + * + * @type {number} + * @readonly + * @default 0 + */ + readonly version: number; + /** + * A callback function, called when the texture is updated (e.g., when + * {@link Texture#needsUpdate} has been set to true and then the texture is used). + * + * @type {?Function} + * @default null + */ + onUpdate: Function | null; + /** + * An optional back reference to the textures render target. + * + * @type {?(RenderTarget|WebGLRenderTarget)} + * @default null + */ + renderTarget: (RenderTarget | WebGLRenderTarget) | null; + /** + * Indicates whether a texture belongs to a render target or not. + * + * @type {boolean} + * @readonly + * @default false + */ + readonly isRenderTargetTexture: boolean; + /** + * Indicates if a texture should be handled like a texture array. + * + * @type {boolean} + * @readonly + * @default false + */ + readonly isArrayTexture: boolean; + /** + * Indicates whether this texture should be processed by `PMREMGenerator` or not + * (only relevant for render target textures). + * + * @type {number} + * @readonly + * @default 0 + */ + readonly pmremVersion: number; + /** + * Whether the texture should use one of the 16 bit integer formats which are normalized + * to [0, 1] or [-1, 1] (depending on signed/unsigned) when sampled. + * + * @type {boolean} + * @default false + */ + normalized: boolean; + /** + * The width of the texture in pixels. + */ + get width(): any; + /** + * The height of the texture in pixels. + */ + get height(): any; + /** + * The depth of the texture in pixels. + */ + get depth(): any; + set image(value: Object | null); + /** + * The image object holding the texture data. + * + * @type {?Object} + */ + get image(): Object | null; + /** + * Updates the texture transformation matrix from the properties {@link Texture#offset}, + * {@link Texture#repeat}, {@link Texture#rotation}, and {@link Texture#center}. + */ + updateMatrix(): void; + /** + * Adds a range of data in the data texture to be updated on the GPU. + * + * @param {number} start - Position at which to start update. + * @param {number} count - The number of components to update. + */ + addUpdateRange(start: number, count: number): void; + /** + * Clears the update ranges. + */ + clearUpdateRanges(): void; + /** + * Returns a new texture with copied values from this instance. + * + * @return {Texture} A clone of this instance. + */ + clone(): Texture; + /** + * Copies the values of the given texture to this instance. + * + * @param {Texture} source - The texture to copy. + * @return {Texture} A reference to this instance. + */ + copy(source: Texture): Texture; + /** + * Setting this property to `true` indicates the engine the texture + * must be updated in the next render. This triggers a texture upload + * to the GPU and ensures correct texture parameter configuration. + * + * @type {boolean} + * @default false + * @param {boolean} value + */ + set needsUpdate(value: boolean); + /** + * Sets this texture's properties based on `values`. + * @param {Object} values - A container with texture parameters. + */ + setValues(values: Object): void; + /** + * Serializes the texture into JSON. + * + * @param {?(Object|string)} meta - An optional value holding meta information about the serialization. + * @return {Object} A JSON object representing the serialized texture. + * @see {@link ObjectLoader#parse} + */ + toJSON(meta: (Object | string) | null): Object; + /** + * Frees the GPU-related resources allocated by this instance. Call this + * method whenever this instance is no longer used in your app. + * + * @fires Texture#dispose + */ + dispose(): void; + /** + * Transforms the given uv vector with the textures uv transformation matrix. + * + * @param {Vector2} uv - The uv vector. + * @return {Vector2} The transformed uv vector. + */ + transformUv(uv: Vector2): Vector2; + /** + * Setting this property to `true` indicates the engine the PMREM + * must be regenerated. + * + * @type {boolean} + * @default false + * @param {boolean} value + */ + set needsPMREMUpdate(value: boolean); +} +export namespace Texture { + export let DEFAULT_IMAGE: (new (width?: number, height?: number) => HTMLImageElement) | null; + export { UVMapping as DEFAULT_MAPPING }; + export let DEFAULT_ANISOTROPY: number; +} +import { EventDispatcher } from '../core/EventDispatcher.js'; +import { Source } from './Source.js'; +import { Vector2 } from '../math/Vector2.js'; +import { Matrix3 } from '../math/Matrix3.js'; +import { UVMapping } from '../constants.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/VideoFrameTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/VideoFrameTexture.d.ts new file mode 100644 index 000000000..bd25d7d01 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/textures/VideoFrameTexture.d.ts @@ -0,0 +1,44 @@ +/** + * This class can be used as an alternative way to define video data. Instead of using + * an instance of `HTMLVideoElement` like with `VideoTexture`, `VideoFrameTexture` expects each frame is + * defined manually via {@link VideoFrameTexture#setFrame}. A typical use case for this module is when + * video frames are decoded with the WebCodecs API. + * + * ```js + * const texture = new THREE.VideoFrameTexture(); + * texture.setFrame( frame ); + * ``` + * + * @augments VideoTexture + */ +export class VideoFrameTexture extends VideoTexture { + /** + * Constructs a new video frame texture. + * + * @param {number} [mapping=Texture.DEFAULT_MAPPING] - The texture mapping. + * @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value. + * @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value. + * @param {number} [magFilter=LinearFilter] - The mag filter value. + * @param {number} [minFilter=LinearFilter] - The min filter value. + * @param {number} [format=RGBAFormat] - The texture format. + * @param {number} [type=UnsignedByteType] - The texture type. + * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value. + */ + constructor(mapping?: number, wrapS?: number, wrapT?: number, magFilter?: number, minFilter?: number, format?: number, type?: number, anisotropy?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isVideoFrameTexture: boolean; + /** + * Sets the current frame of the video. This will automatically update the texture + * so the data can be used for rendering. + * + * @param {VideoFrame} frame - The video frame. + */ + setFrame(frame: VideoFrame): void; +} +import { VideoTexture } from './VideoTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/VideoTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/VideoTexture.d.ts new file mode 100644 index 000000000..d4ba7a0fd --- /dev/null +++ b/jsdoc-testing/jsdoc/src/textures/VideoTexture.d.ts @@ -0,0 +1,59 @@ +/** + * A texture for use with a video. + * + * ```js + * // assuming you have created a HTML video element with id="video" + * const video = document.getElementById( 'video' ); + * const texture = new THREE.VideoTexture( video ); + * ``` + * + * Note: When using video textures with {@link WebGPURenderer}, {@link Texture#colorSpace} must be + * set to THREE.SRGBColorSpace. + * + * Note: After the initial use of a texture, its dimensions, format, and type + * cannot be changed. Instead, call {@link Texture#dispose} on the texture and instantiate a new one. + * + * @augments Texture + */ +export class VideoTexture extends Texture { + /** + * Constructs a new video texture. + * + * @param {HTMLVideoElement} video - The video element to use as a data source for the texture. + * @param {number} [mapping=Texture.DEFAULT_MAPPING] - The texture mapping. + * @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value. + * @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value. + * @param {number} [magFilter=LinearFilter] - The mag filter value. + * @param {number} [minFilter=LinearFilter] - The min filter value. + * @param {number} [format=RGBAFormat] - The texture format. + * @param {number} [type=UnsignedByteType] - The texture type. + * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value. + */ + constructor(video: HTMLVideoElement, mapping?: number, wrapS?: number, wrapT?: number, magFilter?: number, minFilter?: number, format?: number, type?: number, anisotropy?: number); + /** + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isVideoTexture: boolean; + /** + * The video frame request callback identifier, which is a positive integer. + * + * Value of 0 represents no scheduled rVFC. + * + * @private + * @type {number} + */ + private _requestVideoFrameCallbackId; + clone(): any; + /** + * This method is called automatically by the renderer and sets {@link Texture#needsUpdate} + * to `true` every time a new frame is available. + * + * Only relevant if `requestVideoFrameCallback` is not supported in the browser. + */ + update(): void; +} +import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/utils.d.ts b/jsdoc-testing/jsdoc/src/utils.d.ts new file mode 100644 index 000000000..21c16ba39 --- /dev/null +++ b/jsdoc-testing/jsdoc/src/utils.d.ts @@ -0,0 +1,185 @@ +/** + * Finds the minimum value in an array. + * + * @private + * @param {Array} array - The array to search for the minimum value. + * @return {number} The minimum value in the array, or Infinity if the array is empty. + */ +export function arrayMin(array: Array): number; +/** + * Finds the maximum value in an array. + * + * @private + * @param {Array} array - The array to search for the maximum value. + * @return {number} The maximum value in the array, or -Infinity if the array is empty. + */ +export function arrayMax(array: Array): number; +/** + * Checks if an array contains values that require Uint32 representation. + * + * This function determines whether the array contains any values >= 65535, + * which would require a Uint32Array rather than a Uint16Array for proper storage. + * The function iterates from the end of the array, assuming larger values are + * typically located at the end. + * + * @private + * @param {Array} array - The array to check. + * @return {boolean} True if the array contains values >= 65535, false otherwise. + */ +export function arrayNeedsUint32(array: Array): boolean; +/** + * Creates a typed array of the specified type from the given buffer. + * + * @private + * @param {string} type - The name of the typed array type (e.g., 'Float32Array', 'Uint16Array'). + * @param {ArrayBuffer} buffer - The buffer to create the typed array from. + * @return {TypedArray} A new typed array of the specified type. + */ +export function getTypedArray(type: string, buffer: ArrayBuffer): TypedArray; +/** + * Creates an XHTML element with the specified tag name. + * + * This function uses the XHTML namespace to create DOM elements, + * ensuring proper element creation in XML-based contexts. + * + * @private + * @param {string} name - The tag name of the element to create (e.g., 'canvas', 'div'). + * @return {HTMLElement} The created XHTML element. + */ +export function createElementNS(name: string): HTMLElement; +/** + * Creates a canvas element configured for block display. + * + * This is a convenience function that creates a canvas element with + * display style set to 'block', which is commonly used in three.js + * rendering contexts to avoid inline element spacing issues. + * + * @return {HTMLCanvasElement} A canvas element with display set to 'block'. + */ +export function createCanvasElement(): HTMLCanvasElement; +/** + * Sets a custom function to handle console output. + * + * This allows external code to intercept and handle console.log, console.warn, + * and console.error calls made by three.js, which is useful for custom logging, + * testing, or debugging workflows. + * + * @param {Function} fn - The function to handle console output. Should accept + * (type, message, ...params) where type is 'log', 'warn', or 'error'. + */ +export function setConsoleFunction(fn: Function): void; +/** + * Gets the currently set custom console function. + * + * @return {Function|null} The custom console function, or null if not set. + */ +export function getConsoleFunction(): Function | null; +/** + * Logs an informational message with the 'THREE.' prefix. + * + * If a custom console function is set via setConsoleFunction(), it will be used + * instead of the native console.log. The first parameter is treated as the + * method name and is automatically prefixed with 'THREE.'. + * + * @param {...any} params - The message components. The first param is used as + * the method name and prefixed with 'THREE.'. + */ +export function log(...params: any[]): void; +/** + * Logs a warning message with the 'THREE.' prefix. + * + * If a custom console function is set via setConsoleFunction(), it will be used + * instead of the native console.warn. The first parameter is treated as the + * method name and is automatically prefixed with 'THREE.'. + * + * @param {...any} params - The message components. The first param is used as + * the method name and prefixed with 'THREE.'. + */ +export function warn(...params: any[]): void; +/** + * Logs an error message with the 'THREE.' prefix. + * + * If a custom console function is set via setConsoleFunction(), it will be used + * instead of the native console.error. The first parameter is treated as the + * method name and is automatically prefixed with 'THREE.'. + * + * @param {...any} params - The message components. The first param is used as + * the method name and prefixed with 'THREE.'. + */ +export function error(...params: any[]): void; +/** + * Logs a warning message only once, preventing duplicate warnings. + * + * This function maintains an internal cache of warning messages and will only + * output each unique warning message once. Useful for warnings that may be + * triggered repeatedly but should only be shown to the user once. + * + * @param {...any} params - The warning message components. + */ +export function warnOnce(...params: any[]): void; +/** + * Asynchronously probes for WebGL sync object completion. + * + * This function creates a promise that resolves when the WebGL sync object + * signals completion or rejects if the sync operation fails. It uses polling + * at the specified interval to check the sync status without blocking the + * main thread. This is useful for GPU-CPU synchronization in WebGL contexts. + * + * @private + * @param {WebGL2RenderingContext} gl - The WebGL rendering context. + * @param {WebGLSync} sync - The WebGL sync object to wait for. + * @param {number} interval - The polling interval in milliseconds. + * @return {Promise} A promise that resolves when the sync completes or rejects if it fails. + */ +export function probeAsync(gl: WebGL2RenderingContext, sync: WebGLSync, interval: number): Promise; +/** + * Yields execution to the main thread to allow rendering and other tasks. + * Uses scheduler.yield() when available (Chrome 115+), falls back to requestAnimationFrame. + * + * @return {Promise} + */ +export function yieldToMain(): Promise; +/** + * Converts a projection matrix from normalized device coordinates (NDC) + * range [-1, 1] to [0, 1]. + * + * This conversion is commonly needed when working with depth textures or + * render targets that expect depth values in the [0, 1] range rather than + * the standard OpenGL NDC range of [-1, 1]. The function modifies the + * projection matrix in place. + * + * @private + * @param {Matrix4} projectionMatrix - The projection matrix to convert (modified in place). + */ +export function toNormalizedProjectionMatrix(projectionMatrix: Matrix4): void; +/** + * Reverses the depth range of a projection matrix. + * + * This function inverts the depth mapping of a projection matrix, which is + * useful for reversed-Z depth buffer techniques that can improve depth + * precision. The function handles both perspective and orthographic projection + * matrices differently and modifies the matrix in place. + * + * For perspective matrices (where m[11] === -1), the depth mapping is + * reversed with an offset. For orthographic matrices, a simpler reversal + * is applied. + * + * @private + * @param {Matrix4} projectionMatrix - The projection matrix to reverse (modified in place). + */ +export function toReversedProjectionMatrix(projectionMatrix: Matrix4): void; +/** + * Returns `true` if the given object is a typed array. + * + * @param {any} array - The object to check. + * @return {boolean} Whether the given object is a typed array. + */ +export function isTypedArray(array: any): boolean; +/** + * Used to select the correct depth functions + * when reversed depth buffer is used. + * + * @private + * @type {Object} + */ +export const ReversedDepthFuncs: Object; From 1a711386b74c77b28096487de02ccb7c8cad4f57 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Sat, 30 May 2026 16:18:28 -0400 Subject: [PATCH 4/5] Update patch and delete jsdoc --- jsdoc-testing/changes.patch | 184 + jsdoc-testing/jsdoc/build/three.module.d.ts | 1836 -- jsdoc-testing/jsdoc/build/three.webgpu.d.ts | 23873 ---------------- jsdoc-testing/jsdoc/examples/jsm/Addons.d.ts | 269 - .../jsm/animation/AnimationClipCreator.d.ts | 62 - .../examples/jsm/animation/CCDIKSolver.d.ts | 152 - .../examples/jsm/capabilities/WebGL.d.ts | 31 - .../examples/jsm/capabilities/WebGPU.d.ts | 22 - .../jsm/controls/ArcballControls.d.ts | 676 - .../examples/jsm/controls/DragControls.d.ts | 93 - .../jsm/controls/FirstPersonControls.d.ts | 185 - .../examples/jsm/controls/FlyControls.d.ts | 101 - .../examples/jsm/controls/MapControls.d.ts | 18 - .../examples/jsm/controls/OrbitControls.d.ts | 458 - .../jsm/controls/PointerLockControls.d.ts | 105 - .../jsm/controls/TrackballControls.d.ts | 213 - .../jsm/controls/TransformControls.d.ts | 192 - jsdoc-testing/jsdoc/examples/jsm/csm/CSM.d.ts | 214 - .../jsdoc/examples/jsm/csm/CSMFrustum.d.ts | 81 - .../jsdoc/examples/jsm/csm/CSMHelper.d.ts | 60 - .../jsdoc/examples/jsm/csm/CSMShader.d.ts | 11 - .../jsdoc/examples/jsm/csm/CSMShadowNode.d.ts | 175 - .../examples/jsm/curves/CurveExtras.d.ts | 378 - .../jsdoc/examples/jsm/curves/NURBSCurve.d.ts | 70 - .../examples/jsm/curves/NURBSSurface.d.ts | 58 - .../jsdoc/examples/jsm/curves/NURBSUtils.d.ts | 112 - .../examples/jsm/curves/NURBSVolume.d.ts | 38 - .../examples/jsm/effects/AnaglyphEffect.d.ts | 68 - .../examples/jsm/effects/AsciiEffect.d.ts | 72 - .../examples/jsm/effects/OutlineEffect.d.ts | 89 - .../jsm/effects/ParallaxBarrierEffect.d.ts | 36 - .../examples/jsm/effects/StereoEffect.d.ts | 37 - .../jsm/environments/ColorEnvironment.d.ts | 31 - .../jsm/environments/DebugEnvironment.d.ts | 28 - .../jsm/environments/RoomEnvironment.d.ts | 28 - .../examples/jsm/exporters/DRACOExporter.d.ts | 75 - .../examples/jsm/exporters/EXRExporter.d.ts | 45 - .../examples/jsm/exporters/GLTFExporter.d.ts | 130 - .../examples/jsm/exporters/KTX2Exporter.d.ts | 26 - .../examples/jsm/exporters/OBJExporter.d.ts | 23 - .../examples/jsm/exporters/PLYExporter.d.ts | 56 - .../examples/jsm/exporters/STLExporter.d.ts | 36 - .../examples/jsm/exporters/USDZExporter.d.ts | 82 - .../jsm/geometries/BoxLineGeometry.d.ts | 27 - .../jsm/geometries/ConvexGeometry.d.ts | 23 - .../jsm/geometries/DecalGeometry.d.ts | 40 - .../jsm/geometries/ParametricFunctions.d.ts | 36 - .../jsm/geometries/ParametricGeometry.d.ts | 40 - .../jsm/geometries/RoundedBoxGeometry.d.ts | 26 - .../jsm/geometries/TeapotGeometry.d.ts | 37 - .../examples/jsm/geometries/TextGeometry.d.ts | 92 - .../jsdoc/examples/jsm/gpgpu/BitonicSort.d.ts | 263 - .../jsm/helpers/AnimationPathHelper.d.ts | 134 - .../jsm/helpers/LightProbeGridHelper.d.ts | 35 - .../jsm/helpers/LightProbeHelper.d.ts | 42 - .../jsm/helpers/LightProbeHelperGPU.d.ts | 45 - .../examples/jsm/helpers/OctreeHelper.d.ts | 43 - .../jsm/helpers/PositionalAudioHelper.d.ts | 66 - .../examples/jsm/helpers/RapierHelper.d.ts | 32 - .../jsm/helpers/RectAreaLightHelper.d.ts | 43 - .../examples/jsm/helpers/TextureHelper.d.ts | 34 - .../jsm/helpers/TextureHelperGPU.d.ts | 35 - .../jsm/helpers/VertexNormalsHelper.d.ts | 59 - .../jsm/helpers/VertexTangentsHelper.d.ts | 46 - .../examples/jsm/inspector/Extension.d.ts | 4 - .../examples/jsm/inspector/Inspector.d.ts | 76 - .../jsm/inspector/RendererInspector.d.ts | 39 - .../extensions/tsl-graph/TSLGraphEditor.d.ts | 44 - .../extensions/tsl-graph/TSLGraphLoader.d.ts | 24 - .../examples/jsm/inspector/tabs/Console.d.ts | 17 - .../examples/jsm/inspector/tabs/Memory.d.ts | 20 - .../jsm/inspector/tabs/Parameters.d.ts | 37 - .../jsm/inspector/tabs/Performance.d.ts | 20 - .../examples/jsm/inspector/tabs/Settings.d.ts | 10 - .../examples/jsm/inspector/tabs/Timeline.d.ts | 149 - .../examples/jsm/inspector/tabs/Viewer.d.ts | 16 - .../examples/jsm/inspector/ui/Graph.d.ts | 12 - .../jsdoc/examples/jsm/inspector/ui/Item.d.ts | 17 - .../jsdoc/examples/jsm/inspector/ui/List.d.ts | 11 - .../examples/jsm/inspector/ui/Profiler.d.ts | 62 - .../examples/jsm/inspector/ui/Style.d.ts | 3 - .../jsdoc/examples/jsm/inspector/ui/Tab.d.ts | 53 - .../examples/jsm/inspector/ui/Values.d.ts | 75 - .../examples/jsm/inspector/ui/utils.d.ts | 9 - .../jsm/interaction/InteractionManager.d.ts | 77 - .../examples/jsm/interactive/HTMLMesh.d.ts | 31 - .../jsm/interactive/InteractiveGroup.d.ts | 81 - .../jsm/interactive/SelectionBox.d.ts | 83 - .../jsdoc/examples/jsm/libs/ammo.wasm.d.ts | 6 - .../jsm/libs/basis/basis_transcoder.d.ts | 2 - .../jsm/libs/chevrotain.module.min.d.ts | 2 - .../jsdoc/examples/jsm/libs/demuxer_mp4.d.ts | 8 - .../jsm/libs/draco/draco_decoder.d.ts | 5 - .../jsm/libs/draco/draco_encoder.d.ts | 5 - .../jsm/libs/draco/draco_wasm_wrapper.d.ts | 5 - .../jsm/libs/draco/gltf/draco_decoder.d.ts | 5 - .../jsm/libs/draco/gltf/draco_encoder.d.ts | 5 - .../libs/draco/gltf/draco_wasm_wrapper.d.ts | 5 - .../jsdoc/examples/jsm/libs/ecsy.module.d.ts | 344 - .../examples/jsm/libs/ktx-parse.module.d.ts | 299 - .../jsm/libs/meshopt_decoder.module.d.ts | 19 - .../examples/jsm/libs/mikktspace.module.d.ts | 16 - .../jsm/libs/motion-controllers.module.d.ts | 64 - .../examples/jsm/libs/opentype.module.d.ts | 1094 - .../examples/jsm/libs/potpack.module.d.ts | 34 - .../examples/jsm/libs/rhino3dm/rhino3dm.d.ts | 5 - .../jsm/libs/rhino3dm/rhino3dm.module.d.ts | 2 - .../jsdoc/examples/jsm/libs/stats.module.d.ts | 18 - .../jsdoc/examples/jsm/libs/surfaceNet.d.ts | 15 - .../jsdoc/examples/jsm/libs/utif.module.d.ts | 156 - .../examples/jsm/libs/zstddec.module.d.ts | 6 - .../jsm/lighting/ClusteredLighting.d.ts | 42 - .../jsm/lighting/DynamicLighting.d.ts | 54 - .../examples/jsm/lighting/LightProbeGrid.d.ts | 142 - .../examples/jsm/lighting/TiledLighting.d.ts | 25 - .../jsm/lights/LightProbeGenerator.d.ts | 30 - .../jsm/lights/RectAreaLightTexturesLib.d.ts | 32 - .../jsm/lights/RectAreaLightUniformsLib.d.ts | 19 - .../jsdoc/examples/jsm/lines/Line2.d.ts | 44 - .../examples/jsm/lines/LineGeometry.d.ts | 58 - .../examples/jsm/lines/LineMaterial.d.ts | 89 - .../examples/jsm/lines/LineSegments2.d.ts | 60 - .../jsm/lines/LineSegmentsGeometry.d.ts | 73 - .../jsdoc/examples/jsm/lines/Wireframe.d.ts | 46 - .../jsm/lines/WireframeGeometry2.d.ts | 30 - .../examples/jsm/lines/webgpu/Line2.d.ts | 33 - .../jsm/lines/webgpu/LineSegments2.d.ts | 51 - .../examples/jsm/lines/webgpu/Wireframe.d.ts | 37 - .../jsdoc/examples/jsm/loaders/3DMLoader.d.ts | 110 - .../jsdoc/examples/jsm/loaders/3MFLoader.d.ts | 66 - .../jsdoc/examples/jsm/loaders/AMFLoader.d.ts | 43 - .../jsdoc/examples/jsm/loaders/BVHLoader.d.ts | 71 - .../examples/jsm/loaders/ColladaLoader.d.ts | 49 - .../jsdoc/examples/jsm/loaders/DDSLoader.d.ts | 30 - .../examples/jsm/loaders/DRACOLoader.d.ts | 116 - .../jsdoc/examples/jsm/loaders/EXRLoader.d.ts | 73 - .../jsdoc/examples/jsm/loaders/FBXLoader.d.ts | 52 - .../examples/jsm/loaders/FontLoader.d.ts | 75 - .../examples/jsm/loaders/GCodeLoader.d.ts | 48 - .../examples/jsm/loaders/GLTFLoader.d.ts | 395 - .../jsm/loaders/HDRCubeTextureLoader.d.ts | 58 - .../jsdoc/examples/jsm/loaders/HDRLoader.d.ts | 45 - .../jsdoc/examples/jsm/loaders/IESLoader.d.ts | 51 - .../jsdoc/examples/jsm/loaders/KMZLoader.d.ts | 38 - .../examples/jsm/loaders/KTX2Loader.d.ts | 188 - .../jsdoc/examples/jsm/loaders/KTXLoader.d.ts | 34 - .../examples/jsm/loaders/LDrawLoader.d.ts | 256 - .../examples/jsm/loaders/LUT3dlLoader.d.ts | 62 - .../examples/jsm/loaders/LUTCubeLoader.d.ts | 68 - .../examples/jsm/loaders/LUTImageLoader.d.ts | 58 - .../jsdoc/examples/jsm/loaders/LWOLoader.d.ts | 55 - .../examples/jsm/loaders/LottieLoader.d.ts | 52 - .../jsdoc/examples/jsm/loaders/MD2Loader.d.ts | 43 - .../jsdoc/examples/jsm/loaders/MDDLoader.d.ts | 71 - .../jsdoc/examples/jsm/loaders/MTLLoader.d.ts | 107 - .../examples/jsm/loaders/MaterialXLoader.d.ts | 60 - .../examples/jsm/loaders/NRRDLoader.d.ts | 46 - .../jsdoc/examples/jsm/loaders/OBJLoader.d.ts | 58 - .../jsdoc/examples/jsm/loaders/PCDLoader.d.ts | 67 - .../jsdoc/examples/jsm/loaders/PDBLoader.d.ts | 45 - .../jsdoc/examples/jsm/loaders/PLYLoader.d.ts | 76 - .../jsdoc/examples/jsm/loaders/PVRLoader.d.ts | 30 - .../examples/jsm/loaders/RGBELoader.d.ts | 3 - .../jsdoc/examples/jsm/loaders/STLLoader.d.ts | 69 - .../jsdoc/examples/jsm/loaders/SVGLoader.d.ts | 150 - .../jsdoc/examples/jsm/loaders/TDSLoader.d.ts | 141 - .../jsdoc/examples/jsm/loaders/TGALoader.d.ts | 28 - .../examples/jsm/loaders/TIFFLoader.d.ts | 28 - .../jsdoc/examples/jsm/loaders/TTFLoader.d.ts | 48 - .../jsdoc/examples/jsm/loaders/USDLoader.d.ts | 48 - .../examples/jsm/loaders/USDZLoader.d.ts | 3 - .../examples/jsm/loaders/UltraHDRLoader.d.ts | 82 - .../jsdoc/examples/jsm/loaders/VOXLoader.d.ts | 54 - .../examples/jsm/loaders/VRMLLoader.d.ts | 40 - .../jsdoc/examples/jsm/loaders/VTKLoader.d.ts | 48 - .../jsdoc/examples/jsm/loaders/XYZLoader.d.ts | 42 - .../jsm/loaders/collada/ColladaComposer.d.ts | 154 - .../jsm/loaders/collada/ColladaParser.d.ts | 234 - .../examples/jsm/loaders/lwo/IFFParser.d.ts | 121 - .../examples/jsm/loaders/lwo/LWO2Parser.d.ts | 5 - .../examples/jsm/loaders/lwo/LWO3Parser.d.ts | 5 - .../examples/jsm/loaders/usd/USDAParser.d.ts | 31 - .../examples/jsm/loaders/usd/USDCParser.d.ts | 70 - .../examples/jsm/loaders/usd/USDComposer.d.ts | 226 - .../LDrawConditionalLineMaterial.d.ts | 21 - .../LDrawConditionalLineNodeMaterial.d.ts | 34 - .../jsm/materials/WoodNodeMaterial.d.ts | 39 - .../jsdoc/examples/jsm/math/Capsule.d.ts | 82 - .../examples/jsm/math/ColorConverter.d.ts | 34 - .../jsdoc/examples/jsm/math/ColorSpaces.d.ts | 94 - .../jsdoc/examples/jsm/math/ConvexHull.d.ts | 533 - .../examples/jsm/math/ImprovedNoise.d.ts | 19 - .../jsdoc/examples/jsm/math/Lut.d.ts | 133 - .../examples/jsm/math/MeshSurfaceSampler.d.ts | 95 - .../jsdoc/examples/jsm/math/OBB.d.ts | 150 - .../jsdoc/examples/jsm/math/Octree.d.ts | 195 - .../jsdoc/examples/jsm/math/SimplexNoise.d.ts | 52 - .../jsm/misc/ConvexObjectBreaker.d.ts | 93 - .../jsdoc/examples/jsm/misc/Gyroscope.d.ts | 13 - .../jsdoc/examples/jsm/misc/MD2Character.d.ts | 133 - .../jsm/misc/MD2CharacterComplex.d.ts | 210 - .../examples/jsm/misc/MorphAnimMesh.d.ts | 55 - .../examples/jsm/misc/MorphBlendMesh.d.ts | 124 - .../jsm/misc/ProgressiveLightMap.d.ts | 87 - .../jsm/misc/ProgressiveLightMapGPU.d.ts | 83 - .../examples/jsm/misc/RollerCoaster.d.ts | 69 - .../jsdoc/examples/jsm/misc/TubePainter.d.ts | 68 - .../jsdoc/examples/jsm/misc/Volume.d.ts | 163 - .../jsdoc/examples/jsm/misc/VolumeSlice.d.ts | 99 - .../examples/jsm/modifiers/CurveModifier.d.ts | 79 - .../jsm/modifiers/CurveModifierGPU.d.ts | 37 - .../jsm/modifiers/EdgeSplitModifier.d.ts | 24 - .../jsm/modifiers/SimplifyModifier.d.ts | 26 - .../jsm/modifiers/TessellateModifier.d.ts | 43 - .../examples/jsm/objects/GroundedSkybox.d.ts | 30 - .../jsdoc/examples/jsm/objects/Lensflare.d.ts | 125 - .../examples/jsm/objects/LensflareMesh.d.ts | 59 - .../jsm/objects/ReflectorForSSRPass.d.ts | 139 - .../jsdoc/examples/jsm/objects/Refractor.d.ts | 112 - .../examples/jsm/objects/ShadowMesh.d.ts | 48 - .../jsdoc/examples/jsm/objects/Sky.d.ts | 108 - .../jsdoc/examples/jsm/objects/SkyMesh.d.ts | 127 - .../jsdoc/examples/jsm/objects/Water.d.ts | 92 - .../jsdoc/examples/jsm/objects/Water2.d.ts | 145 - .../examples/jsm/objects/Water2Mesh.d.ts | 72 - .../jsdoc/examples/jsm/objects/WaterMesh.d.ts | 127 - .../jsdoc/examples/jsm/offscreen/jank.d.ts | 2 - .../examples/jsm/offscreen/offscreen.d.ts | 1 - .../jsdoc/examples/jsm/offscreen/scene.d.ts | 2 - .../examples/jsm/physics/AmmoPhysics.d.ts | 54 - .../examples/jsm/physics/JoltPhysics.d.ts | 53 - .../examples/jsm/physics/RapierPhysics.d.ts | 98 - .../jsm/postprocessing/AfterimagePass.d.ts | 75 - .../jsm/postprocessing/BloomPass.d.ts | 79 - .../jsm/postprocessing/BokehPass.d.ts | 102 - .../jsm/postprocessing/ClearPass.d.ts | 50 - .../jsm/postprocessing/CubeTexturePass.d.ts | 61 - .../jsm/postprocessing/DotScreenPass.d.ts | 55 - .../jsm/postprocessing/EffectComposer.d.ts | 158 - .../examples/jsm/postprocessing/FXAAPass.d.ts | 25 - .../examples/jsm/postprocessing/FilmPass.d.ts | 53 - .../examples/jsm/postprocessing/GTAOPass.d.ts | 184 - .../jsm/postprocessing/GlitchPass.d.ts | 61 - .../jsm/postprocessing/HalftonePass.d.ts | 66 - .../examples/jsm/postprocessing/LUTPass.d.ts | 27 - .../examples/jsm/postprocessing/MaskPass.d.ts | 79 - .../jsm/postprocessing/OutlinePass.d.ts | 177 - .../jsm/postprocessing/OutputPass.d.ts | 56 - .../examples/jsm/postprocessing/Pass.d.ts | 115 - .../jsm/postprocessing/RenderPass.d.ts | 89 - .../postprocessing/RenderPixelatedPass.d.ts | 101 - .../postprocessing/RenderTransitionPass.d.ts | 107 - .../examples/jsm/postprocessing/SAOPass.d.ts | 97 - .../examples/jsm/postprocessing/SMAAPass.d.ts | 51 - .../jsm/postprocessing/SSAARenderPass.d.ts | 105 - .../examples/jsm/postprocessing/SSAOPass.d.ts | 137 - .../examples/jsm/postprocessing/SSRPass.d.ts | 218 - .../examples/jsm/postprocessing/SavePass.d.ts | 62 - .../jsm/postprocessing/ShaderPass.d.ts | 59 - .../jsm/postprocessing/TAARenderPass.d.ts | 59 - .../jsm/postprocessing/TexturePass.d.ts | 64 - .../jsm/postprocessing/UnrealBloomPass.d.ts | 112 - .../examples/jsm/renderers/CSS2DRenderer.d.ts | 109 - .../examples/jsm/renderers/CSS3DRenderer.d.ts | 121 - .../examples/jsm/renderers/Projector.d.ts | 75 - .../examples/jsm/renderers/SVGRenderer.d.ts | 150 - .../shaders/ACESFilmicToneMappingShader.d.ts | 15 - .../jsm/shaders/AfterimageShader.d.ts | 11 - .../examples/jsm/shaders/BasicShader.d.ts | 11 - .../jsm/shaders/BleachBypassShader.d.ts | 12 - .../examples/jsm/shaders/BlendShader.d.ts | 11 - .../examples/jsm/shaders/BokehShader.d.ts | 12 - .../examples/jsm/shaders/BokehShader2.d.ts | 28 - .../jsm/shaders/BrightnessContrastShader.d.ts | 13 - .../jsm/shaders/ColorCorrectionShader.d.ts | 11 - .../examples/jsm/shaders/ColorifyShader.d.ts | 11 - .../jsm/shaders/ConvolutionShader.d.ts | 11 - .../examples/jsm/shaders/CopyShader.d.ts | 11 - .../examples/jsm/shaders/DOFMipMapShader.d.ts | 13 - .../jsm/shaders/DepthLimitedBlurShader.d.ts | 18 - .../examples/jsm/shaders/DigitalGlitch.d.ts | 11 - .../examples/jsm/shaders/DotScreenShader.d.ts | 11 - .../examples/jsm/shaders/ExposureShader.d.ts | 11 - .../examples/jsm/shaders/FXAAShader.d.ts | 15 - .../examples/jsm/shaders/FilmShader.d.ts | 13 - .../examples/jsm/shaders/FocusShader.d.ts | 11 - .../examples/jsm/shaders/FreiChenShader.d.ts | 14 - .../examples/jsm/shaders/GTAOShader.d.ts | 31 - .../jsm/shaders/GammaCorrectionShader.d.ts | 14 - .../examples/jsm/shaders/HalftoneShader.d.ts | 16 - .../jsm/shaders/HorizontalBlurShader.d.ts | 18 - .../shaders/HorizontalTiltShiftShader.d.ts | 16 - .../jsm/shaders/HueSaturationShader.d.ts | 14 - .../examples/jsm/shaders/KaleidoShader.d.ts | 17 - .../jsm/shaders/LuminosityHighPassShader.d.ts | 11 - .../jsm/shaders/LuminosityShader.d.ts | 11 - .../examples/jsm/shaders/MirrorShader.d.ts | 13 - .../examples/jsm/shaders/NormalMapShader.d.ts | 10 - .../examples/jsm/shaders/OutputShader.d.ts | 14 - .../jsm/shaders/PoissonDenoiseShader.d.ts | 16 - .../examples/jsm/shaders/RGBShiftShader.d.ts | 17 - .../jsdoc/examples/jsm/shaders/SAOShader.d.ts | 13 - .../examples/jsm/shaders/SMAAShader.d.ts | 31 - .../examples/jsm/shaders/SSAOShader.d.ts | 30 - .../jsdoc/examples/jsm/shaders/SSRShader.d.ts | 30 - .../examples/jsm/shaders/SepiaShader.d.ts | 11 - .../jsm/shaders/SobelOperatorShader.d.ts | 13 - .../shaders/SubsurfaceScatteringShader.d.ts | 13 - .../jsm/shaders/TechnicolorShader.d.ts | 13 - .../examples/jsm/shaders/ToonShader.d.ts | 34 - .../jsm/shaders/TriangleBlurShader.d.ts | 15 - .../jsm/shaders/UnpackDepthRGBAShader.d.ts | 11 - .../examples/jsm/shaders/VelocityShader.d.ts | 11 - .../jsm/shaders/VerticalBlurShader.d.ts | 16 - .../jsm/shaders/VerticalTiltShiftShader.d.ts | 16 - .../examples/jsm/shaders/VignetteShader.d.ts | 11 - .../examples/jsm/shaders/VolumeShader.d.ts | 13 - .../jsm/shaders/WaterRefractionShader.d.ts | 11 - .../examples/jsm/textures/FlakesTexture.d.ts | 17 - .../jsdoc/examples/jsm/transpiler/AST.d.ts | 190 - .../examples/jsm/transpiler/GLSLDecoder.d.ts | 70 - .../jsdoc/examples/jsm/transpiler/Linker.d.ts | 17 - .../jsm/transpiler/ShaderToyDecoder.d.ts | 4 - .../examples/jsm/transpiler/TSLEncoder.d.ts | 29 - .../examples/jsm/transpiler/Transpiler.d.ts | 48 - .../jsm/transpiler/TranspilerUtils.d.ts | 4 - .../examples/jsm/transpiler/WGSLEncoder.d.ts | 24 - .../jsm/tsl/display/AfterImageNode.d.ts | 93 - .../jsm/tsl/display/AnaglyphPassNode.d.ts | 135 - .../jsm/tsl/display/BilateralBlurNode.d.ts | 138 - .../jsm/tsl/display/BleachBypass.d.ts | 10 - .../examples/jsm/tsl/display/BloomNode.d.ts | 238 - .../jsdoc/examples/jsm/tsl/display/CRT.d.ts | 58 - .../tsl/display/ChromaticAberrationNode.d.ts | 53 - .../examples/jsm/tsl/display/DenoiseNode.d.ts | 115 - .../jsm/tsl/display/DepthOfFieldNode.d.ts | 205 - .../jsm/tsl/display/DotScreenNode.d.ts | 44 - .../examples/jsm/tsl/display/FSR1Node.d.ts | 112 - .../examples/jsm/tsl/display/FXAANode.d.ts | 44 - .../examples/jsm/tsl/display/FilmNode.d.ts | 56 - .../examples/jsm/tsl/display/GTAONode.d.ts | 211 - .../jsm/tsl/display/GaussianBlurNode.d.ts | 168 - .../examples/jsm/tsl/display/GodraysNode.d.ts | 201 - .../jsm/tsl/display/LensflareNode.d.ts | 132 - .../examples/jsm/tsl/display/Lut3DNode.d.ts | 51 - .../examples/jsm/tsl/display/MotionBlur.d.ts | 11 - .../examples/jsm/tsl/display/OutlineNode.d.ts | 351 - .../tsl/display/ParallaxBarrierPassNode.d.ts | 26 - .../jsm/tsl/display/PixelationPassNode.d.ts | 134 - .../jsm/tsl/display/RGBShiftNode.d.ts | 45 - .../jsm/tsl/display/RetroPassNode.d.ts | 40 - .../examples/jsm/tsl/display/SMAANode.d.ts | 166 - .../jsm/tsl/display/SSAAPassNode.d.ts | 82 - .../examples/jsm/tsl/display/SSGINode.d.ts | 263 - .../examples/jsm/tsl/display/SSRNode.d.ts | 235 - .../examples/jsm/tsl/display/SSSNode.d.ts | 226 - .../jsdoc/examples/jsm/tsl/display/Sepia.d.ts | 9 - .../jsdoc/examples/jsm/tsl/display/Shape.d.ts | 12 - .../examples/jsm/tsl/display/SharpenNode.d.ts | 96 - .../jsm/tsl/display/SobelOperatorNode.d.ts | 45 - .../tsl/display/StereoCompositePassNode.d.ts | 86 - .../jsm/tsl/display/StereoPassNode.d.ts | 39 - .../examples/jsm/tsl/display/TAAUNode.d.ts | 275 - .../examples/jsm/tsl/display/TRAANode.d.ts | 239 - .../jsm/tsl/display/TransitionNode.d.ts | 65 - .../examples/jsm/tsl/display/boxBlur.d.ts | 24 - .../jsm/tsl/display/depthAwareBlend.d.ts | 17 - .../examples/jsm/tsl/display/hashBlur.d.ts | 22 - .../examples/jsm/tsl/display/radialBlur.d.ts | 20 - .../jsm/tsl/lighting/ClusteredLightsNode.d.ts | 80 - .../jsm/tsl/lighting/DynamicLightsNode.d.ts | 38 - .../jsm/tsl/lighting/TiledLightsNode.d.ts | 87 - .../lighting/data/AmbientLightDataNode.d.ts | 17 - .../data/DirectionalLightDataNode.d.ts | 24 - .../data/HemisphereLightDataNode.d.ts | 24 - .../tsl/lighting/data/PointLightDataNode.d.ts | 26 - .../tsl/lighting/data/SpotLightDataNode.d.ts | 30 - .../jsdoc/examples/jsm/tsl/math/Bayer.d.ts | 29 - .../jsm/tsl/shadows/TileShadowNode.d.ts | 115 - .../jsm/tsl/shadows/TileShadowNodeHelper.d.ts | 33 - .../jsm/tsl/utils/GroundedSkybox.d.ts | 15 - .../examples/jsm/tsl/utils/Raymarching.d.ts | 1 - .../jsm/utils/BufferGeometryUtils.d.ts | 123 - .../jsdoc/examples/jsm/utils/CameraUtils.d.ts | 14 - .../jsdoc/examples/jsm/utils/ColorUtils.d.ts | 20 - .../jsm/utils/GeometryCompressionUtils.d.ts | 23 - .../examples/jsm/utils/GeometryUtils.d.ts | 48 - .../jsdoc/examples/jsm/utils/LDrawUtils.d.ts | 17 - .../examples/jsm/utils/SceneOptimizer.d.ts | 72 - .../jsdoc/examples/jsm/utils/SceneUtils.d.ts | 72 - .../examples/jsm/utils/ShadowMapViewer.d.ts | 72 - .../jsm/utils/ShadowMapViewerGPU.d.ts | 71 - .../examples/jsm/utils/SkeletonUtils.d.ts | 97 - .../jsdoc/examples/jsm/utils/SortUtils.d.ts | 1 - .../jsdoc/examples/jsm/utils/UVsDebug.d.ts | 16 - .../examples/jsm/utils/WebGLTextureUtils.d.ts | 14 - .../jsm/utils/WebGPUTextureUtils.d.ts | 15 - .../jsdoc/examples/jsm/utils/WorkerPool.d.ts | 79 - .../jsdoc/examples/jsm/webxr/ARButton.d.ts | 22 - .../examples/jsm/webxr/OculusHandModel.d.ts | 87 - .../jsm/webxr/OculusHandPointerModel.d.ts | 151 - .../jsdoc/examples/jsm/webxr/Text2D.d.ts | 15 - .../jsdoc/examples/jsm/webxr/VRButton.d.ts | 31 - .../examples/jsm/webxr/WebGLXRFallback.d.ts | 8 - .../jsdoc/examples/jsm/webxr/XRButton.d.ts | 26 - .../jsm/webxr/XRControllerModelFactory.d.ts | 96 - .../examples/jsm/webxr/XREstimatedLight.d.ts | 44 - .../examples/jsm/webxr/XRHandMeshModel.d.ts | 44 - .../jsm/webxr/XRHandModelFactory.d.ts | 102 - .../jsm/webxr/XRHandPrimitiveModel.d.ts | 54 - .../jsdoc/examples/jsm/webxr/XRPlanes.d.ts | 22 - jsdoc-testing/jsdoc/src/Three.Core.d.ts | 162 - jsdoc-testing/jsdoc/src/Three.Legacy.d.ts | 1 - .../jsdoc/src/Three.WebGPU.Nodes.d.ts | 29 - jsdoc-testing/jsdoc/src/Three.WebGPU.d.ts | 35 - jsdoc-testing/jsdoc/src/Three.d.ts | 9 - .../jsdoc/src/animation/AnimationAction.d.ts | 311 - .../jsdoc/src/animation/AnimationClip.d.ts | 154 - .../jsdoc/src/animation/AnimationMixer.d.ts | 152 - .../src/animation/AnimationObjectGroup.d.ts | 77 - .../jsdoc/src/animation/AnimationUtils.d.ts | 131 - .../jsdoc/src/animation/KeyframeTrack.d.ts | 178 - .../jsdoc/src/animation/PropertyBinding.d.ts | 144 - .../jsdoc/src/animation/PropertyMixer.d.ts | 95 - .../tracks/BooleanKeyframeTrack.d.ts | 28 - .../animation/tracks/ColorKeyframeTrack.d.ts | 17 - .../animation/tracks/NumberKeyframeTrack.d.ts | 17 - .../tracks/QuaternionKeyframeTrack.d.ts | 18 - .../animation/tracks/StringKeyframeTrack.d.ts | 28 - .../animation/tracks/VectorKeyframeTrack.d.ts | 17 - jsdoc-testing/jsdoc/src/audio/Audio.d.ts | 379 - .../jsdoc/src/audio/AudioAnalyser.d.ts | 65 - .../jsdoc/src/audio/AudioContext.d.ts | 19 - .../jsdoc/src/audio/AudioListener.d.ts | 91 - .../jsdoc/src/audio/PositionalAudio.d.ts | 115 - .../jsdoc/src/cameras/ArrayCamera.d.ts | 42 - jsdoc-testing/jsdoc/src/cameras/Camera.d.ts | 56 - .../jsdoc/src/cameras/CubeCamera.d.ts | 74 - .../jsdoc/src/cameras/OrthographicCamera.d.ts | 122 - .../jsdoc/src/cameras/PerspectiveCamera.d.ts | 216 - .../jsdoc/src/cameras/StereoCamera.d.ts | 61 - jsdoc-testing/jsdoc/src/constants.d.ts | 1592 -- .../jsdoc/src/core/BufferAttribute.d.ts | 487 - .../jsdoc/src/core/BufferGeometry.d.ts | 391 - jsdoc-testing/jsdoc/src/core/Clock.d.ts | 73 - .../jsdoc/src/core/EventDispatcher.d.ts | 53 - .../jsdoc/src/core/GLBufferAttribute.d.ts | 122 - .../src/core/InstancedBufferAttribute.d.ts | 36 - .../src/core/InstancedBufferGeometry.d.ts | 22 - .../src/core/InstancedInterleavedBuffer.d.ts | 35 - .../jsdoc/src/core/InterleavedBuffer.d.ts | 153 - .../src/core/InterleavedBufferAttribute.d.ts | 226 - jsdoc-testing/jsdoc/src/core/Layers.d.ts | 68 - jsdoc-testing/jsdoc/src/core/Object3D.d.ts | 584 - jsdoc-testing/jsdoc/src/core/Raycaster.d.ts | 145 - .../jsdoc/src/core/RenderTarget.d.ts | 207 - .../jsdoc/src/core/RenderTarget3D.d.ts | 25 - jsdoc-testing/jsdoc/src/core/Timer.d.ts | 86 - jsdoc-testing/jsdoc/src/core/Uniform.d.ts | 34 - .../jsdoc/src/core/UniformsGroup.d.ts | 87 - jsdoc-testing/jsdoc/src/extras/Controls.d.ts | 93 - jsdoc-testing/jsdoc/src/extras/DataUtils.d.ts | 39 - jsdoc-testing/jsdoc/src/extras/Earcut.d.ts | 18 - .../jsdoc/src/extras/ImageUtils.d.ts | 22 - .../jsdoc/src/extras/PMREMGenerator.d.ts | 556 - .../jsdoc/src/extras/ShapeUtils.d.ts | 29 - .../jsdoc/src/extras/TextureUtils.d.ts | 81 - .../jsdoc/src/extras/core/Curve.d.ts | 170 - .../jsdoc/src/extras/core/CurvePath.d.ts | 56 - .../jsdoc/src/extras/core/Interpolations.d.ts | 39 - jsdoc-testing/jsdoc/src/extras/core/Path.d.ts | 151 - .../jsdoc/src/extras/core/Shape.d.ts | 76 - .../jsdoc/src/extras/core/ShapePath.d.ts | 93 - .../jsdoc/src/extras/curves/ArcCurve.d.ts | 27 - .../src/extras/curves/CatmullRomCurve3.d.ts | 83 - .../src/extras/curves/CubicBezierCurve.d.ts | 78 - .../src/extras/curves/CubicBezierCurve3.d.ts | 61 - .../jsdoc/src/extras/curves/Curves.d.ts | 10 - .../jsdoc/src/extras/curves/EllipseCurve.d.ts | 117 - .../jsdoc/src/extras/curves/LineCurve.d.ts | 50 - .../jsdoc/src/extras/curves/LineCurve3.d.ts | 50 - .../extras/curves/QuadraticBezierCurve.d.ts | 70 - .../extras/curves/QuadraticBezierCurve3.d.ts | 54 - .../jsdoc/src/extras/curves/SplineCurve.d.ts | 59 - .../jsdoc/src/extras/lib/earcut.d.ts | 7 - .../jsdoc/src/geometries/BoxGeometry.d.ts | 46 - .../jsdoc/src/geometries/CapsuleGeometry.d.ts | 43 - .../jsdoc/src/geometries/CircleGeometry.d.ts | 48 - .../jsdoc/src/geometries/ConeGeometry.d.ts | 29 - .../src/geometries/CylinderGeometry.d.ts | 47 - .../src/geometries/DodecahedronGeometry.d.ts | 23 - .../jsdoc/src/geometries/EdgesGeometry.d.ts | 34 - .../jsdoc/src/geometries/ExtrudeGeometry.d.ts | 97 - .../jsdoc/src/geometries/Geometries.d.ts | 21 - .../src/geometries/IcosahedronGeometry.d.ts | 23 - .../jsdoc/src/geometries/LatheGeometry.d.ts | 50 - .../src/geometries/OctahedronGeometry.d.ts | 23 - .../jsdoc/src/geometries/PlaneGeometry.d.ts | 42 - .../src/geometries/PolyhedronGeometry.d.ts | 36 - .../jsdoc/src/geometries/RingGeometry.d.ts | 44 - .../jsdoc/src/geometries/ShapeGeometry.d.ts | 47 - .../jsdoc/src/geometries/SphereGeometry.d.ts | 45 - .../src/geometries/TetrahedronGeometry.d.ts | 23 - .../jsdoc/src/geometries/TorusGeometry.d.ts | 45 - .../src/geometries/TorusKnotGeometry.d.ts | 46 - .../jsdoc/src/geometries/TubeGeometry.d.ts | 60 - .../src/geometries/WireframeGeometry.d.ts | 38 - .../jsdoc/src/helpers/ArrowHelper.d.ts | 75 - .../jsdoc/src/helpers/AxesHelper.d.ts | 35 - .../jsdoc/src/helpers/Box3Helper.d.ts | 35 - .../jsdoc/src/helpers/BoxHelper.d.ts | 44 - .../jsdoc/src/helpers/CameraHelper.d.ts | 64 - .../src/helpers/DirectionalLightHelper.d.ts | 68 - .../jsdoc/src/helpers/GridHelper.d.ts | 32 - .../src/helpers/HemisphereLightHelper.d.ts | 55 - .../jsdoc/src/helpers/PlaneHelper.d.ts | 41 - .../jsdoc/src/helpers/PointLightHelper.d.ts | 52 - .../jsdoc/src/helpers/PolarGridHelper.d.ts | 36 - .../jsdoc/src/helpers/SkeletonHelper.d.ts | 56 - .../jsdoc/src/helpers/SpotLightHelper.d.ts | 54 - .../jsdoc/src/lights/AmbientLight.d.ts | 30 - .../jsdoc/src/lights/DirectionalLight.d.ts | 67 - .../src/lights/DirectionalLightShadow.d.ts | 20 - .../jsdoc/src/lights/HemisphereLight.d.ts | 40 - jsdoc-testing/jsdoc/src/lights/Light.d.ts | 47 - .../jsdoc/src/lights/LightProbe.d.ts | 45 - .../jsdoc/src/lights/LightShadow.d.ts | 198 - .../jsdoc/src/lights/PointLight.d.ts | 70 - .../jsdoc/src/lights/PointLightShadow.d.ts | 20 - .../jsdoc/src/lights/RectAreaLight.d.ts | 68 - jsdoc-testing/jsdoc/src/lights/SpotLight.d.ts | 116 - .../jsdoc/src/lights/SpotLightShadow.d.ts | 37 - .../jsdoc/src/lights/webgpu/IESSpotLight.d.ts | 18 - .../src/lights/webgpu/ProjectorLight.d.ts | 17 - .../jsdoc/src/loaders/AnimationLoader.d.ts | 32 - .../jsdoc/src/loaders/AudioLoader.d.ts | 30 - .../src/loaders/BufferGeometryLoader.d.ts | 35 - .../src/loaders/CompressedTextureLoader.d.ts | 61 - .../jsdoc/src/loaders/CubeTextureLoader.d.ts | 45 - .../jsdoc/src/loaders/DataTextureLoader.d.ts | 92 - .../jsdoc/src/loaders/FileLoader.d.ts | 68 - .../jsdoc/src/loaders/ImageBitmapLoader.d.ts | 79 - .../jsdoc/src/loaders/ImageLoader.d.ts | 29 - jsdoc-testing/jsdoc/src/loaders/Loader.d.ts | 141 - .../jsdoc/src/loaders/LoaderUtils.d.ts | 22 - .../jsdoc/src/loaders/MaterialLoader.d.ts | 63 - .../jsdoc/src/loaders/ObjectLoader.d.ts | 91 - .../jsdoc/src/loaders/TextureLoader.d.ts | 33 - .../jsdoc/src/loaders/nodes/NodeLoader.d.ts | 84 - .../src/loaders/nodes/NodeMaterialLoader.d.ts | 57 - .../src/loaders/nodes/NodeObjectLoader.d.ts | 96 - .../src/materials/LineBasicMaterial.d.ts | 86 - .../src/materials/LineDashedMaterial.d.ts | 49 - .../jsdoc/src/materials/Material.d.ts | 497 - .../jsdoc/src/materials/Materials.d.ts | 19 - .../src/materials/MeshBasicMaterial.d.ts | 184 - .../src/materials/MeshDepthMaterial.d.ts | 106 - .../src/materials/MeshDistanceMaterial.d.ts | 86 - .../src/materials/MeshLambertMaterial.d.ts | 307 - .../src/materials/MeshMatcapMaterial.d.ts | 182 - .../src/materials/MeshNormalMaterial.d.ts | 129 - .../src/materials/MeshPhongMaterial.d.ts | 322 - .../src/materials/MeshPhysicalMaterial.d.ts | 310 - .../src/materials/MeshStandardMaterial.d.ts | 328 - .../jsdoc/src/materials/MeshToonMaterial.d.ts | 244 - .../jsdoc/src/materials/PointsMaterial.d.ts | 102 - .../src/materials/RawShaderMaterial.d.ts | 108 - .../jsdoc/src/materials/ShaderMaterial.d.ts | 256 - .../jsdoc/src/materials/ShadowMaterial.d.ts | 56 - .../jsdoc/src/materials/SpriteMaterial.d.ts | 89 - .../materials/nodes/Line2NodeMaterial.d.ts | 93 - .../nodes/LineBasicNodeMaterial.d.ts | 23 - .../nodes/LineDashedNodeMaterial.d.ts | 78 - .../nodes/MeshBasicNodeMaterial.d.ts | 39 - .../nodes/MeshLambertNodeMaterial.d.ts | 39 - .../nodes/MeshMatcapNodeMaterial.d.ts | 29 - .../nodes/MeshNormalNodeMaterial.d.ts | 28 - .../nodes/MeshPhongNodeMaterial.d.ts | 64 - .../nodes/MeshPhysicalNodeMaterial.d.ts | 276 - .../materials/nodes/MeshSSSNodeMaterial.d.ts | 96 - .../nodes/MeshStandardNodeMaterial.d.ts | 81 - .../materials/nodes/MeshToonNodeMaterial.d.ts | 30 - .../src/materials/nodes/NodeMaterial.d.ts | 505 - .../src/materials/nodes/NodeMaterials.d.ts | 18 - .../materials/nodes/PointsNodeMaterial.d.ts | 49 - .../materials/nodes/ShadowNodeMaterial.d.ts | 30 - .../materials/nodes/SpriteNodeMaterial.d.ts | 62 - .../materials/nodes/VolumeNodeMaterial.d.ts | 48 - .../nodes/manager/NodeMaterialObserver.d.ts | 131 - jsdoc-testing/jsdoc/src/math/Box2.d.ts | 205 - jsdoc-testing/jsdoc/src/math/Box3.d.ts | 298 - jsdoc-testing/jsdoc/src/math/Color.d.ts | 538 - .../jsdoc/src/math/ColorManagement.d.ts | 21 - jsdoc-testing/jsdoc/src/math/Cylindrical.d.ts | 74 - jsdoc-testing/jsdoc/src/math/Euler.d.ts | 164 - jsdoc-testing/jsdoc/src/math/Frustum.d.ts | 100 - .../jsdoc/src/math/FrustumArray.d.ts | 64 - jsdoc-testing/jsdoc/src/math/Interpolant.d.ts | 114 - jsdoc-testing/jsdoc/src/math/Line3.d.ts | 120 - jsdoc-testing/jsdoc/src/math/MathUtils.d.ts | 224 - jsdoc-testing/jsdoc/src/math/Matrix2.d.ts | 70 - jsdoc-testing/jsdoc/src/math/Matrix3.d.ts | 251 - jsdoc-testing/jsdoc/src/math/Matrix4.d.ts | 404 - jsdoc-testing/jsdoc/src/math/Plane.d.ts | 190 - jsdoc-testing/jsdoc/src/math/Quaternion.d.ts | 310 - jsdoc-testing/jsdoc/src/math/Ray.d.ts | 185 - jsdoc-testing/jsdoc/src/math/Sphere.d.ts | 185 - jsdoc-testing/jsdoc/src/math/Spherical.d.ts | 81 - .../jsdoc/src/math/SphericalHarmonics3.d.ts | 131 - jsdoc-testing/jsdoc/src/math/Triangle.d.ts | 231 - jsdoc-testing/jsdoc/src/math/Vector2.d.ts | 440 - jsdoc-testing/jsdoc/src/math/Vector3.d.ts | 613 - jsdoc-testing/jsdoc/src/math/Vector4.d.ts | 443 - .../math/interpolants/BezierInterpolant.d.ts | 21 - .../math/interpolants/CubicInterpolant.d.ts | 22 - .../interpolants/DiscreteInterpolant.d.ts | 10 - .../math/interpolants/LinearInterpolant.d.ts | 9 - .../QuaternionLinearInterpolant.d.ts | 9 - jsdoc-testing/jsdoc/src/nodes/Nodes.d.ts | 141 - jsdoc-testing/jsdoc/src/nodes/TSL.d.ts | 138 - .../src/nodes/accessors/AccessorsUtils.d.ts | 23 - .../jsdoc/src/nodes/accessors/Arrays.d.ts | 2 - .../jsdoc/src/nodes/accessors/BatchNode.d.ts | 47 - .../jsdoc/src/nodes/accessors/Bitangent.d.ts | 28 - .../nodes/accessors/BufferAttributeNode.d.ts | 143 - .../jsdoc/src/nodes/accessors/BufferNode.d.ts | 75 - .../src/nodes/accessors/BuiltinNode.d.ts | 40 - .../jsdoc/src/nodes/accessors/Camera.d.ts | 70 - .../src/nodes/accessors/ClippingNode.d.ts | 65 - .../src/nodes/accessors/CubeTextureNode.d.ts | 48 - .../src/nodes/accessors/InstanceNode.d.ts | 131 - .../nodes/accessors/InstancedMeshNode.d.ts | 31 - .../jsdoc/src/nodes/accessors/Lights.d.ts | 48 - .../src/nodes/accessors/MaterialNode.d.ts | 384 - .../nodes/accessors/MaterialProperties.d.ts | 24 - .../accessors/MaterialReferenceNode.d.ts | 41 - .../jsdoc/src/nodes/accessors/ModelNode.d.ts | 104 - .../accessors/ModelViewProjectionNode.d.ts | 7 - .../jsdoc/src/nodes/accessors/MorphNode.d.ts | 49 - .../jsdoc/src/nodes/accessors/Normal.d.ts | 100 - .../src/nodes/accessors/Object3DNode.d.ts | 128 - .../src/nodes/accessors/PointUVNode.d.ts | 33 - .../jsdoc/src/nodes/accessors/Position.d.ts | 57 - .../nodes/accessors/ReferenceBaseNode.d.ts | 181 - .../src/nodes/accessors/ReferenceNode.d.ts | 197 - .../src/nodes/accessors/ReflectVector.d.ts | 28 - .../accessors/RendererReferenceNode.d.ts | 33 - .../src/nodes/accessors/SceneProperties.d.ts | 21 - .../src/nodes/accessors/SkinningNode.d.ts | 122 - .../nodes/accessors/StorageBufferNode.d.ts | 183 - .../nodes/accessors/StorageTexture3DNode.d.ts | 36 - .../nodes/accessors/StorageTextureNode.d.ts | 146 - .../jsdoc/src/nodes/accessors/Tangent.d.ts | 28 - .../src/nodes/accessors/TangentUtils.d.ts | 20 - .../src/nodes/accessors/Texture3DNode.d.ts | 54 - .../src/nodes/accessors/TextureBicubic.d.ts | 20 - .../src/nodes/accessors/TextureNode.d.ts | 354 - .../src/nodes/accessors/TextureSizeNode.d.ts | 50 - .../jsdoc/src/nodes/accessors/UV.d.ts | 1 - .../src/nodes/accessors/UniformArrayNode.d.ts | 125 - .../src/nodes/accessors/UserDataNode.d.ts | 35 - .../src/nodes/accessors/VelocityNode.d.ts | 79 - .../src/nodes/accessors/VertexColorNode.d.ts | 31 - .../jsdoc/src/nodes/code/CodeNode.d.ts | 79 - .../jsdoc/src/nodes/code/ExpressionNode.d.ts | 35 - .../src/nodes/code/FunctionCallNode.d.ts | 70 - .../jsdoc/src/nodes/code/FunctionNode.d.ts | 70 - .../jsdoc/src/nodes/core/ArrayNode.d.ts | 76 - .../jsdoc/src/nodes/core/AssignNode.d.ts | 65 - .../jsdoc/src/nodes/core/AttributeNode.d.ts | 41 - .../jsdoc/src/nodes/core/BypassNode.d.ts | 54 - .../jsdoc/src/nodes/core/ConstNode.d.ts | 25 - .../jsdoc/src/nodes/core/ContextNode.d.ts | 107 - .../jsdoc/src/nodes/core/IndexNode.d.ts | 88 - .../jsdoc/src/nodes/core/InputNode.d.ts | 61 - .../jsdoc/src/nodes/core/InspectorNode.d.ts | 57 - .../jsdoc/src/nodes/core/IsolateNode.d.ts | 55 - .../jsdoc/src/nodes/core/LightingModel.d.ts | 59 - .../jsdoc/src/nodes/core/MRTNode.d.ts | 106 - jsdoc-testing/jsdoc/src/nodes/core/Node.d.ts | 437 - .../jsdoc/src/nodes/core/NodeAttribute.d.ts | 44 - .../jsdoc/src/nodes/core/NodeBuilder.d.ts | 1335 - .../jsdoc/src/nodes/core/NodeCache.d.ts | 47 - .../jsdoc/src/nodes/core/NodeCode.d.ts | 36 - .../jsdoc/src/nodes/core/NodeError.d.ts | 13 - .../jsdoc/src/nodes/core/NodeFrame.d.ts | 133 - .../jsdoc/src/nodes/core/NodeFunction.d.ts | 55 - .../src/nodes/core/NodeFunctionInput.d.ts | 52 - .../jsdoc/src/nodes/core/NodeParser.d.ts | 15 - .../jsdoc/src/nodes/core/NodeUniform.d.ts | 62 - .../jsdoc/src/nodes/core/NodeUtils.d.ts | 93 - .../jsdoc/src/nodes/core/NodeVar.d.ts | 50 - .../jsdoc/src/nodes/core/NodeVarying.d.ts | 51 - .../src/nodes/core/OutputStructNode.d.ts | 41 - .../jsdoc/src/nodes/core/ParameterNode.d.ts | 35 - .../jsdoc/src/nodes/core/PropertyNode.d.ts | 254 - .../jsdoc/src/nodes/core/StackNode.d.ts | 151 - .../jsdoc/src/nodes/core/StackTrace.d.ts | 44 - .../jsdoc/src/nodes/core/StructNode.d.ts | 33 - .../jsdoc/src/nodes/core/StructType.d.ts | 7 - .../jsdoc/src/nodes/core/StructTypeNode.d.ts | 49 - .../jsdoc/src/nodes/core/SubBuildNode.d.ts | 30 - .../jsdoc/src/nodes/core/TempNode.d.ts | 28 - .../src/nodes/core/UniformGroupNode.d.ts | 77 - .../jsdoc/src/nodes/core/UniformNode.d.ts | 65 - .../jsdoc/src/nodes/core/VarNode.d.ts | 88 - .../jsdoc/src/nodes/core/VaryingNode.d.ts | 80 - .../jsdoc/src/nodes/core/constants.d.ts | 30 - .../jsdoc/src/nodes/display/BlendModes.d.ts | 67 - .../jsdoc/src/nodes/display/BumpMapNode.d.ts | 44 - .../src/nodes/display/ColorAdjustment.d.ts | 76 - .../nodes/display/ColorSpaceFunctions.d.ts | 18 - .../src/nodes/display/ColorSpaceNode.d.ts | 50 - .../src/nodes/display/FrontFacingNode.d.ts | 48 - .../src/nodes/display/NormalMapNode.d.ts | 58 - .../jsdoc/src/nodes/display/PassNode.d.ts | 403 - .../display/PremultiplyAlphaFunctions.d.ts | 28 - .../src/nodes/display/RenderOutputNode.d.ts | 79 - .../jsdoc/src/nodes/display/ScreenNode.d.ts | 127 - .../nodes/display/ToneMappingFunctions.d.ts | 68 - .../src/nodes/display/ToneMappingNode.d.ts | 60 - .../nodes/display/ToonOutlinePassNode.d.ts | 71 - .../src/nodes/display/ViewportDepthNode.d.ts | 105 - .../display/ViewportDepthTextureNode.d.ts | 31 - .../display/ViewportSharedTextureNode.d.ts | 37 - .../nodes/display/ViewportTextureNode.d.ts | 89 - jsdoc-testing/jsdoc/src/nodes/fog/Fog.d.ts | 38 - .../src/nodes/functions/BSDF/BRDF_GGX.d.ts | 2 - .../functions/BSDF/BRDF_GGX_Multiscatter.d.ts | 2 - .../nodes/functions/BSDF/BRDF_Lambert.d.ts | 2 - .../src/nodes/functions/BSDF/BRDF_Sheen.d.ts | 2 - .../src/nodes/functions/BSDF/DFGLUT.d.ts | 2 - .../jsdoc/src/nodes/functions/BSDF/D_GGX.d.ts | 2 - .../functions/BSDF/D_GGX_Anisotropic.d.ts | 2 - .../nodes/functions/BSDF/EnvironmentBRDF.d.ts | 2 - .../src/nodes/functions/BSDF/F_Schlick.d.ts | 2 - .../jsdoc/src/nodes/functions/BSDF/LTC.d.ts | 3 - .../nodes/functions/BSDF/Schlick_to_F0.d.ts | 2 - .../functions/BSDF/V_GGX_SmithCorrelated.d.ts | 2 - .../V_GGX_SmithCorrelated_Anisotropic.d.ts | 2 - .../nodes/functions/BasicLightingModel.d.ts | 23 - .../nodes/functions/PhongLightingModel.d.ts | 31 - .../functions/PhysicalLightingModel.d.ts | 171 - .../src/nodes/functions/ShadowMaskModel.d.ts | 27 - .../nodes/functions/ToonLightingModel.d.ts | 23 - .../functions/VolumetricLightingModel.d.ts | 25 - .../material/getAlphaHashThreshold.d.ts | 2 - .../material/getGeometryRoughness.d.ts | 2 - .../material/getParallaxCorrectNormal.d.ts | 19 - .../functions/material/getRoughness.d.ts | 2 - .../functions/material/getShIrradianceAt.d.ts | 2 - .../jsdoc/src/nodes/geometry/RangeNode.d.ts | 68 - .../src/nodes/gpgpu/AtomicFunctionNode.d.ts | 78 - .../jsdoc/src/nodes/gpgpu/BarrierNode.d.ts | 24 - .../src/nodes/gpgpu/ComputeBuiltinNode.d.ts | 135 - .../jsdoc/src/nodes/gpgpu/ComputeNode.d.ts | 96 - .../src/nodes/gpgpu/SubgroupFunctionNode.d.ts | 303 - .../src/nodes/gpgpu/WorkgroupInfoNode.d.ts | 119 - .../jsdoc/src/nodes/lighting/AONode.d.ts | 25 - .../src/nodes/lighting/AmbientLightNode.d.ts | 12 - .../src/nodes/lighting/AnalyticLightNode.d.ts | 127 - .../nodes/lighting/BasicEnvironmentNode.d.ts | 26 - .../src/nodes/lighting/BasicLightMapNode.d.ts | 24 - .../nodes/lighting/DirectionalLightNode.d.ts | 13 - .../src/nodes/lighting/EnvironmentNode.d.ts | 33 - .../nodes/lighting/HemisphereLightNode.d.ts | 34 - .../src/nodes/lighting/IESSpotLightNode.d.ts | 16 - .../src/nodes/lighting/IrradianceNode.d.ts | 24 - .../src/nodes/lighting/LightProbeNode.d.ts | 22 - .../jsdoc/src/nodes/lighting/LightUtils.d.ts | 11 - .../nodes/lighting/LightingContextNode.d.ts | 83 - .../src/nodes/lighting/LightingNode.d.ts | 21 - .../jsdoc/src/nodes/lighting/LightsNode.d.ts | 119 - .../src/nodes/lighting/PointLightNode.d.ts | 40 - .../src/nodes/lighting/PointShadowNode.d.ts | 52 - .../nodes/lighting/ProjectorLightNode.d.ts | 17 - .../src/nodes/lighting/RectAreaLightNode.d.ts | 41 - .../src/nodes/lighting/ShadowBaseNode.d.ts | 46 - .../src/nodes/lighting/ShadowFilterNode.d.ts | 50 - .../jsdoc/src/nodes/lighting/ShadowNode.d.ts | 193 - .../src/nodes/lighting/SpotLightNode.d.ts | 52 - .../src/nodes/materialx/MaterialXNodes.d.ts | 44 - .../jsdoc/src/nodes/materialx/lib/mx_hsv.d.ts | 2 - .../src/nodes/materialx/lib/mx_noise.d.ts | 70 - .../materialx/lib/mx_transform_color.d.ts | 1 - .../jsdoc/src/nodes/math/BitcastNode.d.ts | 62 - .../jsdoc/src/nodes/math/BitcountNode.d.ts | 111 - .../jsdoc/src/nodes/math/ConditionalNode.d.ts | 65 - jsdoc-testing/jsdoc/src/nodes/math/Hash.d.ts | 9 - .../jsdoc/src/nodes/math/MathNode.d.ts | 701 - .../jsdoc/src/nodes/math/MathUtils.d.ts | 4 - .../jsdoc/src/nodes/math/OperatorNode.d.ts | 312 - .../jsdoc/src/nodes/math/PackFloatNode.d.ts | 66 - .../jsdoc/src/nodes/math/TriNoise3D.d.ts | 11 - .../jsdoc/src/nodes/math/UnpackFloatNode.d.ts | 64 - .../src/nodes/parsers/GLSLNodeFunction.d.ts | 25 - .../src/nodes/parsers/GLSLNodeParser.d.ts | 17 - .../jsdoc/src/nodes/pmrem/PMREMNode.d.ts | 113 - .../jsdoc/src/nodes/pmrem/PMREMUtils.d.ts | 4 - .../jsdoc/src/nodes/procedural/Checker.d.ts | 9 - .../jsdoc/src/nodes/shapes/Shapes.d.ts | 9 - .../jsdoc/src/nodes/tsl/TSLBase.d.ts | 26 - .../jsdoc/src/nodes/tsl/TSLCore.d.ts | 75 - .../src/nodes/utils/ArrayElementNode.d.ts | 53 - .../jsdoc/src/nodes/utils/ConvertNode.d.ts | 41 - .../jsdoc/src/nodes/utils/CubeMapNode.d.ts | 57 - .../jsdoc/src/nodes/utils/DebugNode.d.ts | 12 - .../jsdoc/src/nodes/utils/Discard.d.ts | 2 - .../jsdoc/src/nodes/utils/EquirectUV.d.ts | 17 - .../jsdoc/src/nodes/utils/EventNode.d.ts | 34 - .../jsdoc/src/nodes/utils/FlipNode.d.ts | 46 - .../nodes/utils/FunctionOverloadingNode.d.ts | 60 - .../jsdoc/src/nodes/utils/JoinNode.d.ts | 33 - .../jsdoc/src/nodes/utils/LoopNode.d.ts | 67 - .../jsdoc/src/nodes/utils/MatcapUV.d.ts | 11 - .../src/nodes/utils/MaxMipLevelNode.d.ts | 51 - .../jsdoc/src/nodes/utils/MemberNode.d.ts | 41 - .../jsdoc/src/nodes/utils/Oscillators.d.ts | 4 - .../jsdoc/src/nodes/utils/Packing.d.ts | 3 - .../src/nodes/utils/PostProcessingUtils.d.ts | 66 - .../jsdoc/src/nodes/utils/RTTNode.d.ts | 129 - .../jsdoc/src/nodes/utils/ReflectorNode.d.ts | 233 - .../jsdoc/src/nodes/utils/Remap.d.ts | 30 - .../jsdoc/src/nodes/utils/RotateNode.d.ts | 49 - .../jsdoc/src/nodes/utils/SampleNode.d.ts | 46 - .../jsdoc/src/nodes/utils/SetNode.d.ts | 49 - .../jsdoc/src/nodes/utils/SplitNode.d.ts | 65 - .../jsdoc/src/nodes/utils/SpriteSheetUV.d.ts | 17 - .../jsdoc/src/nodes/utils/SpriteUtils.d.ts | 17 - .../nodes/utils/StorageArrayElementNode.d.ts | 51 - .../jsdoc/src/nodes/utils/Timer.d.ts | 21 - .../src/nodes/utils/TriplanarTextures.d.ts | 21 - .../jsdoc/src/nodes/utils/UVUtils.d.ts | 42 - .../jsdoc/src/nodes/utils/ViewportUtils.d.ts | 13 - .../jsdoc/src/objects/BatchedMesh.d.ts | 366 - jsdoc-testing/jsdoc/src/objects/Bone.d.ts | 26 - .../jsdoc/src/objects/ClippingGroup.d.ts | 50 - jsdoc-testing/jsdoc/src/objects/Group.d.ts | 29 - .../jsdoc/src/objects/InstancedMesh.d.ts | 151 - jsdoc-testing/jsdoc/src/objects/LOD.d.ts | 103 - jsdoc-testing/jsdoc/src/objects/Line.d.ts | 94 - jsdoc-testing/jsdoc/src/objects/LineLoop.d.ts | 25 - .../jsdoc/src/objects/LineSegments.d.ts | 24 - jsdoc-testing/jsdoc/src/objects/Mesh.d.ts | 97 - jsdoc-testing/jsdoc/src/objects/Points.d.ts | 71 - jsdoc-testing/jsdoc/src/objects/Skeleton.d.ts | 134 - .../jsdoc/src/objects/SkinnedMesh.d.ts | 118 - jsdoc-testing/jsdoc/src/objects/Sprite.d.ts | 75 - .../src/renderers/WebGL3DRenderTarget.d.ts | 25 - .../src/renderers/WebGLArrayRenderTarget.d.ts | 25 - .../src/renderers/WebGLCubeRenderTarget.d.ts | 40 - .../src/renderers/WebGLRenderTarget.d.ts | 16 - .../jsdoc/src/renderers/WebGLRenderer.d.ts | 580 - .../jsdoc/src/renderers/common/Animation.d.ts | 92 - .../src/renderers/common/Attributes.d.ts | 52 - .../jsdoc/src/renderers/common/Backend.d.ts | 554 - .../src/renderers/common/Background.d.ts | 40 - .../jsdoc/src/renderers/common/BindGroup.d.ts | 36 - .../jsdoc/src/renderers/common/Binding.d.ts | 49 - .../jsdoc/src/renderers/common/Bindings.d.ts | 120 - .../jsdoc/src/renderers/common/BlendMode.d.ts | 109 - .../jsdoc/src/renderers/common/Buffer.d.ts | 91 - .../src/renderers/common/BufferUtils.d.ts | 28 - .../src/renderers/common/BundleGroup.d.ts | 40 - .../src/renderers/common/CanvasTarget.d.ts | 189 - .../jsdoc/src/renderers/common/ChainMap.d.ts | 48 - .../src/renderers/common/ClippingContext.d.ts | 122 - .../jsdoc/src/renderers/common/Color4.d.ts | 49 - .../src/renderers/common/ComputePipeline.d.ts | 31 - .../jsdoc/src/renderers/common/Constants.d.ts | 9 - .../renderers/common/CubeRenderTarget.d.ts | 42 - .../jsdoc/src/renderers/common/DataMap.d.ts | 41 - .../src/renderers/common/Geometries.d.ts | 103 - .../IndirectStorageBufferAttribute.d.ts | 29 - .../jsdoc/src/renderers/common/Info.d.ts | 211 - .../src/renderers/common/InspectorBase.d.ts | 109 - .../jsdoc/src/renderers/common/Lighting.d.ts | 28 - .../jsdoc/src/renderers/common/Pipeline.d.ts | 28 - .../jsdoc/src/renderers/common/Pipelines.d.ts | 174 - .../src/renderers/common/PostProcessing.d.ts | 17 - .../renderers/common/ProgrammableStage.d.ts | 64 - .../jsdoc/src/renderers/common/QuadMesh.d.ts | 52 - .../src/renderers/common/ReadbackBuffer.d.ts | 55 - .../src/renderers/common/RenderBundle.d.ts | 20 - .../src/renderers/common/RenderBundles.d.ts | 29 - .../src/renderers/common/RenderContext.d.ts | 221 - .../src/renderers/common/RenderContexts.d.ts | 42 - .../src/renderers/common/RenderList.d.ts | 169 - .../src/renderers/common/RenderLists.d.ts | 41 - .../src/renderers/common/RenderObject.d.ts | 409 - .../common/RenderObjectPipeline.d.ts | 30 - .../src/renderers/common/RenderObjects.d.ts | 108 - .../src/renderers/common/RenderPipeline.d.ts | 126 - .../jsdoc/src/renderers/common/Renderer.d.ts | 1422 - .../src/renderers/common/RendererUtils.d.ts | 105 - .../src/renderers/common/SampledTexture.d.ts | 85 - .../jsdoc/src/renderers/common/Sampler.d.ts | 76 - .../renderers/common/Storage3DTexture.d.ts | 52 - .../renderers/common/StorageArrayTexture.d.ts | 38 - .../src/renderers/common/StorageBuffer.d.ts | 38 - .../common/StorageBufferAttribute.d.ts | 35 - .../StorageInstancedBufferAttribute.d.ts | 35 - .../src/renderers/common/StorageTexture.d.ts | 43 - .../jsdoc/src/renderers/common/Textures.d.ts | 117 - .../renderers/common/TimestampQueryPool.d.ts | 119 - .../jsdoc/src/renderers/common/Uniform.d.ts | 260 - .../src/renderers/common/UniformBuffer.d.ts | 18 - .../src/renderers/common/UniformsGroup.d.ts | 147 - .../jsdoc/src/renderers/common/XRManager.d.ts | 596 - .../src/renderers/common/XRRenderTarget.d.ts | 66 - .../common/extras/PMREMGenerator.d.ts | 198 - .../common/nodes/NodeBuilderState.d.ts | 105 - .../renderers/common/nodes/NodeLibrary.d.ts | 99 - .../renderers/common/nodes/NodeManager.d.ts | 287 - .../common/nodes/NodeSampledTexture.d.ts | 72 - .../renderers/common/nodes/NodeSampler.d.ts | 31 - .../common/nodes/NodeStorageBuffer.d.ts | 36 - .../renderers/common/nodes/NodeUniform.d.ts | 230 - .../common/nodes/NodeUniformBuffer.d.ts | 56 - .../common/nodes/NodeUniformsGroup.d.ts | 38 - .../src/renderers/shaders/DFGLUTData.d.ts | 1 - .../src/renderers/shaders/ShaderChunk.d.ts | 252 - .../ShaderChunk/alphahash_fragment.glsl.d.ts | 2 - .../alphahash_pars_fragment.glsl.d.ts | 2 - .../ShaderChunk/alphamap_fragment.glsl.d.ts | 2 - .../alphamap_pars_fragment.glsl.d.ts | 2 - .../ShaderChunk/alphatest_fragment.glsl.d.ts | 2 - .../alphatest_pars_fragment.glsl.d.ts | 2 - .../ShaderChunk/aomap_fragment.glsl.d.ts | 2 - .../ShaderChunk/aomap_pars_fragment.glsl.d.ts | 2 - .../batching_pars_vertex.glsl.d.ts | 2 - .../ShaderChunk/batching_vertex.glsl.d.ts | 2 - .../ShaderChunk/begin_vertex.glsl.d.ts | 2 - .../ShaderChunk/beginnormal_vertex.glsl.d.ts | 2 - .../shaders/ShaderChunk/bsdfs.glsl.d.ts | 2 - .../bumpmap_pars_fragment.glsl.d.ts | 2 - .../clearcoat_normal_fragment_begin.glsl.d.ts | 2 - .../clearcoat_normal_fragment_maps.glsl.d.ts | 2 - .../clearcoat_pars_fragment.glsl.d.ts | 2 - .../clipping_planes_fragment.glsl.d.ts | 2 - .../clipping_planes_pars_fragment.glsl.d.ts | 2 - .../clipping_planes_pars_vertex.glsl.d.ts | 2 - .../clipping_planes_vertex.glsl.d.ts | 2 - .../ShaderChunk/color_fragment.glsl.d.ts | 2 - .../ShaderChunk/color_pars_fragment.glsl.d.ts | 2 - .../ShaderChunk/color_pars_vertex.glsl.d.ts | 2 - .../ShaderChunk/color_vertex.glsl.d.ts | 2 - .../ShaderChunk/colorspace_fragment.glsl.d.ts | 2 - .../colorspace_pars_fragment.glsl.d.ts | 2 - .../shaders/ShaderChunk/common.glsl.d.ts | 2 - .../cube_uv_reflection_fragment.glsl.d.ts | 2 - .../ShaderChunk/default_fragment.glsl.d.ts | 2 - .../ShaderChunk/default_vertex.glsl.d.ts | 2 - .../defaultnormal_vertex.glsl.d.ts | 2 - .../displacementmap_pars_vertex.glsl.d.ts | 2 - .../displacementmap_vertex.glsl.d.ts | 2 - .../ShaderChunk/dithering_fragment.glsl.d.ts | 2 - .../dithering_pars_fragment.glsl.d.ts | 2 - .../emissivemap_fragment.glsl.d.ts | 2 - .../emissivemap_pars_fragment.glsl.d.ts | 2 - .../envmap_common_pars_fragment.glsl.d.ts | 2 - .../ShaderChunk/envmap_fragment.glsl.d.ts | 2 - .../envmap_pars_fragment.glsl.d.ts | 2 - .../ShaderChunk/envmap_pars_vertex.glsl.d.ts | 2 - .../envmap_physical_pars_fragment.glsl.d.ts | 2 - .../ShaderChunk/envmap_vertex.glsl.d.ts | 2 - .../ShaderChunk/fog_fragment.glsl.d.ts | 2 - .../ShaderChunk/fog_pars_fragment.glsl.d.ts | 2 - .../ShaderChunk/fog_pars_vertex.glsl.d.ts | 2 - .../shaders/ShaderChunk/fog_vertex.glsl.d.ts | 2 - .../gradientmap_pars_fragment.glsl.d.ts | 2 - .../iridescence_fragment.glsl.d.ts | 2 - .../iridescence_pars_fragment.glsl.d.ts | 2 - .../lightmap_pars_fragment.glsl.d.ts | 2 - .../lightprobes_pars_fragment.glsl.d.ts | 2 - .../lights_fragment_begin.glsl.d.ts | 2 - .../ShaderChunk/lights_fragment_end.glsl.d.ts | 2 - .../lights_fragment_maps.glsl.d.ts | 2 - .../lights_lambert_fragment.glsl.d.ts | 2 - .../lights_lambert_pars_fragment.glsl.d.ts | 2 - .../ShaderChunk/lights_pars_begin.glsl.d.ts | 2 - .../lights_phong_fragment.glsl.d.ts | 2 - .../lights_phong_pars_fragment.glsl.d.ts | 2 - .../lights_physical_fragment.glsl.d.ts | 2 - .../lights_physical_pars_fragment.glsl.d.ts | 2 - .../lights_toon_fragment.glsl.d.ts | 2 - .../lights_toon_pars_fragment.glsl.d.ts | 2 - .../logdepthbuf_fragment.glsl.d.ts | 2 - .../logdepthbuf_pars_fragment.glsl.d.ts | 2 - .../logdepthbuf_pars_vertex.glsl.d.ts | 2 - .../ShaderChunk/logdepthbuf_vertex.glsl.d.ts | 2 - .../ShaderChunk/map_fragment.glsl.d.ts | 2 - .../ShaderChunk/map_pars_fragment.glsl.d.ts | 2 - .../map_particle_fragment.glsl.d.ts | 2 - .../map_particle_pars_fragment.glsl.d.ts | 2 - .../metalnessmap_fragment.glsl.d.ts | 2 - .../metalnessmap_pars_fragment.glsl.d.ts | 2 - .../ShaderChunk/morphcolor_vertex.glsl.d.ts | 2 - .../morphinstance_vertex.glsl.d.ts | 2 - .../ShaderChunk/morphnormal_vertex.glsl.d.ts | 2 - .../morphtarget_pars_vertex.glsl.d.ts | 2 - .../ShaderChunk/morphtarget_vertex.glsl.d.ts | 2 - .../normal_fragment_begin.glsl.d.ts | 2 - .../normal_fragment_maps.glsl.d.ts | 2 - .../normal_pars_fragment.glsl.d.ts | 2 - .../ShaderChunk/normal_pars_vertex.glsl.d.ts | 2 - .../ShaderChunk/normal_vertex.glsl.d.ts | 2 - .../normalmap_pars_fragment.glsl.d.ts | 2 - .../ShaderChunk/opaque_fragment.glsl.d.ts | 2 - .../shaders/ShaderChunk/packing.glsl.d.ts | 2 - .../premultiplied_alpha_fragment.glsl.d.ts | 2 - .../ShaderChunk/project_vertex.glsl.d.ts | 2 - .../roughnessmap_fragment.glsl.d.ts | 2 - .../roughnessmap_pars_fragment.glsl.d.ts | 2 - .../shadowmap_pars_fragment.glsl.d.ts | 2 - .../shadowmap_pars_vertex.glsl.d.ts | 2 - .../ShaderChunk/shadowmap_vertex.glsl.d.ts | 2 - .../shadowmask_pars_fragment.glsl.d.ts | 2 - .../ShaderChunk/skinbase_vertex.glsl.d.ts | 2 - .../skinning_pars_vertex.glsl.d.ts | 2 - .../ShaderChunk/skinning_vertex.glsl.d.ts | 2 - .../ShaderChunk/skinnormal_vertex.glsl.d.ts | 2 - .../specularmap_fragment.glsl.d.ts | 2 - .../specularmap_pars_fragment.glsl.d.ts | 2 - .../tonemapping_fragment.glsl.d.ts | 2 - .../tonemapping_pars_fragment.glsl.d.ts | 2 - .../transmission_fragment.glsl.d.ts | 2 - .../transmission_pars_fragment.glsl.d.ts | 2 - .../ShaderChunk/uv_pars_fragment.glsl.d.ts | 2 - .../ShaderChunk/uv_pars_vertex.glsl.d.ts | 2 - .../shaders/ShaderChunk/uv_vertex.glsl.d.ts | 2 - .../ShaderChunk/worldpos_vertex.glsl.d.ts | 2 - .../src/renderers/shaders/ShaderLib.d.ts | 7 - .../shaders/ShaderLib/background.glsl.d.ts | 2 - .../ShaderLib/backgroundCube.glsl.d.ts | 2 - .../shaders/ShaderLib/cube.glsl.d.ts | 2 - .../shaders/ShaderLib/depth.glsl.d.ts | 2 - .../shaders/ShaderLib/distance.glsl.d.ts | 2 - .../shaders/ShaderLib/equirect.glsl.d.ts | 2 - .../shaders/ShaderLib/linedashed.glsl.d.ts | 2 - .../shaders/ShaderLib/meshbasic.glsl.d.ts | 2 - .../shaders/ShaderLib/meshlambert.glsl.d.ts | 2 - .../shaders/ShaderLib/meshmatcap.glsl.d.ts | 2 - .../shaders/ShaderLib/meshnormal.glsl.d.ts | 2 - .../shaders/ShaderLib/meshphong.glsl.d.ts | 2 - .../shaders/ShaderLib/meshphysical.glsl.d.ts | 2 - .../shaders/ShaderLib/meshtoon.glsl.d.ts | 2 - .../shaders/ShaderLib/points.glsl.d.ts | 2 - .../shaders/ShaderLib/shadow.glsl.d.ts | 2 - .../shaders/ShaderLib/sprite.glsl.d.ts | 2 - .../renderers/shaders/ShaderLib/vsm.glsl.d.ts | 2 - .../src/renderers/shaders/UniformsLib.d.ts | 449 - .../src/renderers/shaders/UniformsUtils.d.ts | 29 - .../webgl-fallback/WebGLBackend.d.ts | 649 - .../webgl-fallback/WebGLBufferRenderer.d.ts | 13 - .../webgl-fallback/nodes/GLSLNodeBuilder.d.ts | 384 - .../utils/WebGLAttributeUtils.d.ts | 64 - .../utils/WebGLCapabilities.d.ts | 48 - .../webgl-fallback/utils/WebGLConstants.d.ts | 11 - .../webgl-fallback/utils/WebGLExtensions.d.ts | 56 - .../webgl-fallback/utils/WebGLState.d.ts | 372 - .../utils/WebGLTextureUtils.d.ts | 197 - .../utils/WebGLTimestampQueryPool.d.ts | 58 - .../webgl-fallback/utils/WebGLUtils.d.ts | 51 - .../src/renderers/webgl/WebGLAnimation.d.ts | 6 - .../src/renderers/webgl/WebGLAttributes.d.ts | 5 - .../src/renderers/webgl/WebGLBackground.d.ts | 10 - .../renderers/webgl/WebGLBindingStates.d.ts | 12 - .../renderers/webgl/WebGLBufferRenderer.d.ts | 8 - .../renderers/webgl/WebGLCapabilities.d.ts | 20 - .../renderers/webgl/WebGLEnvironments.d.ts | 4 - .../src/renderers/webgl/WebGLExtensions.d.ts | 5 - .../src/renderers/webgl/WebGLGeometries.d.ts | 5 - .../webgl/WebGLIndexedBufferRenderer.d.ts | 9 - .../jsdoc/src/renderers/webgl/WebGLInfo.d.ts | 17 - .../src/renderers/webgl/WebGLLights.d.ts | 40 - .../src/renderers/webgl/WebGLMaterials.d.ts | 4 - .../renderers/webgl/WebGLMorphtargets.d.ts | 3 - .../src/renderers/webgl/WebGLObjects.d.ts | 4 - .../src/renderers/webgl/WebGLOutput.d.ts | 11 - .../src/renderers/webgl/WebGLPrograms.d.ts | 141 - .../src/renderers/webgl/WebGLProperties.d.ts | 7 - .../src/renderers/webgl/WebGLRenderLists.d.ts | 14 - .../renderers/webgl/WebGLRenderStates.d.ts | 4 - .../src/renderers/webgl/WebGLShader.d.ts | 1 - .../src/renderers/webgl/WebGLShaderCache.d.ts | 11 - .../jsdoc/src/renderers/webgl/WebGLState.d.ts | 39 - .../src/renderers/webgl/WebGLTextures.d.ts | 20 - .../src/renderers/webgl/WebGLUniforms.d.ts | 9 - .../renderers/webgl/WebGLUniformsGroups.d.ts | 5 - .../jsdoc/src/renderers/webgl/WebGLUtils.d.ts | 3 - .../src/renderers/webgpu/WebGPUBackend.d.ts | 580 - .../webgpu/WebGPURenderer.Nodes.d.ts | 25 - .../src/renderers/webgpu/WebGPURenderer.d.ts | 42 - .../descriptors/GPUBindGroupDescriptor.d.ts | 32 - .../descriptors/GPUBufferDescriptor.d.ts | 39 - .../GPUCommandEncoderDescriptor.d.ts | 18 - .../descriptors/GPUComputePassDescriptor.d.ts | 24 - .../GPUComputePipelineDescriptor.d.ts | 32 - .../GPUCopyExternalImageDestInfo.d.ts | 25 - .../GPUCopyExternalImageSourceInfo.d.ts | 36 - .../webgpu/descriptors/GPUExtent3D.d.ts | 35 - .../GPUPipelineLayoutDescriptor.d.ts | 25 - .../descriptors/GPUQuerySetDescriptor.d.ts | 31 - .../GPURenderBundleEncoderDescriptor.d.ts | 52 - .../GPURenderPassColorAttachment.d.ts | 50 - .../GPURenderPassDepthStencilAttachment.d.ts | 71 - .../descriptors/GPURenderPassDescriptor.d.ts | 50 - .../GPURenderPassTimestampWrites.d.ts | 33 - .../GPURenderPipelineDescriptor.d.ts | 90 - .../descriptors/GPUSamplerDescriptor.d.ts | 87 - .../GPUShaderModuleDescriptor.d.ts | 30 - .../descriptors/GPUTexelCopyBufferInfo.d.ts | 39 - .../descriptors/GPUTexelCopyBufferLayout.d.ts | 32 - .../descriptors/GPUTexelCopyTextureInfo.d.ts | 45 - .../descriptors/GPUTextureDescriptor.d.ts | 73 - .../descriptors/GPUTextureViewDescriptor.d.ts | 78 - .../webgpu/nodes/BasicNodeLibrary.d.ts | 11 - .../webgpu/nodes/StandardNodeLibrary.d.ts | 12 - .../webgpu/nodes/WGSLNodeBuilder.d.ts | 633 - .../webgpu/nodes/WGSLNodeFunction.d.ts | 25 - .../webgpu/nodes/WGSLNodeParser.d.ts | 17 - .../webgpu/utils/WebGPUAttributeUtils.d.ts | 78 - .../webgpu/utils/WebGPUBindingUtils.d.ts | 88 - .../webgpu/utils/WebGPUCapabilities.d.ts | 32 - .../webgpu/utils/WebGPUConstants.d.ts | 301 - .../webgpu/utils/WebGPUPipelineUtils.d.ts | 144 - .../webgpu/utils/WebGPUTexturePassUtils.d.ts | 84 - .../webgpu/utils/WebGPUTextureUtils.d.ts | 289 - .../utils/WebGPUTimestampQueryPool.d.ts | 53 - .../renderers/webgpu/utils/WebGPUUtils.d.ts | 104 - .../src/renderers/webxr/WebXRController.d.ts | 96 - .../renderers/webxr/WebXRDepthSensing.d.ts | 55 - .../src/renderers/webxr/WebXRManager.d.ts | 220 - jsdoc-testing/jsdoc/src/scenes/Fog.d.ts | 70 - jsdoc-testing/jsdoc/src/scenes/FogExp2.d.ts | 60 - jsdoc-testing/jsdoc/src/scenes/Scene.d.ts | 97 - .../jsdoc/src/textures/CanvasTexture.d.ts | 33 - .../src/textures/CompressedArrayTexture.d.ts | 58 - .../src/textures/CompressedCubeTexture.d.ts | 35 - .../jsdoc/src/textures/CompressedTexture.d.ts | 36 - .../jsdoc/src/textures/CubeDepthTexture.d.ts | 51 - .../jsdoc/src/textures/CubeTexture.d.ts | 49 - .../jsdoc/src/textures/Data3DTexture.d.ts | 34 - .../jsdoc/src/textures/DataArrayTexture.d.ts | 53 - .../jsdoc/src/textures/DataTexture.d.ts | 38 - .../jsdoc/src/textures/DepthTexture.d.ts | 42 - .../jsdoc/src/textures/ExternalTexture.d.ts | 36 - .../src/textures/FramebufferTexture.d.ts | 42 - .../jsdoc/src/textures/HTMLTexture.d.ts | 33 - jsdoc-testing/jsdoc/src/textures/Source.d.ts | 78 - jsdoc-testing/jsdoc/src/textures/Texture.d.ts | 413 - .../jsdoc/src/textures/VideoFrameTexture.d.ts | 44 - .../jsdoc/src/textures/VideoTexture.d.ts | 59 - jsdoc-testing/jsdoc/src/utils.d.ts | 185 - 1155 files changed, 184 insertions(+), 112626 deletions(-) delete mode 100644 jsdoc-testing/jsdoc/build/three.module.d.ts delete mode 100644 jsdoc-testing/jsdoc/build/three.webgpu.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/Addons.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/animation/AnimationClipCreator.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/animation/CCDIKSolver.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/capabilities/WebGL.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/capabilities/WebGPU.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/controls/ArcballControls.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/controls/DragControls.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/controls/FirstPersonControls.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/controls/FlyControls.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/controls/MapControls.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/controls/OrbitControls.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/controls/PointerLockControls.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/controls/TrackballControls.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/controls/TransformControls.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/csm/CSM.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/csm/CSMFrustum.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/csm/CSMHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/csm/CSMShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/csm/CSMShadowNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/curves/CurveExtras.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/curves/NURBSCurve.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/curves/NURBSSurface.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/curves/NURBSUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/curves/NURBSVolume.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/effects/AnaglyphEffect.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/effects/AsciiEffect.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/effects/OutlineEffect.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/effects/ParallaxBarrierEffect.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/effects/StereoEffect.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/environments/ColorEnvironment.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/environments/DebugEnvironment.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/environments/RoomEnvironment.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/exporters/DRACOExporter.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/exporters/EXRExporter.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/exporters/GLTFExporter.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/exporters/KTX2Exporter.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/exporters/OBJExporter.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/exporters/PLYExporter.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/exporters/STLExporter.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/exporters/USDZExporter.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/geometries/BoxLineGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/geometries/ConvexGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/geometries/DecalGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/geometries/ParametricFunctions.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/geometries/ParametricGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/geometries/RoundedBoxGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/geometries/TeapotGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/geometries/TextGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/gpgpu/BitonicSort.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/AnimationPathHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeGridHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeHelperGPU.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/OctreeHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/PositionalAudioHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/RapierHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/RectAreaLightHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/TextureHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/TextureHelperGPU.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/VertexNormalsHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/helpers/VertexTangentsHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/Extension.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/Inspector.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/RendererInspector.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/extensions/tsl-graph/TSLGraphEditor.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/extensions/tsl-graph/TSLGraphLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Console.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Memory.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Parameters.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Performance.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Settings.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Timeline.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Viewer.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Graph.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Item.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/ui/List.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Profiler.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Style.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Tab.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Values.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/inspector/ui/utils.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/interaction/InteractionManager.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/interactive/HTMLMesh.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/interactive/InteractiveGroup.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/interactive/SelectionBox.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/ammo.wasm.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/basis/basis_transcoder.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/chevrotain.module.min.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/demuxer_mp4.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_decoder.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_encoder.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_wasm_wrapper.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_decoder.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_encoder.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_wasm_wrapper.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/ecsy.module.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/ktx-parse.module.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/meshopt_decoder.module.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/mikktspace.module.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/motion-controllers.module.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/opentype.module.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/potpack.module.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/rhino3dm/rhino3dm.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/rhino3dm/rhino3dm.module.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/stats.module.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/surfaceNet.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/utif.module.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/libs/zstddec.module.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/lighting/ClusteredLighting.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/lighting/DynamicLighting.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/lighting/LightProbeGrid.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/lighting/TiledLighting.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/lights/LightProbeGenerator.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/lights/RectAreaLightTexturesLib.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/lights/RectAreaLightUniformsLib.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/lines/Line2.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/lines/LineGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/lines/LineMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/lines/LineSegments2.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/lines/LineSegmentsGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/lines/Wireframe.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/lines/WireframeGeometry2.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/Line2.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/LineSegments2.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/Wireframe.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/3DMLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/3MFLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/AMFLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/BVHLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/ColladaLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/DDSLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/DRACOLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/EXRLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/FBXLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/FontLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/GCodeLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/GLTFLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/HDRCubeTextureLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/HDRLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/IESLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/KMZLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/KTX2Loader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/KTXLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/LDrawLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/LUT3dlLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/LUTCubeLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/LUTImageLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/LWOLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/LottieLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/MD2Loader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/MDDLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/MTLLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/MaterialXLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/NRRDLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/OBJLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/PCDLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/PDBLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/PLYLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/PVRLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/RGBELoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/STLLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/SVGLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/TDSLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/TGALoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/TIFFLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/TTFLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/USDLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/USDZLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/UltraHDRLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/VOXLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/VRMLLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/VTKLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/XYZLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/collada/ColladaComposer.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/collada/ColladaParser.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/IFFParser.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/LWO2Parser.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/LWO3Parser.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDAParser.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDCParser.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDComposer.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/materials/LDrawConditionalLineMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/materials/LDrawConditionalLineNodeMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/materials/WoodNodeMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/math/Capsule.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/math/ColorConverter.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/math/ColorSpaces.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/math/ConvexHull.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/math/ImprovedNoise.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/math/Lut.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/math/MeshSurfaceSampler.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/math/OBB.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/math/Octree.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/math/SimplexNoise.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/ConvexObjectBreaker.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/Gyroscope.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/MD2Character.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/MD2CharacterComplex.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/MorphAnimMesh.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/MorphBlendMesh.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/ProgressiveLightMap.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/ProgressiveLightMapGPU.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/RollerCoaster.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/TubePainter.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/Volume.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/misc/VolumeSlice.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/modifiers/CurveModifier.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/modifiers/CurveModifierGPU.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/modifiers/EdgeSplitModifier.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/modifiers/SimplifyModifier.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/modifiers/TessellateModifier.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/GroundedSkybox.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/Lensflare.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/LensflareMesh.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/ReflectorForSSRPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/Refractor.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/ShadowMesh.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/Sky.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/SkyMesh.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/Water.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/Water2.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/Water2Mesh.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/objects/WaterMesh.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/offscreen/jank.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/offscreen/offscreen.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/offscreen/scene.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/physics/AmmoPhysics.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/physics/JoltPhysics.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/physics/RapierPhysics.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/AfterimagePass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/BloomPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/BokehPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/ClearPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/CubeTexturePass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/DotScreenPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/EffectComposer.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/FXAAPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/FilmPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/GTAOPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/GlitchPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/HalftonePass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/LUTPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/MaskPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/OutlinePass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/OutputPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/Pass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderPixelatedPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderTransitionPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/SAOPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/SMAAPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSAARenderPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSAOPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSRPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/SavePass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/ShaderPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/TAARenderPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/TexturePass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/postprocessing/UnrealBloomPass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/renderers/CSS2DRenderer.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/renderers/CSS3DRenderer.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/renderers/Projector.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/renderers/SVGRenderer.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/AfterimageShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/BasicShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/BleachBypassShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/BlendShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/BokehShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/BokehShader2.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/BrightnessContrastShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/ColorCorrectionShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/ColorifyShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/ConvolutionShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/CopyShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/DOFMipMapShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/DepthLimitedBlurShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/DigitalGlitch.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/DotScreenShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/ExposureShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/FXAAShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/FilmShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/FocusShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/FreiChenShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/GTAOShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/GammaCorrectionShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/HalftoneShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/HorizontalBlurShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/HueSaturationShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/KaleidoShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/LuminosityHighPassShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/LuminosityShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/MirrorShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/NormalMapShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/OutputShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/PoissonDenoiseShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/RGBShiftShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/SAOShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/SMAAShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/SSAOShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/SSRShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/SepiaShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/SobelOperatorShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/SubsurfaceScatteringShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/TechnicolorShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/ToonShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/TriangleBlurShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/VelocityShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/VerticalBlurShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/VerticalTiltShiftShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/VignetteShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/VolumeShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/shaders/WaterRefractionShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/textures/FlakesTexture.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/transpiler/AST.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/transpiler/GLSLDecoder.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/transpiler/Linker.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/transpiler/ShaderToyDecoder.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/transpiler/TSLEncoder.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/transpiler/Transpiler.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/transpiler/TranspilerUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/transpiler/WGSLEncoder.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/AfterImageNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/AnaglyphPassNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/BilateralBlurNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/BleachBypass.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/BloomNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/CRT.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/ChromaticAberrationNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/DenoiseNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/DepthOfFieldNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/DotScreenNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/FSR1Node.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/FXAANode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/FilmNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/GTAONode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/GaussianBlurNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/GodraysNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/LensflareNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/Lut3DNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/MotionBlur.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/OutlineNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/ParallaxBarrierPassNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/PixelationPassNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/RGBShiftNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/RetroPassNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/SMAANode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSAAPassNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSGINode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSRNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSSNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/Sepia.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/Shape.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/SharpenNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/SobelOperatorNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/StereoCompositePassNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/StereoPassNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/TAAUNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/TRAANode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/TransitionNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/boxBlur.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/depthAwareBlend.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/hashBlur.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/display/radialBlur.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/ClusteredLightsNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/DynamicLightsNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/TiledLightsNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/AmbientLightDataNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/DirectionalLightDataNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/HemisphereLightDataNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/PointLightDataNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/SpotLightDataNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/math/Bayer.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/shadows/TileShadowNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/shadows/TileShadowNodeHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/utils/GroundedSkybox.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/tsl/utils/Raymarching.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/BufferGeometryUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/CameraUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/ColorUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/GeometryCompressionUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/GeometryUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/LDrawUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/SceneOptimizer.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/SceneUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/ShadowMapViewer.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/ShadowMapViewerGPU.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/SkeletonUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/SortUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/UVsDebug.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/WebGLTextureUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/WebGPUTextureUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/utils/WorkerPool.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/ARButton.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/OculusHandModel.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/OculusHandPointerModel.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/Text2D.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/VRButton.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/WebGLXRFallback.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/XRButton.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/XRControllerModelFactory.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/XREstimatedLight.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandMeshModel.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandModelFactory.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandPrimitiveModel.d.ts delete mode 100644 jsdoc-testing/jsdoc/examples/jsm/webxr/XRPlanes.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/Three.Core.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/Three.Legacy.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/Three.WebGPU.Nodes.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/Three.WebGPU.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/Three.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/animation/AnimationAction.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/animation/AnimationClip.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/animation/AnimationMixer.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/animation/AnimationObjectGroup.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/animation/AnimationUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/animation/KeyframeTrack.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/animation/PropertyBinding.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/animation/PropertyMixer.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/animation/tracks/BooleanKeyframeTrack.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/animation/tracks/ColorKeyframeTrack.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/animation/tracks/NumberKeyframeTrack.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/animation/tracks/QuaternionKeyframeTrack.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/animation/tracks/StringKeyframeTrack.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/animation/tracks/VectorKeyframeTrack.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/audio/Audio.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/audio/AudioAnalyser.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/audio/AudioContext.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/audio/AudioListener.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/audio/PositionalAudio.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/cameras/ArrayCamera.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/cameras/Camera.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/cameras/CubeCamera.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/cameras/OrthographicCamera.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/cameras/PerspectiveCamera.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/cameras/StereoCamera.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/constants.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/core/BufferAttribute.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/core/BufferGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/core/Clock.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/core/EventDispatcher.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/core/GLBufferAttribute.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/core/InstancedBufferAttribute.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/core/InstancedBufferGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/core/InstancedInterleavedBuffer.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/core/InterleavedBuffer.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/core/InterleavedBufferAttribute.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/core/Layers.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/core/Object3D.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/core/Raycaster.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/core/RenderTarget.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/core/RenderTarget3D.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/core/Timer.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/core/Uniform.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/core/UniformsGroup.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/Controls.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/DataUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/Earcut.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/ImageUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/PMREMGenerator.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/ShapeUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/TextureUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/core/Curve.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/core/CurvePath.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/core/Interpolations.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/core/Path.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/core/Shape.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/core/ShapePath.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/curves/ArcCurve.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/curves/CatmullRomCurve3.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/curves/CubicBezierCurve.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/curves/CubicBezierCurve3.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/curves/Curves.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/curves/EllipseCurve.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/curves/LineCurve.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/curves/LineCurve3.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/curves/QuadraticBezierCurve.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/curves/QuadraticBezierCurve3.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/curves/SplineCurve.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/extras/lib/earcut.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/BoxGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/CapsuleGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/CircleGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/ConeGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/CylinderGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/DodecahedronGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/EdgesGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/ExtrudeGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/Geometries.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/IcosahedronGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/LatheGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/OctahedronGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/PlaneGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/PolyhedronGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/RingGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/ShapeGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/SphereGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/TetrahedronGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/TorusGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/TorusKnotGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/TubeGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/geometries/WireframeGeometry.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/helpers/ArrowHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/helpers/AxesHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/helpers/Box3Helper.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/helpers/BoxHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/helpers/CameraHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/helpers/DirectionalLightHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/helpers/GridHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/helpers/HemisphereLightHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/helpers/PlaneHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/helpers/PointLightHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/helpers/PolarGridHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/helpers/SkeletonHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/helpers/SpotLightHelper.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/lights/AmbientLight.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/lights/DirectionalLight.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/lights/DirectionalLightShadow.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/lights/HemisphereLight.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/lights/Light.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/lights/LightProbe.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/lights/LightShadow.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/lights/PointLight.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/lights/PointLightShadow.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/lights/RectAreaLight.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/lights/SpotLight.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/lights/SpotLightShadow.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/lights/webgpu/IESSpotLight.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/lights/webgpu/ProjectorLight.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/loaders/AnimationLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/loaders/AudioLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/loaders/BufferGeometryLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/loaders/CompressedTextureLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/loaders/CubeTextureLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/loaders/DataTextureLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/loaders/FileLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/loaders/ImageBitmapLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/loaders/ImageLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/loaders/Loader.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/loaders/LoaderUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/loaders/MaterialLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/loaders/ObjectLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/loaders/TextureLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/loaders/nodes/NodeLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/loaders/nodes/NodeMaterialLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/loaders/nodes/NodeObjectLoader.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/LineBasicMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/LineDashedMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/Material.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/Materials.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/MeshBasicMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/MeshDepthMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/MeshDistanceMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/MeshLambertMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/MeshMatcapMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/MeshNormalMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/MeshPhongMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/MeshPhysicalMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/MeshStandardMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/MeshToonMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/PointsMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/RawShaderMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/ShaderMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/ShadowMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/SpriteMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/Line2NodeMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/LineBasicNodeMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/LineDashedNodeMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/MeshBasicNodeMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/MeshLambertNodeMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/MeshMatcapNodeMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/MeshNormalNodeMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/MeshPhongNodeMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/MeshPhysicalNodeMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/MeshSSSNodeMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/MeshStandardNodeMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/MeshToonNodeMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/NodeMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/NodeMaterials.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/PointsNodeMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/ShadowNodeMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/SpriteNodeMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/VolumeNodeMaterial.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/materials/nodes/manager/NodeMaterialObserver.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/Box2.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/Box3.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/Color.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/ColorManagement.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/Cylindrical.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/Euler.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/Frustum.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/FrustumArray.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/Interpolant.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/Line3.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/MathUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/Matrix2.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/Matrix3.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/Matrix4.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/Plane.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/Quaternion.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/Ray.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/Sphere.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/Spherical.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/SphericalHarmonics3.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/Triangle.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/Vector2.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/Vector3.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/Vector4.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/interpolants/BezierInterpolant.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/interpolants/CubicInterpolant.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/interpolants/DiscreteInterpolant.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/interpolants/LinearInterpolant.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/math/interpolants/QuaternionLinearInterpolant.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/Nodes.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/TSL.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/AccessorsUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/Arrays.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/BatchNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/Bitangent.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/BufferAttributeNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/BufferNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/BuiltinNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/Camera.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/ClippingNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/CubeTextureNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/InstanceNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/InstancedMeshNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/Lights.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/MaterialNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/MaterialProperties.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/MaterialReferenceNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/ModelNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/ModelViewProjectionNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/MorphNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/Normal.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/Object3DNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/PointUVNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/Position.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/ReferenceBaseNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/ReferenceNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/ReflectVector.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/RendererReferenceNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/SceneProperties.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/SkinningNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/StorageBufferNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/StorageTexture3DNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/StorageTextureNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/Tangent.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/TangentUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/Texture3DNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/TextureBicubic.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/TextureNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/TextureSizeNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/UV.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/UniformArrayNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/UserDataNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/VelocityNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/accessors/VertexColorNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/code/CodeNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/code/ExpressionNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/code/FunctionCallNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/code/FunctionNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/ArrayNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/AssignNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/AttributeNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/BypassNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/ConstNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/ContextNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/IndexNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/InputNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/InspectorNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/IsolateNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/LightingModel.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/MRTNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/Node.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeAttribute.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeBuilder.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeCache.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeCode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeError.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeFrame.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeFunction.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeFunctionInput.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeParser.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeUniform.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeVar.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/NodeVarying.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/OutputStructNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/ParameterNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/PropertyNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/StackNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/StackTrace.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/StructNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/StructType.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/StructTypeNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/SubBuildNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/TempNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/UniformGroupNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/UniformNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/VarNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/VaryingNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/core/constants.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/display/BlendModes.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/display/BumpMapNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ColorAdjustment.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ColorSpaceFunctions.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ColorSpaceNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/display/FrontFacingNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/display/NormalMapNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/display/PassNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/display/PremultiplyAlphaFunctions.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/display/RenderOutputNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ScreenNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ToneMappingFunctions.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ToneMappingNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ToonOutlinePassNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ViewportDepthNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ViewportDepthTextureNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ViewportSharedTextureNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/display/ViewportTextureNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/fog/Fog.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_GGX.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_GGX_Multiscatter.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_Lambert.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_Sheen.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/DFGLUT.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/D_GGX.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/EnvironmentBRDF.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/F_Schlick.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/LTC.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/Schlick_to_F0.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/BasicLightingModel.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/PhongLightingModel.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/PhysicalLightingModel.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/ShadowMaskModel.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/ToonLightingModel.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/VolumetricLightingModel.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/material/getAlphaHashThreshold.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/material/getGeometryRoughness.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/material/getParallaxCorrectNormal.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/material/getRoughness.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/functions/material/getShIrradianceAt.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/geometry/RangeNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/gpgpu/AtomicFunctionNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/gpgpu/BarrierNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/gpgpu/ComputeBuiltinNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/gpgpu/ComputeNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/gpgpu/SubgroupFunctionNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/gpgpu/WorkgroupInfoNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/AONode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/AmbientLightNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/AnalyticLightNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/BasicEnvironmentNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/BasicLightMapNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/DirectionalLightNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/EnvironmentNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/HemisphereLightNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/IESSpotLightNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/IrradianceNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/LightProbeNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/LightUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/LightingContextNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/LightingNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/LightsNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/PointLightNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/PointShadowNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/ProjectorLightNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/RectAreaLightNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/ShadowBaseNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/ShadowFilterNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/ShadowNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/lighting/SpotLightNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/materialx/MaterialXNodes.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_hsv.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_noise.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_transform_color.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/math/BitcastNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/math/BitcountNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/math/ConditionalNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/math/Hash.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/math/MathNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/math/MathUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/math/OperatorNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/math/PackFloatNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/math/TriNoise3D.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/math/UnpackFloatNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/parsers/GLSLNodeFunction.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/parsers/GLSLNodeParser.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/pmrem/PMREMNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/pmrem/PMREMUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/procedural/Checker.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/shapes/Shapes.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/tsl/TSLBase.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/tsl/TSLCore.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/ArrayElementNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/ConvertNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/CubeMapNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/DebugNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/Discard.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/EquirectUV.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/EventNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/FlipNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/FunctionOverloadingNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/JoinNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/LoopNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/MatcapUV.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/MaxMipLevelNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/MemberNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/Oscillators.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/Packing.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/PostProcessingUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/RTTNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/ReflectorNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/Remap.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/RotateNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/SampleNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/SetNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/SplitNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/SpriteSheetUV.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/SpriteUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/StorageArrayElementNode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/Timer.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/TriplanarTextures.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/UVUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/nodes/utils/ViewportUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/objects/BatchedMesh.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/objects/Bone.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/objects/ClippingGroup.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/objects/Group.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/objects/InstancedMesh.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/objects/LOD.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/objects/Line.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/objects/LineLoop.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/objects/LineSegments.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/objects/Mesh.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/objects/Points.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/objects/Skeleton.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/objects/SkinnedMesh.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/objects/Sprite.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/WebGL3DRenderTarget.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/WebGLArrayRenderTarget.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/WebGLCubeRenderTarget.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/WebGLRenderTarget.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/WebGLRenderer.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Animation.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Attributes.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Backend.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Background.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/BindGroup.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Binding.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Bindings.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/BlendMode.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Buffer.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/BufferUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/BundleGroup.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/CanvasTarget.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/ChainMap.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/ClippingContext.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Color4.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/ComputePipeline.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Constants.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/CubeRenderTarget.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/DataMap.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Geometries.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/IndirectStorageBufferAttribute.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Info.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/InspectorBase.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Lighting.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Pipeline.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Pipelines.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/PostProcessing.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/ProgrammableStage.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/QuadMesh.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/ReadbackBuffer.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RenderBundle.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RenderBundles.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RenderContext.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RenderContexts.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RenderList.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RenderLists.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RenderObject.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RenderObjectPipeline.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RenderObjects.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RenderPipeline.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Renderer.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/RendererUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/SampledTexture.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Sampler.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Storage3DTexture.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/StorageArrayTexture.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/StorageBuffer.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/StorageBufferAttribute.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/StorageInstancedBufferAttribute.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/StorageTexture.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Textures.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/TimestampQueryPool.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/Uniform.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/UniformBuffer.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/UniformsGroup.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/XRManager.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/XRRenderTarget.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/extras/PMREMGenerator.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeBuilderState.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeLibrary.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeManager.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeSampledTexture.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeSampler.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeStorageBuffer.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniform.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniformBuffer.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniformsGroup.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/DFGLUTData.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphahash_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphahash_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphamap_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphamap_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphatest_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphatest_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/aomap_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/aomap_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/batching_pars_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/batching_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/begin_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/beginnormal_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/bsdfs.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/bumpmap_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_begin.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_maps.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_pars_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_pars_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/colorspace_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/colorspace_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/common.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/cube_uv_reflection_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/default_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/default_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/defaultnormal_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/displacementmap_pars_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/displacementmap_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/dithering_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/dithering_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/emissivemap_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/emissivemap_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_common_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_pars_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_pars_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/gradientmap_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/iridescence_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/iridescence_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lightmap_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lightprobes_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_begin.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_end.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_maps.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_lambert_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_lambert_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_pars_begin.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_phong_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_phong_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_toon_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_toon_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_particle_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_particle_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/metalnessmap_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/metalnessmap_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphcolor_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphinstance_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphnormal_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphtarget_pars_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphtarget_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_fragment_begin.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_fragment_maps.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_pars_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normalmap_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/opaque_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/packing.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/premultiplied_alpha_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/project_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/roughnessmap_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/roughnessmap_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_pars_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmask_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinbase_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinning_pars_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinning_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinnormal_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/specularmap_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/specularmap_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/tonemapping_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/tonemapping_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/transmission_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/transmission_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_pars_fragment.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_pars_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/worldpos_vertex.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/background.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/backgroundCube.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/cube.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/depth.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/distance.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/equirect.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/linedashed.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshbasic.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshlambert.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshmatcap.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshnormal.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshphong.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshphysical.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshtoon.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/points.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/shadow.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/sprite.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/vsm.glsl.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/UniformsLib.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/shaders/UniformsUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/WebGLBackend.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/WebGLBufferRenderer.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLAttributeUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLCapabilities.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLConstants.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLExtensions.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLState.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLTextureUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLTimestampQueryPool.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLAnimation.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLAttributes.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBackground.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBindingStates.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBufferRenderer.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLCapabilities.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLEnvironments.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLExtensions.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLGeometries.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLInfo.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLLights.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLMaterials.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLMorphtargets.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLObjects.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLOutput.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLPrograms.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLProperties.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLRenderLists.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLRenderStates.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLShader.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLShaderCache.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLState.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLTextures.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUniforms.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUniformsGroups.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPUBackend.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPURenderer.Nodes.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPURenderer.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUBindGroupDescriptor.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUBufferDescriptor.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCommandEncoderDescriptor.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUComputePassDescriptor.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUComputePipelineDescriptor.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCopyExternalImageDestInfo.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCopyExternalImageSourceInfo.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUExtent3D.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUPipelineLayoutDescriptor.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUQuerySetDescriptor.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderBundleEncoderDescriptor.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassColorAttachment.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassDepthStencilAttachment.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassDescriptor.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassTimestampWrites.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPipelineDescriptor.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUSamplerDescriptor.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUShaderModuleDescriptor.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyBufferInfo.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyBufferLayout.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyTextureInfo.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTextureDescriptor.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTextureViewDescriptor.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeFunction.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeParser.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUAttributeUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUBindingUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUCapabilities.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUConstants.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUPipelineUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTexturePassUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTextureUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUUtils.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webxr/WebXRController.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webxr/WebXRDepthSensing.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/renderers/webxr/WebXRManager.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/scenes/Fog.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/scenes/FogExp2.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/scenes/Scene.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/textures/CanvasTexture.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/textures/CompressedArrayTexture.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/textures/CompressedCubeTexture.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/textures/CompressedTexture.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/textures/CubeDepthTexture.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/textures/CubeTexture.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/textures/Data3DTexture.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/textures/DataArrayTexture.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/textures/DataTexture.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/textures/DepthTexture.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/textures/ExternalTexture.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/textures/FramebufferTexture.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/textures/HTMLTexture.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/textures/Source.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/textures/Texture.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/textures/VideoFrameTexture.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/textures/VideoTexture.d.ts delete mode 100644 jsdoc-testing/jsdoc/src/utils.d.ts diff --git a/jsdoc-testing/changes.patch b/jsdoc-testing/changes.patch index eb9981350..183301e43 100644 --- a/jsdoc-testing/changes.patch +++ b/jsdoc-testing/changes.patch @@ -10453,6 +10453,190 @@ index 4d9e0160a..962926ab4 100644 } + +export default NodeMaterialObserver; +diff --git a/jsdoc-testing/jsdoc/src/math/Box3.d.ts b/jsdoc-testing/jsdoc/src/math/Box3.d.ts +index b1c152106..c255529c1 100644 +--- a/jsdoc-testing/jsdoc/src/math/Box3.d.ts ++++ b/jsdoc-testing/jsdoc/src/math/Box3.d.ts +@@ -1,3 +1,11 @@ ++import { Vector3 } from './Vector3.js'; ++import { BufferAttribute } from '../core/BufferAttribute.js'; ++import { Object3D } from '../core/Object3D.js'; ++import { Sphere } from './Sphere.js'; ++import { Plane } from './Plane.js'; ++import { Triangle } from './Triangle.js'; ++import { Matrix4 } from './Matrix4.js'; ++ + /** + * Represents an axis-aligned bounding box (AABB) in 3D space. + */ +@@ -37,7 +45,7 @@ export class Box3 { + * @param {Vector3} max - The upper boundary of the box. + * @return {Box3} A reference to this bounding box. + */ +- set(min: Vector3, max: Vector3): Box3; ++ set(min: Vector3, max: Vector3): this; + /** + * Sets the upper and lower bounds of this box so it encloses the position data + * in the given array. +@@ -45,7 +53,7 @@ export class Box3 { + * @param {Array} array - An array holding 3D position data. + * @return {Box3} A reference to this bounding box. + */ +- setFromArray(array: Array): Box3; ++ setFromArray(array: ArrayLike): this; + /** + * Sets the upper and lower bounds of this box so it encloses the position data + * in the given buffer attribute. +@@ -53,7 +61,7 @@ export class Box3 { + * @param {BufferAttribute} attribute - A buffer attribute holding 3D position data. + * @return {Box3} A reference to this bounding box. + */ +- setFromBufferAttribute(attribute: BufferAttribute): Box3; ++ setFromBufferAttribute(attribute: BufferAttribute): this; + /** + * Sets the upper and lower bounds of this box so it encloses the position data + * in the given array. +@@ -61,7 +69,7 @@ export class Box3 { + * @param {Array} points - An array holding 3D position data as instances of {@link Vector3}. + * @return {Box3} A reference to this bounding box. + */ +- setFromPoints(points: Array): Box3; ++ setFromPoints(points: Array): this; + /** + * Centers this box on the given center vector and sets this box's width, height and + * depth to the given size values. +@@ -70,7 +78,7 @@ export class Box3 { + * @param {Vector3} size - The x, y and z dimensions of the box. + * @return {Box3} A reference to this bounding box. + */ +- setFromCenterAndSize(center: Vector3, size: Vector3): Box3; ++ setFromCenterAndSize(center: Vector3, size: Vector3): this; + /** + * Computes the world-axis-aligned bounding box for the given 3D object + * (including its children), accounting for the object's, and children's, +@@ -86,26 +94,26 @@ export class Box3 { + * world-axis-aligned bounding box at the expense of more computation. + * @return {Box3} A reference to this bounding box. + */ +- setFromObject(object: Object3D, precise?: boolean): Box3; ++ setFromObject(object: Object3D, precise?: boolean): this; + /** + * Returns a new box with copied values from this instance. + * + * @return {Box3} A clone of this instance. + */ +- clone(): Box3; ++ clone(): this; + /** + * Copies the values of the given box to this instance. + * + * @param {Box3} box - The box to copy. + * @return {Box3} A reference to this bounding box. + */ +- copy(box: Box3): Box3; ++ copy(box: Box3): this; + /** + * Makes this box empty which means in encloses a zero space in 3D. + * + * @return {Box3} A reference to this bounding box. + */ +- makeEmpty(): Box3; ++ makeEmpty(): this; + /** + * Returns true if this box includes zero points within its bounds. + * Note that a box with equal lower and upper bounds still includes one +@@ -134,7 +142,7 @@ export class Box3 { + * @param {Vector3} point - The point that should be included by the bounding box. + * @return {Box3} A reference to this bounding box. + */ +- expandByPoint(point: Vector3): Box3; ++ expandByPoint(point: Vector3): this; + /** + * Expands this box equilaterally by the given vector. The width of this + * box will be expanded by the x component of the vector in both +@@ -145,7 +153,7 @@ export class Box3 { + * @param {Vector3} vector - The vector that should expand the bounding box. + * @return {Box3} A reference to this bounding box. + */ +- expandByVector(vector: Vector3): Box3; ++ expandByVector(vector: Vector3): this; + /** + * Expands each dimension of the box by the given scalar. If negative, the + * dimensions of the box will be contracted. +@@ -153,7 +161,7 @@ export class Box3 { + * @param {number} scalar - The scalar value that should expand the bounding box. + * @return {Box3} A reference to this bounding box. + */ +- expandByScalar(scalar: number): Box3; ++ expandByScalar(scalar: number): this; + /** + * Expands the boundaries of this box to include the given 3D object and + * its children, accounting for the object's, and children's, world +@@ -165,7 +173,7 @@ export class Box3 { + * as little as necessary at the expense of more computation. + * @return {Box3} A reference to this bounding box. + */ +- expandByObject(object: Object3D, precise?: boolean): Box3; ++ expandByObject(object: Object3D, precise?: boolean): this; + /** + * Returns `true` if the given point lies within or on the boundaries of this box. + * +@@ -249,7 +257,7 @@ export class Box3 { + * @param {Box3} box - The bounding box to intersect with. + * @return {Box3} A reference to this bounding box. + */ +- intersect(box: Box3): Box3; ++ intersect(box: Box3): this; + /** + * Computes the union of this box and another and the given one, setting the upper + * bound of this box to the greater of the two boxes' upper bounds and the +@@ -258,14 +266,14 @@ export class Box3 { + * @param {Box3} box - The bounding box that will be unioned with this instance. + * @return {Box3} A reference to this bounding box. + */ +- union(box: Box3): Box3; ++ union(box: Box3): this; + /** + * Transforms this bounding box by the given 4x4 transformation matrix. + * + * @param {Matrix4} matrix - The transformation matrix. + * @return {Box3} A reference to this bounding box. + */ +- applyMatrix4(matrix: Matrix4): Box3; ++ applyMatrix4(matrix: Matrix4): this; + /** + * Adds the given offset to both the upper and lower bounds of this bounding box, + * effectively moving it in 3D space. +@@ -273,7 +281,7 @@ export class Box3 { + * @param {Vector3} offset - The offset that should be used to translate the bounding box. + * @return {Box3} A reference to this bounding box. + */ +- translate(offset: Vector3): Box3; ++ translate(offset: Vector3): this; + /** + * Returns `true` if this bounding box is equal with the given one. + * +@@ -286,13 +294,17 @@ export class Box3 { + * + * @return {Object} Serialized structure with fields representing the object state. + */ +- toJSON(): Object; ++ toJSON(): Box3JSON; + /** + * Returns a serialized structure of the bounding box. + * + * @param {Object} json - The serialized json to set the box from. + * @return {Box3} A reference to this bounding box. + */ +- fromJSON(json: Object): Box3; ++ fromJSON(json: Box3JSON): this; ++} ++ ++export interface Box3JSON { ++ min: number[]; ++ max: number[]; + } +-import { Vector3 } from './Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Interpolant.d.ts b/jsdoc-testing/jsdoc/src/math/Interpolant.d.ts index 561415c0e..093bab0de 100644 --- a/jsdoc-testing/jsdoc/src/math/Interpolant.d.ts diff --git a/jsdoc-testing/jsdoc/build/three.module.d.ts b/jsdoc-testing/jsdoc/build/three.module.d.ts deleted file mode 100644 index 99a67f4d7..000000000 --- a/jsdoc-testing/jsdoc/build/three.module.d.ts +++ /dev/null @@ -1,1836 +0,0 @@ -import { ACESFilmicToneMapping } from './three.core.js'; -import { AddEquation } from './three.core.js'; -import { AddOperation } from './three.core.js'; -import { AdditiveBlending } from './three.core.js'; -import { AgXToneMapping } from './three.core.js'; -import { AlphaFormat } from './three.core.js'; -import { AlwaysCompare } from './three.core.js'; -import { AlwaysDepth } from './three.core.js'; -import { ArrayCamera } from './three.core.js'; -import { BackSide } from './three.core.js'; -import { BoxGeometry } from './three.core.js'; -import { BufferAttribute } from './three.core.js'; -import { BufferGeometry } from './three.core.js'; -import { ByteType } from './three.core.js'; -import { CineonToneMapping } from './three.core.js'; -import { ClampToEdgeWrapping } from './three.core.js'; -import { Color } from './three.core.js'; -import { ColorManagement } from './three.core.js'; -import { ConstantAlphaFactor } from './three.core.js'; -import { ConstantColorFactor } from './three.core.js'; -import { CubeCamera } from './three.core.js'; -import { CubeDepthTexture } from './three.core.js'; -import { CubeReflectionMapping } from './three.core.js'; -import { CubeRefractionMapping } from './three.core.js'; -import { CubeTexture } from './three.core.js'; -import { CubeUVReflectionMapping } from './three.core.js'; -import { CullFaceBack } from './three.core.js'; -import { CullFaceFront } from './three.core.js'; -import { CullFaceNone } from './three.core.js'; -import { CustomBlending } from './three.core.js'; -import { CustomToneMapping } from './three.core.js'; -import { Data3DTexture } from './three.core.js'; -import { DataArrayTexture } from './three.core.js'; -import { DataTexture } from './three.core.js'; -import { DepthFormat } from './three.core.js'; -import { DepthStencilFormat } from './three.core.js'; -import { DepthTexture } from './three.core.js'; -import { DoubleSide } from './three.core.js'; -import { DstAlphaFactor } from './three.core.js'; -import { DstColorFactor } from './three.core.js'; -import { EqualCompare } from './three.core.js'; -import { EqualDepth } from './three.core.js'; -import { EquirectangularReflectionMapping } from './three.core.js'; -import { EquirectangularRefractionMapping } from './three.core.js'; -import { EventDispatcher } from './three.core.js'; -import { ExternalTexture } from './three.core.js'; -import { Float32BufferAttribute } from './three.core.js'; -import { FloatType } from './three.core.js'; -import { FrontSide } from './three.core.js'; -import { Frustum } from './three.core.js'; -import { GLSL3 } from './three.core.js'; -import { GreaterCompare } from './three.core.js'; -import { GreaterDepth } from './three.core.js'; -import { GreaterEqualCompare } from './three.core.js'; -import { GreaterEqualDepth } from './three.core.js'; -import { HalfFloatType } from './three.core.js'; -import { IntType } from './three.core.js'; -import { Layers } from './three.core.js'; -import { LessCompare } from './three.core.js'; -import { LessDepth } from './three.core.js'; -import { LessEqualCompare } from './three.core.js'; -import { LessEqualDepth } from './three.core.js'; -import { LinearFilter } from './three.core.js'; -import { LinearMipmapLinearFilter } from './three.core.js'; -import { LinearMipmapNearestFilter } from './three.core.js'; -import { LinearSRGBColorSpace } from './three.core.js'; -import { LinearToneMapping } from './three.core.js'; -import { LinearTransfer } from './three.core.js'; -import { Matrix3 } from './three.core.js'; -import { Matrix4 } from './three.core.js'; -import { MaxEquation } from './three.core.js'; -import { Mesh } from './three.core.js'; -import { MeshBasicMaterial } from './three.core.js'; -import { MeshDepthMaterial } from './three.core.js'; -import { MeshDistanceMaterial } from './three.core.js'; -import { MinEquation } from './three.core.js'; -import { MirroredRepeatWrapping } from './three.core.js'; -import { MixOperation } from './three.core.js'; -import { MultiplyBlending } from './three.core.js'; -import { MultiplyOperation } from './three.core.js'; -import { NearestFilter } from './three.core.js'; -import { NearestMipmapLinearFilter } from './three.core.js'; -import { NearestMipmapNearestFilter } from './three.core.js'; -import { NeutralToneMapping } from './three.core.js'; -import { NeverCompare } from './three.core.js'; -import { NeverDepth } from './three.core.js'; -import { NoBlending } from './three.core.js'; -import { NoColorSpace } from './three.core.js'; -import { NoToneMapping } from './three.core.js'; -import { NormalBlending } from './three.core.js'; -import { NotEqualCompare } from './three.core.js'; -import { NotEqualDepth } from './three.core.js'; -import { ObjectSpaceNormalMap } from './three.core.js'; -import { OneFactor } from './three.core.js'; -import { OneMinusConstantAlphaFactor } from './three.core.js'; -import { OneMinusConstantColorFactor } from './three.core.js'; -import { OneMinusDstAlphaFactor } from './three.core.js'; -import { OneMinusDstColorFactor } from './three.core.js'; -import { OneMinusSrcAlphaFactor } from './three.core.js'; -import { OneMinusSrcColorFactor } from './three.core.js'; -import { OrthographicCamera } from './three.core.js'; -import { PCFShadowMap } from './three.core.js'; -import { PCFSoftShadowMap } from './three.core.js'; -/** - * This class generates a Prefiltered, Mipmapped Radiance Environment Map - * (PMREM) from a cubeMap environment texture. This allows different levels of - * blur to be quickly accessed based on material roughness. It is packed into a - * special CubeUV format that allows us to perform custom interpolation so that - * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap - * chain, it only goes down to the LOD_MIN level (above), and then creates extra - * even more filtered 'mips' at the same LOD_MIN resolution, associated with - * higher roughness levels. In this way we maintain resolution to smoothly - * interpolate diffuse lighting while limiting sampling computation. - * - * The prefiltering uses GGX VNDF (Visible Normal Distribution Function) - * importance sampling based on "Sampling the GGX Distribution of Visible Normals" - * (Heitz, 2018) to generate environment maps that accurately match the GGX BRDF - * used in material rendering for physically-based image-based lighting. - */ -export class PMREMGenerator { - /** - * Constructs a new PMREM generator. - * - * @param {WebGLRenderer} renderer - The renderer. - */ - constructor(renderer: WebGLRenderer); - _renderer: WebGLRenderer; - _pingPongRenderTarget: any; - _lodMax: number; - _cubeSize: number; - _sizeLods: any[]; - _sigmas: any[]; - _lodMeshes: any[]; - _backgroundBox: Mesh | null; - _cubemapMaterial: ShaderMaterial | null; - _equirectMaterial: ShaderMaterial | null; - _blurMaterial: ShaderMaterial | null; - _ggxMaterial: ShaderMaterial | null; - /** - * Generates a PMREM from a supplied Scene, which can be faster than using an - * image if networking bandwidth is low. Optional sigma specifies a blur radius - * in radians to be applied to the scene before PMREM generation. Optional near - * and far planes ensure the scene is rendered in its entirety. - * - * @param {Scene} scene - The scene to be captured. - * @param {number} [sigma=0] - The blur radius in radians. - * @param {number} [near=0.1] - The near plane distance. - * @param {number} [far=100] - The far plane distance. - * @param {Object} [options={}] - The configuration options. - * @param {number} [options.size=256] - The texture size of the PMREM. - * @param {Vector3} [options.position=origin] - The position of the internal cube camera that renders the scene. - * @return {WebGLRenderTarget} The resulting PMREM. - */ - fromScene(scene: Scene, sigma?: number, near?: number, far?: number, options?: { - size?: number | undefined; - position?: Vector3 | undefined; - }): WebGLRenderTarget; - /** - * Generates a PMREM from an equirectangular texture, which can be either LDR - * or HDR. The ideal input image size is 1k (1024 x 512), as this matches best - * with the 256 x 256 cubemap output. The minimum supported input image size - * is 64 x 32. - * - * @param {Texture} equirectangular - The equirectangular texture to be converted. - * @param {?WebGLRenderTarget} [renderTarget=null] - The render target to use. - * @return {WebGLRenderTarget} The resulting PMREM. - */ - fromEquirectangular(equirectangular: Texture, renderTarget?: WebGLRenderTarget | null): WebGLRenderTarget; - /** - * Generates a PMREM from an cubemap texture, which can be either LDR - * or HDR. The ideal input cube size is 256 x 256, as this matches best - * with the 256 x 256 cubemap output. The minimum supported input cube - * size is 16 x 16 per face. - * - * @param {Texture} cubemap - The cubemap texture to be converted. - * @param {?WebGLRenderTarget} [renderTarget=null] - The render target to use. - * @return {WebGLRenderTarget} The resulting PMREM. - */ - fromCubemap(cubemap: Texture, renderTarget?: WebGLRenderTarget | null): WebGLRenderTarget; - /** - * Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during - * your texture's network fetch for increased concurrency. - */ - compileCubemapShader(): void; - /** - * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during - * your texture's network fetch for increased concurrency. - */ - compileEquirectangularShader(): void; - /** - * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class, - * so you should not need more than one PMREMGenerator object. If you do, calling dispose() on - * one of them will cause any others to also become unusable. - */ - dispose(): void; - _setSize(cubeSize: any): void; - _dispose(): void; - _cleanup(outputTarget: any): void; - _fromTexture(texture: any, renderTarget: any): any; - _allocateTargets(): WebGLRenderTarget; - _compileMaterial(material: any): void; - _sceneToCubeUV(scene: any, near: any, far: any, cubeUVRenderTarget: any, position: any): void; - _textureToCubeUV(texture: any, cubeUVRenderTarget: any): void; - _applyPMREM(cubeUVRenderTarget: any): void; - /** - * Applies GGX VNDF importance sampling filter to generate a prefiltered environment map. - * Uses Monte Carlo integration with VNDF importance sampling to accurately represent the - * GGX BRDF for physically-based rendering. Reads from the previous LOD level and - * applies incremental roughness filtering to avoid over-blurring. - * - * @private - * @param {WebGLRenderTarget} cubeUVRenderTarget - * @param {number} lodIn - Source LOD level to read from - * @param {number} lodOut - Target LOD level to write to - */ - private _applyGGXFilter; - /** - * This is a two-pass Gaussian blur for a cubemap. Normally this is done - * vertically and horizontally, but this breaks down on a cube. Here we apply - * the blur latitudinally (around the poles), and then longitudinally (towards - * the poles) to approximate the orthogonally-separable blur. It is least - * accurate at the poles, but still does a decent job. - * - * Used for initial scene blur in fromScene() method when sigma > 0. - * - * @private - * @param {WebGLRenderTarget} cubeUVRenderTarget - * @param {number} lodIn - * @param {number} lodOut - * @param {number} sigma - * @param {Vector3} [poleAxis] - */ - private _blur; - _halfBlur(targetIn: any, targetOut: any, lodIn: any, lodOut: any, sigmaRadians: any, direction: any, poleAxis: any): void; -} -import { PerspectiveCamera } from './three.core.js'; -import { Plane } from './three.core.js'; -import { PlaneGeometry } from './three.core.js'; -import { R11_EAC_Format } from './three.core.js'; -import { RED_GREEN_RGTC2_Format } from './three.core.js'; -import { RED_RGTC1_Format } from './three.core.js'; -import { REVISION } from './three.core.js'; -import { RG11_EAC_Format } from './three.core.js'; -import { RGBAFormat } from './three.core.js'; -import { RGBAIntegerFormat } from './three.core.js'; -import { RGBA_ASTC_10x10_Format } from './three.core.js'; -import { RGBA_ASTC_10x5_Format } from './three.core.js'; -import { RGBA_ASTC_10x6_Format } from './three.core.js'; -import { RGBA_ASTC_10x8_Format } from './three.core.js'; -import { RGBA_ASTC_12x10_Format } from './three.core.js'; -import { RGBA_ASTC_12x12_Format } from './three.core.js'; -import { RGBA_ASTC_4x4_Format } from './three.core.js'; -import { RGBA_ASTC_5x4_Format } from './three.core.js'; -import { RGBA_ASTC_5x5_Format } from './three.core.js'; -import { RGBA_ASTC_6x5_Format } from './three.core.js'; -import { RGBA_ASTC_6x6_Format } from './three.core.js'; -import { RGBA_ASTC_8x5_Format } from './three.core.js'; -import { RGBA_ASTC_8x6_Format } from './three.core.js'; -import { RGBA_ASTC_8x8_Format } from './three.core.js'; -import { RGBA_BPTC_Format } from './three.core.js'; -import { RGBA_ETC2_EAC_Format } from './three.core.js'; -import { RGBA_PVRTC_2BPPV1_Format } from './three.core.js'; -import { RGBA_PVRTC_4BPPV1_Format } from './three.core.js'; -import { RGBA_S3TC_DXT1_Format } from './three.core.js'; -import { RGBA_S3TC_DXT3_Format } from './three.core.js'; -import { RGBA_S3TC_DXT5_Format } from './three.core.js'; -import { RGBFormat } from './three.core.js'; -import { RGB_BPTC_SIGNED_Format } from './three.core.js'; -import { RGB_BPTC_UNSIGNED_Format } from './three.core.js'; -import { RGB_ETC1_Format } from './three.core.js'; -import { RGB_ETC2_Format } from './three.core.js'; -import { RGB_PVRTC_2BPPV1_Format } from './three.core.js'; -import { RGB_PVRTC_4BPPV1_Format } from './three.core.js'; -import { RGB_S3TC_DXT1_Format } from './three.core.js'; -import { RGFormat } from './three.core.js'; -import { RGIntegerFormat } from './three.core.js'; -import { RawShaderMaterial } from './three.core.js'; -import { RedFormat } from './three.core.js'; -import { RedIntegerFormat } from './three.core.js'; -import { ReinhardToneMapping } from './three.core.js'; -import { RepeatWrapping } from './three.core.js'; -import { ReverseSubtractEquation } from './three.core.js'; -import { SIGNED_R11_EAC_Format } from './three.core.js'; -import { SIGNED_RED_GREEN_RGTC2_Format } from './three.core.js'; -import { SIGNED_RED_RGTC1_Format } from './three.core.js'; -import { SIGNED_RG11_EAC_Format } from './three.core.js'; -import { SRGBColorSpace } from './three.core.js'; -import { SRGBTransfer } from './three.core.js'; -export namespace ShaderChunk { - export { alphahash_fragment }; - export { alphahash_pars_fragment }; - export { alphamap_fragment }; - export { alphamap_pars_fragment }; - export { alphatest_fragment }; - export { alphatest_pars_fragment }; - export { aomap_fragment }; - export { aomap_pars_fragment }; - export { batching_pars_vertex }; - export { batching_vertex }; - export { begin_vertex }; - export { beginnormal_vertex }; - export { bsdfs }; - export { iridescence_fragment }; - export { bumpmap_pars_fragment }; - export { clipping_planes_fragment }; - export { clipping_planes_pars_fragment }; - export { clipping_planes_pars_vertex }; - export { clipping_planes_vertex }; - export { color_fragment }; - export { color_pars_fragment }; - export { color_pars_vertex }; - export { color_vertex }; - export { common }; - export { cube_uv_reflection_fragment }; - export { defaultnormal_vertex }; - export { displacementmap_pars_vertex }; - export { displacementmap_vertex }; - export { emissivemap_fragment }; - export { emissivemap_pars_fragment }; - export { colorspace_fragment }; - export { colorspace_pars_fragment }; - export { envmap_fragment }; - export { envmap_common_pars_fragment }; - export { envmap_pars_fragment }; - export { envmap_pars_vertex }; - export { envmap_physical_pars_fragment }; - export { envmap_vertex }; - export { fog_vertex }; - export { fog_pars_vertex }; - export { fog_fragment }; - export { fog_pars_fragment }; - export { gradientmap_pars_fragment }; - export { lightmap_pars_fragment }; - export { lights_lambert_fragment }; - export { lights_lambert_pars_fragment }; - export { lights_pars_begin }; - export { lights_toon_fragment }; - export { lights_toon_pars_fragment }; - export { lights_phong_fragment }; - export { lights_phong_pars_fragment }; - export { lights_physical_fragment }; - export { lights_physical_pars_fragment }; - export { lights_fragment_begin }; - export { lights_fragment_maps }; - export { lights_fragment_end }; - export { lightprobes_pars_fragment }; - export { logdepthbuf_fragment }; - export { logdepthbuf_pars_fragment }; - export { logdepthbuf_pars_vertex }; - export { logdepthbuf_vertex }; - export { map_fragment }; - export { map_pars_fragment }; - export { map_particle_fragment }; - export { map_particle_pars_fragment }; - export { metalnessmap_fragment }; - export { metalnessmap_pars_fragment }; - export { morphinstance_vertex }; - export { morphcolor_vertex }; - export { morphnormal_vertex }; - export { morphtarget_pars_vertex }; - export { morphtarget_vertex }; - export { normal_fragment_begin }; - export { normal_fragment_maps }; - export { normal_pars_fragment }; - export { normal_pars_vertex }; - export { normal_vertex }; - export { normalmap_pars_fragment }; - export { clearcoat_normal_fragment_begin }; - export { clearcoat_normal_fragment_maps }; - export { clearcoat_pars_fragment }; - export { iridescence_pars_fragment }; - export { opaque_fragment }; - export { packing }; - export { premultiplied_alpha_fragment }; - export { project_vertex }; - export { dithering_fragment }; - export { dithering_pars_fragment }; - export { roughnessmap_fragment }; - export { roughnessmap_pars_fragment }; - export { shadowmap_pars_fragment }; - export { shadowmap_pars_vertex }; - export { shadowmap_vertex }; - export { shadowmask_pars_fragment }; - export { skinbase_vertex }; - export { skinning_pars_vertex }; - export { skinning_vertex }; - export { skinnormal_vertex }; - export { specularmap_fragment }; - export { specularmap_pars_fragment }; - export { tonemapping_fragment }; - export { tonemapping_pars_fragment }; - export { transmission_fragment }; - export { transmission_pars_fragment }; - export { uv_pars_fragment }; - export { uv_pars_vertex }; - export { uv_vertex }; - export { worldpos_vertex }; - export { vertex$h as background_vert }; - export { fragment$h as background_frag }; - export { vertex$g as backgroundCube_vert }; - export { fragment$g as backgroundCube_frag }; - export { vertex$f as cube_vert }; - export { fragment$f as cube_frag }; - export { vertex$e as depth_vert }; - export { fragment$e as depth_frag }; - export { vertex$d as distance_vert }; - export { fragment$d as distance_frag }; - export { vertex$c as equirect_vert }; - export { fragment$c as equirect_frag }; - export { vertex$b as linedashed_vert }; - export { fragment$b as linedashed_frag }; - export { vertex$a as meshbasic_vert }; - export { fragment$a as meshbasic_frag }; - export { vertex$9 as meshlambert_vert }; - export { fragment$9 as meshlambert_frag }; - export { vertex$8 as meshmatcap_vert }; - export { fragment$8 as meshmatcap_frag }; - export { vertex$7 as meshnormal_vert }; - export { fragment$7 as meshnormal_frag }; - export { vertex$6 as meshphong_vert }; - export { fragment$6 as meshphong_frag }; - export { vertex$5 as meshphysical_vert }; - export { fragment$5 as meshphysical_frag }; - export { vertex$4 as meshtoon_vert }; - export { fragment$4 as meshtoon_frag }; - export { vertex$3 as points_vert }; - export { fragment$3 as points_frag }; - export { vertex$2 as shadow_vert }; - export { fragment$2 as shadow_frag }; - export { vertex$1 as sprite_vert }; - export { fragment$1 as sprite_frag }; -} -export namespace ShaderLib { - namespace physical { - export let uniforms: Object; - import vertexShader = ShaderChunk.meshphysical_vert; - export { vertexShader }; - import fragmentShader = ShaderChunk.meshphysical_frag; - export { fragmentShader }; - } -} -import { ShaderMaterial } from './three.core.js'; -import { ShortType } from './three.core.js'; -import { SrcAlphaFactor } from './three.core.js'; -import { SrcAlphaSaturateFactor } from './three.core.js'; -import { SrcColorFactor } from './three.core.js'; -import { SubtractEquation } from './three.core.js'; -import { SubtractiveBlending } from './three.core.js'; -import { TangentSpaceNormalMap } from './three.core.js'; -import { Texture } from './three.core.js'; -import { Uint16BufferAttribute } from './three.core.js'; -import { Uint32BufferAttribute } from './three.core.js'; -export namespace UniformsLib { - export namespace common_1 { - namespace diffuse { - let value: Color; - } - namespace opacity { - let value_1: number; - export { value_1 as value }; - } - namespace map { - let value_2: null; - export { value_2 as value }; - } - namespace mapTransform { - let value_3: Matrix3; - export { value_3 as value }; - } - namespace alphaMap { - let value_4: null; - export { value_4 as value }; - } - namespace alphaMapTransform { - let value_5: Matrix3; - export { value_5 as value }; - } - namespace alphaTest { - let value_6: number; - export { value_6 as value }; - } - } - export { common_1 as common }; - export namespace specularmap { - namespace specularMap { - let value_7: null; - export { value_7 as value }; - } - namespace specularMapTransform { - let value_8: Matrix3; - export { value_8 as value }; - } - } - export namespace envmap { - namespace envMap { - let value_9: null; - export { value_9 as value }; - } - namespace envMapRotation { - let value_10: Matrix3; - export { value_10 as value }; - } - namespace reflectivity { - let value_11: number; - export { value_11 as value }; - } - namespace ior { - let value_12: number; - export { value_12 as value }; - } - namespace refractionRatio { - let value_13: number; - export { value_13 as value }; - } - namespace dfgLUT { - let value_14: null; - export { value_14 as value }; - } - } - export namespace aomap { - namespace aoMap { - let value_15: null; - export { value_15 as value }; - } - namespace aoMapIntensity { - let value_16: number; - export { value_16 as value }; - } - namespace aoMapTransform { - let value_17: Matrix3; - export { value_17 as value }; - } - } - export namespace lightmap { - namespace lightMap { - let value_18: null; - export { value_18 as value }; - } - namespace lightMapIntensity { - let value_19: number; - export { value_19 as value }; - } - namespace lightMapTransform { - let value_20: Matrix3; - export { value_20 as value }; - } - } - export namespace bumpmap { - namespace bumpMap { - let value_21: null; - export { value_21 as value }; - } - namespace bumpMapTransform { - let value_22: Matrix3; - export { value_22 as value }; - } - namespace bumpScale { - let value_23: number; - export { value_23 as value }; - } - } - export namespace normalmap { - namespace normalMap { - let value_24: null; - export { value_24 as value }; - } - namespace normalMapTransform { - let value_25: Matrix3; - export { value_25 as value }; - } - namespace normalScale { - let value_26: Vector2; - export { value_26 as value }; - } - } - export namespace displacementmap { - namespace displacementMap { - let value_27: null; - export { value_27 as value }; - } - namespace displacementMapTransform { - let value_28: Matrix3; - export { value_28 as value }; - } - namespace displacementScale { - let value_29: number; - export { value_29 as value }; - } - namespace displacementBias { - let value_30: number; - export { value_30 as value }; - } - } - export namespace emissivemap { - namespace emissiveMap { - let value_31: null; - export { value_31 as value }; - } - namespace emissiveMapTransform { - let value_32: Matrix3; - export { value_32 as value }; - } - } - export namespace metalnessmap { - namespace metalnessMap { - let value_33: null; - export { value_33 as value }; - } - namespace metalnessMapTransform { - let value_34: Matrix3; - export { value_34 as value }; - } - } - export namespace roughnessmap { - namespace roughnessMap { - let value_35: null; - export { value_35 as value }; - } - namespace roughnessMapTransform { - let value_36: Matrix3; - export { value_36 as value }; - } - } - export namespace gradientmap { - namespace gradientMap { - let value_37: null; - export { value_37 as value }; - } - } - export namespace fog { - namespace fogDensity { - let value_38: number; - export { value_38 as value }; - } - namespace fogNear { - let value_39: number; - export { value_39 as value }; - } - namespace fogFar { - let value_40: number; - export { value_40 as value }; - } - namespace fogColor { - let value_41: Color; - export { value_41 as value }; - } - } - export namespace lights { - namespace ambientLightColor { - let value_42: never[]; - export { value_42 as value }; - } - namespace lightProbe { - let value_43: never[]; - export { value_43 as value }; - } - namespace directionalLights { - let value_44: never[]; - export { value_44 as value }; - export namespace properties { - let direction: {}; - let color: {}; - } - } - namespace directionalLightShadows { - let value_45: never[]; - export { value_45 as value }; - export namespace properties_1 { - let shadowIntensity: number; - let shadowBias: {}; - let shadowNormalBias: {}; - let shadowRadius: {}; - let shadowMapSize: {}; - } - export { properties_1 as properties }; - } - namespace directionalShadowMatrix { - let value_46: never[]; - export { value_46 as value }; - } - namespace spotLights { - let value_47: never[]; - export { value_47 as value }; - export namespace properties_2 { - let color_1: {}; - export { color_1 as color }; - export let position: {}; - let direction_1: {}; - export { direction_1 as direction }; - export let distance: {}; - export let coneCos: {}; - export let penumbraCos: {}; - export let decay: {}; - } - export { properties_2 as properties }; - } - namespace spotLightShadows { - let value_48: never[]; - export { value_48 as value }; - export namespace properties_3 { - let shadowIntensity_1: number; - export { shadowIntensity_1 as shadowIntensity }; - let shadowBias_1: {}; - export { shadowBias_1 as shadowBias }; - let shadowNormalBias_1: {}; - export { shadowNormalBias_1 as shadowNormalBias }; - let shadowRadius_1: {}; - export { shadowRadius_1 as shadowRadius }; - let shadowMapSize_1: {}; - export { shadowMapSize_1 as shadowMapSize }; - } - export { properties_3 as properties }; - } - namespace spotLightMap { - let value_49: never[]; - export { value_49 as value }; - } - namespace spotLightMatrix { - let value_50: never[]; - export { value_50 as value }; - } - namespace pointLights { - let value_51: never[]; - export { value_51 as value }; - export namespace properties_4 { - let color_2: {}; - export { color_2 as color }; - let position_1: {}; - export { position_1 as position }; - let decay_1: {}; - export { decay_1 as decay }; - let distance_1: {}; - export { distance_1 as distance }; - } - export { properties_4 as properties }; - } - namespace pointLightShadows { - let value_52: never[]; - export { value_52 as value }; - export namespace properties_5 { - let shadowIntensity_2: number; - export { shadowIntensity_2 as shadowIntensity }; - let shadowBias_2: {}; - export { shadowBias_2 as shadowBias }; - let shadowNormalBias_2: {}; - export { shadowNormalBias_2 as shadowNormalBias }; - let shadowRadius_2: {}; - export { shadowRadius_2 as shadowRadius }; - let shadowMapSize_2: {}; - export { shadowMapSize_2 as shadowMapSize }; - export let shadowCameraNear: {}; - export let shadowCameraFar: {}; - } - export { properties_5 as properties }; - } - namespace pointShadowMatrix { - let value_53: never[]; - export { value_53 as value }; - } - namespace hemisphereLights { - let value_54: never[]; - export { value_54 as value }; - export namespace properties_6 { - let direction_2: {}; - export { direction_2 as direction }; - export let skyColor: {}; - export let groundColor: {}; - } - export { properties_6 as properties }; - } - namespace rectAreaLights { - let value_55: never[]; - export { value_55 as value }; - export namespace properties_7 { - let color_3: {}; - export { color_3 as color }; - let position_2: {}; - export { position_2 as position }; - export let width: {}; - export let height: {}; - } - export { properties_7 as properties }; - } - namespace ltc_1 { - let value_56: null; - export { value_56 as value }; - } - namespace ltc_2 { - let value_57: null; - export { value_57 as value }; - } - namespace probesSH { - let value_58: null; - export { value_58 as value }; - } - namespace probesMin { - let value_59: Vector3; - export { value_59 as value }; - } - namespace probesMax { - let value_60: Vector3; - export { value_60 as value }; - } - namespace probesResolution { - let value_61: Vector3; - export { value_61 as value }; - } - } - export namespace points { - export namespace diffuse_1 { - let value_62: Color; - export { value_62 as value }; - } - export { diffuse_1 as diffuse }; - export namespace opacity_1 { - let value_63: number; - export { value_63 as value }; - } - export { opacity_1 as opacity }; - export namespace size { - let value_64: number; - export { value_64 as value }; - } - export namespace scale { - let value_65: number; - export { value_65 as value }; - } - export namespace map_1 { - let value_66: null; - export { value_66 as value }; - } - export { map_1 as map }; - export namespace alphaMap_1 { - let value_67: null; - export { value_67 as value }; - } - export { alphaMap_1 as alphaMap }; - export namespace alphaMapTransform_1 { - let value_68: Matrix3; - export { value_68 as value }; - } - export { alphaMapTransform_1 as alphaMapTransform }; - export namespace alphaTest_1 { - let value_69: number; - export { value_69 as value }; - } - export { alphaTest_1 as alphaTest }; - export namespace uvTransform { - let value_70: Matrix3; - export { value_70 as value }; - } - } - export namespace sprite { - export namespace diffuse_2 { - let value_71: Color; - export { value_71 as value }; - } - export { diffuse_2 as diffuse }; - export namespace opacity_2 { - let value_72: number; - export { value_72 as value }; - } - export { opacity_2 as opacity }; - export namespace center { - let value_73: Vector2; - export { value_73 as value }; - } - export namespace rotation { - let value_74: number; - export { value_74 as value }; - } - export namespace map_2 { - let value_75: null; - export { value_75 as value }; - } - export { map_2 as map }; - export namespace mapTransform_1 { - let value_76: Matrix3; - export { value_76 as value }; - } - export { mapTransform_1 as mapTransform }; - export namespace alphaMap_2 { - let value_77: null; - export { value_77 as value }; - } - export { alphaMap_2 as alphaMap }; - export namespace alphaMapTransform_2 { - let value_78: Matrix3; - export { value_78 as value }; - } - export { alphaMapTransform_2 as alphaMapTransform }; - export namespace alphaTest_2 { - let value_79: number; - export { value_79 as value }; - } - export { alphaTest_2 as alphaTest }; - } -} -import { UniformsUtils } from './three.core.js'; -import { UnsignedByteType } from './three.core.js'; -import { UnsignedInt101111Type } from './three.core.js'; -import { UnsignedInt248Type } from './three.core.js'; -import { UnsignedInt5999Type } from './three.core.js'; -import { UnsignedIntType } from './three.core.js'; -import { UnsignedShort4444Type } from './three.core.js'; -import { UnsignedShort5551Type } from './three.core.js'; -import { UnsignedShortType } from './three.core.js'; -import { VSMShadowMap } from './three.core.js'; -import { Vector2 } from './three.core.js'; -import { Vector3 } from './three.core.js'; -import { Vector4 } from './three.core.js'; -import { WebGLCoordinateSystem } from './three.core.js'; -/** - * A cube render target used in context of {@link WebGLRenderer}. - * - * @augments WebGLRenderTarget - */ -export class WebGLCubeRenderTarget extends WebGLRenderTarget { - /** - * Constructs a new cube render target. - * - * @param {number} [size=1] - The size of the render target. - * @param {RenderTarget~Options} [options] - The configuration object. - */ - constructor(size?: number, options?: {}); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWebGLCubeRenderTarget: boolean; - /** - * Converts the given equirectangular texture to a cube map. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {Texture} texture - The equirectangular texture. - * @return {WebGLCubeRenderTarget} A reference to this cube render target. - */ - fromEquirectangularTexture(renderer: WebGLRenderer, texture: Texture): WebGLCubeRenderTarget; - /** - * Clears this cube render target. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {boolean} [color=true] - Whether the color buffer should be cleared or not. - * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not. - * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not. - */ - clear(renderer: WebGLRenderer, color?: boolean, depth?: boolean, stencil?: boolean): void; -} -import { WebGLRenderTarget } from './three.core.js'; -/** - * This renderer uses WebGL 2 to display scenes. - * - * WebGL 1 is not supported since `r163`. - */ -export class WebGLRenderer { - /** - * Constructs a new WebGL renderer. - * - * @param {WebGLRenderer~Options} [parameters] - The configuration parameter. - */ - constructor(parameters?: {}); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWebGLRenderer: boolean; - /** - * A canvas where the renderer draws its output. This is automatically created by the renderer - * in the constructor (if not provided already); you just need to add it to your page like so: - * ```js - * document.body.appendChild( renderer.domElement ); - * ``` - * - * @type {HTMLCanvasElement|OffscreenCanvas} - */ - domElement: HTMLCanvasElement | OffscreenCanvas; - /** - * A object with debug configuration settings. - * - * - `checkShaderErrors`: If it is `true`, defines whether material shader programs are - * checked for errors during compilation and linkage process. It may be useful to disable - * this check in production for performance gain. It is strongly recommended to keep these - * checks enabled during development. If the shader does not compile and link, it will not - * work and associated material will not render. - * - `onShaderError(gl, program, glVertexShader,glFragmentShader)`: A callback function that - * can be used for custom error reporting. The callback receives the WebGL context, an instance - * of WebGLProgram as well two instances of WebGLShader representing the vertex and fragment shader. - * Assigning a custom function disables the default error reporting. - * - * @type {Object} - */ - debug: Object; - /** - * Whether the renderer should automatically clear its output before rendering a frame or not. - * - * @type {boolean} - * @default true - */ - autoClear: boolean; - /** - * If {@link WebGLRenderer#autoClear} set to `true`, whether the renderer should clear - * the color buffer or not. - * - * @type {boolean} - * @default true - */ - autoClearColor: boolean; - /** - * If {@link WebGLRenderer#autoClear} set to `true`, whether the renderer should clear - * the depth buffer or not. - * - * @type {boolean} - * @default true - */ - autoClearDepth: boolean; - /** - * If {@link WebGLRenderer#autoClear} set to `true`, whether the renderer should clear - * the stencil buffer or not. - * - * @type {boolean} - * @default true - */ - autoClearStencil: boolean; - /** - * Whether the renderer should sort objects or not. - * - * Note: Sorting is used to attempt to properly render objects that have some - * degree of transparency. By definition, sorting objects may not work in all - * cases. Depending on the needs of application, it may be necessary to turn - * off sorting and use other methods to deal with transparency rendering e.g. - * manually determining each object's rendering order. - * - * @type {boolean} - * @default true - */ - sortObjects: boolean; - /** - * User-defined clipping planes specified in world space. These planes apply globally. - * Points in space whose dot product with the plane is negative are cut away. - * - * @type {Array} - */ - clippingPlanes: Array; - /** - * Whether the renderer respects object-level clipping planes or not. - * - * @type {boolean} - * @default false - */ - localClippingEnabled: boolean; - /** - * The tone mapping technique of the renderer. - * - * @type {(NoToneMapping|LinearToneMapping|ReinhardToneMapping|CineonToneMapping|ACESFilmicToneMapping|CustomToneMapping|AgXToneMapping|NeutralToneMapping)} - * @default NoToneMapping - */ - toneMapping: (number | number | number | number | number | number | number | number); - /** - * Exposure level of tone mapping. - * - * @type {number} - * @default 1 - */ - toneMappingExposure: number; - /** - * The normalized resolution scale for the transmission render target, measured in percentage - * of viewport dimensions. Lowering this value can result in significant performance improvements - * when using {@link MeshPhysicalMaterial#transmission}. - * - * @type {number} - * @default 1 - */ - transmissionResolutionScale: number; - _outputColorSpace: string; - /** - * A reference to the XR manager. - * - * @type {WebXRManager} - */ - xr: WebXRManager; - /** - * Returns the rendering context. - * - * @return {WebGL2RenderingContext} The rendering context. - */ - getContext: () => WebGL2RenderingContext; - /** - * Returns the rendering context attributes. - * - * @return {WebGLContextAttributes} The rendering context attributes. - */ - getContextAttributes: () => WebGLContextAttributes; - /** - * Simulates a loss of the WebGL context. This requires support for the `WEBGL_lose_context` extension. - */ - forceContextLoss: () => void; - /** - * Simulates a restore of the WebGL context. This requires support for the `WEBGL_lose_context` extension. - */ - forceContextRestore: () => void; - /** - * Returns the pixel ratio. - * - * @return {number} The pixel ratio. - */ - getPixelRatio: () => number; - /** - * Sets the given pixel ratio and resizes the canvas if necessary. - * - * @param {number} value - The pixel ratio. - */ - setPixelRatio: (value: number) => void; - /** - * Returns the renderer's size in logical pixels. This method does not honor the pixel ratio. - * - * @param {Vector2} target - The method writes the result in this target object. - * @return {Vector2} The renderer's size in logical pixels. - */ - getSize: (target: Vector2) => Vector2; - /** - * Resizes the output canvas to (width, height) with device pixel ratio taken - * into account, and also sets the viewport to fit that size, starting in (0, - * 0). Setting `updateStyle` to false prevents any style changes to the output canvas. - * - * @param {number} width - The width in logical pixels. - * @param {number} height - The height in logical pixels. - * @param {boolean} [updateStyle=true] - Whether to update the `style` attribute of the canvas or not. - */ - setSize: (width: number, height: number, updateStyle?: boolean) => void; - /** - * Returns the drawing buffer size in physical pixels. This method honors the pixel ratio. - * - * @param {Vector2} target - The method writes the result in this target object. - * @return {Vector2} The drawing buffer size. - */ - getDrawingBufferSize: (target: Vector2) => Vector2; - /** - * This method allows to define the drawing buffer size by specifying - * width, height and pixel ratio all at once. The size of the drawing - * buffer is computed with this formula: - * ```js - * size.x = width * pixelRatio; - * size.y = height * pixelRatio; - * ``` - * - * @param {number} width - The width in logical pixels. - * @param {number} height - The height in logical pixels. - * @param {number} pixelRatio - The pixel ratio. - */ - setDrawingBufferSize: (width: number, height: number, pixelRatio: number) => void; - /** - * Sets the post-processing effects to be applied after rendering. - * - * @param {Array} effects - An array of post-processing effects. - */ - setEffects: (effects: any[]) => void; - /** - * Returns the current viewport definition. - * - * @param {Vector2} target - The method writes the result in this target object. - * @return {Vector2} The current viewport definition. - */ - getCurrentViewport: (target: Vector2) => Vector2; - /** - * Returns the viewport definition. - * - * @param {Vector4} target - The method writes the result in this target object. - * @return {Vector4} The viewport definition. - */ - getViewport: (target: Vector4) => Vector4; - /** - * Sets the viewport to render from `(x, y)` to `(x + width, y + height)`. - * - * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the viewport origin in logical pixel unit. - * Or alternatively a four-component vector specifying all the parameters of the viewport. - * @param {number} y - The vertical coordinate for the lower left corner of the viewport origin in logical pixel unit. - * @param {number} width - The width of the viewport in logical pixel unit. - * @param {number} height - The height of the viewport in logical pixel unit. - */ - setViewport: (x: number | Vector4, y: number, width: number, height: number) => void; - /** - * Returns the scissor region. - * - * @param {Vector4} target - The method writes the result in this target object. - * @return {Vector4} The scissor region. - */ - getScissor: (target: Vector4) => Vector4; - /** - * Sets the scissor region to render from `(x, y)` to `(x + width, y + height)`. - * - * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the scissor region origin in logical pixel unit. - * Or alternatively a four-component vector specifying all the parameters of the scissor region. - * @param {number} y - The vertical coordinate for the lower left corner of the scissor region origin in logical pixel unit. - * @param {number} width - The width of the scissor region in logical pixel unit. - * @param {number} height - The height of the scissor region in logical pixel unit. - */ - setScissor: (x: number | Vector4, y: number, width: number, height: number) => void; - /** - * Returns `true` if the scissor test is enabled. - * - * @return {boolean} Whether the scissor test is enabled or not. - */ - getScissorTest: () => boolean; - /** - * Enable or disable the scissor test. When this is enabled, only the pixels - * within the defined scissor area will be affected by further renderer - * actions. - * - * @param {boolean} boolean - Whether the scissor test is enabled or not. - */ - setScissorTest: (boolean: boolean) => void; - /** - * Sets a custom opaque sort function for the render lists. Pass `null` - * to use the default `painterSortStable` function. - * - * @param {?Function} method - The opaque sort function. - */ - setOpaqueSort: (method: Function | null) => void; - /** - * Sets a custom transparent sort function for the render lists. Pass `null` - * to use the default `reversePainterSortStable` function. - * - * @param {?Function} method - The opaque sort function. - */ - setTransparentSort: (method: Function | null) => void; - /** - * Returns the clear color. - * - * @param {Color} target - The method writes the result in this target object. - * @return {Color} The clear color. - */ - getClearColor: (target: Color) => Color; - /** - * Sets the clear color and alpha. - * - * @param {Color} color - The clear color. - * @param {number} [alpha=1] - The clear alpha. - */ - setClearColor: (...args: any[]) => void; - /** - * Returns the clear alpha. Ranges within `[0,1]`. - * - * @return {number} The clear alpha. - */ - getClearAlpha: () => number; - /** - * Sets the clear alpha. - * - * @param {number} alpha - The clear alpha. - */ - setClearAlpha: (...args: any[]) => void; - /** - * Tells the renderer to clear its color, depth or stencil drawing buffer(s). - * This method initializes the buffers to the current clear color values. - * - * @param {boolean} [color=true] - Whether the color buffer should be cleared or not. - * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not. - * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not. - */ - clear: (color?: boolean, depth?: boolean, stencil?: boolean) => void; - /** - * Clears the color buffer. Equivalent to calling `renderer.clear( true, false, false )`. - */ - clearColor: () => void; - /** - * Clears the depth buffer. Equivalent to calling `renderer.clear( false, true, false )`. - */ - clearDepth: () => void; - /** - * Clears the stencil buffer. Equivalent to calling `renderer.clear( false, false, true )`. - */ - clearStencil: () => void; - /** - * Sets a compatibility node builder for rendering node materials with WebGLRenderer. - * This enables using TSL (Three.js Shading Language) node materials to prepare - * for migration to WebGPURenderer. - * - * @param {WebGLNodesHandler} nodesHandler - The node builder instance. - */ - setNodesHandler: (nodesHandler: WebGLNodesHandler) => void; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose: () => void; - renderBufferDirect: (camera: any, scene: any, geometry: any, material: any, object: any, group: any) => void; - /** - * Compiles all materials in the scene with the camera. This is useful to precompile shaders - * before the first rendering. If you want to add a 3D object to an existing scene, use the third - * optional parameter for applying the target scene. - * - * Note that the (target) scene's lighting and environment must be configured before calling this method. - * - * @param {Object3D} scene - The scene or another type of 3D object to precompile. - * @param {Camera} camera - The camera. - * @param {?Scene} [targetScene=null] - The target scene. - * @return {Set} The precompiled materials. - */ - compile: (scene: Object3D, camera: Camera, targetScene?: Scene | null) => Set; - /** - * Asynchronous version of {@link WebGLRenderer#compile}. - * - * This method makes use of the `KHR_parallel_shader_compile` WebGL extension. Hence, - * it is recommended to use this version of `compile()` whenever possible. - * - * @async - * @param {Object3D} scene - The scene or another type of 3D object to precompile. - * @param {Camera} camera - The camera. - * @param {?Scene} [targetScene=null] - The target scene. - * @return {Promise} A Promise that resolves when the given scene can be rendered without unnecessary stalling due to shader compilation. - */ - compileAsync: (scene: Object3D, camera: Camera, targetScene?: Scene | null) => Promise; - /** - * Applications are advised to always define the animation loop - * with this method and not manually with `requestAnimationFrame()` - * for best compatibility. - * - * @param {?onAnimationCallback} callback - The application's animation loop. - */ - setAnimationLoop: (callback: onAnimationCallback | null) => void; - /** - * Renders the given scene (or other type of 3D object) using the given camera. - * - * The render is done to a previously specified render target set by calling {@link WebGLRenderer#setRenderTarget} - * or to the canvas as usual. - * - * By default render buffers are cleared before rendering but you can prevent - * this by setting the property `autoClear` to `false`. If you want to prevent - * only certain buffers being cleared you can `autoClearColor`, `autoClearDepth` - * or `autoClearStencil` to `false`. To force a clear, use {@link WebGLRenderer#clear}. - * - * @param {Object3D} scene - The scene to render. - * @param {Camera} camera - The camera. - */ - render: (scene: Object3D, camera: Camera) => void; - /** - * Returns the active cube face. - * - * @return {number} The active cube face. - */ - getActiveCubeFace: () => number; - /** - * Returns the active mipmap level. - * - * @return {number} The active mipmap level. - */ - getActiveMipmapLevel: () => number; - /** - * Returns the active render target. - * - * @return {?WebGLRenderTarget} The active render target. Returns `null` if no render target - * is currently set. - */ - getRenderTarget: () => WebGLRenderTarget | null; - setRenderTargetTextures: (renderTarget: any, colorTexture: any, depthTexture: any) => void; - setRenderTargetFramebuffer: (renderTarget: any, defaultFramebuffer: any) => void; - /** - * Sets the active rendertarget. - * - * @param {?WebGLRenderTarget} renderTarget - The render target to set. When `null` is given, - * the canvas is set as the active render target instead. - * @param {number} [activeCubeFace=0] - The active cube face when using a cube render target. - * Indicates the z layer to render in to when using 3D or array render targets. - * @param {number} [activeMipmapLevel=0] - The active mipmap level. - */ - setRenderTarget: (renderTarget: WebGLRenderTarget | null, activeCubeFace?: number, activeMipmapLevel?: number) => void; - /** - * Reads the pixel data from the given render target into the given buffer. - * - * @param {WebGLRenderTarget} renderTarget - The render target to read from. - * @param {number} x - The `x` coordinate of the copy region's origin. - * @param {number} y - The `y` coordinate of the copy region's origin. - * @param {number} width - The width of the copy region. - * @param {number} height - The height of the copy region. - * @param {TypedArray} buffer - The result buffer. - * @param {number} [activeCubeFaceIndex] - The active cube face index. - * @param {number} [textureIndex=0] - The texture index of an MRT render target. - */ - readRenderTargetPixels: (renderTarget: WebGLRenderTarget, x: number, y: number, width: number, height: number, buffer: TypedArray, activeCubeFaceIndex?: number, textureIndex?: number) => void; - /** - * Asynchronous, non-blocking version of {@link WebGLRenderer#readRenderTargetPixels}. - * - * It is recommended to use this version of `readRenderTargetPixels()` whenever possible. - * - * @async - * @param {WebGLRenderTarget} renderTarget - The render target to read from. - * @param {number} x - The `x` coordinate of the copy region's origin. - * @param {number} y - The `y` coordinate of the copy region's origin. - * @param {number} width - The width of the copy region. - * @param {number} height - The height of the copy region. - * @param {TypedArray} buffer - The result buffer. - * @param {number} [activeCubeFaceIndex] - The active cube face index. - * @param {number} [textureIndex=0] - The texture index of an MRT render target. - * @return {Promise} A Promise that resolves when the read has been finished. The resolve provides the read data as a typed array. - */ - readRenderTargetPixelsAsync: (renderTarget: WebGLRenderTarget, x: number, y: number, width: number, height: number, buffer: TypedArray, activeCubeFaceIndex?: number, textureIndex?: number) => Promise; - /** - * Copies pixels from the current bound framebuffer into the given texture. - * - * @param {FramebufferTexture} texture - The texture. - * @param {?Vector2} [position=null] - The start position of the copy operation. - * @param {number} [level=0] - The mip level. The default represents the base mip. - */ - copyFramebufferToTexture: (texture: FramebufferTexture, position?: Vector2 | null, level?: number) => void; - /** - * Copies data of the given source texture into a destination texture. - * - * When using render target textures as `srcTexture` and `dstTexture`, you must make sure both render targets are initialized - * {@link WebGLRenderer#initRenderTarget}. - * - * @param {Texture} srcTexture - The source texture. - * @param {Texture} dstTexture - The destination texture. - * @param {?(Box2|Box3)} [srcRegion=null] - A bounding box which describes the source region. Can be two or three-dimensional. - * @param {?(Vector2|Vector3)} [dstPosition=null] - A vector that represents the origin of the destination region. Can be two or three-dimensional. - * @param {number} [srcLevel=0] - The source mipmap level to copy. - * @param {?number} [dstLevel=0] - The destination mipmap level. - */ - copyTextureToTexture: (srcTexture: Texture, dstTexture: Texture, srcRegion?: (Box2 | Box3) | null, dstPosition?: (Vector2 | Vector3) | null, srcLevel?: number, dstLevel?: number | null) => void; - /** - * Initializes the given WebGLRenderTarget memory. Useful for initializing a render target so data - * can be copied into it using {@link WebGLRenderer#copyTextureToTexture} before it has been - * rendered to. - * - * @param {WebGLRenderTarget} target - The render target. - */ - initRenderTarget: (target: WebGLRenderTarget) => void; - /** - * Initializes the given texture. Useful for preloading a texture rather than waiting until first - * render (which can cause noticeable lags due to decode and GPU upload overhead). - * - * @param {Texture} texture - The texture. - */ - initTexture: (texture: Texture) => void; - /** - * Can be used to reset the internal WebGL state. This method is mostly - * relevant for applications which share a single WebGL context across - * multiple WebGL libraries. - */ - resetState: () => void; - /** - * Defines the coordinate system of the renderer. - * - * In `WebGLRenderer`, the value is always `WebGLCoordinateSystem`. - * - * @type {WebGLCoordinateSystem|WebGPUCoordinateSystem} - * @default WebGLCoordinateSystem - * @readonly - */ - readonly get coordinateSystem(): number | WebGPUCoordinateSystem; - set outputColorSpace(colorSpace: string | string); - /** - * Defines the output color space of the renderer. - * - * @type {SRGBColorSpace|LinearSRGBColorSpace} - * @default SRGBColorSpace - */ - get outputColorSpace(): string | string; -} -export function WebGLUtils(gl: any, extensions: any): { - convert: (p: any, colorSpace?: string) => any; -}; -import { WebXRController } from './three.core.js'; -import { ZeroFactor } from './three.core.js'; -import { createCanvasElement } from './three.core.js'; -import { error } from './three.core.js'; -import { log } from './three.core.js'; -import { warn } from './three.core.js'; -import { warnOnce } from './three.core.js'; -declare var alphahash_fragment: string; -declare var alphahash_pars_fragment: string; -declare var alphamap_fragment: string; -declare var alphamap_pars_fragment: string; -declare var alphatest_fragment: string; -declare var alphatest_pars_fragment: string; -declare var aomap_fragment: string; -declare var aomap_pars_fragment: string; -declare var batching_pars_vertex: string; -declare var batching_vertex: string; -declare var begin_vertex: string; -declare var beginnormal_vertex: string; -declare var bsdfs: string; -declare var iridescence_fragment: string; -declare var bumpmap_pars_fragment: string; -declare var clipping_planes_fragment: string; -declare var clipping_planes_pars_fragment: string; -declare var clipping_planes_pars_vertex: string; -declare var clipping_planes_vertex: string; -declare var color_fragment: string; -declare var color_pars_fragment: string; -declare var color_pars_vertex: string; -declare var color_vertex: string; -declare var common: string; -declare var cube_uv_reflection_fragment: string; -declare var defaultnormal_vertex: string; -declare var displacementmap_pars_vertex: string; -declare var displacementmap_vertex: string; -declare var emissivemap_fragment: string; -declare var emissivemap_pars_fragment: string; -declare var colorspace_fragment: string; -declare var colorspace_pars_fragment: string; -declare var envmap_fragment: string; -declare var envmap_common_pars_fragment: string; -declare var envmap_pars_fragment: string; -declare var envmap_pars_vertex: string; -declare var envmap_physical_pars_fragment: string; -declare var envmap_vertex: string; -declare var fog_vertex: string; -declare var fog_pars_vertex: string; -declare var fog_fragment: string; -declare var fog_pars_fragment: string; -declare var gradientmap_pars_fragment: string; -declare var lightmap_pars_fragment: string; -declare var lights_lambert_fragment: string; -declare var lights_lambert_pars_fragment: string; -declare var lights_pars_begin: string; -declare var lights_toon_fragment: string; -declare var lights_toon_pars_fragment: string; -declare var lights_phong_fragment: string; -declare var lights_phong_pars_fragment: string; -declare var lights_physical_fragment: string; -declare var lights_physical_pars_fragment: string; -declare var lights_fragment_begin: string; -declare var lights_fragment_maps: string; -declare var lights_fragment_end: string; -declare var lightprobes_pars_fragment: string; -declare var logdepthbuf_fragment: string; -declare var logdepthbuf_pars_fragment: string; -declare var logdepthbuf_pars_vertex: string; -declare var logdepthbuf_vertex: string; -declare var map_fragment: string; -declare var map_pars_fragment: string; -declare var map_particle_fragment: string; -declare var map_particle_pars_fragment: string; -declare var metalnessmap_fragment: string; -declare var metalnessmap_pars_fragment: string; -declare var morphinstance_vertex: string; -declare var morphcolor_vertex: string; -declare var morphnormal_vertex: string; -declare var morphtarget_pars_vertex: string; -declare var morphtarget_vertex: string; -declare var normal_fragment_begin: string; -declare var normal_fragment_maps: string; -declare var normal_pars_fragment: string; -declare var normal_pars_vertex: string; -declare var normal_vertex: string; -declare var normalmap_pars_fragment: string; -declare var clearcoat_normal_fragment_begin: string; -declare var clearcoat_normal_fragment_maps: string; -declare var clearcoat_pars_fragment: string; -declare var iridescence_pars_fragment: string; -declare var opaque_fragment: string; -declare var packing: string; -declare var premultiplied_alpha_fragment: string; -declare var project_vertex: string; -declare var dithering_fragment: string; -declare var dithering_pars_fragment: string; -declare var roughnessmap_fragment: string; -declare var roughnessmap_pars_fragment: string; -declare var shadowmap_pars_fragment: string; -declare var shadowmap_pars_vertex: string; -declare var shadowmap_vertex: string; -declare var shadowmask_pars_fragment: string; -declare var skinbase_vertex: string; -declare var skinning_pars_vertex: string; -declare var skinning_vertex: string; -declare var skinnormal_vertex: string; -declare var specularmap_fragment: string; -declare var specularmap_pars_fragment: string; -declare var tonemapping_fragment: string; -declare var tonemapping_pars_fragment: string; -declare var transmission_fragment: string; -declare var transmission_pars_fragment: string; -declare var uv_pars_fragment: string; -declare var uv_pars_vertex: string; -declare var uv_vertex: string; -declare var worldpos_vertex: string; -declare const vertex$h: "varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}"; -declare const fragment$h: "uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}"; -declare const vertex$g: "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}"; -declare const fragment$g: "#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vWorldDirection );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}"; -declare const vertex$f: "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}"; -declare const fragment$f: "uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}"; -declare const vertex$e: "#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}"; -declare const fragment$e: "#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\tfloat fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ];\n\t#else\n\t\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5;\n\t#endif\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\n\t#endif\n}"; -declare const vertex$d: "#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}"; -declare const fragment$d: "#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = vec4( dist, 0.0, 0.0, 1.0 );\n}"; -declare const vertex$c: "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}"; -declare const fragment$c: "uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}"; -declare const vertex$b: "uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; -declare const fragment$b: "uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; -declare const vertex$a: "#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; -declare const fragment$a: "uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; -declare const vertex$9: "#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}"; -declare const fragment$9: "#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; -declare const vertex$8: "#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}"; -declare const fragment$8: "#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; -declare const vertex$7: "#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}"; -declare const fragment$7: "#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( normalize( normal ) * 0.5 + 0.5, diffuseColor.a );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}"; -declare const vertex$6: "#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}"; -declare const fragment$6: "#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; -declare const vertex$5: "#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}"; -declare const fragment$5: "#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n\tuniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n \n\t\toutgoingLight = outgoingLight + sheenSpecularDirect + sheenSpecularIndirect;\n \n \t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; -declare const vertex$4: "#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}"; -declare const fragment$4: "#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; -declare const vertex$3: "uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}"; -declare const fragment$3: "uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; -declare const vertex$2: "#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}"; -declare const fragment$2: "uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n\t#include \n}"; -declare const vertex$1: "uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix[ 3 ];\n\tvec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}"; -declare const fragment$1: "uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"; -/** - * This class represents an abstraction of the WebXR Device API and is - * internally used by {@link WebGLRenderer}. `WebXRManager` also provides a public - * interface that allows users to enable/disable XR and perform XR related - * tasks like for instance retrieving controllers. - * - * @augments EventDispatcher - * @hideconstructor - */ -declare class WebXRManager extends EventDispatcher { - /** - * Constructs a new WebGL renderer. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGL2RenderingContext} gl - The rendering context. - */ - constructor(renderer: WebGLRenderer, gl: WebGL2RenderingContext); - /** - * Whether the manager's XR camera should be automatically updated or not. - * - * @type {boolean} - * @default true - */ - cameraAutoUpdate: boolean; - /** - * This flag notifies the renderer to be ready for XR rendering. Set it to `true` - * if you are going to use XR in your app. - * - * @type {boolean} - * @default false - */ - enabled: boolean; - /** - * Whether XR presentation is active or not. - * - * @type {boolean} - * @readonly - * @default false - */ - readonly isPresenting: boolean; - /** - * Returns a group representing the `target ray` space of the XR controller. - * Use this space for visualizing 3D objects that support the user in pointing - * tasks like UI interaction. - * - * @param {number} index - The index of the controller. - * @return {Group} A group representing the `target ray` space. - */ - getController: (index: number) => Group; - /** - * Returns a group representing the `grip` space of the XR controller. - * Use this space for visualizing 3D objects that support the user in pointing - * tasks like UI interaction. - * - * Note: If you want to show something in the user's hand AND offer a - * pointing ray at the same time, you'll want to attached the handheld object - * to the group returned by `getControllerGrip()` and the ray to the - * group returned by `getController()`. The idea is to have two - * different groups in two different coordinate spaces for the same WebXR - * controller. - * - * @param {number} index - The index of the controller. - * @return {Group} A group representing the `grip` space. - */ - getControllerGrip: (index: number) => Group; - /** - * Returns a group representing the `hand` space of the XR controller. - * Use this space for visualizing 3D objects that support the user in pointing - * tasks like UI interaction. - * - * @param {number} index - The index of the controller. - * @return {Group} A group representing the `hand` space. - */ - getHand: (index: number) => Group; - /** - * Sets the framebuffer scale factor. - * - * This method can not be used during a XR session. - * - * @param {number} value - The framebuffer scale factor. - */ - setFramebufferScaleFactor: (value: number) => void; - /** - * Sets the reference space type. Can be used to configure a spatial relationship with the user's physical - * environment. Depending on how the user moves in 3D space, setting an appropriate reference space can - * improve tracking. Default is `local-floor`. Valid values can be found here - * https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpace#reference_space_types. - * - * This method can not be used during a XR session. - * - * @param {string} value - The reference space type. - */ - setReferenceSpaceType: (value: string) => void; - /** - * Returns the XR reference space. - * - * @return {XRReferenceSpace} The XR reference space. - */ - getReferenceSpace: () => XRReferenceSpace; - /** - * Sets a custom XR reference space. - * - * @param {XRReferenceSpace} space - The XR reference space. - */ - setReferenceSpace: (space: XRReferenceSpace) => void; - /** - * Returns the current base layer. - * - * This is an `XRProjectionLayer` when the targeted XR device supports the - * WebXR Layers API, or an `XRWebGLLayer` otherwise. - * - * @return {?(XRWebGLLayer|XRProjectionLayer)} The XR base layer. - */ - getBaseLayer: () => (XRWebGLLayer | XRProjectionLayer) | null; - /** - * Returns the current XR binding. - * - * Creates a new binding if needed and the browser is - * capable of doing so. - * - * @return {?XRWebGLBinding} The XR binding. Returns `null` if one cannot be created. - */ - getBinding: () => XRWebGLBinding | null; - /** - * Returns the current XR frame. - * - * @return {?XRFrame} The XR frame. Returns `null` when used outside a XR session. - */ - getFrame: () => XRFrame | null; - /** - * Returns the current XR session. - * - * @return {?XRSession} The XR session. Returns `null` when used outside a XR session. - */ - getSession: () => XRSession | null; - /** - * After a XR session has been requested usually with one of the `*Button` modules, it - * is injected into the renderer with this method. This method triggers the start of - * the actual XR rendering. - * - * @async - * @param {XRSession} value - The XR session to set. - * @return {Promise} A Promise that resolves when the session has been set. - */ - setSession: (value: XRSession) => Promise; - /** - * Returns the environment blend mode from the current XR session. - * - * @return {'opaque'|'additive'|'alpha-blend'|undefined} The environment blend mode. Returns `undefined` when used outside of a XR session. - */ - getEnvironmentBlendMode: () => "opaque" | "additive" | "alpha-blend" | undefined; - /** - * Returns the current depth texture computed via depth sensing. - * - * See {@link WebXRDepthSensing#getDepthTexture}. - * - * @return {?Texture} The depth texture. - */ - getDepthTexture: () => Texture | null; - /** - * Updates the state of the XR camera. Use this method on app level if you - * set `cameraAutoUpdate` to `false`. The method requires the non-XR - * camera of the scene as a parameter. The passed in camera's transformation - * is automatically adjusted to the position of the XR camera when calling - * this method. - * - * @param {Camera} camera - The camera. - */ - updateCamera: (camera: Camera) => void; - /** - * Returns an instance of {@link ArrayCamera} which represents the XR camera - * of the active XR session. For each view it holds a separate camera object. - * - * The camera's `fov` is currently not used and does not reflect the fov of - * the XR camera. If you need the fov on app level, you have to compute in - * manually from the XR camera's projection matrices. - * - * @return {ArrayCamera} The XR camera. - */ - getCamera: () => ArrayCamera; - /** - * Returns the amount of foveation used by the XR compositor for the projection layer. - * - * @return {number|undefined} The amount of foveation. - */ - getFoveation: () => number | undefined; - /** - * Sets the foveation value. - * - * @param {number} value - A number in the range `[0,1]` where `0` means no foveation (full resolution) - * and `1` means maximum foveation (the edges render at lower resolution). - */ - setFoveation: (value: number) => void; - /** - * Returns `true` if depth sensing is supported. - * - * @return {boolean} Whether depth sensing is supported or not. - */ - hasDepthSensing: () => boolean; - /** - * Returns the depth sensing mesh. - * - * See {@link WebXRDepthSensing#getMesh}. - * - * @return {Mesh} The depth sensing mesh. - */ - getDepthSensingMesh: () => Mesh; - /** - * Retrieves an opaque texture from the view-aligned {@link XRCamera}. - * Only available during the current animation loop. - * - * @param {XRCamera} xrCamera - The camera to query. - * @return {?Texture} An opaque texture representing the current raw camera frame. - */ - getCameraTexture: (xrCamera: XRCamera) => Texture | null; - setAnimationLoop: (callback: any) => void; - dispose: () => void; -} -export { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveBlending, AgXToneMapping, AlphaFormat, AlwaysCompare, AlwaysDepth, ArrayCamera, BackSide, BoxGeometry, BufferAttribute, BufferGeometry, ByteType, CineonToneMapping, ClampToEdgeWrapping, Color, ColorManagement, ConstantAlphaFactor, ConstantColorFactor, CubeCamera, CubeDepthTexture, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeUVReflectionMapping, CullFaceBack, CullFaceFront, CullFaceNone, CustomBlending, CustomToneMapping, Data3DTexture, DataArrayTexture, DataTexture, DepthFormat, DepthStencilFormat, DepthTexture, DoubleSide, DstAlphaFactor, DstColorFactor, EqualCompare, EqualDepth, EquirectangularReflectionMapping, EquirectangularRefractionMapping, EventDispatcher, ExternalTexture, Float32BufferAttribute, FloatType, FrontSide, Frustum, GLSL3, GreaterCompare, GreaterDepth, GreaterEqualCompare, GreaterEqualDepth, HalfFloatType, IntType, Layers, LessCompare, LessDepth, LessEqualCompare, LessEqualDepth, LinearFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, LinearToneMapping, LinearTransfer, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshDistanceMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeutralToneMapping, NeverCompare, NeverDepth, NoBlending, NoColorSpace, NoToneMapping, NormalBlending, NotEqualCompare, NotEqualDepth, ObjectSpaceNormalMap, OneFactor, OneMinusConstantAlphaFactor, OneMinusConstantColorFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, PCFShadowMap, PCFSoftShadowMap, PerspectiveCamera, Plane, PlaneGeometry, R11_EAC_Format, RED_GREEN_RGTC2_Format, RED_RGTC1_Format, REVISION, RG11_EAC_Format, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGBFormat, RGB_BPTC_SIGNED_Format, RGB_BPTC_UNSIGNED_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGFormat, RGIntegerFormat, RawShaderMaterial, RedFormat, RedIntegerFormat, ReinhardToneMapping, RepeatWrapping, ReverseSubtractEquation, SIGNED_R11_EAC_Format, SIGNED_RED_GREEN_RGTC2_Format, SIGNED_RED_RGTC1_Format, SIGNED_RG11_EAC_Format, SRGBColorSpace, SRGBTransfer, ShaderMaterial, ShortType, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, SubtractEquation, SubtractiveBlending, TangentSpaceNormalMap, Texture, Uint16BufferAttribute, Uint32BufferAttribute, UniformsUtils, UnsignedByteType, UnsignedInt101111Type, UnsignedInt248Type, UnsignedInt5999Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, WebGLCoordinateSystem, WebGLRenderTarget, WebXRController, ZeroFactor, createCanvasElement, error, log, warn, warnOnce }; -export { AdditiveAnimationBlendMode, AlwaysStencilFunc, AmbientLight, AnimationAction, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrowHelper, AttachedBindMode, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BasicDepthPacking, BasicShadowMap, BatchedMesh, BezierInterpolant, Bone, BooleanKeyframeTrack, Box2, Box3, Box3Helper, BoxHelper, BufferGeometryLoader, Cache, Camera, CameraHelper, CanvasTexture, CapsuleGeometry, CatmullRomCurve3, CircleGeometry, Clock, ColorKeyframeTrack, Compatibility, CompressedArrayTexture, CompressedCubeTexture, CompressedTexture, CompressedTextureLoader, ConeGeometry, Controls, CubeTextureLoader, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceFrontBack, Curve, CurvePath, CylinderGeometry, Cylindrical, DataTextureLoader, DataUtils, DecrementStencilOp, DecrementWrapStencilOp, DefaultLoadingManager, DetachedBindMode, DirectionalLight, DirectionalLightHelper, DiscreteInterpolant, DodecahedronGeometry, DynamicCopyUsage, DynamicDrawUsage, DynamicReadUsage, EdgesGeometry, EllipseCurve, EqualStencilFunc, Euler, ExtrudeGeometry, FileLoader, Float16BufferAttribute, Fog, FogExp2, FramebufferTexture, FrustumArray, GLBufferAttribute, GLSL1, GreaterEqualStencilFunc, GreaterStencilFunc, GridHelper, Group, HTMLTexture, HemisphereLight, HemisphereLightHelper, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedBufferGeometry, InstancedInterleavedBuffer, InstancedMesh, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, InterleavedBuffer, InterleavedBufferAttribute, Interpolant, InterpolateBezier, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InterpolationSamplingMode, InterpolationSamplingType, InvertStencilOp, KeepStencilOp, KeyframeTrack, LOD, LatheGeometry, LessEqualStencilFunc, LessStencilFunc, Light, LightProbe, Line, Line3, LineBasicMaterial, LineCurve, LineCurve3, LineDashedMaterial, LineLoop, LineSegments, LinearInterpolant, LinearMipMapLinearFilter, LinearMipMapNearestFilter, Loader, LoaderUtils, LoadingManager, LoopOnce, LoopPingPong, LoopRepeat, MOUSE, Material, MaterialBlending, MaterialLoader, MathUtils, Matrix2, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NeverStencilFunc, NoNormalPacking, NormalAnimationBlendMode, NormalGAPacking, NormalRGPacking, NotEqualStencilFunc, NumberKeyframeTrack, Object3D, ObjectLoader, OctahedronGeometry, Path, PlaneHelper, PointLight, PointLightHelper, Points, PointsMaterial, PolarGridHelper, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, Quaternion, QuaternionKeyframeTrack, QuaternionLinearInterpolant, RGBADepthPacking, RGBDepthPacking, RGBIntegerFormat, RGDepthPacking, Ray, Raycaster, RectAreaLight, RenderTarget, RenderTarget3D, ReplaceStencilOp, RingGeometry, Scene, ShadowMaterial, Shape, ShapeGeometry, ShapePath, ShapeUtils, Skeleton, SkeletonHelper, SkinnedMesh, Source, Sphere, SphereGeometry, Spherical, SphericalHarmonics3, SplineCurve, SpotLight, SpotLightHelper, Sprite, SpriteMaterial, StaticCopyUsage, StaticDrawUsage, StaticReadUsage, StereoCamera, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, TOUCH, TetrahedronGeometry, TextureLoader, TextureUtils, Timer, TimestampQuery, TorusGeometry, TorusKnotGeometry, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry, UVMapping, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsGroup, VectorKeyframeTrack, VideoFrameTexture, VideoTexture, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGPUCoordinateSystem, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroSlopeEnding, ZeroStencilOp, getConsoleFunction, setConsoleFunction } from "./three.core.js"; diff --git a/jsdoc-testing/jsdoc/build/three.webgpu.d.ts b/jsdoc-testing/jsdoc/build/three.webgpu.d.ts deleted file mode 100644 index c7d41b22a..000000000 --- a/jsdoc-testing/jsdoc/build/three.webgpu.d.ts +++ /dev/null @@ -1,23873 +0,0 @@ -import { ACESFilmicToneMapping } from './three.core.js'; -/** - * A generic class that can be used by nodes which contribute - * ambient occlusion to the scene. E.g. an ambient occlusion map - * node can be used as input for this module. Used in {@link NodeMaterial}. - * - * @augments LightingNode - */ -export class AONode extends LightingNode { - /** - * Constructs a new AO node. - * - * @param {?Node} [aoNode=null] - The ambient occlusion node. - */ - constructor(aoNode?: Node | null); - /** - * The ambient occlusion node. - * - * @type {?Node} - * @default null - */ - aoNode: Node | null; - setup(builder: any): void; -} -import { AddEquation } from './three.core.js'; -import { AddOperation } from './three.core.js'; -import { AdditiveBlending } from './three.core.js'; -import { AgXToneMapping } from './three.core.js'; -import { AlphaFormat } from './three.core.js'; -import { AlwaysCompare } from './three.core.js'; -import { AlwaysDepth } from './three.core.js'; -import { AlwaysStencilFunc } from './three.core.js'; -import { AmbientLight } from './three.core.js'; -/** - * Module for representing ambient lights as nodes. - * - * @augments AnalyticLightNode - */ -export class AmbientLightNode extends AnalyticLightNode { - /** - * Constructs a new ambient light node. - * - * @param {?AmbientLight} [light=null] - The ambient light source. - */ - constructor(light?: AmbientLight | null); - setup({ context }: { - context: any; - }): void; -} -/** - * Base class for analytic light nodes. - * - * @augments LightingNode - */ -export class AnalyticLightNode extends LightingNode { - /** - * Constructs a new analytic light node. - * - * @param {?Light} [light=null] - The light source. - */ - constructor(light?: Light | null); - /** - * The light source. - * - * @type {?Light} - * @default null - */ - light: Light | null; - /** - * The light's color value. - * - * @type {Color} - */ - color: Color; - /** - * The light's color node. Points to `colorNode` of the light source, if set. Otherwise - * it creates a uniform node based on {@link AnalyticLightNode#color}. - * - * @type {Node} - */ - colorNode: Node; - /** - * This property is used to retain a reference to the original value of {@link AnalyticLightNode#colorNode}. - * The final color node is represented by a different node when using shadows. - * - * @type {?Node} - * @default null - */ - baseColorNode: Node | null; - /** - * Represents the light's shadow. - * - * @type {?ShadowNode} - * @default null - */ - shadowNode: ShadowNode | null; - /** - * Represents the light's shadow color. - * - * @type {?Node} - * @default null - */ - shadowColorNode: Node | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isAnalyticLightNode: boolean; - _shadowDisposeListener: (() => void) | undefined; - /** - * Frees internal resources related to shadows. - */ - disposeShadow(): void; - getHash(): any; - /** - * Returns a node representing a direction vector which points from the current - * position in view space to the light's position in view space. - * - * @param {NodeBuilder} builder - The builder object used for setting up the light. - * @return {Node} The light vector node. - */ - getLightVector(builder: NodeBuilder): Node; - /** - * Sets up the direct lighting for the analytic light node. - * - * @abstract - * @param {NodeBuilder} builder - The builder object used for setting up the light. - * @return {Object|undefined} The direct light data (color and direction). - */ - setupDirect(): Object | undefined; - /** - * Sets up the direct rect area lighting for the analytic light node. - * - * @abstract - * @param {NodeBuilder} builder - The builder object used for setting up the light. - * @return {Object|undefined} The direct rect area light data. - */ - setupDirectRectArea(): Object | undefined; - /** - * Setups the shadow node for this light. The method exists so concrete light classes - * can setup different types of shadow nodes. - * - * @return {ShadowNode} The created shadow node. - */ - setupShadowNode(): ShadowNode; - /** - * Setups the shadow for this light. This method is only executed if the light - * cast shadows and the current build object receives shadows. It incorporates - * shadows into the lighting computation. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setupShadow(builder: NodeBuilder): void; - /** - * Unlike most other nodes, lighting nodes do not return a output node in {@link Node#setup}. - * The main purpose of lighting nodes is to configure the current {@link LightingModel} and/or - * invocate the respective interface methods. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setup(builder: NodeBuilder): void; - /** - * The update method is used to update light uniforms per frame. - * Potentially overwritten in concrete light nodes to update light - * specific uniforms. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update(): void; -} -import { ArrayCamera } from './three.core.js'; -/** - * Base class for representing element access on an array-like - * node data structures. - * - * @augments Node - */ -export class ArrayElementNode extends Node { - /** - * Constructs an array element node. - * - * @param {Node} node - The array-like node. - * @param {Node} indexNode - The index node that defines the element access. - */ - constructor(node: Node, indexNode: Node); - /** - * The array-like node. - * - * @type {Node} - */ - node: Node; - /** - * The index node that defines the element access. - * - * @type {Node} - */ - indexNode: Node; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isArrayElementNode: boolean; - /** - * This method is overwritten since the node type is inferred from the array-like node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * This method is overwritten since the member type is inferred from the array-like node. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} name - The member name. - * @return {string} The member type. - */ - getMemberType(builder: NodeBuilder, name: string): string; - generate(builder: any): string; -} -/** - * ArrayNode represents a collection of nodes, typically created using the {@link array} function. - * ```js - * const colors = array( [ - * vec3( 1, 0, 0 ), - * vec3( 0, 1, 0 ), - * vec3( 0, 0, 1 ) - * ] ); - * - * const redColor = tintColors.element( 0 ); - * ``` - * - * @augments TempNode - */ -export class ArrayNode extends TempNode { - /** - * Constructs a new array node. - * - * @param {?string} nodeType - The data type of the elements. - * @param {number} count - Size of the array. - * @param {?Array} [values=null] - Array default values. - */ - constructor(nodeType: string | null, count: number, values?: Array | null); - /** - * Array size. - * - * @type {number} - */ - count: number; - /** - * Array default values. - * - * @type {?Array} - */ - values: Array | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isArrayNode: boolean; - /** - * Returns the number of elements in the node array. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {number} The number of elements in the node array. - */ - getArrayCount(): number; - /** - * Returns the node's type. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The type of the node. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Returns the type of a member variable. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} name - The name of the member variable. - * @return {string} The type of the member variable. - */ - getMemberType(builder: NodeBuilder, name: string): string; - /** - * This method builds the output node and returns the resulting array as a shader string. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The generated shader string. - */ - generate(builder: NodeBuilder): string; -} -/** - * These node represents an assign operation. Meaning a node is assigned - * to another node. - * - * @augments TempNode - */ -export class AssignNode extends TempNode { - /** - * Constructs a new assign node. - * - * @param {Node} targetNode - The target node. - * @param {Node} sourceNode - The source type. - */ - constructor(targetNode: Node, sourceNode: Node); - /** - * The target node. - * - * @type {Node} - */ - targetNode: Node; - /** - * The source node. - * - * @type {Node} - */ - sourceNode: Node; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isAssignNode: boolean; - /** - * Whether this node is used more than once in context of other nodes. This method - * is overwritten since it always returns `false` (assigns are unique). - * - * @return {boolean} A flag that indicates if there is more than one dependency to other nodes. Always `false`. - */ - hasDependencies(): boolean; - generateNodeType(builder: any, output: any): string; - /** - * Whether a split is required when assigning source to target. This can happen when the component length of - * target and source data type does not match. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {boolean} Whether a split is required when assigning source to target. - */ - needsSplitAssign(builder: NodeBuilder): boolean; - setup(builder: any): void; - generate(builder: any, output: any): any; -} -/** - * `AtomicFunctionNode` represents any function that can operate on atomic variable types - * within a shader. In an atomic function, any modification to an atomic variable will - * occur as an indivisible step with a defined order relative to other modifications. - * Accordingly, even if multiple atomic functions are modifying an atomic variable at once - * atomic operations will not interfere with each other. - * - * This node can only be used with a WebGPU backend. - * - * @augments Node - */ -export class AtomicFunctionNode extends Node { - /** - * Constructs a new atomic function node. - * - * @param {string} method - The signature of the atomic function to construct. - * @param {Node} pointerNode - An atomic variable or element of an atomic buffer. - * @param {Node} valueNode - The value that mutates the atomic variable. - */ - constructor(method: string, pointerNode: Node, valueNode: Node); - /** - * The signature of the atomic function to construct. - * - * @type {string} - */ - method: string; - /** - * An atomic variable or element of an atomic buffer. - * - * @type {Node} - */ - pointerNode: Node; - /** - * A value that modifies the atomic variable. - * - * @type {Node} - */ - valueNode: Node; - /** - * Overwrites the default implementation to return the type of - * the pointer node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The input type. - */ - getInputType(builder: NodeBuilder): string; - /** - * Overwritten since the node type is inferred from the input type. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - generate(builder: any): any; -} -export namespace AtomicFunctionNode { - let ATOMIC_LOAD: string; - let ATOMIC_STORE: string; - let ATOMIC_ADD: string; - let ATOMIC_SUB: string; - let ATOMIC_MAX: string; - let ATOMIC_MIN: string; - let ATOMIC_AND: string; - let ATOMIC_OR: string; - let ATOMIC_XOR: string; -} -/** - * Base class for representing shader attributes as nodes. - * - * @augments Node - */ -export class AttributeNode extends Node { - /** - * Constructs a new attribute node. - * - * @param {string} attributeName - The name of the attribute. - * @param {?string} nodeType - The node type. - */ - constructor(attributeName: string, nodeType?: string | null); - _attributeName: string; - getHash(builder: any): string; - generateNodeType(builder: any): string | null; - /** - * Sets the attribute name to the given value. The method can be - * overwritten in derived classes if the final name must be computed - * analytically. - * - * @param {string} attributeName - The name of the attribute. - * @return {AttributeNode} A reference to this node. - */ - setAttributeName(attributeName: string): AttributeNode; - /** - * Returns the attribute name of this node. The method can be - * overwritten in derived classes if the final name must be computed - * analytically. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The attribute name. - */ - getAttributeName(): string; - generate(builder: any): any; - serialize(data: any): void; - deserialize(data: any): void; -} -import { BackSide } from './three.core.js'; -/** - * Represents a GPU control barrier that synchronizes compute operations within a given scope. - * - * This node can only be used with a WebGPU backend. - * - * @augments Node - */ -export class BarrierNode extends Node { - /** - * Constructs a new barrier node. - * - * @param {string} scope - The scope defines the behavior of the node. - */ - constructor(scope: string); - scope: string; - isBarrierNode: boolean; - setup(builder: any): void; - generate(builder: any): void; -} -/** - * Represents a basic model for Image-based lighting (IBL). The environment - * is defined via environment maps in the equirectangular or cube map format. - * `BasicEnvironmentNode` is intended for non-PBR materials like {@link MeshBasicNodeMaterial} - * or {@link MeshPhongNodeMaterial}. - * - * @augments LightingNode - */ -export class BasicEnvironmentNode extends LightingNode { - /** - * Constructs a new basic environment node. - * - * @param {Node} [envNode=null] - A node representing the environment. - */ - constructor(envNode?: Node); - /** - * A node representing the environment. - * - * @type {Node} - * @default null - */ - envNode: Node; - setup(builder: any): void; -} -/** - * A specific version of {@link IrradianceNode} that is only relevant - * for {@link MeshBasicNodeMaterial}. Since the material is unlit, it - * requires a special scaling factor for the light map. - * - * @augments LightingNode - */ -export class BasicLightMapNode extends LightingNode { - /** - * Constructs a new basic light map node. - * - * @param {?Node} [lightMapNode=null] - The light map node. - */ - constructor(lightMapNode?: Node | null); - /** - * The light map node. - * - * @type {?Node} - */ - lightMapNode: Node | null; - setup(builder: any): void; -} -/** - * This version of a node library represents a basic version - * just focusing on lights and tone mapping techniques. - * - * @private - * @augments NodeLibrary - */ -export class BasicNodeLibrary extends NodeLibrary { -} -import { BasicShadowMap } from './three.core.js'; -/** - * This node implements the vertex shader logic which is required - * when rendering 3D objects via batching. `BatchNode` must be used - * with instances of {@link BatchedMesh}. - * - * @augments Node - */ -export class BatchNode extends Node { - /** - * Constructs a new batch node. - * - * @param {BatchedMesh} batchMesh - A reference to batched mesh. - */ - constructor(batchMesh: BatchedMesh); - /** - * A reference to batched mesh. - * - * @type {BatchedMesh} - */ - batchMesh: BatchedMesh; - /** - * The batching index node. - * - * @type {?IndexNode} - * @default null - */ - batchingIdNode: IndexNode | null; - /** - * Setups the internal buffers and nodes and assigns the transformed vertex data - * to predefined node variables for accumulation. That follows the same patterns - * like with morph and skinning nodes. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setup(builder: NodeBuilder): void; -} -/** - * This node represents an operation that reinterprets the bit representation of a value - * in one type as a value in another type. - * - * @augments TempNode - */ -export class BitcastNode extends TempNode { - /** - * Constructs a new bitcast node. - * - * @param {Node} valueNode - The value to convert. - * @param {string} conversionType - The type to convert to. - * @param {?string} [inputType = null] - The expected input data type of the bitcast operation. - */ - constructor(valueNode: Node, conversionType: string, inputType?: string | null); - /** - * The data to bitcast to a new type. - * - * @type {Node} - */ - valueNode: Node; - /** - * The type the value will be converted to. - * - * @type {string} - */ - conversionType: string; - /** - * The expected input data type of the bitcast operation. - * - * - * @type {string} - * @default null - */ - inputType: string; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBitcastNode: boolean; - generateNodeType(builder: any): any; - generate(builder: any): string; -} -/** - * This node represents an operation that counts the bits of a piece of shader data. - * - * @augments MathNode - */ -export class BitcountNode extends MathNode { - /** - * Constructs a new math node. - * - * @param {'countTrailingZeros'|'countLeadingZeros'|'countOneBits'} method - The method name. - * @param {Node} aNode - The first input. - */ - constructor(method: "countTrailingZeros" | "countLeadingZeros" | "countOneBits", aNode: Node); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBitcountNode: boolean; - /** - * Casts the input value of the function to an integer if necessary. - * - * @private - * @param {Node|Node} inputNode - The input value. - * @param {Node} outputNode - The output value. - * @param {string} elementType - The type of the input value. - */ - private _resolveElementType; - _returnDataNode(inputType: any): any; - /** - * Creates and registers a reusable GLSL function that emulates the behavior of countTrailingZeros. - * - * @private - * @param {string} method - The name of the function to create. - * @param {string} elementType - The type of the input value. - * @returns {Function} - The generated function - */ - private _createTrailingZerosBaseLayout; - /** - * Creates and registers a reusable GLSL function that emulates the behavior of countLeadingZeros. - * - * @private - * @param {string} method - The name of the function to create. - * @param {string} elementType - The type of the input value. - * @returns {Function} - The generated function - */ - private _createLeadingZerosBaseLayout; - /** - * Creates and registers a reusable GLSL function that emulates the behavior of countOneBits. - * - * @private - * @param {string} method - The name of the function to create. - * @param {string} elementType - The type of the input value. - * @returns {Function} - The generated function - */ - private _createOneBitsBaseLayout; - /** - * Creates and registers a reusable GLSL function that emulates the behavior of the specified bitcount function. - * including considerations for component-wise bitcounts on vector type inputs. - * - * @private - * @param {string} method - The name of the function to create. - * @param {string} inputType - The type of the input value. - * @param {number} typeLength - The vec length of the input value. - * @param {Function} baseFn - The base function that operates on an individual component of the vector. - * @returns {Function} - The alias function for the specified bitcount method. - */ - private _createMainLayout; -} -export namespace BitcountNode { - let COUNT_TRAILING_ZEROS: string; - let COUNT_LEADING_ZEROS: string; - let COUNT_ONE_BITS: string; -} -/** - * Represents blending configuration. - * - * This class encapsulates all blending-related properties that control how - * a material's colors are combined with the colors already in the frame buffer. - */ -export class BlendMode { - /** - * Constructs a new blending configuration. - * - * @param {(NoBlending|NormalBlending|AdditiveBlending|SubtractiveBlending|MultiplyBlending|CustomBlending|MaterialBlending)} [blending=NormalBlending] - The blending mode. - */ - constructor(blending?: (number | number | number | number | number | number | number)); - /** - * Defines the blending type. - * - * It must be set to `CustomBlending` if custom blending properties like - * {@link BlendMode#blendSrc}, {@link BlendMode#blendDst} or {@link BlendMode#blendEquation} - * should have any effect. - * - * @type {(NoBlending|NormalBlending|AdditiveBlending|SubtractiveBlending|MultiplyBlending|CustomBlending|MaterialBlending)} - * @default NormalBlending - */ - blending: (number | number | number | number | number | number | number); - /** - * Defines the blending source factor. - * - * This determines how the source (incoming) fragment color is factored before being added - * to the destination (existing) fragment color in the frame buffer. - * - * @type {(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} - * @default SrcAlphaFactor - */ - blendSrc: (number | number | number | number | number | number | number | number | number | number | number | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); - /** - * Defines the blending destination factor. - * - * This determines how the destination (existing) fragment color in the frame buffer - * is factored before being combined with the source (incoming) fragment color. - * - * @type {(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} - * @default OneMinusSrcAlphaFactor - */ - blendDst: (number | number | number | number | number | number | number | number | number | number | number | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); - /** - * Defines the blending equation. - * - * This determines how the source and destination colors are combined. - * - * @type {(AddEquation|SubtractEquation|ReverseSubtractEquation|MinEquation|MaxEquation)} - * @default AddEquation - */ - blendEquation: (number | number | number | number | number); - /** - * Defines the blending source alpha factor. - * - * When set, this allows separate control of the alpha channel's source blending factor. - * If `null`, {@link BlendMode#blendSrc} is used for the alpha channel as well. - * - * @type {?(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} - * @default null - */ - blendSrcAlpha: (number | number | number | number | number | number | number | number | number | number | number | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; - /** - * Defines the blending destination alpha factor. - * - * When set, this allows separate control of the alpha channel's destination blending factor. - * If `null`, {@link BlendMode#blendDst} is used for the alpha channel as well. - * - * @type {?(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} - * @default null - */ - blendDstAlpha: (number | number | number | number | number | number | number | number | number | number | number | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; - /** - * Defines the blending equation of the alpha channel. - * - * When set, this allows separate control of the alpha channel's blending equation. - * If `null`, {@link BlendMode#blendEquation} is used for the alpha channel as well. - * - * @type {?(AddEquation|SubtractEquation|ReverseSubtractEquation|MinEquation|MaxEquation)} - * @default null - */ - blendEquationAlpha: (number | number | number | number | number) | null; - /** - * Defines whether to premultiply the alpha (transparency) value. - * - * If `true`, the RGB color of the texture or material is multiplied by its alpha value. - * This is useful for transparent textures/materials where the color data - * should already include the transparency information. - * - * @type {boolean} - * @default false - */ - premultiplyAlpha: boolean; - /** - * Copies the blending properties from the given source to this instance. - * - * @param {BlendMode} source - The blending configuration to copy from. - * @return {BlendMode} A reference to this instance. - */ - copy(source: BlendMode): BlendMode; - /** - * Returns a clone of this blending configuration. - * - * @return {BlendMode} A new Blending instance with the same properties. - */ - clone(): BlendMode; -} -import { BoxGeometry } from './three.core.js'; -import { BufferAttribute } from './three.core.js'; -/** - * In earlier `three.js` versions it was only possible to define attribute data - * on geometry level. With `BufferAttributeNode`, it is also possible to do this - * on the node level. - * ```js - * const geometry = new THREE.PlaneGeometry(); - * const positionAttribute = geometry.getAttribute( 'position' ); - * - * const colors = []; - * for ( let i = 0; i < position.count; i ++ ) { - * colors.push( 1, 0, 0 ); - * } - * - * material.colorNode = bufferAttribute( new THREE.Float32BufferAttribute( colors, 3 ) ); - * ``` - * This new approach is especially interesting when geometry data are generated via - * compute shaders. The below line converts a storage buffer into an attribute node. - * ```js - * material.positionNode = positionBuffer.toAttribute(); - * ``` - * @augments InputNode - */ -export class BufferAttributeNode extends InputNode { - /** - * Constructs a new buffer attribute node. - * - * @param {BufferAttribute|InterleavedBuffer|TypedArray} value - The attribute data. - * @param {?string} [bufferType=null] - The buffer type (e.g. `'vec3'`). - * @param {number} [bufferStride=0] - The buffer stride. - * @param {number} [bufferOffset=0] - The buffer offset. - */ - constructor(value: BufferAttribute | InterleavedBuffer | TypedArray, bufferType?: string | null, bufferStride?: number, bufferOffset?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBufferNode: boolean; - /** - * The buffer type (e.g. `'vec3'`). - * - * @type {?string} - * @default null - */ - bufferType: string | null; - /** - * The buffer stride. - * - * @type {number} - * @default 0 - */ - bufferStride: number; - /** - * The buffer offset. - * - * @type {number} - * @default 0 - */ - bufferOffset: number; - /** - * The usage property. Set this to `THREE.DynamicDrawUsage` via `.setUsage()`, - * if you are planning to update the attribute data per frame. - * - * @type {number} - * @default StaticDrawUsage - */ - usage: number; - /** - * Whether the attribute is instanced or not. - * - * @type {boolean} - * @default false - */ - instanced: boolean; - /** - * A reference to the buffer attribute. - * - * @type {?BufferAttribute} - * @default null - */ - attribute: BufferAttribute | null; - /** - * This method is overwritten since the attribute data might be shared - * and thus the hash should be shared as well. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The hash. - */ - getHash(builder: NodeBuilder): string; - /** - * This method is overwritten since the node type is inferred from - * the buffer attribute. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Depending on which value was passed to the node, `setup()` behaves - * differently. If no instance of `BufferAttribute` was passed, the method - * creates an internal attribute and configures it respectively. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setup(builder: NodeBuilder): void; - /** - * Generates the code snippet of the buffer attribute node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The generated code snippet. - */ - generate(builder: NodeBuilder): string; - /** - * Overwrites the default implementation to return a fixed value `'bufferAttribute'`. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The input type. - */ - getInputType(): string; - /** - * Sets the `usage` property to the given value. - * - * @param {number} value - The usage to set. - * @return {BufferAttributeNode} A reference to this node. - */ - setUsage(value: number): BufferAttributeNode; - /** - * Sets the `instanced` property to the given value. - * - * @param {boolean} value - The value to set. - * @return {BufferAttributeNode} A reference to this node. - */ - setInstanced(value: boolean): BufferAttributeNode; -} -import { BufferGeometry } from './three.core.js'; -/** - * A special type of uniform node which represents array-like data - * as uniform buffers. The access usually happens via `element()` - * which returns an instance of {@link ArrayElementNode}. For example: - * - * ```js - * const bufferNode = buffer( array, 'mat4', count ); - * const matrixNode = bufferNode.element( index ); // access a matrix from the buffer - * ``` - * In general, it is recommended to use the more managed {@link UniformArrayNode} - * since it handles more input types and automatically cares about buffer paddings. - * - * @augments UniformNode - */ -export class BufferNode extends UniformNode { - /** - * Constructs a new buffer node. - * - * @param {Array} value - Array-like buffer data. - * @param {string} bufferType - The data type of the buffer. - * @param {number} [bufferCount=0] - The count of buffer elements. - */ - constructor(value: Array, bufferType: string, bufferCount?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBufferNode: boolean; - /** - * The data type of the buffer. - * - * @type {string} - */ - bufferType: string; - /** - * The uniform node that holds the value of the reference node. - * - * @type {number} - * @default 0 - */ - bufferCount: number; - /** - * An array of update ranges. - * - * @type {Array<{start: number, count: number}>} - */ - updateRanges: Array<{ - start: number; - count: number; - }>; - /** - * Adds a range of data in the data array to be updated on the GPU. - * - * @param {number} start - Position at which to start update. - * @param {number} count - The number of components to update. - */ - addUpdateRange(start: number, count: number): void; - /** - * Clears the update ranges. - */ - clearUpdateRanges(): void; - /** - * Overwrites the default implementation to return a fixed value `'buffer'`. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The input type. - */ - getInputType(): string; -} -/** - * The node allows to set values for built-in shader variables. That is - * required for features like hardware-accelerated vertex clipping. - * - * @augments Node - */ -export class BuiltinNode extends Node { - /** - * Constructs a new builtin node. - * - * @param {string} name - The name of the built-in shader variable. - */ - constructor(name: string); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBuiltinNode: boolean; - /** - * Generates the code snippet of the builtin node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The generated code snippet. - */ - generate(): string; -} -/** - * This class can be used for applying bump maps to materials. - * - * ```js - * material.normalNode = bumpMap( texture( bumpTex ) ); - * ``` - * - * @augments TempNode - */ -export class BumpMapNode extends TempNode { - /** - * Constructs a new bump map node. - * - * @param {Node} textureNode - Represents the bump map data. - * @param {?Node} [scaleNode=null] - Controls the intensity of the bump effect. - */ - constructor(textureNode: Node, scaleNode?: Node | null); - /** - * Represents the bump map data. - * - * @type {Node} - */ - textureNode: Node; - /** - * Controls the intensity of the bump effect. - * - * @type {?Node} - * @default null - */ - scaleNode: Node | null; - setup(): void; -} -/** - * A specialized group which enables applications access to the - * Render Bundle API of WebGPU. The group with all its descendant nodes - * are considered as one render bundle and processed as such by - * the renderer. - * - * This module is only fully supported by `WebGPURenderer` with a WebGPU backend. - * With a WebGL backend, the group can technically be rendered but without - * any performance improvements. - * - * @augments Group - */ -export class BundleGroup extends Group { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBundleGroup: boolean; - /** - * The bundle group's version. - * - * @type {number} - * @readonly - * @default 0 - */ - readonly version: number; - /** - * Set this property to `true` when the bundle group has changed. - * - * @type {boolean} - * @default false - * @param {boolean} value - */ - set needsUpdate(value: boolean); -} -/** - * The class generates the code of a given node but returns another node in the output. - * This can be used to call a method or node that does not return a value, i.e. - * type `void` on an input where returning a value is required. Example: - * - * ```js - * material.colorNode = myColor.bypass( runVoidFn() ) - *``` - * - * @augments Node - */ -export class BypassNode extends Node { - /** - * Constructs a new bypass node. - * - * @param {Node} outputNode - The output node. - * @param {Node} callNode - The call node. - */ - constructor(outputNode: Node, callNode: Node); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBypassNode: boolean; - /** - * The output node. - * - * @type {Node} - */ - outputNode: Node; - /** - * The call node. - * - * @type {Node} - */ - callNode: Node; - generateNodeType(builder: any): string; - generate(builder: any): string | Node | null; -} -import { ByteType } from './three.core.js'; -/** - * CanvasTarget is a class that represents the final output destination of the renderer. - * - * @augments EventDispatcher - */ -export class CanvasTarget extends EventDispatcher { - /** - * Constructs a new CanvasTarget. - * - * @param {HTMLCanvasElement|OffscreenCanvas} domElement - The canvas element to render to. - */ - constructor(domElement: HTMLCanvasElement | OffscreenCanvas); - /** - * A reference to the canvas element the renderer is drawing to. - * This value of this property will automatically be created by - * the renderer. - * - * @type {HTMLCanvasElement|OffscreenCanvas} - */ - domElement: HTMLCanvasElement | OffscreenCanvas; - /** - * The renderer's pixel ratio. - * - * @private - * @type {number} - * @default 1 - */ - private _pixelRatio; - /** - * The width of the renderer's default framebuffer in logical pixel unit. - * - * @private - * @type {number} - */ - private _width; - /** - * The height of the renderer's default framebuffer in logical pixel unit. - * - * @private - * @type {number} - */ - private _height; - /** - * The viewport of the renderer in logical pixel unit. - * - * @private - * @type {Vector4} - */ - private _viewport; - /** - * The scissor rectangle of the renderer in logical pixel unit. - * - * @private - * @type {Vector4} - */ - private _scissor; - /** - * Whether the scissor test should be enabled or not. - * - * @private - * @type {boolean} - */ - private _scissorTest; - /** - * The color texture of the default framebuffer. - * - * @type {FramebufferTexture} - */ - colorTexture: FramebufferTexture; - /** - * The depth texture of the default framebuffer. - * - * @type {DepthTexture} - */ - depthTexture: DepthTexture; - /** - * Returns the pixel ratio. - * - * @return {number} The pixel ratio. - */ - getPixelRatio(): number; - /** - * Returns the drawing buffer size in physical pixels. This method honors the pixel ratio. - * - * @param {Vector2} target - The method writes the result in this target object. - * @return {Vector2} The drawing buffer size. - */ - getDrawingBufferSize(target: Vector2): Vector2; - /** - * Returns the renderer's size in logical pixels. This method does not honor the pixel ratio. - * - * @param {Vector2} target - The method writes the result in this target object. - * @return {Vector2} The renderer's size in logical pixels. - */ - getSize(target: Vector2): Vector2; - /** - * Sets the given pixel ratio and resizes the canvas if necessary. - * - * @param {number} [value=1] - The pixel ratio. - */ - setPixelRatio(value?: number): void; - /** - * This method allows to define the drawing buffer size by specifying - * width, height and pixel ratio all at once. The size of the drawing - * buffer is computed with this formula: - * ```js - * size.x = width * pixelRatio; - * size.y = height * pixelRatio; - * ``` - * - * @param {number} width - The width in logical pixels. - * @param {number} height - The height in logical pixels. - * @param {number} pixelRatio - The pixel ratio. - */ - setDrawingBufferSize(width: number, height: number, pixelRatio: number): void; - /** - * Sets the size of the renderer. - * - * @param {number} width - The width in logical pixels. - * @param {number} height - The height in logical pixels. - * @param {boolean} [updateStyle=true] - Whether to update the `style` attribute of the canvas or not. - */ - setSize(width: number, height: number, updateStyle?: boolean): void; - /** - * Returns the scissor rectangle. - * - * @param {Vector4} target - The method writes the result in this target object. - * @return {Vector4} The scissor rectangle. - */ - getScissor(target: Vector4): Vector4; - /** - * Defines the scissor rectangle. - * - * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the box in logical pixel unit. - * Instead of passing four arguments, the method also works with a single four-dimensional vector. - * @param {number} y - The vertical coordinate for the lower left corner of the box in logical pixel unit. - * @param {number} width - The width of the scissor box in logical pixel unit. - * @param {number} height - The height of the scissor box in logical pixel unit. - */ - setScissor(x: number | Vector4, y: number, width: number, height: number): void; - /** - * Returns the scissor test value. - * - * @return {boolean} Whether the scissor test should be enabled or not. - */ - getScissorTest(): boolean; - /** - * Defines the scissor test. - * - * @param {boolean} boolean - Whether the scissor test should be enabled or not. - */ - setScissorTest(boolean: boolean): void; - /** - * Returns the viewport definition. - * - * @param {Vector4} target - The method writes the result in this target object. - * @return {Vector4} The viewport definition. - */ - getViewport(target: Vector4): Vector4; - /** - * Defines the viewport. - * - * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the viewport origin in logical pixel unit. - * @param {number} y - The vertical coordinate for the lower left corner of the viewport origin in logical pixel unit. - * @param {number} width - The width of the viewport in logical pixel unit. - * @param {number} height - The height of the viewport in logical pixel unit. - * @param {number} minDepth - The minimum depth value of the viewport. WebGPU only. - * @param {number} maxDepth - The maximum depth value of the viewport. WebGPU only. - */ - setViewport(x: number | Vector4, y: number, width: number, height: number, minDepth?: number, maxDepth?: number): void; - /** - * Dispatches the resize event. - * - * @private - */ - private _dispatchResize; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - * - * @fires RenderTarget#dispose - */ - dispose(): void; -} -import { CineonToneMapping } from './three.core.js'; -import { ClampToEdgeWrapping } from './three.core.js'; -/** - * In earlier three.js versions, clipping was defined globally - * on the renderer or on material level. This special version of - * `THREE.Group` allows to encode the clipping state into the scene - * graph. Meaning if you create an instance of this group, all - * descendant 3D objects will be affected by the respective clipping - * planes. - * - * Note: `ClippingGroup` can only be used with `WebGPURenderer`. - * - * @augments Group - */ -export class ClippingGroup extends Group { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isClippingGroup: boolean; - /** - * An array with clipping planes. - * - * @type {Array} - */ - clippingPlanes: Array; - /** - * Whether clipping should be enabled or not. - * - * @type {boolean} - * @default true - */ - enabled: boolean; - /** - * Whether the intersection of the clipping planes is used to clip objects, rather than their union. - * - * @type {boolean} - * @default false - */ - clipIntersection: boolean; - /** - * Whether shadows should be clipped or not. - * - * @type {boolean} - * @default false - */ - clipShadows: boolean; -} -/** - * This node is used in {@link NodeMaterial} to setup the clipping - * which can happen hardware-accelerated (if supported) and optionally - * use alpha-to-coverage for anti-aliasing clipped edges. - * - * @augments Node - */ -export class ClippingNode extends Node { - /** - * Constructs a new clipping node. - * - * @param {('default'|'hardware'|'alphaToCoverage')} [scope='default'] - The node's scope. Similar to other nodes, - * the selected scope influences the behavior of the node and what type of code is generated. - */ - constructor(scope?: ("default" | "hardware" | "alphaToCoverage")); - /** - * The node's scope. Similar to other nodes, the selected scope influences - * the behavior of the node and what type of code is generated. - * - * @type {('default'|'hardware'|'alphaToCoverage')} - */ - scope: ("default" | "hardware" | "alphaToCoverage"); - /** - * Setups the node depending on the selected scope. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The result node. - */ - setup(builder: NodeBuilder): Node; - hardwareClipping: any; - /** - * Setups alpha to coverage. - * - * @param {Array} intersectionPlanes - The intersection planes. - * @param {Array} unionPlanes - The union planes. - * @return {Node} The result node. - */ - setupAlphaToCoverage(intersectionPlanes: Array, unionPlanes: Array): Node; - /** - * Setups the default clipping. - * - * @param {Array} intersectionPlanes - The intersection planes. - * @param {Array} unionPlanes - The union planes. - * @return {Node} The result node. - */ - setupDefault(intersectionPlanes: Array, unionPlanes: Array): Node; - /** - * Setups hardware clipping. - * - * @param {Array} unionPlanes - The union planes. - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The result node. - */ - setupHardwareClipping(unionPlanes: Array, builder: NodeBuilder): Node; -} -export namespace ClippingNode { - let ALPHA_TO_COVERAGE: string; - let DEFAULT: string; - let HARDWARE: string; -} -/** - * This class represents native code sections. It is the base - * class for modules like {@link FunctionNode} which allows to implement - * functions with native shader languages. - * - * @augments Node - */ -export class CodeNode extends Node { - /** - * Constructs a new code node. - * - * @param {string} [code=''] - The native code. - * @param {Array} [includes=[]] - An array of includes. - * @param {('js'|'wgsl'|'glsl')} [language=''] - The used language. - */ - constructor(code?: string, includes?: Array, language?: ("js" | "wgsl" | "glsl")); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isCodeNode: boolean; - /** - * The native code. - * - * @type {string} - * @default '' - */ - code: string; - /** - * An array of includes - * - * @type {Array} - * @default [] - */ - includes: Array; - /** - * The used language. - * - * @type {('js'|'wgsl'|'glsl')} - * @default '' - */ - language: ("js" | "wgsl" | "glsl"); - /** - * Sets the includes of this code node. - * - * @param {Array} includes - The includes to set. - * @return {CodeNode} A reference to this node. - */ - setIncludes(includes: Array): CodeNode; - /** - * Returns the includes of this code node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Array} The includes. - */ - getIncludes(): Array; - generate(builder: any): any; - serialize(data: any): void; - deserialize(data: any): void; -} -import { Color } from './three.core.js'; -import { ColorManagement } from './three.core.js'; -/** - * This node represents a color space conversion. Meaning it converts - * a color value from a source to a target color space. - * - * @augments TempNode - */ -export class ColorSpaceNode extends TempNode { - /** - * Constructs a new color space node. - * - * @param {Node} colorNode - Represents the color to convert. - * @param {string} source - The source color space. - * @param {string} target - The target color space. - */ - constructor(colorNode: Node, source: string, target: string); - /** - * Represents the color to convert. - * - * @type {Node} - */ - colorNode: Node; - /** - * The source color space. - * - * @type {string} - */ - source: string; - /** - * The target color space. - * - * @type {string} - */ - target: string; - /** - * This method resolves the constants `WORKING_COLOR_SPACE` and - * `OUTPUT_COLOR_SPACE` based on the current configuration of the - * color management and renderer. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} colorSpace - The color space to resolve. - * @return {string} The resolved color space. - */ - resolveColorSpace(builder: NodeBuilder, colorSpace: string): string; - setup(builder: any): Node; -} -import { Compatibility } from './three.core.js'; -/** - * `ComputeBuiltinNode` represents a compute-scope builtin value that expose information - * about the currently running dispatch and/or the device it is running on. - * - * This node can only be used with a WebGPU backend. - * - * @augments Node - */ -export class ComputeBuiltinNode extends Node { - /** - * Constructs a new compute builtin node. - * - * @param {string} builtinName - The built-in name. - * @param {string} nodeType - The node type. - */ - constructor(builtinName: string, nodeType: string); - /** - * The built-in name. - * - * @private - * @type {string} - */ - private _builtinName; - /** - * This method is overwritten since hash is derived from the built-in name. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The hash. - */ - getHash(builder: NodeBuilder): string; - /** - * This method is overwritten since the node type is simply derived from `nodeType`.. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(): string; - /** - * Sets the builtin name. - * - * @param {string} builtinName - The built-in name. - * @return {ComputeBuiltinNode} A reference to this node. - */ - setBuiltinName(builtinName: string): ComputeBuiltinNode; - /** - * Returns the builtin name. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The builtin name. - */ - getBuiltinName(): string; - /** - * Whether the current node builder has the builtin or not. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {boolean} Whether the builder has the builtin or not. - */ - hasBuiltin(builder: NodeBuilder): boolean; - generate(builder: any, output: any): any; - serialize(data: any): void; - deserialize(data: any): void; -} -/** - * Represents a compute shader node. - * - * @augments Node - */ -export class ComputeNode extends Node { - /** - * Constructs a new compute node. - * - * @param {Node} computeNode - The node that defines the compute shader logic. - * @param {Array} workgroupSize - An array defining the X, Y, and Z dimensions of the workgroup for compute shader execution. - */ - constructor(computeNode: Node, workgroupSize: Array); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isComputeNode: boolean; - /** - * The node that defines the compute shader logic. - * - * @type {Node} - */ - computeNode: Node; - /** - * An array defining the X, Y, and Z dimensions of the workgroup for compute shader execution. - * - * @type {Array} - * @default [ 64 ] - */ - workgroupSize: Array; - /** - * The total number of threads (invocations) to execute. If it is a number, it will be used - * to automatically generate bounds checking against `instanceIndex`. - * - * @type {number|Array} - */ - count: number | Array; - /** - * The dispatch size for workgroups on X, Y, and Z axes. - * Used directly if `count` is not provided. - * - * @type {number|Array} - */ - dispatchSize: number | Array; - /** - * A callback executed when the compute node finishes initialization. - * - * @type {?Function} - */ - onInitFunction: Function | null; - /** - * A uniform node holding the dispatch count for bounds checking. - * Created automatically when `count` is a number. - * - * @type {?UniformNode} - */ - countNode: UniformNode | null; - /** - * Sets the {@link ComputeNode#name} property. - * - * @param {string} name - The name of the uniform. - * @return {ComputeNode} A reference to this node. - */ - setName(name: string): ComputeNode; - /** - * Sets the {@link ComputeNode#name} property. - * - * @deprecated - * @param {string} name - The name of the uniform. - * @return {ComputeNode} A reference to this node. - */ - label(name: string): ComputeNode; - /** - * Sets the callback to run during initialization. - * - * @param {Function} callback - The callback function. - * @return {ComputeNode} A reference to this node. - */ - onInit(callback: Function): ComputeNode; - /** - * The method execute the compute for this node. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - updateBefore({ renderer }: NodeFrame): void; - setup(builder: any): string | Node | null; - generate(builder: any, output: any): any; -} -/** - * Represents a logical `if/else` statement. Can be used as an alternative - * to the `If()`/`Else()` syntax. - * - * The `select()` method is called in a chaining fashion on a condition. The parameter nodes of `select()` - * determine the outcome of the entire statement. - * - * ```js - * velocity = position.greaterThanEqual( limit ).select( velocity.negate(), velocity ); - * ``` - * - * @augments Node - */ -export class ConditionalNode extends Node { - /** - * Constructs a new conditional node. - * - * @param {Node} condNode - The node that defines the condition. - * @param {Node} ifNode - The node that is evaluate when the condition ends up `true`. - * @param {?Node} [elseNode=null] - The node that is evaluate when the condition ends up `false`. - */ - constructor(condNode: Node, ifNode: Node, elseNode?: Node | null); - /** - * The node that defines the condition. - * - * @type {Node} - */ - condNode: Node; - /** - * The node that is evaluate when the condition ends up `true`. - * - * @type {Node} - */ - ifNode: Node; - /** - * The node that is evaluate when the condition ends up `false`. - * - * @type {?Node} - * @default null - */ - elseNode: Node | null; - /** - * This method is overwritten since the node type is inferred from the if/else - * nodes. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - setup(builder: any): void; - generate(builder: any, output: any): any; -} -/** - * Class for representing a constant value in the shader. - * - * @augments InputNode - */ -export class ConstNode extends InputNode { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isConstNode: boolean; - /** - * Generates the shader string of the value with the current node builder. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The generated value as a shader string. - */ - generateConst(builder: NodeBuilder): string; - generate(builder: any, output: any): any; -} -/** - * This node can be used as a context management component for another node. - * {@link NodeBuilder} performs its node building process in a specific context and - * this node allows the modify the context. A typical use case is to overwrite `getUV()` e.g.: - * - * ```js - *node.context( { getUV: () => customCoord } ); - *\// or - *material.contextNode = context( { getUV: () => customCoord } ); - *\// or - *renderer.contextNode = context( { getUV: () => customCoord } ); - *\// or - *scenePass.contextNode = context( { getUV: () => customCoord } ); - *``` - * @augments Node - */ -export class ContextNode extends Node { - /** - * Constructs a new context node. - * - * @param {Node} node - The node whose context should be modified. - * @param {Object} [value={}] - The modified context data. - */ - constructor(node?: Node, value?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isContextNode: boolean; - /** - * The node whose context should be modified. - * - * @type {Node} - */ - node: Node; - /** - * The modified context data. - * - * @type {Object} - * @default {} - */ - value: Object; - /** - * This method is overwritten to ensure it returns the type of {@link ContextNode#node}. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Gathers the context data from all parent context nodes. - * - * @return {Object} The gathered context data. - */ - getFlowContextData(): Object; - /** - * This method is overwritten to ensure it returns the member type of {@link ContextNode#node}. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} name - The member name. - * @returns {string} The member type. - */ - getMemberType(builder: NodeBuilder, name: string): string; - analyze(builder: any): void; - setup(builder: any): void; - generate(builder: any, output: any): string | Node | null; -} -/** - * This module is part of the TSL core and usually not used in app level code. - * It represents a convert operation during the shader generation process - * meaning it converts the data type of a node to a target data type. - * - * @augments Node - */ -export class ConvertNode extends Node { - /** - * Constructs a new convert node. - * - * @param {Node} node - The node which type should be converted. - * @param {string} convertTo - The target node type. Multiple types can be defined by separating them with a `|` sign. - */ - constructor(node: Node, convertTo: string); - /** - * The node which type should be converted. - * - * @type {Node} - */ - node: Node; - /** - * The target node type. Multiple types can be defined by separating them with a `|` sign. - * - * @type {string} - */ - convertTo: string; - /** - * This method is overwritten since the implementation tries to infer the best - * matching type from the {@link ConvertNode#convertTo} property. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - serialize(data: any): void; - deserialize(data: any): void; - generate(builder: any, output: any): any; -} -import { CubeCamera } from './three.core.js'; -import { CubeDepthTexture } from './three.core.js'; -/** - * This node can be used to automatically convert environment maps in the - * equirectangular format into the cube map format. - * - * @augments TempNode - */ -export class CubeMapNode extends TempNode { - /** - * Constructs a new cube map node. - * - * @param {Node} envNode - The node representing the environment map. - */ - constructor(envNode: Node); - /** - * The node representing the environment map. - * - * @type {Node} - */ - envNode: Node; - /** - * A reference to the internal cube texture. - * - * @private - * @type {?CubeTexture} - * @default null - */ - private _cubeTexture; - /** - * A reference to the internal cube texture node. - * - * @private - * @type {CubeTextureNode} - */ - private _cubeTextureNode; - /** - * A default cube texture that acts as a placeholder. - * It is used when the conversion from equirectangular to cube - * map has not finished yet for a given texture. - * - * @private - * @type {CubeTexture} - */ - private _defaultTexture; - updateBefore(frame: any): void; - setup(builder: any): CubeTextureNode; -} -import { CubeReflectionMapping } from './three.core.js'; -import { CubeRefractionMapping } from './three.core.js'; -/** - * This class represents a cube render target. It is a special version - * of `WebGLCubeRenderTarget` which is compatible with `WebGPURenderer`. - * - * @augments RenderTarget - */ -export class CubeRenderTarget extends RenderTarget { - /** - * Constructs a new cube render target. - * - * @param {number} [size=1] - The size of the render target. - * @param {RenderTarget~Options} [options] - The configuration object. - */ - constructor(size?: number, options?: {}); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isCubeRenderTarget: boolean; - /** - * Converts the given equirectangular texture to a cube map. - * - * @param {Renderer} renderer - The renderer. - * @param {Texture} texture - The equirectangular texture. - * @return {CubeRenderTarget} A reference to this cube render target. - */ - fromEquirectangularTexture(renderer: Renderer, texture$1: any): CubeRenderTarget; - /** - * Clears this cube render target. - * - * @param {Renderer} renderer - The renderer. - * @param {boolean} [color=true] - Whether the color buffer should be cleared or not. - * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not. - * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not. - */ - clear(renderer: Renderer, color?: boolean, depth?: boolean, stencil?: boolean): void; -} -import { CubeTexture } from './three.core.js'; -/** - * This type of uniform node represents a cube texture. - * - * @augments TextureNode - */ -export class CubeTextureNode extends TextureNode { - /** - * Constructs a new cube texture node. - * - * @param {CubeTexture} value - The cube texture. - * @param {?Node} [uvNode=null] - The uv node. - * @param {?Node} [levelNode=null] - The level node. - * @param {?Node} [biasNode=null] - The bias node. - */ - constructor(value: CubeTexture, uvNode?: Node | null, levelNode?: Node | null, biasNode?: Node | null); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isCubeTextureNode: boolean; - /** - * Overwritten with an empty implementation since the `updateMatrix` flag is ignored - * for cube textures. The uv transformation matrix is not applied to cube textures. - * - * @param {boolean} value - The update toggle. - */ - setUpdateMatrix(): void; -} -import { CubeUVReflectionMapping } from './three.core.js'; -import { CullFaceBack } from './three.core.js'; -import { CullFaceFront } from './three.core.js'; -import { CullFaceNone } from './three.core.js'; -import { CustomBlending } from './three.core.js'; -import { CylinderGeometry } from './three.core.js'; -import { DataArrayTexture } from './three.core.js'; -import { DataTexture } from './three.core.js'; -export class DebugNode extends TempNode { - constructor(node: any, callback?: null); - node: any; - callback: any; - generateNodeType(builder: any): any; - setup(builder: any): any; - analyze(builder: any): any; - generate(builder: any): any; -} -import { DecrementStencilOp } from './three.core.js'; -import { DecrementWrapStencilOp } from './three.core.js'; -import { DepthFormat } from './three.core.js'; -import { DepthStencilFormat } from './three.core.js'; -import { DepthTexture } from './three.core.js'; -import { DirectionalLight } from './three.core.js'; -/** - * Module for representing directional lights as nodes. - * - * @augments AnalyticLightNode - */ -export class DirectionalLightNode extends AnalyticLightNode { - /** - * Constructs a new directional light node. - * - * @param {?DirectionalLight} [light=null] - The directional light source. - */ - constructor(light?: DirectionalLight | null); - setupDirect(): { - lightDirection: any; - lightColor: Node; - }; -} -import { DoubleSide } from './three.core.js'; -import { DstAlphaFactor } from './three.core.js'; -import { DstColorFactor } from './three.core.js'; -import { DynamicDrawUsage } from './three.core.js'; -/** - * Represents a physical model for Image-based lighting (IBL). The environment - * is defined via environment maps in the equirectangular, cube map or cubeUV (PMREM) format. - * `EnvironmentNode` is intended for PBR materials like {@link MeshStandardNodeMaterial}. - * - * @augments LightingNode - */ -export class EnvironmentNode extends LightingNode { - /** - * Constructs a new environment node. - * - * @param {Node} [envNode=null] - A node representing the environment. - */ - constructor(envNode?: Node); - /** - * A node representing the environment. - * - * @type {?Node} - * @default null - */ - envNode: Node | null; - setup(builder: any): void; - /** - * Returns the PMREM node cache of the current renderer. - * - * @private - * @param {Renderer} renderer - The current renderer. - * @return {WeakMap} The node cache. - */ - private _getPMREMNodeCache; -} -import { EqualCompare } from './three.core.js'; -import { EqualDepth } from './three.core.js'; -import { EqualStencilFunc } from './three.core.js'; -import { EquirectangularReflectionMapping } from './three.core.js'; -import { EquirectangularRefractionMapping } from './three.core.js'; -import { EventDispatcher } from './three.core.js'; -/** - * EventNode is a node that executes a callback during specific update phases. - * - * @augments Node - */ -export class EventNode extends Node { - /** - * Creates an EventNode. - * - * @param {string} eventType - The type of event - * @param {Function} callback - The callback to execute on update. - */ - constructor(eventType: string, callback: Function); - eventType: string; - callback: Function; - update(frame: any): void; - updateBefore(frame: any): void; -} -export namespace EventNode { - let OBJECT: string; - let MATERIAL: string; - let FRAME: string; - let BEFORE_OBJECT: string; - let BEFORE_MATERIAL: string; - let BEFORE_FRAME: string; -} -/** - * This class can be used to implement basic expressions in shader code. - * Basic examples for that are `return`, `continue` or `discard` statements. - * - * @augments Node - */ -export class ExpressionNode extends Node { - /** - * Constructs a new expression node. - * - * @param {string} [snippet=''] - The native code snippet. - * @param {string} [nodeType='void'] - The node type. - */ - constructor(snippet?: string, nodeType?: string); - /** - * The native code snippet. - * - * @type {string} - * @default '' - */ - snippet: string; - generate(builder: any, output: any): any; -} -import { FileLoader } from './three.core.js'; -/** - * This module is part of the TSL core and usually not used in app level code. - * It represents a flip operation during the shader generation process - * meaning it flips normalized values with the following formula: - * ``` - * x = 1 - x; - * ``` - * `FlipNode` is internally used to implement any `flipXYZW()`, `flipRGBA()` and - * `flipSTPQ()` method invocations on node objects. For example: - * ```js - * uvNode = uvNode.flipY(); - * ``` - * - * @augments TempNode - */ -export class FlipNode extends TempNode { - /** - * Constructs a new flip node. - * - * @param {Node} sourceNode - The node which component(s) should be flipped. - * @param {string} components - The components that should be flipped e.g. `'x'` or `'xy'`. - */ - constructor(sourceNode: Node, components: string); - /** - * The node which component(s) should be flipped. - * - * @type {Node} - */ - sourceNode: Node; - /** - * The components that should be flipped e.g. `'x'` or `'xy'`. - * - * @type {string} - */ - components: string; - /** - * This method is overwritten since the node type is inferred from the source node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - generate(builder: any): string; -} -import { Float16BufferAttribute } from './three.core.js'; -import { Float32BufferAttribute } from './three.core.js'; -import { FloatType } from './three.core.js'; -import { FramebufferTexture } from './three.core.js'; -/** - * This node can be used to evaluate whether a primitive is front or back facing. - * - * @augments Node - */ -export class FrontFacingNode extends Node { - /** - * Constructs a new front facing node. - */ - constructor(); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isFrontFacingNode: boolean; - generate(builder: any): any; -} -import { FrontSide } from './three.core.js'; -import { Frustum } from './three.core.js'; -import { FrustumArray } from './three.core.js'; -/** - * This module represents the call of a {@link FunctionNode}. Developers are usually not confronted - * with this module since they use the predefined TSL syntax `wgslFn` and `glslFn` which encapsulate - * this logic. - * - * @augments TempNode - */ -export class FunctionCallNode extends TempNode { - /** - * Constructs a new function call node. - * - * @param {?FunctionNode} functionNode - The function node. - * @param {Object} [parameters={}] - The parameters for the function call. - */ - constructor(functionNode?: FunctionNode | null, parameters?: { - [x: string]: Node; - }); - /** - * The function node. - * - * @type {?FunctionNode} - * @default null - */ - functionNode: FunctionNode | null; - /** - * The parameters of the function call. - * - * @type {Object} - * @default {} - */ - parameters: { - [x: string]: Node; - }; - /** - * Sets the parameters of the function call node. - * - * @param {Object} parameters - The parameters to set. - * @return {FunctionCallNode} A reference to this node. - */ - setParameters(parameters: { - [x: string]: Node; - }): FunctionCallNode; - /** - * Returns the parameters of the function call node. - * - * @return {Object} The parameters of this node. - */ - getParameters(): { - [x: string]: Node; - }; - /** - * Returns the type of this function call node. - * - * @param {NodeBuilder} builder - The current node builder. - * @returns {string} The type of this node. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Returns the function node of this function call node. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} [name] - The name of the member. - * @returns {string} The type of the member. - */ - getMemberType(builder: NodeBuilder, name?: string): string; - generate(builder: any): string; -} -/** - * This class represents a native shader function. It can be used to implement - * certain aspects of a node material with native shader code. There are two predefined - * TSL functions for easier usage. - * - * - `wgslFn`: Creates a WGSL function node. - * - `glslFn`: Creates a GLSL function node. - * - * A basic example with one include looks like so: - * - * ```js - * const desaturateWGSLFn = wgslFn( ` - * fn desaturate( color:vec3 ) -> vec3 { - * let lum = vec3( 0.299, 0.587, 0.114 ); - * return vec3( dot( lum, color ) ); - * }` - *); - * const someWGSLFn = wgslFn( ` - * fn someFn( color:vec3 ) -> vec3 { - * return desaturate( color ); - * } - * `, [ desaturateWGSLFn ] ); - * material.colorNode = someWGSLFn( { color: texture( map ) } ); - *``` - * @augments CodeNode - */ -export class FunctionNode extends CodeNode { - /** - * Returns the type of this function node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The type. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Returns the type of a member of this function node. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} name - The name of the member. - * @return {string} The type of the member. - */ - getMemberType(builder: NodeBuilder, name: string): string; - /** - * Returns the inputs of this function node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Array} The inputs. - */ - getInputs(builder: NodeBuilder): Array; - /** - * Returns the node function for this function node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {NodeFunction} The node function. - */ - getNodeFunction(builder: NodeBuilder): NodeFunction; - generate(builder: any, output: any): any; -} -/** - * This class allows to define multiple overloaded versions - * of the same function. Depending on the parameters of the function - * call, the node picks the best-fit overloaded version. - * - * @augments Node - */ -export class FunctionOverloadingNode extends Node { - /** - * Constructs a new function overloading node. - * - * @param {Array} functionNodes - Array of `Fn` function definitions. - * @param {...Node} parametersNodes - A list of parameter nodes. - */ - constructor(functionNodes?: Array, ...parametersNodes: Node[]); - /** - * Array of `Fn` function definitions. - * - * @type {Array} - */ - functionNodes: Array; - /** - * A list of parameter nodes. - * - * @type {Array} - */ - parametersNodes: Array; - /** - * The selected overloaded function call. - * - * @private - * @type {ShaderCallNodeInternal} - */ - private _candidateFn; - /** - * This method is overwritten since the node type is inferred from - * the function's return type. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Returns the candidate function for the current parameters. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {FunctionNode} The candidate function. - */ - getCandidateFn(builder: NodeBuilder): FunctionNode; - /** - * Sets up the node for the current parameters. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The setup node. - */ - setup(builder: NodeBuilder): Node; -} -/** - * A node builder targeting GLSL. - * - * This module generates GLSL shader code from node materials and also - * generates the respective bindings and vertex buffer definitions. These - * data are later used by the renderer to create render and compute pipelines - * for render objects. - * - * @augments NodeBuilder - */ -export class GLSLNodeBuilder extends NodeBuilder { - /** - * Constructs a new GLSL node builder renderer. - * - * @param {Object3D} object - The 3D object. - * @param {Renderer} renderer - The renderer. - */ - constructor(object: Object3D, renderer: Renderer); - /** - * A dictionary holds for each shader stage ('vertex', 'fragment', 'compute') - * another dictionary which manages UBOs per group ('render','frame','object'). - * - * @type {Object>} - */ - uniformGroups: { - [x: string]: { - [x: string]: NodeUniformsGroup; - }; - }; - /** - * An array that holds objects defining the varying and attribute data in - * context of Transform Feedback. - * - * @type {Array>} - */ - transforms: Array<{ - [x: string]: AttributeNode | string; - }>; - /** - * A dictionary that holds for each shader stage a Map of used extensions. - * - * @type {Object>} - */ - extensions: { - [x: string]: Map; - }; - /** - * A dictionary that holds for each shader stage an Array of used builtins. - * - * @type {Object>} - */ - builtins: { - [x: string]: string[]; - }; - /** - * Checks if the given texture requires a manual conversion to the working color space. - * - * @param {Texture} texture - The texture to check. - * @return {boolean} Whether the given texture requires a conversion to working color space or not. - */ - needsToWorkingColorSpace(texture: Texture): boolean; - /** - * Includes the given method name into the current - * function node. - * - * @private - * @param {string} name - The method name to include. - * @return {CodeNode} The respective code node. - */ - private _include; - /** - * Returns the bitcast method name for a given input and outputType. - * - * @param {string} type - The output type to bitcast to. - * @param {string} inputType - The input type of the. - * @return {string} The resolved GLSL bitcast invocation. - */ - getBitcastMethod(type: string, inputType: string): string; - /** - * Returns the float packing method name for a given numeric encoding. - * - * @param {string} encoding - The numeric encoding that describes how the float values are mapped to the integer range. - * @returns {string} The resolved GLSL float packing method name. - */ - getFloatPackingMethod(encoding: string): string; - /** - * Returns the float unpacking method name for a given numeric encoding. - * - * @param {string} encoding - The numeric encoding that describes how the integer values are mapped to the float range. - * @returns {string} The resolved GLSL float unpacking method name. - */ - getFloatUnpackingMethod(encoding: string): string; - /** - * Returns the native snippet for a ternary operation. - * - * @param {string} condSnippet - The condition determining which expression gets resolved. - * @param {string} ifSnippet - The expression to resolve to if the condition is true. - * @param {string} elseSnippet - The expression to resolve to if the condition is false. - * @return {string} The resolved method name. - */ - getTernary(condSnippet: string, ifSnippet: string, elseSnippet: string): string; - /** - * Builds the given shader node. - * - * @param {ShaderNodeInternal} shaderNode - The shader node. - * @return {string} The GLSL function code. - */ - buildFunctionCode(shaderNode: ShaderNodeInternal): string; - /** - * Setups the Pixel Buffer Object (PBO) for the given storage - * buffer node. - * - * @param {StorageBufferNode} storageBufferNode - The storage buffer node. - */ - setupPBO(storageBufferNode: StorageBufferNode): void; - /** - * Returns a GLSL snippet that represents the property name of the given node. - * - * @param {Node} node - The node. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {string} The property name. - */ - getPropertyName(node: Node, shaderStage?: string): string; - /** - * Setups the Pixel Buffer Object (PBO) for the given storage - * buffer node. - * - * @param {StorageArrayElementNode} storageArrayElementNode - The storage array element node. - * @return {string} The property name. - */ - generatePBO(storageArrayElementNode: StorageArrayElementNode): string; - /** - * Generates the GLSL snippet that reads a single texel from a texture without sampling or filtering. - * - * @param {?Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvIndexSnippet - A GLSL snippet that represents texture coordinates used for sampling. - * @param {?string} levelSnippet - A GLSL snippet that represents the mip level, with level 0 containing a full size version of the texture. - * @param {?string} depthSnippet - A GLSL snippet that represents the 0-based texture array index to sample. - * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @return {string} The GLSL snippet. - */ - generateTextureLoad(texture: Texture | null, textureProperty: string, uvIndexSnippet: string, levelSnippet: string | null, depthSnippet: string | null, offsetSnippet: string | null): string; - /** - * Generates the GLSL snippet for sampling/loading the given texture. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. - * @param {?string} depthSnippet - A GLSL snippet that represents the 0-based texture array index to sample. - * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @return {string} The GLSL snippet. - */ - generateTexture(texture: Texture, textureProperty: string, uvSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; - /** - * Generates the GLSL snippet when sampling textures with explicit mip level. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. - * @param {string} levelSnippet - A GLSL snippet that represents the mip level, with level 0 containing a full size version of the texture. - * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @return {string} The GLSL snippet. - */ - generateTextureLevel(texture: Texture, textureProperty: string, uvSnippet: string, levelSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; - /** - * Generates the GLSL snippet when sampling textures with a bias to the mip level. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. - * @param {string} biasSnippet - A GLSL snippet that represents the bias to apply to the mip level before sampling. - * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @return {string} The GLSL snippet. - */ - generateTextureBias(texture: Texture, textureProperty: string, uvSnippet: string, biasSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; - /** - * Generates the GLSL snippet for sampling/loading the given texture using explicit gradients. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. - * @param {Array} gradSnippet - An array holding both gradient GLSL snippets. - * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @return {string} The GLSL snippet. - */ - generateTextureGrad(texture: Texture, textureProperty: string, uvSnippet: string, gradSnippet: Array, depthSnippet: string | null, offsetSnippet: string | null): string; - /** - * Generates the GLSL snippet for sampling a depth texture and comparing the sampled depth values - * against a reference value. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. - * @param {string} compareSnippet - A GLSL snippet that represents the reference value. - * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {string} The GLSL snippet. - */ - generateTextureCompare(texture: Texture, textureProperty: string, uvSnippet: string, compareSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, shaderStage?: string): string; - /** - * Generates the GLSL snippet for gathering four texels from the given texture. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. - * @param {string} gatherSnippet - A GLSL snippet that represents the index of the channel to read. - * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {?string} flipYSnippet - A GLSL snippet that represents the y-flip. Only used for WebGL. - * @return {string} The GLSL snippet. - */ - generateTextureGather(texture: Texture, textureProperty: string, uvSnippet: string, gatherSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, flipYSnippet: string | null): string; - /** - * Generates the GLSL snippet for performing a depth comparison on four texels in the given depth texture. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. - * @param {string} compareSnippet - A GLSL snippet that represents the reference value. - * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {?string} flipYSnippet - A GLSL snippet that represents the y-flip. Only used for WebGL. - * @return {string} The GLSL snippet. - */ - generateTextureGatherCompare(texture: Texture, textureProperty: string, uvSnippet: string, compareSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, flipYSnippet: string | null): string; - /** - * Returns the uniforms of the given shader stage as a GLSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The GLSL snippet that defines the uniforms. - */ - getUniforms(shaderStage: string): string; - /** - * Returns the shader attributes of the given shader stage as a GLSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The GLSL snippet that defines the shader attributes. - */ - getAttributes(shaderStage: string): string; - /** - * Returns the members of the given struct type node as a GLSL string. - * - * @param {StructTypeNode} struct - The struct type node. - * @return {string} The GLSL snippet that defines the struct members. - */ - getStructMembers(struct: StructTypeNode): string; - /** - * Returns the structs of the given shader stage as a GLSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The GLSL snippet that defines the structs. - */ - getStructs(shaderStage: string): string; - /** - * Returns the varyings of the given shader stage as a GLSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The GLSL snippet that defines the varyings. - */ - getVaryings(shaderStage: string): string; - /** - * Returns a builtin representing the index of an invocation within its workgroup. - * - * @return {string} The invocation local index. - */ - getInvocationLocalIndex(): string; - /** - * Returns a builtin representing the size of a subgroup within the current shader. - */ - getSubgroupSize(): void; - /** - * Returns a builtin representing the index of an invocation within its subgroup. - */ - getInvocationSubgroupIndex(): void; - /** - * Returns a builtin representing the index of the current invocation's subgroup within its workgroup. - */ - getSubgroupIndex(): void; - /** - * Returns the frag depth builtin. - * - * @return {string} The frag depth builtin. - */ - getFragDepth(): string; - /** - * Enables the given extension. - * - * @param {string} name - The extension name. - * @param {string} behavior - The extension behavior. - * @param {string} [shaderStage=this.shaderStage] - The shader stage. - */ - enableExtension(name: string, behavior: string, shaderStage?: string): void; - /** - * Returns the enabled extensions of the given shader stage as a GLSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The GLSL snippet that defines the enabled extensions. - */ - getExtensions(shaderStage: string): string; - /** - * Returns the clip distances builtin. - * - * @return {string} The clip distances builtin. - */ - getClipDistance(): string; - /** - * Whether the requested feature is available or not. - * - * @param {string} name - The requested feature. - * @return {boolean} Whether the requested feature is supported or not. - */ - isAvailable(name: string): boolean; - /** - * Enables hardware clipping. - * - * @param {string} planeCount - The clipping plane count. - */ - enableHardwareClipping(planeCount: string): void; - /** - * Enables multiview. - */ - enableMultiview(): void; - /** - * Registers a transform in context of Transform Feedback. - * - * @param {string} varyingName - The varying name. - * @param {AttributeNode} attributeNode - The attribute node. - */ - registerTransform(varyingName: string, attributeNode: AttributeNode): void; - /** - * Returns the transforms of the given shader stage as a GLSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The GLSL snippet that defines the transforms. - */ - getTransforms(): string; - /** - * Returns a GLSL struct based on the given name and variables. - * - * @private - * @param {string} name - The struct name. - * @param {string} vars - The struct variables. - * @return {string} The GLSL snippet representing a struct. - */ - private _getGLSLUniformStruct; - /** - * Returns a GLSL vertex shader based on the given shader data. - * - * @private - * @param {Object} shaderData - The shader data. - * @return {string} The vertex shader. - */ - private _getGLSLVertexCode; - /** - * Returns a GLSL fragment shader based on the given shader data. - * - * @private - * @param {Object} shaderData - The shader data. - * @return {string} The vertex shader. - */ - private _getGLSLFragmentCode; - /** - * This method is one of the more important ones since it's responsible - * for generating a matching binding instance for the given uniform node. - * - * These bindings are later used in the renderer to create bind groups - * and layouts. - * - * @param {UniformNode} node - The uniform node. - * @param {string} type - The node data type. - * @param {string} shaderStage - The shader stage. - * @param {?string} [name=null] - An optional uniform name. - * @return {NodeUniform} The node uniform object. - */ - getUniformFromNode(node: UniformNode, type: string, shaderStage: string, name?: string | null): NodeUniform; -} -/** - * A GLSL node parser. - * - * @augments NodeParser - */ -export class GLSLNodeParser extends NodeParser { - /** - * The method parses the given GLSL code an returns a node function. - * - * @param {string} source - The GLSL code. - * @return {GLSLNodeFunction} A node function. - */ - parseFunction(source: string): GLSLNodeFunction; -} -import { GreaterCompare } from './three.core.js'; -import { GreaterDepth } from './three.core.js'; -import { GreaterEqualCompare } from './three.core.js'; -import { GreaterEqualDepth } from './three.core.js'; -import { GreaterEqualStencilFunc } from './three.core.js'; -import { GreaterStencilFunc } from './three.core.js'; -import { Group } from './three.core.js'; -import { HalfFloatType } from './three.core.js'; -import { HemisphereLight } from './three.core.js'; -/** - * Module for representing hemisphere lights as nodes. - * - * @augments AnalyticLightNode - */ -export class HemisphereLightNode extends AnalyticLightNode { - /** - * Constructs a new hemisphere light node. - * - * @param {?HemisphereLight} [light=null] - The hemisphere light source. - */ - constructor(light?: HemisphereLight | null); - /** - * Uniform node representing the light's position. - * - * @type {UniformNode} - */ - lightPositionNode: UniformNode; - /** - * A node representing the light's direction. - * - * @type {Node} - */ - lightDirectionNode: Node; - /** - * Uniform node representing the light's ground color. - * - * @type {UniformNode} - */ - groundColorNode: UniformNode; - /** - * Overwritten to updated hemisphere light specific uniforms. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update(frame: NodeFrame): void; - setup(builder: any): void; -} -/** - * A IES version of {@link SpotLight}. Can only be used with {@link WebGPURenderer}. - * - * @augments SpotLight - */ -export class IESSpotLight extends SpotLight { - /** - * The IES map. It's a lookup table that stores normalized attenuation factors - * (0.0 to 1.0) that represent the light's intensity at a specific angle. - * - * @type {?Texture} - * @default null - */ - iesMap: Texture | null; - copy(source: any, recursive: any): this; -} -/** - * An IES version of the default spot light node. - * - * @augments SpotLightNode - */ -export class IESSpotLightNode extends SpotLightNode { - /** - * The texture node representing the IES texture. - * - * @type {?TextureNode} - * @default null - */ - _iesTextureNode: TextureNode | null; -} -import { IncrementStencilOp } from './three.core.js'; -import { IncrementWrapStencilOp } from './three.core.js'; -/** - * This class represents shader indices of different types. The following predefined node - * objects cover frequent use cases: - * - * - `vertexIndex`: The index of a vertex within a mesh. - * - `instanceIndex`: The index of either a mesh instance or an invocation of a compute shader. - * - `drawIndex`: The index of a draw call. - * - `invocationLocalIndex`: The index of a compute invocation within the scope of a workgroup load. - * - `invocationSubgroupIndex`: The index of a compute invocation within the scope of a subgroup. - * - `subgroupIndex`: The index of a compute invocation's subgroup within its workgroup. - * - * @augments Node - */ -export class IndexNode extends Node { - /** - * Constructs a new index node. - * - * @param {('vertex'|'instance'|'subgroup'|'invocationLocal'|'invocationGlobal'|'invocationSubgroup'|'draw')} scope - The scope of the index node. - */ - constructor(scope: ("vertex" | "instance" | "subgroup" | "invocationLocal" | "invocationGlobal" | "invocationSubgroup" | "draw")); - /** - * The scope of the index node. - * - * @type {string} - */ - scope: string; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isIndexNode: boolean; - generate(builder: any): any; -} -export namespace IndexNode { - let VERTEX: string; - let INSTANCE: string; - let SUBGROUP: string; - let INVOCATION_LOCAL: string; - let INVOCATION_SUBGROUP: string; - let DRAW: string; -} -/** - * This special type of buffer attribute is intended for compute shaders. - * It can be used to encode draw parameters for indirect draw calls. - * - * Note: This type of buffer attribute can only be used with `WebGPURenderer` - * and a WebGPU backend. - * - * @augments StorageBufferAttribute - */ -export class IndirectStorageBufferAttribute extends StorageBufferAttribute { - /** - * Constructs a new storage buffer attribute. - * - * @param {number|Uint32Array} count - The item count. It is also valid to pass a `Uint32Array` as an argument. - * The subsequent parameter is then obsolete. - * @param {number} itemSize - The item size. - */ - constructor(count: number | Uint32Array, itemSize: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isIndirectStorageBufferAttribute: boolean; -} -/** - * Base class for representing data input nodes. - * - * @augments Node - */ -export class InputNode extends Node { - /** - * Constructs a new input node. - * - * @param {any} value - The value of this node. This can be any JS primitive, functions, array buffers or even three.js objects (vector, matrices, colors). - * @param {?string} nodeType - The node type. If no explicit type is defined, the node tries to derive the type from its value. - */ - constructor(value: any, nodeType?: string | null); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isInputNode: boolean; - /** - * The value of this node. This can be any JS primitive, functions, array buffers or even three.js objects (vector, matrices, colors). - * - * @type {any} - */ - value: any; - /** - * The precision of the value in the shader. - * - * @type {?('low'|'medium'|'high')} - * @default null - */ - precision: ("low" | "medium" | "high") | null; - generateNodeType(): string | null; - /** - * Returns the input type of the node which is by default the node type. Derived modules - * might overwrite this method and use a fixed type or compute one analytically. - * - * A typical example for different input and node types are textures. The input type of a - * normal RGBA texture is `texture` whereas its node type is `vec4`. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The input type. - */ - getInputType(builder: NodeBuilder): string; - /** - * Sets the precision to the given value. The method can be - * overwritten in derived classes if the final precision must be computed - * analytically. - * - * @param {('low'|'medium'|'high')} precision - The precision of the input value in the shader. - * @return {InputNode} A reference to this node. - */ - setPrecision(precision: ("low" | "medium" | "high")): InputNode; - serialize(data: any): void; - deserialize(data: any): void; - generate(): void; -} -/** - * InspectorBase is the base class for all inspectors. - * - * @class InspectorBase - * @augments EventDispatcher - */ -export class InspectorBase extends EventDispatcher { - /** - * The renderer associated with this inspector. - * - * @type {WebGLRenderer} - * @private - */ - private _renderer; - /** - * The current frame being processed. - * - * @type {Object} - */ - currentFrame: Object; - /** - * Returns the node frame for the current renderer. - * - * @return {Object} The node frame. - */ - get nodeFrame(): Object; - /** - * Sets the renderer for this inspector. - * - * @param {WebGLRenderer} renderer - The renderer to associate with this inspector. - * @return {InspectorBase} This inspector instance. - */ - setRenderer(renderer: WebGLRenderer): InspectorBase; - /** - * Returns the renderer associated with this inspector. - * - * @return {WebGLRenderer} The associated renderer. - */ - getRenderer(): WebGLRenderer; - /** - * Initializes the inspector. - */ - init(): void; - /** - * Called when a frame begins. - */ - begin(): void; - /** - * Called when a frame ends. - */ - finish(): void; - /** - * Inspects a node. - * - * @param {Node} node - The node to inspect. - */ - inspect(): void; - /** - * When a compute operation is performed. - * - * @param {ComputeNode} computeNode - The compute node being executed. - * @param {number|Array} dispatchSizeOrCount - The dispatch size or count. - */ - computeAsync(): void; - /** - * Called when a compute operation begins. - * - * @param {string} uid - A unique identifier for the render context. - * @param {ComputeNode} computeNode - The compute node being executed. - */ - beginCompute(): void; - /** - * Called when a compute operation ends. - * - * @param {string} uid - A unique identifier for the render context. - * @param {ComputeNode} computeNode - The compute node being executed. - */ - finishCompute(): void; - /** - * Called when a render operation begins. - * - * @param {string} uid - A unique identifier for the render context. - * @param {Scene} scene - The scene being rendered. - * @param {Camera} camera - The camera being used for rendering. - * @param {?WebGLRenderTarget} renderTarget - The render target, if any. - */ - beginRender(): void; - /** - * Called when an animation loop ends. - * - * @param {string} uid - A unique identifier for the render context. - */ - finishRender(): void; - /** - * Called when a texture copy operation is performed. - * - * @param {Texture} srcTexture - The source texture. - * @param {Texture} dstTexture - The destination texture. - */ - copyTextureToTexture(): void; - /** - * Called when a framebuffer copy operation is performed. - * - * @param {Texture} framebufferTexture - The texture associated with the framebuffer. - */ - copyFramebufferToTexture(): void; -} -/** - * InspectorNode is a wrapper node that allows inspection of node values during rendering. - * It can be used to debug or analyze node outputs in the rendering pipeline. - * - * @augments Node - */ -export class InspectorNode extends Node { - /** - * Creates an InspectorNode. - * - * @param {Node} node - The node to inspect. - * @param {string} [name=''] - Optional name for the inspector node. - * @param {Function|null} [callback=null] - Optional callback to modify the node during setup. - */ - constructor(node: Node, name?: string, callback?: Function | null); - node: Node; - callback: Function | null; - isInspectorNode: boolean; - /** - * Returns the name of the inspector node. - * - * @returns {string} - */ - getName(): string; - /** - * Updates the inspector node, allowing inspection of the wrapped node. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update(frame: NodeFrame): void; - /** - * Returns the type of the wrapped node. - * - * @param {NodeBuilder} builder - The node builder. - * @returns {string} - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Sets up the inspector node. - * - * @param {NodeBuilder} builder - The node builder. - * @returns {Node} The setup node. - */ - setup(builder: NodeBuilder): Node; -} -/** - * This node implements the vertex shader logic which is required - * when rendering 3D objects via instancing. The code makes sure - * vertex positions, normals and colors can be modified via instanced - * data. - * - * @augments Node - */ -export class InstanceNode extends Node { - /** - * Constructs a new instance node. - * - * @param {number} count - The number of instances. - * @param {InstancedBufferAttribute|StorageInstancedBufferAttribute} instanceMatrix - Instanced buffer attribute representing the instance transformations. - * @param {?InstancedBufferAttribute|StorageInstancedBufferAttribute} instanceColor - Instanced buffer attribute representing the instance colors. - */ - constructor(count: number, instanceMatrix: InstancedBufferAttribute | StorageInstancedBufferAttribute, instanceColor?: (InstancedBufferAttribute | StorageInstancedBufferAttribute) | null); - /** - * The number of instances. - * - * @type {number} - */ - count: number; - /** - * Instanced buffer attribute representing the transformation of instances. - * - * @type {InstancedBufferAttribute} - */ - instanceMatrix: InstancedBufferAttribute; - /** - * Instanced buffer attribute representing the color of instances. - * - * @type {InstancedBufferAttribute} - */ - instanceColor: InstancedBufferAttribute; - /** - * The node that represents the instance matrix data. - * - * @type {?Node} - */ - instanceMatrixNode: Node | null; - /** - * The node that represents the instance color data. - * - * @type {?Node} - * @default null - */ - instanceColorNode: Node | null; - /** - * A reference to a buffer that is used by `instanceMatrixNode`. - * - * @type {?InstancedInterleavedBuffer} - */ - buffer: InstancedInterleavedBuffer | null; - /** - * A reference to a buffer that is used by `instanceColorNode`. - * - * @type {?InstancedBufferAttribute} - */ - bufferColor: InstancedBufferAttribute | null; - /** - * The previous instance matrices. Required for computing motion vectors. - * - * @type {?Node} - * @default null - */ - previousInstanceMatrixNode: Node | null; - /** - * Tracks whether the matrix data is provided via a storage buffer. - * - * @type {boolean} - */ - get isStorageMatrix(): boolean; - /** - * Tracks whether the color data is provided via a storage buffer. - * - * @type {boolean} - */ - get isStorageColor(): boolean; - /** - * Setups the internal buffers and nodes and assigns the transformed vertex data - * to predefined node variables for accumulation. That follows the same patterns - * like with morph and skinning nodes. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setup(builder: NodeBuilder): void; - /** - * Checks if the internal buffers require an update. - * - * @param {NodeFrame} frame - The current node frame. - */ - update(frame: NodeFrame): void; - /** - * Computes the transformed/instanced vertex position of the previous frame. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The instanced position from the previous frame. - */ - getPreviousInstancedPosition(builder: NodeBuilder): Node; - /** - * Creates a node representing the instance matrix data. - * - * @private - * @param {boolean} assignBuffer - Whether the created interleaved buffer should be assigned to the `buffer` member or not. - * @param {NodeBuilder} builder - A reference to the current node builder. - * @return {Node} The instance matrix node. - */ - private _createInstanceMatrixNode; -} -import { InstancedBufferAttribute } from './three.core.js'; -import { InstancedInterleavedBuffer } from './three.core.js'; -/** - * This is a special version of `InstanceNode` which requires the usage of {@link InstancedMesh}. - * It allows an easier setup of the instance node. - * - * @augments InstanceNode - */ -export class InstancedMeshNode extends InstanceNode { - /** - * Constructs a new instanced mesh node. - * - * @param {InstancedMesh} instancedMesh - The instanced mesh. - */ - constructor(instancedMesh: InstancedMesh); - /** - * A reference to the instanced mesh. - * - * @type {InstancedMesh} - */ - instancedMesh: InstancedMesh; -} -import { IntType } from './three.core.js'; -import { InterleavedBuffer } from './three.core.js'; -import { InterleavedBufferAttribute } from './three.core.js'; -import { InvertStencilOp } from './three.core.js'; -/** - * A generic class that can be used by nodes which contribute - * irradiance to the scene. E.g. a light map node can be used - * as input for this module. Used in {@link NodeMaterial}. - * - * @augments LightingNode - */ -export class IrradianceNode extends LightingNode { - /** - * Constructs a new irradiance node. - * - * @param {Node} node - A node contributing irradiance. - */ - constructor(node: Node); - /** - * A node contributing irradiance. - * - * @type {Node} - */ - node: Node; - setup(builder: any): void; -} -/** - * This node can be used as a cache management component for another node. - * Caching is in general used by default in {@link NodeBuilder} but this node - * allows the usage of a shared parent cache during the build process. - * - * @augments Node - */ -export class IsolateNode extends Node { - /** - * Constructs a new cache node. - * - * @param {Node} node - The node that should be cached. - * @param {boolean} [parent=true] - Whether this node refers to a shared parent cache or not. - */ - constructor(node: Node, parent?: boolean); - /** - * The node that should be cached. - * - * @type {Node} - */ - node: Node; - /** - * Whether this node refers to a shared parent cache or not. - * - * @type {boolean} - * @default true - */ - parent: boolean; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isIsolateNode: boolean; - generateNodeType(builder: any): string; - build(builder: any, ...params: any[]): string | Node | null; - setParent(parent: any): this; - getParent(): boolean; -} -/** - * This module is part of the TSL core and usually not used in app level code. - * It represents a join operation during the shader generation process. - * For example in can compose/join two single floats into a `vec2` type. - * - * @augments TempNode - */ -export class JoinNode extends TempNode { - /** - * Constructs a new join node. - * - * @param {Array} nodes - An array of nodes that should be joined. - * @param {?string} [nodeType=null] - The node type. - */ - constructor(nodes?: Array, nodeType?: string | null); - /** - * An array of nodes that should be joined. - * - * @type {Array} - */ - nodes: Array; - /** - * This method is overwritten since the node type must be inferred from the - * joined data length if not explicitly defined. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - generate(builder: any, output: any): any; -} -import { KeepStencilOp } from './three.core.js'; -import { LessCompare } from './three.core.js'; -import { LessDepth } from './three.core.js'; -import { LessEqualCompare } from './three.core.js'; -import { LessEqualDepth } from './three.core.js'; -import { LessEqualStencilFunc } from './three.core.js'; -import { LessStencilFunc } from './three.core.js'; -import { LightProbe } from './three.core.js'; -/** - * Module for representing light probes as nodes. - * - * @augments AnalyticLightNode - */ -export class LightProbeNode extends AnalyticLightNode { - /** - * Constructs a new light probe node. - * - * @param {?LightProbe} [light=null] - The light probe. - */ - constructor(light?: LightProbe | null); - /** - * Light probe represented as a uniform of spherical harmonics. - * - * @type {UniformArrayNode} - */ - lightProbe: UniformArrayNode; - /** - * Overwritten to updated light probe specific uniforms. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update(frame: NodeFrame): void; - setup(builder: any): void; -} -/** - * This renderer module manages the lights nodes which are unique - * per scene and camera combination. - * - * The lights node itself is later configured in the render list - * with the actual lights from the scene. - * - * @private - */ -export class Lighting { - /** - * Creates a new lights node for the given array of lights. - * - * @param {Array} lights - The render object. - * @return {LightsNode} The lights node. - */ - createNode(lights?: Array): LightsNode; - /** - * Returns a lights node for the given scene and camera. - * - * @param {Scene} scene - The scene. - * @param {Camera} camera - The camera. - * @return {LightsNode} The lights node. - */ - getNode(scene: Scene): LightsNode; -} -/** - * `LightingContextNode` represents an extension of the {@link ContextNode} module - * by adding lighting specific context data. It represents the runtime context of - * {@link LightsNode}. - * - * @augments ContextNode - */ -export class LightingContextNode extends ContextNode { - /** - * Constructs a new lighting context node. - * - * @param {LightsNode} lightsNode - The lights node. - * @param {?LightingModel} [lightingModel=null] - The current lighting model. - * @param {?Node} [backdropNode=null] - A backdrop node. - * @param {?Node} [backdropAlphaNode=null] - A backdrop alpha node. - */ - constructor(lightsNode: LightsNode, lightingModel?: LightingModel | null, backdropNode?: Node | null, backdropAlphaNode?: Node | null); - /** - * The current lighting model. - * - * @type {?LightingModel} - * @default null - */ - lightingModel: LightingModel | null; - /** - * A backdrop node. - * - * @type {?Node} - * @default null - */ - backdropNode: Node | null; - /** - * A backdrop alpha node. - * - * @type {?Node} - * @default null - */ - backdropAlphaNode: Node | null; - _value: { - radiance: Node; - irradiance: Node; - iblIrradiance: Node; - ambientOcclusion: Node; - reflectedLight: { - directDiffuse: Node; - directSpecular: Node; - indirectDiffuse: Node; - indirectSpecular: Node; - }; - backdrop: Node; - backdropAlpha: Node; - } | null; - /** - * Returns a lighting context object. - * - * @return {{ - * radiance: Node, - * irradiance: Node, - * iblIrradiance: Node, - * ambientOcclusion: Node, - * reflectedLight: {directDiffuse: Node, directSpecular: Node, indirectDiffuse: Node, indirectSpecular: Node}, - * backdrop: Node, - * backdropAlpha: Node - * }} The lighting context object. - */ - getContext(): { - radiance: Node; - irradiance: Node; - iblIrradiance: Node; - ambientOcclusion: Node; - reflectedLight: { - directDiffuse: Node; - directSpecular: Node; - indirectDiffuse: Node; - indirectSpecular: Node; - }; - backdrop: Node; - backdropAlpha: Node; - }; -} -/** - * Abstract class for implementing lighting models. The module defines - * multiple methods that concrete lighting models can implement. These - * methods are executed at different points during the light evaluation - * process. - */ -export class LightingModel { - /** - * This method is intended for setting up lighting model and context data - * which are later used in the evaluation process. - * - * @abstract - * @param {NodeBuilder} builder - The current node builder. - */ - start(builder: NodeBuilder): void; - /** - * This method is intended for executing final tasks like final updates - * to the outgoing light. - * - * @abstract - * @param {NodeBuilder} builder - The current node builder. - */ - finish(): void; - /** - * This method is intended for implementing the direct light term and - * executed during the build process of directional, point and spot light nodes. - * - * @abstract - * @param {Object} lightData - The light data. - * @param {NodeBuilder} builder - The current node builder. - */ - direct(): void; - /** - * This method is intended for implementing the direct light term for - * rect area light nodes. - * - * @abstract - * @param {Object} lightData - The light data. - * @param {NodeBuilder} builder - The current node builder. - */ - directRectArea(): void; - /** - * This method is intended for implementing the indirect light term. - * - * @abstract - * @param {NodeBuilder} builder - The current node builder. - */ - indirect(): void; - /** - * This method is intended for implementing the ambient occlusion term. - * Unlike other methods, this method must be called manually by the lighting - * model in its indirect term. - * - * @abstract - * @param {NodeBuilder} builder - The current node builder. - */ - ambientOcclusion(): void; -} -/** - * Base class for lighting nodes. - * - * @augments Node - */ -export class LightingNode extends Node { - /** - * Constructs a new lighting node. - */ - constructor(); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLightingNode: boolean; -} -/** - * This node represents the scene's lighting and manages the lighting model's life cycle - * for the current build 3D object. It is responsible for computing the total outgoing - * light in a given lighting context. - * - * @augments Node - */ -export class LightsNode extends Node { - /** - * Constructs a new lights node. - */ - constructor(); - /** - * A node representing the total diffuse light. - * - * @type {Node} - */ - totalDiffuseNode: Node; - /** - * A node representing the total specular light. - * - * @type {Node} - */ - totalSpecularNode: Node; - /** - * A node representing the outgoing light. - * - * @type {Node} - */ - outgoingLightNode: Node; - /** - * An array representing the lights in the scene. - * - * @private - * @type {Array} - */ - private _lights; - /** - * For each light in the scene, this node will create a - * corresponding light node. - * - * @private - * @type {?Array} - * @default null - */ - private _lightNodes; - /** - * A hash for identifying the current light nodes setup. - * - * @private - * @type {?string} - * @default null - */ - private _lightNodesHash; - /** - * Computes a hash value for identifying the current light nodes setup. - * - * @param {NodeBuilder} builder - A reference to the current node builder. - * @return {string} The computed hash. - */ - getHash(builder: NodeBuilder): string; - analyze(builder: any): void; - /** - * Creates lighting nodes for each scene light. This makes it possible to further - * process lights in the node system. - * - * @param {NodeBuilder} builder - A reference to the current node builder. - */ - setupLightsNode(builder: NodeBuilder): void; - /** - * Sets up a direct light in the lighting model. - * - * @param {Object} builder - The builder object containing the context and stack. - * @param {Object} lightNode - The light node. - * @param {Object} lightData - The light object containing color and direction properties. - */ - setupDirectLight(builder: Object, lightNode: Object, lightData: Object): void; - setupDirectRectAreaLight(builder: any, lightNode: any, lightData: any): void; - /** - * Setups the internal lights by building all respective - * light nodes. - * - * @param {NodeBuilder} builder - A reference to the current node builder. - * @param {Array} lightNodes - An array of lighting nodes. - */ - setupLights(builder: NodeBuilder, lightNodes: Array): void; - getLightNodes(builder: any): LightingNode[] | null; - /** - * The implementation makes sure that for each light in the scene - * there is a corresponding light node. By building the light nodes - * and evaluating the lighting model the outgoing light is computed. - * - * @param {NodeBuilder} builder - A reference to the current node builder. - * @return {Node} A node representing the outgoing light. - */ - setup(builder: NodeBuilder): Node; - /** - * Configures this node with an array of lights. - * - * @param {Array} lights - An array of lights. - * @return {LightsNode} A reference to this node. - */ - setLights(lights: Array): LightsNode; - /** - * Returns an array of the scene's lights. - * - * @return {Array} The scene's lights. - */ - getLights(): Array; - /** - * Whether the scene has lights or not. - * - * @type {boolean} - */ - get hasLights(): boolean; -} -/** - * This node material can be used to render lines with a size larger than one - * by representing them as instanced meshes. - * - * @augments NodeMaterial - */ -export class Line2NodeMaterial extends NodeMaterial { - /** - * Constructs a new node material for wide line rendering. - * - * @param {Object} [parameters={}] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLine2NodeMaterial: boolean; - /** - * The dash offset. - * - * @type {number} - * @default 0 - */ - dashOffset: number; - /** - * Defines the lines color. - * - * @type {?Node} - * @default null - */ - lineColorNode: Node | null; - /** - * Defines the offset. - * - * @type {?Node} - * @default null - */ - offsetNode: Node | null; - /** - * Defines the dash scale. - * - * @type {?Node} - * @default null - */ - dashScaleNode: Node | null; - /** - * Defines the dash size. - * - * @type {?Node} - * @default null - */ - dashSizeNode: Node | null; - /** - * Defines the gap size. - * - * @type {?Node} - * @default null - */ - gapSizeNode: Node | null; - _useDash: any; - _useAlphaToCoverage: boolean; - _useWorldUnits: boolean; - set worldUnits(value: boolean); - /** - * Whether the lines should sized in world units or not. - * When set to `false` the unit is pixel. - * - * @type {boolean} - * @default false - */ - get worldUnits(): boolean; - set dashed(value: boolean); - /** - * Whether the lines should be dashed or not. - * - * @type {boolean} - * @default false - */ - get dashed(): boolean; - /** - * Copies the properties of the given material to this instance. - * - * @param {Line2NodeMaterial} source - The material to copy. - * @return {Line2NodeMaterial} A reference to this material. - */ - copy(source: Line2NodeMaterial): Line2NodeMaterial; -} -import { LineBasicMaterial } from './three.core.js'; -/** - * Node material version of {@link LineBasicMaterial}. - * - * @augments NodeMaterial - */ -export class LineBasicNodeMaterial extends NodeMaterial { - /** - * Constructs a new line basic node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLineBasicNodeMaterial: boolean; -} -import { LineDashedMaterial } from './three.core.js'; -/** - * Node material version of {@link LineDashedMaterial}. - * - * @augments NodeMaterial - */ -export class LineDashedNodeMaterial extends NodeMaterial { - /** - * Constructs a new line dashed node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLineDashedNodeMaterial: boolean; - /** - * The dash offset. - * - * @type {number} - * @default 0 - */ - dashOffset: number; - /** - * The offset of dash materials is by default inferred from the `dashOffset` - * property. This node property allows to overwrite the default - * and define the offset with a node instead. - * - * If you don't want to overwrite the offset but modify the existing - * value instead, use {@link materialLineDashOffset}. - * - * @type {?Node} - * @default null - */ - offsetNode: Node | null; - /** - * The scale of dash materials is by default inferred from the `scale` - * property. This node property allows to overwrite the default - * and define the scale with a node instead. - * - * If you don't want to overwrite the scale but modify the existing - * value instead, use {@link materialLineScale}. - * - * @type {?Node} - * @default null - */ - dashScaleNode: Node | null; - /** - * The dash size of dash materials is by default inferred from the `dashSize` - * property. This node property allows to overwrite the default - * and define the dash size with a node instead. - * - * If you don't want to overwrite the dash size but modify the existing - * value instead, use {@link materialLineDashSize}. - * - * @type {?Node} - * @default null - */ - dashSizeNode: Node | null; - /** - * The gap size of dash materials is by default inferred from the `gapSize` - * property. This node property allows to overwrite the default - * and define the gap size with a node instead. - * - * If you don't want to overwrite the gap size but modify the existing - * value instead, use {@link materialLineGapSize}. - * - * @type {?Node} - * @default null - */ - gapSizeNode: Node | null; -} -import { LinearFilter } from './three.core.js'; -import { LinearMipMapLinearFilter } from './three.core.js'; -import { LinearMipmapLinearFilter } from './three.core.js'; -import { LinearMipmapNearestFilter } from './three.core.js'; -import { LinearSRGBColorSpace } from './three.core.js'; -import { LinearToneMapping } from './three.core.js'; -import { LinearTransfer } from './three.core.js'; -import { Loader } from './three.core.js'; -/** - * This module offers a variety of ways to implement loops in TSL. In it's basic form it's: - * ```js - * Loop( count, ( { i } ) => { - * - * } ); - * ``` - * However, it is also possible to define a start and end ranges, data types and loop conditions: - * ```js - * Loop( { start: int( 0 ), end: int( 10 ), type: 'int', condition: '<' }, ( { i } ) => { - * - * } ); - *``` - * Nested loops can be defined in a compacted form: - * ```js - * Loop( 10, 5, ( { i, j } ) => { - * - * } ); - * ``` - * Loops that should run backwards can be defined like so: - * ```js - * Loop( { start: 10 }, () => {} ); - * ``` - * It is possible to execute with boolean values, similar to the `while` syntax. - * ```js - * const value = float( 0 ).toVar(); - * - * Loop( value.lessThan( 10 ), () => { - * - * value.addAssign( 1 ); - * - * } ); - * ``` - * The module also provides `Break()` and `Continue()` TSL expression for loop control. - * @augments Node - */ -export class LoopNode extends Node { - /** - * Constructs a new loop node. - * - * @param {Array} params - Depending on the loop type, array holds different parameterization values for the loop. - */ - constructor(params?: Array); - params: any[]; - /** - * Returns a loop variable name based on an index. The pattern is - * `0` = `i`, `1`= `j`, `2`= `k` and so on. - * - * @param {number} index - The index. - * @return {string} The loop variable name. - */ - getVarName(index: number): string; - /** - * Returns properties about this node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Object} The node properties. - */ - getProperties(builder: NodeBuilder): Object; - setup(builder: any): void; - generate(builder: any): void; -} -/** - * This node can be used setup a MRT context for rendering. A typical MRT setup for - * post-processing is shown below: - * ```js - * const mrtNode = mrt( { - * output: output, - * normal: normalView - * } ) ; - * ``` - * The MRT output is defined as a dictionary. - * - * @augments OutputStructNode - */ -export class MRTNode extends OutputStructNode { - /** - * Constructs a new output struct node. - * - * @param {Object} outputNodes - The MRT outputs. - */ - constructor(outputNodes: { - [x: string]: Node; - }); - /** - * A dictionary representing the MRT outputs. The key - * is the name of the output, the value the node which produces - * the output result. - * - * @type {Object} - */ - outputNodes: { - [x: string]: Node; - }; - /** - * A dictionary storing the blend modes for each output. - * - * @type {Object} - */ - blendModes: { - [x: string]: BlendMode; - }; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMRTNode: boolean; - /** - * Sets the blend mode for the given output name. - * - * @param {string} name - The name of the output. - * @param {BlendMode} blend - The blending mode. - * @return {MRTNode} The current MRT node. - */ - setBlendMode(name: string, blend: BlendMode): MRTNode; - /** - * Returns the blend mode for the given output name. - * - * @param {string} name - The name of the output. - * @return {BlendMode} The blend mode. - */ - getBlendMode(name: string): BlendMode; - /** - * Returns `true` if the MRT node has an output with the given name. - * - * @param {string} name - The name of the output. - * @return {NodeBuilder} Whether the MRT node has an output for the given name or not. - */ - has(name: string): NodeBuilder; - /** - * Returns the output node for the given name. - * - * @param {string} name - The name of the output. - * @return {Node} The output node. - */ - get(name: string): Node; - /** - * Merges the outputs of the given MRT node with the outputs of this node. - * - * @param {MRTNode} mrtNode - The MRT to merge. - * @return {MRTNode} A new MRT node with merged outputs.. - */ - merge(mrtNode: MRTNode): MRTNode; - setup(builder: any): Node | null; -} -import { Material } from './three.core.js'; -import { MaterialBlending } from './three.core.js'; -import { MaterialLoader } from './three.core.js'; -/** - * This class should simplify the node access to material properties. - * It internal uses reference nodes to make sure changes to material - * properties are automatically reflected to predefined TSL objects - * like e.g. `materialColor`. - * - * @augments Node - */ -export class MaterialNode extends Node { - /** - * Constructs a new material node. - * - * @param {string} scope - The scope defines what kind of material property is referred by the node. - */ - constructor(scope: string); - /** - * The scope defines what material property is referred by the node. - * - * @type {string} - */ - scope: string; - /** - * Returns a cached reference node for the given property and type. - * - * @param {string} property - The name of the material property. - * @param {string} type - The uniform type of the property. - * @return {MaterialReferenceNode} A material reference node representing the property access. - */ - getCache(property: string, type: string): MaterialReferenceNode; - /** - * Returns a float-typed material reference node for the given property name. - * - * @param {string} property - The name of the material property. - * @return {MaterialReferenceNode} A material reference node representing the property access. - */ - getFloat(property: string): MaterialReferenceNode; - /** - * Returns a color-typed material reference node for the given property name. - * - * @param {string} property - The name of the material property. - * @return {MaterialReferenceNode} A material reference node representing the property access. - */ - getColor(property: string): MaterialReferenceNode; - /** - * Returns a texture-typed material reference node for the given property name. - * - * @param {string} property - The name of the material property. - * @return {MaterialReferenceNode} A material reference node representing the property access. - */ - getTexture(property: string): MaterialReferenceNode; - /** - * The node setup is done depending on the selected scope. Multiple material properties - * might be grouped into a single node composition if they logically belong together. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The node representing the selected scope. - */ - setup(builder: NodeBuilder): Node; -} -export namespace MaterialNode { - let ALPHA_TEST: string; - let COLOR: string; - let OPACITY: string; - let SHININESS: string; - let SPECULAR: string; - let SPECULAR_STRENGTH: string; - let SPECULAR_INTENSITY: string; - let SPECULAR_COLOR: string; - let REFLECTIVITY: string; - let ROUGHNESS: string; - let METALNESS: string; - let NORMAL: string; - let CLEARCOAT: string; - let CLEARCOAT_ROUGHNESS: string; - let CLEARCOAT_NORMAL: string; - let EMISSIVE: string; - let ROTATION: string; - let SHEEN: string; - let SHEEN_ROUGHNESS: string; - let ANISOTROPY: string; - let IRIDESCENCE: string; - let IRIDESCENCE_IOR: string; - let IRIDESCENCE_THICKNESS: string; - let IOR: string; - let TRANSMISSION: string; - let THICKNESS: string; - let ATTENUATION_DISTANCE: string; - let ATTENUATION_COLOR: string; - let LINE_SCALE: string; - let LINE_DASH_SIZE: string; - let LINE_GAP_SIZE: string; - let LINE_WIDTH: string; - let LINE_DASH_OFFSET: string; - let POINT_SIZE: string; - let DISPERSION: string; - let LIGHT_MAP: string; - let AO: string; -} -/** - * This node is a special type of reference node which is intended - * for linking material properties with node values. - * ```js - * const opacityNode = materialReference( 'opacity', 'float', material ); - * ``` - * When changing `material.opacity`, the node value of `opacityNode` will - * automatically be updated. - * - * @augments ReferenceNode - */ -export class MaterialReferenceNode extends ReferenceNode { - /** - * Constructs a new material reference node. - * - * @param {string} property - The name of the property the node refers to. - * @param {string} inputType - The uniform type that should be used to represent the property value. - * @param {?Material} [material=null] - The material the property belongs to. When no material is set, - * the node refers to the material of the current rendered object. - */ - constructor(property: string, inputType: string, material?: Material | null); - /** - * The material the property belongs to. When no material is set, - * the node refers to the material of the current rendered object. - * - * @type {?Material} - * @default null - */ - material: Material | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMaterialReferenceNode: boolean; -} -/** - * This node represents a variety of mathematical methods available in shaders. - * They are divided into three categories: - * - * - Methods with one input like `sin`, `cos` or `normalize`. - * - Methods with two inputs like `dot`, `cross` or `pow`. - * - Methods with three inputs like `mix`, `clamp` or `smoothstep`. - * - * @augments TempNode - */ -export class MathNode extends TempNode { - /** - * Constructs a new math node. - * - * @param {string} method - The method name. - * @param {Node} aNode - The first input. - * @param {?Node} [bNode=null] - The second input. - * @param {?Node} [cNode=null] - The third input. - */ - constructor(method: string, aNode: Node, bNode?: Node | null, cNode?: Node | null, ...args: any[]); - /** - * The method name. - * - * @type {string} - */ - method: string; - /** - * The first input. - * - * @type {Node} - */ - aNode: Node; - /** - * The second input. - * - * @type {?Node} - * @default null - */ - bNode: Node | null; - /** - * The third input. - * - * @type {?Node} - * @default null - */ - cNode: Node | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMathNode: boolean; - /** - * The input type is inferred from the node types of the input nodes. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The input type. - */ - getInputType(builder: NodeBuilder): string; - /** - * The selected method as well as the input type determine the node type of this node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - setup(builder: any): any; - generate(builder: any, output: any): any; - serialize(data: any): void; - deserialize(data: any): void; -} -export namespace MathNode { - let ALL: string; - let ANY: string; - let RADIANS: string; - let DEGREES: string; - let EXP: string; - let EXP2: string; - let LOG: string; - let LOG2: string; - let SQRT: string; - let INVERSE_SQRT: string; - let FLOOR: string; - let CEIL: string; - let NORMALIZE: string; - let FRACT: string; - let SIN: string; - let SINH: string; - let COS: string; - let COSH: string; - let TAN: string; - let TANH: string; - let ASIN: string; - let ASINH: string; - let ACOS: string; - let ACOSH: string; - let ATAN: string; - let ATANH: string; - let ABS: string; - let SIGN: string; - let LENGTH: string; - let NEGATE: string; - let ONE_MINUS: string; - let DFDX: string; - let DFDY: string; - let ROUND: string; - let RECIPROCAL: string; - let TRUNC: string; - let FWIDTH: string; - let TRANSPOSE: string; - let DETERMINANT: string; - let INVERSE: string; - let EQUALS: string; - let MIN: string; - let MAX: string; - let STEP: string; - let REFLECT: string; - let DISTANCE: string; - let DIFFERENCE: string; - let DOT: string; - let CROSS: string; - let POW: string; - let TRANSFORM_DIRECTION: string; - let MIX: string; - let CLAMP: string; - let REFRACT: string; - let SMOOTHSTEP: string; - let FACEFORWARD: string; -} -import { MathUtils } from './three.core.js'; -import { Matrix2 } from './three.core.js'; -import { Matrix3 } from './three.core.js'; -import { Matrix4 } from './three.core.js'; -import { MaxEquation } from './three.core.js'; -/** - * A special type of uniform node that computes the - * maximum mipmap level for a given texture node. - * - * ```js - * const level = maxMipLevel( textureNode ); - * ``` - * - * @augments UniformNode - */ -export class MaxMipLevelNode extends UniformNode { - /** - * Constructs a new max mip level node. - * - * @param {TextureNode} textureNode - The texture node to compute the max mip level for. - */ - constructor(textureNode: TextureNode); - /** - * The texture node to compute the max mip level for. - * - * @private - * @type {TextureNode} - */ - private _textureNode; - /** - * The texture node to compute the max mip level for. - * - * @readonly - * @type {TextureNode} - */ - readonly get textureNode(): TextureNode; - /** - * The texture. - * - * @readonly - * @type {Texture} - */ - readonly get texture(): Texture; - update(): void; -} -/** - * Base class for representing member access on an object-like - * node data structures. - * - * @augments Node - */ -export class MemberNode extends Node { - /** - * Constructs a member node. - * - * @param {Node} structNode - The struct node. - * @param {string} property - The property name. - */ - constructor(structNode: Node, property: string); - /** - * The struct node. - * - * @type {Node} - */ - structNode: Node; - /** - * The property name. - * - * @type {Node} - */ - property: Node; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMemberNode: boolean; - hasMember(builder: any): boolean; - generateNodeType(builder: any): string; - getMemberType(builder: any, name: any): any; - generate(builder: any): any; -} -import { Mesh } from './three.core.js'; -import { MeshBasicMaterial } from './three.core.js'; -/** - * Node material version of {@link MeshBasicMaterial}. - * - * @augments NodeMaterial - */ -export class MeshBasicNodeMaterial extends NodeMaterial { - /** - * Constructs a new mesh basic node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshBasicNodeMaterial: boolean; - /** - * Overwritten since this type of material uses {@link BasicEnvironmentNode} - * to implement the default environment mapping. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {?BasicEnvironmentNode} The environment node. - */ - setupEnvironment(builder: NodeBuilder): BasicEnvironmentNode | null; - /** - * Setups the lighting model. - * - * @return {BasicLightingModel} The lighting model. - */ - setupLightingModel(): BasicLightingModel; -} -import { MeshLambertMaterial } from './three.core.js'; -/** - * Node material version of {@link MeshLambertMaterial}. - * - * @augments NodeMaterial - */ -export class MeshLambertNodeMaterial extends NodeMaterial { - /** - * Constructs a new mesh lambert node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshLambertNodeMaterial: boolean; - /** - * Overwritten since this type of material uses {@link BasicEnvironmentNode} - * to implement the default environment mapping. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {?BasicEnvironmentNode} The environment node. - */ - setupEnvironment(builder: NodeBuilder): BasicEnvironmentNode | null; - /** - * Setups the lighting model. - * - * @return {PhongLightingModel} The lighting model. - */ - setupLightingModel(): PhongLightingModel; -} -import { MeshMatcapMaterial } from './three.core.js'; -/** - * Node material version of {@link MeshMatcapMaterial}. - * - * @augments NodeMaterial - */ -export class MeshMatcapNodeMaterial extends NodeMaterial { - /** - * Constructs a new mesh normal node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshMatcapNodeMaterial: boolean; - /** - * Setups the matcap specific node variables. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setupVariants(builder: NodeBuilder): void; -} -import { MeshNormalMaterial } from './three.core.js'; -/** - * Node material version of {@link MeshNormalMaterial}. - * - * @augments NodeMaterial - */ -export class MeshNormalNodeMaterial extends NodeMaterial { - /** - * Constructs a new mesh normal node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshNormalNodeMaterial: boolean; - /** - * Overwrites the default implementation by computing the diffuse color - * based on the normal data. - */ - setupDiffuseColor(): void; -} -import { MeshPhongMaterial } from './three.core.js'; -/** - * Node material version of {@link MeshPhongMaterial}. - * - * @augments NodeMaterial - */ -export class MeshPhongNodeMaterial extends NodeMaterial { - /** - * Constructs a new mesh lambert node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshPhongNodeMaterial: boolean; - /** - * The shininess of phong materials is by default inferred from the `shininess` - * property. This node property allows to overwrite the default - * and define the shininess with a node instead. - * - * If you don't want to overwrite the shininess but modify the existing - * value instead, use {@link materialShininess}. - * - * @type {?Node} - * @default null - */ - shininessNode: Node | null; - /** - * The specular color of phong materials is by default inferred from the - * `specular` property. This node property allows to overwrite the default - * and define the specular color with a node instead. - * - * If you don't want to overwrite the specular color but modify the existing - * value instead, use {@link materialSpecular}. - * - * @type {?Node} - * @default null - */ - specularNode: Node | null; - /** - * Overwritten since this type of material uses {@link BasicEnvironmentNode} - * to implement the default environment mapping. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {?BasicEnvironmentNode} The environment node. - */ - setupEnvironment(builder: NodeBuilder): BasicEnvironmentNode | null; - /** - * Setups the lighting model. - * - * @return {PhongLightingModel} The lighting model. - */ - setupLightingModel(): PhongLightingModel; - copy(source: any): NodeMaterial; -} -import { MeshPhysicalMaterial } from './three.core.js'; -/** - * Node material version of {@link MeshPhysicalMaterial}. - * - * @augments MeshStandardNodeMaterial - */ -export class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshPhysicalNodeMaterial: boolean; - /** - * The clearcoat of physical materials is by default inferred from the `clearcoat` - * and `clearcoatMap` properties. This node property allows to overwrite the default - * and define the clearcoat with a node instead. - * - * If you don't want to overwrite the clearcoat but modify the existing - * value instead, use {@link materialClearcoat}. - * - * @type {?Node} - * @default null - */ - clearcoatNode: Node | null; - /** - * The clearcoat roughness of physical materials is by default inferred from the `clearcoatRoughness` - * and `clearcoatRoughnessMap` properties. This node property allows to overwrite the default - * and define the clearcoat roughness with a node instead. - * - * If you don't want to overwrite the clearcoat roughness but modify the existing - * value instead, use {@link materialClearcoatRoughness}. - * - * @type {?Node} - * @default null - */ - clearcoatRoughnessNode: Node | null; - /** - * The clearcoat normal of physical materials is by default inferred from the `clearcoatNormalMap` - * property. This node property allows to overwrite the default - * and define the clearcoat normal with a node instead. - * - * If you don't want to overwrite the clearcoat normal but modify the existing - * value instead, use {@link materialClearcoatNormal}. - * - * @type {?Node} - * @default null - */ - clearcoatNormalNode: Node | null; - /** - * The sheen of physical materials is by default inferred from the `sheen`, `sheenColor` - * and `sheenColorMap` properties. This node property allows to overwrite the default - * and define the sheen with a node instead. - * - * If you don't want to overwrite the sheen but modify the existing - * value instead, use {@link materialSheen}. - * - * @type {?Node} - * @default null - */ - sheenNode: Node | null; - /** - * The sheen roughness of physical materials is by default inferred from the `sheenRoughness` and - * `sheenRoughnessMap` properties. This node property allows to overwrite the default - * and define the sheen roughness with a node instead. - * - * If you don't want to overwrite the sheen roughness but modify the existing - * value instead, use {@link materialSheenRoughness}. - * - * @type {?Node} - * @default null - */ - sheenRoughnessNode: Node | null; - /** - * The iridescence of physical materials is by default inferred from the `iridescence` - * property. This node property allows to overwrite the default - * and define the iridescence with a node instead. - * - * If you don't want to overwrite the iridescence but modify the existing - * value instead, use {@link materialIridescence}. - * - * @type {?Node} - * @default null - */ - iridescenceNode: Node | null; - /** - * The iridescence IOR of physical materials is by default inferred from the `iridescenceIOR` - * property. This node property allows to overwrite the default - * and define the iridescence IOR with a node instead. - * - * If you don't want to overwrite the iridescence IOR but modify the existing - * value instead, use {@link materialIridescenceIOR}. - * - * @type {?Node} - * @default null - */ - iridescenceIORNode: Node | null; - /** - * The iridescence thickness of physical materials is by default inferred from the `iridescenceThicknessRange` - * and `iridescenceThicknessMap` properties. This node property allows to overwrite the default - * and define the iridescence thickness with a node instead. - * - * If you don't want to overwrite the iridescence thickness but modify the existing - * value instead, use {@link materialIridescenceThickness}. - * - * @type {?Node} - * @default null - */ - iridescenceThicknessNode: Node | null; - /** - * The specular intensity of physical materials is by default inferred from the `specularIntensity` - * and `specularIntensityMap` properties. This node property allows to overwrite the default - * and define the specular intensity with a node instead. - * - * If you don't want to overwrite the specular intensity but modify the existing - * value instead, use {@link materialSpecularIntensity}. - * - * @type {?Node} - * @default null - */ - specularIntensityNode: Node | null; - /** - * The specular color of physical materials is by default inferred from the `specularColor` - * and `specularColorMap` properties. This node property allows to overwrite the default - * and define the specular color with a node instead. - * - * If you don't want to overwrite the specular color but modify the existing - * value instead, use {@link materialSpecularColor}. - * - * @type {?Node} - * @default null - */ - specularColorNode: Node | null; - /** - * The ior of physical materials is by default inferred from the `ior` - * property. This node property allows to overwrite the default - * and define the ior with a node instead. - * - * If you don't want to overwrite the ior but modify the existing - * value instead, use {@link materialIOR}. - * - * @type {?Node} - * @default null - */ - iorNode: Node | null; - /** - * The transmission of physical materials is by default inferred from the `transmission` and - * `transmissionMap` properties. This node property allows to overwrite the default - * and define the transmission with a node instead. - * - * If you don't want to overwrite the transmission but modify the existing - * value instead, use {@link materialTransmission}. - * - * @type {?Node} - * @default null - */ - transmissionNode: Node | null; - /** - * The thickness of physical materials is by default inferred from the `thickness` and - * `thicknessMap` properties. This node property allows to overwrite the default - * and define the thickness with a node instead. - * - * If you don't want to overwrite the thickness but modify the existing - * value instead, use {@link materialThickness}. - * - * @type {?Node} - * @default null - */ - thicknessNode: Node | null; - /** - * The attenuation distance of physical materials is by default inferred from the - * `attenuationDistance` property. This node property allows to overwrite the default - * and define the attenuation distance with a node instead. - * - * If you don't want to overwrite the attenuation distance but modify the existing - * value instead, use {@link materialAttenuationDistance}. - * - * @type {?Node} - * @default null - */ - attenuationDistanceNode: Node | null; - /** - * The attenuation color of physical materials is by default inferred from the - * `attenuationColor` property. This node property allows to overwrite the default - * and define the attenuation color with a node instead. - * - * If you don't want to overwrite the attenuation color but modify the existing - * value instead, use {@link materialAttenuationColor}. - * - * @type {?Node} - * @default null - */ - attenuationColorNode: Node | null; - /** - * The dispersion of physical materials is by default inferred from the - * `dispersion` property. This node property allows to overwrite the default - * and define the dispersion with a node instead. - * - * If you don't want to overwrite the dispersion but modify the existing - * value instead, use {@link materialDispersion}. - * - * @type {?Node} - * @default null - */ - dispersionNode: Node | null; - /** - * The anisotropy of physical materials is by default inferred from the - * `anisotropy` property. This node property allows to overwrite the default - * and define the anisotropy with a node instead. - * - * If you don't want to overwrite the anisotropy but modify the existing - * value instead, use {@link materialAnisotropy}. - * - * @type {?Node} - * @default null - */ - anisotropyNode: Node | null; - /** - * Whether the lighting model should use clearcoat or not. - * - * @type {boolean} - * @default true - */ - get useClearcoat(): boolean; - /** - * Whether the lighting model should use iridescence or not. - * - * @type {boolean} - * @default true - */ - get useIridescence(): boolean; - /** - * Whether the lighting model should use sheen or not. - * - * @type {boolean} - * @default true - */ - get useSheen(): boolean; - /** - * Whether the lighting model should use anisotropy or not. - * - * @type {boolean} - * @default true - */ - get useAnisotropy(): boolean; - /** - * Whether the lighting model should use transmission or not. - * - * @type {boolean} - * @default true - */ - get useTransmission(): boolean; - /** - * Whether the lighting model should use dispersion or not. - * - * @type {boolean} - * @default true - */ - get useDispersion(): boolean; - /** - * Setups the physical specific node variables. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setupVariants(builder: NodeBuilder): void; - /** - * Setups the clearcoat normal node. - * - * @return {Node} The clearcoat normal. - */ - setupClearcoatNormal(): Node; - setup(builder: any): void; -} -/** - * This node material is an experimental extension of {@link MeshPhysicalNodeMaterial} - * that implements a Subsurface scattering (SSS) term. - * - * @augments MeshPhysicalNodeMaterial - */ -export class MeshSSSNodeMaterial extends MeshPhysicalNodeMaterial { - /** - * Represents the thickness color. - * - * @type {?Node} - * @default null - */ - thicknessColorNode: Node | null; - /** - * Represents the distortion factor. - * - * @type {?Node} - */ - thicknessDistortionNode: Node | null; - /** - * Represents the thickness ambient factor. - * - * @type {?Node} - */ - thicknessAmbientNode: Node | null; - /** - * Represents the thickness attenuation. - * - * @type {?Node} - */ - thicknessAttenuationNode: Node | null; - /** - * Represents the thickness power. - * - * @type {?Node} - */ - thicknessPowerNode: Node | null; - /** - * Represents the thickness scale. - * - * @type {?Node} - */ - thicknessScaleNode: Node | null; - /** - * Whether the lighting model should use SSS or not. - * - * @type {boolean} - * @default true - */ - get useSSS(): boolean; - /** - * Setups the lighting model. - * - * @return {SSSLightingModel} The lighting model. - */ - setupLightingModel(): SSSLightingModel; -} -import { MeshStandardMaterial } from './three.core.js'; -/** - * Node material version of {@link MeshStandardMaterial}. - * - * @augments NodeMaterial - */ -export class MeshStandardNodeMaterial extends NodeMaterial { - /** - * Constructs a new mesh standard node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshStandardNodeMaterial: boolean; - /** - * The emissive color of standard materials is by default inferred from the `emissive`, - * `emissiveIntensity` and `emissiveMap` properties. This node property allows to - * overwrite the default and define the emissive color with a node instead. - * - * If you don't want to overwrite the emissive color but modify the existing - * value instead, use {@link materialEmissive}. - * - * @type {?Node} - * @default null - */ - emissiveNode: Node | null; - /** - * The metalness of standard materials is by default inferred from the `metalness`, - * and `metalnessMap` properties. This node property allows to - * overwrite the default and define the metalness with a node instead. - * - * If you don't want to overwrite the metalness but modify the existing - * value instead, use {@link materialMetalness}. - * - * @type {?Node} - * @default null - */ - metalnessNode: Node | null; - /** - * The roughness of standard materials is by default inferred from the `roughness`, - * and `roughnessMap` properties. This node property allows to - * overwrite the default and define the roughness with a node instead. - * - * If you don't want to overwrite the roughness but modify the existing - * value instead, use {@link materialRoughness}. - * - * @type {?Node} - * @default null - */ - roughnessNode: Node | null; - /** - * Overwritten since this type of material uses {@link EnvironmentNode} - * to implement the PBR (PMREM based) environment mapping. Besides, the - * method honors `Scene.environment`. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {?EnvironmentNode} The environment node. - */ - setupEnvironment(builder: NodeBuilder): EnvironmentNode | null; - /** - * Setups the lighting model. - * - * @return {PhysicalLightingModel} The lighting model. - */ - setupLightingModel(): PhysicalLightingModel; - /** - * Setups the specular related node variables. - */ - setupSpecular(): void; - copy(source: any): NodeMaterial; -} -import { MeshToonMaterial } from './three.core.js'; -/** - * Node material version of {@link MeshToonMaterial}. - * - * @augments NodeMaterial - */ -export class MeshToonNodeMaterial extends NodeMaterial { - /** - * Constructs a new mesh toon node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshToonNodeMaterial: boolean; - /** - * Setups the lighting model. - * - * @return {ToonLightingModel} The lighting model. - */ - setupLightingModel(): ToonLightingModel; -} -import { MinEquation } from './three.core.js'; -import { MirroredRepeatWrapping } from './three.core.js'; -import { MixOperation } from './three.core.js'; -/** - * This type of node is a specialized version of `Object3DNode` - * with larger set of model related metrics. Unlike `Object3DNode`, - * `ModelNode` extracts the reference to the 3D object from the - * current node frame state. - * - * @augments Object3DNode - */ -export class ModelNode extends Object3DNode { - /** - * Constructs a new object model node. - * - * @param {('position'|'viewPosition'|'direction'|'scale'|'worldMatrix')} scope - The node represents a different type of transformation depending on the scope. - */ - constructor(scope: ("position" | "viewPosition" | "direction" | "scale" | "worldMatrix")); -} -/** - * This node implements the vertex transformation shader logic which is required - * for morph target animation. - * - * @augments Node - */ -export class MorphNode extends Node { - /** - * Constructs a new morph node. - * - * @param {Mesh} mesh - The mesh holding the morph targets. - */ - constructor(mesh: Mesh); - /** - * The mesh holding the morph targets. - * - * @type {Mesh} - */ - mesh: Mesh; - /** - * A uniform node which represents the morph base influence value. - * - * @type {UniformNode} - */ - morphBaseInfluence: UniformNode; - /** - * Setups the morph node by assigning the transformed vertex data to predefined node variables. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setup(builder: NodeBuilder): void; - /** - * Updates the state of the morphed mesh by updating the base influence. - * - * @param {NodeFrame} frame - The current node frame. - */ - update(): void; -} -import { MultiplyBlending } from './three.core.js'; -import { MultiplyOperation } from './three.core.js'; -import { NearestFilter } from './three.core.js'; -import { NearestMipmapLinearFilter } from './three.core.js'; -import { NearestMipmapNearestFilter } from './three.core.js'; -import { NeutralToneMapping } from './three.core.js'; -import { NeverCompare } from './three.core.js'; -import { NeverDepth } from './three.core.js'; -import { NeverStencilFunc } from './three.core.js'; -import { NoBlending } from './three.core.js'; -import { NoColorSpace } from './three.core.js'; -import { NoNormalPacking } from './three.core.js'; -import { NoToneMapping } from './three.core.js'; -/** - * Base class for all nodes. - * - * @augments EventDispatcher - */ -export class Node extends EventDispatcher { - static get type(): string; - /** - * Constructs a new node. - * - * @param {?string} nodeType - The node type. - */ - constructor(nodeType?: string | null); - /** - * The node type. This represents the result type of the node (e.g. `float` or `vec3`). - * - * @type {?string} - * @default null - */ - nodeType: string | null; - /** - * The update type of the node's {@link Node#update} method. Possible values are listed in {@link NodeUpdateType}. - * - * @type {string} - * @default 'none' - */ - updateType: string; - /** - * The update type of the node's {@link Node#updateBefore} method. Possible values are listed in {@link NodeUpdateType}. - * - * @type {string} - * @default 'none' - */ - updateBeforeType: string; - /** - * The update type of the node's {@link Node#updateAfter} method. Possible values are listed in {@link NodeUpdateType}. - * - * @type {string} - * @default 'none' - */ - updateAfterType: string; - /** - * The version of the node. The version automatically is increased when {@link Node#needsUpdate} is set to `true`. - * - * @type {number} - * @readonly - * @default 0 - */ - readonly version: number; - /** - * The name of the node. - * - * @type {string} - * @default '' - */ - name: string; - /** - * Whether this node is global or not. This property is relevant for the internal - * node caching system. All nodes which should be declared just once should - * set this flag to `true` (a typical example is {@link AttributeNode}). - * - * @type {boolean} - * @default false - */ - global: boolean; - /** - * Create a list of parents for this node during the build process. - * - * @type {boolean} - * @default false - */ - parents: boolean; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isNode: boolean; - _beforeNodes: any; - /** - * The cache key of this node. - * - * @private - * @type {?number} - * @default null - */ - private _cacheKey; - /** - * The UUID of the node. - * - * @type {string} - * @default null - * @private - */ - private _uuid; - /** - * The cache key's version. - * - * @private - * @type {number} - * @default 0 - */ - private _cacheKeyVersion; - /** - * The unique ID of the node. - * - * @type {number} - * @readonly - */ - readonly id: number; - /** - * The stack trace of the node for debugging purposes. - * - * @type {?string} - * @default null - */ - stackTrace: string | null; - /** - * Set this property to `true` when the node should be regenerated. - * - * @type {boolean} - * @default false - * @param {boolean} value - */ - set needsUpdate(value: boolean); - /** - * The UUID of the node. - * - * @type {string} - * @readonly - */ - readonly get uuid(): string; - /** - * The type of the class. The value is usually the constructor name. - * - * @type {string} - * @readonly - */ - readonly get type(): string; - /** - * Convenient method for defining {@link Node#update}. - * - * @param {Function} callback - The update method. - * @param {string} updateType - The update type. - * @return {Node} A reference to this node. - */ - onUpdate(callback: Function, updateType: string): Node; - /** - * The method can be implemented to update the node's internal state when it is used to render an object. - * The {@link Node#updateType} property defines how often the update is executed. - * - * @abstract - * @param {NodeFrame} frame - A reference to the current node frame. - * @return {?boolean} An optional bool that indicates whether the implementation actually performed an update or not (e.g. due to caching). - */ - update(): boolean | null; - /** - * Convenient method for defining {@link Node#update}. Similar to {@link Node#onUpdate}, but - * this method automatically sets the update type to `FRAME`. - * - * @param {Function} callback - The update method. - * @return {Node} A reference to this node. - */ - onFrameUpdate(callback: Function): Node; - /** - * Convenient method for defining {@link Node#update}. Similar to {@link Node#onUpdate}, but - * this method automatically sets the update type to `RENDER`. - * - * @param {Function} callback - The update method. - * @return {Node} A reference to this node. - */ - onRenderUpdate(callback: Function): Node; - /** - * Convenient method for defining {@link Node#update}. Similar to {@link Node#onUpdate}, but - * this method automatically sets the update type to `OBJECT`. - * - * @param {Function} callback - The update method. - * @return {Node} A reference to this node. - */ - onObjectUpdate(callback: Function): Node; - /** - * Convenient method for defining {@link Node#updateReference}. - * - * @param {Function} callback - The update method. - * @return {Node} A reference to this node. - */ - onReference(callback: Function): Node; - /** - * Nodes might refer to other objects like materials. This method allows to dynamically update the reference - * to such objects based on a given state (e.g. the current node frame or builder). - * - * @param {any} state - This method can be invocated in different contexts so `state` can refer to any object type. - * @return {any} The updated reference. - */ - updateReference(): any; - /** - * By default this method returns the value of the {@link Node#global} flag. This method - * can be overwritten in derived classes if an analytical way is required to determine the - * global cache referring to the current shader-stage. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {boolean} Whether this node is global or not. - */ - isGlobal(): boolean; - /** - * Generator function that can be used to iterate over the child nodes. - * - * @generator - * @yields {Node} A child node. - */ - getChildren(): Generator; - /** - * Calling this method dispatches the `dispose` event. This event can be used - * to register event listeners for clean up tasks. - */ - dispose(): void; - /** - * Callback for {@link Node#traverse}. - * - * @callback traverseCallback - * @param {Node} node - The current node. - */ - /** - * Can be used to traverse through the node's hierarchy. - * - * @param {traverseCallback} callback - A callback that is executed per node. - */ - traverse(callback: (node: Node) => any): void; - /** - * Returns the child nodes of this node. - * - * @private - * @param {Set} [ignores=new Set()] - A set of nodes to ignore during the search to avoid circular references. - * @returns {Array} An array of objects describing the child nodes. - */ - private _getChildren; - /** - * Returns the cache key for this node. - * - * @param {boolean} [force=false] - When set to `true`, a recomputation of the cache key is forced. - * @param {Set} [ignores=null] - A set of nodes to ignore during the computation of the cache key. - * @return {number} The cache key of the node. - */ - getCacheKey(force?: boolean, ignores?: Set): number; - /** - * Generate a custom cache key for this node. - * - * @return {number} The cache key of the node. - */ - customCacheKey(): number; - /** - * Returns the references to this node which is by default `this`. - * - * @return {Node} A reference to this node. - */ - getScope(): Node; - /** - * Returns the hash of the node which is used to identify the node. By default it's - * the {@link Node#uuid} however derived node classes might have to overwrite this method - * depending on their implementation. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The hash. - */ - getHash(): string; - /** - * Returns the update type of {@link Node#update}. - * - * @return {NodeUpdateType} The update type. - */ - getUpdateType(): { - NONE: string; - FRAME: string; - RENDER: string; - OBJECT: string; - }; - /** - * Returns the update type of {@link Node#updateBefore}. - * - * @return {NodeUpdateType} The update type. - */ - getUpdateBeforeType(): { - NONE: string; - FRAME: string; - RENDER: string; - OBJECT: string; - }; - /** - * Returns the update type of {@link Node#updateAfter}. - * - * @return {NodeUpdateType} The update type. - */ - getUpdateAfterType(): { - NONE: string; - FRAME: string; - RENDER: string; - OBJECT: string; - }; - /** - * Certain types are composed of multiple elements. For example a `vec3` - * is composed of three `float` values. This method returns the type of - * these elements. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The type of the node. - */ - getElementType(builder: NodeBuilder): string; - /** - * Returns the node member type for the given name. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} name - The name of the member. - * @return {string} The type of the node. - */ - getMemberType(): string; - /** - * Returns the node's type. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} [output=null] - The output of the node. - * @return {string} The type of the node. - */ - getNodeType(builder: NodeBuilder, output?: string): string; - /** - * Returns the node's type. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} [output=null] - The output of the node. - * @return {string} The type of the node. - */ - generateNodeType(builder: NodeBuilder, output?: string): string; - /** - * This method is used during the build process of a node and ensures - * equal nodes are not built multiple times but just once. For example if - * `attribute( 'uv' )` is used multiple times by the user, the build - * process makes sure to process just the first node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The shared node if possible. Otherwise `this` is returned. - */ - getShared(builder: NodeBuilder): Node; - /** - * Returns the number of elements in the node array. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {?number} The number of elements in the node array. - */ - getArrayCount(): number | null; - /** - * Represents the setup stage which is the first step of the build process, see {@link Node#build} method. - * This method is often overwritten in derived modules to prepare the node which is used as a node's output/result. - * If an output node is prepared, then it must be returned in the `return` statement of the derived module's setup function. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {?Node} The output node. - */ - setup(builder: NodeBuilder): Node | null; - /** - * Represents the analyze stage which is the second step of the build process, see {@link Node#build} method. - * This stage analyzes the node hierarchy and ensures descendent nodes are built. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {?Node} output - The target output node. - */ - analyze(builder: NodeBuilder, output?: Node | null): void; - /** - * Represents the generate stage which is the third step of the build process, see {@link Node#build} method. - * This state builds the output node and returns the resulting shader string. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {?string} [output] - Can be used to define the output type. - * @return {?string} The generated shader string. - */ - generate(builder: NodeBuilder, output?: string | null): string | null; - /** - * The method can be implemented to update the node's internal state before it is used to render an object. - * The {@link Node#updateBeforeType} property defines how often the update is executed. - * - * @abstract - * @param {NodeFrame} frame - A reference to the current node frame. - * @return {?boolean} An optional bool that indicates whether the implementation actually performed an update or not (e.g. due to caching). - */ - updateBefore(): boolean | null; - /** - * The method can be implemented to update the node's internal state after it was used to render an object. - * The {@link Node#updateAfterType} property defines how often the update is executed. - * - * @abstract - * @param {NodeFrame} frame - A reference to the current node frame. - * @return {?boolean} An optional bool that indicates whether the implementation actually performed an update or not (e.g. due to caching). - */ - updateAfter(): boolean | null; - before(node: any): this; - /** - * This method performs the build of a node. The behavior and return value depend on the current build stage: - * - **setup**: Prepares the node and its children for the build process. This process can also create new nodes. Returns the node itself or a variant. - * - **analyze**: Analyzes the node hierarchy for optimizations in the code generation stage. Returns `null`. - * - **generate**: Generates the shader code for the node. Returns the generated shader string. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {?(string|Node)} [output=null] - Can be used to define the output type. - * @return {?(Node|string)} The result of the build process, depending on the build stage. - */ - build(builder: NodeBuilder, output?: (string | Node) | null): (Node | string) | null; - /** - * Returns the child nodes as a JSON object. - * - * @return {Generator} An iterable list of serialized child objects as JSON. - */ - getSerializeChildren(): Generator; - /** - * Serializes the node to JSON. - * - * @param {Object} json - The output JSON object. - */ - serialize(json: Object): void; - /** - * Deserializes the node from the given JSON. - * - * @param {Object} json - The JSON object. - */ - deserialize(json: Object): void; - /** - * Serializes the node into the three.js JSON Object/Scene format. - * - * @param {?Object} meta - An optional JSON object that already holds serialized data from other scene objects. - * @return {Object} The serialized node. - */ - toJSON(meta: Object | null): Object; - assign(...params: any[]): any; - toVarIntent(): Node; - get(value: any): MemberNode; -} -export namespace Node { - let captureStackTrace: boolean; -} -export namespace NodeAccess { - let READ_ONLY: string; - let WRITE_ONLY: string; - let READ_WRITE: string; -} -/** - * {@link NodeBuilder} is going to create instances of this class during the build process - * of nodes. They represent the final shader attributes that are going to be generated - * by the builder. Arrays of node attributes is maintained in {@link NodeBuilder#attributes} - * and {@link NodeBuilder#bufferAttributes} for this purpose. - */ -export class NodeAttribute { - /** - * Constructs a new node attribute. - * - * @param {string} name - The name of the attribute. - * @param {string} type - The type of the attribute. - * @param {?Node} node - An optional reference to the node. - */ - constructor(name: string, type: string, node?: Node | null); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isNodeAttribute: boolean; - /** - * The name of the attribute. - * - * @type {string} - */ - name: string; - /** - * The type of the attribute. - * - * @type {string} - */ - type: string; - /** - * An optional reference to the node. - * - * @type {?Node} - * @default null - */ - node: Node | null; -} -/** - * Base class for builders which generate a shader program based - * on a 3D object and its node material definition. - */ -export class NodeBuilder { - /** - * Constructs a new node builder. - * - * @param {Object3D} object - The 3D object. - * @param {Renderer} renderer - The current renderer. - * @param {NodeParser} parser - A reference to a node parser. - */ - constructor(object: Object3D, renderer: Renderer, parser: NodeParser); - /** - * The 3D object. - * - * @type {Object3D} - */ - object: Object3D; - /** - * The material of the 3D object. - * - * @type {?Material} - */ - material: Material | null; - /** - * The geometry of the 3D object. - * - * @type {?BufferGeometry} - */ - geometry: BufferGeometry | null; - /** - * The current renderer. - * - * @type {Renderer} - */ - renderer: Renderer; - /** - * A reference to a node parser. - * - * @type {NodeParser} - */ - parser: NodeParser; - /** - * The scene the 3D object belongs to. - * - * @type {?Scene} - * @default null - */ - scene: Scene | null; - /** - * The camera the 3D object is rendered with. - * - * @type {?Camera} - * @default null - */ - camera: Camera | null; - /** - * A list of all nodes the builder is processing - * for this 3D object. - * - * @type {Array} - */ - nodes: Array; - /** - * A list of all nodes the builder is processing in sequential order. - * - * This is used to determine the update order of nodes, which is important for - * {@link NodeUpdateType#UPDATE_BEFORE} and {@link NodeUpdateType#UPDATE_AFTER}. - * - * @type {Array} - */ - sequentialNodes: Array; - /** - * A list of all nodes which {@link Node#update} method should be executed. - * - * @type {Array} - */ - updateNodes: Array; - /** - * A list of all nodes which {@link Node#updateBefore} method should be executed. - * - * @type {Array} - */ - updateBeforeNodes: Array; - /** - * A list of all nodes which {@link Node#updateAfter} method should be executed. - * - * @type {Array} - */ - updateAfterNodes: Array; - /** - * A dictionary that assigns each node to a unique hash. - * - * @type {Object} - */ - hashNodes: { - [x: number]: Node; - }; - /** - * A reference to a node material observer. - * - * @type {?NodeMaterialObserver} - * @default null - */ - observer: NodeMaterialObserver | null; - /** - * A reference to the current lights node. - * - * @type {?LightsNode} - * @default null - */ - lightsNode: LightsNode | null; - /** - * A reference to the current environment node. - * - * @type {?Node} - * @default null - */ - environmentNode: Node | null; - /** - * A reference to the current fog node. - * - * @type {?Node} - * @default null - */ - fogNode: Node | null; - /** - * The current clipping context. - * - * @type {?ClippingContext} - */ - clippingContext: ClippingContext | null; - /** - * The generated vertex shader. - * - * @type {?string} - */ - vertexShader: string | null; - /** - * The generated fragment shader. - * - * @type {?string} - */ - fragmentShader: string | null; - /** - * The generated compute shader. - * - * @type {?string} - */ - computeShader: string | null; - /** - * Nodes used in the primary flow of code generation. - * - * @type {Object>} - */ - flowNodes: { - [x: string]: Node[]; - }; - /** - * Nodes code from `.flowNodes`. - * - * @type {Object} - */ - flowCode: { - [x: string]: string; - }; - /** - * This dictionary holds the node uniforms of the builder. - * The uniforms are maintained in an array for each shader stage. - * - * @type {Object} - */ - uniforms: Object; - /** - * This dictionary holds the output structs of the builder. - * The structs are maintained in an array for each shader stage. - * - * @type {Object} - */ - structs: Object; - /** - * This dictionary holds the types of the builder. - * - * @type {Object} - */ - types: Object; - /** - * This dictionary holds the bindings for each shader stage. - * - * @type {Object} - */ - bindings: Object; - /** - * This dictionary maintains the binding indices per bind group. - * - * @type {Object} - */ - bindingsIndexes: Object; - /** - * Reference to the array of bind groups. - * - * @type {?Array} - */ - bindGroups: Array | null; - /** - * This array holds the node attributes of this builder - * created via {@link AttributeNode}. - * - * @type {Array} - */ - attributes: Array; - /** - * This array holds the node attributes of this builder - * created via {@link BufferAttributeNode}. - * - * @type {Array} - */ - bufferAttributes: Array; - /** - * This array holds the node varyings of this builder. - * - * @type {Array} - */ - varyings: Array; - /** - * This dictionary holds the (native) node codes of this builder. - * The codes are maintained in an array for each shader stage. - * - * @type {Object>} - */ - codes: { - [x: string]: NodeCode[]; - }; - /** - * This dictionary holds the node variables of this builder. - * The variables are maintained in an array for each shader stage. - * This dictionary is also used to count the number of variables - * according to their type (const, vars). - * - * @type {Object|number>} - */ - vars: { - [x: string]: number | NodeVar[]; - }; - /** - * This dictionary holds the declarations for each shader stage. - * - * @type {Object} - */ - declarations: Object; - /** - * Current code flow. - * All code generated in this stack will be stored in `.flow`. - * - * @type {{code: string}} - */ - flow: { - code: string; - }; - /** - * A chain of nodes. - * Used to check recursive calls in node-graph. - * - * @type {Array} - */ - chaining: Array; - /** - * The current stack. - * This reflects the current process in the code block hierarchy, - * it is useful to know if the current process is inside a conditional for example. - * - * @type {StackNode} - */ - stack: StackNode; - /** - * List of stack nodes. - * The current stack hierarchy is stored in an array. - * - * @type {Array} - */ - stacks: Array; - /** - * A tab value. Used for shader string generation. - * - * @type {string} - * @default '\t' - */ - tab: string; - /** - * Reference to the current function node. - * - * @type {?FunctionNode} - * @default null - */ - currentFunctionNode: FunctionNode | null; - /** - * The builder's context. - * - * @type {Object} - */ - context: Object; - /** - * The builder's cache. - * - * @type {NodeCache} - */ - cache: NodeCache; - /** - * Since the {@link NodeBuilder#cache} might be temporarily - * overwritten by other caches, this member retains the reference - * to the builder's own cache. - * - * @type {NodeCache} - * @default this.cache - */ - globalCache: NodeCache; - flowsData: WeakMap; - /** - * The current shader stage. - * - * @type {?('vertex'|'fragment'|'compute'|'any')} - */ - shaderStage: ("vertex" | "fragment" | "compute" | "any") | null; - /** - * The current build stage. - * - * @type {?('setup'|'analyze'|'generate')} - */ - buildStage: ("setup" | "analyze" | "generate") | null; - /** - * The sub-build layers. - * - * @type {Array} - * @default [] - */ - subBuildLayers: Array; - /** - * The active stack nodes. - * - * @type {Array} - */ - activeStacks: Array; - /** - * The current sub-build TSL function(Fn). - * - * @type {?string} - * @default null - */ - subBuildFn: string | null; - /** - * The current TSL function(Fn) call node. - * - * @type {?Node} - * @default null - */ - fnCall: Node | null; - /** - * Whether the material is using flat shading or not. - * - * @returns {boolean} Whether the material is using flat shading or not. - */ - isFlatShading(): boolean; - /** - * Whether the material is opaque or not. - * - * @return {boolean} Whether the material is opaque or not. - */ - isOpaque(): boolean; - /** - * Factory method for creating an instance of {@link RenderTarget} with the given - * dimensions and options. - * - * @param {number} width - The width of the render target. - * @param {number} height - The height of the render target. - * @param {Object} options - The options of the render target. - * @return {RenderTarget} The render target. - */ - createRenderTarget(width: number, height: number, options: Object): RenderTarget; - /** - * Factory method for creating an instance of {@link CubeRenderTarget} with the given - * dimensions and options. - * - * @param {number} size - The size of the cube render target. - * @param {Object} options - The options of the cube render target. - * @return {CubeRenderTarget} The cube render target. - */ - createCubeRenderTarget(size: number, options: Object): CubeRenderTarget; - /** - * Whether the given node is included in the internal array of nodes or not. - * - * @param {Node} node - The node to test. - * @return {boolean} Whether the given node is included in the internal array of nodes or not. - */ - includes(node: Node): boolean; - /** - * Returns the type of the color output based on the renderer's render target. - * - * @param {number} [index=0] - The index of the render target texture. - * @return {string} The type. - */ - getOutputType(index?: number): string; - /** - * Returns the output struct name which is required by - * {@link OutputStructNode}. - * - * @abstract - * @return {string} The name of the output struct. - */ - getOutputStructName(): string; - /** - * Returns a bind group for the given group name and binding. - * - * @private - * @param {string} groupName - The group name. - * @param {Array} bindings - List of bindings. - * @return {BindGroup} The bind group - */ - private _getBindGroup; - /** - * Returns an array of node uniform groups for the given group name and shader stage. - * - * @param {string} groupName - The group name. - * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. - * @return {Array} The array of node uniform groups. - */ - getBindGroupArray(groupName: string, shaderStage: ("vertex" | "fragment" | "compute" | "any")): Array; - /** - * Returns a list bindings of all shader stages separated by groups. - * - * @return {Array} The list of bindings. - */ - getBindings(): Array; - /** - * Sorts the bind groups and updates {@link NodeBuilder#bindingsIndexes}. - */ - sortBindingGroups(): void; - /** - * The builder maintains each node in a hash-based dictionary. - * This method sets the given node (value) with the given hash (key) into this dictionary. - * - * @param {Node} node - The node to add. - * @param {number} hash - The hash of the node. - */ - setHashNode(node: Node, hash: number): void; - /** - * Adds a node to this builder. - * - * @param {Node} node - The node to add. - */ - addNode(node: Node): void; - /** - * It is used to add Nodes that will be used as FRAME and RENDER events, - * and need to follow a certain sequence in the calls to work correctly. - * This function should be called after 'setup()' in the 'build()' process to ensure that the child nodes are processed first. - * - * @param {Node} node - The node to add. - */ - addSequentialNode(node: Node): void; - /** - * Checks the update types of nodes - */ - buildUpdateNodes(): void; - /** - * A reference the current node which is the - * last node in the chain of nodes. - * - * @type {Node} - */ - get currentNode(): Node; - /** - * Whether the given texture is filtered or not. - * - * @param {Texture} texture - The texture to check. - * @return {boolean} Whether the given texture is filtered or not. - */ - isFilteredTexture(texture: Texture): boolean; - /** - * Returns the maximum number of bytes available for uniform buffers. - * - * @return {number} The maximum number of bytes available for uniform buffers. - */ - getUniformBufferLimit(): number; - /** - * Adds the given node to the internal node chain. - * This is used to check recursive calls in node-graph. - * - * @param {Node} node - The node to add. - */ - addChain(node: Node): void; - /** - * Removes the given node from the internal node chain. - * - * @param {Node} node - The node to remove. - */ - removeChain(node: Node): void; - /** - * Returns the native shader method name for a given generic name. E.g. - * the method name `textureDimensions` matches the WGSL name but must be - * resolved to `textureSize` in GLSL. - * - * @abstract - * @param {string} method - The method name to resolve. - * @return {string} The resolved method name. - */ - getMethod(method: string): string; - /** - * Returns the native snippet for a ternary operation. E.g. GLSL would output - * a ternary op as `cond ? x : y` whereas WGSL would output it as `select(y, x, cond)` - * - * @abstract - * @param {string} condSnippet - The condition determining which expression gets resolved. - * @param {string} ifSnippet - The expression to resolve to if the condition is true. - * @param {string} elseSnippet - The expression to resolve to if the condition is false. - * @return {string} The resolved method name. - */ - getTernary(): string; - /** - * Returns a node for the given hash, see {@link NodeBuilder#setHashNode}. - * - * @param {number} hash - The hash of the node. - * @return {Node} The found node. - */ - getNodeFromHash(hash: number): Node; - /** - * Adds the Node to a target flow so that it can generate code in the 'generate' process. - * - * @param {('vertex'|'fragment'|'compute')} shaderStage - The shader stage. - * @param {Node} node - The node to add. - * @return {Node} The node. - */ - addFlow(shaderStage: ("vertex" | "fragment" | "compute"), node: Node): Node; - /** - * Sets builder's context. - * - * @param {Object} context - The context to set. - */ - setContext(context: Object): void; - /** - * Returns the builder's current context. - * - * @return {Object} The builder's current context. - */ - getContext(): Object; - /** - * Adds context data to the builder's current context. - * - * @param {Object} context - The context to add. - * @return {Object} The previous context. - */ - addContext(context: Object): Object; - /** - * Gets a context used in shader construction that can be shared across different materials. - * This is necessary since the renderer cache can reuse shaders generated in one material and use them in another. - * - * @return {Object} The builder's current context without material. - */ - getSharedContext(): Object; - /** - * Sets builder's cache. - * - * @param {NodeCache} cache - The cache to set. - */ - setCache(cache: NodeCache): void; - /** - * Returns the builder's current cache. - * - * @return {NodeCache} The builder's current cache. - */ - getCache(): NodeCache; - /** - * Returns a cache for the given node. - * - * @param {Node} node - The node. - * @param {boolean} [parent=true] - Whether this node refers to a shared parent cache or not. - * @return {NodeCache} The cache. - */ - getCacheFromNode(node: Node, parent?: boolean): NodeCache; - /** - * Whether the requested feature is available or not. - * - * @abstract - * @param {string} name - The requested feature. - * @return {boolean} Whether the requested feature is supported or not. - */ - isAvailable(): boolean; - /** - * Returns the vertexIndex input variable as a native shader string. - * - * @abstract - * @return {string} The instanceIndex shader string. - */ - getVertexIndex(): string; - /** - * Contextually returns either the vertex stage instance index builtin - * or the linearized index of an compute invocation within a grid of workgroups. - * - * @abstract - * @return {string} The instanceIndex shader string. - */ - getInstanceIndex(): string; - /** - * Returns the drawIndex input variable as a native shader string. - * Only relevant for WebGL and its `WEBGL_multi_draw` extension. - * - * @abstract - * @return {?string} The drawIndex shader string. - */ - getDrawIndex(): string | null; - /** - * Returns the frontFacing input variable as a native shader string. - * - * @abstract - * @return {string} The frontFacing shader string. - */ - getFrontFacing(): string; - /** - * Returns the fragCoord input variable as a native shader string. - * - * @abstract - * @return {string} The fragCoord shader string. - */ - getFragCoord(): string; - /** - * Whether to flip texture data along its vertical axis or not. WebGL needs - * this method evaluate to `true`, WebGPU to `false`. - * - * @abstract - * @return {boolean} Whether to flip texture data along its vertical axis or not. - */ - isFlipY(): boolean; - /** - * Calling this method increases the usage count for the given node by one. - * - * @param {Node} node - The node to increase the usage count for. - * @return {number} The updated usage count. - */ - increaseUsage(node: Node): number; - /** - * Generates a texture sample shader string for the given texture data. - * - * @abstract - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The texture property name. - * @param {string} uvSnippet - Snippet defining the texture coordinates. - * @return {string} The generated shader string. - */ - generateTexture(): string; - /** - * Generates a texture LOD shader string for the given texture data. - * - * @abstract - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The texture property name. - * @param {string} uvSnippet - Snippet defining the texture coordinates. - * @param {?string} depthSnippet - Snippet defining the 0-based texture array index to sample. - * @param {string} levelSnippet - Snippet defining the mip level. - * @return {string} The generated shader string. - */ - generateTextureLod(): string; - /** - * Generates the array declaration string. - * - * @param {string} type - The type. - * @param {?number} [count] - The count. - * @return {string} The generated value as a shader string. - */ - generateArrayDeclaration(type: string, count?: number | null): string; - /** - * Generates the array shader string for the given type and value. - * - * @param {string} type - The type. - * @param {?number} [count] - The count. - * @param {?Array} [values=null] - The default values. - * @return {string} The generated value as a shader string. - */ - generateArray(type: string, count?: number | null, values?: Array | null): string; - /** - * Generates the struct shader string. - * - * @param {string} type - The type. - * @param {Array} [membersLayout] - The count. - * @param {?Array} [values=null] - The default values. - * @return {string} The generated value as a shader string. - */ - generateStruct(type: string, membersLayout?: Array, values?: Array | null): string; - /** - * Generates the shader string for the given type and value. - * - * @param {string} type - The type. - * @param {?any} [value=null] - The value. - * @return {string} The generated value as a shader string. - */ - generateConst(type: string, value?: any | null): string; - /** - * It might be necessary to convert certain data types to different ones - * so this method can be used to hide the conversion. - * - * @param {string} type - The type. - * @return {string} The updated type. - */ - getType(type: string): string; - /** - * Whether the given attribute name is defined in the geometry or not. - * - * @param {string} name - The attribute name. - * @return {boolean} Whether the given attribute name is defined in the geometry. - */ - hasGeometryAttribute(name: string): boolean; - /** - * Returns a node attribute for the given name and type. - * - * @param {string} name - The attribute's name. - * @param {string} type - The attribute's type. - * @return {NodeAttribute} The node attribute. - */ - getAttribute(name: string, type: string): NodeAttribute; - /** - * Returns for the given node and shader stage the property name for the shader. - * - * @param {Node} node - The node. - * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. - * @return {string} The property name. - */ - getPropertyName(node: Node): string; - /** - * Whether the given type is a vector type or not. - * - * @param {string} type - The type to check. - * @return {boolean} Whether the given type is a vector type or not. - */ - isVector(type: string): boolean; - /** - * Whether the given type is a matrix type or not. - * - * @param {string} type - The type to check. - * @return {boolean} Whether the given type is a matrix type or not. - */ - isMatrix(type: string): boolean; - /** - * Whether the given type is a reference type or not. - * - * @param {string} type - The type to check. - * @return {boolean} Whether the given type is a reference type or not. - */ - isReference(type: string): boolean; - /** - * Checks if the given texture requires a manual conversion to the working color space. - * - * @abstract - * @param {Texture} texture - The texture to check. - * @return {boolean} Whether the given texture requires a conversion to working color space or not. - */ - needsToWorkingColorSpace(): boolean; - /** - * Returns the component type of a given texture. - * - * @param {Texture} texture - The texture. - * @return {string} The component type. - */ - getComponentTypeFromTexture(texture: Texture): string; - /** - * Returns the element type for a given type. - * - * @param {string} type - The type. - * @return {string} The element type. - */ - getElementType(type: string): string; - /** - * Returns the component type for a given type. - * - * @param {string} type - The type. - * @return {string} The component type. - */ - getComponentType(type: string): string; - /** - * Returns the vector type for a given type. - * - * @param {string} type - The type. - * @return {string} The vector type. - */ - getVectorType(type: string): string; - /** - * Returns the data type for the given the length and component type. - * - * @param {number} length - The length. - * @param {string} [componentType='float'] - The component type. - * @return {string} The type. - */ - getTypeFromLength(length: number, componentType?: string): string; - /** - * Returns the type for a given typed array. - * - * @param {TypedArray} array - The typed array. - * @return {string} The type. - */ - getTypeFromArray(array: TypedArray): string; - /** - * Returns the type is an integer type. - * - * @param {string} type - The type. - * @return {boolean} Whether the type is an integer type or not. - */ - isInteger(type: string): boolean; - /** - * Returns the type for a given buffer attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - * @return {string} The type. - */ - getTypeFromAttribute(attribute: BufferAttribute): string; - /** - * Returns the length for the given data type. - * - * @param {string} type - The data type. - * @return {number} The length. - */ - getTypeLength(type: string): number; - /** - * Returns the vector type for a given matrix type. - * - * @param {string} type - The matrix type. - * @return {string} The vector type. - */ - getVectorFromMatrix(type: string): string; - /** - * For a given type this method changes the component type to the - * given value. E.g. `vec4` should be changed to the new component type - * `uint` which results in `uvec4`. - * - * @param {string} type - The type. - * @param {string} newComponentType - The new component type. - * @return {string} The new type. - */ - changeComponentType(type: string, newComponentType: string): string; - /** - * Returns the integer type pendant for the given type. - * - * @param {string} type - The type. - * @return {string} The integer type. - */ - getIntegerType(type: string): string; - /** - * Adds an active stack to the internal stack. - * - * @param {StackNode} stack - The stack node to add. - */ - setActiveStack(stack: StackNode): void; - /** - * Removes the active stack from the internal stack. - * - * @param {StackNode} stack - The stack node to remove. - */ - removeActiveStack(stack: StackNode): void; - /** - * Returns the active stack. - * - * @return {StackNode} The active stack. - */ - getActiveStack(): StackNode; - /** - * Returns the base stack. - * - * @return {StackNode} The base stack. - */ - getBaseStack(): StackNode; - /** - * Adds a stack node to the internal stack. - * - * @return {StackNode} The added stack node. - */ - addStack(): StackNode; - /** - * Removes the last stack node from the internal stack. - * - * @return {StackNode} The removed stack node. - */ - removeStack(): StackNode; - /** - * The builder maintains (cached) data for each node during the building process. This method - * can be used to get these data for a specific shader stage and cache. - * - * @param {Node} node - The node to get the data for. - * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. - * @param {?NodeCache} cache - An optional cache. - * @return {Object} The node data. - */ - getDataFromNode(node: Node, shaderStage?: ("vertex" | "fragment" | "compute" | "any"), cache?: NodeCache | null): Object; - /** - * Returns the properties for the given node and shader stage. - * - * Properties are typically used within a build stage to reference a node's - * child node or nodes manually assigned to the properties in a separate build stage. - * A typical usage pattern for defining nodes manually would be assigning dependency nodes - * to the current node's properties in the setup stage and building those properties in the generate stage. - * - * @param {Node} node - The node to get the properties for. - * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage='any'] - The shader stage. - * @return {Object} The node properties. - */ - getNodeProperties(node: Node, shaderStage?: ("vertex" | "fragment" | "compute" | "any")): Object; - /** - * Returns an instance of {@link NodeAttribute} for the given buffer attribute node. - * - * @param {BufferAttributeNode} node - The buffer attribute node. - * @param {string} type - The node type. - * @param {?string} [name=null] - The name of the buffer attribute. - * @return {NodeAttribute} The node attribute. - */ - getBufferAttributeFromNode(node: BufferAttributeNode, type: string, name?: string | null): NodeAttribute; - /** - * Returns an instance of {@link StructType} for the given struct name and shader stage - * or null if not found. - * - * @param {string} name - The name of the struct. - * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. - * @return {?StructType} The struct type or null if not found. - */ - getStructTypeNode(name: string, shaderStage?: ("vertex" | "fragment" | "compute" | "any")): StructType | null; - /** - * Returns an instance of {@link StructType} for the given output struct node. - * - * @param {OutputStructNode} node - The output struct node. - * @param {Array} membersLayout - The output struct types. - * @param {?string} [name=null] - The name of the struct. - * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. - * @return {StructType} The struct type attribute. - */ - getStructTypeFromNode(node: OutputStructNode, membersLayout: Array, name?: string | null, shaderStage?: ("vertex" | "fragment" | "compute" | "any")): StructType; - /** - * Returns an instance of {@link StructType} for the given output struct node. - * - * @param {OutputStructNode} node - The output struct node. - * @param {Array} membersLayout - The output struct types. - * @return {StructType} The struct type attribute. - */ - getOutputStructTypeFromNode(node: OutputStructNode, membersLayout: Array): StructType; - /** - * Returns an instance of {@link NodeUniform} for the given uniform node. - * - * @param {UniformNode} node - The uniform node. - * @param {string} type - The uniform type. - * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. - * @param {?string} name - The name of the uniform. - * @return {NodeUniform} The node uniform. - */ - getUniformFromNode(node: UniformNode, type: string, shaderStage?: ("vertex" | "fragment" | "compute" | "any"), name?: string | null): NodeUniform; - /** - * Returns an instance of {@link NodeVar} for the given variable node. - * - * @param {VarNode} node - The variable node. - * @param {?string} name - The variable's name. - * @param {string} [type=node.getNodeType( this )] - The variable's type. - * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. - * @param {boolean} [readOnly=false] - Whether the variable is read-only or not. - * - * @return {NodeVar} The node variable. - */ - getVarFromNode(node: VarNode, name?: string | null, type?: string, shaderStage?: ("vertex" | "fragment" | "compute" | "any"), readOnly?: boolean): NodeVar; - /** - * Returns whether a Node or its flow is deterministic, useful for use in `const`. - * - * @param {Node} node - The varying node. - * @return {boolean} Returns true if deterministic. - */ - isDeterministic(node: Node): boolean; - /** - * Returns an instance of {@link NodeVarying} for the given varying node. - * - * @param {(VaryingNode|PropertyNode)} node - The varying node. - * @param {?string} name - The varying's name. - * @param {string} [type=node.getNodeType( this )] - The varying's type. - * @param {?string} interpolationType - The interpolation type of the varying. - * @param {?string} interpolationSampling - The interpolation sampling type of the varying. - * @return {NodeVar} The node varying. - */ - getVaryingFromNode(node: (VaryingNode | PropertyNode), name?: string | null, type?: string, interpolationType?: string | null, interpolationSampling?: string | null): NodeVar; - /** - * Registers a node declaration in the current shader stage. - * - * @param {Object} node - The node to be registered. - */ - registerDeclaration(node: Object): void; - /** - * Returns an instance of {@link NodeCode} for the given code node. - * - * @param {CodeNode} node - The code node. - * @param {string} type - The node type. - * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. - * @return {NodeCode} The node code. - */ - getCodeFromNode(node: CodeNode, type: string, shaderStage?: ("vertex" | "fragment" | "compute" | "any")): NodeCode; - /** - * Adds a code flow based on the code-block hierarchy. - - * This is used so that code-blocks like If,Else create their variables locally if the Node - * is only used inside one of these conditionals in the current shader stage. - * - * @param {Node} node - The node to add. - * @param {Node} nodeBlock - Node-based code-block. Usually 'ConditionalNode'. - */ - addFlowCodeHierarchy(node: Node, nodeBlock: Node): void; - /** - * Add a inline-code to the current flow code-block. - * - * @param {Node} node - The node to add. - * @param {string} code - The code to add. - * @param {Node} nodeBlock - Current ConditionalNode - */ - addLineFlowCodeBlock(node: Node, code: string, nodeBlock: Node): void; - /** - * Add a inline-code to the current flow. - * - * @param {string} code - The code to add. - * @param {?Node} [node= null] - Optional Node, can help the system understand if the Node is part of a code-block. - * @return {NodeBuilder} A reference to this node builder. - */ - addLineFlowCode(code: string, node?: Node | null): NodeBuilder; - /** - * Adds a code to the current code flow. - * - * @param {string} code - Shader code. - * @return {NodeBuilder} A reference to this node builder. - */ - addFlowCode(code: string): NodeBuilder; - /** - * Add tab in the code that will be generated so that other snippets respect the current tabulation. - * Typically used in codes with If,Else. - * - * @return {NodeBuilder} A reference to this node builder. - */ - addFlowTab(): NodeBuilder; - /** - * Removes a tab. - * - * @return {NodeBuilder} A reference to this node builder. - */ - removeFlowTab(): NodeBuilder; - /** - * Gets the current flow data based on a Node. - * - * @param {Node} node - Node that the flow was started. - * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. - * @return {Object} The flow data. - */ - getFlowData(node: Node): Object; - /** - * Executes the node flow based on a root node to generate the final shader code. - * - * @param {Node} node - The node to execute. - * @return {Object} The code flow. - */ - flowNode(node: Node): Object; - /** - * Includes a node in the current function node. - * - * @param {Node} node - The node to include. - * @returns {void} - */ - addInclude(node: Node): void; - /** - * Returns the native shader operator name for a given generic name. - * It is a similar type of method like {@link NodeBuilder#getMethod}. - * - * @param {ShaderNodeInternal} shaderNode - The shader node to build the function node with. - * @return {FunctionNode} The build function node. - */ - buildFunctionNode(shaderNode: ShaderNodeInternal): FunctionNode; - /** - * Generates a code flow based on a TSL function: Fn(). - * - * @param {ShaderNodeInternal} shaderNode - A function code will be generated based on the input. - * @return {Object} - */ - flowShaderNode(shaderNode: ShaderNodeInternal): Object; - /** - * Executes the node in a specific build stage. - * - * This function can be used to arbitrarily execute the specified build stage - * outside of the standard build process. For instance, if a node's type depends - * on properties created by the 'setup' stage, then flowBuildStage(node, 'setup') - * can be used to execute the setup build stage and access its generated nodes - * before the standard build process begins. - * - * @param {Node} node - The node to execute. - * @param {string} buildStage - The build stage to execute the node in. - * @param {?(Node|string)} [output=null] - Expected output type. For example 'vec3'. - * @return {?(Node|string)} The result of the node build. - */ - flowBuildStage(node: Node, buildStage: string, output?: (Node | string) | null): (Node | string) | null; - /** - * Runs the node flow through all the steps of creation, 'setup', 'analyze', 'generate'. - * - * @param {Node} node - The node to execute. - * @param {?string} output - Expected output type. For example 'vec3'. - * @return {Object} - */ - flowStagesNode(node: Node, output?: string | null): Object; - /** - * Returns the native shader operator name for a given generic name. - * It is a similar type of method like {@link NodeBuilder#getMethod}. - * - * @abstract - * @param {string} op - The operator name to resolve. - * @return {?string} The resolved operator name. - */ - getFunctionOperator(): string | null; - /** - * Builds the given shader node. - * - * @abstract - * @param {ShaderNodeInternal} shaderNode - The shader node. - * @return {string} The function code. - */ - buildFunctionCode(): string; - /** - * Generates a code flow based on a child Node. - * - * @param {Node} node - The node to execute. - * @param {?string} output - Expected output type. For example 'vec3'. - * @return {Object} The code flow. - */ - flowChildNode(node: Node, output?: string | null): Object; - /** - * Executes a flow of code in a different stage. - * - * Some nodes like `varying()` have the ability to compute code in vertex-stage and - * return the value in fragment-stage even if it is being executed in an input fragment. - * - * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. - * @param {Node} node - The node to execute. - * @param {?string} output - Expected output type. For example 'vec3'. - * @param {?string} propertyName - The property name to assign the result. - * @return {?(Object|Node)} The code flow or node.build() result. - */ - flowNodeFromShaderStage(shaderStage: ("vertex" | "fragment" | "compute" | "any"), node: Node, output?: string | null, propertyName?: string | null): (Object | Node) | null; - /** - * Returns an array holding all node attributes of this node builder. - * - * @return {Array} The node attributes of this builder. - */ - getAttributesArray(): Array; - /** - * Returns the attribute definitions as a shader string for the given shader stage. - * - * @abstract - * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. - * @return {string} The attribute code section. - */ - getAttributes(): string; - /** - * Returns the varying definitions as a shader string for the given shader stage. - * - * @abstract - * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. - * @return {string} The varying code section. - */ - getVaryings(): string; - /** - * Returns a single variable definition as a shader string for the given variable type and name. - * - * @param {string} type - The variable's type. - * @param {string} name - The variable's name. - * @param {?number} [count=null] - The array length. - * @return {string} The shader string. - */ - getVar(type: string, name: string, count?: number | null): string; - /** - * Returns the variable definitions as a shader string for the given shader stage. - * - * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. - * @param {boolean} [global=false] - Whether the variables are global. - * @return {string} The variable code section. - */ - getVars(shaderStage: ("vertex" | "fragment" | "compute" | "any"), global?: boolean): string; - /** - * Returns the uniform definitions as a shader string for the given shader stage. - * - * @abstract - * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. - * @return {string} The uniform code section. - */ - getUniforms(): string; - /** - * Returns the native code definitions as a shader string for the given shader stage. - * - * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. - * @return {string} The native code section. - */ - getCodes(shaderStage: ("vertex" | "fragment" | "compute" | "any")): string; - /** - * Returns the hash of this node builder. - * - * @return {string} The hash. - */ - getHash(): string; - /** - * Sets the current shader stage. - * - * @param {?('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage to set. - */ - setShaderStage(shaderStage: ("vertex" | "fragment" | "compute" | "any") | null): void; - /** - * Returns the current shader stage. - * - * @return {?('vertex'|'fragment'|'compute'|'any')} The current shader stage. - */ - getShaderStage(): ("vertex" | "fragment" | "compute" | "any") | null; - /** - * Sets the current build stage. - * - * @param {?('setup'|'analyze'|'generate')} buildStage - The build stage to set. - */ - setBuildStage(buildStage: ("setup" | "analyze" | "generate") | null): void; - /** - * Returns the current build stage. - * - * @return {?('setup'|'analyze'|'generate')} The current build stage. - */ - getBuildStage(): ("setup" | "analyze" | "generate") | null; - /** - * Controls the code build of the shader stages. - * - * @abstract - */ - buildCode(): void; - /** - * Returns the current sub-build layer. - * - * @return {SubBuildNode} The current sub-build layers. - */ - get subBuild(): SubBuildNode; - /** - * Adds a sub-build layer to the node builder. - * - * @param {SubBuildNode} subBuild - The sub-build layer to add. - */ - addSubBuild(subBuild: SubBuildNode): void; - /** - * Removes the last sub-build layer from the node builder. - * - * @return {SubBuildNode} The removed sub-build layer. - */ - removeSubBuild(): SubBuildNode; - /** - * Returns the closest sub-build layer for the given data. - * - * @param {Node|Set|Array} data - The data to get the closest sub-build layer from. - * @return {?string} The closest sub-build name or null if none found. - */ - getClosestSubBuild(data: Node | Set | Array): string | null; - /** - * Returns the output node of a sub-build layer. - * - * @param {Node} node - The node to get the output from. - * @return {string} The output node name. - */ - getSubBuildOutput(node: Node): string; - /** - * Returns the sub-build property name for the given property and node. - * - * @param {string} [property=''] - The property name. - * @param {?Node} [node=null] - The node to get the sub-build from. - * @return {string} The sub-build property name. - */ - getSubBuildProperty(property?: string, node?: Node | null): string; - /** - * Prebuild the node builder. - */ - prebuild(): void; - /** - * Central build method which controls the build for the given object. - * - * @return {NodeBuilder} A reference to this node builder. - */ - build(): NodeBuilder; - /** - * Async version of build() that yields to main thread between shader stages. - * Use this in compileAsync() to prevent blocking the main thread. - * - * @return {Promise} A promise that resolves to this node builder. - */ - buildAsync(): Promise; - /** - * Returns shared data object for the given node. - * - * @param {Node} node - The node to get shared data from. - * @return {Object} The shared data. - */ - getSharedDataFromNode(node: Node): Object; - /** - * Returns a uniform representation which is later used for UBO generation and rendering. - * - * @param {NodeUniform} uniformNode - The uniform node. - * @param {string} type - The requested type. - * @return {Uniform} The uniform. - */ - getNodeUniform(uniformNode: NodeUniform, type: string): Uniform; - /** - * Formats the given shader snippet from a given type into another one. E.g. - * this method might be used to convert a simple float string `"1.0"` into a - * `vec3` representation: `"vec3( 1.0 )"`. - * - * @param {string} snippet - The shader snippet. - * @param {string} fromType - The source type. - * @param {string} toType - The target type. - * @return {string} The updated shader string. - */ - format(snippet: string, fromType: string, toType: string): string; - /** - * Returns a signature with the engine's current revision. - * - * @return {string} The signature. - */ - getSignature(): string; - /** - * Returns `true` if data from the previous frame are required. Relevant - * when computing motion vectors with {@link VelocityNode}. - * - * @return {boolean} Whether data from the previous frame are required or not. - */ - needsPreviousData(): boolean; -} -/** - * This utility class is used in {@link NodeBuilder} as an internal - * cache data structure for node data. - */ -export class NodeCache { - /** - * Constructs a new node cache. - * - * @param {?NodeCache} parent - A reference to a parent cache. - */ - constructor(parent?: NodeCache | null); - /** - * The id of the cache. - * - * @type {number} - * @readonly - */ - readonly id: number; - /** - * A weak map for managing node data. - * - * @type {WeakMap} - */ - nodesData: WeakMap; - /** - * Reference to a parent node cache. - * - * @type {?NodeCache} - * @default null - */ - parent: NodeCache | null; - /** - * Returns the data for the given node. - * - * @param {Node} node - The node. - * @return {?Object} The data for the node. - */ - getData(node: Node): Object | null; - /** - * Sets the data for a given node. - * - * @param {Node} node - The node. - * @param {Object} data - The data that should be cached. - */ - setData(node: Node, data: Object): void; -} -/** - * {@link NodeBuilder} is going to create instances of this class during the build process - * of nodes. They represent user-defined, native shader code portions that are going to be - * injected by the builder. A dictionary of node codes is maintained in {@link NodeBuilder#codes} - * for this purpose. - */ -export class NodeCode { - /** - * Constructs a new code node. - * - * @param {string} name - The name of the code. - * @param {string} type - The node type. - * @param {string} [code=''] - The native shader code. - */ - constructor(name: string, type: string, code?: string); - /** - * The name of the code. - * - * @type {string} - */ - name: string; - /** - * The node type. - * - * @type {string} - */ - type: string; - /** - * The native shader code. - * - * @type {string} - * @default '' - */ - code: string; -} -/** - * Custom error class for node-related errors, including stack trace information. - */ -export class NodeError extends Error { - constructor(message: any, stackTrace?: null); - /** - * The stack trace associated with the error. - * - * @type {?StackTrace} - */ - stackTrace: StackTrace | null; -} -/** - * Management class for updating nodes. The module tracks metrics like - * the elapsed time, delta time, the render and frame ID to correctly - * call the node update methods {@link Node#updateBefore}, {@link Node#update} - * and {@link Node#updateAfter} depending on the node's configuration. - */ -export class NodeFrame { - /** - * The elapsed time in seconds. - * - * @type {number} - * @default 0 - */ - time: number; - /** - * The delta time in seconds. - * - * @type {number} - * @default 0 - */ - deltaTime: number; - /** - * The frame ID. - * - * @type {number} - * @default 0 - */ - frameId: number; - /** - * The render ID. - * - * @type {number} - * @default 0 - */ - renderId: number; - /** - * Used to control the {@link Node#update} call. - * - * @type {WeakMap} - */ - updateMap: WeakMap; - /** - * Used to control the {@link Node#updateBefore} call. - * - * @type {WeakMap} - */ - updateBeforeMap: WeakMap; - /** - * Used to control the {@link Node#updateAfter} call. - * - * @type {WeakMap} - */ - updateAfterMap: WeakMap; - /** - * A reference to the current renderer. - * - * @type {?Renderer} - * @default null - */ - renderer: Renderer | null; - /** - * A reference to the current material. - * - * @type {?Material} - * @default null - */ - material: Material | null; - /** - * A reference to the current camera. - * - * @type {?Camera} - * @default null - */ - camera: Camera | null; - /** - * A reference to the current 3D object. - * - * @type {?Object3D} - * @default null - */ - object: Object3D | null; - /** - * A reference to the current scene. - * - * @type {?Scene} - * @default null - */ - scene: Scene | null; - /** - * Returns a dictionary for a given node and update map which - * is used to correctly call node update methods per frame or render. - * - * @private - * @param {WeakMap} referenceMap - The reference weak map. - * @param {Node} nodeRef - The reference to the current node. - * @return {Object>} The dictionary. - */ - private _getMaps; - /** - * This method executes the {@link Node#updateBefore} for the given node. - * It makes sure {@link Node#updateBeforeType} is honored meaning the update - * is only executed once per frame, render or object depending on the update - * type. - * - * @param {Node} node - The node that should be updated. - */ - updateBeforeNode(node: Node): void; - /** - * This method executes the {@link Node#updateAfter} for the given node. - * It makes sure {@link Node#updateAfterType} is honored meaning the update - * is only executed once per frame, render or object depending on the update - * type. - * - * @param {Node} node - The node that should be updated. - */ - updateAfterNode(node: Node): void; - /** - * This method executes the {@link Node#update} for the given node. - * It makes sure {@link Node#updateType} is honored meaning the update - * is only executed once per frame, render or object depending on the update - * type. - * - * @param {Node} node - The node that should be updated. - */ - updateNode(node: Node): void; - /** - * Updates the internal state of the node frame. This method is - * called by the renderer in its internal animation loop. - */ - update(): void; - lastTime: number | undefined; -} -/** - * Describes the input of a {@link NodeFunction}. - */ -export class NodeFunctionInput { - /** - * Constructs a new node function input. - * - * @param {string} type - The input type. - * @param {string} name - The input name. - * @param {?number} [count=null] - If the input is an Array, count will be the length. - * @param {('in'|'out'|'inout')} [qualifier=''] - The parameter qualifier (only relevant for GLSL). - * @param {boolean} [isConst=false] - Whether the input uses a const qualifier or not (only relevant for GLSL). - */ - constructor(type: string, name: string, count?: number | null, qualifier?: ("in" | "out" | "inout"), isConst?: boolean); - /** - * The input type. - * - * @type {string} - */ - type: string; - /** - * The input name. - * - * @type {string} - */ - name: string; - /** - * If the input is an Array, count will be the length. - * - * @type {?number} - * @default null - */ - count: number | null; - /** - *The parameter qualifier (only relevant for GLSL). - * - * @type {('in'|'out'|'inout')} - * @default '' - */ - qualifier: ("in" | "out" | "inout"); - /** - * Whether the input uses a const qualifier or not (only relevant for GLSL). - * - * @type {boolean} - * @default false - */ - isConst: boolean; -} -export namespace NodeFunctionInput { - let isNodeFunctionInput: boolean; -} -/** - * A loader for loading node objects in the three.js JSON Object/Scene format. - * - * @augments Loader - */ -export class NodeLoader extends Loader { - /** - * Constructs a new node loader. - * - * @param {LoadingManager} [manager] - A reference to a loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Represents a dictionary of textures. - * - * @type {Object} - */ - textures: { - [x: string]: Texture; - }; - /** - * Represents a dictionary of node types. - * - * @type {Object} - */ - nodes: { - [x: string]: Node.constructor; - }; - /** - * Loads the node definitions from the given URL. - * - * @param {string} url - The path/URL of the file to be loaded. - * @param {Function} onLoad - Will be called when load completes. - * @param {Function} onProgress - Will be called while load progresses. - * @param {Function} onError - Will be called when errors are thrown during the loading process. - */ - load(url: string, onLoad: Function, onProgress: Function, onError: Function): void; - /** - * Parse the node dependencies for the loaded node. - * - * @param {Array} [json] - The JSON definition - * @return {Object} A dictionary with node dependencies. - */ - parseNodes(json?: Array): { - [x: string]: Node; - }; - /** - * Parses the node from the given JSON. - * - * @param {Object} json - The JSON definition - * @param {string} json.type - The node type. - * @param {string} json.uuid - The node UUID. - * @param {Array} [json.nodes] - The node dependencies. - * @param {Object} [json.meta] - The meta data. - * @return {Node} The parsed node. - */ - parse(json: { - type: string; - uuid: string; - nodes?: Object[] | undefined; - meta?: Object | undefined; - }): Node; - /** - * Defines the dictionary of textures. - * - * @param {Object} value - The texture library defines as ``. - * @return {NodeLoader} A reference to this loader. - */ - setTextures(value: { - [x: string]: Texture; - }): NodeLoader; - /** - * Defines the dictionary of node types. - * - * @param {Object} value - The node library defined as ``. - * @return {NodeLoader} A reference to this loader. - */ - setNodes(value: { - [x: string]: Node.constructor; - }): NodeLoader; - /** - * Creates a node object from the given type. - * - * @param {string} type - The node type. - * @return {Node} The created node instance. - */ - createNodeFromType(type: string): Node; -} -/** - * Base class for all node materials. - * - * @augments Material - */ -export class NodeMaterial extends Material { - static get type(): string; - set type(_value: string); - /** - * Represents the type of the node material. - * - * @type {string} - */ - get type(): string; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isNodeMaterial: boolean; - /** - * Whether this material is affected by fog or not. - * - * @type {boolean} - * @default true - */ - fog: boolean; - /** - * Whether this material is affected by lights or not. - * - * @type {boolean} - * @default false - */ - lights: boolean; - /** - * Whether this material uses hardware clipping or not. - * This property is managed by the engine and should not be - * modified by apps. - * - * @type {boolean} - * @default false - */ - hardwareClipping: boolean; - /** - * Node materials which set their `lights` property to `true` - * are affected by all lights of the scene. Sometimes selective - * lighting is wanted which means only _some_ lights in the scene - * affect a material. This can be achieved by creating an instance - * of {@link LightsNode} with a list of selective - * lights and assign the node to this property. - * - * ```js - * const customLightsNode = lights( [ light1, light2 ] ); - * material.lightsNode = customLightsNode; - * ``` - * - * @type {?LightsNode} - * @default null - */ - lightsNode: LightsNode | null; - /** - * The environment of node materials can be defined by an environment - * map assigned to the `envMap` property or by `Scene.environment` - * if the node material is a PBR material. This node property allows to overwrite - * the default behavior and define the environment with a custom node. - * - * ```js - * material.envNode = pmremTexture( renderTarget.texture ); - * ``` - * - * @type {?Node} - * @default null - */ - envNode: Node | null; - /** - * The lighting of node materials might be influenced by ambient occlusion. - * The default AO is inferred from an ambient occlusion map assigned to `aoMap` - * and the respective `aoMapIntensity`. This node property allows to overwrite - * the default and define the ambient occlusion with a custom node instead. - * - * If you don't want to overwrite the diffuse color but modify the existing - * values instead, use {@link materialAO}. - * - * @type {?Node} - * @default null - */ - aoNode: Node | null; - /** - * The diffuse color of node materials is by default inferred from the - * `color` and `map` properties. This node property allows to overwrite the default - * and define the diffuse color with a node instead. - * - * ```js - * material.colorNode = color( 0xff0000 ); // define red color - * ``` - * - * If you don't want to overwrite the diffuse color but modify the existing - * values instead, use {@link materialColor}. - * - * ```js - * material.colorNode = materialColor.mul( color( 0xff0000 ) ); // give diffuse colors a red tint - * ``` - * - * @type {?Node} - * @default null - */ - colorNode: Node | null; - /** - * The normals of node materials are by default inferred from the `normalMap`/`normalScale` - * or `bumpMap`/`bumpScale` properties. This node property allows to overwrite the default - * and define the normals with a node instead. - * - * If you don't want to overwrite the normals but modify the existing values instead, - * use {@link materialNormal}. - * - * @type {?Node} - * @default null - */ - normalNode: Node | null; - /** - * The opacity of node materials is by default inferred from the `opacity` - * and `alphaMap` properties. This node property allows to overwrite the default - * and define the opacity with a node instead. - * - * If you don't want to overwrite the opacity but modify the existing - * value instead, use {@link materialOpacity}. - * - * @type {?Node} - * @default null - */ - opacityNode: Node | null; - /** - * This node can be used to implement a variety of filter-like effects. The idea is - * to store the current rendering into a texture e.g. via `viewportSharedTexture()`, use it - * to create an arbitrary effect and then assign the node composition to this property. - * Everything behind the object using this material will now be affected by a filter. - * - * ```js - * const material = new NodeMaterial() - * material.transparent = true; - * - * // everything behind the object will be monochromatic - * material.backdropNode = saturation( viewportSharedTexture().rgb, 0 ); - * ``` - * - * Backdrop computations are part of the lighting so only lit materials can use this property. - * - * @type {?Node} - * @default null - */ - backdropNode: Node | null; - /** - * This node allows to modulate the influence of `backdropNode` to the outgoing light. - * - * @type {?Node} - * @default null - */ - backdropAlphaNode: Node | null; - /** - * The alpha test of node materials is by default inferred from the `alphaTest` - * property. This node property allows to overwrite the default and define the - * alpha test with a node instead. - * - * If you don't want to overwrite the alpha test but modify the existing - * value instead, use {@link materialAlphaTest}. - * - * @type {?Node} - * @default null - */ - alphaTestNode: Node | null; - /** - * Discards the fragment if the mask value is `false`. - * - * @type {?Node} - * @default null - */ - maskNode: Node | null; - /** - * This node can be used to implement a shadow mask for the material. - * - * @type {?Node} - * @default null - */ - maskShadowNode: Node | null; - /** - * The local vertex positions are computed based on multiple factors like the - * attribute data, morphing or skinning. This node property allows to overwrite - * the default and define local vertex positions with nodes instead. - * - * If you don't want to overwrite the vertex positions but modify the existing - * values instead, use {@link positionLocal}. - * - *```js - * material.positionNode = positionLocal.add( displace ); - * ``` - * - * @type {?Node} - * @default null - */ - positionNode: Node | null; - /** - * This node property is intended for logic which modifies geometry data once or per animation step. - * Apps usually place such logic randomly in initialization routines or in the animation loop. - * `geometryNode` is intended as a dedicated API so there is an intended spot where geometry modifications - * can be implemented. - * - * The idea is to assign a `Fn` definition that holds the geometry modification logic. A typical example - * would be a GPU based particle system that provides a node material for usage on app level. The particle - * simulation would be implemented as compute shaders and managed inside a `Fn` function. This function is - * eventually assigned to `geometryNode`. - * - * @type {?Function} - * @default null - */ - geometryNode: Function | null; - /** - * Allows to overwrite depth values in the fragment shader. - * - * @type {?Node} - * @default null - */ - depthNode: Node | null; - /** - * Allows to overwrite the position used for shadow map rendering which - * is by default {@link positionWorld}, the vertex position - * in world space. - * - * @type {?Node} - * @default null - */ - receivedShadowPositionNode: Node | null; - /** - * Allows to overwrite the geometry position used for shadow map projection which - * is by default {@link positionLocal}, the vertex position in local space. - * - * @type {?Node} - * @default null - */ - castShadowPositionNode: Node | null; - /** - * This node can be used to influence how an object using this node material - * receive shadows. - * - * ```js - * const totalShadows = float( 1 ).toVar(); - * material.receivedShadowNode = Fn( ( [ shadow ] ) => { - * totalShadows.mulAssign( shadow ); - * //return float( 1 ); // bypass received shadows - * return shadow.mix( color( 0xff0000 ), 1 ); // modify shadow color - * } ); - * - * @type {?(Function|FunctionNode)} - * @default null - */ - receivedShadowNode: (Function | FunctionNode) | null; - /** - * This node can be used to influence how an object using this node material - * casts shadows. To apply a color to shadows, you can simply do: - * - * ```js - * material.castShadowNode = vec4( 1, 0, 0, 1 ); - * ``` - * - * Which can be nice to fake colored shadows of semi-transparent objects. It - * is also common to use the property with `Fn` function so checks are performed - * per fragment. - * - * ```js - * materialCustomShadow.castShadowNode = Fn( () => { - * hash( vertexIndex ).greaterThan( 0.5 ).discard(); - * return materialColor; - * } )(); - * ``` - * - * @type {?Node} - * @default null - */ - castShadowNode: Node | null; - /** - * This node can be used to define the final output of the material. - * - * TODO: Explain the differences to `fragmentNode`. - * - * @type {?Node} - * @default null - */ - outputNode: Node | null; - /** - * MRT configuration is done on renderer or pass level. This node allows to - * overwrite what values are written into MRT targets on material level. This - * can be useful for implementing selective FX features that should only affect - * specific objects. - * - * @type {?MRTNode} - * @default null - */ - mrtNode: MRTNode | null; - /** - * This node property can be used if you need complete freedom in implementing - * the fragment shader. Assigning a node will replace the built-in material - * logic used in the fragment stage. - * - * @type {?Node} - * @default null - */ - fragmentNode: Node | null; - /** - * This node property can be used if you need complete freedom in implementing - * the vertex shader. Assigning a node will replace the built-in material logic - * used in the vertex stage. - * - * @type {?Node} - * @default null - */ - vertexNode: Node | null; - /** - * This node can be used as a global context management component for this material. - * - * @type {?ContextNode} - * @default null - */ - contextNode: ContextNode | null; - /** - * Returns an array of child nodes for this material. - * - * @private - * @returns {Array<{property: string, childNode: Node}>} - */ - private _getNodeChildren; - /** - * Builds this material with the given node builder. - * - * @param {NodeBuilder} builder - The current node builder. - */ - build(builder: NodeBuilder): void; - /** - * Setups a node material observer with the given builder. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {NodeMaterialObserver} The node material observer. - */ - setupObserver(builder: NodeBuilder): NodeMaterialObserver; - /** - * Setups the vertex and fragment stage of this node material. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setup(builder: NodeBuilder): void; - /** - * Setups the clipping node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {ClippingNode} The clipping node. - */ - setupClipping(builder: NodeBuilder): ClippingNode; - /** - * Setups the hardware clipping if available on the current device. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setupHardwareClipping(builder: NodeBuilder): void; - /** - * Setups the depth of this material. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setupDepth(builder: NodeBuilder): void; - /** - * Setups the position node in view space. This method exists - * so derived node materials can modify the implementation e.g. sprite materials. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The position in view space. - */ - setupPositionView(): Node; - /** - * Setups the position in clip space. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The position in view space. - */ - setupModelViewProjection(): Node; - /** - * Setups the logic for the vertex stage. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The position in clip space. - */ - setupVertex(builder: NodeBuilder): Node; - /** - * Setups the computation of the position in local space. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The position in local space. - */ - setupPosition(builder: NodeBuilder): Node; - /** - * Setups the computation of the material's diffuse color. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {BufferGeometry} geometry - The geometry. - */ - setupDiffuseColor(builder: NodeBuilder): void; - /** - * Abstract interface method that can be implemented by derived materials - * to setup material-specific node variables. - * - * @abstract - * @param {NodeBuilder} builder - The current node builder. - */ - setupVariants(): void; - /** - * Setups the outgoing light node variable - * - * @return {Node} The outgoing light node. - */ - setupOutgoingLight(): Node; - /** - * Setups the normal node from the material. - * - * @return {Node} The normal node. - */ - setupNormal(): Node; - /** - * Setups the environment node from the material. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The environment node. - */ - setupEnvironment(): Node; - /** - * Setups the light map node from the material. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The light map node. - */ - setupLightMap(builder: NodeBuilder): Node; - /** - * Setups the lights node based on the scene, environment and material. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {LightsNode} The lights node. - */ - setupLights(builder: NodeBuilder): LightsNode; - /** - * This method should be implemented by most derived materials - * since it defines the material's lighting model. - * - * @abstract - * @param {NodeBuilder} builder - The current node builder. - * @return {LightingModel} The lighting model. - */ - setupLightingModel(): LightingModel; - /** - * Setups the outgoing light node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The outgoing light node. - */ - setupLighting(builder: NodeBuilder): Node; - /** - * Setup the fog. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {Node} outputNode - The existing output node. - * @return {Node} The output node. - */ - setupFog(builder: NodeBuilder, outputNode: Node): Node; - /** - * Setups premultiplied alpha. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {Node} outputNode - The existing output node. - * @return {Node} The output node. - */ - setupPremultipliedAlpha(builder: NodeBuilder, outputNode: Node): Node; - /** - * Setups the output node. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {Node} outputNode - The existing output node. - * @return {Node} The output node. - */ - setupOutput(builder: NodeBuilder, outputNode: Node): Node; - /** - * Most classic material types have a node pendant e.g. for `MeshBasicMaterial` - * there is `MeshBasicNodeMaterial`. This utility method is intended for - * defining all material properties of the classic type in the node type. - * - * @param {Material} material - The material to copy properties with their values to this node material. - */ - setDefaultValues(material: Material): void; - /** - * Copies the properties of the given node material to this instance. - * - * @param {NodeMaterial} source - The material to copy. - * @return {NodeMaterial} A reference to this node material. - */ - copy(source: NodeMaterial): NodeMaterial; -} -/** - * A special type of material loader for loading node materials. - * - * @augments MaterialLoader - */ -export class NodeMaterialLoader extends MaterialLoader { - /** - * Constructs a new node material loader. - * - * @param {LoadingManager} [manager] - A reference to a loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Represents a dictionary of node types. - * - * @type {Object} - */ - nodes: { - [x: string]: Node.constructor; - }; - /** - * Represents a dictionary of node material types. - * - * @type {Object} - */ - nodeMaterials: { - [x: string]: NodeMaterial.constructor; - }; - /** - * Parses the node material from the given JSON. - * - * @param {Object} json - The JSON definition - * @return {NodeMaterial}. The parsed material. - */ - parse(json: Object): NodeMaterial; - /** - * Defines the dictionary of node types. - * - * @param {Object} value - The node library defined as ``. - * @return {NodeLoader} A reference to this loader. - */ - setNodes(value: { - [x: string]: Node.constructor; - }): NodeLoader; - /** - * Defines the dictionary of node material types. - * - * @param {Object} value - The node material library defined as ``. - * @return {NodeLoader} A reference to this loader. - */ - setNodeMaterials(value: { - [x: string]: NodeMaterial.constructor; - }): NodeLoader; - /** - * Creates a node material from the given type. - * - * @param {string} type - The node material type. - * @return {Node} The created node material instance. - */ - createMaterialFromType(type: string): Node; -} -/** - * This class is used by {@link WebGPURenderer} as management component. - * It's primary purpose is to determine whether render objects require a - * refresh right before they are going to be rendered or not. - */ -export class NodeMaterialObserver { - /** - * Constructs a new node material observer. - * - * @param {NodeBuilder} builder - The node builder. - */ - constructor(builder: NodeBuilder); - /** - * A node material can be used by more than one render object so the - * monitor must maintain a list of render objects. - * - * @type {WeakMap} - */ - renderObjects: WeakMap; - /** - * Whether the material uses node objects or not. - * - * @type {boolean} - */ - hasNode: boolean; - /** - * Whether the node builder's 3D object is animated or not. - * - * @type {boolean} - */ - hasAnimation: boolean; - /** - * A list of all possible material uniforms - * - * @type {Array} - */ - refreshUniforms: Array; - /** - * Holds the current render ID from the node frame. - * - * @type {number} - * @default 0 - */ - renderId: number; - /** - * Returns `true` if the given render object is verified for the first time of this observer. - * - * @param {RenderObject} renderObject - The render object. - * @return {boolean} Whether the given render object is verified for the first time of this observer. - */ - firstInitialization(renderObject: RenderObject): boolean; - /** - * Returns `true` if the current rendering produces motion vectors. - * - * @param {Renderer} renderer - The renderer. - * @return {boolean} Whether the current rendering produces motion vectors or not. - */ - needsVelocity(renderer: Renderer): boolean; - /** - * Returns monitoring data for the given render object. - * - * @param {RenderObject} renderObject - The render object. - * @return {Object} The monitoring data. - */ - getRenderObjectData(renderObject: RenderObject): Object; - /** - * Returns an attribute data structure holding the attributes versions for - * monitoring. - * - * @param {Object} attributes - The geometry attributes. - * @return {Object} An object for monitoring the versions of attributes. - */ - getAttributesData(attributes: Object): Object; - /** - * Returns `true` if the node builder's material uses - * node properties. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {boolean} Whether the node builder's material uses node properties or not. - */ - containsNode(builder: NodeBuilder): boolean; - /** - * Returns a geometry data structure holding the geometry property values for - * monitoring. - * - * @param {BufferGeometry} geometry - The geometry. - * @return {Object} An object for monitoring geometry properties. - */ - getGeometryData(geometry: BufferGeometry): Object; - /** - * Returns a material data structure holding the material property values for - * monitoring. - * - * @param {Material} material - The material. - * @return {Object} An object for monitoring material properties. - */ - getMaterialData(material: Material): Object; - /** - * Returns `true` if the given render object has not changed its state. - * - * @param {RenderObject} renderObject - The render object. - * @param {Array} lightsData - The current material lights. - * @param {number} renderId - The current render ID. - * @return {boolean} Whether the given render object has changed its state or not. - */ - equals(renderObject: RenderObject, lightsData: Array, renderId: number): boolean; - /** - * Returns the lights data for the given material lights. - * - * @param {Array} materialLights - The material lights. - * @return {Array} The lights data for the given material lights. - */ - getLightsData(materialLights: Array, lights: any): Array; - /** - * Returns the lights for the given lights node and render ID. - * - * @param {LightsNode} lightsNode - The lights node. - * @param {number} renderId - The render ID. - * @return {Array} The lights for the given lights node and render ID. - */ - getLights(lightsNode: LightsNode, renderId: number): Array; - /** - * Checks if the given render object requires a refresh. - * - * @param {RenderObject} renderObject - The render object. - * @param {NodeFrame} nodeFrame - The current node frame. - * @return {boolean} Whether the given render object requires a refresh or not. - */ - needsRefresh(renderObject: RenderObject, nodeFrame: NodeFrame): boolean; -} -/** - * A special type of object loader for loading 3D objects using - * node materials. - * - * @augments ObjectLoader - */ -export class NodeObjectLoader extends ObjectLoader { - /** - * Constructs a new node object loader. - * - * @param {LoadingManager} [manager] - A reference to a loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Represents a dictionary of node types. - * - * @type {Object} - */ - nodes: { - [x: string]: Node.constructor; - }; - /** - * Represents a dictionary of node material types. - * - * @type {Object} - */ - nodeMaterials: { - [x: string]: NodeMaterial.constructor; - }; - /** - * A reference to hold the `nodes` JSON property. - * - * @private - * @type {?Object[]} - */ - private _nodesJSON; - /** - * Defines the dictionary of node types. - * - * @param {Object} value - The node library defined as ``. - * @return {NodeObjectLoader} A reference to this loader. - */ - setNodes(value: { - [x: string]: Node.constructor; - }): NodeObjectLoader; - /** - * Defines the dictionary of node material types. - * - * @param {Object} value - The node material library defined as ``. - * @return {NodeObjectLoader} A reference to this loader. - */ - setNodeMaterials(value: { - [x: string]: NodeMaterial.constructor; - }): NodeObjectLoader; - /** - * Parses the node objects from the given JSON. - * - * @param {Object} json - The JSON definition - * @param {Function} onLoad - The onLoad callback function. - * @return {Object3D}. The parsed 3D object. - */ - parse(json: Object, onLoad: Function): Object3D; - /** - * Parses the node objects from the given JSON and textures. - * - * @param {Object[]} json - The JSON definition - * @param {Object} textures - The texture library. - * @return {Object}. The parsed nodes. - */ - parseNodes(json: Object[], textures: { - [x: string]: Texture; - }): { - [x: string]: Node; - }; - /** - * Parses the node objects from the given JSON and textures. - * - * @param {Object} json - The JSON definition - * @param {Object} textures - The texture library. - * @return {Object}. The parsed materials. - */ - parseMaterials(json: Object, textures: { - [x: string]: Texture; - }): { - [x: string]: NodeMaterial; - }; -} -export namespace NodeShaderStage { - let VERTEX_1: string; - export { VERTEX_1 as VERTEX }; - export let FRAGMENT: string; -} -export namespace NodeType { - let BOOLEAN: string; - let INTEGER: string; - let FLOAT: string; - let VECTOR2: string; - let VECTOR3: string; - let VECTOR4: string; - let MATRIX2: string; - let MATRIX3: string; - let MATRIX4: string; -} -/** - * {@link NodeBuilder} is going to create instances of this class during the build process - * of nodes. They represent the final shader uniforms that are going to be generated - * by the builder. A dictionary of node uniforms is maintained in {@link NodeBuilder#uniforms} - * for this purpose. - */ -export class NodeUniform { - /** - * Constructs a new node uniform. - * - * @param {string} name - The name of the uniform. - * @param {string} type - The type of the uniform. - * @param {UniformNode} node - An reference to the node. - */ - constructor(name: string, type: string, node: UniformNode); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isNodeUniform: boolean; - /** - * The name of the uniform. - * - * @type {string} - */ - name: string; - /** - * The type of the uniform. - * - * @type {string} - */ - type: string; - /** - * An reference to the node. - * - * @type {UniformNode} - */ - node: UniformNode; - set value(val: any); - /** - * The value of the uniform node. - * - * @type {any} - */ - get value(): any; - /** - * The id of the uniform node. - * - * @type {number} - */ - get id(): number; - /** - * The uniform node's group. - * - * @type {UniformGroupNode} - */ - get groupNode(): UniformGroupNode; -} -export namespace NodeUpdateType { - export let NONE: string; - let FRAME_1: string; - export { FRAME_1 as FRAME }; - export let RENDER: string; - let OBJECT_1: string; - export { OBJECT_1 as OBJECT }; -} -export var NodeUtils: Readonly<{ - __proto__: null; - arrayBufferToBase64: typeof arrayBufferToBase64; - base64ToArrayBuffer: typeof base64ToArrayBuffer; - getAlignmentFromType: typeof getAlignmentFromType; - getDataFromObject: typeof getDataFromObject; - getLengthFromType: typeof getLengthFromType; - getMemoryLengthFromType: typeof getMemoryLengthFromType; - getTypeFromLength: typeof getTypeFromLength; - getTypedArrayFromType: typeof getTypedArrayFromType; - getValueFromType: typeof getValueFromType; - getValueType: typeof getValueType; - hash: (...params: number[]) => number; - hashArray: (array: Array) => number; - hashString: (str: string) => number; -}>; -/** - * {@link NodeBuilder} is going to create instances of this class during the build process - * of nodes. They represent the final shader variables that are going to be generated - * by the builder. A dictionary of node variables is maintained in {@link NodeBuilder#vars} for - * this purpose. - */ -export class NodeVar { - /** - * Constructs a new node variable. - * - * @param {string} name - The name of the variable. - * @param {string} type - The type of the variable. - * @param {boolean} [readOnly=false] - The read-only flag. - * @param {?number} [count=null] - The size. - */ - constructor(name: string, type: string, readOnly?: boolean, count?: number | null); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isNodeVar: boolean; - /** - * The name of the variable. - * - * @type {string} - */ - name: string; - /** - * The type of the variable. - * - * @type {string} - */ - type: string; - /** - * The read-only flag. - * - * @type {boolean} - */ - readOnly: boolean; - /** - * The size. - * - * @type {?number} - */ - count: number | null; -} -/** - * {@link NodeBuilder} is going to create instances of this class during the build process - * of nodes. They represent the final shader varyings that are going to be generated - * by the builder. An array of node varyings is maintained in {@link NodeBuilder#varyings} for - * this purpose. - * - * @augments NodeVar - */ -export class NodeVarying extends NodeVar { - /** - * Constructs a new node varying. - * - * @param {string} name - The name of the varying. - * @param {string} type - The type of the varying. - * @param {?string} interpolationType - The interpolation type of the varying. - * @param {?string} interpolationSampling - The interpolation sampling type of the varying. - */ - constructor(name: string, type: string, interpolationType?: string | null, interpolationSampling?: string | null); - /** - * Whether this varying requires interpolation or not. This property can be used - * to check if the varying can be optimized for a variable. - * - * @type {boolean} - * @default false - */ - needsInterpolation: boolean; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isNodeVarying: boolean; - /** - * The interpolation type of the varying data. - * - * @type {?string} - * @default null - */ - interpolationType: string | null; - /** - * The interpolation sampling type of varying data. - * - * @type {?string} - * @default null - */ - interpolationSampling: string | null; -} -import { NormalBlending } from './three.core.js'; -import { NormalGAPacking } from './three.core.js'; -/** - * This class can be used for applying normals maps to materials. - * - * ```js - * material.normalNode = normalMap( texture( normalTex ) ); - * ``` - * - * @augments TempNode - */ -export class NormalMapNode extends TempNode { - /** - * Constructs a new normal map node. - * - * @param {Node} node - Represents the normal map data. - * @param {?Node} [scaleNode=null] - Controls the intensity of the effect. - */ - constructor(node: Node, scaleNode?: Node | null); - /** - * Represents the normal map data. - * - * @type {Node} - */ - node: Node; - /** - * Controls the intensity of the effect. - * - * @type {?Node} - * @default null - */ - scaleNode: Node | null; - /** - * The normal map type. - * - * @type {(TangentSpaceNormalMap|ObjectSpaceNormalMap)} - * @default TangentSpaceNormalMap - */ - normalMapType: (number | number); - /** - * Controls how to unpack the sampled normal map values. - * - * @type {string} - * @default NoNormalPacking - */ - unpackNormalMode: string; - setup(builder: any): any; -} -import { NormalRGPacking } from './three.core.js'; -import { NotEqualCompare } from './three.core.js'; -import { NotEqualDepth } from './three.core.js'; -import { NotEqualStencilFunc } from './three.core.js'; -import { Object3D } from './three.core.js'; -/** - * This node can be used to access transformation related metrics of 3D objects. - * Depending on the selected scope, a different metric is represented as a uniform - * in the shader. The following scopes are supported: - * - * - `POSITION`: The object's position in world space. - * - `VIEW_POSITION`: The object's position in view/camera space. - * - `DIRECTION`: The object's direction in world space. - * - `SCALE`: The object's scale in world space. - * - `WORLD_MATRIX`: The object's matrix in world space. - * - * @augments Node - */ -export class Object3DNode extends Node { - /** - * Constructs a new object 3D node. - * - * @param {('position'|'viewPosition'|'direction'|'scale'|'worldMatrix')} scope - The node represents a different type of transformation depending on the scope. - * @param {?Object3D} [object3d=null] - The 3D object. - */ - constructor(scope: ("position" | "viewPosition" | "direction" | "scale" | "worldMatrix"), object3d?: Object3D | null); - /** - * The node reports a different type of transformation depending on the scope. - * - * @type {('position'|'viewPosition'|'direction'|'scale'|'worldMatrix')} - */ - scope: ("position" | "viewPosition" | "direction" | "scale" | "worldMatrix"); - /** - * The 3D object. - * - * @type {?Object3D} - * @default null - */ - object3d: Object3D | null; - /** - * Holds the value of the node as a uniform. - * - * @type {UniformNode} - */ - uniformNode: UniformNode; - /** - * Overwritten since the node type is inferred from the scope. - * - * @return {('mat4'|'vec3'|'float')} The node type. - */ - generateNodeType(): ("mat4" | "vec3" | "float"); - /** - * Updates the uniform value depending on the scope. - * - * @param {NodeFrame} frame - The current node frame. - */ - update(frame: NodeFrame): void; - /** - * Generates the code snippet of the uniform node. The node type of the uniform - * node also depends on the selected scope. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The generated code snippet. - */ - generate(builder: NodeBuilder): string; - serialize(data: any): void; - deserialize(data: any): void; -} -export namespace Object3DNode { - let WORLD_MATRIX: string; - let POSITION: string; - let SCALE: string; - let VIEW_POSITION: string; - let DIRECTION: string; - let RADIUS: string; -} -import { ObjectLoader } from './three.core.js'; -import { ObjectSpaceNormalMap } from './three.core.js'; -import { OneFactor } from './three.core.js'; -import { OneMinusDstAlphaFactor } from './three.core.js'; -import { OneMinusDstColorFactor } from './three.core.js'; -import { OneMinusSrcAlphaFactor } from './three.core.js'; -import { OneMinusSrcColorFactor } from './three.core.js'; -/** - * This node represents basic mathematical and logical operations like addition, - * subtraction or comparisons (e.g. `equal()`). - * - * @augments TempNode - */ -export class OperatorNode extends TempNode { - /** - * Constructs a new operator node. - * - * @param {string} op - The operator. - * @param {Node} aNode - The first input. - * @param {Node} bNode - The second input. - * @param {...Node} params - Additional input parameters. - */ - constructor(op: string, aNode: Node, bNode: Node, ...params: Node[]); - /** - * The operator. - * - * @type {string} - */ - op: string; - /** - * The first input. - * - * @type {Node} - */ - aNode: Node; - /** - * The second input. - * - * @type {Node} - */ - bNode: Node; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isOperatorNode: boolean; - /** - * Returns the operator method name. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} output - The output type. - * @returns {string} The operator method name. - */ - getOperatorMethod(builder: NodeBuilder, output: string): string; - /** - * This method is overwritten since the node type is inferred from the operator - * and the input node types. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {?string} [output=null] - The output type. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder, output?: string | null): string; - generate(builder: any, output: any): any; - serialize(data: any): void; - deserialize(data: any): void; -} -import { OrthographicCamera } from './three.core.js'; -/** - * This node can be used to define multiple outputs in a shader programs. - * - * @augments Node - */ -export class OutputStructNode extends Node { - /** - * Constructs a new output struct node. The constructor can be invoked with an - * arbitrary number of nodes representing the members. - * - * @param {...Node} members - A parameter list of nodes. - */ - constructor(...members: Node[]); - /** - * An array of nodes which defines the output. - * - * @type {Array} - */ - members: Array; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isOutputStructNode: boolean; - generateNodeType(): string; - generate(builder: any): any; -} -import { PCFShadowMap } from './three.core.js'; -import { PCFSoftShadowMap } from './three.core.js'; -/** - * This class generates a Prefiltered, Mipmapped Radiance Environment Map - * (PMREM) from a cubeMap environment texture. This allows different levels of - * blur to be quickly accessed based on material roughness. It is packed into a - * special CubeUV format that allows us to perform custom interpolation so that - * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap - * chain, it only goes down to the LOD_MIN level (above), and then creates extra - * even more filtered 'mips' at the same LOD_MIN resolution, associated with - * higher roughness levels. In this way we maintain resolution to smoothly - * interpolate diffuse lighting while limiting sampling computation. - * - * The prefiltering uses GGX VNDF (Visible Normal Distribution Function) - * importance sampling based on "Sampling the GGX Distribution of Visible Normals" - * (Heitz, 2018) to generate environment maps that accurately match the GGX BRDF - * used in material rendering for physically-based image-based lighting. - */ -export class PMREMGenerator { - /** - * Constructs a new PMREM generator. - * - * @param {Renderer} renderer - The renderer. - */ - constructor(renderer: Renderer); - _renderer: Renderer; - _pingPongRenderTarget: RenderTarget | null; - _lodMax: number; - _cubeSize: number; - _sizeLods: any[]; - _sigmas: any[]; - _lodMeshes: any[]; - _blurMaterial: NodeMaterial | null; - _ggxMaterial: NodeMaterial | null; - _cubemapMaterial: NodeMaterial | null; - _equirectMaterial: NodeMaterial | null; - _backgroundBox: Mesh | null; - get _hasInitialized(): boolean; - /** - * Generates a PMREM from a supplied Scene, which can be faster than using an - * image if networking bandwidth is low. Optional sigma specifies a blur radius - * in radians to be applied to the scene before PMREM generation. Optional near - * and far planes ensure the scene is rendered in its entirety. - * - * @param {Scene} scene - The scene to be captured. - * @param {number} [sigma=0] - The blur radius in radians. - * @param {number} [near=0.1] - The near plane distance. - * @param {number} [far=100] - The far plane distance. - * @param {Object} [options={}] - The configuration options. - * @param {number} [options.size=256] - The texture size of the PMREM. - * @param {Vector3} [options.renderTarget=origin] - The position of the internal cube camera that renders the scene. - * @param {?RenderTarget} [options.renderTarget=null] - The render target to use. - * @return {RenderTarget} The resulting PMREM. - * @see {@link PMREMGenerator#fromScene} - */ - fromScene(scene: Scene, sigma?: number, near?: number, far?: number, options?: { - size?: number | undefined; - renderTarget?: Vector3 | undefined; - renderTarget?: Vector3 | undefined; - }): RenderTarget; - /** - * Generates a PMREM from a supplied Scene, which can be faster than using an - * image if networking bandwidth is low. Optional sigma specifies a blur radius - * in radians to be applied to the scene before PMREM generation. Optional near - * and far planes ensure the scene is rendered in its entirety (the cubeCamera - * is placed at the origin). - * - * @deprecated - * @param {Scene} scene - The scene to be captured. - * @param {number} [sigma=0] - The blur radius in radians. - * @param {number} [near=0.1] - The near plane distance. - * @param {number} [far=100] - The far plane distance. - * @param {Object} [options={}] - The configuration options. - * @param {number} [options.size=256] - The texture size of the PMREM. - * @param {Vector3} [options.position=origin] - The position of the internal cube camera that renders the scene. - * @param {?RenderTarget} [options.renderTarget=null] - The render target to use. - * @return {Promise} A Promise that resolve with the PMREM when the generation has been finished. - * @see {@link PMREMGenerator#fromScene} - */ - fromSceneAsync(scene: Scene, sigma?: number, near?: number, far?: number, options?: { - size?: number | undefined; - position?: Vector3 | undefined; - renderTarget?: RenderTarget | null | undefined; - }): Promise; - /** - * Generates a PMREM from an equirectangular texture, which can be either LDR - * or HDR. The ideal input image size is 1k (1024 x 512), as this matches best - * with the 256 x 256 cubemap output. The minimum supported input image size - * is 64 x 32. - * - * @param {Texture} equirectangular - The equirectangular texture to be converted. - * @param {?RenderTarget} [renderTarget=null] - The render target to use. - * @return {RenderTarget} The resulting PMREM. - * @see {@link PMREMGenerator#fromEquirectangularAsync} - */ - fromEquirectangular(equirectangular: Texture, renderTarget?: RenderTarget | null): RenderTarget; - /** - * Generates a PMREM from an equirectangular texture, which can be either LDR - * or HDR. The ideal input image size is 1k (1024 x 512), - * as this matches best with the 256 x 256 cubemap output. - * - * @deprecated - * @param {Texture} equirectangular - The equirectangular texture to be converted. - * @param {?RenderTarget} [renderTarget=null] - The render target to use. - * @return {Promise} The resulting PMREM. - * @see {@link PMREMGenerator#fromEquirectangular} - */ - fromEquirectangularAsync(equirectangular: Texture, renderTarget?: RenderTarget | null): Promise; - /** - * Generates a PMREM from an cubemap texture, which can be either LDR - * or HDR. The ideal input cube size is 256 x 256, as this matches best - * with the 256 x 256 cubemap output. The minimum supported input cube - * size is 16 x 16 per face. - * - * @param {Texture} cubemap - The cubemap texture to be converted. - * @param {?RenderTarget} [renderTarget=null] - The render target to use. - * @return {RenderTarget} The resulting PMREM. - * @see {@link PMREMGenerator#fromCubemapAsync} - */ - fromCubemap(cubemap: Texture, renderTarget?: RenderTarget | null): RenderTarget; - /** - * Generates a PMREM from an cubemap texture, which can be either LDR - * or HDR. The ideal input cube size is 256 x 256, - * with the 256 x 256 cubemap output. - * - * @deprecated - * @param {Texture} cubemap - The cubemap texture to be converted. - * @param {?RenderTarget} [renderTarget=null] - The render target to use. - * @return {Promise} The resulting PMREM. - * @see {@link PMREMGenerator#fromCubemap} - */ - fromCubemapAsync(cubemap: Texture, renderTarget?: RenderTarget | null): Promise; - /** - * Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during - * your texture's network fetch for increased concurrency. - * - * @returns {Promise} - */ - compileCubemapShader(): Promise; - /** - * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during - * your texture's network fetch for increased concurrency. - * - * @returns {Promise} - */ - compileEquirectangularShader(): Promise; - /** - * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class, - * so you should not need more than one PMREMGenerator object. If you do, calling dispose() on - * one of them will cause any others to also become unusable. - */ - dispose(): void; - _setSizeFromTexture(texture: any): void; - _setSize(cubeSize: any): void; - _dispose(): void; - _cleanup(outputTarget: any): void; - _fromTexture(texture: any, renderTarget: any): any; - _allocateTarget(): RenderTarget; - _init(renderTarget: any): void; - _compileMaterial(material: any): Promise; - _sceneToCubeUV(scene: any, near: any, far: any, cubeUVRenderTarget: any, position: any): void; - _textureToCubeUV(texture: any, cubeUVRenderTarget: any): void; - _applyPMREM(cubeUVRenderTarget: any): void; - /** - * Applies GGX VNDF importance sampling filter to generate a prefiltered environment map. - * Uses Monte Carlo integration with VNDF importance sampling to accurately represent the - * GGX BRDF for physically-based rendering. Reads from the previous LOD level and - * applies incremental roughness filtering to avoid over-blurring. - * - * @private - * @param {RenderTarget} cubeUVRenderTarget - * @param {number} lodIn - Source LOD level to read from - * @param {number} lodOut - Target LOD level to write to - */ - private _applyGGXFilter; - /** - * This is a two-pass Gaussian blur for a cubemap. Normally this is done - * vertically and horizontally, but this breaks down on a cube. Here we apply - * the blur latitudinally (around the poles), and then longitudinally (towards - * the poles) to approximate the orthogonally-separable blur. It is least - * accurate at the poles, but still does a decent job. - * - * Used for initial scene blur in fromScene() method when sigma > 0. - * - * @private - * @param {RenderTarget} cubeUVRenderTarget - The cubemap render target. - * @param {number} lodIn - The input level-of-detail. - * @param {number} lodOut - The output level-of-detail. - * @param {number} sigma - The blur radius in radians. - * @param {Vector3} [poleAxis] - The pole axis. - */ - private _blur; - _halfBlur(targetIn: any, targetOut: any, lodIn: any, lodOut: any, sigmaRadians: any, direction: any, poleAxis: any): void; - _setViewport(target: any, x: any, y: any, width: any, height: any): void; -} -/** - * This node represents a PMREM which is a special type of preprocessed - * environment map intended for PBR materials. - * - * ```js - * const material = new MeshStandardNodeMaterial(); - * material.envNode = pmremTexture( envMap ); - * ``` - * - * @augments TempNode - */ -export class PMREMNode extends TempNode { - /** - * Constructs a new function overloading node. - * - * @param {Texture} value - The input texture. - * @param {Node} [uvNode=null] - The uv node. - * @param {Node} [levelNode=null] - The level node. - */ - constructor(value: Texture, uvNode?: Node, levelNode?: Node); - /** - * Reference to the input texture. - * - * @private - * @type {Texture} - */ - private _value; - /** - * Reference to the generated PMREM. - * - * @private - * @type {Texture | null} - * @default null - */ - private _pmrem; - /** - * The uv node. - * - * @type {Node} - */ - uvNode: Node; - /** - * The level node. - * - * @type {Node} - */ - levelNode: Node; - /** - * Reference to a PMREM generator. - * - * @private - * @type {?PMREMGenerator} - * @default null - */ - private _generator; - /** - * The texture node holding the generated PMREM. - * - * @private - * @type {TextureNode} - */ - private _texture; - /** - * A uniform representing the PMREM's width. - * - * @private - * @type {UniformNode} - */ - private _width; - /** - * A uniform representing the PMREM's height. - * - * @private - * @type {UniformNode} - */ - private _height; - /** - * A uniform representing the PMREM's max Mip. - * - * @private - * @type {UniformNode} - */ - private _maxMip; - set value(value: Texture); - /** - * The node's texture value. - * - * @type {Texture} - */ - get value(): Texture; - /** - * Uses the given PMREM texture to update internal values. - * - * @param {Texture} texture - The PMREM texture. - */ - updateFromTexture(texture: Texture): void; - updateBefore(frame: any): void; - setup(builder: any): void; -} -/** - * This node represents an operation that packs floating-point values of a vector into an unsigned 32-bit integer - * - * @augments TempNode - */ -export class PackFloatNode extends TempNode { - /** - * - * @param {'snorm' | 'unorm' | 'float16'} encoding - The numeric encoding that describes how the float values are mapped to the integer range. - * @param {Node} vectorNode - The vector node to be packed - */ - constructor(encoding: "snorm" | "unorm" | "float16", vectorNode: Node); - /** - * The vector to be packed. - * - * @type {Node} - */ - vectorNode: Node; - /** - * The numeric encoding. - * - * @type {string} - */ - encoding: string; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isPackFloatNode: boolean; - generateNodeType(): string; - generate(builder: any): string; -} -/** - * Special version of {@link PropertyNode} which is used for parameters. - * - * @augments PropertyNode - */ -export class ParameterNode extends PropertyNode { - /** - * Constructs a new parameter node. - * - * @param {string} nodeType - The type of the node. - * @param {?string} [name=null] - The name of the parameter in the shader. - */ - constructor(nodeType: string, name?: string | null); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isParameterNode: boolean; - /** - * Gets the type of a member variable in the parameter node. - * - * @param {NodeBuilder} builder - The node builder. - * @param {string} name - The name of the member variable. - * @returns {string} - */ - getMemberType(builder: NodeBuilder, name: string): string; - getHash(): string; - generate(): string; -} -/** - * Represents a render pass (sometimes called beauty pass) in context of post processing. - * This pass produces a render for the given scene and camera and can provide multiple outputs - * via MRT for further processing. - * - * ```js - * const postProcessing = new RenderPipeline( renderer ); - * - * const scenePass = pass( scene, camera ); - * - * postProcessing.outputNode = scenePass; - * ``` - * - * @augments TempNode - */ -export class PassNode extends TempNode { - /** - * Constructs a new pass node. - * - * @param {('color'|'depth')} scope - The scope of the pass. The scope determines whether the node outputs color or depth. - * @param {Scene} scene - A reference to the scene. - * @param {Camera} camera - A reference to the camera. - * @param {Object} options - Options for the internal render target. - */ - constructor(scope: ("color" | "depth"), scene: Scene, camera: Camera, options?: Object); - /** - * The scope of the pass. The scope determines whether the node outputs color or depth. - * - * @type {('color'|'depth')} - */ - scope: ("color" | "depth"); - /** - * A reference to the scene. - * - * @type {Scene} - */ - scene: Scene; - /** - * A reference to the camera. - * - * @type {Camera} - */ - camera: Camera; - /** - * Options for the internal render target. - * - * @type {Object} - */ - options: Object; - /** - * The pass's pixel ratio. Will be kept automatically kept in sync with the renderer's pixel ratio. - * - * @private - * @type {number} - * @default 1 - */ - private _pixelRatio; - /** - * The pass's pixel width. Will be kept automatically kept in sync with the renderer's width. - * @private - * @type {number} - * @default 1 - */ - private _width; - /** - * The pass's pixel height. Will be kept automatically kept in sync with the renderer's height. - * @private - * @type {number} - * @default 1 - */ - private _height; - /** - * The pass's render target. - * - * @type {RenderTarget} - */ - renderTarget: RenderTarget; - /** - * An optional override material for the pass. - * - * @type {Material|null} - */ - overrideMaterial: Material | null; - /** - * Whether the pass is transparent. - * - * @type {boolean} - * @default false - */ - transparent: boolean; - /** - * Whether the pass is opaque. - * - * @type {boolean} - * @default true - */ - opaque: boolean; - /** - * An optional global context for the pass. - * - * @type {ContextNode|null} - */ - contextNode: ContextNode | null; - /** - * A cache for the context node. - * - * @private - * @type {?Object} - * @default null - */ - private _contextNodeCache; - /** - * A dictionary holding the internal result textures. - * - * @private - * @type {{ output: Texture, depth: ?DepthTexture }} - */ - private _textures; - /** - * A dictionary holding the internal texture nodes. - * - * @private - * @type {Object} - */ - private _textureNodes; - /** - * A dictionary holding the internal depth nodes. - * - * @private - * @type {Object} - */ - private _linearDepthNodes; - /** - * A dictionary holding the internal viewZ nodes. - * - * @private - * @type {Object} - */ - private _viewZNodes; - /** - * A dictionary holding the texture data of the previous frame. - * Used for computing velocity/motion vectors. - * - * @private - * @type {Object} - */ - private _previousTextures; - /** - * A dictionary holding the texture nodes of the previous frame. - * Used for computing velocity/motion vectors. - * - * @private - * @type {Object} - */ - private _previousTextureNodes; - /** - * The `near` property of the camera as a uniform. - * - * @private - * @type {UniformNode} - */ - private _cameraNear; - /** - * The `far` property of the camera as a uniform. - * - * @private - * @type {UniformNode} - */ - private _cameraFar; - /** - * A MRT node configuring the MRT settings. - * - * @private - * @type {?MRTNode} - * @default null - */ - private _mrt; - /** - * Layer object for configuring the camera that is used - * to produce the pass. - * - * @private - * @type {?Layers} - * @default null - */ - private _layers; - /** - * Scales the resolution of the internal render target. - * - * @private - * @type {number} - * @default 1 - */ - private _resolutionScale; - /** - * Custom viewport definition. - * - * @private - * @type {?Vector4} - * @default null - */ - private _viewport; - /** - * Custom scissor definition. - * - * @private - * @type {?Vector4} - * @default null - */ - private _scissor; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isPassNode: boolean; - /** - * Sets the resolution scale for the pass. - * The resolution scale is a factor that is multiplied with the renderer's width and height. - * - * @param {number} resolutionScale - The resolution scale to set. A value of `1` means full resolution. - * @return {PassNode} A reference to this pass. - */ - setResolutionScale(resolutionScale: number): PassNode; - /** - * Gets the current resolution scale of the pass. - * - * @return {number} The current resolution scale. A value of `1` means full resolution. - */ - getResolutionScale(): number; - /** - * Sets the resolution for the pass. - * The resolution is a factor that is multiplied with the renderer's width and height. - * - * @param {number} resolution - The resolution to set. A value of `1` means full resolution. - * @return {PassNode} A reference to this pass. - * @deprecated since r181. Use {@link PassNode#setResolutionScale `setResolutionScale()`} instead. - */ - setResolution(resolution: number): PassNode; - /** - * Gets the current resolution of the pass. - * - * @return {number} The current resolution. A value of `1` means full resolution. - * @deprecated since r181. Use {@link PassNode#getResolutionScale `getResolutionScale()`} instead. - */ - getResolution(): number; - /** - * Sets the layer configuration that should be used when rendering the pass. - * - * @param {Layers} layers - The layers object to set. - * @return {PassNode} A reference to this pass. - */ - setLayers(layers: Layers): PassNode; - /** - * Gets the current layer configuration of the pass. - * - * @return {?Layers} . - */ - getLayers(): Layers | null; - /** - * Sets the given MRT node to setup MRT for this pass. - * - * @param {MRTNode} mrt - The MRT object. - * @return {PassNode} A reference to this pass. - */ - setMRT(mrt: MRTNode): PassNode; - /** - * Returns the current MRT node. - * - * @return {MRTNode} The current MRT node. - */ - getMRT(): MRTNode; - /** - * Returns the texture for the given output name. - * - * @param {string} name - The output name to get the texture for. - * @return {Texture} The texture. - */ - getTexture(name: string): Texture; - /** - * Returns the texture holding the data of the previous frame for the given output name. - * - * @param {string} name - The output name to get the texture for. - * @return {Texture} The texture holding the data of the previous frame. - */ - getPreviousTexture(name: string): Texture; - /** - * Switches current and previous textures for the given output name. - * - * @param {string} name - The output name. - */ - toggleTexture(name: string): void; - /** - * Returns the texture node for the given output name. - * - * @param {string} [name='output'] - The output name to get the texture node for. - * @return {TextureNode} The texture node. - */ - getTextureNode(name?: string): TextureNode; - /** - * Returns the previous texture node for the given output name. - * - * @param {string} [name='output'] - The output name to get the previous texture node for. - * @return {TextureNode} The previous texture node. - */ - getPreviousTextureNode(name?: string): TextureNode; - /** - * Returns a viewZ node of this pass. - * - * @param {string} [name='depth'] - The output name to get the viewZ node for. In most cases the default `'depth'` can be used however the parameter exists for custom depth outputs. - * @return {Node} The viewZ node. - */ - getViewZNode(name?: string): Node; - /** - * Returns a linear depth node of this pass. - * - * @param {string} [name='depth'] - The output name to get the linear depth node for. In most cases the default `'depth'` can be used however the parameter exists for custom depth outputs. - * @return {Node} The linear depth node. - */ - getLinearDepthNode(name?: string): Node; - /** - * Precompiles the pass. - * - * Note that this method must be called after the pass configuration is complete. - * So calls like `setMRT()` and `getTextureNode()` must proceed the precompilation. - * - * @async - * @param {Renderer} renderer - The renderer. - * @return {Promise} A Promise that resolves when the compile has been finished. - * @see {@link Renderer#compileAsync} - */ - compileAsync(renderer: Renderer): Promise; - setup({ renderer }: { - renderer: any; - }): Node | TextureNode; - updateBefore(frame: any): void; - /** - * Sets the size of the pass's render target. Honors the pixel ratio. - * - * @param {number} width - The width to set. - * @param {number} height - The height to set. - */ - setSize(width: number, height: number): void; - /** - * This method allows to define the pass's scissor rectangle. By default, the scissor rectangle is kept - * in sync with the pass's dimensions. To reverse the process and use auto-sizing again, call the method - * with `null` as the single argument. - * - * @param {?(number | Vector4)} x - The horizontal coordinate for the lower left corner of the box in logical pixel unit. - * Instead of passing four arguments, the method also works with a single four-dimensional vector. - * @param {number} y - The vertical coordinate for the lower left corner of the box in logical pixel unit. - * @param {number} width - The width of the scissor box in logical pixel unit. - * @param {number} height - The height of the scissor box in logical pixel unit. - */ - setScissor(x: (number | Vector4) | null, y: number, width: number, height: number): void; - /** - * This method allows to define the pass's viewport. By default, the viewport is kept in sync - * with the pass's dimensions. To reverse the process and use auto-sizing again, call the method - * with `null` as the single argument. - * - * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the viewport origin in logical pixel unit. - * @param {number} y - The vertical coordinate for the lower left corner of the viewport origin in logical pixel unit. - * @param {number} width - The width of the viewport in logical pixel unit. - * @param {number} height - The height of the viewport in logical pixel unit. - */ - setViewport(x: number | Vector4, y: number, width: number, height: number): void; - /** - * Sets the pixel ratio the pass's render target and updates the size. - * - * @param {number} pixelRatio - The pixel ratio to set. - */ - setPixelRatio(pixelRatio: number): void; -} -export namespace PassNode { - let COLOR_1: "color"; - export { COLOR_1 as COLOR }; - export let DEPTH: "depth"; -} -import { PerspectiveCamera } from './three.core.js'; -/** - * Represents the lighting model for a phong material. Used in {@link MeshPhongNodeMaterial}. - * - * @augments BasicLightingModel - */ -export class PhongLightingModel extends BasicLightingModel { - /** - * Constructs a new phong lighting model. - * - * @param {boolean} [specular=true] - Whether specular is supported or not. - */ - constructor(specular?: boolean); - /** - * Whether specular is supported or not. Set this to `false` if you are - * looking for a Lambert-like material meaning a material for non-shiny - * surfaces, without specular highlights. - * - * @type {boolean} - * @default true - */ - specular: boolean; - /** - * Implements the direct lighting. The specular portion is optional an can be controlled - * with the {@link PhongLightingModel#specular} flag. - * - * @param {Object} lightData - The light data. - */ - direct({ lightDirection, lightColor, reflectedLight }: Object): void; -} -/** - * Represents the lighting model for a PBR material. - * - * @augments LightingModel - */ -export class PhysicalLightingModel extends LightingModel { - /** - * Constructs a new physical lighting model. - * - * @param {boolean} [clearcoat=false] - Whether clearcoat is supported or not. - * @param {boolean} [sheen=false] - Whether sheen is supported or not. - * @param {boolean} [iridescence=false] - Whether iridescence is supported or not. - * @param {boolean} [anisotropy=false] - Whether anisotropy is supported or not. - * @param {boolean} [transmission=false] - Whether transmission is supported or not. - * @param {boolean} [dispersion=false] - Whether dispersion is supported or not. - */ - constructor(clearcoat?: boolean, sheen?: boolean, iridescence?: boolean, anisotropy?: boolean, transmission?: boolean, dispersion?: boolean); - /** - * Whether clearcoat is supported or not. - * - * @type {boolean} - * @default false - */ - clearcoat: boolean; - /** - * Whether sheen is supported or not. - * - * @type {boolean} - * @default false - */ - sheen: boolean; - /** - * Whether iridescence is supported or not. - * - * @type {boolean} - * @default false - */ - iridescence: boolean; - /** - * Whether anisotropy is supported or not. - * - * @type {boolean} - * @default false - */ - anisotropy: boolean; - /** - * Whether transmission is supported or not. - * - * @type {boolean} - * @default false - */ - transmission: boolean; - /** - * Whether dispersion is supported or not. - * - * @type {boolean} - * @default false - */ - dispersion: boolean; - /** - * The clear coat radiance. - * - * @type {?Node} - * @default null - */ - clearcoatRadiance: Node | null; - /** - * The clear coat specular direct. - * - * @type {?Node} - * @default null - */ - clearcoatSpecularDirect: Node | null; - /** - * The clear coat specular indirect. - * - * @type {?Node} - * @default null - */ - clearcoatSpecularIndirect: Node | null; - /** - * The sheen specular direct. - * - * @type {?Node} - * @default null - */ - sheenSpecularDirect: Node | null; - /** - * The sheen specular indirect. - * - * @type {?Node} - * @default null - */ - sheenSpecularIndirect: Node | null; - /** - * The iridescence Fresnel. - * - * @type {?Node} - * @default null - */ - iridescenceFresnel: Node | null; - /** - * The iridescence F0. - * - * @type {?Node} - * @default null - */ - iridescenceF0: Node | null; - /** - * The iridescence F0 dielectric. - * - * @type {?Node} - * @default null - */ - iridescenceF0Dielectric: Node | null; - /** - * The iridescence F0 metallic. - * - * @type {?Node} - * @default null - */ - iridescenceF0Metallic: Node | null; - computeMultiscattering(singleScatter: any, multiScatter: any, specularF90: any, f0: any, iridescenceF0?: null): void; - /** - * Implements the direct light. - * - * @param {Object} lightData - The light data. - * @param {NodeBuilder} builder - The current node builder. - */ - direct({ lightDirection, lightColor, reflectedLight }: Object): void; - /** - * This method is intended for implementing the direct light term for - * rect area light nodes. - * - * @param {Object} input - The input data. - * @param {NodeBuilder} builder - The current node builder. - */ - directRectArea({ lightColor, lightPosition, halfWidth, halfHeight, reflectedLight, ltc_1, ltc_2 }: Object): void; - /** - * Implements the indirect lighting. - * - * @param {NodeBuilder} builder - The current node builder. - */ - indirect(builder: NodeBuilder): void; - /** - * Implements the indirect diffuse term. - * - * @param {NodeBuilder} builder - The current node builder. - */ - indirectDiffuse(builder: NodeBuilder): void; - /** - * Implements the indirect specular term. - * - * @param {NodeBuilder} builder - The current node builder. - */ - indirectSpecular(builder: NodeBuilder): void; - /** - * Implements the ambient occlusion term. - * - * @param {NodeBuilder} builder - The current node builder. - */ - ambientOcclusion(builder: NodeBuilder): void; - /** - * Used for final lighting accumulations depending on the requested features. - * - * @param {NodeBuilder} builder - The current node builder. - */ - finish({ context }: NodeBuilder): void; -} -import { Plane } from './three.core.js'; -import { PlaneGeometry } from './three.core.js'; -import { PointLight } from './three.core.js'; -/** - * Module for representing point lights as nodes. - * - * @augments AnalyticLightNode - */ -export class PointLightNode extends AnalyticLightNode { - /** - * Constructs a new point light node. - * - * @param {?PointLight} [light=null] - The point light source. - */ - constructor(light?: PointLight | null); - /** - * Uniform node representing the cutoff distance. - * - * @type {UniformNode} - */ - cutoffDistanceNode: UniformNode; - /** - * Uniform node representing the decay exponent. - * - * @type {UniformNode} - */ - decayExponentNode: UniformNode; - /** - * Overwritten to updated point light specific uniforms. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update(frame: NodeFrame): void; - /** - * Overwritten to setup point light specific shadow. - * - * @return {PointShadowNode} - */ - setupShadowNode(): PointShadowNode; - setupDirect(builder: any): { - lightDirection: any; - lightColor: any; - }; -} -/** - * Represents the shadow implementation for point light nodes. - * - * @augments ShadowNode - */ -export class PointShadowNode extends ShadowNode { - /** - * Constructs a new point shadow node. - * - * @param {PointLight} light - The shadow casting point light. - * @param {?PointLightShadow} [shadow=null] - An optional point light shadow. - */ - constructor(light: PointLight, shadow?: PointLightShadow | null); - /** - * Overwrites the default implementation to create a CubeRenderTarget with CubeDepthTexture. - * - * @param {LightShadow} shadow - The light shadow object. - * @param {NodeBuilder} builder - A reference to the current node builder. - * @return {Object} An object containing the shadow map and depth texture. - */ - setupRenderTarget(shadow: LightShadow, builder: NodeBuilder): Object; -} -/** - * A node for representing the uv coordinates of points. - * - * Can only be used with a WebGL backend. In WebGPU, point - * primitives always have the size of one pixel and can thus - * can't be used as sprite-like objects that display textures. - * - * @augments Node - */ -export class PointUVNode extends Node { - /** - * Constructs a new point uv node. - */ - constructor(); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isPointUVNode: boolean; - generate(): string; -} -import { PointsMaterial } from './three.core.js'; -/** - * Node material version of {@link PointsMaterial}. - * - * This material can be used in two ways: - * - * - By rendering point primitives with {@link Points}. Since WebGPU only supports point primitives - * with a pixel size of `1`, it's not possible to define a size. - * - * ```js - * const pointCloud = new THREE.Points( geometry, new THREE.PointsNodeMaterial() ); - * ``` - * - * - By rendering point primitives with {@link Sprites}. In this case, size is honored, - * see {@link PointsNodeMaterial#sizeNode}. - * - * ```js - * const instancedPoints = new THREE.Sprite( new THREE.PointsNodeMaterial( { positionNode: instancedBufferAttribute( positionAttribute ) } ) ); - * ``` - * - * @augments SpriteNodeMaterial - */ -export class PointsNodeMaterial extends SpriteNodeMaterial { - /** - * This node property provides an additional way to set the point size. - * - * Note that WebGPU only supports point primitives with 1 pixel size. Consequently, - * this node has no effect when the material is used with {@link Points} and a WebGPU - * backend. If an application wants to render points with a size larger than 1 pixel, - * the material should be used with {@link Sprite} and instancing. - * - * @type {?Node} - * @default null - */ - sizeNode: Node | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isPointsNodeMaterial: boolean; - setupPositionView(): any; - setupVertexSprite(builder: any): any; - setupVertex(builder: any): any; - _useAlphaToCoverage: any; -} -/** - * @deprecated since r183. Use {@link RenderPipeline} instead. PostProcessing has been renamed to RenderPipeline. - * - * This class is a wrapper for backward compatibility and will be removed in a future version. - */ -export class PostProcessing extends RenderPipeline { - /** - * Constructs a new post processing management module. - * - * @param {Renderer} renderer - A reference to the renderer. - * @param {Node} outputNode - An optional output node. - * @deprecated since r183. Use {@link RenderPipeline} instead. - */ - constructor(renderer: Renderer, outputNode: Node); -} -/** - * A projector light version of {@link SpotLight}. Can only be used with {@link WebGPURenderer}. - * - * @augments SpotLight - */ -export class ProjectorLight extends SpotLight { - /** - * Aspect ratio of the light. Set to `null` to use the texture aspect ratio. - * - * @type {?number} - * @default null - */ - aspect: number | null; - copy(source: any, recursive: any): this; -} -/** - * An implementation of a projector light node. - * - * @augments SpotLightNode - */ -export class ProjectorLightNode extends SpotLightNode { - update(frame: any): void; - /** - * Overwrites the default implementation to compute projection attenuation. - * - * @param {NodeBuilder} builder - The node builder. - * @return {Node} The spot attenuation. - */ - getSpotAttenuation(builder: NodeBuilder): Node; -} -/** - * This class represents a shader property. It can be used - * to explicitly define a property and assign a value to it. - * - * ```js - * const threshold = property( 'float', 'threshold' ).assign( THRESHOLD ); - *``` - * `PropertyNode` is used by the engine to predefined common material properties - * for TSL code. - * - * @augments Node - */ -export class PropertyNode extends Node { - /** - * Constructs a new property node. - * - * @param {string} nodeType - The type of the node. - * @param {?string} [name=null] - The name of the property in the shader. - * @param {boolean} [varying=false] - Whether this property is a varying or not. - */ - constructor(nodeType: string, name?: string | null, varying?: boolean); - /** - * Whether this property is a varying or not. - * - * @type {boolean} - * @default false - */ - varying: boolean; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isPropertyNode: boolean; - getNodeType(builder: any): any; - getHash(builder: any): string; - generate(builder: any): any; -} -/** - * This module is a helper for passes which need to render a full - * screen effect which is quite common in context of post processing. - * - * The intended usage is to reuse a single quad mesh for rendering - * subsequent passes by just reassigning the `material` reference. - * - * Note: This module can only be used with `WebGPURenderer`. - * - * @augments Mesh - */ -export class QuadMesh extends Mesh { - /** - * Constructs a new quad mesh. - * - * @param {?Material} [material=null] - The material to render the quad mesh with. - */ - constructor(material?: Material | null); - /** - * The camera to render the quad mesh with. - * - * @type {OrthographicCamera} - * @readonly - */ - readonly camera: OrthographicCamera; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isQuadMesh: boolean; - /** - * Async version of `render()`. - * - * @async - * @deprecated - * @param {Renderer} renderer - The renderer. - * @return {Promise} A Promise that resolves when the render has been finished. - */ - renderAsync(renderer: Renderer): Promise; - /** - * Renders the quad mesh - * - * @param {Renderer} renderer - The renderer. - */ - render(renderer: Renderer): void; -} -import { Quaternion } from './three.core.js'; -import { R11_EAC_Format } from './three.core.js'; -import { RED_GREEN_RGTC2_Format } from './three.core.js'; -import { RED_RGTC1_Format } from './three.core.js'; -import { REVISION } from './three.core.js'; -import { RG11_EAC_Format } from './three.core.js'; -import { RGBAFormat } from './three.core.js'; -import { RGBAIntegerFormat } from './three.core.js'; -import { RGBA_ASTC_10x10_Format } from './three.core.js'; -import { RGBA_ASTC_10x5_Format } from './three.core.js'; -import { RGBA_ASTC_10x6_Format } from './three.core.js'; -import { RGBA_ASTC_10x8_Format } from './three.core.js'; -import { RGBA_ASTC_12x10_Format } from './three.core.js'; -import { RGBA_ASTC_12x12_Format } from './three.core.js'; -import { RGBA_ASTC_4x4_Format } from './three.core.js'; -import { RGBA_ASTC_5x4_Format } from './three.core.js'; -import { RGBA_ASTC_5x5_Format } from './three.core.js'; -import { RGBA_ASTC_6x5_Format } from './three.core.js'; -import { RGBA_ASTC_6x6_Format } from './three.core.js'; -import { RGBA_ASTC_8x5_Format } from './three.core.js'; -import { RGBA_ASTC_8x6_Format } from './three.core.js'; -import { RGBA_ASTC_8x8_Format } from './three.core.js'; -import { RGBA_BPTC_Format } from './three.core.js'; -import { RGBA_ETC2_EAC_Format } from './three.core.js'; -import { RGBA_PVRTC_2BPPV1_Format } from './three.core.js'; -import { RGBA_PVRTC_4BPPV1_Format } from './three.core.js'; -import { RGBA_S3TC_DXT1_Format } from './three.core.js'; -import { RGBA_S3TC_DXT3_Format } from './three.core.js'; -import { RGBA_S3TC_DXT5_Format } from './three.core.js'; -import { RGBFormat } from './three.core.js'; -import { RGBIntegerFormat } from './three.core.js'; -import { RGB_BPTC_SIGNED_Format } from './three.core.js'; -import { RGB_BPTC_UNSIGNED_Format } from './three.core.js'; -import { RGB_ETC1_Format } from './three.core.js'; -import { RGB_ETC2_Format } from './three.core.js'; -import { RGB_PVRTC_2BPPV1_Format } from './three.core.js'; -import { RGB_PVRTC_4BPPV1_Format } from './three.core.js'; -import { RGB_S3TC_DXT1_Format } from './three.core.js'; -import { RGFormat } from './three.core.js'; -import { RGIntegerFormat } from './three.core.js'; -/** - * `RTTNode` takes another node and uses it with a `QuadMesh` to render into a texture (RTT). - * This module is especially relevant in context of post processing where certain nodes require - * texture input for their effects. With the helper function `convertToTexture()` which is based - * on this module, the node system can automatically ensure texture input if required. - * - * @augments TextureNode - */ -export class RTTNode extends TextureNode { - /** - * Constructs a new RTT node. - * - * @param {Node} node - The node to render a texture with. - * @param {?number} [width=null] - The width of the internal render target. If not width is applied, the render target is automatically resized. - * @param {?number} [height=null] - The height of the internal render target. - * @param {Object} [options={type:HalfFloatType}] - The options for the internal render target. - */ - constructor(node: Node, width?: number | null, height?: number | null, options?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isRTTNode: boolean; - /** - * The node to render a texture with. - * - * @type {Node} - */ - node: Node; - /** - * The width of the internal render target. - * If not width is applied, the render target is automatically resized. - * - * @type {?number} - * @default null - */ - width: number | null; - /** - * The height of the internal render target. - * - * @type {?number} - * @default null - */ - height: number | null; - /** - * The pixel ratio - * - * @type {number} - * @default 1 - */ - pixelRatio: number; - /** - * The render target - * - * @type {RenderTarget} - */ - renderTarget: RenderTarget; - /** - * Whether the texture requires an update or not. - * - * @type {boolean} - * @default true - */ - textureNeedsUpdate: boolean; - /** - * Whether the texture should automatically be updated or not. - * - * @type {boolean} - * @default true - */ - autoUpdate: boolean; - /** - * The node which is used with the quad mesh for RTT. - * - * @private - * @type {Node} - * @default null - */ - private _rttNode; - /** - * The internal quad mesh for RTT. - * - * @private - * @type {QuadMesh} - */ - private _quadMesh; - /** - * Whether the internal render target should automatically be resized or not. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly get autoResize(): boolean; - setup(builder: any): void; - /** - * Sets the size of the internal render target - * - * @param {number} width - The width to set. - * @param {number} height - The width to set. - */ - setSize(width: number, height: number): void; - /** - * Sets the pixel ratio. This will also resize the render target. - * - * @param {number} pixelRatio - The pixel ratio to set. - */ - setPixelRatio(pixelRatio: number): void; - updateBefore({ renderer }: { - renderer: any; - }): void; -} -/** - * `RangeNode` generates random instanced attribute data in a defined range. - * An exemplary use case for this utility node is to generate random per-instance - * colors: - * ```js - * const material = new MeshBasicNodeMaterial(); - * material.colorNode = range( new Color( 0x000000 ), new Color( 0xFFFFFF ) ); - * const mesh = new InstancedMesh( geometry, material, count ); - * ``` - * @augments Node - */ -export class RangeNode extends Node { - /** - * Constructs a new range node. - * - * @param {Node} [minNode=float()] - A node defining the lower bound of the range. - * @param {Node} [maxNode=float()] - A node defining the upper bound of the range. - */ - constructor(minNode?: Node, maxNode?: Node); - /** - * A node defining the lower bound of the range. - * - * @type {Node} - * @default float() - */ - minNode: Node; - /** - * A node defining the upper bound of the range. - * - * @type {Node} - * @default float() - */ - maxNode: Node; - /** - * Returns the vector length which is computed based on the range definition. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {number} The vector length. - */ - getVectorLength(builder: NodeBuilder): number; - /** - * This method is overwritten since the node type is inferred from range definition. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Returns a constant node from the given node by traversing it. - * - * @param {Node} node - The node to traverse. - * @returns {Node} The constant node, if found. - */ - getConstNode(node: Node): Node; - setup(builder: any): any; -} -/** - * A readback buffer is used to transfer data from the GPU to the CPU. - * It is primarily used to read back compute shader results. - * - * @augments EventDispatcher - */ -export class ReadbackBuffer extends EventDispatcher { - /** - * Constructs a new readback buffer. - * - * @param {number} maxByteLength - The maximum size of the buffer to be read back. - */ - constructor(maxByteLength: number); - /** - * Name used for debugging purposes. - * - * @type {string} - */ - name: string; - /** - * The mapped, read back array buffer. - * - * @type {ArrayBuffer|null} - */ - buffer: ArrayBuffer | null; - /** - * The maximum size of the buffer to be read back. - * - * @type {number} - */ - maxByteLength: number; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isReadbackBuffer: boolean; - _mapped: boolean; - /** - * Releases the mapped buffer data so the GPU buffer can be - * used by the GPU again. - * - * Note: Any `ArrayBuffer` data associated with this readback buffer - * are removed and no longer accessible after calling this method. - */ - release(): void; - /** - * Frees internal resources. - */ - dispose(): void; -} -import { RectAreaLight } from './three.core.js'; -/** - * Module for representing rect area lights as nodes. - * - * @augments AnalyticLightNode - */ -export class RectAreaLightNode extends AnalyticLightNode { - /** - * Used to configure the internal BRDF approximation texture data. - * - * @param {RectAreaLightTexturesLib} ltc - The BRDF approximation texture data. - */ - static setLTC(ltc: RectAreaLightTexturesLib): void; - /** - * Constructs a new rect area light node. - * - * @param {?RectAreaLight} [light=null] - The rect area light source. - */ - constructor(light?: RectAreaLight | null); - /** - * Uniform node representing the half height of the are light. - * - * @type {UniformNode} - */ - halfHeight: UniformNode; - /** - * Uniform node representing the half width of the are light. - * - * @type {UniformNode} - */ - halfWidth: UniformNode; - /** - * Overwritten to updated rect area light specific uniforms. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update(frame: NodeFrame): void; - setupDirectRectArea(builder: any): { - lightColor: Node; - lightPosition: any; - halfWidth: any; - halfHeight: any; - ltc_1: TextureNode; - ltc_2: TextureNode; - }; -} -import { RedFormat } from './three.core.js'; -import { RedIntegerFormat } from './three.core.js'; -/** - * Base class for nodes which establishes a reference to a property of another object. - * In this way, the value of the node is automatically linked to the value of - * referenced object. Reference nodes internally represent the linked value - * as a uniform. - * - * @augments Node - */ -export class ReferenceBaseNode extends Node { - /** - * Constructs a new reference base node. - * - * @param {string} property - The name of the property the node refers to. - * @param {string} uniformType - The uniform type that should be used to represent the property value. - * @param {?Object} [object=null] - The object the property belongs to. - * @param {?number} [count=null] - When the linked property is an array-like, this parameter defines its length. - */ - constructor(property: string, uniformType: string, object?: Object | null, count?: number | null); - /** - * The name of the property the node refers to. - * - * @type {string} - */ - property: string; - /** - * The uniform type that should be used to represent the property value. - * - * @type {string} - */ - uniformType: string; - /** - * The object the property belongs to. - * - * @type {?Object} - * @default null - */ - object: Object | null; - /** - * When the linked property is an array, this parameter defines its length. - * - * @type {?number} - * @default null - */ - count: number | null; - /** - * The property name might have dots so nested properties can be referred. - * The hierarchy of the names is stored inside this array. - * - * @type {Array} - */ - properties: Array; - /** - * Points to the current referred object. This property exists next to {@link ReferenceNode#object} - * since the final reference might be updated from calling code. - * - * @type {?Object} - * @default null - */ - reference: Object | null; - /** - * The uniform node that holds the value of the reference node. - * - * @type {UniformNode} - * @default null - */ - node: UniformNode; - /** - * The uniform group of the internal uniform. - * - * @type {UniformGroupNode} - * @default null - */ - group: UniformGroupNode; - /** - * Sets the uniform group for this reference node. - * - * @param {UniformGroupNode} group - The uniform group to set. - * @return {ReferenceBaseNode} A reference to this node. - */ - setGroup(group: UniformGroupNode): ReferenceBaseNode; - /** - * When the referred property is array-like, this method can be used - * to access elements via an index node. - * - * @param {IndexNode} indexNode - indexNode. - * @return {ReferenceElementNode} A reference to an element. - */ - element(indexNode: IndexNode): ReferenceElementNode; - /** - * Sets the node type which automatically defines the internal - * uniform type. - * - * @param {string} uniformType - The type to set. - */ - setNodeType(uniformType: string): void; - /** - * This method is overwritten since the node type is inferred from - * the type of the reference node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Returns the property value from the given referred object. - * - * @param {Object} [object=this.reference] - The object to retrieve the property value from. - * @return {any} The value. - */ - getValueFromReference(object?: Object): any; - /** - * Allows to update the reference based on the given state. The state is only - * evaluated {@link ReferenceBaseNode#object} is not set. - * - * @param {(NodeFrame|NodeBuilder)} state - The current state. - * @return {Object} The updated reference. - */ - updateReference(state: (NodeFrame | NodeBuilder)): Object; - /** - * The output of the reference node is the internal uniform node. - * - * @return {UniformNode} The output node. - */ - setup(): UniformNode; - /** - * Overwritten to update the internal uniform value. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update(): void; - /** - * Retrieves the value from the referred object property and uses it - * to updated the internal uniform. - */ - updateValue(): void; -} -/** - * This type of node establishes a reference to a property of another object. - * In this way, the value of the node is automatically linked to the value of - * referenced object. Reference nodes internally represent the linked value - * as a uniform. - * - * @augments Node - */ -export class ReferenceNode extends Node { - /** - * Constructs a new reference node. - * - * @param {string} property - The name of the property the node refers to. - * @param {string} uniformType - The uniform type that should be used to represent the property value. - * @param {?Object} [object=null] - The object the property belongs to. - * @param {?number} [count=null] - When the linked property is an array-like, this parameter defines its length. - */ - constructor(property: string, uniformType: string, object?: Object | null, count?: number | null); - /** - * The name of the property the node refers to. - * - * @type {string} - */ - property: string; - /** - * The uniform type that should be used to represent the property value. - * - * @type {string} - */ - uniformType: string; - /** - * The object the property belongs to. - * - * @type {?Object} - * @default null - */ - object: Object | null; - /** - * When the linked property is an array, this parameter defines its length. - * - * @type {?number} - * @default null - */ - count: number | null; - /** - * The property name might have dots so nested properties can be referred. - * The hierarchy of the names is stored inside this array. - * - * @type {Array} - */ - properties: Array; - /** - * Points to the current referred object. This property exists next to {@link ReferenceNode#object} - * since the final reference might be updated from calling code. - * - * @type {?Object} - * @default null - */ - reference: Object | null; - /** - * The uniform node that holds the value of the reference node. - * - * @type {UniformNode} - * @default null - */ - node: UniformNode; - /** - * The uniform group of the internal uniform. - * - * @type {UniformGroupNode} - * @default null - */ - group: UniformGroupNode; - /** - * When the referred property is array-like, this method can be used - * to access elements via an index node. - * - * @param {IndexNode} indexNode - indexNode. - * @return {ReferenceElementNode} A reference to an element. - */ - element(indexNode: IndexNode): ReferenceElementNode; - /** - * Sets the uniform group for this reference node. - * - * @param {UniformGroupNode} group - The uniform group to set. - * @return {ReferenceNode} A reference to this node. - */ - setGroup(group: UniformGroupNode): ReferenceNode; - /** - * Sets the name for the internal uniform. - * - * @param {string} name - The label to set. - * @return {ReferenceNode} A reference to this node. - */ - setName(name: string): ReferenceNode; - /** - * Sets the label for the internal uniform. - * - * @deprecated - * @param {string} name - The label to set. - * @return {ReferenceNode} A reference to this node. - */ - label(name: string): ReferenceNode; - /** - * Sets the node type which automatically defines the internal - * uniform type. - * - * @param {string} uniformType - The type to set. - */ - setNodeType(uniformType: string): void; - /** - * This method is overwritten since the node type is inferred from - * the type of the reference node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Returns the property value from the given referred object. - * - * @param {Object} [object=this.reference] - The object to retrieve the property value from. - * @return {any} The value. - */ - getValueFromReference(object?: Object): any; - /** - * Allows to update the reference based on the given state. The state is only - * evaluated {@link ReferenceNode#object} is not set. - * - * @param {(NodeFrame|NodeBuilder)} state - The current state. - * @return {Object} The updated reference. - */ - updateReference(state: (NodeFrame | NodeBuilder)): Object; - /** - * The output of the reference node is the internal uniform node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {UniformNode} The output node. - */ - setup(): UniformNode; - /** - * Overwritten to update the internal uniform value. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update(): void; - /** - * Retrieves the value from the referred object property and uses it - * to updated the internal uniform. - */ - updateValue(): void; -} -/** - * This node can be used to implement mirror-like flat reflective surfaces. - * - * ```js - * const groundReflector = reflector(); - * material.colorNode = groundReflector; - * - * const plane = new Mesh( geometry, material ); - * plane.add( groundReflector.target ); - * ``` - * - * @augments TextureNode - */ -export class ReflectorNode extends TextureNode { - /** - * Constructs a new reflector node. - * - * @param {Object} [parameters={}] - An object holding configuration parameters. - * @param {Object3D} [parameters.target=new Object3D()] - The 3D object the reflector is linked to. - * @param {number} [parameters.resolutionScale=1] - The resolution scale. - * @param {boolean} [parameters.generateMipmaps=false] - Whether mipmaps should be generated or not. - * @param {boolean} [parameters.bounces=true] - Whether reflectors can render other reflector nodes or not. - * @param {boolean} [parameters.depth=false] - Whether depth data should be generated or not. - * @param {number} [parameters.samples] - Anti-Aliasing samples of the internal render-target. - * @param {TextureNode} [parameters.defaultTexture] - The default texture node. - * @param {ReflectorBaseNode} [parameters.reflector] - The reflector base node. - */ - constructor(parameters?: { - target?: Object3D | undefined; - resolutionScale?: number | undefined; - generateMipmaps?: boolean | undefined; - bounces?: boolean | undefined; - depth?: boolean | undefined; - samples?: number | undefined; - defaultTexture?: TextureNode | undefined; - reflector?: ReflectorBaseNode | undefined; - }); - /** - * A reference to the internal reflector base node which holds the actual implementation. - * - * @private - * @type {ReflectorBaseNode} - * @default ReflectorBaseNode - */ - private _reflectorBaseNode; - /** - * A reference to the internal depth node. - * - * @private - * @type {?Node} - * @default null - */ - private _depthNode; - /** - * A reference to the internal reflector node. - * - * @type {ReflectorBaseNode} - */ - get reflector(): ReflectorBaseNode; - /** - * A reference to 3D object the reflector is linked to. - * - * @type {Object3D} - */ - get target(): Object3D; - /** - * Returns a node representing the mirror's depth. That can be used - * to implement more advanced reflection effects like distance attenuation. - * - * @return {Node} The depth node. - */ - getDepthNode(): Node; - setup(builder: any): void; - clone(): any; -} -import { ReinhardToneMapping } from './three.core.js'; -/** - * Normally, tone mapping and color conversion happens automatically just - * before outputting a pixel to the default (screen) framebuffer. In certain - * post processing setups this is too late because some effects such as FXAA - * require e.g. sRGB input. For such scenarios, `RenderOutputNode` can be used - * to apply tone mapping and color space conversion at an arbitrary point - * in the effect chain. - * - * When applying tone mapping and color space conversion manually with this node, - * you have to set {@link RenderPipeline#outputColorTransform} to `false`. - * - * ```js - * const postProcessing = new RenderPipeline( renderer ); - * postProcessing.outputColorTransform = false; - * - * const scenePass = pass( scene, camera ); - * const outputPass = renderOutput( scenePass ); - * - * postProcessing.outputNode = outputPass; - * ``` - * - * @augments TempNode - */ -export class RenderOutputNode extends TempNode { - /** - * Constructs a new render output node. - * - * @param {Node} colorNode - The color node to process. - * @param {?number} toneMapping - The tone mapping type. - * @param {?string} outputColorSpace - The output color space. - */ - constructor(colorNode: Node, toneMapping: number | null, outputColorSpace: string | null); - /** - * The color node to process. - * - * @type {Node} - */ - colorNode: Node; - /** - * The tone mapping type. - * - * @private - * @type {?number} - */ - private _toneMapping; - /** - * The output color space. - * - * @type {?string} - */ - outputColorSpace: string | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isRenderOutputNode: boolean; - /** - * Sets the tone mapping type. - * - * @param {number} value - The tone mapping type. - * @return {ToneMappingNode} A reference to this node. - */ - setToneMapping(value: number): ToneMappingNode; - /** - * Gets the tone mapping type. - * - * @returns {number} The tone mapping type. - */ - getToneMapping(): number; - setup({ context }: { - context: any; - }): Node; -} -/** - * This module is responsible to manage the rendering pipeline setups in apps. - * You usually create a single instance of this class and use it to define - * the output of your render pipeline and post processing effect chain. - * ```js - * const renderPipeline = new RenderPipeline( renderer ); - * - * const scenePass = pass( scene, camera ); - * - * renderPipeline.outputNode = scenePass; - * ``` - * - * Note: This module can only be used with `WebGPURenderer`. - */ -export class RenderPipeline { - /** - * Constructs a new render pipeline management module. - * - * @param {Renderer} renderer - A reference to the renderer. - * @param {Node} outputNode - An optional output node. - */ - constructor(renderer: Renderer, outputNode?: Node); - /** - * A reference to the renderer. - * - * @type {Renderer} - */ - renderer: Renderer; - /** - * A node which defines the final output of the rendering - * pipeline. This is usually the last node in a chain - * of effect nodes. - * - * @type {Node} - */ - outputNode: Node; - /** - * Whether the default output tone mapping and color - * space transformation should be enabled or not. - * - * This is enabled by default but it must be disabled for - * effects that expect to be executed after tone mapping and color - * space conversion. A typical example is FXAA which - * requires sRGB input. - * - * When set to `false`, the app must control the output - * transformation with `RenderOutputNode`. - * - * ```js - * const outputPass = renderOutput( scenePass ); - * ``` - * - * @type {boolean} - */ - outputColorTransform: boolean; - /** - * Must be set to `true` when the output node changes. - * - * @type {Node} - */ - needsUpdate: Node; - /** - * The full screen quad that is used to render - * the effects. - * - * @private - * @type {QuadMesh} - */ - private _quadMesh; - /** - * The context of the render pipeline stack. - * - * @private - * @type {?Object} - * @default null - */ - private _context; - /** - * The current tone mapping. - * - * @private - * @type {ToneMapping} - */ - private _toneMapping; - /** - * The current output color space. - * - * @private - * @type {ColorSpace} - */ - private _outputColorSpace; - /** - * When `RenderPipeline` is used to apply rendering pipeline and post processing effects, - * the application must use this version of `render()` inside - * its animation loop (not the one from the renderer). - */ - render(): void; - /** - * Returns the current context of the render pipeline stack. - * - * @readonly - * @type {?Object} - */ - readonly get context(): Object | null; - /** - * Frees internal resources. - */ - dispose(): void; - /** - * Updates the state of the module. - * - * @private - */ - private _update; - /** - * When `RenderPipeline` is used to apply rendering pipeline and post processing effects, - * the application must use this version of `renderAsync()` inside - * its animation loop (not the one from the renderer). - * - * @async - * @deprecated - * @return {Promise} A Promise that resolves when the render has been finished. - */ - renderAsync(): Promise; -} -import { RenderTarget } from './three.core.js'; -/** - * This node is a special type of reference node which is intended - * for linking renderer properties with node values. - * ```js - * const exposureNode = rendererReference( 'toneMappingExposure', 'float', renderer ); - * ``` - * When changing `renderer.toneMappingExposure`, the node value of `exposureNode` will - * automatically be updated. - * - * @augments ReferenceBaseNode - */ -export class RendererReferenceNode extends ReferenceBaseNode { - /** - * Constructs a new renderer reference node. - * - * @param {string} property - The name of the property the node refers to. - * @param {string} inputType - The uniform type that should be used to represent the property value. - * @param {?Renderer} [renderer=null] - The renderer the property belongs to. When no renderer is set, - * the node refers to the renderer of the current state. - */ - constructor(property: string, inputType: string, renderer?: Renderer | null); - /** - * The renderer the property belongs to. When no renderer is set, - * the node refers to the renderer of the current state. - * - * @type {?Renderer} - * @default null - */ - renderer: Renderer | null; -} -export var RendererUtils: Readonly<{ - __proto__: null; - resetRendererAndSceneState: typeof resetRendererAndSceneState; - resetRendererState: typeof resetRendererState; - resetSceneState: typeof resetSceneState; - restoreRendererAndSceneState: typeof restoreRendererAndSceneState; - restoreRendererState: typeof restoreRendererState; - restoreSceneState: typeof restoreSceneState; - saveRendererAndSceneState: typeof saveRendererAndSceneState; - saveRendererState: typeof saveRendererState; - saveSceneState: typeof saveSceneState; -}>; -import { RepeatWrapping } from './three.core.js'; -import { ReplaceStencilOp } from './three.core.js'; -import { ReverseSubtractEquation } from './three.core.js'; -/** - * Applies a rotation to the given position node. - * - * @augments TempNode - */ -export class RotateNode extends TempNode { - /** - * Constructs a new rotate node. - * - * @param {Node} positionNode - The position node. - * @param {Node} rotationNode - Represents the rotation that is applied to the position node. Depending - * on whether the position data are 2D or 3D, the rotation is expressed a single float value or an Euler value. - */ - constructor(positionNode: Node, rotationNode: Node); - /** - * The position node. - * - * @type {Node} - */ - positionNode: Node; - /** - * Represents the rotation that is applied to the position node. - * Depending on whether the position data are 2D or 3D, the rotation is expressed a single float value or an Euler value. - * - * @type {Node} - */ - rotationNode: Node; - /** - * The type of the {@link RotateNode#positionNode} defines the node's type. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node's type. - */ - generateNodeType(builder: NodeBuilder): string; - setup(builder: any): any; -} -import { SIGNED_R11_EAC_Format } from './three.core.js'; -import { SIGNED_RED_GREEN_RGTC2_Format } from './three.core.js'; -import { SIGNED_RED_RGTC1_Format } from './three.core.js'; -import { SIGNED_RG11_EAC_Format } from './three.core.js'; -import { SRGBColorSpace } from './three.core.js'; -import { SRGBTransfer } from './three.core.js'; -/** - * Class representing a node that samples a value using a provided callback function. - * - * @extends Node - */ -export class SampleNode extends Node { - /** - * Creates an instance of SampleNode. - * - * @param {Function} callback - The function to be called when sampling. Should accept a UV node and return a value. - * @param {?Node} [uvNode=null] - The UV node to be used in the texture sampling. - */ - constructor(callback: Function, uvNode?: Node | null); - callback: Function; - /** - * Represents the texture coordinates. - * - * @type {?Node} - * @default null - */ - uvNode: Node | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSampleNode: boolean; - /** - * Sets up the node by sampling with the default UV accessor. - * - * @returns {Node} The result of the callback function when called with the UV node. - */ - setup(): Node; - /** - * Calls the callback function with the provided UV node. - * - * @param {Node} uv - The UV node or value to be passed to the callback. - * @returns {Node} The result of the callback function. - */ - sample(uv: Node): Node; -} -import { Scene } from './three.core.js'; -/** - * This node provides a collection of screen related metrics. - * Depending on {@link ScreenNode#scope}, the nodes can represent - * resolution or viewport data as well as fragment or uv coordinates. - * - * @augments Node - */ -export class ScreenNode extends Node { - /** - * Constructs a new screen node. - * - * @param {('coordinate'|'viewport'|'size'|'uv'|'dpr')} scope - The node's scope. - */ - constructor(scope: ("coordinate" | "viewport" | "size" | "uv" | "dpr")); - /** - * The node represents different metric depending on which scope is selected. - * - * - `ScreenNode.COORDINATE`: Window-relative coordinates of the current fragment according to WebGPU standards. - * - `ScreenNode.VIEWPORT`: The current viewport defined as a four-dimensional vector. - * - `ScreenNode.SIZE`: The dimensions of the current bound framebuffer. - * - `ScreenNode.UV`: Normalized coordinates. - * - `ScreenNode.DPR`: Device pixel ratio. - * - * @type {('coordinate'|'viewport'|'size'|'uv'|'dpr')} - */ - scope: ("coordinate" | "viewport" | "size" | "uv" | "dpr"); - /** - * This output node. - * - * @private - * @type {?Node} - * @default null - */ - private _output; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isViewportNode: boolean; - /** - * This method is overwritten since the node type depends on the selected scope. - * - * @return {('float'|'vec2'|'vec4')} The node type. - */ - generateNodeType(): ("float" | "vec2" | "vec4"); - /** - * `ScreenNode` implements {@link Node#update} to retrieve viewport and size information - * from the current renderer. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update({ renderer }: NodeFrame): void; - setup(): any; - generate(builder: any): any; -} -export namespace ScreenNode { - let COORDINATE: string; - let VIEWPORT: string; - let SIZE: string; - let UV: string; - let DPR: string; -} -/** - * This module is part of the TSL core and usually not used in app level code. - * `SetNode` represents a set operation which means it is used to implement any - * `setXYZW()`, `setRGBA()` and `setSTPQ()` method invocations on node objects. - * For example: - * ```js - * materialLine.colorNode = color( 0, 0, 0 ).setR( float( 1 ) ); - * ``` - * - * @augments TempNode - */ -export class SetNode extends TempNode { - /** - * Constructs a new set node. - * - * @param {Node} sourceNode - The node that should be updated. - * @param {string} components - The components that should be updated. - * @param {Node} targetNode - The value node. - */ - constructor(sourceNode: Node, components: string, targetNode: Node); - /** - * The node that should be updated. - * - * @type {Node} - */ - sourceNode: Node; - /** - * The components that should be updated. - * - * @type {string} - */ - components: string; - /** - * The value node. - * - * @type {Node} - */ - targetNode: Node; - /** - * This method is overwritten since the node type is inferred from {@link SetNode#sourceNode}. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - generate(builder: any): string; -} -/** - * Base class for all shadow nodes. - * - * Shadow nodes encapsulate shadow related logic and are always coupled to lighting nodes. - * Lighting nodes might share the same shadow node type or use specific ones depending on - * their requirements. - * - * @augments Node - */ -export class ShadowBaseNode extends Node { - /** - * Constructs a new shadow base node. - * - * @param {Light} light - The shadow casting light. - */ - constructor(light: Light); - /** - * The shadow casting light. - * - * @type {Light} - */ - light: Light; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isShadowBaseNode: boolean; - /** - * Setups the shadow position node which is by default the predefined TSL node object `shadowPositionWorld`. - * - * @param {NodeBuilder} object - A configuration object that must at least hold a material reference. - */ - setupShadowPosition({ context, material }: NodeBuilder): void; -} -import { ShadowMaterial } from './three.core.js'; -/** - * Represents the default shadow implementation for lighting nodes. - * - * @augments ShadowBaseNode - */ -export class ShadowNode extends ShadowBaseNode { - /** - * Constructs a new shadow node. - * - * @param {Light} light - The shadow casting light. - * @param {?LightShadow} [shadow=null] - An optional light shadow. - */ - constructor(light: Light, shadow?: LightShadow | null); - /** - * The light shadow which defines the properties light's - * shadow. - * - * @type {?LightShadow} - * @default null - */ - shadow: LightShadow | null; - /** - * A reference to the shadow map which is a render target. - * - * @type {?RenderTarget} - * @default null - */ - shadowMap: RenderTarget | null; - /** - * Only relevant for VSM shadows. Render target for the - * first VSM render pass. - * - * @type {?RenderTarget} - * @default null - */ - vsmShadowMapVertical: RenderTarget | null; - /** - * Only relevant for VSM shadows. Render target for the - * second VSM render pass. - * - * @type {?RenderTarget} - * @default null - */ - vsmShadowMapHorizontal: RenderTarget | null; - /** - * Only relevant for VSM shadows. Node material which - * is used to render the first VSM pass. - * - * @type {?NodeMaterial} - * @default null - */ - vsmMaterialVertical: NodeMaterial | null; - /** - * Only relevant for VSM shadows. Node material which - * is used to render the second VSM pass. - * - * @type {?NodeMaterial} - * @default null - */ - vsmMaterialHorizontal: NodeMaterial | null; - /** - * A reference to the output node which defines the - * final result of this shadow node. - * - * @type {?Node} - * @private - * @default null - */ - private _node; - /** - * The current shadow map type of this shadow node. - * - * @type {?number} - * @private - * @default null - */ - private _currentShadowType; - /** - * A Weak Map holding the current frame ID per camera. Used - * to control the update of shadow maps. - * - * @type {WeakMap} - * @private - */ - private _cameraFrameId; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isShadowNode: boolean; - /** - * This index can be used when overriding setupRenderTarget with a RenderTarget Array to specify the depth layer. - * - * @type {number} - * @readonly - * @default true - */ - readonly depthLayer: number; - /** - * Setups the shadow filtering. - * - * @param {NodeBuilder} builder - A reference to the current node builder. - * @param {Object} inputs - A configuration object that defines the shadow filtering. - * @param {Function} inputs.filterFn - This function defines the filtering type of the shadow map e.g. PCF. - * @param {DepthTexture} inputs.depthTexture - A reference to the shadow map's texture data. - * @param {Node} inputs.shadowCoord - Shadow coordinates which are used to sample from the shadow map. - * @param {LightShadow} inputs.shadow - The light shadow. - * @return {Node} The result node of the shadow filtering. - */ - setupShadowFilter(builder: NodeBuilder, { filterFn, depthTexture, shadowCoord, shadow, depthLayer }: { - filterFn: Function; - depthTexture: DepthTexture; - shadowCoord: Node; - shadow: LightShadow; - }): Node; - /** - * Setups the shadow coordinates. - * - * @param {NodeBuilder} builder - A reference to the current node builder. - * @param {Node} shadowPosition - A node representing the shadow position. - * @return {Node} The shadow coordinates. - */ - setupShadowCoord(builder: NodeBuilder, shadowPosition: Node): Node; - /** - * Returns the shadow filtering function for the given shadow type. - * - * @param {number} type - The shadow type. - * @return {Function} The filtering function. - */ - getShadowFilterFn(type: number): Function; - setupRenderTarget(shadow: any, builder: any): { - shadowMap: any; - depthTexture: DepthTexture; - }; - /** - * Setups the shadow output node. - * - * @param {NodeBuilder} builder - A reference to the current node builder. - * @return {Node} The shadow output node. - */ - setupShadow(builder: NodeBuilder): Node; - /** - * The implementation performs the setup of the output node. An output is only - * produces if shadow mapping is globally enabled in the renderer. - * - * @param {NodeBuilder} builder - A reference to the current node builder. - * @return {ShaderCallNodeInternal} The output node. - */ - setup(builder: NodeBuilder): ShaderCallNodeInternal; - /** - * Renders the shadow. The logic of this function could be included - * into {@link ShadowNode#updateShadow} however more specialized shadow - * nodes might require a custom shadow map rendering. By having a - * dedicated method, it's easier to overwrite the default behavior. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - renderShadow(frame: NodeFrame): void; - /** - * Updates the shadow. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - updateShadow(frame: NodeFrame): void; - _depthVersionCached: number | undefined; - /** - * For VSM additional render passes are required. - * - * @param {Renderer} renderer - A reference to the current renderer. - */ - vsmPass(renderer: Renderer): void; - /** - * Resets the resouce state of this shadow node. - * - * @private - */ - private _reset; - /** - * The implementation performs the update of the shadow map if necessary. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - updateBefore(frame: NodeFrame): void; -} -/** - * Node material version of {@link ShadowMaterial}. - * - * @augments NodeMaterial - */ -export class ShadowNodeMaterial extends NodeMaterial { - /** - * Constructs a new shadow node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isShadowNodeMaterial: boolean; - /** - * Setups the lighting model. - * - * @return {ShadowMaskModel} The lighting model. - */ - setupLightingModel(): ShadowMaskModel; -} -import { ShortType } from './three.core.js'; -/** - * This node implements the vertex transformation shader logic which is required - * for skinning/skeletal animation. - * - * @augments Node - */ -export class SkinningNode extends Node { - /** - * Constructs a new skinning node. - * - * @param {SkinnedMesh} skinnedMesh - The skinned mesh. - */ - constructor(skinnedMesh: SkinnedMesh); - /** - * The skinned mesh. - * - * @type {SkinnedMesh} - */ - skinnedMesh: SkinnedMesh; - /** - * The skin index attribute. - * - * @type {AttributeNode} - */ - skinIndexNode: AttributeNode; - /** - * The skin weight attribute. - * - * @type {AttributeNode} - */ - skinWeightNode: AttributeNode; - /** - * The bind matrix node. - * - * @type {Node} - */ - bindMatrixNode: Node; - /** - * The bind matrix inverse node. - * - * @type {Node} - */ - bindMatrixInverseNode: Node; - /** - * The bind matrices as a uniform buffer node. - * - * @type {Node} - */ - boneMatricesNode: Node; - /** - * The current vertex position in local space. - * - * @type {Node} - */ - positionNode: Node; - /** - * The result of vertex position in local space. - * - * @type {Node} - */ - toPositionNode: Node; - /** - * The previous bind matrices as a uniform buffer node. - * Required for computing motion vectors. - * - * @type {?Node} - * @default null - */ - previousBoneMatricesNode: Node | null; - /** - * Transforms the given vertex position via skinning. - * - * @param {Node} [boneMatrices=this.boneMatricesNode] - The bone matrices - * @param {Node} [position=this.positionNode] - The vertex position in local space. - * @return {Node} The transformed vertex position. - */ - getSkinnedPosition(boneMatrices?: Node, position?: Node): Node; - /** - * Transforms the given vertex normal and tangent via skinning. - * - * @param {Node} [boneMatrices=this.boneMatricesNode] - The bone matrices - * @param {Node} [normal=normalLocal] - The vertex normal in local space. - * @param {Node} [tangent=tangentLocal] - The vertex tangent in local space. - * @return {{skinNormal: Node, skinTangent:Node}} The transformed vertex normal and tangent. - */ - getSkinnedNormalAndTangent(boneMatrices?: Node, normal?: Node, tangent?: Node): { - skinNormal: Node; - skinTangent: Node; - }; - /** - * Computes the transformed/skinned vertex position of the previous frame. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The skinned position from the previous frame. - */ - getPreviousSkinnedPosition(builder: NodeBuilder): Node; - /** - * Setups the skinning node by assigning the transformed vertex data to predefined node variables. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The transformed vertex position. - */ - setup(builder: NodeBuilder): Node; - /** - * Generates the code snippet of the skinning node. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} output - The current output. - * @return {string} The generated code snippet. - */ - generate(builder: NodeBuilder, output: string): string; - /** - * Updates the state of the skinned mesh by updating the skeleton once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - update(frame: NodeFrame): void; -} -import { Sphere } from './three.core.js'; -import { SphereGeometry } from './three.core.js'; -/** - * This module is part of the TSL core and usually not used in app level code. - * `SplitNode` represents a property access operation which means it is - * used to implement any `.xyzw`, `.rgba` and `stpq` usage on node objects. - * For example: - * ```js - * const redValue = color.r; - * ``` - * - * @augments Node - */ -export class SplitNode extends Node { - /** - * Constructs a new split node. - * - * @param {Node} node - The node that should be accessed. - * @param {string} [components='x'] - The components that should be accessed. - */ - constructor(node: Node, components?: string); - /** - * The node that should be accessed. - * - * @type {Node} - */ - node: Node; - /** - * The components that should be accessed. - * - * @type {string} - */ - components: string; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSplitNode: boolean; - /** - * Returns the vector length which is computed based on the requested components. - * - * @return {number} The vector length. - */ - getVectorLength(): number; - /** - * Returns the component type of the node's type. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The component type. - */ - getComponentType(builder: NodeBuilder): string; - /** - * This method is overwritten since the node type is inferred from requested components. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - generate(builder: any, output: any): any; - serialize(data: any): void; - deserialize(data: any): void; -} -import { SpotLight } from './three.core.js'; -/** - * Module for representing spot lights as nodes. - * - * @augments AnalyticLightNode - */ -export class SpotLightNode extends AnalyticLightNode { - /** - * Constructs a new spot light node. - * - * @param {?SpotLight} [light=null] - The spot light source. - */ - constructor(light?: SpotLight | null); - /** - * Uniform node representing the cone cosine. - * - * @type {UniformNode} - */ - coneCosNode: UniformNode; - /** - * Uniform node representing the penumbra cosine. - * - * @type {UniformNode} - */ - penumbraCosNode: UniformNode; - /** - * Uniform node representing the cutoff distance. - * - * @type {UniformNode} - */ - cutoffDistanceNode: UniformNode; - /** - * Uniform node representing the decay exponent. - * - * @type {UniformNode} - */ - decayExponentNode: UniformNode; - /** - * Overwritten to updated spot light specific uniforms. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update(frame: NodeFrame): void; - /** - * Computes the spot attenuation for the given angle. - * - * @param {NodeBuilder} builder - The node builder. - * @param {Node} angleCosine - The angle to compute the spot attenuation for. - * @return {Node} The spot attenuation. - */ - getSpotAttenuation(builder: NodeBuilder, angleCosine: Node): Node; - getLightCoord(builder: any): any; - setupDirect(builder: any): { - lightColor: any; - lightDirection: any; - }; -} -import { SpriteMaterial } from './three.core.js'; -/** - * Node material version of {@link SpriteMaterial}. - * - * @augments NodeMaterial - */ -export class SpriteNodeMaterial extends NodeMaterial { - /** - * Constructs a new sprite node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSpriteNodeMaterial: boolean; - _useSizeAttenuation: boolean; - /** - * The rotation of sprite materials is by default inferred from the `rotation`, - * property. This node property allows to overwrite the default and define - * the rotation with a node instead. - * - * If you don't want to overwrite the rotation but modify the existing - * value instead, use {@link materialRotation}. - * - * @type {?Node} - * @default null - */ - rotationNode: Node | null; - /** - * This node property provides an additional way to scale sprites next to - * `Object3D.scale`. The scale transformation based in `Object3D.scale` - * is multiplied with the scale value of this node in the vertex shader. - * - * @type {?Node} - * @default null - */ - scaleNode: Node | null; - /** - * Setups the position node in view space. This method implements - * the sprite specific vertex shader. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The position in view space. - */ - setupPositionView(builder: NodeBuilder): Node; - copy(source: any): NodeMaterial; - set sizeAttenuation(value: boolean); - /** - * Whether to use size attenuation or not. - * - * @type {boolean} - * @default true - */ - get sizeAttenuation(): boolean; -} -import { SrcAlphaFactor } from './three.core.js'; -import { SrcAlphaSaturateFactor } from './three.core.js'; -import { SrcColorFactor } from './three.core.js'; -/** - * Stack is a helper for Nodes that need to produce stack-based code instead of continuous flow. - * They are usually needed in cases like `If`, `Else`. - * - * @augments Node - */ -export class StackNode extends Node { - /** - * Constructs a new stack node. - * - * @param {?StackNode} [parent=null] - The parent stack node. - */ - constructor(parent?: StackNode | null); - /** - * List of nodes. - * - * @type {Array} - */ - nodes: Array; - /** - * The output node. - * - * @type {?Node} - * @default null - */ - outputNode: Node | null; - /** - * The parent stack node. - * - * @type {?StackNode} - * @default null - */ - parent: StackNode | null; - /** - * The current conditional node. - * - * @private - * @type {ConditionalNode} - * @default null - */ - private _currentCond; - /** - * The expression node. Only - * relevant for Switch/Case. - * - * @private - * @type {Node} - * @default null - */ - private _expressionNode; - /** - * The current node being processed. - * - * @private - * @type {Node} - * @default null - */ - private _currentNode; - /** - * Stores additional data for nodes that are added to the stack. - * - * @private - * @type {Map} - */ - private _nodeDataLibrary; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStackNode: boolean; - getElementType(builder: any): string; - generateNodeType(builder: any): string; - getMemberType(builder: any, name: any): string; - /** - * Adds a node to this stack. - * - * @param {Node} node - The node to add. - * @param {number} [index=-1] - The index of the node. If not specified, the node will be added to the end of the stack. - * @return {StackNode} A reference to this stack node. - */ - addToStack(node: Node, index?: number): StackNode; - /** - * Adds a node to the stack before the current node. - * - * @param {Node} node - The node to add. - * @return {StackNode} A reference to this stack node. - */ - addToStackBefore(node: Node): StackNode; - /** - * Represent an `if` statement in TSL. - * - * @param {Node} boolNode - Represents the condition. - * @param {Function} method - TSL code which is executed if the condition evaluates to `true`. - * @return {StackNode} A reference to this stack node. - */ - If(boolNode: Node, method: Function): StackNode; - /** - * Represent an `elseif` statement in TSL. - * - * @param {Node} boolNode - Represents the condition. - * @param {Function} method - TSL code which is executed if the condition evaluates to `true`. - * @return {StackNode} A reference to this stack node. - */ - ElseIf(boolNode: Node, method: Function): StackNode; - /** - * Represent an `else` statement in TSL. - * - * @param {Function} method - TSL code which is executed in the `else` case. - * @return {StackNode} A reference to this stack node. - */ - Else(method: Function): StackNode; - /** - * Represents a `switch` statement in TSL. - * - * @param {any} expression - Represents the expression. - * @param {Function} method - TSL code which is executed if the condition evaluates to `true`. - * @return {StackNode} A reference to this stack node. - */ - Switch(expression: any): StackNode; - /** - * Represents a `case` statement in TSL. The TSL version accepts an arbitrary numbers of values. - * The last parameter must be the callback method that should be executed in the `true` case. - * - * @param {...any} params - The values of the `Case()` statement as well as the callback method. - * @return {StackNode} A reference to this stack node. - */ - Case(...params: any[]): StackNode; - /** - * Represents the default code block of a Switch/Case statement. - * - * @param {Function} method - TSL code which is executed in the `else` case. - * @return {StackNode} A reference to this stack node. - */ - Default(method: Function): StackNode; - setup(builder: any): any; - build(builder: any, ...params: any[]): string | Node | null | undefined; -} -/** - * Class representing a stack trace for debugging purposes. - */ -export class StackTrace { - /** - * Creates a StackTrace instance by capturing and filtering the current stack trace. - * - * @param {Error|string|null} stackMessage - An optional stack trace to use instead of capturing a new one. - */ - constructor(stackMessage?: Error | string | null); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStackTrace: boolean; - /** - * The stack trace. - * - * @type {Array<{fn: string, file: string, line: number, column: number}>} - */ - stack: Array<{ - fn: string; - file: string; - line: number; - column: number; - }>; - /** - * Returns a formatted location string of the top stack frame. - * - * @returns {string} The formatted stack trace message. - */ - getLocation(): string; - /** - * Returns the full error message including the stack trace. - * - * @param {string} message - The error message. - * @returns {string} The full error message with stack trace. - */ - getError(message: string): string; -} -import { StaticDrawUsage } from './three.core.js'; -/** - * This special type of texture is intended for compute shaders. - * It can be used to compute the data of a texture with a compute shader. - * - * Note: This type of texture can only be used with `WebGPURenderer` - * and a WebGPU backend. - * - * @augments Texture - */ -export class Storage3DTexture extends Texture { - /** - * Constructs a new storage texture. - * - * @param {number} [width=1] - The storage texture's width. - * @param {number} [height=1] - The storage texture's height. - * @param {number} [depth=1] - The storage texture's depth. - */ - constructor(width?: number, height?: number, depth?: number); - isArrayTexture: boolean; - /** - * This defines how the texture is wrapped in the depth direction and corresponds to - * *W* in UVW mapping. - * - * @type {number} - */ - wrapR: number; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStorageTexture: boolean; - /** - * Indicates whether this texture is a 3D texture. - * - * @type {boolean} - * - */ - is3DTexture: boolean; - /** - * Sets the size of the storage 3d texture. - * - * @param {number} width - The new width of the storage texture. - * @param {number} height - The new height of the storage texture. - * @param {number} depth - The new depth of the storage texture. - */ - setSize(width: number, height: number, depth: number): void; -} -/** - * This class enables element access on instances of {@link StorageBufferNode}. - * In most cases, it is indirectly used when accessing elements with the - * {@link StorageBufferNode#element} method. - * - * ```js - * const position = positionStorage.element( instanceIndex ); - * ``` - * - * @augments ArrayElementNode - */ -export class StorageArrayElementNode extends ArrayElementNode { - /** - * Constructs storage buffer element node. - * - * @param {StorageBufferNode} storageBufferNode - The storage buffer node. - * @param {Node} indexNode - The index node that defines the element access. - */ - constructor(storageBufferNode: StorageBufferNode, indexNode: Node); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStorageArrayElementNode: boolean; - /** - * The storage buffer node. - * - * @param {Node} value - * @type {StorageBufferNode} - */ - set storageBufferNode(value: Node); - get storageBufferNode(): Node; - getMemberType(builder: any, name: any): any; - setup(builder: any): Node | null; - generate(builder: any, output: any): any; -} -/** - * This special type of texture is intended for compute shaders. - * It can be used to compute the data of a texture with a compute shader. - * - * Note: This type of texture can only be used with `WebGPURenderer` - * and a WebGPU backend. - * - * @augments Texture - */ -export class StorageArrayTexture extends Texture { - /** - * Constructs a new storage texture. - * - * @param {number} [width=1] - The storage texture's width. - * @param {number} [height=1] - The storage texture's height. - * @param {number} [depth=1] - The storage texture's depth. - */ - constructor(width?: number, height?: number, depth?: number); - isArrayTexture: boolean; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStorageTexture: boolean; - /** - * Sets the size of the storage array texture. - * - * @param {number} width - The new width of the storage texture. - * @param {number} height - The new height of the storage texture. - * @param {number} depth - The new depth of the storage texture. - */ - setSize(width: number, height: number, depth: number): void; -} -/** - * This special type of buffer attribute is intended for compute shaders. - * In earlier three.js versions it was only possible to update attribute data - * on the CPU via JavaScript and then upload the data to the GPU. With the - * new material system and renderer it is now possible to use compute shaders - * to compute the data for an attribute more efficiently on the GPU. - * - * The idea is to create an instance of this class and provide it as an input - * to {@link StorageBufferNode}. - * - * Note: This type of buffer attribute can only be used with `WebGPURenderer`. - * - * @augments BufferAttribute - */ -export class StorageBufferAttribute extends BufferAttribute { - /** - * Constructs a new storage buffer attribute. - * - * @param {number|TypedArray} count - The item count. It is also valid to pass a typed array as an argument. - * The subsequent parameters are then obsolete. - * @param {number} itemSize - The item size. - * @param {TypedArray.constructor} [typeClass=Float32Array] - A typed array constructor. - */ - constructor(count: number | TypedArray, itemSize: number, typeClass?: TypedArray.constructor); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStorageBufferAttribute: boolean; -} -/** - * This node is used in context of compute shaders and allows to define a - * storage buffer for data. A typical workflow is to create instances of - * this node with the convenience functions `attributeArray()` or `instancedArray()`, - * setup up a compute shader that writes into the buffers and then convert - * the storage buffers to attribute nodes for rendering. - * - * ```js - * const positionBuffer = instancedArray( particleCount, 'vec3' ); // the storage buffer node - * - * const computeInit = Fn( () => { // the compute shader - * - * const position = positionBuffer.element( instanceIndex ); - * - * // compute position data - * - * position.x = 1; - * position.y = 1; - * position.z = 1; - * - * } )().compute( particleCount ); - * - * const particleMaterial = new THREE.SpriteNodeMaterial(); - * particleMaterial.positionNode = positionBuffer.toAttribute(); - * - * renderer.computeAsync( computeInit ); - * - * ``` - * - * @augments BufferNode - */ -export class StorageBufferNode extends BufferNode { - /** - * Constructs a new storage buffer node. - * - * @param {StorageBufferAttribute|StorageInstancedBufferAttribute|BufferAttribute} value - The buffer data. - * @param {?(string|Struct)} [bufferType=null] - The buffer type (e.g. `'vec3'`). - * @param {number} [bufferCount=0] - The buffer count. - */ - constructor(value: StorageBufferAttribute | StorageInstancedBufferAttribute | BufferAttribute, bufferType?: (string | Struct) | null, bufferCount?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStorageBufferNode: boolean; - /** - * The buffer struct type. - * - * @type {?StructTypeNode} - * @default null - */ - structTypeNode: StructTypeNode | null; - /** - * The access type of the texture node. - * - * @type {string} - * @default 'readWrite' - */ - access: string; - /** - * Whether the node is atomic or not. - * - * @type {boolean} - * @default false - */ - isAtomic: boolean; - /** - * Whether the node represents a PBO or not. - * Only relevant for WebGL. - * - * @type {boolean} - * @default false - */ - isPBO: boolean; - /** - * A reference to the internal buffer attribute node. - * - * @private - * @type {?BufferAttributeNode} - * @default null - */ - private _attribute; - /** - * A reference to the internal varying node. - * - * @private - * @type {?VaryingNode} - * @default null - */ - private _varying; - /** - * This method is overwritten since the buffer data might be shared - * and thus the hash should be shared as well. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The hash. - */ - getHash(builder: NodeBuilder): string; - /** - * Enables element access with the given index node. - * - * @param {IndexNode} indexNode - The index node. - * @return {StorageArrayElementNode} A node representing the element access. - */ - element(indexNode: IndexNode): StorageArrayElementNode; - /** - * Defines whether this node is a PBO or not. Only relevant for WebGL. - * - * @param {boolean} value - The value so set. - * @return {StorageBufferNode} A reference to this node. - */ - setPBO(value: boolean): StorageBufferNode; - /** - * Returns the `isPBO` value. - * - * @return {boolean} Whether the node represents a PBO or not. - */ - getPBO(): boolean; - /** - * Defines the node access. - * - * @param {string} value - The node access. - * @return {StorageBufferNode} A reference to this node. - */ - setAccess(value: string): StorageBufferNode; - /** - * Convenience method for configuring a read-only node access. - * - * @return {StorageBufferNode} A reference to this node. - */ - toReadOnly(): StorageBufferNode; - /** - * Defines whether the node is atomic or not. - * - * @param {boolean} value - The atomic flag. - * @return {StorageBufferNode} A reference to this node. - */ - setAtomic(value: boolean): StorageBufferNode; - /** - * Convenience method for making this node atomic. - * - * @return {StorageBufferNode} A reference to this node. - */ - toAtomic(): StorageBufferNode; - /** - * Returns attribute data for this storage buffer node. - * - * @return {{attribute: BufferAttributeNode, varying: VaryingNode}} The attribute data. - */ - getAttributeData(): { - attribute: BufferAttributeNode; - varying: VaryingNode; - }; - /** - * This method is overwritten since the node type from the availability of storage buffers - * and the attribute data. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Returns the type of a member of the struct. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} name - The name of the member. - * @return {string} The type of the member. - */ - getMemberType(builder: NodeBuilder, name: string): string; - /** - * Generates the code snippet of the storage buffer node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The generated code snippet. - */ - generate(builder: NodeBuilder): string; -} -/** - * This special type of instanced buffer attribute is intended for compute shaders. - * In earlier three.js versions it was only possible to update attribute data - * on the CPU via JavaScript and then upload the data to the GPU. With the - * new material system and renderer it is now possible to use compute shaders - * to compute the data for an attribute more efficiently on the GPU. - * - * The idea is to create an instance of this class and provide it as an input - * to {@link StorageBufferNode}. - * - * Note: This type of buffer attribute can only be used with `WebGPURenderer`. - * - * @augments InstancedBufferAttribute - */ -export class StorageInstancedBufferAttribute extends InstancedBufferAttribute { - /** - * Constructs a new storage instanced buffer attribute. - * - * @param {number|TypedArray} count - The item count. It is also valid to pass a typed array as an argument. - * The subsequent parameters are then obsolete. - * @param {number} itemSize - The item size. - * @param {TypedArray.constructor} [typeClass=Float32Array] - A typed array constructor. - */ - constructor(count: number | TypedArray, itemSize: number, typeClass?: TypedArray.constructor); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStorageInstancedBufferAttribute: boolean; -} -/** - * This special type of texture is intended for compute shaders. - * It can be used to compute the data of a texture with a compute shader. - * - * Note: This type of texture can only be used with `WebGPURenderer` - * and a WebGPU backend. - * - * @augments Texture - */ -export class StorageTexture extends Texture { - /** - * Constructs a new storage texture. - * - * @param {number} [width=1] - The storage texture's width. - * @param {number} [height=1] - The storage texture's height. - */ - constructor(width?: number, height?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStorageTexture: boolean; - /** - * When `true`, mipmaps will be auto-generated after compute writes. - * When `false`, mipmaps must be written manually via compute shaders. - * - * @type {boolean} - * @default true - */ - mipmapsAutoUpdate: boolean; - /** - * Sets the size of the storage texture. - * - * @param {number} width - The new width of the storage texture. - * @param {number} height - The new height of the storage texture. - */ - setSize(width: number, height: number): void; -} -/** - * This special version of a texture node can be used to - * write data into a storage texture with a compute shader. - * - * ```js - * const storageTexture = new THREE.StorageTexture( width, height ); - * - * const computeTexture = Fn( ( { storageTexture } ) => { - * - * const posX = instanceIndex.mod( width ); - * const posY = instanceIndex.div( width ); - * const indexUV = uvec2( posX, posY ); - * - * // generate RGB values - * - * const r = 1; - * const g = 1; - * const b = 1; - * - * textureStore( storageTexture, indexUV, vec4( r, g, b, 1 ) ).toWriteOnly(); - * - * } ); - * - * const computeNode = computeTexture( { storageTexture } ).compute( width * height ); - * renderer.computeAsync( computeNode ); - * ``` - * - * This node can only be used with a WebGPU backend. - * - * @augments TextureNode - */ -export class StorageTextureNode extends TextureNode { - /** - * Constructs a new storage texture node. - * - * @param {StorageTexture} value - The storage texture. - * @param {Node} uvNode - The uv node. - * @param {?Node} [storeNode=null] - The value node that should be stored in the texture. - */ - constructor(value: StorageTexture, uvNode: Node, storeNode?: Node | null); - /** - * The value node that should be stored in the texture. - * - * @type {?Node} - * @default null - */ - storeNode: Node | null; - /** - * The mip level to write to for storage textures. - * - * @type {number} - * @default 0 - */ - mipLevel: number; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStorageTextureNode: boolean; - /** - * The access type of the texture node. - * - * @type {string} - * @default 'writeOnly' - */ - access: string; - setup(builder: any): any; - /** - * Defines the node access. - * - * @param {string} value - The node access. - * @return {StorageTextureNode} A reference to this node. - */ - setAccess(value: string): StorageTextureNode; - /** - * Sets the mip level to write to. - * - * @param {number} level - The mip level. - * @return {StorageTextureNode} A reference to this node. - */ - setMipLevel(level: number): StorageTextureNode; - /** - * Generates the snippet for the storage texture. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} textureProperty - The texture property. - * @param {string} uvSnippet - The uv snippet. - * @param {?string} levelSnippet - The level snippet. - * @param {?string} biasSnippet - The bias snippet. - * @param {?string} depthSnippet - The depth snippet. - * @param {?string} compareSnippet - The compare snippet. - * @param {?Array} gradSnippet - The grad snippet. - * @param {?string} offsetSnippet - The offset snippet. - * @return {string} The generated code snippet. - */ - generateSnippet(builder: NodeBuilder, textureProperty: string, uvSnippet: string, levelSnippet: string | null, biasSnippet: string | null, depthSnippet: string | null, compareSnippet: string | null, gradSnippet: Array | null, offsetSnippet: string | null): string; - /** - * Convenience method for configuring a read/write node access. - * - * @return {StorageTextureNode} A reference to this node. - */ - toReadWrite(): StorageTextureNode; - /** - * Convenience method for configuring a read-only node access. - * - * @return {StorageTextureNode} A reference to this node. - */ - toReadOnly(): StorageTextureNode; - /** - * Convenience method for configuring a write-only node access. - * - * @return {StorageTextureNode} A reference to this node. - */ - toWriteOnly(): StorageTextureNode; - /** - * Stores a value in this storage texture at the given coordinates. - * - * @param {Node} uvNode - The storage texture coordinates. - * @param {?Node} [storeNode=null] - The value node that should be stored in the texture. - * @return {StorageTextureNode} A storage texture node representing the store operation. - */ - store(uvNode: Node, storeNode?: Node | null): StorageTextureNode; - /** - * Generates the code snippet of the storage texture node. - * - * @param {NodeBuilder} builder - The current node builder. - */ - generateStore(builder: NodeBuilder): void; -} -/** - * StructNode allows to create custom structures with multiple members. - * This can also be used to define structures in attribute and uniform data. - * - * ```js - * // Define a custom struct - * const BoundingBox = struct( { min: 'vec3', max: 'vec3' } ); - * - * // Create a new instance of the struct - * const bb = BoundingBox( vec3( 0 ), vec3( 1 ) ); // style 1 - * const bb = BoundingBox( { min: vec3( 0 ), max: vec3( 1 ) } ); // style 2 - * - * // Access the struct members - * const min = bb.get( 'min' ); - * - * // Assign a new value to a member - * min.assign( vec3() ); - * ``` - * @augments Node - */ -export class StructNode extends Node { - constructor(structTypeNode: any, values: any); - structTypeNode: any; - values: any; - isStructNode: boolean; - generateNodeType(builder: any): any; - getMemberType(builder: any, name: any): any; - _getChildren(): Object[]; - generate(builder: any): any; -} -/** - * Represents a struct type node in the node-based system. - * This class is used to define and manage the layout and types of struct members. - * It extends the base Node class and provides methods to get the length of the struct, - * retrieve member types, and generate the struct type for a builder. - * - * @augments Node - */ -export class StructTypeNode extends Node { - /** - * Creates an instance of StructTypeNode. - * - * @param {Object} membersLayout - The layout of the members for the struct. - * @param {?string} [name=null] - The optional name of the struct. - */ - constructor(membersLayout: Object, name?: string | null); - /** - * The layout of the members for the struct - * - * @type {Array.<{name: string, type: string, atomic: boolean}>} - */ - membersLayout: Array<{ - name: string; - type: string; - atomic: boolean; - }>; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStructTypeNode: boolean; - /** - * Returns the length of the struct in 4-byte elements (e.g. float or int components). - * The length is calculated by summing the lengths of the struct's members, accounting for memory alignment. - * To get the size in bytes, multiply the returned value by 4. - * - * @returns {number} The length of the struct in 4-byte elements. - */ - getLength(): number; - getMemberType(builder: any, name: any): string; - generateNodeType(builder: any): any; - setup(builder: any): void; - generate(builder: any): string; -} -/** - * This node is used to build a sub-build in the node system. - * - * @augments Node - * @param {Node} node - The node to be built in the sub-build. - * @param {string} name - The name of the sub-build. - * @param {?string} [nodeType=null] - The type of the node, if known. - */ -export class SubBuildNode extends Node { - constructor(node: any, name: any, nodeType?: null); - /** - * The node to be built in the sub-build. - * - * @type {Node} - */ - node: Node; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSubBuildNode: boolean; - generateNodeType(builder: any): string; - build(builder: any, ...params: any[]): string | Node | null; -} -/** - * This class represents a set of built in WGSL shader functions that sync - * synchronously execute an operation across a subgroup, or 'warp', of compute - * or fragment shader invocations within a workgroup. Typically, these functions - * will synchronously execute an operation using data from all active invocations - * within the subgroup, then broadcast that result to all active invocations. In - * other graphics APIs, subgroup functions are also referred to as wave intrinsics - * (DirectX/HLSL) or warp intrinsics (CUDA). - * - * @augments TempNode - */ -export class SubgroupFunctionNode extends TempNode { - /** - * Constructs a new function node. - * - * @param {string} method - The subgroup/wave intrinsic method to construct. - * @param {Node} [aNode=null] - The method's first argument. - * @param {Node} [bNode=null] - The method's second argument. - */ - constructor(method: string, aNode?: Node, bNode?: Node); - /** - * The subgroup/wave intrinsic method to construct. - * - * @type {string} - */ - method: string; - /** - * The method's first argument. - * - * @type {Node} - */ - aNode: Node; - /** - * The method's second argument. - * - * @type {Node} - */ - bNode: Node; - getInputType(builder: any): string | null; - generateNodeType(builder: any): string | null; - generate(builder: any, output: any): any; - serialize(data: any): void; - deserialize(data: any): void; -} -export namespace SubgroupFunctionNode { - let SUBGROUP_ELECT: string; - let SUBGROUP_BALLOT: string; - let SUBGROUP_ADD: string; - let SUBGROUP_INCLUSIVE_ADD: string; - let SUBGROUP_EXCLUSIVE_AND: string; - let SUBGROUP_MUL: string; - let SUBGROUP_INCLUSIVE_MUL: string; - let SUBGROUP_EXCLUSIVE_MUL: string; - let SUBGROUP_AND: string; - let SUBGROUP_OR: string; - let SUBGROUP_XOR: string; - let SUBGROUP_MIN: string; - let SUBGROUP_MAX: string; - let SUBGROUP_ALL: string; - let SUBGROUP_ANY: string; - let SUBGROUP_BROADCAST_FIRST: string; - let QUAD_SWAP_X: string; - let QUAD_SWAP_Y: string; - let QUAD_SWAP_DIAGONAL: string; - let SUBGROUP_BROADCAST: string; - let SUBGROUP_SHUFFLE: string; - let SUBGROUP_SHUFFLE_XOR: string; - let SUBGROUP_SHUFFLE_UP: string; - let SUBGROUP_SHUFFLE_DOWN: string; - let QUAD_BROADCAST: string; -} -import { SubtractEquation } from './three.core.js'; -import { SubtractiveBlending } from './three.core.js'; -export var TSL: Readonly<{ - __proto__: null; - BRDF_GGX: () => void; - BRDF_Lambert: () => void; - BasicPointShadowFilter: () => void; - BasicShadowFilter: () => void; - Break: () => ExpressionNode; - Const: (node: Node, name?: string | null) => VarNode; - Continue: () => ExpressionNode; - DFGLUT: () => void; - D_GGX: any; - Discard: (conditional: ConditionalNode | null) => Node; - EPSILON: any; - F_Schlick: () => void; - Fn: typeof Fn; - HALF_PI: any; - INFINITY: any; - If: (...params: any[]) => StackNode; - Loop: (...params: any[]) => LoopNode; - NodeAccess: { - READ_ONLY: string; - WRITE_ONLY: string; - READ_WRITE: string; - }; - NodeShaderStage: { - VERTEX: string; - FRAGMENT: string; - }; - NodeType: { - BOOLEAN: string; - INTEGER: string; - FLOAT: string; - VECTOR2: string; - VECTOR3: string; - VECTOR4: string; - MATRIX2: string; - MATRIX3: string; - MATRIX4: string; - }; - NodeUpdateType: { - NONE: string; - FRAME: string; - RENDER: string; - OBJECT: string; - }; - OnBeforeFrameUpdate: (callback: Function) => EventNode; - OnBeforeMaterialUpdate: (callback: Function) => EventNode; - OnBeforeObjectUpdate: (callback: Function) => EventNode; - OnFrameUpdate: (callback: Function) => EventNode; - OnMaterialUpdate: (callback: Function) => EventNode; - OnObjectUpdate: (callback: Function) => EventNode; - PCFShadowFilter: () => void; - PCFSoftShadowFilter: () => void; - PI: any; - PI2: any; - PointShadowFilter: () => void; - Return: () => ExpressionNode; - Schlick_to_F0: any; - ShaderNode: typeof ShaderNode; - Stack: typeof Stack; - Switch: (...params: any[]) => StackNode; - TBNViewMatrix: any; - TWO_PI: any; - VSMShadowFilter: () => void; - V_GGX_SmithCorrelated: any; - Var: (node: Node, name?: string | null) => VarNode; - VarIntent: (node: Node) => VarNode; - abs: any; - acesFilmicToneMapping: any; - acos: any; - acosh: any; - add: any; - addMethodChaining: typeof addMethodChaining; - addNodeElement: typeof addNodeElement; - agxToneMapping: any; - all: any; - alphaT: any; - and: any; - anisotropy: any; - anisotropyB: any; - anisotropyT: any; - any: any; - append: (node: Node) => Function; - array: (...params: any[]) => ArrayNode; - asin: any; - asinh: any; - assign: any; - atan: any; - atanh: any; - atomicAdd: (pointerNode: Node, valueNode: Node) => AtomicFunctionNode; - atomicAnd: (pointerNode: Node, valueNode: Node) => AtomicFunctionNode; - atomicFunc: (method: string, pointerNode: Node, valueNode: Node) => AtomicFunctionNode; - atomicLoad: (pointerNode: Node) => AtomicFunctionNode; - atomicMax: (pointerNode: Node, valueNode: Node) => AtomicFunctionNode; - atomicMin: (pointerNode: Node, valueNode: Node) => AtomicFunctionNode; - atomicOr: (pointerNode: Node, valueNode: Node) => AtomicFunctionNode; - atomicStore: (pointerNode: Node, valueNode: Node) => AtomicFunctionNode; - atomicSub: (pointerNode: Node, valueNode: Node) => AtomicFunctionNode; - atomicXor: (pointerNode: Node, valueNode: Node) => AtomicFunctionNode; - attenuationColor: any; - attenuationDistance: any; - attribute: (name: string, nodeType?: string | null) => AttributeNode; - attributeArray: (count: number | TypedArray, type?: string | Struct) => StorageBufferNode; - backgroundBlurriness: any; - backgroundIntensity: any; - backgroundRotation: any; - batch: any; - bentNormalView: any; - billboarding: () => void; - bitAnd: any; - bitNot: any; - bitOr: any; - bitXor: any; - bitangentGeometry: any; - bitangentLocal: any; - bitangentView: any; - bitangentWorld: any; - bitcast: any; - blendBurn: any; - blendColor: any; - blendDodge: any; - blendOverlay: any; - blendScreen: any; - blur: () => void; - bool: any; - buffer: (value: Array, type: string, count: number) => BufferNode; - bufferAttribute: (array: BufferAttribute | InterleavedBuffer | TypedArray, type?: string | null, stride?: number, offset?: number) => BufferAttributeNode | Node; - builtin: any; - builtinAOContext: typeof builtinAOContext; - builtinShadowContext: typeof builtinShadowContext; - bumpMap: any; - bvec2: any; - bvec3: any; - bvec4: any; - bypass: any; - cache: typeof cache; - call: (func: any, ...params: any[]) => FunctionCallNode; - cameraFar: any; - cameraIndex: any; - cameraNear: any; - cameraNormalMatrix: any; - cameraPosition: any; - cameraProjectionMatrix: any; - cameraProjectionMatrixInverse: any; - cameraViewMatrix: any; - cameraViewport: any; - cameraWorldMatrix: any; - cbrt: (a: Node | number) => Node; - cdl: () => void; - ceil: any; - checker: () => void; - cineonToneMapping: any; - clamp: (value: Node | number, low?: Node | number, high?: Node | number) => Node; - clearcoat: any; - clearcoatNormalView: any; - clearcoatRoughness: any; - clipSpace: any; - code: any; - color: any; - colorSpaceToWorking: (node: Node, sourceColorSpace: string) => ColorSpaceNode; - colorToDirection: (node: Node) => Node; - compute: (node: Node, count: number | Array, workgroupSize?: Array) => ComputeNode; - computeKernel: (node: Node, workgroupSize?: Array) => ComputeNode; - computeSkinning: (skinnedMesh: SkinnedMesh, toPosition?: Node) => SkinningNode; - context: (nodeOrValue?: Node | Object, value?: Object) => ContextNode; - convert: (node: any, types: any) => ConvertNode; - convertColorSpace: (node: Node, sourceColorSpace: string, targetColorSpace: string) => ColorSpaceNode; - convertToTexture: (node: Node, ...params: any[]) => RTTNode; - cos: any; - cosh: any; - countLeadingZeros: any; - countOneBits: any; - countTrailingZeros: any; - cross: any; - cubeTexture: (value?: (CubeTexture | CubeTextureNode) | null, uvNode?: Node | null, levelNode?: Node | null, biasNode?: Node | null) => CubeTextureNode; - cubeTextureBase: any; - dFdx: any; - dFdy: any; - dashSize: any; - debug: (node: Node, callback?: Function | null) => DebugNode; - decrement: () => void; - decrementBefore: () => void; - defaultBuildStages: string[]; - defaultShaderStages: string[]; - defined: typeof defined; - degrees: any; - deltaTime: any; - densityFogFactor: () => void; - depth: ViewportDepthNode; - depthPass: (scene: Scene, camera: Camera, options: Object) => PassNode; - determinant: any; - difference: any; - diffuseColor: any; - diffuseContribution: any; - directPointLight: ({ color, lightVector, cutoffDistance, decayExponent }: { - color: any; - lightVector: any; - cutoffDistance: any; - decayExponent: any; - }) => { - lightDirection: any; - lightColor: any; - }; - directionToColor: (node: Node) => Node; - directionToFaceDirection: () => void; - dispersion: any; - disposeShadowMaterial: (light: Light) => void; - distance: any; - div: any; - dot: any; - drawIndex: IndexNode; - dynamicBufferAttribute: (array: BufferAttribute | InterleavedBuffer | TypedArray, type?: string | null, stride?: number, offset?: number) => BufferAttributeNode | Node; - element: any; - emissive: any; - equal: any; - equirectUV: () => void; - exp: any; - exp2: any; - exponentialHeightFogFactor: () => void; - expression: any; - faceDirection: any; - faceForward: any; - faceforward: any; - float: any; - floatBitsToInt: (value: Node) => BitcastNode; - floatBitsToUint: (value: Node) => BitcastNode; - floor: any; - fog: () => void; - fract: any; - frameGroup: UniformGroupNode; - frameId: any; - frontFacing: any; - fwidth: any; - gain: (x: Node, k: Node) => Node; - gapSize: any; - getConstNodeType: (value: any) => any; - getCurrentStack: () => any; - getDirection: any; - getDistanceAttenuation: () => void; - getGeometryRoughness: () => void; - getNormalFromDepth: () => void; - getParallaxCorrectNormal: () => void; - getRoughness: () => void; - getScreenPosition: () => void; - getShIrradianceAt: () => void; - getShadowMaterial: (light: Light) => NodeMaterial; - getShadowRenderObjectFunction: (renderer: Renderer, shadow: LightShadow, shadowType: number, useVelocity: boolean) => shadowRenderObjectFunction; - getTextureIndex: typeof getTextureIndex; - getViewPosition: () => void; - ggxConvolution: () => void; - globalId: any; - glsl: (src: string, includes: Array) => CodeNode; - glslFn: (code: any, includes: any) => any; - grayscale: () => void; - greaterThan: any; - greaterThanEqual: any; - hash: () => void; - highpModelNormalViewMatrix: any; - highpModelViewMatrix: any; - hue: () => void; - increment: () => void; - incrementBefore: () => void; - inspector: typeof inspector; - instance: any; - instanceIndex: IndexNode; - instancedArray: (count: number | TypedArray, type?: string | Struct) => StorageBufferNode; - instancedBufferAttribute: (array: BufferAttribute | InterleavedBuffer | TypedArray, type?: string | null, stride?: number, offset?: number) => BufferAttributeNode | Node; - instancedDynamicBufferAttribute: (array: BufferAttribute | InterleavedBuffer | TypedArray, type?: string | null, stride?: number, offset?: number) => BufferAttributeNode | Node; - instancedMesh: any; - int: any; - intBitsToFloat: (value: Node) => BitcastNode; - interleavedGradientNoise: any; - inverse: any; - inverseSqrt: any; - inversesqrt: any; - invocationLocalIndex: IndexNode; - invocationSubgroupIndex: IndexNode; - ior: any; - iridescence: any; - iridescenceIOR: any; - iridescenceThickness: any; - isolate: (node: Node) => IsolateNode; - ivec2: any; - ivec3: any; - ivec4: any; - js: (src: string, includes: Array) => CodeNode; - label: typeof label; - length: any; - lengthSq: (a: Node) => Node; - lessThan: any; - lessThanEqual: any; - lightPosition: typeof lightPosition; - lightProjectionUV: typeof lightProjectionUV; - lightShadowMatrix: typeof lightShadowMatrix; - lightTargetDirection: (light: Light) => Node; - lightTargetPosition: typeof lightTargetPosition; - lightViewPosition: typeof lightViewPosition; - lightingContext: any; - lights: (lights?: Array) => LightsNode; - linearDepth: any; - linearToneMapping: any; - localId: any; - log: any; - log2: any; - logarithmicDepthToViewZ: (depth: Node, near: Node, far: Node) => Node; - luminance: (color: Node, luminanceCoefficients?: Node | null) => Node; - mat2: any; - mat3: any; - mat4: any; - matcapUV: any; - materialAO: any; - materialAlphaTest: any; - materialAnisotropy: any; - materialAnisotropyVector: any; - materialAttenuationColor: any; - materialAttenuationDistance: any; - materialClearcoat: any; - materialClearcoatNormal: any; - materialClearcoatRoughness: any; - materialColor: any; - materialDispersion: any; - materialEmissive: any; - materialEnvIntensity: any; - materialEnvRotation: any; - materialIOR: any; - materialIridescence: any; - materialIridescenceIOR: any; - materialIridescenceThickness: any; - materialLightMap: any; - materialLineDashOffset: any; - materialLineDashSize: any; - materialLineGapSize: any; - materialLineScale: any; - materialLineWidth: any; - materialMetalness: any; - materialNormal: any; - materialOpacity: any; - materialPointSize: any; - materialReference: (name: string, type: string, material?: Material | null) => MaterialReferenceNode; - materialReflectivity: any; - materialRefractionRatio: any; - materialRotation: any; - materialRoughness: any; - materialSheen: any; - materialSheenRoughness: any; - materialShininess: any; - materialSpecular: any; - materialSpecularColor: any; - materialSpecularIntensity: any; - materialSpecularStrength: any; - materialThickness: any; - materialTransmission: any; - max: any; - maxMipLevel: any; - mediumpModelViewMatrix: any; - metalness: any; - min: any; - mix: any; - mixElement: (t: Node | number, e1: Node | number, e2: Node | number) => Node; - mod: any; - modelDirection: any; - modelNormalMatrix: any; - modelPosition: any; - modelRadius: any; - modelScale: any; - modelViewMatrix: any; - modelViewPosition: any; - modelViewProjection: any; - modelWorldMatrix: any; - modelWorldMatrixInverse: any; - morphReference: any; - mrt: any; - mul: any; - mx_aastep: (threshold: any, value: any) => any; - mx_add: (in1: any, in2?: any) => any; - mx_atan2: (in1?: any, in2?: any) => any; - mx_cell_noise_float: (texcoord?: any) => any; - mx_contrast: (input: any, amount?: number, pivot?: number) => any; - mx_divide: (in1: any, in2?: any) => any; - mx_fractal_noise_float: (position?: any, octaves?: number, lacunarity?: number, diminish?: number, amplitude?: number) => any; - mx_fractal_noise_vec2: (position?: any, octaves?: number, lacunarity?: number, diminish?: number, amplitude?: number) => any; - mx_fractal_noise_vec3: (position?: any, octaves?: number, lacunarity?: number, diminish?: number, amplitude?: number) => any; - mx_fractal_noise_vec4: (position?: any, octaves?: number, lacunarity?: number, diminish?: number, amplitude?: number) => any; - mx_frame: () => any; - mx_heighttonormal: (input: any, scale: any) => any; - mx_hsvtorgb: any; - mx_ifequal: (value1: any, value2: any, in1: any, in2: any) => any; - mx_ifgreater: (value1: any, value2: any, in1: any, in2: any) => any; - mx_ifgreatereq: (value1: any, value2: any, in1: any, in2: any) => any; - mx_invert: (in1: any, amount?: any) => any; - mx_modulo: (in1: any, in2?: any) => any; - mx_multiply: (in1: any, in2?: any) => any; - mx_noise_float: (texcoord?: any, amplitude?: number, pivot?: number) => any; - mx_noise_vec3: (texcoord?: any, amplitude?: number, pivot?: number) => any; - mx_noise_vec4: (texcoord?: any, amplitude?: number, pivot?: number) => any; - mx_place2d: (texcoord: any, pivot?: any, scale?: any, rotate?: any, offset?: any) => any; - mx_power: (in1: any, in2?: any) => any; - mx_ramp4: (valuetl: any, valuetr: any, valuebl: any, valuebr: any, texcoord?: any) => any; - mx_ramplr: (valuel: any, valuer: any, texcoord?: any) => any; - mx_ramptb: (valuet: any, valueb: any, texcoord?: any) => any; - mx_rgbtohsv: any; - mx_rotate2d: (input: any, amount: any) => any; - mx_rotate3d: (input: any, amount: any, axis: any) => any; - mx_safepower: (in1: any, in2?: number) => any; - mx_separate: (in1: any, channelOrOut?: null) => any; - mx_splitlr: (valuel: any, valuer: any, center: any, texcoord?: any) => any; - mx_splittb: (valuet: any, valueb: any, center: any, texcoord?: any) => any; - mx_srgb_texture_to_lin_rec709: any; - mx_subtract: (in1: any, in2?: any) => any; - mx_timer: () => any; - mx_transform_uv: (uv_scale?: number, uv_offset?: number, uv_geo?: any) => any; - mx_unifiednoise2d: (noiseType: any, texcoord?: any, freq?: any, offset?: any, jitter?: number, outmin?: number, outmax?: number, clampoutput?: boolean, octaves?: number, lacunarity?: number, diminish?: number) => any; - mx_unifiednoise3d: (noiseType: any, texcoord?: any, freq?: any, offset?: any, jitter?: number, outmin?: number, outmax?: number, clampoutput?: boolean, octaves?: number, lacunarity?: number, diminish?: number) => any; - mx_worley_noise_float: (texcoord?: any, jitter?: number) => any; - mx_worley_noise_vec2: (texcoord?: any, jitter?: number) => any; - mx_worley_noise_vec3: (texcoord?: any, jitter?: number) => any; - negate: any; - neutralToneMapping: any; - nodeArray: (val: any, altType?: null) => any; - nodeImmutable: (NodeClass: any, ...params: any[]) => any; - nodeObject: (val: any, altType?: null) => any; - nodeObjectIntent: (val: any, altType?: null) => any; - nodeObjects: (val: any, altType?: null) => any; - nodeProxy: (NodeClass: any, scope?: null, factor?: null, settings?: null) => any; - nodeProxyConstructor: (constructorFunction: any, nodeInstance: any) => any; - nodeProxyIntent: (NodeClass: any, scope?: null, factor?: null, settings?: {}) => any; - normalFlat: any; - normalGeometry: any; - normalLocal: any; - normalMap: any; - normalView: any; - normalViewGeometry: any; - normalWorld: any; - normalWorldGeometry: any; - normalize: any; - not: any; - notEqual: any; - numWorkgroups: any; - objectDirection: any; - objectGroup: UniformGroupNode; - objectPosition: any; - objectRadius: any; - objectScale: any; - objectViewPosition: any; - objectWorldMatrix: any; - oneMinus: any; - or: any; - orthographicDepthToViewZ: () => void; - oscSawtooth: (t?: Node) => Node; - oscSine: (t?: Node) => Node; - oscSquare: (t?: Node) => Node; - oscTriangle: (t?: Node) => Node; - output: any; - outputStruct: any; - overloadingFn: (functionNodes: Array) => FunctionOverloadingNode; - packHalf2x16: any; - packSnorm2x16: any; - packUnorm2x16: any; - parabola: (x: Node, k: Node) => Node; - parallaxDirection: any; - parallaxUV: (uv: Node, scale: Node) => Node; - parameter: (type: string, name: string | null) => ParameterNode; - pass: (scene: Scene, camera: Camera, options: Object) => PassNode; - passTexture: (pass: PassNode, texture: Texture) => PassTextureNode; - pcurve: (x: Node, a: Node, b: Node) => Node; - perspectiveDepthToViewZ: () => void; - pmremTexture: any; - pointShadow: (light: PointLight, shadow?: PointLightShadow | null) => PointShadowNode; - pointUV: PointUVNode; - pointWidth: any; - positionGeometry: any; - positionLocal: any; - positionPrevious: any; - positionView: any; - positionViewDirection: any; - positionWorld: any; - positionWorldDirection: any; - posterize: () => void; - pow: any; - pow2: (x: Node | number) => Node; - pow3: (x: Node | number) => Node; - pow4: (x: Node | number) => Node; - premultiplyAlpha: () => void; - property: (type: string, name?: string | null) => PropertyNode; - quadBroadcast: any; - quadSwapDiagonal: any; - quadSwapX: any; - quadSwapY: any; - radians: any; - rand: () => void; - range: any; - rangeFogFactor: () => void; - reciprocal: any; - reference: (name: string, type: string, object?: Object | null) => ReferenceNode; - referenceBuffer: (name: string, type: string, count: number, object: Object) => ReferenceNode; - reflect: any; - reflectVector: any; - reflectView: any; - reflector: (parameters?: { - target?: Object3D | undefined; - resolution?: number | undefined; - generateMipmaps?: boolean | undefined; - bounces?: boolean | undefined; - depth?: boolean | undefined; - samples?: number | undefined; - defaultTexture?: TextureNode | undefined; - reflector?: ReflectorBaseNode | undefined; - }) => ReflectorNode; - refract: any; - refractVector: any; - refractView: any; - reinhardToneMapping: any; - remap: () => void; - remapClamp: typeof remapClamp; - renderGroup: UniformGroupNode; - renderOutput: (color: Node, toneMapping?: number | null, outputColorSpace?: string | null) => RenderOutputNode; - rendererReference: (name: string, type: string, renderer?: Renderer | null) => RendererReferenceNode; - replaceDefaultUV: typeof replaceDefaultUV; - rotate: any; - rotateUV: () => void; - roughness: any; - round: any; - rtt: (node: Node, ...params: any[]) => RTTNode; - sRGBTransferEOTF: any; - sRGBTransferOETF: any; - sample: (callback: Function, uv?: Node | null) => SampleNode; - sampler: (value: TextureNode | Texture) => Node; - samplerComparison: (value: TextureNode | Texture) => Node; - saturate: (value: Node | number) => Node; - saturation: () => void; - screenCoordinate: any; - screenDPR: any; - screenSize: any; - screenUV: any; - select: any; - setCurrentStack: (stack: any) => void; - setName: (node: Node, name: string) => ContextNode; - shaderStages: string[]; - shadow: (light: Light, shadow?: LightShadow | null) => ShadowNode; - shadowPositionWorld: any; - shapeCircle: () => void; - sharedUniformGroup: (name: string, order?: number, updateType?: null) => UniformGroupNode; - sheen: any; - sheenRoughness: any; - shiftLeft: any; - shiftRight: any; - shininess: any; - sign: any; - sin: any; - sinc: (x: Node, k: Node) => Node; - sinh: any; - skinning: (skinnedMesh: SkinnedMesh) => SkinningNode; - smoothstep: any; - smoothstepElement: (x: Node | number, low: Node | number, high: Node | number) => Node; - specularColor: any; - specularColorBlended: any; - specularF90: any; - spherizeUV: () => void; - split: (node: any, channels: any) => SplitNode; - spritesheetUV: () => void; - sqrt: any; - stack: any; - step: any; - stepElement: (x: Node | number, edge: Node | number) => Node; - storage: (value: StorageBufferAttribute | StorageInstancedBufferAttribute | BufferAttribute, type?: (string | Struct) | null, count?: number) => StorageBufferNode; - storageBarrier: () => BarrierNode; - storageTexture: any; - struct: (membersLayout: Object, name?: string | null) => Function; - sub: any; - subBuild: (node: Node, name: string, type?: string | null) => Node; - subgroupAdd: any; - subgroupAll: any; - subgroupAnd: any; - subgroupAny: any; - subgroupBallot: any; - subgroupBroadcast: any; - subgroupBroadcastFirst: any; - subgroupElect: any; - subgroupExclusiveAdd: any; - subgroupExclusiveMul: any; - subgroupInclusiveAdd: any; - subgroupInclusiveMul: any; - subgroupIndex: IndexNode; - subgroupMax: any; - subgroupMin: any; - subgroupMul: any; - subgroupOr: any; - subgroupShuffle: any; - subgroupShuffleDown: any; - subgroupShuffleUp: any; - subgroupShuffleXor: any; - subgroupSize: any; - subgroupXor: any; - tan: any; - tangentGeometry: any; - tangentLocal: any; - tangentView: any; - tangentWorld: any; - tanh: any; - texture: (value?: (Texture | TextureNode) | null, uvNode?: Node | null, levelNode?: Node | null, biasNode?: Node | null) => TextureNode; - texture3D: any; - texture3DLevel: (value?: (Texture | TextureNode) | null, uvNode?: Node | null, levelNode?: Node | null) => TextureNode; - texture3DLoad: (...params: any[]) => TextureNode; - textureBarrier: () => BarrierNode; - textureBicubic: () => void; - textureBicubicLevel: () => void; - textureCubeUV: () => void; - textureLevel: (value: any, uv: any, level: any) => TextureNode; - textureLoad: (...params: any[]) => TextureNode; - textureSize: any; - textureStore: (value: StorageTexture | StorageTextureNode, uvNode: Node, storeNode?: Node | null) => StorageTextureNode; - thickness: any; - time: any; - toneMapping: (mapping: number, exposure: Node | number, color: Node | Color) => ToneMappingNode; - toneMappingExposure: any; - toonOutlinePass: (scene: Scene, camera: Camera, color?: Color, thickness?: number, alpha?: number) => ToonOutlinePassNode; - transformDirection: any; - transformNormal: () => void; - transformNormalToView: () => void; - transformedClearcoatNormalView: any; - transformedNormalView: any; - transformedNormalWorld: any; - transmission: any; - transpose: any; - triNoise3D: any; - triplanarTexture: (...params: any[]) => Node; - triplanarTextures: () => void; - trunc: any; - uint: any; - uintBitsToFloat: (value: Node) => BitcastNode; - uniform: (value: any | string, type?: string) => UniformNode; - uniformArray: (values: Array, nodeType?: string | null) => UniformArrayNode; - uniformCubeTexture: (value?: CubeTexture | null) => CubeTextureNode; - uniformFlow: (node: Node) => ContextNode; - uniformGroup: (name: string, order?: number, updateType?: null) => UniformGroupNode; - uniformTexture: (value?: Texture | null) => TextureNode; - unpackHalf2x16: any; - unpackNormal: (xy: Node) => Node; - unpackSnorm2x16: any; - unpackUnorm2x16: any; - unpremultiplyAlpha: () => void; - userData: (name: string, inputType: string, userData: Object | null) => UserDataNode; - uv: (index?: number) => AttributeNode; - uvec2: any; - uvec3: any; - uvec4: any; - varying: any; - varyingProperty: (type: string, name?: string | null) => PropertyNode; - vec2: any; - vec3: any; - vec4: any; - vectorComponents: string[]; - velocity: VelocityNode; - vertexColor: (index?: number) => VertexColorNode; - vertexIndex: IndexNode; - vertexStage: (node: Node) => VaryingNode; - vibrance: () => void; - viewZToLogarithmicDepth: (viewZ: Node, near: Node, far: Node) => Node; - viewZToOrthographicDepth: (viewZ: Node, near: Node, far: Node) => Node; - viewZToPerspectiveDepth: (viewZ: Node, near: Node, far: Node) => Node; - viewZToReversedOrthographicDepth: (viewZ: Node, near: Node, far: Node) => Node; - viewZToReversedPerspectiveDepth: (viewZ: Node, near: Node, far: Node) => Node; - viewport: any; - viewportCoordinate: any; - viewportDepthTexture: any; - viewportLinearDepth: ViewportDepthNode; - viewportMipTexture: any; - viewportOpaqueMipTexture: (uv?: Node | null, level?: Node | null) => ViewportTextureNode; - viewportResolution: any; - viewportSafeUV: () => void; - viewportSharedTexture: any; - viewportSize: any; - viewportTexture: any; - viewportUV: any; - vogelDiskSample: any; - wgsl: (src: string, includes: Array) => CodeNode; - wgslFn: (code: any, includes: any) => any; - workgroupArray: (type: string, count?: number) => WorkgroupInfoNode; - workgroupBarrier: () => BarrierNode; - workgroupId: any; - workingToColorSpace: (node: Node, targetColorSpace: string) => ColorSpaceNode; - xor: any; -}>; -import { TangentSpaceNormalMap } from './three.core.js'; -/** - * This module uses cache management to create temporary variables - * if the node is used more than once to prevent duplicate calculations. - * - * The class acts as a base class for many other nodes types. - * - * @augments Node - */ -export class TempNode extends Node { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isTempNode: boolean; - /** - * Whether this node is used more than once in context of other nodes. - * - * @param {NodeBuilder} builder - The node builder. - * @return {boolean} A flag that indicates if there is more than one dependency to other nodes. - */ - hasDependencies(builder: NodeBuilder): boolean; - build(builder: any, output: any): any; -} -import { Texture } from './three.core.js'; -/** - * This type of uniform node represents a 3D texture. - * - * @augments TextureNode - */ -export class Texture3DNode extends TextureNode { - /** - * Constructs a new 3D texture node. - * - * @param {Data3DTexture} value - The 3D texture. - * @param {?Node} [uvNode=null] - The uv node. - * @param {?Node} [levelNode=null] - The level node. - */ - constructor(value: Data3DTexture, uvNode?: Node | null, levelNode?: Node | null); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isTexture3DNode: boolean; - /** - * Overwritten with an empty implementation since the `updateMatrix` flag is ignored - * for 3D textures. The uv transformation matrix is not applied to 3D textures. - * - * @param {boolean} value - The update toggle. - */ - setUpdateMatrix(): void; - /** - * Computes the normal for the given uv. These texture coordiantes represent a - * position inside the 3D texture. Unlike geometric normals, this normal - * represents a slope or gradient of scalar data inside the 3D texture. - * - * @param {Node} uvNode - The uv node that defines a position in the 3D texture. - * @return {Node} The normal representing the slope/gradient in the data. - */ - normal(uvNode: Node): Node; -} -/** - * This type of uniform node represents a 2D texture. - * - * @augments UniformNode - */ -export class TextureNode extends UniformNode { - /** - * Constructs a new texture node. - * - * @param {Texture} [value=EmptyTexture] - The texture. - * @param {?Node} [uvNode=null] - The uv node. - * @param {?Node} [levelNode=null] - The level node. - * @param {?Node} [biasNode=null] - The bias node. - */ - constructor(value?: Texture, uvNode?: Node | null, levelNode?: Node | null, biasNode?: Node | null); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isTextureNode: boolean; - /** - * Represents the texture coordinates. - * - * @type {?Node} - * @default null - */ - uvNode: Node | null; - /** - * Represents the mip level that should be selected. - * - * @type {?Node} - * @default null - */ - levelNode: Node | null; - /** - * Represents the bias to be applied during level-of-detail computation. - * - * @type {?Node} - * @default null - */ - biasNode: Node | null; - /** - * Represents a reference value a texture sample is compared to. - * - * @type {?Node} - * @default null - */ - compareNode: Node | null; - /** - * When using texture arrays, the depth node defines the layer to select. - * - * @type {?Node} - * @default null - */ - depthNode: Node | null; - /** - * When defined, a texture is sampled using explicit gradients. - * - * @type {?Array>} - * @default null - */ - gradNode: Array> | null; - /** - * Represents the optional index constant of the channel to gather. - * This must be in range [0, 3] and a compile-time constant. - * - * @type {?Node} - * @default null - */ - gatherNode: Node | null; - /** - * Represents the optional texel offset applied to the unnormalized texture - * coordinate before sampling the texture. - * - * @type {?Node} - * @default null - */ - offsetNode: Node | null; - /** - * Whether texture values should be sampled or fetched. - * - * @type {boolean} - * @default true - */ - sampler: boolean; - /** - * Whether the uv transformation matrix should be - * automatically updated or not. Use `setUpdateMatrix()` - * if you want to change the value of the property. - * - * @type {boolean} - * @default false - */ - updateMatrix: boolean; - /** - * The reference node. - * - * @type {?Node} - * @default null - */ - referenceNode: Node | null; - /** - * The texture value is stored in a private property. - * - * @private - * @type {Texture} - */ - private _value; - /** - * The uniform node that represents the uv transformation matrix. - * - * @private - * @type {?UniformNode} - * @default null - */ - private _matrixUniform; - /** - * The uniform node that represents the y-flip. Only required for WebGL. - * - * @private - * @type {?UniformNode} - * @default null - */ - private _flipYUniform; - set value(value: Texture); - /** - * The texture value. - * - * @type {Texture} - */ - get value(): Texture; - /** - * Overwritten since the uniform hash is defined by the texture's UUID. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The uniform hash. - */ - getUniformHash(): string; - /** - * Overwritten since the node type is inferred from the texture type. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(): string; - /** - * Overwrites the default implementation to return a fixed value `'texture'`. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The input type. - */ - getInputType(): string; - /** - * Returns a default uvs based on the current texture's channel. - * - * @return {AttributeNode} The default uvs. - */ - getDefaultUV(): AttributeNode; - /** - * Overwritten to always return the texture reference of the node. - * - * @param {any} state - This method can be invocated in different contexts so `state` can refer to any object type. - * @return {Texture} The texture reference. - */ - updateReference(): Texture; - /** - * Transforms the given uv node with the texture transformation matrix. - * - * @param {Node} uvNode - The uv node to transform. - * @return {Node} The transformed uv node. - */ - getTransformedUV(uvNode: Node): Node; - /** - * Defines whether the uv transformation matrix should automatically be updated or not. - * - * @param {boolean} value - The update toggle. - * @return {TextureNode} A reference to this node. - */ - setUpdateMatrix(value: boolean): TextureNode; - /** - * Setups the uv node. Depending on the backend as well as texture's image and type, it might be necessary - * to modify the uv node for correct sampling. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {Node} uvNode - The uv node to setup. - * @return {Node} The updated uv node. - */ - setupUV(builder: NodeBuilder, uvNode: Node): Node; - /** - * Setups texture node by preparing the internal nodes for code generation. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setup(builder: NodeBuilder): void; - /** - * Generates the uv code snippet. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {Node} uvNode - The uv node to generate code for. - * @return {string} The generated code snippet. - */ - generateUV(builder: NodeBuilder, uvNode: Node): string; - /** - * Generates the offset code snippet. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {Node} offsetNode - The offset node to generate code for. - * @return {string} The generated code snippet. - */ - generateOffset(builder: NodeBuilder, offsetNode: Node): string; - /** - * Generates the snippet for the texture sampling. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} textureProperty - The texture property. - * @param {string} uvSnippet - The uv snippet. - * @param {?string} levelSnippet - The level snippet. - * @param {?string} biasSnippet - The bias snippet. - * @param {?string} depthSnippet - The depth snippet. - * @param {?string} compareSnippet - The compare snippet. - * @param {?Array} gradSnippet - The grad snippet. - * @param {?string} gatherSnippet - The gather snippet. - * @param {?string} offsetSnippet - The offset snippet. - * @param {?string} flipYSnippet - The y-flip snippet. Only used for WebGL. - * @return {string} The generated code snippet. - */ - generateSnippet(builder: NodeBuilder, textureProperty: string, uvSnippet: string, levelSnippet: string | null, biasSnippet: string | null, depthSnippet: string | null, compareSnippet: string | null, gradSnippet: Array | null, gatherSnippet: string | null, offsetSnippet: string | null, flipYSnippet: string | null): string; - /** - * Generates the code snippet of the texture node. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} output - The current output. - * @return {string} The generated code snippet. - */ - generate(builder: NodeBuilder, output: string): string; - /** - * Sets the sampler value. - * - * @param {boolean} value - The sampler value to set. - * @return {TextureNode} A reference to this texture node. - */ - setSampler(value: boolean): TextureNode; - /** - * Returns the sampler value. - * - * @return {boolean} The sampler value. - */ - getSampler(): boolean; - /** - * Samples the texture with the given uv node. - * - * @param {Node} uvNode - The uv node. - * @return {TextureNode} A texture node representing the texture sample. - */ - sample(uvNode: Node): TextureNode; - /** - * TSL function for creating a texture node that fetches/loads texels without interpolation. - * - * @param {Node} uvNode - The uv node. - * @returns {TextureNode} A texture node representing the texture load. - */ - load(uvNode: Node): TextureNode; - /** - * Samples a blurred version of the texture by defining an internal bias. - * - * @param {Node} amountNode - How blurred the texture should be. - * @return {TextureNode} A texture node representing the texture sample. - */ - blur(amountNode: Node): TextureNode; - /** - * Samples a specific mip of the texture. - * - * @param {Node} levelNode - The mip level to sample. - * @return {TextureNode} A texture node representing the texture sample. - */ - level(levelNode: Node): TextureNode; - /** - * Returns the texture size of the requested level. - * - * @param {Node} levelNode - The level to compute the size for. - * @return {TextureSizeNode} The texture size. - */ - size(levelNode: Node): TextureSizeNode; - /** - * Samples the texture with the given bias. - * - * @param {Node} biasNode - The bias node. - * @return {TextureNode} A texture node representing the texture sample. - */ - bias(biasNode: Node): TextureNode; - /** - * Returns the base texture of this node. - * @return {TextureNode} The base texture node. - */ - getBase(): TextureNode; - /** - * Samples the texture by executing a compare operation. - * - * @param {Node} compareNode - The node that defines the compare value. - * @return {TextureNode} A texture node representing the texture sample. - */ - compare(compareNode: Node): TextureNode; - /** - * Samples the texture using an explicit gradient. - * - * @param {Node} gradNodeX - The gradX node. - * @param {Node} gradNodeY - The gradY node. - * @return {TextureNode} A texture node representing the texture sample. - */ - grad(gradNodeX: Node, gradNodeY: Node): TextureNode; - /** - * Gathers four texels from the texture. - * - * @param {Node} gatherNode - The index of the channel to read. This must be in range [0, 3] and a compile-time constant. - * @return {TextureNode} A texture node representing the texture sample. - */ - gather(gatherNode?: Node): TextureNode; - /** - * Samples the texture by defining a depth node. - * - * @param {Node} depthNode - The depth node. - * @return {TextureNode} A texture node representing the texture sample. - */ - depth(depthNode: Node): TextureNode; - /** - * Samples the texture by defining an offset node. - * - * @param {Node} offsetNode - The offset node. - * @return {TextureNode} A texture node representing the texture sample. - */ - offset(offsetNode: Node): TextureNode; - /** - * The update is used to implement the update of the uv transformation matrix. - */ - update(): void; - /** - * Clones the texture node. - * - * @return {TextureNode} The cloned texture node. - */ - clone(): TextureNode; -} -/** - * A node that represents the dimensions of a texture. The texture size is - * retrieved in the shader via built-in shader functions like `textureDimensions()` - * or `textureSize()`. - * - * @augments Node - */ -export class TextureSizeNode extends Node { - /** - * Constructs a new texture size node. - * - * @param {TextureNode} textureNode - A texture node which size should be retrieved. - * @param {?Node} [levelNode=null] - A level node which defines the requested mip. - */ - constructor(textureNode: TextureNode, levelNode?: Node | null); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isTextureSizeNode: boolean; - /** - * A texture node which size should be retrieved. - * - * @type {TextureNode} - */ - textureNode: TextureNode; - /** - * A level node which defines the requested mip. - * - * @type {Node} - * @default null - */ - levelNode: Node; - generate(builder: any, output: any): any; -} -import { TimestampQuery } from './three.core.js'; -/** - * This node represents a tone mapping operation. - * - * @augments TempNode - */ -export class ToneMappingNode extends TempNode { - /** - * Constructs a new tone mapping node. - * - * @param {number} toneMapping - The tone mapping type. - * @param {Node} exposureNode - The tone mapping exposure. - * @param {Node} [colorNode=null] - The color node to process. - */ - constructor(toneMapping: number, exposureNode?: Node, colorNode?: Node); - /** - * The tone mapping type. - * - * @private - * @type {number} - */ - private _toneMapping; - /** - * The tone mapping exposure. - * - * @type {Node} - * @default null - */ - exposureNode: Node; - /** - * Represents the color to process. - * - * @type {?Node} - * @default null - */ - colorNode: Node | null; - /** - * Sets the tone mapping type. - * - * @param {number} value - The tone mapping type. - * @return {ToneMappingNode} A reference to this node. - */ - setToneMapping(value: number): ToneMappingNode; - /** - * Gets the tone mapping type. - * - * @returns {number} The tone mapping type. - */ - getToneMapping(): number; - setup(builder: any): any; -} -/** - * Represents a render pass for producing a toon outline effect on compatible objects. - * Only 3D objects with materials of type `MeshToonMaterial` and `MeshToonNodeMaterial` - * will receive the outline. - * - * ```js - * const postProcessing = new RenderPipeline( renderer ); - * - * const scenePass = toonOutlinePass( scene, camera ); - * - * postProcessing.outputNode = scenePass; - * ``` - * @augments PassNode - */ -export class ToonOutlinePassNode extends PassNode { - /** - * Constructs a new outline pass node. - * - * @param {Scene} scene - A reference to the scene. - * @param {Camera} camera - A reference to the camera. - * @param {Node} colorNode - Defines the outline's color. - * @param {Node} thicknessNode - Defines the outline's thickness. - * @param {Node} alphaNode - Defines the outline's alpha. - */ - constructor(scene: Scene, camera: Camera, colorNode: Node, thicknessNode: Node, alphaNode: Node); - /** - * Defines the outline's color. - * - * @type {Node} - */ - colorNode: Node; - /** - * Defines the outline's thickness. - * - * @type {Node} - */ - thicknessNode: Node; - /** - * Defines the outline's alpha. - * - * @type {Node} - */ - alphaNode: Node; - /** - * An internal material cache. - * - * @private - * @type {WeakMap} - */ - private _materialCache; - /** - * Creates the material used for outline rendering. - * - * @private - * @return {NodeMaterial} The outline material. - */ - private _createMaterial; - /** - * For the given toon material, this method returns a corresponding - * outline material. - * - * @private - * @param {(MeshToonMaterial|MeshToonNodeMaterial)} originalMaterial - The toon material. - * @return {NodeMaterial} The outline material. - */ - private _getOutlineMaterial; -} -import { UVMapping } from './three.core.js'; -import { Uint16BufferAttribute } from './three.core.js'; -import { Uint32BufferAttribute } from './three.core.js'; -/** - * Similar to {@link BufferNode} this module represents array-like data as - * uniform buffers. Unlike {@link BufferNode}, it can handle more common - * data types in the array (e.g `three.js` primitives) and automatically - * manage buffer padding. It should be the first choice when working with - * uniforms buffers. - * ```js - * const tintColors = uniformArray( [ - * new Color( 1, 0, 0 ), - * new Color( 0, 1, 0 ), - * new Color( 0, 0, 1 ) - * ], 'color' ); - * - * const redColor = tintColors.element( 0 ); - * - * @augments BufferNode - */ -export class UniformArrayNode extends BufferNode { - /** - * Constructs a new uniform array node. - * - * @param {Array} value - Array holding the buffer data. - * @param {?string} [elementType=null] - The data type of a buffer element. - */ - constructor(value: Array, elementType?: string | null); - /** - * Array holding the buffer data. Unlike {@link BufferNode}, the array can - * hold number primitives as well as three.js objects like vectors, matrices - * or colors. - * - * @type {Array} - */ - array: Array; - /** - * The data type of an array element. - * - * @type {string} - */ - elementType: string; - /** - * The padded type. Uniform buffers must conform to a certain buffer layout - * so a separate type is computed to ensure correct buffer size. - * - * @type {string} - */ - paddedType: string; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isArrayBufferNode: boolean; - /** - * This method is overwritten since the node type is inferred from the - * {@link UniformArrayNode#paddedType}. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(): string; - /** - * The data type of the array elements. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The element type. - */ - getElementType(): string; - /** - * Returns the padded type based on the element type. - * - * @return {string} The padded type. - */ - getPaddedType(): string; - /** - * The update makes sure to correctly transfer the data from the (complex) objects - * in the array to the internal, correctly padded value buffer. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update(): void; - /** - * Implement the value buffer creation based on the array data. - * - * @param {NodeBuilder} builder - A reference to the current node builder. - * @return {null} - */ - setup(builder: NodeBuilder): null; - /** - * Overwrites the default `element()` method to provide element access - * based on {@link UniformArrayNode}. - * - * @param {IndexNode} indexNode - The index node. - * @return {UniformArrayElementNode} - */ - element(indexNode: IndexNode): UniformArrayElementNode; -} -/** - * This node can be used to group single instances of {@link UniformNode} - * and manage them as a uniform buffer. - * - * In most cases, the predefined nodes `objectGroup`, `renderGroup` and `frameGroup` - * will be used when defining the {@link UniformNode#groupNode} property. - * - * - `objectGroup`: Uniform buffer per object. - * - `renderGroup`: Shared uniform buffer, updated once per render call. - * - `frameGroup`: Shared uniform buffer, updated once per frame. - * - * @augments Node - */ -export class UniformGroupNode extends Node { - /** - * Constructs a new uniform group node. - * - * @param {string} name - The name of the uniform group node. - * @param {boolean} [shared=false] - Whether this uniform group node is shared or not. - * @param {number} [order=1] - Influences the internal sorting. - * @param {string|null} [updateType=null] - The update type of the uniform group node. - */ - constructor(name: string, shared?: boolean, order?: number, updateType?: string | null); - /** - * Whether this uniform group node is shared or not. - * - * @type {boolean} - * @default false - */ - shared: boolean; - /** - * Influences the internal sorting. - * TODO: Add details when this property should be changed. - * - * @type {number} - * @default 1 - */ - order: number; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isUniformGroup: boolean; - /** - * Marks the uniform group node as needing an update. - * This will trigger the necessary updates in the rendering process. - */ - update(): void; -} -/** - * Class for representing a uniform. - * - * @augments InputNode - */ -export class UniformNode extends InputNode { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isUniformNode: boolean; - /** - * The uniform group of this uniform. By default, uniforms are - * managed per object but they might belong to a shared group - * which is updated per frame or render call. - * - * @type {UniformGroupNode} - */ - groupNode: UniformGroupNode; - /** - * Sets the {@link UniformNode#name} property. - * - * @param {string} name - The name of the uniform. - * @return {UniformNode} A reference to this node. - */ - setName(name: string): UniformNode; - /** - * Sets the {@link UniformNode#name} property. - * - * @deprecated - * @param {string} name - The name of the uniform. - * @return {UniformNode} A reference to this node. - */ - label(name: string): UniformNode; - /** - * Sets the {@link UniformNode#groupNode} property. - * - * @param {UniformGroupNode} group - The uniform group. - * @return {UniformNode} A reference to this node. - */ - setGroup(group: UniformGroupNode): UniformNode; - /** - * Returns the {@link UniformNode#groupNode}. - * - * @return {UniformGroupNode} The uniform group. - */ - getGroup(): UniformGroupNode; - /** - * By default, this method returns the result of {@link Node#getHash} but derived - * classes might overwrite this method with a different implementation. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The uniform hash. - */ - getUniformHash(builder: NodeBuilder): string; - onUpdate(callback: any, updateType: any): Node; - getInputType(builder: any): string; - generate(builder: any, output: any): any; -} -/** - * This node represents an operation that unpacks values from a 32-bit unsigned integer, reinterpreting the results as a floating-point vector - * - * @augments TempNode - */ -export class UnpackFloatNode extends TempNode { - /** - * - * @param {'snorm' | 'unorm' | 'float16'} encoding - The numeric encoding that describes how the integer values are mapped to the float range - * @param {Node} uintNode - The uint node to be unpacked - */ - constructor(encoding: "snorm" | "unorm" | "float16", uintNode: Node); - /** - * The unsigned integer to be unpacked. - * - * @type {Node} - */ - uintNode: Node; - /** - * The numeric encoding. - * - * @type {string} - */ - encoding: string; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isUnpackFloatNode: boolean; - generateNodeType(): string; - generate(builder: any): string; -} -import { UnsignedByteType } from './three.core.js'; -import { UnsignedInt101111Type } from './three.core.js'; -import { UnsignedInt248Type } from './three.core.js'; -import { UnsignedInt5999Type } from './three.core.js'; -import { UnsignedIntType } from './three.core.js'; -import { UnsignedShort4444Type } from './three.core.js'; -import { UnsignedShort5551Type } from './three.core.js'; -import { UnsignedShortType } from './three.core.js'; -/** - * A special type of reference node that allows to link values in - * `userData` fields to node objects. - * ```js - * sprite.userData.rotation = 1; // stores individual rotation per sprite - * - * const material = new THREE.SpriteNodeMaterial(); - * material.rotationNode = userData( 'rotation', 'float' ); - * ``` - * Since `UserDataNode` is extended from {@link ReferenceNode}, the node value - * will automatically be updated when the `rotation` user data field changes. - * - * @augments ReferenceNode - */ -export class UserDataNode extends ReferenceNode { - /** - * Constructs a new user data node. - * - * @param {string} property - The property name that should be referenced by the node. - * @param {string} inputType - The node data type of the reference. - * @param {?Object} [userData=null] - A reference to the `userData` object. If not provided, the `userData` property of the 3D object that uses the node material is evaluated. - */ - constructor(property: string, inputType: string, userData?: Object | null); - /** - * A reference to the `userData` object. If not provided, the `userData` - * property of the 3D object that uses the node material is evaluated. - * - * @type {?Object} - * @default null - */ - userData: Object | null; -} -import { VSMShadowMap } from './three.core.js'; -/** - * Class for representing shader variables as nodes. Variables are created from - * existing nodes like the following: - * - * ```js - * const depth = sampleDepth( uvNode ).toVar( 'depth' ); - * ``` - * - * @augments Node - */ -export class VarNode extends Node { - /** - * Constructs a new variable node. - * - * @param {Node} node - The node for which a variable should be created. - * @param {?string} [name=null] - The name of the variable in the shader. - * @param {boolean} [readOnly=false] - The read-only flag. - */ - constructor(node: Node, name?: string | null, readOnly?: boolean); - /** - * The node for which a variable should be created. - * - * @type {Node} - */ - node: Node; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isVarNode: boolean; - /** - * - * The read-only flag. - * - * @type {boolean} - * @default false - */ - readOnly: boolean; - /** - * This flag is used to indicate that this node is used for intent. - * - * @type {boolean} - * @default false - */ - intent: boolean; - /** - * Sets the intent flag for this node. - * - * This flag is used to indicate that this node is used for intent - * and should not be built directly. Instead, it is used to indicate that - * the node should be treated as a variable intent. - * - * It's useful for assigning variables without needing creating a new variable node. - * - * @param {boolean} value - The value to set for the intent flag. - * @returns {VarNode} This node. - */ - setIntent(value: boolean): VarNode; - /** - * Checks if this node is used for intent. - * - * @param {NodeBuilder} builder - The node builder. - * @returns {boolean} Whether this node is used for intent. - */ - isIntent(builder: NodeBuilder): boolean; - /** - * Returns the intent flag of this node. - * - * @return {boolean} The intent flag. - */ - getIntent(): boolean; - getMemberType(builder: any, name: any): string; - getElementType(builder: any): string; - generateNodeType(builder: any): string; - getArrayCount(builder: any): number | null; - isAssign(builder: any): any; - build(...params: any[]): string | Node | null; - generate(builder: any): any; - _hasStack(builder: any): boolean; -} -/** - * Class for representing shader varyings as nodes. Varyings are create from - * existing nodes like the following: - * - * ```js - * const positionLocal = positionGeometry.toVarying( 'vPositionLocal' ); - * ``` - * - * @augments Node - */ -export class VaryingNode extends Node { - /** - * Constructs a new varying node. - * - * @param {Node} node - The node for which a varying should be created. - * @param {?string} name - The name of the varying in the shader. - */ - constructor(node: Node, name?: string | null); - /** - * The node for which a varying should be created. - * - * @type {Node} - */ - node: Node; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isVaryingNode: boolean; - /** - * The interpolation type of the varying data. - * - * @type {?string} - * @default null - */ - interpolationType: string | null; - /** - * The interpolation sampling type of varying data. - * - * @type {?string} - * @default null - */ - interpolationSampling: string | null; - /** - * Defines the interpolation type of the varying. - * - * @param {string} type - The interpolation type. - * @param {?string} sampling - The interpolation sampling type - * @return {VaryingNode} A reference to this node. - */ - setInterpolation(type: string, sampling?: string | null): VaryingNode; - getHash(builder: any): string; - generateNodeType(builder: any): string; - /** - * This method performs the setup of a varying node with the current node builder. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {NodeVarying} The node varying from the node builder. - */ - setupVarying(builder: NodeBuilder): NodeVarying; - setup(builder: any): void; - analyze(builder: any): void; - generate(builder: any): any; -} -import { Vector2 } from './three.core.js'; -import { Vector3 } from './three.core.js'; -import { Vector4 } from './three.core.js'; -/** - * A node for representing motion or velocity vectors. Foundation - * for advanced post processing effects like motion blur or TRAA. - * - * The node keeps track of the model, view and projection matrices - * of the previous frame and uses them to compute offsets in NDC space. - * These offsets represent the final velocity. - * - * @augments TempNode - */ -export class VelocityNode extends TempNode { - /** - * Constructs a new vertex color node. - */ - constructor(); - /** - * The current projection matrix. - * - * @type {?Matrix4} - * @default null - */ - projectionMatrix: Matrix4 | null; - /** - * Uniform node representing the previous model matrix in world space. - * - * @type {UniformNode} - * @default null - */ - previousModelWorldMatrix: UniformNode; - /** - * Uniform node representing the previous projection matrix. - * - * @type {UniformNode} - * @default null - */ - previousProjectionMatrix: UniformNode; - /** - * Uniform node representing the previous view matrix. - * - * @type {UniformNode} - * @default null - */ - previousCameraViewMatrix: UniformNode; - /** - * Sets the given projection matrix. - * - * @param {Matrix4} projectionMatrix - The projection matrix to set. - */ - setProjectionMatrix(projectionMatrix: Matrix4): void; - /** - * Updates velocity specific uniforms. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update({ frameId, camera, object }: NodeFrame): void; - /** - * Overwritten to updated velocity specific uniforms. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - updateAfter({ object }: NodeFrame): void; - /** - * Implements the velocity computation based on the previous and current vertex data. - * - * @param {NodeBuilder} builder - A reference to the current node builder. - * @return {Node} The motion vector. - */ - setup(): Node; -} -/** - * An attribute node for representing vertex colors. - * - * @augments AttributeNode - */ -export class VertexColorNode extends AttributeNode { - /** - * Constructs a new vertex color node. - * - * @param {number} index - The attribute index. - */ - constructor(index: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isVertexColorNode: boolean; - /** - * The attribute index to enable more than one sets of vertex colors. - * - * @type {number} - * @default 0 - */ - index: number; -} -/** - * This node offers a collection of features in context of the depth logic in the fragment shader. - * Depending on {@link ViewportDepthNode#scope}, it can be used to define a depth value for the current - * fragment or for depth evaluation purposes. - * - * @augments Node - */ -export class ViewportDepthNode extends Node { - /** - * Constructs a new viewport depth node. - * - * @param {('depth'|'depthBase'|'linearDepth')} scope - The node's scope. - * @param {?Node} [valueNode=null] - The value node. - */ - constructor(scope: ("depth" | "depthBase" | "linearDepth"), valueNode?: Node | null); - /** - * The node behaves differently depending on which scope is selected. - * - * - `ViewportDepthNode.DEPTH_BASE`: Allows to define a value for the current fragment's depth. - * - `ViewportDepthNode.DEPTH`: Represents the depth value for the current fragment (`valueNode` is ignored). - * - `ViewportDepthNode.LINEAR_DEPTH`: Represents the linear (orthographic) depth value of the current fragment. - * If a `valueNode` is set, the scope can be used to convert perspective depth data to linear data. - * - * @type {('depth'|'depthBase'|'linearDepth')} - */ - scope: ("depth" | "depthBase" | "linearDepth"); - /** - * Can be used to define a custom depth value. - * The property is ignored in the `ViewportDepthNode.DEPTH` scope. - * - * @type {?Node} - * @default null - */ - valueNode: Node | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isViewportDepthNode: boolean; - generate(builder: any): any; - setup({ camera }: { - camera: any; - }): any; -} -export namespace ViewportDepthNode { - export let DEPTH_BASE: string; - let DEPTH_1: string; - export { DEPTH_1 as DEPTH }; - export let LINEAR_DEPTH: string; -} -/** - * Represents the depth of the current viewport as a texture. This module - * can be used in combination with viewport texture to achieve effects - * that require depth evaluation. - * - * @augments ViewportTextureNode - */ -export class ViewportDepthTextureNode extends ViewportTextureNode { - /** - * Constructs a new viewport depth texture node. - * - * @param {Node} [uvNode=screenUV] - The uv node. - * @param {?Node} [levelNode=null] - The level node. - * @param {?DepthTexture} [depthTexture=null] - A depth texture. If not provided, uses a shared depth texture. - */ - constructor(uvNode?: Node, levelNode?: Node | null, depthTexture?: DepthTexture | null); -} -/** - * `ViewportTextureNode` creates an internal texture for each node instance. This module - * shares a texture across all instances of `ViewportSharedTextureNode`. It should - * be the first choice when using data of the default/screen framebuffer for performance reasons. - * - * @augments ViewportTextureNode - */ -export class ViewportSharedTextureNode extends ViewportTextureNode { - /** - * Constructs a new viewport shared texture node. - * - * @param {Node} [uvNode=screenUV] - The uv node. - * @param {?Node} [levelNode=null] - The level node. - */ - constructor(uvNode?: Node, levelNode?: Node | null); - /** - * Overwritten so the method always returns the unique shared - * framebuffer texture. - * - * @return {FramebufferTexture} The shared framebuffer texture. - */ - getTextureForReference(): FramebufferTexture; - updateReference(): this; -} -/** - * A special type of texture node which represents the data of the current viewport - * as a texture. The module extracts data from the current bound framebuffer with - * a copy operation so no extra render pass is required to produce the texture data - * (which is good for performance). `ViewportTextureNode` can be used as an input for a - * variety of effects like refractive or transmissive materials. - * - * @augments TextureNode - */ -export class ViewportTextureNode extends TextureNode { - /** - * Constructs a new viewport texture node. - * - * @param {Node} [uvNode=screenUV] - The uv node. - * @param {?Node} [levelNode=null] - The level node. - * @param {?Texture} [framebufferTexture=null] - A framebuffer texture holding the viewport data. If not provided, a framebuffer texture is created automatically. - */ - constructor(uvNode?: Node, levelNode?: Node | null, framebufferTexture?: Texture | null); - /** - * Whether to generate mipmaps or not. - * - * @type {boolean} - * @default false - */ - generateMipmaps: boolean; - /** - * The reference framebuffer texture. This is used to store the framebuffer texture - * for the current render target. If the render target changes, a new framebuffer texture - * is created automatically. - * - * @type {FramebufferTexture} - * @default null - */ - defaultFramebuffer: FramebufferTexture; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isOutputTextureNode: boolean; - /** - * The framebuffer texture for the current renderer context. - * - * @type {WeakMap} - * @private - */ - private _cacheTextures; - /** - * This methods returns a texture for the given render target or canvas target reference. - * - * To avoid rendering errors, `ViewportTextureNode` must use unique framebuffer textures - * for different render contexts. - * - * @param {?(RenderTarget|CanvasTarget)} [reference=null] - The render target or canvas target reference. - * @return {Texture} The framebuffer texture. - */ - getTextureForReference(reference?: (RenderTarget | CanvasTarget) | null): Texture; - updateReference(frame: any): Texture; - updateBefore(frame: any): void; - clone(): any; -} -/** - * Volume node material. - * - * @augments NodeMaterial - */ -export class VolumeNodeMaterial extends NodeMaterial { - /** - * Constructs a new volume node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isVolumeNodeMaterial: boolean; - /** - * Number of steps used for raymarching. - * - * @type {number} - * @default 25 - */ - steps: number; - /** - * Offsets the distance a ray has been traveled through a volume. - * Can be used to implement dithering to reduce banding. - * - * @type {Node} - * @default null - */ - offsetNode: Node; - /** - * Node used for scattering calculations. - * - * @type {Function|FunctionNode} - * @default null - */ - scatteringNode: Function | FunctionNode; - setupLightingModel(): VolumetricLightingModel; -} -/** - * A backend implementation targeting WebGL 2. - * - * @private - * @augments Backend - */ -export class WebGLBackend extends Backend { - /** - * WebGLBackend options. - * - * @typedef {Object} WebGLBackend~Options - * @property {boolean} [logarithmicDepthBuffer=false] - Whether logarithmic depth buffer is enabled or not. - * @property {boolean} [reversedDepthBuffer=false] - Whether reversed depth buffer is enabled or not. - * @property {boolean} [alpha=true] - Whether the default framebuffer (which represents the final contents of the canvas) should be transparent or opaque. - * @property {boolean} [depth=true] - Whether the default framebuffer should have a depth buffer or not. - * @property {boolean} [stencil=false] - Whether the default framebuffer should have a stencil buffer or not. - * @property {boolean} [antialias=false] - Whether MSAA as the default anti-aliasing should be enabled or not. - * @property {number} [samples=0] - When `antialias` is `true`, `4` samples are used by default. Set this parameter to any other integer value than 0 to overwrite the default. - * @property {boolean} [forceWebGL=false] - If set to `true`, the renderer uses a WebGL 2 backend no matter if WebGPU is supported or not. - * @property {WebGL2RenderingContext} [context=undefined] - A WebGL 2 rendering context. - */ - /** - * Constructs a new WebGPU backend. - * - * @param {WebGLBackend~Options} [parameters] - The configuration parameter. - */ - constructor(parameters?: {}); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWebGLBackend: boolean; - /** - * A reference to a backend module holding shader attribute-related - * utility functions. - * - * @type {?WebGLAttributeUtils} - * @default null - */ - attributeUtils: WebGLAttributeUtils | null; - /** - * A reference to a backend module holding extension-related - * utility functions. - * - * @type {?WebGLExtensions} - * @default null - */ - extensions: WebGLExtensions | null; - /** - * A reference to a backend module holding capability-related - * utility functions. - * - * @type {?WebGLCapabilities} - * @default null - */ - capabilities: WebGLCapabilities | null; - /** - * A reference to a backend module holding texture-related - * utility functions. - * - * @type {?WebGLTextureUtils} - * @default null - */ - textureUtils: WebGLTextureUtils | null; - /** - * A reference to a backend module holding renderer-related - * utility functions. - * - * @type {?WebGLBufferRenderer} - * @default null - */ - bufferRenderer: WebGLBufferRenderer | null; - /** - * A reference to the rendering context. - * - * @type {?WebGL2RenderingContext} - * @default null - */ - gl: WebGL2RenderingContext | null; - /** - * A reference to a backend module holding state-related - * utility functions. - * - * @type {?WebGLState} - * @default null - */ - state: WebGLState | null; - /** - * A reference to a backend module holding common - * utility functions. - * - * @type {?WebGLUtils} - * @default null - */ - utils: WebGLUtils | null; - /** - * Dictionary for caching VAOs. - * - * @type {Object} - */ - vaoCache: { - [x: string]: WebGLVertexArrayObject; - }; - /** - * Dictionary for caching transform feedback objects. - * - * @type {Object} - */ - transformFeedbackCache: { - [x: string]: WebGLTransformFeedback; - }; - /** - * Controls if `gl.RASTERIZER_DISCARD` should be enabled or not. - * Only relevant when using compute shaders. - * - * @type {boolean} - * @default false - */ - discard: boolean; - /** - * A reference to the `EXT_disjoint_timer_query_webgl2` extension. `null` if the - * device does not support the extension. - * - * @type {?EXTDisjointTimerQueryWebGL2} - * @default null - */ - disjoint: EXTDisjointTimerQueryWebGL2 | null; - /** - * A reference to the `KHR_parallel_shader_compile` extension. `null` if the - * device does not support the extension. - * - * @type {?KHRParallelShaderCompile} - * @default null - */ - parallel: KHRParallelShaderCompile | null; - /** - * A reference to the current render context. - * - * @private - * @type {RenderContext} - * @default null - */ - private _currentContext; - /** - * A unique collection of bindings. - * - * @private - * @type {WeakSet>} - */ - private _knownBindings; - /** - * Whether the device supports framebuffers invalidation or not. - * - * @private - * @type {boolean} - */ - private _supportsInvalidateFramebuffer; - /** - * The target framebuffer when rendering with - * the WebXR device API. - * - * @private - * @type {?WebGLFramebuffer} - * @default null - */ - private _xrFramebuffer; - /** - * Initializes the backend so it is ready for usage. - * - * @param {Renderer} renderer - The renderer. - */ - init(renderer: Renderer): void; - _onContextLost: ((event: any) => void) | undefined; - drawBuffersIndexedExt: Object | undefined; - /** - * This method performs a readback operation by moving buffer data from - * a storage buffer attribute from the GPU to the CPU. ReadbackBuffer can - * be used to retain and reuse handles to the intermediate buffers and prevent - * new allocation. - * - * @async - * @param {BufferAttribute} attribute - The storage buffer attribute to read frm. - * @param {ReadbackBuffer|ArrayBuffer} target - The storage buffer attribute. - * @param {number} offset - The storage buffer attribute. - * @param {number} count - The offset from which to start reading the - * @return {Promise} A promise that resolves with the buffer data when the data are ready. - */ - getArrayBufferAsync(attribute: BufferAttribute, target?: ReadbackBuffer | ArrayBuffer, offset?: number, count?: number): Promise; - /** - * Ensures the backend is XR compatible. - * - * @async - * @return {Promise} A Promise that resolve when the renderer is XR compatible. - */ - makeXRCompatible(): Promise; - /** - * Sets the XR rendering destination. - * - * @param {WebGLFramebuffer} xrFramebuffer - The XR framebuffer. - */ - setXRTarget(xrFramebuffer: WebGLFramebuffer): void; - /** - * Configures the given XR render target with external textures. - * - * This method is only relevant when using the WebXR Layers API. - * - * @param {XRRenderTarget} renderTarget - The XR render target. - * @param {WebGLTexture} colorTexture - A native color texture. - * @param {?WebGLTexture} [depthTexture=null] - A native depth texture. - */ - setXRRenderTargetTextures(renderTarget: XRRenderTarget, colorTexture: WebGLTexture, depthTexture?: WebGLTexture | null): void; - /** - * Inits a time stamp query for the given render context. - * - * @param {string} type - The type of the timestamp query. - * @param {string} uid - A unique identifier for the timestamp query. - */ - initTimestampQuery(type: string, uid: string): void; - /** - * Prepares the timestamp buffer. - * - * @param {string} type - The type of the timestamp query. - * @param {string} uid - A unique identifier for the timestamp query. - */ - prepareTimestampBuffer(type: string, uid: string): void; - /** - * Returns the backend's rendering context. - * - * @return {WebGL2RenderingContext} The rendering context. - */ - getContext(): WebGL2RenderingContext; - /** - * This method is executed at the beginning of a render call and prepares - * the WebGL state for upcoming render calls - * - * @param {RenderContext} renderContext - The render context. - */ - beginRender(renderContext: RenderContext): void; - /** - * This method is executed at the end of a render call and finalizes work - * after draw calls. - * - * @param {RenderContext} renderContext - The render context. - */ - finishRender(renderContext: RenderContext): void; - /** - * This method processes the result of occlusion queries and writes it - * into render context data. - * - * @async - * @param {RenderContext} renderContext - The render context. - */ - resolveOccludedAsync(renderContext: RenderContext): void; - /** - * Returns `true` if the given 3D object is fully occluded by other - * 3D objects in the scene. - * - * @param {RenderContext} renderContext - The render context. - * @param {Object3D} object - The 3D object to test. - * @return {boolean} Whether the 3D object is fully occluded or not. - */ - isOccluded(renderContext: RenderContext, object: Object3D): boolean; - /** - * Updates the viewport with the values from the given render context. - * - * @param {RenderContext} renderContext - The render context. - */ - updateViewport(renderContext: RenderContext): void; - /** - * Updates the scissor with the values from the given render context. - * - * @param {RenderContext} renderContext - The render context. - */ - updateScissor(renderContext: RenderContext): void; - /** - * Defines the scissor test. - * - * @param {boolean} boolean - Whether the scissor test should be enabled or not. - */ - setScissorTest(boolean: boolean): void; - /** - * Performs a clear operation. - * - * @param {boolean} color - Whether the color buffer should be cleared or not. - * @param {boolean} depth - Whether the depth buffer should be cleared or not. - * @param {boolean} stencil - Whether the stencil buffer should be cleared or not. - * @param {?Object} [descriptor=null] - The render context of the current set render target. - * @param {boolean} [setFrameBuffer=true] - Controls whether the intermediate framebuffer should be set or not. - * @param {boolean} [resolveRenderTarget=true] - Controls whether an active render target should be resolved - * or not. Only relevant for explicit clears. - */ - clear(color: boolean, depth: boolean, stencil: boolean, descriptor?: Object | null, setFrameBuffer?: boolean, resolveRenderTarget?: boolean): void; - /** - * This method is executed at the beginning of a compute call and - * prepares the state for upcoming compute tasks. - * - * @param {Node|Array} computeGroup - The compute node(s). - */ - beginCompute(computeGroup: Node | Array): void; - /** - * Executes a compute command for the given compute node. - * - * @param {Node|Array} computeGroup - The group of compute nodes of a compute call. Can be a single compute node. - * @param {Node} computeNode - The compute node. - * @param {Array} bindings - The bindings. - * @param {ComputePipeline} pipeline - The compute pipeline. - * @param {?number} [count=null] - The count of compute invocations. If `null`, the count is determined by the compute node. - */ - compute(computeGroup: Node | Array, computeNode: Node, bindings: Array, pipeline: ComputePipeline, count?: number | null): void; - /** - * This method is executed at the end of a compute call and - * finalizes work after compute tasks. - * - * @param {Node|Array} computeGroup - The compute node(s). - */ - finishCompute(computeGroup: Node | Array): void; - /** - * Internal to determine if the current render target is a render target array with depth 2D array texture. - * - * @param {RenderContext} renderContext - The render context. - * @return {boolean} Whether the render target is a render target array with depth 2D array texture. - * - * @private - */ - private _isRenderCameraDepthArray; - /** - * Internal draw function. - * - * @private - * @param {Object3D} object - The object to render. - * @param {WebGLBufferRenderer} renderer - The internal renderer. - * @param {number} firstVertex - The first vertex to render. - * @param {number} vertexCount - The vertex count. - * @param {number} instanceCount - The intance count. - * @param {WebGLProgram} programGPU - The raw WebGL shader program. - */ - private _draw; - /** - * Executes a draw command for the given render object. - * - * @param {RenderObject} renderObject - The render object to draw. - * @param {Info} info - Holds a series of statistical information about the GPU memory and the rendering process. - */ - draw(renderObject: RenderObject): void; - /** - * Creates a default texture for the given texture that can be used - * as a placeholder until the actual texture is ready for usage. - * - * @param {Texture} texture - The texture to create a default texture for. - */ - createDefaultTexture(texture: Texture): void; - /** - * Defines a texture on the GPU for the given texture object. - * - * @param {Texture} texture - The texture. - * @param {Object} [options={}] - Optional configuration parameter. - */ - createTexture(texture: Texture, options?: Object): void; - /** - * Uploads the updated texture data to the GPU. - * - * @param {Texture} texture - The texture. - * @param {Object} [options={}] - Optional configuration parameter. - */ - updateTexture(texture: Texture, options?: Object): void; - /** - * Generates mipmaps for the given texture. - * - * @param {Texture} texture - The texture. - */ - generateMipmaps(texture: Texture): void; - /** - * Destroys the GPU data for the given texture object. - * - * @param {Texture} texture - The texture. - * @param {boolean} [isDefaultTexture=false] - Whether the texture uses a default GPU texture or not. - */ - destroyTexture(texture: Texture, isDefaultTexture?: boolean): void; - /** - * Returns texture data as a typed array. - * - * @async - * @param {Texture} texture - The texture to copy. - * @param {number} x - The x coordinate of the copy origin. - * @param {number} y - The y coordinate of the copy origin. - * @param {number} width - The width of the copy. - * @param {number} height - The height of the copy. - * @param {number} faceIndex - The face index. - * @return {Promise} A Promise that resolves with a typed array when the copy operation has finished. - */ - copyTextureToBuffer(texture: Texture, x: number, y: number, width: number, height: number, faceIndex: number): Promise; - /** - * Returns a node builder for the given render object. - * - * @param {RenderObject} object - The render object. - * @param {Renderer} renderer - The renderer. - * @return {GLSLNodeBuilder} The node builder. - */ - createNodeBuilder(object: RenderObject, renderer: Renderer): GLSLNodeBuilder; - /** - * Creates a shader program from the given programmable stage. - * - * @param {ProgrammableStage} program - The programmable stage. - */ - createProgram(program: ProgrammableStage): void; - /** - * Destroys the shader program of the given programmable stage. - * - * @param {ProgrammableStage} program - The programmable stage. - */ - destroyProgram(program: ProgrammableStage): void; - /** - * Creates a render pipeline for the given render object. - * - * @param {RenderObject} renderObject - The render object. - * @param {Array} promises - An array of compilation promises which are used in `compileAsync()`. - */ - createRenderPipeline(renderObject: RenderObject, promises: Array>): void; - /** - * Formats the source code of error messages. - * - * @private - * @param {string} string - The code. - * @param {number} errorLine - The error line. - * @return {string} The formatted code. - */ - private _handleSource; - /** - * Gets the shader compilation errors from the info log. - * - * @private - * @param {WebGL2RenderingContext} gl - The rendering context. - * @param {WebGLShader} shader - The WebGL shader object. - * @param {string} type - The shader type. - * @return {string} The shader errors. - */ - private _getShaderErrors; - /** - * Logs shader compilation errors. - * - * @private - * @param {WebGLProgram} programGPU - The WebGL program. - * @param {WebGLShader} glFragmentShader - The fragment shader as a native WebGL shader object. - * @param {WebGLShader} glVertexShader - The vertex shader as a native WebGL shader object. - */ - private _logProgramError; - /** - * Completes the shader program setup for the given render object. - * - * @private - * @param {RenderObject} renderObject - The render object. - * @param {RenderPipeline} pipeline - The render pipeline. - */ - private _completeCompile; - /** - * Creates a compute pipeline for the given compute node. - * - * @param {ComputePipeline} computePipeline - The compute pipeline. - * @param {Array} bindings - The bindings. - */ - createComputePipeline(computePipeline: ComputePipeline, bindings: Array): void; - /** - * Creates bindings from the given bind group definition. - * - * @param {BindGroup} bindGroup - The bind group. - * @param {Array} bindings - Array of bind groups. - * @param {number} cacheIndex - The cache index. - * @param {number} version - The version. - */ - createBindings(bindGroup: BindGroup, bindings: Array): void; - /** - * Updates the given bind group definition. - * - * @param {BindGroup} bindGroup - The bind group. - * @param {Array} bindings - Array of bind groups. - * @param {number} cacheIndex - The cache index. - * @param {number} version - The version. - */ - updateBindings(bindGroup: BindGroup): void; - /** - * Updates a buffer binding. - * - * @param {Buffer} binding - The buffer binding to update. - */ - updateBinding(binding: Buffer): void; - /** - * Creates a uniform buffer. - * - * @param {Buffer} uniformBuffer - The uniform buffer. - */ - createUniformBuffer(uniformBuffer: Buffer): void; - /** - * Destroys the GPU data for the given uniform buffer. - * - * @param {Buffer} uniformBuffer - The uniform buffer. - */ - destroyUniformBuffer(uniformBuffer: Buffer): void; - /** - * Creates the GPU buffer of an indexed shader attribute. - * - * @param {BufferAttribute} attribute - The indexed buffer attribute. - */ - createIndexAttribute(attribute: BufferAttribute): void; - /** - * Creates the GPU buffer of a shader attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - */ - createAttribute(attribute: BufferAttribute): void; - /** - * Creates the GPU buffer of a storage attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - */ - createStorageAttribute(attribute: BufferAttribute): void; - /** - * Updates the GPU buffer of a shader attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute to update. - */ - updateAttribute(attribute: BufferAttribute): void; - /** - * Destroys the GPU buffer of a shader attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute to destroy. - */ - destroyAttribute(attribute: BufferAttribute): void; - /** - * Checks if the given feature is supported by the backend. - * - * @param {string} name - The feature's name. - * @return {boolean} Whether the feature is supported or not. - */ - hasFeature(name: string): boolean; - /** - * Copies data of the given source texture to the given destination texture. - * - * @param {Texture} srcTexture - The source texture. - * @param {Texture} dstTexture - The destination texture. - * @param {?(Box3|Box2)} [srcRegion=null] - The region of the source texture to copy. - * @param {?(Vector2|Vector3)} [dstPosition=null] - The destination position of the copy. - * @param {number} [srcLevel=0] - The source mip level to copy from. - * @param {number} [dstLevel=0] - The destination mip level to copy to. - */ - copyTextureToTexture(srcTexture: Texture, dstTexture: Texture, srcRegion?: (Box3 | Box2) | null, dstPosition?: (Vector2 | Vector3) | null, srcLevel?: number, dstLevel?: number): void; - /** - * Copies the current bound framebuffer to the given texture. - * - * @param {Texture} texture - The destination texture. - * @param {RenderContext} renderContext - The render context. - * @param {Vector4} rectangle - A four dimensional vector defining the origin and dimension of the copy. - */ - copyFramebufferToTexture(texture: Texture, renderContext: RenderContext, rectangle: Vector4): void; - /** - * Checks if the given compatibility is supported by the backend. - * - * @param {string} name - The compatibility name. - * @return {boolean} Whether the compatibility is supported or not. - */ - hasCompatibility(name: string): boolean; - /** - * Initializes the render target defined in the given render context. - * - * @param {RenderContext} renderContext - The render context. - */ - initRenderTarget(renderContext: RenderContext): void; - /** - * Configures the active framebuffer from the given render context. - * - * @private - * @param {RenderContext} descriptor - The render context. - */ - private _setFramebuffer; - /** - * Computes the VAO key for the given index and attributes. - * - * @private - * @param {Array} attributes - An array of buffer attributes. - * @return {string} The VAO key. - */ - private _getVaoKey; - /** - * Creates a VAO from the index and attributes. - * - * @private - * @param {Array} attributes - An array of buffer attributes. - * @return {Object} The VAO data. - */ - private _createVao; - /** - * Creates a transform feedback from the given transform buffers. - * - * @private - * @param {Array} transformBuffers - The transform buffers. - * @return {WebGLTransformFeedback} The transform feedback. - */ - private _getTransformFeedback; - /** - * Setups the given bindings. - * - * @private - * @param {Array} bindings - The bindings. - * @param {WebGLProgram} programGPU - The WebGL program. - */ - private _setupBindings; - /** - * Binds the given uniforms. - * - * @private - * @param {Array} bindings - The bindings. - */ - private _bindUniforms; - /** - * The method ensures multisampled render targets are resolved. - * - * @private - * @param {RenderContext} renderContext - The render context. - */ - private _resolveRenderTarget; - /** - * Returns `true` if the `WEBGL_multisampled_render_to_texture` extension - * should be used when MSAA is enabled. - * - * @private - * @param {RenderTarget} renderTarget - The render target that should be multisampled. - * @return {boolean} Whether to use the `WEBGL_multisampled_render_to_texture` extension for MSAA or not. - */ - private _useMultisampledExtension; -} -/** - * A WebGL 2 backend utility module for managing the device's capabilities. - * - * @private - */ -export class WebGLCapabilities { - /** - * Constructs a new utility object. - * - * @param {WebGLBackend} backend - The WebGL 2 backend. - */ - constructor(backend: WebGLBackend); - /** - * A reference to the WebGL 2 backend. - * - * @type {WebGLBackend} - */ - backend: WebGLBackend; - /** - * This value holds the cached max anisotropy value. - * - * @type {?number} - * @default null - */ - maxAnisotropy: number | null; - /** - * This value holds the cached max uniform block size value. - * - * @type {?number} - * @default null - */ - maxUniformBlockSize: number | null; - /** - * Returns the maximum anisotropy texture filtering value. This value - * depends on the device and is reported by the `EXT_texture_filter_anisotropic` - * WebGL extension. - * - * @return {number} The maximum anisotropy texture filtering value. - */ - getMaxAnisotropy(): number; - /** - * Returns the maximum number of bytes available for uniform buffers. - * - * @return {number} The maximum number of bytes available for uniform buffers. - */ - getUniformBufferLimit(): number; -} -import { WebGLCoordinateSystem } from './three.core.js'; -/** - * A backend implementation targeting WebGPU. - * - * @private - * @augments Backend - */ -export class WebGPUBackend extends Backend { - /** - * WebGPUBackend options. - * - * @typedef {Object} WebGPUBackend~Options - * @property {boolean} [logarithmicDepthBuffer=false] - Whether logarithmic depth buffer is enabled or not. - * @property {boolean} [reversedDepthBuffer=false] - Whether reversed depth buffer is enabled or not. - * @property {boolean} [alpha=true] - Whether the default framebuffer (which represents the final contents of the canvas) should be transparent or opaque. - * @property {boolean} [depth=true] - Whether the default framebuffer should have a depth buffer or not. - * @property {boolean} [stencil=false] - Whether the default framebuffer should have a stencil buffer or not. - * @property {boolean} [antialias=false] - Whether MSAA as the default anti-aliasing should be enabled or not. - * @property {number} [samples=0] - When `antialias` is `true`, `4` samples are used by default. Set this parameter to any other integer value than 0 to overwrite the default. - * @property {boolean} [forceWebGL=false] - If set to `true`, the renderer uses a WebGL 2 backend no matter if WebGPU is supported or not. - * @property {boolean} [trackTimestamp=false] - Whether to track timestamps with a Timestamp Query API or not. - * @property {string} [powerPreference=undefined] - The power preference. - * @property {Object} [requiredLimits=undefined] - Specifies the limits that are required by the device request. The request will fail if the adapter cannot provide these limits. - * @property {GPUDevice} [device=undefined] - If there is an existing GPU device on app level, it can be passed to the renderer as a parameter. - * @property {number} [outputType=undefined] - Texture type for output to canvas. By default, device's preferred format is used; other formats may incur overhead. - */ - /** - * Constructs a new WebGPU backend. - * - * @param {WebGPUBackend~Options} [parameters] - The configuration parameter. - */ - constructor(parameters?: {}); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWebGPUBackend: boolean; - /** - * Indicates whether the backend is in WebGPU compatibility mode or not. - * The backend must be initialized before the property can be evaluated. - * - * @type {?boolean} - * @readonly - * @default null - */ - readonly compatibilityMode: boolean | null; - /** - * A reference to the device. - * - * @type {?GPUDevice} - * @default null - */ - device: GPUDevice | null; - /** - * A reference to the default render pass descriptor. - * - * @type {?Object} - * @default null - */ - defaultRenderPassdescriptor: Object | null; - /** - * A reference to a backend module holding common utility functions. - * - * @type {WebGPUUtils} - */ - utils: WebGPUUtils; - /** - * A reference to a backend module holding shader attribute-related - * utility functions. - * - * @type {WebGPUAttributeUtils} - */ - attributeUtils: WebGPUAttributeUtils; - /** - * A reference to a backend module holding shader binding-related - * utility functions. - * - * @type {WebGPUBindingUtils} - */ - bindingUtils: WebGPUBindingUtils; - /** - * A reference to a backend module holding device capability related - * utility functions. - * - * @type {WebGPUCapabilities} - */ - capabilities: WebGPUCapabilities; - /** - * A reference to a backend module holding shader pipeline-related - * utility functions. - * - * @type {WebGPUPipelineUtils} - */ - pipelineUtils: WebGPUPipelineUtils; - /** - * A reference to a backend module holding shader texture-related - * utility functions. - * - * @type {WebGPUTextureUtils} - */ - textureUtils: WebGPUTextureUtils; - /** - * A map that manages the resolve buffers for occlusion queries. - * - * @type {Map} - */ - occludedResolveCache: Map; - /** - * A map of compatibility checks. - * - * @type {Object} - */ - _compatibility: Object; - /** - * Registers external GPU textures from `XRGPUBinding` for use in rendering. - * - * @param {RenderTarget} renderTarget - The render target to register the textures for. - * @param {GPUTexture} colorTexture - The shared XR color GPUTexture. - * @param {?Array} [viewDescriptors=null] - Optional view descriptors, one per XR view. - */ - setXRRenderTargetTextures(renderTarget: RenderTarget, colorTexture: GPUTexture, viewDescriptors?: Array | null): void; - /** - * A reference to the context. - * - * @type {?GPUCanvasContext} - * @default null - */ - get context(): GPUCanvasContext | null; - /** - * This method performs a readback operation by moving buffer data from - * a storage buffer attribute from the GPU to the CPU. ReadbackBuffer can - * be used to retain and reuse handles to the intermediate buffers and prevent - * new allocation. - * - * @async - * @param {BufferAttribute} attribute - The storage buffer attribute to read frm. - * @param {number} count - The offset from which to start reading the - * @param {number} offset - The storage buffer attribute. - * @param {ReadbackBuffer|ArrayBuffer} target - The storage buffer attribute. - * @return {Promise} A promise that resolves with the buffer data when the data are ready. - */ - getArrayBufferAsync(attribute: BufferAttribute, target?: ReadbackBuffer | ArrayBuffer, offset?: number, count?: number): Promise; - /** - * Returns the backend's rendering context. - * - * @return {GPUCanvasContext} The rendering context. - */ - getContext(): GPUCanvasContext; - /** - * Returns the default render pass descriptor. - * - * In WebGPU, the default framebuffer must be configured - * like custom framebuffers so the backend needs a render - * pass descriptor even when rendering directly to screen. - * - * @private - * @return {Object} The render pass descriptor. - */ - private _getDefaultRenderPassDescriptor; - /** - * Returns whether the render target is a render target array with depth 2D array texture. - * - * @param {RenderContext} renderContext - The render context. - * @return {boolean} Whether the render target is a render target array with depth 2D array texture. - * - * @private - */ - private _isRenderCameraDepthArray; - /** - * Returns whether the current render context references external textures. - * - * External textures can change every frame, so their descriptors must not be cached. - * - * @private - * @param {RenderContext} renderContext - The render context. - * @return {boolean} Whether the render context uses external textures. - */ - private _hasExternalTexture; - /** - * Creates attachment views for an external texture render target. - * - * @private - * @param {RenderContext} renderContext - The render context. - * @param {Object} textureData - The backend data for the texture. - * @return {Array} The attachment view descriptors. - */ - private _createExternalTextureViews; - /** - * Returns the render pass descriptor for the given render context. - * - * @private - * @param {RenderContext} renderContext - The render context. - * @param {Object} colorAttachmentsConfig - Configuration object for the color attachments. - * @return {Object} The render pass descriptor. - */ - private _getRenderPassDescriptor; - /** - * This method is executed at the beginning of a render call and prepares - * the WebGPU state for upcoming render calls - * - * @param {RenderContext} renderContext - The render context. - */ - beginRender(renderContext: RenderContext): void; - /** - * Creates render pass descriptors for each camera in an array camera. - * - * @param {RenderContext} renderContext - The render context. - * @param {Object} renderContextData - The render context data. - * @param {Object} descriptor - The render pass descriptor. - * @param {ArrayCamera} cameras - The array camera. - * - * @private - */ - private _createArrayCameraLayerDescriptors; - /** - * Updates render pass descriptors for each camera in an array camera. - * - * @param {RenderContext} renderContext - The render context. - * @param {Object} renderContextData - The render context data. - * @param {ArrayCamera} cameras - The array camera. - * - */ - _updateArrayCameraLayerDescriptors(renderContext: RenderContext, renderContextData: Object, cameras: ArrayCamera): void; - /** - * This method is executed at the end of a render call and finalizes work - * after draw calls. - * - * @param {RenderContext} renderContext - The render context. - */ - finishRender(renderContext: RenderContext): void; - /** - * Returns `true` if the given 3D object is fully occluded by other - * 3D objects in the scene. - * - * @param {RenderContext} renderContext - The render context. - * @param {Object3D} object - The 3D object to test. - * @return {boolean} Whether the 3D object is fully occluded or not. - */ - isOccluded(renderContext: RenderContext, object: Object3D): boolean; - /** - * This method processes the result of occlusion queries and writes it - * into render context data. - * - * @async - * @param {RenderContext} renderContext - The render context. - * @return {Promise} A Promise that resolves when the occlusion query results have been processed. - */ - resolveOccludedAsync(renderContext: RenderContext): Promise; - /** - * Updates the viewport with the values from the given render context. - * - * @param {RenderContext} renderContext - The render context. - */ - updateViewport(renderContext: RenderContext): void; - /** - * Updates the scissor with the values from the given render context. - * - * @param {RenderContext} renderContext - The render context. - */ - updateScissor(renderContext: RenderContext): void; - /** - * Performs a clear operation. - * - * @param {boolean} color - Whether the color buffer should be cleared or not. - * @param {boolean} depth - Whether the depth buffer should be cleared or not. - * @param {boolean} stencil - Whether the stencil buffer should be cleared or not. - * @param {?RenderContext} [renderTargetContext=null] - The render context of the current set render target. - */ - clear(color: boolean, depth: boolean, stencil: boolean, renderTargetContext?: RenderContext | null): void; - /** - * This method is executed at the beginning of a compute call and - * prepares the state for upcoming compute tasks. - * - * @param {Node|Array} computeGroup - The compute node(s). - */ - beginCompute(computeGroup: Node | Array): void; - /** - * Executes a compute command for the given compute node. - * - * @param {Node|Array} computeGroup - The group of compute nodes of a compute call. Can be a single compute node. - * @param {Node} computeNode - The compute node. - * @param {Array} bindings - The bindings. - * @param {ComputePipeline} pipeline - The compute pipeline. - * @param {number|Array|IndirectStorageBufferAttribute} [dispatchSize=null] - * - A single number representing count, or - * - An array [x, y, z] representing dispatch size, or - * - A IndirectStorageBufferAttribute for indirect dispatch size. - */ - compute(computeGroup: Node | Array, computeNode: Node, bindings: Array, pipeline: ComputePipeline, dispatchSize?: number | Array | IndirectStorageBufferAttribute): void; - /** - * This method is executed at the end of a compute call and - * finalizes work after compute tasks. - * - * @param {Node|Array} computeGroup - The compute node(s). - */ - finishCompute(computeGroup: Node | Array): void; - /** - * Internal draw function that performs the draw with the given pass encoder. - * - * @private - * @param {RenderObject} renderObject - The render object. - * @param {Info} info - Holds a series of statistical information about the GPU memory and the rendering process. - * @param {Object} renderContextData - The render context data object, holding current pass state and occlusion query tracking. - * @param {GPURenderPipeline} pipelineGPU - The GPU render pipeline. - * @param {Array} bindings - The bind groups. - * @param {Array} vertexBuffers - The vertex buffers. - * @param {{vertexCount: number, firstVertex: number, instanceCount: number, firstInstance: number}} drawParams - The draw parameters. - * @param {GPURenderPassEncoder|GPURenderBundleEncoder} passEncoderGPU - The GPU pass encoder used for recording draw commands. - * @param {Object} currentSets - Tracking object for currently set pipeline, attributes, bind groups, and index state. - */ - private _draw; - /** - * Executes a draw command for the given render object. - * - * @param {RenderObject} renderObject - The render object to draw. - * @param {Info} info - Holds a series of statistical information about the GPU memory and the rendering process. - */ - draw(renderObject: RenderObject, info: Info): void; - /** - * Returns `true` if the render pipeline requires an update. - * - * @param {RenderObject} renderObject - The render object. - * @return {boolean} Whether the render pipeline requires an update or not. - */ - needsRenderUpdate(renderObject: RenderObject): boolean; - /** - * Returns a cache key that is used to identify render pipelines. - * - * @param {RenderObject} renderObject - The render object. - * @return {string} The cache key. - */ - getRenderCacheKey(renderObject: RenderObject): string; - /** - * Updates a GPU sampler for the given texture. - * - * @param {Texture} texture - The texture to update the sampler for. - * @param {TextureNode} textureNode - The texture node to update the sampler with. - * @return {string} The current sampler key. - */ - updateSampler(texture: Texture, textureNode: TextureNode): string; - /** - * Creates a default texture for the given texture that can be used - * as a placeholder until the actual texture is ready for usage. - * - * @param {Texture} texture - The texture to create a default texture for. - * @return {boolean} Whether the sampler has been updated or not. - */ - createDefaultTexture(texture: Texture): boolean; - /** - * Defines a texture on the GPU for the given texture object. - * - * @param {Texture} texture - The texture. - * @param {Object} [options={}] - Optional configuration parameter. - */ - createTexture(texture: Texture, options?: Object): void; - /** - * Uploads the updated texture data to the GPU. - * - * @param {Texture} texture - The texture. - * @param {Object} [options={}] - Optional configuration parameter. - */ - updateTexture(texture: Texture, options?: Object): void; - /** - * Generates mipmaps for the given texture. - * - * @param {Texture} texture - The texture. - */ - generateMipmaps(texture: Texture): void; - /** - * Destroys the GPU data for the given texture object. - * - * @param {Texture} texture - The texture. - * @param {boolean} [isDefaultTexture=false] - Whether the texture uses a default GPU texture or not. - */ - destroyTexture(texture: Texture, isDefaultTexture?: boolean): void; - /** - * Returns texture data as a typed array. - * - * @async - * @param {Texture} texture - The texture to copy. - * @param {number} x - The x coordinate of the copy origin. - * @param {number} y - The y coordinate of the copy origin. - * @param {number} width - The width of the copy. - * @param {number} height - The height of the copy. - * @param {number} faceIndex - The face index. - * @return {Promise} A Promise that resolves with a typed array when the copy operation has finished. - */ - copyTextureToBuffer(texture: Texture, x: number, y: number, width: number, height: number, faceIndex: number): Promise; - /** - * Inits a time stamp query for the given render context. - * - * @param {string} type - The type of the timestamp query (e.g. 'render', 'compute'). - * @param {number} uid - Unique id for the context (e.g. render context id). - * @param {Object} descriptor - The query descriptor. - */ - initTimestampQuery(type: string, uid: number, descriptor: Object): void; - /** - * Returns a node builder for the given render object. - * - * @param {RenderObject} object - The render object. - * @param {Renderer} renderer - The renderer. - * @return {WGSLNodeBuilder} The node builder. - */ - createNodeBuilder(object: RenderObject, renderer: Renderer): WGSLNodeBuilder; - /** - * Creates a shader program from the given programmable stage. - * - * @param {ProgrammableStage} program - The programmable stage. - */ - createProgram(program: ProgrammableStage): void; - /** - * Destroys the shader program of the given programmable stage. - * - * @param {ProgrammableStage} program - The programmable stage. - */ - destroyProgram(program: ProgrammableStage): void; - /** - * Creates a render pipeline for the given render object. - * - * @param {RenderObject} renderObject - The render object. - * @param {Array} promises - An array of compilation promises which are used in `compileAsync()`. - */ - createRenderPipeline(renderObject: RenderObject, promises: Array>): void; - /** - * Creates a compute pipeline for the given compute node. - * - * @param {ComputePipeline} computePipeline - The compute pipeline. - * @param {Array} bindings - The bindings. - */ - createComputePipeline(computePipeline: ComputePipeline, bindings: Array): void; - /** - * Prepares the state for encoding render bundles. - * - * @param {RenderContext} renderContext - The render context. - */ - beginBundle(renderContext: RenderContext): void; - /** - * After processing render bundles this method finalizes related work. - * - * @param {RenderContext} renderContext - The render context. - * @param {RenderBundle} bundle - The render bundle. - */ - finishBundle(renderContext: RenderContext, bundle: RenderBundle): void; - /** - * Adds a render bundle to the render context data. - * - * @param {RenderContext} renderContext - The render context. - * @param {RenderBundle} bundle - The render bundle to add. - */ - addBundle(renderContext: RenderContext, bundle: RenderBundle): void; - /** - * Creates a uniform buffer. - * - * @param {Buffer} uniformBuffer - The uniform buffer. - */ - createUniformBuffer(uniformBuffer: Buffer): void; - /** - * Destroys the GPU data for the given uniform buffer. - * - * @param {Buffer} uniformBuffer - The uniform buffer. - */ - destroyUniformBuffer(uniformBuffer: Buffer): void; - /** - * Creates bindings from the given bind group definition. - * - * @param {BindGroup} bindGroup - The bind group. - * @param {Array} bindings - Array of bind groups. - * @param {number} cacheIndex - The cache index. - * @param {number} version - The version. - */ - createBindings(bindGroup: BindGroup, bindings: Array, cacheIndex: number, version: number): void; - /** - * Updates the given bind group definition. - * - * @param {BindGroup} bindGroup - The bind group. - * @param {Array} bindings - Array of bind groups. - * @param {number} cacheIndex - The cache index. - * @param {number} version - The version. - */ - updateBindings(bindGroup: BindGroup, bindings: Array, cacheIndex: number, version: number): void; - /** - * Updates a buffer binding. - * - * @param {Buffer} binding - The buffer binding to update. - */ - updateBinding(binding: Buffer): void; - /** - * Delete data associated with the current bind group. - * - * @param {BindGroup} bindGroup - The bind group. - */ - deleteBindGroupData(bindGroup: BindGroup): void; - /** - * Creates the buffer of an indexed shader attribute. - * - * @param {BufferAttribute} attribute - The indexed buffer attribute. - */ - createIndexAttribute(attribute: BufferAttribute): void; - /** - * Creates the GPU buffer of a shader attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - */ - createAttribute(attribute: BufferAttribute): void; - /** - * Creates the GPU buffer of a storage attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - */ - createStorageAttribute(attribute: BufferAttribute): void; - /** - * Creates the GPU buffer of an indirect storage attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - */ - createIndirectStorageAttribute(attribute: BufferAttribute): void; - /** - * Updates the GPU buffer of a shader attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute to update. - */ - updateAttribute(attribute: BufferAttribute): void; - /** - * Destroys the GPU buffer of a shader attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute to destroy. - */ - destroyAttribute(attribute: BufferAttribute): void; - /** - * Checks if the given feature is supported by the backend. - * - * @param {string} name - The feature's name. - * @return {boolean} Whether the feature is supported or not. - */ - hasFeature(name: string): boolean; - /** - * Copies data of the given source texture to the given destination texture. - * - * @param {Texture} srcTexture - The source texture. - * @param {Texture} dstTexture - The destination texture. - * @param {?(Box3|Box2)} [srcRegion=null] - The region of the source texture to copy. - * @param {?(Vector2|Vector3)} [dstPosition=null] - The destination position of the copy. - * @param {number} [srcLevel=0] - The mipmap level to copy. - * @param {number} [dstLevel=0] - The destination mip level to copy to. - */ - copyTextureToTexture(srcTexture: Texture, dstTexture: Texture, srcRegion?: (Box3 | Box2) | null, dstPosition?: (Vector2 | Vector3) | null, srcLevel?: number, dstLevel?: number): void; - /** - * Copies the current bound framebuffer to the given texture. - * - * @param {Texture} texture - The destination texture. - * @param {RenderContext} renderContext - The render context. - * @param {Vector4} rectangle - A four dimensional vector defining the origin and dimension of the copy. - */ - copyFramebufferToTexture(texture: Texture, renderContext: RenderContext, rectangle: Vector4): void; - /** - * Checks if the given compatibility is supported by the backend. - * - * @param {string} name - The compatibility name. - * @return {boolean} Whether the compatibility is supported or not. - */ - hasCompatibility(name: string): boolean; -} -import { WebGPUCoordinateSystem } from './three.core.js'; -/** - * This renderer is the new alternative of `WebGLRenderer`. `WebGPURenderer` has the ability - * to target different backends. By default, the renderer tries to use a WebGPU backend if the - * browser supports WebGPU. If not, `WebGPURenderer` falls backs to a WebGL 2 backend. - * - * @augments Renderer - */ -export class WebGPURenderer extends Renderer { - /** - * WebGPURenderer options. - * - * @typedef {Object} WebGPURenderer~Options - * @property {boolean} [logarithmicDepthBuffer=false] - Whether logarithmic depth buffer is enabled or not. - * @property {boolean} [reversedDepthBuffer=false] - Whether reversed depth buffer is enabled or not. - * @property {boolean} [alpha=true] - Whether the default framebuffer (which represents the final contents of the canvas) should be transparent or opaque. - * @property {boolean} [depth=true] - Whether the default framebuffer should have a depth buffer or not. - * @property {boolean} [stencil=false] - Whether the default framebuffer should have a stencil buffer or not. - * @property {boolean} [antialias=false] - Whether MSAA as the default anti-aliasing should be enabled or not. - * @property {number} [samples=0] - When `antialias` is `true`, `4` samples are used by default. Set this parameter to any other integer value than 0 to overwrite the default. - * @property {boolean} [forceWebGL=false] - If set to `true`, the renderer uses a WebGL 2 backend no matter if WebGPU is supported or not. - * @property {boolean} [multiview=false] - If set to `true`, the renderer will use multiview during WebXR rendering if supported. - * @property {number} [outputType=undefined] - Texture type for output to canvas. By default, device's preferred format is used; other formats may incur overhead. - * @property {number} [outputBufferType=HalfFloatType] - Defines the type of output buffers. The default `HalfFloatType` is recommend for best - * quality. To save memory and bandwidth, `UnsignedByteType` might be used. This will reduce rendering quality though. - */ - /** - * Constructs a new WebGPU renderer. - * - * @param {WebGPURenderer~Options} [parameters] - The configuration parameter. - */ - constructor(parameters?: {}); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWebGPURenderer: boolean; -} -import { WebXRController } from './three.core.js'; -/** - * A node allowing the user to create a 'workgroup' scoped buffer within the - * context of a compute shader. Typically, workgroup scoped buffers are - * created to hold data that is transferred from a global storage scope into - * a local workgroup scope. For invocations within a workgroup, data - * access speeds on 'workgroup' scoped buffers can be significantly faster - * than similar access operations on globally accessible storage buffers. - * - * This node can only be used with a WebGPU backend. - * - * @augments Node - */ -export class WorkgroupInfoNode extends Node { - /** - * Constructs a new buffer scoped to type scope. - * - * @param {string} scope - TODO. - * @param {string} bufferType - The data type of a 'workgroup' scoped buffer element. - * @param {number} [bufferCount=0] - The number of elements in the buffer. - */ - constructor(scope: string, bufferType: string, bufferCount?: number); - /** - * The buffer type. - * - * @type {string} - */ - bufferType: string; - /** - * The buffer count. - * - * @type {number} - * @default 0 - */ - bufferCount: number; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWorkgroupInfoNode: boolean; - /** - * The data type of the array buffer. - * - * @type {string} - */ - elementType: string; - /** - * TODO. - * - * @type {string} - */ - scope: string; - /** - * Sets the name of this node. - * - * @param {string} name - The name to set. - * @return {WorkgroupInfoNode} A reference to this node. - */ - setName(name: string): WorkgroupInfoNode; - /** - * Sets the name/label of this node. - * - * @deprecated - * @param {string} name - The name to set. - * @return {WorkgroupInfoNode} A reference to this node. - */ - label(name: string): WorkgroupInfoNode; - /** - * Sets the scope of this node. - * - * @param {string} scope - The scope to set. - * @return {WorkgroupInfoNode} A reference to this node. - */ - setScope(scope: string): WorkgroupInfoNode; - /** - * The data type of the array buffer. - * - * @return {string} The element type. - */ - getElementType(): string; - /** - * Overwrites the default implementation since the input type - * is inferred from the scope. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The input type. - */ - getInputType(): string; - /** - * This method can be used to access elements via an index node. - * - * @param {IndexNode} indexNode - indexNode. - * @return {WorkgroupInfoElementNode} A reference to an element. - */ - element(indexNode: IndexNode): WorkgroupInfoElementNode; - generate(builder: any): any; -} -import { ZeroFactor } from './three.core.js'; -import { ZeroStencilOp } from './three.core.js'; -import { createCanvasElement } from './three.core.js'; -export const defaultBuildStages: string[]; -export const defaultShaderStages: string[]; -import { error } from './three.core.js'; -import { log as log$1 } from './three.core.js'; -export const shaderStages: string[]; -export const vectorComponents: string[]; -import { warn } from './three.core.js'; -import { warnOnce } from './three.core.js'; -/** - * The purpose of a node library is to assign node implementations - * to existing library features. In `WebGPURenderer` lights, materials - * which are not based on `NodeMaterial` as well as tone mapping techniques - * are implemented with node-based modules. - * - * @private - */ -declare class NodeLibrary { - /** - * A weak map that maps lights to light nodes. - * - * @type {WeakMap} - */ - lightNodes: WeakMap; - /** - * A map that maps materials to node materials. - * - * @type {Map} - */ - materialNodes: Map; - /** - * A map that maps tone mapping techniques (constants) - * to tone mapping node functions. - * - * @type {Map} - */ - toneMappingNodes: Map; - /** - * Returns a matching node material instance for the given material object. - * - * This method also assigns/copies the properties of the given material object - * to the node material. This is done to make sure the current material - * configuration carries over to the node version. - * - * @param {Material} material - A material. - * @return {NodeMaterial} The corresponding node material. - */ - fromMaterial(material: Material): NodeMaterial; - /** - * Adds a tone mapping node function for a tone mapping technique (constant). - * - * @param {Function} toneMappingNode - The tone mapping node function. - * @param {number} toneMapping - The tone mapping. - */ - addToneMapping(toneMappingNode: Function, toneMapping: number): void; - /** - * Returns a tone mapping node function for a tone mapping technique (constant). - * - * @param {number} toneMapping - The tone mapping. - * @return {?Function} The tone mapping node function. Returns `null` if no node function is found. - */ - getToneMappingFunction(toneMapping: number): Function | null; - /** - * Returns a node material class definition for a material type. - * - * @param {string} materialType - The material type. - * @return {?NodeMaterial.constructor} The node material class definition. Returns `null` if no node material is found. - */ - getMaterialNodeClass(materialType: string): NodeMaterial.constructor | null; - /** - * Adds a node material class definition for a given material type. - * - * @param {NodeMaterial.constructor} materialNodeClass - The node material class definition. - * @param {string} materialClassType - The material type. - */ - addMaterial(materialNodeClass: NodeMaterial.constructor, materialClassType: string): void; - /** - * Returns a light node class definition for a light class definition. - * - * @param {Light.constructor} light - The light class definition. - * @return {?AnalyticLightNode.constructor} The light node class definition. Returns `null` if no light node is found. - */ - getLightNodeClass(light: Light.constructor): AnalyticLightNode.constructor | null; - /** - * Adds a light node class definition for a given light class definition. - * - * @param {AnalyticLightNode.constructor} lightNodeClass - The light node class definition. - * @param {Light.constructor} lightClass - The light class definition. - */ - addLight(lightNodeClass: AnalyticLightNode.constructor, lightClass: Light.constructor): void; - /** - * Adds a node class definition for the given type to the provided type library. - * - * @param {Node.constructor} nodeClass - The node class definition. - * @param {number|string} type - The object type. - * @param {Map} library - The type library. - */ - addType(nodeClass: Node.constructor, type: number | string, library: Map): void; - /** - * Adds a node class definition for the given class definition to the provided type library. - * - * @param {Node.constructor} nodeClass - The node class definition. - * @param {Node.constructor} baseClass - The class definition. - * @param {WeakMap} library - The type library. - */ - addClass(nodeClass: Node.constructor, baseClass: Node.constructor, library: WeakMap): void; -} -/** - * Base class for renderers. - */ -declare class Renderer { - /** - * Renderer options. - * - * @typedef {Object} Renderer~Options - * @property {boolean} [logarithmicDepthBuffer=false] - Whether logarithmic depth buffer is enabled or not. - * @property {boolean} [reversedDepthBuffer=false] - Whether reversed depth buffer is enabled or not. - * @property {boolean} [alpha=true] - Whether the default framebuffer (which represents the final contents of the canvas) should be transparent or opaque. - * @property {boolean} [depth=true] - Whether the default framebuffer should have a depth buffer or not. - * @property {boolean} [stencil=false] - Whether the default framebuffer should have a stencil buffer or not. - * @property {boolean} [antialias=false] - Whether MSAA as the default anti-aliasing should be enabled or not. - * @property {number} [samples=0] - When `antialias` is `true`, `4` samples are used by default. This parameter can set to any other integer value than 0 - * to overwrite the default. - * @property {?Function} [getFallback=null] - This callback function can be used to provide a fallback backend, if the primary backend can't be targeted. - * @property {number} [outputBufferType=HalfFloatType] - Defines the type of output buffers. The default `HalfFloatType` is recommend for best - * quality. To save memory and bandwidth, `UnsignedByteType` might be used. This will reduce rendering quality though. - * @property {boolean} [multiview=false] - If set to `true`, the renderer will use multiview during WebXR rendering if supported. - */ - /** - * Constructs a new renderer. - * - * @param {Backend} backend - The backend the renderer is targeting (e.g. WebGPU or WebGL 2). - * @param {Renderer~Options} [parameters] - The configuration parameter. - - */ - constructor(backend: Backend, parameters?: {}); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isRenderer: boolean; - /** - * A reference to the current backend. - * - * @type {Backend} - */ - backend: Backend; - /** - * Whether the renderer should automatically clear the current rendering target - * before execute a `render()` call. The target can be the canvas (default framebuffer) - * or the current bound render target (custom framebuffer). - * - * @type {boolean} - * @default true - */ - autoClear: boolean; - /** - * When `autoClear` is set to `true`, this property defines whether the renderer - * should clear the color buffer. - * - * @type {boolean} - * @default true - */ - autoClearColor: boolean; - /** - * When `autoClear` is set to `true`, this property defines whether the renderer - * should clear the depth buffer. - * - * @type {boolean} - * @default true - */ - autoClearDepth: boolean; - /** - * When `autoClear` is set to `true`, this property defines whether the renderer - * should clear the stencil buffer. - * - * @type {boolean} - * @default true - */ - autoClearStencil: boolean; - /** - * Whether the default framebuffer should be transparent or opaque. - * - * @type {boolean} - * @default true - */ - alpha: boolean; - /** - * Whether logarithmic depth buffer is enabled or not. - * - * @type {boolean} - * @default false - * @readonly - */ - readonly logarithmicDepthBuffer: boolean; - /** - * Whether reversed depth buffer is enabled or not. - * - * @type {boolean} - * @default false - * @readonly - */ - readonly reversedDepthBuffer: boolean; - /** - * Defines the output color space of the renderer. - * - * @type {string} - * @default SRGBColorSpace - */ - outputColorSpace: string; - /** - * Defines the tone mapping of the renderer. - * - * @type {number} - * @default NoToneMapping - */ - toneMapping: number; - /** - * Defines the tone mapping exposure. - * - * @type {number} - * @default 1 - */ - toneMappingExposure: number; - /** - * Whether the renderer should sort its render lists or not. - * - * Note: Sorting is used to attempt to properly render objects that have some degree of transparency. - * By definition, sorting objects may not work in all cases. Depending on the needs of application, - * it may be necessary to turn off sorting and use other methods to deal with transparency rendering - * e.g. manually determining each object's rendering order. - * - * @type {boolean} - * @default true - */ - sortObjects: boolean; - /** - * Whether the default framebuffer should have a depth buffer or not. - * - * @type {boolean} - * @default true - */ - depth: boolean; - /** - * Whether the default framebuffer should have a stencil buffer or not. - * - * @type {boolean} - * @default false - */ - stencil: boolean; - /** - * Holds a series of statistical information about the GPU memory - * and the rendering process. Useful for debugging and monitoring. - * - * @type {Info} - */ - info: Info; - /** - * A global context node that stores override nodes for specific transformations or calculations. - * These nodes can be used to replace default behavior in the rendering pipeline. - * - * @type {ContextNode} - * @property {Object} value - The context value object. - */ - contextNode: ContextNode; - /** - * The node library defines how certain library objects like materials, lights - * or tone mapping functions are mapped to node types. This is required since - * although instances of classes like `MeshBasicMaterial` or `PointLight` can - * be part of the scene graph, they are internally represented as nodes for - * further processing. - * - * @type {NodeLibrary} - */ - library: NodeLibrary; - /** - * A map-like data structure for managing lights. - * - * @type {Lighting} - */ - lighting: Lighting; - /** - * The number of MSAA samples. - * - * @private - * @type {number} - * @default 0 - */ - private _samples; - /** - * Callback when the canvas has been resized. - * - * @private - */ - private _onCanvasTargetResize; - /** - * The canvas target for rendering. - * - * @private - * @type {CanvasTarget} - */ - private _canvasTarget; - /** - * The inspector provides information about the internal renderer state. - * - * @private - * @type {InspectorBase} - */ - private _inspector; - /** - * This callback function can be used to provide a fallback backend, if the primary backend can't be targeted. - * - * @private - * @type {?Function} - */ - private _getFallback; - /** - * A reference to a renderer module for managing shader attributes. - * - * @private - * @type {?Attributes} - * @default null - */ - private _attributes; - /** - * A reference to a renderer module for managing geometries. - * - * @private - * @type {?Geometries} - * @default null - */ - private _geometries; - /** - * A reference to a renderer module for managing node related logic. - * - * @private - * @type {?NodeManager} - * @default null - */ - private _nodes; - /** - * A reference to a renderer module for managing the internal animation loop. - * - * @private - * @type {?Animation} - * @default null - */ - private _animation; - /** - * A reference to a renderer module for managing shader program bindings. - * - * @private - * @type {?Bindings} - * @default null - */ - private _bindings; - /** - * A reference to a renderer module for managing render objects. - * - * @private - * @type {?RenderObjects} - * @default null - */ - private _objects; - /** - * A reference to a renderer module for managing render and compute pipelines. - * - * @private - * @type {?Pipelines} - * @default null - */ - private _pipelines; - /** - * A reference to a renderer module for managing render bundles. - * - * @private - * @type {?RenderBundles} - * @default null - */ - private _bundles; - /** - * A reference to a renderer module for managing render lists. - * - * @private - * @type {?RenderLists} - * @default null - */ - private _renderLists; - /** - * A reference to a renderer module for managing render contexts. - * - * @private - * @type {?RenderContexts} - * @default null - */ - private _renderContexts; - /** - * A reference to a renderer module for managing textures. - * - * @private - * @type {?Textures} - * @default null - */ - private _textures; - /** - * A reference to a renderer module for backgrounds. - * - * @private - * @type {?Background} - * @default null - */ - private _background; - /** - * Cache for the fullscreen quad. - * This fullscreen quad is used for internal render passes - * like the tone mapping and color space output pass. - * - * @private - * @type {Map} - */ - private _quadCache; - /** - * A reference to the current render context. - * - * @private - * @type {?RenderContext} - * @default null - */ - private _currentRenderContext; - /** - * A custom sort function for the opaque render list. - * - * @private - * @type {?Function} - * @default null - */ - private _opaqueSort; - /** - * A custom sort function for the transparent render list. - * - * @private - * @type {?Function} - * @default null - */ - private _transparentSort; - /** - * Cache of framebuffer targets per canvas target. - * - * @private - * @type {Map} - */ - private _frameBufferTargets; - /** - * The clear color value. - * - * @private - * @type {Color4} - */ - private _clearColor; - /** - * The clear depth value. - * - * @private - * @type {number} - * @default 1 - */ - private _clearDepth; - /** - * The clear stencil value. - * - * @private - * @type {number} - * @default 0 - */ - private _clearStencil; - /** - * The current render target. - * - * @private - * @type {?RenderTarget} - * @default null - */ - private _renderTarget; - /** - * The active cube face. - * - * @private - * @type {number} - * @default 0 - */ - private _activeCubeFace; - /** - * The active mipmap level. - * - * @private - * @type {number} - * @default 0 - */ - private _activeMipmapLevel; - /** - * The current output render target. - * - * @private - * @type {?RenderTarget} - * @default null - */ - private _outputRenderTarget; - /** - * The MRT setting. - * - * @private - * @type {?MRTNode} - * @default null - */ - private _mrt; - /** - * This function defines how a render object is going - * to be rendered. - * - * @private - * @type {?Function} - * @default null - */ - private _renderObjectFunction; - /** - * Used to keep track of the current render object function. - * - * @private - * @type {?Function} - * @default null - */ - private _currentRenderObjectFunction; - /** - * Used to keep track of the current render bundle. - * - * @private - * @type {?RenderBundle} - * @default null - */ - private _currentRenderBundle; - /** - * Next to `_renderObjectFunction()`, this function provides another hook - * for influencing the render process of a render object. It is meant for internal - * use and only relevant for `compileAsync()` right now. Instead of using - * the default logic of `_renderObjectDirect()` which actually draws the render object, - * a different function might be used which performs no draw but just the node - * and pipeline updates. - * - * @private - * @type {Function} - */ - private _handleObjectFunction; - /** - * Indicates whether the device has been lost or not. In WebGL terms, the device - * lost is considered as a context lost. When this is set to `true`, rendering - * isn't possible anymore. - * - * @private - * @type {boolean} - * @default false - */ - private _isDeviceLost; - /** - * A callback function that defines what should happen when a device/context lost occurs. - * - * @type {Function} - */ - onDeviceLost: Function; - /** - * A callback function that defines what should happen when an uncaptured - * backend error is reported (e.g. a WebGPU validation/out-of-memory/internal - * error raised outside an error scope). Applications can override this to - * surface errors in their own UI without letting them escalate to a device - * loss. The default implementation logs to the console. - * - * @type {Function} - */ - onError: Function; - /** - * Defines the type of output buffers. The default `HalfFloatType` is recommend for - * best quality. To save memory and bandwidth, `UnsignedByteType` might be used. - * This will reduce rendering quality though. - * - * @private - * @type {number} - * @default HalfFloatType - */ - private _outputBufferType; - /** - * A cache for shadow nodes per material - * - * @private - * @type {WeakMap} - */ - private _cacheShadowNodes; - /** - * Whether the renderer has been initialized or not. - * - * @private - * @type {boolean} - * @default false - */ - private _initialized; - /** - * The call depth of the renderer. Counts the number of - * nested render calls. - * - * @private - * @type {number} - * @default - 1 - */ - private _callDepth; - /** - * A reference to the promise which initializes the renderer. - * - * @private - * @type {?Promise} - * @default null - */ - private _initPromise; - /** - * An array of compilation promises which are used in `compileAsync()`. - * - * @private - * @type {?Array} - * @default null - */ - private _compilationPromises; - /** - * Whether the renderer should render transparent render objects or not. - * - * @type {boolean} - * @default true - */ - transparent: boolean; - /** - * Whether the renderer should render opaque render objects or not. - * - * @type {boolean} - * @default true - */ - opaque: boolean; - /** - * Shadow map configuration - * @typedef {Object} ShadowMapConfig - * @property {boolean} enabled - Whether to globally enable shadows or not. - * @property {boolean} transmitted - Whether to enable light transmission through non-opaque materials. - * @property {number} type - The shadow map type. - */ - /** - * The renderer's shadow configuration. - * - * @type {ShadowMapConfig} - */ - shadowMap: { - /** - * - Whether to globally enable shadows or not. - */ - enabled: boolean; - /** - * - Whether to enable light transmission through non-opaque materials. - */ - transmitted: boolean; - /** - * - The shadow map type. - */ - type: number; - }; - /** - * XR configuration. - * @typedef {Object} XRConfig - * @property {boolean} enabled - Whether to globally enable XR or not. - */ - /** - * The renderer's XR manager. - * - * @type {XRManager} - */ - xr: XRManager; - /** - * Debug configuration. - * @typedef {Object} DebugConfig - * @property {boolean} checkShaderErrors - Whether shader errors should be checked or not. - * @property {?Function} onShaderError - A callback function that is executed when a shader error happens. Only supported with WebGL 2 right now. - * @property {Function} getShaderAsync - Allows the get the raw shader code for the given scene, camera and 3D object. - */ - /** - * The renderer's debug configuration. - * - * @type {DebugConfig} - */ - debug: { - /** - * - Whether shader errors should be checked or not. - */ - checkShaderErrors: boolean; - /** - * - A callback function that is executed when a shader error happens. Only supported with WebGL 2 right now. - */ - onShaderError: Function | null; - /** - * - Allows the get the raw shader code for the given scene, camera and 3D object. - */ - getShaderAsync: Function; - }; - /** - * Initializes the renderer so it is ready for usage. - * - * @async - * @return {Promise} A Promise that resolves when the renderer has been initialized. - */ - init(): Promise; - /** - * A reference to the canvas element the renderer is drawing to. - * This value of this property will automatically be created by - * the renderer. - * - * @type {HTMLCanvasElement|OffscreenCanvas} - */ - get domElement(): HTMLCanvasElement | OffscreenCanvas; - /** - * The coordinate system of the renderer. The value of this property - * depends on the selected backend. Either `THREE.WebGLCoordinateSystem` or - * `THREE.WebGPUCoordinateSystem`. - * - * @readonly - * @type {number} - */ - readonly get coordinateSystem(): number; - /** - * Compiles all materials in the given scene. This can be useful to avoid a - * phenomenon which is called "shader compilation stutter", which occurs when - * rendering an object with a new shader for the first time. - * - * If you want to add a 3D object to an existing scene, use the third optional - * parameter for applying the target scene. Note that the (target) scene's lighting - * and environment must be configured before calling this method. - * - * @async - * @param {Object3D} scene - The scene or 3D object to precompile. - * @param {Camera} camera - The camera that is used to render the scene. - * @param {?Scene} targetScene - If the first argument is a 3D object, this parameter must represent the scene the 3D object is going to be added. - * @return {Promise} A Promise that resolves when the compile has been finished. - */ - compileAsync(scene: Object3D, camera: Camera, targetScene?: Scene | null): Promise; - /** - * Renders the scene in an async fashion. - * - * @async - * @deprecated - * @param {Object3D} scene - The scene or 3D object to render. - * @param {Camera} camera - The camera. - * @return {Promise} A Promise that resolves when the render has been finished. - */ - renderAsync(scene: Object3D, camera: Camera): Promise; - /** - * Can be used to synchronize CPU operations with GPU tasks. So when this method is called, - * the CPU waits for the GPU to complete its operation (e.g. a compute task). - * - * @async - * @deprecated - * @return {Promise} A Promise that resolves when synchronization has been finished. - */ - waitForGPU(): Promise; - set inspector(value: InspectorBase); - /** - * The inspector instance. The inspector can be any class that extends from `InspectorBase`. - * - * @type {InspectorBase} - */ - get inspector(): InspectorBase; - /** - * Enables or disables high precision for model-view and normal-view matrices. - * When enabled, will use CPU 64-bit precision for higher precision instead of GPU 32-bit for higher performance. - * - * NOTE: 64-bit precision is not compatible with `InstancedMesh` and `SkinnedMesh`. - * - * @param {boolean} value - Whether to enable or disable high precision. - * @type {boolean} - */ - set highPrecision(value: boolean); - /** - * Returns whether high precision is enabled or not. - * - * @return {boolean} Whether high precision is enabled or not. - * @type {boolean} - */ - get highPrecision(): boolean; - /** - * Sets the given MRT configuration. - * - * @param {MRTNode} mrt - The MRT node to set. - * @return {Renderer} A reference to this renderer. - */ - setMRT(mrt: MRTNode): Renderer; - /** - * Returns the MRT configuration. - * - * @return {MRTNode} The MRT configuration. - */ - getMRT(): MRTNode; - /** - * Returns the output buffer type. - * - * @return {number} The output buffer type. - */ - getOutputBufferType(): number; - /** - * Returns the output buffer type. - * - * @deprecated since r182. Use `.getOutputBufferType()` instead. - * @return {number} The output buffer type. - */ - getColorBufferType(): number; - /** - * Default implementation of the device lost callback. - * - * @private - * @param {Object} info - Information about the context lost. - */ - private _onDeviceLost; - /** - * Default implementation of the uncaptured backend error callback. - * - * @private - * @param {Object} info - Information about the uncaptured error. - */ - private _onError; - /** - * Renders the given render bundle. - * - * @private - * @param {Object} bundle - Render bundle data. - * @param {Scene} sceneRef - The scene the render bundle belongs to. - * @param {LightsNode} lightsNode - The lights node. - */ - private _renderBundle; - /** - * Renders the scene or 3D object with the given camera. This method can only be called - * if the renderer has been initialized. When using `render()` inside an animation loop, - * it's guaranteed the renderer will be initialized. The animation loop must be defined - * with {@link Renderer#setAnimationLoop} though. - * - * For all other use cases (like when using on-demand rendering), you must call - * {@link Renderer#init} before rendering. - * - * The target of the method is the default framebuffer (meaning the canvas) - * or alternatively a render target when specified via `setRenderTarget()`. - * - * @param {Object3D} scene - The scene or 3D object to render. - * @param {Camera} camera - The camera to render the scene with. - */ - render(scene: Object3D, camera: Camera): void; - /** - * Returns whether the renderer has been initialized or not. - * - * @readonly - * @return {boolean} Whether the renderer has been initialized or not. - */ - readonly get initialized(): boolean; - _renderOutputLayers(quad: any, renderTarget: any): void; - /** - * Returns an internal render target which is used when computing the output tone mapping - * and color space conversion. Unlike in `WebGLRenderer`, this is done in a separate render - * pass and not inline to achieve more correct results. - * - * @private - * @return {?RenderTarget} The render target. The method returns `null` if no output conversion should be applied. - */ - private _getFrameBufferTarget; - /** - * Renders the scene or 3D object with the given camera. - * - * @private - * @param {Object3D} scene - The scene or 3D object to render. - * @param {Camera} camera - The camera to render the scene with. - * @param {boolean} [useFrameBufferTarget=true] - Whether to use a framebuffer target or not. - * @return {RenderContext} The current render context. - */ - private _renderScene; - _setXRLayerSize(width: any, height: any): void; - /** - * The output pass performs tone mapping and color space conversion. - * - * @private - * @param {RenderTarget} renderTarget - The current render target. - */ - private _renderOutput; - /** - * Returns the maximum available anisotropy for texture filtering. - * - * @return {number} The maximum available anisotropy. - */ - getMaxAnisotropy(): number; - /** - * Returns the active cube face. - * - * @return {number} The active cube face. - */ - getActiveCubeFace(): number; - /** - * Returns the active mipmap level. - * - * @return {number} The active mipmap level. - */ - getActiveMipmapLevel(): number; - /** - * Applications are advised to always define the animation loop - * with this method and not manually with `requestAnimationFrame()` - * for best compatibility. - * - * @async - * @param {?onAnimationCallback} callback - The application's animation loop. - * @return {Promise} A Promise that resolves when the set has been executed. - */ - setAnimationLoop(callback: onAnimationCallback | null): Promise; - /** - * Returns the current animation loop callback. - * - * @return {?Function} The current animation loop callback. - */ - getAnimationLoop(): Function | null; - /** - * Can be used to transfer buffer data from a storage buffer attribute - * from the GPU to the CPU in context of compute shaders. - * - * @async - * @param {BufferAttribute} attribute - The storage buffer attribute to read frm. - * @param {ReadbackBuffer|ArrayBuffer} target - The storage buffer attribute. - * @param {number} offset - The storage buffer attribute. - * @param {number} count - The offset from which to start reading the - * @return {Promise} A promise that resolves with the buffer data when the data are ready. - */ - getArrayBufferAsync(attribute: BufferAttribute, target?: ReadbackBuffer | ArrayBuffer, offset?: number, count?: number): Promise; - /** - * Returns the rendering context. - * - * @return {GPUCanvasContext|WebGL2RenderingContext} The rendering context. - */ - getContext(): GPUCanvasContext | WebGL2RenderingContext; - /** - * Returns the pixel ratio. - * - * @return {number} The pixel ratio. - */ - getPixelRatio(): number; - /** - * Returns the drawing buffer size in physical pixels. This method honors the pixel ratio. - * - * @param {Vector2} target - The method writes the result in this target object. - * @return {Vector2} The drawing buffer size. - */ - getDrawingBufferSize(target: Vector2): Vector2; - /** - * Returns the renderer's size in logical pixels. This method does not honor the pixel ratio. - * - * @param {Vector2} target - The method writes the result in this target object. - * @return {Vector2} The renderer's size in logical pixels. - */ - getSize(target: Vector2): Vector2; - /** - * Sets the given pixel ratio and resizes the canvas if necessary. - * - * @param {number} [value=1] - The pixel ratio. - */ - setPixelRatio(value?: number): void; - /** - * This method allows to define the drawing buffer size by specifying - * width, height and pixel ratio all at once. The size of the drawing - * buffer is computed with this formula: - * ```js - * size.x = width * pixelRatio; - * size.y = height * pixelRatio; - * ``` - * - * @param {number} width - The width in logical pixels. - * @param {number} height - The height in logical pixels. - * @param {number} pixelRatio - The pixel ratio. - */ - setDrawingBufferSize(width: number, height: number, pixelRatio: number): void; - /** - * Sets the size of the renderer. - * - * @param {number} width - The width in logical pixels. - * @param {number} height - The height in logical pixels. - * @param {boolean} [updateStyle=true] - Whether to update the `style` attribute of the canvas or not. - */ - setSize(width: number, height: number, updateStyle?: boolean): void; - /** - * Defines a manual sort function for the opaque render list. - * Pass `null` to use the default sort. - * - * @param {Function} method - The sort function. - */ - setOpaqueSort(method: Function): void; - /** - * Defines a manual sort function for the transparent render list. - * Pass `null` to use the default sort. - * - * @param {Function} method - The sort function. - */ - setTransparentSort(method: Function): void; - /** - * Returns the scissor rectangle. - * - * @param {Vector4} target - The method writes the result in this target object. - * @return {Vector4} The scissor rectangle. - */ - getScissor(target: Vector4): Vector4; - /** - * Defines the scissor rectangle. - * - * @param {number | Vector4} x - The horizontal coordinate for the upper left corner of the box in logical pixel unit. - * Instead of passing four arguments, the method also works with a single four-dimensional vector. - * @param {number} y - The vertical coordinate for the upper left corner of the box in logical pixel unit. - * @param {number} width - The width of the scissor box in logical pixel unit. - * @param {number} height - The height of the scissor box in logical pixel unit. - */ - setScissor(x: number | Vector4, y: number, width: number, height: number): void; - /** - * Returns the scissor test value. - * - * @return {boolean} Whether the scissor test should be enabled or not. - */ - getScissorTest(): boolean; - /** - * Defines the scissor test. - * - * @param {boolean} boolean - Whether the scissor test should be enabled or not. - */ - setScissorTest(boolean: boolean): void; - /** - * Returns the viewport definition. - * - * @param {Vector4} target - The method writes the result in this target object. - * @return {Vector4} The viewport definition. - */ - getViewport(target: Vector4): Vector4; - /** - * Defines the viewport. - * - * @param {number | Vector4} x - The horizontal coordinate for the upper left corner of the viewport origin in logical pixel unit. - * @param {number} y - The vertical coordinate for the upper left corner of the viewport origin in logical pixel unit. - * @param {number} width - The width of the viewport in logical pixel unit. - * @param {number} height - The height of the viewport in logical pixel unit. - * @param {number} minDepth - The minimum depth value of the viewport. WebGPU only. - * @param {number} maxDepth - The maximum depth value of the viewport. WebGPU only. - */ - setViewport(x: number | Vector4, y: number, width: number, height: number, minDepth?: number, maxDepth?: number): void; - /** - * Returns the clear color. - * - * @param {Color} target - The method writes the result in this target object. - * @return {Color} The clear color. - */ - getClearColor(target: Color): Color; - /** - * Defines the clear color and optionally the clear alpha. - * - * @param {Color} color - The clear color. - * @param {number} [alpha=1] - The clear alpha. - */ - setClearColor(color: Color, alpha?: number): void; - /** - * Returns the clear alpha. - * - * @return {number} The clear alpha. - */ - getClearAlpha(): number; - /** - * Defines the clear alpha. - * - * @param {number} alpha - The clear alpha. - */ - setClearAlpha(alpha: number): void; - /** - * Returns the clear depth. - * - * @return {number} The clear depth. - */ - getClearDepth(): number; - /** - * Defines the clear depth. - * - * @param {number} depth - The clear depth. - */ - setClearDepth(depth: number): void; - /** - * Returns the clear stencil. - * - * @return {number} The clear stencil. - */ - getClearStencil(): number; - /** - * Defines the clear stencil. - * - * @param {number} stencil - The clear stencil. - */ - setClearStencil(stencil: number): void; - /** - * This method performs an occlusion query for the given 3D object. - * It returns `true` if the given 3D object is fully occluded by other - * 3D objects in the scene. - * - * @param {Object3D} object - The 3D object to test. - * @return {boolean} Whether the 3D object is fully occluded or not. - */ - isOccluded(object: Object3D): boolean; - /** - * Performs a manual clear operation. This method ignores `autoClear` properties. - * - * @param {boolean} [color=true] - Whether the color buffer should be cleared or not. - * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not. - * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not. - */ - clear(color?: boolean, depth?: boolean, stencil?: boolean): void; - /** - * Performs a manual clear operation of the color buffer. This method ignores `autoClear` properties. - */ - clearColor(): void; - /** - * Performs a manual clear operation of the depth buffer. This method ignores `autoClear` properties. - */ - clearDepth(): void; - /** - * Performs a manual clear operation of the stencil buffer. This method ignores `autoClear` properties. - */ - clearStencil(): void; - /** - * Async version of {@link Renderer#clear}. - * - * @async - * @deprecated - * @param {boolean} [color=true] - Whether the color buffer should be cleared or not. - * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not. - * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not. - * @return {Promise} A Promise that resolves when the clear operation has been executed. - */ - clearAsync(color?: boolean, depth?: boolean, stencil?: boolean): Promise; - /** - * Async version of {@link Renderer#clearColor}. - * - * @async - * @deprecated - * @return {Promise} A Promise that resolves when the clear operation has been executed. - */ - clearColorAsync(): Promise; - /** - * Async version of {@link Renderer#clearDepth}. - * - * @async - * @deprecated - * @return {Promise} A Promise that resolves when the clear operation has been executed. - */ - clearDepthAsync(): Promise; - /** - * Async version of {@link Renderer#clearStencil}. - * - * @async - * @deprecated - * @return {Promise} A Promise that resolves when the clear operation has been executed. - */ - clearStencilAsync(): Promise; - /** - * Returns `true` if a framebuffer target is needed to perform tone mapping or color space conversion. - * If this is the case, the renderer allocates an internal render target for that purpose. - * - */ - get needsFrameBufferTarget(): boolean; - /** - * The number of samples used for multi-sample anti-aliasing (MSAA). - * - * @type {number} - * @default 0 - */ - get samples(): number; - /** - * The current number of samples used for multi-sample anti-aliasing (MSAA). - * - * When rendering to a custom render target, the number of samples of that render target is used. - * If the renderer needs an internal framebuffer target for tone mapping or color space conversion, - * the number of samples is set to 0. - * - * @type {number} - */ - get currentSamples(): number; - /** - * The current tone mapping of the renderer. When not producing screen output, - * the tone mapping is always `NoToneMapping`. - * - * @type {number} - */ - get currentToneMapping(): number; - /** - * The current color space of the renderer. When not producing screen output, - * the color space is always the working color space. - * - * @type {string} - */ - get currentColorSpace(): string; - /** - * Returns `true` if the rendering settings are set to screen output. - * - * @returns {boolean} True if the current render target is the same of output render target or `null`, otherwise false. - */ - get isOutputTarget(): boolean; - /** - * Frees all internal resources of the renderer. Call this method if the renderer - * is no longer in use by your app. - */ - dispose(): void; - /** - * Sets the given render target. Calling this method means the renderer does not - * target the default framebuffer (meaning the canvas) anymore but a custom framebuffer. - * Use `null` as the first argument to reset the state. - * - * @param {?RenderTarget} renderTarget - The render target to set. - * @param {number} [activeCubeFace=0] - The active cube face. - * @param {number} [activeMipmapLevel=0] - The active mipmap level. - */ - setRenderTarget(renderTarget: RenderTarget | null, activeCubeFace?: number, activeMipmapLevel?: number): void; - /** - * Returns the current render target. - * - * @return {?RenderTarget} The render target. Returns `null` if no render target is set. - */ - getRenderTarget(): RenderTarget | null; - /** - * Sets the output render target for the renderer. - * - * @param {?RenderTarget} renderTarget - The render target to set as the output target. - */ - setOutputRenderTarget(renderTarget: RenderTarget | null): void; - /** - * Returns the current output target. - * - * @return {?RenderTarget} The current output render target. Returns `null` if no output target is set. - */ - getOutputRenderTarget(): RenderTarget | null; - /** - * Sets the canvas target. The canvas target manages the HTML canvas - * or the offscreen canvas the renderer draws into. - * - * @param {CanvasTarget} canvasTarget - The canvas target. - */ - setCanvasTarget(canvasTarget: CanvasTarget): void; - /** - * Returns the current canvas target. - * - * @return {CanvasTarget} The current canvas target. - */ - getCanvasTarget(): CanvasTarget; - /** - * Resets the renderer to the initial state before WebXR started. - * - * @private - */ - private _resetXRState; - /** - * Callback for {@link Renderer#setRenderObjectFunction}. - * - * @callback renderObjectFunction - * @param {Object3D} object - The 3D object. - * @param {Scene} scene - The scene the 3D object belongs to. - * @param {Camera} camera - The camera the object should be rendered with. - * @param {BufferGeometry} geometry - The object's geometry. - * @param {Material} material - The object's material. - * @param {?Object} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. - * @param {LightsNode} lightsNode - The current lights node. - * @param {ClippingContext} clippingContext - The clipping context. - * @param {?string} [passId=null] - An optional ID for identifying the pass. - */ - /** - * Sets the given render object function. Calling this method overwrites the default implementation - * which is {@link Renderer#renderObject}. Defining a custom function can be useful - * if you want to modify the way objects are rendered. For example you can define things like "every - * object that has material of a certain type should perform a pre-pass with a special overwrite material". - * The custom function must always call `renderObject()` in its implementation. - * - * Use `null` as the first argument to reset the state. - * - * @param {?renderObjectFunction} renderObjectFunction - The render object function. - */ - setRenderObjectFunction(renderObjectFunction: ((object: Object3D, scene: Scene, camera: Camera, geometry: BufferGeometry, material: Material, group: Object | null, lightsNode: LightsNode, clippingContext: ClippingContext, passId?: string | null | undefined) => any) | null): void; - /** - * Returns the current render object function. - * - * @return {?Function} The current render object function. Returns `null` if no function is set. - */ - getRenderObjectFunction(): Function | null; - /** - * Execute a single or an array of compute nodes. This method can only be called - * if the renderer has been initialized. - * - * @param {Node|Array} computeNodes - The compute node(s). - * @param {number|Array|IndirectStorageBufferAttribute} [dispatchSize=null] - * - A single number representing count, or - * - An array [x, y, z] representing dispatch size, or - * - A IndirectStorageBufferAttribute for indirect dispatch size. - * @return {Promise|undefined} A Promise that resolve when the compute has finished. Only returned when the renderer has not been initialized. - */ - compute(computeNodes: Node | Array, dispatchSize?: number | Array | IndirectStorageBufferAttribute): Promise | undefined; - /** - * Execute a single or an array of compute nodes. - * - * @async - * @param {Node|Array} computeNodes - The compute node(s). - * @param {number|Array|IndirectStorageBufferAttribute} [dispatchSize=null] - * - A single number representing count, or - * - An array [x, y, z] representing dispatch size, or - * - A IndirectStorageBufferAttribute for indirect dispatch size. - * @return {Promise} A Promise that resolve when the compute has finished. - */ - computeAsync(computeNodes: Node | Array, dispatchSize?: number | Array | IndirectStorageBufferAttribute): Promise; - /** - * Checks if the given feature is supported by the selected backend. - * - * @async - * @deprecated - * @param {string} name - The feature's name. - * @return {Promise} A Promise that resolves with a bool that indicates whether the feature is supported or not. - */ - hasFeatureAsync(name: string): Promise; - resolveTimestampsAsync(type?: string): Promise; - /** - * Checks if the given feature is supported by the selected backend. If the - * renderer has not been initialized, this method always returns `false`. - * - * @param {string} name - The feature's name. - * @return {boolean} Whether the feature is supported or not. - */ - hasFeature(name: string): boolean; - /** - * Returns `true` when the renderer has been initialized. - * - * @return {boolean} Whether the renderer has been initialized or not. - */ - hasInitialized(): boolean; - /** - * Initializes the given textures. Useful for preloading a texture rather than waiting until first render - * (which can cause noticeable lags due to decode and GPU upload overhead). - * - * @async - * @deprecated - * @param {Texture} texture - The texture. - * @return {Promise} A Promise that resolves when the texture has been initialized. - */ - initTextureAsync(texture: Texture): Promise; - /** - * Initializes the given texture. Useful for preloading a texture rather than waiting until first render - * (which can cause noticeable lags due to decode and GPU upload overhead). - * - * This method can only be used if the renderer has been initialized. - * - * @param {Texture} texture - The texture. - */ - initTexture(texture: Texture): void; - /** - * Initializes the given render target. - * - * @param {RenderTarget} renderTarget - The render target to intialize. - */ - initRenderTarget(renderTarget: RenderTarget): void; - /** - * Copies the current bound framebuffer into the given texture. - * - * @param {FramebufferTexture} framebufferTexture - The texture. - * @param {?(Vector2|Vector4)} [rectangle=null] - A two or four dimensional vector that defines the rectangular portion of the framebuffer that should be copied. - */ - copyFramebufferToTexture(framebufferTexture: FramebufferTexture, rectangle?: (Vector2 | Vector4) | null): void; - /** - * Copies data of the given source texture into a destination texture. - * - * @param {Texture} srcTexture - The source texture. - * @param {Texture} dstTexture - The destination texture. - * @param {Box2|Box3} [srcRegion=null] - A bounding box which describes the source region. Can be two or three-dimensional. - * @param {Vector2|Vector3} [dstPosition=null] - A vector that represents the origin of the destination region. Can be two or three-dimensional. - * @param {number} [srcLevel=0] - The source mip level to copy from. - * @param {number} [dstLevel=0] - The destination mip level to copy to. - */ - copyTextureToTexture(srcTexture: Texture, dstTexture: Texture, srcRegion?: Box2 | Box3, dstPosition?: Vector2 | Vector3, srcLevel?: number, dstLevel?: number): void; - /** - * Reads pixel data from the given render target. - * - * @async - * @param {RenderTarget} renderTarget - The render target to read from. - * @param {number} x - The `x` coordinate of the copy region's origin. - * @param {number} y - The `y` coordinate of the copy region's origin. - * @param {number} width - The width of the copy region. - * @param {number} height - The height of the copy region. - * @param {number} [textureIndex=0] - The texture index of a MRT render target. - * @param {number} [faceIndex=0] - The active cube face index. - * @return {Promise} A Promise that resolves when the read has been finished. The resolve provides the read data as a typed array. - */ - readRenderTargetPixelsAsync(renderTarget: RenderTarget, x: number, y: number, width: number, height: number, textureIndex?: number, faceIndex?: number): Promise; - /** - * Analyzes the given 3D object's hierarchy and builds render lists from the - * processed hierarchy. - * - * @private - * @param {Object3D} object - The 3D object to process (usually a scene). - * @param {Camera} camera - The camera the object is rendered with. - * @param {number} groupOrder - The group order is derived from the `renderOrder` of groups and is used to group 3D objects within groups. - * @param {RenderList} renderList - The current render list. - * @param {ClippingContext} clippingContext - The current clipping context. - */ - private _projectObject; - /** - * Renders the given render bundles. - * - * @private - * @param {Array} bundles - Array with render bundle data. - * @param {Scene} sceneRef - The scene the render bundles belong to. - * @param {LightsNode} lightsNode - The current lights node. - */ - private _renderBundles; - /** - * Renders the transparent objects from the given render lists. - * - * @private - * @param {Array} renderList - The transparent render list. - * @param {Array} doublePassList - The list of transparent objects which require a double pass (e.g. because of transmission). - * @param {Camera} camera - The camera the render list should be rendered with. - * @param {Scene} scene - The scene the render list belongs to. - * @param {LightsNode} lightsNode - The current lights node. - */ - private _renderTransparents; - /** - * Renders the objects from the given render list. - * - * @private - * @param {Array} renderList - The render list. - * @param {Camera} camera - The camera the render list should be rendered with. - * @param {Scene} scene - The scene the render list belongs to. - * @param {LightsNode} lightsNode - The current lights node. - * @param {?string} [passId=null] - An optional ID for identifying the pass. - */ - private _renderObjects; - /** - * Retrieves shadow nodes for the given material. This is used to setup shadow passes. - * The result is cached per material and updated when the material's version changes. - * - * @private - * @param {Material} material - * @returns {Object} - The shadow nodes for the material. - */ - private _getShadowNodes; - /** - * This method represents the default render object function that manages the render lifecycle - * of the object. - * - * @param {Object3D} object - The 3D object. - * @param {Scene} scene - The scene the 3D object belongs to. - * @param {Camera} camera - The camera the object should be rendered with. - * @param {BufferGeometry} geometry - The object's geometry. - * @param {Material} material - The object's material. - * @param {?Object} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. - * @param {LightsNode} lightsNode - The current lights node. - * @param {?ClippingContext} clippingContext - The clipping context. - * @param {?string} [passId=null] - An optional ID for identifying the pass. - */ - renderObject(object: Object3D, scene: Scene, camera: Camera, geometry: BufferGeometry, material: Material, group: Object | null, lightsNode: LightsNode, clippingContext?: ClippingContext | null, passId?: string | null): void; - /** - * Checks if the given compatibility is supported by the selected backend. - * - * @param {string} name - The compatibility's name. - * @return {boolean} Whether the compatibility is supported or not. - */ - hasCompatibility(name: string): boolean; - /** - * This method represents the default `_handleObjectFunction` implementation which creates - * a render object from the given data and performs the draw command with the selected backend. - * - * @private - * @param {Object3D} object - The 3D object. - * @param {Material} material - The object's material. - * @param {Scene} scene - The scene the 3D object belongs to. - * @param {Camera} camera - The camera the object should be rendered with. - * @param {LightsNode} lightsNode - The current lights node. - * @param {?{start: number, count: number}} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. - * @param {ClippingContext} clippingContext - The clipping context. - * @param {string} [passId] - An optional ID for identifying the pass. - */ - private _renderObjectDirect; - /** - * A different implementation for `_handleObjectFunction` which only makes sure the object is ready for rendering. - * Used in `compileAsync()`. - * - * @private - * @param {Object3D} object - The 3D object. - * @param {Material} material - The object's material. - * @param {Scene} scene - The scene the 3D object belongs to. - * @param {Camera} camera - The camera the object should be rendered with. - * @param {LightsNode} lightsNode - The current lights node. - * @param {?{start: number, count: number}} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. - * @param {ClippingContext} clippingContext - The clipping context. - * @param {string} [passId] - An optional ID for identifying the pass. - */ - private _createObjectPipeline; - /** - * Alias for `compileAsync()`. - * - * @method - * @param {Object3D} scene - The scene or 3D object to precompile. - * @param {Camera} camera - The camera that is used to render the scene. - * @param {Scene} targetScene - If the first argument is a 3D object, this parameter must represent the scene the 3D object is going to be added. - * @return {function(Object3D, Camera, ?Scene): Promise|undefined} A Promise that resolves when the compile has been finished. - */ - get compile(): (arg0: Object3D, arg1: Camera, arg2: Scene | null) => Promise | undefined; -} -/** - * Base class for node functions. A derived module must be implemented - * for each supported native shader language. Similar to other `Node*` modules, - * this class is only relevant during the building process and not used - * in user-level code. - */ -declare class NodeFunction { - /** - * Constructs a new node function. - * - * @param {string} type - The node type. This type is the return type of the node function. - * @param {Array} inputs - The function's inputs. - * @param {string} [name=''] - The function's name. - * @param {string} [precision=''] - The precision qualifier. - */ - constructor(type: string, inputs: Array, name?: string, precision?: string); - /** - * The node type. This type is the return type of the node function. - * - * @type {string} - */ - type: string; - /** - * The function's inputs. - * - * @type {Array} - */ - inputs: Array; - /** - * The name of the uniform. - * - * @type {string} - * @default '' - */ - name: string; - /** - * The precision qualifier. - * - * @type {string} - * @default '' - */ - precision: string; - /** - * This method returns the native code of the node function. - * - * @abstract - * @param {string} name - The function's name. - * @return {string} A shader code. - */ - getCode(): string; -} -declare namespace NodeFunction { - let isNodeFunction: boolean; -} -/** - * A special form of uniforms group that represents - * the individual uniforms as node-based uniforms. - * - * @private - * @augments UniformsGroup - */ -declare class NodeUniformsGroup extends UniformsGroup { - /** - * Constructs a new node-based uniforms group. - * - * @param {string} name - The group's name. - * @param {UniformGroupNode} groupNode - The uniform group node. - */ - constructor(name: string, groupNode: UniformGroupNode); - /** - * The group's ID. - * - * @type {number} - */ - id: number; - /** - * The uniform group node. - * - * @type {UniformGroupNode} - */ - groupNode: UniformGroupNode; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isNodeUniformsGroup: boolean; -} -declare class ShaderNodeInternal extends Node { - constructor(jsFunc: any, nodeType: any); - jsFunc: any; - layout: any; - once: boolean; - setLayout(layout: any): this; - getLayout(): any; - call(rawInputs?: null): ShaderCallNodeInternal; - setup(): ShaderCallNodeInternal; -} -/** - * Base class for node parsers. A derived parser must be implemented - * for each supported native shader language. - */ -declare class NodeParser { - /** - * The method parses the given native code an returns a node function. - * - * @abstract - * @param {string} source - The native shader code. - * @return {NodeFunction} A node function. - */ - parseFunction(): NodeFunction; -} -/** - * This class represents a GLSL node function. - * - * @augments NodeFunction - */ -declare class GLSLNodeFunction extends NodeFunction { - /** - * Constructs a new GLSL node function. - * - * @param {string} source - The GLSL source. - */ - constructor(source: string); - inputsCode: any; - blockCode: any; - headerCode: any; - /** - * This method returns the GLSL code of the node function. - * - * @param {string} [name=this.name] - The function's name. - * @return {string} The shader code. - */ - getCode(name?: string): string; -} -/** - * Represents the lighting model for unlit materials. The only light contribution - * is baked indirect lighting modulated with ambient occlusion and the material's - * diffuse color. Environment mapping is supported. Used in {@link MeshBasicNodeMaterial}. - * - * @augments LightingModel - */ -declare class BasicLightingModel extends LightingModel { - /** - * Implements the baked indirect lighting with its modulation. - * - * @param {NodeBuilder} builder - The current node builder. - */ - indirect({ context }: NodeBuilder): void; - /** - * Implements the environment mapping. - * - * @param {NodeBuilder} builder - The current node builder. - */ - finish(builder: NodeBuilder): void; -} -/** - * Represents the lighting model for {@link MeshSSSNodeMaterial}. - * - * @augments PhysicalLightingModel - */ -declare class SSSLightingModel extends PhysicalLightingModel { - /** - * Constructs a new physical lighting model. - * - * @param {boolean} [clearcoat=false] - Whether clearcoat is supported or not. - * @param {boolean} [sheen=false] - Whether sheen is supported or not. - * @param {boolean} [iridescence=false] - Whether iridescence is supported or not. - * @param {boolean} [anisotropy=false] - Whether anisotropy is supported or not. - * @param {boolean} [transmission=false] - Whether transmission is supported or not. - * @param {boolean} [dispersion=false] - Whether dispersion is supported or not. - * @param {boolean} [sss=false] - Whether SSS is supported or not. - */ - constructor(clearcoat?: boolean, sheen?: boolean, iridescence?: boolean, anisotropy?: boolean, transmission?: boolean, dispersion?: boolean, sss?: boolean); - /** - * Whether the lighting model should use SSS or not. - * - * @type {boolean} - * @default false - */ - useSSS: boolean; - /** - * Extends the default implementation with a SSS term. - * - * Reference: [Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look](https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/) - * - * @param {Object} input - The input data. - * @param {NodeBuilder} builder - The current node builder. - */ - direct({ lightDirection, lightColor, reflectedLight }: Object, builder: NodeBuilder): void; -} -/** - * Represents the lighting model for a toon material. Used in {@link MeshToonNodeMaterial}. - * - * @augments LightingModel - */ -declare class ToonLightingModel extends LightingModel { - /** - * Implements the direct lighting. Instead of using a conventional smooth irradiance, the irradiance is - * reduced to a small number of discrete shades to create a comic-like, flat look. - * - * @param {Object} lightData - The light data. - * @param {NodeBuilder} builder - The current node builder. - */ - direct({ lightDirection, lightColor, reflectedLight }: Object, builder: NodeBuilder): void; - /** - * Implements the indirect lighting. - * - * @param {NodeBuilder} builder - The current node builder. - */ - indirect(builder: NodeBuilder): void; -} -/** - * Represents the state that is used to perform clipping via clipping planes. - * There is a default clipping context for each render context. When the - * scene holds instances of `ClippingGroup`, there will be a context for each - * group. - * - * @private - */ -declare class ClippingContext { - /** - * Constructs a new clipping context. - * - * @param {?ClippingContext} [parentContext=null] - A reference to the parent clipping context. - */ - constructor(parentContext?: ClippingContext | null); - /** - * The clipping context's version. - * - * @type {number} - * @readonly - */ - readonly version: number; - /** - * Whether the intersection of the clipping planes is used to clip objects, rather than their union. - * - * @type {?boolean} - * @default null - */ - clipIntersection: boolean | null; - /** - * The clipping context's cache key. - * - * @type {string} - */ - cacheKey: string; - /** - * Whether the shadow pass is active or not. - * - * @type {boolean} - * @default false - */ - shadowPass: boolean; - /** - * The view matrix. - * - * @type {Matrix4} - */ - viewMatrix: Matrix4; - /** - * The view normal matrix. - * - * @type {Matrix3} - */ - viewNormalMatrix: Matrix3; - /** - * Internal cache for maintaining clipping contexts. - * - * @type {WeakMap} - */ - clippingGroupContexts: WeakMap; - /** - * The intersection planes. - * - * @type {Array} - */ - intersectionPlanes: Array; - /** - * The intersection planes. - * - * @type {Array} - */ - unionPlanes: Array; - /** - * The version of the clipping context's parent context. - * - * @type {?number} - * @readonly - */ - readonly parentVersion: number | null; - /** - * Projects the given source clipping planes and writes the result into the - * destination array. - * - * @param {Array} source - The source clipping planes. - * @param {Array} destination - The destination. - * @param {number} offset - The offset. - */ - projectPlanes(source: Array, destination: Array, offset: number): void; - /** - * Updates the root clipping context of a scene. - * - * @param {Scene} scene - The scene. - * @param {Camera} camera - The camera that is used to render the scene. - */ - updateGlobal(scene: Scene, camera: Camera): void; - /** - * Updates the clipping context. - * - * @param {ClippingContext} parentContext - The parent context. - * @param {ClippingGroup} clippingGroup - The clipping group this context belongs to. - */ - update(parentContext: ClippingContext, clippingGroup: ClippingGroup): void; - /** - * Returns a clipping context for the given clipping group. - * - * @param {ClippingGroup} clippingGroup - The clipping group. - * @return {ClippingContext} The clipping context. - */ - getGroupContext(clippingGroup: ClippingGroup): ClippingContext; - /** - * The count of union clipping planes. - * - * @type {number} - * @readonly - */ - readonly get unionClippingCount(): number; -} -/** - * A bind group represents a collection of bindings and thus a collection - * or resources. Bind groups are assigned to pipelines to provide them - * with the required resources (like uniform buffers or textures). - * - * @private - */ -declare class BindGroup { - /** - * Constructs a new bind group. - * - * @param {string} name - The bind group's name. - * @param {Array} bindings - An array of bindings. - * @param {number} index - The group index. - */ - constructor(name?: string, bindings?: Array); - /** - * The bind group's name. - * - * @type {string} - */ - name: string; - /** - * An array of bindings. - * - * @type {Array} - */ - bindings: Array; - /** - * The group's ID. - * - * @type {number} - */ - id: number; -} -declare class StructType { - constructor(name: any, members: any); - name: any; - members: any; - output: boolean; -} -/** - * Abstract base class for uniforms. - * - * @abstract - * @private - */ -declare class Uniform { - /** - * Constructs a new uniform. - * - * @param {string} name - The uniform's name. - * @param {any} value - The uniform's value. - */ - constructor(name: string, value: any); - /** - * The uniform's name. - * - * @type {string} - */ - name: string; - /** - * The uniform's value. - * - * @type {any} - */ - value: any; - /** - * Used to build the uniform buffer according to the STD140 layout. - * Derived uniforms will set this property to a data type specific - * value. - * - * @type {number} - */ - boundary: number; - /** - * The item size. Derived uniforms will set this property to a data - * type specific value. - * - * @type {number} - */ - itemSize: number; - /** - * This property is set by {@link UniformsGroup} and marks - * the start position in the uniform buffer. - * - * @type {number} - */ - offset: number; - /** - * This property is set by {@link UniformsGroup} and marks - * the index position in the uniform array. - * - * @type {number} - */ - index: number; - /** - * Sets the uniform's value. - * - * @param {any} value - The value to set. - */ - setValue(value: any): void; - /** - * Returns the uniform's value. - * - * @return {any} The value. - */ - getValue(): any; -} -/** - * A render object is the renderer's representation of single entity that gets drawn - * with a draw command. There is no unique mapping of render objects to 3D objects in the - * scene since render objects also depend from the used material, the current render context - * and the current scene's lighting. - * - * In general, the basic process of the renderer is: - * - * - Analyze the 3D objects in the scene and generate render lists containing render items. - * - Process the render lists by calling one or more render commands for each render item. - * - For each render command, request a render object and perform the draw. - * - * The module provides an interface to get data required for the draw command like the actual - * draw parameters or vertex buffers. It also holds a series of caching related methods since - * creating render objects should only be done when necessary. - * - * @private - */ -declare class RenderObject { - /** - * Constructs a new render object. - * - * @param {NodeManager} nodes - Renderer component for managing nodes related logic. - * @param {Geometries} geometries - Renderer component for managing geometries. - * @param {Renderer} renderer - The renderer. - * @param {Object3D} object - The 3D object. - * @param {Material} material - The 3D object's material. - * @param {Scene} scene - The scene the 3D object belongs to. - * @param {Camera} camera - The camera the object should be rendered with. - * @param {LightsNode} lightsNode - The lights node. - * @param {RenderContext} renderContext - The render context. - * @param {ClippingContext} clippingContext - The clipping context. - */ - constructor(nodes: NodeManager, geometries: Geometries, renderer: Renderer, object: Object3D, material: Material, scene: Scene, camera: Camera, lightsNode: LightsNode, renderContext: RenderContext, clippingContext: ClippingContext); - id: number; - /** - * Renderer component for managing nodes related logic. - * - * @type {NodeManager} - * @private - */ - private _nodes; - /** - * Renderer component for managing geometries. - * - * @type {Geometries} - * @private - */ - private _geometries; - /** - * The renderer. - * - * @type {Renderer} - */ - renderer: Renderer; - /** - * The 3D object. - * - * @type {Object3D} - */ - object: Object3D; - /** - * The 3D object's material. - * - * @type {Material} - */ - material: Material; - /** - * The scene the 3D object belongs to. - * - * @type {Scene} - */ - scene: Scene; - /** - * The camera the 3D object should be rendered with. - * - * @type {Camera} - */ - camera: Camera; - /** - * The lights node. - * - * @type {LightsNode} - */ - lightsNode: LightsNode; - /** - * The render context. - * - * @type {RenderContext} - */ - context: RenderContext; - /** - * The 3D object's geometry. - * - * @type {BufferGeometry} - */ - geometry: BufferGeometry; - /** - * The render object's version. - * - * @type {number} - */ - version: number; - /** - * The draw range of the geometry. - * - * @type {?Object} - * @default null - */ - drawRange: Object | null; - /** - * An array holding the buffer attributes - * of the render object. This entails attribute - * definitions on geometry and node level. - * - * @type {?Array} - * @default null - */ - attributes: Array | null; - /** - * An object holding the version of the - * attributes. The keys are the attribute names - * and the values are the attribute versions. - * - * @type {?Object} - * @default null - */ - attributesId: { - [x: string]: number; - } | null; - /** - * A reference to a render pipeline the render - * object is processed with. - * - * @type {RenderPipeline} - * @default null - */ - pipeline: RenderPipeline; - /** - * Only relevant for objects using - * multiple materials. This represents a group entry - * from the respective `BufferGeometry`. - * - * @type {?{start: number, count: number}} - * @default null - */ - group: { - start: number; - count: number; - } | null; - /** - * An array holding the vertex buffers which can - * be buffer attributes but also interleaved buffers. - * - * @type {?Array} - * @default null - */ - vertexBuffers: Array | null; - /** - * The parameters for the draw command. - * - * @type {?Object} - * @default null - */ - drawParams: Object | null; - /** - * If this render object is used inside a render bundle, - * this property points to the respective bundle group. - * - * @type {?BundleGroup} - * @default null - */ - bundle: BundleGroup | null; - /** - * The clipping context. - * - * @type {ClippingContext} - */ - clippingContext: ClippingContext; - /** - * The clipping context's cache key. - * - * @type {string} - */ - clippingContextCacheKey: string; - /** - * The initial node cache key. - * - * @type {number} - */ - initialNodesCacheKey: number; - /** - * The initial cache key. - * - * @type {number} - */ - initialCacheKey: number; - /** - * The node builder state. - * - * @type {?NodeBuilderState} - * @private - * @default null - */ - private _nodeBuilderState; - /** - * An array of bindings. - * - * @type {?Array} - * @private - * @default null - */ - private _bindings; - /** - * Reference to the node material observer. - * - * @type {?NodeMaterialObserver} - * @private - * @default null - */ - private _monitor; - /** - * An event listener which is defined by `RenderObjects`. It performs - * clean up tasks when `dispose()` on this render object. - * - * @method - */ - onDispose: any; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isRenderObject: boolean; - /** - * An event listener which is executed when `dispose()` is called on - * the material of this render object. - * - * @method - */ - onMaterialDispose: () => void; - /** - * An event listener which is executed when `dispose()` is called on - * the geometry of this render object. - * - * @method - */ - onGeometryDispose: () => void; - /** - * Updates the clipping context. - * - * @param {ClippingContext} context - The clipping context to set. - */ - updateClipping(context: ClippingContext): void; - /** - * Whether the clipping requires an update or not. - * - * @type {boolean} - * @readonly - */ - readonly get clippingNeedsUpdate(): boolean; - /** - * The number of clipping planes defined in context of hardware clipping. - * - * @type {number} - * @readonly - */ - readonly get hardwareClippingPlanes(): number; - /** - * Returns the node builder state of this render object. - * - * @return {NodeBuilderState} The node builder state. - */ - getNodeBuilderState(): NodeBuilderState; - /** - * Returns the node material observer of this render object. - * - * @return {NodeMaterialObserver} The node material observer. - */ - getMonitor(): NodeMaterialObserver; - /** - * Returns an array of bind groups of this render object. - * - * @return {Array} The bindings. - */ - getBindings(): Array; - /** - * Returns a binding group by group name of this render object. - * - * @param {string} name - The name of the binding group. - * @return {?BindGroup} The bindings. - */ - getBindingGroup(name: string): BindGroup | null; - /** - * Returns the index of the render object's geometry. - * - * @return {?BufferAttribute} The index. Returns `null` for non-indexed geometries. - */ - getIndex(): BufferAttribute | null; - /** - * Returns the indirect buffer attribute. - * - * @return {?BufferAttribute} The indirect attribute. `null` if no indirect drawing is used. - */ - getIndirect(): BufferAttribute | null; - /** - * Returns the byte offset into the indirect attribute buffer. - * - * @return {number|Array} The byte offset into the indirect attribute buffer. - */ - getIndirectOffset(): number | Array; - /** - * Returns an array that acts as a key for identifying the render object in a chain map. - * - * @return {Array} An array with object references. - */ - getChainArray(): Array; - /** - * This method is used when the geometry of a 3D object has been exchanged and the - * respective render object now requires an update. - * - * @param {BufferGeometry} geometry - The geometry to set. - */ - setGeometry(geometry: BufferGeometry): void; - /** - * Returns the buffer attributes of the render object. The returned array holds - * attribute definitions on geometry and node level. - * - * @return {Array} An array with buffer attributes. - */ - getAttributes(): Array; - /** - * Returns the vertex buffers of the render object. - * - * @return {Array} An array with buffer attribute or interleaved buffers. - */ - getVertexBuffers(): Array; - /** - * Returns the draw parameters for the render object. - * - * @return {?{vertexCount: number, firstVertex: number, instanceCount: number, firstInstance: number}} The draw parameters. - */ - getDrawParameters(): { - vertexCount: number; - firstVertex: number; - instanceCount: number; - firstInstance: number; - } | null; - /** - * Returns the render object's geometry cache key. - * - * The geometry cache key is part of the material cache key. - * - * @return {string} The geometry cache key. - */ - getGeometryCacheKey(): string; - /** - * Returns the render object's material cache key. - * - * The material cache key is part of the render object cache key. - * - * @return {number} The material cache key. - */ - getMaterialCacheKey(): number; - /** - * Whether the geometry requires an update or not. - * - * @type {boolean} - * @readonly - */ - readonly get needsGeometryUpdate(): boolean; - /** - * Whether the render object requires an update or not. - * - * Note: There are two distinct places where render objects are checked for an update. - * - * 1. In `RenderObjects.get()` which is executed when the render object is request. This - * method checks the `needsUpdate` flag and recreates the render object if necessary. - * 2. In `Renderer._renderObjectDirect()` right after getting the render object via - * `RenderObjects.get()`. The render object's NodeMaterialObserver is then used to detect - * a need for a refresh due to material, geometry or object related value changes. - * - * TODO: Investigate if it's possible to merge both steps so there is only a single place - * that performs the 'needsUpdate' check. - * - * @type {boolean} - * @readonly - */ - readonly get needsUpdate(): boolean; - /** - * Returns the dynamic cache key which represents a key that is computed per draw command. - * - * @return {number} The cache key. - */ - getDynamicCacheKey(): number; - /** - * Returns the render object's cache key. - * - * @return {number} The cache key. - */ - getCacheKey(): number; - /** - * Frees internal resources. - */ - dispose(): void; -} -/** - * Converts the given array buffer to a Base64 string. - * - * @private - * @method - * @param {ArrayBuffer} arrayBuffer - The array buffer. - * @return {string} The Base64 string. - */ -declare function arrayBufferToBase64(arrayBuffer: ArrayBuffer): string; -/** - * Converts the given Base64 string to an array buffer. - * - * @private - * @method - * @param {string} base64 - The Base64 string. - * @return {ArrayBuffer} The array buffer. - */ -declare function base64ToArrayBuffer(base64: string): ArrayBuffer; -/** - * Returns the alignment requirement for the given data type in 4-byte elements. - * - * @private - * @method - * @param {string} type - The data type. - * @return {number} The alignment requirement in 4-byte elements. - */ -declare function getAlignmentFromType(type: string): number; -/** - * Gets the object data that can be shared between different rendering steps. - * - * @private - * @param {Object} object - The object to get the data for. - * @return {Object} The object data. - */ -declare function getDataFromObject(object: Object): Object; -/** - * Returns the length for the given data type. - * - * @private - * @method - * @param {string} type - The data type. - * @return {number} The length. - */ -declare function getLengthFromType(type: string): number; -/** - * Returns the gpu memory length for the given data type in 4-byte elements. - * - * @private - * @method - * @param {string} type - The data type. - * @return {number} The memory length in 4-byte elements. - */ -declare function getMemoryLengthFromType(type: string): number; -/** - * Returns the data type for the given the length. - * - * @private - * @method - * @param {number} length - The length. - * @return {string} The data type. - */ -declare function getTypeFromLength(length: number): string; -/** - * Returns the typed array for the given data type. - * - * @private - * @method - * @param {string} type - The data type. - * @return {TypedArray} The typed array. - */ -declare function getTypedArrayFromType(type: string): TypedArray; -/** - * Returns the value/object for the given data type and parameters. - * - * @private - * @method - * @param {string} type - The given type. - * @param {...any} params - A parameter list. - * @return {any} The value/object. - */ -declare function getValueFromType(type: string, ...params: any[]): any; -/** - * Returns the data type for the given value. - * - * @private - * @method - * @param {any} value - The value. - * @return {?string} The data type. - */ -declare function getValueType(value: any): string | null; -/** - * This class is only relevant if the referenced property is array-like. - * In this case, `ReferenceElementNode` allows to refer to a specific - * element inside the data structure via an index. - * - * @augments ArrayElementNode - */ -declare class ReferenceElementNode extends ArrayElementNode { - /** - * Constructs a new reference element node. - * - * @param {?ReferenceNode} referenceNode - The reference node. - * @param {Node} indexNode - The index node that defines the element access. - */ - constructor(referenceNode: ReferenceNode | null, indexNode: Node); - /** - * Similar to {@link ReferenceNode#reference}, an additional - * property references to the current node. - * - * @type {?ReferenceNode} - * @default null - */ - referenceNode: ReferenceNode | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isReferenceElementNode: boolean; - /** - * This method is overwritten since the node type is inferred from - * the uniform type of the reference node. - * - * @return {string} The node type. - */ - generateNodeType(): string; - generate(builder: any): any; -} -/** - * Holds the actual implementation of the reflector. - * - * TODO: Explain why `ReflectorBaseNode`. Originally the entire logic was implemented - * in `ReflectorNode`, see #29619. - * - * @private - * @augments Node - */ -declare class ReflectorBaseNode extends Node { - /** - * Constructs a new reflector base node. - * - * @param {TextureNode} textureNode - Represents the rendered reflections as a texture node. - * @param {Object} [parameters={}] - An object holding configuration parameters. - * @param {Object3D} [parameters.target=new Object3D()] - The 3D object the reflector is linked to. - * @param {number} [parameters.resolutionScale=1] - The resolution scale. - * @param {boolean} [parameters.generateMipmaps=false] - Whether mipmaps should be generated or not. - * @param {boolean} [parameters.bounces=true] - Whether reflectors can render other reflector nodes or not. - * @param {boolean} [parameters.depth=false] - Whether depth data should be generated or not. - * @param {number} [parameters.samples] - Anti-Aliasing samples of the internal render-target. - */ - constructor(textureNode: TextureNode, parameters?: { - target?: Object3D | undefined; - resolutionScale?: number | undefined; - generateMipmaps?: boolean | undefined; - bounces?: boolean | undefined; - depth?: boolean | undefined; - samples?: number | undefined; - }); - /** - * Represents the rendered reflections as a texture node. - * - * @type {TextureNode} - */ - textureNode: TextureNode; - /** - * The 3D object the reflector is linked to. - * - * @type {Object3D} - * @default {new Object3D()} - */ - target: Object3D; - /** - * The resolution scale. - * - * @type {number} - * @default {1} - */ - resolutionScale: number; - /** - * Whether mipmaps should be generated or not. - * - * @type {boolean} - * @default {false} - */ - generateMipmaps: boolean; - /** - * Whether reflectors can render other reflector nodes or not. - * - * @type {boolean} - * @default {true} - */ - bounces: boolean; - /** - * Whether depth data should be generated or not. - * - * @type {boolean} - * @default {false} - */ - depth: boolean; - /** - * The number of anti-aliasing samples for the render-target - * - * @type {number} - * @default {0} - */ - samples: number; - /** - * Weak map for managing virtual cameras. - * - * @type {WeakMap} - */ - virtualCameras: WeakMap; - /** - * Weak map for managing render targets. - * - * @type {Map} - */ - renderTargets: Map; - /** - * Force render even if reflector is facing away from camera. - * - * @type {boolean} - * @default {false} - */ - forceUpdate: boolean; - /** - * Whether the reflector has been rendered or not. - * - * When the reflector is facing away from the camera, - * this flag is set to `false` and the texture will be empty(black). - * - * @type {boolean} - * @default {false} - */ - hasOutput: boolean; - /** - * Updates the resolution of the internal render target. - * - * @private - * @param {RenderTarget} renderTarget - The render target to resize. - * @param {Renderer} renderer - The renderer that is used to determine the new size. - */ - private _updateResolution; - setup(builder: any): Node | null; - /** - * Returns a virtual camera for the given camera. The virtual camera is used to - * render the scene from the reflector's view so correct reflections can be produced. - * - * @param {Camera} camera - The scene's camera. - * @return {Camera} The corresponding virtual camera. - */ - getVirtualCamera(camera: Camera): Camera; - /** - * Returns a render target for the given camera. The reflections are rendered - * into this render target. - * - * @param {Camera} camera - The scene's camera. - * @return {RenderTarget} The render target. - */ - getRenderTarget(camera: Camera): RenderTarget; - updateBefore(frame: any): false | undefined; - set resolution(value: number); - /** - * The resolution scale. - * - * @deprecated - * @type {number} - * @default {1} - */ - get resolution(): number; -} -/** - * Saves the state of the given renderer and scene and stores it into the given state object. - * Besides, the function also resets the state of the renderer and scene to its default values. - * - * If not state object is provided, the function creates one. - * - * @private - * @function - * @param {Renderer} renderer - The renderer. - * @param {Scene} scene - The scene. - * @param {Object} [state={}] - The state. - * @return {Object} The state. - */ -declare function resetRendererAndSceneState(renderer: Renderer, scene: Scene, state?: Object): Object; -/** - * Saves the state of the given renderer and stores it into the given state object. - * Besides, the function also resets the state of the renderer to its default values. - * - * If not state object is provided, the function creates one. - * - * @private - * @function - * @param {Renderer} renderer - The renderer. - * @param {Object} [state={}] - The state. - * @return {Object} The state. - */ -declare function resetRendererState(renderer: Renderer, state?: Object): Object; -/** - * Saves the state of the given scene and stores it into the given state object. - * Besides, the function also resets the state of the scene to its default values. - * - * If not state object is provided, the function creates one. - * - * @private - * @function - * @param {Scene} scene - The scene. - * @param {Object} [state={}] - The state. - * @return {Object} The state. - */ -declare function resetSceneState(scene: Scene, state?: Object): Object; -/** - * Restores the state of the given renderer and scene from the given state object. - * - * @private - * @function - * @param {Renderer} renderer - The renderer. - * @param {Scene} scene - The scene. - * @param {Object} state - The state to restore. - */ -declare function restoreRendererAndSceneState(renderer: Renderer, scene: Scene, state: Object): void; -/** - * Restores the state of the given renderer from the given state object. - * - * @private - * @function - * @param {Renderer} renderer - The renderer. - * @param {Object} state - The state to restore. - */ -declare function restoreRendererState(renderer: Renderer, state: Object): void; -/** - * Restores the state of the given scene from the given state object. - * - * @private - * @function - * @param {Scene} scene - The scene. - * @param {Object} state - The state to restore. - */ -declare function restoreSceneState(scene: Scene, state: Object): void; -/** - * Saves the state of the given renderer and scene and stores it into the given state object. - * - * If not state object is provided, the function creates one. - * - * @private - * @function - * @param {Renderer} renderer - The renderer. - * @param {Scene} scene - The scene. - * @param {Object} [state={}] - The state. - * @return {Object} The state. - */ -declare function saveRendererAndSceneState(renderer: Renderer, scene: Scene, state?: Object): Object; -/** - * Saves the state of the given renderer and stores it into the given state object. - * - * If not state object is provided, the function creates one. - * - * @private - * @function - * @param {Renderer} renderer - The renderer. - * @param {Object} [state={}] - The state. - * @return {Object} The state. - */ -declare function saveRendererState(renderer: Renderer, state?: Object): Object; -/** - * Saves the state of the given scene and stores it into the given state object. - * - * If not state object is provided, the function creates one. - * - * @private - * @function - * @param {Scene} scene - The scene. - * @param {Object} [state={}] - The state. - * @return {Object} The state. - */ -declare function saveSceneState(scene: Scene, state?: Object): Object; -declare class ShaderCallNodeInternal extends Node { - constructor(shaderNode: any, rawInputs: any); - shaderNode: any; - rawInputs: any; - isShaderCallNodeInternal: boolean; - generateNodeType(builder: any): any; - getElementType(builder: any): any; - getMemberType(builder: any, name: any): any; - call(builder: any): any; - setupOutput(builder: any): any; - getOutputNode(builder: any): any; - build(builder: any, output?: null): any; -} -/** - * Represents lighting model for a shadow material. Used in {@link ShadowNodeMaterial}. - * - * @augments LightingModel - */ -declare class ShadowMaskModel extends LightingModel { - /** - * The shadow mask node. - * - * @type {Node} - */ - shadowNode: Node; - /** - * Only used to save the shadow mask. - * - * @param {Object} input - The input data. - */ - direct({ lightNode }: Object): void; - /** - * Uses the shadow mask to produce the final color. - * - * @param {NodeBuilder} builder - The current node builder. - */ - finish({ context }: NodeBuilder): void; -} -declare function Fn(jsFunc: any, layout?: null): () => void; -declare function ShaderNode(jsFunc: any, nodeType: any): ShaderNodeInternal; -/** - * Add the given node to the current stack. - * - * @param {Node} node - The node to add. - * @returns {Node} The node that was added to the stack. - */ -declare function Stack(node: Node): Node; -declare function addMethodChaining(name: any, nodeElement: any): void; -declare function addNodeElement(name: any): void; -/** - * TSL function for defining a built-in ambient occlusion context for a given node. - * - * @tsl - * @function - * @param {Node} aoNode - The ambient occlusion value node to apply. - * @param {Node} [node=null] - The node whose context should be modified. - * @returns {ContextNode} - */ -declare function builtinAOContext(aoNode: Node, node?: Node): ContextNode; -/** - * TSL function for defining a built-in shadow context for a given node. - * - * @tsl - * @function - * @param {ShadowNode} shadowNode - The shadow node representing the light's shadow. - * @param {Light} light - The light associated with the shadow. - * @param {Node} [node=null] - The node whose context should be modified. - * @returns {ContextNode} - */ -declare function builtinShadowContext(shadowNode: ShadowNode, light: Light, node?: Node): ContextNode; -/** - * TSL function for creating a cache node. - * - * @tsl - * @function - * @deprecated - * @param {Node} node - The node that should be cached. - * @param {boolean} [parent=true] - Whether this node refers to a shared parent cache or not. - * @returns {IsolateNode} - */ -declare function cache(node: Node, parent?: boolean): IsolateNode; -declare function defined(value: any): boolean; -/** - * Returns the MRT texture index for the given name. - * - * @param {Array} textures - The textures of a MRT-configured render target. - * @param {string} name - The name of the MRT texture which index is requested. - * @return {number} The texture index. - */ -declare function getTextureIndex(textures: Array, name: string): number; -/** - * Creates an inspector node to wrap around a given node for inspection purposes. - * - * @tsl - * @param {Node} node - The node to inspect. - * @param {string} [name=''] - Optional name for the inspector node. - * @param {Function|null} [callback=null] - Optional callback to modify the node during setup. - * @returns {Node} The inspector node. - */ -declare function inspector(node: Node, name?: string, callback?: Function | null): Node; -/** - * TSL function for defining a label context value for a given node. - * - * @tsl - * @function - * @deprecated - * @param {Node} node - The node whose context should be modified. - * @param {string} name - The name/label to set. - * @returns {ContextNode} - */ -declare function label(node: Node, name: string): ContextNode; -/** - * TSL function for getting the position in world space for the given light. - * - * @tsl - * @function - * @param {Light} light -The light source. - * @returns {UniformNode} The light's position in world space. - */ -declare function lightPosition(light: Light): UniformNode; -/** - * TSL function for getting projected uv coordinates for the given light. - * Relevant when using maps with spot lights. - * - * @tsl - * @function - * @param {Light} light -The light source. - * @param {Node} [position=positionWorld] -The position to project. - * @returns {Node} The projected uvs. - */ -declare function lightProjectionUV(light: Light, position?: Node): Node; -/** - * TSL function for getting a shadow matrix uniform node for the given light. - * - * @tsl - * @function - * @param {Light} light -The light source. - * @returns {UniformNode} The shadow matrix uniform node. - */ -declare function lightShadowMatrix(light: Light): UniformNode; -/** - * TSL function for getting the light target position in world space for the given light. - * - * @tsl - * @function - * @param {Light} light -The light source. - * @returns {UniformNode} The light target position in world space. - */ -declare function lightTargetPosition(light: Light): UniformNode; -/** - * TSL function for getting the position in view space for the given light. - * - * @tsl - * @function - * @param {Light} light - The light source. - * @returns {UniformNode} The light's position in view space. - */ -declare function lightViewPosition(light: Light): UniformNode; -/** - * Represents the texture of a pass node. - * - * @augments TextureNode - */ -declare class PassTextureNode extends TextureNode { - /** - * Constructs a new pass texture node. - * - * @param {PassNode} passNode - The pass node. - * @param {Texture} texture - The output texture. - */ - constructor(passNode: PassNode, texture: Texture); - /** - * A reference to the pass node. - * - * @type {PassNode} - */ - passNode: PassNode; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @default true - * @readonly - */ - readonly isPassTextureNode: boolean; - setup(builder: any): void; - clone(): any; -} -/** - * This node allows to remap a node value from one range into another but with enabled clamping. E.g a value of - * `0.4` in the range `[ 0.3, 0.5 ]` should be remapped into the normalized range `[ 0, 1 ]`. - * `remapClamp` takes care of that and converts the original value of `0.4` to `0.5`. - * - * @tsl - * @function - * @param {Node} node - The node that should be remapped. - * @param {Node} inLowNode - The source or current lower bound of the range. - * @param {Node} inHighNode - The source or current upper bound of the range. - * @param {?Node} [outLowNode=float(0)] - The target lower bound of the range. - * @param {?Node} [outHighNode=float(1)] - The target upper bound of the range. - * @returns {Node} - */ -declare function remapClamp(node: Node, inLowNode: Node, inHighNode: Node, outLowNode?: Node | null, outHighNode?: Node | null): Node; -/** - * Replaces the default UV coordinates used in texture lookups. - * - * ```js - *material.contextNode = replaceDefaultUV( ( textureNode ) => { - * - * // ... - * return customUVCoordinates; - * - *} ); - *``` - * - * @tsl - * @function - * @param {function(Node):Node|Node} callback - A callback that receives the texture node - * and must return the new uv coordinates. - * @param {Node} [node=null] - An optional node to which the context will be applied. - * @return {ContextNode} A context node that replaces the default UV coordinates. - */ -declare function replaceDefaultUV(callback: (arg0: Node) => Node | Node, node?: Node): ContextNode; -/** - * Represents the element access on uniform array nodes. - * - * @augments ArrayElementNode - */ -declare class UniformArrayElementNode extends ArrayElementNode { - /** - * Constructs a new buffer node. - * - * @param {UniformArrayNode} uniformArrayNode - The uniform array node to access. - * @param {IndexNode} indexNode - The index data that define the position of the accessed element in the array. - */ - constructor(uniformArrayNode: UniformArrayNode, indexNode: IndexNode); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isArrayBufferElementNode: boolean; - generate(builder: any): any; -} -/** - * VolumetricLightingModel class extends the LightingModel to implement volumetric lighting effects. - * This model calculates the scattering and transmittance of light through a volumetric medium. - * It dynamically adjusts the direction of the ray based on the camera and object positions. - * The model supports custom scattering and depth nodes to enhance the lighting effects. - * - * @augments LightingModel - */ -declare class VolumetricLightingModel extends LightingModel { - start(builder: any): void; - scatteringLight(lightColor: any, builder: any): void; - direct({ lightNode, lightColor }: { - lightNode: any; - lightColor: any; - }, builder: any): void; - directRectArea({ lightColor, lightPosition, halfWidth, halfHeight }: { - lightColor: any; - lightPosition: any; - halfWidth: any; - halfHeight: any; - }, builder: any): void; - finish(builder: any): void; -} -/** - * Most of the rendering related logic is implemented in the - * {@link Renderer} module and related management components. - * Sometimes it is required though to execute commands which are - * specific to the current 3D backend (which is WebGPU or WebGL 2). - * This abstract base class defines an interface that encapsulates - * all backend-related logic. Derived classes for each backend must - * implement the interface. - * - * @abstract - * @private - */ -declare class Backend { - /** - * Constructs a new backend. - * - * @param {Object} parameters - An object holding parameters for the backend. - */ - constructor(parameters?: Object); - /** - * The parameters of the backend. - * - * @type {Object} - */ - parameters: Object; - /** - * This weak map holds backend-specific data of objects - * like textures, attributes or render targets. - * - * @type {WeakMap} - */ - data: WeakMap; - /** - * A reference to the renderer. - * - * @type {?Renderer} - * @default null - */ - renderer: Renderer | null; - /** - * A reference to the canvas element the renderer is drawing to. - * - * @type {?(HTMLCanvasElement|OffscreenCanvas)} - * @default null - */ - domElement: (HTMLCanvasElement | OffscreenCanvas) | null; - /** - * A reference to the timestamp query pool. - * - * @type {{render: ?TimestampQueryPool, compute: ?TimestampQueryPool}} - */ - timestampQueryPool: { - render: TimestampQueryPool | null; - compute: TimestampQueryPool | null; - }; - /** - * Whether to track timestamps with a Timestamp Query API or not. - * - * @type {boolean} - * @default false - */ - trackTimestamp: boolean; - /** - * Initializes the backend so it is ready for usage. Concrete backends - * are supposed to implement their rendering context creation and related - * operations in this method. - * - * @async - * @param {Renderer} renderer - The renderer. - * @return {Promise} A Promise that resolves when the backend has been initialized. - */ - init(renderer: Renderer): Promise; - /** - * The coordinate system of the backend. - * - * @abstract - * @type {number} - * @readonly - */ - readonly get coordinateSystem(): number; - /** - * This method is executed at the beginning of a render call and - * can be used by the backend to prepare the state for upcoming - * draw calls. - * - * @abstract - * @param {RenderContext} renderContext - The render context. - */ - beginRender(): void; - /** - * This method is executed at the end of a render call and - * can be used by the backend to finalize work after draw - * calls. - * - * @abstract - * @param {RenderContext} renderContext - The render context. - */ - finishRender(): void; - /** - * Sets the XR rendering destination. - * - * Backends that render directly into XR framebuffers can override this hook. - * - * @param {?Object} xrTarget - The XR rendering destination. - */ - setXRTarget(): void; - /** - * This method is executed at the beginning of a compute call and - * can be used by the backend to prepare the state for upcoming - * compute tasks. - * - * @abstract - * @param {Node|Array} computeGroup - The compute node(s). - */ - beginCompute(): void; - /** - * This method is executed at the end of a compute call and - * can be used by the backend to finalize work after compute - * tasks. - * - * @abstract - * @param {Node|Array} computeGroup - The compute node(s). - */ - finishCompute(): void; - /** - * Executes a draw command for the given render object. - * - * @abstract - * @param {RenderObject} renderObject - The render object to draw. - * @param {Info} info - Holds a series of statistical information about the GPU memory and the rendering process. - */ - draw(): void; - /** - * Executes a compute command for the given compute node. - * - * @abstract - * @param {Node|Array} computeGroup - The group of compute nodes of a compute call. Can be a single compute node. - * @param {Node} computeNode - The compute node. - * @param {Array} bindings - The bindings. - * @param {ComputePipeline} computePipeline - The compute pipeline. - */ - compute(): void; - /** - * Creates a shader program from the given programmable stage. - * - * @abstract - * @param {ProgrammableStage} program - The programmable stage. - */ - createProgram(): void; - /** - * Destroys the shader program of the given programmable stage. - * - * @abstract - * @param {ProgrammableStage} program - The programmable stage. - */ - destroyProgram(): void; - /** - * Creates bindings from the given bind group definition. - * - * @abstract - * @param {BindGroup} bindGroup - The bind group. - * @param {Array} bindings - Array of bind groups. - * @param {number} cacheIndex - The cache index. - * @param {number} version - The version. - */ - createBindings(): void; - /** - * Updates the given bind group definition. - * - * @abstract - * @param {BindGroup} bindGroup - The bind group. - * @param {Array} bindings - Array of bind groups. - * @param {number} cacheIndex - The cache index. - * @param {number} version - The version. - */ - updateBindings(): void; - /** - * Updates a buffer binding. - * - * @abstract - * @param {Buffer} binding - The buffer binding to update. - */ - updateBinding(): void; - /** - * Creates a render pipeline for the given render object. - * - * @abstract - * @param {RenderObject} renderObject - The render object. - * @param {Array} promises - An array of compilation promises which are used in `compileAsync()`. - */ - createRenderPipeline(): void; - /** - * Creates a compute pipeline for the given compute node. - * - * @abstract - * @param {ComputePipeline} computePipeline - The compute pipeline. - * @param {Array} bindings - The bindings. - */ - createComputePipeline(): void; - /** - * Returns `true` if the render pipeline requires an update. - * - * @abstract - * @param {RenderObject} renderObject - The render object. - * @return {boolean} Whether the render pipeline requires an update or not. - */ - needsRenderUpdate(): boolean; - /** - * Returns a cache key that is used to identify render pipelines. - * - * @abstract - * @param {RenderObject} renderObject - The render object. - * @return {string} The cache key. - */ - getRenderCacheKey(): string; - /** - * Returns a node builder for the given render object. - * - * @abstract - * @param {RenderObject} renderObject - The render object. - * @param {Renderer} renderer - The renderer. - * @return {NodeBuilder} The node builder. - */ - createNodeBuilder(): NodeBuilder; - /** - * Updates a GPU sampler for the given texture. - * - * @abstract - * @param {Texture} texture - The texture to update the sampler for. - * @param {TextureNode} textureNode - The texture node to update the sampler with. - * @return {string} The current sampler key. - */ - updateSampler(): string; - /** - * Creates a default texture for the given texture that can be used - * as a placeholder until the actual texture is ready for usage. - * - * @abstract - * @param {Texture} texture - The texture to create a default texture for. - */ - createDefaultTexture(): void; - /** - * Defines a texture on the GPU for the given texture object. - * - * @abstract - * @param {Texture} texture - The texture. - * @param {Object} [options={}] - Optional configuration parameter. - */ - createTexture(): void; - /** - * Uploads the updated texture data to the GPU. - * - * @abstract - * @param {Texture} texture - The texture. - * @param {Object} [options={}] - Optional configuration parameter. - */ - updateTexture(): void; - /** - * Generates mipmaps for the given texture. - * - * @abstract - * @param {Texture} texture - The texture. - */ - generateMipmaps(): void; - /** - * Destroys the GPU data for the given texture object. - * - * @abstract - * @param {Texture} texture - The texture. - * @param {boolean} [isDefaultTexture=false] - Whether the texture uses a default GPU texture or not. - */ - destroyTexture(): void; - /** - * Returns texture data as a typed array. - * - * @abstract - * @async - * @param {Texture} texture - The texture to copy. - * @param {number} x - The x coordinate of the copy origin. - * @param {number} y - The y coordinate of the copy origin. - * @param {number} width - The width of the copy. - * @param {number} height - The height of the copy. - * @param {number} faceIndex - The face index. - * @return {Promise} A Promise that resolves with a typed array when the copy operation has finished. - */ - copyTextureToBuffer(): Promise; - /** - * Copies data of the given source texture to the given destination texture. - * - * @abstract - * @param {Texture} srcTexture - The source texture. - * @param {Texture} dstTexture - The destination texture. - * @param {?(Box3|Box2)} [srcRegion=null] - The region of the source texture to copy. - * @param {?(Vector2|Vector3)} [dstPosition=null] - The destination position of the copy. - * @param {number} [srcLevel=0] - The source mip level to copy from. - * @param {number} [dstLevel=0] - The destination mip level to copy to. - */ - copyTextureToTexture(): void; - /** - * Copies the current bound framebuffer to the given texture. - * - * @abstract - * @param {Texture} texture - The destination texture. - * @param {RenderContext} renderContext - The render context. - * @param {Vector4} rectangle - A four dimensional vector defining the origin and dimension of the copy. - */ - copyFramebufferToTexture(): void; - /** - * Creates the GPU buffer of a shader attribute. - * - * @abstract - * @param {BufferAttribute} attribute - The buffer attribute. - */ - createAttribute(): void; - /** - * Creates the GPU buffer of an indexed shader attribute. - * - * @abstract - * @param {BufferAttribute} attribute - The indexed buffer attribute. - */ - createIndexAttribute(): void; - /** - * Creates the GPU buffer of a storage attribute. - * - * @abstract - * @param {BufferAttribute} attribute - The buffer attribute. - */ - createStorageAttribute(): void; - /** - * Creates a uniform buffer. - * - * @abstract - * @param {Buffer} uniformBuffer - The uniform buffer. - */ - createUniformBuffer(): void; - /** - * Destroys a uniform buffer. - * - * @abstract - * @param {Buffer} uniformBuffer - The uniform buffer. - */ - destroyUniformBuffer(): void; - /** - * Updates the GPU buffer of a shader attribute. - * - * @abstract - * @param {BufferAttribute} attribute - The buffer attribute to update. - */ - updateAttribute(): void; - /** - * Destroys the GPU buffer of a shader attribute. - * - * @abstract - * @param {BufferAttribute} attribute - The buffer attribute to destroy. - */ - destroyAttribute(): void; - /** - * Returns the backend's rendering context. - * - * @abstract - * @return {Object} The rendering context. - */ - getContext(): Object; - /** - * Backends can use this method if they have to run - * logic when the renderer gets resized. - * - * @abstract - */ - updateSize(): void; - /** - * Updates the viewport with the values from the given render context. - * - * @abstract - * @param {RenderContext} renderContext - The render context. - */ - updateViewport(): void; - /** - * Updates a unique identifier for the given render context that can be used - * to allocate resources like occlusion queries or timestamp queries. - * - * @param {RenderContext|ComputeNode} abstractRenderContext - The render context. - */ - updateTimeStampUID(abstractRenderContext: RenderContext | ComputeNode): void; - /** - * Returns a unique identifier for the given render context that can be used - * to allocate resources like occlusion queries or timestamp queries. - * - * @param {RenderContext|ComputeNode} abstractRenderContext - The render context. - * @return {string} The unique identifier. - */ - getTimestampUID(abstractRenderContext: RenderContext | ComputeNode): string; - /** - * Returns all timestamp frames for the given type. - * - * @param {string} type - The type of the time stamp. - * @return {Array} The timestamp frames. - */ - getTimestampFrames(type: string): Array; - /** - * Returns the query pool for the given uid. - * - * @param {string} uid - The unique identifier. - * @return {TimestampQueryPool} The query pool. - */ - _getQueryPool(uid: string): TimestampQueryPool; - /** - * Returns the timestamp for the given uid. - * - * @param {string} uid - The unique identifier. - * @return {number} The timestamp. - */ - getTimestamp(uid: string): number; - /** - * Returns `true` if a timestamp for the given uid is available. - * - * @param {string} uid - The unique identifier. - * @return {boolean} Whether the timestamp is available or not. - */ - hasTimestamp(uid: string): boolean; - /** - * Returns `true` if the given 3D object is fully occluded by other - * 3D objects in the scene. Backends must implement this method by using - * a Occlusion Query API. - * - * @abstract - * @param {RenderContext} renderContext - The render context. - * @param {Object3D} object - The 3D object to test. - * @return {boolean} Whether the 3D object is fully occluded or not. - */ - isOccluded(): boolean; - /** - * Resolves the time stamp for the given render context and type. - * - * @async - * @abstract - * @param {string} [type='render'] - The type of the time stamp. - * @return {Promise} A Promise that resolves with the time stamp. - */ - resolveTimestampsAsync(type?: string): Promise; - /** - * This method performs a readback operation by moving buffer data from - * a storage buffer attribute from the GPU to the CPU. - * - * @async - * @param {StorageBufferAttribute} attribute - The storage buffer attribute. - * @return {Promise} A promise that resolves with the buffer data when the data are ready. - */ - getArrayBufferAsync(): Promise; - /** - * Checks if the given feature is supported by the backend. - * - * @async - * @abstract - * @param {string} name - The feature's name. - * @return {Promise} A Promise that resolves with a bool that indicates whether the feature is supported or not. - */ - hasFeatureAsync(): Promise; - /** - * Checks if the given feature is supported by the backend. - * - * @abstract - * @param {string} name - The feature's name. - * @return {boolean} Whether the feature is supported or not. - */ - hasFeature(): boolean; - /** - * Returns the drawing buffer size. - * - * @return {Vector2} The drawing buffer size. - */ - getDrawingBufferSize(): Vector2; - /** - * Defines the scissor test. - * - * @abstract - * @param {boolean} boolean - Whether the scissor test should be enabled or not. - */ - setScissorTest(): void; - /** - * Returns the clear color and alpha into a single - * color object. - * - * @return {Color4} The clear color. - */ - getClearColor(): Color4; - /** - * Returns the DOM element. If no DOM element exists, the backend - * creates a new one. - * - * @return {HTMLCanvasElement} The DOM element. - */ - getDomElement(): HTMLCanvasElement; - /** - * Checks if the backend has the given compatibility. - * - * @abstract - * @param {string} name - The compatibility. - * @return {boolean} Whether the backend has the given compatibility or not. - */ - hasCompatibility(): boolean; - /** - * Initializes the render target defined in the given render context. - * - * @abstract - * @param {RenderContext} renderContext - The render context. - */ - initRenderTarget(): void; - /** - * Sets a dictionary for the given object into the - * internal data structure. - * - * @param {Object} object - The object. - * @param {Object} value - The dictionary to set. - */ - set(object: Object, value: Object): void; - /** - * Returns the dictionary for the given object. - * - * @param {Object} object - The object. - * @return {Object} The object's dictionary. - */ - get(object: Object): Object; - /** - * Checks if the given object has a dictionary - * with data defined. - * - * @param {Object} object - The object. - * @return {boolean} Whether a dictionary for the given object as been defined or not. - */ - has(object: Object): boolean; - /** - * Deletes an object from the internal data structure. - * - * @param {Object} object - The object to delete. - */ - delete(object: Object): void; - /** - * Delete GPU data associated with a bind group. - * - * @abstract - * @param {BindGroup} bindGroup - The bind group. - */ - deleteBindGroupData(): void; - /** - * Frees internal resources. - * - * @abstract - */ - dispose(): void; -} -/** - * A WebGL 2 backend utility module for managing shader attributes. - * - * @private - */ -declare class WebGLAttributeUtils { - /** - * Constructs a new utility object. - * - * @param {WebGLBackend} backend - The WebGL 2 backend. - */ - constructor(backend: WebGLBackend); - /** - * A reference to the WebGL 2 backend. - * - * @type {WebGLBackend} - */ - backend: WebGLBackend; - /** - * Creates the GPU buffer for the given buffer attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - * @param {GLenum } bufferType - A flag that indicates the buffer type and thus binding point target. - */ - createAttribute(attribute: BufferAttribute, bufferType: GLenum): void; - /** - * Updates the GPU buffer of the given buffer attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - */ - updateAttribute(attribute: BufferAttribute): void; - /** - * Destroys the GPU buffer of the given buffer attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - */ - destroyAttribute(attribute: BufferAttribute): void; - /** - * This method performs a readback operation by moving buffer data from - * a storage buffer attribute from the GPU to the CPU. ReadbackBuffer can - * be used to retain and reuse handles to the intermediate buffers and prevent - * new allocation. - * - * @async - * @param {BufferAttribute} attribute - The storage buffer attribute to read frm. - * @param {ReadbackBuffer|ArrayBuffer} target - The storage buffer attribute. - * @param {number} offset - The storage buffer attribute. - * @param {number} count - The offset from which to start reading the - * @return {Promise} A promise that resolves with the buffer data when the data are ready. - */ - getArrayBufferAsync(attribute: BufferAttribute, target?: ReadbackBuffer | ArrayBuffer, offset?: number, count?: number): Promise; - /** - * Creates a WebGL buffer with the given data. - * - * @private - * @param {WebGL2RenderingContext} gl - The rendering context. - * @param {GLenum } bufferType - A flag that indicates the buffer type and thus binding point target. - * @param {TypedArray} array - The array of the buffer attribute. - * @param {GLenum} usage - The usage. - * @return {WebGLBuffer} The WebGL buffer. - */ - private _createBuffer; -} -/** - * A WebGL 2 backend utility module for managing extensions. - * - * @private - */ -declare class WebGLExtensions { - /** - * Constructs a new utility object. - * - * @param {WebGLBackend} backend - The WebGL 2 backend. - */ - constructor(backend: WebGLBackend); - /** - * A reference to the WebGL 2 backend. - * - * @type {WebGLBackend} - */ - backend: WebGLBackend; - /** - * A reference to the rendering context. - * - * @type {WebGL2RenderingContext} - */ - gl: WebGL2RenderingContext; - /** - * A list with all the supported WebGL extensions. - * - * @type {Array} - */ - availableExtensions: Array; - /** - * A dictionary with requested WebGL extensions. - * The key is the name of the extension, the value - * the requested extension object. - * - * @type {Object} - */ - extensions: { - [x: string]: Object; - }; - /** - * Returns the extension object for the given extension name. - * - * @param {string} name - The extension name. - * @return {Object} The extension object. - */ - get(name: string): Object; - /** - * Returns `true` if the requested extension is available. - * - * @param {string} name - The extension name. - * @return {boolean} Whether the given extension is available or not. - */ - has(name: string): boolean; -} -/** - * A WebGL 2 backend utility module for managing textures. - * - * @private - */ -declare class WebGLTextureUtils { - /** - * Constructs a new utility object. - * - * @param {WebGLBackend} backend - The WebGL 2 backend. - */ - constructor(backend: WebGLBackend); - /** - * A reference to the WebGL 2 backend. - * - * @type {WebGLBackend} - */ - backend: WebGLBackend; - /** - * A reference to the rendering context. - * - * @type {WebGL2RenderingContext} - */ - gl: WebGL2RenderingContext; - /** - * A reference to a backend module holding extension-related - * utility functions. - * - * @type {WebGLExtensions} - */ - extensions: WebGLExtensions; - /** - * A dictionary for managing default textures. The key - * is the binding point (target), the value the WEbGL texture object. - * - * @type {Object} - */ - defaultTextures: any; - /** - * A scratch framebuffer used for attaching the source texture in - * {@link copyTextureToTexture}. - * - * @private - * @type {?WebGLFramebuffer} - */ - private _srcFramebuffer; - /** - * A scratch framebuffer used for attaching the destination texture in - * {@link copyTextureToTexture}. - * - * @private - * @type {?WebGLFramebuffer} - */ - private _dstFramebuffer; - /** - * Inits the state of the utility. - * - * @private - */ - private _init; - /** - * Returns the native texture type for the given texture. - * - * @param {Texture} texture - The texture. - * @return {GLenum} The native texture type. - */ - getGLTextureType(texture: Texture): GLenum; - /** - * Returns the native texture type for the given texture. - * - * @param {?string} internalFormatName - The internal format name. When `null`, the internal format is derived from the subsequent parameters. - * @param {GLenum} glFormat - The WebGL format. - * @param {GLenum} glType - The WebGL type. - * @param {string} colorSpace - The texture's color space. - * @param {boolean} [forceLinearTransfer=false] - Whether to force a linear transfer or not. - * @return {GLenum} The internal format. - */ - getInternalFormat(internalFormatName: string | null, glFormat: GLenum, glType: GLenum, normalized: any, colorSpace: string, forceLinearTransfer?: boolean): GLenum; - /** - * Sets the texture parameters for the given texture. - * - * @param {GLenum} textureType - The texture type. - * @param {Texture} texture - The texture. - */ - setTextureParameters(textureType: GLenum, texture: Texture): void; - /** - * Creates a default texture for the given texture that can be used - * as a placeholder until the actual texture is ready for usage. - * - * @param {Texture} texture - The texture to create a default texture for. - */ - createDefaultTexture(texture: Texture): void; - /** - * Defines a texture on the GPU for the given texture object. - * - * @param {Texture} texture - The texture. - * @param {Object} [options={}] - Optional configuration parameter. - * @return {undefined} - */ - createTexture(texture: Texture, options?: Object): undefined; - /** - * Uploads texture buffer data to the GPU memory. - * - * @param {WebGLBuffer} buffer - The buffer data. - * @param {Texture} texture - The texture, - */ - copyBufferToTexture(buffer: WebGLBuffer, texture: Texture): void; - /** - * Uploads the updated texture data to the GPU. - * - * @param {Texture} texture - The texture. - * @param {Object} [options={}] - Optional configuration parameter. - */ - updateTexture(texture: Texture, options?: Object): void; - /** - * Generates mipmaps for the given texture. - * - * @param {Texture} texture - The texture. - */ - generateMipmaps(texture: Texture): void; - /** - * Deallocates the render buffers of the given render target. - * - * @param {RenderTarget} renderTarget - The render target. - */ - deallocateRenderBuffers(renderTarget: RenderTarget): void; - /** - * Destroys the GPU data for the given texture object. - * - * @param {Texture} texture - The texture. - * @param {boolean} [isDefaultTexture=false] - Whether the texture uses a default GPU texture or not. - */ - destroyTexture(texture: Texture, isDefaultTexture?: boolean): void; - /** - * Copies data of the given source texture to the given destination texture. - * - * @param {Texture} srcTexture - The source texture. - * @param {Texture} dstTexture - The destination texture. - * @param {?(Box3|Box2)} [srcRegion=null] - The region of the source texture to copy. - * @param {?(Vector2|Vector3)} [dstPosition=null] - The destination position of the copy. - * @param {number} [srcLevel=0] - The source mip level to copy from. - * @param {number} [dstLevel=0] - The destination mip level to copy to. - */ - copyTextureToTexture(srcTexture: Texture, dstTexture: Texture, srcRegion?: (Box3 | Box2) | null, dstPosition?: (Vector2 | Vector3) | null, srcLevel?: number, dstLevel?: number): void; - /** - * Copies the current bound framebuffer to the given texture. - * - * @param {Texture} texture - The destination texture. - * @param {RenderContext} renderContext - The render context. - * @param {Vector4} rectangle - A four dimensional vector defining the origin and dimension of the copy. - */ - copyFramebufferToTexture(texture: Texture, renderContext: RenderContext, rectangle: Vector4): void; - /** - * SetupS storage for internal depth/stencil buffers and bind to correct framebuffer. - * - * @param {WebGLRenderbuffer} renderbuffer - The render buffer. - * @param {RenderContext} renderContext - The render context. - * @param {number} samples - The MSAA sample count. - * @param {boolean} [useMultisampledRTT=false] - Whether to use WEBGL_multisampled_render_to_texture or not. - */ - setupRenderBufferStorage(renderbuffer: WebGLRenderbuffer, renderContext: RenderContext, samples: number, useMultisampledRTT?: boolean): void; - /** - * Returns texture data as a typed array. - * - * @async - * @param {Texture} texture - The texture to copy. - * @param {number} x - The x coordinate of the copy origin. - * @param {number} y - The y coordinate of the copy origin. - * @param {number} width - The width of the copy. - * @param {number} height - The height of the copy. - * @param {number} faceIndex - The face index. - * @return {Promise} A Promise that resolves with a typed array when the copy operation has finished. - */ - copyTextureToBuffer(texture: Texture, x: number, y: number, width: number, height: number, faceIndex: number): Promise; - /** - * Returns the corresponding typed array type for the given WebGL data type. - * - * @private - * @param {GLenum} glType - The WebGL data type. - * @return {TypedArray.constructor} The typed array type. - */ - private _getTypedArrayType; - /** - * Returns the bytes-per-texel value for the given WebGL data type and texture format. - * - * @private - * @param {GLenum} glType - The WebGL data type. - * @param {GLenum} glFormat - The WebGL texture format. - * @return {number} The bytes-per-texel. - */ - private _getBytesPerTexel; - /** - * Frees the internal resources. - */ - dispose(): void; -} -declare class WebGLBufferRenderer { - constructor(backend: any); - gl: any; - extensions: any; - info: any; - mode: any; - index: number; - type: any; - object: any; - render(start: any, count: any): void; - renderInstances(start: any, count: any, primcount: any): void; - renderMultiDraw(starts: any, counts: any, drawCount: any): void; -} -/** - * A WebGL 2 backend utility module for managing the WebGL state. - * - * The major goal of this module is to reduce the number of state changes - * by caching the WEbGL state with a series of variables. In this way, the - * renderer only executes state change commands when necessary which - * improves the overall performance. - * - * @private - */ -declare class WebGLState { - /** - * Constructs a new utility object. - * - * @param {WebGLBackend} backend - The WebGL 2 backend. - */ - constructor(backend: WebGLBackend); - /** - * A reference to the WebGL 2 backend. - * - * @type {WebGLBackend} - */ - backend: WebGLBackend; - /** - * A reference to the rendering context. - * - * @type {WebGL2RenderingContext} - */ - gl: WebGL2RenderingContext; - enabled: {}; - parameters: {}; - currentFlipSided: any; - currentCullFace: any; - currentProgram: any; - currentBlendingEnabled: boolean; - currentBlending: any; - currentBlendSrc: any; - currentBlendDst: number | null; - currentBlendSrcAlpha: number | null; - currentBlendDstAlpha: number | null; - currentPremultipledAlpha: boolean | null; - currentPolygonOffsetFactor: any; - currentPolygonOffsetUnits: number | null; - currentColorMask: any; - currentDepthReversed: boolean; - currentDepthFunc: any; - currentDepthMask: any; - currentStencilFunc: any; - currentStencilRef: number | null; - currentStencilFuncMask: number | null; - currentStencilFail: any; - currentStencilZFail: number | null; - currentStencilZPass: number | null; - currentStencilMask: any; - currentLineWidth: any; - currentClippingPlanes: number; - currentVAO: any; - currentIndex: WebGLBuffer | null; - currentBoundFramebuffers: {}; - currentDrawbuffers: WeakMap; - maxTextures: any; - currentTextureSlot: any; - currentBoundTextures: {}; - currentBoundBufferBases: {}; - /** - * Inits the state of the utility. - * - * @private - */ - private _init; - currentScissor: Vector4 | undefined; - currentViewport: Vector4 | undefined; - _tempVec4: Vector4 | undefined; - /** - * Enables the given WebGL capability. - * - * This method caches the capability state so - * `gl.enable()` is only called when necessary. - * - * @param {GLenum} id - The capability to enable. - */ - enable(id: GLenum): void; - /** - * Disables the given WebGL capability. - * - * This method caches the capability state so - * `gl.disable()` is only called when necessary. - * - * @param {GLenum} id - The capability to enable. - */ - disable(id: GLenum): void; - /** - * Specifies whether polygons are front- or back-facing - * by setting the winding orientation. - * - * This method caches the state so `gl.frontFace()` is only - * called when necessary. - * - * @param {boolean} flipSided - Whether triangles flipped their sides or not. - */ - setFlipSided(flipSided: boolean): void; - /** - * Specifies whether or not front- and/or back-facing - * polygons can be culled. - * - * This method caches the state so `gl.cullFace()` is only - * called when necessary. - * - * @param {number} cullFace - Defines which polygons are candidates for culling. - */ - setCullFace(cullFace: number): void; - /** - * Specifies the width of line primitives. - * - * This method caches the state so `gl.lineWidth()` is only - * called when necessary. - * - * @param {number} width - The line width. - */ - setLineWidth(width: number): void; - setMRTBlending(textures: any, mrt: any, material: any): void; - /** - * Applies blending configuration for a specific draw buffer index. - * - * @private - * @param {number} index - The draw buffer index. - * @param {Object} blending - The blending configuration (material or BlendMode). - */ - private _setMRTBlendingIndex; - /** - * Defines the blending. - * - * This method caches the state so `gl.blendEquation()`, `gl.blendEquationSeparate()`, - * `gl.blendFunc()` and `gl.blendFuncSeparate()` are only called when necessary. - * - * @param {number} blending - The blending type. - * @param {number} blendEquation - The blending equation. - * @param {number} blendSrc - Only relevant for custom blending. The RGB source blending factor. - * @param {number} blendDst - Only relevant for custom blending. The RGB destination blending factor. - * @param {number} blendEquationAlpha - Only relevant for custom blending. The blending equation for alpha. - * @param {number} blendSrcAlpha - Only relevant for custom blending. The alpha source blending factor. - * @param {number} blendDstAlpha - Only relevant for custom blending. The alpha destination blending factor. - * @param {boolean} premultipliedAlpha - Whether premultiplied alpha is enabled or not. - */ - setBlending(blending: number, blendEquation: number, blendSrc: number, blendDst: number, blendEquationAlpha: number, blendSrcAlpha: number, blendDstAlpha: number, premultipliedAlpha: boolean): void; - currentBlendEquation: any; - currentBlendEquationAlpha: number | undefined; - /** - * Specifies whether colors can be written when rendering - * into a framebuffer or not. - * - * This method caches the state so `gl.colorMask()` is only - * called when necessary. - * - * @param {boolean} colorMask - The color mask. - */ - setColorMask(colorMask: boolean): void; - /** - * Specifies whether the depth test is enabled or not. - * - * @param {boolean} depthTest - Whether the depth test is enabled or not. - */ - setDepthTest(depthTest: boolean): void; - /** - * Configures the WebGL state to use a reversed depth buffer. - * - * @param {boolean} reversed - Whether the depth buffer is reversed or not. - */ - setReversedDepth(reversed: boolean): void; - /** - * Specifies whether depth values can be written when rendering - * into a framebuffer or not. - * - * This method caches the state so `gl.depthMask()` is only - * called when necessary. - * - * @param {boolean} depthMask - The depth mask. - */ - setDepthMask(depthMask: boolean): void; - /** - * Specifies the depth compare function. - * - * This method caches the state so `gl.depthFunc()` is only - * called when necessary. - * - * @param {number} depthFunc - The depth compare function. - */ - setDepthFunc(depthFunc: number): void; - /** - * Specifies the scissor box. - * - * @param {number} x - The x-coordinate of the lower left corner of the viewport. - * @param {number} y - The y-coordinate of the lower left corner of the viewport. - * @param {number} width - The width of the viewport. - * @param {number} height - The height of the viewport. - * - */ - scissor(x: number, y: number, width: number, height: number): void; - /** - * Specifies the viewport. - * - * @param {number} x - The x-coordinate of the lower left corner of the viewport. - * @param {number} y - The y-coordinate of the lower left corner of the viewport. - * @param {number} width - The width of the viewport. - * @param {number} height - The height of the viewport. - * - */ - viewport(x: number, y: number, width: number, height: number): void; - /** - * Defines the scissor test. - * - * @param {boolean} boolean - Whether the scissor test should be enabled or not. - */ - setScissorTest(boolean: boolean): void; - /** - * Specifies whether the stencil test is enabled or not. - * - * @param {boolean} stencilTest - Whether the stencil test is enabled or not. - */ - setStencilTest(stencilTest: boolean): void; - /** - * Specifies whether stencil values can be written when rendering - * into a framebuffer or not. - * - * This method caches the state so `gl.stencilMask()` is only - * called when necessary. - * - * @param {boolean} stencilMask - The stencil mask. - */ - setStencilMask(stencilMask: boolean): void; - /** - * Specifies whether the stencil test functions. - * - * This method caches the state so `gl.stencilFunc()` is only - * called when necessary. - * - * @param {number} stencilFunc - The stencil compare function. - * @param {number} stencilRef - The reference value for the stencil test. - * @param {number} stencilMask - A bit-wise mask that is used to AND the reference value and the stored stencil value when the test is done. - */ - setStencilFunc(stencilFunc: number, stencilRef: number, stencilMask: number): void; - /** - * Specifies whether the stencil test operation. - * - * This method caches the state so `gl.stencilOp()` is only - * called when necessary. - * - * @param {number} stencilFail - The function to use when the stencil test fails. - * @param {number} stencilZFail - The function to use when the stencil test passes, but the depth test fail. - * @param {number} stencilZPass - The function to use when both the stencil test and the depth test pass, - * or when the stencil test passes and there is no depth buffer or depth testing is disabled. - */ - setStencilOp(stencilFail: number, stencilZFail: number, stencilZPass: number): void; - /** - * Configures the WebGL state for the given material. - * - * @param {Material} material - The material to configure the state for. - * @param {number} frontFaceCW - Whether the front faces are counter-clockwise or not. - * @param {number} hardwareClippingPlanes - The number of hardware clipping planes. - */ - setMaterial(material: Material, frontFaceCW: number, hardwareClippingPlanes: number): void; - /** - * Specifies the polygon offset. - * - * This method caches the state so `gl.polygonOffset()` is only - * called when necessary. - * - * @param {boolean} polygonOffset - Whether polygon offset is enabled or not. - * @param {number} factor - The scale factor for the variable depth offset for each polygon. - * @param {number} units - The multiplier by which an implementation-specific value is multiplied with to create a constant depth offset. - */ - setPolygonOffset(polygonOffset: boolean, factor: number, units: number): void; - /** - * Defines the usage of the given WebGL program. - * - * This method caches the state so `gl.useProgram()` is only - * called when necessary. - * - * @param {WebGLProgram} program - The WebGL program to use. - * @return {boolean} Whether a program change has been executed or not. - */ - useProgram(program: WebGLProgram): boolean; - /** - * Sets the vertex state by binding the given VAO and element buffer. - * - * @param {WebGLVertexArrayObject} vao - The VAO. - * @param {?WebGLBuffer} indexBuffer - The index buffer. - * @return {boolean} Whether a vertex state has been changed or not. - */ - setVertexState(vao: WebGLVertexArrayObject, indexBuffer?: WebGLBuffer | null): boolean; - /** - * Resets the vertex array state by resetting the VAO and element buffer. - */ - resetVertexState(): void; - /** - * Binds the given framebuffer. - * - * This method caches the state so `gl.bindFramebuffer()` is only - * called when necessary. - * - * @param {number} target - The binding point (target). - * @param {WebGLFramebuffer} framebuffer - The WebGL framebuffer to bind. - * @return {boolean} Whether a bind has been executed or not. - */ - bindFramebuffer(target: number, framebuffer: WebGLFramebuffer): boolean; - /** - * Defines draw buffers to which fragment colors are written into. - * Configures the MRT setup of custom framebuffers. - * - * This method caches the state so `gl.drawBuffers()` is only - * called when necessary. - * - * @param {RenderContext} renderContext - The render context. - * @param {WebGLFramebuffer} framebuffer - The WebGL framebuffer. - */ - drawBuffers(renderContext: RenderContext, framebuffer: WebGLFramebuffer): void; - /** - * Makes the given texture unit active. - * - * This method caches the state so `gl.activeTexture()` is only - * called when necessary. - * - * @param {number} webglSlot - The texture unit to make active. - */ - activeTexture(webglSlot: number): void; - /** - * Binds the given WebGL texture to a target. - * - * This method caches the state so `gl.bindTexture()` is only - * called when necessary. - * - * @param {number} webglType - The binding point (target). - * @param {WebGLTexture} webglTexture - The WebGL texture to bind. - * @param {number} webglSlot - The texture. - */ - bindTexture(webglType: number, webglTexture: WebGLTexture, webglSlot: number): void; - /** - * Binds a given WebGL buffer to a given binding point (target) at a given index. - * - * This method caches the state so `gl.bindBufferBase()` is only - * called when necessary. - * - * @param {number} target - The target for the bind operation. - * @param {number} index - The index of the target. - * @param {WebGLBuffer} buffer - The WebGL buffer. - * @return {boolean} Whether a bind has been executed or not. - */ - bindBufferBase(target: number, index: number, buffer: WebGLBuffer): boolean; - /** - * Unbinds the current bound texture. - * - * This method caches the state so `gl.bindTexture()` is only - * called when necessary. - */ - unbindTexture(): void; - /** - * Returns the value for the given parameter. - * - * @param {number} name - The paramter to get the value for. - * @return {any} The value for the given parameter. - */ - getParameter(name: number): any; - /** - * Specifies a pixel storage mode. - * - * @param {number} name - The parameter to set. - * @param {any} value - A value to set the parameter to. - */ - pixelStorei(name: number, value: any): void; -} -/** - * A WebGL 2 backend utility module with common helpers. - * - * @private - */ -declare class WebGLUtils { - /** - * Constructs a new utility object. - * - * @param {WebGLBackend} backend - The WebGL 2 backend. - */ - constructor(backend: WebGLBackend); - /** - * A reference to the WebGL 2 backend. - * - * @type {WebGLBackend} - */ - backend: WebGLBackend; - /** - * A reference to the rendering context. - * - * @type {WebGL2RenderingContext} - */ - gl: WebGL2RenderingContext; - /** - * A reference to a backend module holding extension-related - * utility functions. - * - * @type {WebGLExtensions} - */ - extensions: WebGLExtensions; - /** - * Converts the given three.js constant into a WebGL constant. - * The method currently supports the conversion of texture formats - * and types. - * - * @param {number} p - The three.js constant. - * @param {string} [colorSpace=NoColorSpace] - The color space. - * @return {?number} The corresponding WebGL constant. - */ - convert(p: number, colorSpace?: string): number | null; - /** - * This method can be used to synchronize the CPU with the GPU by waiting until - * ongoing GPU commands have been completed. - * - * @private - * @return {Promise} A promise that resolves when all ongoing GPU commands have been completed. - */ - private _clientWaitAsync; -} -/** - * A special type of render target that is used when rendering - * with the WebXR Device API. - * - * @private - * @augments RenderTarget - */ -declare class XRRenderTarget extends RenderTarget { - /** - * Constructs a new XR render target. - * - * @param {number} [width=1] - The width of the render target. - * @param {number} [height=1] - The height of the render target. - * @param {Object} [options={}] - The configuration options. - */ - constructor(width?: number, height?: number, options?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isXRRenderTarget: boolean; - /** - * Whether the attachments of the render target - * are defined by external textures. This flag is - * set to `true` when using the WebXR Layers API. - * - * @private - * @type {boolean} - * @default false - */ - private _hasExternalTextures; - /** - * Whether a depth buffer should automatically be allocated - * for this XR render target or not. - * - * Allocating a depth buffer is the default behavior of XR render - * targets. However, when using the WebXR Layers API, this flag - * must be set to `false` when the `ignoreDepthValues` property of - * the projection layers evaluates to `false`. - * - * Reference: {@link https://www.w3.org/TR/webxrlayers-1/#dom-xrprojectionlayer-ignoredepthvalues}. - * - * @private - * @type {boolean} - * @default true - */ - private _autoAllocateDepthBuffer; - /** - * Whether this render target is associated with a XRWebGLLayer. - * - * A XRWebGLLayer points to an opaque framebuffer. Basically, - * this means that you don't have access to its bound color, - * stencil and depth buffers. We need to handle this framebuffer - * differently since its textures are always bound. - * - * @private - * @type {boolean} - * @default false - * */ - private _isOpaqueFramebuffer; - copy(source: any): this; -} -/** - * Any render or compute command is executed in a specific context that defines - * the state of the renderer and its backend. Typical examples for such context - * data are the current clear values or data from the active framebuffer. This - * module is used to represent these contexts as objects. - * - * @private - */ -declare class RenderContext { - /** - * The context's ID. - * - * @type {number} - */ - id: number; - /** - * The MRT configuration. - * - * @type {?MRTNode} - * @default null - */ - mrt: MRTNode | null; - /** - * Whether the current active framebuffer has a color attachment. - * - * @type {boolean} - * @default true - */ - color: boolean; - /** - * Whether the color attachment should be cleared or not. - * - * @type {boolean} - * @default true - */ - clearColor: boolean; - /** - * The clear color value. - * - * @type {Object} - * @default true - */ - clearColorValue: Object; - /** - * Whether the current active framebuffer has a depth attachment. - * - * @type {boolean} - * @default true - */ - depth: boolean; - /** - * Whether the depth attachment should be cleared or not. - * - * @type {boolean} - * @default true - */ - clearDepth: boolean; - /** - * The clear depth value. - * - * @type {number} - * @default 1 - */ - clearDepthValue: number; - /** - * Whether the current active framebuffer has a stencil attachment. - * - * @type {boolean} - * @default false - */ - stencil: boolean; - /** - * Whether the stencil attachment should be cleared or not. - * - * @type {boolean} - * @default true - */ - clearStencil: boolean; - /** - * The clear stencil value. - * - * @type {number} - * @default 1 - */ - clearStencilValue: number; - /** - * By default the viewport encloses the entire framebuffer If a smaller - * viewport is manually defined, this property is to `true` by the renderer. - * - * @type {boolean} - * @default false - */ - viewport: boolean; - /** - * The viewport value. This value is in physical pixels meaning it incorporates - * the renderer's pixel ratio. The viewport property of render targets or - * the renderer is in logical pixels. - * - * @type {Vector4} - */ - viewportValue: Vector4; - /** - * When the scissor test is active and scissor rectangle smaller than the - * framebuffers dimensions, this property is to `true` by the renderer. - * - * @type {boolean} - * @default false - */ - scissor: boolean; - /** - * The scissor rectangle. - * - * @type {Vector4} - */ - scissorValue: Vector4; - /** - * The active render target. - * - * @type {?RenderTarget} - * @default null - */ - renderTarget: RenderTarget | null; - /** - * The textures of the active render target. - * `null` when no render target is set. - * - * @type {?Array} - * @default null - */ - textures: Array | null; - /** - * The depth texture of the active render target. - * `null` when no render target is set. - * - * @type {?DepthTexture} - * @default null - */ - depthTexture: DepthTexture | null; - /** - * The active cube face. - * - * @type {number} - * @default 0 - */ - activeCubeFace: number; - /** - * The active mipmap level. - * - * @type {number} - * @default 0 - */ - activeMipmapLevel: number; - /** - * The number of MSAA samples. This value is always `1` when - * MSAA isn't used. - * - * @type {number} - * @default 1 - */ - sampleCount: number; - /** - * The active render target's width in physical pixels. - * - * @type {number} - * @default 0 - */ - width: number; - /** - * The active render target's height in physical pixels. - * - * @type {number} - * @default 0 - */ - height: number; - /** - * The occlusion query count. - * - * @type {number} - * @default 0 - */ - occlusionQueryCount: number; - /** - * The current clipping context. - * - * @type {?ClippingContext} - * @default null - */ - clippingContext: ClippingContext | null; - /** - * The current camera. - * - * @type {?Camera} - * @default null - */ - camera: Camera | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isRenderContext: boolean; - /** - * Returns the cache key of this render context. - * - * @return {number} The cache key. - */ - getCacheKey(): number; -} -/** - * Class for representing compute pipelines. - * - * @private - * @augments Pipeline - */ -declare class ComputePipeline extends Pipeline { - /** - * Constructs a new compute pipeline. - * - * @param {string} cacheKey - The pipeline's cache key. - * @param {ProgrammableStage} computeProgram - The pipeline's compute shader. - */ - constructor(cacheKey: string, computeProgram: ProgrammableStage); - /** - * The pipeline's compute shader. - * - * @type {ProgrammableStage} - */ - computeProgram: ProgrammableStage; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isComputePipeline: boolean; -} -/** - * Class for representing programmable stages which are vertex, - * fragment or compute shaders. Unlike fixed-function states (like blending), - * they represent the programmable part of a pipeline. - * - * @private - */ -declare class ProgrammableStage { - /** - * Constructs a new programmable stage. - * - * @param {string} code - The shader code. - * @param {('vertex'|'fragment'|'compute')} stage - The type of stage. - * @param {string} name - The name of the shader. - * @param {?Array} [transforms=null] - The transforms (only relevant for compute stages with WebGL 2 which uses Transform Feedback). - * @param {?Array} [attributes=null] - The attributes (only relevant for compute stages with WebGL 2 which uses Transform Feedback). - */ - constructor(code: string, stage: ("vertex" | "fragment" | "compute"), name: string, transforms?: Array | null, attributes?: Array | null); - /** - * The id of the programmable stage. - * - * @type {number} - */ - id: number; - /** - * The shader code. - * - * @type {string} - */ - code: string; - /** - * The type of stage. - * - * @type {string} - */ - stage: string; - /** - * The name of the stage. - * This is used for debugging purposes. - * - * @type {string} - */ - name: string; - /** - * The transforms (only relevant for compute stages with WebGL 2 which uses Transform Feedback). - * - * @type {?Array} - */ - transforms: Array | null; - /** - * The attributes (only relevant for compute stages with WebGL 2 which uses Transform Feedback). - * - * @type {?Array} - */ - attributes: Array | null; - /** - * How often the programmable stage is currently in use. - * - * @type {number} - * @default 0 - */ - usedTimes: number; -} -/** - * Represents a buffer binding type. - * - * @private - * @abstract - * @augments Binding - */ -declare class Buffer extends Binding { - /** - * Constructs a new buffer. - * - * @param {string} name - The buffer's name. - * @param {TypedArray} [buffer=null] - The buffer. - */ - constructor(name: string, buffer?: TypedArray); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBuffer: boolean; - /** - * The bytes per element. - * - * @type {number} - */ - bytesPerElement: number; - /** - * A reference to the internal buffer. - * - * @private - * @type {TypedArray} - */ - private _buffer; - /** - * An array of update ranges. - * - * @private - * @type {Array<{start: number, count: number}>} - */ - private _updateRanges; - /** - * The array of update ranges. - * - * @type {Array<{start: number, count: number}>} - */ - get updateRanges(): Array<{ - start: number; - count: number; - }>; - /** - * Adds an update range. - * - * @param {number} start - The start index. - * @param {number} count - The number of elements. - */ - addUpdateRange(start: number, count: number): void; - /** - * Clears all update ranges. - */ - clearUpdateRanges(): void; - /** - * The buffer's byte length. - * - * @type {number} - * @readonly - */ - readonly get byteLength(): number; - /** - * A reference to the internal buffer. - * - * @type {Float32Array} - * @readonly - */ - readonly get buffer(): Float32Array; - /** - * Updates the binding. - * - * @return {boolean} Whether the buffer has been updated and must be - * uploaded to the GPU. - */ - update(): boolean; - /** - * Releases the buffer. - */ - release(): void; -} -/** - * A WebGPU backend utility module with common helpers. - * - * @private - */ -declare class WebGPUUtils { - /** - * Constructs a new utility object. - * - * @param {WebGPUBackend} backend - The WebGPU backend. - */ - constructor(backend: WebGPUBackend); - /** - * A reference to the WebGPU backend. - * - * @type {WebGPUBackend} - */ - backend: WebGPUBackend; - /** - * Returns the depth/stencil GPU format for the given render context. - * - * @param {RenderContext} renderContext - The render context. - * @return {string} The depth/stencil GPU texture format. - */ - getCurrentDepthStencilFormat(renderContext: RenderContext): string; - /** - * Returns the GPU format for the given texture. - * - * @param {Texture} texture - The texture. - * @return {string} The GPU texture format. - */ - getTextureFormatGPU(texture: Texture): string; - /** - * Returns an object that defines the multi-sampling state of the given texture. - * - * @param {Texture} texture - The texture. - * @return {Object} The multi-sampling state. - */ - getTextureSampleData(texture: Texture): Object; - /** - * Returns the default color attachment's GPU format of the current render context. - * - * @param {RenderContext} renderContext - The render context. - * @return {string} The GPU texture format of the default color attachment. - */ - getCurrentColorFormat(renderContext: RenderContext): string; - /** - * Returns the GPU formats of all color attachments of the current render context. - * - * @param {RenderContext} renderContext - The render context. - * @return {Array} The GPU texture formats of all color attachments. - */ - getCurrentColorFormats(renderContext: RenderContext): Array; - /** - * Returns the output color space of the current render context. - * - * @param {RenderContext} renderContext - The render context. - * @return {string} The output color space. - */ - getCurrentColorSpace(renderContext: RenderContext): string; - /** - * Returns GPU primitive topology for the given object and material. - * - * @param {Object3D} object - The 3D object. - * @param {Material} material - The material. - * @return {string} The GPU primitive topology. - */ - getPrimitiveTopology(object: Object3D, material: Material): string; - /** - * Returns a modified sample count from the given sample count value. - * - * That is required since WebGPU only supports either 1 or 4. - * - * @param {number} sampleCount - The input sample count. - * @return {number} The (potentially updated) output sample count. - */ - getSampleCount(sampleCount: number): number; - /** - * Returns the sample count of the given render context. - * - * @param {RenderContext} renderContext - The render context. - * @return {number} The sample count. - */ - getSampleCountRenderContext(renderContext: RenderContext): number; - /** - * Returns the preferred canvas format. - * - * There is a separate method for this so it's possible to - * honor edge cases for specific devices. - * - * @return {string} The GPU texture format of the canvas. - */ - getPreferredCanvasFormat(): string; -} -/** - * A WebGPU backend utility module for managing shader attributes. - * - * @private - */ -declare class WebGPUAttributeUtils { - /** - * Constructs a new utility object. - * - * @param {WebGPUBackend} backend - The WebGPU backend. - */ - constructor(backend: WebGPUBackend); - /** - * A reference to the WebGPU backend. - * - * @type {WebGPUBackend} - */ - backend: WebGPUBackend; - /** - * Creates the GPU buffer for the given buffer attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - * @param {GPUBufferUsage} usage - A flag that indicates how the buffer may be used after its creation. - */ - createAttribute(attribute: BufferAttribute, usage: GPUBufferUsage): void; - /** - * Updates the GPU buffer of the given buffer attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - */ - updateAttribute(attribute: BufferAttribute): void; - /** - * This method creates the vertex buffer layout data which are - * require when creating a render pipeline for the given render object. - * - * @param {RenderObject} renderObject - The render object. - * @return {Array} An array holding objects which describe the vertex buffer layout. - */ - createShaderVertexBuffers(renderObject: RenderObject): Array; - /** - * Destroys the GPU buffer of the given buffer attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - */ - destroyAttribute(attribute: BufferAttribute): void; - /** - * This method performs a readback operation by moving buffer data from - * a storage buffer attribute from the GPU to the CPU. ReadbackBuffer can - * be used to retain and reuse handles to the intermediate buffers and prevent - * new allocation. - * - * @async - * @param {BufferAttribute} attribute - The storage buffer attribute to read frm. - * @param {number} count - The offset from which to start reading the - * @param {number} offset - The storage buffer attribute. - * @param {ReadbackBuffer|ArrayBuffer} target - The storage buffer attribute. - * @return {Promise} A promise that resolves with the buffer data when the data are ready. - */ - getArrayBufferAsync(attribute: BufferAttribute, target?: ReadbackBuffer | ArrayBuffer, offset?: number, count?: number): Promise; - /** - * Returns the vertex format of the given buffer attribute. - * - * @private - * @param {BufferAttribute} geometryAttribute - The buffer attribute. - * @return {string|undefined} The vertex format (e.g. 'float32x3'). - */ - private _getVertexFormat; - /** - * Utility method for handling interleaved buffer attributes correctly. - * To process them, their `InterleavedBuffer` is returned. - * - * @private - * @param {BufferAttribute} attribute - The attribute. - * @return {BufferAttribute|InterleavedBuffer} - */ - private _getBufferAttribute; -} -/** - * A WebGPU backend utility module for managing bindings. - * - * When reading the documentation it's helpful to keep in mind that - * all class definitions starting with 'GPU*' are modules from the - * WebGPU API. So for example `BindGroup` is a class from the engine - * whereas `GPUBindGroup` is a class from WebGPU. - * - * @private - */ -declare class WebGPUBindingUtils { - /** - * Constructs a new utility object. - * - * @param {WebGPUBackend} backend - The WebGPU backend. - */ - constructor(backend: WebGPUBackend); - /** - * A reference to the WebGPU backend. - * - * @type {WebGPUBackend} - */ - backend: WebGPUBackend; - /** - * A cache that maps combinations of layout entries to existing bind group layouts. - * - * @private - * @type {Map} - */ - private _bindGroupLayoutCache; - /** - * Creates a GPU bind group layout for the given bind group. - * - * @param {BindGroup} bindGroup - The bind group. - * @return {GPUBindGroupLayout} The GPU bind group layout. - */ - createBindingsLayout(bindGroup: BindGroup): GPUBindGroupLayout; - /** - * Creates bindings from the given bind group definition. - * - * @param {BindGroup} bindGroup - The bind group. - * @param {Array} bindings - Array of bind groups. - * @param {number} cacheIndex - The cache index. - * @param {number} version - The version. - */ - createBindings(bindGroup: BindGroup, bindings: Array, cacheIndex: number, version?: number): void; - /** - * Updates a buffer binding. - * - * @param {Buffer} binding - The buffer binding to update. - */ - updateBinding(binding: Buffer): void; - /** - * Creates a GPU bind group for the camera index. - * - * @param {Uint32Array} data - The index data. - * @param {GPUBindGroupLayout} layoutGPU - The GPU bind group layout. - * @return {GPUBindGroup} The GPU bind group. - */ - createBindGroupIndex(data: Uint32Array, layoutGPU: GPUBindGroupLayout): GPUBindGroup; - /** - * Creates a GPU bind group for the given bind group and GPU layout. - * - * @param {BindGroup} bindGroup - The bind group. - * @param {GPUBindGroupLayout} layoutGPU - The GPU bind group layout. - * @return {GPUBindGroup} The GPU bind group. - */ - createBindGroup(bindGroup: BindGroup, layoutGPU: GPUBindGroupLayout): GPUBindGroup; - /** - * Creates a GPU bind group layout entries for the given bind group. - * - * @private - * @param {BindGroup} bindGroup - The bind group. - * @return {Array} The GPU bind group layout entries. - */ - private _createLayoutEntries; - /** - * Delete the data associated with a bind group. - * - * @param {BindGroup} bindGroup - The bind group. - */ - deleteBindGroupData(bindGroup: BindGroup): void; - /** - * Frees internal resources. - */ - dispose(): void; -} -/** - * A WebGPU backend utility module for managing the device's capabilities. - * - * @private - */ -declare class WebGPUCapabilities { - /** - * Constructs a new utility object. - * - * @param {WebGPUBackend} backend - The WebGPU backend. - */ - constructor(backend: WebGPUBackend); - /** - * A reference to the WebGPU backend. - * - * @type {WebGPUBackend} - */ - backend: WebGPUBackend; - /** - * Returns the maximum anisotropy texture filtering value. - * - * @return {number} The maximum anisotropy texture filtering value. - */ - getMaxAnisotropy(): number; - /** - * Returns the maximum number of bytes available for uniform buffers. - * - * @return {number} The maximum number of bytes available for uniform buffers. - */ - getUniformBufferLimit(): number; -} -/** - * A WebGPU backend utility module for managing pipelines. - * - * @private - */ -declare class WebGPUPipelineUtils { - /** - * Constructs a new utility object. - * - * @param {WebGPUBackend} backend - The WebGPU backend. - */ - constructor(backend: WebGPUBackend); - /** - * A reference to the WebGPU backend. - * - * @type {WebGPUBackend} - */ - backend: WebGPUBackend; - /** - * A Weak Map that tracks the active pipeline for render or compute passes. - * - * @private - * @type {WeakMap<(GPURenderPassEncoder|GPUComputePassEncoder),(GPURenderPipeline|GPUComputePipeline)>} - */ - private _activePipelines; - /** - * Sets the given pipeline for the given pass. The method makes sure to only set the - * pipeline when necessary. - * - * @param {(GPURenderPassEncoder|GPUComputePassEncoder)} pass - The pass encoder. - * @param {(GPURenderPipeline|GPUComputePipeline)} pipeline - The pipeline. - */ - setPipeline(pass: (GPURenderPassEncoder | GPUComputePassEncoder), pipeline: (GPURenderPipeline | GPUComputePipeline)): void; - /** - * Returns the sample count derived from the given render context. - * - * @private - * @param {RenderContext} renderContext - The render context. - * @return {number} The sample count. - */ - private _getSampleCount; - /** - * Creates a render pipeline for the given render object. - * - * @param {RenderObject} renderObject - The render object. - * @param {Array} promises - An array of compilation promises which are used in `compileAsync()`. - */ - createRenderPipeline(renderObject: RenderObject, promises: Array>): void; - /** - * Creates GPU render bundle encoder for the given render context. - * - * @param {RenderContext} renderContext - The render context. - * @param {?string} [label='renderBundleEncoder'] - The label. - * @return {GPURenderBundleEncoder} The GPU render bundle encoder. - */ - createBundleEncoder(renderContext: RenderContext, label?: string | null): GPURenderBundleEncoder; - /** - * Creates a compute pipeline for the given compute node. - * - * @param {ComputePipeline} pipeline - The compute pipeline. - * @param {Array} bindings - The bindings. - */ - createComputePipeline(pipeline: ComputePipeline, bindings: Array): void; - /** - * Reads line-accurate diagnostics from shader modules and logs them. - * Called from pipeline creation error paths to turn opaque validation - * failures into actionable WGSL feedback. - * - * @private - * @param {Array<{program: ProgrammableStage, module: GPUShaderModule}>} stages - Pairs of program + compiled shader module. - * @param {string} pipelineLabel - Label of the owning pipeline, used as log prefix. - * @return {Promise} - */ - private _reportShaderDiagnostics; - /** - * Returns the blending state as a descriptor object required - * for the pipeline creation. - * - * @private - * @param {Material|BlendMode} object - The object containing blending information. - * @return {Object} The blending state. - */ - private _getBlending; - /** - * Returns the GPU blend factor which is required for the pipeline creation. - * - * @private - * @param {number} blend - The blend factor as a three.js constant. - * @return {string} The GPU blend factor. - */ - private _getBlendFactor; - /** - * Returns the GPU stencil compare function which is required for the pipeline creation. - * - * @private - * @param {Material} material - The material. - * @return {string} The GPU stencil compare function. - */ - private _getStencilCompare; - /** - * Returns the GPU stencil operation which is required for the pipeline creation. - * - * @private - * @param {number} op - A three.js constant defining the stencil operation. - * @return {string} The GPU stencil operation. - */ - private _getStencilOperation; - /** - * Returns the GPU blend operation which is required for the pipeline creation. - * - * @private - * @param {number} blendEquation - A three.js constant defining the blend equation. - * @return {string} The GPU blend operation. - */ - private _getBlendOperation; - /** - * Returns the primitive state as a descriptor object required - * for the pipeline creation. - * - * @private - * @param {Object3D} object - The 3D object. - * @param {BufferGeometry} geometry - The geometry. - * @param {Material} material - The material. - * @return {Object} The primitive state. - */ - private _getPrimitiveState; - /** - * Returns the GPU color write mask which is required for the pipeline creation. - * - * @private - * @param {Material} material - The material. - * @return {number} The GPU color write mask. - */ - private _getColorWriteMask; - /** - * Returns the GPU depth compare function which is required for the pipeline creation. - * - * @private - * @param {Material} material - The material. - * @return {string} The GPU depth compare function. - */ - private _getDepthCompare; -} -/** - * A WebGPU backend utility module for managing textures. - * - * @private - */ -declare class WebGPUTextureUtils { - /** - * Constructs a new utility object. - * - * @param {WebGPUBackend} backend - The WebGPU backend. - */ - constructor(backend: WebGPUBackend); - /** - * A reference to the WebGPU backend. - * - * @type {WebGPUBackend} - */ - backend: WebGPUBackend; - /** - * A reference to the pass utils. - * - * @type {?WebGPUTexturePassUtils} - * @default null - */ - _passUtils: WebGPUTexturePassUtils | null; - /** - * A dictionary for managing default textures. The key - * is the texture format, the value the texture object. - * - * @type {Object} - */ - defaultTexture: { - [x: string]: Texture; - }; - /** - * A dictionary for managing default cube textures. The key - * is the texture format, the value the texture object. - * - * @type {Object} - */ - defaultCubeTexture: { - [x: string]: CubeTexture; - }; - /** - * A default video frame. - * - * @type {?VideoFrame} - * @default null - */ - defaultVideoFrame: VideoFrame | null; - /** - * A cache of shared texture samplers. - * - * @type {Map} - */ - _samplerCache: Map; - /** - * Creates a GPU sampler for the given texture. - * - * @param {Texture} texture - The texture to create the sampler for. - * @param {TextureNode} textureNode - The texture node to update the sampler with. - * @return {string} The current sampler key. - */ - updateSampler(texture: Texture, textureNode: TextureNode): string; - /** - * Creates a default texture for the given texture that can be used - * as a placeholder until the actual texture is ready for usage. - * - * @param {Texture} texture - The texture to create a default texture for. - */ - createDefaultTexture(texture: Texture): void; - /** - * Defines a texture on the GPU for the given texture object. - * - * @param {Texture} texture - The texture. - * @param {Object} [options={}] - Optional configuration parameter. - */ - createTexture(texture: Texture, options?: Object): void; - /** - * Destroys the GPU data for the given texture object. - * - * @param {Texture} texture - The texture. - * @param {boolean} [isDefaultTexture=false] - Whether the texture uses a default GPU texture or not. - */ - destroyTexture(texture: Texture, isDefaultTexture?: boolean): void; - /** - * Generates mipmaps for the given texture. - * - * @param {Texture} texture - The texture. - * @param {?GPUCommandEncoder} [encoder=null] - An optional command encoder used to generate mipmaps. - */ - generateMipmaps(texture: Texture, encoder?: GPUCommandEncoder | null): void; - /** - * Returns the color buffer representing the color - * attachment of the default framebuffer. - * - * @return {GPUTexture} The color buffer. - */ - getColorBuffer(): GPUTexture; - /** - * Returns the depth buffer representing the depth - * attachment of the default framebuffer. - * - * @param {boolean} [depth=true] - Whether depth is enabled or not. - * @param {boolean} [stencil=false] - Whether stencil is enabled or not. - * @return {GPUTexture} The depth buffer. - */ - getDepthBuffer(depth?: boolean, stencil?: boolean): GPUTexture; - /** - * Uploads the updated texture data to the GPU. - * - * @param {Texture} texture - The texture. - * @param {Object} [options={}] - Optional configuration parameter. - */ - updateTexture(texture: Texture, options?: Object): void; - /** - * Returns texture data as a typed array. - * - * @async - * @param {Texture} texture - The texture to copy. - * @param {number} x - The x coordinate of the copy origin. - * @param {number} y - The y coordinate of the copy origin. - * @param {number} width - The width of the copy. - * @param {number} height - The height of the copy. - * @param {number} faceIndex - The face index. - * @return {Promise} A Promise that resolves with a typed array when the copy operation has finished. - */ - copyTextureToBuffer(texture: Texture, x: number, y: number, width: number, height: number, faceIndex: number): Promise; - /** - * Frees all internal resources. - */ - dispose(): void; - /** - * Returns the default GPU texture for the given format. - * - * @private - * @param {string} format - The GPU format. - * @return {GPUTexture} The GPU texture. - */ - private _getDefaultTextureGPU; - /** - * Returns the default GPU cube texture for the given format. - * - * @private - * @param {string} format - The GPU format. - * @return {GPUTexture} The GPU texture. - */ - private _getDefaultCubeTextureGPU; - /** - * Uploads cube texture image data to the GPU memory. - * - * @private - * @param {CubeTexture} texture - The cube texture. - * @param {GPUTexture} textureGPU - The GPU texture. - * @param {Object} textureDescriptorGPU - The GPU texture descriptor. - */ - private _copyCubeMapToTexture; - /** - * Uploads texture image data to the GPU memory. - * - * @private - * @param {HTMLImageElement|ImageBitmap|HTMLCanvasElement} image - The image data. - * @param {GPUTexture} textureGPU - The GPU texture. - * @param {Object} textureDescriptorGPU - The GPU texture descriptor. - * @param {number} originDepth - The origin depth. - * @param {boolean} flipY - Whether to flip texture data along their vertical axis or not. - * @param {boolean} premultiplyAlpha - Whether the texture should have its RGB channels premultiplied by the alpha channel or not. - * @param {number} [mipLevel=0] - The mip level where the data should be copied to. - */ - private _copyImageToTexture; - /** - * Returns the pass utils singleton. - * - * @private - * @return {WebGPUTexturePassUtils} The utils instance. - */ - private _getPassUtils; - /** - * Generates mipmaps for the given GPU texture. - * - * @private - * @param {GPUTexture} textureGPU - The GPU texture object. - * @param {?GPUCommandEncoder} [encoder=null] - An optional command encoder used to generate mipmaps. - */ - private _generateMipmaps; - /** - * Flip the contents of the given GPU texture along its vertical axis. - * - * @private - * @param {GPUTexture} textureGPU - The GPU texture object. - * @param {Object} textureDescriptorGPU - The texture descriptor. - * @param {number} [originDepth=0] - The origin depth. - */ - private _flipY; - /** - * Uploads texture buffer data to the GPU memory. - * - * @private - * @param {Object} image - An object defining the image buffer data. - * @param {GPUTexture} textureGPU - The GPU texture. - * @param {Object} textureDescriptorGPU - The GPU texture descriptor. - * @param {number} originDepth - The origin depth. - * @param {boolean} flipY - Whether to flip texture data along their vertical axis or not. - * @param {number} [depth=0] - The depth offset when copying array or 3D texture data. - * @param {number} [mipLevel=0] - The mip level where the data should be copied to. - */ - private _copyBufferToTexture; - /** - * Uploads compressed texture data to the GPU memory. - * - * @private - * @param {Array} mipmaps - An array with mipmap data. - * @param {GPUTexture} textureGPU - The GPU texture. - * @param {Object} textureDescriptorGPU - The GPU texture descriptor. - * @param {?Set} [layerUpdates=null] - The layer indices to update. - */ - private _copyCompressedBufferToTexture; - /** - * This method is only relevant for compressed texture formats. It returns a block - * data descriptor for the given GPU compressed texture format. - * - * @private - * @param {string} format - The GPU compressed texture format. - * @return {Object} The block data descriptor. - */ - private _getBlockData; - /** - * Converts the three.js uv wrapping constants to GPU address mode constants. - * - * @private - * @param {number} value - The three.js constant defining a uv wrapping mode. - * @return {string} The GPU address mode. - */ - private _convertAddressMode; - /** - * Converts the three.js filter constants to GPU filter constants. - * - * @private - * @param {number} value - The three.js constant defining a filter mode. - * @return {string} The GPU filter mode. - */ - private _convertFilterMode; - /** - * Converts the three.js filter constants to a GPU mipmap filter constant. - * Unlike `_convertFilterMode`, this extracts the between-mip-level filtering - * axis from the combined three.js constant rather than the within-level axis. - * - * @private - * @param {number} value - The three.js constant defining a filter mode. - * @return {string} The GPU mipmap filter mode. - */ - private _convertMipmapFilterMode; - /** - * Returns the bytes-per-texel value for the given GPU texture format. - * - * @private - * @param {string} format - The GPU texture format. - * @return {number} The bytes-per-texel. - */ - private _getBytesPerTexel; - /** - * Returns the corresponding typed array type for the given GPU texture format. - * - * @private - * @param {string} format - The GPU texture format. - * @return {TypedArray.constructor} The typed array type. - */ - private _getTypedArrayType; - /** - * Returns the GPU dimensions for the given texture. - * - * @private - * @param {Texture} texture - The texture. - * @return {string} The GPU dimension. - */ - private _getDimension; -} -/** - * This renderer module provides a series of statistical information - * about the GPU memory and the rendering process. Useful for debugging - * and monitoring. - */ -declare class Info { - /** - * Whether frame related metrics should automatically - * be resetted or not. This property should be set to `false` - * by apps which manage their own animation loop. They must - * then call `renderer.info.reset()` once per frame manually. - * - * @type {boolean} - * @default true - */ - autoReset: boolean; - /** - * The current frame ID. This ID is managed - * by `NodeFrame`. - * - * @type {number} - * @readonly - * @default 0 - */ - readonly frame: number; - /** - * The number of render calls since the - * app has been started. - * - * @type {number} - * @readonly - * @default 0 - */ - readonly calls: number; - /** - * Render related metrics. - * - * @type {Object} - * @readonly - * @property {number} calls - The number of render calls since the app has been started. - * @property {number} frameCalls - The number of render calls of the current frame. - * @property {number} drawCalls - The number of draw calls of the current frame. - * @property {number} triangles - The number of rendered triangle primitives of the current frame. - * @property {number} points - The number of rendered point primitives of the current frame. - * @property {number} lines - The number of rendered line primitives of the current frame. - * @property {number} timestamp - The timestamp of the frame. - */ - readonly render: Object; - /** - * Compute related metrics. - * - * @type {Object} - * @readonly - * @property {number} calls - The number of compute calls since the app has been started. - * @property {number} frameCalls - The number of compute calls of the current frame. - * @property {number} timestamp - The timestamp of the frame when using `renderer.computeAsync()`. - */ - readonly compute: Object; - /** - * Memory related metrics. - * - * @type {Object} - * @readonly - * @property {number} attributes - The number of active attributes. - * @property {number} attributesSize - The memory size of active attributes in bytes. - * @property {number} geometries - The number of active geometries. - * @property {number} indexAttributes - The number of active index attributes. - * @property {number} indexAttributesSize - The memory size of active index attributes in bytes. - * @property {number} indirectStorageAttributes - The number of active indirect storage attributes. - * @property {number} indirectStorageAttributesSize - The memory size of active indirect storage attributes in bytes. - * @property {number} programs - The number of active programs. - * @property {number} programsSize - The memory size of active programs in bytes. - * @property {number} readbackBuffers - The number of active readback buffers. - * @property {number} readbackBuffersSize - The memory size of active readback buffers in bytes. - * @property {number} renderTargets - The number of active renderTargets. - * @property {number} storageAttributes - The number of active storage attributes. - * @property {number} storageAttributesSize - The memory size of active storage attributes in bytes. - * @property {number} textures - The number of active textures. - * @property {number} texturesSize - The memory size of active textures in bytes. - * @property {number} uniformBuffers - The number of active uniform buffers. - * @property {number} uniformBuffersSize - The memory size of active uniform buffers in bytes. - * @property {number} total - The total memory size in bytes. - */ - readonly memory: Object; - /** - * Map for storing calculated byte sizes of tracked objects. - * - * @type {Map} - * @private - */ - private memoryMap; - /** - * This method should be executed per draw call and updates the corresponding metrics. - * - * @param {Object3D} object - The 3D object that is going to be rendered. - * @param {number} count - The vertex or index count. - * @param {number} instanceCount - The instance count. - */ - update(object: Object3D, count: number, instanceCount: number): void; - /** - * Resets frame related metrics. - */ - reset(): void; - /** - * Performs a complete reset of the object. - */ - dispose(): void; - /** - * Tracks texture memory explicitly, updating counts and byte tracking. - * - * @param {Texture} texture - */ - createTexture(texture: Texture): void; - /** - * Tracks texture memory explicitly, updating counts and byte tracking. - * - * @param {Texture} texture - */ - destroyTexture(texture: Texture): void; - /** - * Tracks attribute memory explicitly, updating counts and byte tracking. - * - * @param {BufferAttribute} attribute - * @param {string} type - type of attribute - * @private - */ - private _createAttribute; - /** - * Tracks a regular attribute memory explicitly. - * - * @param {BufferAttribute} attribute - The attribute to track. - */ - createAttribute(attribute: BufferAttribute): void; - /** - * Tracks an index attribute memory explicitly. - * - * @param {BufferAttribute} attribute - The index attribute to track. - */ - createIndexAttribute(attribute: BufferAttribute): void; - /** - * Tracks a storage attribute memory explicitly. - * - * @param {BufferAttribute} attribute - The storage attribute to track. - */ - createStorageAttribute(attribute: BufferAttribute): void; - /** - * Tracks an indirect storage attribute memory explicitly. - * - * @param {BufferAttribute} attribute - The indirect storage attribute to track. - */ - createIndirectStorageAttribute(attribute: BufferAttribute): void; - /** - * Tracks attribute memory explicitly, updating counts and byte tracking. - * - * @param {BufferAttribute} attribute - */ - destroyAttribute(attribute: BufferAttribute): void; - /** - * Tracks a readback buffer memory explicitly. - * - * @param {ReadbackBuffer} readbackBuffer - The readback buffer to track. - */ - createReadbackBuffer(readbackBuffer: ReadbackBuffer): void; - /** - * Tracks a readback buffer memory explicitly. - * - * @param {ReadbackBuffer} readbackBuffer - The readback buffer to track. - */ - destroyReadbackBuffer(readbackBuffer: ReadbackBuffer): void; - /** - * Tracks a uniform buffer memory explicitly. - * - * @param {UniformBuffer} uniformBuffer - The uniform buffer to track. - */ - createUniformBuffer(uniformBuffer: UniformBuffer): void; - /** - * Tracks a uniform buffer memory explicitly. - * - * @param {UniformBuffer} uniformBuffer - The uniform buffer to track. - */ - destroyUniformBuffer(uniformBuffer: UniformBuffer): void; - /** - * Tracks program memory explicitly, updating counts and byte tracking. - * - * @param {ProgrammableStage} program - The program to track. - */ - createProgram(program: ProgrammableStage): void; - /** - * Tracks program memory explicitly, updating counts and byte tracking. - * - * @param {Object} program - The program to track. - */ - destroyProgram(program: Object): void; - /** - * Calculates the memory size of a texture in bytes. - * - * @param {Texture} texture - The texture to calculate the size for. - * @return {number} The calculated size in bytes. - * @private - */ - private _getTextureMemorySize; - /** - * Calculates the memory size of an attribute in bytes. - * - * @param {BufferAttribute} attribute - The attribute to calculate the size for. - * @return {number} The calculated size in bytes. - * @private - */ - private _getAttributeMemorySize; -} -/** - * A node builder targeting WGSL. - * - * This module generates WGSL shader code from node materials and also - * generates the respective bindings and vertex buffer definitions. These - * data are later used by the renderer to create render and compute pipelines - * for render objects. - * - * @augments NodeBuilder - */ -declare class WGSLNodeBuilder extends NodeBuilder { - /** - * Constructs a new WGSL node builder renderer. - * - * @param {Object3D} object - The 3D object. - * @param {Renderer} renderer - The renderer. - */ - constructor(object: Object3D, renderer: Renderer); - /** - * A dictionary that holds for each shader stage ('vertex', 'fragment', 'compute') - * another dictionary which manages UBOs per group ('render','frame','object'). - * - * @type {Object>} - */ - uniformGroups: { - [x: string]: { - [x: string]: NodeUniformsGroup; - }; - }; - /** - * A dictionary that holds the assigned binding indices for each uniform group. - * This ensures the same binding index is used across all shader stages. - * - * @type {Object} - */ - uniformGroupsBindings: { - [x: string]: { - index: number; - id: number; - }; - }; - /** - * A dictionary that holds for each shader stage a Map of builtins. - * - * @type {Object>} - */ - builtins: { - [x: string]: Map; - }; - /** - * A dictionary that holds for each shader stage a Set of directives. - * - * @type {Object>} - */ - directives: { - [x: string]: Set; - }; - /** - * A map for managing scope arrays. Only relevant for when using - * {@link WorkgroupInfoNode} in context of compute shaders. - * - * @type {Map} - */ - scopedArrays: Map; - /** - * A flag that indicates that early returns are allowed. - * - * @type {boolean} - * @default true - */ - allowEarlyReturns: boolean; - /** - * A flag that indicates that global variables are allowed. - * - * @type {boolean} - * @default true - */ - allowGlobalVariables: boolean; - /** - * Generates the WGSL snippet for sampled textures. - * - * @private - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {string} The WGSL snippet. - */ - private _generateTextureSample; - /** - * Generates the WGSL snippet when sampling textures with explicit mip level. - * - * @private - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {string} levelSnippet - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. - * @param {string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @return {string} The WGSL snippet. - */ - private generateTextureSampleLevel; - /** - * Generates a wrap function used in context of textures. - * - * @param {Texture} texture - The texture to generate the function for. - * @return {string} The name of the generated function. - */ - generateWrapFunction(texture: Texture): string; - /** - * Generates a WGSL variable that holds the texture dimension of the given texture. - * It also returns information about the number of layers (elements) of an arrayed - * texture as well as the cube face count of cube textures. - * - * @param {Texture} texture - The texture to generate the function for. - * @param {string} textureProperty - The name of the video texture uniform in the shader. - * @param {string} levelSnippet - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. - * @return {string} The name of the dimension variable. - */ - generateTextureDimension(texture: Texture, textureProperty: string, levelSnippet: string): string; - /** - * Generates the WGSL snippet for a manual filtered texture. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {string} [levelSnippet='0u'] - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @return {string} The WGSL snippet. - */ - generateFilteredTexture(texture: Texture, textureProperty: string, uvSnippet: string, offsetSnippet: string | null, levelSnippet?: string, depthSnippet: string | null): string; - /** - * Generates the WGSL snippet for a texture lookup with explicit level-of-detail. - * Since it's a lookup, no sampling or filtering is applied. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {string} [levelSnippet='0u'] - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. - * @return {string} The WGSL snippet. - */ - generateTextureLod(texture: Texture, textureProperty: string, uvSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, levelSnippet?: string): string; - /** - * Generates the WGSL snippet that reads a single texel from a storage texture. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvIndexSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {?string} levelSnippet - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @return {string} The WGSL snippet. - */ - generateStorageTextureLoad(texture: Texture, textureProperty: string, uvIndexSnippet: string, levelSnippet: string | null, depthSnippet: string | null, offsetSnippet: string | null): string; - /** - * Generates the WGSL snippet that reads a single texel from a texture without sampling or filtering. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvIndexSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {?string} levelSnippet - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @return {string} The WGSL snippet. - */ - generateTextureLoad(texture: Texture, textureProperty: string, uvIndexSnippet: string, levelSnippet: string | null, depthSnippet: string | null, offsetSnippet: string | null): string; - /** - * Generates the WGSL snippet that writes a single texel to a texture. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvIndexSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {string} valueSnippet - A WGSL snippet that represent the new texel value. - * @return {string} The WGSL snippet. - */ - generateTextureStore(texture: Texture, textureProperty: string, uvIndexSnippet: string, depthSnippet: string | null, valueSnippet: string): string; - /** - * Returns `true` if the sampled values of the given texture should be compared against a reference value. - * - * @param {Texture} texture - The texture. - * @return {boolean} Whether the sampled values of the given texture should be compared against a reference value or not. - */ - isSampleCompare(texture: Texture): boolean; - /** - * Returns `true` if the given texture is unfilterable. - * - * @param {Texture} texture - The texture. - * @return {boolean} Whether the given texture is unfilterable or not. - */ - isUnfilterable(texture: Texture): boolean; - /** - * Generates the WGSL snippet for sampling/loading the given texture. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {string} The WGSL snippet. - */ - generateTexture(texture: Texture, textureProperty: string, uvSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, shaderStage?: string): string; - /** - * Generates the WGSL snippet for sampling/loading the given texture using explicit gradients. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {Array} gradSnippet - An array holding both gradient WGSL snippets. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {string} The WGSL snippet. - */ - generateTextureGrad(texture: Texture, textureProperty: string, uvSnippet: string, gradSnippet: Array, depthSnippet: string | null, offsetSnippet: string | null, shaderStage?: string): string; - /** - * Generates the WGSL snippet for sampling a depth texture and comparing the sampled depth values - * against a reference value. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {string} compareSnippet - A WGSL snippet that represents the reference value. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {string} The WGSL snippet. - */ - generateTextureCompare(texture: Texture, textureProperty: string, uvSnippet: string, compareSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, shaderStage?: string): string; - /** - * Generates the WGSL snippet for gathering four texels from the given texture. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {string} gatherSnippet - A WGSL snippet that represents the index of the channel to read. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {?string} flipYSnippet - A WGSL snippet that represents the y-flip. Only used for WebGL. - * @return {string} The WGSL snippet. - */ - generateTextureGather(texture: Texture, textureProperty: string, uvSnippet: string, gatherSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; - /** - * Generates the WGSL snippet for performing a depth comparison on four texels in the given depth texture. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {string} compareSnippet - A WGSL snippet that represents the reference value. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {?string} flipYSnippet - A WGSL snippet that represents the y-flip. Only used for WebGL. - * @return {string} The WGSL snippet. - */ - generateTextureGatherCompare(texture: Texture, textureProperty: string, uvSnippet: string, compareSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; - /** - * Generates the WGSL snippet when sampling textures with explicit mip level. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {string} levelSnippet - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {string} The WGSL snippet. - */ - generateTextureLevel(texture: Texture, textureProperty: string, uvSnippet: string, levelSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; - /** - * Generates the WGSL snippet when sampling textures with a bias to the mip level. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {string} biasSnippet - A WGSL snippet that represents the bias to apply to the mip level before sampling. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {string} The WGSL snippet. - */ - generateTextureBias(texture: Texture, textureProperty: string, uvSnippet: string, biasSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, shaderStage?: string): string; - /** - * Returns a WGSL snippet that represents the property name of the given node. - * - * @param {Node} node - The node. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {string} The property name. - */ - getPropertyName(node: Node, shaderStage?: string): string; - /** - * Returns the native shader operator name for a given generic name. - * - * @param {string} op - The operator name to resolve. - * @return {?string} The resolved operator name. - */ - getFunctionOperator(op: string): string | null; - /** - * Returns the node access for the given node and shader stage. - * - * @param {StorageTextureNode|StorageBufferNode} node - The storage node. - * @param {string} shaderStage - The shader stage. - * @return {string} The node access. - */ - getNodeAccess(node: StorageTextureNode | StorageBufferNode, shaderStage: string): string; - /** - * Returns A WGSL snippet representing the storage access. - * - * @param {StorageTextureNode|StorageBufferNode} node - The storage node. - * @param {string} shaderStage - The shader stage. - * @return {string} The WGSL snippet representing the storage access. - */ - getStorageAccess(node: StorageTextureNode | StorageBufferNode, shaderStage: string): string; - /** - * This method is one of the more important ones since it's responsible - * for generating a matching binding instance for the given uniform node. - * - * These bindings are later used in the renderer to create bind groups - * and layouts. - * - * @param {UniformNode} node - The uniform node. - * @param {string} type - The node data type. - * @param {string} shaderStage - The shader stage. - * @param {?string} [name=null] - An optional uniform name. - * @return {NodeUniform} The node uniform object. - */ - getUniformFromNode(node: UniformNode, type: string, shaderStage: string, name?: string | null): NodeUniform; - /** - * This method should be used whenever builtins are required in nodes. - * The internal builtins data structure will make sure builtins are - * defined in the WGSL source. - * - * @param {string} name - The builtin name. - * @param {string} property - The property name. - * @param {string} type - The node data type. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {string} The property name. - */ - getBuiltin(name: string, property: string, type: string, shaderStage?: string): string; - /** - * Returns `true` if the given builtin is defined in the given shader stage. - * - * @param {string} name - The builtin name. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {boolean} Whether the given builtin is defined in the given shader stage or not. - */ - hasBuiltin(name: string, shaderStage?: string): boolean; - /** - * Builds the given shader node. - * - * @param {ShaderNodeInternal} shaderNode - The shader node. - * @return {string} The WGSL function code. - */ - buildFunctionCode(shaderNode: ShaderNodeInternal): string; - /** - * Returns a builtin representing the index of a compute invocation within the scope of a workgroup load. - * - * @return {string} The invocation local index. - */ - getInvocationLocalIndex(): string; - /** - * Returns a builtin representing the size of a subgroup within the current shader. - * - * @return {string} The subgroup size. - */ - getSubgroupSize(): string; - /** - * Returns a builtin representing the index of a compute invocation within the scope of a subgroup. - * - * @return {string} The invocation subgroup index. - */ - getInvocationSubgroupIndex(): string; - /** - * Returns a builtin representing the index of a compute invocation's subgroup within its workgroup. - * - * @return {string} The subgroup index. - */ - getSubgroupIndex(): string; - /** - * Overwritten as a NOP since this method is intended for the WebGL 2 backend. - * - * @return {null} Null. - */ - getDrawIndex(): null; - /** - * Returns the frag depth builtin. - * - * @return {string} The frag depth builtin. - */ - getFragDepth(): string; - /** - * Returns the clip distances builtin. - * - * @return {string} The clip distances builtin. - */ - getClipDistance(): string; - /** - * Enables the given directive for the given shader stage. - * - * @param {string} name - The directive name. - * @param {string} [shaderStage=this.shaderStage] - The shader stage to enable the directive for. - */ - enableDirective(name: string, shaderStage?: string): void; - /** - * Returns the directives of the given shader stage as a WGSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} A WGSL snippet that enables the directives of the given stage. - */ - getDirectives(shaderStage: string): string; - /** - * Enables the 'subgroups' directive. - */ - enableSubGroups(): void; - /** - * Enables the 'subgroups-f16' directive. - */ - enableSubgroupsF16(): void; - /** - * Enables the 'clip_distances' directive. - */ - enableClipDistances(): void; - /** - * Enables the 'f16' directive. - */ - enableShaderF16(): void; - /** - * Enables the 'dual_source_blending' directive. - */ - enableDualSourceBlending(): void; - /** - * Enables hardware clipping. - * - * @param {string} planeCount - The clipping plane count. - */ - enableHardwareClipping(planeCount: string): void; - /** - * Returns the builtins of the given shader stage as a WGSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} A WGSL snippet that represents the builtins of the given stage. - */ - getBuiltins(shaderStage: string): string; - /** - * This method should be used when a new scoped buffer is used in context of - * compute shaders. It adds the array to the internal data structure which is - * later used to generate the respective WGSL. - * - * @param {string} name - The array name. - * @param {string} scope - The scope. - * @param {string} bufferType - The buffer type. - * @param {string} bufferCount - The buffer count. - * @return {string} The array name. - */ - getScopedArray(name: string, scope: string, bufferType: string, bufferCount: string): string; - /** - * Returns the scoped arrays of the given shader stage as a WGSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string|undefined} The WGSL snippet that defines the scoped arrays. - * Returns `undefined` when used in the vertex or fragment stage. - */ - getScopedArrays(shaderStage: string): string | undefined; - /** - * Returns the shader attributes of the given shader stage as a WGSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The WGSL snippet that defines the shader attributes. - */ - getAttributes(shaderStage: string): string; - /** - * Returns the members of the given struct type node as a WGSL string. - * - * @param {StructTypeNode} struct - The struct type node. - * @return {string} The WGSL snippet that defines the struct members. - */ - getStructMembers(struct: StructTypeNode): string; - /** - * Returns the structs of the given shader stage as a WGSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The WGSL snippet that defines the structs. - */ - getStructs(shaderStage: string): string; - /** - * Returns a WGSL string representing a variable. - * - * @param {string} type - The variable's type. - * @param {string} name - The variable's name. - * @param {?number} [count=null] - The array length. - * @param {string} [qualifier=''] - The variable's qualifier. - * @return {string} The WGSL snippet that defines a variable. - */ - getVar(type: string, name: string, count?: number | null, qualifier?: string): string; - /** - * Returns the variables of the given shader stage as a WGSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The WGSL snippet that defines the variables. - */ - getVars(shaderStage: string, global?: boolean): string; - /** - * Returns the varyings of the given shader stage as a WGSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The WGSL snippet that defines the varyings. - */ - getVaryings(shaderStage: string): string; - isCustomStruct(nodeUniform: any): any; - /** - * Returns the uniforms of the given shader stage as a WGSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The WGSL snippet that defines the uniforms. - */ - getUniforms(shaderStage: string): string; - /** - * Returns the native shader method name for a given generic name. - * - * @param {string} method - The method name to resolve. - * @param {?string} [output=null] - An optional output. - * @return {string} The resolved WGSL method name. - */ - getMethod(method: string, output?: string | null): string; - /** - * Returns the bitcast method name for a given input and outputType. - * - * @param {string} type - The output type to bitcast to. - * @return {string} The resolved WGSL bitcast invocation. - */ - getBitcastMethod(type: string): string; - /** - * Returns the float packing method name for a given numeric encoding. - * - * @param {string} encoding - The numeric encoding that describes how the float values are mapped to the integer range. - * @returns {string} The resolve WGSL float packing method name. - */ - getFloatPackingMethod(encoding: string): string; - /** - * Returns the float unpacking method name for a given numeric encoding. - * - * @param {string} encoding - The numeric encoding that describes how the integer values are mapped to the float range. - * @returns {string} The resolve WGSL float unpacking method name. - */ - getFloatUnpackingMethod(encoding: string): string; - /** - * Returns the native snippet for a ternary operation. - * - * @param {string} condSnippet - The condition determining which expression gets resolved. - * @param {string} ifSnippet - The expression to resolve to if the condition is true. - * @param {string} elseSnippet - The expression to resolve to if the condition is false. - * @return {string} The resolved method name. - */ - getTernary(condSnippet: string, ifSnippet: string, elseSnippet: string): string; - /** - * Whether the requested feature is available or not. - * - * @param {string} name - The requested feature. - * @return {boolean} Whether the requested feature is supported or not. - */ - isAvailable(name: string): boolean; - /** - * Returns the native shader method name for a given generic name. - * - * @private - * @param {string} method - The method name to resolve. - * @return {string} The resolved WGSL method name. - */ - private _getWGSLMethod; - /** - * Includes the given method name into the current - * function node. - * - * @private - * @param {string} name - The method name to include. - * @return {CodeNode} The respective code node. - */ - private _include; - /** - * Returns a WGSL vertex shader based on the given shader data. - * - * @private - * @param {Object} shaderData - The shader data. - * @return {string} The vertex shader. - */ - private _getWGSLVertexCode; - /** - * Returns a WGSL fragment shader based on the given shader data. - * - * @private - * @param {Object} shaderData - The shader data. - * @return {string} The vertex shader. - */ - private _getWGSLFragmentCode; - /** - * Returns a WGSL compute shader based on the given shader data. - * - * @private - * @param {Object} shaderData - The shader data. - * @param {string} workgroupSize - The workgroup size. - * @return {string} The vertex shader. - */ - private _getWGSLComputeCode; - /** - * Returns a WGSL struct based on the given name and variables. - * - * @private - * @param {string} name - The struct name. - * @param {string} vars - The struct variables. - * @return {string} The WGSL snippet representing a struct. - */ - private _getWGSLStruct; - /** - * Returns a WGSL struct binding. - * - * @private - * @param {string} name - The struct name. - * @param {string} vars - The struct variables. - * @param {string} access - The access. - * @param {number} [binding=0] - The binding index. - * @param {number} [group=0] - The group index. - * @return {string} The WGSL snippet representing a struct binding. - */ - private _getWGSLStructBinding; -} -/** - * This module is used to represent render bundles inside the renderer - * for further processing. - * - * @private - */ -declare class RenderBundle { - /** - * Constructs a new bundle group. - * - * @param {BundleGroup} bundleGroup - The bundle group. - * @param {Camera} camera - The camera the bundle group is rendered with. - * @param {RenderContext} renderContext - The render context the bundle is rendered with. - */ - constructor(bundleGroup: BundleGroup, camera: Camera, renderContext: RenderContext); - bundleGroup: BundleGroup; - camera: Camera; - renderContext: RenderContext; -} -/** - * Represents an element of a 'workgroup' scoped buffer. - * - * @augments ArrayElementNode - */ -declare class WorkgroupInfoElementNode extends ArrayElementNode { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWorkgroupInfoElementNode: boolean; - generate(builder: any, output: any): any; -} -/** - * The XR manager is built on top of the WebXR Device API to - * manage XR sessions with renderer backends. - * - * @augments EventDispatcher - */ -declare class XRManager extends EventDispatcher { - /** - * Constructs a new XR manager. - * - * @param {Renderer} renderer - The renderer. - * @param {boolean} [multiview=false] - Enables multiview if the device supports it. - */ - constructor(renderer: Renderer, multiview?: boolean); - /** - * This flag globally enables XR rendering. - * - * @type {boolean} - * @default false - */ - enabled: boolean; - /** - * Whether the XR device is currently presenting or not. - * - * @type {boolean} - * @default false - * @readonly - */ - readonly isPresenting: boolean; - /** - * Whether the XR camera should automatically be updated or not. - * - * @type {boolean} - * @default true - */ - cameraAutoUpdate: boolean; - /** - * The renderer. - * - * @private - * @type {Renderer} - */ - private _renderer; - /** - * Represents the camera for the left eye. - * - * @private - * @type {PerspectiveCamera} - */ - private _cameraL; - /** - * Represents the camera for the right eye. - * - * @private - * @type {PerspectiveCamera} - */ - private _cameraR; - /** - * A list of cameras used for rendering the XR views. - * - * @private - * @type {Array} - */ - private _cameras; - /** - * The main XR camera. - * - * @private - * @type {ArrayCamera} - */ - private _cameraXR; - /** - * The current near value of the XR camera. - * - * @private - * @type {?number} - * @default null - */ - private _currentDepthNear; - /** - * The current far value of the XR camera. - * - * @private - * @type {?number} - * @default null - */ - private _currentDepthFar; - /** - * A list of WebXR controllers requested by the application. - * - * @private - * @type {Array} - */ - private _controllers; - /** - * A list of XR input source. Each input source belongs to - * an instance of WebXRController. - * - * @private - * @type {Array} - */ - private _controllerInputSources; - /** - * The XR render target that represents the rendering destination - * during an active XR session. - * - * @private - * @type {?RenderTarget} - * @default null - */ - private _xrRenderTarget; - /** - * An array holding all the non-projection layers - * - * @private - * @type {Array} - * @default [] - */ - private _layers; - /** - * Whether the XR session uses layers. - * - * @private - * @type {boolean} - * @default false - */ - private _sessionUsesLayers; - /** - * Whether the device supports binding gl objects. - * - * @private - * @type {boolean} - * @readonly - */ - private readonly _supportsGlBinding; - _supportsWebGPUBinding: boolean; - /** - * Helper function to create native WebXR Layer. - * - * @private - * @type {Function} - */ - private _createXRLayer; - /** - * The current WebGL context. - * - * @private - * @type {?WebGL2RenderingContext} - * @default null - */ - private _gl; - /** - * The current animation context. - * - * @private - * @type {?Window} - * @default null - */ - private _currentAnimationContext; - /** - * The current animation loop. - * - * @private - * @type {?Function} - * @default null - */ - private _currentAnimationLoop; - /** - * The current pixel ratio. - * - * @private - * @type {?number} - * @default null - */ - private _currentPixelRatio; - /** - * The renderer's sample count before XR temporarily overrides it. - * - * @private - * @type {?number} - * @default null - */ - private _currentSamples; - /** - * The current size of the renderer's canvas - * in logical pixel unit. - * - * @private - * @type {Vector2} - */ - private _currentSize; - /** - * The default event listener for handling events inside a XR session. - * - * @private - * @type {Function} - */ - private _onSessionEvent; - /** - * The event listener for handling the end of a XR session. - * - * @private - * @type {Function} - */ - private _onSessionEnd; - /** - * The event listener for handling the `inputsourceschange` event. - * - * @private - * @type {Function} - */ - private _onInputSourcesChange; - /** - * The animation loop which is used as a replacement for the default - * animation loop of the application. It is only used when a XR session - * is active. - * - * @private - * @type {Function} - */ - private _onAnimationFrame; - /** - * The current XR reference space. - * - * @private - * @type {?XRReferenceSpace} - * @default null - */ - private _referenceSpace; - /** - * The current XR reference space type. - * - * @private - * @type {XRReferenceSpaceType} - * @default 'local-floor' - */ - private _referenceSpaceType; - /** - * A custom reference space defined by the application. - * - * @private - * @type {?XRReferenceSpace} - * @default null - */ - private _customReferenceSpace; - /** - * The framebuffer scale factor. - * - * @private - * @type {number} - * @default 1 - */ - private _framebufferScaleFactor; - /** - * The foveation factor. - * - * @private - * @type {number} - * @default 1 - */ - private _foveation; - /** - * A reference to the current XR session. - * - * @private - * @type {?XRSession} - * @default null - */ - private _session; - /** - * A reference to the current XR base layer. - * - * @private - * @type {?XRWebGLLayer} - * @default null - */ - private _glBaseLayer; - /** - * A reference to the current XR binding. - * - * @private - * @type {?XRWebGLBinding} - * @default null - */ - private _glBinding; - /** - * A reference to the current XR WebGPU binding. - * - * @private - * @type {?XRGPUBinding} - * @default null - */ - private _webgpuBinding; - /** - * A reference to the current XR projection layer. - * - * @private - * @type {?XRProjectionLayer} - * @default null - */ - private _glProjLayer; - /** - * A reference to the current XR frame. - * - * @private - * @type {?XRFrame} - * @default null - */ - private _xrFrame; - /** - * Whether the browser supports the APIs necessary to use XRProjectionLayers. - * - * Note: this does not represent XRSession explicitly requesting - * `'layers'` as a feature - see `_sessionUsesLayers` and #30112 - * - * @private - * @type {boolean} - * @readonly - */ - private readonly _supportsLayers; - /** - * Whether the usage of multiview has been requested by the application or not. - * - * @private - * @type {boolean} - * @default false - * @readonly - */ - private readonly _useMultiviewIfPossible; - /** - * Whether the usage of multiview is actually enabled. This flag only evaluates to `true` - * if multiview has been requested by the application and the `OVR_multiview2` is available. - * - * @private - * @type {boolean} - * @readonly - */ - private readonly _useMultiview; - /** - * Returns an instance of `THREE.Group` that represents the transformation - * of a XR controller in target ray space. The requested controller is defined - * by the given index. - * - * @param {number} index - The index of the XR controller. - * @return {Group} A group that represents the controller's transformation. - */ - getController(index: number): Group; - /** - * Returns an instance of `THREE.Group` that represents the transformation - * of a XR controller in grip space. The requested controller is defined - * by the given index. - * - * @param {number} index - The index of the XR controller. - * @return {Group} A group that represents the controller's transformation. - */ - getControllerGrip(index: number): Group; - /** - * Returns an instance of `THREE.Group` that represents the transformation - * of a XR controller in hand space. The requested controller is defined - * by the given index. - * - * @param {number} index - The index of the XR controller. - * @return {Group} A group that represents the controller's transformation. - */ - getHand(index: number): Group; - /** - * Returns the foveation value. - * - * @return {number|undefined} The foveation value. - */ - getFoveation(): number | undefined; - /** - * Sets the foveation value. - * - * @param {number} foveation - A number in the range `[0,1]` where `0` means no foveation (full resolution) - * and `1` means maximum foveation (the edges render at lower resolution). - */ - setFoveation(foveation: number): void; - /** - * Returns the framebuffer scale factor. - * - * @return {number} The framebuffer scale factor. - */ - getFramebufferScaleFactor(): number; - /** - * Sets the framebuffer scale factor. - * - * This method can not be used during a XR session. - * - * @param {number} factor - The framebuffer scale factor. - */ - setFramebufferScaleFactor(factor: number): void; - /** - * Returns the reference space type. - * - * @return {XRReferenceSpaceType} The reference space type. - */ - getReferenceSpaceType(): XRReferenceSpaceType; - /** - * Sets the reference space type. - * - * This method can not be used during a XR session. - * - * @param {XRReferenceSpaceType} type - The reference space type. - */ - setReferenceSpaceType(type: XRReferenceSpaceType): void; - /** - * Returns the XR reference space. - * - * @return {XRReferenceSpace} The XR reference space. - */ - getReferenceSpace(): XRReferenceSpace; - /** - * Sets a custom XR reference space. - * - * @param {XRReferenceSpace} space - The XR reference space. - */ - setReferenceSpace(space: XRReferenceSpace): void; - /** - * Returns the XR camera. - * - * @return {ArrayCamera} The XR camera. - */ - getCamera(): ArrayCamera; - /** - * Returns the environment blend mode from the current XR session. - * - * @return {'opaque'|'additive'|'alpha-blend'|undefined} The environment blend mode. Returns `undefined` when used outside of a XR session. - */ - getEnvironmentBlendMode(): "opaque" | "additive" | "alpha-blend" | undefined; - /** - * Returns the current base layer. - * - * This is an `XRProjectionLayer` when the targeted XR device supports the - * WebXR Layers API, or an `XRWebGLLayer` otherwise. - * - * @return {?(XRWebGLLayer|XRProjectionLayer)} The XR base layer. - */ - getBaseLayer(): (XRWebGLLayer | XRProjectionLayer) | null; - /** - * Returns the current XR binding. - * - * Creates a new binding if needed and the browser is - * capable of doing so. - * - * @return {?XRWebGLBinding} The XR binding. Returns `null` if one cannot be created. - */ - getBinding(): XRWebGLBinding | null; - /** - * Applies WebXR fixed foveation to the internal post-processing render target - * used by the first XR render pass before compositing into a projection layer. - * - * Browser-side `XRWebGLBinding.foveateBoundTexture()` failures are treated as - * non-fatal so they do not interrupt rendering. - * - * @param {RenderTarget} renderTarget - The internal render target. - */ - foveateBoundTexture(renderTarget: RenderTarget): void; - /** - * Returns the current XR WebGPU binding. - * - * Creates a new binding if needed and the browser is - * capable of doing so. - * - * @return {?XRGPUBinding} The XR WebGPU binding. Returns `null` if one cannot be created. - */ - getWebGPUBinding(): XRGPUBinding | null; - /** - * Returns whether the current XR session is using WebGPU. - * - * @private - * @return {boolean} Whether the current session uses the WebGPU backend and the `webgpu` session feature. - */ - private _isWebGPUSession; - /** - * Validates the current WebGPU XR session requirements. - * - * @private - */ - private _validateWebGPUSession; - /** - * Initializes the WebGPU XR projection layer and render target. - * - * @private - * @async - * @param {XRSession} session - The XR session. - * @return {Promise} - */ - private _initWebGPUSession; - /** - * Releases WebGPU XR resources associated with the current session. - * - * @private - */ - private _disposeWebGPUSession; - /** - * Collects WebGPU XR sub-image data for the current frame. - * - * @private - * @param {Array} views - The XR views for the current pose. - * @return {{colorTexture:?GPUTexture, viewDescriptors:Array, viewports:Array}} The WebGPU XR view data. - */ - private _getWebGPUViewData; - /** - * Returns the current XR frame. - * - * @return {?XRFrame} The XR frame. Returns `null` when used outside a XR session. - */ - getFrame(): XRFrame | null; - /** - * Returns `true` if the engine renders to a multiview target. - * - * @return {boolean} Whether the engine renders to a multiview render target or not. - */ - useMultiview(): boolean; - /** - * This method can be used in XR applications to create a quadratic layer that presents a separate - * rendered scene. - * - * @param {number} width - The width of the layer plane in world units. - * @param {number} height - The height of the layer plane in world units. - * @param {Vector3} translation - The position/translation of the layer plane in world units. - * @param {Quaternion} quaternion - The orientation of the layer plane expressed as a quaternion. - * @param {number} pixelwidth - The width of the layer's render target in pixels. - * @param {number} pixelheight - The height of the layer's render target in pixels. - * @param {Function} rendercall - A callback function that renders the layer. Similar to code in - * the default animation loop, this method can be used to update/transform 3D object in the layer's scene. - * @param {Object} [attributes={}] - Allows to configure the layer's render target. - * @return {Mesh} A mesh representing the quadratic XR layer. This mesh should be added to the XR scene. - */ - createQuadLayer(width: number, height: number, translation: Vector3, quaternion: Quaternion, pixelwidth: number, pixelheight: number, rendercall: Function, attributes?: Object): Mesh; - /** - * This method can be used in XR applications to create a cylindrical layer that presents a separate - * rendered scene. - * - * @param {number} radius - The radius of the cylinder in world units. - * @param {number} centralAngle - The central angle of the cylinder in radians. - * @param {number} aspectratio - The aspect ratio. - * @param {Vector3} translation - The position/translation of the layer plane in world units. - * @param {Quaternion} quaternion - The orientation of the layer plane expressed as a quaternion. - * @param {number} pixelwidth - The width of the layer's render target in pixels. - * @param {number} pixelheight - The height of the layer's render target in pixels. - * @param {Function} rendercall - A callback function that renders the layer. Similar to code in - * the default animation loop, this method can be used to update/transform 3D object in the layer's scene. - * @param {Object} [attributes={}] - Allows to configure the layer's render target. - * @return {Mesh} A mesh representing the cylindrical XR layer. This mesh should be added to the XR scene. - */ - createCylinderLayer(radius: number, centralAngle: number, aspectratio: number, translation: Vector3, quaternion: Quaternion, pixelwidth: number, pixelheight: number, rendercall: Function, attributes?: Object): Mesh; - /** - * Renders the XR layers that have been previously added to the scene. - * - * This method is usually called in your animation loop before rendering - * the actual scene via `renderer.render( scene, camera );`. - */ - renderLayers(): void; - /** - * Returns the current XR session. - * - * @return {?XRSession} The XR session. Returns `null` when used outside a XR session. - */ - getSession(): XRSession | null; - /** - * After a XR session has been requested usually with one of the `*Button` modules, it - * is injected into the renderer with this method. This method triggers the start of - * the actual XR rendering. - * - * @async - * @param {XRSession} session - The XR session to set. - * @return {Promise} A Promise that resolves when the session has been set. - */ - setSession(session: XRSession): Promise; - /** - * This method is called by the renderer per frame and updates the XR camera - * and it sub cameras based on the given camera. The given camera is the "user" - * camera created on application level and used for non-XR rendering. - * - * @param {PerspectiveCamera} camera - The camera. - */ - updateCamera(camera: PerspectiveCamera): void; - /** - * Returns a WebXR controller for the given controller index. - * - * @private - * @param {number} index - The controller index. - * @return {WebXRController} The XR controller. - */ - private _getController; -} -/** - * This class represents a uniform buffer binding but with - * an API that allows to maintain individual uniform objects. - * - * @private - * @augments UniformBuffer - */ -declare class UniformsGroup extends UniformBuffer { - /** - * Constructs a new uniforms group. - * - * @param {string} name - The group's name. - */ - constructor(name: string); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isUniformsGroup: boolean; - /** - * An array with the raw uniform values. - * - * @private - * @type {?Array} - * @default null - */ - private _values; - /** - * An array of uniform objects. - * - * The order of uniforms in this array must match the order of uniforms in the shader. - * - * @type {Array} - */ - uniforms: Array; - /** - * A cache for the uniform update ranges. - * - * @private - * @type {Map} - */ - private _updateRangeCache; - /** - * Uniform indices whose range has already been pushed into `updateRanges` - * during the current update cycle. Reset on `clearUpdateRanges()`. - * - * @private - * @type {Set} - */ - private _addedIndices; - /** - * Adds a uniform's update range to this buffer. - * - * @param {Uniform} uniform - The uniform. - */ - addUniformUpdateRange(uniform: Uniform): void; - /** - * Adds a uniform to this group. - * - * @param {Uniform} uniform - The uniform to add. - * @return {UniformsGroup} A reference to this group. - */ - addUniform(uniform: Uniform): UniformsGroup; - /** - * Removes a uniform from this group. - * - * @param {Uniform} uniform - The uniform to remove. - * @return {UniformsGroup} A reference to this group. - */ - removeUniform(uniform: Uniform): UniformsGroup; - /** - * An array with the raw uniform values. - * - * @type {Array} - */ - get values(): Array; - /** - * Updates a given uniform by calling an update method matching - * the uniforms type. - * - * @param {Uniform} uniform - The uniform to update. - * @return {boolean} Whether the uniform has been updated or not. - */ - updateByType(uniform: Uniform): boolean; - /** - * Updates a given Number uniform. - * - * @param {NumberUniform} uniform - The Number uniform. - * @return {boolean} Whether the uniform has been updated or not. - */ - updateNumber(uniform: NumberUniform): boolean; - /** - * Updates a given Vector2 uniform. - * - * @param {Vector2Uniform} uniform - The Vector2 uniform. - * @return {boolean} Whether the uniform has been updated or not. - */ - updateVector2(uniform: Vector2Uniform): boolean; - /** - * Updates a given Vector3 uniform. - * - * @param {Vector3Uniform} uniform - The Vector3 uniform. - * @return {boolean} Whether the uniform has been updated or not. - */ - updateVector3(uniform: Vector3Uniform): boolean; - /** - * Updates a given Vector4 uniform. - * - * @param {Vector4Uniform} uniform - The Vector4 uniform. - * @return {boolean} Whether the uniform has been updated or not. - */ - updateVector4(uniform: Vector4Uniform): boolean; - /** - * Updates a given Color uniform. - * - * @param {ColorUniform} uniform - The Color uniform. - * @return {boolean} Whether the uniform has been updated or not. - */ - updateColor(uniform: ColorUniform): boolean; - /** - * Updates a given Matrix3 uniform. - * - * @param {Matrix3Uniform} uniform - The Matrix3 uniform. - * @return {boolean} Whether the uniform has been updated or not. - */ - updateMatrix3(uniform: Matrix3Uniform): boolean; - /** - * Updates a given Matrix4 uniform. - * - * @param {Matrix4Uniform} uniform - The Matrix4 uniform. - * @return {boolean} Whether the uniform has been updated or not. - */ - updateMatrix4(uniform: Matrix4Uniform): boolean; - /** - * Returns a typed array that matches the given data type. - * - * @private - * @param {string} type - The data type. - * @return {TypedArray} The typed array. - */ - private _getBufferForType; -} -/** - * A binding represents the connection between a resource (like a texture, sampler - * or uniform buffer) and the resource definition in a shader stage. - * - * This module is an abstract base class for all concrete bindings types. - * - * @abstract - * @private - */ -declare class Binding { - /** - * Constructs a new binding. - * - * @param {string} [name=''] - The binding's name. - */ - constructor(name?: string); - /** - * The binding's name. - * - * @type {string} - */ - name: string; - /** - * A bitmask that defines in what shader stages the - * binding's resource is accessible. - * - * @type {number} - */ - visibility: number; - /** - * Makes sure binding's resource is visible for the given shader stage. - * - * @param {number} visibility - The shader stage. - */ - setVisibility(visibility: number): void; - /** - * The shader stages in which the binding's resource is visible. - * - * @return {number} The visibility bitmask. - */ - getVisibility(): number; - /** - * Clones the binding. - * - * @return {Binding} The cloned binding. - */ - clone(): Binding; -} -/** - * This module represents the state of a node builder after it was - * used to build the nodes for a render object. The state holds the - * results of the build for further processing in the renderer. - * - * Render objects with identical cache keys share the same node builder state. - * - * @private - */ -declare class NodeBuilderState { - /** - * Constructs a new node builder state. - * - * @param {string} vertexShader - The native vertex shader code. - * @param {string} fragmentShader - The native fragment shader code. - * @param {string} computeShader - The native compute shader code. - * @param {Array} nodeAttributes - An array of node attributes. - * @param {Array} bindings - An array of bind groups. - * @param {Array} updateNodes - An array of nodes that implement their `update()` method. - * @param {Array} updateBeforeNodes - An array of nodes that implement their `updateBefore()` method. - * @param {Array} updateAfterNodes - An array of nodes that implement their `updateAfter()` method. - * @param {NodeMaterialObserver} observer - A node material observer. - * @param {Array} transforms - An array with transform attribute objects. Only relevant when using compute shaders with WebGL 2. - */ - constructor(vertexShader: string, fragmentShader: string, computeShader: string, nodeAttributes: Array, bindings: Array, updateNodes: Array, updateBeforeNodes: Array, updateAfterNodes: Array, observer: NodeMaterialObserver, transforms?: Array); - /** - * The native vertex shader code. - * - * @type {string} - */ - vertexShader: string; - /** - * The native fragment shader code. - * - * @type {string} - */ - fragmentShader: string; - /** - * The native compute shader code. - * - * @type {string} - */ - computeShader: string; - /** - * An array with transform attribute objects. - * Only relevant when using compute shaders with WebGL 2. - * - * @type {Array} - */ - transforms: Array; - /** - * An array of node attributes representing - * the attributes of the shaders. - * - * @type {Array} - */ - nodeAttributes: Array; - /** - * An array of bind groups representing the uniform or storage - * buffers, texture or samplers of the shader. - * - * @type {Array} - */ - bindings: Array; - /** - * An array of nodes that implement their `update()` method. - * - * @type {Array} - */ - updateNodes: Array; - /** - * An array of nodes that implement their `updateBefore()` method. - * - * @type {Array} - */ - updateBeforeNodes: Array; - /** - * An array of nodes that implement their `updateAfter()` method. - * - * @type {Array} - */ - updateAfterNodes: Array; - /** - * A node material observer. - * - * @type {NodeMaterialObserver} - */ - observer: NodeMaterialObserver; - /** - * How often this state is used by render objects. - * - * @type {number} - */ - usedTimes: number; - /** - * This method is used to create a array of bind groups based - * on the existing bind groups of this state. Shared groups are - * not cloned. - * - * @return {Array} A array of bind groups. - */ - createBindings(): Array; -} -/** - * This renderer module manages node-related objects and is the - * primary interface between the renderer and the node system. - * - * @private - * @augments DataMap - */ -declare class NodeManager extends DataMap { - /** - * Constructs a new nodes management component. - * - * @param {Renderer} renderer - The renderer. - * @param {Backend} backend - The renderer's backend. - */ - constructor(renderer: Renderer, backend: Backend); - /** - * The renderer. - * - * @type {Renderer} - */ - renderer: Renderer; - /** - * The renderer's backend. - * - * @type {Backend} - */ - backend: Backend; - /** - * The node frame. - * - * @type {Renderer} - */ - nodeFrame: Renderer; - /** - * A cache for managing node builder states. - * - * @type {Map} - */ - nodeBuilderCache: Map; - /** - * A cache for managing data cache key data. - * - * @type {ChainMap} - */ - callHashCache: ChainMap; - /** - * A cache for managing node uniforms group data. - * - * @type {ChainMap} - */ - groupsData: ChainMap; - /** - * Queue for pending async builds to limit concurrent compilation. - * - * @private - * @type {Array} - */ - private _buildQueue; - /** - * Whether an async build is currently in progress. - * - * @private - * @type {boolean} - */ - private _buildInProgress; - /** - * A cache for managing node objects of - * scene properties like fog or environments. - * - * @type {Object} - */ - cacheLib: { - [x: string]: WeakMap; - }; - /** - * Returns `true` if the given node uniforms group must be updated or not. - * - * @param {NodeUniformsGroup} nodeUniformsGroup - The node uniforms group. - * @return {boolean} Whether the node uniforms group requires an update or not. - */ - updateGroup(nodeUniformsGroup: NodeUniformsGroup): boolean; - /** - * Returns the cache key for the given render object. - * - * @param {RenderObject} renderObject - The render object. - * @return {number} The cache key. - */ - getForRenderCacheKey(renderObject: RenderObject): number; - /** - * Creates a node builder configured for the given render object and material. - * - * @private - * @param {RenderObject} renderObject - The render object. - * @param {Material} material - The material to use. - * @return {NodeBuilder} The configured node builder. - */ - private _createNodeBuilder; - /** - * Returns a node builder state for the given render object. - * - * @param {RenderObject} renderObject - The render object. - * @param {boolean} [useAsync=false] - Whether to use async build with yielding. - * @return {NodeBuilderState|Promise} The node builder state (or Promise if async). - */ - getForRender(renderObject: RenderObject, useAsync?: boolean): NodeBuilderState | Promise; - /** - * Async version of getForRender() that yields to main thread during build. - * Use this in compileAsync() to prevent blocking the main thread. - * - * @param {RenderObject} renderObject - The render object. - * @return {Promise} A promise that resolves to the node builder state. - */ - getForRenderAsync(renderObject: RenderObject): Promise; - /** - * Returns nodeBuilderState if ready, null if pending async build. - * Queues async build on first call for cache miss. - * Use this in render() path to enable non-blocking compilation. - * - * @param {RenderObject} renderObject - The render object. - * @return {?NodeBuilderState} The node builder state, or null if still building. - */ - getForRenderDeferred(renderObject: RenderObject): NodeBuilderState | null; - /** - * Processes the build queue one item at a time. - * This ensures builds don't all run simultaneously and freeze the main thread. - * - * @private - */ - private _processBuildQueue; - /** - * Deletes the given object from the internal data map - * - * @param {any} object - The object to delete. - * @return {?Object} The deleted dictionary. - */ - delete(object: any): Object | null; - /** - * Returns a node builder state for the given compute node. - * - * @param {Node} computeNode - The compute node. - * @return {NodeBuilderState} The node builder state. - */ - getForCompute(computeNode: Node): NodeBuilderState; - /** - * Creates a node builder state for the given node builder. - * - * @private - * @param {NodeBuilder} nodeBuilder - The node builder. - * @return {NodeBuilderState} The node builder state. - */ - private _createNodeBuilderState; - /** - * Returns an environment node for the current configured - * scene environment. - * - * @param {Scene} scene - The scene. - * @return {Node} A node representing the current scene environment. - */ - getEnvironmentNode(scene: Scene): Node; - /** - * Returns a background node for the current configured - * scene background. - * - * @param {Scene} scene - The scene. - * @return {Node} A node representing the current scene background. - */ - getBackgroundNode(scene: Scene): Node; - /** - * Returns a fog node for the current configured scene fog. - * - * @param {Scene} scene - The scene. - * @return {Node} A node representing the current scene fog. - */ - getFogNode(scene: Scene): Node; - /** - * Returns a cache key for the given scene and lights node. - * This key is used by `RenderObject` as a part of the dynamic - * cache key (a key that must be checked every time the render - * objects is drawn). - * - * @param {Scene} scene - The scene. - * @param {LightsNode} lightsNode - The lights node. - * @return {number} The cache key. - */ - getCacheKey(scene: Scene, lightsNode: LightsNode): number; - /** - * A boolean that indicates whether tone mapping should be enabled - * or not. - * - * @type {boolean} - */ - get isToneMappingState(): boolean; - /** - * If a scene background is configured, this method makes sure to - * represent the background with a corresponding node-based implementation. - * - * @param {Scene} scene - The scene. - */ - updateBackground(scene: Scene): void; - /** - * This method is part of the caching of nodes which are used to represents the - * scene's background, fog or environment. - * - * @param {string} type - The type of object to cache. - * @param {Object} object - The object. - * @param {Function} callback - A callback that produces a node representation for the given object. - * @param {boolean} [forceUpdate=false] - Whether an update should be enforced or not. - * @return {Node} The node representation. - */ - getCacheNode(type: string, object: Object, callback: Function, forceUpdate?: boolean): Node; - /** - * If a scene fog is configured, this method makes sure to - * represent the fog with a corresponding node-based implementation. - * - * @param {Scene} scene - The scene. - */ - updateFog(scene: Scene): void; - /** - * If a scene environment is configured, this method makes sure to - * represent the environment with a corresponding node-based implementation. - * - * @param {Scene} scene - The scene. - */ - updateEnvironment(scene: Scene): void; - getNodeFrame(renderer?: Renderer, scene?: null, object?: null, camera?: null, material?: null): Renderer; - getNodeFrameForRender(renderObject: any): Renderer; - /** - * Returns the current output cache key. - * - * @return {string} The output cache key. - */ - getOutputCacheKey(): string; - /** - * Returns a node that represents the output configuration (tone mapping and - * color space) for the current target. - * - * @param {Texture} outputTarget - The output target. - * @return {Node} The output node. - */ - getOutputNode(outputTarget: Texture): Node; - /** - * Sets the output layer index for array texture output pass. - * This should be called before each layer render during the output pass. - * - * @param {number} index - The layer index. - */ - setOutputLayerIndex(index: number): void; - /** - * Triggers the call of `updateBefore()` methods - * for all nodes of the given render object. - * - * @param {RenderObject} renderObject - The render object. - */ - updateBefore(renderObject: RenderObject): void; - /** - * Triggers the call of `updateAfter()` methods - * for all nodes of the given render object. - * - * @param {RenderObject} renderObject - The render object. - */ - updateAfter(renderObject: RenderObject): void; - /** - * Triggers the call of `update()` methods - * for all nodes of the given compute node. - * - * @param {Node} computeNode - The compute node. - */ - updateForCompute(computeNode: Node): void; - /** - * Triggers the call of `update()` methods - * for all nodes of the given render object. - * - * @param {RenderObject} renderObject - The render object. - */ - updateForRender(renderObject: RenderObject): void; - /** - * Returns `true` if the given render object requires a refresh. - * - * @param {RenderObject} renderObject - The render object. - * @return {boolean} Whether the given render object requires a refresh or not. - */ - needsRefresh(renderObject: RenderObject): boolean; -} -/** - * This renderer module manages geometries. - * - * @private - * @augments DataMap - */ -declare class Geometries extends DataMap { - /** - * Constructs a new geometry management component. - * - * @param {Attributes} attributes - Renderer component for managing attributes. - * @param {Info} info - Renderer component for managing metrics and monitoring data. - */ - constructor(attributes: Attributes, info: Info); - /** - * Renderer component for managing attributes. - * - * @type {Attributes} - */ - attributes: Attributes; - /** - * Renderer component for managing metrics and monitoring data. - * - * @type {Info} - */ - info: Info; - /** - * Weak Map for managing attributes for wireframe rendering. - * - * @type {WeakMap} - */ - wireframes: WeakMap; - /** - * This Weak Map is used to make sure buffer attributes are - * updated only once per render call. - * - * @type {WeakMap} - */ - attributeCall: WeakMap; - /** - * Stores the event listeners attached to geometries. - * - * @private - * @type {Map} - */ - private _geometryDisposeListeners; - /** - * Returns `true` if the given render object has an initialized geometry. - * - * @param {RenderObject} renderObject - The render object. - * @return {boolean} Whether if the given render object has an initialized geometry or not. - */ - has(renderObject: RenderObject): boolean; - /** - * Prepares the geometry of the given render object for rendering. - * - * @param {RenderObject} renderObject - The render object. - */ - updateForRender(renderObject: RenderObject): void; - /** - * Initializes the geometry of the given render object. - * - * @param {RenderObject} renderObject - The render object. - */ - initGeometry(renderObject: RenderObject): void; - /** - * Updates the geometry attributes of the given render object. - * - * @param {RenderObject} renderObject - The render object. - */ - updateAttributes(renderObject: RenderObject): void; - /** - * Updates the given attribute. - * - * @param {BufferAttribute} attribute - The attribute to update. - * @param {number} type - The attribute type. - */ - updateAttribute(attribute: BufferAttribute, type: number): void; - /** - * Returns the indirect buffer attribute of the given render object. - * - * @param {RenderObject} renderObject - The render object. - * @return {?BufferAttribute} The indirect attribute. `null` if no indirect drawing is used. - */ - getIndirect(renderObject: RenderObject): BufferAttribute | null; - /** - * Returns the byte offset into the indirect attribute buffer of the given render object. - * - * @param {RenderObject} renderObject - The render object. - * @return {number} The byte offset into the indirect attribute buffer. - */ - getIndirectOffset(renderObject: RenderObject): number; - /** - * Returns the index of the given render object's geometry. This is implemented - * in a method to return a wireframe index if necessary. - * - * @param {RenderObject} renderObject - The render object. - * @return {?BufferAttribute} The index. Returns `null` for non-indexed geometries. - */ - getIndex(renderObject: RenderObject): BufferAttribute | null; -} -/** - * Abstract base class of a timestamp query pool. - * - * @abstract - */ -declare class TimestampQueryPool { - /** - * Creates a new timestamp query pool. - * - * @param {number} [maxQueries=256] - Maximum number of queries this pool can hold. - */ - constructor(maxQueries?: number); - /** - * Whether to track timestamps or not. - * - * @type {boolean} - * @default true - */ - trackTimestamp: boolean; - /** - * Maximum number of queries this pool can hold. - * - * @type {number} - * @default 256 - */ - maxQueries: number; - /** - * How many queries allocated so far. - * - * @type {number} - * @default 0 - */ - currentQueryIndex: number; - /** - * Tracks offsets for different contexts. - * - * @type {Map} - */ - queryOffsets: Map; - /** - * Whether the pool has been disposed or not. - * - * @type {boolean} - * @default false - */ - isDisposed: boolean; - /** - * The total frame duration until the next update. - * - * @type {number} - * @default 0 - */ - lastValue: number; - /** - * Stores all timestamp frames. - * - * @type {Array} - */ - frames: Array; - /** - * This property is used to avoid multiple concurrent resolve operations. - * The WebGL backend uses it as a boolean flag. In context of WebGPU, it holds - * the promise of the current resolve operation. - * - * @type {boolean|Promise} - * @default false - */ - pendingResolve: boolean | Promise; - /** - * Stores the latest timestamp for each render context. - * - * @type {Map} - */ - timestamps: Map; - /** - * Returns all timestamp frames. - * - * @return {Array} The timestamp frames. - */ - getTimestampFrames(): Array; - /** - * Returns the timestamp for a given render context. - * - * @param {string} uid - A unique identifier for the render context. - * @return {?number} The timestamp, or undefined if not available. - */ - getTimestamp(uid: string): number | null; - /** - * Returns whether a timestamp is available for a given render context. - * - * @param {string} uid - A unique identifier for the render context. - * @return {boolean} True if a timestamp is available, false otherwise. - */ - hasTimestamp(uid: string): boolean; - /** - * Allocate queries for a specific uid. - * - * @abstract - * @param {string} uid - A unique identifier for the render context. - * @param {number} frameId - The current frame identifier. - * @returns {?number} - */ - allocateQueriesForContext(): number | null; - /** - * Resolve all timestamps and return data (or process them). - * - * @abstract - * @async - * @returns {Promise|number} The resolved timestamp value. - */ - resolveQueriesAsync(): Promise | number; - /** - * Dispose of the query pool. - * - * @abstract - */ - dispose(): void; -} -/** - * A four-component version of {@link Color} which is internally - * used by the renderer to represents clear color with alpha as - * one object. - * - * @private - * @augments Color - */ -declare class Color4 extends Color { - /** - * Constructs a new four-component color. - * You can also pass a single THREE.Color, hex or - * string argument to this constructor. - * - * @param {number|string} [r=1] - The red value. - * @param {number} [g=1] - The green value. - * @param {number} [b=1] - The blue value. - * @param {number} [a=1] - The alpha value. - */ - constructor(r?: number | string, g?: number, b?: number, a?: number); - a: number; - /** - * Overwrites the default to honor alpha. - * You can also pass a single THREE.Color, hex or - * string argument to this method. - * - * @param {number|string|Color} r - The red value. - * @param {number} [g] - The green value. - * @param {number} [b] - The blue value. - * @param {number} [a=1] - The alpha value. - * @return {Color4} A reference to this object. - */ - set(r: number | string | Color, g?: number, b?: number, a?: number): Color4; - /** - * Overwrites the default to honor alpha. - * - * @param {Color4} color - The color to copy. - * @return {Color4} A reference to this object. - */ - copy(color: Color4): Color4; - /** - * Overwrites the default to honor alpha. - * - * @return {Color4} The cloned color. - */ - clone(): Color4; -} -/** - * Abstract class for representing pipelines. - * - * @private - * @abstract - */ -declare class Pipeline { - /** - * Constructs a new pipeline. - * - * @param {string} cacheKey - The pipeline's cache key. - */ - constructor(cacheKey: string); - /** - * The pipeline's cache key. - * - * @type {string} - */ - cacheKey: string; - /** - * How often the pipeline is currently in use. - * - * @type {number} - * @default 0 - */ - usedTimes: number; -} -/** - * A WebGPU backend utility module used by {@link WebGPUTextureUtils}. - * - * @private - */ -declare class WebGPUTexturePassUtils extends DataMap { - /** - * Constructs a new utility object. - * - * @param {GPUDevice} device - The WebGPU device. - */ - constructor(device: GPUDevice); - /** - * The WebGPU device. - * - * @type {GPUDevice} - */ - device: GPUDevice; - /** - * The mipmap GPU sampler. - * - * @type {GPUSampler} - */ - mipmapSampler: GPUSampler; - /** - * The flipY GPU sampler. - * - * @type {GPUSampler} - */ - flipYSampler: GPUSampler; - flipUniformBuffer: GPUBuffer; - noFlipUniformBuffer: GPUBuffer; - /** - * A cache for GPU render pipelines used for copy/transfer passes. - * Every texture format and textureBindingViewDimension combo requires a unique pipeline. - * - * @type {Object} - */ - transferPipelines: { - [x: string]: GPURenderPipeline; - }; - mipmapShaderModule: GPUShaderModule; - /** - * Returns a render pipeline for the internal copy render pass. The pass - * requires a unique render pipeline for each texture format. - * - * @param {string} format - The GPU texture format - * @param {string?} textureBindingViewDimension - The GPU texture binding view dimension - * @return {GPURenderPipeline} The GPU render pipeline. - */ - getTransferPipeline(format: string, textureBindingViewDimension: string | null): GPURenderPipeline; - /** - * Flip the contents of the given GPU texture along its vertical axis. - * - * @param {GPUTexture} textureGPU - The GPU texture object. - * @param {Object} textureGPUDescriptor - The texture descriptor. - * @param {number} [baseArrayLayer=0] - The index of the first array layer accessible to the texture view. - */ - flipY(textureGPU: GPUTexture, textureGPUDescriptor: Object, baseArrayLayer?: number): void; - /** - * Generates mipmaps for the given GPU texture. - * - * @param {GPUTexture} textureGPU - The GPU texture object. - * @param {?GPUCommandEncoder} [encoder=null] - An optional command encoder used to generate mipmaps. - */ - generateMipmaps(textureGPU: GPUTexture, encoder?: GPUCommandEncoder | null): void; - /** - * Since multiple copy render passes are required to generate mipmaps, the passes - * are managed as render bundles to improve performance. - * - * @param {GPUTexture} textureGPU - The GPU texture object. - * @return {Array} An array of render bundles. - */ - _mipmapCreateBundles(textureGPU: GPUTexture): Array; - /** - * Executes the render bundles. - * - * @param {GPUCommandEncoder} commandEncoder - The GPU command encoder. - * @param {Array} passes - An array of render bundles. - */ - _mipmapRunBundles(commandEncoder: GPUCommandEncoder, passes: Array): void; -} -/** - * Represents a uniform buffer binding type. - * - * @private - * @augments Buffer - */ -declare class UniformBuffer extends Buffer { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isUniformBuffer: boolean; -} -/** - * Represents a Number uniform. - * - * @private - * @augments Uniform - */ -declare class NumberUniform extends Uniform { - /** - * Constructs a new Number uniform. - * - * @param {string} name - The uniform's name. - * @param {number} value - The uniform's value. - */ - constructor(name: string, value?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isNumberUniform: boolean; -} -/** - * Represents a Vector2 uniform. - * - * @private - * @augments Uniform - */ -declare class Vector2Uniform extends Uniform { - /** - * Constructs a new Number uniform. - * - * @param {string} name - The uniform's name. - * @param {Vector2} value - The uniform's value. - */ - constructor(name: string, value?: Vector2); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isVector2Uniform: boolean; -} -/** - * Represents a Vector3 uniform. - * - * @private - * @augments Uniform - */ -declare class Vector3Uniform extends Uniform { - /** - * Constructs a new Number uniform. - * - * @param {string} name - The uniform's name. - * @param {Vector3} value - The uniform's value. - */ - constructor(name: string, value?: Vector3); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isVector3Uniform: boolean; -} -/** - * Represents a Vector4 uniform. - * - * @private - * @augments Uniform - */ -declare class Vector4Uniform extends Uniform { - /** - * Constructs a new Number uniform. - * - * @param {string} name - The uniform's name. - * @param {Vector4} value - The uniform's value. - */ - constructor(name: string, value?: Vector4); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isVector4Uniform: boolean; -} -/** - * Represents a Color uniform. - * - * @private - * @augments Uniform - */ -declare class ColorUniform extends Uniform { - /** - * Constructs a new Number uniform. - * - * @param {string} name - The uniform's name. - * @param {Color} value - The uniform's value. - */ - constructor(name: string, value?: Color); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isColorUniform: boolean; -} -/** - * Represents a Matrix3 uniform. - * - * @private - * @augments Uniform - */ -declare class Matrix3Uniform extends Uniform { - /** - * Constructs a new Number uniform. - * - * @param {string} name - The uniform's name. - * @param {Matrix3} value - The uniform's value. - */ - constructor(name: string, value?: Matrix3); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMatrix3Uniform: boolean; -} -/** - * Represents a Matrix4 uniform. - * - * @private - * @augments Uniform - */ -declare class Matrix4Uniform extends Uniform { - /** - * Constructs a new Number uniform. - * - * @param {string} name - The uniform's name. - * @param {Matrix4} value - The uniform's value. - */ - constructor(name: string, value?: Matrix4); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMatrix4Uniform: boolean; -} -/** - * Data structure for the renderer. It is intended to manage - * data of objects in dictionaries. - * - * @private - */ -declare class DataMap { - /** - * `DataMap` internally uses a weak map - * to manage its data. - * - * @type {WeakMap} - */ - data: WeakMap; - /** - * Returns the dictionary for the given object. - * - * @param {Object} object - The object. - * @return {Object} The dictionary. - */ - get(object: Object): Object; - /** - * Deletes the dictionary for the given object. - * - * @param {Object} object - The object. - * @return {?Object} The deleted dictionary. - */ - delete(object: Object): Object | null; - /** - * Returns `true` if the given object has a dictionary defined. - * - * @param {Object} object - The object to test. - * @return {boolean} Whether a dictionary is defined or not. - */ - has(object: Object): boolean; - /** - * Frees internal resources. - */ - dispose(): void; -} -/** - * Data structure for the renderer. It allows defining values - * with chained, hierarchical keys. Keys are meant to be - * objects since the module internally works with Weak Maps - * for performance reasons. - * - * @private - */ -declare class ChainMap { - /** - * A map of Weak Maps by their key length. - * - * @type {Object} - */ - weakMaps: { - [x: number]: WeakMap; - }; - /** - * Returns the Weak Map for the given keys. - * - * @param {Array} keys - List of keys. - * @return {WeakMap} The weak map. - */ - _getWeakMap(keys: Array): WeakMap; - /** - * Returns the value for the given array of keys. - * - * @param {Array} keys - List of keys. - * @return {any} The value. Returns `undefined` if no value was found. - */ - get(keys: Array): any; - /** - * Sets the value for the given keys. - * - * @param {Array} keys - List of keys. - * @param {any} value - The value to set. - * @return {ChainMap} A reference to this Chain Map. - */ - set(keys: Array, value: any): ChainMap; - /** - * Deletes a value for the given keys. - * - * @param {Array} keys - The keys. - * @return {boolean} Returns `true` if the value has been removed successfully and `false` if the value has not be found. - */ - delete(keys: Array): boolean; -} -/** - * This renderer module manages geometry attributes. - * - * @private - * @augments DataMap - */ -declare class Attributes extends DataMap { - /** - * Constructs a new attribute management component. - * - * @param {Backend} backend - The renderer's backend. - * @param {Info} info - Renderer component for managing metrics and monitoring data. - */ - constructor(backend: Backend, info: Info); - /** - * The renderer's backend. - * - * @type {Backend} - */ - backend: Backend; - /** - * Renderer component for managing metrics and monitoring data. - * - * @type {Info} - */ - info: Info; - /** - * Deletes the data for the given attribute. - * - * @param {BufferAttribute} attribute - The attribute. - * @return {?Object} The deleted attribute data. - */ - delete(attribute: BufferAttribute): Object | null; - /** - * Updates the given attribute. This method creates attribute buffers - * for new attributes and updates data for existing ones. - * - * @param {BufferAttribute} attribute - The attribute to update. - * @param {number} type - The attribute type. - */ - update(attribute: BufferAttribute, type: number): void; - /** - * Utility method for handling interleaved buffer attributes correctly. - * To process them, their `InterleavedBuffer` is returned. - * - * @param {BufferAttribute} attribute - The attribute. - * @return {BufferAttribute|InterleavedBuffer} - */ - _getBufferAttribute(attribute: BufferAttribute): BufferAttribute | InterleavedBuffer; -} -export { ACESFilmicToneMapping, AddEquation, AddOperation, AdditiveBlending, AgXToneMapping, AlphaFormat, AlwaysCompare, AlwaysDepth, AlwaysStencilFunc, AmbientLight, ArrayCamera, BackSide, BasicShadowMap, BoxGeometry, BufferAttribute, BufferGeometry, ByteType, CineonToneMapping, ClampToEdgeWrapping, Color, ColorManagement, Compatibility, CubeCamera, CubeDepthTexture, CubeReflectionMapping, CubeRefractionMapping, CubeTexture, CubeUVReflectionMapping, CullFaceBack, CullFaceFront, CullFaceNone, CustomBlending, CylinderGeometry, DataArrayTexture, DataTexture, DecrementStencilOp, DecrementWrapStencilOp, DepthFormat, DepthStencilFormat, DepthTexture, DirectionalLight, DoubleSide, DstAlphaFactor, DstColorFactor, DynamicDrawUsage, EqualCompare, EqualDepth, EqualStencilFunc, EquirectangularReflectionMapping, EquirectangularRefractionMapping, EventDispatcher, FileLoader, Float16BufferAttribute, Float32BufferAttribute, FloatType, FramebufferTexture, FrontSide, Frustum, FrustumArray, GreaterCompare, GreaterDepth, GreaterEqualCompare, GreaterEqualDepth, GreaterEqualStencilFunc, GreaterStencilFunc, Group, HalfFloatType, HemisphereLight, IncrementStencilOp, IncrementWrapStencilOp, InstancedBufferAttribute, InstancedInterleavedBuffer, IntType, InterleavedBuffer, InterleavedBufferAttribute, InvertStencilOp, KeepStencilOp, LessCompare, LessDepth, LessEqualCompare, LessEqualDepth, LessEqualStencilFunc, LessStencilFunc, LightProbe, LineBasicMaterial, LineDashedMaterial, LinearFilter, LinearMipMapLinearFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, LinearSRGBColorSpace, LinearToneMapping, LinearTransfer, Loader, Material, MaterialBlending, MaterialLoader, MathUtils, Matrix2, Matrix3, Matrix4, MaxEquation, Mesh, MeshBasicMaterial, MeshLambertMaterial, MeshMatcapMaterial, MeshNormalMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshToonMaterial, MinEquation, MirroredRepeatWrapping, MixOperation, MultiplyBlending, MultiplyOperation, NearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, NeutralToneMapping, NeverCompare, NeverDepth, NeverStencilFunc, NoBlending, NoColorSpace, NoNormalPacking, NoToneMapping, NormalBlending, NormalGAPacking, NormalRGPacking, NotEqualCompare, NotEqualDepth, NotEqualStencilFunc, Object3D, ObjectLoader, ObjectSpaceNormalMap, OneFactor, OneMinusDstAlphaFactor, OneMinusDstColorFactor, OneMinusSrcAlphaFactor, OneMinusSrcColorFactor, OrthographicCamera, PCFShadowMap, PCFSoftShadowMap, PerspectiveCamera, Plane, PlaneGeometry, PointLight, PointsMaterial, Quaternion, R11_EAC_Format, RED_GREEN_RGTC2_Format, RED_RGTC1_Format, REVISION, RG11_EAC_Format, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGBFormat, RGBIntegerFormat, RGB_BPTC_SIGNED_Format, RGB_BPTC_UNSIGNED_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGFormat, RGIntegerFormat, RectAreaLight, RedFormat, RedIntegerFormat, ReinhardToneMapping, RenderTarget, RepeatWrapping, ReplaceStencilOp, ReverseSubtractEquation, SIGNED_R11_EAC_Format, SIGNED_RED_GREEN_RGTC2_Format, SIGNED_RED_RGTC1_Format, SIGNED_RG11_EAC_Format, SRGBColorSpace, SRGBTransfer, Scene, ShadowMaterial, ShortType, Sphere, SphereGeometry, SpotLight, SpriteMaterial, SrcAlphaFactor, SrcAlphaSaturateFactor, SrcColorFactor, StaticDrawUsage, SubtractEquation, SubtractiveBlending, TangentSpaceNormalMap, Texture, TimestampQuery, UVMapping, Uint16BufferAttribute, Uint32BufferAttribute, UnsignedByteType, UnsignedInt101111Type, UnsignedInt248Type, UnsignedInt5999Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VSMShadowMap, Vector2, Vector3, Vector4, WebGLCoordinateSystem, WebGPUCoordinateSystem, WebXRController, ZeroFactor, ZeroStencilOp, createCanvasElement, error, log$1 as log, warn, warnOnce }; -export { AdditiveAnimationBlendMode, AnimationAction, AnimationClip, AnimationLoader, AnimationMixer, AnimationObjectGroup, AnimationUtils, ArcCurve, ArrowHelper, AttachedBindMode, Audio, AudioAnalyser, AudioContext, AudioListener, AudioLoader, AxesHelper, BasicDepthPacking, BatchedMesh, BezierInterpolant, Bone, BooleanKeyframeTrack, Box2, Box3, Box3Helper, BoxHelper, BufferGeometryLoader, Cache, Camera, CameraHelper, CanvasTexture, CapsuleGeometry, CatmullRomCurve3, CircleGeometry, Clock, ColorKeyframeTrack, CompressedArrayTexture, CompressedCubeTexture, CompressedTexture, CompressedTextureLoader, ConeGeometry, ConstantAlphaFactor, ConstantColorFactor, Controls, CubeTextureLoader, CubicBezierCurve, CubicBezierCurve3, CubicInterpolant, CullFaceFrontBack, Curve, CurvePath, CustomToneMapping, Cylindrical, Data3DTexture, DataTextureLoader, DataUtils, DefaultLoadingManager, DetachedBindMode, DirectionalLightHelper, DiscreteInterpolant, DodecahedronGeometry, DynamicCopyUsage, DynamicReadUsage, EdgesGeometry, EllipseCurve, Euler, ExternalTexture, ExtrudeGeometry, Fog, FogExp2, GLBufferAttribute, GLSL1, GLSL3, GridHelper, HTMLTexture, HemisphereLightHelper, IcosahedronGeometry, ImageBitmapLoader, ImageLoader, ImageUtils, InstancedBufferGeometry, InstancedMesh, Int16BufferAttribute, Int32BufferAttribute, Int8BufferAttribute, Interpolant, InterpolateBezier, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, InterpolationSamplingMode, InterpolationSamplingType, KeyframeTrack, LOD, LatheGeometry, Layers, Light, Line, Line3, LineCurve, LineCurve3, LineLoop, LineSegments, LinearInterpolant, LinearMipMapNearestFilter, LoaderUtils, LoadingManager, LoopOnce, LoopPingPong, LoopRepeat, MOUSE, MeshDepthMaterial, MeshDistanceMaterial, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NormalAnimationBlendMode, NumberKeyframeTrack, OctahedronGeometry, OneMinusConstantAlphaFactor, OneMinusConstantColorFactor, Path, PlaneHelper, PointLightHelper, Points, PolarGridHelper, PolyhedronGeometry, PositionalAudio, PropertyBinding, PropertyMixer, QuadraticBezierCurve, QuadraticBezierCurve3, QuaternionKeyframeTrack, QuaternionLinearInterpolant, RGBADepthPacking, RGBDepthPacking, RGDepthPacking, RawShaderMaterial, Ray, Raycaster, RenderTarget3D, RingGeometry, ShaderMaterial, Shape, ShapeGeometry, ShapePath, ShapeUtils, Skeleton, SkeletonHelper, SkinnedMesh, Source, Spherical, SphericalHarmonics3, SplineCurve, SpotLightHelper, Sprite, StaticCopyUsage, StaticReadUsage, StereoCamera, StreamCopyUsage, StreamDrawUsage, StreamReadUsage, StringKeyframeTrack, TOUCH, TetrahedronGeometry, TextureLoader, TextureUtils, Timer, TorusGeometry, TorusKnotGeometry, Triangle, TriangleFanDrawMode, TriangleStripDrawMode, TrianglesDrawMode, TubeGeometry, Uint8BufferAttribute, Uint8ClampedBufferAttribute, Uniform, UniformsGroup, VectorKeyframeTrack, VideoFrameTexture, VideoTexture, WebGL3DRenderTarget, WebGLArrayRenderTarget, WebGLRenderTarget, WireframeGeometry, WrapAroundEnding, ZeroCurvatureEnding, ZeroSlopeEnding, getConsoleFunction, setConsoleFunction } from "./three.core.js"; diff --git a/jsdoc-testing/jsdoc/examples/jsm/Addons.d.ts b/jsdoc-testing/jsdoc/examples/jsm/Addons.d.ts deleted file mode 100644 index 8e04ba8f1..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/Addons.d.ts +++ /dev/null @@ -1,269 +0,0 @@ -export * from "./animation/AnimationClipCreator.js"; -export * from "./animation/CCDIKSolver.js"; -export * from "./controls/ArcballControls.js"; -export * from "./controls/DragControls.js"; -export * from "./controls/FirstPersonControls.js"; -export * from "./controls/FlyControls.js"; -export * from "./controls/MapControls.js"; -export * from "./controls/OrbitControls.js"; -export * from "./controls/PointerLockControls.js"; -export * from "./controls/TrackballControls.js"; -export * from "./controls/TransformControls.js"; -export * from "./csm/CSM.js"; -export * from "./csm/CSMFrustum.js"; -export * from "./csm/CSMHelper.js"; -export * from "./csm/CSMShader.js"; -export * from "./curves/NURBSCurve.js"; -export * from "./curves/NURBSSurface.js"; -export * from "./curves/NURBSVolume.js"; -export * from "./effects/AnaglyphEffect.js"; -export * from "./effects/AsciiEffect.js"; -export * from "./effects/OutlineEffect.js"; -export * from "./effects/ParallaxBarrierEffect.js"; -export * from "./effects/StereoEffect.js"; -export * from "./environments/ColorEnvironment.js"; -export * from "./environments/DebugEnvironment.js"; -export * from "./environments/RoomEnvironment.js"; -export * from "./exporters/DRACOExporter.js"; -export * from "./exporters/EXRExporter.js"; -export * from "./exporters/GLTFExporter.js"; -export * from "./exporters/KTX2Exporter.js"; -export * from "./exporters/OBJExporter.js"; -export * from "./exporters/PLYExporter.js"; -export * from "./exporters/STLExporter.js"; -export * from "./exporters/USDZExporter.js"; -export * from "./geometries/BoxLineGeometry.js"; -export * from "./geometries/ConvexGeometry.js"; -export * from "./geometries/DecalGeometry.js"; -export * from "./geometries/ParametricFunctions.js"; -export * from "./geometries/ParametricGeometry.js"; -export * from "./geometries/RoundedBoxGeometry.js"; -export * from "./geometries/TeapotGeometry.js"; -export * from "./geometries/TextGeometry.js"; -export * from "./helpers/AnimationPathHelper.js"; -export * from "./helpers/LightProbeHelper.js"; -export * from "./helpers/OctreeHelper.js"; -export * from "./helpers/PositionalAudioHelper.js"; -export * from "./helpers/RapierHelper.js"; -export * from "./helpers/RectAreaLightHelper.js"; -export * from "./helpers/TextureHelper.js"; -export * from "./helpers/VertexNormalsHelper.js"; -export * from "./helpers/VertexTangentsHelper.js"; -export * from "./helpers/ViewHelper.js"; -export * from "./interactive/HTMLMesh.js"; -export * from "./interactive/InteractiveGroup.js"; -export * from "./interactive/SelectionBox.js"; -export * from "./interactive/SelectionHelper.js"; -export * from "./lights/LightProbeGenerator.js"; -export * from "./lights/RectAreaLightTexturesLib.js"; -export * from "./lights/RectAreaLightUniformsLib.js"; -export * from "./lines/Line2.js"; -export * from "./lines/LineGeometry.js"; -export * from "./lines/LineMaterial.js"; -export * from "./lines/LineSegments2.js"; -export * from "./lines/LineSegmentsGeometry.js"; -export * from "./lines/Wireframe.js"; -export * from "./lines/WireframeGeometry2.js"; -export * from "./loaders/3DMLoader.js"; -export * from "./loaders/3MFLoader.js"; -export * from "./loaders/AMFLoader.js"; -export * from "./loaders/BVHLoader.js"; -export * from "./loaders/ColladaLoader.js"; -export * from "./loaders/DDSLoader.js"; -export * from "./loaders/DRACOLoader.js"; -export * from "./loaders/EXRLoader.js"; -export * from "./loaders/FBXLoader.js"; -export * from "./loaders/FontLoader.js"; -export * from "./loaders/GCodeLoader.js"; -export * from "./loaders/GLTFLoader.js"; -export * from "./loaders/HDRLoader.js"; -export * from "./loaders/HDRCubeTextureLoader.js"; -export * from "./loaders/IESLoader.js"; -export * from "./loaders/KMZLoader.js"; -export * from "./loaders/KTX2Loader.js"; -export * from "./loaders/KTXLoader.js"; -export * from "./loaders/LDrawLoader.js"; -export * from "./loaders/LUT3dlLoader.js"; -export * from "./loaders/LUTCubeLoader.js"; -export * from "./loaders/LUTImageLoader.js"; -export * from "./loaders/LWOLoader.js"; -export * from "./loaders/LottieLoader.js"; -export * from "./loaders/MD2Loader.js"; -export * from "./loaders/MDDLoader.js"; -export * from "./loaders/MTLLoader.js"; -export * from "./loaders/NRRDLoader.js"; -export * from "./loaders/OBJLoader.js"; -export * from "./loaders/PCDLoader.js"; -export * from "./loaders/PDBLoader.js"; -export * from "./loaders/PLYLoader.js"; -export * from "./loaders/PVRLoader.js"; -export * from "./loaders/RGBELoader.js"; -export * from "./loaders/UltraHDRLoader.js"; -export * from "./loaders/STLLoader.js"; -export * from "./loaders/SVGLoader.js"; -export * from "./loaders/TDSLoader.js"; -export * from "./loaders/TGALoader.js"; -export * from "./loaders/TIFFLoader.js"; -export * from "./loaders/TTFLoader.js"; -export * from "./loaders/USDLoader.js"; -export * from "./loaders/VOXLoader.js"; -export * from "./loaders/VRMLLoader.js"; -export * from "./loaders/VTKLoader.js"; -export * from "./loaders/XYZLoader.js"; -export * from "./materials/LDrawConditionalLineMaterial.js"; -export * from "./math/Capsule.js"; -export * from "./math/ColorConverter.js"; -export * from "./math/ConvexHull.js"; -export * from "./math/ImprovedNoise.js"; -export * from "./math/Lut.js"; -export * from "./math/MeshSurfaceSampler.js"; -export * from "./math/OBB.js"; -export * from "./math/Octree.js"; -export * from "./math/SimplexNoise.js"; -export * from "./misc/ConvexObjectBreaker.js"; -export * from "./misc/GPUComputationRenderer.js"; -export * from "./misc/Gyroscope.js"; -export * from "./misc/MD2Character.js"; -export * from "./misc/MD2CharacterComplex.js"; -export * from "./misc/MorphAnimMesh.js"; -export * from "./misc/MorphBlendMesh.js"; -export * from "./misc/ProgressiveLightMap.js"; -export * from "./misc/RollerCoaster.js"; -export * from "./misc/TubePainter.js"; -export * from "./misc/Volume.js"; -export * from "./misc/VolumeSlice.js"; -export * from "./modifiers/CurveModifier.js"; -export * from "./modifiers/EdgeSplitModifier.js"; -export * from "./modifiers/SimplifyModifier.js"; -export * from "./modifiers/TessellateModifier.js"; -export * from "./objects/GroundedSkybox.js"; -export * from "./objects/Lensflare.js"; -export * from "./objects/MarchingCubes.js"; -export * from "./objects/Reflector.js"; -export * from "./objects/ReflectorForSSRPass.js"; -export * from "./objects/Refractor.js"; -export * from "./objects/ShadowMesh.js"; -export * from "./objects/Sky.js"; -export * from "./objects/Water.js"; -export * from "./physics/AmmoPhysics.js"; -export * from "./physics/JoltPhysics.js"; -export * from "./physics/RapierPhysics.js"; -export * from "./postprocessing/AfterimagePass.js"; -export * from "./postprocessing/BloomPass.js"; -export * from "./postprocessing/BokehPass.js"; -export * from "./postprocessing/ClearPass.js"; -export * from "./postprocessing/CubeTexturePass.js"; -export * from "./postprocessing/DotScreenPass.js"; -export * from "./postprocessing/EffectComposer.js"; -export * from "./postprocessing/FXAAPass.js"; -export * from "./postprocessing/FilmPass.js"; -export * from "./postprocessing/GlitchPass.js"; -export * from "./postprocessing/GTAOPass.js"; -export * from "./postprocessing/HalftonePass.js"; -export * from "./postprocessing/LUTPass.js"; -export * from "./postprocessing/MaskPass.js"; -export * from "./postprocessing/OutlinePass.js"; -export * from "./postprocessing/OutputPass.js"; -export * from "./postprocessing/Pass.js"; -export * from "./postprocessing/RenderPass.js"; -export * from "./postprocessing/RenderPixelatedPass.js"; -export * from "./postprocessing/RenderTransitionPass.js"; -export * from "./postprocessing/SAOPass.js"; -export * from "./postprocessing/SMAAPass.js"; -export * from "./postprocessing/SSAARenderPass.js"; -export * from "./postprocessing/SSAOPass.js"; -export * from "./postprocessing/SSRPass.js"; -export * from "./postprocessing/SavePass.js"; -export * from "./postprocessing/ShaderPass.js"; -export * from "./postprocessing/TAARenderPass.js"; -export * from "./postprocessing/TexturePass.js"; -export * from "./postprocessing/UnrealBloomPass.js"; -export * from "./renderers/CSS2DRenderer.js"; -export * from "./renderers/CSS3DRenderer.js"; -export * from "./renderers/Projector.js"; -export * from "./renderers/SVGRenderer.js"; -export * from "./shaders/ACESFilmicToneMappingShader.js"; -export * from "./shaders/AfterimageShader.js"; -export * from "./shaders/BasicShader.js"; -export * from "./shaders/BleachBypassShader.js"; -export * from "./shaders/BlendShader.js"; -export * from "./shaders/BokehShader.js"; -export * from "./shaders/BrightnessContrastShader.js"; -export * from "./shaders/ColorCorrectionShader.js"; -export * from "./shaders/ColorifyShader.js"; -export * from "./shaders/ConvolutionShader.js"; -export * from "./shaders/CopyShader.js"; -export * from "./shaders/DOFMipMapShader.js"; -export * from "./shaders/DepthLimitedBlurShader.js"; -export * from "./shaders/DigitalGlitch.js"; -export * from "./shaders/DotScreenShader.js"; -export * from "./shaders/ExposureShader.js"; -export * from "./shaders/FXAAShader.js"; -export * from "./shaders/FilmShader.js"; -export * from "./shaders/FocusShader.js"; -export * from "./shaders/FreiChenShader.js"; -export * from "./shaders/GammaCorrectionShader.js"; -export * from "./shaders/GTAOShader.js"; -export * from "./shaders/HalftoneShader.js"; -export * from "./shaders/HorizontalBlurShader.js"; -export * from "./shaders/HorizontalTiltShiftShader.js"; -export * from "./shaders/HueSaturationShader.js"; -export * from "./shaders/KaleidoShader.js"; -export * from "./shaders/LuminosityHighPassShader.js"; -export * from "./shaders/LuminosityShader.js"; -export * from "./shaders/MirrorShader.js"; -export * from "./shaders/NormalMapShader.js"; -export * from "./shaders/OutputShader.js"; -export * from "./shaders/PoissonDenoiseShader.js"; -export * from "./shaders/RGBShiftShader.js"; -export * from "./shaders/SAOShader.js"; -export * from "./shaders/SMAAShader.js"; -export * from "./shaders/SSAOShader.js"; -export * from "./shaders/SSRShader.js"; -export * from "./shaders/SepiaShader.js"; -export * from "./shaders/SobelOperatorShader.js"; -export * from "./shaders/SubsurfaceScatteringShader.js"; -export * from "./shaders/TechnicolorShader.js"; -export * from "./shaders/ToonShader.js"; -export * from "./shaders/TriangleBlurShader.js"; -export * from "./shaders/UnpackDepthRGBAShader.js"; -export * from "./shaders/VelocityShader.js"; -export * from "./shaders/VerticalBlurShader.js"; -export * from "./shaders/VerticalTiltShiftShader.js"; -export * from "./shaders/VignetteShader.js"; -export * from "./shaders/VolumeShader.js"; -export * from "./shaders/WaterRefractionShader.js"; -export * from "./textures/FlakesTexture.js"; -export * from "./utils/LDrawUtils.js"; -export * from "./utils/SceneOptimizer.js"; -export * from "./utils/ShadowMapViewer.js"; -export * from "./utils/WebGLTextureUtils.js"; -export * from "./utils/UVsDebug.js"; -export * from "./utils/WorkerPool.js"; -export * from "./webxr/ARButton.js"; -export * from "./webxr/OculusHandModel.js"; -export * from "./webxr/OculusHandPointerModel.js"; -export * from "./webxr/Text2D.js"; -export * from "./webxr/VRButton.js"; -export * from "./webxr/WebGLXRFallback.js"; -export * from "./webxr/XRButton.js"; -export * from "./webxr/XRControllerModelFactory.js"; -export * from "./webxr/XREstimatedLight.js"; -export * from "./webxr/XRHandMeshModel.js"; -export * from "./webxr/XRHandModelFactory.js"; -export * from "./webxr/XRHandPrimitiveModel.js"; -export * from "./webxr/XRPlanes.js"; -export { default as WebGL } from "./capabilities/WebGL.js"; -export * as Curves from "./curves/CurveExtras.js"; -export * as NURBSUtils from "./curves/NURBSUtils.js"; -export * as ColorSpaces from "./math/ColorSpaces.js"; -export { Water as Water2 } from "./objects/Water2.js"; -export { BokehShader as BokehShader2 } from "./shaders/BokehShader2.js"; -export * as BufferGeometryUtils from "./utils/BufferGeometryUtils.js"; -export * as CameraUtils from "./utils/CameraUtils.js"; -export * as ColorUtils from "./utils/ColorUtils.js"; -export * as GeometryCompressionUtils from "./utils/GeometryCompressionUtils.js"; -export * as GeometryUtils from "./utils/GeometryUtils.js"; -export * as SceneUtils from "./utils/SceneUtils.js"; -export * as SkeletonUtils from "./utils/SkeletonUtils.js"; -export * as SortUtils from "./utils/SortUtils.js"; diff --git a/jsdoc-testing/jsdoc/examples/jsm/animation/AnimationClipCreator.d.ts b/jsdoc-testing/jsdoc/examples/jsm/animation/AnimationClipCreator.d.ts deleted file mode 100644 index 11c23e792..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/animation/AnimationClipCreator.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -/** - * A utility class with factory methods for creating basic animation clips. - * - * @hideconstructor - * @three_import import { AnimationClipCreator } from 'three/addons/animation/AnimationClipCreator.js'; - */ -export class AnimationClipCreator { - /** - * Creates an animation clip that rotates a 3D object 360 degrees - * in the given period of time around the given axis. - * - * @param {number} period - The duration of the animation. - * @param {('x'|'y'|'z')} [axis='x'] - The axis of rotation. - * @return {AnimationClip} The created animation clip. - */ - static CreateRotationAnimation(period: number, axis?: ("x" | "y" | "z")): AnimationClip; - /** - * Creates an animation clip that scales a 3D object from `0` to `1` - * in the given period of time along the given axis. - * - * @param {number} period - The duration of the animation. - * @param {('x'|'y'|'z')} [axis='x'] - The axis to scale the 3D object along. - * @return {AnimationClip} The created animation clip. - */ - static CreateScaleAxisAnimation(period: number, axis?: ("x" | "y" | "z")): AnimationClip; - /** - * Creates an animation clip that translates a 3D object in a shake pattern - * in the given period. - * - * @param {number} duration - The duration of the animation. - * @param {Vector3} shakeScale - The scale of the shake. - * @return {AnimationClip} The created animation clip. - */ - static CreateShakeAnimation(duration: number, shakeScale: Vector3): AnimationClip; - /** - * Creates an animation clip that scales a 3D object in a pulse pattern - * in the given period. - * - * @param {number} duration - The duration of the animation. - * @param {number} pulseScale - The scale of the pulse. - * @return {AnimationClip} The created animation clip. - */ - static CreatePulsationAnimation(duration: number, pulseScale: number): AnimationClip; - /** - * Creates an animation clip that toggles the visibility of a 3D object. - * - * @param {number} duration - The duration of the animation. - * @return {AnimationClip} The created animation clip. - */ - static CreateVisibilityAnimation(duration: number): AnimationClip; - /** - * Creates an animation clip that animates the `color` property of a 3D object's - * material. - * - * @param {number} duration - The duration of the animation. - * @param {Array} colors - An array of colors that should be sequentially animated. - * @return {AnimationClip} The created animation clip. - */ - static CreateMaterialColorAnimation(duration: number, colors: Array): AnimationClip; -} -import { AnimationClip } from 'three'; -import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/animation/CCDIKSolver.d.ts b/jsdoc-testing/jsdoc/examples/jsm/animation/CCDIKSolver.d.ts deleted file mode 100644 index 3f3509ed9..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/animation/CCDIKSolver.d.ts +++ /dev/null @@ -1,152 +0,0 @@ -/** - * ~IK - */ -export type CCDIKSolver = { - /** - * - The target bone index which refers to a bone in the `Skeleton.bones` array. - */ - target: number; - /** - * - The effector bone index which refers to a bone in the `Skeleton.bones` array. - */ - effector: number; - /** - * ~BoneLink>} links - An array of bone links. - */ - "": Array; - /** - * - Iteration number of calculation. Smaller is faster but less precise. - */ - iteration?: number | undefined; - /** - * - Minimum rotation angle in a step in radians. - */ - minAngle?: number | undefined; - /** - * - Minimum rotation angle in a step in radians. - */ - maxAngle?: number | undefined; - /** - * - The blend factor. - */ - blendFactor?: number | undefined; -}; -/** - * This class solves the Inverse Kinematics Problem with a [CCD Algorithm](https://web.archive.org/web/20221206080850/https://sites.google.com/site/auraliusproject/ccd-algorithm). - * - * `CCDIKSolver` is designed to work with instances of {@link SkinnedMesh}. - * - * @three_import import { CCDIKSolver } from 'three/addons/animation/CCDIKSolver.js'; - */ -export class CCDIKSolver { - /** - * @param {SkinnedMesh} mesh - The skinned mesh. - * @param {Array} [iks=[]] - The IK objects. - */ - constructor(mesh: SkinnedMesh, iks?: any[]); - /** - * The skinned mesh. - * - * @type {SkinnedMesh} - */ - mesh: SkinnedMesh; - /** - * The IK objects. - * - * @type {Array} - */ - iks: Array; - _initialQuaternions: Quaternion[][]; - _workingQuaternion: Quaternion; - /** - * Updates all IK bones by solving the CCD algorithm. - * - * @param {number} [globalBlendFactor=1.0] - Blend factor applied if an IK chain doesn't have its own .blendFactor. - * @return {CCDIKSolver} A reference to this instance. - */ - update(globalBlendFactor?: number): CCDIKSolver; - /** - * Updates one IK bone solving the CCD algorithm. - * - * @param {CCDIKSolver~IK} ik - The IK to update. - * @param {number} [overrideBlend=1.0] - If the IK object does not define `blendFactor`, this value is used. - * @return {CCDIKSolver} A reference to this instance. - */ - updateOne(ik: any, overrideBlend?: number): CCDIKSolver; - /** - * Creates a helper for visualizing the CCDIK. - * - * @param {number} sphereSize - The sphere size. - * @return {CCDIKHelper} The created helper. - */ - createHelper(sphereSize: number): CCDIKHelper; - _valid(): void; -} -/** - * Helper for visualizing IK bones. - * - * @augments Object3D - * @three_import import { CCDIKHelper } from 'three/addons/animation/CCDIKSolver.js'; - */ -export class CCDIKHelper extends Object3D { - /** - * @param {SkinnedMesh} mesh - The skinned mesh. - * @param {Array} [iks=[]] - The IK objects. - * @param {number} [sphereSize=0.25] - The sphere size. - */ - constructor(mesh: SkinnedMesh, iks?: any[], sphereSize?: number); - /** - * The skinned mesh this helper refers to. - * - * @type {SkinnedMesh} - */ - root: SkinnedMesh; - /** - * The IK objects. - * - * @type {Array} - */ - iks: Array; - /** - * The helpers sphere geometry. - * - * @type {SphereGeometry} - */ - sphereGeometry: SphereGeometry; - /** - * The material for the target spheres. - * - * @type {MeshBasicMaterial} - */ - targetSphereMaterial: MeshBasicMaterial; - /** - * The material for the effector spheres. - * - * @type {MeshBasicMaterial} - */ - effectorSphereMaterial: MeshBasicMaterial; - /** - * The material for the link spheres. - * - * @type {MeshBasicMaterial} - */ - linkSphereMaterial: MeshBasicMaterial; - /** - * A global line material. - * - * @type {LineBasicMaterial} - */ - lineMaterial: LineBasicMaterial; - updateMatrixWorld(force: any): void; - /** - * Frees the GPU-related resources allocated by this instance. - * Call this method whenever this instance is no longer used in your app. - */ - dispose(): void; - _init(): void; -} -import { Quaternion } from 'three'; -import { Object3D } from 'three'; -import { SphereGeometry } from 'three'; -import { MeshBasicMaterial } from 'three'; -import { LineBasicMaterial } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/capabilities/WebGL.d.ts b/jsdoc-testing/jsdoc/examples/jsm/capabilities/WebGL.d.ts deleted file mode 100644 index 7a5082970..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/capabilities/WebGL.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default WebGL; -/** - * A utility module with basic WebGL 2 capability testing. - * - * @hideconstructor - * @three_import import WebGL from 'three/addons/capabilities/WebGL.js'; - */ -declare class WebGL { - /** - * Returns `true` if WebGL 2 is available. - * - * @return {boolean} Whether WebGL 2 is available or not. - */ - static isWebGL2Available(): boolean; - /** - * Returns `true` if the given color space is available. This method can only be used - * if WebGL 2 is supported. - * - * @param {string} colorSpace - The color space to test. - * @return {boolean} Whether the given color space is available or not. - */ - static isColorSpaceAvailable(colorSpace: string): boolean; - /** - * Returns a `div` element representing a formatted error message that can be appended in - * web sites if WebGL 2 isn't supported. - * - * @return {HTMLDivElement} A `div` element representing a formatted error message that WebGL 2 isn't supported. - */ - static getWebGL2ErrorMessage(): HTMLDivElement; - static _getErrorMessage(version: any): HTMLDivElement; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/capabilities/WebGPU.d.ts b/jsdoc-testing/jsdoc/examples/jsm/capabilities/WebGPU.d.ts deleted file mode 100644 index 410375a5f..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/capabilities/WebGPU.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -export default WebGPU; -/** - * A utility module with basic WebGPU capability testing. - * - * @hideconstructor - * @three_import import WebGPU from 'three/addons/capabilities/WebGPU.js'; - */ -declare class WebGPU { - /** - * Returns `true` if WebGPU is available. - * - * @return {boolean} Whether WebGPU is available or not. - */ - static isAvailable(): boolean; - /** - * Returns a `div` element representing a formatted error message that can be appended in - * web sites if WebGPU isn't supported. - * - * @return {HTMLDivElement} A `div` element representing a formatted error message that WebGPU isn't supported. - */ - static getErrorMessage(): HTMLDivElement; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/controls/ArcballControls.d.ts b/jsdoc-testing/jsdoc/examples/jsm/controls/ArcballControls.d.ts deleted file mode 100644 index a5b82f12b..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/controls/ArcballControls.d.ts +++ /dev/null @@ -1,676 +0,0 @@ -/** - * Arcball controls allow the camera to be controlled by a virtual trackball with full touch support and advanced navigation functionality. - * Cursor/finger positions and movements are mapped over a virtual trackball surface represented by a gizmo and mapped in intuitive and - * consistent camera movements. Dragging cursor/fingers will cause camera to orbit around the center of the trackball in a conservative - * way (returning to the starting point will make the camera return to its starting orientation). - * - * In addition to supporting pan, zoom and pinch gestures, double clicking/tapping focuses on a point, intuitively moving the object's - * point of interest to the center of the virtual trackball. Focus allows a much better inspection and navigation in complex environment. - * Moreover Arcball controls allow FOV manipulation (in a vertigo-style method) and z-rotation. Saving and restoring of Camera State - * is supported also through clipboard (use ctrl+c and ctrl+v shortcuts for copy and paste the state). - * - * Unlike {@link OrbitControls} and {@link TrackballControls}, `ArcballControls` doesn't require `update()` to be called externally in an - * animation loop when animations are on. - * - * @augments Controls - * @three_import import { ArcballControls } from 'three/addons/controls/ArcballControls.js'; - */ -export class ArcballControls extends Controls { - /** - * Constructs a new controls instance. - * - * @param {Camera} camera - The camera to be controlled. The camera must not be a child of another object, unless that object is the scene itself. - * @param {?HTMLElement} [domElement=null] - The HTML element used for event listeners. - * @param {?Scene} [scene=null] The scene rendered by the camera. If not given, gizmos cannot be shown. - */ - constructor(camera: Camera, domElement?: HTMLElement | null, scene?: Scene | null); - /** - * The scene rendered by the camera. If not given, gizmos cannot be shown. - * - * @type {?Scene} - * @default null - */ - scene: Scene | null; - /** - * The control's focus point. - * - * @type {Vector3} - */ - target: Vector3; - _currentTarget: Vector3; - /** - * The size of the gizmo relative to the screen width and height. - * - * @type {number} - * @default 0.67 - */ - radiusFactor: number; - /** - * Holds the mouse actions of this controls. This property is maintained by the methods - * `setMouseAction()` and `unsetMouseAction()`. - * - * @type {Array} - */ - mouseActions: Array; - _mouseOp: any; - _v2_1: Vector2; - _v3_1: Vector3; - _v3_2: Vector3; - _m4_1: Matrix4; - _m4_2: Matrix4; - _quat: Quaternion; - _translationMatrix: Matrix4; - _rotationMatrix: Matrix4; - _scaleMatrix: Matrix4; - _rotationAxis: Vector3; - _cameraMatrixState: Matrix4; - _cameraProjectionState: Matrix4; - _fovState: number; - _upState: Vector3; - _zoomState: number; - _nearPos: number; - _farPos: number; - _gizmoMatrixState: Matrix4; - _up0: Vector3; - _zoom0: number; - _fov0: number; - _initialNear: number; - _nearPos0: number; - _initialFar: number; - _farPos0: number; - _cameraMatrixState0: Matrix4; - _gizmoMatrixState0: Matrix4; - _target0: Vector3; - _button: number; - _touchStart: any[]; - _touchCurrent: any[]; - _input: symbol; - _switchSensibility: number; - _startFingerDistance: number; - _currentFingerDistance: number; - _startFingerRotation: number; - _currentFingerRotation: number; - _devPxRatio: number; - _downValid: boolean; - _nclicks: number; - _downEvents: any[]; - _downStart: number; - _clickStart: number; - _maxDownTime: number; - _maxInterval: number; - _posThreshold: number; - _movementThreshold: number; - _currentCursorPosition: Vector3; - _startCursorPosition: Vector3; - _grid: GridHelper | null; - _gridPosition: Vector3; - _gizmos: Group; - _curvePts: number; - _timeStart: number; - _animationId: number; - /** - * Duration of focus animations in ms. - * - * @type {number} - * @default 500 - */ - focusAnimationTime: number; - _timePrev: number; - _timeCurrent: number; - _anglePrev: number; - _angleCurrent: number; - _cursorPosPrev: Vector3; - _cursorPosCurr: Vector3; - _wPrev: number; - _wCurr: number; - /** - * If set to `true`, the camera's near and far values will be adjusted every time zoom is - * performed trying to maintain the same visible portion given by initial near and far - * values. Only works with perspective cameras. - * - * This feature only works as expected if the camera's initial state (position, near and far values) - * is correctly configured before creating the controls. Otherwise {@link ArcballControls#setCamera} - * must be called by the application. - * - * @type {boolean} - * @default false - */ - adjustNearFar: boolean; - /** - * The scaling factor used when performing zoom operation. - * - * @type {number} - * @default 1.1 - */ - scaleFactor: number; - /** - * The damping inertia used if 'enableAnimations` is set to `true`. - * - * @type {number} - * @default 25 - */ - dampingFactor: number; - /** - * Maximum angular velocity allowed on rotation animation start. - * - * @type {number} - * @default 20 - */ - wMax: number; - /** - * Set to `true` to enable animations for rotation (damping) and focus operation. - * - * @type {boolean} - * @default true - */ - enableAnimations: boolean; - /** - * If set to `true`, a grid will appear when panning operation is being performed - * (desktop interaction only). - * - * @type {boolean} - * @default false - */ - enableGrid: boolean; - /** - * Set to `true` to make zoom become cursor centered. - * - * @type {boolean} - * @default false - */ - cursorZoom: boolean; - /** - * The minimum FOV in degrees. - * - * @type {number} - * @default 5 - */ - minFov: number; - /** - * The maximum FOV in degrees. - * - * @type {number} - * @default 90 - */ - maxFov: number; - /** - * Speed of rotation. - * - * @type {number} - * @default 1 - */ - rotateSpeed: number; - /** - * Enable or disable camera panning. - * - * @type {boolean} - * @default true - */ - enablePan: boolean; - /** - * Enable or disable camera rotation. - * - * @type {boolean} - * @default true - */ - enableRotate: boolean; - /** - * Enable or disable camera zoom. - * - * @type {boolean} - * @default true - */ - enableZoom: boolean; - /** - * Enable or disable gizmos. - * - * @type {boolean} - * @default true - */ - enableGizmos: boolean; - /** - * Enable or disable camera focusing on double-tap (or click) operations. - * - * @type {boolean} - * @default true - */ - enableFocus: boolean; - /** - * How far you can dolly in. For perspective cameras only. - * - * @type {number} - * @default 0 - */ - minDistance: number; - /** - * How far you can dolly out. For perspective cameras only. - * - * @type {number} - * @default Infinity - */ - maxDistance: number; - /** - * How far you can zoom in. For orthographic cameras only. - * - * @type {number} - * @default 0 - */ - minZoom: number; - /** - * How far you can zoom out. For orthographic cameras only. - * - * @type {number} - * @default Infinity - */ - maxZoom: number; - _tbRadius: number; - _state: symbol; - _onContextMenu: typeof onContextMenu; - _onWheel: typeof onWheel; - _onPointerUp: typeof onPointerUp; - _onPointerMove: typeof onPointerMove; - _onPointerDown: typeof onPointerDown; - _onPointerCancel: typeof onPointerCancel; - _onWindowResize: typeof onWindowResize; - connect(element: any): void; - onSinglePanStart(event: any, operation: any): void; - onSinglePanMove(event: any, opState: any): void; - onSinglePanEnd(): void; - onDoubleTap(event: any): void; - onDoublePanStart(): void; - onDoublePanMove(): void; - onDoublePanEnd(): void; - onRotateStart(): void; - onRotateMove(): void; - onRotateEnd(): void; - onPinchStart(): void; - onPinchMove(): void; - onPinchEnd(): void; - onTriplePanStart(): void; - onTriplePanMove(): void; - onTriplePanEnd(): void; - /** - * Set _center's x/y coordinates. - * - * @private - * @param {number} clientX - The x coordinate. - * @param {number} clientY - The y coordinate. - */ - private setCenter; - /** - * Set default mouse actions. - * - * @private - */ - private initializeMouseActions; - /** - * Compare two mouse actions. - * - * @private - * @param {Object} action1 - The first mouse action. - * @param {Object} action2 - The second mouse action. - * @returns {boolean} `true` if action1 and action 2 are the same mouse action, `false` otherwise. - */ - private compareMouseAction; - /** - * Set a new mouse action by specifying the operation to be performed and a mouse/key combination. In case of conflict, replaces the existing one. - * - * @param {'PAN'|'ROTATE'|'ZOOM'|'FOV'} operation - The operation to be performed ('PAN', 'ROTATE', 'ZOOM', 'FOV'). - * @param {0|1|2|'WHEEL'} mouse - A mouse button (0, 1, 2) or 'WHEEL' for wheel notches. - * @param {?('CTRL'|'SHIFT')} [key=null] - The keyboard modifier ('CTRL', 'SHIFT') or null if key is not needed. - * @returns {boolean} `true` if the mouse action has been successfully added, `false` otherwise. - */ - setMouseAction(operation: "PAN" | "ROTATE" | "ZOOM" | "FOV", mouse: 0 | 1 | 2 | "WHEEL", key?: ("CTRL" | "SHIFT") | null): boolean; - /** - * Remove a mouse action by specifying its mouse/key combination. - * - * @param {0|1|2|'WHEEL'} mouse - A mouse button (0, 1, 2) or 'WHEEL' for wheel notches. - * @param {?('CTRL'|'SHIFT')} key - The keyboard modifier ('CTRL', 'SHIFT') or null if key is not needed. - * @returns {boolean} `true` if the operation has been successfully removed, `false` otherwise. - */ - unsetMouseAction(mouse: 0 | 1 | 2 | "WHEEL", key?: ("CTRL" | "SHIFT") | null): boolean; - /** - * Return the operation associated to a mouse/keyboard combination. - * - * @private - * @param {0|1|2|'WHEEL'} mouse - Mouse button index (0, 1, 2) or 'WHEEL' for wheel notches. - * @param {?('CTRL'|'SHIFT')} key - Keyboard modifier. - * @returns {?('PAN'|'ROTATE'|'ZOOM'|'FOV')} The operation if it has been found, `null` otherwise. - */ - private getOpFromAction; - /** - * Get the operation associated to mouse and key combination and returns the corresponding FSA state. - * - * @private - * @param {0|1|2} mouse - Mouse button index (0, 1, 2) - * @param {?('CTRL'|'SHIFT')} key - Keyboard modifier - * @returns {?STATE} The FSA state obtained from the operation associated to mouse/keyboard combination. - */ - private getOpStateFromAction; - /** - * Calculate the angle between two pointers. - * - * @private - * @param {PointerEvent} p1 - The first pointer event. - * @param {PointerEvent} p2 - The second pointer event. - * @returns {number} The angle between two pointers in degrees. - */ - private getAngle; - /** - * Updates a PointerEvent inside current pointerevents array. - * - * @private - * @param {PointerEvent} event - The pointer event. - */ - private updateTouchEvent; - /** - * Applies a transformation matrix, to the camera and gizmos. - * - * @private - * @param {Object} transformation - Object containing matrices to apply to camera and gizmos. - */ - private applyTransformMatrix; - /** - * Calculates the angular speed. - * - * @private - * @param {number} p0 - Position at t0. - * @param {number} p1 - Position at t1. - * @param {number} t0 - Initial time in milliseconds. - * @param {number} t1 - Ending time in milliseconds. - * @returns {number} The angular speed. - */ - private calculateAngularSpeed; - /** - * Calculates the distance between two pointers. - * - * @private - * @param {PointerEvent} p0 - The first pointer. - * @param {PointerEvent} p1 - The second pointer. - * @returns {number} The distance between the two pointers. - */ - private calculatePointersDistance; - /** - * Calculates the rotation axis as the vector perpendicular between two vectors. - * - * @private - * @param {Vector3} vec1 - The first vector. - * @param {Vector3} vec2 - The second vector. - * @returns {Vector3} The normalized rotation axis. - */ - private calculateRotationAxis; - /** - * Calculates the trackball radius so that gizmo's diameter will be 2/3 of the minimum side of the camera frustum. - * - * @private - * @param {Camera} camera - The camera. - * @returns {number} The trackball radius. - */ - private calculateTbRadius; - /** - * Focus operation consist of positioning the point of interest in front of the camera and a slightly zoom in. - * - * @private - * @param {Vector3} point - The point of interest. - * @param {number} size - Scale factor. - * @param {number} [amount=1] - Amount of operation to be completed (used for focus animations, default is complete full operation). - */ - private focus; - /** - * Creates a grid if necessary and adds it to the scene. - * - * @private - */ - private drawGrid; - /** - * Removes the grid from the scene. - */ - disposeGrid(): void; - /** - * Computes the easing out cubic function for ease out effect in animation. - * - * @private - * @param {number} t - The absolute progress of the animation in the bound of `0` (beginning of the) and `1` (ending of animation). - * @returns {number} Result of easing out cubic at time `t`. - */ - private easeOutCubic; - /** - * Makes rotation gizmos more or less visible. - * - * @param {boolean} isActive - If set to `true`, gizmos are more visible. - */ - activateGizmos(isActive: boolean): void; - /** - * Calculates the cursor position in NDC. - * - * @private - * @param {number} cursorX - Cursor horizontal coordinate within the canvas. - * @param {number} cursorY - Cursor vertical coordinate within the canvas. - * @param {HTMLElement} canvas - The canvas where the renderer draws its output. - * @returns {Vector2} Cursor normalized position inside the canvas. - */ - private getCursorNDC; - /** - * Calculates the cursor position inside the canvas x/y coordinates with the origin being in the center of the canvas. - * - * @private - * @param {number} cursorX - Cursor horizontal coordinate within the canvas. - * @param {number} cursorY - Cursor vertical coordinate within the canvas. - * @param {HTMLElement} canvas - The canvas where the renderer draws its output. - * @returns {Vector2} Cursor position inside the canvas. - */ - private getCursorPosition; - /** - * Sets the camera to be controlled. Must be called in order to set a new camera to be controlled. - * - * @param {Camera} camera - The camera to be controlled. - */ - setCamera(camera: Camera): void; - /** - * Sets gizmos visibility. - * - * @param {boolean} value - Value of gizmos visibility. - */ - setGizmosVisible(value: boolean): void; - /** - * Sets gizmos radius factor and redraws gizmos. - * - * @param {number} value - Value of radius factor. - */ - setTbRadius(value: number): void; - /** - * Creates the rotation gizmos matching trackball center and radius. - * - * @private - * @param {Vector3} tbCenter - The trackball center. - * @param {number} tbRadius - The trackball radius. - */ - private makeGizmos; - /** - * Performs animation for focus operation. - * - * @private - * @param {number} time - Instant in which this function is called as performance.now(). - * @param {Vector3} point - Point of interest for focus operation. - * @param {Matrix4} cameraMatrix - Camera matrix. - * @param {Matrix4} gizmoMatrix - Gizmos matrix. - */ - private onFocusAnim; - /** - * Performs animation for rotation operation. - * - * @private - * @param {number} time - Instant in which this function is called as performance.now(). - * @param {Vector3} rotationAxis - Rotation axis. - * @param {number} w0 - Initial angular velocity. - */ - private onRotationAnim; - /** - * Performs pan operation moving camera between two points. - * - * @private - * @param {Vector3} p0 - Initial point. - * @param {Vector3} p1 - Ending point. - * @param {boolean} [adjust=false] - If movement should be adjusted considering camera distance (Perspective only). - * @returns {Object} - */ - private pan; - /** - * Resets the controls. - */ - reset(): void; - /** - * Rotates the camera around an axis passing by trackball's center. - * - * @private - * @param {Vector3} axis - Rotation axis. - * @param {number} angle - Angle in radians. - * @returns {Object} Object with 'camera' field containing transformation matrix resulting from the operation to be applied to the camera. - */ - private rotate; - /** - * Copy the current state to clipboard (as a readable JSON text). - */ - copyState(): void; - /** - * Set the controls state from the clipboard, assumes that the clipboard stores a JSON - * text as saved from `copyState()`. - */ - pasteState(): void; - /** - * Saves the current state of the control. This can later be recover with `reset()`. - */ - saveState(): void; - /** - * Performs uniform scale operation around a given point. - * - * @private - * @param {number} size - Scale factor. - * @param {Vector3} point - Point around which scale. - * @param {boolean} scaleGizmos - If gizmos should be scaled (Perspective only). - * @returns {Object} Object with 'camera' and 'gizmo' fields containing transformation matrices resulting from the operation to be applied to the camera and gizmos. - */ - private scale; - /** - * Sets camera fov. - * - * @private - * @param {number} value - The FOV to be set. - */ - private setFov; - /** - * Sets values in transformation object. - * - * @private - * @param {?Matrix4} [camera=null] - Transformation to be applied to the camera. - * @param {?Matrix4} [gizmos=null] - Transformation to be applied to gizmos. - */ - private setTransformationMatrices; - /** - * Rotates camera around its direction axis passing by a given point by a given angle. - * - * @private - * @param {Vector3} point - The point where the rotation axis is passing trough. - * @param {number} angle - Angle in radians. - * @returns {Object} The computed transformation matrix. - */ - private zRotate; - /** - * Returns the raycaster that is used for user interaction. This object is shared between all - * instances of `ArcballControls`. - * - * @returns {Raycaster} The internal raycaster. - */ - getRaycaster(): Raycaster; - /** - * Unprojects the cursor on the 3D object surface. - * - * @private - * @param {Vector2} cursor - Cursor coordinates in NDC. - * @param {Camera} camera - Virtual camera. - * @returns {?Vector3} The point of intersection with the model, if exist, null otherwise. - */ - private unprojectOnObj; - /** - * Unproject the cursor on the trackball surface. - * - * @private - * @param {Camera} camera - The virtual camera. - * @param {number} cursorX - Cursor horizontal coordinate on screen. - * @param {number} cursorY - Cursor vertical coordinate on screen. - * @param {HTMLElement} canvas - The canvas where the renderer draws its output. - * @param {number} tbRadius - The trackball radius. - * @returns {Vector3} The unprojected point on the trackball surface. - */ - private unprojectOnTbSurface; - /** - * Unprojects the cursor on the plane passing through the center of the trackball orthogonal to the camera. - * - * @private - * @param {Camera} camera - The virtual camera. - * @param {number} cursorX - Cursor horizontal coordinate on screen. - * @param {number} cursorY - Cursor vertical coordinate on screen. - * @param {HTMLElement} canvas - The canvas where the renderer draws its output. - * @param {boolean} [initialDistance=false] - If initial distance between camera and gizmos should be used for calculations instead of current (Perspective only). - * @returns {Vector3} The unprojected point on the trackball plane. - */ - private unprojectOnTbPlane; - /** - * Updates camera and gizmos state. - * - * @private - */ - private updateMatrixState; - /** - * Updates the trackball FSA. - * - * @private - * @param {STATE} newState - New state of the FSA. - * @param {boolean} updateMatrices - If matrices state should be updated. - */ - private updateTbState; - setStateFromJSON(json: any): void; -} -import { Controls } from 'three'; -import { Vector3 } from 'three'; -import { Vector2 } from 'three'; -import { Matrix4 } from 'three'; -import { Quaternion } from 'three'; -import { GridHelper } from 'three'; -import { Group } from 'three'; -declare function onContextMenu(event: any): void; -declare function onWheel(event: any): void; -declare function onPointerUp(event: any): void; -declare class onPointerUp { - constructor(event: any); - _input: symbol | undefined; - _button: number | undefined; - _nclicks: number | undefined; - _clickStart: number | undefined; - _downValid: boolean | undefined; -} -declare function onPointerMove(event: any): void; -declare class onPointerMove { - constructor(event: any); - _input: symbol | undefined; - _downValid: boolean | undefined; -} -declare function onPointerDown(event: any): void; -declare class onPointerDown { - constructor(event: any); - _downValid: boolean; - _downStart: number | undefined; - _input: symbol | undefined; - _mouseOp: any; - _button: any; -} -declare function onPointerCancel(): void; -declare class onPointerCancel { - _input: symbol; -} -declare function onWindowResize(): void; -declare class onWindowResize { - _tbRadius: any; -} -import { Raycaster } from 'three'; -export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/controls/DragControls.d.ts b/jsdoc-testing/jsdoc/examples/jsm/controls/DragControls.d.ts deleted file mode 100644 index 8457f57fb..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/controls/DragControls.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -/** - * This class can be used to provide a drag'n'drop interaction. - * - * ```js - * const controls = new DragControls( objects, camera, renderer.domElement ); - * - * // add event listener to highlight dragged objects - * controls.addEventListener( 'dragstart', function ( event ) { - * - * event.object.material.emissive.set( 0xaaaaaa ); - * - * } ); - * - * controls.addEventListener( 'dragend', function ( event ) { - * - * event.object.material.emissive.set( 0x000000 ); - * - * } ); - * ``` - * - * @augments Controls - * @three_import import { DragControls } from 'three/addons/controls/DragControls.js'; - */ -export class DragControls extends Controls { - /** - * Constructs a new controls instance. - * - * @param {Array} objects - An array of draggable 3D objects. - * @param {Camera} camera - The camera of the rendered scene. - * @param {?HTMLElement} [domElement=null] - The HTML DOM element used for event listeners. - */ - constructor(objects: Array, camera: Camera, domElement?: HTMLElement | null); - /** - * An array of draggable 3D objects. - * - * @type {Array} - */ - objects: Array; - /** - * Whether children of draggable objects can be dragged independently from their parent. - * - * @type {boolean} - * @default true - */ - recursive: boolean; - /** - * This option only works if the `objects` array contains a single draggable group object. - * If set to `true`, the controls does not transform individual objects but the entire group. - * - * @type {boolean} - * @default false - */ - transformGroup: boolean; - /** - * The speed at which the object will rotate when dragged in `rotate` mode. - * The higher the number the faster the rotation. - * - * @type {number} - * @default 1 - */ - rotateSpeed: number; - /** - * The raycaster used for detecting 3D objects. - * - * @type {Raycaster} - */ - raycaster: Raycaster; - mouseButtons: { - LEFT: number; - MIDDLE: number; - RIGHT: number; - }; - touches: { - ONE: number; - }; - _onPointerMove: typeof onPointerMove; - _onPointerDown: typeof onPointerDown; - _onPointerCancel: typeof onPointerCancel; - _onContextMenu: typeof onContextMenu; - connect(element: any): void; - _updatePointer(event: any): void; - _updateState(event: any): void; -} -import { Controls } from 'three'; -import { Raycaster } from 'three'; -declare function onPointerMove(event: any): void; -declare function onPointerDown(event: any): void; -declare function onPointerCancel(): void; -declare class onPointerCancel { - state: number | undefined; -} -declare function onContextMenu(event: any): void; -export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/controls/FirstPersonControls.d.ts b/jsdoc-testing/jsdoc/examples/jsm/controls/FirstPersonControls.d.ts deleted file mode 100644 index efb3d183a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/controls/FirstPersonControls.d.ts +++ /dev/null @@ -1,185 +0,0 @@ -/** - * This class is an alternative implementation of {@link FlyControls}. - * - * @augments Controls - * @three_import import { FirstPersonControls } from 'three/addons/controls/FirstPersonControls.js'; - */ -export class FirstPersonControls extends Controls { - /** - * Constructs a new controls instance. - * - * @param {Object3D} object - The object that is managed by the controls. - * @param {?HTMLElement} domElement - The HTML element used for event listeners. - */ - constructor(object: Object3D, domElement?: HTMLElement | null); - /** - * The movement speed. - * - * @type {number} - * @default 1 - */ - movementSpeed: number; - /** - * The look around speed. - * - * @type {number} - * @default 0.005 - */ - lookSpeed: number; - /** - * Whether it's possible to vertically look around or not. - * - * @type {boolean} - * @default true - */ - lookVertical: boolean; - /** - * Whether the camera is automatically moved forward or not. - * - * @type {boolean} - * @default false - */ - autoForward: boolean; - /** - * Whether or not the camera's height influences the forward movement speed. - * Use the properties `heightCoef`, `heightMin` and `heightMax` for configuration. - * - * @type {boolean} - * @default false - */ - heightSpeed: boolean; - /** - * Determines how much faster the camera moves when it's y-component is near `heightMax`. - * - * @type {number} - * @default 1 - */ - heightCoef: number; - /** - * Lower camera height limit used for movement speed adjustment. - * - * @type {number} - * @default 0 - */ - heightMin: number; - /** - * Upper camera height limit used for movement speed adjustment. - * - * @type {number} - * @default 1 - */ - heightMax: number; - /** - * Whether or not looking around is vertically constrained by `verticalMin` and `verticalMax`. - * - * @type {boolean} - * @default false - */ - constrainVertical: boolean; - /** - * How far you can vertically look around, lower limit. Range is `0` to `Math.PI` in radians. - * - * @type {number} - * @default 0 - */ - verticalMin: number; - /** - * How far you can vertically look around, upper limit. Range is `0` to `Math.PI` in radians. - * - * @type {number} - * @default 0 - */ - verticalMax: number; - /** - * Whether the mouse is pressed down or not. - * - * @type {boolean} - * @readonly - * @default false - */ - readonly mouseDragOn: boolean; - _autoSpeedFactor: number; - _pointerX: number; - _pointerY: number; - _pointerDownX: number; - _pointerDownY: number; - _pointerCount: number; - _moveForward: boolean; - _moveBackward: boolean; - _moveLeft: boolean; - _moveRight: boolean; - _lat: number; - _lon: number; - _onPointerMove: typeof onPointerMove; - _onPointerDown: typeof onPointerDown; - _onPointerUp: typeof onPointerUp; - _onContextMenu: typeof onContextMenu; - _onKeyDown: typeof onKeyDown; - _onKeyUp: typeof onKeyUp; - connect(element: any): void; - /** - * Rotates the camera towards the defined target position. - * - * @param {number|Vector3} x - The x coordinate of the target position or alternatively a vector representing the target position. - * @param {number} y - The y coordinate of the target position. - * @param {number} z - The z coordinate of the target position. - * @return {FirstPersonControls} A reference to this controls. - */ - lookAt(x: number | Vector3, y: number, z: number): FirstPersonControls; - update(delta: any): void; - _setOrientation(): void; - /** - * @deprecated, r184. This method is no longer needed. - */ - handleResize(): void; -} -import { Controls } from 'three'; -declare function onPointerMove(event: any): void; -declare class onPointerMove { - constructor(event: any); - _pointerX: number | undefined; - _pointerY: number | undefined; -} -declare function onPointerDown(event: any): void; -declare class onPointerDown { - constructor(event: any); - _moveForward: boolean | undefined; - _moveBackward: boolean | undefined; - _pointerDownX: any; - _pointerDownY: any; - _pointerX: number; - _pointerY: number; - mouseDragOn: boolean; -} -declare function onPointerUp(event: any): void; -declare class onPointerUp { - constructor(event: any); - _moveForward: boolean | undefined; - _moveBackward: boolean | undefined; - _pointerX: number; - _pointerY: number; - mouseDragOn: boolean | undefined; -} -declare function onContextMenu(event: any): void; -declare function onKeyDown(event: any): void; -declare class onKeyDown { - constructor(event: any); - _moveForward: boolean | undefined; - _moveLeft: boolean | undefined; - _moveBackward: boolean | undefined; - _moveRight: boolean | undefined; - _moveUp: boolean | undefined; - _moveDown: boolean | undefined; -} -declare function onKeyUp(event: any): void; -declare class onKeyUp { - constructor(event: any); - _moveForward: boolean | undefined; - _moveLeft: boolean | undefined; - _moveBackward: boolean | undefined; - _moveRight: boolean | undefined; - _moveUp: boolean | undefined; - _moveDown: boolean | undefined; -} -import { Vector3 } from 'three'; -export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/controls/FlyControls.d.ts b/jsdoc-testing/jsdoc/examples/jsm/controls/FlyControls.d.ts deleted file mode 100644 index aa87bbefe..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/controls/FlyControls.d.ts +++ /dev/null @@ -1,101 +0,0 @@ -/** - * This class enables a navigation similar to fly modes in DCC tools like Blender. - * You can arbitrarily transform the camera in 3D space without any limitations - * (e.g. focus on a specific target). - * - * @augments Controls - * @three_import import { FlyControls } from 'three/addons/controls/FlyControls.js'; - */ -export class FlyControls extends Controls { - /** - * Constructs a new controls instance. - * - * @param {Object3D} object - The object that is managed by the controls. - * @param {?HTMLElement} domElement - The HTML element used for event listeners. - */ - constructor(object: Object3D, domElement?: HTMLElement | null); - /** - * The movement speed. - * - * @type {number} - * @default 1 - */ - movementSpeed: number; - /** - * The rotation speed. - * - * @type {number} - * @default 0.005 - */ - rollSpeed: number; - /** - * If set to `true`, you can only look around by performing a drag interaction. - * - * @type {boolean} - * @default false - */ - dragToLook: boolean; - /** - * If set to `true`, the camera automatically moves forward (and does not stop) when initially translated. - * - * @type {boolean} - * @default false - */ - autoForward: boolean; - _moveState: { - up: number; - down: number; - left: number; - right: number; - forward: number; - back: number; - pitchUp: number; - pitchDown: number; - yawLeft: number; - yawRight: number; - rollLeft: number; - rollRight: number; - }; - _moveVector: Vector3; - _rotationVector: Vector3; - _lastQuaternion: Quaternion; - _lastPosition: Vector3; - _status: number; - _onKeyDown: typeof onKeyDown; - _onKeyUp: typeof onKeyUp; - _onPointerMove: typeof onPointerMove; - _onPointerDown: typeof onPointerDown; - _onPointerUp: typeof onPointerUp; - _onPointerCancel: typeof onPointerCancel; - _onContextMenu: typeof onContextMenu; - connect(element: any): void; - update(delta: any): void; - _updateMovementVector(): void; - _updateRotationVector(): void; - _getContainerDimensions(): { - size: number[]; - offset: number[]; - }; -} -import { Controls } from 'three'; -import { Vector3 } from 'three'; -import { Quaternion } from 'three'; -declare function onKeyDown(event: any): void; -declare class onKeyDown { - constructor(event: any); - movementSpeedMultiplier: number | undefined; -} -declare function onKeyUp(event: any): void; -declare class onKeyUp { - constructor(event: any); - movementSpeedMultiplier: number | undefined; -} -declare function onPointerMove(event: any): void; -declare function onPointerDown(event: any): void; -declare function onPointerUp(event: any): void; -declare function onPointerCancel(): void; -declare class onPointerCancel { - _status: number | undefined; -} -declare function onContextMenu(event: any): void; -export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/controls/MapControls.d.ts b/jsdoc-testing/jsdoc/examples/jsm/controls/MapControls.d.ts deleted file mode 100644 index f3b2f1265..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/controls/MapControls.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * This class is intended for transforming a camera over a map from bird's eye perspective. - * The class shares its implementation with {@link OrbitControls} but uses a specific preset - * for mouse/touch interaction and disables screen space panning by default. - * - * - Orbit: Right mouse, or left mouse + ctrl/meta/shiftKey / touch: two-finger rotate. - * - Zoom: Middle mouse, or mousewheel / touch: two-finger spread or squish. - * - Pan: Left mouse, or arrow keys / touch: one-finger move. - * - * @augments OrbitControls - * @three_import import { MapControls } from 'three/addons/controls/MapControls.js'; - */ -export class MapControls extends OrbitControls { - constructor(object: any, domElement: any); - _panWorldStart: Vector3; -} -import { OrbitControls } from './OrbitControls.js'; -import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/controls/OrbitControls.d.ts b/jsdoc-testing/jsdoc/examples/jsm/controls/OrbitControls.d.ts deleted file mode 100644 index 0c5ffd8b8..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/controls/OrbitControls.d.ts +++ /dev/null @@ -1,458 +0,0 @@ -/** - * Orbit controls allow the camera to orbit around a target. - * - * OrbitControls performs orbiting, dollying (zooming), and panning. Unlike {@link TrackballControls}, - * it maintains the "up" direction `object.up` (+Y by default). - * - * - Orbit: Left mouse / touch: one-finger move. - * - Zoom: Middle mouse, or mousewheel / touch: two-finger spread or squish. - * - Pan: Right mouse, or left mouse + ctrl/meta/shiftKey, or arrow keys / touch: two-finger move. - * - * ```js - * const controls = new OrbitControls( camera, renderer.domElement ); - * - * // controls.update() must be called after any manual changes to the camera's transform - * camera.position.set( 0, 20, 100 ); - * controls.update(); - * - * function animate() { - * - * // required if controls.enableDamping or controls.autoRotate are set to true - * controls.update(); - * - * renderer.render( scene, camera ); - * - * } - * ``` - * - * @augments Controls - * @three_import import { OrbitControls } from 'three/addons/controls/OrbitControls.js'; - */ -export class OrbitControls extends Controls { - /** - * Constructs a new controls instance. - * - * @param {Object3D} object - The object that is managed by the controls. - * @param {?HTMLElement} domElement - The HTML element used for event listeners. - */ - constructor(object: Object3D, domElement?: HTMLElement | null); - /** - * The focus point of the controls, the `object` orbits around this. - * It can be updated manually at any point to change the focus of the controls. - * - * @type {Vector3} - */ - target: Vector3; - /** - * The focus point of the `minTargetRadius` and `maxTargetRadius` limits. - * It can be updated manually at any point to change the center of interest - * for the `target`. - * - * @type {Vector3} - */ - cursor: Vector3; - /** - * How far you can dolly in (perspective camera only). - * - * @type {number} - * @default 0 - */ - minDistance: number; - /** - * How far you can dolly out (perspective camera only). - * - * @type {number} - * @default Infinity - */ - maxDistance: number; - /** - * How far you can zoom in (orthographic camera only). - * - * @type {number} - * @default 0 - */ - minZoom: number; - /** - * How far you can zoom out (orthographic camera only). - * - * @type {number} - * @default Infinity - */ - maxZoom: number; - /** - * How close you can get the target to the 3D `cursor`. - * - * @type {number} - * @default 0 - */ - minTargetRadius: number; - /** - * How far you can move the target from the 3D `cursor`. - * - * @type {number} - * @default Infinity - */ - maxTargetRadius: number; - /** - * How far you can orbit vertically, lower limit. Range is `[0, Math.PI]` radians. - * - * @type {number} - * @default 0 - */ - minPolarAngle: number; - /** - * How far you can orbit vertically, upper limit. Range is `[0, Math.PI]` radians. - * - * @type {number} - * @default Math.PI - */ - maxPolarAngle: number; - /** - * How far you can orbit horizontally, lower limit. If set, the interval `[ min, max ]` - * must be a sub-interval of `[ - 2 PI, 2 PI ]`, with `( max - min < 2 PI )`. - * - * @type {number} - * @default -Infinity - */ - minAzimuthAngle: number; - /** - * How far you can orbit horizontally, upper limit. If set, the interval `[ min, max ]` - * must be a sub-interval of `[ - 2 PI, 2 PI ]`, with `( max - min < 2 PI )`. - * - * @type {number} - * @default -Infinity - */ - maxAzimuthAngle: number; - /** - * Set to `true` to enable damping (inertia), which can be used to give a sense of weight - * to the controls. Note that if this is enabled, you must call `update()` in your animation - * loop. - * - * @type {boolean} - * @default false - */ - enableDamping: boolean; - /** - * The damping inertia used if `enableDamping` is set to `true`. - * - * Note that for this to work, you must call `update()` in your animation loop. - * - * @type {number} - * @default 0.05 - */ - dampingFactor: number; - /** - * Enable or disable zooming (dollying) of the camera. - * - * @type {boolean} - * @default true - */ - enableZoom: boolean; - /** - * Speed of zooming / dollying. - * - * @type {number} - * @default 1 - */ - zoomSpeed: number; - /** - * Enable or disable horizontal and vertical rotation of the camera. - * - * Note that it is possible to disable a single axis by setting the min and max of the - * `minPolarAngle` or `minAzimuthAngle` to the same value, which will cause the vertical - * or horizontal rotation to be fixed at that value. - * - * @type {boolean} - * @default true - */ - enableRotate: boolean; - /** - * Speed of rotation. - * - * @type {number} - * @default 1 - */ - rotateSpeed: number; - /** - * How fast to rotate the camera when the keyboard is used. - * - * @type {number} - * @default 1 - */ - keyRotateSpeed: number; - /** - * Enable or disable camera panning. - * - * @type {boolean} - * @default true - */ - enablePan: boolean; - /** - * Speed of panning. - * - * @type {number} - * @default 1 - */ - panSpeed: number; - /** - * Defines how the camera's position is translated when panning. If `true`, the camera pans - * in screen space. Otherwise, the camera pans in the plane orthogonal to the camera's up - * direction. - * - * @type {boolean} - * @default true - */ - screenSpacePanning: boolean; - /** - * How fast to pan the camera when the keyboard is used in - * pixels per keypress. - * - * @type {number} - * @default 7 - */ - keyPanSpeed: number; - /** - * Setting this property to `true` allows to zoom to the cursor's position. - * - * @type {boolean} - * @default false - */ - zoomToCursor: boolean; - /** - * Set to true to automatically rotate around the target - * - * Note that if this is enabled, you must call `update()` in your animation loop. - * If you want the auto-rotate speed to be independent of the frame rate (the refresh - * rate of the display), you must pass the time `deltaTime`, in seconds, to `update()`. - * - * @type {boolean} - * @default false - */ - autoRotate: boolean; - /** - * How fast to rotate around the target if `autoRotate` is `true`. The default equates to 30 seconds - * per orbit at 60fps. - * - * Note that if `autoRotate` is enabled, you must call `update()` in your animation loop. - * - * @type {number} - * @default 2 - */ - autoRotateSpeed: number; - /** - * Used internally by `saveState()` and `reset()`. - * - * @type {Vector3} - */ - target0: Vector3; - /** - * Used internally by `saveState()` and `reset()`. - * - * @type {Vector3} - */ - position0: Vector3; - /** - * Used internally by `saveState()` and `reset()`. - * - * @type {number} - */ - zoom0: number; - _cursorStyle: string; - _domElementKeyEvents: HTMLElement | null; - _lastPosition: Vector3; - _lastQuaternion: Quaternion; - _lastTargetPosition: Vector3; - _quat: Quaternion; - _quatInverse: Quaternion; - _spherical: Spherical; - _sphericalDelta: Spherical; - _scale: number; - _panOffset: Vector3; - _rotateStart: Vector2; - _rotateEnd: Vector2; - _rotateDelta: Vector2; - _panStart: Vector2; - _panEnd: Vector2; - _panDelta: Vector2; - _dollyStart: Vector2; - _dollyEnd: Vector2; - _dollyDelta: Vector2; - _dollyDirection: Vector3; - _mouse: Vector2; - _performCursorZoom: boolean; - _pointers: any[]; - _pointerPositions: {}; - _controlActive: boolean; - _onPointerMove: typeof onPointerMove; - _onPointerDown: typeof onPointerDown; - _onPointerUp: typeof onPointerUp; - _onContextMenu: typeof onContextMenu; - _onMouseWheel: typeof onMouseWheel; - _onKeyDown: typeof onKeyDown; - _onTouchStart: typeof onTouchStart; - _onTouchMove: typeof onTouchMove; - _onMouseDown: typeof onMouseDown; - _onMouseMove: typeof onMouseMove; - _interceptControlDown: typeof interceptControlDown; - _interceptControlUp: typeof interceptControlUp; - /** - * Defines the visual representation of the cursor. - * - * @type {('auto'|'grab')} - * @default 'auto' - */ - set cursorStyle(type: string); - get cursorStyle(): string; - connect(element: any): void; - /** - * Get the current vertical rotation, in radians. - * - * @return {number} The current vertical rotation, in radians. - */ - getPolarAngle(): number; - /** - * Get the current horizontal rotation, in radians. - * - * @return {number} The current horizontal rotation, in radians. - */ - getAzimuthalAngle(): number; - /** - * Returns the distance from the camera to the target. - * - * @return {number} The distance from the camera to the target. - */ - getDistance(): number; - /** - * Adds key event listeners to the given DOM element. - * `window` is a recommended argument for using this method. - * - * @param {HTMLElement} domElement - The DOM element - */ - listenToKeyEvents(domElement: HTMLElement): void; - /** - * Removes the key event listener previously defined with `listenToKeyEvents()`. - */ - stopListenToKeyEvents(): void; - /** - * Save the current state of the controls. This can later be recovered with `reset()`. - */ - saveState(): void; - /** - * Reset the controls to their state from either the last time the `saveState()` - * was called, or the initial state. - */ - reset(): void; - /** - * Programmatically pan the camera. - * - * @param {number} deltaX - The horizontal pan amount in pixels. - * @param {number} deltaY - The vertical pan amount in pixels. - */ - pan(deltaX: number, deltaY: number): void; - /** - * Programmatically dolly in (zoom in for perspective camera). - * - * @param {number} dollyScale - The dolly scale factor. - */ - dollyIn(dollyScale: number): void; - /** - * Programmatically dolly out (zoom out for perspective camera). - * - * @param {number} dollyScale - The dolly scale factor. - */ - dollyOut(dollyScale: number): void; - /** - * Programmatically rotate the camera left (around the vertical axis). - * - * @param {number} angle - The rotation angle in radians. - */ - rotateLeft(angle: number): void; - /** - * Programmatically rotate the camera up (around the horizontal axis). - * - * @param {number} angle - The rotation angle in radians. - */ - rotateUp(angle: number): void; - update(deltaTime?: null): boolean; - _getAutoRotationAngle(deltaTime: any): number; - _getZoomScale(delta: any): number; - _rotateLeft(angle: any): void; - _rotateUp(angle: any): void; - _panLeft(distance: any, objectMatrix: any): void; - _panUp(distance: any, objectMatrix: any): void; - _pan(deltaX: any, deltaY: any): void; - _dollyOut(dollyScale: any): void; - _dollyIn(dollyScale: any): void; - _updateZoomParameters(x: any, y: any): void; - _clampDistance(dist: any): number; - _handleMouseDownRotate(event: any): void; - _handleMouseDownDolly(event: any): void; - _handleMouseDownPan(event: any): void; - _handleMouseMoveRotate(event: any): void; - _handleMouseMoveDolly(event: any): void; - _handleMouseMovePan(event: any): void; - _handleMouseWheel(event: any): void; - _handleKeyDown(event: any): void; - _handleTouchStartRotate(event: any): void; - _handleTouchStartPan(event: any): void; - _handleTouchStartDolly(event: any): void; - _handleTouchStartDollyPan(event: any): void; - _handleTouchStartDollyRotate(event: any): void; - _handleTouchMoveRotate(event: any): void; - _handleTouchMovePan(event: any): void; - _handleTouchMoveDolly(event: any): void; - _handleTouchMoveDollyPan(event: any): void; - _handleTouchMoveDollyRotate(event: any): void; - _addPointer(event: any): void; - _removePointer(event: any): void; - _isTrackingPointer(event: any): boolean; - _trackPointer(event: any): void; - _getSecondPointerPosition(event: any): any; - _customWheelEvent(event: any): { - clientX: any; - clientY: any; - deltaY: any; - }; -} -import { Controls } from 'three'; -import { Vector3 } from 'three'; -import { Quaternion } from 'three'; -import { Spherical } from 'three'; -import { Vector2 } from 'three'; -declare function onPointerMove(event: any): void; -declare function onPointerDown(event: any): void; -declare function onPointerUp(event: any): void; -declare class onPointerUp { - constructor(event: any); - state: number | undefined; -} -declare function onContextMenu(event: any): void; -declare function onMouseWheel(event: any): void; -declare function onKeyDown(event: any): void; -declare function onTouchStart(event: any): void; -declare class onTouchStart { - constructor(event: any); - state: number | undefined; -} -declare function onTouchMove(event: any): void; -declare class onTouchMove { - constructor(event: any); - state: number; -} -declare function onMouseDown(event: any): void; -declare class onMouseDown { - constructor(event: any); - state: number | undefined; -} -declare function onMouseMove(event: any): void; -declare function interceptControlDown(event: any): void; -declare class interceptControlDown { - constructor(event: any); - _controlActive: boolean | undefined; -} -declare function interceptControlUp(event: any): void; -declare class interceptControlUp { - constructor(event: any); - _controlActive: boolean | undefined; -} -export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/controls/PointerLockControls.d.ts b/jsdoc-testing/jsdoc/examples/jsm/controls/PointerLockControls.d.ts deleted file mode 100644 index 7cfa4f7b6..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/controls/PointerLockControls.d.ts +++ /dev/null @@ -1,105 +0,0 @@ -/** - * The implementation of this class is based on the [Pointer Lock API](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API). - * `PointerLockControls` is a perfect choice for first person 3D games. - * - * ```js - * const controls = new PointerLockControls( camera, document.body ); - * - * // add event listener to show/hide a UI (e.g. the game's menu) - * controls.addEventListener( 'lock', function () { - * - * menu.style.display = 'none'; - * - * } ); - * - * controls.addEventListener( 'unlock', function () { - * - * menu.style.display = 'block'; - * - * } ); - * ``` - * - * @augments Controls - * @three_import import { PointerLockControls } from 'three/addons/controls/PointerLockControls.js'; - */ -export class PointerLockControls extends Controls { - /** - * Constructs a new controls instance. - * - * @param {Camera} camera - The camera that is managed by the controls. - * @param {?HTMLElement} domElement - The HTML element used for event listeners. - */ - constructor(camera: Camera, domElement?: HTMLElement | null); - /** - * Whether the controls are locked or not. - * - * @type {boolean} - * @readonly - * @default false - */ - readonly isLocked: boolean; - /** - * Camera pitch, lower limit. Range is '[0, Math.PI]' in radians. - * - * @type {number} - * @default 0 - */ - minPolarAngle: number; - /** - * Camera pitch, upper limit. Range is '[0, Math.PI]' in radians. - * - * @type {number} - * @default Math.PI - */ - maxPolarAngle: number; - /** - * Multiplier for how much the pointer movement influences the camera rotation. - * - * @type {number} - * @default 1 - */ - pointerSpeed: number; - _onMouseMove: typeof onMouseMove; - _onPointerlockChange: typeof onPointerlockChange; - _onPointerlockError: typeof onPointerlockError; - connect(element: any): void; - /** - * Returns the look direction of the camera. - * - * @param {Vector3} v - The target vector that is used to store the method's result. - * @return {Vector3} The normalized direction vector. - */ - getDirection(v: Vector3): Vector3; - /** - * Moves the camera forward parallel to the xz-plane. Assumes camera.up is y-up. - * - * @param {number} distance - The signed distance. - */ - moveForward(distance: number): void; - /** - * Moves the camera sidewards parallel to the xz-plane. - * - * @param {number} distance - The signed distance. - */ - moveRight(distance: number): void; - /** - * Activates the pointer lock. - * - * @param {boolean} [unadjustedMovement=false] - Disables OS-level adjustment for mouse acceleration, and accesses raw mouse input instead. - * Setting it to true will disable mouse acceleration. - */ - lock(unadjustedMovement?: boolean): void; - /** - * Exits the pointer lock. - */ - unlock(): void; -} -import { Controls } from 'three'; -declare function onMouseMove(event: any): void; -declare function onPointerlockChange(): void; -declare class onPointerlockChange { - isLocked: boolean; -} -declare function onPointerlockError(): void; -import { Vector3 } from 'three'; -export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/controls/TrackballControls.d.ts b/jsdoc-testing/jsdoc/examples/jsm/controls/TrackballControls.d.ts deleted file mode 100644 index b118d58fd..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/controls/TrackballControls.d.ts +++ /dev/null @@ -1,213 +0,0 @@ -/** - * This class is similar to {@link OrbitControls}. However, it does not maintain a constant camera - * `up` vector. That means if the camera orbits over the “north” and “south” poles, it does not flip - * to stay "right side up". - * - * @augments Controls - * @three_import import { TrackballControls } from 'three/addons/controls/TrackballControls.js'; - */ -export class TrackballControls extends Controls { - /** - * Constructs a new controls instance. - * - * @param {Object3D} object - The object that is managed by the controls. - * @param {?HTMLElement} domElement - The HTML element used for event listeners. - */ - constructor(object: Object3D, domElement?: HTMLElement | null); - /** - * Represents the properties of the screen. Automatically set when `handleResize()` is called. - * - * @type {Object} - * @readonly - */ - readonly screen: Object; - /** - * The rotation speed. - * - * @type {number} - * @default 1 - */ - rotateSpeed: number; - /** - * The zoom speed. - * - * @type {number} - * @default 1.2 - */ - zoomSpeed: number; - /** - * The pan speed. - * - * @type {number} - * @default 0.3 - */ - panSpeed: number; - /** - * Whether rotation is disabled or not. - * - * @type {boolean} - * @default false - */ - noRotate: boolean; - /** - * Whether zooming is disabled or not. - * - * @type {boolean} - * @default false - */ - noZoom: boolean; - /** - * Whether panning is disabled or not. - * - * @type {boolean} - * @default false - */ - noPan: boolean; - /** - * Whether damping is disabled or not. - * - * @type {boolean} - * @default false - */ - staticMoving: boolean; - /** - * Defines the intensity of damping. Only considered if `staticMoving` is set to `false`. - * - * @type {number} - * @default 0.2 - */ - dynamicDampingFactor: number; - /** - * How far you can dolly in (perspective camera only). - * - * @type {number} - * @default 0 - */ - minDistance: number; - /** - * How far you can dolly out (perspective camera only). - * - * @type {number} - * @default Infinity - */ - maxDistance: number; - /** - * How far you can zoom in (orthographic camera only). - * - * @type {number} - * @default 0 - */ - minZoom: number; - /** - * How far you can zoom out (orthographic camera only). - * - * @type {number} - * @default Infinity - */ - maxZoom: number; - /** - * The focus point of the controls. - * - * @type {Vector3} - */ - target: Vector3; - keyState: number; - _lastPosition: Vector3; - _lastZoom: number; - _touchZoomDistanceStart: number; - _touchZoomDistanceEnd: number; - _lastAngle: number; - _eye: Vector3; - _movePrev: Vector2; - _moveCurr: Vector2; - _lastAxis: Vector3; - _zoomStart: Vector2; - _zoomEnd: Vector2; - _panStart: Vector2; - _panEnd: Vector2; - _pointers: any[]; - _pointerPositions: {}; - _onPointerMove: typeof onPointerMove; - _onPointerDown: typeof onPointerDown; - _onPointerUp: typeof onPointerUp; - _onPointerCancel: typeof onPointerCancel; - _onContextMenu: typeof onContextMenu; - _onMouseWheel: typeof onMouseWheel; - _onKeyDown: typeof onKeyDown; - _onKeyUp: typeof onKeyUp; - _onTouchStart: typeof onTouchStart; - _onTouchMove: typeof onTouchMove; - _onTouchEnd: typeof onTouchEnd; - _onMouseDown: typeof onMouseDown; - _onMouseMove: typeof onMouseMove; - _onMouseUp: typeof onMouseUp; - _target0: Vector3; - _position0: any; - _up0: Vector3; - _zoom0: any; - connect(element: any): void; - /** - * Must be called if the application window is resized. - */ - handleResize(): void; - /** - * Resets the controls to its initial state. - */ - reset(): void; - _panCamera(): void; - _rotateCamera(): void; - _zoomCamera(): void; - _getMouseOnScreen(pageX: any, pageY: any): Vector2; - _getMouseOnCircle(pageX: any, pageY: any): Vector2; - _addPointer(event: any): void; - _removePointer(event: any): void; - _trackPointer(event: any): void; - _getSecondPointerPosition(event: any): any; - _checkDistances(): void; -} -import { Controls } from 'three'; -import { Vector3 } from 'three'; -import { Vector2 } from 'three'; -declare function onPointerMove(event: any): void; -declare function onPointerDown(event: any): void; -declare function onPointerUp(event: any): void; -declare function onPointerCancel(event: any): void; -declare function onContextMenu(event: any): void; -declare function onMouseWheel(event: any): void; -declare function onKeyDown(event: any): void; -declare class onKeyDown { - constructor(event: any); - keyState: number | undefined; -} -declare function onKeyUp(): void; -declare class onKeyUp { - keyState: number | undefined; -} -declare function onTouchStart(event: any): void; -declare class onTouchStart { - constructor(event: any); - state: number; - _touchZoomDistanceEnd: number | undefined; - _touchZoomDistanceStart: number | undefined; -} -declare function onTouchMove(event: any): void; -declare class onTouchMove { - constructor(event: any); - _touchZoomDistanceEnd: number | undefined; -} -declare function onTouchEnd(event: any): void; -declare class onTouchEnd { - constructor(event: any); - state: number | undefined; -} -declare function onMouseDown(event: any): void; -declare class onMouseDown { - constructor(event: any); - state: number; -} -declare function onMouseMove(event: any): void; -declare function onMouseUp(): void; -declare class onMouseUp { - state: number; -} -export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/controls/TransformControls.d.ts b/jsdoc-testing/jsdoc/examples/jsm/controls/TransformControls.d.ts deleted file mode 100644 index fbb81cc61..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/controls/TransformControls.d.ts +++ /dev/null @@ -1,192 +0,0 @@ -/** - * This class can be used to transform objects in 3D space by adapting a similar interaction model - * of DCC tools like Blender. Unlike other controls, it is not intended to transform the scene's camera. - * - * `TransformControls` expects that its attached 3D object is part of the scene graph. - * - * @augments Controls - * @three_import import { TransformControls } from 'three/addons/controls/TransformControls.js'; - */ -export class TransformControls extends Controls { - /** - * Constructs a new controls instance. - * - * @param {Camera} camera - The camera of the rendered scene. - * @param {?HTMLElement} domElement - The HTML element used for event listeners. - */ - constructor(camera: Camera, domElement?: HTMLElement | null); - _root: TransformControlsRoot; - _gizmo: TransformControlsGizmo; - _plane: TransformControlsPlane; - /** - * The viewport rectangle, in logical (CSS) pixels with the origin at the lower-left - * of the canvas. Set this when the renderer uses a sub-canvas viewport so pointer - * coordinates map to the correct region. If `null`, the full canvas is used. - * - * @name TransformControls#viewport - * @type {?Vector4} - * @default null - */ - viewport: Vector4 | null; - _offset: Vector3; - _startNorm: Vector3; - _endNorm: Vector3; - _cameraScale: Vector3; - _parentPosition: Vector3; - _parentQuaternion: Quaternion; - _parentQuaternionInv: Quaternion; - _parentScale: Vector3; - _worldScaleStart: Vector3; - _worldQuaternionInv: Quaternion; - _worldScale: Vector3; - _positionStart: Vector3; - _quaternionStart: Quaternion; - _scaleStart: Vector3; - _getPointer: typeof getPointer; - _onPointerDown: typeof onPointerDown; - _onPointerHover: typeof onPointerHover; - _onPointerMove: typeof onPointerMove; - _onPointerUp: typeof onPointerUp; - connect(element: any): void; - /** - * Returns the visual representation of the controls. Add the helper to your scene to - * visually transform the attached 3D object. - * - * @return {TransformControlsRoot} The helper. - */ - getHelper(): TransformControlsRoot; - pointerHover(pointer: any): void; - axis: any; - pointerDown(pointer: any): void; - dragging: boolean | undefined; - pointerMove(pointer: any): void; - rotationAngle: any; - pointerUp(pointer: any): void; - /** - * Sets the 3D object that should be transformed and ensures the controls UI is visible. - * - * @param {Object3D} object - The 3D object that should be transformed. - * @return {TransformControls} A reference to this controls. - */ - attach(object: Object3D): TransformControls; - /** - * Removes the current 3D object from the controls and makes the helper UI invisible. - * - * @return {TransformControls} A reference to this controls. - */ - detach(): TransformControls; - /** - * Resets the object's position, rotation and scale to when the current transform began. - */ - reset(): void; - /** - * Returns the raycaster that is used for user interaction. This object is shared between all - * instances of `TransformControls`. - * - * @returns {Raycaster} The internal raycaster. - */ - getRaycaster(): Raycaster; - /** - * Returns the transformation mode. - * - * @returns {'translate'|'rotate'|'scale'} The transformation mode. - */ - getMode(): "translate" | "rotate" | "scale"; - /** - * Sets the given transformation mode. - * - * @param {'translate'|'rotate'|'scale'} mode - The transformation mode to set. - */ - setMode(mode: "translate" | "rotate" | "scale"): void; - mode: "rotate" | "scale" | "translate" | undefined; - /** - * Sets the translation snap. - * - * @param {?number} translationSnap - The translation snap to set. - */ - setTranslationSnap(translationSnap: number | null): void; - translationSnap: number | null | undefined; - /** - * Sets the rotation snap. - * - * @param {?number} rotationSnap - The rotation snap to set. - */ - setRotationSnap(rotationSnap: number | null): void; - rotationSnap: number | null | undefined; - /** - * Sets the scale snap. - * - * @param {?number} scaleSnap - The scale snap to set. - */ - setScaleSnap(scaleSnap: number | null): void; - scaleSnap: number | null | undefined; - /** - * Sets the size of the helper UI. - * - * @param {number} size - The size to set. - */ - setSize(size: number): void; - size: number | undefined; - /** - * Sets the coordinate space in which transformations are applied. - * - * @param {'world'|'local'} space - The space to set. - */ - setSpace(space: "world" | "local"): void; - space: "world" | "local" | undefined; - /** - * Sets the colors of the control's gizmo. - * - * @param {number|Color|string} xAxis - The x-axis color. - * @param {number|Color|string} yAxis - The y-axis color. - * @param {number|Color|string} zAxis - The z-axis color. - * @param {number|Color|string} active - The color for active elements. - */ - setColors(xAxis: number | Color | string, yAxis: number | Color | string, zAxis: number | Color | string, active: number | Color | string): void; -} -export class TransformControlsGizmo extends Object3D { - isTransformControlsGizmo: boolean; - type: string; - materialLib: { - xAxis: import("three").Material; - yAxis: import("three").Material; - zAxis: import("three").Material; - active: import("three").Material; - xAxisTransparent: import("three").Material; - yAxisTransparent: import("three").Material; - zAxisTransparent: import("three").Material; - activeTransparent: import("three").Material; - }; - gizmo: {}; - picker: {}; - helper: {}; - updateMatrixWorld(force: any): void; -} -export class TransformControlsPlane extends Mesh { - constructor(); - isTransformControlsPlane: boolean; - updateMatrixWorld(force: any): void; -} -import { Controls } from 'three'; -declare class TransformControlsRoot extends Object3D { - constructor(controls: any); - isTransformControlsRoot: boolean; - controls: any; - updateMatrixWorld(force: any): void; - dispose(): void; -} -import { Vector3 } from 'three'; -import { Quaternion } from 'three'; -declare function getPointer(event: any): { - x: number; - y: number; - button: any; -}; -declare function onPointerDown(event: any): void; -declare function onPointerHover(event: any): void; -declare function onPointerMove(event: any): void; -declare function onPointerUp(event: any): void; -import { Object3D } from 'three'; -import { Raycaster } from 'three'; -import { Mesh } from 'three'; -export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/csm/CSM.d.ts b/jsdoc-testing/jsdoc/examples/jsm/csm/CSM.d.ts deleted file mode 100644 index ed5c7f8ee..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/csm/CSM.d.ts +++ /dev/null @@ -1,214 +0,0 @@ -/** - * An implementation of Cascade Shadow Maps (CSM). - * - * This module can only be used with {@link WebGLRenderer}. When using {@link WebGPURenderer}, - * use {@link CSMShadowNode} instead. - * - * @three_import import { CSM } from 'three/addons/csm/CSM.js'; - */ -export class CSM { - /** - * Constructs a new CSM instance. - * - * @param {CSM~Data} data - The CSM data. - */ - constructor(data: any); - /** - * The scene's camera. - * - * @type {Camera} - */ - camera: Camera; - /** - * The parent object, usually the scene. - * - * @type {Object3D} - */ - parent: Object3D; - /** - * The number of cascades. - * - * @type {number} - * @default 3 - */ - cascades: number; - /** - * The maximum far value. - * - * @type {number} - * @default 100000 - */ - maxFar: number; - /** - * The frustum split mode. - * - * @type {('practical'|'uniform'|'logarithmic'|'custom')} - * @default 'practical' - */ - mode: ("practical" | "uniform" | "logarithmic" | "custom"); - /** - * The shadow map size. - * - * @type {number} - * @default 2048 - */ - shadowMapSize: number; - /** - * The shadow bias. - * - * @type {number} - * @default 0.000001 - */ - shadowBias: number; - /** - * The light direction. - * - * @type {Vector3} - */ - lightDirection: Vector3; - /** - * The light intensity. - * - * @type {number} - * @default 3 - */ - lightIntensity: number; - /** - * The light near value. - * - * @type {number} - * @default 1 - */ - lightNear: number; - /** - * The light far value. - * - * @type {number} - * @default 2000 - */ - lightFar: number; - /** - * The light margin. - * - * @type {number} - * @default 200 - */ - lightMargin: number; - /** - * Custom split callback when using `mode='custom'`. - * - * @type {Function} - */ - customSplitsCallback: Function; - /** - * Whether to fade between cascades or not. - * - * @type {boolean} - * @default false - */ - fade: boolean; - /** - * The main frustum. - * - * @type {CSMFrustum} - */ - mainFrustum: CSMFrustum; - /** - * An array of frustums representing the cascades. - * - * @type {Array} - */ - frustums: Array; - /** - * An array of numbers in the range `[0,1]` the defines how the - * mainCSM frustum should be split up. - * - * @type {Array} - */ - breaks: Array; - /** - * An array of directional lights which cast the shadows for - * the different cascades. There is one directional light for each - * cascade. - * - * @type {Array} - */ - lights: Array; - /** - * A Map holding enhanced material shaders. - * - * @type {Map} - */ - shaders: Map; - /** - * Creates the directional lights of this CSM instance. - * - * @private - */ - private _createLights; - /** - * Inits the cascades according to the scene's camera and breaks configuration. - * - * @private - */ - private _initCascades; - /** - * Updates the shadow bounds of this CSM instance. - * - * @private - */ - private _updateShadowBounds; - /** - * Computes the breaks of this CSM instance based on the scene's camera, number of cascades - * and the selected split mode. - * - * @private - */ - private _getBreaks; - /** - * Updates the CSM. This method must be called in your animation loop before - * calling `renderer.render()`. - */ - update(): void; - /** - * Injects the CSM shader enhancements into the built-in materials. - * - * @private - */ - private _injectInclude; - /** - * Applications must call this method for all materials that should be affected by CSM. - * - * @param {Material} material - The material to setup for CSM support. - */ - setupMaterial(material: Material): void; - /** - * Updates the CSM uniforms. - * - * @private - */ - private _updateUniforms; - /** - * Computes the extended breaks for the CSM uniforms. - * - * @private - * @param {Array} target - The target array that holds the extended breaks. - */ - private _getExtendedBreaks; - /** - * Applications must call this method every time they change camera or CSM settings. - */ - updateFrustums(): void; - /** - * Applications must call this method when they remove the CSM usage from their scene. - */ - remove(): void; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { Vector3 } from 'three'; -import { CSMFrustum } from './CSMFrustum.js'; -import { DirectionalLight } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/csm/CSMFrustum.d.ts b/jsdoc-testing/jsdoc/examples/jsm/csm/CSMFrustum.d.ts deleted file mode 100644 index d3c23f934..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/csm/CSMFrustum.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -/** - * ~Data - */ -export type CSMFrustum = { - /** - * - Whether this CSM frustum is used with WebGL or WebGPU. - */ - webGL?: boolean | undefined; - /** - * - Whether reversed depth buffer is enabled. - */ - reversedDepth?: boolean | undefined; - /** - * - A projection matrix usually of the scene's camera. - */ - projectionMatrix?: Matrix4 | undefined; - /** - * - The maximum far value. - */ - maxFar?: number | undefined; -}; -import { Matrix4 } from 'three'; -/** - * Represents the frustum of a CSM instance. - * - * @three_import import { CSMFrustum } from 'three/addons/csm/CSMFrustum.js'; - */ -export class CSMFrustum { - /** - * Constructs a new CSM frustum. - * - * @param {CSMFrustum~Data} [data] - The CSM data. - */ - constructor(data: any); - /** - * The zNear value. This value depends on whether the CSM - * is used with WebGL or WebGPU. Both API use different - * conventions for their projection matrices. - * - * @type {number} - */ - zNear: number; - /** - * The zFar value. - * - * @type {number} - */ - zFar: number; - /** - * An object representing the vertices of the near and - * far plane in view space. - * - * @type {Object} - */ - vertices: Object; - /** - * Setups this CSM frustum from the given projection matrix and max far value. - * - * @param {Matrix4} projectionMatrix - The projection matrix, usually of the scene's camera. - * @param {number} maxFar - The maximum far value. - * @returns {Object} An object representing the vertices of the near and far plane in view space. - */ - setFromProjectionMatrix(projectionMatrix: Matrix4, maxFar: number): Object; - /** - * Splits the CSM frustum by the given array. The new CSM frustum are pushed into the given - * target array. - * - * @param {Array} breaks - An array of numbers in the range `[0,1]` the defines how the - * CSM frustum should be split up. - * @param {Array} target - The target array that holds the new CSM frustums. - */ - split(breaks: Array, target: Array): void; - /** - * Transforms the given target CSM frustum into the different coordinate system defined by the - * given camera matrix. - * - * @param {Matrix4} cameraMatrix - The matrix that defines the new coordinate system. - * @param {CSMFrustum} target - The CSM to convert. - */ - toSpace(cameraMatrix: Matrix4, target: CSMFrustum): void; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/csm/CSMHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/csm/CSMHelper.d.ts deleted file mode 100644 index b225bc4b2..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/csm/CSMHelper.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * A helper for visualizing the cascades of a CSM instance. - * - * @augments Group - * @three_import import { CSMHelper } from 'three/addons/csm/CSMHelper.js'; - */ -export class CSMHelper extends Group { - /** - * Constructs a new CSM helper. - * - * @param {CSM|CSMShadowNode} csm - The CSM instance to visualize. - */ - constructor(csm: CSM | CSMShadowNode); - /** - * The CSM instance to visualize. - * - * @type {CSM|CSMShadowNode} - */ - csm: CSM | CSMShadowNode; - /** - * Whether to display the CSM frustum or not. - * - * @type {boolean} - * @default true - */ - displayFrustum: boolean; - /** - * Whether to display the cascade planes or not. - * - * @type {boolean} - * @default true - */ - displayPlanes: boolean; - /** - * Whether to display the shadow bounds or not. - * - * @type {boolean} - * @default true - */ - displayShadowBounds: boolean; - frustumLines: LineSegments; - cascadeLines: any[]; - cascadePlanes: any[]; - shadowLines: any[]; - /** - * This method must be called if one of the `display*` properties is changed at runtime. - */ - updateVisibility(): void; - /** - * Updates the helper. This method should be called in the app's animation loop. - */ - update(): void; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { Group } from 'three'; -import { LineSegments } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/csm/CSMShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/csm/CSMShader.d.ts deleted file mode 100644 index 8bcc7f719..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/csm/CSMShader.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @module CSMShader - * @three_import import { CSMShader } from 'three/addons/csm/CSMShader.js'; - */ -/** - * The object that holds the GLSL enhancements to enable CSM. This - * code is injected into the built-in material shaders by {@link CSM}. - * - * @type {Object} - */ -export const CSMShader: Object; diff --git a/jsdoc-testing/jsdoc/examples/jsm/csm/CSMShadowNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/csm/CSMShadowNode.d.ts deleted file mode 100644 index 3a66b24b5..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/csm/CSMShadowNode.d.ts +++ /dev/null @@ -1,175 +0,0 @@ -/** - * ~Data - */ -export type CSMShadowNode = { - /** - * - The number of cascades. - */ - cascades?: number | undefined; - /** - * - The maximum far value. - */ - maxFar?: number | undefined; - /** - * - The frustum split mode. - */ - mode?: "uniform" | "custom" | "practical" | "logarithmic" | undefined; - /** - * - Custom split callback when using `mode='custom'`. - */ - customSplitsCallback?: Function | undefined; - /** - * - The light margin. - */ - lightMargin?: number | undefined; -}; -/** - * An implementation of Cascade Shadow Maps (CSM). - * - * This module can only be used with {@link WebGPURenderer}. When using {@link WebGLRenderer}, - * use {@link CSM} instead. - * - * @augments ShadowBaseNode - * @three_import import { CSMShadowNode } from 'three/addons/csm/CSMShadowNode.js'; - */ -export class CSMShadowNode extends ShadowBaseNode { - /** - * Constructs a new CSM shadow node. - * - * @param {DirectionalLight} light - The CSM light. - * @param {CSMShadowNode~Data} [data={}] - The CSM data. - */ - constructor(light: DirectionalLight, data?: {}); - /** - * The scene's camera. - * - * @type {?Camera} - * @default null - */ - camera: Camera | null; - /** - * The number of cascades. - * - * @type {number} - * @default 3 - */ - cascades: number; - /** - * The maximum far value. - * - * @type {number} - * @default 100000 - */ - maxFar: number; - /** - * The frustum split mode. - * - * @type {('practical'|'uniform'|'logarithmic'|'custom')} - * @default 'practical' - */ - mode: ("practical" | "uniform" | "logarithmic" | "custom"); - /** - * The light margin. - * - * @type {number} - * @default 200 - */ - lightMargin: number; - /** - * Custom split callback when using `mode='custom'`. - * - * @type {Function} - */ - customSplitsCallback: Function; - /** - * Whether to fade between cascades or not. - * - * @type {boolean} - * @default false - */ - fade: boolean; - /** - * An array of numbers in the range `[0,1]` the defines how the - * mainCSM frustum should be split up. - * - * @type {Array} - */ - breaks: Array; - _cascades: any[]; - /** - * The main frustum. - * - * @type {?CSMFrustum} - * @default null - */ - mainFrustum: CSMFrustum | null; - /** - * An array of frustums representing the cascades. - * - * @type {Array} - */ - frustums: Array; - /** - * An array of directional lights which cast the shadows for - * the different cascades. There is one directional light for each - * cascade. - * - * @type {Array} - */ - lights: Array; - _shadowNodes: any[]; - /** - * Inits the CSM shadow node. - * - * @private - * @param {NodeBuilder} builder - The node builder. - */ - private _init; - /** - * Inits the cascades according to the scene's camera and breaks configuration. - * - * @private - */ - private _initCascades; - /** - * Computes the breaks of this CSM instance based on the scene's camera, number of cascades - * and the selected split mode. - * - * @private - */ - private _getBreaks; - /** - * Sets the light breaks. - * - * @private - */ - private _setLightBreaks; - /** - * Updates the shadow bounds of this CSM instance. - * - * @private - */ - private _updateShadowBounds; - /** - * Applications must call this method every time they change camera or CSM settings. - */ - updateFrustums(): void; - /** - * Setups the TSL when using fading. - * - * @private - * @return {ShaderCallNodeInternal} - */ - private _setupFade; - /** - * Setups the TSL when no fading (default). - * - * @private - * @return {ShaderCallNodeInternal} - */ - private _setupStandard; - setup(builder: any): any; - updateBefore(): void; -} -import { ShadowBaseNode } from 'three/webgpu'; -import { CSMFrustum } from './CSMFrustum.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/curves/CurveExtras.d.ts b/jsdoc-testing/jsdoc/examples/jsm/curves/CurveExtras.d.ts deleted file mode 100644 index 98cb8b3f6..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/curves/CurveExtras.d.ts +++ /dev/null @@ -1,378 +0,0 @@ -/** - * A bunch of parametric curves - * - * Formulas collected from various sources - * http://mathworld.wolfram.com/HeartCurve.html - * http://en.wikipedia.org/wiki/Viviani%27s_curve - * http://www.mi.sanu.ac.rs/vismath/taylorapril2011/Taylor.pdf - * https://prideout.net/blog/old/blog/index.html@p=44.html - */ -/** - * A Granny Knot curve. - * - * @augments Curve - * @three_import import { GrannyKnot } from 'three/addons/curves/CurveExtras.js'; - */ -export class GrannyKnot extends Curve { - /** - * This method returns a vector in 3D space for the given interpolation factor. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector3} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector3): Vector3; -} -/** - * A heart curve. - * - * @augments Curve - * @three_import import { HeartCurve } from 'three/addons/curves/CurveExtras.js'; - */ -export class HeartCurve extends Curve { - /** - * Constructs a new heart curve. - * - * @param {number} [scale=5] - The curve's scale. - */ - constructor(scale?: number); - /** - * The curve's scale. - * - * @type {number} - * @default 5 - */ - scale: number; - /** - * This method returns a vector in 3D space for the given interpolation factor. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector3} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector3): Vector3; -} -/** - * A Viviani curve. - * - * @augments Curve - * @three_import import { VivianiCurve } from 'three/addons/curves/CurveExtras.js'; - */ -export class VivianiCurve extends Curve { - /** - * Constructs a new Viviani curve. - * - * @param {number} [scale=70] - The curve's scale. - */ - constructor(scale?: number); - /** - * The curve's scale. - * - * @type {number} - * @default 70 - */ - scale: number; - /** - * This method returns a vector in 3D space for the given interpolation factor. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector3} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector3): Vector3; -} -/** - * A knot curve. - * - * @augments Curve - * @three_import import { KnotCurve } from 'three/addons/curves/CurveExtras.js'; - */ -export class KnotCurve extends Curve { - /** - * This method returns a vector in 3D space for the given interpolation factor. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector3} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector3): Vector3; -} -/** - * A helix curve. - * - * @augments Curve - * @three_import import { HelixCurve } from 'three/addons/curves/CurveExtras.js'; - */ -export class HelixCurve extends Curve { - /** - * This method returns a vector in 3D space for the given interpolation factor. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector3} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector3): Vector3; -} -/** - * A Trefoil Knot. - * - * @augments Curve - * @three_import import { TrefoilKnot } from 'three/addons/curves/CurveExtras.js'; - */ -export class TrefoilKnot extends Curve { - /** - * Constructs a new Trefoil Knot. - * - * @param {number} [scale=10] - The curve's scale. - */ - constructor(scale?: number); - /** - * The curve's scale. - * - * @type {number} - * @default 10 - */ - scale: number; - /** - * This method returns a vector in 3D space for the given interpolation factor. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector3} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector3): Vector3; -} -/** - * A torus knot. - * - * @augments Curve - * @three_import import { TorusKnot } from 'three/addons/curves/CurveExtras.js'; - */ -export class TorusKnot extends Curve { - /** - * Constructs a new torus knot. - * - * @param {number} [scale=10] - The curve's scale. - */ - constructor(scale?: number); - /** - * The curve's scale. - * - * @type {number} - * @default 10 - */ - scale: number; - /** - * This method returns a vector in 3D space for the given interpolation factor. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector3} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector3): Vector3; -} -/** - * A Cinquefoil Knot. - * - * @augments Curve - * @three_import import { CinquefoilKnot } from 'three/addons/curves/CurveExtras.js'; - */ -export class CinquefoilKnot extends Curve { - /** - * Constructs a new Cinquefoil Knot. - * - * @param {number} [scale=10] - The curve's scale. - */ - constructor(scale?: number); - /** - * The curve's scale. - * - * @type {number} - * @default 10 - */ - scale: number; - /** - * This method returns a vector in 3D space for the given interpolation factor. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector3} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector3): Vector3; -} -/** - * A Trefoil Polynomial Knot. - * - * @augments Curve - * @three_import import { TrefoilPolynomialKnot } from 'three/addons/curves/CurveExtras.js'; - */ -export class TrefoilPolynomialKnot extends Curve { - /** - * Constructs a new Trefoil Polynomial Knot. - * - * @param {number} [scale=10] - The curve's scale. - */ - constructor(scale?: number); - /** - * The curve's scale. - * - * @type {number} - * @default 10 - */ - scale: number; - /** - * This method returns a vector in 3D space for the given interpolation factor. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector3} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector3): Vector3; -} -/** - * A Figure Eight Polynomial Knot. - * - * @augments Curve - * @three_import import { FigureEightPolynomialKnot } from 'three/addons/curves/CurveExtras.js'; - */ -export class FigureEightPolynomialKnot extends Curve { - /** - * Constructs a new Figure Eight Polynomial Knot. - * - * @param {number} [scale=1] - The curve's scale. - */ - constructor(scale?: number); - /** - * The curve's scale. - * - * @type {number} - * @default 1 - */ - scale: number; - /** - * This method returns a vector in 3D space for the given interpolation factor. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector3} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector3): Vector3; -} -/** - * A Decorated Torus Knot 4a. - * - * @augments Curve - * @three_import import { DecoratedTorusKnot4a } from 'three/addons/curves/CurveExtras.js'; - */ -export class DecoratedTorusKnot4a extends Curve { - /** - * Constructs a new Decorated Torus Knot 4a. - * - * @param {number} [scale=1] - The curve's scale. - */ - constructor(scale?: number); - /** - * The curve's scale. - * - * @type {number} - * @default 40 - */ - scale: number; - /** - * This method returns a vector in 3D space for the given interpolation factor. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector3} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector3): Vector3; -} -/** - * A Decorated Torus Knot 4b. - * - * @augments Curve - * @three_import import { DecoratedTorusKnot4b } from 'three/addons/curves/CurveExtras.js'; - */ -export class DecoratedTorusKnot4b extends Curve { - /** - * Constructs a new Decorated Torus Knot 4b. - * - * @param {number} [scale=1] - The curve's scale. - */ - constructor(scale?: number); - /** - * The curve's scale. - * - * @type {number} - * @default 40 - */ - scale: number; - /** - * This method returns a vector in 3D space for the given interpolation factor. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector3} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector3): Vector3; -} -/** - * A Decorated Torus Knot 5a. - * - * @augments Curve - * @three_import import { DecoratedTorusKnot5a } from 'three/addons/curves/CurveExtras.js'; - */ -export class DecoratedTorusKnot5a extends Curve { - /** - * Constructs a new Decorated Torus Knot 5a. - * - * @param {number} [scale=1] - The curve's scale. - */ - constructor(scale?: number); - /** - * The curve's scale. - * - * @type {number} - * @default 40 - */ - scale: number; - /** - * This method returns a vector in 3D space for the given interpolation factor. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector3} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector3): Vector3; -} -/** - * A Decorated Torus Knot 5c. - * - * @augments Curve - * @three_import import { DecoratedTorusKnot5c } from 'three/addons/curves/CurveExtras.js'; - */ -export class DecoratedTorusKnot5c extends Curve { - /** - * Constructs a new Decorated Torus Knot 5c. - * - * @param {number} [scale=1] - The curve's scale. - */ - constructor(scale?: number); - /** - * The curve's scale. - * - * @type {number} - * @default 40 - */ - scale: number; - /** - * This method returns a vector in 3D space for the given interpolation factor. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector3} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector3): Vector3; -} -import { Curve } from 'three'; -import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSCurve.d.ts b/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSCurve.d.ts deleted file mode 100644 index 3a2af704a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSCurve.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * This class represents a NURBS curve. - * - * Implementation is based on `(x, y [, z=0 [, w=1]])` control points with `w=weight`. - * - * @augments Curve - * @three_import import { NURBSCurve } from 'three/addons/curves/NURBSCurve.js'; - */ -export class NURBSCurve extends Curve { - /** - * Constructs a new NURBS curve. - * - * @param {number} degree - The NURBS degree. - * @param {Array} knots - The knots as a flat array of numbers. - * @param {Array} controlPoints - An array holding control points. - * @param {number} [startKnot] - Index of the start knot into the `knots` array. - * @param {number} [endKnot] - Index of the end knot into the `knots` array. - */ - constructor(degree: number, knots: Array, controlPoints: Array, startKnot?: number, endKnot?: number); - /** - * The NURBS degree. - * - * @type {number} - */ - degree: number; - /** - * The knots as a flat array of numbers. - * - * @type {Array} - */ - knots: Array; - /** - * An array of control points. - * - * @type {Array} - */ - controlPoints: Array; - /** - * Index of the start knot into the `knots` array. - * - * @type {number} - */ - startKnot: number; - /** - * Index of the end knot into the `knots` array. - * - * @type {number} - */ - endKnot: number; - /** - * This method returns a vector in 3D space for the given interpolation factor. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector3} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector3): Vector3; - /** - * Returns a unit vector tangent for the given interpolation factor. - * - * @param {number} t - The interpolation factor. - * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector3} The tangent vector. - */ - getTangent(t: number, optionalTarget?: Vector3): Vector3; - fromJSON(json: any): this; -} -import { Curve } from 'three'; -import { Vector4 } from 'three'; -import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSSurface.d.ts b/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSSurface.d.ts deleted file mode 100644 index f55a5954a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSSurface.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * This class represents a NURBS surface. - * - * Implementation is based on `(x, y [, z=0 [, w=1]])` control points with `w=weight`. - * - * @three_import import { NURBSSurface } from 'three/addons/curves/NURBSSurface.js'; - */ -export class NURBSSurface { - /** - * Constructs a new NURBS surface. - * - * @param {number} degree1 - The first NURBS degree. - * @param {number} degree2 - The second NURBS degree. - * @param {Array} knots1 - The first knots as a flat array of numbers. - * @param {Array} knots2 - The second knots as a flat array of numbers. - * @param {Array>} controlPoints - An array^2 holding control points. - */ - constructor(degree1: number, degree2: number, knots1: Array, knots2: Array, controlPoints: Array>); - /** - * The first NURBS degree. - * - * @type {number} - */ - degree1: number; - /** - * The second NURBS degree. - * - * @type {number} - */ - degree2: number; - /** - * The first knots as a flat array of numbers. - * - * @type {Array} - */ - knots1: Array; - /** - * The second knots as a flat array of numbers. - * - * @type {Array} - */ - knots2: Array; - /** - * An array holding arrays of control points. - * - * @type {Array>} - */ - controlPoints: Array>; - /** - * This method returns a vector in 3D space for the given interpolation factor. This vector lies on the NURBS surface. - * - * @param {number} t1 - The first interpolation factor representing the `u` position on the surface. Must be in the range `[0,1]`. - * @param {number} t2 - The second interpolation factor representing the `v` position on the surface. Must be in the range `[0,1]`. - * @param {Vector3} target - The target vector the result is written to. - */ - getPoint(t1: number, t2: number, target: Vector3): void; -} -import { Vector4 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSUtils.d.ts deleted file mode 100644 index 94b6a50e5..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSUtils.d.ts +++ /dev/null @@ -1,112 +0,0 @@ -/** - * @module NURBSUtils - * @three_import import * as NURBSUtils from 'three/addons/curves/NURBSUtils.js'; - */ -/** - * Finds knot vector span. - * - * @param {number} p - The degree. - * @param {number} u - The parametric value. - * @param {Array} U - The knot vector. - * @return {number} The span. - */ -export function findSpan(p: number, u: number, U: Array): number; -/** - * Calculates basis functions. See The NURBS Book, page 70, algorithm A2.2. - * - * @param {number} span - The span in which `u` lies. - * @param {number} u - The parametric value. - * @param {number} p - The degree. - * @param {Array} U - The knot vector. - * @return {Array} Array[p+1] with basis functions values. - */ -export function calcBasisFunctions(span: number, u: number, p: number, U: Array): Array; -/** - * Calculates B-Spline curve points. See The NURBS Book, page 82, algorithm A3.1. - * - * @param {number} p - The degree of the B-Spline. - * @param {Array} U - The knot vector. - * @param {Array} P - The control points - * @param {number} u - The parametric point. - * @return {Vector4} The point for given `u`. - */ -export function calcBSplinePoint(p: number, U: Array, P: Array, u: number): Vector4; -/** - * Calculates basis functions derivatives. See The NURBS Book, page 72, algorithm A2.3. - * - * @param {number} span - The span in which `u` lies. - * @param {number} u - The parametric point. - * @param {number} p - The degree. - * @param {number} n - number of derivatives to calculate - * @param {Array} U - The knot vector. - * @return {Array>} An array[n+1][p+1] with basis functions derivatives. - */ -export function calcBasisFunctionDerivatives(span: number, u: number, p: number, n: number, U: Array): Array>; -/** - * Calculates derivatives of a B-Spline. See The NURBS Book, page 93, algorithm A3.2. - * - * @param {number} p - The degree. - * @param {Array} U - The knot vector. - * @param {Array} P - The control points - * @param {number} u - The parametric point. - * @param {number} nd - The number of derivatives. - * @return {Array} An array[d+1] with derivatives. - */ -export function calcBSplineDerivatives(p: number, U: Array, P: Array, u: number, nd: number): Array; -/** - * Calculates "K over I". - * - * @param {number} k - The K value. - * @param {number} i - The I value. - * @return {number} k!/(i!(k-i)!) - */ -export function calcKoverI(k: number, i: number): number; -/** - * Calculates derivatives (0-nd) of rational curve. See The NURBS Book, page 127, algorithm A4.2. - * - * @param {Array} Pders - Array with derivatives. - * @return {Array} An array with derivatives for rational curve. - */ -export function calcRationalCurveDerivatives(Pders: Array): Array; -/** - * Calculates NURBS curve derivatives. See The NURBS Book, page 127, algorithm A4.2. - * - * @param {number} p - The degree. - * @param {Array} U - The knot vector. - * @param {Array} P - The control points in homogeneous space. - * @param {number} u - The parametric point. - * @param {number} nd - The number of derivatives. - * @return {Array} array with derivatives for rational curve. - */ -export function calcNURBSDerivatives(p: number, U: Array, P: Array, u: number, nd: number): Array; -/** - * Calculates a rational B-Spline surface point. See The NURBS Book, page 134, algorithm A4.3. - * - * @param {number} p - The first degree of B-Spline surface. - * @param {number} q - The second degree of B-Spline surface. - * @param {Array} U - The first knot vector. - * @param {Array} V - The second knot vector. - * @param {Array>} P - The control points in homogeneous space. - * @param {number} u - The first parametric point. - * @param {number} v - The second parametric point. - * @param {Vector3} target - The target vector. - */ -export function calcSurfacePoint(p: number, q: number, U: Array, V: Array, P: Array>, u: number, v: number, target: Vector3): void; -/** - * Calculates a rational B-Spline volume point. See The NURBS Book, page 134, algorithm A4.3. - * - * @param {number} p - The first degree of B-Spline surface. - * @param {number} q - The second degree of B-Spline surface. - * @param {number} r - The third degree of B-Spline surface. - * @param {Array} U - The first knot vector. - * @param {Array} V - The second knot vector. - * @param {Array} W - The third knot vector. - * @param {Array>>} P - The control points in homogeneous space. - * @param {number} u - The first parametric point. - * @param {number} v - The second parametric point. - * @param {number} w - The third parametric point. - * @param {Vector3} target - The target vector. - */ -export function calcVolumePoint(p: number, q: number, r: number, U: Array, V: Array, W: Array, P: Array>>, u: number, v: number, w: number, target: Vector3): void; -import { Vector4 } from 'three'; -import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSVolume.d.ts b/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSVolume.d.ts deleted file mode 100644 index a0ca96016..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/curves/NURBSVolume.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * This class represents a NURBS volume. - * - * Implementation is based on `(x, y [, z=0 [, w=1]])` control points with `w=weight`. - * - * @three_import import { NURBSVolume } from 'three/addons/curves/NURBSVolume.js'; - */ -export class NURBSVolume { - /** - * Constructs a new NURBS surface. - * - * @param {number} degree1 - The first NURBS degree. - * @param {number} degree2 - The second NURBS degree. - * @param {number} degree3 - The third NURBS degree. - * @param {Array} knots1 - The first knots as a flat array of numbers. - * @param {Array} knots2 - The second knots as a flat array of numbers. - * @param {Array} knots3 - The third knots as a flat array of numbers. - * @param {Array>>} controlPoints - An array^3 holding control points. - */ - constructor(degree1: number, degree2: number, degree3: number, knots1: Array, knots2: Array, knots3: Array, controlPoints: Array>>); - degree1: number; - degree2: number; - degree3: number; - knots1: number[]; - knots2: number[]; - knots3: number[]; - controlPoints: never[][]; - /** - * This method returns a vector in 3D space for the given interpolation factor. This vector lies within the NURBS volume. - * - * @param {number} t1 - The first interpolation factor representing the `u` position within the volume. Must be in the range `[0,1]`. - * @param {number} t2 - The second interpolation factor representing the `v` position within the volume. Must be in the range `[0,1]`. - * @param {number} t3 - The third interpolation factor representing the `w` position within the volume. Must be in the range `[0,1]`. - * @param {Vector3} target - The target vector the result is written to. - */ - getPoint(t1: number, t2: number, t3: number, target: Vector3): void; -} -import { Vector4 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/effects/AnaglyphEffect.d.ts b/jsdoc-testing/jsdoc/examples/jsm/effects/AnaglyphEffect.d.ts deleted file mode 100644 index 5b7946284..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/effects/AnaglyphEffect.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * A class that creates an anaglyph effect using physically-correct - * off-axis stereo projection. - * - * This implementation uses CameraUtils.frameCorners() to align stereo - * camera frustums to a virtual screen plane, providing accurate depth - * perception with zero parallax at the plane distance. - * - * Note that this class can only be used with {@link WebGLRenderer}. - * When using {@link WebGPURenderer}, use {@link AnaglyphPassNode}. - * - * @three_import import { AnaglyphEffect } from 'three/addons/effects/AnaglyphEffect.js'; - */ -export class AnaglyphEffect { - /** - * Constructs a new anaglyph effect. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {number} width - The width of the effect in physical pixels. - * @param {number} height - The height of the effect in physical pixels. - */ - constructor(renderer: WebGLRenderer, width?: number, height?: number); - colorMatrixLeft: Matrix3; - colorMatrixRight: Matrix3; - /** - * The interpupillary distance (eye separation) in world units. - * Typical human IPD is 0.064 meters (64mm). - * - * @type {number} - * @default 0.064 - */ - eyeSep: number; - /** - * The distance in world units from the viewer to the virtual - * screen plane where zero parallax (screen depth) occurs. - * Objects at this distance appear at the screen surface. - * Objects closer appear in front of the screen (negative parallax). - * Objects further appear behind the screen (positive parallax). - * - * The screen dimensions are derived from the camera's FOV and aspect ratio - * at this distance, ensuring the stereo view matches the camera's field of view. - * - * @type {number} - * @default 0.5 - */ - planeDistance: number; - /** - * Resizes the effect. - * - * @param {number} width - The width of the effect in logical pixels. - * @param {number} height - The height of the effect in logical pixels. - */ - setSize: (width: number, height: number) => void; - /** - * When using this effect, this method should be called instead of the - * default {@link WebGLRenderer#render}. - * - * @param {Object3D} scene - The scene to render. - * @param {Camera} camera - The camera. - */ - render: (scene: Object3D, camera: Camera) => void; - /** - * Frees internal resources. This method should be called - * when the effect is no longer required. - */ - dispose: () => void; -} -import { Matrix3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/effects/AsciiEffect.d.ts b/jsdoc-testing/jsdoc/examples/jsm/effects/AsciiEffect.d.ts deleted file mode 100644 index 2da2a39de..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/effects/AsciiEffect.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -/** - * ~Options - */ -export type AsciiEffect = { - /** - * - A higher value leads to more details. - */ - resolution?: number | undefined; - /** - * - The scale of the effect. - */ - scale?: number | undefined; - /** - * - Whether colors should be enabled or not. Better quality but slows down rendering. - */ - color?: boolean | undefined; - /** - * - Whether transparency should be enabled or not. - */ - alpha?: boolean | undefined; - /** - * - Whether blocked characters should be enabled or not. - */ - block?: boolean | undefined; - /** - * - Whether colors should be inverted or not. - */ - invert?: boolean | undefined; - /** - * - The string resolution. - */ - strResolution?: "high" | "low" | "medium" | undefined; -}; -/** - * A class that creates an ASCII effect. - * - * The ASCII generation is based on [jsascii](https://github.com/hassadee/jsascii/blob/master/jsascii.js). - * - * @three_import import { AsciiEffect } from 'three/addons/effects/AsciiEffect.js'; - */ -export class AsciiEffect { - /** - * Constructs a new ASCII effect. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {string} [charSet=' .:-=+*#%@'] - The char set. - * @param {AsciiEffect~Options} [options] - The configuration parameter. - */ - constructor(renderer: WebGLRenderer, charSet?: string, options?: {}); - /** - * Resizes the effect. - * - * @param {number} w - The width of the effect in logical pixels. - * @param {number} h - The height of the effect in logical pixels. - */ - setSize: (w: number, h: number) => void; - /** - * When using this effect, this method should be called instead of the - * default {@link WebGLRenderer#render}. - * - * @param {Object3D} scene - The scene to render. - * @param {Camera} camera - The camera. - */ - render: (scene: Object3D, camera: Camera) => void; - /** - * The DOM element of the effect. This element must be used instead of the - * default {@link WebGLRenderer#domElement}. - * - * @type {HTMLDivElement} - */ - domElement: HTMLDivElement; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/effects/OutlineEffect.d.ts b/jsdoc-testing/jsdoc/examples/jsm/effects/OutlineEffect.d.ts deleted file mode 100644 index 1d5312135..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/effects/OutlineEffect.d.ts +++ /dev/null @@ -1,89 +0,0 @@ -/** - * ~Options - */ -export type OutlineEffect = { - /** - * - The outline thickness. - */ - defaultThickness?: number | undefined; - /** - * - The outline color. - */ - defaultColor?: number[] | undefined; - /** - * - The outline alpha value. - */ - defaultAlpha?: number | undefined; - /** - * - Whether to keep alive cached internal materials or not. - */ - defaultKeepAlive?: boolean | undefined; -}; -/** - * An outline effect for toon shaders. - * - * Note that this class can only be used with {@link WebGLRenderer}. - * When using {@link WebGPURenderer}, use {@link ToonOutlinePassNode}. - * - * ```js - * const effect = new OutlineEffect( renderer ); - * - * function render() { - * - * effect.render( scene, camera ); - * - * } - * ``` - * - * @three_import import { OutlineEffect } from 'three/addons/effects/OutlineEffect.js'; - */ -export class OutlineEffect { - /** - * Constructs a new outline effect. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {OutlineEffect~Options} [parameters] - The configuration parameter. - */ - constructor(renderer: WebGLRenderer, parameters?: {}); - enabled: boolean; - /** - * When using this effect, this method should be called instead of the - * default {@link WebGLRenderer#render}. - * - * @param {Object3D} scene - The scene to render. - * @param {Camera} camera - The camera. - */ - render: (scene: Object3D, camera: Camera) => void; - /** - * This method can be used to render outlines in VR. - * - * ```js - * const effect = new OutlineEffect( renderer ); - * let renderingOutline = false; - * - * scene.onAfterRender = function () { - * - * if ( renderingOutline ) return; - * - * renderingOutline = true; - * effect.renderOutline( scene, camera ); - * renderingOutline = false; - * }; - * - * function render() { - * renderer.render( scene, camera ); - * } - * ``` - * - * @param {Object3D} scene - The scene to render. - * @param {Camera} camera - The camera. - */ - renderOutline: (scene: Object3D, camera: Camera) => void; - /** - * Resizes the effect. - * - * @param {number} width - The width of the effect in logical pixels. - * @param {number} height - The height of the effect in logical pixels. - */ - setSize: (width: number, height: number) => void; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/effects/ParallaxBarrierEffect.d.ts b/jsdoc-testing/jsdoc/examples/jsm/effects/ParallaxBarrierEffect.d.ts deleted file mode 100644 index 7fc021f50..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/effects/ParallaxBarrierEffect.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * A class that creates an parallax barrier effect. - * - * Note that this class can only be used with {@link WebGLRenderer}. - * When using {@link WebGPURenderer}, use {@link ParallaxBarrierPassNode}. - * - * @three_import import { ParallaxBarrierEffect } from 'three/addons/effects/ParallaxBarrierEffect.js'; - */ -export class ParallaxBarrierEffect { - /** - * Constructs a new parallax barrier effect. - * - * @param {WebGLRenderer} renderer - The renderer. - */ - constructor(renderer: WebGLRenderer); - /** - * Resizes the effect. - * - * @param {number} width - The width of the effect in logical pixels. - * @param {number} height - The height of the effect in logical pixels. - */ - setSize: (width: number, height: number) => void; - /** - * When using this effect, this method should be called instead of the - * default {@link WebGLRenderer#render}. - * - * @param {Object3D} scene - The scene to render. - * @param {Camera} camera - The camera. - */ - render: (scene: Object3D, camera: Camera) => void; - /** - * Frees internal resources. This method should be called - * when the effect is no longer required. - */ - dispose: () => void; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/effects/StereoEffect.d.ts b/jsdoc-testing/jsdoc/examples/jsm/effects/StereoEffect.d.ts deleted file mode 100644 index b76fcfce7..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/effects/StereoEffect.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * A class that creates an stereo effect. - * - * Note that this class can only be used with {@link WebGLRenderer}. - * When using {@link WebGPURenderer}, use {@link StereoPassNode}. - * - * @three_import import { StereoEffect } from 'three/addons/effects/StereoEffect.js'; - */ -export class StereoEffect { - /** - * Constructs a new stereo effect. - * - * @param {WebGLRenderer} renderer - The renderer. - */ - constructor(renderer: WebGLRenderer); - /** - * Sets the given eye separation. - * - * @param {number} eyeSep - The eye separation to set. - */ - setEyeSeparation: (eyeSep: number) => void; - /** - * Resizes the effect. - * - * @param {number} width - The width of the effect in logical pixels. - * @param {number} height - The height of the effect in logical pixels. - */ - setSize: (width: number, height: number) => void; - /** - * When using this effect, this method should be called instead of the - * default {@link WebGLRenderer#render}. - * - * @param {Object3D} scene - The scene to render. - * @param {Camera} camera - The camera. - */ - render: (scene: Object3D, camera: Camera) => void; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/environments/ColorEnvironment.d.ts b/jsdoc-testing/jsdoc/examples/jsm/environments/ColorEnvironment.d.ts deleted file mode 100644 index 426cd16cc..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/environments/ColorEnvironment.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * This class represents a scene with a uniform color that can be used as - * input for {@link PMREMGenerator#fromScene}. The resulting PMREM represents - * uniform ambient lighting and can be used for Image Based Lighting by - * assigning it to {@link Scene#environment}. - * - * ```js - * const environment = new ColorEnvironment( 0x00ff00 ); - * const pmremGenerator = new THREE.PMREMGenerator( renderer ); - * - * const envMap = pmremGenerator.fromScene( environment ).texture; - * scene.environment = envMap; - * ``` - * - * @augments Scene - * @three_import import { ColorEnvironment } from 'three/addons/environments/ColorEnvironment.js'; - */ -export class ColorEnvironment extends Scene { - /** - * Constructs a new color environment. - * - * @param {number|Color} color - The color of the environment. - */ - constructor(color?: number | Color); - /** - * Frees internal resources. This method should be called - * when the environment is no longer required. - */ - dispose(): void; -} -import { Scene } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/environments/DebugEnvironment.d.ts b/jsdoc-testing/jsdoc/examples/jsm/environments/DebugEnvironment.d.ts deleted file mode 100644 index ad3dfe122..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/environments/DebugEnvironment.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This class represents a scene with a very basic room setup that can be used as - * input for {@link PMREMGenerator#fromScene}. The resulting PMREM represents the room's - * lighting and can be used for Image Based Lighting by assigning it to {@link Scene#environment} - * or directly as an environment map to PBR materials. - * - * This class uses a simple room setup and should only be used for development purposes. - * A more appropriate setup for production is {@link RoomEnvironment}. - * - * ```js - * const environment = new DebugEnvironment(); - * const pmremGenerator = new THREE.PMREMGenerator( renderer ); - * - * const envMap = pmremGenerator.fromScene( environment ).texture; - * scene.environment = envMap; - * ``` - * - * @augments Scene - * @three_import import { DebugEnvironment } from 'three/addons/environments/DebugEnvironment.js'; - */ -export class DebugEnvironment extends Scene { - /** - * Frees internal resources. This method should be called - * when the environment is no longer required. - */ - dispose(): void; -} -import { Scene } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/environments/RoomEnvironment.d.ts b/jsdoc-testing/jsdoc/examples/jsm/environments/RoomEnvironment.d.ts deleted file mode 100644 index 20374de2d..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/environments/RoomEnvironment.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This class represents a scene with a basic room setup that can be used as - * input for {@link PMREMGenerator#fromScene}. The resulting PMREM represents the room's - * lighting and can be used for Image Based Lighting by assigning it to {@link Scene#environment} - * or directly as an environment map to PBR materials. - * - * The implementation is based on the [EnvironmentScene](https://github.com/google/model-viewer/blob/master/packages/model-viewer/src/three-components/EnvironmentScene.ts) - * component from the `model-viewer` project. - * - * ```js - * const environment = new RoomEnvironment(); - * const pmremGenerator = new THREE.PMREMGenerator( renderer ); - * - * const envMap = pmremGenerator.fromScene( environment ).texture; - * scene.environment = envMap; - * ``` - * - * @augments Scene - * @three_import import { RoomEnvironment } from 'three/addons/environments/RoomEnvironment.js'; - */ -export class RoomEnvironment extends Scene { - /** - * Frees internal resources. This method should be called - * when the environment is no longer required. - */ - dispose(): void; -} -import { Scene } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/exporters/DRACOExporter.d.ts b/jsdoc-testing/jsdoc/examples/jsm/exporters/DRACOExporter.d.ts deleted file mode 100644 index 3891df80d..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/exporters/DRACOExporter.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -/** - * ~Options - */ -export type DRACOExporter = { - /** - * - Indicates how to tune the encoder regarding decode speed (0 gives better speed but worst quality). - */ - decodeSpeed?: number | undefined; - /** - * - Indicates how to tune the encoder parameters (0 gives better speed but worst quality). - */ - encodeSpeed?: number | undefined; - /** - * - Either sequential (very little compression) or Edgebreaker. Edgebreaker traverses the triangles of the mesh in a deterministic, spiral-like way which provides most of the benefits of this data format. - */ - encoderMethod?: number | undefined; - /** - * - Indicates the precision of each type of data stored in the draco file in the order (POSITION, NORMAL, COLOR, TEX_COORD, GENERIC). - */ - quantization?: number[] | undefined; - /** - * - Whether to export UVs or not. - */ - exportUvs?: boolean | undefined; - /** - * - Whether to export normals or not. - */ - exportNormals?: boolean | undefined; - /** - * - Whether to export colors or not. - */ - exportColor?: boolean | undefined; -}; -/** - * An exporter to compress geometry with the Draco library. - * - * [Draco](https://google.github.io/draco/) is an open source library for compressing and - * decompressing 3D meshes and point clouds. Compressed geometry can be significantly smaller, - * at the cost of additional decoding time on the client device. - * - * Standalone Draco files have a `.drc` extension, and contain vertex positions, - * normals, colors, and other attributes. Draco files *do not* contain materials, - * textures, animation, or node hierarchies – to use these features, embed Draco geometry - * inside of a glTF file. A normal glTF file can be converted to a Draco-compressed glTF file - * using [glTF-Pipeline](https://github.com/AnalyticalGraphicsInc/gltf-pipeline). - * - * ```js - * const exporter = new DRACOExporter(); - * const data = exporter.parse( mesh, options ); - * ``` - * - * @three_import import { DRACOExporter } from 'three/addons/exporters/DRACOExporter.js'; - */ -export class DRACOExporter { - /** - * Parses the given mesh or point cloud and generates the Draco output. - * - * @param {(Mesh|Points)} object - The mesh or point cloud to export. - * @param {DRACOExporter~Options} options - The export options. - * @return {Int8Array} The exported Draco. - */ - parse(object: (Mesh | Points), options?: {}): Int8Array; -} -export namespace DRACOExporter { - let MESH_EDGEBREAKER_ENCODING: number; - let MESH_SEQUENTIAL_ENCODING: number; - let POINT_CLOUD: number; - let TRIANGULAR_MESH: number; - let INVALID: number; - let POSITION: number; - let NORMAL: number; - let COLOR: number; - let TEX_COORD: number; - let GENERIC: number; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/exporters/EXRExporter.d.ts b/jsdoc-testing/jsdoc/examples/jsm/exporters/EXRExporter.d.ts deleted file mode 100644 index 9bd21a485..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/exporters/EXRExporter.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * ~Options - */ -export type EXRExporter = { - /** - * - Output data type. - */ - type?: number | undefined; -}; -/** - * An exporter for EXR. - * - * EXR ( Extended Dynamic Range) is an [open format specification](https://github.com/AcademySoftwareFoundation/openexr) - * for professional-grade image storage format of the motion picture industry. The purpose of - * format is to accurately and efficiently represent high-dynamic-range scene-linear image data - * and associated metadata. The library is widely used in host application software where accuracy - * is critical, such as photorealistic rendering, texture access, image compositing, deep compositing, - * and DI. - * - * ```js - * const exporter = new EXRExporter(); - * const result = await exporter.parse( renderer, options ); - * ``` - * - * @three_import import { EXRExporter } from 'three/addons/exporters/EXRExporter.js'; - */ -export class EXRExporter { - /** - * This method has two variants. - * - * - When exporting a data texture, it receives two parameters. The texture and the exporter options. - * - When exporting a render target (e.g. a PMREM), it receives three parameters. The renderer, the - * render target and the exporter options. - * - * @async - * @param {(DataTexture|WebGPURenderer|WebGLRenderer)} arg1 - The data texture to export or a renderer. - * @param {(EXRExporter~Options|RenderTarget)} arg2 - The exporter options or a render target. - * @param {EXRExporter~Options} [arg3] - The exporter options. - * @return {Promise} A Promise that resolves with the exported EXR. - */ - parse(arg1: (DataTexture | WebGPURenderer | WebGLRenderer), arg2: any, arg3: any): Promise; -} -export const NO_COMPRESSION: 0; -export const ZIP_COMPRESSION: 3; -export const ZIPS_COMPRESSION: 2; diff --git a/jsdoc-testing/jsdoc/examples/jsm/exporters/GLTFExporter.d.ts b/jsdoc-testing/jsdoc/examples/jsm/exporters/GLTFExporter.d.ts deleted file mode 100644 index b64b99177..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/exporters/GLTFExporter.d.ts +++ /dev/null @@ -1,130 +0,0 @@ -/** - * ~Options - */ -export type GLTFExporter = { - /** - * - Export position, rotation and scale instead of matrix per node. - */ - trs?: boolean | undefined; - /** - * - Export only visible 3D objects. - */ - onlyVisible?: boolean | undefined; - /** - * - Export in binary (.glb) format, returning an ArrayBuffer. - */ - binary?: boolean | undefined; - /** - * - Restricts the image maximum size (both width and height) to the given value. - */ - maxTextureSize?: number | undefined; - /** - * - List of animations to be included in the export. - */ - animations?: AnimationClip[] | undefined; - /** - * - Export custom glTF extensions defined on an object's `userData.gltfExtensions` property. - */ - includeCustomExtensions?: boolean | undefined; -}; -/** - * An exporter for `glTF` 2.0. - * - * glTF (GL Transmission Format) is an [open format specification](https://github.com/KhronosGroup/glTF/tree/master/specification/2.0) - * for efficient delivery and loading of 3D content. Assets may be provided either in JSON (.gltf) - * or binary (.glb) format. External files store textures (.jpg, .png) and additional binary - * data (.bin). A glTF asset may deliver one or more scenes, including meshes, materials, - * textures, skins, skeletons, morph targets, animations, lights, and/or cameras. - * - * GLTFExporter supports the [glTF 2.0 extensions](https://github.com/KhronosGroup/glTF/tree/master/extensions/): - * - * - KHR_lights_punctual - * - KHR_materials_clearcoat - * - KHR_materials_dispersion - * - KHR_materials_emissive_strength - * - KHR_materials_ior - * - KHR_materials_iridescence - * - KHR_materials_specular - * - KHR_materials_sheen - * - KHR_materials_transmission - * - KHR_materials_unlit - * - KHR_materials_volume - * - KHR_mesh_quantization - * - KHR_texture_transform - * - EXT_materials_bump - * - EXT_mesh_gpu_instancing - * - EXT_texture_webp - * - * The following glTF 2.0 extension is supported by an external user plugin: - * - * - [KHR_materials_variants](https://github.com/takahirox/three-gltf-extensions) - * - * ```js - * const exporter = new GLTFExporter(); - * const data = await exporter.parseAsync( scene, options ); - * ``` - * - * @three_import import { GLTFExporter } from 'three/addons/exporters/GLTFExporter.js'; - */ -export class GLTFExporter { - /** - * A reference to a texture utils module. - * - * @type {?(WebGLTextureUtils|WebGPUTextureUtils)} - * @default null - */ - textureUtils: (WebGLTextureUtils | WebGPUTextureUtils) | null; - pluginCallbacks: any[]; - /** - * Registers a plugin callback. This API is internally used to implement the various - * glTF extensions but can also used by third-party code to add additional logic - * to the exporter. - * - * @param {function(writer:GLTFWriter)} callback - The callback function to register. - * @return {GLTFExporter} A reference to this exporter. - */ - register(callback: any): GLTFExporter; - /** - * Unregisters a plugin callback. - * - * @param {Function} callback - The callback function to unregister. - * @return {GLTFExporter} A reference to this exporter. - */ - unregister(callback: Function): GLTFExporter; - /** - * Sets the texture utils for this exporter. Only relevant when compressed textures have to be exported. - * - * Depending on whether you use {@link WebGLRenderer} or {@link WebGPURenderer}, you must inject the - * corresponding texture utils {@link WebGLTextureUtils} or {@link WebGPUTextureUtils}. - * - * @param {WebGLTextureUtils|WebGPUTextureUtils} utils - The texture utils. - * @return {GLTFExporter} A reference to this exporter. - */ - setTextureUtils(utils: WebGLTextureUtils | WebGPUTextureUtils): GLTFExporter; - /** - * Parses the given scenes and generates the glTF output. - * - * @param {Scene|Array} input - A scene or an array of scenes. - * @param {GLTFExporter~OnDone} onDone - A callback function that is executed when the export has finished. - * @param {GLTFExporter~OnError} onError - A callback function that is executed when an error happens. - * @param {GLTFExporter~Options} options - options - */ - parse(input: Scene | Array, onDone: any, onError: any, options: any): void; - /** - * Async version of {@link GLTFExporter#parse}. - * - * @param {Scene|Array} input - A scene or an array of scenes. - * @param {GLTFExporter~Options} options - options. - * @return {Promise} A Promise that resolved with the exported glTF data. - */ - parseAsync(input: Scene | Array, options: any): Promise; -} -export namespace GLTFExporter { - namespace Utils { - function insertKeyframe(track: any, time: any): number | undefined; - function mergeMorphTargetTracks(clip: any, root: any): any; - function toTypedBufferAttribute(srcAttribute: any, TypedArray: any): BufferAttribute; - } -} -import { Scene } from 'three'; -import { BufferAttribute } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/exporters/KTX2Exporter.d.ts b/jsdoc-testing/jsdoc/examples/jsm/exporters/KTX2Exporter.d.ts deleted file mode 100644 index 3c5367230..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/exporters/KTX2Exporter.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * An exporter for KTX2. - * - * ```js - * const exporter = new KTX2Exporter(); - * const result = await exporter.parse( dataTexture ); - * ``` - * - * @three_import import { KTX2Exporter } from 'three/addons/exporters/KTX2Exporter.js'; - */ -export class KTX2Exporter { - /** - * This method has two variants. - * - * - When exporting a data texture, it receives one parameter. The data or 3D data texture. - * - When exporting a render target (e.g. a PMREM), it receives two parameters. The renderer and the - * render target. - * - * @async - * @param {(DataTexture|Data3DTexture|WebGPURenderer|WebGLRenderer)} arg1 - The data texture to export or a renderer. - * @param {RenderTarget} [arg2] - The render target that should be exported - * @return {Promise} A Promise that resolves with the exported KTX2. - */ - parse(arg1: (DataTexture | Data3DTexture | WebGPURenderer | WebGLRenderer), arg2?: RenderTarget): Promise; -} -import { DataTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/exporters/OBJExporter.d.ts b/jsdoc-testing/jsdoc/examples/jsm/exporters/OBJExporter.d.ts deleted file mode 100644 index ce14c5604..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/exporters/OBJExporter.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * An exporter for OBJ. - * - * `OBJExporter` is not able to export material data into MTL files so only geometry data are supported. - * - * ```js - * const exporter = new OBJExporter(); - * const data = exporter.parse( scene ); - * ``` - * - * @three_import import { OBJExporter } from 'three/addons/exporters/OBJExporter.js'; - */ -export class OBJExporter { - /** - * Parses the given 3D object and generates the OBJ output. - * - * If the 3D object is composed of multiple children and geometry, they are merged into a single mesh in the file. - * - * @param {Object3D} object - The 3D object to export. - * @return {string} The exported OBJ. - */ - parse(object: Object3D): string; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/exporters/PLYExporter.d.ts b/jsdoc-testing/jsdoc/examples/jsm/exporters/PLYExporter.d.ts deleted file mode 100644 index 09942d1f4..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/exporters/PLYExporter.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * ~Options - */ -export type PLYExporter = { - /** - * - Whether to export in binary format or ASCII. - */ - binary?: boolean | undefined; - /** - * - Which properties to explicitly exclude from - * the exported PLY file. Valid values are `'color'`, `'normal'`, `'uv'`, and `'index'`. If triangle - * indices are excluded, then a point cloud is exported. - */ - excludeAttributes?: string[] | undefined; - /** - * - Whether the binary export uses little or big endian. - */ - littleEndian?: boolean | undefined; - /** - * - A mapping that allows - * exporting custom buffer attributes as PLY vertex properties. Each entry maps a buffer attribute - * name to an array of PLY property names. The number of property names must match the item size - * of the buffer attribute. This is the inverse of `PLYLoader.setCustomPropertyNameMapping()`. - */ - customPropertyMapping?: { - [x: string]: string[]; - } | undefined; -}; -/** - * An exporter for PLY. - * - * PLY (Polygon or Stanford Triangle Format) is a file format for efficient delivery and - * loading of simple, static 3D content in a dense format. Both binary and ascii formats are - * supported. PLY can store vertex positions, colors, normals and uv coordinates. No textures - * or texture references are saved. - * - * ```js - * const exporter = new PLYExporter(); - * const data = exporter.parse( scene, options ); - * ``` - * - * @three_import import { PLYExporter } from 'three/addons/exporters/PLYExporter.js'; - */ -export class PLYExporter { - /** - * Parses the given 3D object and generates the PLY output. - * - * If the 3D object is composed of multiple children and geometry, they are merged into a single mesh in the file. - * - * @param {Object3D} object - The 3D object to export. - * @param {PLYExporter~OnDone} onDone - A callback function that is executed when the export has finished. - * @param {PLYExporter~Options} options - The export options. - * @return {?(string|ArrayBuffer)} The exported PLY. - */ - parse(object: Object3D, onDone: any, options?: {}): (string | ArrayBuffer) | null; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/exporters/STLExporter.d.ts b/jsdoc-testing/jsdoc/examples/jsm/exporters/STLExporter.d.ts deleted file mode 100644 index e72db8c3d..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/exporters/STLExporter.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * ~Options - */ -export type STLExporter = { - /** - * - Whether to export in binary format or ASCII. - */ - binary?: boolean | undefined; -}; -/** - * An exporter for STL. - * - * STL files describe only the surface geometry of a three-dimensional object without - * any representation of color, texture or other common model attributes. The STL format - * specifies both ASCII and binary representations, with binary being more compact. - * STL files contain no scale information or indexes, and the units are arbitrary. - * - * ```js - * const exporter = new STLExporter(); - * const data = exporter.parse( mesh, { binary: true } ); - * ``` - * - * @three_import import { STLExporter } from 'three/addons/exporters/STLExporter.js'; - */ -export class STLExporter { - /** - * Parses the given 3D object and generates the STL output. - * - * If the 3D object is composed of multiple children and geometry, they are merged into a single mesh in the file. - * - * @param {Object3D} scene - A scene, mesh or any other 3D object containing meshes to encode. - * @param {STLExporter~Options} options - The export options. - * @return {string|ArrayBuffer} The exported STL. - */ - parse(scene: Object3D, options?: {}): string | ArrayBuffer; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/exporters/USDZExporter.d.ts b/jsdoc-testing/jsdoc/examples/jsm/exporters/USDZExporter.d.ts deleted file mode 100644 index 14434a5af..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/exporters/USDZExporter.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/** - * ~Options - */ -export type USDZExporter = { - /** - * - The maximum texture size that is going to be exported. - */ - maxTextureSize?: number | undefined; - /** - * - Whether to include anchoring properties or not. - */ - includeAnchoringProperties?: boolean | undefined; - /** - * - Export only visible 3D objects. - */ - onlyVisible?: boolean | undefined; - /** - * - If `includeAnchoringProperties` is set to `true`, the anchoring type and alignment - * can be configured via `ar.anchoring.type` and `ar.planeAnchoring.alignment`. - */ - ar?: Object | undefined; - /** - * - Whether to make the exported USDZ compatible to QuickLook - * which means the asset is modified to accommodate the bugs FB10036297 and FB11442287 (Apple Feedback). - */ - quickLookCompatible?: boolean | undefined; - /** - * - Animation clips to bake into `xformOp` time samples on the - * targeted objects. Only `position`, `quaternion`, and `scale` tracks are exported. - */ - animations?: AnimationClip[] | undefined; - /** - * - Time codes per second used when writing animation samples. - */ - animationFrameRate?: number | undefined; -}; -/** - * An exporter for USDZ. - * - * ```js - * const exporter = new USDZExporter(); - * const arraybuffer = await exporter.parseAsync( scene ); - * ``` - * - * @three_import import { USDZExporter } from 'three/addons/exporters/USDZExporter.js'; - */ -export class USDZExporter { - /** - * A reference to a texture utils module. - * - * @type {?(WebGLTextureUtils|WebGPUTextureUtils)} - * @default null - */ - textureUtils: (WebGLTextureUtils | WebGPUTextureUtils) | null; - /** - * Sets the texture utils for this exporter. Only relevant when compressed textures have to be exported. - * - * Depending on whether you use {@link WebGLRenderer} or {@link WebGPURenderer}, you must inject the - * corresponding texture utils {@link WebGLTextureUtils} or {@link WebGPUTextureUtils}. - * - * @param {WebGLTextureUtils|WebGPUTextureUtils} utils - The texture utils. - */ - setTextureUtils(utils: WebGLTextureUtils | WebGPUTextureUtils): void; - /** - * Parse the given 3D object and generates the USDZ output. - * - * @param {Object3D} scene - The 3D object to export. - * @param {USDZExporter~OnDone} onDone - A callback function that is executed when the export has finished. - * @param {USDZExporter~OnError} onError - A callback function that is executed when an error happens. - * @param {USDZExporter~Options} options - The export options. - */ - parse(scene: Object3D, onDone: any, onError: any, options: any): void; - /** - * Async version of {@link USDZExporter#parse}. - * - * @async - * @param {Object3D} scene - The 3D object to export. - * @param {USDZExporter~Options} options - The export options. - * @return {Promise} A Promise that resolved with the exported USDZ data. - */ - parseAsync(scene: Object3D, options?: {}): Promise; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/geometries/BoxLineGeometry.d.ts b/jsdoc-testing/jsdoc/examples/jsm/geometries/BoxLineGeometry.d.ts deleted file mode 100644 index f91b9d984..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/geometries/BoxLineGeometry.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * A special type of box geometry intended for {@link LineSegments}. - * - * ```js - * const geometry = new THREE.BoxLineGeometry(); - * const material = new THREE.LineBasicMaterial( { color: 0x00ff00 } ); - * const lines = new THREE.LineSegments( geometry, material ); - * scene.add( lines ); - * ``` - * - * @augments BufferGeometry - * @three_import import { BoxLineGeometry } from 'three/addons/geometries/BoxLineGeometry.js'; - */ -export class BoxLineGeometry extends BufferGeometry { - /** - * Constructs a new box line geometry. - * - * @param {number} [width=1] - The width. That is, the length of the edges parallel to the X axis. - * @param {number} [height=1] - The height. That is, the length of the edges parallel to the Y axis. - * @param {number} [depth=1] - The depth. That is, the length of the edges parallel to the Z axis. - * @param {number} [widthSegments=1] - Number of segmented rectangular sections along the width of the sides. - * @param {number} [heightSegments=1] - Number of segmented rectangular sections along the height of the sides. - * @param {number} [depthSegments=1] - Number of segmented rectangular sections along the depth of the sides. - */ - constructor(width?: number, height?: number, depth?: number, widthSegments?: number, heightSegments?: number, depthSegments?: number); -} -import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/geometries/ConvexGeometry.d.ts b/jsdoc-testing/jsdoc/examples/jsm/geometries/ConvexGeometry.d.ts deleted file mode 100644 index e5e6dacf7..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/geometries/ConvexGeometry.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * This class can be used to generate a convex hull for a given array of 3D points. - * The average time complexity for this task is considered to be O(nlog(n)). - * - * ```js - * const geometry = new ConvexGeometry( points ); - * const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); - * const mesh = new THREE.Mesh( geometry, material ); - * scene.add( mesh ); - * ``` - * - * @augments BufferGeometry - * @three_import import { ConvexGeometry } from 'three/addons/geometries/ConvexGeometry.js'; - */ -export class ConvexGeometry extends BufferGeometry { - /** - * Constructs a new convex geometry. - * - * @param {Array} points - An array of points in 3D space which should be enclosed by the convex hull. - */ - constructor(points?: Array); -} -import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/geometries/DecalGeometry.d.ts b/jsdoc-testing/jsdoc/examples/jsm/geometries/DecalGeometry.d.ts deleted file mode 100644 index 382bd6e37..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/geometries/DecalGeometry.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * This class can be used to create a decal mesh that serves different kinds of purposes e.g. - * adding unique details to models, performing dynamic visual environmental changes or covering seams. - * - * Please not that decal projections can be distorted when used around corners. More information at - * this GitHub issue: [Decal projections without distortions](https://github.com/mrdoob/three.js/issues/21187). - * - * Reference: [How to project decals](http://blog.wolfire.com/2009/06/how-to-project-decals/) - * - * ```js - * const geometry = new DecalGeometry( mesh, position, orientation, size ); - * const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); - * const mesh = new THREE.Mesh( geometry, material ); - * scene.add( mesh ); - * ``` - * - * @augments BufferGeometry - * @three_import import { DecalGeometry } from 'three/addons/geometries/DecalGeometry.js'; - */ -export class DecalGeometry extends BufferGeometry { - /** - * Constructs a new decal geometry. - * - * @param {Mesh} [mesh] - The base mesh the decal should be projected on. - * @param {Vector3} [position] - The position of the decal projector. - * @param {Euler} [orientation] - The orientation of the decal projector. - * @param {Vector3} [size] - The scale of the decal projector. - */ - constructor(mesh?: Mesh, position?: Vector3, orientation?: Euler, size?: Vector3); -} -export class DecalVertex { - constructor(position: any, normal?: null); - position: any; - normal: any; - clone(): any; -} -import { BufferGeometry } from 'three'; -import { Mesh } from 'three'; -import { Vector3 } from 'three'; -import { Euler } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/geometries/ParametricFunctions.d.ts b/jsdoc-testing/jsdoc/examples/jsm/geometries/ParametricFunctions.d.ts deleted file mode 100644 index db21efb1c..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/geometries/ParametricFunctions.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * @module ParametricFunctions - * @three_import import * as ParametricFunctions from 'three/addons/geometries/ParametricFunctions.js'; - */ -/** - * A parametric function representing the Klein bottle. - * - * @param {number} v - The `v` coordinate on the surface in the range `[0,1]`. - * @param {number} u - The `u` coordinate on the surface in the range `[0,1]`. - * @param {Vector3} target - The target vector that is used to store the method's result. - */ -export function klein(v: number, u: number, target: Vector3): void; -/** - * A parametric function representing a flat plane. - * - * @param {number} u - The `u` coordinate on the surface in the range `[0,1]`. - * @param {number} v - The `v` coordinate on the surface in the range `[0,1]`. - * @param {Vector3} target - The target vector that is used to store the method's result. - */ -export function plane(u: number, v: number, target: Vector3): void; -/** - * A parametric function representing a flat mobius strip. - * - * @param {number} u - The `u` coordinate on the surface in the range `[0,1]`. - * @param {number} t - The `v` coordinate on the surface in the range `[0,1]`. - * @param {Vector3} target - The target vector that is used to store the method's result. - */ -export function mobius(u: number, t: number, target: Vector3): void; -/** - * A parametric function representing a volumetric mobius strip. - * - * @param {number} u - The `u` coordinate on the surface in the range `[0,1]`. - * @param {number} t - The `v` coordinate on the surface in the range `[0,1]`. - * @param {Vector3} target - The target vector that is used to store the method's result. - */ -export function mobius3d(u: number, t: number, target: Vector3): void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/geometries/ParametricGeometry.d.ts b/jsdoc-testing/jsdoc/examples/jsm/geometries/ParametricGeometry.d.ts deleted file mode 100644 index ef52bca65..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/geometries/ParametricGeometry.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * ~Func - */ -export type ParametricGeometry = (u: number, v: number, target: Vector3) => any; -import { Vector3 } from 'three'; -/** - * This class can be used to generate a geometry based on a parametric surface. - * - * Reference: [Mesh Generation with Python](https://prideout.net/blog/old/blog/index.html@p=44.html) - * - * ```js - * const geometry = new THREE.ParametricGeometry( klein, 25, 25 ); - * const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); - * const klein = new THREE.Mesh( geometry, material ); - * scene.add( klein ); - * ``` - * - * @augments BufferGeometry - * @three_import import { ParametricGeometry } from 'three/addons/geometries/ParametricGeometry.js'; - */ -export class ParametricGeometry extends BufferGeometry { - /** - * Constructs a new parametric geometry. - * - * @param {ParametricGeometry~Func} func - The parametric function. Default is a function that generates a curved plane surface. - * @param {number} [slices=8] - The number of slices to use for the parametric function. - * @param {number} [stacks=8] - The stacks of slices to use for the parametric function. - */ - constructor(func?: (u: any, v: any, target: any) => any, slices?: number, stacks?: number); - /** - * Holds the constructor parameters that have been - * used to generate the geometry. Any modification - * after instantiation does not change the geometry. - * - * @type {Object} - */ - parameters: Object; - copy(source: any): this; -} -import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/geometries/RoundedBoxGeometry.d.ts b/jsdoc-testing/jsdoc/examples/jsm/geometries/RoundedBoxGeometry.d.ts deleted file mode 100644 index 8bb5e657c..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/geometries/RoundedBoxGeometry.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * A special type of box geometry with rounded corners and edges. - * - * ```js - * const geometry = new THREE.RoundedBoxGeometry(); - * const material = new THREE.MeshStandardMaterial( { color: 0x00ff00 } ); - * const cube = new THREE.Mesh( geometry, material ); - * scene.add( cube ); - * ``` - * - * @augments BoxGeometry - * @three_import import { RoundedBoxGeometry } from 'three/addons/geometries/RoundedBoxGeometry.js'; - */ -export class RoundedBoxGeometry extends BoxGeometry { - /** - * Constructs a new rounded box geometry. - * - * @param {number} [width=1] - The width. That is, the length of the edges parallel to the X axis. - * @param {number} [height=1] - The height. That is, the length of the edges parallel to the Y axis. - * @param {number} [depth=1] - The depth. That is, the length of the edges parallel to the Z axis. - * @param {number} [segments=2] - Number of segments that form the rounded corners. - * @param {number} [radius=0.1] - The radius of the rounded corners. - */ - constructor(width?: number, height?: number, depth?: number, segments?: number, radius?: number); -} -import { BoxGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/geometries/TeapotGeometry.d.ts b/jsdoc-testing/jsdoc/examples/jsm/geometries/TeapotGeometry.d.ts deleted file mode 100644 index f555f1a36..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/geometries/TeapotGeometry.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Tessellates the famous Utah teapot database by Martin Newell into triangles. - * - * The teapot should normally be rendered as a double sided object, since for some - * patches both sides can be seen, e.g., the gap around the lid and inside the spout. - * - * Segments 'n' determines the number of triangles output. Total triangles = 32*2*n*n - 8*n - * (degenerates at the top and bottom cusps are deleted). - * - * Code based on [SPD software](http://tog.acm.org/resources/SPD/) - * Created for the Udacity course [Interactive Rendering](http://bit.ly/ericity) - * - * ```js - * const geometry = new TeapotGeometry( 50, 18 ); - * const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); - * const teapot = new THREE.Mesh( geometry, material ); - * scene.add( teapot ); - * ``` - * - * @augments BufferGeometry - * @three_import import { TeapotGeometry } from 'three/addons/geometries/TeapotGeometry.js'; - */ -export class TeapotGeometry extends BufferGeometry { - /** - * Constructs a new teapot geometry. - * - * @param {number} [size=50] - Relative scale of the teapot. - * @param {number} [segments=10] - Number of line segments to subdivide each patch edge. - * @param {boolean} [bottom=true] - Whether the bottom of the teapot is generated or not. - * @param {boolean} [lid=true] - Whether the lid is generated or not. - * @param {boolean} [body=true] - Whether the body is generated or not. - * @param {boolean} [fitLid=true] - Whether the lid is slightly stretched to prevent gaps between the body and lid or not. - * @param {boolean} [blinn=true] - Whether the teapot is scaled vertically for better aesthetics or not. - */ - constructor(size?: number, segments?: number, bottom?: boolean, lid?: boolean, body?: boolean, fitLid?: boolean, blinn?: boolean); -} -import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/geometries/TextGeometry.d.ts b/jsdoc-testing/jsdoc/examples/jsm/geometries/TextGeometry.d.ts deleted file mode 100644 index 70f1d0791..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/geometries/TextGeometry.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -/** - * ~Options - */ -export type TextGeometry = { - /** - * - The font. - */ - font?: Font | undefined; - /** - * - The text size. - */ - size?: number | undefined; - /** - * - Depth to extrude the shape. - */ - depth?: number | undefined; - /** - * - Number of points on the curves. - */ - curveSegments?: number | undefined; - /** - * - Number of points used for subdividing segments along the depth of the extruded spline. - */ - steps?: number | undefined; - /** - * - Whether to beveling to the shape or not. - */ - bevelEnabled?: boolean | undefined; - /** - * - How deep into the original shape the bevel goes. - */ - bevelThickness?: number | undefined; - /** - * - Distance from the shape outline that the bevel extends. - */ - bevelSize?: number | undefined; - /** - * - Distance from the shape outline that the bevel starts. - */ - bevelOffset?: number | undefined; - /** - * - Number of bevel layers. - */ - bevelSegments?: number | undefined; - /** - * - Char direction: ltr(left to right), rtl(right to left) & tb(top bottom). - */ - direction?: string | undefined; - /** - * - A 3D spline path along which the shape should be extruded. Bevels not supported for path extrusion. - */ - extrudePath?: Curve | null; - /** - * - An object that provides UV generator functions for custom UV generation. - */ - UVGenerator?: Object | undefined; -}; -import { Font } from '../loaders/FontLoader.js'; -/** - * A class for generating text as a single geometry. It is constructed by providing a string of text, and a set of - * parameters consisting of a loaded font and extrude settings. - * - * See the {@link FontLoader} page for additional details. - * - * `TextGeometry` uses [typeface.json](http://gero3.github.io/facetype.js/) generated fonts. - * Some existing fonts can be found located in `/examples/fonts`. - * - * ```js - * const loader = new FontLoader(); - * const font = await loader.loadAsync( 'fonts/helvetiker_regular.typeface.json' ); - * const geometry = new TextGeometry( 'Hello three.js!', { - * font: font, - * size: 80, - * depth: 5, - * curveSegments: 12 - * } ); - * ``` - * - * @augments ExtrudeGeometry - * @three_import import { TextGeometry } from 'three/addons/geometries/TextGeometry.js'; - */ -export class TextGeometry extends ExtrudeGeometry { - static fromJSON(data: any): TextGeometry; - /** - * Constructs a new text geometry. - * - * @param {string} text - The text that should be transformed into a geometry. - * @param {TextGeometry~Options} [parameters] - The text settings. - */ - constructor(text: string, parameters?: {}); -} -import { ExtrudeGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/gpgpu/BitonicSort.d.ts b/jsdoc-testing/jsdoc/examples/jsm/gpgpu/BitonicSort.d.ts deleted file mode 100644 index 8115e72d5..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/gpgpu/BitonicSort.d.ts +++ /dev/null @@ -1,263 +0,0 @@ -/** - * Returns the indices that will be compared in a bitonic flip operation. - * - * @tsl - * @private - * @param {Node} index - The compute thread's invocation id. - * @param {Node} blockHeight - The height of the block within which elements are being swapped. - * @returns {Node} The indices of the elements in the data buffer being compared. - */ -export const getBitonicFlipIndices: any; -/** - * Returns the indices that will be compared in a bitonic sort's disperse operation. - * - * @tsl - * @private - * @param {Node} index - The compute thread's invocation id. - * @param {Node} swapSpan - The maximum span over which elements are being swapped. - * @returns {Node} The indices of the elements in the data buffer being compared. - */ -export const getBitonicDisperseIndices: any; -export class BitonicSort { - /** - * Constructs a new light probe helper. - * - * @param {Renderer} renderer - The current scene's renderer. - * @param {StorageBufferNode} dataBuffer - The data buffer to sort. - * @param {Object} [options={}] - Options that modify the bitonic sort. - */ - constructor(renderer: Renderer, dataBuffer: StorageBufferNode, options?: Object); - /** - * A reference to the renderer. - * - * @type {Renderer} - */ - renderer: Renderer; - /** - * A reference to the StorageBufferNode holding the data that will be sorted . - * - * @type {StorageBufferNode} - */ - dataBuffer: StorageBufferNode; - /** - * The size of the data. - * - * @type {StorageBufferNode} - */ - count: StorageBufferNode; - /** - * - * The size of each compute dispatch. - * @type {number} - */ - dispatchSize: number; - /** - * The workgroup size of the compute shaders executed during the sort. - * - * @type {StorageBufferNode} - */ - workgroupSize: StorageBufferNode; - /** - * A node representing a workgroup scoped buffer that holds locally sorted elements. - * - * @type {WorkgroupInfoNode} - */ - localStorage: WorkgroupInfoNode; - _tempArray: Uint32Array; - /** - * A node representing a storage buffer used for transferring the result of the global sort back to the original data buffer. - * - * @type {StorageBufferNode} - */ - tempBuffer: StorageBufferNode; - /** - * A node containing the current algorithm type, the current swap span, and the highest swap span. - * - * @type {StorageBufferNode} - */ - infoStorage: StorageBufferNode; - /** - * The number of distinct swap operations ('flips' and 'disperses') executed in an in-place - * bitonic sort of the current data buffer. - * - * @type {number} - */ - swapOpCount: number; - /** - * The number of steps (i.e prepping and/or executing a swap) needed to fully execute an in-place bitonic sort of the current data buffer. - * - * @type {number} - */ - stepCount: number; - /** - * The number of the buffer being read from. - * - * @type {string} - */ - readBufferName: string; - /** - * An object containing compute shaders that execute a 'flip' swap within a global address space on elements in the data buffer. - * - * @type {Object} - */ - flipGlobalNodes: { - [x: string]: ComputeNode; - }; - /** - * An object containing compute shaders that execute a 'disperse' swap within a global address space on elements in the data buffer. - * - * @type {Object} - */ - disperseGlobalNodes: { - [x: string]: ComputeNode; - }; - /** - * A compute shader that executes a sequence of flip and disperse swaps within a local address space on elements in the data buffer. - * - * @type {ComputeNode} - */ - swapLocalFn: ComputeNode; - /** - * A compute shader that executes a sequence of disperse swaps within a local address space on elements in the data buffer. - * - * @type {Object} - */ - disperseLocalNodes: { - [x: string]: ComputeNode; - }; - /** - * A compute shader that sets up the algorithm and the swap span for the next swap operation. - * - * @type {ComputeNode} - */ - setAlgoFn: ComputeNode; - /** - * A compute shader that aligns the result of the global swap operation with the current buffer. - * - * @type {ComputeNode} - */ - alignFn: ComputeNode; - /** - * A compute shader that resets the algorithm and swap span information. - * - * @type {ComputeNode} - */ - resetFn: ComputeNode; - /** - * The current compute shader dispatch within the list of dispatches needed to complete the sort. - * - * @type {number} - */ - currentDispatch: number; - /** - * The number of global swap operations that must be executed before the sort - * can swap in local address space. - * - * @type {number} - */ - globalOpsRemaining: number; - /** - * The total number of global operations needed to sort elements within the current swap span. - * - * @type {number} - */ - globalOpsInSpan: number; - /** - * Get total number of distinct swaps that occur in a bitonic sort. - * - * @private - * @returns {number} - The total number of distinct swaps in a bitonic sort - */ - private _getSwapOpCount; - /** - * Get the number of steps it takes to execute a complete bitonic sort. - * - * @private - * @returns {number} The number of steps it takes to execute a complete bitonic sort. - */ - private _getStepCount; - /** - * Compares and swaps two data points in the data buffer within the global address space. - * @param {Node} idxBefore - The index of the first data element in the data buffer. - * @param {Node} idxAfter - The index of the second data element in the data buffer. - * @param {StorageBufferNode} dataBuffer - The buffer of data to read from. - * @param {StorageBufferNode} tempBuffer - The buffer of data to write to. - * @private - * - */ - private _globalCompareAndSwapTSL; - /** - * Compares and swaps two data points in the data buffer within the local address space. - * - * @private - * @param {Node} idxBefore - The index of the first data element in the data buffer. - * @param {Node} idxAfter - The index of the second data element in the data buffer - */ - private _localCompareAndSwapTSL; - /** - * Create the compute shader that performs a global disperse swap on the data buffer. - * - * @private - * @param {StorageBufferNode} readBuffer - The data buffer to read from. - * @param {StorageBufferNode} writeBuffer - The data buffer to read from. - * @returns {ComputeNode} - A compute shader that performs a global disperse swap on the data buffer. - */ - private _getDisperseGlobal; - /** - * Create the compute shader that performs a global flip swap on the data buffer. - * - * @private - * @param {StorageBufferNode} readBuffer - The data buffer to read from. - * @param {StorageBufferNode} writeBuffer - The data buffer to read from. - * @returns {ComputeNode} - A compute shader that executes a global flip swap. - */ - private _getFlipGlobal; - /** - * Create the compute shader that performs a complete local swap on the data buffer. - * - * @private - * @returns {ComputeNode} - A compute shader that executes a full local swap. - */ - private _getSwapLocal; - /** - * Create the compute shader that performs a local disperse swap on the data buffer. - * - * @private - * @param {StorageBufferNode} readWriteBuffer - The data buffer to read from and write to. - * @returns {ComputeNode} - A compute shader that executes a local disperse swap. - */ - private _getDisperseLocal; - /** - * Create the compute shader that resets the sort's algorithm information. - * - * @private - * @returns {ComputeNode} - A compute shader that resets the bitonic sort's algorithm information. - */ - private _getResetFn; - /** - * Create the compute shader that copies the state of the last global swap to the data buffer. - * - * @private - * @returns {ComputeNode} - A compute shader that copies the state of the last global swap to the data buffer. - */ - private _getAlignFn; - /** - * Create the compute shader that sets the bitonic sort algorithm's information. - * - * @private - * @returns {ComputeNode} - A compute shader that sets the bitonic sort algorithm's information. - */ - private _getSetAlgoFn; - /** - * Executes a step of the bitonic sort operation. - * - * @param {Renderer} renderer - The current scene's renderer. - */ - computeStep(renderer: Renderer): void; - /** - * Executes a complete bitonic sort on the data buffer. - * - * @param {Renderer} renderer - The current scene's renderer. - */ - compute(renderer: Renderer): void; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/AnimationPathHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/AnimationPathHelper.d.ts deleted file mode 100644 index 67faad4f1..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/helpers/AnimationPathHelper.d.ts +++ /dev/null @@ -1,134 +0,0 @@ -/** - * Visualizes the motion path of an animated object based on position keyframes - * from an AnimationClip. - * - * ```js - * const clip = model.animations[ 0 ]; - * const helper = new AnimationPathHelper( model, clip, object ); - * scene.add( helper ); - * ``` - * - * @augments Object3D - * @three_import import { AnimationPathHelper } from 'three/addons/helpers/AnimationPathHelper.js'; - */ -export class AnimationPathHelper extends Object3D { - /** - * Constructs a new animation path helper. - * - * @param {Object3D} root - The root object containing the animation clips. - * @param {AnimationClip} clip - The animation clip containing position keyframes. - * @param {Object3D} object - The specific object to show the path for. - * @param {Object} [options={}] - Configuration options. - * @param {number|Color|string} [options.color=0x00ff00] - The path line color. - * @param {number|Color|string} [options.markerColor=0xff0000] - The keyframe marker color. - * @param {number} [options.divisions=100] - Number of samples for smooth path interpolation. - * @param {boolean} [options.showMarkers=true] - Whether to show markers at keyframe positions. - * @param {number} [options.markerSize=5] - Size of keyframe markers in pixels. - */ - constructor(root: Object3D, clip: AnimationClip, object: Object3D, options?: { - color?: number | Color | string; - markerColor?: number | Color | string; - divisions?: number | undefined; - showMarkers?: boolean | undefined; - markerSize?: number | undefined; - }); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isAnimationPathHelper: boolean; - type: string; - /** - * The root object containing the animation clips. - * - * @type {Object3D} - */ - root: Object3D; - /** - * The animation clip containing position keyframes. - * - * @type {AnimationClip} - */ - clip: AnimationClip; - /** - * The object whose path is being visualized. - * - * @type {Object3D} - */ - object: Object3D; - /** - * Number of samples for smooth path interpolation. - * - * @type {number} - * @default 100 - */ - divisions: number; - /** - * The position track for the object. - * - * @type {KeyframeTrack|null} - * @private - */ - private _track; - /** - * The line representing the animation path. - * - * @type {Line} - */ - line: Line; - /** - * Points marking keyframe positions. - * - * @type {Points|null} - */ - points: Points | null; - /** - * Finds the position track for the given object. - * - * @private - * @param {Object3D} object - The object to find the track for. - * @returns {KeyframeTrack|null} The position track, or null if not found. - */ - private _findTrackForObject; - /** - * Samples the track at regular intervals. - * - * @private - * @returns {Float32Array} Array of sampled positions. - */ - private _sampleTrack; - /** - * Updates the geometry with sampled path data. - * - * @private - */ - private _updateGeometry; - /** - * Updates the helper's transform to match the object's parent. - * - * @param {boolean} force - Force matrix update. - */ - updateMatrixWorld(force: boolean): void; - /** - * Sets the path line color. - * - * @param {number|Color|string} color - The new color. - */ - setColor(color: number | Color | string): void; - /** - * Sets the keyframe marker color. - * - * @param {number|Color|string} color - The new color. - */ - setMarkerColor(color: number | Color | string): void; - /** - * Frees the GPU-related resources allocated by this instance. - */ - dispose(): void; -} -import { Object3D } from 'three'; -import { Line } from 'three'; -import { Points } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeGridHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeGridHelper.d.ts deleted file mode 100644 index 3764cba90..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeGridHelper.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Visualizes an {@link LightProbeGrid} by rendering a sphere at each - * probe position, shaded with the probe's L2 spherical harmonics. - * - * Uses a single `InstancedMesh` draw call for all probes. - * - * ```js - * const helper = new LightProbeGridHelper( probes ); - * scene.add( helper ); - * ``` - * - * @augments InstancedMesh - * @three_import import { LightProbeGridHelper } from 'three/addons/helpers/LightProbeGridHelper.js'; - */ -export class LightProbeGridHelper extends InstancedMesh { - /** - * Constructs a new irradiance probe grid helper. - * - * @param {LightProbeGrid} probes - The probe grid to visualize. - * @param {number} [sphereSize=0.12] - The radius of each probe sphere. - */ - constructor(probes: LightProbeGrid, sphereSize?: number); - /** - * The probe grid to visualize. - * - * @type {LightProbeGrid} - */ - probes: LightProbeGrid; - /** - * Rebuilds instance matrices and UVW attributes from the current probe grid. - * Call this after changing `probes` or after re-baking. - */ - update(): void; -} -import { InstancedMesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeHelper.d.ts deleted file mode 100644 index 018e3ba25..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeHelper.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Renders a sphere to visualize a light probe in the scene. - * - * This helper can only be used with {@link WebGLRenderer}. - * When using {@link WebGPURenderer}, import from `LightProbeHelperGPU.js`. - * - * ```js - * const helper = new LightProbeHelper( lightProbe ); - * scene.add( helper ); - * ``` - * - * @augments Mesh - * @three_import import { LightProbeHelper } from 'three/addons/helpers/LightProbeHelper.js'; - */ -export class LightProbeHelper extends Mesh { - /** - * Constructs a new light probe helper. - * - * @param {LightProbe} lightProbe - The light probe to visualize. - * @param {number} [size=1] - The size of the helper. - */ - constructor(lightProbe: LightProbe, size?: number); - /** - * The light probe to visualize. - * - * @type {LightProbe} - */ - lightProbe: LightProbe; - /** - * The size of the helper. - * - * @type {number} - * @default 1 - */ - size: number; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeHelperGPU.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeHelperGPU.d.ts deleted file mode 100644 index 01864c9fb..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/helpers/LightProbeHelperGPU.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Renders a sphere to visualize a light probe in the scene. - * - * This helper can only be used with {@link WebGPURenderer}. - * When using {@link WebGLRenderer}, import from `LightProbeHelper.js`. - * - * ```js - * const helper = new LightProbeHelper( lightProbe ); - * scene.add( helper ); - * ``` - * - * @private - * @augments Mesh - * @three_import import { LightProbeHelper } from 'three/addons/helpers/LightProbeHelperGPU.js'; - */ -export class LightProbeHelper extends Mesh { - /** - * Constructs a new light probe helper. - * - * @param {LightProbe} lightProbe - The light probe to visualize. - * @param {number} [size=1] - The size of the helper. - */ - constructor(lightProbe: LightProbe, size?: number); - /** - * The light probe to visualize. - * - * @type {LightProbe} - */ - lightProbe: LightProbe; - /** - * The size of the helper. - * - * @type {number} - * @default 1 - */ - size: number; - _intensity: import("three/webgpu").UniformNode; - _sh: import("three/webgpu").UniformArrayNode; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { Mesh } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/OctreeHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/OctreeHelper.d.ts deleted file mode 100644 index 53f7df977..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/helpers/OctreeHelper.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * A helper for visualizing an Octree. - * - * ```js - * const helper = new OctreeHelper( octree ); - * scene.add( helper ); - * ``` - * - * @augments LineSegments - * @three_import import { OctreeHelper } from 'three/addons/helpers/OctreeHelper.js'; - */ -export class OctreeHelper extends LineSegments { - /** - * Constructs a new Octree helper. - * - * @param {Octree} octree - The octree to visualize. - * @param {number|Color|string} [color=0xffff00] - The helper's color. - */ - constructor(octree: Octree, color?: number | Color | string); - /** - * The octree to visualize. - * - * @type {Octree} - */ - octree: Octree; - /** - * The helper's color. - * - * @type {number|Color|string} - */ - color: number | Color | string; - /** - * Updates the helper. This method must be called whenever the Octree's - * structure is changed. - */ - update(): void; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { LineSegments } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/PositionalAudioHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/PositionalAudioHelper.d.ts deleted file mode 100644 index a5f89e637..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/helpers/PositionalAudioHelper.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This helper displays the directional cone of a positional audio. - * - * `PositionalAudioHelper` must be added as a child of the positional audio. - * - * ```js - * const positionalAudio = new THREE.PositionalAudio( listener ); - * positionalAudio.setDirectionalCone( 180, 230, 0.1 ); - * scene.add( positionalAudio ); - * - * const helper = new PositionalAudioHelper( positionalAudio ); - * positionalAudio.add( helper ); - * ``` - * - * @augments Line - * @three_import import { PositionalAudioHelper } from 'three/addons/helpers/PositionalAudioHelper.js'; - */ -export class PositionalAudioHelper extends Line { - /** - * Constructs a new positional audio helper. - * - * @param {PositionalAudio} audio - The audio to visualize. - * @param {number} [range=1] - The range of the directional cone. - * @param {number} [divisionsInnerAngle=16] - The number of divisions of the inner part of the directional cone. - * @param {number} [divisionsOuterAngle=2] The number of divisions of the outer part of the directional cone. - */ - constructor(audio: PositionalAudio, range?: number, divisionsInnerAngle?: number, divisionsOuterAngle?: number); - /** - * The audio to visualize. - * - * @type {PositionalAudio} - */ - audio: PositionalAudio; - /** - * The range of the directional cone. - * - * @type {number} - * @default 1 - */ - range: number; - /** - * The number of divisions of the inner part of the directional cone. - * - * @type {number} - * @default 16 - */ - divisionsInnerAngle: number; - /** - * The number of divisions of the outer part of the directional cone. - * - * @type {number} - * @default 2 - */ - divisionsOuterAngle: number; - /** - * Updates the helper. This method must be called whenever the directional cone - * of the positional audio is changed. - */ - update(): void; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { Line } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/RapierHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/RapierHelper.d.ts deleted file mode 100644 index bc3a4241f..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/helpers/RapierHelper.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * This class displays all Rapier Colliders in outline. - * - * @augments LineSegments - * @three_import import { RapierHelper } from 'three/addons/helpers/RapierHelper.js'; - */ -export class RapierHelper extends LineSegments { - /** - * Constructs a new Rapier debug helper. - * - * @param {RAPIER.world} world - The Rapier world to visualize. - */ - constructor(world: RAPIER.world); - /** - * The Rapier world to visualize. - * - * @type {RAPIER.world} - */ - world: RAPIER.world; - material: LineBasicMaterial; - /** - * Call this in the render loop to update the outlines. - */ - update(): void; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { LineSegments } from 'three'; -import { LineBasicMaterial } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/RectAreaLightHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/RectAreaLightHelper.d.ts deleted file mode 100644 index 389cd61ce..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/helpers/RectAreaLightHelper.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Creates a visual aid for rect area lights. - * - * `RectAreaLightHelper` must be added as a child of the light. - * - * ```js - * const light = new THREE.RectAreaLight( 0xffffbb, 1.0, 5, 5 ); - * const helper = new RectAreaLightHelper( light ); - * light.add( helper ); - * ``` - * - * @augments Line - * @three_import import { RectAreaLightHelper } from 'three/addons/helpers/RectAreaLightHelper.js'; - */ -export class RectAreaLightHelper extends Line { - /** - * Constructs a new rect area light helper. - * - * @param {RectAreaLight} light - The light to visualize. - * @param {number|Color|string} [color] - The helper's color. - * If this is not the set, the helper will take the color of the light. - */ - constructor(light: RectAreaLight, color?: number | Color | string); - /** - * The light to visualize. - * - * @type {RectAreaLight} - */ - light: RectAreaLight; - /** - * The helper's color. If `undefined`, the helper will take the color of the light. - * - * @type {number|Color|string|undefined} - */ - color: number | Color | string | undefined; - updateMatrixWorld(): void; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { Line } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/TextureHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/TextureHelper.d.ts deleted file mode 100644 index 5ad336a81..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/helpers/TextureHelper.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * A helper that can be used to display any type of texture for - * debugging purposes. Depending on the type of texture (2D, 3D, Array), - * the helper becomes a plane or box mesh. - * - * This helper can only be used with {@link WebGLRenderer}. - * When using {@link WebGPURenderer}, import from `TextureHelperGPU.js`. - * - * @augments Mesh - * @three_import import { TextureHelper } from 'three/addons/helpers/TextureHelper.js'; - */ -export class TextureHelper extends Mesh { - /** - * Constructs a new texture helper. - * - * @param {Texture} texture - The texture to visualize. - * @param {number} [width=1] - The helper's width. - * @param {number} [height=1] - The helper's height. - * @param {number} [depth=1] - The helper's depth. - */ - constructor(texture: Texture, width?: number, height?: number, depth?: number); - /** - * The texture to visualize. - * - * @type {Texture} - */ - texture: Texture; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/TextureHelperGPU.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/TextureHelperGPU.d.ts deleted file mode 100644 index 0f6b98a9a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/helpers/TextureHelperGPU.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * A helper that can be used to display any type of texture for - * debugging purposes. Depending on the type of texture (2D, 3D, Array), - * the helper becomes a plane or box mesh. - * - * This helper can only be used with {@link WebGPURenderer}. - * When using {@link WebGLRenderer}, import from `TextureHelper.js`. - * - * @private - * @augments Mesh - * @three_import import { TextureHelper } from 'three/addons/helpers/TextureHelperGPU.js'; - */ -export class TextureHelper extends Mesh { - /** - * Constructs a new texture helper. - * - * @param {Texture} texture - The texture to visualize. - * @param {number} [width=1] - The helper's width. - * @param {number} [height=1] - The helper's height. - * @param {number} [depth=1] - The helper's depth. - */ - constructor(texture: Texture, width?: number, height?: number, depth?: number); - /** - * The texture to visualize. - * - * @type {Texture} - */ - texture: Texture; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { Mesh } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/VertexNormalsHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/VertexNormalsHelper.d.ts deleted file mode 100644 index 2f73276be..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/helpers/VertexNormalsHelper.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Visualizes an object's vertex normals. - * - * Requires that normals have been specified in the geometry as a buffer attribute or - * have been calculated using {@link BufferGeometry#computeVertexNormals}. - * ```js - * const geometry = new THREE.BoxGeometry( 10, 10, 10, 2, 2, 2 ); - * const material = new THREE.MeshStandardMaterial(); - * const mesh = new THREE.Mesh( geometry, material ); - * scene.add( mesh ); - * - * const helper = new VertexNormalsHelper( mesh, 1, 0xff0000 ); - * scene.add( helper ); - * ``` - * - * @augments LineSegments - * @three_import import { VertexNormalsHelper } from 'three/addons/helpers/VertexNormalsHelper.js'; - */ -export class VertexNormalsHelper extends LineSegments { - /** - * Constructs a new vertex normals helper. - * - * @param {Object3D} object - The object for which to visualize vertex normals. - * @param {number} [size=1] - The helper's size. - * @param {number|Color|string} [color=0xff0000] - The helper's color. - */ - constructor(object: Object3D, size?: number, color?: number | Color | string); - /** - * The object for which to visualize vertex normals. - * - * @type {Object3D} - */ - object: Object3D; - /** - * The helper's size. - * - * @type {number} - * @default 1 - */ - size: number; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isVertexNormalsHelper: boolean; - /** - * Updates the vertex normals preview based on the object's world transform. - */ - update(): void; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { LineSegments } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/helpers/VertexTangentsHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/helpers/VertexTangentsHelper.d.ts deleted file mode 100644 index 605ea6ed8..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/helpers/VertexTangentsHelper.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Visualizes an object's vertex tangents. - * - * Requires that tangents have been specified in the geometry as a buffer attribute or - * have been calculated using {@link BufferGeometry#computeTangents}. - * ```js - * const helper = new VertexTangentsHelper( mesh, 1, 0xff0000 ); - * scene.add( helper ); - * ``` - * - * @augments LineSegments - * @three_import import { VertexTangentsHelper } from 'three/addons/helpers/VertexTangentsHelper.js'; - */ -export class VertexTangentsHelper extends LineSegments { - /** - * Constructs a new vertex tangents helper. - * - * @param {Object3D} object - The object for which to visualize vertex tangents. - * @param {number} [size=1] - The helper's size. - * @param {number|Color|string} [color=0xff0000] - The helper's color. - */ - constructor(object: Object3D, size?: number, color?: number | Color | string); - /** - * The object for which to visualize vertex tangents. - * - * @type {Object3D} - */ - object: Object3D; - /** - * The helper's size. - * - * @type {number} - * @default 1 - */ - size: number; - /** - * Updates the vertex normals preview based on the object's world transform. - */ - update(): void; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { LineSegments } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/Extension.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/Extension.d.ts deleted file mode 100644 index 8c54bfd3f..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/inspector/Extension.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export class Extension extends Tab { - isExtension: boolean; -} -import { Tab } from 'three/addons/inspector/ui/Tab.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/Inspector.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/Inspector.d.ts deleted file mode 100644 index fc89287cd..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/inspector/Inspector.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -export class Inspector extends RendererInspector { - statsData: Map; - profiler: Profiler; - performance: Performance; - memory: Memory; - console: Console; - parameters: Parameters; - viewer: Viewer; - timeline: Timeline; - settings: Settings; - once: {}; - extensionsData: WeakMap; - displayCycle: { - text: { - needsUpdate: boolean; - duration: number; - time: number; - }; - graph: { - needsUpdate: boolean; - duration: number; - time: number; - }; - }; - get domElement(): HTMLDivElement | undefined; - onExtension(name: any, callback: any): this; - hide(): void; - show(): void; - getSize(): { - width: number; - height: number; - }; - setActiveTab(tab: any): this; - addTab(tab: any): this; - removeTab(tab: any): this; - setActiveExtension(name: any, value: any): this; - resolveConsoleOnce(type: any, message: any): void; - resolveConsole(type: any, message: any, stackTrace?: null): void; - setRenderer(renderer: any): this; - createParameters(name: any): { - parameters: any; - name: any; - paramList: import("./ui/Item.js").Item; - objects: any[]; - close(): /*elided*/ any; - add(object: any, property: any, ...params: any[]): import("./ui/Values.js").ValueNumber | import("./ui/Values.js").ValueCheckbox | import("./ui/Values.js").ValueSlider | import("./ui/Values.js").ValueSelect | import("./ui/Values.js").ValueButton | import("./ui/Values.js").ValueString | null; - _addInfo(editor: any, itemNode: any): void; - _addParameter(object: any, property: any, editor: any, subItem: any): void; - _registerParameter(object: any, property: any, editor: any, subItem: any): void; - addString(object: any, property: any): import("./ui/Values.js").ValueString; - addFolder(name: any): /*elided*/ any; - addBoolean(object: any, property: any): import("./ui/Values.js").ValueCheckbox; - addSelect(object: any, property: any, options: any): import("./ui/Values.js").ValueSelect; - addColor(object: any, property: any): import("./ui/Values.js").ValueColor; - addSlider(object: any, property: any, min?: number, max?: number, step?: number): import("./ui/Values.js").ValueSlider; - addNumber(object: any, property: any, ...params: any[]): import("./ui/Values.js").ValueNumber; - addButton(object: any, property: any): import("./ui/Values.js").ValueButton; - }; - getStatsData(cid: any): any; - resolveStats(stats: any): void; - getNodes(): any[] | null; - getAverageDeltaTime(statsData: any, property: any, frames?: number | undefined): number; - resolveFrame(frame: any): void; - updateCycle(cycle: any): void; -} -export function getItem(id: any): any; -export function setItem(id: any, state: any): void; -import { RendererInspector } from './RendererInspector.js'; -import { Profiler } from './ui/Profiler.js'; -import { Performance } from './tabs/Performance.js'; -import { Memory } from './tabs/Memory.js'; -import { Console } from './tabs/Console.js'; -import { Parameters } from './tabs/Parameters.js'; -import { Viewer } from './tabs/Viewer.js'; -import { Timeline } from './tabs/Timeline.js'; -import { Settings } from './tabs/Settings.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/RendererInspector.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/RendererInspector.d.ts deleted file mode 100644 index 211fa1dea..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/inspector/RendererInspector.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -export class RendererInspector extends InspectorBase { - currentFrame: Object | null; - currentRender: any; - currentNodes: any[] | null; - lastFrame: Object | null; - frames: any[]; - framesLib: {}; - maxFrames: number; - _lastFinishTime: number; - _resolveTimestampPromise: any; - isRendererInspector: boolean; - getParent(): any; - fps: number | undefined; - _getFPS(): number; - _createFrame(): { - frameId: any; - resolvedCompute: boolean; - resolvedRender: boolean; - deltaTime: number; - startTime: number; - finishTime: number; - miscellaneous: number; - children: never[]; - renders: never[]; - computes: never[]; - }; - getFrame(): Object | null; - getFrameById(frameId: any): any; - updateTabs(): void; - resolveFrame(): void; - resolveTimestamp(): Promise; - get isAvailable(): boolean; - addFrame(frame: any): void; - inspect(node: any): void; - beginCompute(uid: any, computeNode: any): void; - currentCompute: any; - beginRender(uid: any, scene: any, camera: any, renderTarget: any): void; -} -import { InspectorBase } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/extensions/tsl-graph/TSLGraphEditor.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/extensions/tsl-graph/TSLGraphEditor.d.ts deleted file mode 100644 index 72ae21978..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/inspector/extensions/tsl-graph/TSLGraphEditor.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -export default TSLGraphEditor; -declare class TSLGraphEditor extends Extension { - constructor(options?: {}); - autoGraphId: boolean; - iframe: HTMLIFrameElement; - editorOrigin: string; - material: any; - uniforms: any; - isReady: boolean; - _codeData: any; - _codeSaveTimeout: number | null; - _pending: Map; - _resolveReady: ((value: any) => void) | null; - _editorReady: Promise; - get hasGraphs(): boolean; - _initPicker(inspector: any): void; - apply(scene: any): this; - restoreMaterial(material: any): void; - init(inspector: any): void; - setMaterial(material: any): Promise; - loadGraph(graphData: any): Promise; - command(type: any, payload: any): Promise; - getCode(): Promise; - getTSLFunction(): Promise; - getGraph(): Promise; - onResponse(): Promise; - onEvent(type: any, payload: any): Promise; - onMessage(event: any): Promise; - _setMaterial(material: any): Promise; - materialDefault: any; - _getGraphType(material: any): "material/physical" | "material/standard" | "material/phong" | "material/basic" | "material/sprite" | "material/node"; - _showManagerModal(): void; - _exportData(): void; - _importData(): void; - getCodes(): any; - _saveCode(): void; - _restoreMaterial(): void; - _updateMaterial(): Promise; - _updateUniforms(uniforms: any): void; - _isEditorMessage(value: any): boolean; - _makeRequestId(): string; - _post(message: any): void; -} -import { Extension } from 'three/addons/inspector/Extension.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/extensions/tsl-graph/TSLGraphLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/extensions/tsl-graph/TSLGraphLoader.d.ts deleted file mode 100644 index 85c1dc7fc..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/inspector/extensions/tsl-graph/TSLGraphLoader.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -export class TSLGraphLoader extends FileLoader { - static get hasGraphs(): boolean; - static getCodes(): any; - static setCodes(codes: any): void; - static setGraph(graphId: any, graphData: any): void; - static getGraph(graphId: any): any; - static deleteGraph(graphId: any): void; - static setGraphs(json: any): any; - static clearGraphs(): void; - constructor(manager: any); - load(url: any, onLoad: any, onProgress: any, onError: any): void; - parseMaterial(json: any): any; - parseMaterials(json: any): any; - parse(json: any): TSLGraphLoaderApplier; - _generateMaterialCode(json: any, name?: string, imports?: {}): any; - _generateCode(materials: any, imports: any): string; -} -import { FileLoader } from 'three'; -declare class TSLGraphLoaderApplier { - constructor(tslGraphFns: any); - tslGraphFns: any; - apply(scene: any): void; -} -export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Console.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Console.d.ts deleted file mode 100644 index 23e7c48b0..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Console.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export class Console extends Tab { - constructor(options?: {}); - filters: { - info: boolean; - warn: boolean; - error: boolean; - }; - filterText: string; - logContainer: HTMLDivElement; - buildHeader(): void; - applyFilters(): void; - copyAll(button: any): void; - _getIcon(type: any, subType: any): string | undefined; - _formatMessage(type: any, text: any): DocumentFragment; - addMessage(type: any, text: any): void; -} -import { Tab } from '../ui/Tab.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Memory.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Memory.d.ts deleted file mode 100644 index 934bb1515..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Memory.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export class Memory extends Tab { - constructor(options?: {}); - memoryStats: Item; - attributes: Item; - geometries: Item; - indexAttributes: Item; - indirectStorageAttributes: Item; - programs: Item; - readbackBuffers: Item; - renderTargets: Item; - storageAttributes: Item; - textures: Item; - uniformBuffers: Item; - graph: Graph; - updateGraph(inspector: any): void; - updateText(inspector: any): void; -} -import { Tab } from '../ui/Tab.js'; -import { Item } from '../ui/Item.js'; -import { Graph } from '../ui/Graph.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Parameters.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Parameters.d.ts deleted file mode 100644 index e02332be8..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Parameters.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -export class Parameters extends Tab { - constructor(options?: {}); - paramList: List; - groups: any[]; - createGroup(name: any): ParametersGroup; -} -import { Tab } from '../ui/Tab.js'; -import { List } from '../ui/List.js'; -declare class ParametersGroup { - constructor(parameters: any, name: any); - parameters: any; - name: any; - paramList: Item; - objects: any[]; - close(): this; - add(object: any, property: any, ...params: any[]): ValueNumber | ValueCheckbox | ValueSlider | ValueSelect | ValueButton | ValueString | null; - _addInfo(editor: any, itemNode: any): void; - _addParameter(object: any, property: any, editor: any, subItem: any): void; - _registerParameter(object: any, property: any, editor: any, subItem: any): void; - addString(object: any, property: any): ValueString; - addFolder(name: any): ParametersGroup; - addBoolean(object: any, property: any): ValueCheckbox; - addSelect(object: any, property: any, options: any): ValueSelect; - addColor(object: any, property: any): ValueColor; - addSlider(object: any, property: any, min?: number, max?: number, step?: number): ValueSlider; - addNumber(object: any, property: any, ...params: any[]): ValueNumber; - addButton(object: any, property: any): ValueButton; -} -import { Item } from '../ui/Item.js'; -import { ValueNumber } from '../ui/Values.js'; -import { ValueCheckbox } from '../ui/Values.js'; -import { ValueSlider } from '../ui/Values.js'; -import { ValueSelect } from '../ui/Values.js'; -import { ValueButton } from '../ui/Values.js'; -import { ValueString } from '../ui/Values.js'; -import { ValueColor } from '../ui/Values.js'; -export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Performance.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Performance.d.ts deleted file mode 100644 index 1abd6b469..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Performance.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export class Performance extends Tab { - constructor(options?: {}); - graphFpsCounter: HTMLSpanElement; - notInUse: Map; - frameStats: Item; - graphStats: Item; - graph: Graph; - miscellaneous: Item; - currentRender: any; - currentItem: any; - frameItems: Map; - resolveStats(inspector: any, stats: any): void; - updateGraph(inspector: any): void; - addNotInUse(cid: any, item: any): void; - updateNotInUse(cid: any): void; - updateText(inspector: any, frame: any): void; -} -import { Tab } from '../ui/Tab.js'; -import { Item } from '../ui/Item.js'; -import { Graph } from '../ui/Graph.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Settings.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Settings.d.ts deleted file mode 100644 index 99176c006..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Settings.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export class Settings extends Parameters { - constructor(); - extensions: {}; - setActiveExtension(name: any, value: any): Promise; - _updateExtensionUI(extension: any): void; - _unloadExtension(inspector: any, extension: any): Promise; - _loadExtension(inspector: any, extension: any): Promise; - _getExtensions(): Promise; -} -import { Parameters } from './Parameters.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Timeline.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Timeline.d.ts deleted file mode 100644 index 47583cc4f..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Timeline.d.ts +++ /dev/null @@ -1,149 +0,0 @@ -export class Timeline extends Tab { - constructor(options?: {}); - isRecording: boolean; - frames: any[]; - baseTriangles: number; - currentFrame: { - id: any; - calls: never[]; - fps: number; - triangles: number; - } | null; - isHierarchicalView: boolean; - callBlocks: WeakMap; - fallbackBlocks: any[]; - originalBackend: any; - originalMethods: Map; - renderer: any; - graph: Graph; - scrollWrapper: HTMLDivElement; - buildHeader(): void; - recordButton: HTMLButtonElement | undefined; - viewModeButton: HTMLButtonElement | undefined; - recordRefreshButton: HTMLButtonElement | undefined; - exportButton: HTMLButtonElement | undefined; - frameInfo: HTMLSpanElement | undefined; - buildUI(): void; - graphSlider: HTMLDivElement | undefined; - hoverIndicator: HTMLDivElement | undefined; - playhead: HTMLDivElement | undefined; - fixedScreenX: number | undefined; - isTrackingLatest: boolean | undefined; - isManualScrubbing: boolean | undefined; - timelineTrack: HTMLDivElement | undefined; - setRenderer(renderer: any): void; - toggleRecording(): void; - startRecording(): void; - selectedFrameIndex: any; - stopRecording(): void; - clear(): void; - exportData(): void; - getRenderTargetDetails(renderTarget: any): { - [x: string]: any; - target: any; - }; - getCallDetail(method: any, args: any): { - scene: any; - camera: any; - } | { - compute: any; - } | { - color: any; - depth: any; - stencil: any; - } | { - group: any; - count: any; - } | { - group: any; - size: string; - } | { - object: any; - } | { - name: any; - count: any; - itemSize: any; - } | { - target: any; - width: any; - height: any; - } | { - source: any; - destination: any; - } | { - magFilter: any; - minFilter: any; - wrapS: any; - wrapT: any; - anisotropy: any; - } | { - texture: any; - } | { - node: any; - bindings: number; - dispatch: any; - group?: undefined; - x?: undefined; - y?: undefined; - width?: undefined; - height?: undefined; - stage?: undefined; - name?: undefined; - } | { - group: any; - node?: undefined; - bindings?: undefined; - dispatch?: undefined; - x?: undefined; - y?: undefined; - width?: undefined; - height?: undefined; - stage?: undefined; - name?: undefined; - } | { - x: any; - y: any; - width: any; - height: any; - node?: undefined; - bindings?: undefined; - dispatch?: undefined; - group?: undefined; - stage?: undefined; - name?: undefined; - } | { - stage: any; - name: any; - node?: undefined; - bindings?: undefined; - dispatch?: undefined; - group?: undefined; - x?: undefined; - y?: undefined; - width?: undefined; - height?: undefined; - } | { - name: any; - node?: undefined; - bindings?: undefined; - dispatch?: undefined; - group?: undefined; - x?: undefined; - y?: undefined; - width?: undefined; - height?: undefined; - stage?: undefined; - } | null; - getTextureName(texture: any): any; - getTextureFilterName(filter: any): any; - getTextureWrapName(wrap: any): any; - formatDetails(details: any): string; - renderSlider(): void; - selectFrame(index: any): void; - getCallBlock(call: any, fallbackIndex: any, instanceIndex?: number): any; - renderTimelineTrack(frame: any): void; - collapsedGroups: Set | undefined; - getColorForMethod(method: any): "var(--color-green)" | "var(--text-secondary)" | "var(--color-red)" | "var(--color-yellow)"; -} -import { Tab } from '../ui/Tab.js'; -import { Graph } from '../ui/Graph.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Viewer.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Viewer.d.ts deleted file mode 100644 index 5f391e043..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/inspector/tabs/Viewer.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export class Viewer extends Tab { - constructor(options?: {}); - itemLibrary: Map; - folderLibrary: Map; - canvasNodes: Map; - currentDataList: any[]; - nodeList: List; - nodes: Item; - getFolder(name: any): any; - addNodeItem(canvasData: any): any; - getCanvasDataByNode(renderer: any, node: any): any; - update(inspector: any): void; -} -import { Tab } from '../ui/Tab.js'; -import { List } from '../ui/List.js'; -import { Item } from '../ui/Item.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Graph.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Graph.d.ts deleted file mode 100644 index d427e26b6..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Graph.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export class Graph { - constructor(maxPoints?: number); - maxPoints: number; - lines: {}; - limit: number; - limitIndex: number; - domElement: SVGSVGElement; - addLine(id: any, color: any): void; - addPoint(lineId: any, value: any): void; - resetLimit(): void; - update(): void; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Item.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Item.d.ts deleted file mode 100644 index f6e7d5aae..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Item.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export class Item { - constructor(...data: any[]); - children: any[]; - isOpen: boolean; - childrenContainer: HTMLDivElement | null; - parent: any; - domElement: HTMLDivElement; - itemRow: HTMLDivElement; - userData: {}; - data: any[]; - onItemClick(e: any): void; - add(item: any, index?: number): this; - remove(item: any): this; - updateToggler(): void; - toggle(): this; - close(): this; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/List.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/List.d.ts deleted file mode 100644 index 50e04e4bc..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/List.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export class List { - constructor(...headers: any[]); - headers: any[]; - children: any[]; - domElement: HTMLDivElement; - id: string; - gridStyleElement: HTMLStyleElement; - setGridStyle(gridTemplate: any): void; - add(item: any): void; - remove(item: any): this; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Profiler.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Profiler.d.ts deleted file mode 100644 index 779270bef..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Profiler.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -export class Profiler extends EventDispatcher { - constructor(inspector: any); - inspector: any; - tabs: {}; - activeTabId: any; - isResizing: boolean; - lastHeightBottom: number; - lastWidthRight: number; - position: string; - detachedWindows: any[]; - maxZIndex: number; - nextTabOriginalIndex: number; - getSize(): { - width: number; - height: number; - }; - get isMobile(): boolean; - get isSmallScreen(): boolean; - detectMobile(): boolean; - setupOrientationListener(): void; - setupWindowResizeListener(): void; - constrainWindowToBounds(windowPanel: any): void; - setupShell(): void; - domElement: HTMLDivElement | undefined; - toggleButton: HTMLButtonElement | undefined; - builtinTabsContainer: Element | null | undefined; - miniPanel: HTMLDivElement | undefined; - panel: HTMLDivElement | undefined; - tabsContainer: HTMLDivElement | undefined; - floatingBtn: HTMLButtonElement | undefined; - maximizeBtn: HTMLButtonElement | undefined; - contentWrapper: HTMLDivElement | undefined; - setupResizing(): void; - toggleMaximize(): void; - hide(): void; - show(tab: any): void; - addTab(tab: any): void; - addBuiltinTab(tab: any): void; - removeTab(tab: any): void; - updatePanelSize(): void; - setupTabDragAndDrop(tab: any): void; - createPreviewWindow(tab: any, x: any, y: any): HTMLDivElement; - detachTab(tab: any, x: any, y: any): void; - createDetachedWindow(tab: any, x: any, y: any): { - panel: HTMLDivElement; - tab: any; - }; - bringWindowToFront(windowPanel: any): void; - setupDetachedWindowDrag(windowPanel: any, header: any, tab: any): void; - setupDetachedWindowResize(windowPanel: any, resizerTop: any, resizerRight: any, resizerBottom: any, resizerLeft: any, resizerCorner: any): void; - reattachTab(tab: any): void; - setActiveTab(id: any): void; - togglePanel(): void; - togglePosition(): void; - setPosition(targetPosition: any): void; - saveLayout(): void; - loadLayout(): void; - isLoadingLayout: boolean | undefined; - pendingDetachedTabs: any; - restoreDetachedTabs(): void; -} -import { EventDispatcher } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Style.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Style.d.ts deleted file mode 100644 index 7889785be..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Style.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export class Style { - static init(container: any): void; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Tab.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Tab.d.ts deleted file mode 100644 index 83cfb5d9e..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Tab.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Tab class - * @param {string} title - The title of the tab - * @param {Object} options - Options for the tab - * @param {boolean} [options.allowDetach=true] - Whether the tab can be detached into a separate window - * @param {boolean} [options.builtin=false] - Whether the tab should appear in the profiler-toggle button - * @param {string} [options.icon] - SVG icon HTML for the builtin button - * - * @example - * // Create a tab that can be detached (default behavior) - * const tab1 = new Tab('My Tab'); - * - * // Create a tab that cannot be detached - * const tab2 = new Tab('Fixed Tab', { allowDetach: false }); - * - * // Create a builtin tab that appears in the profiler-toggle - * const tab3 = new Tab('Builtin Tab', { builtin: true }); - * - * // Create a builtin tab with custom icon - * const tab4 = new Tab('Settings', { builtin: true, icon: '...' }); - * - * // Control builtin tab visibility - * tab3.showBuiltin(); // Show the builtin button and mini-content - * tab3.hideBuiltin(); // Hide the builtin button and mini-content - */ -export class Tab extends EventDispatcher { - constructor(title: any, options?: {}); - id: any; - button: HTMLButtonElement; - content: HTMLDivElement; - _isActive: boolean; - isVisible: boolean; - isDetached: boolean; - detachedWindow: any; - allowDetach: any; - builtin: any; - icon: any; - builtinButton: any; - miniContent: any; - profiler: any; - onVisibilityChange: any; - get inspector(): any; - set isActive(value: boolean); - get isActive(): boolean; - init(): void; - update(): void; - setActive(isActive: any): void; - show(): void; - hide(): void; - showBuiltin(): void; - hideBuiltin(): void; -} -import { EventDispatcher } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Values.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Values.d.ts deleted file mode 100644 index 60dca2908..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/Values.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -export class Value extends EventDispatcher { - domElement: HTMLDivElement; - _onChangeFunction: any; - setValue(): this; - getValue(): null; - dispatchChange(): void; - onChange(callback: any): this; -} -export class ValueNumber extends Value { - constructor({ value, step, min, max }: { - value?: number | undefined; - step?: number | undefined; - min?: number | undefined; - max?: number | undefined; - }); - input: HTMLInputElement; - _onChangeValue(): void; - addDragHandler(): void; - setValue(val: any): this; - getValue(): number; -} -export class ValueString extends Value { - constructor({ value }: { - value?: string | undefined; - }); - input: HTMLInputElement; - setValue(val: any): this; - getValue(): string; -} -export class ValueCheckbox extends Value { - constructor({ value }: { - value?: boolean | undefined; - }); - checkbox: HTMLInputElement; - setValue(val: any): this; - getValue(): boolean; -} -export class ValueSlider extends Value { - constructor({ value, min, max, step }: { - value?: number | undefined; - min?: number | undefined; - max?: number | undefined; - step?: number | undefined; - }); - slider: HTMLInputElement; - numberInput: HTMLInputElement; - setValue(val: any): this; - getValue(): number; - step(value: any): this; -} -export class ValueSelect extends Value { - constructor({ options, value }: { - options?: never[] | undefined; - value?: string | undefined; - }); - options: any[]; - select: HTMLSelectElement; - getValue(): any; -} -export class ValueColor extends Value { - constructor({ value }: { - value?: string | undefined; - }); - colorInput: HTMLInputElement; - _value: string; - _getColorHex(color: any): any; - getValue(): string; -} -export class ValueButton extends Value { - constructor({ text, value }: { - text?: string | undefined; - value?: (() => void) | undefined; - }); -} -import { EventDispatcher } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/utils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/utils.d.ts deleted file mode 100644 index 20e4088f4..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/inspector/ui/utils.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export function createValueSpan(): HTMLSpanElement; -export function setText(element: any, text: any): void; -export function getText(element: any): any; -export function splitPath(fullPath: any): { - path: any; - name: any; -}; -export function splitCamelCase(str: any): any; -export function formatBytes(bytes: any, decimals?: number): string; diff --git a/jsdoc-testing/jsdoc/examples/jsm/interaction/InteractionManager.d.ts b/jsdoc-testing/jsdoc/examples/jsm/interaction/InteractionManager.d.ts deleted file mode 100644 index b71532d01..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/interaction/InteractionManager.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Manages interaction for 3D objects independently of the scene graph. - * - * For objects with an {@link HTMLTexture}, the manager computes CSS `matrix3d` - * transforms each frame so the underlying HTML elements stay aligned with - * their meshes. Because the elements are children of the canvas, the browser - * dispatches pointer events to them natively. - * - * ```js - * const interactions = new InteractionManager(); - * interactions.connect( renderer, camera ); - * - * // Objects live anywhere in the scene graph - * scene.add( mesh ); - * - * // Register for interaction separately - * interactions.add( mesh ); - * - * // In the animation loop - * interactions.update(); - * ``` - * @three_import import { InteractionManager } from 'three/addons/interaction/InteractionManager.js'; - */ -export class InteractionManager { - /** - * The registered interactive objects. - * - * @type {Array} - */ - objects: Array; - /** - * The canvas element. - * - * @type {?HTMLCanvasElement} - * @default null - */ - element: HTMLCanvasElement | null; - /** - * The camera used for computing the element transforms. - * - * @type {?Camera} - * @default null - */ - camera: Camera | null; - _cachedCssW: number; - _cachedCssH: number; - /** - * Adds one or more objects to the manager. - * - * @param {...Object3D} objects - The objects to add. - * @return {this} - */ - add(...objects: Object3D[]): this; - /** - * Removes one or more objects from the manager. - * - * @param {...Object3D} objects - The objects to remove. - * @return {this} - */ - remove(...objects: Object3D[]): this; - /** - * Stores the renderer and camera needed for computing element transforms. - * - * @param {(WebGPURenderer|WebGLRenderer)} renderer - The renderer. - * @param {Camera} camera - The camera. - */ - connect(renderer: (WebGPURenderer | WebGLRenderer), camera: Camera): void; - /** - * Updates the element transforms for all registered objects. - * Call this once per frame in the animation loop. - */ - update(): void; - /** - * Disconnects this manager, clearing the renderer and camera references. - */ - disconnect(): void; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/interactive/HTMLMesh.d.ts b/jsdoc-testing/jsdoc/examples/jsm/interactive/HTMLMesh.d.ts deleted file mode 100644 index 6631c6734..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/interactive/HTMLMesh.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * This class can be used to render a DOM element onto a canvas and use it as a texture - * for a plane mesh. - * - * A typical use case for this class is to render the GUI of `lil-gui` as a texture so it - * is compatible for VR. - * - * ```js - * const gui = new GUI( { width: 300 } ); // create lil-gui instance - * - * const mesh = new HTMLMesh( gui.domElement ); - * scene.add( mesh ); - * ``` - * - * @augments Mesh - * @three_import import { HTMLMesh } from 'three/addons/interactive/HTMLMesh.js'; - */ -export class HTMLMesh extends Mesh { - /** - * Constructs a new HTML mesh. - * - * @param {HTMLElement} dom - The DOM element to display as a plane mesh. - */ - constructor(dom: HTMLElement); - /** - * Frees the GPU-related resources allocated by this instance and removes all event listeners. - * Call this method whenever this instance is no longer used in your app. - */ - dispose: () => void; -} -import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/interactive/InteractiveGroup.d.ts b/jsdoc-testing/jsdoc/examples/jsm/interactive/InteractiveGroup.d.ts deleted file mode 100644 index f05136dc0..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/interactive/InteractiveGroup.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -/** - * This class can be used to group 3D objects in an interactive group. - * The group itself can listen to Pointer, Mouse or XR controller events to - * detect selections of descendant 3D objects. If a 3D object is selected, - * the respective event is going to dispatched to it. - * - * ```js - * const group = new InteractiveGroup(); - * group.listenToPointerEvents( renderer, camera ); - * group.listenToXRControllerEvents( controller1 ); - * group.listenToXRControllerEvents( controller2 ); - * scene.add( group ); - * - * // now add objects that should be interactive - * group.add( mesh1, mesh2, mesh3 ); - * ``` - * @augments Group - * @three_import import { InteractiveGroup } from 'three/addons/interactive/InteractiveGroup.js'; - */ -export class InteractiveGroup extends Group { - /** - * The internal raycaster. - * - * @type {Raycaster} - */ - raycaster: Raycaster; - /** - * The internal raycaster. - * - * @type {?HTMLElement} - * @default null - */ - element: HTMLElement | null; - /** - * The camera used for raycasting. - * - * @type {?Camera} - * @default null - */ - camera: Camera | null; - /** - * An array of XR controllers. - * - * @type {Array} - */ - controllers: Array; - _onPointerEvent: (event: any) => void; - _onXRControllerEvent: (event: any) => void; - onPointerEvent(event: any): void; - onXRControllerEvent(event: any): void; - /** - * Calling this method makes sure the interactive group listens to Pointer and Mouse events. - * The target is the `domElement` of the given renderer. The camera is required for the internal - * raycasting so 3D objects can be detected based on the events. - * - * @param {(WebGPURenderer|WebGLRenderer)} renderer - The renderer. - * @param {Camera} camera - The camera. - */ - listenToPointerEvents(renderer: (WebGPURenderer | WebGLRenderer), camera: Camera): void; - /** - * Disconnects this interactive group from all Pointer and Mouse Events. - */ - disconnectionPointerEvents(): void; - /** - * Calling this method makes sure the interactive group listens to events of - * the given XR controller. - * - * @param {Group} controller - The XR controller. - */ - listenToXRControllerEvents(controller: Group): void; - /** - * Disconnects this interactive group from all XR controllers. - */ - disconnectXrControllerEvents(): void; - /** - * Disconnects this interactive group from the DOM and all XR controllers. - */ - disconnect(): void; -} -import { Group } from 'three'; -import { Raycaster } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/interactive/SelectionBox.d.ts b/jsdoc-testing/jsdoc/examples/jsm/interactive/SelectionBox.d.ts deleted file mode 100644 index 7bd19c5bc..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/interactive/SelectionBox.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -/** - * This class can be used to select 3D objects in a scene with a selection box. - * It is recommended to visualize the selected area with the help of {@link SelectionHelper}. - * - * ```js - * const selectionBox = new SelectionBox( camera, scene ); - * const selectedObjects = selectionBox.select( startPoint, endPoint ); - * ``` - * - * @three_import import { SelectionBox } from 'three/addons/interactive/SelectionBox.js'; - */ -export class SelectionBox { - /** - * Constructs a new selection box. - * - * @param {Camera} camera - The camera the scene is rendered with. - * @param {Scene} scene - The scene. - * @param {number} [deep=Number.MAX_VALUE] - How deep the selection frustum of perspective cameras should extend. - */ - constructor(camera: Camera, scene: Scene, deep?: number); - /** - * The camera the scene is rendered with. - * - * @type {Camera} - */ - camera: Camera; - /** - * The camera the scene is rendered with. - * - * @type {Scene} - */ - scene: Scene; - /** - * The start point of the selection. - * - * @type {Vector3} - */ - startPoint: Vector3; - /** - * The end point of the selection. - * - * @type {Vector3} - */ - endPoint: Vector3; - /** - * The selected 3D objects. - * - * @type {Array} - */ - collection: Array; - /** - * The selected instance IDs of instanced meshes. - * - * @type {Object} - */ - instances: Object; - /** - * The selected batches of batched meshes. - * - * @type {Object} - */ - batches: Object; - /** - * How deep the selection frustum of perspective cameras should extend. - * - * @type {number} - * @default Number.MAX_VALUE - */ - deep: number; - /** - * This method selects 3D objects in the scene based on the given start - * and end point. If no parameters are provided, the method uses the start - * and end values of the respective members. - * - * @param {Vector3} [startPoint] - The start point. - * @param {Vector3} [endPoint] - The end point. - * @return {Array} The selected 3D objects. - */ - select(startPoint?: Vector3, endPoint?: Vector3): Array; - _updateFrustum(startPoint: any, endPoint: any): void; - _searchChildInFrustum(frustum: any, object: any): void; -} -import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/ammo.wasm.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/ammo.wasm.d.ts deleted file mode 100644 index 53124ae4f..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/ammo.wasm.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export = Ammo; -declare function Ammo(Ammo: any): any; -declare class Ammo { - constructor(Ammo: any); - Ammo: any; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/basis/basis_transcoder.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/basis/basis_transcoder.d.ts deleted file mode 100644 index a141857f4..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/basis/basis_transcoder.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export = BASIS; -declare function BASIS(moduleArg?: {}): Promise; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/chevrotain.module.min.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/chevrotain.module.min.d.ts deleted file mode 100644 index 5298df7f0..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/chevrotain.module.min.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: any; -export default _default; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/demuxer_mp4.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/demuxer_mp4.d.ts deleted file mode 100644 index 007913507..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/demuxer_mp4.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export class MP4Demuxer { - constructor(uri: any, { onConfig, onChunk, setStatus }: { - onConfig: any; - onChunk: any; - setStatus: any; - }); - #private; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_decoder.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_decoder.d.ts deleted file mode 100644 index 8367943c4..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_decoder.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export = DracoDecoderModule; -declare function DracoDecoderModule(DracoDecoderModule?: {}): any; -declare namespace DracoDecoderModule { - export { DracoDecoderModule }; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_encoder.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_encoder.d.ts deleted file mode 100644 index 1c63c0411..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_encoder.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export = DracoEncoderModule; -declare function DracoEncoderModule(DracoEncoderModule: any, ...args: any[]): any; -declare namespace DracoEncoderModule { - export { DracoEncoderModule }; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_wasm_wrapper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_wasm_wrapper.d.ts deleted file mode 100644 index e973d4a6a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/draco/draco_wasm_wrapper.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export = DracoDecoderModule; -declare function DracoDecoderModule(n: any): any; -declare namespace DracoDecoderModule { - export { DracoDecoderModule }; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_decoder.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_decoder.d.ts deleted file mode 100644 index 8367943c4..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_decoder.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export = DracoDecoderModule; -declare function DracoDecoderModule(DracoDecoderModule?: {}): any; -declare namespace DracoDecoderModule { - export { DracoDecoderModule }; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_encoder.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_encoder.d.ts deleted file mode 100644 index 1c63c0411..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_encoder.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export = DracoEncoderModule; -declare function DracoEncoderModule(DracoEncoderModule: any, ...args: any[]): any; -declare namespace DracoEncoderModule { - export { DracoEncoderModule }; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_wasm_wrapper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_wasm_wrapper.d.ts deleted file mode 100644 index e973d4a6a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/draco/gltf/draco_wasm_wrapper.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export = DracoDecoderModule; -declare function DracoDecoderModule(n: any): any; -declare namespace DracoDecoderModule { - export { DracoDecoderModule }; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/ecsy.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/ecsy.module.d.ts deleted file mode 100644 index 092baee43..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/ecsy.module.d.ts +++ /dev/null @@ -1,344 +0,0 @@ -export class Component { - constructor(props: any); - _pool: any; - copy(source: any): this; - clone(): any; - reset(): void; - dispose(): void; - getName(): any; - checkUndefinedAttributes(src: any): void; -} -export namespace Component { - let schema: {}; - let isComponent: boolean; - function getName(): any; -} -export function Not(Component: any): { - operator: string; - Component: any; -}; -export class ObjectPool { - constructor(T: any, initialSize: any); - freeList: any[]; - count: number; - T: any; - isObjectPool: boolean; - acquire(): any; - release(item: any): void; - expand(count: any): void; - totalSize(): number; - totalFree(): number; - totalUsed(): number; -} -export class System { - constructor(world: any, attributes: any); - canExecute(): boolean; - getName(): any; - world: any; - enabled: boolean; - _queries: {}; - queries: {}; - priority: any; - executeTime: number; - _mandatoryQueries: any[]; - initialized: boolean; - stop(): void; - play(): void; - clearEvents(): void; - toJSON(): { - name: any; - enabled: boolean; - executeTime: number; - priority: any; - queries: {}; - }; -} -export namespace System { - let isSystem: boolean; - function getName(): any; -} -export class SystemStateComponent extends Component { -} -export namespace SystemStateComponent { - let isSystemStateComponent: boolean; -} -export class TagComponent extends Component { - constructor(); -} -export namespace TagComponent { - let isTagComponent: boolean; -} -export namespace Types { - let Number: any; - let Boolean: any; - let String: any; - let Array: any; - let Ref: any; - let JSON: any; -} -export const Version: "0.3.1"; -export class World { - constructor(options?: {}); - options: { - entityPoolSize: number; - entityClass: typeof Entity; - }; - componentsManager: ComponentManager; - entityManager: EntityManager; - systemManager: SystemManager; - enabled: boolean; - eventQueues: {}; - lastTime: number; - registerComponent(Component: any, objectPool: any): this; - registerSystem(System: any, attributes: any): this; - hasRegisteredComponent(Component: any): boolean; - unregisterSystem(System: any): this; - getSystem(SystemClass: any): any; - getSystems(): any[]; - execute(delta: any, time: any): void; - stop(): void; - play(): void; - createEntity(name: any): any; - stats(): { - entities: { - numEntities: number; - numQueries: number; - queries: {}; - numComponentPool: number; - componentPool: {}; - eventDispatcher: { - fired: number; - handled: number; - }; - }; - system: { - numSystems: number; - systems: {}; - }; - }; -} -declare class Entity { - constructor(entityManager: any); - _entityManager: any; - id: number; - _ComponentTypes: any[]; - _components: {}; - _componentsToRemove: {}; - queries: any[]; - _ComponentTypesToRemove: any[]; - alive: boolean; - numStateComponents: number; - getComponent(Component: any, includeRemoved: any): any; - getRemovedComponent(Component: any): any; - getComponents(): {}; - getComponentsToRemove(): {}; - getComponentTypes(): any[]; - getMutableComponent(Component: any): any; - addComponent(Component: any, values: any): this; - removeComponent(Component: any, forceImmediate: any): this; - hasComponent(Component: any, includeRemoved: any): boolean; - hasRemovedComponent(Component: any): boolean; - hasAllComponents(Components: any): boolean; - hasAnyComponents(Components: any): boolean; - removeAllComponents(forceImmediate: any): any; - copy(src: any): this; - clone(): Entity; - reset(): void; - remove(forceImmediate: any): any; -} -export function cloneArray(src: any): any; -export function cloneClonable(src: any): any; -export function cloneJSON(src: any): any; -export function cloneValue(src: any): any; -export function copyArray(src: any, dest: any): any; -export function copyCopyable(src: any, dest: any): any; -export function copyJSON(src: any): any; -export function copyValue(src: any): any; -export function createType(typeDefinition: any): any; -export function enableRemoteDevtools(remoteId: any): void; -declare class ComponentManager { - Components: any[]; - _ComponentsMap: {}; - _componentPool: {}; - numComponents: {}; - nextComponentId: number; - hasComponent(Component: any): boolean; - registerComponent(Component: any, objectPool: any): void; - componentAddedToEntity(Component: any): void; - componentRemovedFromEntity(Component: any): void; - getComponentsPool(Component: any): any; -} -/** - * @private - * @class EntityManager - */ -declare class EntityManager { - constructor(world: any); - world: any; - componentsManager: any; - _entities: any[]; - _nextEntityId: number; - _entitiesByNames: {}; - _queryManager: QueryManager; - eventDispatcher: EventDispatcher; - _entityPool: EntityPool; - entitiesWithComponentsToRemove: any[]; - entitiesToRemove: any[]; - deferredRemovalEnabled: boolean; - getEntityByName(name: any): any; - /** - * Create a new entity - */ - createEntity(name: any): any; - /** - * Add a component to an entity - * @param {Entity} entity Entity where the component will be added - * @param {Component} Component Component to be added to the entity - * @param {Object} values Optional values to replace the default attributes - */ - entityAddComponent(entity: Entity, Component: Component, values: Object): void; - /** - * Remove a component from an entity - * @param {Entity} entity Entity which will get removed the component - * @param {*} Component Component to remove from the entity - * @param {Bool} immediately If you want to remove the component immediately instead of deferred (Default is false) - */ - entityRemoveComponent(entity: Entity, Component: any, immediately: Bool): void; - _entityRemoveComponentSync(entity: any, Component: any, index: any): void; - /** - * Remove all the components from an entity - * @param {Entity} entity Entity from which the components will be removed - */ - entityRemoveAllComponents(entity: Entity, immediately: any): void; - /** - * Remove the entity from this manager. It will clear also its components - * @param {Entity} entity Entity to remove from the manager - * @param {Bool} immediately If you want to remove the component immediately instead of deferred (Default is false) - */ - removeEntity(entity: Entity, immediately: Bool): void; - _releaseEntity(entity: any, index: any): void; - /** - * Remove all entities from this manager - */ - removeAllEntities(): void; - processDeferredRemoval(): void; - /** - * Get a query based on a list of components - * @param {Array(Component)} Components List of components that will form the query - */ - queryComponents(Components: any): any; - /** - * Return number of entities - */ - count(): number; - /** - * Return some stats - */ - stats(): { - numEntities: number; - numQueries: number; - queries: {}; - numComponentPool: number; - componentPool: {}; - eventDispatcher: { - fired: number; - handled: number; - }; - }; -} -declare class SystemManager { - constructor(world: any); - _systems: any[]; - _executeSystems: any[]; - world: any; - lastExecutedSystem: any; - registerSystem(SystemClass: any, attributes: any): this; - unregisterSystem(SystemClass: any): this; - sortSystems(): void; - getSystem(SystemClass: any): any; - getSystems(): any[]; - removeSystem(SystemClass: any): void; - executeSystem(system: any, delta: any, time: any): void; - stop(): void; - execute(delta: any, time: any, forcePlay: any): void; - stats(): { - numSystems: number; - systems: {}; - }; -} -/** - * @private - * @class QueryManager - */ -declare class QueryManager { - constructor(world: any); - _world: any; - _queries: {}; - onEntityRemoved(entity: any): void; - /** - * Callback when a component is added to an entity - * @param {Entity} entity Entity that just got the new component - * @param {Component} Component Component added to the entity - */ - onEntityComponentAdded(entity: Entity, Component: Component): void; - /** - * Callback when a component is removed from an entity - * @param {Entity} entity Entity to remove the component from - * @param {Component} Component Component to remove from the entity - */ - onEntityComponentRemoved(entity: Entity, Component: Component): void; - /** - * Get a query for the specified components - * @param {Component} Components Components that the query should have - */ - getQuery(Components: Component): any; - /** - * Return some stats from this class - */ - stats(): {}; -} -/** - * @private - * @class EventDispatcher - */ -declare class EventDispatcher { - _listeners: {}; - stats: { - fired: number; - handled: number; - }; - /** - * Add an event listener - * @param {String} eventName Name of the event to listen - * @param {Function} listener Callback to trigger when the event is fired - */ - addEventListener(eventName: string, listener: Function): void; - /** - * Check if an event listener is already added to the list of listeners - * @param {String} eventName Name of the event to check - * @param {Function} listener Callback for the specified event - */ - hasEventListener(eventName: string, listener: Function): boolean; - /** - * Remove an event listener - * @param {String} eventName Name of the event to remove - * @param {Function} listener Callback for the specified event - */ - removeEventListener(eventName: string, listener: Function): void; - /** - * Dispatch an event - * @param {String} eventName Name of the event to dispatch - * @param {Entity} entity (Optional) Entity to emit - * @param {Component} component - */ - dispatchEvent(eventName: string, entity: Entity, component: Component): void; - /** - * Reset stats counters - */ - resetCounters(): void; -} -declare class EntityPool extends ObjectPool { - constructor(entityManager: any, entityClass: any, initialSize: any); - entityManager: any; -} -export { Entity as _Entity }; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/ktx-parse.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/ktx-parse.module.d.ts deleted file mode 100644 index 40983ceda..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/ktx-parse.module.d.ts +++ /dev/null @@ -1,299 +0,0 @@ -declare const Z: 15; -declare const q: 2; -declare const Q: 14; -declare const G: 1; -declare const R: 0; -declare const J: 13; -declare const u: 1; -declare const _: 0; -declare const s: 0; -declare const U: 162; -declare const f: 160; -declare const h: 163; -declare const c: 161; -declare const l: 1; -declare const p: 166; -declare const o: 0; -declare const H: 6; -declare const z: 7; -declare const Y: 11; -declare const N: 4; -declare const P: 2; -declare const M: 3; -declare const E: 1; -declare const W: 5; -declare const X: 10; -declare const j: 8; -declare const K: 9; -declare const S: 0; -declare const et: 32; -declare const $: 128; -declare const nt: 16; -declare const tt: 64; -declare const F: 16; -declare const O: 17; -declare const T: 18; -declare const w: 7; -declare const k: 12; -declare const B: 9; -declare const v: 8; -declare const b: 3; -declare const x: 1; -declare const m: 4; -declare const V: 14; -declare const I: 13; -declare const L: 10; -declare const A: 11; -declare const d: 5; -declare const D: 6; -declare const y: 2; -declare const C: 15; -declare const g: 0; -declare const a: 0; -declare const r: 2; -declare const e: 1; -declare const t: 0; -declare const i: 3; -declare const n: 2; -declare const Ut: 8; -declare const qt: 69; -declare const Rt: 65; -declare const Gt: 68; -declare const Yt: 64; -declare const Xt: 63; -declare const jt: 59; -declare const Kt: 62; -declare const zt: 58; -declare const Ii: 1000340001; -declare const ki: 1000340000; -declare const Bi: 1000066011; -declare const Xn: 180; -declare const Kn: 179; -declare const Di: 1000066008; -declare const Nn: 174; -declare const Mn: 173; -declare const wi: 1000066009; -declare const Hn: 176; -declare const Wn: 175; -declare const vi: 1000066010; -declare const jn: 178; -declare const zn: 177; -declare const Li: 1000066012; -declare const Rn: 182; -declare const Yn: 181; -declare const Ai: 1000066013; -declare const qn: 184; -declare const Gn: 183; -declare const _i: 1000066000; -declare const wn: 158; -declare const Dn: 157; -declare const ui: 1000066001; -declare const Bn: 160; -declare const vn: 159; -declare const gi: 1000066002; -declare const An: 162; -declare const Ln: 161; -declare const xi: 1000066003; -declare const In: 164; -declare const kn: 163; -declare const yi: 1000066004; -declare const Cn: 166; -declare const Vn: 165; -declare const bi: 1000066005; -declare const On: 168; -declare const Fn: 167; -declare const mi: 1000066006; -declare const Sn: 170; -declare const Tn: 169; -declare const di: 1000066007; -declare const Pn: 172; -declare const En: 171; -declare const We: 122; -declare const ti: 1000156011; -declare const ai: 1000156021; -declare const rt: 3; -declare const ct: 7; -declare const lt: 5; -declare const Wt: 49; -declare const Mt: 45; -declare const Ht: 50; -declare const Nt: 48; -declare const Pt: 44; -declare const Vt: 35; -declare const kt: 31; -declare const Ct: 36; -declare const It: 34; -declare const At: 30; -declare const Ze: 134; -declare const Qe: 133; -declare const Je: 132; -declare const qe: 131; -declare const tn: 136; -declare const $e: 135; -declare const nn: 138; -declare const en: 137; -declare const an: 140; -declare const sn: 139; -declare const on: 142; -declare const rn: 141; -declare const fn: 144; -declare const ln: 143; -declare const Un: 146; -declare const cn: 145; -declare const ze: 124; -declare const Ye: 128; -declare const Re: 129; -declare const Ke: 126; -declare const Ge: 130; -declare const He: 123; -declare const dn: 156; -declare const mn: 155; -declare const bn: 154; -declare const yn: 153; -declare const un: 150; -declare const _n: 149; -declare const xn: 152; -declare const gn: 151; -declare const pn: 148; -declare const hn: 147; -declare const $n: 1000156010; -declare const si: 1000156020; -declare const ci: 1000054004; -declare const ri: 1000054000; -declare const Ui: 1000054005; -declare const oi: 1000054001; -declare const hi: 1000054006; -declare const li: 1000054002; -declare const pi: 1000054007; -declare const fi: 1000054003; -declare const Zn: 1000156009; -declare const Qn: 1000156008; -declare const Jn: 1000156007; -declare const ii: 1000156019; -declare const ni: 1000156018; -declare const ei: 1000156017; -declare const ue: 97; -declare const _e: 96; -declare const he: 92; -declare const pe: 95; -declare const Ue: 91; -declare const ce: 90; -declare const fe: 89; -declare const oe: 85; -declare const le: 88; -declare const re: 84; -declare const ae: 83; -declare const se: 82; -declare const ne: 78; -declare const ie: 81; -declare const ee: 77; -declare const te: 76; -declare const $t: 75; -declare const Qt: 71; -declare const Zt: 74; -declare const Jt: 70; -declare const Ae: 109; -declare const Le: 108; -declare const Be: 107; -declare const ve: 106; -declare const we: 105; -declare const De: 104; -declare const de: 103; -declare const me: 102; -declare const be: 101; -declare const ye: 100; -declare const xe: 99; -declare const ge: 98; -declare const at: 2; -declare const st: 1; -declare const ft: 6; -declare const ot: 4; -declare const Ne: 121; -declare const Me: 120; -declare const Pe: 119; -declare const Ee: 118; -declare const Se: 117; -declare const Te: 116; -declare const Oe: 115; -declare const Fe: 114; -declare const Ce: 113; -declare const Ve: 112; -declare const Ie: 111; -declare const ke: 110; -declare const St: 42; -declare const Ot: 38; -declare const Et: 43; -declare const Tt: 41; -declare const Ft: 37; -declare const Bt: 28; -declare const wt: 24; -declare const Lt: 29; -declare const vt: 27; -declare const Dt: 23; -declare const mt: 21; -declare const yt: 17; -declare const dt: 22; -declare const bt: 20; -declare const xt: 16; -declare const ut: 14; -declare const pt: 10; -declare const gt: 15; -declare const _t: 13; -declare const ht: 9; -declare const Xe: 127; -declare const it: 0; -declare const je: 125; -declare function Vi(): { - vkFormat: number; - typeSize: number; - pixelWidth: number; - pixelHeight: number; - pixelDepth: number; - layerCount: number; - faceCount: number; - levelCount: number; - supercompressionScheme: number; - levels: never[]; - dataFormatDescriptor: { - vendorId: number; - descriptorType: number; - versionNumber: number; - colorModel: number; - colorPrimaries: number; - transferFunction: number; - flags: number; - texelBlockDimension: number[]; - bytesPlane: number[]; - samples: never[]; - }[]; - keyValue: {}; - globalData: null; -}; -declare function Mi(t: any): { - vkFormat: number; - typeSize: number; - pixelWidth: number; - pixelHeight: number; - pixelDepth: number; - layerCount: number; - faceCount: number; - levelCount: number; - supercompressionScheme: number; - levels: never[]; - dataFormatDescriptor: { - vendorId: number; - descriptorType: number; - versionNumber: number; - colorModel: number; - colorPrimaries: number; - transferFunction: number; - flags: number; - texelBlockDimension: number[]; - bytesPlane: number[]; - samples: never[]; - }[]; - keyValue: {}; - globalData: null; -}; -declare function Hi(t: any, e?: {}): Uint8Array; -export { Z as KHR_DF_CHANNEL_RGBSDA_ALPHA, q as KHR_DF_CHANNEL_RGBSDA_BLUE, Q as KHR_DF_CHANNEL_RGBSDA_DEPTH, G as KHR_DF_CHANNEL_RGBSDA_GREEN, R as KHR_DF_CHANNEL_RGBSDA_RED, J as KHR_DF_CHANNEL_RGBSDA_STENCIL, u as KHR_DF_FLAG_ALPHA_PREMULTIPLIED, _ as KHR_DF_FLAG_ALPHA_STRAIGHT, s as KHR_DF_KHR_DESCRIPTORTYPE_BASICFORMAT, U as KHR_DF_MODEL_ASTC, f as KHR_DF_MODEL_ETC1, h as KHR_DF_MODEL_ETC1S, c as KHR_DF_MODEL_ETC2, l as KHR_DF_MODEL_RGBSDA, p as KHR_DF_MODEL_UASTC, o as KHR_DF_MODEL_UNSPECIFIED, H as KHR_DF_PRIMARIES_ACES, z as KHR_DF_PRIMARIES_ACESCC, Y as KHR_DF_PRIMARIES_ADOBERGB, N as KHR_DF_PRIMARIES_BT2020, P as KHR_DF_PRIMARIES_BT601_EBU, M as KHR_DF_PRIMARIES_BT601_SMPTE, E as KHR_DF_PRIMARIES_BT709, W as KHR_DF_PRIMARIES_CIEXYZ, X as KHR_DF_PRIMARIES_DISPLAYP3, j as KHR_DF_PRIMARIES_NTSC1953, K as KHR_DF_PRIMARIES_PAL525, S as KHR_DF_PRIMARIES_UNSPECIFIED, et as KHR_DF_SAMPLE_DATATYPE_EXPONENT, $ as KHR_DF_SAMPLE_DATATYPE_FLOAT, nt as KHR_DF_SAMPLE_DATATYPE_LINEAR, tt as KHR_DF_SAMPLE_DATATYPE_SIGNED, F as KHR_DF_TRANSFER_ACESCC, O as KHR_DF_TRANSFER_ACESCCT, T as KHR_DF_TRANSFER_ADOBERGB, w as KHR_DF_TRANSFER_BT1886, k as KHR_DF_TRANSFER_DCIP3, B as KHR_DF_TRANSFER_HLG_EOTF, v as KHR_DF_TRANSFER_HLG_OETF, b as KHR_DF_TRANSFER_ITU, x as KHR_DF_TRANSFER_LINEAR, m as KHR_DF_TRANSFER_NTSC, V as KHR_DF_TRANSFER_PAL625_EOTF, I as KHR_DF_TRANSFER_PAL_OETF, L as KHR_DF_TRANSFER_PQ_EOTF, A as KHR_DF_TRANSFER_PQ_OETF, d as KHR_DF_TRANSFER_SLOG, D as KHR_DF_TRANSFER_SLOG2, y as KHR_DF_TRANSFER_SRGB, C as KHR_DF_TRANSFER_ST240, g as KHR_DF_TRANSFER_UNSPECIFIED, a as KHR_DF_VENDORID_KHRONOS, r as KHR_DF_VERSION, e as KHR_SUPERCOMPRESSION_BASISLZ, t as KHR_SUPERCOMPRESSION_NONE, i as KHR_SUPERCOMPRESSION_ZLIB, n as KHR_SUPERCOMPRESSION_ZSTD, Ut as VK_FORMAT_A1R5G5B5_UNORM_PACK16, qt as VK_FORMAT_A2B10G10R10_SINT_PACK32, Rt as VK_FORMAT_A2B10G10R10_SNORM_PACK32, Gt as VK_FORMAT_A2B10G10R10_UINT_PACK32, Yt as VK_FORMAT_A2B10G10R10_UNORM_PACK32, Xt as VK_FORMAT_A2R10G10B10_SINT_PACK32, jt as VK_FORMAT_A2R10G10B10_SNORM_PACK32, Kt as VK_FORMAT_A2R10G10B10_UINT_PACK32, zt as VK_FORMAT_A2R10G10B10_UNORM_PACK32, Ii as VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT, ki as VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT, Bi as VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT, Xn as VK_FORMAT_ASTC_10x10_SRGB_BLOCK, Kn as VK_FORMAT_ASTC_10x10_UNORM_BLOCK, Di as VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT, Nn as VK_FORMAT_ASTC_10x5_SRGB_BLOCK, Mn as VK_FORMAT_ASTC_10x5_UNORM_BLOCK, wi as VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT, Hn as VK_FORMAT_ASTC_10x6_SRGB_BLOCK, Wn as VK_FORMAT_ASTC_10x6_UNORM_BLOCK, vi as VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT, jn as VK_FORMAT_ASTC_10x8_SRGB_BLOCK, zn as VK_FORMAT_ASTC_10x8_UNORM_BLOCK, Li as VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT, Rn as VK_FORMAT_ASTC_12x10_SRGB_BLOCK, Yn as VK_FORMAT_ASTC_12x10_UNORM_BLOCK, Ai as VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT, qn as VK_FORMAT_ASTC_12x12_SRGB_BLOCK, Gn as VK_FORMAT_ASTC_12x12_UNORM_BLOCK, _i as VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT, wn as VK_FORMAT_ASTC_4x4_SRGB_BLOCK, Dn as VK_FORMAT_ASTC_4x4_UNORM_BLOCK, ui as VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT, Bn as VK_FORMAT_ASTC_5x4_SRGB_BLOCK, vn as VK_FORMAT_ASTC_5x4_UNORM_BLOCK, gi as VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT, An as VK_FORMAT_ASTC_5x5_SRGB_BLOCK, Ln as VK_FORMAT_ASTC_5x5_UNORM_BLOCK, xi as VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT, In as VK_FORMAT_ASTC_6x5_SRGB_BLOCK, kn as VK_FORMAT_ASTC_6x5_UNORM_BLOCK, yi as VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT, Cn as VK_FORMAT_ASTC_6x6_SRGB_BLOCK, Vn as VK_FORMAT_ASTC_6x6_UNORM_BLOCK, bi as VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT, On as VK_FORMAT_ASTC_8x5_SRGB_BLOCK, Fn as VK_FORMAT_ASTC_8x5_UNORM_BLOCK, mi as VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT, Sn as VK_FORMAT_ASTC_8x6_SRGB_BLOCK, Tn as VK_FORMAT_ASTC_8x6_UNORM_BLOCK, di as VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT, Pn as VK_FORMAT_ASTC_8x8_SRGB_BLOCK, En as VK_FORMAT_ASTC_8x8_UNORM_BLOCK, We as VK_FORMAT_B10G11R11_UFLOAT_PACK32, ti as VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16, ai as VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16, rt as VK_FORMAT_B4G4R4A4_UNORM_PACK16, ct as VK_FORMAT_B5G5R5A1_UNORM_PACK16, lt as VK_FORMAT_B5G6R5_UNORM_PACK16, Wt as VK_FORMAT_B8G8R8A8_SINT, Mt as VK_FORMAT_B8G8R8A8_SNORM, Ht as VK_FORMAT_B8G8R8A8_SRGB, Nt as VK_FORMAT_B8G8R8A8_UINT, Pt as VK_FORMAT_B8G8R8A8_UNORM, Vt as VK_FORMAT_B8G8R8_SINT, kt as VK_FORMAT_B8G8R8_SNORM, Ct as VK_FORMAT_B8G8R8_SRGB, It as VK_FORMAT_B8G8R8_UINT, At as VK_FORMAT_B8G8R8_UNORM, Ze as VK_FORMAT_BC1_RGBA_SRGB_BLOCK, Qe as VK_FORMAT_BC1_RGBA_UNORM_BLOCK, Je as VK_FORMAT_BC1_RGB_SRGB_BLOCK, qe as VK_FORMAT_BC1_RGB_UNORM_BLOCK, tn as VK_FORMAT_BC2_SRGB_BLOCK, $e as VK_FORMAT_BC2_UNORM_BLOCK, nn as VK_FORMAT_BC3_SRGB_BLOCK, en as VK_FORMAT_BC3_UNORM_BLOCK, an as VK_FORMAT_BC4_SNORM_BLOCK, sn as VK_FORMAT_BC4_UNORM_BLOCK, on as VK_FORMAT_BC5_SNORM_BLOCK, rn as VK_FORMAT_BC5_UNORM_BLOCK, fn as VK_FORMAT_BC6H_SFLOAT_BLOCK, ln as VK_FORMAT_BC6H_UFLOAT_BLOCK, Un as VK_FORMAT_BC7_SRGB_BLOCK, cn as VK_FORMAT_BC7_UNORM_BLOCK, ze as VK_FORMAT_D16_UNORM, Ye as VK_FORMAT_D16_UNORM_S8_UINT, Re as VK_FORMAT_D24_UNORM_S8_UINT, Ke as VK_FORMAT_D32_SFLOAT, Ge as VK_FORMAT_D32_SFLOAT_S8_UINT, He as VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, dn as VK_FORMAT_EAC_R11G11_SNORM_BLOCK, mn as VK_FORMAT_EAC_R11G11_UNORM_BLOCK, bn as VK_FORMAT_EAC_R11_SNORM_BLOCK, yn as VK_FORMAT_EAC_R11_UNORM_BLOCK, un as VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK, _n as VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK, xn as VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK, gn as VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK, pn as VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK, hn as VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK, $n as VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16, si as VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16, ci as VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG, ri as VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG, Ui as VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG, oi as VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG, hi as VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG, li as VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG, pi as VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG, fi as VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG, Zn as VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16, Qn as VK_FORMAT_R10X6G10X6_UNORM_2PACK16, Jn as VK_FORMAT_R10X6_UNORM_PACK16, ii as VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16, ni as VK_FORMAT_R12X4G12X4_UNORM_2PACK16, ei as VK_FORMAT_R12X4_UNORM_PACK16, ue as VK_FORMAT_R16G16B16A16_SFLOAT, _e as VK_FORMAT_R16G16B16A16_SINT, he as VK_FORMAT_R16G16B16A16_SNORM, pe as VK_FORMAT_R16G16B16A16_UINT, Ue as VK_FORMAT_R16G16B16A16_UNORM, ce as VK_FORMAT_R16G16B16_SFLOAT, fe as VK_FORMAT_R16G16B16_SINT, oe as VK_FORMAT_R16G16B16_SNORM, le as VK_FORMAT_R16G16B16_UINT, re as VK_FORMAT_R16G16B16_UNORM, ae as VK_FORMAT_R16G16_SFLOAT, se as VK_FORMAT_R16G16_SINT, ne as VK_FORMAT_R16G16_SNORM, ie as VK_FORMAT_R16G16_UINT, ee as VK_FORMAT_R16G16_UNORM, te as VK_FORMAT_R16_SFLOAT, $t as VK_FORMAT_R16_SINT, Qt as VK_FORMAT_R16_SNORM, Zt as VK_FORMAT_R16_UINT, Jt as VK_FORMAT_R16_UNORM, Ae as VK_FORMAT_R32G32B32A32_SFLOAT, Le as VK_FORMAT_R32G32B32A32_SINT, Be as VK_FORMAT_R32G32B32A32_UINT, ve as VK_FORMAT_R32G32B32_SFLOAT, we as VK_FORMAT_R32G32B32_SINT, De as VK_FORMAT_R32G32B32_UINT, de as VK_FORMAT_R32G32_SFLOAT, me as VK_FORMAT_R32G32_SINT, be as VK_FORMAT_R32G32_UINT, ye as VK_FORMAT_R32_SFLOAT, xe as VK_FORMAT_R32_SINT, ge as VK_FORMAT_R32_UINT, at as VK_FORMAT_R4G4B4A4_UNORM_PACK16, st as VK_FORMAT_R4G4_UNORM_PACK8, ft as VK_FORMAT_R5G5B5A1_UNORM_PACK16, ot as VK_FORMAT_R5G6B5_UNORM_PACK16, Ne as VK_FORMAT_R64G64B64A64_SFLOAT, Me as VK_FORMAT_R64G64B64A64_SINT, Pe as VK_FORMAT_R64G64B64A64_UINT, Ee as VK_FORMAT_R64G64B64_SFLOAT, Se as VK_FORMAT_R64G64B64_SINT, Te as VK_FORMAT_R64G64B64_UINT, Oe as VK_FORMAT_R64G64_SFLOAT, Fe as VK_FORMAT_R64G64_SINT, Ce as VK_FORMAT_R64G64_UINT, Ve as VK_FORMAT_R64_SFLOAT, Ie as VK_FORMAT_R64_SINT, ke as VK_FORMAT_R64_UINT, St as VK_FORMAT_R8G8B8A8_SINT, Ot as VK_FORMAT_R8G8B8A8_SNORM, Et as VK_FORMAT_R8G8B8A8_SRGB, Tt as VK_FORMAT_R8G8B8A8_UINT, Ft as VK_FORMAT_R8G8B8A8_UNORM, Bt as VK_FORMAT_R8G8B8_SINT, wt as VK_FORMAT_R8G8B8_SNORM, Lt as VK_FORMAT_R8G8B8_SRGB, vt as VK_FORMAT_R8G8B8_UINT, Dt as VK_FORMAT_R8G8B8_UNORM, mt as VK_FORMAT_R8G8_SINT, yt as VK_FORMAT_R8G8_SNORM, dt as VK_FORMAT_R8G8_SRGB, bt as VK_FORMAT_R8G8_UINT, xt as VK_FORMAT_R8G8_UNORM, ut as VK_FORMAT_R8_SINT, pt as VK_FORMAT_R8_SNORM, gt as VK_FORMAT_R8_SRGB, _t as VK_FORMAT_R8_UINT, ht as VK_FORMAT_R8_UNORM, Xe as VK_FORMAT_S8_UINT, it as VK_FORMAT_UNDEFINED, je as VK_FORMAT_X8_D24_UNORM_PACK32, Vi as createDefaultContainer, Mi as read, Hi as write }; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/meshopt_decoder.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/meshopt_decoder.module.d.ts deleted file mode 100644 index a2637cd13..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/meshopt_decoder.module.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -export var MeshoptDecoder: { - supported: boolean; - ready?: undefined; - useWorkers?: undefined; - decodeVertexBuffer?: undefined; - decodeIndexBuffer?: undefined; - decodeIndexSequence?: undefined; - decodeGltfBuffer?: undefined; - decodeGltfBufferAsync?: undefined; -} | { - ready: Promise; - supported: boolean; - useWorkers: (count: any) => void; - decodeVertexBuffer: (target: any, count: any, size: any, source: any, filter: any) => void; - decodeIndexBuffer: (target: any, count: any, size: any, source: any) => void; - decodeIndexSequence: (target: any, count: any, size: any, source: any) => void; - decodeGltfBuffer: (target: any, count: any, size: any, source: any, mode: any, filter: any) => void; - decodeGltfBufferAsync: (count: any, size: any, source: any, mode: any, filter: any) => Promise; -}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/mikktspace.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/mikktspace.module.d.ts deleted file mode 100644 index 8bee20d6e..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/mikktspace.module.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** -* Generates vertex tangents for the given position/normal/texcoord attributes. -* @param {Float32Array} position -* @param {Float32Array} normal -* @param {Float32Array} texcoord -* @returns {Float32Array} -*/ -export function generateTangents(position: Float32Array, normal: Float32Array, texcoord: Float32Array): Float32Array; -export function dispose(): void; -export function __wbindgen_string_new(arg0: any, arg1: any): number; -export function __wbindgen_rethrow(arg0: any): never; -export let wasm: any; -export let isReady: boolean; -export namespace ready { - function then(onFulfilled: any, onRejected: any): any; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/motion-controllers.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/motion-controllers.module.d.ts deleted file mode 100644 index 105f5023d..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/motion-controllers.module.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -export namespace Constants { - let Handedness: Readonly<{ - NONE: "none"; - LEFT: "left"; - RIGHT: "right"; - }>; - let ComponentState: Readonly<{ - DEFAULT: "default"; - TOUCHED: "touched"; - PRESSED: "pressed"; - }>; - let ComponentProperty: Readonly<{ - BUTTON: "button"; - X_AXIS: "xAxis"; - Y_AXIS: "yAxis"; - STATE: "state"; - }>; - let ComponentType: Readonly<{ - TRIGGER: "trigger"; - SQUEEZE: "squeeze"; - TOUCHPAD: "touchpad"; - THUMBSTICK: "thumbstick"; - BUTTON: "button"; - }>; - let ButtonTouchThreshold: number; - let AxisTouchThreshold: number; - let VisualResponseProperty: Readonly<{ - TRANSFORM: "transform"; - VISIBILITY: "visibility"; - }>; -} -/** - * @description Builds a motion controller with components and visual responses based on the - * supplied profile description. Data is polled from the xrInputSource's gamepad. - * @author Nell Waliczek / https://github.com/NellWaliczek -*/ -export class MotionController { - /** - * @param {Object} xrInputSource - The XRInputSource to build the MotionController around - * @param {Object} profile - The best matched profile description for the supplied xrInputSource - * @param {string} assetUrl - */ - constructor(xrInputSource: Object, profile: Object, assetUrl: string); - xrInputSource: Object; - assetUrl: string; - id: any; - layoutDescription: any; - components: {}; - get gripSpace(): any; - get targetRaySpace(): any; - /** - * @description Returns a subset of component data for simplified debugging - */ - get data(): any[]; - /** - * @description Poll for updated data based on current gamepad state - */ - updateFromGamepad(): void; -} -export function fetchProfile(xrInputSource: any, basePath: any, defaultProfile?: null, getAssetPath?: boolean): Promise<{ - profile: any; - assetPath: string | undefined; -}>; -export function fetchProfilesList(basePath: any): Promise; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/opentype.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/opentype.module.d.ts deleted file mode 100644 index 5334c78d3..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/opentype.module.d.ts +++ /dev/null @@ -1,1094 +0,0 @@ -export default opentype; -export type GlyphOptions = { - unicode?: number | undefined; - unicodes?: any[] | undefined; - xMin?: number | undefined; - yMin?: number | undefined; - xMax?: number | undefined; - yMax?: number | undefined; - advanceWidth?: number | undefined; -}; -export type ContextParams = { - /** - * current item index - */ - currentIndex: number; -}; -export type SubstitutionAction = { - /** - * feature tag - */ - tag: string; - /** - * substitution value(s) - */ - substitution: any; -}; -export type FontOptions = { - familyName: string; - styleName: string; - fullName?: string | undefined; - postScriptName?: string | undefined; - designer?: string | undefined; - designerURL?: string | undefined; - manufacturer?: string | undefined; - manufacturerURL?: string | undefined; - license?: string | undefined; - licenseURL?: string | undefined; - version?: string | undefined; - description?: string | undefined; - copyright?: string | undefined; - trademark?: string | undefined; - unitsPerEm: number; - ascender: number; - descender: number; - createdTimestamp: number; - weightClass?: string | undefined; - widthClass?: string | undefined; - fsSelection?: string | undefined; -}; -export type TableData = { - /** - * - The data offset. - */ - offset: number; -}; -export type FQuery = {}; -export type GlyphRenderOptions = { - /** - * - language system used to determine which features to apply. - * See https://www.microsoft.com/typography/developers/opentype/languagetags.aspx - */ - language?: string | undefined; - /** - * - whether to include kerning values - */ - kerning?: boolean | undefined; - /** - * - OpenType Layout feature tags. Used to enable or disable the features of the given script/language system. - * See https://www.microsoft.com/typography/otspec/featuretags.htm - */ - features?: object | undefined; -}; -declare var opentype: Readonly<{ - __proto__: null; - Font: typeof Font; - Glyph: typeof Glyph; - Path: typeof Path; - BoundingBox: typeof BoundingBox; - _parse: { - getByte: typeof getByte; - getCard8: typeof getByte; - getUShort: typeof getUShort; - getCard16: typeof getUShort; - getShort: typeof getShort; - getULong: typeof getULong; - getFixed: typeof getFixed; - getTag: typeof getTag; - getOffset: typeof getOffset; - getBytes: typeof getBytes; - bytesToString: typeof bytesToString; - Parser: typeof Parser; - }; - parse: typeof parseBuffer; - load: typeof load; -}>; -/** - * A bounding box is an enclosing box that describes the smallest measure within which all the points lie. - * It is used to calculate the bounding box of a glyph or text path. - * - * On initialization, x1/y1/x2/y2 will be NaN. Check if the bounding box is empty using `isEmpty()`. - * - * @exports opentype.BoundingBox - * @class - * @constructor - */ -export function BoundingBox(): void; -export class BoundingBox { - x1: number; - y1: number; - x2: number; - y2: number; - /** - * Returns true if the bounding box is empty, that is, no points have been added to the box yet. - */ - isEmpty(): boolean; - /** - * Add the point to the bounding box. - * The x1/y1/x2/y2 coordinates of the bounding box will now encompass the given point. - * @param {number} x - The X coordinate of the point. - * @param {number} y - The Y coordinate of the point. - */ - addPoint(x: number, y: number): void; - /** - * Add a X coordinate to the bounding box. - * This extends the bounding box to include the X coordinate. - * This function is used internally inside of addBezier. - * @param {number} x - The X coordinate of the point. - */ - addX(x: number): void; - /** - * Add a Y coordinate to the bounding box. - * This extends the bounding box to include the Y coordinate. - * This function is used internally inside of addBezier. - * @param {number} y - The Y coordinate of the point. - */ - addY(y: number): void; - /** - * Add a Bézier curve to the bounding box. - * This extends the bounding box to include the entire Bézier. - * @param {number} x0 - The starting X coordinate. - * @param {number} y0 - The starting Y coordinate. - * @param {number} x1 - The X coordinate of the first control point. - * @param {number} y1 - The Y coordinate of the first control point. - * @param {number} x2 - The X coordinate of the second control point. - * @param {number} y2 - The Y coordinate of the second control point. - * @param {number} x - The ending X coordinate. - * @param {number} y - The ending Y coordinate. - */ - addBezier(x0: number, y0: number, x1: number, y1: number, x2: number, y2: number, x: number, y: number): void; - /** - * Add a quadratic curve to the bounding box. - * This extends the bounding box to include the entire quadratic curve. - * @param {number} x0 - The starting X coordinate. - * @param {number} y0 - The starting Y coordinate. - * @param {number} x1 - The X coordinate of the control point. - * @param {number} y1 - The Y coordinate of the control point. - * @param {number} x - The ending X coordinate. - * @param {number} y - The ending Y coordinate. - */ - addQuad(x0: number, y0: number, x1: number, y1: number, x: number, y: number): void; -} -/** - * @typedef FontOptions - * @type Object - * @property {Boolean} empty - whether to create a new empty font - * @property {string} familyName - * @property {string} styleName - * @property {string=} fullName - * @property {string=} postScriptName - * @property {string=} designer - * @property {string=} designerURL - * @property {string=} manufacturer - * @property {string=} manufacturerURL - * @property {string=} license - * @property {string=} licenseURL - * @property {string=} version - * @property {string=} description - * @property {string=} copyright - * @property {string=} trademark - * @property {Number} unitsPerEm - * @property {Number} ascender - * @property {Number} descender - * @property {Number} createdTimestamp - * @property {string=} weightClass - * @property {string=} widthClass - * @property {string=} fsSelection - */ -/** - * A Font represents a loaded OpenType font file. - * It contains a set of glyphs and methods to draw text on a drawing context, - * or to get a path representing the text. - * @exports opentype.Font - * @class - * @param {FontOptions} - * @constructor - */ -export function Font(options: any): void; -export class Font { - /** - * @typedef FontOptions - * @type Object - * @property {Boolean} empty - whether to create a new empty font - * @property {string} familyName - * @property {string} styleName - * @property {string=} fullName - * @property {string=} postScriptName - * @property {string=} designer - * @property {string=} designerURL - * @property {string=} manufacturer - * @property {string=} manufacturerURL - * @property {string=} license - * @property {string=} licenseURL - * @property {string=} version - * @property {string=} description - * @property {string=} copyright - * @property {string=} trademark - * @property {Number} unitsPerEm - * @property {Number} ascender - * @property {Number} descender - * @property {Number} createdTimestamp - * @property {string=} weightClass - * @property {string=} widthClass - * @property {string=} fsSelection - */ - /** - * A Font represents a loaded OpenType font file. - * It contains a set of glyphs and methods to draw text on a drawing context, - * or to get a path representing the text. - * @exports opentype.Font - * @class - * @param {FontOptions} - * @constructor - */ - constructor(options: any); - names: { - fontFamily: { - en: any; - }; - fontSubfamily: { - en: any; - }; - fullName: { - en: any; - }; - postScriptName: { - en: any; - }; - designer: { - en: any; - }; - designerURL: { - en: any; - }; - manufacturer: { - en: any; - }; - manufacturerURL: { - en: any; - }; - license: { - en: any; - }; - licenseURL: { - en: any; - }; - version: { - en: any; - }; - description: { - en: any; - }; - copyright: { - en: any; - }; - trademark: { - en: any; - }; - } | undefined; - unitsPerEm: any; - ascender: any; - descender: any; - createdTimestamp: any; - tables: any; - supported: boolean; - glyphs: GlyphSet; - encoding: DefaultEncoding; - position: Position; - substitution: Substitution; - _push: any; - _hmtxTableData: {}; - /** - * Check if the font has a glyph for the given character. - * @param {string} - * @return {Boolean} - */ - hasChar(c: any): boolean; - /** - * Convert the given character to a single glyph index. - * Note that this function assumes that there is a one-to-one mapping between - * the given character and a glyph; for complex scripts this might not be the case. - * @param {string} - * @return {Number} - */ - charToGlyphIndex(s: any): number; - /** - * Convert the given character to a single Glyph object. - * Note that this function assumes that there is a one-to-one mapping between - * the given character and a glyph; for complex scripts this might not be the case. - * @param {string} - * @return {opentype.Glyph} - */ - charToGlyph(c: any): opentype.Glyph; - /** - * Update features - * @param {any} options features options - */ - updateFeatures(options: any): { - script: string; - tags: string[]; - }[]; - /** - * Convert the given text to a list of Glyph objects. - * Note that there is no strict one-to-one mapping between characters and - * glyphs, so the list of returned glyphs can be larger or smaller than the - * length of the given string. - * @param {string} - * @param {GlyphRenderOptions} [options] - * @return {opentype.Glyph[]} - */ - stringToGlyphs(s: any, options?: GlyphRenderOptions): opentype.Glyph[]; - /** - * @param {string} - * @return {Number} - */ - nameToGlyphIndex(name: any): number; - /** - * @param {string} - * @return {opentype.Glyph} - */ - nameToGlyph(name: any): opentype.Glyph; - /** - * @param {Number} - * @return {String} - */ - glyphIndexToName(gid: any): string; - /** - * Retrieve the value of the kerning pair between the left glyph (or its index) - * and the right glyph (or its index). If no kerning pair is found, return 0. - * The kerning value gets added to the advance width when calculating the spacing - * between glyphs. - * For GPOS kerning, this method uses the default script and language, which covers - * most use cases. To have greater control, use font.position.getKerningValue . - * @param {opentype.Glyph} leftGlyph - * @param {opentype.Glyph} rightGlyph - * @return {Number} - */ - getKerningValue(leftGlyph: opentype.Glyph, rightGlyph: opentype.Glyph): number; - /** - * @typedef GlyphRenderOptions - * @type Object - * @property {string} [script] - script used to determine which features to apply. By default, 'DFLT' or 'latn' is used. - * See https://www.microsoft.com/typography/otspec/scripttags.htm - * @property {string} [language='dflt'] - language system used to determine which features to apply. - * See https://www.microsoft.com/typography/developers/opentype/languagetags.aspx - * @property {boolean} [kerning=true] - whether to include kerning values - * @property {object} [features] - OpenType Layout feature tags. Used to enable or disable the features of the given script/language system. - * See https://www.microsoft.com/typography/otspec/featuretags.htm - */ - defaultRenderOptions: { - kerning: boolean; - features: { - script: string; - tags: string[]; - }[]; - }; - /** - * Helper function that invokes the given callback for each glyph in the given text. - * The callback gets `(glyph, x, y, fontSize, options)`.* @param {string} text - * @param {string} text - The text to apply. - * @param {number} [x=0] - Horizontal position of the beginning of the text. - * @param {number} [y=0] - Vertical position of the *baseline* of the text. - * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. - * @param {GlyphRenderOptions=} options - * @param {Function} callback - */ - forEachGlyph(text: string, x?: number, y?: number, fontSize?: number, options?: GlyphRenderOptions | undefined, callback: Function): number; - /** - * Create a Path object that represents the given text. - * @param {string} text - The text to create. - * @param {number} [x=0] - Horizontal position of the beginning of the text. - * @param {number} [y=0] - Vertical position of the *baseline* of the text. - * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. - * @param {GlyphRenderOptions=} options - * @return {opentype.Path} - */ - getPath(text: string, x?: number, y?: number, fontSize?: number, options?: GlyphRenderOptions | undefined): opentype.Path; - /** - * Create an array of Path objects that represent the glyphs of a given text. - * @param {string} text - The text to create. - * @param {number} [x=0] - Horizontal position of the beginning of the text. - * @param {number} [y=0] - Vertical position of the *baseline* of the text. - * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. - * @param {GlyphRenderOptions=} options - * @return {opentype.Path[]} - */ - getPaths(text: string, x?: number, y?: number, fontSize?: number, options?: GlyphRenderOptions | undefined): opentype.Path[]; - /** - * Returns the advance width of a text. - * - * This is something different than Path.getBoundingBox() as for example a - * suffixed whitespace increases the advanceWidth but not the bounding box - * or an overhanging letter like a calligraphic 'f' might have a quite larger - * bounding box than its advance width. - * - * This corresponds to canvas2dContext.measureText(text).width - * - * @param {string} text - The text to create. - * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. - * @param {GlyphRenderOptions=} options - * @return advance width - */ - getAdvanceWidth(text: string, fontSize?: number, options?: GlyphRenderOptions | undefined): number; - /** - * Draw the text on the given drawing context. - * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas. - * @param {string} text - The text to create. - * @param {number} [x=0] - Horizontal position of the beginning of the text. - * @param {number} [y=0] - Vertical position of the *baseline* of the text. - * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. - * @param {GlyphRenderOptions=} options - */ - draw(ctx: CanvasRenderingContext2D, text: string, x?: number, y?: number, fontSize?: number, options?: GlyphRenderOptions | undefined): void; - /** - * Draw the points of all glyphs in the text. - * On-curve points will be drawn in blue, off-curve points will be drawn in red. - * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas. - * @param {string} text - The text to create. - * @param {number} [x=0] - Horizontal position of the beginning of the text. - * @param {number} [y=0] - Vertical position of the *baseline* of the text. - * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. - * @param {GlyphRenderOptions=} options - */ - drawPoints(ctx: CanvasRenderingContext2D, text: string, x?: number, y?: number, fontSize?: number, options?: GlyphRenderOptions | undefined): void; - /** - * Draw lines indicating important font measurements for all glyphs in the text. - * Black lines indicate the origin of the coordinate system (point 0,0). - * Blue lines indicate the glyph bounding box. - * Green line indicates the advance width of the glyph. - * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas. - * @param {string} text - The text to create. - * @param {number} [x=0] - Horizontal position of the beginning of the text. - * @param {number} [y=0] - Vertical position of the *baseline* of the text. - * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. - * @param {GlyphRenderOptions=} options - */ - drawMetrics(ctx: CanvasRenderingContext2D, text: string, x?: number, y?: number, fontSize?: number, options?: GlyphRenderOptions | undefined): void; - /** - * @param {string} - * @return {string} - */ - getEnglishName(name: any): string; - /** - * Validate - */ - validate(): void; - /** - * Convert the font object to a SFNT data structure. - * This structure contains all the necessary tables and metadata to create a binary OTF file. - * @return {opentype.Table} - */ - toTables(): opentype.Table; - /** - * @deprecated Font.toBuffer is deprecated. Use Font.toArrayBuffer instead. - */ - toBuffer(): ArrayBuffer; - /** - * Converts a `opentype.Font` into an `ArrayBuffer` - * @return {ArrayBuffer} - */ - toArrayBuffer(): ArrayBuffer; - /** - * Initiate a download of the OpenType font. - */ - download(fileName: any): void; - /** - * @private - */ - private fsSelectionValues; - /** - * @private - */ - private usWidthClasses; - /** - * @private - */ - private usWeightClasses; -} -/** - * @typedef GlyphOptions - * @type Object - * @property {string} [name] - The glyph name - * @property {number} [unicode] - * @property {Array} [unicodes] - * @property {number} [xMin] - * @property {number} [yMin] - * @property {number} [xMax] - * @property {number} [yMax] - * @property {number} [advanceWidth] - */ -/** - * @exports opentype.Glyph - * @class - * @param {GlyphOptions} - * @constructor - */ -export function Glyph(options: any): void; -export class Glyph { - /** - * @typedef GlyphOptions - * @type Object - * @property {string} [name] - The glyph name - * @property {number} [unicode] - * @property {Array} [unicodes] - * @property {number} [xMin] - * @property {number} [yMin] - * @property {number} [xMax] - * @property {number} [yMax] - * @property {number} [advanceWidth] - */ - /** - * @exports opentype.Glyph - * @class - * @param {GlyphOptions} - * @constructor - */ - constructor(options: any); - /** - * @param {GlyphOptions} - */ - bindConstructorValues(options: any): void; - index: any; - name: any; - unicode: any; - unicodes: any[] | undefined; - xMin: any; - yMin: any; - xMax: any; - yMax: any; - advanceWidth: any; - /** - * @param {number} - */ - addUnicode(unicode: any): void; - /** - * Calculate the minimum bounding box for this glyph. - * @return {opentype.BoundingBox} - */ - getBoundingBox(): opentype.BoundingBox; - /** - * Convert the glyph to a Path we can draw on a drawing context. - * @param {number} [x=0] - Horizontal position of the beginning of the text. - * @param {number} [y=0] - Vertical position of the *baseline* of the text. - * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. - * @param {Object=} options - xScale, yScale to stretch the glyph. - * @param {opentype.Font} if hinting is to be used, the font - * @return {opentype.Path} - */ - getPath(x?: number, y?: number, fontSize?: number, options?: Object | undefined, font: any): opentype.Path; - /** - * Split the glyph into contours. - * This function is here for backwards compatibility, and to - * provide raw access to the TrueType glyph outlines. - * @return {Array} - */ - getContours(): any[]; - /** - * Calculate the xMin/yMin/xMax/yMax/lsb/rsb for a Glyph. - * @return {Object} - */ - getMetrics(): Object; - /** - * Draw the glyph on the given context. - * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas. - * @param {number} [x=0] - Horizontal position of the beginning of the text. - * @param {number} [y=0] - Vertical position of the *baseline* of the text. - * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. - * @param {Object=} options - xScale, yScale to stretch the glyph. - */ - draw(ctx: CanvasRenderingContext2D, x?: number, y?: number, fontSize?: number, options?: Object | undefined): void; - /** - * Draw the points of the glyph. - * On-curve points will be drawn in blue, off-curve points will be drawn in red. - * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas. - * @param {number} [x=0] - Horizontal position of the beginning of the text. - * @param {number} [y=0] - Vertical position of the *baseline* of the text. - * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. - */ - drawPoints(ctx: CanvasRenderingContext2D, x?: number, y?: number, fontSize?: number): void; - /** - * Draw lines indicating important font measurements. - * Black lines indicate the origin of the coordinate system (point 0,0). - * Blue lines indicate the glyph bounding box. - * Green line indicates the advance width of the glyph. - * @param {CanvasRenderingContext2D} ctx - A 2D drawing context, like Canvas. - * @param {number} [x=0] - Horizontal position of the beginning of the text. - * @param {number} [y=0] - Vertical position of the *baseline* of the text. - * @param {number} [fontSize=72] - Font size in pixels. We scale the glyph units by `1 / unitsPerEm * fontSize`. - */ - drawMetrics(ctx: CanvasRenderingContext2D, x?: number, y?: number, fontSize?: number): void; -} -/** - * A bézier path containing a set of path commands similar to a SVG path. - * Paths can be drawn on a context using `draw`. - * @exports opentype.Path - * @class - * @constructor - */ -export function Path(): void; -export class Path { - commands: any[]; - fill: string; - stroke: any; - strokeWidth: number; - /** - * @param {number} x - * @param {number} y - */ - moveTo(x: number, y: number): void; - /** - * @param {number} x - * @param {number} y - */ - lineTo(x: number, y: number): void; - /** - * Draws cubic curve - * @function - * curveTo - * @memberof opentype.Path.prototype - * @param {number} x1 - x of control 1 - * @param {number} y1 - y of control 1 - * @param {number} x2 - x of control 2 - * @param {number} y2 - y of control 2 - * @param {number} x - x of path point - * @param {number} y - y of path point - */ - /** - * Draws cubic curve - * @function - * bezierCurveTo - * @memberof opentype.Path.prototype - * @param {number} x1 - x of control 1 - * @param {number} y1 - y of control 1 - * @param {number} x2 - x of control 2 - * @param {number} y2 - y of control 2 - * @param {number} x - x of path point - * @param {number} y - y of path point - * @see curveTo - */ - curveTo: (x1: number, y1: number, x2: number, y2: number, x: number, y: number) => void; - bezierCurveTo(x1: number, y1: number, x2: number, y2: number, x: number, y: number): void; - /** - * Draws quadratic curve - * @function - * quadraticCurveTo - * @memberof opentype.Path.prototype - * @param {number} x1 - x of control - * @param {number} y1 - y of control - * @param {number} x - x of path point - * @param {number} y - y of path point - */ - /** - * Draws quadratic curve - * @function - * quadTo - * @memberof opentype.Path.prototype - * @param {number} x1 - x of control - * @param {number} y1 - y of control - * @param {number} x - x of path point - * @param {number} y - y of path point - */ - quadTo: (x1: number, y1: number, x: number, y: number) => void; - quadraticCurveTo(x1: number, y1: number, x: number, y: number): void; - /** - * Closes the path - * @function closePath - * @memberof opentype.Path.prototype - */ - /** - * Close the path - * @function close - * @memberof opentype.Path.prototype - */ - close: () => void; - closePath(): void; - /** - * Add the given path or list of commands to the commands of this path. - * @param {Array} pathOrCommands - another opentype.Path, an opentype.BoundingBox, or an array of commands. - */ - extend(pathOrCommands: any[]): void; - /** - * Calculate the bounding box of the path. - * @returns {opentype.BoundingBox} - */ - getBoundingBox(): opentype.BoundingBox; - /** - * Draw the path to a 2D context. - * @param {CanvasRenderingContext2D} ctx - A 2D drawing context. - */ - draw(ctx: CanvasRenderingContext2D): void; - /** - * Convert the Path to a string of path data instructions - * See http://www.w3.org/TR/SVG/paths.html#PathData - * @param {number} [decimalPlaces=2] - The amount of decimal places for floating-point values - * @return {string} - */ - toPathData(decimalPlaces?: number): string; - /** - * Convert the path to an SVG element, as a string. - * @param {number} [decimalPlaces=2] - The amount of decimal places for floating-point values - * @return {string} - */ - toSVG(decimalPlaces?: number): string; - /** - * Convert the path to a DOM element. - * @param {number} [decimalPlaces=2] - The amount of decimal places for floating-point values - * @return {SVGPathElement} - */ - toDOMElement(decimalPlaces?: number): SVGPathElement; -} -declare namespace parse { - export { getByte }; - export { getByte as getCard8 }; - export { getUShort }; - export { getUShort as getCard16 }; - export { getShort }; - export { getULong }; - export { getFixed }; - export { getTag }; - export { getOffset }; - export { getBytes }; - export { bytesToString }; - export { Parser }; -} -/** - * Asynchronously load the font from a URL or a filesystem. When done, call the callback - * with two arguments `(err, font)`. The `err` will be null on success, - * the `font` is a Font object. - * We use the node.js callback convention so that - * opentype.js can integrate with frameworks like async.js. - * @alias opentype.load - * @param {string} url - The URL of the font to load. - * @param {Function} callback - The callback. - */ -export function load(url: string, callback: Function, opt: any): Promise; -/** - * Parse the OpenType file data (as an ArrayBuffer) and return a Font object. - * Throws an error if the font could not be parsed. - * @param {ArrayBuffer} - * @param {Object} opt - options for parsing - * @return {opentype.Font} - */ -declare function parseBuffer(buffer: any, opt: Object): opentype.Font; -declare function getByte(dataView: any, offset: any): any; -declare function getUShort(dataView: any, offset: any): any; -declare function getShort(dataView: any, offset: any): any; -declare function getULong(dataView: any, offset: any): any; -declare function getFixed(dataView: any, offset: any): any; -declare function getTag(dataView: any, offset: any): string; -declare function getOffset(dataView: any, offset: any, offSize: any): number; -declare function getBytes(dataView: any, startOffset: any, endOffset: any): any[]; -declare function bytesToString(bytes: any): string; -declare function Parser(data: any, offset: any): void; -declare class Parser { - constructor(data: any, offset: any); - data: any; - offset: any; - relativeOffset: number; - parseByte(): any; - parseChar(): any; - parseCard8: any; - parseUShort(): any; - parseCard16: any; - parseSID: any; - parseOffset16: any; - parseShort(): any; - parseF2Dot14(): number; - parseULong(): any; - parseOffset32: any; - parseFixed(): any; - parseString(length: any): string; - parseTag(): string; - parseLongDateTime(): any; - parseVersion(minorBase: any): any; - skip(type: any, amount: any): void; - parseULongList(count: any): any[]; - parseOffset16List: (count: any) => any[]; - parseUShortList(count: any): any[]; - parseShortList(count: any): any[]; - parseByteList(count: any): any[]; - /** - * Parse a list of items. - * Record count is optional, if omitted it is read from the stream. - * itemCallback is one of the Parser methods. - */ - parseList(count: any, itemCallback: any): any[]; - parseList32(count: any, itemCallback: any): any[]; - /** - * Parse a list of records. - * Record count is optional, if omitted it is read from the stream. - * Example of recordDescription: { sequenceIndex: Parser.uShort, lookupListIndex: Parser.uShort } - */ - parseRecordList(count: any, recordDescription: any): any[]; - parseRecordList32(count: any, recordDescription: any): any[]; - parseStruct(description: any): any; - /** - * Parse a GPOS valueRecord - * https://docs.microsoft.com/en-us/typography/opentype/spec/gpos#value-record - * valueFormat is optional, if omitted it is read from the stream. - */ - parseValueRecord(valueFormat: any): { - xPlacement: any; - yPlacement: any; - xAdvance: any; - yAdvance: any; - xPlaDevice: any; - yPlaDevice: any; - xAdvDevice: any; - yAdvDevice: any; - } | undefined; - /** - * Parse a list of GPOS valueRecords - * https://docs.microsoft.com/en-us/typography/opentype/spec/gpos#value-record - * valueFormat and valueCount are read from the stream. - */ - parseValueRecordList(): any[]; - parsePointer(description: any): any; - parsePointer32(description: any): any; - /** - * Parse a list of offsets to lists of 16-bit integers, - * or a list of offsets to lists of offsets to any kind of items. - * If itemCallback is not provided, a list of list of UShort is assumed. - * If provided, itemCallback is called on each item and must parse the item. - * See examples in tables/gsub.js - */ - parseListOfLists(itemCallback: any): any[]; - parseCoverage(): { - format: number; - glyphs: any[]; - ranges?: undefined; - } | { - format: number; - ranges: any[]; - glyphs?: undefined; - }; - parseClassDef(): { - format: number; - startGlyph: any; - classes: any[]; - ranges?: undefined; - } | { - format: number; - ranges: any[]; - startGlyph?: undefined; - classes?: undefined; - }; - parseScriptList(): any; - parseFeatureList(): any; - parseLookupList(lookupTableParsers: any): any; - parseFeatureVariationsList(): any; -} -declare namespace Parser { - function list(count: any, itemCallback: any): () => any; - function list32(count: any, itemCallback: any): () => any; - function recordList(count: any, recordDescription: any): () => any; - function recordList32(count: any, recordDescription: any): () => any; - function pointer(description: any): () => any; - function pointer32(description: any): () => any; - let tag: any; - let byte: any; - let uShort: any; - let offset16: any; - let uShortList: any; - let uLong: any; - let offset32: any; - let uLongList: any; - let struct: any; - let coverage: any; - let classDef: any; -} -/** - * A GlyphSet represents all glyphs available in the font, but modelled using - * a deferred glyph loader, for retrieving glyphs only once they are absolutely - * necessary, to keep the memory footprint down. - * @exports opentype.GlyphSet - * @class - * @param {opentype.Font} - * @param {Array} - */ -declare function GlyphSet(font: any, glyphs: any): void; -declare class GlyphSet { - /** - * A GlyphSet represents all glyphs available in the font, but modelled using - * a deferred glyph loader, for retrieving glyphs only once they are absolutely - * necessary, to keep the memory footprint down. - * @exports opentype.GlyphSet - * @class - * @param {opentype.Font} - * @param {Array} - */ - constructor(font: any, glyphs: any); - font: any; - glyphs: {}; - length: any; - /** - * @param {number} index - * @return {opentype.Glyph} - */ - get(index: number): opentype.Glyph; - /** - * @param {number} index - * @param {Object} - */ - push(index: number, loader: any): void; -} -/** - * This is the encoding used for fonts created from scratch. - * It loops through all glyphs and finds the appropriate unicode value. - * Since it's linear time, other encodings will be faster. - * @exports opentype.DefaultEncoding - * @class - * @constructor - * @param {opentype.Font} - */ -declare function DefaultEncoding(font: any): void; -declare class DefaultEncoding { - /** - * This is the encoding used for fonts created from scratch. - * It loops through all glyphs and finds the appropriate unicode value. - * Since it's linear time, other encodings will be faster. - * @exports opentype.DefaultEncoding - * @class - * @constructor - * @param {opentype.Font} - */ - constructor(font: any); - font: any; - charToGlyphIndex(c: any): number | null; -} -/** - * @exports opentype.Position - * @class - * @extends opentype.Layout - * @param {opentype.Font} - * @constructor - */ -declare function Position(font: any): void; -declare class Position { - /** - * @exports opentype.Position - * @class - * @extends opentype.Layout - * @param {opentype.Font} - * @constructor - */ - constructor(font: any); - /** - * Init some data for faster and easier access later. - */ - init(): void; - defaultKerningTables: object[] | undefined; - /** - * Find a glyph pair in a list of lookup tables of type 2 and retrieve the xAdvance kerning value. - * - * @param {integer} leftIndex - left glyph index - * @param {integer} rightIndex - right glyph index - * @returns {integer} - */ - getKerningValue(kerningLookups: any, leftIndex: integer, rightIndex: integer): integer; - /** - * List all kerning lookup tables. - * - * @param {string} [script='DFLT'] - use font.position.getDefaultScriptName() for a better default value - * @param {string} [language='dflt'] - * @return {object[]} The list of kerning lookup tables (may be empty), or undefined if there is no GPOS table (and we should use the kern table) - */ - getKerningTables(script?: string, language?: string): object[]; -} -/** - * @exports opentype.Substitution - * @class - * @extends opentype.Layout - * @param {opentype.Font} - * @constructor - */ -declare function Substitution(font: any): void; -declare class Substitution { - /** - * @exports opentype.Substitution - * @class - * @extends opentype.Layout - * @param {opentype.Font} - * @constructor - */ - constructor(font: any); - /** - * Create a default GSUB table. - * @return {Object} gsub - The GSUB table. - */ - createDefaultTable(): Object; - /** - * List all single substitutions (lookup type 1) for a given script, language, and feature. - * @param {string} [script='DFLT'] - * @param {string} [language='dflt'] - * @param {string} feature - 4-character feature name ('aalt', 'salt', 'ss01'...) - * @return {Array} substitutions - The list of substitutions. - */ - getSingle(feature: string, script?: string, language?: string): any[]; - /** - * List all multiple substitutions (lookup type 2) for a given script, language, and feature. - * @param {string} [script='DFLT'] - * @param {string} [language='dflt'] - * @param {string} feature - 4-character feature name ('ccmp', 'stch') - * @return {Array} substitutions - The list of substitutions. - */ - getMultiple(feature: string, script?: string, language?: string): any[]; - /** - * List all alternates (lookup type 3) for a given script, language, and feature. - * @param {string} [script='DFLT'] - * @param {string} [language='dflt'] - * @param {string} feature - 4-character feature name ('aalt', 'salt'...) - * @return {Array} alternates - The list of alternates - */ - getAlternates(feature: string, script?: string, language?: string): any[]; - /** - * List all ligatures (lookup type 4) for a given script, language, and feature. - * The result is an array of ligature objects like { sub: [ids], by: id } - * @param {string} feature - 4-letter feature name ('liga', 'rlig', 'dlig'...) - * @param {string} [script='DFLT'] - * @param {string} [language='dflt'] - * @return {Array} ligatures - The list of ligatures. - */ - getLigatures(feature: string, script?: string, language?: string): any[]; - /** - * Add or modify a single substitution (lookup type 1) - * Format 2, more flexible, is always used. - * @param {string} feature - 4-letter feature name ('liga', 'rlig', 'dlig'...) - * @param {Object} substitution - { sub: id, by: id } (format 1 is not supported) - * @param {string} [script='DFLT'] - * @param {string} [language='dflt'] - */ - addSingle(feature: string, substitution: Object, script?: string, language?: string): void; - /** - * Add or modify a multiple substitution (lookup type 2) - * @param {string} feature - 4-letter feature name ('ccmp', 'stch') - * @param {Object} substitution - { sub: id, by: [id] } for format 2. - * @param {string} [script='DFLT'] - * @param {string} [language='dflt'] - */ - addMultiple(feature: string, substitution: Object, script?: string, language?: string): void; - /** - * Add or modify an alternate substitution (lookup type 3) - * @param {string} feature - 4-letter feature name ('liga', 'rlig', 'dlig'...) - * @param {Object} substitution - { sub: id, by: [ids] } - * @param {string} [script='DFLT'] - * @param {string} [language='dflt'] - */ - addAlternate(feature: string, substitution: Object, script?: string, language?: string): void; - /** - * Add a ligature (lookup type 4) - * Ligatures with more components must be stored ahead of those with fewer components in order to be found - * @param {string} feature - 4-letter feature name ('liga', 'rlig', 'dlig'...) - * @param {Object} ligature - { sub: [ids], by: id } - * @param {string} [script='DFLT'] - * @param {string} [language='dflt'] - */ - addLigature(feature: string, ligature: Object, script?: string, language?: string): void; - /** - * List all feature data for a given script and language. - * @param {string} feature - 4-letter feature name - * @param {string} [script='DFLT'] - * @param {string} [language='dflt'] - * @return {Array} substitutions - The list of substitutions. - */ - getFeature(feature: string, script?: string, language?: string): any[]; - /** - * Add a substitution to a feature for a given script and language. - * @param {string} feature - 4-letter feature name - * @param {Object} sub - the substitution to add (an object like { sub: id or [ids], by: id or [ids] }) - * @param {string} [script='DFLT'] - * @param {string} [language='dflt'] - */ - add(feature: string, sub: Object, script?: string, language?: string): void; -} -export { parse as _parse, parseBuffer as parse }; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/potpack.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/potpack.module.d.ts deleted file mode 100644 index 2830d6809..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/potpack.module.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * potpack - by [@mourner](https://github.com/mourner) - * - * A tiny JavaScript function for packing 2D rectangles into a near-square container, - * which is useful for generating CSS sprites and WebGL textures. Similar to - * [shelf-pack](https://github.com/mapbox/shelf-pack), but static (you can't add items - * once a layout is generated), and aims for maximal space utilization. - * - * A variation of algorithms used in [rectpack2D](https://github.com/TeamHypersomnia/rectpack2D) - * and [bin-pack](https://github.com/bryanburgers/bin-pack), which are in turn based - * on [this article by Blackpawn](http://blackpawn.com/texts/lightmaps/default.html). - * - * @license - * ISC License - * - * Copyright (c) 2018, Mapbox - * - * Permission to use, copy, modify, and/or distribute this software for any purpose - * with or without fee is hereby granted, provided that the above copyright notice - * and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS - * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. - */ -export function potpack(boxes: any): { - w: number; - h: number; - fill: number; -}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/rhino3dm/rhino3dm.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/rhino3dm/rhino3dm.d.ts deleted file mode 100644 index 08be483f6..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/rhino3dm/rhino3dm.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export = rhino3dm; -declare function rhino3dm(config: any): any; -declare namespace rhino3dm { - export { rhino3dm }; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/rhino3dm/rhino3dm.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/rhino3dm/rhino3dm.module.d.ts deleted file mode 100644 index dfad8acce..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/rhino3dm/rhino3dm.module.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default rhino3dm; -declare function rhino3dm(config: any): Promise; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/stats.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/stats.module.d.ts deleted file mode 100644 index aeae725f1..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/stats.module.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export default Stats; -declare function Stats(): { - REVISION: number; - dom: HTMLDivElement; - addPanel: (panel: any) => any; - showPanel: (id: any) => void; - begin: () => void; - end: () => number; - update: () => void; - domElement: HTMLDivElement; - setMode: (id: any) => void; -}; -declare namespace Stats { - function Panel(name: any, fg: any, bg: any): { - dom: HTMLCanvasElement; - update: (value: any, maxValue: any) => void; - }; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/surfaceNet.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/surfaceNet.d.ts deleted file mode 100644 index 4c6302df7..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/surfaceNet.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * SurfaceNets in JavaScript - * - * Written by Mikola Lysenko (C) 2012 - * - * MIT License - * - * Based on: S.F. Gibson, 'Constrained Elastic Surface Nets'. (1998) MERL Tech Report. - * from https://github.com/mikolalysenko/isosurface/tree/master - * - */ -export function surfaceNet(dims: any, potential: any, bounds: any): { - positions: number[][]; - cells: any[][]; -}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/utif.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/utif.module.d.ts deleted file mode 100644 index d3233f736..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/utif.module.d.ts +++ /dev/null @@ -1,156 +0,0 @@ -export default UTIF; -declare namespace UTIF { - function encodeImage(rgba: any, w: any, h: any, metadata: any): ArrayBuffer; - function encode(ifds: any): ArrayBuffer; - function decode(buff: any, prm: any): any[]; - namespace decode { - function _decompress(img: any, ifds: any, data: any, off: any, len: any, cmpr: any, tgt: any, toff: any, fo: any, w: any, h: any): void; - function _decodePanasonic(img: any, data: any, off: any, len: any, tgt: any, toff: any): void; - function _decodeVC5(t: any, E: any, h: any, L: any, g: any, n: any): void; - function _decodeLogLuv32(img: any, data: any, off: any, len: any, tgt: any, toff: any): void; - function _ljpeg_diff(data: any, prm: any, huff: any): number; - function _decodeARW(img: any, inp: any, off: any, src_length: any, tgt: any, toff: any): void; - function _decodeNikon(img: any, imgs: any, data: any, off: any, src_length: any, tgt: any, toff: any): void; - function _putsF(dt: any, pos: any, val: any): void; - function _getbithuff(data: any, prm: any, nbits: any, huff: any): number; - function _make_decoder(source: any): number[]; - function _decodeNewJPEG(img: any, data: any, off: any, len: any, tgt: any, toff: any): void; - function _decodeOldJPEGInit(img: any, data: any, off: any, len: any): { - jpegOffset: any; - tables?: undefined; - sosMarker?: undefined; - sofPosition?: undefined; - } | { - jpegOffset: any; - tables: Uint8Array; - sosMarker: Uint8Array; - sofPosition: number; - }; - function _decodeOldJPEG(img: any, data: any, off: any, len: any, tgt: any, toff: any): void; - function _decodePackBits(data: any, off: any, len: any, tgt: any, toff: any): any; - function _decodeThunder(data: any, off: any, len: any, tgt: any, toff: any): void; - let _dmap: { - "1": number; - "011": number; - "000011": number; - "0000011": number; - "010": number; - "000010": number; - "0000010": number; - }; - let _lens: {}[]; - function _decodeG4(data: any, off: any, slen: any, tgt: any, toff: any, w: any, fo: any): void; - function _findDiff(line: any, x: any, clr: any): any; - function _makeDiff(line: any): any[]; - function _decodeG2(data: any, off: any, slen: any, tgt: any, toff: any, w: any, fo: any): void; - function _decodeG3(data: any, off: any, slen: any, tgt: any, toff: any, w: any, fo: any, twoDim: any): void; - function _addNtimes(arr: any, n: any, val: any): void; - function _writeBits(bits: any, tgt: any, boff: any): void; - let _decodeLZW: any; - } - function decodeImage(buff: any, img: any, ifds: any): void; - let tags: {}; - namespace _types { - namespace basic { - export { main }; - export { rest }; - } - namespace gps { - let main_1: number[]; - export { main_1 as main }; - let rest_1: { - 18: number; - 29: number; - }; - export { rest_1 as rest }; - } - } - function _readIFD(bin: any, data: any, offset: any, ifds: any, depth: any, prm: any): any; - function _writeIFD(bin: any, types: any, data: any, offset: any, ifd: any): any[]; - function toRGBA8(out: any, scl: any): Uint8Array; - function replaceIMG(imgs: any): void; - let _xhrs: any[]; - let _imgs: any[]; - function _imgLoaded(e: any): void; - function bufferToURI(buff: any): string; - namespace _binBE { - let ui8: Uint8Array; - let i16: Int16Array; - let i32: Int32Array; - let ui32: Uint32Array; - let fl32: Float32Array; - let fl64: Float64Array; - } - namespace _binLE { - import nextZero = nextZero; - export { nextZero }; - export function readUshort(buff: any, p: any): number; - export function readShort(buff: any, p: any): any; - export function readInt(buff: any, p: any): any; - export function readUint(buff: any, p: any): any; - import readASCII = readASCII; - export { readASCII }; - export function readFloat(buff: any, p: any): any; - export function readDouble(buff: any, p: any): any; - export function writeUshort(buff: any, p: any, n: any): void; - export function writeInt(buff: any, p: any, n: any): void; - export function writeUint(buff: any, p: any, n: any): void; - import writeASCII = writeASCII; - export { writeASCII }; - } - function _copyTile(tb: any, tw: any, th: any, b: any, w: any, h: any, xoff: any, yoff: any): void; - function _inflateRaw(N: any, W: any): any; - function LosslessJpegDecode(h: any): Uint8Array | Uint16Array; -} -declare var main: any[]; -declare var rest: { - 33432: number; - 33434: number; - 33437: number; - 34665: number; - 34850: number; - 34853: number; - 34855: number; - 34864: number; - 34866: number; - 36864: number; - 36867: number; - 36868: number; - 37121: number; - 37377: number; - 37378: number; - 37380: number; - 37381: number; - 37383: number; - 37384: number; - 37385: number; - 37386: number; - 37510: number; - 37520: number; - 37521: number; - 37522: number; - 40960: number; - 40961: number; - 40962: number; - 40963: number; - 40965: number; - 41486: number; - 41487: number; - 41488: number; - 41985: number; - 41986: number; - 41987: number; - 41988: number; - 41989: number; - 41990: number; - 41993: number; - 41994: number; - 41995: number; - 41996: number; - 42032: number; - 42033: number; - 42034: number; - 42036: number; - 42037: number; - 59932: number; -}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/libs/zstddec.module.d.ts b/jsdoc-testing/jsdoc/examples/jsm/libs/zstddec.module.d.ts deleted file mode 100644 index 6486bf3f1..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/libs/zstddec.module.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { Q as ZSTDDecoder }; -declare class Q { - init(): any; - _init(A: any): void; - decode(A: any, g?: number): any; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/lighting/ClusteredLighting.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lighting/ClusteredLighting.d.ts deleted file mode 100644 index 66ac1de37..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/lighting/ClusteredLighting.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * A custom lighting implementation based on Forward+ Clustered Shading that - * overwrites the default lighting system in {@link WebGPURenderer}. Suitable - * for 3D scenes with many point lights and real depth complexity — the view - * frustum is partitioned into a 3D cluster grid so only the lights actually - * reaching each fragment are evaluated. - * - * ```js - * const lighting = new ClusteredLighting(); - * renderer.lighting = lighting; // set lighting system - * ``` - * - * @augments Lighting - * @three_import import { ClusteredLighting } from 'three/addons/lighting/ClusteredLighting.js'; - */ -export class ClusteredLighting extends Lighting { - /** - * Constructs a new clustered lighting system. - * - * @param {number} [maxLights=1024] - Maximum number of point lights. - * @param {number} [tileSize=32] - Screen tile size in pixels (cluster XY size). - * @param {number} [zSlices=24] - Number of exponential depth slices. - * @param {number} [maxLightsPerCluster=64] - Per-cluster light-list capacity. - */ - constructor(maxLights?: number, tileSize?: number, zSlices?: number, maxLightsPerCluster?: number); - maxLights: number; - tileSize: number; - zSlices: number; - maxLightsPerCluster: number; - /** - * Creates a new clustered lights node for the given array of lights. - * - * This method is called internally by the renderer and must be overwritten by - * all custom lighting implementations. - * - * @param {Array} lights - The lights. - * @return {ClusteredLightsNode} The clustered lights node. - */ - createNode(lights?: Array): ClusteredLightsNode; -} -import { Lighting } from 'three/webgpu'; -import ClusteredLightsNode from '../tsl/lighting/ClusteredLightsNode.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lighting/DynamicLighting.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lighting/DynamicLighting.d.ts deleted file mode 100644 index 1dd73c216..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/lighting/DynamicLighting.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * A custom lighting implementation that batches supported analytic lights into - * uniform arrays so light count changes do not recompile materials. - * - * ```js - * const lighting = new DynamicLighting( { maxPointLights: 64 } ); - * renderer.lighting = lighting; - * ``` - * - * @augments Lighting - * @three_import import { DynamicLighting } from 'three/addons/lighting/DynamicLighting.js'; - */ -export class DynamicLighting extends Lighting { - /** - * Constructs a new dynamic lighting system. - * - * @param {Object} [options={}] - Dynamic lighting configuration. - * @param {number} [options.maxDirectionalLights=8] - Maximum number of batched directional lights. - * @param {number} [options.maxPointLights=16] - Maximum number of batched point lights. - * @param {number} [options.maxSpotLights=16] - Maximum number of batched spot lights. - * @param {number} [options.maxHemisphereLights=4] - Maximum number of batched hemisphere lights. - */ - constructor(options?: { - maxDirectionalLights?: number | undefined; - maxPointLights?: number | undefined; - maxSpotLights?: number | undefined; - maxHemisphereLights?: number | undefined; - }); - options: { - maxDirectionalLights: number; - maxPointLights: number; - maxSpotLights: number; - maxHemisphereLights: number; - }; - _nodes: WeakMap; - /** - * Creates a new dynamic lights node for the given array of lights. - * - * @param {Array} lights - The lights to bind to the node. - * @return {DynamicLightsNode} The dynamic lights node. - */ - createNode(lights?: Array): DynamicLightsNode; - /** - * Returns a lights node for the given scene. - * - * @param {Scene} scene - The scene. - * @return {LightsNode} The lights node. - */ - getNode(scene: Scene): LightsNode; -} -export default DynamicLighting; -import { Lighting } from 'three/webgpu'; -import DynamicLightsNode from '../tsl/lighting/DynamicLightsNode.js'; -import { LightsNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lighting/LightProbeGrid.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lighting/LightProbeGrid.d.ts deleted file mode 100644 index fbebd4b1f..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/lighting/LightProbeGrid.d.ts +++ /dev/null @@ -1,142 +0,0 @@ -/** - * A 3D grid of L2 Spherical Harmonic irradiance probes that provides - * position-dependent diffuse global illumination. - * - * Note that this class can only be used with {@link WebGLRenderer}. - * A version for {@link WebGPURenderer} will be added at a later point. - * - * All seven packed SH sub-volumes are stored in a **single** RGBA - * `WebGL3DRenderTarget` using a texture-atlas layout along the Z axis. - * Each sub-volume occupies `( nz + 2 )` atlas slices: one padding slice at - * each end (a copy of the nearest edge data slice) to prevent color bleeding - * when the hardware trilinear filter reads across a sub-volume boundary. - * - * Atlas layout (nz = resolution.z, PADDING = 1): - * ``` - * slice 0 : padding (copy of sub-volume 0, data slice 0) - * slices 1 … nz : sub-volume 0 data - * slice nz + 1 : padding (copy of sub-volume 0, data slice nz-1) - * slice nz + 2 : padding (copy of sub-volume 1, data slice 0) - * slices nz+3 … 2*nz+2 : sub-volume 1 data - * … - * ``` - * Total atlas depth = `7 * ( nz + 2 )`. - * - * Baking is fully GPU-resident: cubemap rendering, SH projection, and - * texture packing all happen on the GPU with zero CPU readback. - * - * @three_import import { LightProbeGrid } from 'three/addons/lighting/LightProbeGrid.js'; - */ -export class LightProbeGrid extends Object3D { - /** - * Constructs a new irradiance probe grid. - * - * The volume is centered at the object's position. - * - * @param {number} [width=1] - Full width of the volume along X. - * @param {number} [height=1] - Full height of the volume along Y. - * @param {number} [depth=1] - Full depth of the volume along Z. - * @param {number} [widthProbes] - Number of probes along X. Defaults to `Math.max( 2, Math.round( width ) + 1 )`. - * @param {number} [heightProbes] - Number of probes along Y. Defaults to `Math.max( 2, Math.round( height ) + 1 )`. - * @param {number} [depthProbes] - Number of probes along Z. Defaults to `Math.max( 2, Math.round( depth ) + 1 )`. - */ - constructor(width?: number, height?: number, depth?: number, widthProbes?: number, heightProbes?: number, depthProbes?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLightProbeGrid: boolean; - /** - * The full width of the volume along X. - * - * @type {number} - */ - width: number; - /** - * The full height of the volume along Y. - * - * @type {number} - */ - height: number; - /** - * The full depth of the volume along Z. - * - * @type {number} - */ - depth: number; - /** - * The number of probes along each axis. - * - * @type {Vector3} - */ - resolution: Vector3; - /** - * The world-space bounding box for the grid. Updated automatically - * by {@link LightProbeGrid#bake}. - * - * @type {Box3} - */ - boundingBox: Box3; - /** - * The single RGBA atlas 3D texture storing all seven packed SH sub-volumes. - * - * @type {?Data3DTexture} - * @default null - */ - texture: Data3DTexture | null; - /** - * Internal render target for GPU-resident baking. - * - * @private - * @type {?WebGL3DRenderTarget} - * @default null - */ - private _renderTarget; - /** - * Returns the world-space position of the probe at grid indices (ix, iy, iz). - * - * @param {number} ix - X index. - * @param {number} iy - Y index. - * @param {number} iz - Z index. - * @param {Vector3} target - The target vector. - * @return {Vector3} The world-space position. - */ - getProbePosition(ix: number, iy: number, iz: number, target: Vector3): Vector3; - /** - * Updates the world-space bounding box from the current position and size. - */ - updateBoundingBox(): void; - /** - * Bakes all probes by rendering cubemaps at each probe position - * and projecting to L2 SH. Fully GPU-resident with zero CPU readback. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {Scene} scene - The scene to render. - * @param {Object} [options] - Bake options. - * @param {number} [options.cubemapSize=8] - Resolution of each cubemap face. - * @param {number} [options.near=0.1] - Near plane for the cube camera. - * @param {number} [options.far=100] - Far plane for the cube camera. - */ - bake(renderer: WebGLRenderer, scene: Scene, options?: { - cubemapSize?: number | undefined; - near?: number | undefined; - far?: number | undefined; - }): void; - /** - * Ensures the atlas 3D render target exists with the correct dimensions. - * - * @private - */ - private _ensureTextures; - /** - * Frees GPU resources. - */ - dispose(): void; -} -import { Object3D } from 'three'; -import { Vector3 } from 'three'; -import { Box3 } from 'three'; -import { Scene } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lighting/TiledLighting.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lighting/TiledLighting.d.ts deleted file mode 100644 index 80361aa55..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/lighting/TiledLighting.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * A custom lighting implementation based on Tiled-Lighting that overwrites the default - * implementation in {@link WebGPURenderer}. - * - * ```js - * const lighting = new TiledLighting(); - * renderer.lighting = lighting; // set lighting system - * ``` - * - * @augments Lighting - * @three_import import { TiledLighting } from 'three/addons/lighting/TiledLighting.js'; - */ -export class TiledLighting extends Lighting { - /** - * Creates a new tiled lights node for the given array of lights. - * - * This method is called internally by the renderer and must be overwritten by - * all custom lighting implementations. - * - * @param {Array} lights - The render object. - * @return {TiledLightsNode} The tiled lights node. - */ - createNode(lights?: Array): TiledLightsNode; -} -import { Lighting } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lights/LightProbeGenerator.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lights/LightProbeGenerator.d.ts deleted file mode 100644 index b1ccbcbd9..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/lights/LightProbeGenerator.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Utility class for creating instances of {@link LightProbe}. - * - * @hideconstructor - * @three_import import { LightProbeGenerator } from 'three/addons/lights/LightProbeGenerator.js'; - */ -export class LightProbeGenerator { - /** - * Creates a light probe from the given (radiance) environment map. - * The method expects that the environment map is represented as a cube texture. - * - * @param {CubeTexture} cubeTexture - The environment map. - * @return {LightProbe} The created light probe. - */ - static fromCubeTexture(cubeTexture: CubeTexture): LightProbe; - /** - * Creates a light probe from the given (radiance) environment map. - * The method expects that the environment map is represented as a cube render target. - * - * The cube render target must be in RGBA so `cubeRenderTarget.texture.format` must be - * set to {@link RGBAFormat}. - * - * @async - * @param {WebGPURenderer|WebGLRenderer} renderer - The renderer. - * @param {CubeRenderTarget|WebGLCubeRenderTarget} cubeRenderTarget - The environment map. - * @return {Promise} A Promise that resolves with the created light probe. - */ - static fromCubeRenderTarget(renderer: WebGPURenderer | WebGLRenderer, cubeRenderTarget: CubeRenderTarget | WebGLCubeRenderTarget): Promise; -} -import { LightProbe } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lights/RectAreaLightTexturesLib.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lights/RectAreaLightTexturesLib.d.ts deleted file mode 100644 index 833559dbc..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/lights/RectAreaLightTexturesLib.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Texture library for {@link RectAreaLight}. This class holds the LTC BRDF data - * in data textures for further use in the renderer. - * - * Reference: Real-Time Polygonal-Light Shading with Linearly Transformed Cosines - * by Eric Heitz, Jonathan Dupuy, Stephen Hill and David Neubelt. [Code](https://github.com/selfshadow/ltc_code/). - * - * NOTE: This is a temporary location for the BRDF approximation texture data - * based off of Eric Heitz's work (see citation). BRDF data for - * `RectAreaLight` is currently approximated using a precomputed texture - * of roughly 80kb in size. The hope is to find a better way to include - * the large texture data before including the full RectAreaLight implementation - * in the main build files. - * - * @hideconstructor - * @three_import import { RectAreaLightTexturesLib } from 'three/addons/lights/RectAreaLightTexturesLib.js'; - */ -export class RectAreaLightTexturesLib { - /** - * Inits the texture library. - * - * @return {RectAreaLightTexturesLib} - */ - static init(): RectAreaLightTexturesLib; -} -export namespace RectAreaLightTexturesLib { - let LTC_HALF_1: DataTexture | null | undefined; - let LTC_HALF_2: DataTexture | null | undefined; - let LTC_FLOAT_1: DataTexture | null | undefined; - let LTC_FLOAT_2: DataTexture | null | undefined; -} -import { DataTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lights/RectAreaLightUniformsLib.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lights/RectAreaLightUniformsLib.d.ts deleted file mode 100644 index 4e8ec37f6..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/lights/RectAreaLightUniformsLib.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * This class is only relevant when using {@link RectAreaLight} with {@link WebGLRenderer}. - * - * Before rect area lights can be used, the internal uniform library of the renderer must be - * enhanced with the following code. - * - * ```js - * RectAreaLightUniformsLib.init(); - * ``` - * - * @hideconstructor - * @three_import import { RectAreaLightUniformsLib } from 'three/addons/lights/RectAreaLightUniformsLib.js'; - */ -export class RectAreaLightUniformsLib { - /** - * Inits the uniform library required when using rect area lights. - */ - static init(): void; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/lines/Line2.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lines/Line2.d.ts deleted file mode 100644 index a1cdac05d..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/lines/Line2.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * A polyline drawn between vertices. - * - * This adds functionality beyond {@link Line}, like arbitrary line width and changing width to - * be in world units.It extends {@link LineSegments2}, simplifying constructing segments from a - * chain of points. - * - * This module can only be used with {@link WebGLRenderer}. When using {@link WebGPURenderer}, - * import the class from `lines/webgpu/Line2.js`. - * - * ```js - * const geometry = new LineGeometry(); - * geometry.setPositions( positions ); - * geometry.setColors( colors ); - * - * const material = new LineMaterial( { linewidth: 5, vertexColors: true } }; - * - * const line = new Line2( geometry, material ); - * scene.add( line ); - * ``` - * - * @augments LineSegments2 - * @three_import import { Line2 } from 'three/addons/lines/Line2.js'; - */ -export class Line2 extends LineSegments2 { - /** - * Constructs a new wide line. - * - * @param {LineGeometry} [geometry] - The line geometry. - * @param {LineMaterial} [material] - The line material. - */ - constructor(geometry?: LineGeometry, material?: LineMaterial); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLine2: boolean; -} -import { LineSegments2 } from './LineSegments2.js'; -import { LineGeometry } from './LineGeometry.js'; -import { LineMaterial } from './LineMaterial.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lines/LineGeometry.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lines/LineGeometry.d.ts deleted file mode 100644 index 2564da5ce..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/lines/LineGeometry.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * A chain of vertices, forming a polyline. - * - * This is used in {@link Line2} to describe the shape. - * - * ```js - * const points = [ - * new THREE.Vector3( - 10, 0, 0 ), - * new THREE.Vector3( 0, 5, 0 ), - * new THREE.Vector3( 10, 0, 0 ), - * ]; - * - * const geometry = new LineGeometry(); - * geometry.setFromPoints( points ); - * ``` - * - * @augments LineSegmentsGeometry - * @three_import import { LineLineGeometry2 } from 'three/addons/lines/LineGeometry.js'; - */ -export class LineGeometry extends LineSegmentsGeometry { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLineGeometry: boolean; - /** - * Sets the given line positions for this geometry. - * - * @param {Float32Array|Array} array - The position data to set. - * @return {LineGeometry} A reference to this geometry. - */ - setPositions(array: Float32Array | Array): LineGeometry; - /** - * Sets the given line colors for this geometry. - * - * @param {Float32Array|Array} array - The position data to set. - * @return {LineGeometry} A reference to this geometry. - */ - setColors(array: Float32Array | Array): LineGeometry; - /** - * Setups this line segments geometry from the given sequence of points. - * - * @param {Array} points - An array of points in 2D or 3D space. - * @return {LineGeometry} A reference to this geometry. - */ - setFromPoints(points: Array): LineGeometry; - /** - * Setups this line segments geometry from the given line. - * - * @param {Line} line - The line that should be used as a data source for this geometry. - * @return {LineGeometry} A reference to this geometry. - */ - fromLine(line: Line): LineGeometry; -} -import { LineSegmentsGeometry } from './LineSegmentsGeometry.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lines/LineMaterial.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lines/LineMaterial.d.ts deleted file mode 100644 index d59ebc5ec..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/lines/LineMaterial.d.ts +++ /dev/null @@ -1,89 +0,0 @@ -/** - * A material for drawing wireframe-style geometries. - * - * Unlike {@link LineBasicMaterial}, it supports arbitrary line widths and allows using world units - * instead of screen space units. This material is used with {@link LineSegments2} and {@link Line2}. - * - * This module can only be used with {@link WebGLRenderer}. When using {@link WebGPURenderer}, - * use {@link Line2NodeMaterial}. - * - * @augments ShaderMaterial - * @three_import import { LineMaterial } from 'three/addons/lines/LineMaterial.js'; - */ -export class LineMaterial extends ShaderMaterial { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLineMaterial: boolean; - set color(value: Color); - /** - * The material's color. - * - * @type {Color} - * @default (1,1,1) - */ - get color(): Color; - set worldUnits(value: boolean); - /** - * Whether the material's sizes (width, dash gaps) are in world units. - * - * @type {boolean} - * @default false - */ - get worldUnits(): boolean; - set dashed(value: boolean); - /** - * Whether the line is dashed, or solid. - * - * @type {boolean} - * @default false - */ - get dashed(): boolean; - set dashScale(value: number); - /** - * The scale of the dashes and gaps. - * - * @type {number} - * @default 1 - */ - get dashScale(): number; - set dashSize(value: number); - /** - * The size of the dash. - * - * @type {number} - * @default 1 - */ - get dashSize(): number; - set dashOffset(value: number); - /** - * Where in the dash cycle the dash starts. - * - * @type {number} - * @default 0 - */ - get dashOffset(): number; - set gapSize(value: number); - /** - * The size of the gap. - * - * @type {number} - * @default 0 - */ - get gapSize(): number; - set resolution(value: Vector2); - /** - * The size of the viewport, in screen pixels. This must be kept updated to make - * screen-space rendering accurate. The `LineSegments2.onBeforeRender` callback - * performs the update for visible objects. - * - * @type {Vector2} - */ - get resolution(): Vector2; -} -import { ShaderMaterial } from 'three'; -import { Vector2 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lines/LineSegments2.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lines/LineSegments2.d.ts deleted file mode 100644 index 7dd0b3b2d..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/lines/LineSegments2.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * A series of lines drawn between pairs of vertices. - * - * This adds functionality beyond {@link LineSegments}, like arbitrary line width and changing width - * to be in world units. {@link Line2} extends this object, forming a polyline instead of individual - * segments. - * - * This module can only be used with {@link WebGLRenderer}. When using {@link WebGPURenderer}, - * import the class from `lines/webgpu/LineSegments2.js`. - * - * ```js - * const geometry = new LineSegmentsGeometry(); - * geometry.setPositions( positions ); - * geometry.setColors( colors ); - * - * const material = new LineMaterial( { linewidth: 5, vertexColors: true } }; - * - * const lineSegments = new LineSegments2( geometry, material ); - * scene.add( lineSegments ); - * ``` - * - * @augments Mesh - * @three_import import { LineSegments2 } from 'three/addons/lines/LineSegments2.js'; - */ -export class LineSegments2 extends Mesh { - /** - * Constructs a new wide line. - * - * @param {LineSegmentsGeometry} [geometry] - The line geometry. - * @param {LineMaterial} [material] - The line material. - */ - constructor(geometry?: LineSegmentsGeometry, material?: LineMaterial); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLineSegments2: boolean; - /** - * Computes an array of distance values which are necessary for rendering dashed lines. - * For each vertex in the geometry, the method calculates the cumulative length from the - * current point to the very beginning of the line. - * - * @return {LineSegments2} A reference to this instance. - */ - computeLineDistances(): LineSegments2; - /** - * Computes intersection points between a casted ray and this instance. - * - * @param {Raycaster} raycaster - The raycaster. - * @param {Array} intersects - The target array that holds the intersection points. - */ - raycast(raycaster: Raycaster, intersects: Array): void; - onBeforeRender(renderer: any): void; -} -import { Mesh } from 'three'; -import { LineSegmentsGeometry } from './LineSegmentsGeometry.js'; -import { LineMaterial } from './LineMaterial.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lines/LineSegmentsGeometry.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lines/LineSegmentsGeometry.d.ts deleted file mode 100644 index 4845d8410..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/lines/LineSegmentsGeometry.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * A series of vertex pairs, forming line segments. - * - * This is used in {@link LineSegments2} to describe the shape. - * - * @augments InstancedBufferGeometry - * @three_import import { LineSegmentsGeometry } from 'three/addons/lines/LineSegmentsGeometry.js'; - */ -export class LineSegmentsGeometry extends InstancedBufferGeometry { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLineSegmentsGeometry: boolean; - /** - * Applies the given 4x4 transformation matrix to the geometry. - * - * @param {Matrix4} matrix - The matrix to apply. - * @return {LineSegmentsGeometry} A reference to this instance. - */ - applyMatrix4(matrix: Matrix4): LineSegmentsGeometry; - /** - * Sets the given line positions for this geometry. The length must be a multiple of six since - * each line segment is defined by a start end vertex in the pattern `(xyz xyz)`. - * - * @param {Float32Array|Array} array - The position data to set. - * @return {LineSegmentsGeometry} A reference to this geometry. - */ - setPositions(array: Float32Array | Array): LineSegmentsGeometry; - /** - * Sets the given line colors for this geometry. The length must be a multiple of six since - * each line segment is defined by a start end color in the pattern `(rgb rgb)`. - * - * @param {Float32Array|Array} array - The position data to set. - * @return {LineSegmentsGeometry} A reference to this geometry. - */ - setColors(array: Float32Array | Array): LineSegmentsGeometry; - /** - * Setups this line segments geometry from the given wireframe geometry. - * - * @param {WireframeGeometry} geometry - The geometry that should be used as a data source for this geometry. - * @return {LineSegmentsGeometry} A reference to this geometry. - */ - fromWireframeGeometry(geometry: WireframeGeometry): LineSegmentsGeometry; - /** - * Setups this line segments geometry from the given edges geometry. - * - * @param {EdgesGeometry} geometry - The geometry that should be used as a data source for this geometry. - * @return {LineSegmentsGeometry} A reference to this geometry. - */ - fromEdgesGeometry(geometry: EdgesGeometry): LineSegmentsGeometry; - /** - * Setups this line segments geometry from the given mesh. - * - * @param {Mesh} mesh - The mesh geometry that should be used as a data source for this geometry. - * @return {LineSegmentsGeometry} A reference to this geometry. - */ - fromMesh(mesh: Mesh): LineSegmentsGeometry; - /** - * Setups this line segments geometry from the given line segments. - * - * @param {LineSegments} lineSegments - The line segments that should be used as a data source for this geometry. - * Assumes the source geometry is not using indices. - * @return {LineSegmentsGeometry} A reference to this geometry. - */ - fromLineSegments(lineSegments: LineSegments): LineSegmentsGeometry; - toJSON(): void; -} -import { InstancedBufferGeometry } from 'three'; -import { WireframeGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lines/Wireframe.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lines/Wireframe.d.ts deleted file mode 100644 index a40c88984..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/lines/Wireframe.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * A class for creating wireframes based on wide lines. - * - * This module can only be used with {@link WebGLRenderer}. When using {@link WebGPURenderer}, - * import the class from `lines/webgpu/Wireframe.js`. - * - * ```js - * const geometry = new THREE.IcosahedronGeometry(); - * const wireframeGeometry = new WireframeGeometry2( geo ); - * - * const wireframe = new Wireframe( wireframeGeometry, material ); - * scene.add( wireframe ); - * ``` - * - * @augments Mesh - * @three_import import { Wireframe } from 'three/addons/lines/Wireframe.js'; - */ -export class Wireframe extends Mesh { - /** - * Constructs a new wireframe. - * - * @param {LineSegmentsGeometry} [geometry] - The line geometry. - * @param {LineMaterial} [material] - The line material. - */ - constructor(geometry?: LineSegmentsGeometry, material?: LineMaterial); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWireframe: boolean; - /** - * Computes an array of distance values which are necessary for rendering dashed lines. - * For each vertex in the geometry, the method calculates the cumulative length from the - * current point to the very beginning of the line. - * - * @return {Wireframe} A reference to this instance. - */ - computeLineDistances(): Wireframe; - onBeforeRender(renderer: any): void; -} -import { Mesh } from 'three'; -import { LineSegmentsGeometry } from './LineSegmentsGeometry.js'; -import { LineMaterial } from './LineMaterial.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lines/WireframeGeometry2.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lines/WireframeGeometry2.d.ts deleted file mode 100644 index 61bb232cf..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/lines/WireframeGeometry2.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * A special type of line segments geometry intended for wireframe rendering. - * - * This is used in {@link Wireframe} to describe the shape. - * - * ```js - * const geometry = new THREE.IcosahedronGeometry(); - * const wireframeGeometry = new WireframeGeometry2( geo ); - * ``` - * - * @augments LineSegmentsGeometry - * @three_import import { WireframeGeometry2 } from 'three/addons/lines/WireframeGeometry2.js'; - */ -export class WireframeGeometry2 extends LineSegmentsGeometry { - /** - * Constructs a new wireframe geometry. - * - * @param {BufferGeometry} [geometry] - The geometry to render the wireframe for. - */ - constructor(geometry?: BufferGeometry); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWireframeGeometry2: boolean; -} -import { LineSegmentsGeometry } from './LineSegmentsGeometry.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/Line2.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/Line2.d.ts deleted file mode 100644 index 99fa543d7..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/Line2.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * A polyline drawn between vertices. - * - * This adds functionality beyond {@link Line}, like arbitrary line width and changing width to - * be in world units.It extends {@link LineSegments2}, simplifying constructing segments from a - * chain of points. - * - * This module can only be used with {@link WebGPURenderer}. When using {@link WebGLRenderer}, - * import the class from `lines/Line2.js`. - * - * @augments LineSegments2 - * @three_import import { Line2 } from 'three/addons/lines/webgpu/Line2.js'; - */ -export class Line2 extends LineSegments2 { - /** - * Constructs a new wide line. - * - * @param {LineGeometry} [geometry] - The line geometry. - * @param {Line2NodeMaterial} [material] - The line material. - */ - constructor(geometry?: LineGeometry, material?: Line2NodeMaterial); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLine2: boolean; -} -import { LineSegments2 } from './LineSegments2.js'; -import { LineGeometry } from '../LineGeometry.js'; -import { Line2NodeMaterial } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/LineSegments2.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/LineSegments2.d.ts deleted file mode 100644 index b78c3ec1e..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/LineSegments2.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * A series of lines drawn between pairs of vertices. - * - * This adds functionality beyond {@link LineSegments}, like arbitrary line width and changing width - * to be in world units. {@link Line2} extends this object, forming a polyline instead of individual - * segments. - * - * This module can only be used with {@link WebGPURenderer}. When using {@link WebGLRenderer}, - * import the class from `lines/LineSegments2.js`. - * - * @augments Mesh - * @three_import import { LineSegments2 } from 'three/addons/lines/webgpu/LineSegments2.js'; - */ -export class LineSegments2 extends Mesh { - /** - * Constructs a new wide line. - * - * @param {LineSegmentsGeometry} [geometry] - The line geometry. - * @param {Line2NodeMaterial} [material] - The line material. - */ - constructor(geometry?: LineSegmentsGeometry, material?: Line2NodeMaterial); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLineSegments2: boolean; - _resolution: Vector2; - /** - * Computes an array of distance values which are necessary for rendering dashed lines. - * For each vertex in the geometry, the method calculates the cumulative length from the - * current point to the very beginning of the line. - * - * @return {LineSegments2} A reference to this instance. - */ - computeLineDistances(): LineSegments2; - onBeforeRender(renderer: any): void; - /** - * Computes intersection points between a casted ray and this instance. - * - * @param {Raycaster} raycaster - The raycaster. - * @param {Array} intersects - The target array that holds the intersection points. - */ - raycast(raycaster: Raycaster, intersects: Array): void; -} -import { Mesh } from 'three/webgpu'; -import { Vector2 } from 'three/webgpu'; -import { LineSegmentsGeometry } from '../LineSegmentsGeometry.js'; -import { Line2NodeMaterial } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/Wireframe.d.ts b/jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/Wireframe.d.ts deleted file mode 100644 index 5c34f7a30..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/lines/webgpu/Wireframe.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * A class for creating wireframes based on wide lines. - * - * This module can only be used with {@link WebGPURenderer}. When using {@link WebGLRenderer}, - * import the class from `lines/Wireframe.js`. - * - * @augments Mesh - * @three_import import { Wireframe } from 'three/addons/lines/webgpu/Wireframe.js'; - */ -export class Wireframe extends Mesh { - /** - * Constructs a new wireframe. - * - * @param {LineSegmentsGeometry} [geometry] - The line geometry. - * @param {Line2NodeMaterial} [material] - The line material. - */ - constructor(geometry?: LineSegmentsGeometry, material?: Line2NodeMaterial); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWireframe: boolean; - /** - * Computes an array of distance values which are necessary for rendering dashed lines. - * For each vertex in the geometry, the method calculates the cumulative length from the - * current point to the very beginning of the line. - * - * @return {Wireframe} A reference to this instance. - */ - computeLineDistances(): Wireframe; -} -import { Mesh } from 'three/webgpu'; -import { LineSegmentsGeometry } from '../LineSegmentsGeometry.js'; -import { Line2NodeMaterial } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/3DMLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/3DMLoader.d.ts deleted file mode 100644 index b2415ffd0..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/3DMLoader.d.ts +++ /dev/null @@ -1,110 +0,0 @@ -/** - * A loader for Rhinoceros 3D files and objects. - * - * Rhinoceros is a 3D modeler used to create, edit, analyze, document, render, - * animate, and translate NURBS curves, surfaces, breps, extrusions, point clouds, - * as well as polygon meshes and SubD objects. `rhino3dm.js` is compiled to WebAssembly - * from the open source geometry library `openNURBS`. The loader currently uses - * `rhino3dm.js 8.4.0`. - * - * ```js - * const loader = new Rhino3dmLoader(); - * loader.setLibraryPath( 'https://cdn.jsdelivr.net/npm/rhino3dm@8.0.1' ); - * - * const object = await loader.loadAsync( 'models/3dm/Rhino_Logo.3dm' ); - * scene.add( object ); - * ``` - * - * @augments Loader - * @three_import import { Rhino3dmLoader } from 'three/addons/loaders/3DMLoader.js'; - */ -export class Rhino3dmLoader extends Loader { - /** - * Constructs a new Rhino 3DM loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - libraryPath: string; - libraryPending: Promise | null; - libraryBinary: any; - libraryConfig: {}; - url: string; - workerLimit: number; - workerPool: any[]; - workerNextTaskID: number; - workerSourceURL: string; - workerConfig: {}; - materials: any[]; - warnings: any[]; - /** - * Path to a folder containing the JS and WASM libraries. - * - * @param {string} path - The library path to set. - * @return {Rhino3dmLoader} A reference to this loader. - */ - setLibraryPath(path: string): Rhino3dmLoader; - /** - * Sets the maximum number of Web Workers to be used during decoding. - * A lower limit may be preferable if workers are also for other - * tasks in the application. - * - * @param {number} workerLimit - The worker limit. - * @return {Rhino3dmLoader} A reference to this loader. - */ - setWorkerLimit(workerLimit: number): Rhino3dmLoader; - /** - * Starts loading from the given URL and passes the loaded 3DM asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Object3D)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: Object3D) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Prints debug messages to the browser console. - */ - debug(): void; - /** - * Decodes the 3DM asset data with a Web Worker. - * - * @param {ArrayBuffer} buffer - The raw 3DM asset data as an array buffer. - * @param {string} url - The asset URL. - * @return {Promise} A Promise that resolved with the decoded 3D object. - */ - decodeObjects(buffer: ArrayBuffer, url: string): Promise; - /** - * Parses the given 3DM data and passes the loaded 3DM asset - * to the `onLoad()` callback. - * - * @param {ArrayBuffer} data - The raw 3DM asset data as an array buffer. - * @param {function(Object3D)} onLoad - Executed when the loading process has been finished. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - parse(data: ArrayBuffer, onLoad: (arg0: Object3D) => any, onError: onErrorCallback): void; - _compareMaterials(material: any): any; - _createMaterial(material: any, renderEnvironment: any): MeshStandardMaterial; - _createGeometry(data: any): Object3D; - _createObject(obj: any, mat: any): Sprite | Mesh | Line | Points | SpotLight | PointLight | DirectionalLight | RectAreaLight | undefined; - _initLibrary(): Promise; - _getWorker(taskCost: any): Promise; - _releaseTask(worker: any, taskID: any): void; - /** - * Frees internal resources. This method should be called - * when the loader is no longer required. - */ - dispose(): void; -} -import { Loader } from 'three'; -import { Object3D } from 'three'; -import { MeshStandardMaterial } from 'three'; -import { Sprite } from 'three'; -import { Mesh } from 'three'; -import { Line } from 'three'; -import { Points } from 'three'; -import { SpotLight } from 'three'; -import { PointLight } from 'three'; -import { DirectionalLight } from 'three'; -import { RectAreaLight } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/3MFLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/3MFLoader.d.ts deleted file mode 100644 index 6d04210bb..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/3MFLoader.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * A loader for the [3D Manufacturing Format (3MF)](https://3mf.io/specification/) format. - * - * The following features from the core specification are supported: - * - * - 3D Models - * - Object Resources (Meshes and Components) - * - Material Resources (Base Materials) - * - * 3MF Materials and Properties Extension are only partially supported. - * - * - Texture 2D - * - Texture 2D Groups - * - Color Groups (Vertex Colors) - * - Metallic Display Properties (PBR) - * - * ```js - * const loader = new ThreeMFLoader(); - * - * const object = await loader.loadAsync( './models/3mf/truck.3mf' ); - * object.rotation.set( - Math.PI / 2, 0, 0 ); // z-up conversion - * scene.add( object ); - * ``` - * - * @augments Loader - * @three_import import { ThreeMFLoader } from 'three/addons/loaders/3MFLoader.js'; - */ -export class ThreeMFLoader extends Loader { - /** - * Constructs a new 3MF loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * An array of available extensions. - * - * @type {Array} - */ - availableExtensions: Array; - /** - * Starts loading from the given URL and passes the loaded 3MF asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Group)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: Group) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given 3MF data and returns the resulting group. - * - * @param {ArrayBuffer} data - The raw 3MF asset data as an array buffer. - * @return {Group} A group representing the parsed asset. - */ - parse(data: ArrayBuffer): Group; - /** - * Adds a 3MF extension. - * - * @param {Object} extension - The extension to add. - */ - addExtension(extension: Object): void; -} -import { Loader } from 'three'; -import { Group } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/AMFLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/AMFLoader.d.ts deleted file mode 100644 index ab0d0f496..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/AMFLoader.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * A loader for the AMF format. - * - * The loader supports materials, color and ZIP compressed files. - * No constellation support (yet). - * - * ```js - * const loader = new AMFLoader(); - * - * const object = await loader.loadAsync( './models/amf/rook.amf' ); - * scene.add( object ); - * ``` - * - * @augments Loader - * @three_import import { AMFLoader } from 'three/addons/loaders/AMFLoader.js'; - */ -export class AMFLoader extends Loader { - /** - * Constructs a new AMF loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Starts loading from the given URL and passes the loaded AMF asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Group)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: Group) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given AMF data and returns the resulting group. - * - * @param {ArrayBuffer} data - The raw AMF asset data as an array buffer. - * @return {Group} A group representing the parsed asset. - */ - parse(data: ArrayBuffer): Group; -} -import { Loader } from 'three'; -import { Group } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/BVHLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/BVHLoader.d.ts deleted file mode 100644 index a63bd7f6c..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/BVHLoader.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -/** - * A loader for the BVH format. - * - * Imports BVH files and outputs a single {@link Skeleton} and {@link AnimationClip}. - * The loader only supports BVH files containing a single root right now. - * - * ```js - * const loader = new BVHLoader(); - * const result = await loader.loadAsync( 'models/bvh/pirouette.bvh' ); - * - * // visualize skeleton - * const skeletonHelper = new THREE.SkeletonHelper( result.skeleton.bones[ 0 ] ); - * scene.add( result.skeleton.bones[ 0 ] ); - * scene.add( skeletonHelper ); - * - * // play animation clip - * mixer = new THREE.AnimationMixer( result.skeleton.bones[ 0 ] ); - * mixer.clipAction( result.clip ).play(); - * ``` - * - * @augments Loader - * @three_import import { BVHLoader } from 'three/addons/loaders/BVHLoader.js'; - */ -export class BVHLoader extends Loader { - /** - * Constructs a new BVH loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Whether to animate bone positions or not. - * - * @type {boolean} - * @default true - */ - animateBonePositions: boolean; - /** - * Whether to animate bone rotations or not. - * - * @type {boolean} - * @default true - */ - animateBoneRotations: boolean; - /** - * Starts loading from the given URL and passes the loaded BVH asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function({skeleton:Skeleton,clip:AnimationClip})} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: { - skeleton: Skeleton; - clip: AnimationClip; - }) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given BVH data and returns the resulting data. - * - * @param {string} text - The raw BVH data as a string. - * @return {{skeleton:Skeleton,clip:AnimationClip}} An object representing the parsed asset. - */ - parse(text: string): { - skeleton: Skeleton; - clip: AnimationClip; - }; -} -import { Loader } from 'three'; -import { Skeleton } from 'three'; -import { AnimationClip } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/ColladaLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/ColladaLoader.d.ts deleted file mode 100644 index 6eff80f62..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/ColladaLoader.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * A loader for the Collada format. - * - * The Collada format is very complex so this loader only supports a subset of what - * is defined in the [official specification](https://www.khronos.org/files/collada_spec_1_5.pdf). - * - * Assets with a Z-UP coordinate system are transformed it into Y-UP by a simple rotation. - * The vertex data are not converted. - * - * ```js - * const loader = new ColladaLoader(); - * - * const result = await loader.loadAsync( './models/collada/elf/elf.dae' ); - * scene.add( result.scene ); - * ``` - * - * @augments Loader - * @three_import import { ColladaLoader } from 'three/addons/loaders/ColladaLoader.js'; - */ -export class ColladaLoader extends Loader { - /** - * Starts loading from the given URL and passes the loaded Collada asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function({scene:Group,animations:Array,kinematics:Object})} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: { - scene: Group; - animations: Array; - kinematics: Object; - }) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given Collada data and returns a result object holding the parsed scene, - * an array of animation clips and kinematics. - * - * @param {string} text - The raw Collada data as a string. - * @param {string} [path] - The asset path. - * @return {?{scene:Group,animations:Array,kinematics:Object}} An object representing the parsed asset. - */ - parse(text: string, path?: string): { - scene: Group; - animations: Array; - kinematics: Object; - } | null; -} -import { Loader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/DDSLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/DDSLoader.d.ts deleted file mode 100644 index 1042415d7..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/DDSLoader.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * A loader for the S3TC texture compression format. - * - * ```js - * const loader = new DDSLoader(); - * - * const map = loader.load( 'textures/compressed/disturb_dxt1_nomip.dds' ); - * map.colorSpace = THREE.SRGBColorSpace; // only for color textures - * ``` - * - * @augments CompressedTextureLoader - * @three_import import { DDSLoader } from 'three/addons/loaders/DDSLoader.js'; - */ -export class DDSLoader extends CompressedTextureLoader { - /** - * Constructs a new DDS loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Parses the given S3TC texture data. - * - * @param {ArrayBuffer} buffer - The raw texture data. - * @param {boolean} loadMipmaps - Whether to load mipmaps or not. - * @return {CompressedTextureLoader~TexData} An object representing the parsed texture data. - */ - parse(buffer: ArrayBuffer, loadMipmaps: boolean): CompressedTextureLoader; -} -import { CompressedTextureLoader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/DRACOLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/DRACOLoader.d.ts deleted file mode 100644 index 8ea3c4d09..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/DRACOLoader.d.ts +++ /dev/null @@ -1,116 +0,0 @@ -/** - * A loader for the Draco format. - * - * [Draco](https://google.github.io/draco/) is an open source library for compressing - * and decompressing 3D meshes and point clouds. Compressed geometry can be significantly smaller, - * at the cost of additional decoding time on the client device. - * - * Standalone Draco files have a `.drc` extension, and contain vertex positions, normals, colors, - * and other attributes. Draco files do not contain materials, textures, animation, or node hierarchies – - * to use these features, embed Draco geometry inside of a glTF file. A normal glTF file can be converted - * to a Draco-compressed glTF file using [glTF-Pipeline](https://github.com/CesiumGS/gltf-pipeline). - * When using Draco with glTF, an instance of `DRACOLoader` will be used internally by {@link GLTFLoader}. - * - * It is recommended to create one DRACOLoader instance and reuse it to avoid loading and creating - * multiple decoder instances. - * - * `DRACOLoader` will automatically use either the JS or the WASM decoding library, based on - * browser capabilities. - * - * ```js - * const loader = new DRACOLoader(); - * loader.setDecoderPath( '/examples/jsm/libs/draco/' ); - * - * const geometry = await dracoLoader.loadAsync( 'models/draco/bunny.drc' ); - * geometry.computeVertexNormals(); // optional - * - * dracoLoader.dispose(); - * ``` - * - * @augments Loader - * @three_import import { DRACOLoader } from 'three/addons/loaders/DRACOLoader.js'; - */ -export class DRACOLoader extends Loader { - /** - * Constructs a new Draco loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - decoderPath: string; - decoderConfig: {}; - decoderBinary: any; - decoderPending: Promise | null; - workerLimit: number; - workerPool: any[]; - workerNextTaskID: number; - workerSourceURL: string; - defaultAttributeIDs: { - position: string; - normal: string; - color: string; - uv: string; - }; - defaultAttributeTypes: { - position: string; - normal: string; - color: string; - uv: string; - }; - /** - * Provides configuration for the decoder libraries. Configuration cannot be changed after decoding begins. - * - * @param {string} path - The decoder path. - * @return {DRACOLoader} A reference to this loader. - */ - setDecoderPath(path: string): DRACOLoader; - /** - * Provides configuration for the decoder libraries. Configuration cannot be changed after decoding begins. - * - * @deprecated - * @param {{type:('js'|'wasm')}} config - The decoder config. - * @return {DRACOLoader} A reference to this loader. - */ - setDecoderConfig(config: { - type: ("js" | "wasm"); - }): DRACOLoader; - /** - * Sets the maximum number of Web Workers to be used during decoding. - * A lower limit may be preferable if workers are also for other tasks in the application. - * - * @param {number} workerLimit - The worker limit. - * @return {DRACOLoader} A reference to this loader. - */ - setWorkerLimit(workerLimit: number): DRACOLoader; - /** - * Starts loading from the given URL and passes the loaded Draco asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(BufferGeometry)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: BufferGeometry) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given Draco data. - * - * @param {ArrayBuffer} buffer - The raw Draco data as an array buffer. - * @param {function(BufferGeometry)} onLoad - Executed when the loading/parsing process has been finished. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - parse(buffer: ArrayBuffer, onLoad: (arg0: BufferGeometry) => any, onError?: onErrorCallback): void; - decodeDracoFile(buffer: any, callback: any, attributeIDs: any, attributeTypes: any, vertexColorSpace?: string, onError?: () => void): any; - decodeGeometry(buffer: any, taskConfig: any): any; - _createGeometry(geometryData: any): BufferGeometry; - _assignVertexColorSpace(attribute: any, inputColorSpace: any): void; - _loadLibrary(url: any, responseType: any): Promise; - preload(): this; - _initDecoder(): Promise; - _getWorker(taskID: any, taskCost: any): Promise; - _releaseTask(worker: any, taskID: any): void; - debug(): void; - dispose(): this; -} -import { Loader } from 'three'; -import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/EXRLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/EXRLoader.d.ts deleted file mode 100644 index 59177cb96..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/EXRLoader.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * A loader for the OpenEXR texture format. - * - * `EXRLoader` currently supports uncompressed, ZIP(S), RLE, PIZ, B44/A and DWA/B compression. - * Supports reading as UnsignedByte, HalfFloat and Float type data texture. - * - * ```js - * const loader = new EXRLoader(); - * const texture = await loader.loadAsync( 'textures/memorial.exr' ); - * ``` - * - * @augments DataTextureLoader - * @three_import import { EXRLoader } from 'three/addons/loaders/EXRLoader.js'; - */ -export class EXRLoader extends DataTextureLoader { - /** - * Constructs a new EXR loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * The texture type. - * - * @type {(HalfFloatType|FloatType)} - * @default HalfFloatType - */ - type: (number | number); - /** - * Texture output format. - * - * @type {(RGBAFormat|RGFormat|RedFormat)} - * @default RGBAFormat - */ - outputFormat: (number | number | number); - /** - * For multi-part EXR files, the index of the part to load. - * - * @type {number} - * @default 0 - */ - part: number; - /** - * Parses the given EXR texture data. - * - * @param {ArrayBuffer} buffer - The raw texture data. - * @return {DataTextureLoader~TexData} An object representing the parsed texture data. - */ - parse(buffer: ArrayBuffer): DataTextureLoader; - /** - * Sets the texture type. - * - * @param {(HalfFloatType|FloatType)} value - The texture type to set. - * @return {EXRLoader} A reference to this loader. - */ - setDataType(value: (number | number)): EXRLoader; - /** - * Sets texture output format. Defaults to `RGBAFormat`. - * - * @param {(RGBAFormat|RGFormat|RedFormat)} value - Texture output format. - * @return {EXRLoader} A reference to this loader. - */ - setOutputFormat(value: (number | number | number)): EXRLoader; - /** - * For multi-part EXR files, sets which part to load. - * - * @param {number} value - The part index to load. - * @return {EXRLoader} A reference to this loader. - */ - setPart(value: number): EXRLoader; - load(url: any, onLoad: any, onProgress: any, onError: any): import("three").DataTexture; -} -import { DataTextureLoader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/FBXLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/FBXLoader.d.ts deleted file mode 100644 index 6dd4a2610..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/FBXLoader.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * A loader for the FBX format. - * - * Requires FBX file to be >= 7.0 and in ASCII or >= 6400 in Binary format. - * Versions lower than this may load but will probably have errors. - * - * Needs Support: - * - Morph normals / blend shape normals - * - * FBX format references: - * - [C++ SDK reference](https://help.autodesk.com/view/FBX/2017/ENU/?guid=__cpp_ref_index_html) - * - * Binary format specification: - * - [FBX binary file format specification](https://code.blender.org/2013/08/fbx-binary-file-format-specification/) - * - * ```js - * const loader = new FBXLoader(); - * const object = await loader.loadAsync( 'models/fbx/stanford-bunny.fbx' ); - * scene.add( object ); - * ``` - * - * @augments Loader - * @three_import import { FBXLoader } from 'three/addons/loaders/FBXLoader.js'; - */ -export class FBXLoader extends Loader { - /** - * Constructs a new FBX loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Starts loading from the given URL and passes the loaded FBX asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Group)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: Group) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given FBX data and returns the resulting group. - * - * @param {ArrayBuffer} FBXBuffer - The raw FBX data as an array buffer. - * @param {string} path - The URL base path. - * @return {Group} An object representing the parsed asset. - */ - parse(FBXBuffer: ArrayBuffer, path: string): Group; -} -import { Loader } from 'three'; -import { Group } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/FontLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/FontLoader.d.ts deleted file mode 100644 index 0771ff5cc..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/FontLoader.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -/** - * A loader for loading fonts. - * - * You can convert fonts online using [facetype.js](https://gero3.github.io/facetype.js/). - * - * ```js - * const loader = new FontLoader(); - * const font = await loader.loadAsync( 'fonts/helvetiker_regular.typeface.json' ); - * ``` - * - * @augments Loader - * @three_import import { FontLoader } from 'three/addons/loaders/FontLoader.js'; - */ -export class FontLoader extends Loader { - /** - * Constructs a new font loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Starts loading from the given URL and passes the loaded font - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Font)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: Font) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given font data and returns the resulting font. - * - * @param {Object} json - The raw font data as a JSON object. - * @return {Font} The font. - */ - parse(json: Object): Font; -} -/** - * Class representing a font. - */ -export class Font { - /** - * Constructs a new font. - * - * @param {Object} data - The font data as JSON. - */ - constructor(data: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isFont: boolean; - type: string; - /** - * The font data as JSON. - * - * @type {Object} - */ - data: Object; - /** - * Generates geometry shapes from the given text and size. The result of this method - * should be used with {@link ShapeGeometry} to generate the actual geometry data. - * - * @param {string} text - The text. - * @param {number} [size=100] - The text size. - * @param {string} [direction='ltr'] - Char direction: ltr(left to right), rtl(right to left) & tb(top bottom). - * @return {Array} An array of shapes representing the text. - */ - generateShapes(text: string, size?: number, direction?: string): Array; -} -import { Loader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/GCodeLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/GCodeLoader.d.ts deleted file mode 100644 index 5c0f7df3a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/GCodeLoader.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * A loader for the GCode format. - * - * GCode files are usually used for 3D printing or CNC applications. - * - * ```js - * const loader = new GCodeLoader(); - * const object = await loader.loadAsync( 'models/gcode/benchy.gcode' ); - * scene.add( object ); - * ``` - * - * @augments Loader - * @three_import import { GCodeLoader } from 'three/addons/loaders/GCodeLoader.js'; - */ -export class GCodeLoader extends Loader { - /** - * Constructs a new GCode loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Whether to split layers or not. - * - * @type {boolean} - * @default false - */ - splitLayer: boolean; - /** - * Starts loading from the given URL and passes the loaded GCode asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Group)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: Group) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given GCode data and returns a group with lines. - * - * @param {string} data - The raw Gcode data as a string. - * @return {Group} The parsed GCode asset. - */ - parse(data: string): Group; -} -import { Loader } from 'three'; -import { Group } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/GLTFLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/GLTFLoader.d.ts deleted file mode 100644 index 97a25a303..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/GLTFLoader.d.ts +++ /dev/null @@ -1,395 +0,0 @@ -/** - * ~LoadObject - */ -export type GLTFLoader = { - /** - * - An array of animation clips. - */ - animations: Array; - /** - * - Meta data about the loaded asset. - */ - asset: Object; - /** - * - An array of cameras. - */ - cameras: Array; - /** - * - A reference to the internal parser. - */ - parser: GLTFParser; - /** - * - The default scene. - */ - scene: Group; - /** - * - glTF assets might define multiple scenes. - */ - scenes: Array; - /** - * - Additional data. - */ - userData: Object; -}; -import { AnimationClip } from 'three'; -declare class GLTFParser { - constructor(json?: {}, options?: {}); - json: {}; - extensions: {}; - plugins: {}; - options: {}; - cache: any; - associations: Map; - primitiveCache: {}; - nodeCache: {}; - meshCache: { - refs: {}; - uses: {}; - }; - cameraCache: { - refs: {}; - uses: {}; - }; - lightCache: { - refs: {}; - uses: {}; - }; - sourceCache: {}; - textureCache: {}; - nodeNamesUsed: {}; - textureLoader: TextureLoader | ImageBitmapLoader; - fileLoader: FileLoader; - setExtensions(extensions: any): void; - setPlugins(plugins: any): void; - parse(onLoad: any, onError: any): void; - /** - * Marks the special nodes/meshes in json for efficient parse. - * - * @private - */ - private _markDefs; - /** - * Counts references to shared node / Object3D resources. These resources - * can be reused, or "instantiated", at multiple nodes in the scene - * hierarchy. Mesh, Camera, and Light instances are instantiated and must - * be marked. Non-scenegraph resources (like Materials, Geometries, and - * Textures) can be reused directly and are not marked here. - * - * Example: CesiumMilkTruck sample model reuses "Wheel" meshes. - * - * @private - * @param {Object} cache - * @param {Object3D} index - */ - private _addNodeRef; - /** - * Returns a reference to a shared resource, cloning it if necessary. - * - * @private - * @param {Object} cache - * @param {number} index - * @param {Object} object - * @return {Object} - */ - private _getNodeRef; - _invokeOne(func: any): any; - _invokeAll(func: any): any[]; - /** - * Requests the specified dependency asynchronously, with caching. - * - * @private - * @param {string} type - * @param {number} index - * @return {Promise} - */ - private getDependency; - /** - * Requests all dependencies of the specified type asynchronously, with caching. - * - * @private - * @param {string} type - * @return {Promise>} - */ - private getDependencies; - /** - * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#buffers-and-buffer-views - * - * @private - * @param {number} bufferIndex - * @return {Promise} - */ - private loadBuffer; - /** - * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#buffers-and-buffer-views - * - * @private - * @param {number} bufferViewIndex - * @return {Promise} - */ - private loadBufferView; - /** - * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#accessors - * - * @private - * @param {number} accessorIndex - * @return {Promise} - */ - private loadAccessor; - /** - * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#textures - * - * @private - * @param {number} textureIndex - * @return {Promise} - */ - private loadTexture; - loadTextureImage(textureIndex: any, sourceIndex: any, loader: any): any; - loadImageSource(sourceIndex: any, loader: any): any; - /** - * Asynchronously assigns a texture to the given material parameters. - * - * @private - * @param {Object} materialParams - * @param {string} mapName - * @param {Object} mapDef - * @param {string} [colorSpace] - * @return {Promise} - */ - private assignTexture; - /** - * Assigns final material to a Mesh, Line, or Points instance. The instance - * already has a material (generated from the glTF material options alone) - * but reuse of the same glTF material may require multiple threejs materials - * to accommodate different primitive types, defines, etc. New materials will - * be created if necessary, and reused from a cache. - * - * @private - * @param {Object3D} mesh Mesh, Line, or Points instance. - */ - private assignFinalMaterial; - getMaterialType(): typeof MeshStandardMaterial; - /** - * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials - * - * @private - * @param {number} materialIndex - * @return {Promise} - */ - private loadMaterial; - /** - * When Object3D instances are targeted by animation, they need unique names. - * - * @private - * @param {string} originalName - * @return {string} - */ - private createUniqueName; - /** - * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#geometry - * - * Creates BufferGeometries from primitives. - * - * @private - * @param {Array} primitives - * @return {Promise>} - */ - private loadGeometries; - /** - * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#meshes - * - * @private - * @param {number} meshIndex - * @return {Promise} - */ - private loadMesh; - /** - * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#cameras - * - * @private - * @param {number} cameraIndex - * @return {Promise|undefined} - */ - private loadCamera; - /** - * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins - * - * @private - * @param {number} skinIndex - * @return {Promise} - */ - private loadSkin; - /** - * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#animations - * - * @private - * @param {number} animationIndex - * @return {Promise} - */ - private loadAnimation; - createNodeMesh(nodeIndex: any): Promise | null; - /** - * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#nodes-and-hierarchy - * - * @private - * @param {number} nodeIndex - * @return {Promise} - */ - private loadNode; - _loadNodeShallow(nodeIndex: any): any; - /** - * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#scenes - * - * @private - * @param {number} sceneIndex - * @return {Promise} - */ - private loadScene; - _createAnimationTracks(node: any, inputAccessor: any, outputAccessor: any, sampler: any, target: any): QuaternionKeyframeTrack[]; - _getArrayFromAccessor(accessor: any): any; - _createCubicSplineTrackInterpolant(track: any): void; -} -import { Group } from 'three'; -/** - * A loader for the glTF 2.0 format. - * - * [glTF](https://www.khronos.org/gltf/) (GL Transmission Format) is an [open format specification]{@link https://github.com/KhronosGroup/glTF/tree/main/specification/2.0) - * for efficient delivery and loading of 3D content. Assets may be provided either in JSON (.gltf) or binary (.glb) - * format. External files store textures (.jpg, .png) and additional binary data (.bin). A glTF asset may deliver - * one or more scenes, including meshes, materials, textures, skins, skeletons, morph targets, animations, lights, - * and/or cameras. - * - * `GLTFLoader` uses {@link ImageBitmapLoader} whenever possible. Be advised that image bitmaps are not - * automatically GC-collected when they are no longer referenced, and they require special handling during - * the disposal process. - * - * `GLTFLoader` supports the following glTF 2.0 extensions: - * - KHR_draco_mesh_compression - * - KHR_lights_punctual - * - KHR_materials_anisotropy - * - KHR_materials_clearcoat - * - KHR_materials_dispersion - * - KHR_materials_emissive_strength - * - KHR_materials_ior - * - KHR_materials_specular - * - KHR_materials_transmission - * - KHR_materials_iridescence - * - KHR_materials_unlit - * - KHR_materials_volume - * - KHR_mesh_quantization - * - KHR_meshopt_compression - * - KHR_texture_basisu - * - KHR_texture_transform - * - EXT_materials_bump - * - EXT_meshopt_compression - * - EXT_mesh_gpu_instancing - * - EXT_texture_avif - * - EXT_texture_webp - * - * The following glTF 2.0 extension is supported by an external user plugin: - * - [KHR_materials_variants](https://github.com/takahirox/three-gltf-extensions) - * - [MSFT_texture_dds](https://github.com/takahirox/three-gltf-extensions) - * - [KHR_animation_pointer](https://github.com/needle-tools/three-animation-pointer) - * - [NEEDLE_progressive](https://github.com/needle-tools/gltf-progressive) - * - * ```js - * const loader = new GLTFLoader(); - * - * // Optional: Provide a DRACOLoader instance to decode compressed mesh data - * const dracoLoader = new DRACOLoader(); - * dracoLoader.setDecoderPath( '/examples/jsm/libs/draco/' ); - * loader.setDRACOLoader( dracoLoader ); - * - * const gltf = await loader.loadAsync( 'models/gltf/duck/duck.gltf' ); - * scene.add( gltf.scene ); - * ``` - * - * @augments Loader - * @three_import import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js'; - */ -export class GLTFLoader extends Loader { - /** - * Constructs a new glTF loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - dracoLoader: any; - ktx2Loader: any; - meshoptDecoder: Object | null; - pluginCallbacks: any[]; - /** - * Starts loading from the given URL and passes the loaded glTF asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(GLTFLoader~LoadObject)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Sets the given Draco loader to this loader. Required for decoding assets - * compressed with the `KHR_draco_mesh_compression` extension. - * - * @param {DRACOLoader} dracoLoader - The Draco loader to set. - * @return {GLTFLoader} A reference to this loader. - */ - setDRACOLoader(dracoLoader: DRACOLoader): GLTFLoader; - /** - * Sets the given KTX2 loader to this loader. Required for loading KTX2 - * compressed textures. - * - * @param {KTX2Loader} ktx2Loader - The KTX2 loader to set. - * @return {GLTFLoader} A reference to this loader. - */ - setKTX2Loader(ktx2Loader: KTX2Loader): GLTFLoader; - /** - * Sets the given meshopt decoder. Required for decoding assets - * compressed with the `EXT_meshopt_compression` extension. - * - * @param {Object} meshoptDecoder - The meshopt decoder to set. - * @return {GLTFLoader} A reference to this loader. - */ - setMeshoptDecoder(meshoptDecoder: Object): GLTFLoader; - /** - * Registers a plugin callback. This API is internally used to implement the various - * glTF extensions but can also used by third-party code to add additional logic - * to the loader. - * - * @param {function(parser:GLTFParser)} callback - The callback function to register. - * @return {GLTFLoader} A reference to this loader. - */ - register(callback: any): GLTFLoader; - /** - * Unregisters a plugin callback. - * - * @param {Function} callback - The callback function to unregister. - * @return {GLTFLoader} A reference to this loader. - */ - unregister(callback: Function): GLTFLoader; - /** - * Parses the given glTF data and returns the resulting group. - * - * @param {string|ArrayBuffer} data - The raw glTF data. - * @param {string} path - The URL base path. - * @param {function(GLTFLoader~LoadObject)} onLoad - Executed when the loading process has been finished. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - parse(data: string | ArrayBuffer, path: string, onLoad: any, onError: onErrorCallback): void; - /** - * Async version of {@link GLTFLoader#parse}. - * - * @async - * @param {string|ArrayBuffer} data - The raw glTF data. - * @param {string} path - The URL base path. - * @return {Promise} A Promise that resolves with the loaded glTF when the parsing has been finished. - */ - parseAsync(data: string | ArrayBuffer, path: string): Promise; -} -import { TextureLoader } from 'three'; -import { ImageBitmapLoader } from 'three'; -import { FileLoader } from 'three'; -import { MeshStandardMaterial } from 'three'; -import { QuaternionKeyframeTrack } from 'three'; -import { Loader } from 'three'; -export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/HDRCubeTextureLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/HDRCubeTextureLoader.d.ts deleted file mode 100644 index 2ca2298ee..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/HDRCubeTextureLoader.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * A loader for loading HDR cube textures. - * - * ```js - * const loader = new HDRCubeTextureLoader(); - * loader.setPath( 'textures/cube/pisaHDR/' ); - * const cubeTexture = await loader.loadAsync( [ 'px.hdr', 'nx.hdr', 'py.hdr', 'ny.hdr', 'pz.hdr', 'nz.hdr' ] ); - * - * scene.background = cubeTexture; - * scene.environment = cubeTexture; - * ``` - * - * @augments Loader - * @three_import import { HDRCubeTextureLoader } from 'three/addons/loaders/HDRCubeTextureLoader.js'; - */ -export class HDRCubeTextureLoader extends Loader { - /** - * Constructs a new HDR cube texture loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * The internal HDR loader that loads the - * individual textures for each cube face. - * - * @type {HDRLoader} - */ - hdrLoader: HDRLoader; - /** - * The texture type. - * - * @type {(HalfFloatType|FloatType)} - * @default HalfFloatType - */ - type: (number | number); - /** - * Starts loading from the given URLs and passes the loaded HDR cube texture - * to the `onLoad()` callback. - * - * @param {Array} urls - The paths/URLs of the files to be loaded. This can also be a data URIs. - * @param {function(CubeTexture)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - * @return {CubeTexture} The HDR cube texture. - */ - load(urls: Array, onLoad: (arg0: CubeTexture) => any, onProgress: onProgressCallback, onError: onErrorCallback): CubeTexture; - /** - * Sets the texture type. - * - * @param {(HalfFloatType|FloatType)} value - The texture type to set. - * @return {HDRCubeTextureLoader} A reference to this loader. - */ - setDataType(value: (number | number)): HDRCubeTextureLoader; -} -import { Loader } from 'three'; -import { HDRLoader } from '../loaders/HDRLoader.js'; -import { CubeTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/HDRLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/HDRLoader.d.ts deleted file mode 100644 index 8a43f51bf..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/HDRLoader.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * A loader for the RGBE HDR texture format. - * - * ```js - * const loader = new HDRLoader(); - * const envMap = await loader.loadAsync( 'textures/equirectangular/blouberg_sunrise_2_1k.hdr' ); - * envMap.mapping = THREE.EquirectangularReflectionMapping; - * - * scene.environment = envMap; - * ``` - * - * @augments DataTextureLoader - * @three_import import { HDRLoader } from 'three/addons/loaders/HDRLoader.js'; - */ -export class HDRLoader extends DataTextureLoader { - /** - * Constructs a new RGBE/HDR loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * The texture type. - * - * @type {(HalfFloatType|FloatType)} - * @default HalfFloatType - */ - type: (number | number); - /** - * Parses the given RGBE texture data. - * - * @param {ArrayBuffer} buffer - The raw texture data. - * @return {DataTextureLoader~TexData} An object representing the parsed texture data. - */ - parse(buffer: ArrayBuffer): DataTextureLoader; - /** - * Sets the texture type. - * - * @param {(HalfFloatType|FloatType)} value - The texture type to set. - * @return {HDRLoader} A reference to this loader. - */ - setDataType(value: (number | number)): HDRLoader; - load(url: any, onLoad: any, onProgress: any, onError: any): import("three").DataTexture; -} -import { DataTextureLoader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/IESLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/IESLoader.d.ts deleted file mode 100644 index 15453e42e..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/IESLoader.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * A loader for the IES format. - * - * The loaded texture should be assigned to {@link IESSpotLight#map}. - * - * ```js - * const loader = new IESLoader(); - * const texture = await loader.loadAsync( 'ies/007cfb11e343e2f42e3b476be4ab684e.ies' ); - * - * const spotLight = new THREE.IESSpotLight( 0xff0000, 500 ); - * spotLight.iesMap = texture; - * ``` - * - * @augments Loader - * @three_import import { IESLoader } from 'three/addons/loaders/IESLoader.js'; - */ -export class IESLoader extends Loader { - /** - * Constructs a new IES loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * The texture type. - * - * @type {(HalfFloatType|FloatType)} - * @default HalfFloatType - */ - type: (number | number); - _getIESValues(iesLamp: any, type: any): Uint8Array | Uint16Array | Float32Array | null; - /** - * Starts loading from the given URL and passes the loaded IES texture - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(DataTexture)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: DataTexture) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given IES data. - * - * @param {string} text - The raw IES data. - * @return {DataTexture} THE IES data as a texture. - */ - parse(text: string): DataTexture; -} -import { Loader } from 'three'; -import { DataTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/KMZLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/KMZLoader.d.ts deleted file mode 100644 index 17775a709..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/KMZLoader.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * A loader for the KMZ format. - * - * ```js - * const loader = new KMZLoader(); - * const kmz = await loader.loadAsync( './models/kmz/Box.kmz' ); - * - * scene.add( kmz.scene ); - * ``` - * - * @augments Loader - * @three_import import { KMZLoader } from 'three/addons/loaders/KMZLoader.js'; - */ -export class KMZLoader extends Loader { - /** - * Starts loading from the given URL and passes the loaded KMZ asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function({scene:Group})} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: { - scene: Group; - }) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given KMZ data and returns an object holding the scene. - * - * @param {ArrayBuffer} data - The raw KMZ data as an array buffer. - * @return {{scene:Group}} The parsed KMZ asset. - */ - parse(data: ArrayBuffer): { - scene: Group; - }; -} -import { Loader } from 'three'; -import { Group } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/KTX2Loader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/KTX2Loader.d.ts deleted file mode 100644 index 064241afc..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/KTX2Loader.d.ts +++ /dev/null @@ -1,188 +0,0 @@ -/** - * A loader for KTX 2.0 GPU Texture containers. - * - * KTX 2.0 is a container format for various GPU texture formats. The loader supports Basis Universal GPU textures, - * which can be quickly transcoded to a wide variety of GPU texture compression formats. While KTX 2.0 also allows - * other hardware-specific formats, this loader does not yet parse them. - * - * This loader parses the KTX 2.0 container and transcodes to a supported GPU compressed texture format. - * The required WASM transcoder and JS wrapper are available from the `examples/jsm/libs/basis` directory. - * - * This loader relies on Web Assembly which is not supported in older browsers. - * - * References: - * - [KTX specification](http://github.khronos.org/KTX-Specification/) - * - [DFD](https://www.khronos.org/registry/DataFormat/specs/1.3/dataformat.1.3.html#basicdescriptor) - * - [BasisU HDR](https://github.com/BinomialLLC/basis_universal/wiki/UASTC-HDR-Texture-Specification-v1.0) - * - * ```js - * const loader = new KTX2Loader(); - * loader.setTranscoderPath( 'examples/jsm/libs/basis/' ); - * loader.detectSupport( renderer ); - * const texture = loader.loadAsync( 'diffuse.ktx2' ); - * ``` - * - * @augments Loader - * @three_import import { KTX2Loader } from 'three/addons/loaders/KTX2Loader.js'; - */ -export class KTX2Loader extends Loader { - /** - * Constructs a new KTX2 loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - transcoderPath: string; - transcoderBinary: any; - transcoderPending: Promise | null; - workerPool: WorkerPool; - workerSourceURL: string; - workerConfig: { - astcSupported: any; - astcHDRSupported: boolean; - etc1Supported: any; - etc2Supported: any; - dxtSupported: any; - bptcSupported: any; - pvrtcSupported: any; - } | { - astcSupported: any; - astcHDRSupported: any; - etc1Supported: any; - etc2Supported: any; - dxtSupported: any; - bptcSupported: any; - pvrtcSupported: any; - } | null; - /** - * Sets the transcoder path to optionally set the decoder load path from a CDN. - * - * By default The WASM transcoder and JS wrapper are loaded from the `examples/jsm/libs/basis` directory. - * - * @param {string} path - The transcoder path to set. - * @return {KTX2Loader} A reference to this loader. - */ - setTranscoderPath(path: string): KTX2Loader; - /** - * Sets the maximum number of Web Workers to be allocated by this instance. - * - * @param {number} workerLimit - The worker limit. - * @return {KTX2Loader} A reference to this loader. - */ - setWorkerLimit(workerLimit: number): KTX2Loader; - /** - * Async version of {@link KTX2Loader#detectSupport}. - * - * @async - * @deprecated - * @param {WebGPURenderer} renderer - The renderer. - * @return {Promise} A Promise that resolves when the support has been detected. - */ - detectSupportAsync(renderer: WebGPURenderer): Promise; - /** - * Detects hardware support for available compressed texture formats, to determine - * the output format for the transcoder. Must be called before loading a texture. - * - * @param {WebGPURenderer|WebGLRenderer} renderer - The renderer. - * @return {KTX2Loader} A reference to this loader. - */ - detectSupport(renderer: WebGPURenderer | WebGLRenderer): KTX2Loader; - init(): Promise; - /** - * Starts loading from the given URL and passes the loaded KTX2 texture - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(CompressedTexture)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: CompressedTexture) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given KTX2 data. - * - * @param {ArrayBuffer} buffer - The raw KTX2 data as an array buffer. - * @param {function(CompressedTexture)} onLoad - Executed when the loading/parsing process has been finished. - * @param {onErrorCallback} onError - Executed when errors occur. - * @returns {Promise} A Promise that resolves when the parsing has been finished. - */ - parse(buffer: ArrayBuffer, onLoad: (arg0: CompressedTexture) => any, onError: onErrorCallback): Promise; - _createTextureFrom(transcodeResult: any, container: any): CompressedTexture | Promise; - /** - * @private - * @param {ArrayBuffer} buffer - * @param {?Object} config - * @return {Promise} - */ - private _createTexture; - /** - * Frees internal resources. This method should be called - * when the loader is no longer required. - */ - dispose(): void; -} -export namespace KTX2Loader { - namespace BasisFormat { - let ETC1S: number; - let UASTC: number; - let UASTC_HDR: number; - } - namespace TranscoderFormat { - let ETC1: number; - let ETC2: number; - let BC1: number; - let BC3: number; - let BC4: number; - let BC5: number; - let BC7_M6_OPAQUE_ONLY: number; - let BC7_M5: number; - let PVRTC1_4_RGB: number; - let PVRTC1_4_RGBA: number; - let ASTC_4x4: number; - let ATC_RGB: number; - let ATC_RGBA_INTERPOLATED_ALPHA: number; - let RGBA32: number; - let RGB565: number; - let BGR565: number; - let RGBA4444: number; - let BC6H: number; - let RGB_HALF: number; - let RGBA_HALF: number; - } - namespace EngineFormat { - export { RGBAFormat }; - export { RGBA_ASTC_4x4_Format }; - export { RGB_BPTC_UNSIGNED_Format }; - export { RGBA_BPTC_Format }; - export { RGBA_ETC2_EAC_Format }; - export { RGBA_PVRTC_4BPPV1_Format }; - export { RGBA_S3TC_DXT5_Format }; - export { RGB_ETC1_Format }; - export { RGB_ETC2_Format }; - export { RGB_PVRTC_4BPPV1_Format }; - export { RGBA_S3TC_DXT1_Format }; - } - namespace EngineType { - export { UnsignedByteType }; - export { HalfFloatType }; - export { FloatType }; - } - function BasisWorker(): void; -} -import { Loader } from 'three'; -import { WorkerPool } from '../utils/WorkerPool.js'; -import { CompressedTexture } from 'three'; -import { RGBAFormat } from 'three'; -import { RGBA_ASTC_4x4_Format } from 'three'; -import { RGB_BPTC_UNSIGNED_Format } from 'three'; -import { RGBA_BPTC_Format } from 'three'; -import { RGBA_ETC2_EAC_Format } from 'three'; -import { RGBA_PVRTC_4BPPV1_Format } from 'three'; -import { RGBA_S3TC_DXT5_Format } from 'three'; -import { RGB_ETC1_Format } from 'three'; -import { RGB_ETC2_Format } from 'three'; -import { RGB_PVRTC_4BPPV1_Format } from 'three'; -import { RGBA_S3TC_DXT1_Format } from 'three'; -import { UnsignedByteType } from 'three'; -import { HalfFloatType } from 'three'; -import { FloatType } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/KTXLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/KTXLoader.d.ts deleted file mode 100644 index 931e4f47a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/KTXLoader.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * A loader for the KTX texture compression format. - * - * References: - * - [The KTX File Format and Tools](https://www.khronos.org/opengles/sdk/tools/KTX/) - * - [Babylon.JS khronosTextureContainer.ts](https://github.com/BabylonJS/Babylon.js/blob/master/src/Misc/khronosTextureContainer.ts) - * - * ```js - * const loader = new KTXLoader(); - * - * const map = loader.load( 'textures/compressed/lensflare_ASTC8x8.ktx' ) - * map.colorSpace = THREE.SRGBColorSpace; // only for color textures - * ``` - * - * @augments CompressedTextureLoader - * @three_import import { KTXLoader } from 'three/addons/loaders/KTXLoader.js'; - */ -export class KTXLoader extends CompressedTextureLoader { - /** - * Constructs a new KTX loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Parses the given KTX texture data. - * - * @param {ArrayBuffer} buffer - The raw texture data. - * @param {boolean} loadMipmaps - Whether to load mipmaps or not. - * @return {CompressedTextureLoader~TexData} An object representing the parsed texture data. - */ - parse(buffer: ArrayBuffer, loadMipmaps: boolean): CompressedTextureLoader; -} -import { CompressedTextureLoader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/LDrawLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/LDrawLoader.d.ts deleted file mode 100644 index 53f42fbe0..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/LDrawLoader.d.ts +++ /dev/null @@ -1,256 +0,0 @@ -/** - * A loader for the LDraw format. - * - * [LDraw](https://ldraw.org/} (LEGO Draw) is an [open format specification](https://ldraw.org/article/218.html) - * for describing LEGO and other construction set 3D models. - * - * An LDraw asset (a text file usually with extension .ldr, .dat or .txt) can describe just a single construction - * piece, or an entire model. In the case of a model the LDraw file can reference other LDraw files, which are - * loaded from a library path set with `setPartsLibraryPath`. You usually download the LDraw official parts library, - * extract to a folder and point setPartsLibraryPath to it. - * - * Library parts will be loaded by trial and error in subfolders 'parts', 'p' and 'models'. These file accesses - * are not optimal for web environment, so a script tool has been made to pack an LDraw file with all its dependencies - * into a single file, which loads much faster. See section 'Packing LDraw models'. The LDrawLoader example loads - * several packed files. The official parts library is not included due to its large size. - * - * `LDrawLoader` supports the following extensions: - * - !COLOUR: Color and surface finish declarations. - * - BFC: Back Face Culling specification. - * - !CATEGORY: Model/part category declarations. - * - !KEYWORDS: Model/part keywords declarations. - * - * ```js - * const loader = new LDrawLoader(); - * loader.setConditionalLineMaterial( LDrawConditionalLineMaterial ); // the type of line material depends on the used renderer - * const object = await loader.loadAsync( 'models/ldraw/officialLibrary/models/car.ldr_Packed.mpd' ); - * scene.add( object ); - * ``` - * - * @augments Loader - * @three_import import { LDrawLoader } from 'three/addons/loaders/LDrawLoader.js'; - */ -export class LDrawLoader extends Loader { - /** - * Constructs a new LDraw loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - materials: any[]; - materialLibrary: {}; - edgeMaterialCache: WeakMap; - conditionalEdgeMaterialCache: WeakMap; - partsCache: LDrawPartsGeometryCache; - fileMap: {}; - smoothNormals: boolean; - partsLibraryPath: string; - ConditionalLineMaterial: any; - missingColorMaterial: MeshStandardMaterial; - missingEdgeColorMaterial: LineBasicMaterial; - missingConditionalEdgeColorMaterial: any; - /** - * This method must be called prior to `load()` unless the model to load does not reference - * library parts (usually it will be a model with all its parts packed in a single file). - * - * @param {string} path - Path to library parts files to load referenced parts from. - * This is different from Loader.setPath, which indicates the path to load the main asset from. - * @return {LDrawLoader} A reference to this loader. - */ - setPartsLibraryPath(path: string): LDrawLoader; - /** - * Sets the conditional line material type which depends on the used renderer. - * Use {@link LDrawConditionalLineMaterial} when using `WebGLRenderer` and - * {@link LDrawConditionalLineNodeMaterial} when using `WebGPURenderer`. - * - * @param {(LDrawConditionalLineMaterial.constructor|LDrawConditionalLineNodeMaterial.constructor)} type - The conditional line material type. - * @return {LDrawLoader} A reference to this loader. - */ - setConditionalLineMaterial(type: (LDrawConditionalLineMaterial.constructor | LDrawConditionalLineNodeMaterial.constructor)): LDrawLoader; - /** - * This async method preloads materials from a single LDraw file. In the official - * parts library there is a special file which is loaded always the first (LDConfig.ldr) - * and contains all the standard color codes. This method is intended to be used with - * not packed files, for example in an editor where materials are preloaded and parts - * are loaded on demand. - * - * @async - * @param {string} url - Path of the LDraw materials asset. - * @return {Promise} A Promise that resolves when the preload has finished. - */ - preloadMaterials(url: string): Promise; - /** - * Starts loading from the given URL and passes the loaded LDraw asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Group)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: Group) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given LDraw data and returns the resulting group. - * - * @param {string} text - The raw VRML data as a string. - * @param {function(Group)} onLoad - Executed when the loading/parsing process has been finished. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - parse(text: string, onLoad: (arg0: Group) => any, onError: onErrorCallback): void; - /** - * Sets the loader's material library. This method clears existing - * material definitions. - * - * @param {Array} materials - The materials to set. - * @return {LDrawLoader} A reference to this loader. - */ - setMaterials(materials: Array): LDrawLoader; - /** - * Clears the loader's material library. - * - * @return {LDrawLoader} A reference to this loader. - */ - clearMaterials(): LDrawLoader; - /** - * Adds a list of materials to the loader's material library. - * - * @param {Array} materials - The materials to add. - * @return {LDrawLoader} A reference to this loader. - */ - addMaterials(materials: Array): LDrawLoader; - /** - * Initializes the loader with default materials. - * - * @return {LDrawLoader} A reference to this loader. - */ - addDefaultMaterials(): LDrawLoader; - /** - * Sets a map which maps referenced library filenames to new filenames. - * If a fileMap is not specified (the default), library parts will be accessed by trial and - * error in subfolders 'parts', 'p' and 'models'. - * - * @param {Object} fileMap - The file map to set. - * @return {LDrawLoader} A reference to this loader. - */ - setFileMap(fileMap: { - [x: string]: string; - }): LDrawLoader; - /** - * Adds a single material to the loader's material library. - * - * @param {Material} material - The material to add. - * @return {LDrawLoader} A reference to this loader. - */ - addMaterial(material: Material): LDrawLoader; - /** - * Returns a material for the given color code. - * - * @param {string} colorCode - The color code. - * @return {?Material} The material. Returns `null` if no material has been found. - */ - getMaterial(colorCode: string): Material | null; - applyMaterialsToMesh(group: any, parentColorCode: any, materialHierarchy: any, finalMaterialPass?: boolean): void; - /** - * Returns the Material for the main LDraw color. - * - * For an already loaded LDraw asset, returns the Material associated with the main color code. - * This method can be useful to modify the main material of a model or part that exposes it. - * - * The main color code is the standard way to color an LDraw part. It is '16' for triangles and - * '24' for edges. Usually a complete model will not expose the main color (that is, no part - * uses the code '16' at the top level, because they are assigned other specific colors) An LDraw - * part file on the other hand will expose the code '16' to be colored, and can have additional - * fixed colors. - * - * @return {?Material} The material. Returns `null` if no material has been found. - */ - getMainMaterial(): Material | null; - /** - * Returns the material for the edges main LDraw color. - * - * @return {?Material} The material. Returns `null` if no material has been found. - */ - getMainEdgeMaterial(): Material | null; - parseColorMetaDirective(lineParser: any): MeshStandardMaterial | null; - computeBuildingSteps(model: any): void; -} -import { Loader } from 'three'; -declare class LDrawPartsGeometryCache { - constructor(loader: any); - loader: any; - parseCache: LDrawParsedCache; - _cache: {}; - processIntoMesh(info: any): Promise; - hasCachedModel(fileName: any): boolean; - getCachedModel(fileName: any): Promise; - loadModel(fileName: any): Promise; - parseModel(text: any): Promise; -} -import { MeshStandardMaterial } from 'three'; -import { LineBasicMaterial } from 'three'; -import { Group } from 'three'; -declare class LDrawParsedCache { - constructor(loader: any); - loader: any; - _cache: {}; - cloneResult(original: any): { - faces: any; - conditionalSegments: any; - lineSegments: any; - type: any; - category: any; - keywords: any; - author: any; - subobjects: any; - fileName: any; - totalFaces: any; - startingBuildingStep: any; - materials: any; - group: any; - }; - fetchData(fileName: any): Promise; - parse(text: any, fileName?: null): { - faces: { - material: any; - colorCode: any; - faceNormal: null; - vertices: Vector3[]; - normals: null[]; - doubleSided: boolean; - }[]; - conditionalSegments: { - material: any; - colorCode: any; - vertices: Vector3[]; - controlPoints: Vector3[]; - }[]; - lineSegments: { - material: any; - colorCode: any; - vertices: Vector3[]; - }[]; - type: string; - category: any; - keywords: any[] | null; - author: any; - subobjects: { - material: any; - colorCode: any; - matrix: Matrix4; - fileName: any; - inverted: boolean; - startingBuildingStep: boolean; - }[]; - totalFaces: number; - startingBuildingStep: boolean; - materials: {}; - fileName: null; - group: null; - }; - getData(fileName: any, clone?: boolean): any; - ensureDataLoaded(fileName: any): Promise; - setData(fileName: any, text: any): void; -} -import { Vector3 } from 'three'; -import { Matrix4 } from 'three'; -export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/LUT3dlLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/LUT3dlLoader.d.ts deleted file mode 100644 index 86866f649..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/LUT3dlLoader.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -/** - * A loader for the 3DL LUT format. - * - * References: - * - [3D LUTs](http://download.autodesk.com/us/systemdocs/help/2011/lustre/index.html?url=./files/WSc4e151a45a3b785a24c3d9a411df9298473-7ffd.htm,topicNumber=d0e9492) - * - [Format Spec for .3dl](https://community.foundry.com/discuss/topic/103636/format-spec-for-3dl?mode=Post&postID=895258) - * - * ```js - * const loader = new LUT3dlLoader(); - * const map = loader.loadAsync( 'luts/Presetpro-Cinematic.3dl' ); - * ``` - * - * @augments Loader - * @three_import import { LUT3dlLoader } from 'three/addons/loaders/LUT3dlLoader.js'; - */ -export class LUT3dlLoader extends Loader { - /** - * Constructs a new 3DL LUT loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * The texture type. - * - * @type {(UnsignedByteType|FloatType)} - * @default UnsignedByteType - */ - type: (number | FloatType); - /** - * Sets the texture type. - * - * @param {(UnsignedByteType|FloatType)} type - The texture type to set. - * @return {LUT3dlLoader} A reference to this loader. - */ - setType(type: (number | FloatType)): LUT3dlLoader; - /** - * Starts loading from the given URL and passes the loaded 3DL LUT asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function({size:number,texture3D:Data3DTexture})} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: { - size: number; - texture3D: Data3DTexture; - }) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given 3DL LUT data and returns the resulting 3D data texture. - * - * @param {string} input - The raw 3DL LUT data as a string. - * @return {{size:number,texture3D:Data3DTexture}} The parsed 3DL LUT. - */ - parse(input: string): { - size: number; - texture3D: Data3DTexture; - }; -} -import { Loader } from 'three'; -import { Data3DTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/LUTCubeLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/LUTCubeLoader.d.ts deleted file mode 100644 index 9632d7613..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/LUTCubeLoader.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * A loader for the Cube LUT format. - * - * References: - * - [Cube LUT Specification](https://web.archive.org/web/20220220033515/https://wwwimages2.adobe.com/content/dam/acom/en/products/speedgrade/cc/pdfs/cube-lut-specification-1.0.pdf) - * - * ```js - * const loader = new LUTCubeLoader(); - * const map = loader.loadAsync( 'luts/Bourbon 64.CUBE' ); - * ``` - * - * @augments Loader - * @three_import import { LUTCubeLoader } from 'three/addons/loaders/LUTCubeLoader.js'; - */ -export class LUTCubeLoader extends Loader { - /** - * Constructs a new Cube LUT loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * The texture type. - * - * @type {(UnsignedByteType|FloatType)} - * @default UnsignedByteType - */ - type: (number | FloatType); - /** - * Sets the texture type. - * - * @param {(UnsignedByteType|FloatType)} type - The texture type to set. - * @return {LUTCubeLoader} A reference to this loader. - */ - setType(type: (number | FloatType)): LUTCubeLoader; - /** - * Starts loading from the given URL and passes the loaded Cube LUT asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function({title:string,size:number,domainMin:Vector3,domainMax:Vector3,texture3D:Data3DTexture})} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: { - title: string; - size: number; - domainMin: Vector3; - domainMax: Vector3; - texture3D: Data3DTexture; - }) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given Cube LUT data and returns the resulting 3D data texture. - * - * @param {string} input - The raw Cube LUT data as a string. - * @return {{title:string,size:number,domainMin:Vector3,domainMax:Vector3,texture3D:Data3DTexture}} The parsed Cube LUT. - */ - parse(input: string): { - title: string; - size: number; - domainMin: Vector3; - domainMax: Vector3; - texture3D: Data3DTexture; - }; -} -import { Loader } from 'three'; -import { Vector3 } from 'three'; -import { Data3DTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/LUTImageLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/LUTImageLoader.d.ts deleted file mode 100644 index 82ad5b541..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/LUTImageLoader.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * A loader for loading LUT images. - * - * ```js - * const loader = new LUTImageLoader(); - * const map = loader.loadAsync( 'luts/NeutralLUT.png' ); - * ``` - * - * @augments Loader - * @three_import import { LUTImageLoader } from 'three/addons/loaders/LUTImageLoader.js'; - */ -export class LUTImageLoader extends Loader { - /** - * Constructs a new LUT loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Whether to vertically flip the LUT or not. - * - * Depending on the LUT's origin, the texture has green at the bottom (e.g. for Unreal) - * or green at the top (e.g. for Unity URP Color Lookup). If you're using lut image strips - * from a Unity pipeline, then set this property to `true`. - * - * @type {boolean} - * @default false - */ - flip: boolean; - /** - * Starts loading from the given URL and passes the loaded LUT - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function({size:number,texture3D:Data3DTexture})} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: { - size: number; - texture3D: Data3DTexture; - }) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given LUT data and returns the resulting 3D data texture. - * - * @param {Uint8ClampedArray} dataArray - The raw LUT data. - * @param {number} size - The LUT size. - * @return {{size:number,texture3D:Data3DTexture}} An object representing the parsed LUT. - */ - parse(dataArray: Uint8ClampedArray, size: number): { - size: number; - texture3D: Data3DTexture; - }; - _getImageData(texture: any): ImageData; - _horz2Vert(texture: any): ImageData; -} -import { Loader } from 'three'; -import { Data3DTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/LWOLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/LWOLoader.d.ts deleted file mode 100644 index 3472d102c..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/LWOLoader.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * A loader for the LWO format. - * - * LWO3 and LWO2 formats are supported. - * - * References: - * - [LWO3 format specification](https://static.lightwave3d.com/sdk/2019/html/filefmts/lwo3.html) - * - [LWO2 format specification](https://static.lightwave3d.com/sdk/2019/html/filefmts/lwo2.html) - * - * ```js - * const loader = new LWOLoader(); - * const lwoData = await loader.loadAsync( 'models/lwo/Objects/LWO3/Demo.lwo' ); - * - * const mesh = object.meshes[ 0 ]; - * scene.add( mesh ); - * ``` - * - * @augments Loader - * @three_import import { LWOLoader } from 'three/addons/loaders/LWOLoader.js'; - */ -export class LWOLoader extends Loader { - /** - * Constructs a new LWO loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Starts loading from the given URL and passes the loaded LWO asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function({meshes:Array,materials:Array})} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: { - meshes: Array; - materials: Array; - }) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given LWO data and returns the resulting meshes and materials. - * - * @param {ArrayBuffer} iffBuffer - The raw LWO data as an array buffer. - * @param {string} path - The URL base path. - * @param {string} modelName - The model name. - * @return {{meshes:Array,materials:Array}} An object holding the parse meshes and materials. - */ - parse(iffBuffer: ArrayBuffer, path: string, modelName: string): { - meshes: Array; - materials: Array; - }; -} -import { Loader } from 'three'; -import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/LottieLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/LottieLoader.d.ts deleted file mode 100644 index 1623ea87b..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/LottieLoader.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * A loader for the Lottie texture animation format. - * - * The loader returns an instance of {@link CanvasTexture} to represent - * the animated texture. Two additional properties are added to each texture: - * - `animation`: The return value of `lottie.loadAnimation()` which is an object - * with an API for controlling the animation's playback. - * - `image`: The image container. - * - * ```js - * const loader = new LottieLoader(); - * loader.setQuality( 2 ); - * const texture = await loader.loadAsync( 'textures/lottie/24017-lottie-logo-animation.json' ); - * - * const geometry = new THREE.BoxGeometry(); - * const material = new THREE.MeshBasicMaterial( { map: texture } ); - * const mesh = new THREE.Mesh( geometry, material ); - * scene.add( mesh ); - * ``` - * - * @augments Loader - * @three_import import { LottieLoader } from 'three/addons/loaders/LottieLoader.js'; - */ -export class LottieLoader extends Loader { - /** - * Constructs a new Lottie loader. - * - * @deprecated The loader has been deprecated and will be removed with r186. Use lottie-web instead and create your animated texture manually. - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Sets the texture quality. - * - * @param {number} value - The texture quality. - */ - setQuality(value: number): void; - _quality: number | undefined; - /** - * Starts loading from the given URL and passes the loaded Lottie asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(CanvasTexture)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - * @returns {CanvasTexture} The Lottie texture. - */ - load(url: string, onLoad: (arg0: CanvasTexture) => any, onProgress: onProgressCallback, onError: onErrorCallback): CanvasTexture; -} -import { Loader } from 'three'; -import { CanvasTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/MD2Loader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/MD2Loader.d.ts deleted file mode 100644 index 8a30bffd1..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/MD2Loader.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * A loader for the MD2 format. - * - * The loader represents the animations of the MD2 asset as an array of animation - * clips and stores them in the `animations` property of the geometry. - * - * ```js - * const loader = new MD2Loader(); - * const geometry = await loader.loadAsync( './models/md2/ogro/ogro.md2' ); - * - * const animations = geometry.animations; - * ``` - * - * @augments Loader - * @three_import import { MD2Loader } from 'three/addons/loaders/MD2Loader.js'; - */ -export class MD2Loader extends Loader { - /** - * Constructs a new MD2 loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Starts loading from the given URL and passes the loaded MD2 asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(BufferGeometry)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} [onProgress] - Executed while the loading is in progress. - * @param {onErrorCallback} [onError] - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: BufferGeometry) => any, onProgress?: onProgressCallback, onError?: onErrorCallback): void; - /** - * Parses the given MD2 data and returns a geometry. - * - * @param {ArrayBuffer} buffer - The raw MD2 data as an array buffer. - * @return {BufferGeometry} The parsed geometry data. - */ - parse(buffer: ArrayBuffer): BufferGeometry; -} -import { Loader } from 'three'; -import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/MDDLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/MDDLoader.d.ts deleted file mode 100644 index 428e8f4ad..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/MDDLoader.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -/** - * A loader for the MDD format. - * - * MDD stores a position for every vertex in a model for every frame in an animation. - * Similar to BVH, it can be used to transfer animation data between different 3D applications or engines. - * - * MDD stores its data in binary format (big endian) in the following way: - * - * - number of frames (a single uint32) - * - number of vertices (a single uint32) - * - time values for each frame (sequence of float32) - * - vertex data for each frame (sequence of float32) - * - * ```js - * const loader = new MDDLoader(); - * const result = await loader.loadAsync( 'models/mdd/cube.mdd' ); - * - * const morphTargets = result.morphTargets; - * const clip = result.clip; - * // clip.optimize(); // optional - * - * const geometry = new THREE.BoxGeometry(); - * geometry.morphAttributes.position = morphTargets; // apply morph targets (vertex data must match) - * - * const material = new THREE.MeshBasicMaterial(); - * - * const mesh = new THREE.Mesh( geometry, material ); - * scene.add( mesh ); - * - * const mixer = new THREE.AnimationMixer( mesh ); - * mixer.clipAction( clip ).play(); - * ``` - * - * @augments Loader - * @three_import import { MDDLoader } from 'three/addons/loaders/MDDLoader.js'; - */ -export class MDDLoader extends Loader { - /** - * Constructs a new MDD loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Starts loading from the given URL and passes the loaded MDD asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function({clip:AnimationClip, morphTargets:Array})} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: { - clip: AnimationClip; - morphTargets: Array; - }) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given MDD data and returns an object holding the animation clip and the respective - * morph targets. - * - * @param {ArrayBuffer} data - The raw XYZ data as an array buffer. - * @return {{clip:AnimationClip, morphTargets:Array}} The result object. - */ - parse(data: ArrayBuffer): { - clip: AnimationClip; - morphTargets: Array; - }; -} -import { Loader } from 'three'; -import { AnimationClip } from 'three'; -import { BufferAttribute } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/MTLLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/MTLLoader.d.ts deleted file mode 100644 index c4443bb17..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/MTLLoader.d.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * ~MaterialOptions - */ -export type MTLLoader = { - /** - * - Which side to apply the material. - */ - side?: (number | BackSide | DoubleSide); - /** - * - What type of wrapping to apply for textures. - */ - wrap?: (number | ClampToEdgeWrapping | MirroredRepeatWrapping); - /** - * - Whether RGB colors should be normalized to `0-1` from `0-255`. - */ - normalizeRGB?: boolean | undefined; - /** - * - Ignore values of RGBs (Ka,Kd,Ks) that are all 0's. - */ - ignoreZeroRGBs?: boolean | undefined; -}; -/** - * A loader for the MTL format. - * - * The Material Template Library format (MTL) or .MTL File Format is a companion file format - * to OBJ that describes surface shading (material) properties of objects within one or more - * OBJ files. - * - * ```js - * const loader = new MTLLoader(); - * const materials = await loader.loadAsync( 'models/obj/male02/male02.mtl' ); - * - * const objLoader = new OBJLoader(); - * objLoader.setMaterials( materials ); - * ``` - * - * @augments Loader - * @three_import import { MTLLoader } from 'three/addons/loaders/MTLLoader.js'; - */ -export class MTLLoader extends Loader { - constructor(manager: any); - /** - * Starts loading from the given URL and passes the loaded MTL asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(MaterialCreator)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: MaterialCreator) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Sets the material options. - * - * @param {MTLLoader~MaterialOptions} value - The material options. - * @return {MTLLoader} A reference to this loader. - */ - setMaterialOptions(value: any): MTLLoader; - materialOptions: any; - /** - * Parses the given MTL data and returns the resulting material creator. - * - * @param {string} text - The raw MTL data as a string. - * @param {string} path - The URL base path. - * @return {MaterialCreator} The material creator. - */ - parse(text: string, path: string): MaterialCreator; -} -import { Loader } from 'three'; -/** - * Material options of `MTLLoader`. - * - * @typedef {Object} MTLLoader~MaterialOptions - * @property {(FrontSide|BackSide|DoubleSide)} [side=FrontSide] - Which side to apply the material. - * @property {(RepeatWrapping|ClampToEdgeWrapping|MirroredRepeatWrapping)} [wrap=RepeatWrapping] - What type of wrapping to apply for textures. - * @property {boolean} [normalizeRGB=false] - Whether RGB colors should be normalized to `0-1` from `0-255`. - * @property {boolean} [ignoreZeroRGBs=false] - Ignore values of RGBs (Ka,Kd,Ks) that are all 0's. - */ -declare class MaterialCreator { - constructor(baseUrl?: string, options?: {}); - baseUrl: string; - options: {}; - materialsInfo: {}; - materials: {}; - materialsArray: any[]; - nameLookup: {}; - crossOrigin: string; - side: any; - wrap: any; - setCrossOrigin(value: any): this; - setManager(value: any): void; - manager: any; - setMaterials(materialsInfo: any): void; - convert(materialsInfo: any): any; - preload(): void; - getIndex(materialName: any): any; - getAsArray(): any[]; - create(materialName: any): any; - createMaterial_(materialName: any): any; - getTextureParams(value: any, matParams: any): { - scale: Vector2; - offset: Vector2; - }; - loadTexture(url: any, mapping: any, onLoad: any, onProgress: any, onError: any): any; -} -import { Vector2 } from 'three'; -export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/MaterialXLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/MaterialXLoader.d.ts deleted file mode 100644 index 45daaea85..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/MaterialXLoader.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * A loader for the MaterialX format. - * - * The node materials loaded with this loader can only be used with {@link WebGPURenderer}. - * - * ```js - * const loader = new MaterialXLoader().setPath( SAMPLE_PATH ); - * const materials = await loader.loadAsync( 'standard_surface_brass_tiled.mtlx' ); - * ``` - * - * @augments Loader - * @three_import import { MaterialXLoader } from 'three/addons/loaders/MaterialXLoader.js'; - */ -export class MaterialXLoader extends Loader { - /** - * Constructs a new MaterialX loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Starts loading from the given URL and passes the loaded MaterialX asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Object)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - * @return {MaterialXLoader} A reference to this loader. - */ - load(url: string, onLoad: (arg0: { - [x: string]: NodeMaterial; - }) => any, onProgress: onProgressCallback, onError: onErrorCallback): MaterialXLoader; - /** - * Parses the given MaterialX data and returns the resulting materials. - * - * Supported standard_surface inputs: - * - base, base_color: Base color/albedo - * - opacity: Alpha/transparency - * - specular_roughness: Surface roughness - * - metalness: Metallic property - * - specular: Specular reflection intensity - * - specular_color: Specular reflection color - * - ior: Index of refraction - * - specular_anisotropy, specular_rotation: Anisotropic reflection - * - transmission, transmission_color: Transmission properties - * - thin_film_thickness, thin_film_ior: Thin film interference - * - sheen, sheen_color, sheen_roughness: Sheen properties - * - normal: Normal map - * - coat, coat_roughness, coat_color: Clearcoat properties - * - emission, emissionColor: Emission properties - * - * @param {string} text - The raw MaterialX data as a string. - * @return {Object} A dictionary holding the parse node materials. - */ - parse(text: string): { - [x: string]: NodeMaterial; - }; -} -import { Loader } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/NRRDLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/NRRDLoader.d.ts deleted file mode 100644 index 1ffe169c3..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/NRRDLoader.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * A loader for the NRRD format. - * - * ```js - * const loader = new NRRDLoader(); - * const volume = await loader.loadAsync( 'models/nrrd/I.nrrd' ); - * ``` - * - * @augments Loader - * @three_import import { NRRDLoader } from 'three/addons/loaders/NRRDLoader.js'; - */ -export class NRRDLoader extends Loader { - /** - * Constructs a new NRRD loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Starts loading from the given URL and passes the loaded NRRD asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Volume)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: Volume) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Toggles the segmentation mode. - * - * @param {boolean} segmentation - Whether to use segmentation mode or not. - */ - setSegmentation(segmentation: boolean): void; - segmentation: boolean | undefined; - /** - * Parses the given NRRD data and returns the resulting volume data. - * - * @param {ArrayBuffer} data - The raw NRRD data as an array buffer. - * @return {Volume} The parsed volume. - */ - parse(data: ArrayBuffer): Volume; - _parseChars(array: any, start: any, end: any): string; -} -import { Loader } from 'three'; -import { Volume } from '../misc/Volume.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/OBJLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/OBJLoader.d.ts deleted file mode 100644 index b35f787d0..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/OBJLoader.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * A loader for the OBJ format. - * - * The [OBJ format](https://en.wikipedia.org/wiki/Wavefront_.obj_file) is a simple data-format that - * represents 3D geometry in a human readable format as the position of each vertex, the UV position of - * each texture coordinate vertex, vertex normals, and the faces that make each polygon defined as a list - * of vertices, and texture vertices. - * - * ```js - * const loader = new OBJLoader(); - * const object = await loader.loadAsync( 'models/monster.obj' ); - * scene.add( object ); - * ``` - * - * @augments Loader - * @three_import import { OBJLoader } from 'three/addons/loaders/OBJLoader.js'; - */ -export class OBJLoader extends Loader { - /** - * Constructs a new OBJ loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * A reference to a material creator. - * - * @type {?MaterialCreator} - * @default null - */ - materials: MaterialCreator | null; - /** - * Starts loading from the given URL and passes the loaded OBJ asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Group)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: Group) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Sets the material creator for this OBJ. This object is loaded via {@link MTLLoader}. - * - * @param {MaterialCreator} materials - An object that creates the materials for this OBJ. - * @return {OBJLoader} A reference to this loader. - */ - setMaterials(materials: MaterialCreator): OBJLoader; - /** - * Parses the given OBJ data and returns the resulting group. - * - * @param {string} text - The raw OBJ data as a string. - * @return {Group} The parsed OBJ. - */ - parse(text: string): Group; -} -import { Loader } from 'three'; -import { Group } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/PCDLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/PCDLoader.d.ts deleted file mode 100644 index e11b512de..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/PCDLoader.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -/** - * A loader for the Point Cloud Data (PCD) format. - * - * PCDLoader supports ASCII and (compressed) binary files as well as the following PCD fields: - * - x y z - * - rgb - * - normal_x normal_y normal_z - * - intensity - * - label - * - * ```js - * const loader = new PCDLoader(); - * - * const points = await loader.loadAsync( './models/pcd/binary/Zaghetto.pcd' ); - * points.geometry.center(); // optional - * points.geometry.rotateX( Math.PI ); // optional - * scene.add( points ); - * ``` - * - * @augments Loader - * @three_import import { PCDLoader } from 'three/addons/loaders/PCDLoader.js'; - */ -export class PCDLoader extends Loader { - /** - * Constructs a new PCD loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Whether to use little Endian or not. - * - * @type {boolean} - * @default true - */ - littleEndian: boolean; - /** - * Starts loading from the given URL and passes the loaded PCD asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Points)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: Points) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Get dataview value by field type and size. - * - * @private - * @param {DataView} dataview - The DataView to read from. - * @param {number} offset - The offset to start reading from. - * @param {'F' | 'U' | 'I'} type - Field type. - * @param {number} size - Field size. - * @returns {number} Field value. - */ - private _getDataView; - /** - * Parses the given PCD data and returns a point cloud. - * - * @param {ArrayBuffer} data - The raw PCD data as an array buffer. - * @return {Points} The parsed point cloud. - */ - parse(data: ArrayBuffer): Points; -} -import { Loader } from 'three'; -import { Points } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/PDBLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/PDBLoader.d.ts deleted file mode 100644 index 9502d6e8e..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/PDBLoader.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * A loader for the PDB format. - * - * The [Protein Data Bank](https://en.wikipedia.org/wiki/Protein_Data_Bank_(file_format)) - * file format is a textual file describing the three-dimensional structures of molecules. - * - * ```js - * const loader = new PDBLoader(); - * const pdb = await loader.loadAsync( 'models/pdb/ethanol.pdb' ); - * - * const geometryAtoms = pdb.geometryAtoms; - * const geometryBonds = pdb.geometryBonds; - * const json = pdb.json; - * ``` - * - * @augments Loader - * @three_import import { PDBLoader } from 'three/addons/loaders/PDBLoader.js'; - */ -export class PDBLoader extends Loader { - /** - * Constructs a new PDB loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Starts loading from the given URL and passes the loaded PDB asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Object)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: Object) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given PDB data and returns an object holding the atoms and - * bond geometries as well as the raw atom data as JSON. - * - * @param {string} text - The raw PDB data as a string. - * @return {Object} The result object. - */ - parse(text: string): Object; -} -import { Loader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/PLYLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/PLYLoader.d.ts deleted file mode 100644 index c03afd50c..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/PLYLoader.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * A loader for PLY the PLY format (known as the Polygon - * File Format or the Stanford Triangle Format). - * - * Limitations: - * - ASCII decoding assumes file is UTF-8. - * - * ```js - * const loader = new PLYLoader(); - * const geometry = await loader.loadAsync( './models/ply/ascii/dolphins.ply' ); - * scene.add( new THREE.Mesh( geometry ) ); - * ``` - * - * @augments Loader - * @three_import import { PLYLoader } from 'three/addons/loaders/PLYLoader.js'; - */ -export class PLYLoader extends Loader { - /** - * Constructs a new PLY loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - propertyNameMapping: {}; - customPropertyMapping: {}; - /** - * Starts loading from the given URL and passes the loaded PLY asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(BufferGeometry)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: BufferGeometry) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Sets a property name mapping that maps default property names - * to custom ones. For example, the following maps the properties - * “diffuse_(red|green|blue)” in the file to standard color names. - * - * ```js - * loader.setPropertyNameMapping( { - * diffuse_red: 'red', - * diffuse_green: 'green', - * diffuse_blue: 'blue' - * } ); - * ``` - * - * @param {Object} mapping - The mapping dictionary. - */ - setPropertyNameMapping(mapping: Object): void; - /** - * Custom properties outside of the defaults for position, uv, normal - * and color attributes can be added using the setCustomPropertyNameMapping method. - * For example, the following maps the element properties “custom_property_a” - * and “custom_property_b” to an attribute “customAttribute” with an item size of 2. - * Attribute item sizes are set from the number of element properties in the property array. - * - * ```js - * loader.setCustomPropertyNameMapping( { - * customAttribute: ['custom_property_a', 'custom_property_b'], - * } ); - * ``` - * @param {Object} mapping - The mapping dictionary. - */ - setCustomPropertyNameMapping(mapping: Object): void; - /** - * Parses the given PLY data and returns the resulting geometry. - * - * @param {ArrayBuffer} data - The raw PLY data as an array buffer. - * @return {BufferGeometry} The parsed geometry. - */ - parse(data: ArrayBuffer): BufferGeometry; -} -import { Loader } from 'three'; -import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/PVRLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/PVRLoader.d.ts deleted file mode 100644 index e8f73618d..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/PVRLoader.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * A loader for the PVRTC texture compression format. - * - * ```js - * const loader = new PVRLoader(); - * - * const map = loader.load( 'textures/compressed/disturb_4bpp_rgb.pvr' ); - * map.colorSpace = THREE.SRGBColorSpace; // only for color textures - * ``` - * - * @augments CompressedTextureLoader - * @three_import import { PVRLoader } from 'three/addons/loaders/PVRLoader.js'; - */ -export class PVRLoader extends CompressedTextureLoader { - /** - * Constructs a new PVR loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Parses the given PVRTC texture data. - * - * @param {ArrayBuffer} buffer - The raw texture data. - * @param {boolean} loadMipmaps - Whether to load mipmaps or not. This option is not yet supported by the loader. - * @return {CompressedTextureLoader~TexData} An object representing the parsed texture data. - */ - parse(buffer: ArrayBuffer, loadMipmaps: boolean): CompressedTextureLoader; -} -import { CompressedTextureLoader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/RGBELoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/RGBELoader.d.ts deleted file mode 100644 index 692cc5d8e..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/RGBELoader.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export class RGBELoader extends HDRLoader { -} -import { HDRLoader } from './HDRLoader.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/STLLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/STLLoader.d.ts deleted file mode 100644 index aae8f96aa..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/STLLoader.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -/** - * A loader for the STL format, as created by Solidworks and other CAD programs. - * - * Supports both binary and ASCII encoded files. The loader returns a non-indexed buffer geometry. - * - * Limitations: - * - Binary decoding supports "Magics" color format (http://en.wikipedia.org/wiki/STL_(file_format)#Color_in_binary_STL). - * - There is perhaps some question as to how valid it is to always assume little-endian-ness. - * - ASCII decoding assumes file is UTF-8. - * - * ```js - * const loader = new STLLoader(); - * const geometry = await loader.loadAsync( './models/stl/slotted_disk.stl' ) - * scene.add( new THREE.Mesh( geometry ) ); - * ``` - * For binary STLs geometry might contain colors for vertices. To use it: - * ```js - * // use the same code to load STL as above - * if ( geometry.hasColors ) { - * material = new THREE.MeshPhongMaterial( { opacity: geometry.alpha, vertexColors: true } ); - * } - * const mesh = new THREE.Mesh( geometry, material ); - * ``` - * For ASCII STLs containing multiple solids, each solid is assigned to a different group. - * Groups can be used to assign a different color by defining an array of materials with the same length of - * geometry.groups and passing it to the Mesh constructor: - * - * ```js - * const materials = []; - * const nGeometryGroups = geometry.groups.length; - * - * for ( let i = 0; i < nGeometryGroups; i ++ ) { - * const material = new THREE.MeshPhongMaterial( { color: colorMap[ i ], wireframe: false } ); - * materials.push( material ); - * } - * - * const mesh = new THREE.Mesh(geometry, materials); - * ``` - * - * @augments Loader - * @three_import import { STLLoader } from 'three/addons/loaders/STLLoader.js'; - */ -export class STLLoader extends Loader { - /** - * Constructs a new STL loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Starts loading from the given URL and passes the loaded STL asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(BufferGeometry)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: BufferGeometry) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given STL data and returns the resulting geometry. - * - * @param {ArrayBuffer} data - The raw STL data as an array buffer. - * @return {BufferGeometry} The parsed geometry. - */ - parse(data: ArrayBuffer): BufferGeometry; -} -import { Loader } from 'three'; -import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/SVGLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/SVGLoader.d.ts deleted file mode 100644 index b11481bc5..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/SVGLoader.d.ts +++ /dev/null @@ -1,150 +0,0 @@ -/** - * A loader for the SVG format. - * - * Scalable Vector Graphics is an XML-based vector image format for two-dimensional graphics - * with support for interactivity and animation. - * - * ```js - * const loader = new SVGLoader(); - * const data = await loader.loadAsync( 'data/svgSample.svg' ); - * - * const paths = data.paths; - * const group = new THREE.Group(); - * - * for ( let i = 0; i < paths.length; i ++ ) { - * - * const path = paths[ i ]; - * const material = new THREE.MeshBasicMaterial( { - * color: path.color, - * side: THREE.DoubleSide, - * depthWrite: false - * } ); - * - * const shapes = SVGLoader.createShapes( path ); - * - * for ( let j = 0; j < shapes.length; j ++ ) { - * - * const shape = shapes[ j ]; - * const geometry = new THREE.ShapeGeometry( shape ); - * const mesh = new THREE.Mesh( geometry, material ); - * group.add( mesh ); - * - * } - * - * } - * - * scene.add( group ); - * ``` - * - * @augments Loader - * @three_import import { SVGLoader } from 'three/addons/loaders/SVGLoader.js'; - */ -export class SVGLoader extends Loader { - /** - * Creates a material for rendering the fill of the given path. - * - * @param {ShapePath} shapePath - The shape path. - * @return {?MeshBasicMaterial} The fill material. `null` if the path has no fill. - */ - static createFillMaterial(shapePath: ShapePath): MeshBasicMaterial | null; - /** - * Creates a material for rendering the stroke of the given path. - * - * @param {ShapePath} shapePath - The shape path. - * @return {?MeshBasicMaterial} The stroke material. `null` if the path has no stroke. - */ - static createStrokeMaterial(shapePath: ShapePath): MeshBasicMaterial | null; - /** - * Creates from the given shape path and array of shapes. - * - * @deprecated since 185. - * @param {ShapePath} shapePath - The shape path. - * @return {Array} An array of shapes. - */ - static createShapes(shapePath: ShapePath): Array; - /** - * Returns a stroke style object from the given parameters. - * - * @param {number} [width=1] - The stroke width. - * @param {string} [color='#000'] - The stroke color, as returned by {@link Color#getStyle}. - * @param {'round'|'bevel'|'miter'|'miter-limit'} [lineJoin='miter'] - The line join style. - * @param {'round'|'square'|'butt'} [lineCap='butt'] - The line cap style. - * @param {number} [miterLimit=4] - Maximum join length, in multiples of the `width` parameter (join is truncated if it exceeds that distance). - * @return {Object} The style object. - */ - static getStrokeStyle(width?: number, color?: string, lineJoin?: "round" | "bevel" | "miter" | "miter-limit", lineCap?: "round" | "square" | "butt", miterLimit?: number): Object; - /** - * Creates a stroke from an array of points. - * - * @param {Array} points - The points in 2D space. Minimum 2 points. The path can be open or closed (last point equals to first point). - * @param {Object} style - Object with SVG properties as returned by `SVGLoader.getStrokeStyle()`, or `SVGLoader.parse()` in the `path.userData.style` object. - * @param {number} [arcDivisions=12] - Arc divisions for round joins and endcaps. - * @param {number} [minDistance=0.001] - Points closer to this distance will be merged. - * @return {?BufferGeometry} The stroke geometry. UV coordinates are generated ('u' along path. 'v' across it, from left to right). - * Returns `null` if not geometry was generated. - */ - static pointsToStroke(points: Array, style: Object, arcDivisions?: number, minDistance?: number): BufferGeometry | null; - /** - * Creates a stroke from an array of points. - * - * @param {Array} points - The points in 2D space. Minimum 2 points. - * @param {Object} style - Object with SVG properties as returned by `SVGLoader.getStrokeStyle()`, or `SVGLoader.parse()` in the `path.userData.style` object. - * @param {number} [arcDivisions=12] - Arc divisions for round joins and endcaps. - * @param {number} [minDistance=0.001] - Points closer to this distance will be merged. - * @param {Array} vertices - An array holding vertices. - * @param {Array} normals - An array holding normals. - * @param {Array} uvs - An array holding uvs. - * @param {number} [vertexOffset=0] - The vertex offset. - * @return {number} The number of vertices. - */ - static pointsToStrokeWithBuffers(points: Array, style: Object, arcDivisions?: number, minDistance?: number, vertices: Array, normals: Array, uvs: Array, vertexOffset?: number): number; - /** - * Constructs a new SVG loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Default dots per inch. - * - * @type {number} - * @default 90 - */ - defaultDPI: number; - /** - * Default unit. - * - * @type {('mm'|'cm'|'in'|'pt'|'pc'|'px')} - * @default 'px' - */ - defaultUnit: ("mm" | "cm" | "in" | "pt" | "pc" | "px"); - /** - * Starts loading from the given URL and passes the loaded SVG asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function({paths:Array,xml:string})} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: { - paths: Array; - xml: string; - }) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given SVG data and returns the resulting data. - * - * @param {string} text - The raw SVG data as a string. - * @return {{paths:Array,xml:string}} An object holding an array of shape paths and the - * SVG XML document. - */ - parse(text: string): { - paths: Array; - xml: string; - }; -} -import { Loader } from 'three'; -import { ShapePath } from 'three'; -import { MeshBasicMaterial } from 'three'; -import { Vector2 } from 'three'; -import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/TDSLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/TDSLoader.d.ts deleted file mode 100644 index 819ba7cd6..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/TDSLoader.d.ts +++ /dev/null @@ -1,141 +0,0 @@ -/** - * A loader for the 3DS format, based on lib3ds. - * - * Loads geometry with uv and materials basic properties with texture support. - * - * ```js - * const loader = new TDSLoader(); - * loader.setResourcePath( 'models/3ds/portalgun/textures/' ); - * const object = await loader.loadAsync( 'models/3ds/portalgun/portalgun.3ds' ); - * scene.add( object ); - * - * @augments Loader - * @three_import import { TDSLoader } from 'three/addons/loaders/TDSLoader.js'; - */ -export class TDSLoader extends Loader { - /** - * Constructs a new 3DS loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Whether debug mode should be enabled or not. - * - * @type {boolean} - * @default false - */ - debug: boolean; - group: Group | null; - materials: any[]; - meshes: any[]; - /** - * Starts loading from the given URL and passes the loaded 3DS asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Group)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: Group) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given 3DS data and returns the resulting data. - * - * @param {ArrayBuffer} arraybuffer - The raw 3DS data as an array buffer. - * @param {string} path - The asset path. - * @return {Group} The parsed asset represented as a group. - */ - parse(arraybuffer: ArrayBuffer, path: string): Group; - /** - * Decode file content to read 3ds data. - * - * @private - * @param {ArrayBuffer} arraybuffer - Arraybuffer data to be loaded. - * @param {string} path - Path for external resources. - */ - private readFile; - /** - * Read mesh data chunk. - * - * @private - * @param {Chunk} chunk - to read mesh from - * @param {string} path - Path for external resources. - */ - private readMeshData; - /** - * Read named object chunk. - * - * @private - * @param {Chunk} chunk - Chunk in use. - */ - private readNamedObject; - /** - * Read material data chunk and add it to the material list. - * - * @private - * @param {Chunk} chunk - Chunk in use. - * @param {string} path - Path for external resources. - */ - private readMaterialEntry; - /** - * Read mesh data chunk. - * - * @private - * @param {Chunk} chunk - Chunk in use. - * @return {Mesh} - The parsed mesh. - */ - private readMesh; - /** - * Read face array data chunk. - * - * @private - * @param {Chunk} chunk - Chunk in use. - * @param {Mesh} mesh - Mesh to be filled with the data read. - */ - private readFaceArray; - /** - * Read texture map data chunk. - * - * @private - * @param {Chunk} chunk - Chunk in use. - * @param {string} path - Path for external resources. - * @return {Texture} Texture read from this data chunk. - */ - private readMap; - /** - * Read material group data chunk. - * - * @private - * @param {Chunk} chunk - Chunk in use. - * @return {Object} Object with name and index of the object. - */ - private readMaterialGroup; - /** - * Read a color value. - * - * @private - * @param {Chunk} chunk - Chunk. - * @return {Color} Color value read. - */ - private readColor; - /** - * Read percentage value. - * - * @private - * @param {Chunk} chunk - Chunk to read data from. - * @return {number} Data read from the dataview. - */ - private readPercentage; - /** - * Print debug message to the console. - * - * Is controlled by a flag to show or hide debug messages. - * - * @private - * @param {Object} message - Debug message to print to the console. - */ - private debugMessage; -} -import { Loader } from 'three'; -import { Group } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/TGALoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/TGALoader.d.ts deleted file mode 100644 index 56f74907c..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/TGALoader.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * A loader for the TGA texture format. - * - * ```js - * const loader = new TGALoader(); - * const texture = await loader.loadAsync( 'textures/crate_color8.tga' ); - * texture.colorSpace = THREE.SRGBColorSpace; // only for color textures - * ``` - * - * @augments DataTextureLoader - * @three_import import { TGALoader } from 'three/addons/loaders/TGALoader.js'; - */ -export class TGALoader extends DataTextureLoader { - /** - * Constructs a new TGA loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Parses the given TGA texture data. - * - * @param {ArrayBuffer} buffer - The raw texture data. - * @return {DataTextureLoader~TexData} An object representing the parsed texture data. - */ - parse(buffer: ArrayBuffer): DataTextureLoader; -} -import { DataTextureLoader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/TIFFLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/TIFFLoader.d.ts deleted file mode 100644 index 3291f03ea..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/TIFFLoader.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * A loader for the TIFF texture format. - * - * ```js - * const loader = new TIFFLoader(); - * const texture = await loader.loadAsync( 'textures/tiff/crate_lzw.tif' ); - * texture.colorSpace = THREE.SRGBColorSpace; - * ``` - * - * @augments DataTextureLoader - * @three_import import { TIFFLoader } from 'three/addons/loaders/TIFFLoader.js'; - */ -export class TIFFLoader extends DataTextureLoader { - /** - * Constructs a new TIFF loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Parses the given TIFF texture data. - * - * @param {ArrayBuffer} buffer - The raw texture data. - * @return {DataTextureLoader~TexData} An object representing the parsed texture data. - */ - parse(buffer: ArrayBuffer): DataTextureLoader; -} -import { DataTextureLoader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/TTFLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/TTFLoader.d.ts deleted file mode 100644 index a9a9483c9..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/TTFLoader.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * A loader for the TTF format. - * - * Loads TTF files and converts them into typeface JSON that can be used directly - * to create THREE.Font objects. - * - * ```js - * const loader = new TTFLoader(); - * const json = await loader.loadAsync( 'fonts/ttf/kenpixel.ttf' ); - * const font = new Font( json ); - * ``` - * - * @augments Loader - * @three_import import { TTFLoader } from 'three/addons/loaders/TTFLoader.js'; - */ -export class TTFLoader extends Loader { - /** - * Constructs a new TTF loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Whether the TTF commands should be reversed or not. - * - * @type {boolean} - * @default false - */ - reversed: boolean; - /** - * Starts loading from the given URL and passes the loaded TTF asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Object)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: Object) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given TTF data and returns a JSON for creating a font. - * - * @param {ArrayBuffer} arraybuffer - The raw TTF data as an array buffer. - * @return {Object} The result JSON. - */ - parse(arraybuffer: ArrayBuffer): Object; -} -import { Loader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/USDLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/USDLoader.d.ts deleted file mode 100644 index 247a6b36a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/USDLoader.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * A loader for the USD format (USD, USDA, USDC, USDZ). - * - * Supports both ASCII (USDA) and binary (USDC) USD files, as well as - * USDZ archives containing either format. - * - * ```js - * const loader = new USDLoader(); - * const model = await loader.loadAsync( 'model.usdz' ); - * scene.add( model ); - * ``` - * - * @augments Loader - * @three_import import { USDLoader } from 'three/addons/loaders/USDLoader.js'; - */ -export class USDLoader extends Loader { - /** - * Constructs a new USDZ loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Starts loading from the given URL and passes the loaded USDZ asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Group)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: Group) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given USDZ data and returns the resulting group. - * - * The returned group is created synchronously, but any referenced textures - * are loaded asynchronously. Provide `onLoad` to be notified once all - * textures have finished loading. - * - * @param {ArrayBuffer|string} buffer - The raw USDZ data as an array buffer. - * @param {string} [path=''] - The URL base path. - * @param {function(Group)} [onLoad] - Executed once the group and all of its textures are ready. - * @param {onErrorCallback} [onError] - Executed when errors occur. - * @return {Group} The parsed asset as a group. - */ - parse(buffer: ArrayBuffer | string, path?: string, onLoad?: (arg0: Group) => any, onError?: onErrorCallback): Group; -} -import { Loader } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/USDZLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/USDZLoader.d.ts deleted file mode 100644 index 843c08a50..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/USDZLoader.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export class USDZLoader extends USDLoader { -} -import { USDLoader } from './USDLoader.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/UltraHDRLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/UltraHDRLoader.d.ts deleted file mode 100644 index 91c2888d6..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/UltraHDRLoader.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/** - * A loader for the Ultra HDR Image Format. - * - * Existing HDR or EXR textures can be converted to Ultra HDR with this [tool](https://gainmap-creator.monogrid.com/). - * - * Current feature set: - * - JPEG headers (required) - * - XMP metadata (legacy format, supported) - * - ISO 21496-1 metadata (current standard, supported) - * - XMP validation (not implemented) - * - EXIF profile (not implemented) - * - ICC profile (not implemented) - * - Binary storage for SDR & HDR images (required) - * - Gainmap metadata (required) - * - Non-JPEG image formats (not implemented) - * - Primary image as an HDR image (not implemented) - * - * ```js - * const loader = new UltraHDRLoader(); - * const texture = await loader.loadAsync( 'textures/equirectangular/ice_planet_close.jpg' ); - * texture.mapping = THREE.EquirectangularReflectionMapping; - * - * scene.background = texture; - * scene.environment = texture; - * ``` - * - * @augments Loader - * @three_import import { UltraHDRLoader } from 'three/addons/loaders/UltraHDRLoader.js'; - */ -export class UltraHDRLoader extends Loader { - /** - * Constructs a new Ultra HDR loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * The texture type. - * - * @type {(HalfFloatType|FloatType)} - * @default HalfFloatType - */ - type: (number | FloatType); - /** - * Sets the texture type. - * - * @param {(HalfFloatType|FloatType)} value - The texture type to set. - * @return {UltraHDRLoader} A reference to this loader. - */ - setDataType(value: (number | FloatType)): UltraHDRLoader; - /** - * Parses the given Ultra HDR texture data. - * - * @param {ArrayBuffer} buffer - The raw texture data. - * @param {Function} onLoad - The `onLoad` callback. - */ - parse(buffer: ArrayBuffer, onLoad: Function): void; - /** - * Parses ISO 21496-1 gainmap metadata from binary data. - * - * @private - * @param {Uint8Array} data - The binary ISO metadata. - * @param {Object} metadata - The metadata object to populate. - */ - private _parseISOMetadata; - /** - * Starts loading from the given URL and passes the loaded Ultra HDR texture - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the files to be loaded. This can also be a data URI. - * @param {function(DataTexture, Object)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - * @return {DataTexture} The Ultra HDR texture. - */ - load(url: string, onLoad: (arg0: DataTexture, arg1: Object) => any, onProgress: onProgressCallback, onError: onErrorCallback): DataTexture; - _parseXMPMetadata(xmpDataString: any, metadata: any): void; - _srgbToLinear(value: any): number; - _applyGainmapToSDR(metadata: any, sdrBuffer: any, gainmapBuffer: any, onSuccess: any, onError: any): void; -} -import { Loader } from 'three'; -import { DataTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/VOXLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/VOXLoader.d.ts deleted file mode 100644 index 4db620acb..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/VOXLoader.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * A loader for the VOX format. - * - * ```js - * const loader = new VOXLoader(); - * const result = await loader.loadAsync( 'models/vox/monu10.vox' ); - * - * scene.add( result.scene.children[ 0 ] ); - * ``` - * @augments Loader - * @three_import import { VOXLoader } from 'three/addons/loaders/VOXLoader.js'; - */ -export class VOXLoader extends Loader { - /** - * Starts loading from the given URL and passes the loaded VOX asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Object)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: Object) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given VOX data and returns the result object. - * - * @param {ArrayBuffer} buffer - The raw VOX data as an array buffer. - * @return {Object} The parsed VOX data with properties: chunks, scene. - */ - parse(buffer: ArrayBuffer): Object; -} -/** - * Builds a mesh from a VOX chunk. - * - * @param {Object} chunk - A VOX chunk loaded via {@link VOXLoader}. - * @return {Mesh} The generated mesh. - */ -export function buildMesh(chunk: Object): Mesh; -/** - * Builds a 3D texture from a VOX chunk. - * - * @param {Object} chunk - A VOX chunk loaded via {@link VOXLoader}. - * @return {Data3DTexture} The generated 3D texture. - */ -export function buildData3DTexture(chunk: Object): Data3DTexture; -export class VOXMesh extends Mesh { - constructor(chunk: any); -} -export class VOXData3DTexture extends Data3DTexture { - constructor(chunk: any); -} -import { Loader } from 'three'; -import { Mesh } from 'three'; -import { Data3DTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/VRMLLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/VRMLLoader.d.ts deleted file mode 100644 index 08d9f2b94..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/VRMLLoader.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * A loader for the VRML format. - * - * ```js - * const loader = new VRMLLoader(); - * const object = await loader.loadAsync( 'models/vrml/house.wrl' ); - * scene.add( object ); - * ``` - * - * @augments Loader - * @three_import import { VRMLLoader } from 'three/addons/loaders/VRMLLoader.js'; - */ -export class VRMLLoader extends Loader { - /** - * Constructs a new VRML loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Starts loading from the given URL and passes the loaded VRML asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Scene)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: Scene) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given VRML data and returns the resulting scene. - * - * @param {string} data - The raw VRML data as a string. - * @param {string} path - The URL base path. - * @return {Scene} The parsed scene. - */ - parse(data: string, path: string): Scene; -} -import { Loader } from 'three'; -import { Scene } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/VTKLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/VTKLoader.d.ts deleted file mode 100644 index daeaecfb0..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/VTKLoader.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * A loader for the VTK format. - * - * This loader only supports the `POLYDATA` dataset format so far. Other formats - * (structured points, structured grid, rectilinear grid, unstructured grid, appended) - * are not supported. - * - * ```js - * const loader = new VTKLoader(); - * const geometry = await loader.loadAsync( 'models/vtk/liver.vtk' ); - * geometry.computeVertexNormals(); - * - * const mesh = new THREE.Mesh( geometry, new THREE.MeshLambertMaterial() ); - * scene.add( mesh ); - * ``` - * - * @augments Loader - * @three_import import { VTKLoader } from 'three/addons/loaders/VTKLoader.js'; - * @deprecated since r184. - */ -export class VTKLoader extends Loader { - /** - * Constructs a new VTK loader. - * - * @param {LoadingManager} [manager] - The loading manager. - * @deprecated since r184. - */ - constructor(manager?: LoadingManager); - /** - * Starts loading from the given URL and passes the loaded VTK asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(BufferGeometry)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: BufferGeometry) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given VTK data and returns the resulting geometry. - * - * @param {ArrayBuffer} data - The raw VTK data as an array buffer - * @return {BufferGeometry} The parsed geometry. - */ - parse(data: ArrayBuffer): BufferGeometry; -} -import { Loader } from 'three'; -import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/XYZLoader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/XYZLoader.d.ts deleted file mode 100644 index e1565591d..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/XYZLoader.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * A loader for the XYZ format. - * - * XYZ is a very simple format for storing point clouds. The layouts - * `XYZ` (points) and `XYZRGB` (points + colors) are supported. - * - * ```js - * const loader = new XYZLoader(); - * const geometry = await loader.loadAsync( 'models/xyz/helix_201.xyz' ); - * geometry.center(); - * - * const vertexColors = ( geometry.hasAttribute( 'color' ) === true ); - * const material = new THREE.PointsMaterial( { size: 0.1, vertexColors: vertexColors } ); - * - * const points = new THREE.Points( geometry, material ); - * scene.add( points ); - * ``` - * - * @augments Loader - * @three_import import { XYZLoader } from 'three/addons/loaders/XYZLoader.js'; - */ -export class XYZLoader extends Loader { - /** - * Starts loading from the given URL and passes the loaded XYZ asset - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(BufferGeometry)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: BufferGeometry) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given XYZ data and returns the resulting geometry. - * - * @param {string} text - The raw XYZ data as a string. - * @return {BufferGeometry} The geometry representing the point cloud. - */ - parse(text: string): BufferGeometry; -} -import { Loader } from 'three'; -import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/collada/ColladaComposer.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/collada/ColladaComposer.d.ts deleted file mode 100644 index 3113bc0a5..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/collada/ColladaComposer.d.ts +++ /dev/null @@ -1,154 +0,0 @@ -/** - * ColladaComposer converts parsed library data into Three.js objects. - */ -export class ColladaComposer { - constructor(library: any, collada: any, textureLoader: any, tgaLoader: any); - library: any; - collada: any; - textureLoader: any; - tgaLoader: any; - tempColor: Color; - animations: any[]; - kinematics: {}; - position: Vector3; - scale: Vector3; - quaternion: Quaternion; - matrix: Matrix4; - deferredPivotAnimations: {}; - transformNodes: {}; - compose(): { - scene: any; - animations: any[]; - kinematics: {}; - }; - buildLibrary(data: any, builder: any): void; - getBuild(data: any, builder: any): any; - isEmpty(object: any): boolean; - buildAnimation(data: any): any[]; - collectDeferredPivotAnimation(nodeId: any, nodeChannels: any): void; - hasPivotTransforms(nodeData: any): boolean; - getAnimation(id: any): any; - aggregateAnimationChannels(channels: any, samplers: any, sources: any): {}; - buildMatrixTracks(object3D: any, channelData: any, nodeData: any, tracks: any): void; - buildTranslateTrack(object3D: any, channelData: any, transformInfo: any, tracks: any): void; - buildRotateTrack(object3D: any, sid: any, channelData: any, transformInfo: any, nodeData: any, tracks: any): void; - buildScaleTrack(object3D: any, channelData: any, transformInfo: any, tracks: any): void; - getTimesForAllAxes(channelData: any): any[]; - getValueAtTime(componentData: any, time: any, defaultValue: any): any; - evaluateBezierComponent(componentData: any, i0: any, i1: any, t0: any, t1: any, time: any): number; - getInterpolationInfo(channelData: any): { - type: any; - uniform: boolean; - }; - applyInterpolation(track: any, interpolationInfo: any, channelData?: null): void; - prepareAnimationData(data: any, defaultMatrix: any): { - time: number; - value: any; - }[]; - createKeyframeTracks(animation: any, tracks: any): any; - transformAnimationData(keyframes: any, property: any, defaultValue: any): void; - createMissingKeyframes(keyframes: any, property: any): void; - getPrev(keyframes: any, i: any, property: any): any; - getNext(keyframes: any, i: any, property: any): any; - interpolate(key: any, prev: any, next: any, property: any): void; - buildAnimationClip(data: any): AnimationClip; - getAnimationClip(id: any): any; - buildController(data: any): { - id: any; - }; - buildSkin(data: any): { - joints: never[]; - indices: { - array: never[]; - stride: number; - }; - weights: { - array: never[]; - stride: number; - }; - }; - getController(id: any): any; - buildImage(data: any): any; - getImage(id: any): any; - buildEffect(data: any): any; - getEffect(id: any): any; - getTextureLoader(image: any): any; - buildMaterial(data: any): MeshBasicMaterial | MeshPhongMaterial | MeshLambertMaterial; - getMaterial(id: any): any; - buildCamera(data: any): PerspectiveCamera | OrthographicCamera; - getCamera(id: any): any; - buildLight(data: any): SpotLight | PointLight | DirectionalLight | AmbientLight | undefined; - getLight(id: any): any; - groupPrimitives(primitives: any): {}; - checkUVCoordinates(primitives: any): void; - buildGeometry(data: any): {}; - buildGeometryType(primitives: any, sources: any, vertices: any): { - data: BufferGeometry; - type: any; - materialKeys: any[]; - }; - buildGeometryData(primitive: any, source: any, offset: any, array: any, isColor?: boolean): void; - getGeometry(id: any): any; - buildKinematicsModel(data: any): any; - getKinematicsModel(id: any): any; - buildKinematicsScene(data: any): any; - getKinematicsScene(id: any): any; - setupKinematics(): void; - buildTransformList(node: any): ({ - sid: any; - type: any; - obj: Matrix4; - angle?: undefined; - } | { - sid: any; - type: any; - obj: Vector3; - angle?: undefined; - } | { - sid: any; - type: any; - obj: Vector3; - angle: number; - })[]; - buildSkeleton(skeletons: any, joints: any): Skeleton; - buildBoneHierarchy(root: any, joints: any, boneData: any): void; - buildNode(data: any): any; - wrapWithTransformHierarchy(contentObject: any, nodeData: any): Group; - resolveMaterialBinding(keys: any, instanceMaterials: any): any[]; - get fallbackMaterial(): MeshBasicMaterial; - _fallbackMaterial: MeshBasicMaterial | undefined; - buildObjects(geometries: any, instanceMaterials: any): (Mesh | SkinnedMesh | Line | undefined)[]; - hasNode(id: any): boolean; - getNode(id: any): any; - buildVisualScene(data: any): Group; - hasVisualScene(id: any): boolean; - getVisualScene(id: any): any; - parseScene(xml: any): any; - parseId(text: any): any; - setupAnimations(): void; - buildDeferredPivotAnimationTracks(tracks: any): void; - buildTransformHierarchyTracks(nodeId: any, nodeChannels: any, nodeData: any, tracks: any): void; - buildHierarchyTranslateTrack(transformNode: any, channelData: any, transformInfo: any, tracks: any): void; - buildHierarchyRotateTrack(transformNode: any, channelData: any, transformInfo: any, tracks: any): void; - buildHierarchyScaleTrack(transformNode: any, channelData: any, transformInfo: any, tracks: any): void; -} -import { Color } from 'three'; -import { Vector3 } from 'three'; -import { Quaternion } from 'three'; -import { Matrix4 } from 'three'; -import { AnimationClip } from 'three'; -import { MeshBasicMaterial } from 'three'; -import { MeshPhongMaterial } from 'three'; -import { MeshLambertMaterial } from 'three'; -import { PerspectiveCamera } from 'three'; -import { OrthographicCamera } from 'three'; -import { SpotLight } from 'three'; -import { PointLight } from 'three'; -import { DirectionalLight } from 'three'; -import { AmbientLight } from 'three'; -import { BufferGeometry } from 'three'; -import { Skeleton } from 'three'; -import { Group } from 'three'; -import { Mesh } from 'three'; -import { SkinnedMesh } from 'three'; -import { Line } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/collada/ColladaParser.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/collada/ColladaParser.d.ts deleted file mode 100644 index fbf3e6e77..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/collada/ColladaParser.d.ts +++ /dev/null @@ -1,234 +0,0 @@ -/** - * ColladaParser handles XML parsing and converts Collada XML to intermediate data structures. - */ -export class ColladaParser { - count: number; - generateId(): string; - parse(text: any): { - library: { - animations: {}; - clips: {}; - controllers: {}; - images: {}; - effects: {}; - materials: {}; - cameras: {}; - lights: {}; - geometries: {}; - nodes: {}; - visualScenes: {}; - kinematicsModels: {}; - physicsModels: {}; - kinematicsScenes: {}; - joints: {}; - }; - asset: { - unit: number; - upAxis: any; - }; - collada: any; - } | null; - library: { - animations: {}; - clips: {}; - controllers: {}; - images: {}; - effects: {}; - materials: {}; - cameras: {}; - lights: {}; - geometries: {}; - nodes: {}; - visualScenes: {}; - kinematicsModels: {}; - physicsModels: {}; - kinematicsScenes: {}; - joints: {}; - } | undefined; - collada: any; - parserErrorToText(parserError: any): string; - parseAsset(xml: any): { - unit: number; - upAxis: any; - }; - parseAssetUnit(xml: any): number; - parseAssetUpAxis(xml: any): any; - parseLibrary(xml: any, libraryName: any, nodeName: any, parser: any): void; - parseAnimation(xml: any): void; - parseAnimationSampler(xml: any): { - inputs: {}; - }; - parseAnimationChannel(xml: any): { - member: any; - indices: any; - id: any; - sid: any; - arraySyntax: boolean; - memberSyntax: boolean; - sampler: any; - }; - parseAnimationClip(xml: any): void; - parseController(xml: any): void; - parseSkin(xml: any): { - sources: {}; - }; - parseJoints(xml: any): { - inputs: {}; - }; - parseVertexWeights(xml: any): { - inputs: {}; - }; - parseImage(xml: any): void; - parseEffect(xml: any): void; - parseEffectProfileCOMMON(xml: any): { - surfaces: {}; - samplers: {}; - }; - parseEffectNewparam(xml: any, data: any): void; - parseEffectSurface(xml: any): { - init_from: any; - }; - parseEffectSampler(xml: any): { - source: any; - }; - parseEffectTechnique(xml: any): { - type: any; - parameters: {}; - extra: { - technique: {}; - }; - }; - parseEffectParameters(xml: any): {}; - parseEffectParameter(xml: any): {}; - parseEffectParameterTexture(xml: any): { - technique: {}; - }; - parseEffectParameterTextureExtra(xml: any, data: any): void; - parseEffectParameterTextureExtraTechnique(xml: any, data: any): void; - parseEffectExtra(xml: any): { - technique: {}; - }; - parseEffectExtraTechnique(xml: any): {}; - parseEffectExtraTechniqueBump(xml: any): {}; - parseMaterial(xml: any): void; - parseCamera(xml: any): void; - parseCameraOptics(xml: any): {}; - parseCameraTechnique(xml: any): { - technique: any; - parameters: {}; - }; - parseCameraParameters(xml: any): {}; - parseLight(xml: any): void; - parseLightTechnique(xml: any): { - technique: any; - parameters: { - color: Color; - falloffAngle: number; - distance: number; - }; - }; - parseLightParameters(xml: any): { - color: Color; - falloffAngle: number; - distance: number; - }; - parseGeometry(xml: any): void; - parseSource(xml: any): { - array: never[]; - stride: number; - }; - parseGeometryVertices(xml: any): {}; - parseGeometryPrimitive(xml: any): { - type: any; - material: any; - count: number; - inputs: {}; - stride: number; - hasUV: boolean; - }; - parseLibraryJoint(xml: any): void; - parseKinematicsModel(xml: any): void; - parseKinematicsTechniqueCommon(xml: any, data: any): void; - parseKinematicsJoint(xml: any): { - sid: any; - name: any; - axis: Vector3; - limits: { - min: number; - max: number; - }; - type: any; - static: boolean; - zeroPosition: number; - middlePosition: number; - } | undefined; - parseKinematicsJointParameter(xml: any): { - sid: any; - name: any; - axis: Vector3; - limits: { - min: number; - max: number; - }; - type: any; - static: boolean; - zeroPosition: number; - middlePosition: number; - }; - parseKinematicsLink(xml: any): { - sid: any; - name: any; - attachments: never[]; - transforms: never[]; - }; - parseKinematicsAttachment(xml: any): { - joint: any; - transforms: never[]; - links: never[]; - }; - parseKinematicsTransform(xml: any): { - type: any; - }; - parsePhysicsModel(xml: any): void; - parsePhysicsRigidBody(xml: any, data: any): void; - parsePhysicsTechniqueCommon(xml: any, data: any): void; - parseKinematicsScene(xml: any): void; - parseKinematicsBindJointAxis(xml: any): { - target: any; - }; - prepareNodes(xml: any): void; - parseNode(xml: any): { - name: any; - type: any; - id: any; - sid: any; - matrix: Matrix4; - nodes: never[]; - instanceCameras: never[]; - instanceControllers: never[]; - instanceLights: never[]; - instanceGeometries: never[]; - instanceNodes: never[]; - transforms: {}; - transformData: {}; - transformOrder: never[]; - }; - parseNodeInstance(xml: any): { - id: any; - materials: {}; - skeletons: never[]; - }; - parseVisualScene(xml: any): void; - hasNode(id: any): boolean; -} -/** - * Utility functions for parsing - */ -export function getElementsByTagName(xml: any, name: any): any[]; -export function parseStrings(text: any): any; -export function parseFloats(text: any): any; -export function parseInts(text: any): any; -export function parseId(text: any): any; -import { Color } from 'three'; -import { Vector3 } from 'three'; -import { Matrix4 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/IFFParser.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/IFFParser.d.ts deleted file mode 100644 index 93747f8df..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/IFFParser.d.ts +++ /dev/null @@ -1,121 +0,0 @@ -export class IFFParser { - debugger: Debugger; - parse(buffer: any): { - materials: {}; - layers: never[]; - tags: never[]; - textures: never[]; - } | undefined; - reader: DataViewReader | undefined; - tree: { - materials: {}; - layers: never[]; - tags: never[]; - textures: never[]; - } | undefined; - currentLayer: { - materials: {}; - layers: never[]; - tags: never[]; - textures: never[]; - } | { - number: number; - flags: number; - pivot: number[]; - name: string | undefined; - } | undefined; - currentForm: any; - parser: LWO2Parser | LWO3Parser | undefined; - parseTopForm(): void; - parseForm(length: any): void; - parentForm: any; - setupForm(type: any, length: any): void; - currentFormEnd: any; - skipForm(length: any): void; - parseUnknownForm(type: any, length: any): void; - parseSurfaceForm(length: any): void; - currentSurface: { - attributes: {}; - connections: {}; - name: string | undefined; - inputName: string | undefined; - nodes: {}; - source: string | undefined; - } | { - attributes: {}; - connections: {}; - name: string | undefined; - nodes: {}; - source: string | undefined; - } | undefined; - parseSurfaceLwo2(length: any): void; - parseSubNode(length: any): void; - currentNode: { - name: string | undefined; - } | undefined; - parseConnections(length: any): void; - parseEntryForm(length: any): void; - parseValueForm(): void; - parseImageStateForm(): void; - parseImageMap(length: any): void; - parseTextureNodeAttribute(type: any): void; - parseEnvelope(length: any): void; - parseClip(length: any): void; - parseClipLwo2(length: any): void; - parseImage(): void; - parseXVAL(type: any, length: any): void; - parseXVAL3(type: any, length: any): void; - parseObjectTag(): void; - parseLayer(length: any): void; - parsePoints(length: any): void; - currentPoints: any[] | undefined; - parseVertexMapping(length: any, discontinuous: any): void; - parseUVMapping(name: any, finalOffset: any, discontinuous: any): void; - parseMorphTargets(name: any, finalOffset: any, type: any): void; - parsePolygonList(length: any): void; - parseTagStrings(length: any): void; - parsePolygonTagMapping(length: any): void; - parseMaterialIndices(finalOffset: any): void; - parseUnknownCHUNK(blockID: any, length: any): void; -} -declare class Debugger { - active: boolean; - depth: number; - formList: any[]; - offset: number; - node: number; - nodeID: string; - dataOffset: number; - length: number; - skipped: boolean; - enable(): void; - log(): void; - closeForms(): void; -} -declare class DataViewReader { - constructor(buffer: any); - dv: DataView; - offset: number; - _textDecoder: TextDecoder; - _bytes: Uint8Array; - size(): any; - setOffset(offset: any): void; - endOfFile(): boolean; - skip(length: any): void; - getUint8(): number; - getUint16(): number; - getInt32(): number; - getUint32(): number; - getUint64(): number; - getFloat32(): number; - getFloat32Array(size: any): number[]; - getFloat64(): number; - getFloat64Array(size: any): number[]; - getVariableLengthIndex(): number; - getIDTag(): string | undefined; - getString(size: any): string | undefined; - getStringArray(size: any): any; -} -import { LWO2Parser } from './LWO2Parser.js'; -import { LWO3Parser } from './LWO3Parser.js'; -export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/LWO2Parser.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/LWO2Parser.d.ts deleted file mode 100644 index dc1f38872..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/LWO2Parser.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export class LWO2Parser { - constructor(IFFParser: any); - IFF: any; - parseBlock(): void; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/LWO3Parser.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/LWO3Parser.d.ts deleted file mode 100644 index e5fbcedbf..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/lwo/LWO3Parser.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export class LWO3Parser { - constructor(IFFParser: any); - IFF: any; - parseBlock(): void; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDAParser.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDAParser.d.ts deleted file mode 100644 index fae9e0192..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDAParser.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -export class USDAParser { - parseText(text: any): {}; - _preprocess(text: any): string; - _stripBlockComments(text: any): string; - _collapseTripleQuotedStrings(text: any): string; - _stripInlineComment(line: any): any; - _findAssignmentOperator(line: any): number; - /** - * Parse USDA text and return raw spec data in specsByPath format. - * Used by USDComposer for unified scene composition. - */ - parseData(text: any): { - specsByPath: { - '/': { - specType: number; - fields: { - upAxis: any; - defaultPrim: any; - metersPerUnit: number; - framesPerSecond: number; - timeCodesPerSecond: number; - }; - }; - }; - }; - _inferSkelElementSize(specsByPath: any): void; - _inferElementSize(attrSpec: any, numVertices: any): void; - _extractPrimData(data: any, path: any, primFields: any, specsByPath: any, SpecType: any): void; - _parseAttributeValue(valueType: any, rawValue: any): any; - _parseString(str: any): string; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDCParser.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDCParser.d.ts deleted file mode 100644 index 546010819..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDCParser.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -export class USDCParser { - /** - * Parse USDC file and return raw spec data without building Three.js scene. - * Used by USDComposer for unified scene composition. - */ - parseData(buffer: any): { - specsByPath: {}; - }; - buffer: any; - reader: BinaryReader | undefined; - version: { - major: number; - minor: number; - patch: number; - } | undefined; - _conversionBuffer: ArrayBuffer | undefined; - _conversionView: DataView | undefined; - specsByPath: {} | undefined; - _readBootstrap(): void; - tocOffset: number | undefined; - _readTOC(): void; - sections: {} | undefined; - _readTokens(): void; - tokens: any[] | undefined; - _readStrings(): void; - strings: any[] | undefined; - _readFields(): void; - fields: any[] | undefined; - _readFieldSets(): void; - fieldSets: any[] | undefined; - _readPaths(): void; - paths: any[] | undefined; - _readPathsRecursive(parentPath: any, depth?: number): void; - _buildPathsFromCompressed(pathIndices: any, elementTokenIndices: any, jumps: any): void; - _readSpecs(): void; - specs: any[] | undefined; - _readValue(valueRep: any): any; - _readInlinedValue(valueRep: any): any; - _readTimeSamples(valueRep: any): { - times: any; - values: any[]; - }; - _readScalarValue(type: any): any; - _readArrayValue(valueRep: any): any[] | Uint32Array | Float64Array | Float32Array | Int32Array; - _readCompressedArray(type: any, size: any): never[] | Float32Array | Int32Array; - _readHalf(): number; - _halfToFloat(h: any): number; - _getFieldsForSpec(spec: any): {}; -} -declare class BinaryReader { - constructor(buffer: any); - buffer: any; - view: DataView; - offset: number; - seek(offset: any): void; - tell(): number; - readUint8(): number; - readInt8(): number; - readUint16(): number; - readInt16(): number; - readUint32(): number; - readInt32(): number; - readUint64(): number; - readInt64(): number; - readFloat32(): number; - readFloat64(): number; - readBytes(length: any): Uint8Array; - readString(length: any): string; -} -export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDComposer.d.ts b/jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDComposer.d.ts deleted file mode 100644 index 118fd6fac..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/loaders/usd/USDComposer.d.ts +++ /dev/null @@ -1,226 +0,0 @@ -/** - * USDComposer handles scene composition from parsed USD data. - * This includes reference resolution, variant selection, transform handling, - * and building the Three.js scene graph. - * - * Works with specsByPath format from USDCParser. - */ -export class USDComposer { - constructor(manager?: null); - textureCache: {}; - skinnedMeshes: any[]; - manager: any; - texturePromises: any[]; - /** - * Compose a Three.js scene from parsed USD data. - * @param {Object} parsedData - Data from USDCParser or USDAParser - * @param {Object} assets - Dictionary of referenced assets (specsByPath or blob URLs) - * @param {Object} variantSelections - External variant selections - * @param {string} basePath - Base path for resolving relative references - * @returns {Group} Three.js scene graph - */ - compose(parsedData: Object, assets?: Object, variantSelections?: Object, basePath?: string): Group; - specsByPath: any; - assets: Object | undefined; - externalVariantSelections: Object | undefined; - basePath: string | undefined; - skeletons: {} | undefined; - fps: any; - /** - * Apply USD transforms to a Three.js object. - * Handles xformOpOrder with proper matrix composition. - * USD uses row-vector convention, Three.js uses column-vector. - */ - applyTransform(obj: any, fields: any, attrs?: {}): void; - /** - * Build indexes for efficient lookups. - * Called once during compose() to avoid O(n) scans per lookup. - */ - _buildIndexes(): void; - childrenByPath: Map | undefined; - attributesByPrimPath: Map | undefined; - materialsByRoot: Map | undefined; - shadersByMaterialPath: Map | undefined; - geomSubsetsByMeshPath: Map | undefined; - /** - * Check if a path is a direct child of parentPath. - */ - _isDirectChild(parentPath: any, path: any, prefix: any): boolean; - /** - * Build the scene hierarchy recursively. - * Uses childrenByPath index for O(1) child lookup instead of O(n) iteration. - */ - _buildHierarchy(parent: any, parentPath: any): void; - /** - * Get variant paths for a parent path based on variant selections. - */ - _getVariantPaths(parentPath: any): any[]; - /** - * Resolve a file path relative to basePath. - */ - _resolveFilePath(refPath: any): any; - /** - * Resolve a USD reference and return the composed content. - * @param {string} refValue - Reference value like "@./path/to/file.usdc@" - * @param {Object} localVariants - Variant selections to apply - * @returns {Group|null} Composed content or null - */ - _resolveReference(refValue: string, localVariants?: Object): Group | null; - /** - * Find a single mesh in the group's shallow hierarchy. - * Only returns a mesh if it's at depth 0 or 1, not deeply nested. - * This preserves transforms in complex hierarchies like Kitchen Set - * while supporting USDZExporter round-trip (Xform > Xform > Mesh pattern). - */ - _findSingleMesh(group: any): any; - /** - * Check if an object has a non-identity local transform. - */ - _hasNonIdentityTransform(obj: any): boolean; - /** - * Get the base path (directory) from a file path. - */ - _getBasePath(filePath: any): any; - /** - * Extract variant selections from a spec's fields. - */ - _getLocalVariantSelections(fields: any): {}; - /** - * Get all reference values from a prim spec. - * @returns {string[]} Array of reference strings like "@path@" or "@path@" - */ - _getReferences(spec: any): string[]; - /** - * Get attributes for a path from attribute specs. - */ - _getAttributes(path: any): {}; - _collectAttributesFromPath(path: any, attrs: any): void; - /** - * Build a mesh from a USD geometric primitive (Cube, Sphere, Cylinder, Cone, Capsule). - */ - _buildGeomPrimitive(path: any, spec: any, typeName: any): Mesh; - /** - * Build a mesh from a Mesh spec. - */ - _buildMesh(path: any, spec: any): Mesh | SkinnedMesh; - /** - * Build a camera from a Camera spec. - */ - _buildCamera(path: any): PerspectiveCamera | OrthographicCamera; - /** - * Build a light from a UsdLux light spec. - */ - _buildLight(path: any, typeName: any): SpotLight | PointLight | DirectionalLight | RectAreaLight | undefined; - /** - * Convert a color temperature in Kelvin to an RGB Color. - * Based on Tanner Helland's algorithm. - */ - _colorTemperature(kelvin: any): Color; - _parseNumber(value: any, fallback: any): any; - _getGeomSubsets(meshPath: any): any[]; - /** - * Get material binding target path, checking variant paths if needed. - */ - _getMaterialBindingTarget(primPath: any): any; - _buildGeometry(path: any, fields: any, hasSkinning?: boolean): BufferGeometry; - _buildGeometryWithSubsets(fields: any, geomSubsets: any, hasSkinning?: boolean): BufferGeometry; - _selectTopWeights(srcIndices: any, srcWeights: any, elementSize: any, numVertices: any, dstIndices: any, dstWeights: any): void; - _findUVPrimvar(fields: any): { - uvs: any; - uvIndices: any; - }; - _findUV2Primvar(fields: any): { - uvs2: any; - uv2Indices: any; - }; - _buildHoleMap(polygonHoles: any): { - parentToHoles: Map; - holeFaces: Set; - }; - _triangulateIndicesWithPattern(indices: any, counts: any, points?: null, holeMap?: null): { - indices: any[]; - pattern: any[]; - }; - _applyTriangulationPattern(indices: any, pattern: any): any[]; - _triangulateNGon(faceIndices: any, points: any): any[][]; - _triangulateNGonWithHoles(outerIndices: any, holeContours: any, points: any): any[][]; - _triangulateIndices(indices: any, counts: any): any[]; - _expandAttribute(data: any, indices: any, itemSize: any): any[]; - /** - * Compute per-vertex normals from indexed triangle data. - * Accumulates area-weighted face normals at each shared vertex and normalizes. - */ - _computeVertexNormals(points: any, indices: any): Float32Array; - /** - * Get the material path for a mesh, checking various binding sources. - */ - _getMaterialPath(meshPath: any, fields: any): any; - _buildMaterial(meshPath: any, fields: any): MeshPhysicalMaterial; - _buildMaterialForPath(materialPath: any): MeshPhysicalMaterial; - /** - * Apply material binding from a prim path to a mesh. - * Used when merging referenced geometry into a prim that has material binding. - */ - _applyMaterialBinding(mesh: any, primPath: any): void; - _pickBestMaterial(materialPaths: any): any; - _applyMaterial(material: any, materialPath: any): void; - /** - * Shared helper for applying texture or value from shader attribute. - * Reduces duplication between _applyPreviewSurface and _applyOpenPBRSurface. - */ - _applyTextureOrValue(material: any, shaderPath: any, fields: any, attrName: any, textureProperty: any, colorSpace: any, valueCallback: any, textureGetter: any): boolean; - _applyPreviewSurface(material: any, shaderPath: any): void; - _applyOpenPBRSurface(material: any, shaderPath: any): void; - _getTextureFromOpenPBRConnection(connPath: any): any; - _loadTextureFromPath(filePath: any): any; - _getTextureFromConnection(connPath: any): any; - _applyTextureTransforms(texture: any, attrs: any): void; - _loadTexture(filePath: any, textureAttrs: any, transformAttrs: any): Texture | null; - _createTextureFromData(data: any, textureAttrs: any, transformAttrs: any): Texture | null; - _getWrapMode(wrapValue: any): number; - _buildSkeleton(path: any): { - skeleton: Skeleton; - joints: any; - rootBones: Bone[]; - animationPath: any; - path: any; - } | null; - _bindSkeletons(): void; - _buildAnimations(): AnimationClip[]; - _buildTransformAnimations(): (QuaternionKeyframeTrack | VectorKeyframeTrack)[]; - _buildAnimationClip(path: any): AnimationClip | null; - _getTimeSampledAttribute(primPath: any, attrName: any): any; - _flattenMatrixArray(matrices: any, numMatrices: any): any; -} -export namespace SpecType { - let Unknown: number; - let Attribute: number; - let Connection: number; - let Expression: number; - let Mapper: number; - let MapperArg: number; - let Prim: number; - let PseudoRoot: number; - let Relationship: number; - let RelationshipTarget: number; - let Variant: number; - let VariantSet: number; -} -import { Group } from 'three'; -import { Mesh } from 'three'; -import { SkinnedMesh } from 'three'; -import { PerspectiveCamera } from 'three'; -import { OrthographicCamera } from 'three'; -import { SpotLight } from 'three'; -import { PointLight } from 'three'; -import { DirectionalLight } from 'three'; -import { RectAreaLight } from 'three'; -import { Color } from 'three'; -import { BufferGeometry } from 'three'; -import { MeshPhysicalMaterial } from 'three'; -import { Texture } from 'three'; -import { Skeleton } from 'three'; -import { Bone } from 'three'; -import { AnimationClip } from 'three'; -import { QuaternionKeyframeTrack } from 'three'; -import { VectorKeyframeTrack } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/materials/LDrawConditionalLineMaterial.d.ts b/jsdoc-testing/jsdoc/examples/jsm/materials/LDrawConditionalLineMaterial.d.ts deleted file mode 100644 index d0c825fab..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/materials/LDrawConditionalLineMaterial.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * A special line material for meshes loaded via {@link LDrawLoader}. - * - * This module can only be used with {@link WebGLRenderer}. When using {@link WebGPURenderer}, - * import the class from `LDrawConditionalLineNodeMaterial.js`. - * - * @augments ShaderMaterial - * @three_import import { LDrawConditionalLineMaterial } from 'three/addons/materials/LDrawConditionalLineMaterial.js'; - */ -export class LDrawConditionalLineMaterial extends ShaderMaterial { - static get type(): string; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLDrawConditionalLineMaterial: boolean; -} -import { ShaderMaterial } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/materials/LDrawConditionalLineNodeMaterial.d.ts b/jsdoc-testing/jsdoc/examples/jsm/materials/LDrawConditionalLineNodeMaterial.d.ts deleted file mode 100644 index 2115b2f70..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/materials/LDrawConditionalLineNodeMaterial.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * A special line material for meshes loaded via {@link LDrawLoader}. - * - * This module can only be used with {@link WebGPURenderer}. When using {@link WebGLRenderer}, - * import the class from `LDrawConditionalLineMaterial.js`. - * - * @augments NodeMaterial - * @three_import import { LDrawConditionalLineMaterial } from 'three/addons/materials/LDrawConditionalLineMaterial.js'; - */ -export class LDrawConditionalLineMaterial extends NodeMaterial { - /** - * Constructs a new conditional line material. - * - * @param {Object} [parameters] - An object with one or more properties - * defining the material's appearance. Any property of the material - * (including any property from inherited materials) can be passed - * in here. Color values can be passed any type of value accepted - * by {@link Color#set}. - */ - constructor(parameters?: Object); - vertexNode: void; - fragmentNode: void; - _diffuseUniform: import("three/webgpu").UniformNode; - _opacityUniform: import("three/webgpu").UniformNode; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLDrawConditionalLineMaterial: boolean; -} -import { NodeMaterial } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/materials/WoodNodeMaterial.d.ts b/jsdoc-testing/jsdoc/examples/jsm/materials/WoodNodeMaterial.d.ts deleted file mode 100644 index 5f75eb57f..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/materials/WoodNodeMaterial.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -export function GetWoodPreset(genus: any, finish: any): any; -export const WoodGenuses: string[]; -export const Finishes: string[]; -/** - * Procedural wood material using TSL (Three.js Shading Language). - * - * Usage examples: - * - * // Using presets (recommended for common wood types) - * const material = WoodNodeMaterial.fromPreset('walnut', 'gloss'); - * - * // Using custom parameters (for advanced customization) - * const material = new WoodNodeMaterial({ - * centerSize: 1.2, - * ringThickness: 1/40, - * darkGrainColor: new THREE.Color('#2a1a0a'), - * lightGrainColor: new THREE.Color('#8b4513'), - * clearcoat: 1, - * clearcoatRoughness: 0.3 - * }); - * - * // Mixing presets with custom overrides - * const walnutParams = GetWoodPreset('walnut', 'raw'); - * const material = new WoodNodeMaterial({ - * ...walnutParams, - * ringThickness: 1/50, // Override specific parameter - * clearcoat: 1 // Add finish - * }); - */ -export class WoodNodeMaterial extends THREE.MeshPhysicalMaterial { - static get type(): string; - static fromPreset(genus?: string, finish?: string): WoodNodeMaterial; - constructor(params?: {}); - isWoodNodeMaterial: boolean; - colorNode: any; - clearcoatNode: any; - clearcoatRoughness: any; -} -import * as THREE from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/math/Capsule.d.ts b/jsdoc-testing/jsdoc/examples/jsm/math/Capsule.d.ts deleted file mode 100644 index 8eac33066..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/math/Capsule.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -/** - * A capsule is essentially a cylinder with hemispherical caps at both ends. - * It can be thought of as a swept sphere, where a sphere is moved along a line segment. - * - * Capsules are often used as bounding volumes (next to AABBs and bounding spheres). - * - * @three_import import { Capsule } from 'three/addons/math/Capsule.js'; - */ -export class Capsule { - /** - * Constructs a new capsule. - * - * @param {Vector3} [start] - The start vector. - * @param {Vector3} [end] - The end vector. - * @param {number} [radius=1] - The capsule's radius. - */ - constructor(start?: Vector3, end?: Vector3, radius?: number); - /** - * The start vector. - * - * @type {Vector3} - */ - start: Vector3; - /** - * The end vector. - * - * @type {Vector3} - */ - end: Vector3; - /** - * The capsule's radius. - * - * @type {number} - * @default 1 - */ - radius: number; - /** - * Returns a new capsule with copied values from this instance. - * - * @return {Capsule} A clone of this instance. - */ - clone(): Capsule; - /** - * Sets the capsule components to the given values. - * Please note that this method only copies the values from the given objects. - * - * @param {Vector3} start - The start vector. - * @param {Vector3} end - The end vector - * @param {number} radius - The capsule's radius. - * @return {Capsule} A reference to this capsule. - */ - set(start: Vector3, end: Vector3, radius: number): Capsule; - /** - * Copies the values of the given capsule to this instance. - * - * @param {Capsule} capsule - The capsule to copy. - * @return {Capsule} A reference to this capsule. - */ - copy(capsule: Capsule): Capsule; - /** - * Returns the center point of this capsule. - * - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} The center point. - */ - getCenter(target: Vector3): Vector3; - /** - * Adds the given offset to this capsule, effectively moving it in 3D space. - * - * @param {Vector3} v - The offset that should be used to translate the capsule. - * @return {Capsule} A reference to this capsule. - */ - translate(v: Vector3): Capsule; - /** - * Returns `true` if the given bounding box intersects with this capsule. - * - * @param {Box3} box - The bounding box to test. - * @return {boolean} Whether the given bounding box intersects with this capsule. - */ - intersectsBox(box: Box3): boolean; -} -import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/math/ColorConverter.d.ts b/jsdoc-testing/jsdoc/examples/jsm/math/ColorConverter.d.ts deleted file mode 100644 index a730f9728..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/math/ColorConverter.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * A utility class with helper functions for color conversion. - * - * @hideconstructor - * @three_import import { ColorConverter } from 'three/addons/math/ColorConverter.js'; - */ -export class ColorConverter { - /** - * Sets the given HSV color definition to the given color object. - * - * @param {Color} color - The color to set. - * @param {number} h - The hue. - * @param {number} s - The saturation. - * @param {number} v - The value. - * @return {Color} The update color. - */ - static setHSV(color: Color, h: number, s: number, v: number): Color; - /** - * Returns a HSV color representation of the given color object. - * - * @param {Color} color - The color to get HSV values from. - * @param {{h:number,s:number,v:number}} target - The target object that is used to store the method's result. - * @return {{h:number,s:number,v:number}} The HSV color. - */ - static getHSV(color: Color, target: { - h: number; - s: number; - v: number; - }): { - h: number; - s: number; - v: number; - }; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/math/ColorSpaces.d.ts b/jsdoc-testing/jsdoc/examples/jsm/math/ColorSpaces.d.ts deleted file mode 100644 index e7c282d5b..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/math/ColorSpaces.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -/** - * Display-P3 color space. - * - * @type {string} - * @constant - */ -export const DisplayP3ColorSpace: string; -/** - * Display-P3-Linear color space. - * - * @type {string} - * @constant - */ -export const LinearDisplayP3ColorSpace: string; -/** - * Implementation object for the Display-P3 color space. - * - * @type {module:ColorSpaces~ColorSpaceImpl} - * @constant - */ -export const DisplayP3ColorSpaceImpl: any; -/** - * Implementation object for the Display-P3-Linear color space. - * - * @type {module:ColorSpaces~ColorSpaceImpl} - * @constant - */ -export const LinearDisplayP3ColorSpaceImpl: any; -/** - * Rec2020-Linear color space. - * - * @type {string} - * @constant - */ -export const LinearRec2020ColorSpace: string; -/** - * Implementation object for the Rec2020-Linear color space. - * - * @type {module:ColorSpaces~ColorSpaceImpl} - * @constant - */ -export const LinearRec2020ColorSpaceImpl: any; -/** - * Extended-sRGB color space. - * - * @type {string} - * @constant - */ -export const ExtendedSRGBColorSpace: string; -/** - * Implementation object for the Extended-sRGB color space. - * - * @type {module:ColorSpaces~ColorSpaceImpl} - * @constant - */ -export const ExtendedSRGBColorSpaceImpl: any; -/** - * :ColorSpaces~ColorSpaceImpl - */ -export type module = { - /** - * - The primaries. - */ - primaries: Array; - /** - * - The white point. - */ - whitePoint: Array; - /** - * - A color space conversion matrix, converting to CIE XYZ. - */ - toXYZ: Matrix3; - /** - * - A color space conversion matrix, converting from CIE XYZ. - */ - fromXYZ: Matrix3; - /** - * - The luminance coefficients. - */ - luminanceCoefficients: Array; - /** - * - The working color space config. - */ - workingColorSpaceConfig?: { - unpackColorSpace: string; - } | undefined; - /** - * - The drawing buffer color space config. - */ - outputColorSpaceConfig?: { - drawingBufferColorSpace: string; - } | undefined; -}; -import { Matrix3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/math/ConvexHull.d.ts b/jsdoc-testing/jsdoc/examples/jsm/math/ConvexHull.d.ts deleted file mode 100644 index ca53b31bc..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/math/ConvexHull.d.ts +++ /dev/null @@ -1,533 +0,0 @@ -/** - * Can be used to compute the convex hull in 3D space for a given set of points. It - * is primarily intended for {@link ConvexGeometry}. - * - * This Quickhull 3D implementation is a port of [quickhull3d](https://github.com/maurizzzio/quickhull3d/) - * by Mauricio Poppe. - * - * @three_import import { ConvexHull } from 'three/addons/math/ConvexHull.js'; - */ -export class ConvexHull { - tolerance: number; - faces: any[]; - newFaces: any[]; - assigned: VertexList; - unassigned: VertexList; - vertices: any[]; - /** - * Computes to convex hull for the given array of points. - * - * @param {Array} points - The array of points in 3D space. - * @return {ConvexHull} A reference to this convex hull. - */ - setFromPoints(points: Array): ConvexHull; - /** - * Computes the convex hull of the given 3D object (including its descendants), - * accounting for the world transforms of both the 3D object and its descendants. - * - * @param {Object3D} object - The 3D object to compute the convex hull for. - * @return {ConvexHull} A reference to this convex hull. - */ - setFromObject(object: Object3D): ConvexHull; - /** - * Returns `true` if the given point lies in the convex hull. - * - * @param {Vector3} point - The point to test. - * @return {boolean} Whether the given point lies in the convex hull or not. - */ - containsPoint(point: Vector3): boolean; - /** - * Computes the intersections point of the given ray and this convex hull. - * - * @param {Ray} ray - The ray to test. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {?Vector3} The intersection point. Returns `null` if not intersection was detected. - */ - intersectRay(ray: Ray, target: Vector3): Vector3 | null; - /** - * Returns `true` if the given ray intersects with this convex hull. - * - * @param {Ray} ray - The ray to test. - * @return {boolean} Whether the given ray intersects with this convex hull or not. - */ - intersectsRay(ray: Ray): boolean; - /** - * Makes the convex hull empty. - * - * @return {ConvexHull} A reference to this convex hull. - */ - makeEmpty(): ConvexHull; - /** - * Adds a vertex to the 'assigned' list of vertices and assigns it to the given face. - * - * @private - * @param {VertexNode} vertex - The vertex to add. - * @param {Face} face - The target face. - * @return {ConvexHull} A reference to this convex hull. - */ - private _addVertexToFace; - /** - * Removes a vertex from the 'assigned' list of vertices and from the given face. - * It also makes sure that the link from 'face' to the first vertex it sees in 'assigned' - * is linked correctly after the removal. - * - * @private - * @param {VertexNode} vertex - The vertex to remove. - * @param {Face} face - The target face. - * @return {ConvexHull} A reference to this convex hull. - */ - private _removeVertexFromFace; - /** - * Removes all the visible vertices that a given face is able to see which are stored in - * the 'assigned' vertex list. - * - * @private - * @param {Face} face - The target face. - * @return {VertexNode|undefined} A reference to this convex hull. - */ - private _removeAllVerticesFromFace; - /** - * Removes all the visible vertices that `face` is able to see. - * - * - If `absorbingFace` doesn't exist, then all the removed vertices will be added to the 'unassigned' vertex list. - * - If `absorbingFace` exists, then this method will assign all the vertices of 'face' that can see 'absorbingFace'. - * - If a vertex cannot see `absorbingFace`, it's added to the 'unassigned' vertex list. - * - * @private - * @param {Face} face - The given face. - * @param {Face} [absorbingFace] - An optional face that tries to absorb the vertices of the first face. - * @return {ConvexHull} A reference to this convex hull. - */ - private _deleteFaceVertices; - /** - * Reassigns as many vertices as possible from the unassigned list to the new faces. - * - * @private - * @param {Array} newFaces - The new faces. - * @return {ConvexHull} A reference to this convex hull. - */ - private _resolveUnassignedPoints; - /** - * Computes the extremes values (min/max vectors) which will be used to - * compute the initial hull. - * - * @private - * @return {Object} The extremes. - */ - private _computeExtremes; - /** - * Computes the initial simplex assigning to its faces all the points that are - * candidates to form part of the hull. - * - * @private - * @return {ConvexHull} A reference to this convex hull. - */ - private _computeInitialHull; - /** - * Removes inactive (e.g. deleted) faces from the internal face list. - * - * @private - * @return {ConvexHull} A reference to this convex hull. - */ - private _reindexFaces; - /** - * Finds the next vertex to create faces with the current hull. - * - * - Let the initial face be the first face existing in the 'assigned' vertex list. - * - If a face doesn't exist then return since there're no vertices left. - * - Otherwise for each vertex that face sees find the one furthest away from it. - * - * @private - * @return {?VertexNode} The next vertex to add. - */ - private _nextVertexToAdd; - /** - * Computes a chain of half edges in CCW order called the 'horizon'. For an edge - * to be part of the horizon it must join a face that can see 'eyePoint' and a face - * that cannot see 'eyePoint'. - * - * @private - * @param {Vector3} eyePoint - The 3D-coordinates of a point. - * @param {HalfEdge} crossEdge - The edge used to jump to the current face. - * @param {Face} face - The current face being tested. - * @param {Array} horizon - The edges that form part of the horizon in CCW order. - * @return {ConvexHull} A reference to this convex hull. - */ - private _computeHorizon; - /** - * Creates a face with the vertices 'eyeVertex.point', 'horizonEdge.tail' and 'horizonEdge.head' - * in CCW order. All the half edges are created in CCW order thus the face is always pointing - * outside the hull. - * - * @private - * @param {VertexNode} eyeVertex - The vertex that is added to the hull. - * @param {HalfEdge} horizonEdge - A single edge of the horizon. - * @return {HalfEdge} The half edge whose vertex is the eyeVertex. - */ - private _addAdjoiningFace; - /** - * Adds 'horizon.length' faces to the hull, each face will be linked with the horizon - * opposite face and the face on the left/right. - * - * @private - * @param {VertexNode} eyeVertex - The vertex that is added to the hull. - * @param {Array} horizon - The horizon. - * @return {ConvexHull} A reference to this convex hull. - */ - private _addNewFaces; - /** - * Adds a vertex to the hull with the following algorithm: - * - * - Compute the 'horizon' which is a chain of half edges. For an edge to belong to this group - * it must be the edge connecting a face that can see 'eyeVertex' and a face which cannot see 'eyeVertex'. - * - All the faces that can see 'eyeVertex' have its visible vertices removed from the assigned vertex list. - * - A new set of faces is created with each edge of the 'horizon' and 'eyeVertex'. Each face is connected - * with the opposite horizon face and the face on the left/right. - * - The vertices removed from all the visible faces are assigned to the new faces if possible. - * - * @private - * @param {VertexNode} eyeVertex - The vertex to add. - * @return {ConvexHull} A reference to this convex hull. - */ - private _addVertexToHull; - /** - * Cleans up internal properties after computing the convex hull. - * - * @private - * @return {ConvexHull} A reference to this convex hull. - */ - private _cleanup; - /** - * Starts the execution of the quick hull algorithm. - * - * @private - * @return {ConvexHull} A reference to this convex hull. - */ - private _compute; -} -/** - * Represents a section bounded by a specific amount of half-edges. - * The current implementation assumes that a face always consist of three edges. - * - * @private - */ -export class Face { - /** - * Creates a face from the given vertex nodes. - * - * @private - * @param {VertexNode} a - The first vertex node. - * @param {VertexNode} b - The second vertex node. - * @param {VertexNode} c - The third vertex node. - * @return {Face} The created face. - */ - private static create; - /** - * The normal vector of the face. - * - * @private - * @type {Vector3} - */ - private normal; - /** - * The midpoint or centroid of the face. - * - * @private - * @type {Vector3} - */ - private midpoint; - /** - * The area of the face. - * - * @private - * @type {number} - * @default 0 - */ - private area; - /** - * Signed distance from face to the origin. - * - * @private - * @type {number} - * @default 0 - */ - private constant; - /** - * Reference to a vertex in a vertex list this face can see. - * - * @private - * @type {?VertexNode} - * @default null - */ - private outside; - mark: number; - /** - * Reference to the base edge of a face. To retrieve all edges, you can use the - * `next` reference of the current edge. - * - * @private - * @type {?HalfEdge} - * @default null - */ - private edge; - /** - * Returns an edge by the given index. - * - * @private - * @param {number} i - The edge index. - * @return {HalfEdge} The edge. - */ - private getEdge; - /** - * Computes all properties of the face. - * - * @private - * @return {Face} A reference to this face. - */ - private compute; - /** - * Returns the signed distance from a given point to the plane representation of this face. - * - * @private - * @param {Vector3} point - The point to compute the distance to. - * @return {number} The distance. - */ - private distanceToPoint; -} -/** - * The basis for a half-edge data structure, also known as doubly - * connected edge list (DCEL). - * - * @private - */ -export class HalfEdge { - /** - * Constructs a new half edge. - * - * @param {VertexNode} vertex - A reference to its destination vertex. - * @param {Face} face - A reference to its face. - */ - constructor(vertex: VertexNode, face: Face); - /** - * A reference to its destination vertex. - * - * @private - * @type {VertexNode} - */ - private vertex; - /** - * Reference to the previous half-edge of the same face. - * - * @private - * @type {?HalfEdge} - * @default null - */ - private prev; - /** - * Reference to the next half-edge of the same face. - * - * @private - * @type {?HalfEdge} - * @default null - */ - private next; - /** - * Reference to the twin half-edge to reach the opposite face. - * - * @private - * @type {?HalfEdge} - * @default null - */ - private twin; - /** - * A reference to its face. - * - * @private - * @type {Face} - */ - private face; - /** - * Returns the destination vertex. - * - * @private - * @return {VertexNode} The destination vertex. - */ - private head; - /** - * Returns the origin vertex. - * - * @private - * @return {?VertexNode} The destination vertex. - */ - private tail; - /** - * Returns the Euclidean length (straight-line length) of the edge. - * - * @private - * @return {number} The edge's length. - */ - private length; - /** - * Returns the square of the Euclidean length (straight-line length) of the edge. - * - * @private - * @return {number} The square of the edge's length. - */ - private lengthSquared; - /** - * Sets the twin edge of this half-edge. It also ensures that the twin reference - * of the given half-edge is correctly set. - * - * @private - * @param {HalfEdge} edge - The twin edge to set. - * @return {HalfEdge} A reference to this edge. - */ - private setTwin; -} -/** - * A vertex as a double linked list node. - * - * @private - */ -export class VertexNode { - /** - * Constructs a new vertex node. - * - * @param {Vector3} point - A point in 3D space. - */ - constructor(point: Vector3); - /** - * A point in 3D space. - * - * @private - * @type {Vector3} - */ - private point; - /** - * Reference to the previous vertex in the double linked list. - * - * @private - * @type {?VertexNode} - * @default null - */ - private prev; - /** - * Reference to the next vertex in the double linked list. - * - * @private - * @type {?VertexNode} - * @default null - */ - private next; - /** - * Reference to the face that is able to see this vertex. - * - * @private - * @type {?Face} - * @default null - */ - private face; -} -/** - * A doubly linked list of vertices. - * - * @private - */ -export class VertexList { - /** - * Reference to the first vertex of the linked list. - * - * @private - * @type {?VertexNode} - * @default null - */ - private head; - /** - * Reference to the last vertex of the linked list. - * - * @private - * @type {?VertexNode} - * @default null - */ - private tail; - /** - * Returns the head reference. - * - * @private - * @return {VertexNode} The head reference. - */ - private first; - /** - * Returns the tail reference. - * - * @private - * @return {VertexNode} The tail reference. - */ - private last; - /** - * Clears the linked list. - * - * @private - * @return {VertexList} A reference to this vertex list. - */ - private clear; - /** - * Inserts a vertex before a target vertex. - * - * @private - * @param {VertexNode} target - The target. - * @param {VertexNode} vertex - The vertex to insert. - * @return {VertexList} A reference to this vertex list. - */ - private insertBefore; - /** - * Inserts a vertex after a target vertex. - * - * @private - * @param {VertexNode} target - The target. - * @param {VertexNode} vertex - The vertex to insert. - * @return {VertexList} A reference to this vertex list. - */ - private insertAfter; - /** - * Appends a vertex to this vertex list. - * - * @private - * @param {VertexNode} vertex - The vertex to append. - * @return {VertexList} A reference to this vertex list. - */ - private append; - /** - * Appends a chain of vertices where the given vertex is the head. - * - * @private - * @param {VertexNode} vertex - The head vertex of a chain of vertices. - * @return {VertexList} A reference to this vertex list. - */ - private appendChain; - /** - * Removes a vertex from the linked list. - * - * @private - * @param {VertexNode} vertex - The vertex to remove. - * @return {VertexList} A reference to this vertex list. - */ - private remove; - /** - * Removes a sublist of vertices from the linked list. - * - * @private - * @param {VertexNode} a - The head of the sublist. - * @param {VertexNode} b - The tail of the sublist. - * @return {VertexList} A reference to this vertex list. - */ - private removeSubList; - /** - * Returns `true` if the linked list is empty. - * - * @private - * @return {boolean} Whether the linked list is empty or not. - */ - private isEmpty; -} -import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/math/ImprovedNoise.d.ts b/jsdoc-testing/jsdoc/examples/jsm/math/ImprovedNoise.d.ts deleted file mode 100644 index 85ce6eb37..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/math/ImprovedNoise.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * A utility class providing a 3D noise function. - * - * The code is based on [IMPROVED NOISE](https://cs.nyu.edu/~perlin/noise/) - * by Ken Perlin, 2002. - * - * @three_import import { ImprovedNoise } from 'three/addons/math/ImprovedNoise.js'; - */ -export class ImprovedNoise { - /** - * Returns a noise value for the given parameters. - * - * @param {number} x - The x coordinate. - * @param {number} y - The y coordinate. - * @param {number} z - The z coordinate. - * @return {number} The noise value. - */ - noise(x: number, y: number, z: number): number; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/math/Lut.d.ts b/jsdoc-testing/jsdoc/examples/jsm/math/Lut.d.ts deleted file mode 100644 index 2650ec61f..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/math/Lut.d.ts +++ /dev/null @@ -1,133 +0,0 @@ -/** - * Represents a lookup table for colormaps. It is used to determine the color - * values from a range of data values. - * - * ```js - * const lut = new Lut( 'rainbow', 512 ); - * const color = lut.getColor( 0.5 ); - * ``` - * - * @three_import import { Lut } from 'three/addons/math/Lut.js'; - */ -export class Lut { - /** - * Constructs a new Lut. - * - * @param {('rainbow'|'cooltowarm'|'blackbody'|'grayscale')} [colormap='rainbow'] - Sets a colormap from predefined list of colormaps. - * @param {number} [count=32] - Sets the number of colors used to represent the data array. - */ - constructor(colormap?: ("rainbow" | "cooltowarm" | "blackbody" | "grayscale"), count?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLut: boolean; - /** - * The lookup table for the selected color map - * - * @type {Array} - */ - lut: Array; - /** - * The currently selected color map. - * - * @type {Array>} - */ - map: Array>; - /** - * The number of colors of the current selected color map. - * - * @type {number} - * @default 32 - */ - n: number; - /** - * The minimum value to be represented with the lookup table. - * - * @type {number} - * @default 0 - */ - minV: number; - /** - * The maximum value to be represented with the lookup table. - * - * @type {number} - * @default 1 - */ - maxV: number; - /** - * Sets the given LUT. - * - * @param {Lut} value - The LUT to set. - * @return {Lut} A reference to this LUT. - */ - set(value: Lut): Lut; - /** - * Sets the minimum value to be represented with this LUT. - * - * @param {number} min - The minimum value to be represented with the lookup table. - * @return {Lut} A reference to this LUT. - */ - setMin(min: number): Lut; - /** - * Sets the maximum value to be represented with this LUT. - * - * @param {number} max - The maximum value to be represented with the lookup table. - * @return {Lut} A reference to this LUT. - */ - setMax(max: number): Lut; - /** - * Configure the lookup table for the given color map and number of colors. - * - * @param {string} colormap - The name of the color map. - * @param {number} [count=32] - The number of colors. - * @return {Lut} A reference to this LUT. - */ - setColorMap(colormap: string, count?: number): Lut; - /** - * Copies the given lut. - * - * @param {Lut} lut - The LUT to copy. - * @return {Lut} A reference to this LUT. - */ - copy(lut: Lut): Lut; - /** - * Returns an instance of Color for the given data value. - * - * @param {number} alpha - The value to lookup. - * @return {Color} The color from the LUT. - */ - getColor(alpha: number): Color; - /** - * Adds a color map to this Lut instance. - * - * @param {string} name - The name of the color map. - * @param {Array>} arrayOfColors - An array of color values. Each value is an array - * holding a threshold and the actual color value as a hexadecimal number. - * @return {Lut} A reference to this LUT. - */ - addColorMap(name: string, arrayOfColors: Array>): Lut; - /** - * Creates a canvas in order to visualize the lookup table as a texture. - * - * @return {HTMLCanvasElement} The created canvas. - */ - createCanvas(): HTMLCanvasElement; - /** - * Updates the given canvas with the Lut's data. - * - * @param {HTMLCanvasElement} canvas - The canvas to update. - * @return {HTMLCanvasElement} The updated canvas. - */ - updateCanvas(canvas: HTMLCanvasElement): HTMLCanvasElement; -} -export namespace ColorMapKeywords { - let rainbow: number[][]; - let cooltowarm: number[][]; - let blackbody: number[][]; - let grayscale: number[][]; -} -import { Color } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/math/MeshSurfaceSampler.d.ts b/jsdoc-testing/jsdoc/examples/jsm/math/MeshSurfaceSampler.d.ts deleted file mode 100644 index c430c18dd..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/math/MeshSurfaceSampler.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Utility class for sampling weighted random points on the surface of a mesh. - * - * Building the sampler is a one-time O(n) operation. Once built, any number of - * random samples may be selected in O(logn) time. Memory usage is O(n). - * - * References: - * - {@link http://www.joesfer.com/?p=84} - * - {@link https://stackoverflow.com/a/4322940/1314762} - * - * ```js - * const sampler = new MeshSurfaceSampler( surfaceMesh ) - * .setWeightAttribute( 'color' ) - * .build(); - * - * const mesh = new THREE.InstancedMesh( sampleGeometry, sampleMaterial, 100 ); - * - * const position = new THREE.Vector3(); - * const matrix = new THREE.Matrix4(); - * - * // Sample randomly from the surface, creating an instance of the sample geometry at each sample point. - * - * for ( let i = 0; i < 100; i ++ ) { - * - * sampler.sample( position ); - * matrix.makeTranslation( position.x, position.y, position.z ); - * mesh.setMatrixAt( i, matrix ); - * - * } - * - * scene.add( mesh ); - * ``` - * - * @three_import import { MeshSurfaceSampler } from 'three/addons/math/MeshSurfaceSampler.js'; - */ -export class MeshSurfaceSampler { - /** - * Constructs a mesh surface sampler. - * - * @param {Mesh} mesh - Surface mesh from which to sample. - */ - constructor(mesh: Mesh); - geometry: any; - randomFunction: () => number; - indexAttribute: any; - positionAttribute: any; - normalAttribute: any; - colorAttribute: any; - uvAttribute: any; - weightAttribute: any; - distribution: Float32Array | null; - /** - * Specifies a vertex attribute to be used as a weight when sampling from the surface. - * Faces with higher weights are more likely to be sampled, and those with weights of - * zero will not be sampled at all. For vector attributes, only .x is used in sampling. - * - * If no weight attribute is selected, sampling is randomly distributed by area. - * - * @param {string} name - The attribute name. - * @return {MeshSurfaceSampler} A reference to this sampler. - */ - setWeightAttribute(name: string): MeshSurfaceSampler; - /** - * Processes the input geometry and prepares to return samples. Any configuration of the - * geometry or sampler must occur before this method is called. Time complexity is O(n) - * for a surface with n faces. - * - * @return {MeshSurfaceSampler} A reference to this sampler. - */ - build(): MeshSurfaceSampler; - /** - * Allows to set a custom random number generator. Default is `Math.random()`. - * - * @param {Function} randomFunction - A random number generator. - * @return {MeshSurfaceSampler} A reference to this sampler. - */ - setRandomGenerator(randomFunction: Function): MeshSurfaceSampler; - /** - * Selects a random point on the surface of the input geometry, returning the - * position and optionally the normal vector, color and UV Coordinate at that point. - * Time complexity is O(log n) for a surface with n faces. - * - * @param {Vector3} targetPosition - The target object holding the sampled position. - * @param {Vector3} targetNormal - The target object holding the sampled normal. - * @param {Color} targetColor - The target object holding the sampled color. - * @param {Vector2} targetUV - The target object holding the sampled uv coordinates. - * @return {MeshSurfaceSampler} A reference to this sampler. - */ - sample(targetPosition: Vector3, targetNormal: Vector3, targetColor: Color, targetUV: Vector2): MeshSurfaceSampler; - _sampleFaceIndex(): number; - _binarySearch(x: any): number; - _sampleFace(faceIndex: any, targetPosition: any, targetNormal: any, targetColor: any, targetUV: any): this; -} -import { Vector3 } from 'three'; -import { Vector2 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/math/OBB.d.ts b/jsdoc-testing/jsdoc/examples/jsm/math/OBB.d.ts deleted file mode 100644 index de304fef8..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/math/OBB.d.ts +++ /dev/null @@ -1,150 +0,0 @@ -/** - * Represents an oriented bounding box (OBB) in 3D space. - * - * @three_import import { OBB } from 'three/addons/math/OBB.js'; - */ -export class OBB { - /** - * Constructs a new OBB. - * - * @param {Vector3} [center] - The center of the OBB. - * @param {Vector3} [halfSize] - Positive halfwidth extents of the OBB along each axis. - * @param {Matrix3} [rotation] - The rotation of the OBB. - */ - constructor(center?: Vector3, halfSize?: Vector3, rotation?: Matrix3); - /** - * The center of the OBB. - * - * @type {Vector3} - */ - center: Vector3; - /** - * Positive halfwidth extents of the OBB along each axis. - * - * @type {Vector3} - */ - halfSize: Vector3; - /** - * The rotation of the OBB. - * - * @type {Matrix3} - */ - rotation: Matrix3; - /** - * Sets the OBBs components to the given values. - * - * @param {Vector3} [center] - The center of the OBB. - * @param {Vector3} [halfSize] - Positive halfwidth extents of the OBB along each axis. - * @param {Matrix3} [rotation] - The rotation of the OBB. - * @return {OBB} A reference to this OBB. - */ - set(center?: Vector3, halfSize?: Vector3, rotation?: Matrix3): OBB; - /** - * Copies the values of the given OBB to this instance. - * - * @param {OBB} obb - The OBB to copy. - * @return {OBB} A reference to this OBB. - */ - copy(obb: OBB): OBB; - /** - * Returns a new OBB with copied values from this instance. - * - * @return {OBB} A clone of this instance. - */ - clone(): OBB; - /** - * Returns the size of this OBB. - * - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} The size. - */ - getSize(target: Vector3): Vector3; - /** - * Clamps the given point within the bounds of this OBB. - * - * @param {Vector3} point - The point that should be clamped within the bounds of this OBB. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @returns {Vector3} - The clamped point. - */ - clampPoint(point: Vector3, target: Vector3): Vector3; - /** - * Returns `true` if the given point lies within this OBB. - * - * @param {Vector3} point - The point to test. - * @returns {boolean} - Whether the given point lies within this OBB or not. - */ - containsPoint(point: Vector3): boolean; - /** - * Returns `true` if the given AABB intersects this OBB. - * - * @param {Box3} box3 - The AABB to test. - * @returns {boolean} - Whether the given AABB intersects this OBB or not. - */ - intersectsBox3(box3: Box3): boolean; - /** - * Returns `true` if the given bounding sphere intersects this OBB. - * - * @param {Sphere} sphere - The bounding sphere to test. - * @returns {boolean} - Whether the given bounding sphere intersects this OBB or not. - */ - intersectsSphere(sphere: Sphere): boolean; - /** - * Returns `true` if the given OBB intersects this OBB. - * - * @param {OBB} obb - The OBB to test. - * @param {number} [epsilon=Number.EPSILON] - A small value to prevent arithmetic errors. - * @returns {boolean} - Whether the given OBB intersects this OBB or not. - */ - intersectsOBB(obb: OBB, epsilon?: number): boolean; - /** - * Returns `true` if the given plane intersects this OBB. - * - * @param {Plane} plane - The plane to test. - * @returns {boolean} Whether the given plane intersects this OBB or not. - */ - intersectsPlane(plane: Plane): boolean; - /** - * Performs a ray/OBB intersection test and stores the intersection point - * in the given 3D vector. - * - * @param {Ray} ray - The ray to test. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {?Vector3} The intersection point. If no intersection is detected, `null` is returned. - */ - intersectRay(ray: Ray, target: Vector3): Vector3 | null; - /** - * Returns `true` if the given ray intersects this OBB. - * - * @param {Ray} ray - The ray to test. - * @returns {boolean} Whether the given ray intersects this OBB or not. - */ - intersectsRay(ray: Ray): boolean; - /** - * Defines an OBB based on the given AABB. - * - * @param {Box3} box3 - The AABB to setup the OBB from. - * @return {OBB} A reference of this OBB. - */ - fromBox3(box3: Box3): OBB; - /** - * Returns `true` if the given OBB is equal to this OBB. - * - * @param {OBB} obb - The OBB to test. - * @returns {boolean} Whether the given OBB is equal to this OBB or not. - */ - equals(obb: OBB): boolean; - /** - * Applies the given transformation matrix to this OBB. This method can be - * used to transform the bounding volume with the world matrix of a 3D object - * in order to keep both entities in sync. - * - * @param {Matrix4} matrix - The matrix to apply. - * @return {OBB} A reference of this OBB. - */ - applyMatrix4(matrix: Matrix4): OBB; -} -import { Vector3 } from 'three'; -import { Matrix3 } from 'three'; -import { Box3 } from 'three'; -import { Ray } from 'three'; -import { Matrix4 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/math/Octree.d.ts b/jsdoc-testing/jsdoc/examples/jsm/math/Octree.d.ts deleted file mode 100644 index 234a0bd1d..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/math/Octree.d.ts +++ /dev/null @@ -1,195 +0,0 @@ -/** - * An octree is a hierarchical tree data structure used to partition a three-dimensional - * space by recursively subdividing it into eight octants. - * - * This particular implementation can have up to sixteen levels and stores up to eight triangles - * in leaf nodes. - * - * `Octree` can be used in games to compute collision between the game world and colliders from - * the player or other dynamic 3D objects. - * - * - * ```js - * const octree = new Octree().fromGraphNode( scene ); - * const result = octree.capsuleIntersect( playerCollider ); // collision detection - * ``` - * - * @three_import import { Octree } from 'three/addons/math/Octree.js'; - */ -export class Octree { - /** - * Constructs a new Octree. - * - * @param {Box3} [box] - The base box with enclose the entire Octree. - */ - constructor(box?: Box3); - /** - * The base box with enclose the entire Octree. - * - * @type {Box3} - */ - box: Box3; - /** - * The bounds of the Octree. Compared to {@link Octree#box}, no - * margin is applied. - * - * @type {Box3} - */ - bounds: Box3; - /** - * Can by used for layers configuration for refine testing. - * - * @type {Layers} - */ - layers: Layers; - /** - * The number of triangles a leaf can store before it is split. - * - * @type {number} - * @default 8 - */ - trianglesPerLeaf: number; - /** - * The maximum level of the Octree. It defines the maximum - * hierarchical depth of the data structure. - * - * @type {number} - * @default 16 - */ - maxLevel: number; - subTrees: any[]; - triangles: any[]; - /** - * Adds the given triangle to the Octree. The triangle vertices are clamped if they exceed - * the bounds of the Octree. - * - * @param {Triangle} triangle - The triangle to add. - * @return {Octree} A reference to this Octree. - */ - addTriangle(triangle: Triangle): Octree; - /** - * Prepares {@link Octree#box} for the build. - * - * @return {Octree} A reference to this Octree. - */ - calcBox(): Octree; - /** - * Splits the Octree. This method is used recursively when - * building the Octree. - * - * @param {number} level - The current level. - * @return {Octree} A reference to this Octree. - */ - split(level: number): Octree; - /** - * Builds the Octree. - * - * @return {Octree} A reference to this Octree. - */ - build(): Octree; - /** - * Computes the triangles that potentially intersect with the given ray. - * - * @param {Ray} ray - The ray to test. - * @param {Array} triangles - The target array that holds the triangles. - */ - getRayTriangles(ray: Ray, triangles: Array): void; - /** - * Computes the intersection between the given capsule and triangle. - * - * @param {Capsule} capsule - The capsule to test. - * @param {Triangle} triangle - The triangle to test. - * @return {Object|false} The intersection object. If no intersection - * is detected, the method returns `false`. - */ - triangleCapsuleIntersect(capsule: Capsule, triangle: Triangle): Object | false; - /** - * Computes the intersection between the given bounding box and triangle. - * - * @param {Box3} box - The bounding box to test. - * @param {Triangle} triangle - The triangle to test. - * @return {Object|false} The intersection object. If no intersection - * is detected, the method returns `false`. - */ - triangleBoxIntersect(box: Box3, triangle: Triangle): Object | false; - /** - * Computes the intersection between the given sphere and triangle. - * - * @param {Sphere} sphere - The sphere to test. - * @param {Triangle} triangle - The triangle to test. - * @return {Object|false} The intersection object. If no intersection - * is detected, the method returns `false`. - */ - triangleSphereIntersect(sphere: Sphere, triangle: Triangle): Object | false; - /** - * Computes the triangles that potentially intersect with the given bounding sphere. - * - * @param {Sphere} sphere - The sphere to test. - * @param {Array} triangles - The target array that holds the triangles. - */ - getSphereTriangles(sphere: Sphere, triangles: Array): void; - /** - * Computes the triangles that potentially intersect with the given bounding box. - * - * @param {Box3} box - The bounding box. - * @param {Array} triangles - The target array that holds the triangles. - */ - getBoxTriangles(box: Box3, triangles: Array): void; - /** - * Computes the triangles that potentially intersect with the given capsule. - * - * @param {Capsule} capsule - The capsule to test. - * @param {Array} triangles - The target array that holds the triangles. - */ - getCapsuleTriangles(capsule: Capsule, triangles: Array): void; - /** - * Performs a bounding box intersection test with this Octree. - * - * @param {Box3} box - The bounding box to test. - * @return {Object|boolean} The intersection object. If no intersection - * is detected, the method returns `false`. - */ - boxIntersect(box: Box3): Object | boolean; - /** - * Performs a bounding sphere intersection test with this Octree. - * - * @param {Sphere} sphere - The bounding sphere to test. - * @return {Object|boolean} The intersection object. If no intersection - * is detected, the method returns `false`. - */ - sphereIntersect(sphere: Sphere): Object | boolean; - /** - * Performs a capsule intersection test with this Octree. - * - * @param {Capsule} capsule - The capsule to test. - * @return {Object|boolean} The intersection object. If no intersection - * is detected, the method returns `false`. - */ - capsuleIntersect(capsule: Capsule): Object | boolean; - /** - * Performs a ray intersection test with this Octree. - * - * @param {Ray} ray - The ray to test. - * @return {Object|boolean} The nearest intersection object. If no intersection - * is detected, the method returns `false`. - */ - rayIntersect(ray: Ray): Object | boolean; - /** - * Constructs the Octree from the given 3D object. - * - * @param {Object3D} group - The scene graph node. - * @return {Octree} A reference to this Octree. - */ - fromGraphNode(group: Object3D): Octree; - /** - * Clears the Octree by making it empty. - * - * @return {Octree} A reference to this Octree. - */ - clear(): Octree; -} -import { Box3 } from 'three'; -import { Layers } from 'three'; -import { Triangle } from 'three'; -import { Capsule } from '../math/Capsule.js'; -import { Sphere } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/math/SimplexNoise.d.ts b/jsdoc-testing/jsdoc/examples/jsm/math/SimplexNoise.d.ts deleted file mode 100644 index b6ba529db..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/math/SimplexNoise.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * A utility class providing noise functions. - * - * The code is based on [Simplex noise demystified](https://web.archive.org/web/20210210162332/http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf) - * by Stefan Gustavson, 2005. - * - * @three_import import { SimplexNoise } from 'three/addons/math/SimplexNoise.js'; - */ -export class SimplexNoise { - /** - * Constructs a new simplex noise object. - * - * @param {Object} [r=Math] - A math utility class that holds a `random()` method. This makes it - * possible to pass in custom random number generator. - */ - constructor(r?: Object); - grad3: number[][]; - grad4: number[][]; - p: number[]; - perm: number[]; - simplex: number[][]; - /** - * A 2D simplex noise method. - * - * @param {number} xin - The x coordinate. - * @param {number} yin - The y coordinate. - * @return {number} The noise value. - */ - noise(xin: number, yin: number): number; - /** - * A 3D simplex noise method. - * - * @param {number} xin - The x coordinate. - * @param {number} yin - The y coordinate. - * @param {number} zin - The z coordinate. - * @return {number} The noise value. - */ - noise3d(xin: number, yin: number, zin: number): number; - /** - * A 4D simplex noise method. - * - * @param {number} x - The x coordinate. - * @param {number} y - The y coordinate. - * @param {number} z - The z coordinate. - * @param {number} w - The w coordinate. - * @return {number} The noise value. - */ - noise4d(x: number, y: number, z: number, w: number): number; - _dot(g: any, x: any, y: any): number; - _dot3(g: any, x: any, y: any, z: any): number; - _dot4(g: any, x: any, y: any, z: any, w: any): number; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/ConvexObjectBreaker.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/ConvexObjectBreaker.d.ts deleted file mode 100644 index f1201ad74..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/misc/ConvexObjectBreaker.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -/** - * This class can be used to subdivide a convex Geometry object into pieces. - * - * Use the function prepareBreakableObject to prepare a Mesh object to be broken. - * Then, call the various functions to subdivide the object (subdivideByImpact, cutByPlane). - * Sub-objects that are product of subdivision don't need prepareBreakableObject to be called on them. - * - * Requisites for the object: - * - Mesh object must have a buffer geometry and a material. - * - Vertex normals must be planar (not smoothed). - * - The geometry must be convex (this is not checked in the library). You can create convex - * geometries with {@link ConvexGeometry}. The {@link BoxGeometry}, {@link SphereGeometry} and other - * convex primitives can also be used. - * - * Note: This lib adds member variables to object's userData member (see prepareBreakableObject function) - * Use with caution and read the code when using with other libs. - * - * @three_import import { ConvexObjectBreaker } from 'three/addons/misc/ConvexObjectBreaker.js'; - */ -export class ConvexObjectBreaker { - static transformFreeVector(v: any, m: any): any; - static transformFreeVectorInverse(v: any, m: any): any; - static transformTiedVectorInverse(v: any, m: any): any; - static transformPlaneToLocalSpace(plane: any, m: any, resultPlane: any): void; - /** - * Constructs a new convex object breaker. - * - * @param {number} [minSizeForBreak=1.4] - Min size a debris can have to break. - * @param {number} [smallDelta=0.0001] - Max distance to consider that a point belongs to a plane. - */ - constructor(minSizeForBreak?: number, smallDelta?: number); - minSizeForBreak: number; - smallDelta: number; - tempLine1: Line3; - tempPlane1: Plane; - tempPlane2: Plane; - tempPlane_Cut: Plane; - tempCM1: Vector3; - tempCM2: Vector3; - tempVector3: Vector3; - tempVector3_2: Vector3; - tempVector3_3: Vector3; - tempVector3_P0: Vector3; - tempVector3_P1: Vector3; - tempVector3_P2: Vector3; - tempVector3_N0: Vector3; - tempVector3_N1: Vector3; - tempVector3_AB: Vector3; - tempVector3_CB: Vector3; - tempResultObjects: { - object1: null; - object2: null; - }; - segments: boolean[]; - /** - * Must be called for all 3D objects that should be breakable. - * - * @param {Object3D} object - The 3D object. It must have a convex geometry. - * @param {number} mass - The 3D object's mass in kg. Must be greater than `0`. - * @param {Vector3} velocity - The 3D object's velocity. - * @param {Vector3} angularVelocity - The 3D object's angular velocity. - * @param {boolean} breakable - Whether the 3D object is breakable or not. - */ - prepareBreakableObject(object: Object3D, mass: number, velocity: Vector3, angularVelocity: Vector3, breakable: boolean): void; - /** - * Subdivides the given 3D object into pieces by an impact (meaning another object hits - * the given 3D object at a certain surface point). - * - * @param {Object3D} object - The 3D object to subdivide. - * @param {Vector3} pointOfImpact - The point of impact. - * @param {Vector3} normal - The impact normal. - * @param {number} maxRadialIterations - Iterations for radial cuts. - * @param {number} maxRandomIterations - Max random iterations for not-radial cuts. - * @return {Array} The array of pieces. - */ - subdivideByImpact(object: Object3D, pointOfImpact: Vector3, normal: Vector3, maxRadialIterations: number, maxRandomIterations: number): Array; - /** - * Subdivides the given 3D object into pieces by a plane. - * - * @param {Object3D} object - The 3D object to subdivide. - * @param {Plane} plane - The plane to cut the 3D object. - * @param {{object1:?Mesh,object2:?Mesh}} output - An object that stores the pieces. - * @return {number} The number of pieces. - */ - cutByPlane(object: Object3D, plane: Plane, output: { - object1: Mesh | null; - object2: Mesh | null; - }): number; -} -import { Line3 } from 'three'; -import { Plane } from 'three'; -import { Vector3 } from 'three'; -import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/Gyroscope.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/Gyroscope.d.ts deleted file mode 100644 index 783a39ef5..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/misc/Gyroscope.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * A special type of 3D object that takes a position from the scene graph hierarchy - * but uses its local rotation as world rotation. It works like real-world gyroscope - - * you can move it around using hierarchy while its orientation stays fixed with - * respect to the world. - * - * @augments Object3D - * @three_import import { Gyroscope } from 'three/addons/misc/Gyroscope.js'; - */ -export class Gyroscope extends Object3D { - updateMatrixWorld(force: any): void; -} -import { Object3D } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/MD2Character.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/MD2Character.d.ts deleted file mode 100644 index 39a32d240..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/misc/MD2Character.d.ts +++ /dev/null @@ -1,133 +0,0 @@ -/** - * This class represents a management component for animated MD2 - * character assets. - * - * @three_import import { MD2Character } from 'three/addons/misc/MD2Character.js'; - */ -export class MD2Character { - /** - * The mesh scale. - * - * @type {number} - * @default 1 - */ - scale: number; - /** - * The FPS - * - * @type {number} - * @default 6 - */ - animationFPS: number; - /** - * The root 3D object - * - * @type {Object3D} - */ - root: Object3D; - /** - * The body mesh. - * - * @type {?Mesh} - * @default null - */ - meshBody: Mesh | null; - /** - * The weapon mesh. - * - * @type {?Mesh} - * @default null - */ - meshWeapon: Mesh | null; - /** - * The body skins. - * - * @type {Array} - */ - skinsBody: Array; - /** - * The weapon skins. - * - * @type {Array} - */ - skinsWeapon: Array; - /** - * The weapon meshes. - * - * @type {Array} - */ - weapons: Array; - /** - * The name of the active animation clip. - * - * @type {?string} - * @default null - */ - activeAnimationClipName: string | null; - /** - * The animation mixer. - * - * @type {?AnimationMixer} - * @default null - */ - mixer: AnimationMixer | null; - /** - * The `onLoad` callback function. - * - * @type {Function} - */ - onLoadComplete: Function; - loadCounter: number; - /** - * Loads the character model for the given config. - * - * @param {Object} config - The config which defines the model and textures paths. - */ - loadParts(config: Object): void; - /** - * Sets the animation playback rate. - * - * @param {number} rate - The playback rate to set. - */ - setPlaybackRate(rate: number): void; - /** - * Sets the wireframe material flag. - * - * @param {boolean} wireframeEnabled - Whether to enable wireframe rendering or not. - */ - setWireframe(wireframeEnabled: boolean): void; - /** - * Sets the skin defined by the given skin index. This will result in a different texture - * for the body mesh. - * - * @param {number} index - The skin index. - */ - setSkin(index: number): void; - /** - * Sets the weapon defined by the given weapon index. This will result in a different weapon - * hold by the character. - * - * @param {number} index - The weapon index. - */ - setWeapon(index: number): void; - /** - * Sets the defined animation clip as the active animation. - * - * @param {string} clipName - The name of the animation clip. - */ - setAnimation(clipName: string): void; - activeClipName: string | undefined; - /** - * Synchronizes the weapon with the body animation. - */ - syncWeaponAnimation(): void; - /** - * Updates the animations of the mesh. Must be called inside the animation loop. - * - * @param {number} delta - The delta time in seconds. - */ - update(delta: number): void; -} -import { Object3D } from 'three'; -import { Mesh } from 'three'; -import { AnimationMixer } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/MD2CharacterComplex.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/MD2CharacterComplex.d.ts deleted file mode 100644 index 9ccc09604..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/misc/MD2CharacterComplex.d.ts +++ /dev/null @@ -1,210 +0,0 @@ -/** - * This class represents a management component for animated MD2 - * character assets. It provides a larger API compared to {@link MD2Character}. - * - * @three_import import { MD2CharacterComplex } from 'three/addons/misc/MD2CharacterComplex.js'; - */ -export class MD2CharacterComplex { - /** - * The mesh scale. - * - * @type {number} - * @default 1 - */ - scale: number; - /** - * The FPS - * - * @type {number} - * @default 6 - */ - animationFPS: number; - /** - * The transition frames. - * - * @type {number} - * @default 15 - */ - transitionFrames: number; - /** - * The character's maximum speed. - * - * @type {number} - * @default 275 - */ - maxSpeed: number; - /** - * The character's maximum reverse speed. - * - * @type {number} - * @default - 275 - */ - maxReverseSpeed: number; - /** - * The character's front acceleration. - * - * @type {number} - * @default 600 - */ - frontAcceleration: number; - /** - * The character's back acceleration. - * - * @type {number} - * @default 600 - */ - backAcceleration: number; - /** - * The character's front deceleration. - * - * @type {number} - * @default 600 - */ - frontDeceleration: number; - /** - * The character's angular speed. - * - * @type {number} - * @default 2.5 - */ - angularSpeed: number; - /** - * The root 3D object - * - * @type {Object3D} - */ - root: Object3D; - /** - * The body mesh. - * - * @type {?Mesh} - * @default null - */ - meshBody: Mesh | null; - /** - * The weapon mesh. - * - * @type {?Mesh} - * @default null - */ - meshWeapon: Mesh | null; - /** - * The movement controls. - * - * @type {?Object} - * @default null - */ - controls: Object | null; - /** - * The body skins. - * - * @type {Array} - */ - skinsBody: Array; - /** - * The weapon skins. - * - * @type {Array} - */ - skinsWeapon: Array; - /** - * The weapon meshes. - * - * @type {Array} - */ - weapons: Array; - /** - * The current skin. - * - * @type {Texture} - * @default undefined - */ - currentSkin: Texture; - onLoadComplete: () => void; - meshes: any[]; - animations: {}; - loadCounter: number; - speed: number; - bodyOrientation: number; - walkSpeed: number; - crouchSpeed: number; - activeAnimation: any; - oldAnimation: any; - /** - * Toggles shadow casting and receiving on the character's meshes. - * - * @param {boolean} enable - Whether to enable shadows or not. - */ - enableShadows(enable: boolean): void; - /** - * Toggles visibility on the character's meshes. - * - * @param {boolean} enable - Whether the character is visible or not. - */ - setVisible(enable: boolean): void; - /** - * Shares certain resources from a different character model. - * - * @param {MD2CharacterComplex} original - The original MD2 character. - */ - shareParts(original: MD2CharacterComplex): void; - /** - * Loads the character model for the given config. - * - * @param {Object} config - The config which defines the model and textures paths. - */ - loadParts(config: Object): void; - /** - * Sets the animation playback rate. - * - * @param {number} rate - The playback rate to set. - */ - setPlaybackRate(rate: number): void; - /** - * Sets the wireframe material flag. - * - * @param {boolean} wireframeEnabled - Whether to enable wireframe rendering or not. - */ - setWireframe(wireframeEnabled: boolean): void; - /** - * Sets the skin defined by the given skin index. This will result in a different texture - * for the body mesh. - * - * @param {number} index - The skin index. - */ - setSkin(index: number): void; - /** - * Sets the weapon defined by the given weapon index. This will result in a different weapon - * hold by the character. - * - * @param {number} index - The weapon index. - */ - setWeapon(index: number): void; - /** - * Sets the defined animation clip as the active animation. - * - * @param {string} animationName - The name of the animation clip. - */ - setAnimation(animationName: string): void; - blendCounter: number | undefined; - update(delta: any): void; - /** - * Updates the animations of the mesh. Must be called inside the animation loop. - * - * @param {number} delta - The delta time in seconds. - */ - updateAnimations(delta: number): void; - /** - * Updates the animation state based on the control inputs. - */ - updateBehaviors(): void; - /** - * Transforms the character model based on the control input. - * - * @param {number} delta - The delta time in seconds. - */ - updateMovementModel(delta: number): void; - _createPart(geometry: any, skinMap: any): MorphBlendMesh; -} -import { Object3D } from 'three'; -import { MorphBlendMesh } from '../misc/MorphBlendMesh.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/MorphAnimMesh.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/MorphAnimMesh.d.ts deleted file mode 100644 index 565013827..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/misc/MorphAnimMesh.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * A special type of an animated mesh with a simple interface - * for animation playback. It allows to playback just one animation - * without any transitions or fading between animation changes. - * - * @augments Mesh - * @three_import import { MorphAnimMesh } from 'three/addons/misc/MorphAnimMesh.js'; - */ -export class MorphAnimMesh extends Mesh { - /** - * Constructs a new morph anim mesh. - * - * @param {BufferGeometry} [geometry] - The mesh geometry. - * @param {Material|Array} [material] - The mesh material. - */ - constructor(geometry?: BufferGeometry, material?: Material | Array); - /** - * The internal animation mixer. - * - * @type {AnimationMixer} - */ - mixer: AnimationMixer; - /** - * The current active animation action. - * - * @type {?AnimationAction} - * @default null - */ - activeAction: AnimationAction | null; - /** - * Sets the animation playback direction to "forward". - */ - setDirectionForward(): void; - /** - * Sets the animation playback direction to "backward". - */ - setDirectionBackward(): void; - /** - * Plays the defined animation clip. The implementation assumes the animation - * clips are stored in {@link Object3D#animations} or the geometry. - * - * @param {string} label - The name of the animation clip. - * @param {number} fps - The FPS of the animation clip. - */ - playAnimation(label: string, fps: number): void; - /** - * Updates the animations of the mesh. Must be called inside the animation loop. - * - * @param {number} delta - The delta time in seconds. - */ - updateAnimation(delta: number): void; - copy(source: any, recursive: any): this; -} -import { Mesh } from 'three'; -import { AnimationMixer } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/MorphBlendMesh.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/MorphBlendMesh.d.ts deleted file mode 100644 index 153109c6a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/misc/MorphBlendMesh.d.ts +++ /dev/null @@ -1,124 +0,0 @@ -/** - * A special type of an animated mesh with a more advanced interface - * for animation playback. Unlike {@link MorphAnimMesh}. It allows to - * playback more than one morph animation at the same time but without - * fading options. - * - * @augments Mesh - * @three_import import { MorphBlendMesh } from 'three/addons/misc/MorphBlendMesh.js'; - */ -export class MorphBlendMesh extends Mesh { - /** - * Constructs a new morph blend mesh. - * - * @param {BufferGeometry} [geometry] - The mesh geometry. - * @param {Material|Array} [material] - The mesh material. - */ - constructor(geometry?: BufferGeometry, material?: Material | Array); - /** - * A dictionary of animations. - * - * @type {Object} - */ - animationsMap: { - [x: string]: Object; - }; - /** - * A list of animations. - * - * @type {Array} - */ - animationsList: Array; - /** - * Creates a new animation. - * - * @param {string} name - The animation name. - * @param {number} start - The start time. - * @param {number} end - The end time. - * @param {number} fps - The FPS. - */ - createAnimation(name: string, start: number, end: number, fps: number): void; - /** - * Automatically creates animations based on the values in - * {@link Mesh#morphTargetDictionary}. - * - * @param {number} fps - The FPS of all animations. - */ - autoCreateAnimations(fps: number): void; - firstAnimation: string | undefined; - /** - * Sets the animation playback direction to "forward" for the - * defined animation. - * - * @param {string} name - The animation name. - */ - setAnimationDirectionForward(name: string): void; - /** - * Sets the animation playback direction to "backward" for the - * defined animation. - * - * @param {string} name - The animation name. - */ - setAnimationDirectionBackward(name: string): void; - /** - * Sets the FPS to the given value for the defined animation. - * - * @param {string} name - The animation name. - * @param {number} fps - The FPS to set. - */ - setAnimationFPS(name: string, fps: number): void; - /** - * Sets the duration to the given value for the defined animation. - * - * @param {string} name - The animation name. - * @param {number} duration - The duration to set. - */ - setAnimationDuration(name: string, duration: number): void; - /** - * Sets the weight to the given value for the defined animation. - * - * @param {string} name - The animation name. - * @param {number} weight - The weight to set. - */ - setAnimationWeight(name: string, weight: number): void; - /** - * Sets the time to the given value for the defined animation. - * - * @param {string} name - The animation name. - * @param {number} time - The time to set. - */ - setAnimationTime(name: string, time: number): void; - /** - * Returns the time for the defined animation. - * - * @param {string} name - The animation name. - * @return {number} The time. - */ - getAnimationTime(name: string): number; - /** - * Returns the duration for the defined animation. - * - * @param {string} name - The animation name. - * @return {number} The duration. - */ - getAnimationDuration(name: string): number; - /** - * Plays the defined animation. - * - * @param {string} name - The animation name. - */ - playAnimation(name: string): void; - /** - * Stops the defined animation. - * - * @param {string} name - The animation name. - */ - stopAnimation(name: string): void; - /** - * Updates the animations of the mesh. - * - * @param {number} delta - The delta time in seconds. - */ - update(delta: number): void; -} -import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/ProgressiveLightMap.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/ProgressiveLightMap.d.ts deleted file mode 100644 index ce7c04e65..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/misc/ProgressiveLightMap.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Progressive Light Map Accumulator, by [zalo](https://github.com/zalo/). - * - * To use, simply construct a `ProgressiveLightMap` object, - * `plmap.addObjectsToLightMap(object)` an array of semi-static - * objects and lights to the class once, and then call - * `plmap.update(camera)` every frame to begin accumulating - * lighting samples. - * - * This should begin accumulating lightmaps which apply to - * your objects, so you can start jittering lighting to achieve - * the texture-space effect you're looking for. - * - * This class can only be used with {@link WebGLRenderer}. - * When using {@link WebGPURenderer}, import from `ProgressiveLightMapGPU.js`. - * - * @three_import import { ProgressiveLightMap } from 'three/addons/misc/ProgressiveLightMap.js'; - */ -export class ProgressiveLightMap { - /** - * Constructs a new progressive light map. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {number} [res=1024] - The side-long dimension of the total lightmap. - */ - constructor(renderer: WebGLRenderer, res?: number); - /** - * The renderer. - * - * @type {WebGLRenderer} - */ - renderer: WebGLRenderer; - /** - * The side-long dimension of the total lightmap. - * - * @type {number} - * @default 1024 - */ - res: number; - lightMapContainers: any[]; - scene: Scene; - buffer1Active: boolean; - firstUpdate: boolean; - labelMesh: Mesh | null; - blurringPlane: Mesh | null; - progressiveLightMap1: WebGLRenderTarget; - progressiveLightMap2: WebGLRenderTarget; - uvMat: MeshPhongMaterial; - /** - * Sets these objects' materials' lightmaps and modifies their uv1's. - * - * @param {Array} objects - An array of objects and lights to set up your lightmap. - */ - addObjectsToLightMap(objects: Array): void; - uv_boxes: any[] | undefined; - /** - * This function renders each mesh one at a time into their respective surface maps. - * - * @param {Camera} camera - The camera the scene is rendered with. - * @param {number} [blendWindow=100] - When >1, samples will accumulate over time. - * @param {boolean} [blurEdges=true] - Whether to fix UV Edges via blurring. - */ - update(camera: Camera, blendWindow?: number, blurEdges?: boolean): void; - /** - * Draws the lightmap in the main scene. Call this after adding the objects to it. - * - * @param {boolean} visible - Whether the debug plane should be visible - * @param {Vector3} [position] - Where the debug plane should be drawn - */ - showDebugLightmap(visible: boolean, position?: Vector3): void; - /** - * Creates the Blurring Plane. - * - * @private - * @param {number} res - The square resolution of this object's lightMap. - * @param {WebGLRenderTarget} lightMap - The lightmap to initialize the plane with. - */ - private _initializeBlurPlane; - /** - * Frees all internal resources. - */ - dispose(): void; -} -import { Scene } from 'three'; -import { Mesh } from 'three'; -import { WebGLRenderTarget } from 'three'; -import { MeshPhongMaterial } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/ProgressiveLightMapGPU.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/ProgressiveLightMapGPU.d.ts deleted file mode 100644 index f6dcf6335..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/misc/ProgressiveLightMapGPU.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Progressive Light Map Accumulator, by [zalo](https://github.com/zalo/). - * - * To use, simply construct a `ProgressiveLightMap` object, - * `plmap.addObjectsToLightMap(object)` an array of semi-static - * objects and lights to the class once, and then call - * `plmap.update(camera)` every frame to begin accumulating - * lighting samples. - * - * This should begin accumulating lightmaps which apply to - * your objects, so you can start jittering lighting to achieve - * the texture-space effect you're looking for. - * - * This class can only be used with {@link WebGPURenderer}. - * When using {@link WebGLRenderer}, import from `ProgressiveLightMap.js`. - * - * @three_import import { ProgressiveLightMap } from 'three/addons/misc/ProgressiveLightMapGPU.js'; - */ -export class ProgressiveLightMap { - /** - * @param {WebGPURenderer} renderer - The renderer. - * @param {number} [resolution=1024] - The side-long dimension of the total lightmap. - */ - constructor(renderer: WebGPURenderer, resolution?: number); - /** - * The renderer. - * - * @type {WebGPURenderer} - */ - renderer: WebGPURenderer; - /** - * The side-long dimension of the total lightmap. - * - * @type {number} - * @default 1024 - */ - resolution: number; - _lightMapContainers: any[]; - _scene: Scene; - _buffer1Active: boolean; - _labelMesh: Mesh | null; - _blurringPlane: Mesh | null; - _progressiveLightMap1: RenderTarget; - _progressiveLightMap2: RenderTarget; - _averagingWindow: import("three/webgpu").UniformNode; - _previousShadowMap: import("three/webgpu").TextureNode; - _uvMat: MeshPhongNodeMaterial; - /** - * Sets these objects' materials' lightmaps and modifies their uv1's. - * - * @param {Array} objects - An array of objects and lights to set up your lightmap. - */ - addObjectsToLightMap(objects: Array): void; - /** - * Frees all internal resources. - */ - dispose(): void; - /** - * This function renders each mesh one at a time into their respective surface maps. - * - * @param {Camera} camera - The camera the scene is rendered with. - * @param {number} [blendWindow=100] - When >1, samples will accumulate over time. - * @param {boolean} [blurEdges=true] - Whether to fix UV Edges via blurring. - */ - update(camera: Camera, blendWindow?: number, blurEdges?: boolean): void; - /** - * Draws the lightmap in the main scene. Call this after adding the objects to it. - * - * @param {boolean} visible - Whether the debug plane should be visible - * @param {Vector3} [position] - Where the debug plane should be drawn - */ - showDebugLightmap(visible: boolean, position?: Vector3): void; - /** - * Creates the Blurring Plane. - * - * @private - */ - private _initializeBlurPlane; -} -import { Scene } from 'three/webgpu'; -import { Mesh } from 'three/webgpu'; -import { RenderTarget } from 'three/webgpu'; -import { MeshPhongNodeMaterial } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/RollerCoaster.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/RollerCoaster.d.ts deleted file mode 100644 index 5e3866664..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/misc/RollerCoaster.d.ts +++ /dev/null @@ -1,69 +0,0 @@ -/** - * A procedural roller coaster geometry. - * - * @augments BufferGeometry - * @three_import import { RollerCoasterGeometry } from 'three/addons/misc/RollerCoaster.js'; - */ -export class RollerCoasterGeometry extends BufferGeometry { - /** - * Constructs a new geometry. - * - * @param {Curve} curve - The curve to generate the geometry along. - * @param {number} divisions - The number of divisions which defines the detail of the geometry. - */ - constructor(curve: Curve, divisions: number); -} -/** - * A procedural roller coaster lifters geometry. - * - * @augments BufferGeometry - * @three_import import { RollerCoasterLiftersGeometry } from 'three/addons/misc/RollerCoaster.js'; - */ -export class RollerCoasterLiftersGeometry extends BufferGeometry { - /** - * Constructs a new geometry. - * - * @param {Curve} curve - The curve to generate the geometry along. - * @param {number} divisions - The number of divisions which defines the detail of the geometry. - */ - constructor(curve: Curve, divisions: number); -} -/** - * A procedural roller coaster shadow geometry. - * - * @augments BufferGeometry - * @three_import import { RollerCoasterShadowGeometry } from 'three/addons/misc/RollerCoaster.js'; - */ -export class RollerCoasterShadowGeometry extends BufferGeometry { - /** - * Constructs a new geometry. - * - * @param {Curve} curve - The curve to generate the geometry along. - * @param {number} divisions - The number of divisions which defines the detail of the geometry. - */ - constructor(curve: Curve, divisions: number); -} -/** - * A procedural sky geometry. - * - * @augments BufferGeometry - * @three_import import { SkyGeometry } from 'three/addons/misc/RollerCoaster.js'; - */ -export class SkyGeometry extends BufferGeometry { -} -/** - * A procedural trees geometry. - * - * @augments BufferGeometry - * @three_import import { TreesGeometry } from 'three/addons/misc/RollerCoaster.js'; - */ -export class TreesGeometry extends BufferGeometry { - /** - * Constructs a new geometry. - * - * @param {Mesh} landscape - A mesh representing the landscape. Trees will be positioned - * randomly on the landscape's surface. - */ - constructor(landscape: Mesh); -} -import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/TubePainter.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/TubePainter.d.ts deleted file mode 100644 index 398fe3186..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/misc/TubePainter.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * @classdesc This module can be used to paint tube-like meshes - * along a sequence of points. This module is used in a XR - * painter demo. - * - * ```js - * const painter = new TubePainter(); - * scene.add( painter.mesh ); - * ``` - * - * @name TubePainter - * @class - * @three_import import { TubePainter } from 'three/addons/misc/TubePainter.js'; - */ -export function TubePainter(): { - /** - * The "painted" tube mesh. Must be added to the scene. - * - * @name TubePainter#mesh - * @type {Mesh} - */ - mesh: Mesh; - /** - * Moves the current painting position to the given value. - * - * @method - * @name TubePainter#moveTo - * @param {Vector3} position The new painting position. - */ - moveTo: (position: any) => void; - /** - * Draw a stroke from the current position to the given one. - * This method extends the tube while drawing with the XR - * controllers. - * - * @method - * @name TubePainter#lineTo - * @param {Vector3} position The destination position. - */ - lineTo: (position: any) => void; - /** - * Sets the size of newly rendered tube segments. - * - * @method - * @name TubePainter#setSize - * @param {number} size The size. - */ - setSize: (value: any) => void; - /** - * Sets the color of newly rendered tube segments. - * - * @method - * @name TubePainter#setColor - * @param {Color} color The color. - */ - setColor: (value: any) => void; - /** - * Updates the internal geometry buffers so the new painted - * segments are rendered. - * - * @method - * @name TubePainter#update - */ - update: () => void; -}; -export class TubePainter { -} -import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/Volume.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/Volume.d.ts deleted file mode 100644 index 87012184d..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/misc/Volume.d.ts +++ /dev/null @@ -1,163 +0,0 @@ -/** - * This class had been written to handle the output of the {@link NRRDLoader}. - * It contains a volume of data and information about it. For now it only handles 3 dimensional data. - * - * @three_import import { Volume } from 'three/addons/misc/Volume.js'; - */ -export class Volume { - /** - * Constructs a new volume. - * - * @param {number} [xLength] - Width of the volume. - * @param {number} [yLength] - Length of the volume. - * @param {number} [zLength] - Depth of the volume. - * @param {string} [type] - The type of data (uint8, uint16, ...). - * @param {ArrayBuffer} [arrayBuffer] - The buffer with volume data. - */ - constructor(xLength?: number, yLength?: number, zLength?: number, type?: string, arrayBuffer?: ArrayBuffer); - /** - * Width of the volume in the IJK coordinate system. - * - * @type {number} - * @default 1 - */ - xLength: number; - /** - * Height of the volume in the IJK coordinate system. - * - * @type {number} - * @default 1 - */ - yLength: number; - /** - * Depth of the volume in the IJK coordinate system. - * - * @type {number} - * @default 1 - */ - zLength: number; - /** - * The order of the Axis dictated by the NRRD header - * - * @type {Array} - */ - axisOrder: Array; - /** - * The data of the volume. - * - * @type {TypedArray} - */ - data: TypedArray; - /** - * Spacing to apply to the volume from IJK to RAS coordinate system - * - * @type {Array} - */ - spacing: Array; - /** - * Offset of the volume in the RAS coordinate system - * - * @type {Array} - */ - offset: Array; - /** - * The IJK to RAS matrix. - * - * @type {Martrix3} - */ - matrix: Martrix3; - /** - * The RAS to IJK matrix. - * - * @type {Martrix3} - */ - inverseMatrix: Martrix3; - /** - * The list of all the slices associated to this volume - * - * @type {Array} - */ - sliceList: Array; - /** - * Whether to use segmentation mode or not. - * It can load 16-bits nrrds correctly. - * - * @type {boolean} - * @default false - */ - segmentation: boolean; - /** - * This array holds the dimensions of the volume in the RAS space - * - * @type {Array} - */ - RASDimensions: Array; - /** - * Shortcut for data[access(i,j,k)]. - * - * @param {number} i - First coordinate. - * @param {number} j - Second coordinate. - * @param {number} k - Third coordinate. - * @returns {number} The value in the data array. - */ - getData(i: number, j: number, k: number): number; - /** - * Compute the index in the data array corresponding to the given coordinates in IJK system. - * - * @param {number} i - First coordinate. - * @param {number} j - Second coordinate. - * @param {number} k - Third coordinate. - * @returns {number} The index. - */ - access(i: number, j: number, k: number): number; - /** - * Retrieve the IJK coordinates of the voxel corresponding of the given index in the data. - * - * @param {number} index - Index of the voxel. - * @returns {Array} The IJK coordinates as `[x,y,z]`. - */ - reverseAccess(index: number): Array; - /** - * Apply a function to all the voxels, be careful, the value will be replaced. - * - * @param {Function} functionToMap A function to apply to every voxel, will be called with the following parameters: - * value of the voxel, index of the voxel, the data (TypedArray). - * @param {Object} context - You can specify a context in which call the function, default if this Volume. - * @returns {Volume} A reference to this instance. - */ - map(functionToMap: Function, context: Object): Volume; - /** - * Compute the orientation of the slice and returns all the information relative to the geometry such as sliceAccess, - * the plane matrix (orientation and position in RAS coordinate) and the dimensions of the plane in both coordinate system. - * - * @param {('x'|'y'|'z')} axis - The normal axis to the slice. - * @param {number} RASIndex - The index of the slice. - * @returns {Object} An object containing all the useful information on the geometry of the slice. - */ - extractPerpendicularPlane(axis: ("x" | "y" | "z"), RASIndex: number): Object; - /** - * Returns a slice corresponding to the given axis and index. - * The coordinate are given in the Right Anterior Superior coordinate format. - * - * @param {('x'|'y'|'z')} axis - The normal axis to the slice. - * @param {number} index - The index of the slice. - * @returns {VolumeSlice} The extracted slice. - */ - extractSlice(axis: ("x" | "y" | "z"), index: number): VolumeSlice; - /** - * Call repaint on all the slices extracted from this volume. - * - * @see {@link VolumeSlice#repaint} - * @returns {Volume} A reference to this volume. - */ - repaintAllSlices(): Volume; - /** - * Compute the minimum and the maximum of the data in the volume. - * - * @returns {Array} The min/max data as `[min,max]`. - */ - computeMinMax(): Array; - min: number | undefined; - max: number | undefined; -} -import { VolumeSlice } from '../misc/VolumeSlice.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/misc/VolumeSlice.d.ts b/jsdoc-testing/jsdoc/examples/jsm/misc/VolumeSlice.d.ts deleted file mode 100644 index 9f4f5a792..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/misc/VolumeSlice.d.ts +++ /dev/null @@ -1,99 +0,0 @@ -/** - * This class has been made to hold a slice of a volume data. - * - * @see {@link Volume} - * @three_import import { VolumeSlice } from 'three/addons/misc/VolumeSlice.js'; - */ -export class VolumeSlice { - /** - * Constructs a new volume slice. - * - * @param {Volume} volume - The associated volume. - * @param {number} [index=0] - The index of the slice. - * @param {('x'|'y'|'z')} [axis='z'] - For now only 'x', 'y' or 'z' but later it will change to a normal vector. - */ - constructor(volume: Volume, index?: number, axis?: ("x" | "y" | "z")); - /** - * The associated volume. - * - * @type {Volume} - */ - volume: Volume; - /** - * The normal axis. - * - * @type {('x'|'y'|'z')} - */ - axis: ("x" | "y" | "z"); - /** - * The final canvas used for the texture. - * - * @type {HTMLCanvasElement} - */ - canvas: HTMLCanvasElement; - /** - * The rendering context of the canvas. - * - * @type {CanvasRenderingContext2D} - */ - ctx: CanvasRenderingContext2D; - /** - * The intermediary canvas used to paint the data. - * - * @type {HTMLCanvasElement} - */ - canvasBuffer: HTMLCanvasElement; - /** - * The rendering context of the canvas buffer, - * - * @type {CanvasRenderingContext2D} - */ - ctxBuffer: CanvasRenderingContext2D; - /** - * The mesh ready to get used in the scene. - * - * @type {Mesh} - */ - mesh: Mesh; - /** - * If set to `true`, `updateGeometry()` will be triggered at the next repaint. - * - * @type {boolean} - * @default true - */ - geometryNeedsUpdate: boolean; - /** - * Width of slice in the original coordinate system, corresponds to the width of the buffer canvas. - * - * @type {number} - * @default 0 - */ - iLength: number; - /** - * Height of slice in the original coordinate system, corresponds to the height of the buffer canvas. - * - * @type {number} - * @default 0 - */ - jLength: number; - /** - * Function that allow the slice to access right data. - * - * @type {?Function} - * @see {@link Volume#extractPerpendicularPlane} - */ - sliceAccess: Function | null; - /** - * Refresh the texture and the geometry if geometryNeedsUpdate is set to `true`. - */ - repaint(): void; - /** - * Refresh the geometry according to axis and index. - * @see {@link Volume#extractPerpendicularPlane} - */ - updateGeometry(): void; - matrix: any; - geometry: PlaneGeometry | undefined; -} -import { Mesh } from 'three'; -import { PlaneGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/modifiers/CurveModifier.d.ts b/jsdoc-testing/jsdoc/examples/jsm/modifiers/CurveModifier.d.ts deleted file mode 100644 index 9fd45f091..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/modifiers/CurveModifier.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -/** - * A modifier for making meshes bend around curves. - * - * This module can only be used with {@link WebGLRenderer}. When using {@link WebGPURenderer}, - * import the class from `CurveModifierGPU.js`. - * - * @three_import import { Flow } from 'three/addons/modifiers/CurveModifier.js'; - */ -export class Flow { - /** - * Constructs a new Flow instance. - * - * @param {Mesh} mesh - The mesh to clone and modify to bend around the curve. - * @param {number} numberOfCurves - The amount of space that should preallocated for additional curves. - */ - constructor(mesh: Mesh, numberOfCurves?: number); - curveArray: any[]; - curveLengthArray: any[]; - object3D: import("three").Object3D; - splineTexture: DataTexture; - uniforms: Object; - /** - * Updates the curve for the given curve index. - * - * @param {number} index - The curve index. - * @param {Curve} curve - The curve that should be used to bend the mesh. - */ - updateCurve(index: number, curve: Curve): void; - /** - * Moves the mesh along the curve. - * - * @param {number} amount - The offset. - */ - moveAlongCurve(amount: number): void; -} -/** - * An instanced version of {@link Flow} for making meshes bend around curves, where the instances are placed on the curve. - * - * This module can only be used with {@link WebGLRenderer}. - * - * @augments Flow - * @three_import import { InstancedFlow } from 'three/addons/modifiers/CurveModifier.js'; - */ -export class InstancedFlow extends Flow { - /** - * Constructs a new InstancedFlow instance. - * - * @param {number} count - The number of instanced elements. - * @param {number} curveCount - The number of curves to preallocate for. - * @param {Geometry} geometry - The geometry to use for the instanced mesh. - * @param {Material} material - The material to use for the instanced mesh. - */ - constructor(count: number, curveCount: number, geometry: Geometry, material: Material); - offsets: any[]; - whichCurve: any[]; - /** - * The extra information about which curve and curve position is stored in the translation components of the matrix for the instanced objects - * This writes that information to the matrix and marks it as needing update. - * - * @param {number} index - The index of tge instanced element to update. - */ - writeChanges(index: number): void; - /** - * Move an individual element along the curve by a specific amount. - * - * @param {number} index - Which element to update. - * @param {number} offset - The offset. - */ - moveIndividualAlongCurve(index: number, offset: number): void; - /** - * Select which curve to use for an element. - * - * @param {number} index - The index of the instanced element to update. - * @param {number} curveNo - The index of the curve it should use. - */ - setCurve(index: number, curveNo: number): void; -} -import { DataTexture } from 'three'; -import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/modifiers/CurveModifierGPU.d.ts b/jsdoc-testing/jsdoc/examples/jsm/modifiers/CurveModifierGPU.d.ts deleted file mode 100644 index c88b4f893..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/modifiers/CurveModifierGPU.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * A modifier for making meshes bend around curves. - * - * This module can only be used with {@link WebGPURenderer}. When using {@link WebGLRenderer}, - * import the class from `CurveModifier.js`. - * - * @three_import import { Flow } from 'three/addons/modifiers/CurveModifierGPU.js'; - */ -export class Flow { - /** - * Constructs a new Flow instance. - * - * @param {Mesh} mesh - The mesh to clone and modify to bend around the curve. - * @param {number} numberOfCurves - The amount of space that should preallocated for additional curves. - */ - constructor(mesh: Mesh, numberOfCurves?: number); - curveArray: any[]; - curveLengthArray: any[]; - object3D: import("three").Object3D; - splineTexture: DataTexture; - uniforms: Object; - /** - * Updates the curve for the given curve index. - * - * @param {number} index - The curve index. - * @param {Curve} curve - The curve that should be used to bend the mesh. - */ - updateCurve(index: number, curve: Curve): void; - /** - * Moves the mesh along the curve. - * - * @param {number} amount - The offset. - */ - moveAlongCurve(amount: number): void; -} -import { DataTexture } from 'three'; -import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/modifiers/EdgeSplitModifier.d.ts b/jsdoc-testing/jsdoc/examples/jsm/modifiers/EdgeSplitModifier.d.ts deleted file mode 100644 index 65a5f1d5a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/modifiers/EdgeSplitModifier.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * The modifier can be used to split faces at sharp edges. This allows to compute - * normals without smoothing the edges which can lead to an improved visual result. - * - * ```js - * const modifier = new EdgeSplitModifier(); - * geometry = modifier.modify( geometry, Math.PI * 0.4 ); - * ``` - * - * @three_import import { EdgeSplitModifier } from 'three/addons/modifiers/EdgeSplitModifier.js'; - */ -export class EdgeSplitModifier { - /** - * Returns a new, modified version of the given geometry by applying an edge-split operation. - * Please note that the resulting geometry is always indexed. - * - * @param {BufferGeometry} geometry - The geometry to modify. - * @param {number} cutOffAngle - The cut off angle in radians. - * @param {boolean} [tryKeepNormals=true] - Whether to try to keep normals or not. - * @return {BufferGeometry} A new, modified geometry. - */ - modify(geometry: BufferGeometry, cutOffAngle: number, tryKeepNormals?: boolean): BufferGeometry; -} -import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/modifiers/SimplifyModifier.d.ts b/jsdoc-testing/jsdoc/examples/jsm/modifiers/SimplifyModifier.d.ts deleted file mode 100644 index f867899ab..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/modifiers/SimplifyModifier.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This class can be used to modify a geometry by simplifying it. A typical use - * case for such a modifier is automatic LOD generation. - * - * The implementation is based on [Progressive Mesh type Polygon Reduction Algorithm](https://web.archive.org/web/20230610044040/http://www.melax.com/polychop/) - * by Stan Melax in 1998. - * - * ```js - * const modifier = new SimplifyModifier(); - * geometry = modifier.modify( geometry ); - * ``` - * - * @three_import import { SimplifyModifier } from 'three/addons/modifiers/SimplifyModifier.js'; - */ -export class SimplifyModifier { - /** - * Returns a new, modified version of the given geometry by applying a simplification. - * Please note that the resulting geometry is always non-indexed. - * - * @param {BufferGeometry} geometry - The geometry to modify. - * @param {number} count - The number of vertices to remove. - * @return {BufferGeometry} A new, modified geometry. - */ - modify(geometry: BufferGeometry, count: number): BufferGeometry; -} -import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/modifiers/TessellateModifier.d.ts b/jsdoc-testing/jsdoc/examples/jsm/modifiers/TessellateModifier.d.ts deleted file mode 100644 index 58e45c699..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/modifiers/TessellateModifier.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This class can be used to modify a geometry by breaking its edges if they - * are longer than maximum length. - * - * ```js - * const modifier = new TessellateModifier( 8, 6 ); - * geometry = modifier.modify( geometry ); - * ``` - * - * @three_import import { TessellateModifier } from 'three/addons/modifiers/TessellateModifier.js'; - */ -export class TessellateModifier { - /** - * Constructs a new Tessellate modifier. - * - * @param {number} [maxEdgeLength=0.1] - The maximum edge length. - * @param {number} [maxIterations=6] - The number of iterations. - */ - constructor(maxEdgeLength?: number, maxIterations?: number); - /** - * The maximum edge length. - * - * @type {number} - * @default 0.1 - */ - maxEdgeLength: number; - /** - * The maximum edge length. - * - * @type {number} - * @default 0.1 - */ - maxIterations: number; - /** - * Returns a new, modified version of the given geometry by applying a tessellation. - * Please note that the resulting geometry is always non-indexed. - * - * @param {BufferGeometry} geometry - The geometry to modify. - * @return {BufferGeometry} A new, modified geometry. - */ - modify(geometry: BufferGeometry): BufferGeometry; -} -import { BufferGeometry } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/GroundedSkybox.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/GroundedSkybox.d.ts deleted file mode 100644 index 51d43e1ef..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/objects/GroundedSkybox.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * A ground-projected skybox. - * - * By default the object is centered at the camera, so it is often helpful to set - * `skybox.position.y = height` to put the ground at the origin. - * - * ```js - * const height = 15, radius = 100; - * - * const skybox = new GroundedSkybox( envMap, height, radius ); - * skybox.position.y = height; - * scene.add( skybox ); - * ``` - * - * @augments Mesh - * @three_import import { GroundedSkybox } from 'three/addons/objects/GroundedSkybox.js'; - */ -export class GroundedSkybox extends Mesh { - /** - * Constructs a new ground-projected skybox. - * - * @param {Texture} map - The environment map to use. - * @param {number} height - The height is how far the camera that took the photo was above the ground. - * A larger value will magnify the downward part of the image. - * @param {number} radius - The radius of the skybox. Must be large enough to ensure the scene's camera stays inside. - * @param {number} [resolution=128] - The geometry resolution of the skybox. - */ - constructor(map: Texture, height: number, radius: number, resolution?: number); -} -import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/Lensflare.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/Lensflare.d.ts deleted file mode 100644 index ff0d9bc96..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/objects/Lensflare.d.ts +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Creates a simulated lens flare that tracks a light. - * - * Note that this class can only be used with {@link WebGLRenderer}. - * When using {@link WebGPURenderer}, use {@link LensflareMesh}. - * - * ```js - * const light = new THREE.PointLight( 0xffffff, 1.5, 2000 ); - * - * const lensflare = new Lensflare(); - * lensflare.addElement( new LensflareElement( textureFlare0, 512, 0 ) ); - * lensflare.addElement( new LensflareElement( textureFlare1, 512, 0 ) ); - * lensflare.addElement( new LensflareElement( textureFlare2, 60, 0.6 ) ); - * - * light.add( lensflare ); - * ``` - * - * @augments Mesh - * @three_import import { Lensflare } from 'three/addons/objects/Lensflare.js'; - */ -export class Lensflare extends Mesh { - /** - * Constructs a new lensflare. - */ - constructor(); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLensflare: boolean; - /** - * Adds the given lensflare element to this instance. - * - * @param {LensflareElement} element - The element to add. - */ - addElement: (element: LensflareElement) => void; - onBeforeRender: (renderer: any, scene: any, camera: any) => void; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose: () => void; -} -export namespace Lensflare { - let Geometry: BufferGeometry; -} -/** - * Represents a single flare that can be added to a {@link Lensflare} container. - * - * @three_import import { LensflareElement } from 'three/addons/objects/Lensflare.js'; - */ -export class LensflareElement { - /** - * Constructs a new lensflare element. - * - * @param {Texture} texture - The flare's texture. - * @param {number} [size=1] - The size in pixels. - * @param {number} [distance=0] - The normalized distance (`[0,1]`) from the light source. - * A value of `0` means the flare is located at light source. - * @param {Color} [color] - The flare's color - */ - constructor(texture: Texture, size?: number, distance?: number, color?: Color); - /** - * The flare's texture. - * - * @type {Texture} - */ - texture: Texture; - /** - * The size in pixels. - * - * @type {number} - * @default 1 - */ - size: number; - /** - * The normalized distance (`[0,1]`) from the light source. - * A value of `0` means the flare is located at light source. - * - * @type {number} - * @default 0 - */ - distance: number; - /** - * The flare's color - * - * @type {Color} - * @default (1,1,1) - */ - color: Color; -} -export namespace LensflareElement { - namespace Shader { - let name: string; - namespace uniforms { - namespace map { - let value: null; - } - namespace occlusionMap { - let value_1: null; - export { value_1 as value }; - } - namespace color { - let value_2: null; - export { value_2 as value }; - } - namespace scale { - let value_3: null; - export { value_3 as value }; - } - namespace screenPosition { - let value_4: null; - export { value_4 as value }; - } - } - let vertexShader: string; - let fragmentShader: string; - } -} -import { Mesh } from 'three'; -import { BufferGeometry } from 'three'; -import { Color } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/LensflareMesh.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/LensflareMesh.d.ts deleted file mode 100644 index e4a20536a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/objects/LensflareMesh.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Creates a simulated lens flare that tracks a light. - * - * Note that this class can only be used with {@link WebGPURenderer}. - * When using {@link WebGLRenderer}, use {@link Lensflare}. - * - * ```js - * const light = new THREE.PointLight( 0xffffff, 1.5, 2000 ); - * - * const lensflare = new LensflareMesh(); - * lensflare.addElement( new LensflareElement( textureFlare0, 512, 0 ) ); - * lensflare.addElement( new LensflareElement( textureFlare1, 512, 0 ) ); - * lensflare.addElement( new LensflareElement( textureFlare2, 60, 0.6 ) ); - * - * light.add( lensflare ); - * ``` - * - * @augments Mesh - * @three_import import { LensflareMesh } from 'three/addons/objects/LensflareMesh.js'; - */ -export class LensflareMesh extends Mesh { - /** - * Constructs a new lensflare mesh. - */ - constructor(); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLensflareMesh: boolean; - /** - * Adds the given lensflare element to this instance. - * - * @param {LensflareElement} element - The element to add. - */ - addElement: (element: LensflareElement) => void; - onBeforeRender: (renderer: any, scene: any, camera: any) => void; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose: () => void; -} -export namespace LensflareMesh { - let Geometry: BufferGeometry; -} -export class LensflareElement { - constructor(texture: any, size?: number, distance?: number, color?: Color); - texture: any; - size: number; - distance: number; - color: Color; -} -import { Mesh } from 'three/webgpu'; -import { BufferGeometry } from 'three/webgpu'; -import { Color } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/ReflectorForSSRPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/ReflectorForSSRPass.d.ts deleted file mode 100644 index 2e9c1a8aa..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/objects/ReflectorForSSRPass.d.ts +++ /dev/null @@ -1,139 +0,0 @@ -/** - * ~Options - */ -export type ReflectorForSSRPass = { - /** - * - The reflector's color. - */ - color?: string | number | Color | undefined; - /** - * - The texture width. A higher value results in more clear reflections but is also more expensive. - */ - textureWidth?: number | undefined; - /** - * - The texture height. A higher value results in more clear reflections but is also more expensive. - */ - textureHeight?: number | undefined; - /** - * - The clip bias. - */ - clipBias?: number | undefined; - /** - * - Can be used to pass in a custom shader that defines how the reflective view is projected onto the reflector's geometry. - */ - shader?: Object | undefined; - /** - * - Whether to store depth values in a texture or not. - */ - useDepthTexture?: boolean | undefined; - /** - * - Resolution for the Reflector Pass. - */ - resolution?: Vector2 | undefined; -}; -import { Color } from 'three'; -import { Vector2 } from 'three'; -/** - * A special version of {@link Reflector} for usage with {@link SSRPass}. - * - * @augments Mesh - * @three_import import { ReflectorForSSRPass } from 'three/addons/objects/ReflectorForSSRPass.js'; - */ -export class ReflectorForSSRPass extends Mesh { - /** - * Constructs a new reflector. - * - * @param {BufferGeometry} geometry - The reflector's geometry. - * @param {ReflectorForSSRPass~Options} [options] - The configuration options. - */ - constructor(geometry: BufferGeometry, options?: {}); - isReflectorForSSRPass: boolean; - needsUpdate: boolean; - maxDistance: number; - opacity: number; - color: Color; - resolution: any; - _distanceAttenuation: boolean; - _fresnel: boolean; - material: ShaderMaterial; - doRender: (renderer: any, scene: any, camera: any) => void; - /** - * Returns the reflector's internal render target. - * - * @return {WebGLRenderTarget} The internal render target - */ - getRenderTarget: () => WebGLRenderTarget; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose: () => void; -} -export namespace ReflectorForSSRPass { - namespace ReflectorShader { - let name: string; - namespace defines { - let DISTANCE_ATTENUATION: boolean; - let FRESNEL: boolean; - } - namespace uniforms { - namespace color { - let value: null; - } - namespace tDiffuse { - let value_1: null; - export { value_1 as value }; - } - namespace tDepth { - let value_2: null; - export { value_2 as value }; - } - namespace textureMatrix { - let value_3: Matrix4; - export { value_3 as value }; - } - namespace maxDistance { - let value_4: number; - export { value_4 as value }; - } - namespace opacity { - let value_5: number; - export { value_5 as value }; - } - namespace fresnelCoe { - let value_6: null; - export { value_6 as value }; - } - namespace virtualCameraNear { - let value_7: null; - export { value_7 as value }; - } - namespace virtualCameraFar { - let value_8: null; - export { value_8 as value }; - } - namespace virtualCameraProjectionMatrix { - let value_9: Matrix4; - export { value_9 as value }; - } - namespace virtualCameraMatrixWorld { - let value_10: Matrix4; - export { value_10 as value }; - } - namespace virtualCameraProjectionMatrixInverse { - let value_11: Matrix4; - export { value_11 as value }; - } - namespace resolution { - let value_12: Vector2; - export { value_12 as value }; - } - } - let vertexShader: string; - let fragmentShader: string; - } -} -import { Mesh } from 'three'; -import { ShaderMaterial } from 'three'; -import { WebGLRenderTarget } from 'three'; -import { Matrix4 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/Refractor.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/Refractor.d.ts deleted file mode 100644 index a171e831b..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/objects/Refractor.d.ts +++ /dev/null @@ -1,112 +0,0 @@ -/** - * ~Options - */ -export type Refractor = { - /** - * - The refractor's color. - */ - color?: string | number | Color | undefined; - /** - * - The texture width. A higher value results in more clear refractions but is also more expensive. - */ - textureWidth?: number | undefined; - /** - * - The texture height. A higher value results in more clear refractions but is also more expensive. - */ - textureHeight?: number | undefined; - /** - * - The clip bias. - */ - clipBias?: number | undefined; - /** - * - Can be used to pass in a custom shader that defines how the refractive view is projected onto the reflector's geometry. - */ - shader?: Object | undefined; - /** - * - How many samples to use for MSAA. `0` disables MSAA. - */ - multisample?: number | undefined; -}; -import { Color } from 'three'; -/** - * Can be used to create a flat, refractive surface like for special - * windows or water effects. - * - * Note that this class can only be used with {@link WebGLRenderer}. - * When using {@link WebGPURenderer}, use {@link viewportSharedTexture}. - * - * ```js - * const geometry = new THREE.PlaneGeometry( 100, 100 ); - * - * const refractor = new Refractor( refractorGeometry, { - * color: 0xcbcbcb, - * textureWidth: 1024, - * textureHeight: 1024 - * } ); - * - * scene.add( refractor ); - * ``` - * - * @augments Mesh - * @three_import import { Refractor } from 'three/addons/objects/Refractor.js'; - */ -export class Refractor extends Mesh { - /** - * Constructs a new refractor. - * - * @param {BufferGeometry} geometry - The refractor's geometry. - * @param {Refractor~Options} [options] - The configuration options. - */ - constructor(geometry: BufferGeometry, options?: {}); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isRefractor: boolean; - /** - * The reflector's virtual camera. - * - * @type {PerspectiveCamera} - */ - camera: PerspectiveCamera; - material: ShaderMaterial; - onBeforeRender: (renderer: any, scene: any, camera: any) => void; - /** - * Returns the reflector's internal render target. - * - * @return {WebGLRenderTarget} The internal render target - */ - getRenderTarget: () => WebGLRenderTarget; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose: () => void; -} -export namespace Refractor { - namespace RefractorShader { - let name: string; - namespace uniforms { - namespace color { - let value: null; - } - namespace tDiffuse { - let value_1: null; - export { value_1 as value }; - } - namespace textureMatrix { - let value_2: null; - export { value_2 as value }; - } - } - let vertexShader: string; - let fragmentShader: string; - } -} -import { Mesh } from 'three'; -import { PerspectiveCamera } from 'three'; -import { ShaderMaterial } from 'three'; -import { WebGLRenderTarget } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/ShadowMesh.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/ShadowMesh.d.ts deleted file mode 100644 index 41e8e275f..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/objects/ShadowMesh.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * A Shadow Mesh that follows a shadow-casting mesh in the scene, - * but is confined to a single plane. This technique can be used as - * a very performant alternative to classic shadow mapping. However, - * it has serious limitations like: - * - * - Shadows can only be casted on flat planes. - * - No soft shadows support. - * - * ```js - * const cubeShadow = new ShadowMesh( cube ); - * scene.add( cubeShadow ); - * ``` - * - * @augments Mesh - * @three_import import { ShadowMesh } from 'three/addons/objects/ShadowMesh.js'; - */ -export class ShadowMesh extends Mesh { - /** - * Constructs a new shadow mesh. - * - * @param {Mesh} mesh - The shadow-casting reference mesh. - */ - constructor(mesh: Mesh); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isShadowMesh: boolean; - /** - * Represent the world matrix of the reference mesh. - * - * @type {Matrix4} - */ - meshMatrix: Matrix4; - /** - * Updates the shadow mesh so it follows its shadow-casting reference mesh. - * - * @param {Plane} plane - The plane onto the shadow mesh is projected. - * @param {Vector4} lightPosition4D - The light position. - */ - update(plane: Plane, lightPosition4D: Vector4): void; -} -import { Mesh } from 'three'; -import { Matrix4 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/Sky.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/Sky.d.ts deleted file mode 100644 index dbd0641e6..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/objects/Sky.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Represents a skydome for scene backgrounds. Based on [A Practical Analytic Model for Daylight](https://www.researchgate.net/publication/220720443_A_Practical_Analytic_Model_for_Daylight) - * aka The Preetham Model, the de facto standard for analytical skydomes. - * - * Note that this class can only be used with {@link WebGLRenderer}. - * When using {@link WebGPURenderer}, use {@link SkyMesh}. - * - * More references: - * - * - {@link http://simonwallner.at/project/atmospheric-scattering/} - * - {@link http://blenderartists.org/forum/showthread.php?245954-preethams-sky-impementation-HDR} - * - * - * ```js - * const sky = new Sky(); - * sky.scale.setScalar( 10000 ); - * scene.add( sky ); - * ``` - * - * It can be useful to hide the sun disc when generating an environment map to avoid artifacts - * - * ```js - * // disable before rendering environment map - * sky.material.uniforms.showSunDisc.value = false; - * // ... - * // re-enable before scene sky box rendering - * sky.material.uniforms.showSunDisc.value = true; - * ``` - * - * @augments Mesh - * @three_import import { Sky } from 'three/addons/objects/Sky.js'; - */ -export class Sky extends Mesh { - /** - * Constructs a new skydome. - */ - constructor(); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSky: boolean; -} -export namespace Sky { - namespace SkyShader { - let name: string; - namespace uniforms { - namespace turbidity { - let value: number; - } - namespace rayleigh { - let value_1: number; - export { value_1 as value }; - } - namespace mieCoefficient { - let value_2: number; - export { value_2 as value }; - } - namespace mieDirectionalG { - let value_3: number; - export { value_3 as value }; - } - namespace sunPosition { - let value_4: Vector3; - export { value_4 as value }; - } - namespace up { - let value_5: Vector3; - export { value_5 as value }; - } - namespace cloudScale { - let value_6: number; - export { value_6 as value }; - } - namespace cloudSpeed { - let value_7: number; - export { value_7 as value }; - } - namespace cloudCoverage { - let value_8: number; - export { value_8 as value }; - } - namespace cloudDensity { - let value_9: number; - export { value_9 as value }; - } - namespace cloudElevation { - let value_10: number; - export { value_10 as value }; - } - namespace showSunDisc { - let value_11: number; - export { value_11 as value }; - } - namespace time { - let value_12: number; - export { value_12 as value }; - } - } - let vertexShader: string; - let fragmentShader: string; - } -} -import { Mesh } from 'three'; -import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/SkyMesh.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/SkyMesh.d.ts deleted file mode 100644 index 825c2c2f7..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/objects/SkyMesh.d.ts +++ /dev/null @@ -1,127 +0,0 @@ -/** - * Represents a skydome for scene backgrounds. Based on [A Practical Analytic Model for Daylight](https://www.researchgate.net/publication/220720443_A_Practical_Analytic_Model_for_Daylight) - * aka The Preetham Model, the de facto standard for analytical skydomes. - * - * Note that this class can only be used with {@link WebGPURenderer}. - * When using {@link WebGLRenderer}, use {@link Sky}. - * - * More references: - * - * - {@link http://simonwallner.at/project/atmospheric-scattering/} - * - {@link http://blenderartists.org/forum/showthread.php?245954-preethams-sky-impementation-HDR} - * - * ```js - * const sky = new SkyMesh(); - * sky.scale.setScalar( 10000 ); - * scene.add( sky ); - * ``` - * - * It can be useful to hide the sun disc when generating an environment map to avoid artifacts - * - * ```js - * // disable before rendering environment map - * sky.showSunDisc.value = false; - * // ... - * // re-enable before scene sky box rendering - * sky.showSunDisc.value = true; - * ``` - * - * @augments Mesh - * @three_import import { SkyMesh } from 'three/addons/objects/SkyMesh.js'; - */ -export class SkyMesh extends Mesh { - /** - * Constructs a new skydome. - */ - constructor(); - /** - * The turbidity uniform. - * - * @type {UniformNode} - */ - turbidity: UniformNode; - /** - * The rayleigh uniform. - * - * @type {UniformNode} - */ - rayleigh: UniformNode; - /** - * The mieCoefficient uniform. - * - * @type {UniformNode} - */ - mieCoefficient: UniformNode; - /** - * The mieDirectionalG uniform. - * - * @type {UniformNode} - */ - mieDirectionalG: UniformNode; - /** - * The sun position uniform. - * - * @type {UniformNode} - */ - sunPosition: UniformNode; - /** - * The up position. - * - * @type {UniformNode} - */ - upUniform: UniformNode; - /** - * The cloud scale uniform. - * - * @type {UniformNode} - */ - cloudScale: UniformNode; - /** - * The cloud speed uniform. - * - * @type {UniformNode} - */ - cloudSpeed: UniformNode; - /** - * The cloud coverage uniform. - * - * @type {UniformNode} - */ - cloudCoverage: UniformNode; - /** - * The cloud density uniform. - * - * @type {UniformNode} - */ - cloudDensity: UniformNode; - /** - * The cloud elevation uniform. - * - * @type {UniformNode} - */ - cloudElevation: UniformNode; - /** - * Whether to render the solar disc. - * - * @type {UniformNode} - */ - showSunDisc: UniformNode; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - * @deprecated Use isSkyMesh instead. - */ - readonly isSky: boolean; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSkyMesh: boolean; -} -import { Mesh } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/Water.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/Water.d.ts deleted file mode 100644 index 4cbedafa7..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/objects/Water.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -/** - * ~Options - */ -export type Water = { - /** - * - The texture width. A higher value results in more clear reflections but is also more expensive. - */ - textureWidth?: number | undefined; - /** - * - The texture height. A higher value results in more clear reflections but is also more expensive. - */ - textureHeight?: number | undefined; - /** - * - The clip bias. - */ - clipBias?: number | undefined; - /** - * - The alpha value. - */ - alpha?: number | undefined; - /** - * - The time value. - */ - time?: number | undefined; - /** - * - The water's normal map. - */ - waterNormals?: Texture | null; - /** - * - The sun direction. - */ - sunDirection?: Vector3 | undefined; - /** - * - The sun color. - */ - sunColor?: string | number | Color | undefined; - /** - * - The water color. - */ - waterColor?: string | number | Color | undefined; - /** - * - The eye vector. - */ - eye?: Vector3 | undefined; - /** - * - The distortion scale. - */ - distortionScale?: number | undefined; - /** - * - The water material's `side` property. - */ - side?: (number | BackSide | DoubleSide); - /** - * - Whether the water should be affected by fog or not. - */ - fog?: boolean | undefined; -}; -import { Vector3 } from 'three'; -import { Color } from 'three'; -/** - * A basic flat, reflective water effect. - * - * Note that this class can only be used with {@link WebGLRenderer}. - * When using {@link WebGPURenderer}, use {@link WaterMesh}. - * - * References: - * - * - [Flat mirror for three.js](https://github.com/Slayvin) - * - [An implementation of water shader based on the flat mirror](https://home.adelphi.edu/~stemkoski/) - * - [Water shader explanations in WebGL](http://29a.ch/slides/2012/webglwater/ ) - * - * @augments Mesh - * @three_import import { Water } from 'three/addons/objects/Water.js'; - */ -export class Water extends Mesh { - /** - * Constructs a new water instance. - * - * @param {BufferGeometry} geometry - The water's geometry. - * @param {Water~Options} [options] - The configuration options. - */ - constructor(geometry: BufferGeometry, options?: {}); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWater: boolean; -} -import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/Water2.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/Water2.d.ts deleted file mode 100644 index 515f144a6..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/objects/Water2.d.ts +++ /dev/null @@ -1,145 +0,0 @@ -/** - * :Water2~Options - */ -export type module = { - /** - * - The water color. - */ - color?: string | number | Color | undefined; - /** - * - The texture width. A higher value results in better quality but is also more expensive. - */ - textureWidth?: number | undefined; - /** - * - The texture height. A higher value results in better quality but is also more expensive. - */ - textureHeight?: number | undefined; - /** - * - The clip bias. - */ - clipBias?: number | undefined; - /** - * - The water's flow direction. - */ - flowDirection?: Vector2 | undefined; - /** - * - The water's flow speed. - */ - flowSpeed?: number | undefined; - /** - * - The water's reflectivity. - */ - reflectivity?: number | undefined; - /** - * - The water's scale. - */ - scale?: number | undefined; - /** - * - A custom water shader. - */ - shader?: Object | undefined; - /** - * - The flow map. If no flow map is assigned, the water flow is defined by `flowDirection`. - */ - flowMap?: Texture | null; - /** - * - The first water normal map. - */ - normalMap0?: Texture | null; - /** - * - The second water normal map. - */ - normalMap1?: Texture | null; -}; -/** @module Water2 */ -/** - * An advanced water effect that supports reflections, refractions and flow maps. - * - * Note that this class can only be used with {@link WebGLRenderer}. - * When using {@link WebGPURenderer}, use {@link module:Water2Mesh}. - * - * References: - * - * - {@link https://alex.vlachos.com/graphics/Vlachos-SIGGRAPH10-WaterFlow.pdf} - * - {@link http://graphicsrunner.blogspot.de/2010/08/water-using-flow-maps.html} - * - * @augments Mesh - * @three_import import { Water } from 'three/addons/objects/Water2.js'; - */ -export class Water extends Mesh { - /** - * Constructs a new water instance. - * - * @param {BufferGeometry} geometry - The water's geometry. - * @param {module:Water2~Options} [options] - The configuration options. - */ - constructor(geometry: BufferGeometry, options?: any); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWater: boolean; - onBeforeRender: (renderer: any, scene: any, camera: any) => void; -} -export namespace Water { - namespace WaterShader { - let name: string; - namespace uniforms { - namespace color { - let type: string; - let value: null; - } - namespace reflectivity { - let type_1: string; - export { type_1 as type }; - let value_1: number; - export { value_1 as value }; - } - namespace tReflectionMap { - let type_2: string; - export { type_2 as type }; - let value_2: null; - export { value_2 as value }; - } - namespace tRefractionMap { - let type_3: string; - export { type_3 as type }; - let value_3: null; - export { value_3 as value }; - } - namespace tNormalMap0 { - let type_4: string; - export { type_4 as type }; - let value_4: null; - export { value_4 as value }; - } - namespace tNormalMap1 { - let type_5: string; - export { type_5 as type }; - let value_5: null; - export { value_5 as value }; - } - namespace textureMatrix { - let type_6: string; - export { type_6 as type }; - let value_6: null; - export { value_6 as value }; - } - namespace config { - let type_7: string; - export { type_7 as type }; - let value_7: Vector4; - export { value_7 as value }; - } - } - let vertexShader: string; - let fragmentShader: string; - } -} -import { Color } from 'three'; -import { Vector2 } from 'three'; -import { Mesh } from 'three'; -import { Vector4 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/Water2Mesh.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/Water2Mesh.d.ts deleted file mode 100644 index 92371b2fd..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/objects/Water2Mesh.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -/** - * :Water2Mesh~Options - */ -export type module = { - /** - * - The water color. - */ - color?: string | number | Color | undefined; - /** - * - The water's flow direction. - */ - flowDirection?: Vector2 | undefined; - /** - * - The water's flow speed. - */ - flowSpeed?: number | undefined; - /** - * - The water's reflectivity. - */ - reflectivity?: number | undefined; - /** - * - The water's scale. - */ - scale?: number | undefined; - /** - * - The flow map. If no flow map is assigned, the water flow is defined by `flowDirection`. - */ - flowMap?: Texture | null; - /** - * - The first water normal map. - */ - normalMap0: Texture; - /** - * - The second water normal map. - */ - normalMap1: Texture; -}; -/** @module Water2Mesh */ -/** - * An advanced water effect that supports reflections, refractions and flow maps. - * - * Note that this class can only be used with {@link WebGPURenderer}. - * When using {@link WebGLRenderer}, use {@link module:Water2}. - * - * References: - * - * - {@link https://alex.vlachos.com/graphics/Vlachos-SIGGRAPH10-WaterFlow.pdf} - * - {@link http://graphicsrunner.blogspot.de/2010/08/water-using-flow-maps.html} - * - * @augments Mesh - * @three_import import { WaterMesh } from 'three/addons/objects/Water2Mesh.js'; - */ -export class WaterMesh extends Mesh { - /** - * Constructs a new water mesh. - * - * @param {BufferGeometry} geometry - The water's geometry. - * @param {module:Water2~Options} [options] - The configuration options. - */ - constructor(geometry: BufferGeometry, options?: any); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWater: boolean; -} -import { Color } from 'three/webgpu'; -import { Vector2 } from 'three/webgpu'; -import { Mesh } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/objects/WaterMesh.d.ts b/jsdoc-testing/jsdoc/examples/jsm/objects/WaterMesh.d.ts deleted file mode 100644 index 4fb266691..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/objects/WaterMesh.d.ts +++ /dev/null @@ -1,127 +0,0 @@ -/** - * ~Options - */ -export type WaterMesh = { - /** - * - The resolution scale. - */ - resolutionScale?: number | undefined; - /** - * - The water's normal map. - */ - waterNormals?: Texture | null; - /** - * - The alpha value. - */ - alpha?: number | undefined; - /** - * - The size value. - */ - size?: number | undefined; - /** - * - The sun color. - */ - sunColor?: string | number | Color | undefined; - /** - * - The sun direction. - */ - sunDirection?: Vector3 | undefined; - /** - * - The water color. - */ - waterColor?: string | number | Color | undefined; - /** - * - The distortion scale. - */ - distortionScale?: number | undefined; -}; -import { Color } from 'three/webgpu'; -import { Vector3 } from 'three/webgpu'; -/** - * A basic flat, reflective water effect. - * - * Note that this class can only be used with {@link WebGPURenderer}. - * When using {@link WebGLRenderer}, use {@link Water}. - * - * References: - * - * - [Flat mirror for three.js](https://github.com/Slayvin) - * - [An implementation of water shader based on the flat mirror](https://home.adelphi.edu/~stemkoski/) - * - [Water shader explanations in WebGL](http://29a.ch/slides/2012/webglwater/ ) - * - * @augments Mesh - * @three_import import { WaterMesh } from 'three/addons/objects/WaterMesh.js'; - */ -export class WaterMesh extends Mesh { - /** - * Constructs a new water mesh. - * - * @param {BufferGeometry} geometry - The water mesh's geometry. - * @param {WaterMesh~Options} [options] - The configuration options. - */ - constructor(geometry: BufferGeometry, options: any); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWaterMesh: boolean; - /** - * The effect's resolution scale. - * - * @type {number} - * @default 0.5 - */ - resolutionScale: number; - /** - * The water's normal map. - * - * @type {TextureNode} - */ - waterNormals: TextureNode; - /** - * The alpha value. - * - * @type {UniformNode} - * @default 1 - */ - alpha: UniformNode; - /** - * The size value. - * - * @type {UniformNode} - * @default 1 - */ - size: UniformNode; - /** - * The sun color. - * - * @type {UniformNode} - * @default 0xffffff - */ - sunColor: UniformNode; - /** - * The sun direction. - * - * @type {UniformNode} - * @default (0.70707,0.70707,0.0) - */ - sunDirection: UniformNode; - /** - * The water color. - * - * @type {UniformNode} - * @default 0x7f7f7f - */ - waterColor: UniformNode; - /** - * The distortion scale. - * - * @type {UniformNode} - * @default 20 - */ - distortionScale: UniformNode; -} -import { Mesh } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/offscreen/jank.d.ts b/jsdoc-testing/jsdoc/examples/jsm/offscreen/jank.d.ts deleted file mode 100644 index 7729eb4da..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/offscreen/jank.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default initJank; -declare function initJank(): void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/offscreen/offscreen.d.ts b/jsdoc-testing/jsdoc/examples/jsm/offscreen/offscreen.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/offscreen/offscreen.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/offscreen/scene.d.ts b/jsdoc-testing/jsdoc/examples/jsm/offscreen/scene.d.ts deleted file mode 100644 index 4f3b99c71..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/offscreen/scene.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default init; -declare function init(canvas: any, width: any, height: any, pixelRatio: any, path: any): void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/physics/AmmoPhysics.d.ts b/jsdoc-testing/jsdoc/examples/jsm/physics/AmmoPhysics.d.ts deleted file mode 100644 index 979e971ed..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/physics/AmmoPhysics.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * @classdesc Can be used to include Ammo.js as a Physics engine into - * `three.js` apps. Make sure to include `ammo.wasm.js` first: - * ``` - * - * ``` - * It is then possible to initialize the API via: - * ```js - * const physics = await AmmoPhysics(); - * ``` - * - * @name AmmoPhysics - * @class - * @hideconstructor - * @three_import import { AmmoPhysics } from 'three/addons/physics/AmmoPhysics.js'; - */ -export function AmmoPhysics(): Promise<{ - /** - * Adds the given scene to this physics simulation. Only meshes with a - * `physics` object in their {@link Object3D#userData} field will be honored. - * The object can be used to store the mass of the mesh. E.g.: - * ```js - * box.userData.physics = { mass: 1 }; - * ``` - * - * @method - * @name AmmoPhysics#addScene - * @param {Object3D} scene The scene or any type of 3D object to add. - */ - addScene: (scene: any) => void; - /** - * Adds the given mesh to this physics simulation. - * - * @method - * @name AmmoPhysics#addMesh - * @param {Mesh} mesh The mesh to add. - * @param {number} [mass=0] The mass in kg of the mesh. - * @param {number} [restitution=0] The restitution of the mesh, usually from 0 to 1. Represents how "bouncy" objects are when they collide with each other. - */ - addMesh: (mesh: any, mass?: number, restitution?: number) => void; - /** - * Set the position of the given mesh which is part of the physics simulation. Calling this - * method will reset the current simulated velocity of the mesh. - * - * @method - * @name AmmoPhysics#setMeshPosition - * @param {Mesh} mesh The mesh to update the position for. - * @param {Vector3} position - The new position. - * @param {number} [index=0] - If the mesh is instanced, the index represents the instanced ID. - */ - setMeshPosition: (mesh: any, position: any, index?: number) => void; -} | undefined>; -export class AmmoPhysics { -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/physics/JoltPhysics.d.ts b/jsdoc-testing/jsdoc/examples/jsm/physics/JoltPhysics.d.ts deleted file mode 100644 index b54e2089e..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/physics/JoltPhysics.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * @classdesc Can be used to include Jolt as a Physics engine into - * `three.js` apps. The API can be initialized via: - * ```js - * const physics = await JoltPhysics(); - * ``` - * The component automatically imports Jolt from a CDN so make sure - * to use the component with an active Internet connection. - * - * @name JoltPhysics - * @class - * @hideconstructor - * @three_import import { JoltPhysics } from 'three/addons/physics/JoltPhysics.js'; - */ -export function JoltPhysics(): Promise<{ - /** - * Adds the given scene to this physics simulation. Only meshes with a - * `physics` object in their {@link Object3D#userData} field will be honored. - * The object can be used to store the mass and restitution of the mesh. E.g.: - * ```js - * box.userData.physics = { mass: 1, restitution: 0 }; - * ``` - * - * @method - * @name JoltPhysics#addScene - * @param {Object3D} scene The scene or any type of 3D object to add. - */ - addScene: (scene: any) => void; - /** - * Adds the given mesh to this physics simulation. - * - * @method - * @name JoltPhysics#addMesh - * @param {Mesh} mesh The mesh to add. - * @param {number} [mass=0] The mass in kg of the mesh. - * @param {number} [restitution=0] The restitution of the mesh, usually from 0 to 1. Represents how "bouncy" objects are when they collide with each other. - */ - addMesh: (mesh: any, mass?: number, restitution?: number) => void; - /** - * Set the position of the given mesh which is part of the physics simulation. Calling this - * method will reset the current simulated velocity of the mesh. - * - * @method - * @name JoltPhysics#setMeshPosition - * @param {Mesh} mesh The mesh to update the position for. - * @param {Vector3} position - The new position. - * @param {number} [index=0] - If the mesh is instanced, the index represents the instanced ID. - */ - setMeshPosition: (mesh: any, position: any, index?: number) => void; - setMeshVelocity: (mesh: any, velocity: any, index?: number) => void; -}>; -export class JoltPhysics { -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/physics/RapierPhysics.d.ts b/jsdoc-testing/jsdoc/examples/jsm/physics/RapierPhysics.d.ts deleted file mode 100644 index cf3f9fb28..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/physics/RapierPhysics.d.ts +++ /dev/null @@ -1,98 +0,0 @@ -/** - * @classdesc Can be used to include Rapier as a Physics engine into - * `three.js` apps. The API can be initialized via: - * ```js - * const physics = await RapierPhysics(); - * ``` - * The component automatically imports Rapier from a CDN so make sure - * to use the component with an active Internet connection. - * - * @name RapierPhysics - * @class - * @hideconstructor - * @three_import import { RapierPhysics } from 'three/addons/physics/RapierPhysics.js'; - */ -export function RapierPhysics(): Promise<{ - RAPIER: any; - world: any; - /** - * Adds the given scene to this physics simulation. Only meshes with a - * `physics` object in their {@link Object3D#userData} field will be honored. - * The object can be used to store the mass and restitution of the mesh. E.g.: - * ```js - * box.userData.physics = { mass: 1, restitution: 0 }; - * ``` - * - * @method - * @name RapierPhysics#addScene - * @param {Object3D} scene The scene or any type of 3D object to add. - */ - addScene: (scene: any) => void; - /** - * Adds the given mesh to this physics simulation. - * - * @method - * @name RapierPhysics#addMesh - * @param {Mesh} mesh The mesh to add. - * @param {number} [mass=0] The mass in kg of the mesh. - * @param {number} [restitution=0] The restitution of the mesh, usually from 0 to 1. Represents how "bouncy" objects are when they collide with each other. - */ - addMesh: (mesh: any, mass?: number, restitution?: number) => void; - /** - * Removes the given mesh from this physics simulation. - * - * @method - * @name RapierPhysics#removeMesh - * @param {Mesh} mesh The mesh to remove. - */ - removeMesh: (mesh: any) => void; - /** - * Set the position of the given mesh which is part of the physics simulation. Calling this - * method will reset the current simulated velocity of the mesh. - * - * @method - * @name RapierPhysics#setMeshPosition - * @param {Mesh} mesh The mesh to update the position for. - * @param {Vector3} position - The new position. - * @param {number} [index=0] - If the mesh is instanced, the index represents the instanced ID. - */ - setMeshPosition: (mesh: any, position: any, index?: number) => void; - /** - * Set the velocity of the given mesh which is part of the physics simulation. - * - * @method - * @name RapierPhysics#setMeshVelocity - * @param {Mesh} mesh The mesh to update the velocity for. - * @param {Vector3} velocity - The new velocity. - * @param {number} [index=0] - If the mesh is instanced, the index represents the instanced ID. - */ - setMeshVelocity: (mesh: any, velocity: any, index?: number) => void; - /** - * Adds a heightfield terrain to the physics simulation. - * - * @method - * @name RapierPhysics#addHeightfield - * @param {Mesh} mesh - The Three.js mesh representing the terrain. - * @param {number} width - The number of vertices along the width (x-axis) of the heightfield. - * @param {number} depth - The number of vertices along the depth (z-axis) of the heightfield. - * @param {Float32Array} heights - Array of height values for each vertex in the heightfield. - * @param {Object} scale - Scale factors for the heightfield dimensions. - * @param {number} scale.x - Scale factor for width. - * @param {number} scale.y - Scale factor for height. - * @param {number} scale.z - Scale factor for depth. - * @returns {RigidBody} The created Rapier rigid body for the heightfield. - */ - addHeightfield: (mesh: any, width: any, depth: any, heights: any, scale: any) => any; - /** - * Applies an impulse to the given mesh which is part of the physics simulation. - * - * @method - * @name RapierPhysics#applyImpulse - * @param {Mesh} mesh - The mesh to apply the impulse to. - * @param {Vector3} impulse - The impulse to apply. - * @param {number} [index=0] - If the mesh is instanced, the index represents the instanced ID. - */ - applyImpulse: (mesh: any, impulse: any, index?: number) => void; -}>; -export class RapierPhysics { -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/AfterimagePass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/AfterimagePass.d.ts deleted file mode 100644 index ce505f2d5..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/AfterimagePass.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Pass for a basic after image effect. - * - * ```js - * const afterimagePass = new AfterimagePass( 0.9 ); - * composer.addPass( afterimagePass ); - * ``` - * - * @augments Pass - * @three_import import { AfterimagePass } from 'three/addons/postprocessing/AfterimagePass.js'; - */ -export class AfterimagePass extends Pass { - /** - * Constructs a new after image pass. - * - * @param {number} [damp=0.96] - The damping intensity. A higher value means a stronger after image effect. - */ - constructor(damp?: number); - /** - * The pass uniforms. Use this object if you want to update the - * `damp` value at runtime. - * ```js - * pass.uniforms.damp.value = 0.9; - * ``` - * - * @type {Object} - */ - uniforms: Object; - set damp(value: number); - /** - * The damping intensity, from 0.0 to 1.0. A higher value means a stronger after image effect. - * - * @type {number} - */ - get damp(): number; - /** - * The composition material. - * - * @type {ShaderMaterial} - */ - compFsMaterial: ShaderMaterial; - /** - * The copy material. - * - * @type {ShaderMaterial} - */ - copyFsMaterial: ShaderMaterial; - _textureComp: WebGLRenderTarget; - _textureOld: WebGLRenderTarget; - _compFsQuad: FullScreenQuad; - _copyFsQuad: FullScreenQuad; - /** - * Performs the after image pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; - /** - * Sets the size of the pass. - * - * @param {number} width - The width to set. - * @param {number} height - The height to set. - */ - setSize(width: number, height: number): void; -} -import { Pass } from './Pass.js'; -import { ShaderMaterial } from 'three'; -import { WebGLRenderTarget } from 'three'; -import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/BloomPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/BloomPass.d.ts deleted file mode 100644 index 97155abd9..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/BloomPass.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -/** - * A pass for a basic Bloom effect. - * - * {@link UnrealBloomPass} produces a more advanced Bloom but is also - * more expensive. - * - * ```js - * const effectBloom = new BloomPass( 0.75 ); - * composer.addPass( effectBloom ); - * ``` - * - * @augments Pass - * @three_import import { BloomPass } from 'three/addons/postprocessing/BloomPass.js'; - */ -export class BloomPass extends Pass { - /** - * Constructs a new Bloom pass. - * - * @param {number} [strength=1] - The Bloom strength. - * @param {number} [kernelSize=25] - The kernel size. - * @param {number} [sigma=4] - The sigma. - */ - constructor(strength?: number, kernelSize?: number, sigma?: number); - /** - * The combine pass uniforms. - * - * @type {Object} - */ - combineUniforms: Object; - /** - * The combine pass material. - * - * @type {ShaderMaterial} - */ - materialCombine: ShaderMaterial; - /** - * The convolution pass uniforms. - * - * @type {Object} - */ - convolutionUniforms: Object; - /** - * The convolution pass material. - * - * @type {ShaderMaterial} - */ - materialConvolution: ShaderMaterial; - _renderTargetX: WebGLRenderTarget; - _renderTargetY: WebGLRenderTarget; - _fsQuad: FullScreenQuad; - /** - * Performs the Bloom pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget, deltaTime: number, maskActive: boolean): void; - /** - * Sets the size of the pass. - * - * @param {number} width - The width to set. - * @param {number} height - The height to set. - */ - setSize(width: number, height: number): void; -} -export namespace BloomPass { - let blurX: Vector2; - let blurY: Vector2; -} -import { Pass } from './Pass.js'; -import { ShaderMaterial } from 'three'; -import { WebGLRenderTarget } from 'three'; -import { FullScreenQuad } from './Pass.js'; -import { Vector2 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/BokehPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/BokehPass.d.ts deleted file mode 100644 index 22a5e5f4a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/BokehPass.d.ts +++ /dev/null @@ -1,102 +0,0 @@ -/** - * ~Options - */ -export type BokehPass = { - /** - * - Defines the effect's focus which is the distance along the camera's look direction in world units. - */ - focus?: number | undefined; - /** - * - Defines the effect's aperture. - */ - aperture?: number | undefined; - /** - * - Defines the effect's maximum blur. - */ - maxblur?: number | undefined; -}; -/** - * Pass for creating depth of field (DOF) effect. - * - * ```js - * const bokehPass = new BokehPass( scene, camera, { - * focus: 500 - * aperture: 5, - * maxblur: 0.01 - * } ); - * composer.addPass( bokehPass ); - * ``` - * - * @augments Pass - * @three_import import { BokehPass } from 'three/addons/postprocessing/BokehPass.js'; - */ -export class BokehPass extends Pass { - /** - * Constructs a new Bokeh pass. - * - * @param {Scene} scene - The scene to render the DOF for. - * @param {Camera} camera - The camera. - * @param {BokehPass~Options} params - The pass options. - */ - constructor(scene: Scene, camera: Camera, params: any); - /** - * The scene to render the DOF for. - * - * @type {Scene} - */ - scene: Scene; - /** - * The camera. - * - * @type {Camera} - */ - camera: Camera; - _renderTargetDepth: WebGLRenderTarget; - _materialDepth: MeshDepthMaterial; - /** - * The pass bokeh material. - * - * @type {ShaderMaterial} - */ - materialBokeh: ShaderMaterial; - /** - * The pass uniforms. Use this object if you want to update the - * `focus`, `aperture` or `maxblur` values at runtime. - * - * ```js - * pass.uniforms.focus.value = focus; - * pass.uniforms.aperture.value = aperture; - * pass.uniforms.maxblur.value = maxblur; - * ``` - * - * @type {Object} - */ - uniforms: Object; - _fsQuad: FullScreenQuad; - _oldClearColor: Color; - /** - * Performs the Bokeh pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; - /** - * Sets the size of the pass. - * - * @param {number} width - The width to set. - * @param {number} height - The height to set. - */ - setSize(width: number, height: number): void; -} -import { Pass } from './Pass.js'; -import { WebGLRenderTarget } from 'three'; -import { MeshDepthMaterial } from 'three'; -import { ShaderMaterial } from 'three'; -import { FullScreenQuad } from './Pass.js'; -import { Color } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/ClearPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/ClearPass.d.ts deleted file mode 100644 index 1e974da1b..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/ClearPass.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * This class can be used to force a clear operation for the current read or - * default framebuffer (when rendering to screen). - * - * ```js - * const clearPass = new ClearPass(); - * composer.addPass( clearPass ); - * ``` - * - * @augments Pass - * @three_import import { ClearPass } from 'three/addons/postprocessing/ClearPass.js'; - */ -export class ClearPass extends Pass { - /** - * Constructs a new clear pass. - * - * @param {(number|Color|string)} [clearColor=0x000000] - The clear color. - * @param {number} [clearAlpha=0] - The clear alpha. - */ - constructor(clearColor?: (number | Color | string), clearAlpha?: number); - /** - * The clear color. - * - * @type {(number|Color|string)} - * @default 0x000000 - */ - clearColor: (number | Color | string); - /** - * The clear alpha. - * - * @type {number} - * @default 0 - */ - clearAlpha: number; - _oldClearColor: Color; - /** - * Performs the clear operation. This affects the current read or the default framebuffer. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; -} -import { Pass } from './Pass.js'; -import { Color } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/CubeTexturePass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/CubeTexturePass.d.ts deleted file mode 100644 index e67221297..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/CubeTexturePass.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * This pass can be used to render a cube texture over the entire screen. - * - * ```js - * const cubeMap = new THREE.CubeTextureLoader().load( urls ); - * - * const cubeTexturePass = new CubeTexturePass( camera, cubemap ); - * composer.addPass( cubeTexturePass ); - * ``` - * - * @augments Pass - * @three_import import { CubeTexturePass } from 'three/addons/postprocessing/CubeTexturePass.js'; - */ -export class CubeTexturePass extends Pass { - /** - * Constructs a new cube texture pass. - * - * @param {PerspectiveCamera} camera - The camera. - * @param {CubeTexture} tCube - The cube texture to render. - * @param {number} [opacity=1] - The opacity. - */ - constructor(camera: PerspectiveCamera, tCube: CubeTexture, opacity?: number); - /** - * The camera. - * - * @type {PerspectiveCamera} - */ - camera: PerspectiveCamera; - /** - * The cube texture to render. - * - * @type {CubeTexture} - */ - tCube: CubeTexture; - /** - * The opacity. - * - * @type {number} - * @default 1 - */ - opacity: number; - _cubeMesh: Mesh; - _cubeScene: Scene; - _cubeCamera: PerspectiveCamera; - /** - * Performs the cube texture pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; -} -import { Pass } from './Pass.js'; -import { PerspectiveCamera } from 'three'; -import { Mesh } from 'three'; -import { Scene } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/DotScreenPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/DotScreenPass.d.ts deleted file mode 100644 index 295052177..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/DotScreenPass.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Pass for creating a dot-screen effect. - * - * ```js - * const pass = new DotScreenPass( new THREE.Vector2( 0, 0 ), 0.5, 0.8 ); - * composer.addPass( pass ); - * ``` - * - * @augments Pass - * @three_import import { DotScreenPass } from 'three/addons/postprocessing/DotScreenPass.js'; - */ -export class DotScreenPass extends Pass { - /** - * Constructs a new dot screen pass. - * - * @param {Vector2} center - The center point. - * @param {number} angle - The rotation of the effect in radians. - * @param {number} scale - The scale of the effect. A higher value means smaller dots. - */ - constructor(center: Vector2, angle: number, scale: number); - /** - * The pass uniforms. Use this object if you want to update the - * `center`, `angle` or `scale` values at runtime. - * ```js - * pass.uniforms.center.value.copy( center ); - * pass.uniforms.angle.value = 0; - * pass.uniforms.scale.value = 0.5; - * ``` - * - * @type {Object} - */ - uniforms: Object; - /** - * The pass material. - * - * @type {ShaderMaterial} - */ - material: ShaderMaterial; - _fsQuad: FullScreenQuad; - /** - * Performs the dot screen pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; -} -import { Pass } from './Pass.js'; -import { ShaderMaterial } from 'three'; -import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/EffectComposer.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/EffectComposer.d.ts deleted file mode 100644 index ba4d2c368..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/EffectComposer.d.ts +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Used to implement post-processing effects in three.js. - * The class manages a chain of post-processing passes to produce the final visual result. - * Post-processing passes are executed in order of their addition/insertion. - * The last pass is automatically rendered to screen. - * - * This module can only be used with {@link WebGLRenderer}. - * - * ```js - * const composer = new EffectComposer( renderer ); - * - * // adding some passes - * const renderPass = new RenderPass( scene, camera ); - * composer.addPass( renderPass ); - * - * const glitchPass = new GlitchPass(); - * composer.addPass( glitchPass ); - * - * const outputPass = new OutputPass() - * composer.addPass( outputPass ); - * - * function animate() { - * - * composer.render(); // instead of renderer.render() - * - * } - * ``` - * - * @three_import import { EffectComposer } from 'three/addons/postprocessing/EffectComposer.js'; - */ -export class EffectComposer { - /** - * Constructs a new effect composer. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} [renderTarget] - This render target and a clone will - * be used as the internal read and write buffers. If not given, the composer creates - * the buffers automatically. - */ - constructor(renderer: WebGLRenderer, renderTarget?: WebGLRenderTarget); - /** - * The renderer. - * - * @type {WebGLRenderer} - */ - renderer: WebGLRenderer; - _pixelRatio: any; - _width: any; - _height: any; - renderTarget1: WebGLRenderTarget; - renderTarget2: import("three").RenderTarget; - /** - * A reference to the internal write buffer. Passes usually write - * their result into this buffer. - * - * @type {WebGLRenderTarget} - */ - writeBuffer: WebGLRenderTarget; - /** - * A reference to the internal read buffer. Passes usually read - * the previous render result from this buffer. - * - * @type {WebGLRenderTarget} - */ - readBuffer: WebGLRenderTarget; - /** - * Whether the final pass is rendered to the screen (default framebuffer) or not. - * - * @type {boolean} - * @default true - */ - renderToScreen: boolean; - /** - * An array representing the (ordered) chain of post-processing passes. - * - * @type {Array} - */ - passes: Array; - /** - * A copy pass used for internal swap operations. - * - * @private - * @type {ShaderPass} - */ - private copyPass; - /** - * The internal timer for managing time data. - * - * @private - * @type {Timer} - */ - private timer; - /** - * Swaps the internal read/write buffers. - */ - swapBuffers(): void; - /** - * Adds the given pass to the pass chain. - * - * @param {Pass} pass - The pass to add. - */ - addPass(pass: Pass): void; - /** - * Inserts the given pass at a given index. - * - * @param {Pass} pass - The pass to insert. - * @param {number} index - The index into the pass chain. - */ - insertPass(pass: Pass, index: number): void; - /** - * Removes the given pass from the pass chain. - * - * @param {Pass} pass - The pass to remove. - */ - removePass(pass: Pass): void; - /** - * Returns `true` if the pass for the given index is the last enabled pass in the pass chain. - * - * @param {number} passIndex - The pass index. - * @return {boolean} Whether the pass for the given index is the last pass in the pass chain. - */ - isLastEnabledPass(passIndex: number): boolean; - /** - * Executes all enabled post-processing passes in order to produce the final frame. - * - * @param {number} deltaTime - The delta time in seconds. If not given, the composer computes - * its own time delta value. - */ - render(deltaTime: number): void; - /** - * Resets the internal state of the EffectComposer. - * - * @param {WebGLRenderTarget} [renderTarget] - This render target has the same purpose like - * the one from the constructor. If set, it is used to setup the read and write buffers. - */ - reset(renderTarget?: WebGLRenderTarget): void; - /** - * Resizes the internal read and write buffers as well as all passes. Similar to {@link WebGLRenderer#setSize}, - * this method honors the current pixel ration. - * - * @param {number} width - The width in logical pixels. - * @param {number} height - The height in logical pixels. - */ - setSize(width: number, height: number): void; - /** - * Sets device pixel ratio. This is usually used for HiDPI device to prevent blurring output. - * Setting the pixel ratio will automatically resize the composer. - * - * @param {number} pixelRatio - The pixel ratio to set. - */ - setPixelRatio(pixelRatio: number): void; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever the composer is no longer used in your app. - */ - dispose(): void; -} -import { WebGLRenderTarget } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/FXAAPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/FXAAPass.d.ts deleted file mode 100644 index 9bcbeed49..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/FXAAPass.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * A pass for applying FXAA. - * - * ```js - * const fxaaPass = new FXAAPass(); - * composer.addPass( fxaaPass ); - * ``` - * - * @augments ShaderPass - * @three_import import { FXAAPass } from 'three/addons/postprocessing/FXAAPass.js'; - */ -export class FXAAPass extends ShaderPass { - /** - * Constructs a new FXAA pass. - */ - constructor(); - /** - * Sets the size of the pass. - * - * @param {number} width - The width to set. - * @param {number} height - The height to set. - */ - setSize(width: number, height: number): void; -} -import { ShaderPass } from './ShaderPass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/FilmPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/FilmPass.d.ts deleted file mode 100644 index 14d8c1255..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/FilmPass.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * This pass can be used to create a film grain effect. - * - * ```js - * const filmPass = new FilmPass(); - * composer.addPass( filmPass ); - * ``` - * - * @augments Pass - * @three_import import { FilmPass } from 'three/addons/postprocessing/FilmPass.js'; - */ -export class FilmPass extends Pass { - /** - * Constructs a new film pass. - * - * @param {number} [intensity=0.5] - The grain intensity in the range `[0,1]` (0 = no effect, 1 = full effect). - * @param {boolean} [grayscale=false] - Whether to apply a grayscale effect or not. - */ - constructor(intensity?: number, grayscale?: boolean); - /** - * The pass uniforms. Use this object if you want to update the - * `intensity` or `grayscale` values at runtime. - * ```js - * pass.uniforms.intensity.value = 1; - * pass.uniforms.grayscale.value = true; - * ``` - * - * @type {Object} - */ - uniforms: Object; - /** - * The pass material. - * - * @type {ShaderMaterial} - */ - material: ShaderMaterial; - _fsQuad: FullScreenQuad; - /** - * Performs the film pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget, deltaTime: number): void; -} -import { Pass } from './Pass.js'; -import { ShaderMaterial } from 'three'; -import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/GTAOPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/GTAOPass.d.ts deleted file mode 100644 index 5188ebe80..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/GTAOPass.d.ts +++ /dev/null @@ -1,184 +0,0 @@ -/** - * A pass for an GTAO effect. - * - * `GTAOPass` provides better quality than {@link SSAOPass} but is also more expensive. - * - * ```js - * const gtaoPass = new GTAOPass( scene, camera, width, height ); - * gtaoPass.output = GTAOPass.OUTPUT.Denoise; - * composer.addPass( gtaoPass ); - * ``` - * - * @augments Pass - * @three_import import { GTAOPass } from 'three/addons/postprocessing/GTAOPass.js'; - */ -export class GTAOPass extends Pass { - /** - * Constructs a new GTAO pass. - * - * @param {Scene} scene - The scene to compute the AO for. - * @param {Camera} camera - The camera. - * @param {number} [width=512] - The width of the effect. - * @param {number} [height=512] - The height of the effect. - * @param {Object} [parameters] - The pass parameters. - * @param {Object} [aoParameters] - The AO parameters. - * @param {Object} [pdParameters] - The denoise parameters. - */ - constructor(scene: Scene, camera: Camera, width?: number, height?: number, parameters?: Object, aoParameters?: Object, pdParameters?: Object); - /** - * The width of the effect. - * - * @type {number} - * @default 512 - */ - width: number; - /** - * The height of the effect. - * - * @type {number} - * @default 512 - */ - height: number; - /** - * The camera. - * - * @type {Camera} - */ - camera: Camera; - /** - * The scene to render the AO for. - * - * @type {Scene} - */ - scene: Scene; - /** - * The output configuration. - * - * @type {number} - * @default 0 - */ - output: number; - _renderGBuffer: boolean; - _visibilityCache: any[]; - /** - * The AO blend intensity. - * - * @type {number} - * @default 1 - */ - blendIntensity: number; - /** - * The number of Poisson Denoise rings. - * - * @type {number} - * @default 2 - */ - pdRings: number; - /** - * The Poisson Denoise radius exponent. - * - * @type {number} - * @default 2 - */ - pdRadiusExponent: number; - /** - * The Poisson Denoise sample count. - * - * @type {number} - * @default 16 - */ - pdSamples: number; - gtaoNoiseTexture: DataTexture; - pdNoiseTexture: DataTexture; - gtaoRenderTarget: WebGLRenderTarget; - pdRenderTarget: import("three").RenderTarget; - gtaoMaterial: ShaderMaterial; - normalMaterial: MeshNormalMaterial; - pdMaterial: ShaderMaterial; - depthRenderMaterial: ShaderMaterial; - copyMaterial: ShaderMaterial; - blendMaterial: ShaderMaterial; - _fsQuad: FullScreenQuad; - _originalClearColor: Color; - /** - * Sets the size of the pass. - * - * @param {number} width - The width to set. - * @param {number} height - The height to set. - */ - setSize(width: number, height: number): void; - /** - * A texture holding the computed AO. - * - * @type {Texture} - * @readonly - */ - readonly get gtaoMap(): Texture; - /** - * Configures the GBuffer of this pass. If no arguments are passed, - * the pass creates an internal render target for holding depth - * and normal data. - * - * @param {DepthTexture} [depthTexture] - The depth texture. - * @param {DepthTexture} [normalTexture] - The normal texture. - */ - setGBuffer(depthTexture?: DepthTexture, normalTexture?: DepthTexture): void; - depthTexture: DepthTexture | undefined; - normalTexture: import("three").Texture | DepthTexture | undefined; - normalRenderTarget: WebGLRenderTarget | undefined; - /** - * Configures the clip box of the GTAO shader with the given AABB. - * - * @param {?Box3} box - The AABB enclosing the scene that should receive AO. When passing - * `null`, to clip box is used. - */ - setSceneClipBox(box: Box3 | null): void; - /** - * Updates the GTAO material from the given parameter object. - * - * @param {Object} parameters - The GTAO material parameters. - */ - updateGtaoMaterial(parameters: Object): void; - /** - * Updates the Denoise material from the given parameter object. - * - * @param {Object} parameters - The denoise parameters. - */ - updatePdMaterial(parameters: Object): void; - /** - * Performs the GTAO pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; - _renderPass(renderer: any, passMaterial: any, renderTarget: any, clearColor: any, clearAlpha: any): void; - _renderOverride(renderer: any, overrideMaterial: any, renderTarget: any, clearColor: any, clearAlpha: any): void; - _overrideVisibility(): void; - _restoreVisibility(): void; - _generateNoise(size?: number): DataTexture; -} -export namespace GTAOPass { - namespace OUTPUT { - let Off: number; - let Default: number; - let Diffuse: number; - let Depth: number; - let Normal: number; - let AO: number; - let Denoise: number; - } -} -import { Pass } from './Pass.js'; -import { DataTexture } from 'three'; -import { WebGLRenderTarget } from 'three'; -import { ShaderMaterial } from 'three'; -import { MeshNormalMaterial } from 'three'; -import { FullScreenQuad } from './Pass.js'; -import { Color } from 'three'; -import { DepthTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/GlitchPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/GlitchPass.d.ts deleted file mode 100644 index 2ca364516..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/GlitchPass.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Pass for creating a glitch effect. - * - * ```js - * const glitchPass = new GlitchPass(); - * composer.addPass( glitchPass ); - * ``` - * - * @augments Pass - * @three_import import { GlitchPass } from 'three/addons/postprocessing/GlitchPass.js'; - */ -export class GlitchPass extends Pass { - /** - * Constructs a new glitch pass. - * - * @param {number} [dt_size=64] - The size of the displacement texture - * for digital glitch squares. - */ - constructor(dt_size?: number); - /** - * The pass uniforms. - * - * @type {Object} - */ - uniforms: Object; - /** - * The pass material. - * - * @type {ShaderMaterial} - */ - material: ShaderMaterial; - /** - * Whether to noticeably increase the effect intensity or not. - * - * @type {boolean} - * @default false - */ - goWild: boolean; - _heightMap: DataTexture; - _fsQuad: FullScreenQuad; - _curF: number; - _randX: number; - /** - * Performs the glitch pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; - _generateTrigger(): void; - _generateHeightmap(dt_size: any): DataTexture; -} -import { Pass } from './Pass.js'; -import { ShaderMaterial } from 'three'; -import { DataTexture } from 'three'; -import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/HalftonePass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/HalftonePass.d.ts deleted file mode 100644 index a3907b4d1..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/HalftonePass.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Pass for creating a RGB halftone effect. - * - * ```js - * const params = { - * shape: 1, - * radius: 4, - * rotateR: Math.PI / 12, - * rotateB: Math.PI / 12 * 2, - * rotateG: Math.PI / 12 * 3, - * scatter: 0, - * blending: 1, - * blendingMode: 1, - * greyscale: false, - * disable: false - * }; - * const halftonePass = new HalftonePass( params ); - * composer.addPass( halftonePass ); - * ``` - * - * @augments Pass - * @three_import import { HalftonePass } from 'three/addons/postprocessing/HalftonePass.js'; - */ -export class HalftonePass extends Pass { - /** - * Constructs a new halftone pass. - * - * @param {Object} params - The halftone shader parameter. - */ - constructor(params: Object); - /** - * The pass uniforms. - * - * @type {Object} - */ - uniforms: Object; - /** - * The pass material. - * - * @type {ShaderMaterial} - */ - material: ShaderMaterial; - _fsQuad: FullScreenQuad; - /** - * Performs the halftone pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; - /** - * Sets the size of the pass. - * - * @param {number} width - The width to set. - * @param {number} height - The height to set. - */ - setSize(width: number, height: number): void; -} -import { Pass } from './Pass.js'; -import { ShaderMaterial } from 'three'; -import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/LUTPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/LUTPass.d.ts deleted file mode 100644 index 0cc065935..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/LUTPass.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Pass for color grading via lookup tables. - * - * ```js - * const lutPass = new LUTPass( { lut: lut.texture3D } ); - * composer.addPass( lutPass ); - * ``` - * - * @augments ShaderPass - * @three_import import { LUTPass } from 'three/addons/postprocessing/LUTPass.js'; - */ -export class LUTPass extends ShaderPass { - /** - * Constructs a LUT pass. - * - * @param {{lut:Data3DTexture,intensity:number}} [options={}] - The pass options. - */ - constructor(options?: { - lut: Data3DTexture; - intensity: number; - }); - set lut(v: any); - get lut(): any; - set intensity(v: any); - get intensity(): any; -} -import { ShaderPass } from './ShaderPass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/MaskPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/MaskPass.d.ts deleted file mode 100644 index 2563d270d..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/MaskPass.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -/** - * This pass can be used to define a mask during post processing. - * Meaning only areas of subsequent post processing are affected - * which lie in the masking area of this pass. Internally, the masking - * is implemented with the stencil buffer. - * - * ```js - * const maskPass = new MaskPass( scene, camera ); - * composer.addPass( maskPass ); - * ``` - * - * @augments Pass - * @three_import import { MaskPass } from 'three/addons/postprocessing/MaskPass.js'; - */ -export class MaskPass extends Pass { - /** - * Constructs a new mask pass. - * - * @param {Scene} scene - The 3D objects in this scene will define the mask. - * @param {Camera} camera - The camera. - */ - constructor(scene: Scene, camera: Camera); - /** - * The scene that defines the mask. - * - * @type {Scene} - */ - scene: Scene; - /** - * The camera. - * - * @type {Camera} - */ - camera: Camera; - /** - * Whether to inverse the mask or not. - * - * @type {boolean} - * @default false - */ - inverse: boolean; - /** - * Performs a mask pass with the configured scene and camera. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; -} -/** - * This pass can be used to clear a mask previously defined with {@link MaskPass}. - * - * ```js - * const clearPass = new ClearMaskPass(); - * composer.addPass( clearPass ); - * ``` - * - * @augments Pass - */ -export class ClearMaskPass extends Pass { - /** - * Performs the clear of the currently defined mask. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer): void; -} -import { Pass } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/OutlinePass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/OutlinePass.d.ts deleted file mode 100644 index 9e237fdea..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/OutlinePass.d.ts +++ /dev/null @@ -1,177 +0,0 @@ -/** - * A pass for rendering outlines around selected objects. - * - * ```js - * const resolution = new THREE.Vector2( window.innerWidth, window.innerHeight ); - * const outlinePass = new OutlinePass( resolution, scene, camera ); - * composer.addPass( outlinePass ); - * ``` - * - * @augments Pass - * @three_import import { OutlinePass } from 'three/addons/postprocessing/OutlinePass.js'; - */ -export class OutlinePass extends Pass { - /** - * Constructs a new outline pass. - * - * @param {Vector2} [resolution] - The effect's resolution. - * @param {Scene} scene - The scene to render. - * @param {Camera} camera - The camera. - * @param {Array} [selectedObjects] - The selected 3D objects that should receive an outline. - * - */ - constructor(resolution?: Vector2, scene: Scene, camera: Camera, selectedObjects?: Array); - /** - * The scene to render. - * - * @type {Object} - */ - renderScene: Object; - /** - * The camera. - * - * @type {Object} - */ - renderCamera: Object; - /** - * The selected 3D objects that should receive an outline. - * - * @type {Array} - */ - selectedObjects: Array; - /** - * The visible edge color. - * - * @type {Color} - * @default (1,1,1) - */ - visibleEdgeColor: Color; - /** - * The hidden edge color. - * - * @type {Color} - * @default (0.1,0.04,0.02) - */ - hiddenEdgeColor: Color; - /** - * Can be used for an animated glow/pulse effect. - * - * @type {number} - * @default 0 - */ - edgeGlow: number; - /** - * Whether to use a pattern texture for to highlight selected - * 3D objects or not. - * - * @type {boolean} - * @default false - */ - usePatternTexture: boolean; - /** - * Can be used to highlight selected 3D objects. Requires to set - * {@link OutlinePass#usePatternTexture} to `true`. - * - * @type {?Texture} - * @default null - */ - patternTexture: Texture | null; - /** - * The edge thickness. - * - * @type {number} - * @default 1 - */ - edgeThickness: number; - /** - * The edge strength. - * - * @type {number} - * @default 3 - */ - edgeStrength: number; - /** - * The downsample ratio. The effect can be rendered in a much - * lower resolution than the beauty pass. - * - * @type {number} - * @default 2 - */ - downSampleRatio: number; - /** - * The pulse period. - * - * @type {number} - * @default 0 - */ - pulsePeriod: number; - _visibilityCache: Map; - _selectionCache: Set; - /** - * The effect's resolution. - * - * @type {Vector2} - * @default (256,256) - */ - resolution: Vector2; - renderTargetMaskBuffer: WebGLRenderTarget; - depthMaterial: MeshDepthMaterial; - prepareMaskMaterial: ShaderMaterial; - renderTargetDepthBuffer: WebGLRenderTarget; - renderTargetMaskDownSampleBuffer: WebGLRenderTarget; - renderTargetBlurBuffer1: WebGLRenderTarget; - renderTargetBlurBuffer2: WebGLRenderTarget; - edgeDetectionMaterial: ShaderMaterial; - renderTargetEdgeBuffer1: WebGLRenderTarget; - renderTargetEdgeBuffer2: WebGLRenderTarget; - separableBlurMaterial1: ShaderMaterial; - separableBlurMaterial2: ShaderMaterial; - overlayMaterial: ShaderMaterial; - copyUniforms: Object; - materialCopy: ShaderMaterial; - _oldClearColor: Color; - oldClearAlpha: number; - _fsQuad: FullScreenQuad; - tempPulseColor1: Color; - tempPulseColor2: Color; - textureMatrix: Matrix4; - /** - * Sets the size of the pass. - * - * @param {number} width - The width to set. - * @param {number} height - The height to set. - */ - setSize(width: number, height: number): void; - /** - * Performs the Outline pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget, deltaTime: number, maskActive: boolean): void; - _updateSelectionCache(): void; - _changeVisibilityOfSelectedObjects(bVisible: any): void; - _changeVisibilityOfNonSelectedObjects(bVisible: any): void; - _updateTextureMatrix(): void; - _getPrepareMaskMaterial(): ShaderMaterial; - _getEdgeDetectionMaterial(): ShaderMaterial; - _getSeparableBlurMaterial(maxRadius: any): ShaderMaterial; - _getOverlayMaterial(): ShaderMaterial; -} -export namespace OutlinePass { - let BlurDirectionX: Vector2; - let BlurDirectionY: Vector2; -} -import { Pass } from './Pass.js'; -import { Color } from 'three'; -import { Vector2 } from 'three'; -import { WebGLRenderTarget } from 'three'; -import { MeshDepthMaterial } from 'three'; -import { ShaderMaterial } from 'three'; -import { FullScreenQuad } from './Pass.js'; -import { Matrix4 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/OutputPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/OutputPass.d.ts deleted file mode 100644 index a4b3d2594..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/OutputPass.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This pass is responsible for including tone mapping and color space conversion - * into your pass chain. In most cases, this pass should be included at the end - * of each pass chain. If a pass requires sRGB input (e.g. like FXAA), the pass - * must follow `OutputPass` in the pass chain. - * - * The tone mapping and color space settings are extracted from the renderer. - * - * ```js - * const outputPass = new OutputPass(); - * composer.addPass( outputPass ); - * ``` - * - * @augments Pass - * @three_import import { OutputPass } from 'three/addons/postprocessing/OutputPass.js'; - */ -export class OutputPass extends Pass { - /** - * This flag indicates that this is an output pass. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isOutputPass: boolean; - /** - * The pass uniforms. - * - * @type {Object} - */ - uniforms: Object; - /** - * The pass material. - * - * @type {RawShaderMaterial} - */ - material: RawShaderMaterial; - _fsQuad: FullScreenQuad; - _outputColorSpace: any; - _toneMapping: any; - /** - * Performs the output pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; -} -import { Pass } from './Pass.js'; -import { RawShaderMaterial } from 'three'; -import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/Pass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/Pass.d.ts deleted file mode 100644 index 77af31f08..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/Pass.d.ts +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Abstract base class for all post processing passes. - * - * This module is only relevant for post processing with {@link WebGLRenderer}. - * - * @abstract - * @three_import import { Pass } from 'three/addons/postprocessing/Pass.js'; - */ -export class Pass { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isPass: boolean; - /** - * If set to `true`, the pass is processed by the composer. - * - * @type {boolean} - * @default true - */ - enabled: boolean; - /** - * If set to `true`, the pass indicates to swap read and write buffer after rendering. - * - * @type {boolean} - * @default true - */ - needsSwap: boolean; - /** - * If set to `true`, the pass clears its buffer before rendering - * - * @type {boolean} - * @default false - */ - clear: boolean; - /** - * If set to `true`, the result of the pass is rendered to screen. The last pass in the composers - * pass chain gets automatically rendered to screen, no matter how this property is configured. - * - * @type {boolean} - * @default false - */ - renderToScreen: boolean; - /** - * Sets the size of the pass. - * - * @abstract - * @param {number} width - The width to set. - * @param {number} height - The height to set. - */ - setSize(): void; - /** - * This method holds the render logic of a pass. It must be implemented in all derived classes. - * - * @abstract - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(): void; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever the pass is no longer used in your app. - * - * @abstract - */ - dispose(): void; -} -/** - * This module is a helper for passes which need to render a full - * screen effect which is quite common in context of post processing. - * - * The intended usage is to reuse a single full screen quad for rendering - * subsequent passes by just reassigning the `material` reference. - * - * This module can only be used with {@link WebGLRenderer}. - * - * @augments Mesh - * @three_import import { FullScreenQuad } from 'three/addons/postprocessing/Pass.js'; - */ -export class FullScreenQuad { - /** - * Constructs a new full screen quad. - * - * @param {?Material} material - The material to render te full screen quad with. - */ - constructor(material: Material | null); - _mesh: Mesh; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever the instance is no longer used in your app. - */ - dispose(): void; - /** - * Renders the full screen quad. - * - * @param {WebGLRenderer} renderer - The renderer. - */ - render(renderer: WebGLRenderer): void; - set material(value: Material | null); - /** - * The quad's material. - * - * @type {?Material} - */ - get material(): Material | null; -} -import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderPass.d.ts deleted file mode 100644 index 9e9147843..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderPass.d.ts +++ /dev/null @@ -1,89 +0,0 @@ -/** - * This class represents a render pass. It takes a camera and a scene and produces - * a beauty pass for subsequent post processing effects. - * - * ```js - * const renderPass = new RenderPass( scene, camera ); - * composer.addPass( renderPass ); - * ``` - * - * @augments Pass - * @three_import import { RenderPass } from 'three/addons/postprocessing/RenderPass.js'; - */ -export class RenderPass extends Pass { - /** - * Constructs a new render pass. - * - * @param {Scene} scene - The scene to render. - * @param {Camera} camera - The camera. - * @param {?Material} [overrideMaterial=null] - The override material. If set, this material is used - * for all objects in the scene. - * @param {?(number|Color|string)} [clearColor=null] - The clear color of the render pass. - * @param {?number} [clearAlpha=null] - The clear alpha of the render pass. - */ - constructor(scene: Scene, camera: Camera, overrideMaterial?: Material | null, clearColor?: (number | Color | string) | null, clearAlpha?: number | null); - /** - * The scene to render. - * - * @type {Scene} - */ - scene: Scene; - /** - * The camera. - * - * @type {Camera} - */ - camera: Camera; - /** - * The override material. If set, this material is used - * for all objects in the scene. - * - * @type {?Material} - * @default null - */ - overrideMaterial: Material | null; - /** - * The clear color of the render pass. - * - * @type {?(number|Color|string)} - * @default null - */ - clearColor: (number | Color | string) | null; - /** - * The clear alpha of the render pass. - * - * @type {?number} - * @default null - */ - clearAlpha: number | null; - /** - * If set to `true`, only the depth can be cleared when `clear` is to `false`. - * - * @type {boolean} - * @default false - */ - clearDepth: boolean; - /** - * This flag indicates that this pass renders the scene itself. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isRenderPass: boolean; - _oldClearColor: Color; - /** - * Performs a beauty pass with the configured scene and camera. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; -} -import { Pass } from './Pass.js'; -import { Color } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderPixelatedPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderPixelatedPass.d.ts deleted file mode 100644 index 5d7439be4..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderPixelatedPass.d.ts +++ /dev/null @@ -1,101 +0,0 @@ -/** - * A special type of render pass that produces a pixelated beauty pass. - * - * ```js - * const renderPixelatedPass = new RenderPixelatedPass( 6, scene, camera ); - * composer.addPass( renderPixelatedPass ); - * ``` - * - * @augments Pass - * @three_import import { RenderPixelatedPass } from 'three/addons/postprocessing/RenderPixelatedPass.js'; - */ -export class RenderPixelatedPass extends Pass { - /** - * Constructs a new render pixelated pass. - * - * @param {number} pixelSize - The effect's pixel size. - * @param {Scene} scene - The scene to render. - * @param {Camera} camera - The camera. - * @param {{normalEdgeStrength:number,depthEdgeStrength:number}} options - The pass options. - */ - constructor(pixelSize: number, scene: Scene, camera: Camera, options?: { - normalEdgeStrength: number; - depthEdgeStrength: number; - }); - /** - * The effect's pixel size. - * - * @type {number} - */ - pixelSize: number; - /** - * The scene to render. - * - * @type {Scene} - */ - scene: Scene; - /** - * The camera. - * - * @type {Camera} - */ - camera: Camera; - /** - * The normal edge strength. - * - * @type {number} - * @default 0.3 - */ - normalEdgeStrength: number; - /** - * The normal edge strength. - * - * @type {number} - * @default 0.4 - */ - depthEdgeStrength: number; - /** - * The pixelated material. - * - * @type {ShaderMaterial} - */ - pixelatedMaterial: ShaderMaterial; - _resolution: Vector2; - _renderResolution: Vector2; - _normalMaterial: MeshNormalMaterial; - _beautyRenderTarget: WebGLRenderTarget; - _normalRenderTarget: WebGLRenderTarget; - _fsQuad: FullScreenQuad; - /** - * Sets the size of the pass. - * - * @param {number} width - The width to set. - * @param {number} height - The height to set. - */ - setSize(width: number, height: number): void; - /** - * Sets the effect's pixel size. - * - * @param {number} pixelSize - The pixel size to set. - */ - setPixelSize(pixelSize: number): void; - /** - * Performs the pixelation pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget): void; - _createPixelatedMaterial(): ShaderMaterial; -} -import { Pass } from './Pass.js'; -import { ShaderMaterial } from 'three'; -import { Vector2 } from 'three'; -import { MeshNormalMaterial } from 'three'; -import { WebGLRenderTarget } from 'three'; -import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderTransitionPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderTransitionPass.d.ts deleted file mode 100644 index 4f782a095..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/RenderTransitionPass.d.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * A special type of render pass for implementing transition effects. - * When active, the pass will transition from scene A to scene B. - * - * ```js - * const renderTransitionPass = new RenderTransitionPass( fxSceneA.scene, fxSceneA.camera, fxSceneB.scene, fxSceneB.camera ); - * renderTransitionPass.setTexture( textures[ 0 ] ); - * composer.addPass( renderTransitionPass ); - * ``` - * - * @augments Pass - * @three_import import { RenderTransitionPass } from 'three/addons/postprocessing/RenderTransitionPass.js'; - */ -export class RenderTransitionPass extends Pass { - /** - * Constructs a render transition pass. - * - * @param {Scene} sceneA - The first scene. - * @param {Camera} cameraA - The camera of the first scene. - * @param {Scene} sceneB - The second scene. - * @param {Camera} cameraB - The camera of the second scene. - */ - constructor(sceneA: Scene, cameraA: Camera, sceneB: Scene, cameraB: Camera); - /** - * The first scene. - * - * @type {Scene} - */ - sceneA: Scene; - /** - * The camera of the first scene. - * - * @type {Camera} - */ - cameraA: Camera; - /** - * The second scene. - * - * @type {Scene} - */ - sceneB: Scene; - /** - * The camera of the second scene. - * - * @type {Camera} - */ - cameraB: Camera; - /** - * The pass material. - * - * @type {ShaderMaterial} - */ - material: ShaderMaterial; - _renderTargetA: WebGLRenderTarget; - _renderTargetB: WebGLRenderTarget; - _fsQuad: FullScreenQuad; - /** - * Sets the transition factor. Must be in the range `[0,1]`. - * This value determines to what degree both scenes are mixed. - * - * @param {boolean|number} value - The transition factor. - */ - setTransition(value: boolean | number): void; - /** - * Toggles the usage of a texture for the effect. - * - * @param {boolean} value - Whether to use a texture for the transition effect or not. - */ - useTexture(value: boolean): void; - /** - * Sets the effect texture. - * - * @param {Texture} value - The effect texture. - */ - setTexture(value: Texture): void; - /** - * Sets the texture threshold. This value defines how strong the texture effects - * the transition. Must be in the range `[0,1]` (0 means full effect, 1 means no effect). - * - * @param {boolean|number} value - The threshold value. - */ - setTextureThreshold(value: boolean | number): void; - /** - * Sets the size of the pass. - * - * @param {number} width - The width to set. - * @param {number} height - The height to set. - */ - setSize(width: number, height: number): void; - /** - * Performs the transition pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget): void; - _createMaterial(): ShaderMaterial; -} -import { Pass } from './Pass.js'; -import { ShaderMaterial } from 'three'; -import { WebGLRenderTarget } from 'three'; -import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SAOPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SAOPass.d.ts deleted file mode 100644 index 5bc6ace74..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SAOPass.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * A SAO implementation inspired from @bhouston previous SAO work. - * - * `SAOPass` provides better quality than {@link SSAOPass} but is also more expensive. - * - * ```js - * const saoPass = new SAOPass( scene, camera ); - * composer.addPass( saoPass ); - * ``` - * - * @augments Pass - * @three_import import { SAOPass } from 'three/addons/postprocessing/SAOPass.js'; - */ -export class SAOPass extends Pass { - /** - * Constructs a new SAO pass. - * - * @param {Scene} scene - The scene to compute the AO for. - * @param {Camera} camera - The camera. - * @param {Vector2} [resolution] - The effect's resolution. - */ - constructor(scene: Scene, camera: Camera, resolution?: Vector2); - /** - * The scene to render the AO for. - * - * @type {Scene} - */ - scene: Scene; - /** - * The camera. - * - * @type {Camera} - */ - camera: Camera; - _originalClearColor: Color; - _oldClearColor: Color; - _oldClearAlpha: number; - /** - * The SAO parameter. - * - * @type {Object} - */ - params: Object; - /** - * The effect's resolution. - * - * @type {Vector2} - * @default (256,256) - */ - resolution: Vector2; - saoRenderTarget: WebGLRenderTarget; - blurIntermediateRenderTarget: import("three").RenderTarget; - normalRenderTarget: WebGLRenderTarget; - normalMaterial: MeshNormalMaterial; - saoMaterial: ShaderMaterial; - vBlurMaterial: ShaderMaterial; - hBlurMaterial: ShaderMaterial; - materialCopy: ShaderMaterial; - fsQuad: FullScreenQuad; - /** - * Performs the SAO pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; - prevStdDev: any; - prevNumSamples: any; - /** - * Sets the size of the pass. - * - * @param {number} width - The width to set. - * @param {number} height - The height to set. - */ - setSize(width: number, height: number): void; - _renderPass(renderer: any, passMaterial: any, renderTarget: any, clearColor: any, clearAlpha: any): void; - _renderOverride(renderer: any, overrideMaterial: any, renderTarget: any, clearColor: any, clearAlpha: any): void; -} -export namespace SAOPass { - namespace OUTPUT { - let Default: number; - let SAO: number; - let Normal: number; - } -} -import { Pass } from './Pass.js'; -import { Color } from 'three'; -import { Vector2 } from 'three'; -import { WebGLRenderTarget } from 'three'; -import { MeshNormalMaterial } from 'three'; -import { ShaderMaterial } from 'three'; -import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SMAAPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SMAAPass.d.ts deleted file mode 100644 index fbdc709b6..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SMAAPass.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * A pass for applying SMAA. Unlike {@link FXAAPass}, `SMAAPass` operates in - * `linear-srgb` so this pass must be executed before {@link OutputPass}. - * - * ```js - * const smaaPass = new SMAAPass(); - * composer.addPass( smaaPass ); - * ``` - * - * @augments Pass - * @three_import import { SMAAPass } from 'three/addons/postprocessing/SMAAPass.js'; - */ -export class SMAAPass extends Pass { - _edgesRT: WebGLRenderTarget; - _weightsRT: WebGLRenderTarget; - _areaTexture: Texture; - _searchTexture: Texture; - _uniformsEdges: Object; - _materialEdges: ShaderMaterial; - _uniformsWeights: Object; - _materialWeights: ShaderMaterial; - _uniformsBlend: Object; - _materialBlend: ShaderMaterial; - _fsQuad: FullScreenQuad; - /** - * Performs the SMAA pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; - /** - * Sets the size of the pass. - * - * @param {number} width - The width to set. - * @param {number} height - The height to set. - */ - setSize(width: number, height: number): void; - _getAreaTexture(): string; - _getSearchTexture(): string; -} -import { Pass } from './Pass.js'; -import { WebGLRenderTarget } from 'three'; -import { Texture } from 'three'; -import { ShaderMaterial } from 'three'; -import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSAARenderPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSAARenderPass.d.ts deleted file mode 100644 index 7dad6594f..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSAARenderPass.d.ts +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Supersample Anti-Aliasing Render Pass. - * - * This manual approach to SSAA re-renders the scene ones for each sample with camera jitter and accumulates the results. - * - * ```js - * const ssaaRenderPass = new SSAARenderPass( scene, camera ); - * ssaaRenderPass.sampleLevel = 3; - * composer.addPass( ssaaRenderPass ); - * ``` - * - * @augments Pass - * @three_import import { SSAARenderPass } from 'three/addons/postprocessing/SSAARenderPass.js'; - */ -export class SSAARenderPass extends Pass { - /** - * Constructs a new SSAA render pass. - * - * @param {Scene} scene - The scene to render. - * @param {Camera} camera - The camera. - * @param {?(number|Color|string)} [clearColor=0x000000] - The clear color of the render pass. - * @param {?number} [clearAlpha=0] - The clear alpha of the render pass. - */ - constructor(scene: Scene, camera: Camera, clearColor?: (number | Color | string) | null, clearAlpha?: number | null); - /** - * The scene to render. - * - * @type {Scene} - */ - scene: Scene; - /** - * The camera. - * - * @type {Camera} - */ - camera: Camera; - /** - * The sample level. Specified as n, where the number of - * samples is 2^n, so sampleLevel = 4, is 2^4 samples, 16. - * - * @type {number} - * @default 4 - */ - sampleLevel: number; - /** - * Whether the pass should be unbiased or not. This property has the most - * visible effect when rendering to a RGBA8 buffer because it mitigates - * rounding errors. By default RGBA16F is used. - * - * @type {boolean} - * @default true - */ - unbiased: boolean; - /** - * Whether to use a stencil buffer or not. This property can't - * be changed after the first render. - * - * @type {boolean} - * @default false - */ - stencilBuffer: boolean; - /** - * The clear color of the render pass. - * - * @type {?(number|Color|string)} - * @default 0x000000 - */ - clearColor: (number | Color | string) | null; - /** - * The clear alpha of the render pass. - * - * @type {?number} - * @default 0 - */ - clearAlpha: number | null; - _sampleRenderTarget: WebGLRenderTarget | null; - _oldClearColor: Color; - _copyUniforms: Object; - _copyMaterial: ShaderMaterial; - _fsQuad: FullScreenQuad; - /** - * Sets the size of the pass. - * - * @param {number} width - The width to set. - * @param {number} height - The height to set. - */ - setSize(width: number, height: number): void; - /** - * Performs the SSAA render pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; -} -import { Pass } from './Pass.js'; -import { Color } from 'three'; -import { WebGLRenderTarget } from 'three'; -import { ShaderMaterial } from 'three'; -import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSAOPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSAOPass.d.ts deleted file mode 100644 index e26c2ac62..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSAOPass.d.ts +++ /dev/null @@ -1,137 +0,0 @@ -/** - * A pass for a basic SSAO effect. - * - * {@link SAOPass} and {@link GTAPass} produce a more advanced AO but are also - * more expensive. - * - * ```js - * const ssaoPass = new SSAOPass( scene, camera, width, height ); - * composer.addPass( ssaoPass ); - * ``` - * - * @augments Pass - * @three_import import { SSAOPass } from 'three/addons/postprocessing/SSAOPass.js'; - */ -export class SSAOPass extends Pass { - /** - * Constructs a new SSAO pass. - * - * @param {Scene} scene - The scene to compute the AO for. - * @param {Camera} camera - The camera. - * @param {number} [width=512] - The width of the effect. - * @param {number} [height=512] - The height of the effect. - * @param {number} [kernelSize=32] - The kernel size. - */ - constructor(scene: Scene, camera: Camera, width?: number, height?: number, kernelSize?: number); - /** - * The width of the effect. - * - * @type {number} - * @default 512 - */ - width: number; - /** - * The height of the effect. - * - * @type {number} - * @default 512 - */ - height: number; - /** - * The camera. - * - * @type {Camera} - */ - camera: Camera; - /** - * The scene to render the AO for. - * - * @type {Scene} - */ - scene: Scene; - /** - * The kernel radius controls how wide the - * AO spreads. - * - * @type {number} - * @default 8 - */ - kernelRadius: number; - kernel: any[]; - noiseTexture: DataTexture | null; - /** - * The output configuration. - * - * @type {number} - * @default 0 - */ - output: number; - /** - * Defines the minimum distance that should be - * affected by the AO. - * - * @type {number} - * @default 0.005 - */ - minDistance: number; - /** - * Defines the maximum distance that should be - * affected by the AO. - * - * @type {number} - * @default 0.1 - */ - maxDistance: number; - _visibilityCache: any[]; - normalRenderTarget: WebGLRenderTarget; - ssaoRenderTarget: WebGLRenderTarget; - blurRenderTarget: import("three").RenderTarget; - ssaoMaterial: ShaderMaterial; - normalMaterial: MeshNormalMaterial; - blurMaterial: ShaderMaterial; - depthRenderMaterial: ShaderMaterial; - copyMaterial: ShaderMaterial; - _fsQuad: FullScreenQuad; - _originalClearColor: Color; - /** - * Performs the SSAO pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; - /** - * Sets the size of the pass. - * - * @param {number} width - The width to set. - * @param {number} height - The height to set. - */ - setSize(width: number, height: number): void; - _renderPass(renderer: any, passMaterial: any, renderTarget: any, clearColor: any, clearAlpha: any): void; - _renderOverride(renderer: any, overrideMaterial: any, renderTarget: any, clearColor: any, clearAlpha: any): void; - _generateSampleKernel(kernelSize: any): void; - _generateRandomKernelRotations(): void; - _overrideVisibility(): void; - _restoreVisibility(): void; -} -export namespace SSAOPass { - namespace OUTPUT { - let Default: number; - let SSAO: number; - let Blur: number; - let Depth: number; - let Normal: number; - } -} -import { Pass } from './Pass.js'; -import { DataTexture } from 'three'; -import { WebGLRenderTarget } from 'three'; -import { ShaderMaterial } from 'three'; -import { MeshNormalMaterial } from 'three'; -import { FullScreenQuad } from './Pass.js'; -import { Color } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSRPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSRPass.d.ts deleted file mode 100644 index 02504603f..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SSRPass.d.ts +++ /dev/null @@ -1,218 +0,0 @@ -/** - * ~Options - */ -export type SSRPass = { - /** - * - The renderer. - */ - renderer: WebGLRenderer; - /** - * - The scene to render. - */ - scene: Scene; - /** - * - The camera. - */ - camera: Camera; - /** - * - The width of the effect. - */ - width?: number | undefined; - /** - * - The width of the effect. - */ - height?: number | undefined; - /** - * - Which 3D objects should be affected by SSR. If not set, the entire scene is affected. - */ - selects?: Object3D[] | null | undefined; - /** - * - Whether bouncing is enabled or not. - */ - bouncing?: boolean | undefined; - /** - * - A ground reflector. - */ - groundReflector?: ReflectorForSSRPass | null; -}; -/** - * A pass for a basic SSR effect. - * - * ```js - * const ssrPass = new SSRPass( { - * renderer, - * scene, - * camera, - * width: innerWidth, - * height: innerHeight - * } ); - * composer.addPass( ssrPass ); - * ``` - * - * @augments Pass - * @three_import import { SSRPass } from 'three/addons/postprocessing/SSRPass.js'; - */ -export class SSRPass extends Pass { - /** - * Constructs a new SSR pass. - * - * @param {SSRPass~Options} options - The pass options. - */ - constructor({ renderer, scene, camera, width, height, selects, bouncing, groundReflector }: SSRPass); - /** - * The width of the effect. - * - * @type {number} - * @default 512 - */ - width: number; - /** - * The height of the effect. - * - * @type {number} - * @default 512 - */ - height: number; - /** - * The renderer. - * - * @type {WebGLRenderer} - */ - renderer: WebGLRenderer; - /** - * The scene to render. - * - * @type {Scene} - */ - scene: Scene; - /** - * The camera. - * - * @type {Camera} - */ - camera: Camera; - /** - * The ground reflector. - * - * @type {?ReflectorForSSRPass} - * @default 0 - */ - groundReflector: ReflectorForSSRPass | null; - /** - * The opacity. - * - * @type {number} - * @default 0.5 - */ - opacity: number; - /** - * The output configuration. - * - * @type {number} - * @default 0 - */ - output: number; - /** - * Controls how far a fragment can reflect. - * - * @type {number} - * @default 180 - */ - maxDistance: number; - /** - * Controls the cutoff between what counts as a - * possible reflection hit and what does not. - * - * @type {number} - * @default .018 - */ - thickness: number; - tempColor: Color; - _selects: any; - _resolutionScale: number; - /** - * Whether the pass is selective or not. - * - * @type {boolean} - * @default false - */ - selective: boolean; - _bouncing: any; - /** - * Whether to blur reflections or not. - * - * @type {boolean} - * @default true - */ - blur: boolean; - _distanceAttenuation: any; - _fresnel: any; - _infiniteThick: any; - beautyRenderTarget: WebGLRenderTarget; - prevRenderTarget: WebGLRenderTarget; - normalRenderTarget: WebGLRenderTarget; - metalnessRenderTarget: WebGLRenderTarget; - ssrRenderTarget: WebGLRenderTarget; - blurRenderTarget: import("three").RenderTarget; - blurRenderTarget2: import("three").RenderTarget; - ssrMaterial: ShaderMaterial; - normalMaterial: MeshNormalMaterial; - metalnessOnMaterial: MeshBasicMaterial; - metalnessOffMaterial: MeshBasicMaterial; - blurMaterial: ShaderMaterial; - blurMaterial2: ShaderMaterial; - depthRenderMaterial: ShaderMaterial; - copyMaterial: ShaderMaterial; - fsQuad: FullScreenQuad; - originalClearColor: Color; - set resolutionScale(value: number); - /** - * The resolution scale. Valid values are in the range - * `[0,1]`. `1` means best quality but also results in - * more computational overhead. Setting to `0.5` means - * the effect is computed in half-resolution. - * - * @type {number} - * @default 1 - */ - get resolutionScale(): number; - /** - * Performs the SSR pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget): void; - /** - * Sets the size of the pass. - * - * @param {number} width - The width to set. - * @param {number} height - The height to set. - */ - setSize(width: number, height: number): void; - _renderPass(renderer: any, passMaterial: any, renderTarget: any, clearColor: any, clearAlpha: any): void; - _renderOverride(renderer: any, overrideMaterial: any, renderTarget: any, clearColor: any, clearAlpha: any): void; - _renderMetalness(renderer: any, overrideMaterial: any, renderTarget: any, clearColor: any, clearAlpha: any): void; -} -export namespace SSRPass { - namespace OUTPUT { - let Default: number; - let SSR: number; - let Beauty: number; - let Depth: number; - let Normal: number; - let Metalness: number; - } -} -import { Pass } from './Pass.js'; -import { Color } from 'three'; -import { WebGLRenderTarget } from 'three'; -import { ShaderMaterial } from 'three'; -import { MeshNormalMaterial } from 'three'; -import { MeshBasicMaterial } from 'three'; -import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SavePass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SavePass.d.ts deleted file mode 100644 index 658d5124e..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/SavePass.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -/** - * A pass that saves the contents of the current read buffer in a render target. - * - * ```js - * const savePass = new SavePass( customRenderTarget ); - * composer.addPass( savePass ); - * ``` - * - * @augments Pass - * @three_import import { SavePass } from 'three/addons/postprocessing/SavePass.js'; - */ -export class SavePass extends Pass { - /** - * Constructs a new save pass. - * - * @param {WebGLRenderTarget} [renderTarget] - The render target for saving the read buffer. - * If not provided, the pass automatically creates a render target. - */ - constructor(renderTarget?: WebGLRenderTarget); - /** - * The pass uniforms. - * - * @type {Object} - */ - uniforms: Object; - /** - * The pass material. - * - * @type {ShaderMaterial} - */ - material: ShaderMaterial; - /** - * The render target which is used to save the read buffer. - * - * @type {WebGLRenderTarget} - */ - renderTarget: WebGLRenderTarget; - _fsQuad: FullScreenQuad; - /** - * Performs the save pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; - /** - * Sets the size of the pass. - * - * @param {number} width - The width to set. - * @param {number} height - The height to set. - */ - setSize(width: number, height: number): void; -} -import { Pass } from './Pass.js'; -import { ShaderMaterial } from 'three'; -import { WebGLRenderTarget } from 'three'; -import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/ShaderPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/ShaderPass.d.ts deleted file mode 100644 index f88751cd7..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/ShaderPass.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * This pass can be used to create a post processing effect - * with a raw GLSL shader object. Useful for implementing custom - * effects. - * - * ```js - * const fxaaPass = new ShaderPass( FXAAShader ); - * composer.addPass( fxaaPass ); - * ``` - * - * @augments Pass - * @three_import import { ShaderPass } from 'three/addons/postprocessing/ShaderPass.js'; - */ -export class ShaderPass extends Pass { - /** - * Constructs a new shader pass. - * - * @param {Object|ShaderMaterial} [shader] - A shader object holding vertex and fragment shader as well as - * defines and uniforms. It's also valid to pass a custom shader material. - * @param {string} [textureID='tDiffuse'] - The name of the texture uniform that should sample - * the read buffer. - */ - constructor(shader?: Object | ShaderMaterial, textureID?: string); - /** - * The name of the texture uniform that should sample the read buffer. - * - * @type {string} - * @default 'tDiffuse' - */ - textureID: string; - /** - * The pass uniforms. - * - * @type {?Object} - */ - uniforms: Object | null; - /** - * The pass material. - * - * @type {?ShaderMaterial} - */ - material: ShaderMaterial | null; - _fsQuad: FullScreenQuad; - /** - * Performs the shader pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; -} -import { Pass } from './Pass.js'; -import { ShaderMaterial } from 'three'; -import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/TAARenderPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/TAARenderPass.d.ts deleted file mode 100644 index c70de7eda..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/TAARenderPass.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * - * Temporal Anti-Aliasing Render Pass. - * - * When there is no motion in the scene, the TAA render pass accumulates jittered camera - * samples across frames to create a high quality anti-aliased result. - * - * Note: This effect uses no reprojection so it is no TRAA implementation. - * - * ```js - * const taaRenderPass = new TAARenderPass( scene, camera ); - * taaRenderPass.unbiased = false; - * composer.addPass( taaRenderPass ); - * ``` - * - * @augments SSAARenderPass - * @three_import import { TAARenderPass } from 'three/addons/postprocessing/TAARenderPass.js'; - */ -export class TAARenderPass extends SSAARenderPass { - /** - * Constructs a new TAA render pass. - * - * @param {Scene} scene - The scene to render. - * @param {Camera} camera - The camera. - * @param {?(number|Color|string)} [clearColor=0x000000] - The clear color of the render pass. - * @param {?number} [clearAlpha=0] - The clear alpha of the render pass. - */ - constructor(scene: Scene, camera: Camera, clearColor?: (number | Color | string) | null, clearAlpha?: number | null); - /** - * Whether to accumulate frames or not. This enables - * the TAA. - * - * @type {boolean} - * @default false - */ - accumulate: boolean; - /** - * The accumulation index. - * - * @type {number} - * @default -1 - */ - accumulateIndex: number; - _holdRenderTarget: WebGLRenderTarget | null; - /** - * Performs the TAA render pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget, deltaTime: number): void; -} -import { SSAARenderPass } from './SSAARenderPass.js'; -import { WebGLRenderTarget } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/TexturePass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/TexturePass.d.ts deleted file mode 100644 index 77a24d54f..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/TexturePass.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * This pass can be used to render a texture over the entire screen. - * - * ```js - * const texture = new THREE.TextureLoader().load( 'textures/2294472375_24a3b8ef46_o.jpg' ); - * texture.colorSpace = THREE.SRGBColorSpace; - * - * const texturePass = new TexturePass( texture ); - * composer.addPass( texturePass ); - * ``` - * - * @augments Pass - * @three_import import { TexturePass } from 'three/addons/postprocessing/TexturePass.js'; - */ -export class TexturePass extends Pass { - /** - * Constructs a new texture pass. - * - * @param {Texture} map - The texture to render. - * @param {number} [opacity=1] - The opacity. - */ - constructor(map: Texture, opacity?: number); - /** - * The texture to render. - * - * @type {Texture} - */ - map: Texture; - /** - * The opacity. - * - * @type {number} - * @default 1 - */ - opacity: number; - /** - * The pass uniforms. - * - * @type {Object} - */ - uniforms: Object; - /** - * The pass material. - * - * @type {ShaderMaterial} - */ - material: ShaderMaterial; - _fsQuad: FullScreenQuad; - /** - * Performs the texture pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget): void; -} -import { Pass } from './Pass.js'; -import { ShaderMaterial } from 'three'; -import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/UnrealBloomPass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/postprocessing/UnrealBloomPass.d.ts deleted file mode 100644 index e16437efd..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/postprocessing/UnrealBloomPass.d.ts +++ /dev/null @@ -1,112 +0,0 @@ -/** - * This pass is inspired by the bloom pass of Unreal Engine. It creates a - * mip map chain of bloom textures and blurs them with different radii. Because - * of the weighted combination of mips, and because larger blurs are done on - * higher mips, this effect provides good quality and performance. - * - * When using this pass, tone mapping must be enabled in the renderer settings. - * - * Reference: - * - [Bloom in Unreal Engine](https://docs.unrealengine.com/latest/INT/Engine/Rendering/PostProcessEffects/Bloom/) - * - * ```js - * const resolution = new THREE.Vector2( window.innerWidth, window.innerHeight ); - * const bloomPass = new UnrealBloomPass( resolution, 1.5, 0.4, 0.85 ); - * composer.addPass( bloomPass ); - * ``` - * - * @augments Pass - * @three_import import { UnrealBloomPass } from 'three/addons/postprocessing/UnrealBloomPass.js'; - */ -export class UnrealBloomPass extends Pass { - /** - * Constructs a new Unreal Bloom pass. - * - * @param {Vector2} [resolution] - The effect's resolution. - * @param {number} [strength=1] - The Bloom strength. - * @param {number} radius - The Bloom radius. - * @param {number} threshold - The luminance threshold limits which bright areas contribute to the Bloom effect. - */ - constructor(resolution?: Vector2, strength?: number, radius: number, threshold: number); - /** - * The Bloom strength. - * - * @type {number} - * @default 1 - */ - strength: number; - /** - * The Bloom radius. Must be in the range `[0,1]`. - * - * @type {number} - */ - radius: number; - /** - * The luminance threshold limits which bright areas contribute to the Bloom effect. - * - * @type {number} - */ - threshold: number; - /** - * The effect's resolution. - * - * @type {Vector2} - * @default (256,256) - */ - resolution: Vector2; - /** - * The effect's clear color - * - * @type {Color} - * @default (0,0,0) - */ - clearColor: Color; - renderTargetsHorizontal: WebGLRenderTarget[]; - renderTargetsVertical: WebGLRenderTarget[]; - nMips: number; - renderTargetBright: WebGLRenderTarget; - highPassUniforms: Object; - materialHighPassFilter: ShaderMaterial; - separableBlurMaterials: ShaderMaterial[]; - compositeMaterial: ShaderMaterial; - bloomTintColors: Vector3[]; - copyUniforms: Object; - blendMaterial: ShaderMaterial; - _oldClearColor: Color; - _oldClearAlpha: number; - _basic: MeshBasicMaterial; - _fsQuad: FullScreenQuad; - /** - * Sets the size of the pass. - * - * @param {number} width - The width to set. - * @param {number} height - The height to set. - */ - setSize(width: number, height: number): void; - /** - * Performs the Bloom pass. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGLRenderTarget} writeBuffer - The write buffer. This buffer is intended as the rendering - * destination for the pass. - * @param {WebGLRenderTarget} readBuffer - The read buffer. The pass can access the result from the - * previous pass from this buffer. - * @param {number} deltaTime - The delta time in seconds. - * @param {boolean} maskActive - Whether masking is active or not. - */ - render(renderer: WebGLRenderer, writeBuffer: WebGLRenderTarget, readBuffer: WebGLRenderTarget, deltaTime: number, maskActive: boolean): void; - _getSeparableBlurMaterial(kernelRadius: any): ShaderMaterial; - _getCompositeMaterial(nMips: any): ShaderMaterial; -} -export namespace UnrealBloomPass { - let BlurDirectionX: Vector2; - let BlurDirectionY: Vector2; -} -import { Pass } from './Pass.js'; -import { Vector2 } from 'three'; -import { Color } from 'three'; -import { WebGLRenderTarget } from 'three'; -import { ShaderMaterial } from 'three'; -import { Vector3 } from 'three'; -import { MeshBasicMaterial } from 'three'; -import { FullScreenQuad } from './Pass.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/renderers/CSS2DRenderer.d.ts b/jsdoc-testing/jsdoc/examples/jsm/renderers/CSS2DRenderer.d.ts deleted file mode 100644 index 031804bfc..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/renderers/CSS2DRenderer.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -/** - * ~Parameters - */ -export type CSS2DRenderer = { - /** - * - A DOM element where the renderer appends its child-elements. - * If not passed in here, a new div element will be created. - */ - element?: HTMLElement | undefined; -}; -/** - * The only type of 3D object that is supported by {@link CSS2DRenderer}. - * - * @augments Object3D - * @three_import import { CSS2DObject } from 'three/addons/renderers/CSS2DRenderer.js'; - */ -export class CSS2DObject extends Object3D { - /** - * Constructs a new CSS2D object. - * - * @param {HTMLElement} [element] - The DOM element. - */ - constructor(element?: HTMLElement); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isCSS2DObject: boolean; - /** - * The DOM element which defines the appearance of this 3D object. - * - * @type {HTMLElement} - * @readonly - * @default true - */ - readonly element: HTMLElement; - /** - * The 3D objects center point. - * `( 0, 0 )` is the lower left, `( 1, 1 )` is the top right. - * - * @type {Vector2} - * @default (0.5,0.5) - */ - center: Vector2; - copy(source: any, recursive: any): this; -} -/** - * This renderer is a simplified version of {@link CSS3DRenderer}. The only transformation that is - * supported is translation. - * - * The renderer is very useful if you want to combine HTML based labels with 3D objects. Here too, - * the respective DOM elements are wrapped into an instance of {@link CSS2DObject} and added to the - * scene graph. All other types of renderable 3D objects (like meshes or point clouds) are ignored. - * - * `CSS2DRenderer` only supports 100% browser and display zoom. - * - * @three_import import { CSS2DRenderer } from 'three/addons/renderers/CSS2DRenderer.js'; - */ -export class CSS2DRenderer { - /** - * Constructs a new CSS2D renderer. - * - * @param {CSS2DRenderer~Parameters} [parameters] - The parameters. - */ - constructor(parameters?: {}); - /** - * The DOM where the renderer appends its child-elements. - * - * @type {HTMLElement} - */ - domElement: HTMLElement; - /** - * Controls whether the renderer assigns `z-index` values to CSS2DObject DOM elements. - * If set to `true`, z-index values are assigned first based on the `renderOrder` - * and secondly - the distance to the camera. If set to `false`, no z-index values are assigned. - * - * @type {boolean} - * @default true - */ - sortObjects: boolean; - /** - * Returns an object containing the width and height of the renderer. - * - * @return {{width:number,height:number}} The size of the renderer. - */ - getSize: () => { - width: number; - height: number; - }; - /** - * Renders the given scene using the given camera. - * - * @param {Object3D} scene - A scene or any other type of 3D object. - * @param {Camera} camera - The camera. - */ - render: (scene: Object3D, camera: Camera) => void; - /** - * Resizes the renderer to the given width and height. - * - * @param {number} width - The width of the renderer. - * @param {number} height - The height of the renderer. - */ - setSize: (width: number, height: number) => void; -} -import { Object3D } from 'three'; -import { Vector2 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/renderers/CSS3DRenderer.d.ts b/jsdoc-testing/jsdoc/examples/jsm/renderers/CSS3DRenderer.d.ts deleted file mode 100644 index 0cf3ed245..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/renderers/CSS3DRenderer.d.ts +++ /dev/null @@ -1,121 +0,0 @@ -/** - * ~Parameters - */ -export type CSS3DRenderer = { - /** - * - A DOM element where the renderer appends its child-elements. - * If not passed in here, a new div element will be created. - */ - element?: HTMLElement | undefined; -}; -/** - * The base 3D object that is supported by {@link CSS3DRenderer}. - * - * @augments Object3D - * @three_import import { CSS3DObject } from 'three/addons/renderers/CSS3DRenderer.js'; - */ -export class CSS3DObject extends Object3D { - /** - * Constructs a new CSS3D object. - * - * @param {HTMLElement} [element] - The DOM element. - */ - constructor(element?: HTMLElement); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isCSS3DObject: boolean; - /** - * The DOM element which defines the appearance of this 3D object. - * - * @type {HTMLElement} - * @readonly - * @default true - */ - readonly element: HTMLElement; - copy(source: any, recursive: any): this; -} -/** - * A specialized version of {@link CSS3DObject} that represents - * DOM elements as sprites. - * - * @augments CSS3DObject - * @three_import import { CSS3DSprite } from 'three/addons/renderers/CSS3DRenderer.js'; - */ -export class CSS3DSprite extends CSS3DObject { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isCSS3DSprite: boolean; - /** - * The sprite's rotation in radians. - * - * @type {number} - * @default 0 - */ - rotation2D: number; - copy(source: any, recursive: any): this; -} -/** - * This renderer can be used to apply hierarchical 3D transformations to DOM elements - * via the CSS3 [transform](https://www.w3schools.com/cssref/css3_pr_transform.asp) property. - * `CSS3DRenderer` is particularly interesting if you want to apply 3D effects to a website without - * canvas based rendering. It can also be used in order to combine DOM elements with WebGL content. - * - * There are, however, some important limitations: - * - * - It's not possible to use the material system of *three.js*. - * - It's also not possible to use geometries. - * - The renderer only supports 100% browser and display zoom. - * - * So `CSS3DRenderer` is just focused on ordinary DOM elements. These elements are wrapped into special - * 3D objects ({@link CSS3DObject} or {@link CSS3DSprite}) and then added to the scene graph. - * - * @three_import import { CSS3DRenderer } from 'three/addons/renderers/CSS3DRenderer.js'; - */ -export class CSS3DRenderer { - /** - * Constructs a new CSS3D renderer. - * - * @param {CSS3DRenderer~Parameters} [parameters] - The parameters. - */ - constructor(parameters?: {}); - /** - * The DOM where the renderer appends its child-elements. - * - * @type {HTMLElement} - */ - domElement: HTMLElement; - /** - * Returns an object containing the width and height of the renderer. - * - * @return {{width:number,height:number}} The size of the renderer. - */ - getSize: () => { - width: number; - height: number; - }; - /** - * Renders the given scene using the given camera. - * - * @param {Object3D} scene - A scene or any other type of 3D object. - * @param {Camera} camera - The camera. - */ - render: (scene: Object3D, camera: Camera) => void; - /** - * Resizes the renderer to the given width and height. - * - * @param {number} width - The width of the renderer. - * @param {number} height - The height of the renderer. - */ - setSize: (width: number, height: number) => void; -} -import { Object3D } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/renderers/Projector.d.ts b/jsdoc-testing/jsdoc/examples/jsm/renderers/Projector.d.ts deleted file mode 100644 index 32084b049..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/renderers/Projector.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -export class RenderableObject { - id: number; - object: any; - z: number; - renderOrder: number; -} -export class RenderableFace { - id: number; - v1: RenderableVertex; - v2: RenderableVertex; - v3: RenderableVertex; - normalModel: Vector3; - vertexNormalsModel: Vector3[]; - vertexNormalsLength: number; - color: Color; - material: any; - uvs: Vector2[]; - z: number; - renderOrder: number; -} -export class RenderableVertex { - position: Vector3; - positionWorld: Vector3; - positionScreen: Vector4; - visible: boolean; - copy(vertex: any): void; -} -export class RenderableLine { - id: number; - v1: RenderableVertex; - v2: RenderableVertex; - vertexColors: Color[]; - material: any; - z: number; - renderOrder: number; -} -export class RenderableSprite { - id: number; - object: any; - x: number; - y: number; - z: number; - rotation: number; - scale: Vector2; - material: any; - renderOrder: number; -} -/** - * This class can project a given scene in 3D space into a 2D representation - * used for rendering with a 2D API. `Projector` is currently used by {@link SVGRenderer} - * and was previously used by the legacy `CanvasRenderer`. - * - * @three_import import { Projector } from 'three/addons/renderers/Projector.js'; - */ -export class Projector { - /** - * Projects the given scene in 3D space into a 2D representation. The result - * is an object with renderable items. - * - * @param {Object3D} scene - A scene or any other type of 3D object. - * @param {Camera} camera - The camera. - * @param {boolean} sortObjects - Whether to sort objects or not. - * @param {boolean} sortElements - Whether to sort elements (faces, lines and sprites) or not. - * @return {{objects:Array,lights:Array,elements:Array}} The projected scene as renderable objects. - */ - projectScene: (scene: Object3D, camera: Camera, sortObjects: boolean, sortElements: boolean) => { - objects: Array; - lights: Array; - elements: Array; - }; -} -import { Vector3 } from 'three'; -import { Color } from 'three'; -import { Vector2 } from 'three'; -import { Vector4 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/renderers/SVGRenderer.d.ts b/jsdoc-testing/jsdoc/examples/jsm/renderers/SVGRenderer.d.ts deleted file mode 100644 index a9813dd1b..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/renderers/SVGRenderer.d.ts +++ /dev/null @@ -1,150 +0,0 @@ -/** - * Can be used to wrap SVG elements into a 3D object. - * - * @augments Object3D - * @three_import import { SVGObject } from 'three/addons/renderers/SVGRenderer.js'; - */ -export class SVGObject extends Object3D { - /** - * Constructs a new SVG object. - * - * @param {SVGElement} node - The SVG element. - */ - constructor(node: SVGElement); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSVGObject: boolean; - /** - * This SVG element. - * - * @type {SVGElement} - */ - node: SVGElement; -} -/** - * This renderer an be used to render geometric data using SVG. The produced vector - * graphics are particular useful in the following use cases: - * - * - Animated logos or icons. - * - Interactive 2D/3D diagrams or graphs. - * - Interactive maps. - * - Complex or animated user interfaces. - * - * `SVGRenderer` has various advantages. It produces crystal-clear and sharp output which - * is independent of the actual viewport resolution.SVG elements can be styled via CSS. - * And they have good accessibility since it's possible to add metadata like title or description - * (useful for search engines or screen readers). - * - * There are, however, some important limitations: - * - No advanced shading. - * - No texture support. - * - No shadow support. - * - * @three_import import { SVGRenderer } from 'three/addons/renderers/SVGRenderer.js'; - */ -export class SVGRenderer { - /** - * The DOM where the renderer appends its child-elements. - * - * @type {SVGSVGElement} - */ - domElement: SVGSVGElement; - /** - * Whether to automatically perform a clear before a render call or not. - * - * @type {boolean} - * @default true - */ - autoClear: boolean; - /** - * Whether to sort 3D objects or not. - * - * @type {boolean} - * @default true - */ - sortObjects: boolean; - /** - * Whether to sort elements or not. - * - * @type {boolean} - * @default true - */ - sortElements: boolean; - /** - * Number of fractional pixels to enlarge polygons in order to - * prevent anti-aliasing gaps. Range is `[0,1]`. - * - * @type {number} - * @default 0.5 - */ - overdraw: number; - /** - * The output color space. - * - * @type {(SRGBColorSpace|LinearSRGBColorSpace)} - * @default SRGBColorSpace - */ - outputColorSpace: (string | LinearSRGBColorSpace); - /** - * Provides information about the number of - * rendered vertices and faces. - * - * @type {Object} - */ - info: Object; - /** - * Sets the render quality. Setting to `high` makes the browser improve SVG quality - * over rendering speed and geometric precision. - * - * @param {('low'|'high')} quality - The quality. - */ - setQuality: (quality: ("low" | "high")) => void; - /** - * Sets the clear color. - * - * @param {(number|Color|string)} color - The clear color to set. - */ - setClearColor: (color: (number | Color | string)) => void; - setPixelRatio: () => void; - /** - * Resizes the renderer to the given width and height. - * - * @param {number} width - The width of the renderer. - * @param {number} height - The height of the renderer. - */ - setSize: (width: number, height: number) => void; - /** - * Returns an object containing the width and height of the renderer. - * - * @return {{width:number,height:number}} The size of the renderer. - */ - getSize: () => { - width: number; - height: number; - }; - /** - * Sets the precision of the data used to create a paths. - * - * @param {number} precision - The precision to set. - */ - setPrecision: (precision: number) => void; - /** - * Performs a manual clear with the defined clear color. - */ - clear: () => void; - /** - * Renders the given scene using the given camera. - * - * @param {Object3D} scene - A scene or any other type of 3D object. - * @param {Camera} camera - The camera. - */ - render: (scene: Object3D, camera: Camera) => void; -} -import { Object3D } from 'three'; -import { Color } from 'three'; -import { Camera } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts deleted file mode 100644 index 31079d7c7..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @module ACESFilmicToneMappingShader - * @three_import import { ACESFilmicToneMappingShader } from 'three/addons/shaders/ACESFilmicToneMappingShader.js'; - */ -/** - * ACES Filmic Tone Mapping Shader by Stephen Hill. - * Reference: [ltc_blit.fs](https://github.com/selfshadow/ltc_code/blob/master/webgl/shaders/ltc/ltc_blit.fs) - * - * This implementation of ACES is modified to accommodate a brighter viewing environment. - * The scale factor of 1/0.6 is subjective. See discussion in #19621. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const ACESFilmicToneMappingShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/AfterimageShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/AfterimageShader.d.ts deleted file mode 100644 index 440b592fa..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/AfterimageShader.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @module AfterimageShader - * @three_import import { AfterimageShader } from 'three/addons/shaders/AfterimageShader.js'; - */ -/** - * Inspired by [Three.js FBO motion trails](https://codepen.io/brunoimbrizi/pen/MoRJaN?page=1&). - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const AfterimageShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/BasicShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/BasicShader.d.ts deleted file mode 100644 index 18bfeb90b..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/BasicShader.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @module BasicShader - * @three_import import { BasicShader } from 'three/addons/shaders/BasicShader.js'; - */ -/** - * Simple shader for testing. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const BasicShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/BleachBypassShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/BleachBypassShader.d.ts deleted file mode 100644 index a1ccf8066..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/BleachBypassShader.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @module BleachBypassShader - * @three_import import { BleachBypassShader } from 'three/addons/shaders/BleachBypassShader.js'; - */ -/** - * Bleach bypass shader [http://en.wikipedia.org/wiki/Bleach_bypass] based on - * [Nvidia Shader library](http://developer.download.nvidia.com/shaderlibrary/webpages/shader_library.html#post_bleach_bypass). - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const BleachBypassShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/BlendShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/BlendShader.d.ts deleted file mode 100644 index e611c0440..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/BlendShader.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @module BlendShader - * @three_import import { BlendShader } from 'three/addons/shaders/BlendShader.js'; - */ -/** - * Blends two textures. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const BlendShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/BokehShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/BokehShader.d.ts deleted file mode 100644 index 8f1a07d14..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/BokehShader.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @module BokehShader - * @three_import import { BokehShader } from 'three/addons/shaders/BokehShader.js'; - */ -/** - * Depth-of-field shader with bokeh ported from - * [GLSL shader by Martins Upitis](http://artmartinsh.blogspot.com/2010/02/glsl-lens-blur-filter-with-bokeh.html). - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const BokehShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/BokehShader2.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/BokehShader2.d.ts deleted file mode 100644 index ee60e93f0..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/BokehShader2.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * @module BokehShader2 - * @three_import import { BokehShader, BokehDepthShader } from 'three/addons/shaders/BokehShader2.js'; - */ -/** - * Depth-of-field shader with bokeh ported from - * [GLSL shader by Martins Upitis](http://blenderartists.org/forum/showthread.php?237488-GLSL-depth-of-field-with-bokeh-v2-4-(update)). - * - * Requires #define RINGS and SAMPLES integers - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const BokehShader: ShaderMaterial; -export namespace BokehDepthShader { - let name: string; - namespace uniforms { - namespace mNear { - let value: number; - } - namespace mFar { - let value_1: number; - export { value_1 as value }; - } - } - let vertexShader: string; - let fragmentShader: string; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/BrightnessContrastShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/BrightnessContrastShader.d.ts deleted file mode 100644 index cab589f4b..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/BrightnessContrastShader.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @module BrightnessContrastShader - * @three_import import { BrightnessContrastShader } from 'three/addons/shaders/BrightnessContrastShader.js'; - */ -/** - * Brightness and contrast adjustment {@link https://github.com/evanw/glfx.js}. - * Brightness: -1 to 1 (-1 is solid black, 0 is no change, and 1 is solid white) - * Contrast: -1 to 1 (-1 is solid gray, 0 is no change, and 1 is maximum contrast) - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const BrightnessContrastShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/ColorCorrectionShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/ColorCorrectionShader.d.ts deleted file mode 100644 index 1172081b2..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/ColorCorrectionShader.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @module ColorCorrectionShader - * @three_import import { ColorCorrectionShader } from 'three/addons/shaders/ColorCorrectionShader.js'; - */ -/** - * Color correction shader. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const ColorCorrectionShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/ColorifyShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/ColorifyShader.d.ts deleted file mode 100644 index ad6864f45..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/ColorifyShader.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @module ColorifyShader - * @three_import import { ColorifyShader } from 'three/addons/shaders/ColorifyShader.js'; - */ -/** - * Colorify shader. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const ColorifyShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/ConvolutionShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/ConvolutionShader.d.ts deleted file mode 100644 index f272adf10..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/ConvolutionShader.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @module ConvolutionShader - * @three_import import { ConvolutionShader } from 'three/addons/shaders/ConvolutionShader.js'; - */ -/** - * Convolution shader ported from o3d sample to WebGL / GLSL. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const ConvolutionShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/CopyShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/CopyShader.d.ts deleted file mode 100644 index 9afca73ca..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/CopyShader.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @module CopyShader - * @three_import import { CopyShader } from 'three/addons/shaders/CopyShader.js'; - */ -/** - * Full-screen copy shader pass. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const CopyShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/DOFMipMapShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/DOFMipMapShader.d.ts deleted file mode 100644 index be1d0dc76..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/DOFMipMapShader.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @module DOFMipMapShader - * @three_import import { DOFMipMapShader } from 'three/addons/shaders/DOFMipMapShader.js'; - */ -/** - * Depth-of-field shader using mipmaps from Matt Handley @applmak. - * - * Requires power-of-2 sized render target with enabled mipmaps. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const DOFMipMapShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/DepthLimitedBlurShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/DepthLimitedBlurShader.d.ts deleted file mode 100644 index 1aebc77ee..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/DepthLimitedBlurShader.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @module DepthLimitedBlurShader - * @three_import import { DepthLimitedBlurShader, BlurShaderUtils } from 'three/addons/shaders/DepthLimitedBlurShader.js'; - */ -/** - * TODO - * - * Used by {@link SAOPass}. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const DepthLimitedBlurShader: ShaderMaterial; -export namespace BlurShaderUtils { - function createSampleWeights(kernelRadius: any, stdDev: any): number[]; - function createSampleOffsets(kernelRadius: any, uvIncrement: any): any[]; - function configure(material: any, kernelRadius: any, stdDev: any, uvIncrement: any): void; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/DigitalGlitch.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/DigitalGlitch.d.ts deleted file mode 100644 index 2e3ea3fc5..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/DigitalGlitch.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @module DigitalGlitch - * @three_import import { DigitalGlitch } from 'three/addons/shaders/DigitalGlitch.js'; - */ -/** - * Digital glitch shader. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const DigitalGlitch: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/DotScreenShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/DotScreenShader.d.ts deleted file mode 100644 index 1b7a05f1b..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/DotScreenShader.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @module DotScreenShader - * @three_import import { DotScreenShader } from 'three/addons/shaders/DotScreenShader.js'; - */ -/** - * Dot screen shader based on [glfx.js sepia shader](https://github.com/evanw/glfx.js). - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const DotScreenShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/ExposureShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/ExposureShader.d.ts deleted file mode 100644 index adce4846b..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/ExposureShader.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @module ExposureShader - * @three_import import { ExposureShader } from 'three/addons/shaders/ExposureShader.js'; - */ -/** - * TODO - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const ExposureShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/FXAAShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/FXAAShader.d.ts deleted file mode 100644 index 069ce39da..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/FXAAShader.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @module FXAAShader - * @three_import import { FXAAShader } from 'three/addons/shaders/FXAAShader.js'; - */ -/** - * FXAA algorithm from NVIDIA, C# implementation by Jasper Flick, GLSL port by Dave Hoskins. - * - * References: - * - {@link http://developer.download.nvidia.com/assets/gamedev/files/sdk/11/FXAA_WhitePaper.pdf}. - * - {@link https://catlikecoding.com/unity/tutorials/advanced-rendering/fxaa/}. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const FXAAShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/FilmShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/FilmShader.d.ts deleted file mode 100644 index 0c8f4d01a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/FilmShader.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @module FilmShader - * @three_import import { FilmShader } from 'three/addons/shaders/FilmShader.js'; - */ -/** - * TODO - * - * Used by {@link FilmPass}. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const FilmShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/FocusShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/FocusShader.d.ts deleted file mode 100644 index 350ddb21f..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/FocusShader.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @module FocusShader - * @three_import import { FocusShader } from 'three/addons/shaders/FocusShader.js'; - */ -/** - * Focus shader based on [PaintEffect postprocess from ro.me](http://code.google.com/p/3-dreams-of-black/source/browse/deploy/js/effects/PaintEffect.js). - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const FocusShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/FreiChenShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/FreiChenShader.d.ts deleted file mode 100644 index 90085fb50..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/FreiChenShader.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * @module FreiChenShader - * @three_import import { FreiChenShader } from 'three/addons/shaders/FreiChenShader.js'; - */ -/** - * Edge Detection Shader using Frei-Chen filter. - * Based on {@link http://rastergrid.com/blog/2011/01/frei-chen-edge-detector}. - * - * aspect: vec2 of (1/width, 1/height) - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const FreiChenShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/GTAOShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/GTAOShader.d.ts deleted file mode 100644 index ffb41db2f..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/GTAOShader.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -export function generateMagicSquareNoise(size?: number): DataTexture; -/** - * @module GTAOShader - * @three_import import { GTAOShader } from 'three/addons/shaders/GTAOShader.js'; - */ -/** - * GTAO shader. Use by {@link GTAOPass}. - * - * References: - * - [Practical Realtime Strategies for Accurate Indirect Occlusion](https://iryoku.com/downloads/Practical-Realtime-Strategies-for-Accurate-Indirect-Occlusion.pdf). - * - [Horizon-Based Indirect Lighting (HBIL)](https://github.com/Patapom/GodComplex/blob/master/Tests/TestHBIL/2018%20Mayaux%20-%20Horizon-Based%20Indirect%20Lighting%20(HBIL).pdf) - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const GTAOShader: ShaderMaterial; -/** - * GTAO depth shader. Use by {@link GTAOPass}. - * - * @constant - * @type {Object} - */ -export const GTAODepthShader: Object; -/** - * GTAO blend shader. Use by {@link GTAOPass}. - * - * @constant - * @type {Object} - */ -export const GTAOBlendShader: Object; -import { DataTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/GammaCorrectionShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/GammaCorrectionShader.d.ts deleted file mode 100644 index 283eb77b0..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/GammaCorrectionShader.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * @module GammaCorrectionShader - * @three_import import { GammaCorrectionShader } from 'three/addons/shaders/GammaCorrectionShader.js'; - */ -/** - * Gamma Correction Shader - * - * References: - * - {@link http://en.wikipedia.org/wiki/gamma_correction}. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const GammaCorrectionShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/HalftoneShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/HalftoneShader.d.ts deleted file mode 100644 index 2114cfc0f..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/HalftoneShader.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @module HalftoneShader - * @three_import import { HalftoneShader } from 'three/addons/shaders/HalftoneShader.js'; - */ -/** - * RGB Halftone shader. - * - * Used by {@link HalftonePass}. - * - * Shape (1 = Dot, 2 = Ellipse, 3 = Line, 4 = Square, 5 = Diamond) - * Blending Mode (1 = Linear, 2 = Multiply, 3 = Add, 4 = Lighter, 5 = Darker) - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const HalftoneShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/HorizontalBlurShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/HorizontalBlurShader.d.ts deleted file mode 100644 index 28377f8a9..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/HorizontalBlurShader.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @module HorizontalBlurShader - * @three_import import { HorizontalBlurShader } from 'three/addons/shaders/HorizontalBlurShader.js'; - */ -/** - * Two pass Gaussian blur filter (horizontal and vertical blur shaders). - * - * References: - * - {@link http://www.cake23.de/traveling-wavefronts-lit-up.html}. - * - * - 9 samples per pass - * - standard deviation 2.7 - * - "h" and "v" parameters should be set to "1 / width" and "1 / height" - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const HorizontalBlurShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts deleted file mode 100644 index f50eb117e..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @module HorizontalTiltShiftShader - * @three_import import { HorizontalTiltShiftShader } from 'three/addons/shaders/HorizontalTiltShiftShader.js'; - */ -/** - * Simple fake tilt-shift effect, modulating two pass Gaussian blur (see above) by vertical position. - * - * - 9 samples per pass - * - standard deviation 2.7 - * - "h" and "v" parameters should be set to "1 / width" and "1 / height" - * - "r" parameter control where "focused" horizontal line lies - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const HorizontalTiltShiftShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/HueSaturationShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/HueSaturationShader.d.ts deleted file mode 100644 index 7447091f8..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/HueSaturationShader.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * @module HueSaturationShader - * @three_import import { HueSaturationShader } from 'three/addons/shaders/HueSaturationShader.js'; - */ -/** - * Hue and saturation adjustment, {@link https://github.com/evanw/glfx.js}. - * - * hue: -1 to 1 (-1 is 180 degrees in the negative direction, 0 is no change, etc. - * saturation: -1 to 1 (-1 is solid gray, 0 is no change, and 1 is maximum contrast) - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const HueSaturationShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/KaleidoShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/KaleidoShader.d.ts deleted file mode 100644 index 15e4c2f5d..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/KaleidoShader.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @module KaleidoShader - * @three_import import { KaleidoShader } from 'three/addons/shaders/KaleidoShader.js'; - */ -/** - * Kaleidoscope Shader. - * Radial reflection around center point - * Ported from: {@link http://pixelshaders.com/editor/} - * by [Toby Schachman](http://tobyschachman.com/) - * - * sides: number of reflections - * angle: initial angle in radians - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const KaleidoShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/LuminosityHighPassShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/LuminosityHighPassShader.d.ts deleted file mode 100644 index 921107772..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/LuminosityHighPassShader.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @module LuminosityHighPassShader - * @three_import import { LuminosityHighPassShader } from 'three/addons/shaders/LuminosityHighPassShader.js'; - */ -/** - * Luminosity high pass shader. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const LuminosityHighPassShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/LuminosityShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/LuminosityShader.d.ts deleted file mode 100644 index 846896a76..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/LuminosityShader.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @module LuminosityShader - * @three_import import { LuminosityShader } from 'three/addons/shaders/LuminosityShader.js'; - */ -/** - * Luminosity shader. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const LuminosityShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/MirrorShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/MirrorShader.d.ts deleted file mode 100644 index 418c2ee5b..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/MirrorShader.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @module MirrorShader - * @three_import import { MirrorShader } from 'three/addons/shaders/MirrorShader.js'; - */ -/** - * Copies half the input to the other half. - * - * side: side of input to mirror (0 = left, 1 = right, 2 = top, 3 = bottom). - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const MirrorShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/NormalMapShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/NormalMapShader.d.ts deleted file mode 100644 index 8a3269372..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/NormalMapShader.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * @module NormalMapShader - * @three_import import { NormalMapShader } from 'three/addons/shaders/NormalMapShader.js'; - */ -/** - * Normal map shader, compute normals from heightmap. - * @constant - * @type {ShaderMaterial~Shader} - */ -export const NormalMapShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/OutputShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/OutputShader.d.ts deleted file mode 100644 index 92a0cb17a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/OutputShader.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * @module OutputShader - * @three_import import { OutputShader } from 'three/addons/shaders/OutputShader.js'; - */ -/** - * Performs tone mapping and color space conversion for - * FX workflows. - * - * Used by {@link OutputPass}. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const OutputShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/PoissonDenoiseShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/PoissonDenoiseShader.d.ts deleted file mode 100644 index 096d7a99f..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/PoissonDenoiseShader.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export function generatePdSamplePointInitializer(samples: any, rings: any, radiusExponent: any): string; -/** - * @module PoissonDenoiseShader - * @three_import import { PoissonDenoiseShader } from 'three/addons/shaders/PoissonDenoiseShader.js'; - */ -/** - * Poisson Denoise Shader. - * - * References: - * - [Self-Supervised Poisson-Gaussian Denoising](https://openaccess.thecvf.com/content/WACV2021/papers/Khademi_Self-Supervised_Poisson-Gaussian_Denoising_WACV_2021_paper.pdf). - * - [Poisson2Sparse: Self-Supervised Poisson Denoising From a Single Image](https://arxiv.org/pdf/2206.01856.pdf) - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const PoissonDenoiseShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/RGBShiftShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/RGBShiftShader.d.ts deleted file mode 100644 index 18ef03581..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/RGBShiftShader.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @module RGBShiftShader - * @three_import import { RGBShiftShader } from 'three/addons/shaders/RGBShiftShader.js'; - */ -/** - * RGB Shift Shader - * Shifts red and blue channels from center in opposite directions - * Ported from https://web.archive.org/web/20090820185047/http://kriss.cx/tom/2009/05/rgb-shift/ - * by Tom Butterworth / https://web.archive.org/web/20090810054752/http://kriss.cx/tom/ - * - * amount: shift distance (1 is width of input) - * angle: shift angle in radians - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const RGBShiftShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/SAOShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/SAOShader.d.ts deleted file mode 100644 index b6bcb6d30..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/SAOShader.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @module SAOShader - * @three_import import { SAOShader } from 'three/addons/shaders/SAOShader.js'; - */ -/** - * SAO shader. - * - * Used by {@link SAOPass}. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const SAOShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/SMAAShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/SMAAShader.d.ts deleted file mode 100644 index 62c115472..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/SMAAShader.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * WebGL port of Subpixel Morphological Antialiasing (SMAA) v2.8 - * Preset: SMAA 1x Medium (with color edge detection) - * - * References: - * - {@link https://github.com/iryoku/smaa/releases/tag/v2.8} - * - * @module SMAAShader - * @three_import import { SMAAShader } from 'three/addons/shaders/SMAAShader.js'; - */ -/** - * SMAA Edges shader. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const SMAAEdgesShader: ShaderMaterial; -/** - * SMAA Weights shader. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const SMAAWeightsShader: ShaderMaterial; -/** - * SMAA Blend shader. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const SMAABlendShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/SSAOShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/SSAOShader.d.ts deleted file mode 100644 index eeb9afa46..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/SSAOShader.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @module SSAOShader - * @three_import import { SSAOShader } from 'three/addons/shaders/SSAOShader.js'; - */ -/** - * SSAO shader. - * - * References: - * - {@link http://john-chapman-graphics.blogspot.com/2013/01/ssao-tutorial.html} - * - {@link https://learnopengl.com/Advanced-Lighting/SSAO} - * - {@link https://github.com/McNopper/OpenGL/blob/master/Example28/shader/ssao.frag.glsl} - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const SSAOShader: ShaderMaterial; -/** - * SSAO depth shader. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const SSAODepthShader: ShaderMaterial; -/** - * SSAO blur shader. - * - * @constant - * @type {Object} - */ -export const SSAOBlurShader: Object; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/SSRShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/SSRShader.d.ts deleted file mode 100644 index 6bb69e4d6..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/SSRShader.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * A collection of shaders used for SSR. - * - * References: - * - [3D Game Shaders For Beginners, Screen Space Reflection (SSR)](https://lettier.github.io/3d-game-shaders-for-beginners/screen-space-reflection.html). - * - * @module SSRShader - * @three_import import * as SSRShader from 'three/addons/shaders/SSRShader.js'; - */ -/** - * SSR shader. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const SSRShader: ShaderMaterial; -/** - * SSR Depth shader. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const SSRDepthShader: ShaderMaterial; -/** - * SSR Blur shader. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const SSRBlurShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/SepiaShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/SepiaShader.d.ts deleted file mode 100644 index 28750538f..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/SepiaShader.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @module SepiaShader - * @three_import import { SepiaShader } from 'three/addons/shaders/SepiaShader.js'; - */ -/** - * Sepia tone shader based on [glfx.js sepia shader](https://github.com/evanw/glfx.js). - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const SepiaShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/SobelOperatorShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/SobelOperatorShader.d.ts deleted file mode 100644 index 6eba3a4ca..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/SobelOperatorShader.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @module SobelOperatorShader - * @three_import import { SobelOperatorShader } from 'three/addons/shaders/SobelOperatorShader.js'; - */ -/** - * Sobel Edge Detection (see {@link https://youtu.be/uihBwtPIBxM}). - * - * As mentioned in the video the Sobel operator expects a grayscale image as input. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const SobelOperatorShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/SubsurfaceScatteringShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/SubsurfaceScatteringShader.d.ts deleted file mode 100644 index b9f7b54f7..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/SubsurfaceScatteringShader.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @module SubsurfaceScatteringShader - * @three_import import { SubsurfaceScatteringShader } from 'three/addons/shaders/SubsurfaceScatteringShader.js'; - */ -/** - * Subsurface Scattering shader. - * - * Based on GDC 2011 – [Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look](https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/) - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const SubsurfaceScatteringShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/TechnicolorShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/TechnicolorShader.d.ts deleted file mode 100644 index 5b94f59de..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/TechnicolorShader.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @module TriangleBlurShader - * @three_import import { TriangleBlurShader } from 'three/addons/shaders/TriangleBlurShader.js'; - */ -/** - * Simulates the look of the two-strip technicolor process popular in early 20th century films. - * More historical info here: {@link http://www.widescreenmuseum.com/oldcolor/technicolor1.htm} - * Demo here: {@link http://charliehoey.com/technicolor_shader/shader_test.html} - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const TechnicolorShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/ToonShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/ToonShader.d.ts deleted file mode 100644 index 27e8ccfa4..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/ToonShader.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Collection of toon shaders. - * - * @module TriangleBlurShader - * @three_import import * as ToonShader from 'three/addons/shaders/ToonShader.js'; - */ -/** - * Toon1 shader. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const ToonShader1: ShaderMaterial; -/** - * Toon2 shader. - * - * @constant - * @type {Object} - */ -export const ToonShader2: Object; -/** - * Toon Hatching shader. - * - * @constant - * @type {Object} - */ -export const ToonShaderHatching: Object; -/** - * Toon Dotted shader. - * - * @constant - * @type {Object} - */ -export const ToonShaderDotted: Object; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/TriangleBlurShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/TriangleBlurShader.d.ts deleted file mode 100644 index ead206593..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/TriangleBlurShader.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @module TriangleBlurShader - * @three_import import { TriangleBlurShader } from 'three/addons/shaders/TriangleBlurShader.js'; - */ -/** - * Triangle blur shader based on [glfx.js triangle blur shader](https://github.com/evanw/glfx.js). - * - * A basic blur filter, which convolves the image with a - * pyramid filter. The pyramid filter is separable and is applied as two - * perpendicular triangle filters. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const TriangleBlurShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts deleted file mode 100644 index f351e2dd6..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @module UnpackDepthRGBAShader - * @three_import import { UnpackDepthRGBAShader } from 'three/addons/shaders/UnpackDepthRGBAShader.js'; - */ -/** - * Depth visualization shader that shows depth values as monochrome color. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const UnpackDepthRGBAShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/VelocityShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/VelocityShader.d.ts deleted file mode 100644 index db4b5800b..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/VelocityShader.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @module VelocityShader - * @three_import import { VelocityShader } from 'three/addons/shaders/VelocityShader.js'; - */ -/** - * Mesh velocity shader by @bhouston. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const VelocityShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/VerticalBlurShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/VerticalBlurShader.d.ts deleted file mode 100644 index ff448f282..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/VerticalBlurShader.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @module VerticalBlurShader - * @three_import import { VerticalBlurShader } from 'three/addons/shaders/VerticalBlurShader.js'; - */ -/** - * Two pass Gaussian blur filter (horizontal and vertical blur shaders) - * - see {@link http://www.cake23.de/traveling-wavefronts-lit-up.html} - * - * - 9 samples per pass - * - standard deviation 2.7 - * - "h" and "v" parameters should be set to "1 / width" and "1 / height" - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const VerticalBlurShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/VerticalTiltShiftShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/VerticalTiltShiftShader.d.ts deleted file mode 100644 index 341f5b80c..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/VerticalTiltShiftShader.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @module VerticalTiltShiftShader - * @three_import import { VerticalTiltShiftShader } from 'three/addons/shaders/VerticalTiltShiftShader.js'; - */ -/** - * Simple fake tilt-shift effect, modulating two pass Gaussian blur (see above) by vertical position - * - * - 9 samples per pass - * - standard deviation 2.7 - * - "h" and "v" parameters should be set to "1 / width" and "1 / height" - * - "r" parameter control where "focused" horizontal line lies - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const VerticalTiltShiftShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/VignetteShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/VignetteShader.d.ts deleted file mode 100644 index 9461b9018..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/VignetteShader.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @module VignetteShader - * @three_import import { VignetteShader } from 'three/addons/shaders/VignetteShader.js'; - */ -/** - * Based on [PaintEffect postprocess from ro.me](https://github.com/dataarts/3-dreams-of-black/blob/master/deploy/js/effects/PaintEffect.js). - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const VignetteShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/VolumeShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/VolumeShader.d.ts deleted file mode 100644 index 04bbdc80d..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/VolumeShader.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @module VolumeShader - * @three_import import { VolumeRenderShader1 } from 'three/addons/shaders/VolumeShader.js'; - */ -/** - * Shaders to render 3D volumes using raycasting. - * The applied techniques are based on similar implementations in the Visvis and Vispy projects. - * This is not the only approach, therefore it's marked 1. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const VolumeRenderShader1: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/shaders/WaterRefractionShader.d.ts b/jsdoc-testing/jsdoc/examples/jsm/shaders/WaterRefractionShader.d.ts deleted file mode 100644 index 5b5c7ff3a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/shaders/WaterRefractionShader.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @module WaterRefractionShader - * @three_import import { WaterRefractionShader } from 'three/addons/shaders/WaterRefractionShader.js'; - */ -/** - * Basic water refraction shader. - * - * @constant - * @type {ShaderMaterial~Shader} - */ -export const WaterRefractionShader: ShaderMaterial; diff --git a/jsdoc-testing/jsdoc/examples/jsm/textures/FlakesTexture.d.ts b/jsdoc-testing/jsdoc/examples/jsm/textures/FlakesTexture.d.ts deleted file mode 100644 index 40226d8e3..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/textures/FlakesTexture.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Utility class for generating a flakes texture image. This image might be used - * as a normal map to produce a car paint like effect. - * - * @three_import import { FlakesTexture } from 'three/addons/textures/FlakesTexture.js'; - */ -export class FlakesTexture { - /** - * Generates a new flakes texture image. The result is a canvas - * that can be used as an input for {@link CanvasTexture}. - * - * @param {number} [width=512] - The width of the image. - * @param {number} [height=512] - The height of the image. - * @return {HTMLCanvasElement} The generated image. - */ - constructor(width?: number, height?: number); -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/transpiler/AST.d.ts b/jsdoc-testing/jsdoc/examples/jsm/transpiler/AST.d.ts deleted file mode 100644 index 81bdeb7af..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/transpiler/AST.d.ts +++ /dev/null @@ -1,190 +0,0 @@ -export class ASTNode { - isASTNode: boolean; - linker: { - reference: null; - accesses: never[]; - assignments: never[]; - }; - parent: any; - get isNumericExpression(): boolean; - get hasAssignment(): any; - getType(): any; - getProgram(): this | null; - getParent(parents?: any[]): any; - initialize(): void; -} -export class Comment extends ASTNode { - constructor(comment: any); - comment: any; - isComment: boolean; -} -export class Program extends ASTNode { - constructor(body?: any[]); - body: any[]; - structTypes: Map; - isProgram: boolean; -} -export class VariableDeclaration extends ASTNode { - constructor(type: any, name: any, value?: null, next?: null, immutable?: boolean); - type: any; - name: any; - value: any; - next: any; - immutable: boolean; - isVariableDeclaration: boolean; - get isAssignment(): boolean; -} -export class Uniform extends ASTNode { - constructor(type: any, name: any); - type: any; - name: any; - isUniform: boolean; -} -export class Varying extends ASTNode { - constructor(type: any, name: any); - type: any; - name: any; - isVarying: boolean; -} -export class FunctionParameter extends ASTNode { - constructor(type: any, name: any, qualifier?: null, immutable?: boolean); - type: any; - name: any; - qualifier: any; - immutable: boolean; - isFunctionParameter: boolean; -} -export class FunctionDeclaration extends ASTNode { - constructor(type: any, name: any, params?: any[], body?: any[]); - type: any; - name: any; - params: any[]; - body: any[]; - isFunctionDeclaration: boolean; -} -export class Expression extends ASTNode { - constructor(expression: any); - expression: any; - isExpression: boolean; -} -export class Ternary extends ASTNode { - constructor(cond: any, left: any, right: any); - cond: any; - left: any; - right: any; - isTernary: boolean; -} -export class Operator extends ASTNode { - constructor(type: any, left: any, right: any); - type: any; - left: any; - right: any; - isOperator: boolean; - get isAssignment(): boolean; -} -export class Unary extends ASTNode { - constructor(type: any, expression: any, after?: boolean); - type: any; - expression: any; - after: boolean; - isUnary: boolean; - get isAssignment(): boolean; -} -export class Number extends ASTNode { - constructor(value: any, type?: string); - type: string; - value: any; - isNumber: boolean; -} -export class String extends ASTNode { - constructor(value: any); - value: any; - isString: boolean; -} -export class Conditional extends ASTNode { - constructor(cond?: null, body?: any[]); - cond: any; - body: any[]; - elseConditional: any; - isConditional: boolean; -} -export class FunctionCall extends ASTNode { - constructor(name: any, params?: any[]); - name: any; - params: any[]; - isFunctionCall: boolean; -} -export class Return extends ASTNode { - constructor(value: any); - value: any; - isReturn: boolean; -} -export class Discard extends ASTNode { - isDiscard: boolean; -} -export class Continue extends ASTNode { - isContinue: boolean; -} -export class Break extends ASTNode { - isBreak: boolean; -} -export class Accessor extends ASTNode { - constructor(property: any); - property: any; - isAccessor: boolean; -} -export class StaticElement extends ASTNode { - constructor(value: any); - value: any; - isStaticElement: boolean; -} -export class DynamicElement extends ASTNode { - constructor(value: any); - value: any; - isDynamicElement: boolean; -} -export class AccessorElements extends ASTNode { - constructor(object: any, elements?: any[]); - object: any; - elements: any[]; - isAccessorElements: boolean; -} -export class For extends ASTNode { - constructor(initialization: any, condition: any, afterthought: any, body?: any[]); - initialization: any; - condition: any; - afterthought: any; - body: any[]; - isFor: boolean; -} -export class While extends ASTNode { - constructor(condition: any, body?: any[]); - condition: any; - body: any[]; - isWhile: boolean; -} -export class Switch extends ASTNode { - constructor(discriminant: any, cases: any); - discriminant: any; - cases: any; - isSwitch: boolean; -} -export class SwitchCase extends ASTNode { - constructor(body: any, conditions?: null); - body: any; - conditions: any; - isDefault: boolean; - isSwitchCase: boolean; -} -export class StructMember { - constructor(type: any, name: any); - type: any; - name: any; - isStructMember: boolean; -} -export class StructDefinition extends ASTNode { - constructor(name: any, members?: any[]); - name: any; - members: any[]; - isStructDefinition: boolean; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/transpiler/GLSLDecoder.d.ts b/jsdoc-testing/jsdoc/examples/jsm/transpiler/GLSLDecoder.d.ts deleted file mode 100644 index 10eeefc6a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/transpiler/GLSLDecoder.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -export default GLSLDecoder; -declare class GLSLDecoder { - index: number; - tokenizer: Tokenizer | null; - keywords: any[]; - structTypes: Map; - addPolyfill(name: any, polyfill: any): this; - get tokens(): any[]; - readToken(): any; - getToken(offset?: number): any; - getTokensUntil(str: any, tokens: any, offset?: number): any[]; - readTokensUntil(str: any): any[]; - parseExpressionFromTokens(tokens: any): any; - parseAccessorElementsFromTokens(tokens: any): any; - parseFunctionParametersFromTokens(tokens: any): any; - parseExpression(): any; - parseFunctionParams(tokens: any): FunctionParameter[]; - parseFunction(): any; - parseVariablesFromToken(tokens: any, type: any): any; - parseVariables(): any; - parseUniform(): Uniform; - parseVarying(): Varying; - parseStructDefinition(): StructDefinition; - parseReturn(): Return; - parseWhile(): any; - parseFor(): any; - parseSwitch(): any; - parseSwitchCases(): any; - parseIf(): any; - parseBlock(): any; - parse(source: any): Program; -} -declare class Tokenizer { - constructor(source: any); - source: any; - position: number; - tokens: any[]; - tokenize(): this; - skip(...params: any[]): any; - nextToken(): Token | undefined; - readToken(): Token | undefined; -} -import { FunctionParameter } from './AST.js'; -import { Uniform } from './AST.js'; -import { Varying } from './AST.js'; -import { StructDefinition } from './AST.js'; -import { Return } from './AST.js'; -import { Program } from './AST.js'; -declare class Token { - constructor(tokenizer: any, type: any, str: any, pos: any); - tokenizer: any; - type: any; - str: any; - pos: any; - isTag: boolean; - tags: any; - get endPos(): any; - get isNumber(): boolean; - get isString(): boolean; - get isLiteral(): boolean; - get isOperator(): boolean; -} -declare namespace Token { - let LINE: string; - let COMMENT: string; - let NUMBER: string; - let STRING: string; - let LITERAL: string; - let OPERATOR: string; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/transpiler/Linker.d.ts b/jsdoc-testing/jsdoc/examples/jsm/transpiler/Linker.d.ts deleted file mode 100644 index 41d776add..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/transpiler/Linker.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default Linker; -declare class Linker { - block: any; - addBlock(node: any): void; - removeBlock(node: any): void; - processVariables(node: any): void; - processUniform(node: any): void; - processVarying(node: any): void; - evalProperty(node: any): string; - processExpression(node: any): void; - processBody(body: any): void; - processConditional(node: any): void; - processForWhile(node: any): void; - processSwitch(switchNode: any): void; - processFunction(node: any): void; - process(ast: any): void; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/transpiler/ShaderToyDecoder.d.ts b/jsdoc-testing/jsdoc/examples/jsm/transpiler/ShaderToyDecoder.d.ts deleted file mode 100644 index e38bd27ca..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/transpiler/ShaderToyDecoder.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export default ShaderToyDecoder; -declare class ShaderToyDecoder extends GLSLDecoder { -} -import GLSLDecoder from './GLSLDecoder.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/transpiler/TSLEncoder.d.ts b/jsdoc-testing/jsdoc/examples/jsm/transpiler/TSLEncoder.d.ts deleted file mode 100644 index a6214f452..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/transpiler/TSLEncoder.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export default TSLEncoder; -declare class TSLEncoder { - tab: string; - imports: Set; - global: Set; - overloadings: Map; - iife: boolean; - reference: boolean; - block: any; - addImport(name: any): void; - emitUniform(node: any): string; - emitExpression(node: any, output?: null): any; - emitBody(body: any): string; - emitTernary(node: any): string; - emitConditional(node: any): any; - emitLoop(node: any): any; - emitSwitch(switchNode: any): any; - emitFor(node: any): any; - emitForWhile(node: any): any; - emitWhile(node: any): any; - emitVariables(node: any, isRoot?: boolean): string; - emitVarying(node: any): string; - emitStructDefinition(node: any): string; - emitOverloadingFunction(nodes: any): string; - emitFunction(node: any): string; - emitComment(statement: any, body: any): string; - emitExtraLine(statement: any, body: any): "" | "\n"; - emit(ast: any): string; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/transpiler/Transpiler.d.ts b/jsdoc-testing/jsdoc/examples/jsm/transpiler/Transpiler.d.ts deleted file mode 100644 index ff77458cb..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/transpiler/Transpiler.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -export default Transpiler; -/** - * A class that transpiles shader code from one language into another. - * - * `Transpiler` can only be used to convert GLSL into TSL right now. It is intended - * to support developers when they want to migrate their custom materials from the - * current to the new node-based material system. - * - * @three_import import Transpiler from 'three/addons/transpiler/Transpiler.js'; - */ -declare class Transpiler { - /** - * Constructs a new transpiler. - * - * @param {GLSLDecoder} decoder - The GLSL decoder. - * @param {TSLEncoder} encoder - The TSL encoder. - */ - constructor(decoder: GLSLDecoder, encoder: TSLEncoder); - /** - * The GLSL decoder. This component parse GLSL and produces - * a language-independent AST for further processing. - * - * @type {GLSLDecoder} - */ - decoder: GLSLDecoder; - /** - * The TSL encoder. It takes the AST and emits TSL code. - * - * @type {TSLEncoder} - */ - encoder: TSLEncoder; - /** - * The linker. It processes the AST and resolves - * variable and function references, ensuring that all - * dependencies are properly linked. - * - * @type {Linker} - */ - linker: Linker; - /** - * Parses the given GLSL source and returns TSL syntax. - * - * @param {string} source - The GLSL source. - * @return {string} The TSL code. - */ - parse(source: string): string; -} -import Linker from './Linker.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/transpiler/TranspilerUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/transpiler/TranspilerUtils.d.ts deleted file mode 100644 index ec88472ef..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/transpiler/TranspilerUtils.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function isExpression(st: any): boolean; -export function isPrimitive(value: any): boolean; -export function isBuiltinType(str: any): boolean; -export function toFloatType(type: any): any; diff --git a/jsdoc-testing/jsdoc/examples/jsm/transpiler/WGSLEncoder.d.ts b/jsdoc-testing/jsdoc/examples/jsm/transpiler/WGSLEncoder.d.ts deleted file mode 100644 index 44658abba..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/transpiler/WGSLEncoder.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -export default WGSLEncoder; -declare class WGSLEncoder { - tab: string; - functions: Map; - uniforms: any[]; - varyings: any[]; - structs: Map; - polyfills: Map; - groupIndex: number; - getWgslType(type: any): any; - emitExpression(node: any): any; - emitTextureAccess(node: any): any; - emitBody(body: any): string; - emitConditional(node: any): any; - emitFor(node: any): string; - emitWhile(node: any): string; - emitSwitch(node: any): any; - emitVariables(node: any): string; - emitStructDefinition(node: any): string; - emitFunction(node: any): string; - emitComment(statement: any, body: any): string; - emitExtraLine(statement: any, body: any): "" | "\n"; - emit(ast: any): string; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/AfterImageNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/AfterImageNode.d.ts deleted file mode 100644 index 755c8d91e..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/AfterImageNode.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -export function afterImage(node: Node, damp?: (Node | number)): AfterImageNode; -export default AfterImageNode; -/** - * Post processing node for creating an after image effect. - * - * @augments TempNode - * @three_import import { afterImage } from 'three/addons/tsl/display/AfterImageNode.js'; - */ -declare class AfterImageNode extends TempNode { - /** - * Constructs a new after image node. - * - * @param {TextureNode} textureNode - The texture node that represents the input of the effect. - * @param {Node} [damp=0.96] - The damping intensity. A higher value means a stronger after image effect. - */ - constructor(textureNode: TextureNode, damp?: Node); - /** - * The texture node that represents the input of the effect. - * - * @type {TextureNode} - */ - textureNode: TextureNode; - /** - * How quickly the after-image fades. A higher value means the after-image - * persists longer, while a lower value means it fades faster. Should be in - * the range `[0, 1]`. - * - * @type {Node} - */ - damp: Node; - /** - * The render target used for compositing the effect. - * - * @private - * @type {RenderTarget} - */ - private _compRT; - /** - * The render target that represents the previous frame. - * - * @private - * @type {RenderTarget} - */ - private _oldRT; - /** - * The result of the effect is represented as a separate texture node. - * - * @private - * @type {PassTextureNode} - */ - private _textureNode; - /** - * The texture represents the pervious frame. - * - * @private - * @type {TextureNode} - */ - private _textureNodeOld; - /** - * The material for the composite pass. - * - * @private - * @type {?NodeMaterial} - */ - private _materialComposed; - /** - * Returns the result of the effect as a texture node. - * - * @return {PassTextureNode} A texture node that represents the result of the effect. - */ - getTextureNode(): PassTextureNode; - /** - * Sets the size of the effect. - * - * @param {number} width - The width of the effect. - * @param {number} height - The height of the effect. - */ - setSize(width: number, height: number): void; - /** - * This method is used to render the effect once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(frame: NodeFrame): void; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {PassTextureNode} - */ - setup(builder: NodeBuilder): PassTextureNode; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/AnaglyphPassNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/AnaglyphPassNode.d.ts deleted file mode 100644 index bb4019473..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/AnaglyphPassNode.d.ts +++ /dev/null @@ -1,135 +0,0 @@ -export default AnaglyphPassNode; -export function anaglyphPass(scene: Scene, camera: Camera): AnaglyphPassNode; -/** - * A render pass node that creates an anaglyph effect using physically-correct - * off-axis stereo projection. - * - * This implementation uses CameraUtils.frameCorners() to align stereo - * camera frustums to a virtual screen plane, providing accurate depth - * perception with zero parallax at the plane distance. - * - * @augments StereoCompositePassNode - * @three_import import { anaglyphPass, AnaglyphAlgorithm, AnaglyphColorMode } from 'three/addons/tsl/display/AnaglyphPassNode.js'; - */ -declare class AnaglyphPassNode extends StereoCompositePassNode { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isAnaglyphPassNode: boolean; - /** - * The interpupillary distance (eye separation) in world units. - * Typical human IPD is 0.064 meters (64mm). - * - * @type {number} - * @default 0.064 - */ - eyeSep: number; - /** - * The distance in world units from the viewer to the virtual - * screen plane where zero parallax (screen depth) occurs. - * Objects at this distance appear at the screen surface. - * Objects closer appear in front of the screen (negative parallax). - * Objects further appear behind the screen (positive parallax). - * - * The screen dimensions are derived from the camera's FOV and aspect ratio - * at this distance, ensuring the stereo view matches the camera's field of view. - * - * @type {number} - * @default 0.5 - */ - planeDistance: number; - /** - * The current anaglyph algorithm. - * - * @private - * @type {string} - * @default 'dubois' - */ - private _algorithm; - /** - * The current color mode. - * - * @private - * @type {string} - * @default 'redCyan' - */ - private _colorMode; - /** - * Color matrix node for the left eye. - * - * @private - * @type {UniformNode} - */ - private _colorMatrixLeft; - /** - * Color matrix node for the right eye. - * - * @private - * @type {UniformNode} - */ - private _colorMatrixRight; - /** - * Sets the anaglyph algorithm. - * - * @type {string} - */ - set algorithm(value: string); - /** - * Gets the current anaglyph algorithm. - * - * @type {string} - */ - get algorithm(): string; - /** - * Sets the color mode. - * - * @type {string} - */ - set colorMode(value: string); - /** - * Gets the current color mode. - * - * @type {string} - */ - get colorMode(): string; - /** - * Updates the color matrices based on current algorithm and color mode. - * - * @private - */ - private _updateMatrices; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {PassTextureNode} - */ - setup(builder: NodeBuilder): PassTextureNode; -} -/** - * Anaglyph algorithm types. - */ -export type AnaglyphAlgorithm = string; -export namespace AnaglyphAlgorithm { - let TRUE: string; - let GREY: string; - let COLOUR: string; - let HALF_COLOUR: string; - let DUBOIS: string; - let OPTIMISED: string; - let COMPROMISE: string; -} -/** - * Anaglyph color modes. - */ -export type AnaglyphColorMode = string; -export namespace AnaglyphColorMode { - let RED_CYAN: string; - let MAGENTA_CYAN: string; - let MAGENTA_GREEN: string; -} -import StereoCompositePassNode from './StereoCompositePassNode.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/BilateralBlurNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/BilateralBlurNode.d.ts deleted file mode 100644 index 6bc590e84..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/BilateralBlurNode.d.ts +++ /dev/null @@ -1,138 +0,0 @@ -export default BilateralBlurNode; -export function bilateralBlur(node: Node, directionNode: Node, sigma: number, sigmaColor: number): BilateralBlurNode; -/** - * Post processing node for creating a bilateral blur effect. - * - * Bilateral blur smooths an image while preserving sharp edges. Unlike a - * standard Gaussian blur which blurs everything equally, bilateral blur - * analyzes the intensity/color of neighboring pixels. If a neighbor is too - * different from the center pixel (indicating an edge), it is excluded - * from the blurring process. - * - * Reference: {@link https://en.wikipedia.org/wiki/Bilateral_filter} - * - * @augments TempNode - * @three_import import { bilateralBlur } from 'three/addons/tsl/display/BilateralBlurNode.js'; - */ -declare class BilateralBlurNode extends TempNode { - /** - * Constructs a new bilateral blur node. - * - * @param {TextureNode} textureNode - The texture node that represents the input of the effect. - * @param {Node} directionNode - Defines the direction and radius of the blur. - * @param {number} sigma - Controls the spatial kernel of the blur filter. Higher values mean a wider blur radius. - * @param {number} sigmaColor - Controls the intensity kernel. Higher values allow more color difference to be blurred together. - */ - constructor(textureNode: TextureNode, directionNode?: Node, sigma?: number, sigmaColor?: number); - /** - * The texture node that represents the input of the effect. - * - * @type {TextureNode} - */ - textureNode: TextureNode; - /** - * Defines the direction and radius of the blur. - * - * @type {Node} - */ - directionNode: Node; - /** - * Controls the spatial kernel of the blur filter. Higher values mean a wider blur radius. - * - * @type {number} - */ - sigma: number; - /** - * Controls the color/intensity kernel. Higher values allow more color difference - * to be blurred together. Lower values preserve edges more strictly. - * - * @type {number} - */ - sigmaColor: number; - /** - * A uniform node holding the inverse resolution value. - * - * @private - * @type {UniformNode} - */ - private _invSize; - /** - * Bilateral blur is applied in two passes (horizontal, vertical). - * This node controls the direction of each pass. - * - * @private - * @type {UniformNode} - */ - private _passDirection; - /** - * The render target used for the horizontal pass. - * - * @private - * @type {RenderTarget} - */ - private _horizontalRT; - /** - * The render target used for the vertical pass. - * - * @private - * @type {RenderTarget} - */ - private _verticalRT; - /** - * The result of the effect is represented as a separate texture node. - * - * @private - * @type {PassTextureNode} - */ - private _textureNode; - /** - * The material for the blur pass. - * - * @private - * @type {?NodeMaterial} - */ - private _material; - /** - * The resolution scale. - * - * @type {number} - * @default 1 - */ - resolutionScale: number; - /** - * Sets the size of the effect. - * - * @param {number} width - The width of the effect. - * @param {number} height - The height of the effect. - */ - setSize(width: number, height: number): void; - /** - * This method is used to render the effect once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(frame: NodeFrame): void; - /** - * Returns the result of the effect as a texture node. - * - * @return {PassTextureNode} A texture node that represents the result of the effect. - */ - getTextureNode(): PassTextureNode; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {PassTextureNode} - */ - setup(builder: NodeBuilder): PassTextureNode; - /** - * Computes spatial (Gaussian) coefficients depending on the given kernel radius. - * These coefficients are used for the spatial component of the bilateral filter. - * - * @private - * @param {number} kernelRadius - The kernel radius. - * @return {Array} - */ - private _getSpatialCoefficients; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/BleachBypass.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/BleachBypass.d.ts deleted file mode 100644 index 638306ce2..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/BleachBypass.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Applies a bleach bypass effect to the given color node. - * - * @tsl - * @function - * @param {Node} color - The color node to apply the sepia for. - * @param {Node} [opacity=1] - Influences how strong the effect is blended with the original color. - * @return {Node} The updated color node. - */ -export const bleach: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/BloomNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/BloomNode.d.ts deleted file mode 100644 index fa27f0153..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/BloomNode.d.ts +++ /dev/null @@ -1,238 +0,0 @@ -export function bloom(node: Node, strength?: number, radius?: number, threshold?: number): BloomNode; -export default BloomNode; -/** - * Post processing node for creating a bloom effect. - * ```js - * const renderPipeline = new THREE.RenderPipeline( renderer ); - * - * const scenePass = pass( scene, camera ); - * const scenePassColor = scenePass.getTextureNode( 'output' ); - * - * const bloomPass = bloom( scenePassColor ); - * - * renderPipeline.outputNode = scenePassColor.add( bloomPass ); - * ``` - * By default, the node affects the entire image. For a selective bloom, - * use the `emissive` material property to control which objects should - * contribute to bloom or not. This can be achieved via MRT. - * ```js - * const renderPipeline = new THREE.RenderPipeline( renderer ); - * - * const scenePass = pass( scene, camera ); - * scenePass.setMRT( mrt( { - * output, - * emissive - * } ) ); - * - * const scenePassColor = scenePass.getTextureNode( 'output' ); - * const emissivePass = scenePass.getTextureNode( 'emissive' ); - * - * const bloomPass = bloom( emissivePass ); - * renderPipeline.outputNode = scenePassColor.add( bloomPass ); - * ``` - * @augments TempNode - * @three_import import { bloom } from 'three/addons/tsl/display/BloomNode.js'; - */ -declare class BloomNode extends TempNode { - /** - * Constructs a new bloom node. - * - * @param {Node} inputNode - The node that represents the input of the effect. - * @param {number} [strength=1] - The strength of the bloom. - * @param {number} [radius=0] - The radius of the bloom. - * @param {number} [threshold=0] - The luminance threshold limits which bright areas contribute to the bloom effect. - */ - constructor(inputNode: Node, strength?: number, radius?: number, threshold?: number); - /** - * The node that represents the input of the effect. - * - * @type {Node} - */ - inputNode: Node; - /** - * The strength of the bloom. - * - * @type {UniformNode} - */ - strength: UniformNode; - /** - * The radius of the bloom. Must be in the range `[0,1]`. - * - * @type {UniformNode} - */ - radius: UniformNode; - /** - * The luminance threshold limits which bright areas contribute to the bloom effect. - * - * @type {UniformNode} - */ - threshold: UniformNode; - /** - * Can be used to tweak the extracted luminance from the scene. - * - * @type {UniformNode} - */ - smoothWidth: UniformNode; - /** - * Scale factor for the internal render targets. - * - * @private - * @type {number} - * @default 0.5 - */ - private _resolutionScale; - /** - * Can be used to inject a custom high pass filter (e.g., for anamorphic effects). - * - * @type {Function} - */ - highPassFn: Function; - /** - * An array that holds the render targets for the horizontal blur passes. - * - * @private - * @type {Array} - */ - private _renderTargetsHorizontal; - /** - * An array that holds the render targets for the vertical blur passes. - * - * @private - * @type {Array} - */ - private _renderTargetsVertical; - /** - * The number if blur mips. - * - * @private - * @type {number} - */ - private _nMips; - /** - * The render target for the luminance pass. - * - * @private - * @type {RenderTarget} - */ - private _renderTargetBright; - /** - * The material for the composite pass. - * - * @private - * @type {?NodeMaterial} - */ - private _compositeMaterial; - /** - * The material for the luminance pass. - * - * @private - * @type {?NodeMaterial} - */ - private _highPassFilterMaterial; - /** - * The materials for the blur pass. - * - * @private - * @type {Array} - */ - private _separableBlurMaterials; - /** - * The result of the luminance pass as a texture node for further processing. - * - * @private - * @type {TextureNode} - */ - private _textureNodeBright; - /** - * The result of the first blur pass as a texture node for further processing. - * - * @private - * @type {TextureNode} - */ - private _textureNodeBlur0; - /** - * The result of the second blur pass as a texture node for further processing. - * - * @private - * @type {TextureNode} - */ - private _textureNodeBlur1; - /** - * The result of the third blur pass as a texture node for further processing. - * - * @private - * @type {TextureNode} - */ - private _textureNodeBlur2; - /** - * The result of the fourth blur pass as a texture node for further processing. - * - * @private - * @type {TextureNode} - */ - private _textureNodeBlur3; - /** - * The result of the fifth blur pass as a texture node for further processing. - * - * @private - * @type {TextureNode} - */ - private _textureNodeBlur4; - /** - * The result of the effect is represented as a separate texture node. - * - * @private - * @type {PassTextureNode} - */ - private _textureOutput; - /** - * Returns the result of the effect as a texture node. - * - * @return {PassTextureNode} A texture node that represents the result of the effect. - */ - getTextureNode(): PassTextureNode; - /** - * Sets the resolution scale for the pass. - * The resolution scale is a factor that is multiplied with the renderer's width and height. - * - * @param {number} resolutionScale - The resolution scale to set. A value of `1` means full resolution. - * @return {BloomNode} A reference to this node. - */ - setResolutionScale(resolutionScale: number): BloomNode; - /** - * Gets the current resolution scale of the pass. - * - * @return {number} The current resolution scale. A value of `1` means full resolution. - */ - getResolutionScale(): number; - /** - * Sets the size of the effect. - * - * @param {number} width - The width of the effect. - * @param {number} height - The height of the effect. - */ - setSize(width: number, height: number): void; - /** - * This method is used to render the effect once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(frame: NodeFrame): void; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {PassTextureNode} - */ - setup(builder: NodeBuilder): PassTextureNode; - /** - * Create a separable blur material for the given kernel radius. - * - * @private - * @param {NodeBuilder} builder - The current node builder. - * @param {number} kernelRadius - The kernel radius. - * @return {NodeMaterial} - */ - private _getSeparableBlurMaterial; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/CRT.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/CRT.d.ts deleted file mode 100644 index 8fa82745a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/CRT.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Creates barrel-distorted UV coordinates. - * The center of the screen appears to bulge outward (convex distortion). - * - * @tsl - * @function - * @param {Node} [curvature=0.1] - The amount of curvature (0 = flat, 0.5 = very curved). - * @param {Node} [coord=uv()] - The input UV coordinates. - * @return {Node} The distorted UV coordinates. - */ -export const barrelUV: () => void; -/** - * Checks if UV coordinates are inside the valid 0-1 range. - * Useful for masking areas inside the distorted screen. - * - * @tsl - * @function - * @param {Node} coord - The UV coordinates to check. - * @return {Node} 1.0 if inside bounds, 0.0 if outside. - */ -export const barrelMask: () => void; -/** - * Applies color bleeding effect to simulate horizontal color smearing. - * Simulates the analog signal bleeding in CRT displays where colors - * "leak" into adjacent pixels horizontally. - * - * @tsl - * @function - * @param {Node} color - The input texture node. - * @param {Node} [amount=0.002] - The amount of color bleeding (0-0.01). - * @return {Node} The color with bleeding effect applied. - */ -export const colorBleeding: () => void; -/** - * Applies scanline effect to simulate CRT monitor horizontal lines with animation. - * - * @tsl - * @function - * @param {Node} color - The input color. - * @param {Node} [intensity=0.3] - The intensity of the scanlines (0-1). - * @param {Node} [count=240] - The number of scanlines (typically matches vertical resolution). - * @param {Node} [speed=0.0] - The scroll speed of scanlines (0 = static, 1 = normal CRT roll). - * @param {Node} [coord=uv()] - The UV coordinates to use for scanlines. - * @return {Node} The color with scanlines applied. - */ -export const scanlines: () => void; -/** - * Applies vignette effect to darken the edges of the screen. - * - * @tsl - * @function - * @param {Node} color - The input color. - * @param {Node} [intensity=0.4] - The intensity of the vignette (0-1). - * @param {Node} [smoothness=0.5] - The smoothness of the vignette falloff. - * @param {Node} [coord=uv()] - The UV coordinates to use for vignette calculation. - * @return {Node} The color with vignette applied. - */ -export const vignette: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/ChromaticAberrationNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/ChromaticAberrationNode.d.ts deleted file mode 100644 index 564bed21b..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/ChromaticAberrationNode.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -export default ChromaticAberrationNode; -export function chromaticAberration(node: Node, strength?: Node | number, center?: (Node | Vector2) | null, scale?: Node | number): ChromaticAberrationNode; -/** - * Post processing node for applying chromatic aberration effect. - * This effect simulates the color fringing that occurs in real camera lenses - * by separating and offsetting the red, green, and blue channels. - * - * @augments TempNode - * @three_import import { chromaticAberration } from 'three/addons/tsl/display/ChromaticAberrationNode.js'; - */ -declare class ChromaticAberrationNode extends TempNode { - /** - * Constructs a new chromatic aberration node. - * - * @param {TextureNode} textureNode - The texture node that represents the input of the effect. - * @param {Node} strengthNode - The strength of the chromatic aberration effect as a node. - * @param {Node} centerNode - The center point of the effect as a node. - * @param {Node} scaleNode - The scale factor for stepped scaling from center as a node. - */ - constructor(textureNode: TextureNode, strengthNode: Node, centerNode: Node, scaleNode: Node); - /** - * The texture node that represents the input of the effect. - * - * @type {texture} - */ - textureNode: texture; - /** - * A node holding the strength of the effect. - * - * @type {Node} - */ - strengthNode: Node; - /** - * A node holding the center point of the effect. - * - * @type {Node} - */ - centerNode: Node; - /** - * A node holding the scale factor for stepped scaling. - * - * @type {Node} - */ - scaleNode: Node; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {ShaderCallNodeInternal} - */ - setup(): ShaderCallNodeInternal; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/DenoiseNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/DenoiseNode.d.ts deleted file mode 100644 index 26cac984d..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/DenoiseNode.d.ts +++ /dev/null @@ -1,115 +0,0 @@ -export default DenoiseNode; -export function denoise(node: Node, depthNode: Node, normalNode: Node | null, camera: Camera): DenoiseNode; -/** - * Post processing node for denoising data like raw screen-space ambient occlusion output. - * Denoise can noticeably improve the quality of ambient occlusion but also add quite some - * overhead to the post processing setup. It's best to make its usage optional (e.g. via - * graphic settings). - * - * Reference: {@link https://openaccess.thecvf.com/content/WACV2021/papers/Khademi_Self-Supervised_Poisson-Gaussian_Denoising_WACV_2021_paper.pdf}. - * - * @augments TempNode - * @three_import import { denoise } from 'three/addons/tsl/display/DenoiseNode.js'; - */ -declare class DenoiseNode extends TempNode { - /** - * Constructs a new denoise node. - * - * @param {TextureNode} textureNode - The texture node that represents the input of the effect (e.g. AO). - * @param {Node} depthNode - A node that represents the scene's depth. - * @param {?Node} normalNode - A node that represents the scene's normals. - * @param {Camera} camera - The camera the scene is rendered with. - */ - constructor(textureNode: TextureNode, depthNode: Node, normalNode: Node | null, camera: Camera); - /** - * The texture node that represents the input of the effect (e.g. AO). - * - * @type {TextureNode} - */ - textureNode: TextureNode; - /** - * A node that represents the scene's depth. - * - * @type {Node} - */ - depthNode: Node; - /** - * A node that represents the scene's normals. If no normals are passed to the - * constructor (because MRT is not available), normals can be automatically - * reconstructed from depth values in the shader. - * - * @type {?Node} - */ - normalNode: Node | null; - /** - * The node represents the internal noise texture. - * - * @type {TextureNode} - */ - noiseNode: TextureNode; - /** - * The luma Phi value. - * - * @type {UniformNode} - */ - lumaPhi: UniformNode; - /** - * The depth Phi value. - * - * @type {UniformNode} - */ - depthPhi: UniformNode; - /** - * The normal Phi value. - * - * @type {UniformNode} - */ - normalPhi: UniformNode; - /** - * The radius. - * - * @type {UniformNode} - */ - radius: UniformNode; - /** - * The index. - * - * @type {UniformNode} - */ - index: UniformNode; - /** - * The resolution of the effect. - * - * @private - * @type {UniformNode} - */ - private _resolution; - /** - * An array of sample vectors. - * - * @private - * @type {UniformArrayNode} - */ - private _sampleVectors; - /** - * Represents the inverse projection matrix of the scene's camera. - * - * @private - * @type {UniformNode} - */ - private _cameraProjectionMatrixInverse; - /** - * This method is used to update internal uniforms once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(): void; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {ShaderCallNodeInternal} - */ - setup(): ShaderCallNodeInternal; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/DepthOfFieldNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/DepthOfFieldNode.d.ts deleted file mode 100644 index 7d63a602f..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/DepthOfFieldNode.d.ts +++ /dev/null @@ -1,205 +0,0 @@ -export default DepthOfFieldNode; -export function dof(node: Node, viewZNode: Node, focusDistance?: Node | number, focalLength?: Node | number, bokehScale?: Node | number): DepthOfFieldNode; -/** - * Post processing node for creating depth of field (DOF) effect. - * - * References: - * - {@link https://pixelmischiefblog.wordpress.com/2016/11/25/bokeh-depth-of-field/} - * - {@link https://www.adriancourreges.com/blog/2016/09/09/doom-2016-graphics-study/} - * - * @augments TempNode - * @three_import import { dof } from 'three/addons/tsl/display/DepthOfFieldNode.js'; - */ -declare class DepthOfFieldNode extends TempNode { - /** - * Constructs a new DOF node. - * - * @param {TextureNode} textureNode - The texture node that represents the input of the effect. - * @param {Node} viewZNode - Represents the viewZ depth values of the scene. - * @param {Node} focusDistanceNode - Defines the effect's focus which is the distance along the camera's look direction in world units. - * @param {Node} focalLengthNode - How far an object can be from the focal plane before it goes completely out-of-focus in world units. - * @param {Node} bokehScaleNode - A unitless value for artistic purposes to adjust the size of the bokeh. - */ - constructor(textureNode: TextureNode, viewZNode: Node, focusDistanceNode: Node, focalLengthNode: Node, bokehScaleNode: Node); - /** - * The texture node that represents the input of the effect. - * - * @type {TextureNode} - */ - textureNode: TextureNode; - /** - * Represents the viewZ depth values of the scene. - * - * @type {Node} - */ - viewZNode: Node; - /** - * Defines the effect's focus which is the distance along the camera's look direction in world units. - * - * @type {Node} - */ - focusDistanceNode: Node; - /** - * How far an object can be from the focal plane before it goes completely out-of-focus in world units. - * - * @type {Node} - */ - focalLengthNode: Node; - /** - * A unitless value for artistic purposes to adjust the size of the bokeh. - * - * @type {Node} - */ - bokehScaleNode: Node; - /** - * The inverse size of the resolution. - * - * @private - * @type {UniformNode} - */ - private _invSize; - /** - * The render target used for the near and far field. - * - * @private - * @type {RenderTarget} - */ - private _CoCRT; - /** - * The render target used for blurring the near field. - * - * @private - * @type {RenderTarget} - */ - private _CoCBlurredRT; - /** - * The render target used for the first blur pass. - * - * @private - * @type {RenderTarget} - */ - private _blur64RT; - /** - * The render target used for the near field's second blur pass. - * - * @private - * @type {RenderTarget} - */ - private _blur16NearRT; - /** - * The render target used for the far field's second blur pass. - * - * @private - * @type {RenderTarget} - */ - private _blur16FarRT; - /** - * The render target used for the composite - * - * @private - * @type {RenderTarget} - */ - private _compositeRT; - /** - * The material used for the CoC/near and far fields. - * - * @private - * @type {NodeMaterial} - */ - private _CoCMaterial; - /** - * The material used for blurring the near field. - * - * @private - * @type {NodeMaterial} - */ - private _CoCBlurredMaterial; - /** - * The material used for the 64 tap blur. - * - * @private - * @type {NodeMaterial} - */ - private _blur64Material; - /** - * The material used for the 16 tap blur. - * - * @private - * @type {NodeMaterial} - */ - private _blur16Material; - /** - * The material used for the final composite. - * - * @private - * @type {NodeMaterial} - */ - private _compositeMaterial; - /** - * The result of the effect is represented as a separate texture node. - * - * @private - * @type {TextureNode} - */ - private _textureNode; - /** - * The result of the CoC pass as a texture node. - * - * @private - * @type {TextureNode} - */ - private _CoCTextureNode; - /** - * The result of the blur64 pass as a texture node. - * - * @private - * @type {TextureNode} - */ - private _blur64TextureNode; - /** - * The result of the near field's blur16 pass as a texture node. - * - * @private - * @type {TextureNode} - */ - private _blur16NearTextureNode; - /** - * The result of the far field's blur16 pass as a texture node. - * - * @private - * @type {TextureNode} - */ - private _blur16FarTextureNode; - /** - * Sets the size of the effect. - * - * @param {number} width - The width of the effect. - * @param {number} height - The height of the effect. - */ - setSize(width: number, height: number): void; - /** - * Returns the result of the effect as a texture node. - * - * @return {PassTextureNode} A texture node that represents the result of the effect. - */ - getTextureNode(): PassTextureNode; - /** - * This method is used to update the effect's uniforms once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(frame: NodeFrame): void; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {ShaderCallNodeInternal} - */ - setup(builder: NodeBuilder): ShaderCallNodeInternal; - _generateKernels(): { - points16: Vector2[]; - points64: Vector2[]; - }; -} -import { TempNode } from 'three/webgpu'; -import { Vector2 } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/DotScreenNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/DotScreenNode.d.ts deleted file mode 100644 index c3e37fe86..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/DotScreenNode.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -export default DotScreenNode; -export function dotScreen(node: Node, angle?: number, scale?: number): DotScreenNode; -/** - * Post processing node for creating dot-screen effect. - * - * @augments TempNode - * @three_import import { dotScreen } from 'three/addons/tsl/display/DotScreenNode.js'; - */ -declare class DotScreenNode extends TempNode { - /** - * Constructs a new dot screen node. - * - * @param {Node} inputNode - The node that represents the input of the effect. - * @param {number} [angle=1.57] - The rotation of the effect in radians. - * @param {number} [scale=1] - The scale of the effect. A higher value means smaller dots. - */ - constructor(inputNode: Node, angle?: number, scale?: number); - /** - * The node that represents the input of the effect. - * - * @type {Node} - */ - inputNode: Node; - /** - * A uniform node that represents the rotation of the effect in radians. - * - * @type {UniformNode} - */ - angle: UniformNode; - /** - * A uniform node that represents the scale of the effect. A higher value means smaller dots. - * - * @type {UniformNode} - */ - scale: UniformNode; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {ShaderCallNodeInternal} - */ - setup(): ShaderCallNodeInternal; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/FSR1Node.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/FSR1Node.d.ts deleted file mode 100644 index ce9465982..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/FSR1Node.d.ts +++ /dev/null @@ -1,112 +0,0 @@ -export default FSR1Node; -export function fsr1(node: Node, sharpness?: (number | Node), denoise?: (boolean | Node)): FSR1Node; -/** - * Post processing node for applying AMD FidelityFX Super Resolution 1 (FSR 1). - * - * Combines two passes: - * - **EASU** (Edge-Adaptive Spatial Upsampling): Uses 12 texture samples in a cross pattern - * to detect local edge direction, then shapes an approximate Lanczos2 kernel into an - * ellipse aligned with the detected edge. - * - **RCAS** (Robust Contrast-Adaptive Sharpening): Uses a 5-tap cross pattern to apply - * contrast-aware sharpening that is automatically limited per-pixel to avoid artifacts. - * - * Note: Only use FSR 1 if your application is fragment-shader bound and cannot afford to render - * at full resolution. FSR 1 adds its own overhead, so simply shaded scenes will render faster - * at native resolution without it. Besides, FSR 1 should always be used with an anti-aliased - * source image. - * - * Reference: {@link https://gpuopen.com/fidelityfx-superresolution/}. - * - * @augments TempNode - * @three_import import { fsr1 } from 'three/addons/tsl/display/fsr1/FSR1Node.js'; - */ -declare class FSR1Node extends TempNode { - /** - * Constructs a new FSR 1 node. - * - * @param {TextureNode} textureNode - The texture node that represents the input of the effect. - * @param {Node} [sharpness=0.2] - RCAS sharpening strength. 0 = maximum sharpening, 2 = no sharpening. - * @param {Node} [denoise=false] - Whether to attenuate RCAS sharpening in noisy areas. - */ - constructor(textureNode: TextureNode, sharpness?: Node, denoise?: Node); - /** - * The texture node that represents the input of the effect. - * - * @type {TextureNode} - */ - textureNode: TextureNode; - /** - * RCAS sharpening strength. 0 = maximum, 2 = none. - * - * @type {Node} - */ - sharpness: Node; - /** - * Whether to attenuate RCAS sharpening in noisy areas. - * - * @type {Node} - */ - denoise: Node; - /** - * The render target for the EASU upscale pass. - * - * @private - * @type {RenderTarget} - */ - private _easuRT; - /** - * The render target for the RCAS sharpen pass. - * - * @private - * @type {RenderTarget} - */ - private _rcasRT; - /** - * The result of the effect as a texture node. - * - * @private - * @type {PassTextureNode} - */ - private _textureNode; - /** - * The material for the EASU pass. - * - * @private - * @type {?NodeMaterial} - */ - private _easuMaterial; - /** - * The material for the RCAS pass. - * - * @private - * @type {?NodeMaterial} - */ - private _rcasMaterial; - /** - * Sets the output size of the effect. - * - * @param {number} width - The width in pixels. - * @param {number} height - The height in pixels. - */ - setSize(width: number, height: number): void; - /** - * This method is used to render the effect once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(frame: NodeFrame): void; - /** - * Returns the result of the effect as a texture node. - * - * @return {PassTextureNode} A texture node that represents the result of the effect. - */ - getTextureNode(): PassTextureNode; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {PassTextureNode} - */ - setup(builder: NodeBuilder): PassTextureNode; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/FXAANode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/FXAANode.d.ts deleted file mode 100644 index aa6c1cc3a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/FXAANode.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -export default FXAANode; -export function fxaa(node: Node): FXAANode; -/** - * Post processing node for applying FXAA. This node requires sRGB input - * so tone mapping and color space conversion must happen before the anti-aliasing. - * - * @augments TempNode - * @three_import import { fxaa } from 'three/addons/tsl/display/FXAANode.js'; - */ -declare class FXAANode extends TempNode { - /** - * Constructs a new FXAA node. - * - * @param {TextureNode} textureNode - The texture node that represents the input of the effect. - */ - constructor(textureNode: TextureNode); - /** - * The texture node that represents the input of the effect. - * - * @type {TextureNode} - */ - textureNode: TextureNode; - /** - * A uniform node holding the inverse resolution value. - * - * @private - * @type {UniformNode} - */ - private _invSize; - /** - * This method is used to update the effect's uniforms once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(): void; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {ShaderCallNodeInternal} - */ - setup(): ShaderCallNodeInternal; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/FilmNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/FilmNode.d.ts deleted file mode 100644 index 0cac52e90..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/FilmNode.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -export default FilmNode; -/** - * TSL function for creating a film node for post processing. - * - * @tsl - * @function - * @param {Node} inputNode - The node that represents the input of the effect. - * @param {?Node} [intensityNode=null] - A node that represents the effect's intensity. - * @param {?Node} [uvNode=null] - A node that allows to pass custom (e.g. animated) uv data. - * @returns {FilmNode} - */ -export const film: any; -/** - * Post processing node for creating a film grain effect. - * - * @augments TempNode - * @three_import import { film } from 'three/addons/tsl/display/FilmNode.js'; - */ -declare class FilmNode extends TempNode { - /** - * Constructs a new film node. - * - * @param {Node} inputNode - The node that represents the input of the effect. - * @param {?Node} [intensityNode=null] - A node that represents the effect's intensity. - * @param {?Node} [uvNode=null] - A node that allows to pass custom (e.g. animated) uv data. - */ - constructor(inputNode: Node, intensityNode?: Node | null, uvNode?: Node | null); - /** - * The node that represents the input of the effect. - * - * @type {Node} - */ - inputNode: Node; - /** - * A node that represents the effect's intensity. - * - * @type {?Node} - * @default null - */ - intensityNode: Node | null; - /** - * A node that allows to pass custom (e.g. animated) uv data. - * - * @type {?Node} - * @default null - */ - uvNode: Node | null; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {ShaderCallNodeInternal} - */ - setup(): ShaderCallNodeInternal; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/GTAONode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/GTAONode.d.ts deleted file mode 100644 index 25c90ff95..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/GTAONode.d.ts +++ /dev/null @@ -1,211 +0,0 @@ -export default GTAONode; -export function ao(depthNode: Node, normalNode: Node | null, camera: Camera): GTAONode; -/** - * Post processing node for applying Ground Truth Ambient Occlusion (GTAO) to a scene. - * ```js - * const renderPipeline = new THREE.RenderPipeline( renderer ); - * - * const scenePass = pass( scene, camera ); - * scenePass.setMRT( mrt( { - * output: output, - * normal: normalView - * } ) ); - * - * const scenePassColor = scenePass.getTextureNode( 'output' ); - * const scenePassNormal = scenePass.getTextureNode( 'normal' ); - * const scenePassDepth = scenePass.getTextureNode( 'depth' ); - * - * const aoPass = ao( scenePassDepth, scenePassNormal, camera ); - * const aoPassOutput = aoPass.getTextureNode(); - * - * renderPipeline.outputNode = scenePassColor.mul( vec4( vec3( aoPassOutput.r ), 1 ) ); - * ``` - * - * Reference: [Practical Real-Time Strategies for Accurate Indirect Occlusion](https://www.activision.com/cdn/research/Practical_Real_Time_Strategies_for_Accurate_Indirect_Occlusion_NEW%20VERSION_COLOR.pdf). - * - * @augments TempNode - * @three_import import { ao } from 'three/addons/tsl/display/GTAONode.js'; - */ -declare class GTAONode extends TempNode { - /** - * Constructs a new GTAO node. - * - * @param {Node} depthNode - A node that represents the scene's depth. - * @param {?Node} normalNode - A node that represents the scene's normals. - * @param {Camera} camera - The camera the scene is rendered with. - */ - constructor(depthNode: Node, normalNode: Node | null, camera: Camera); - /** - * A node that represents the scene's depth. - * - * @type {Node} - */ - depthNode: Node; - /** - * A node that represents the scene's normals. If no normals are passed to the - * constructor (because MRT is not available), normals can be automatically - * reconstructed from depth values in the shader. - * - * @type {?Node} - */ - normalNode: Node | null; - /** - * The resolution scale. By default the effect is rendered in full resolution - * for best quality but a value of `0.5` should be sufficient for most scenes. - * - * @type {number} - * @default 1 - */ - resolutionScale: number; - /** - * The render target the ambient occlusion is rendered into. - * - * @private - * @type {RenderTarget} - */ - private _aoRenderTarget; - /** - * The radius of the ambient occlusion. - * - * @type {UniformNode} - */ - radius: UniformNode; - /** - * The resolution of the effect. Can be scaled via - * `resolutionScale`. - * - * @type {UniformNode} - */ - resolution: UniformNode; - /** - * The thickness of the ambient occlusion. - * - * @type {UniformNode} - */ - thickness: UniformNode; - /** - * Another option to tweak the occlusion. The recommended range is - * `[1,2]` for attenuating the AO. - * - * @type {UniformNode} - */ - distanceExponent: UniformNode; - /** - * The distance fall off value of the ambient occlusion. - * A lower value leads to a larger AO effect. The value - * should lie in the range `[0,1]`. - * - * @type {UniformNode} - */ - distanceFallOff: UniformNode; - /** - * The scale of the ambient occlusion. - * - * @type {UniformNode} - */ - scale: UniformNode; - /** - * How many samples are used to compute the AO. - * A higher value results in better quality but also - * in a more expensive runtime behavior. - * - * @type {UniformNode} - */ - samples: UniformNode; - /** - * Whether to use temporal filtering or not. Setting this property to - * `true` requires the usage of `TRAANode`. This will help to reduce noise - * although it introduces typical TAA artifacts like ghosting and temporal - * instabilities. - * - * If setting this property to `false`, a manual denoise via `DenoiseNode` - * might be required. - * - * @type {boolean} - * @default false - */ - useTemporalFiltering: boolean; - /** - * The node represents the internal noise texture used by the AO. - * - * @private - * @type {TextureNode} - */ - private _noiseNode; - /** - * Represents the projection matrix of the scene's camera. - * - * @private - * @type {UniformNode} - */ - private _cameraProjectionMatrix; - /** - * Represents the inverse projection matrix of the scene's camera. - * - * @private - * @type {UniformNode} - */ - private _cameraProjectionMatrixInverse; - /** - * Represents the near value of the scene's camera. - * - * @private - * @type {ReferenceNode} - */ - private _cameraNear; - /** - * Represents the far value of the scene's camera. - * - * @private - * @type {ReferenceNode} - */ - private _cameraFar; - /** - * Temporal direction that influences the rotation angle for each slice. - * - * @private - * @type {UniformNode} - */ - private _temporalDirection; - /** - * The material that is used to render the effect. - * - * @private - * @type {NodeMaterial} - */ - private _material; - /** - * The result of the effect is represented as a separate texture node. - * - * @private - * @type {PassTextureNode} - */ - private _textureNode; - /** - * Returns the result of the effect as a texture node. - * - * @return {PassTextureNode} A texture node that represents the result of the effect. - */ - getTextureNode(): PassTextureNode; - /** - * Sets the size of the effect. - * - * @param {number} width - The width of the effect. - * @param {number} height - The height of the effect. - */ - setSize(width: number, height: number): void; - /** - * This method is used to render the effect once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(frame: NodeFrame): void; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {PassTextureNode} - */ - setup(builder: NodeBuilder): PassTextureNode; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/GaussianBlurNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/GaussianBlurNode.d.ts deleted file mode 100644 index 7d9e95355..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/GaussianBlurNode.d.ts +++ /dev/null @@ -1,168 +0,0 @@ -/** - * TSL function for creating a gaussian blur node for post processing with enabled premultiplied alpha. - * - * @tsl - * @function - * @deprecated since r180. Use `gaussianBlur()` with `premultipliedAlpha: true` option instead. - * @param {Node} node - The node that represents the input of the effect. - * @param {Node} directionNode - Defines the direction and radius of the blur. - * @param {number} sigma - Controls the kernel of the blur filter. Higher values mean a wider blur radius. - * @returns {GaussianBlurNode} - */ -export function premultipliedGaussianBlur(node: Node, directionNode: Node, sigma: number): GaussianBlurNode; -export default GaussianBlurNode; -export function gaussianBlur(node: Node, directionNode: Node, sigma: number, options?: { - premultipliedAlpha?: boolean | undefined; - resolutionScale?: number | undefined; -}): GaussianBlurNode; -/** - * Post processing node for creating a gaussian blur effect. - * - * @augments TempNode - * @three_import import { gaussianBlur, premultipliedGaussianBlur } from 'three/addons/tsl/display/GaussianBlurNode.js'; - */ -declare class GaussianBlurNode extends TempNode { - /** - * Constructs a new gaussian blur node. - * - * @param {TextureNode} textureNode - The texture node that represents the input of the effect. - * @param {Node} directionNode - Defines the direction and radius of the blur. - * @param {number} sigma - Controls the kernel of the blur filter. Higher values mean a wider blur radius. - * @param {Object} [options={}] - Additional options for the gaussian blur effect. - * @param {boolean} [options.premultipliedAlpha=false] - Whether to use premultiplied alpha for the blur effect. - * @param {number} [options.resolutionScale=1] - The resolution of the effect. 0.5 means half the resolution of the texture node. - */ - constructor(textureNode: TextureNode, directionNode?: Node, sigma?: number, options?: { - premultipliedAlpha?: boolean | undefined; - resolutionScale?: number | undefined; - }); - /** - * The texture node that represents the input of the effect. - * - * @type {TextureNode} - */ - textureNode: TextureNode; - /** - * Defines the direction and radius of the blur. - * - * @type {Node} - */ - directionNode: Node; - /** - * Controls the kernel of the blur filter. Higher values mean a wider blur radius. - * - * @type {number} - */ - sigma: number; - /** - * A uniform node holding the inverse resolution value. - * - * @private - * @type {UniformNode} - */ - private _invSize; - /** - * Gaussian blur is applied in two passes (horizontal, vertical). - * This node controls the direction of each pass. - * - * @private - * @type {UniformNode} - */ - private _passDirection; - /** - * The render target used for the horizontal pass. - * - * @private - * @type {RenderTarget} - */ - private _horizontalRT; - /** - * The render target used for the vertical pass. - * - * @private - * @type {RenderTarget} - */ - private _verticalRT; - /** - * The result of the effect is represented as a separate texture node. - * - * @private - * @type {PassTextureNode} - */ - private _textureNode; - /** - * The material for the blur pass. - * - * @private - * @type {?NodeMaterial} - */ - private _material; - /** - * The resolution scale. - * - * @type {number} - * @default (1) - */ - resolutionScale: number; - /** - * Whether the effect should use premultiplied alpha or not. Set this to `true` - * if you are going to blur texture input with transparency. - * - * @type {boolean} - * @default false - */ - premultipliedAlpha: boolean; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @default true - * @readonly - */ - readonly isGaussianBlurNode: boolean; - /** - * Sets the size of the effect. - * - * @param {number} width - The width of the effect. - * @param {number} height - The height of the effect. - */ - setSize(width: number, height: number): void; - /** - * This method is used to render the effect once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(frame: NodeFrame): void; - /** - * Returns the result of the effect as a texture node. - * - * @return {PassTextureNode} A texture node that represents the result of the effect. - */ - getTextureNode(): PassTextureNode; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {PassTextureNode} - */ - setup(builder: NodeBuilder): PassTextureNode; - /** - * Computes gaussian coefficients depending on the given kernel radius. - * - * @private - * @param {number} kernelRadius - The kernel radius. - * @return {Array} - */ - private _getCoefficients; - set resolution(value: Vector2); - /** - * The resolution scale. - * - * @deprecated - * @type {Vector2} - * @default {(1,1)} - */ - get resolution(): Vector2; -} -import { TempNode } from 'three/webgpu'; -import { Vector2 } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/GodraysNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/GodraysNode.d.ts deleted file mode 100644 index dfd74ef47..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/GodraysNode.d.ts +++ /dev/null @@ -1,201 +0,0 @@ -export default GodraysNode; -export function godrays(depthNode: TextureNode, camera: Camera, light: (DirectionalLight | PointLight)): GodraysNode; -/** - * Post-Processing node for apply Screen-space raymarched godrays to a scene. - * - * After the godrays have been computed, it's recommened to apply a Bilateral - * Blur to the result to mitigate raymarching and noise artifacts. - * - * The composite with the scene pass is ideally done with `depthAwareBlend()`, - * which mitigates aliasing and light leaking. - * - * ```js - * const godraysPass = godrays( scenePassDepth, camera, light ); - * - * const blurPass = bilateralBlur( godraysPassColor ); // optional blur - * - * const outputBlurred = depthAwareBlend( scenePassColor, blurPassColor, scenePassDepth, camera, { blendColor, edgeRadius, edgeStrength } ); // composite - * ``` - * - * Limitations: - * - * - Only point and directional lights are currently supported. - * - The effect requires a full shadow setup. Meaning shadows must be enabled in the renderer, - * 3D objects must cast and receive shadows and the main light must cast shadows. - * - * Reference: This Node is a part of [three-good-godrays](https://github.com/Ameobea/three-good-godrays). - * - * @augments TempNode - * @three_import import { godrays } from 'three/addons/tsl/display/GodraysNode.js'; - */ -declare class GodraysNode extends TempNode { - /** - * Constructs a new Godrays node. - * - * @param {TextureNode} depthNode - A texture node that represents the scene's depth. - * @param {Camera} camera - The camera the scene is rendered with. - * @param {(DirectionalLight|PointLight)} light - The light the godrays are rendered for. - */ - constructor(depthNode: TextureNode, camera: Camera, light: (DirectionalLight | PointLight)); - /** - * A node that represents the beauty pass's depth. - * - * @type {TextureNode} - */ - depthNode: TextureNode; - /** - * The number of raymarching steps - * - * @type {UniformNode} - * @default 60 - */ - raymarchSteps: UniformNode; - /** - * The rate of accumulation for the godrays. Higher values roughly equate to more humid air/denser fog. - * - * @type {UniformNode} - * @default 0.7 - */ - density: UniformNode; - /** - * The maximum density of the godrays. Limits the maximum brightness of the godrays. - * - * @type {UniformNode} - * @default 0.5 - */ - maxDensity: UniformNode; - /** - * Higher values decrease the accumulation of godrays the further away they are from the light source. - * - * @type {UniformNode} - * @default 2 - */ - distanceAttenuation: UniformNode; - /** - * The resolution scale. - * - * @type {number} - */ - resolutionScale: number; - /** - * Represents the world matrix of the scene's camera. - * - * @private - * @type {UniformNode} - */ - private _cameraMatrixWorld; - /** - * Represents the inverse projection matrix of the scene's camera. - * - * @private - * @type {UniformNode} - */ - private _cameraProjectionMatrixInverse; - /** - * Represents the inverse projection matrix of the scene's camera. - * - * @private - * @type {UniformNode} - */ - private _premultipliedLightCameraMatrix; - /** - * Represents the world position of the scene's camera. - * - * @private - * @type {UniformNode} - */ - private _cameraPosition; - /** - * Represents the near value of the scene's camera. - * - * @private - * @type {ReferenceNode} - */ - private _cameraNear; - /** - * Represents the far value of the scene's camera. - * - * @private - * @type {ReferenceNode} - */ - private _cameraFar; - /** - * The near value of the shadow camera. - * - * @private - * @type {ReferenceNode} - */ - private _shadowCameraNear; - /** - * The far value of the shadow camera. - * - * @private - * @type {ReferenceNode} - */ - private _shadowCameraFar; - _fNormals: import("three/webgpu").UniformArrayNode; - _fConstants: import("three/webgpu").UniformArrayNode; - /** - * The light the godrays are rendered for. - * - * @private - * @type {(DirectionalLight|PointLight)} - */ - private _light; - /** - * The camera the scene is rendered with. - * - * @private - * @type {Camera} - */ - private _camera; - /** - * The render target the godrays are rendered into. - * - * @private - * @type {RenderTarget} - */ - private _godraysRenderTarget; - /** - * The material that is used to render the effect. - * - * @private - * @type {NodeMaterial} - */ - private _material; - /** - * The result of the effect is represented as a separate texture node. - * - * @private - * @type {PassTextureNode} - */ - private _textureNode; - /** - * Returns the result of the effect as a texture node. - * - * @return {PassTextureNode} A texture node that represents the result of the effect. - */ - getTextureNode(): PassTextureNode; - /** - * Sets the size of the effect. - * - * @param {number} width - The width of the effect. - * @param {number} height - The height of the effect. - */ - setSize(width: number, height: number): void; - /** - * This method is used to render the effect once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(frame: NodeFrame): void; - _updateLightParams(): void; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {PassTextureNode} - */ - setup(builder: NodeBuilder): PassTextureNode; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/LensflareNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/LensflareNode.d.ts deleted file mode 100644 index 924f98774..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/LensflareNode.d.ts +++ /dev/null @@ -1,132 +0,0 @@ -export default LensflareNode; -export function lensflare(node: TextureNode, params: { - ghostTint?: Node | Color; - threshold?: Node | number; - ghostSamples?: Node | number; - ghostSpacing?: Node | number; - ghostAttenuationFactor?: Node | number; - downSampleRatio?: number | undefined; -}): LensflareNode; -/** - * Post processing node for adding a bloom-based lens flare effect. This effect - * requires that you extract the bloom of the scene via a bloom pass first. - * - * References: - * - {@link https://john-chapman-graphics.blogspot.com/2013/02/pseudo-lens-flare.html}. - * - {@link https://john-chapman.github.io/2017/11/05/pseudo-lens-flare.html}. - * - * @augments TempNode - * @three_import import { lensflare } from 'three/addons/tsl/display/LensflareNode.js'; - */ -declare class LensflareNode extends TempNode { - /** - * Constructs a new lens flare node. - * - * @param {TextureNode} textureNode - The texture node that represents the scene's bloom. - * @param {Object} params - The parameter object for configuring the effect. - * @param {Node | Color} [params.ghostTint=vec3(1, 1, 1)] - Defines the tint of the flare/ghosts. - * @param {Node | number} [params.threshold=float(0.5)] - Controls the size and strength of the effect. A higher threshold results in smaller flares. - * @param {Node | number} [params.ghostSamples=float(4)] - Represents the number of flares/ghosts per bright spot which pivot around the center. - * @param {Node | number} [params.ghostSpacing=float(0.25)] - Defines the spacing of the flares/ghosts. - * @param {Node | number} [params.ghostAttenuationFactor=float(25)] - Defines the attenuation factor of flares/ghosts. - * @param {number} [params.downSampleRatio=4] - Defines how downsampling since the effect is usually not rendered at full resolution. - */ - constructor(textureNode: TextureNode, params?: { - ghostTint?: Node | Color; - threshold?: Node | number; - ghostSamples?: Node | number; - ghostSpacing?: Node | number; - ghostAttenuationFactor?: Node | number; - downSampleRatio?: number | undefined; - }); - /** - * The texture node that represents the scene's bloom. - * - * @type {TextureNode} - */ - textureNode: TextureNode; - /** - * Defines the tint of the flare/ghosts. - * - * @type {Node} - */ - ghostTintNode: Node; - /** - * Controls the size and strength of the effect. A higher threshold results in smaller flares. - * - * @type {Node} - */ - thresholdNode: Node; - /** - * Represents the number of flares/ghosts per bright spot which pivot around the center. - * - * @type {Node} - */ - ghostSamplesNode: Node; - /** - * Defines the spacing of the flares/ghosts. - * - * @type {Node} - */ - ghostSpacingNode: Node; - /** - * Defines the attenuation factor of flares/ghosts. - * - * @type {Node} - */ - ghostAttenuationFactorNode: Node; - /** - * Defines how downsampling since the effect is usually not rendered at full resolution. - * - * @type {number} - */ - downSampleRatio: number; - /** - * The internal render target of the effect. - * - * @private - * @type {RenderTarget} - */ - private _renderTarget; - /** - * The node material that holds the effect's TSL code. - * - * @private - * @type {NodeMaterial} - */ - private _material; - /** - * The result of the effect is represented as a separate texture node. - * - * @private - * @type {PassTextureNode} - */ - private _textureNode; - /** - * Returns the result of the effect as a texture node. - * - * @return {PassTextureNode} A texture node that represents the result of the effect. - */ - getTextureNode(): PassTextureNode; - /** - * Sets the size of the effect. - * - * @param {number} width - The width of the effect. - * @param {number} height - The height of the effect. - */ - setSize(width: number, height: number): void; - /** - * This method is used to render the effect once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(frame: NodeFrame): void; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {PassTextureNode} - */ - setup(builder: NodeBuilder): PassTextureNode; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/Lut3DNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/Lut3DNode.d.ts deleted file mode 100644 index 29e3620ff..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/Lut3DNode.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -export default Lut3DNode; -export function lut3D(node: Node, lut: TextureNode, size: number, intensity: Node | number): Lut3DNode; -/** - * A post processing node for color grading via lookup tables. - * - * @augments TempNode - * @three_import import { lut3D } from 'three/addons/tsl/display/Lut3DNode.js'; - */ -declare class Lut3DNode extends TempNode { - /** - * Constructs a new LUT node. - * - * @param {Node} inputNode - The node that represents the input of the effect. - * @param {TextureNode} lutNode - A texture node that represents the lookup table. - * @param {number} size - The size of the lookup table. - * @param {Node} intensityNode - Controls the intensity of the effect. - */ - constructor(inputNode: Node, lutNode: TextureNode, size: number, intensityNode: Node); - /** - * The node that represents the input of the effect. - * - * @type {Node} - */ - inputNode: Node; - /** - * A texture node that represents the lookup table. - * - * @type {TextureNode} - */ - lutNode: TextureNode; - /** - * The size of the lookup table. - * - * @type {UniformNode} - */ - size: UniformNode; - /** - * Controls the intensity of the effect. - * - * @type {Node} - */ - intensityNode: Node; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {ShaderCallNodeInternal} - */ - setup(): ShaderCallNodeInternal; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/MotionBlur.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/MotionBlur.d.ts deleted file mode 100644 index 618927b5d..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/MotionBlur.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Applies a motion blur effect to the given input node. - * - * @tsl - * @function - * @param {Node} inputNode - The input node to apply the motion blur for. - * @param {Node} velocity - The motion vectors of the beauty pass. - * @param {Node} [numSamples=int(16)] - How many samples the effect should use. A higher value results in better quality but is also more expensive. - * @return {Node} The input node with the motion blur effect applied. - */ -export const motionBlur: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/OutlineNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/OutlineNode.d.ts deleted file mode 100644 index a7b2befe2..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/OutlineNode.d.ts +++ /dev/null @@ -1,351 +0,0 @@ -export default OutlineNode; -export function outline(scene: Scene, camera: Camera, params: { - selectedObjects?: Object3D[] | undefined; - edgeThickness?: Node; - edgeGlow?: Node; - downSampleRatio?: number | undefined; -}): OutlineNode; -/** - * Post processing node for rendering outlines around selected objects. The node - * gives you great flexibility in composing the final outline look depending on - * your requirements. - * ```js - * const renderPipeline = new THREE.RenderPipeline( renderer ); - * - * const scenePass = pass( scene, camera ); - * - * // outline parameter - * - * const edgeStrength = uniform( 3.0 ); - * const edgeGlow = uniform( 0.0 ); - * const edgeThickness = uniform( 1.0 ); - * const visibleEdgeColor = uniform( new THREE.Color( 0xffffff ) ); - * const hiddenEdgeColor = uniform( new THREE.Color( 0x4e3636 ) ); - * - * outlinePass = outline( scene, camera, { - * selectedObjects, - * edgeGlow, - * edgeThickness - * } ); - * - * // compose custom outline - * - * const { visibleEdge, hiddenEdge } = outlinePass; - * const outlineColor = visibleEdge.mul( visibleEdgeColor ).add( hiddenEdge.mul( hiddenEdgeColor ) ).mul( edgeStrength ); - * - * renderPipeline.outputNode = outlineColor.add( scenePass ); - * ``` - * - * @augments TempNode - * @three_import import { outline } from 'three/addons/tsl/display/OutlineNode.js'; - */ -declare class OutlineNode extends TempNode { - /** - * Constructs a new outline node. - * - * @param {Scene} scene - A reference to the scene. - * @param {Camera} camera - The camera the scene is rendered with. - * @param {Object} params - The configuration parameters. - * @param {Array} [params.selectedObjects] - An array of selected objects. - * @param {Node} [params.edgeThickness=float(1)] - The thickness of the edges. - * @param {Node} [params.edgeGlow=float(0)] - Can be used for an animated glow/pulse effects. - * @param {number} [params.downSampleRatio=2] - The downsample ratio. - */ - constructor(scene: Scene, camera: Camera, params?: { - selectedObjects?: Object3D[] | undefined; - edgeThickness?: Node; - edgeGlow?: Node; - downSampleRatio?: number | undefined; - }); - /** - * A reference to the scene. - * - * @type {Scene} - */ - scene: Scene; - /** - * The camera the scene is rendered with. - * - * @type {Camera} - */ - camera: Camera; - /** - * An array of selected objects. - * - * @type {Array} - */ - selectedObjects: Array; - /** - * The thickness of the edges. - * - * @type {Node} - */ - edgeThicknessNode: Node; - /** - * Can be used for an animated glow/pulse effect. - * - * @type {Node} - */ - edgeGlowNode: Node; - /** - * The downsample ratio. - * - * @type {number} - * @default 2 - */ - downSampleRatio: number; - /** - * The render target for the depth pre-pass. - * - * @private - * @type {RenderTarget} - */ - private _renderTargetDepthBuffer; - /** - * The render target for the mask pass. - * - * @private - * @type {RenderTarget} - */ - private _renderTargetMaskBuffer; - /** - * The render target for the mask downsample. - * - * @private - * @type {RenderTarget} - */ - private _renderTargetMaskDownSampleBuffer; - /** - * The first render target for the edge detection. - * - * @private - * @type {RenderTarget} - */ - private _renderTargetEdgeBuffer1; - /** - * The second render target for the edge detection. - * - * @private - * @type {RenderTarget} - */ - private _renderTargetEdgeBuffer2; - /** - * The first render target for the blur pass. - * - * @private - * @type {RenderTarget} - */ - private _renderTargetBlurBuffer1; - /** - * The second render target for the blur pass. - * - * @private - * @type {RenderTarget} - */ - private _renderTargetBlurBuffer2; - /** - * The render target for the final composite. - * - * @private - * @type {RenderTarget} - */ - private _renderTargetComposite; - /** - * Represents the near value of the scene's camera. - * - * @private - * @type {ReferenceNode} - */ - private _cameraNear; - /** - * Represents the far value of the scene's camera. - * - * @private - * @type {ReferenceNode} - */ - private _cameraFar; - /** - * Uniform that represents the blur direction of the pass. - * - * @private - * @type {UniformNode} - */ - private _blurDirection; - /** - * Texture node that holds the data from the depth pre-pass. - * - * @private - * @type {TextureNode} - */ - private _depthTextureUniform; - /** - * Texture node that holds the data from the mask pass. - * - * @private - * @type {TextureNode} - */ - private _maskTextureUniform; - /** - * Texture node that holds the data from the mask downsample pass. - * - * @private - * @type {TextureNode} - */ - private _maskTextureDownsSampleUniform; - /** - * Texture node that holds the data from the first edge detection pass. - * - * @private - * @type {TextureNode} - */ - private _edge1TextureUniform; - /** - * Texture node that holds the data from the second edge detection pass. - * - * @private - * @type {TextureNode} - */ - private _edge2TextureUniform; - /** - * Texture node that holds the current blurred color data. - * - * @private - * @type {TextureNode} - */ - private _blurColorTextureUniform; - /** - * Visible edge color. - * - * @private - * @type {Node} - */ - private _visibleEdgeColor; - /** - * Hidden edge color. - * - * @private - * @type {Node} - */ - private _hiddenEdgeColor; - /** - * The material for the depth pre-pass. - * - * @private - * @type {NodeMaterial} - */ - private _depthMaterial; - _depthSpriteMaterial: SpriteNodeMaterial; - /** - * The material for preparing the mask. - * - * @private - * @type {NodeMaterial} - */ - private _prepareMaskMaterial; - _prepareMaskSpriteMaterial: SpriteNodeMaterial; - /** - * The copy material - * - * @private - * @type {NodeMaterial} - */ - private _materialCopy; - /** - * The edge detection material. - * - * @private - * @type {NodeMaterial} - */ - private _edgeDetectionMaterial; - /** - * The material that is used to render in the blur pass. - * - * @private - * @type {NodeMaterial} - */ - private _separableBlurMaterial; - /** - * The material that is used to render in the blur pass. - * - * @private - * @type {NodeMaterial} - */ - private _separableBlurMaterial2; - /** - * The final composite material. - * - * @private - * @type {NodeMaterial} - */ - private _compositeMaterial; - /** - * A set to cache selected objects in the scene. - * - * @private - * @type {Set} - */ - private _selectionCache; - /** - * The number of selected objects from the previous frame. Used to detect - * the transition to an empty selection so the composite render target can - * be cleared once and avoid leaving a stale outline on screen. - * - * @private - * @type {number} - * @default 0 - */ - private _lastSelectionCount; - /** - * The result of the effect is represented as a separate texture node. - * - * @private - * @type {PassTextureNode} - */ - private _textureNode; - /** - * A mask value that represents the visible edge. - * - * @return {Node} The visible edge. - */ - get visibleEdge(): Node; - /** - * A mask value that represents the hidden edge. - * - * @return {Node} The hidden edge. - */ - get hiddenEdge(): Node; - /** - * Returns the result of the effect as a texture node. - * - * @return {PassTextureNode} A texture node that represents the result of the effect. - */ - getTextureNode(): PassTextureNode; - /** - * Sets the size of the effect. - * - * @param {number} width - The width of the effect. - * @param {number} height - The height of the effect. - */ - setSize(width: number, height: number): void; - /** - * This method is used to render the effect once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(frame: NodeFrame): void; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {PassTextureNode} - */ - setup(): PassTextureNode; - /** - * Updates the selection cache based on the selected objects. - * - * @private - */ - private _updateSelectionCache; -} -import { TempNode } from 'three/webgpu'; -import { SpriteNodeMaterial } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/ParallaxBarrierPassNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/ParallaxBarrierPassNode.d.ts deleted file mode 100644 index a63395293..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/ParallaxBarrierPassNode.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -export default ParallaxBarrierPassNode; -export function parallaxBarrierPass(scene: Scene, camera: Camera): ParallaxBarrierPassNode; -/** - * A render pass node that creates a parallax barrier effect. - * - * @augments StereoCompositePassNode - * @three_import import { parallaxBarrierPass } from 'three/addons/tsl/display/ParallaxBarrierPassNode.js'; - */ -declare class ParallaxBarrierPassNode extends StereoCompositePassNode { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isParallaxBarrierPassNode: boolean; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {PassTextureNode} - */ - setup(builder: NodeBuilder): PassTextureNode; -} -import StereoCompositePassNode from './StereoCompositePassNode.js'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/PixelationPassNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/PixelationPassNode.d.ts deleted file mode 100644 index 8e2a1b56e..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/PixelationPassNode.d.ts +++ /dev/null @@ -1,134 +0,0 @@ -export function pixelationPass(scene: Scene, camera: Camera, pixelSize?: Node | number, normalEdgeStrength?: Node | number, depthEdgeStrength?: Node | number): PixelationPassNode; -export default PixelationPassNode; -/** - * A special render pass node that renders the scene with a pixelation effect. - * - * @augments PassNode - * @three_import import { pixelationPass } from 'three/addons/tsl/display/PixelationPassNode.js'; - */ -declare class PixelationPassNode extends PassNode { - /** - * Constructs a new pixelation pass node. - * - * @param {Scene} scene - The scene to render. - * @param {Camera} camera - The camera to render the scene with. - * @param {Node | number} [pixelSize=6] - The pixel size. - * @param {Node | number} [normalEdgeStrength=0.3] - The normal edge strength. - * @param {Node | number} [depthEdgeStrength=0.4] - The depth edge strength. - */ - constructor(scene: Scene, camera: Camera, pixelSize?: Node | number, normalEdgeStrength?: Node | number, depthEdgeStrength?: Node | number); - /** - * The pixel size. - * - * @type {number} - * @default 6 - */ - pixelSize: number; - /** - * The normal edge strength. - * - * @type {number} - * @default 0.3 - */ - normalEdgeStrength: number; - /** - * The depth edge strength. - * - * @type {number} - * @default 0.4 - */ - depthEdgeStrength: number; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isPixelationPassNode: boolean; - _mrt: any; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {PixelationNode} - */ - setup(): PixelationNode; -} -import { PassNode } from 'three/webgpu'; -/** - * A inner node definition that implements the actual pixelation TSL code. - * - * @inner - * @augments TempNode - */ -declare class PixelationNode extends TempNode { - /** - * Constructs a new pixelation node. - * - * @param {TextureNode} textureNode - The texture node that represents the beauty pass. - * @param {TextureNode} depthNode - The texture that represents the beauty's depth. - * @param {TextureNode} normalNode - The texture that represents the beauty's normals. - * @param {Node} pixelSize - The pixel size. - * @param {Node} normalEdgeStrength - The normal edge strength. - * @param {Node} depthEdgeStrength - The depth edge strength. - */ - constructor(textureNode: TextureNode, depthNode: TextureNode, normalNode: TextureNode, pixelSize: Node, normalEdgeStrength: Node, depthEdgeStrength: Node); - /** - * The texture node that represents the beauty pass. - * - * @type {TextureNode} - */ - textureNode: TextureNode; - /** - * The texture that represents the beauty's depth. - * - * @type {TextureNode} - */ - depthNode: TextureNode; - /** - * The texture that represents the beauty's normals. - * - * @type {TextureNode} - */ - normalNode: TextureNode; - /** - * The pixel size. - * - * @type {Node} - */ - pixelSize: Node; - /** - * The pixel size. - * - * @type {Node} - */ - normalEdgeStrength: Node; - /** - * The depth edge strength. - * - * @type {Node} - */ - depthEdgeStrength: Node; - /** - * Uniform node that represents the resolution. - * - * @private - * @type {Node} - */ - private _resolution; - /** - * This method is used to update uniforms once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - update(): void; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {ShaderCallNodeInternal} - */ - setup(): ShaderCallNodeInternal; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/RGBShiftNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/RGBShiftNode.d.ts deleted file mode 100644 index efcef8e20..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/RGBShiftNode.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -export default RGBShiftNode; -export function rgbShift(node: Node, amount?: number, angle?: number): RGBShiftNode; -/** - * Post processing node for shifting/splitting RGB color channels. The effect - * separates color channels and offsets them from each other. - * - * @augments TempNode - * @three_import import { rgbShift } from 'three/addons/tsl/display/RGBShiftNode.js'; - */ -declare class RGBShiftNode extends TempNode { - /** - * Constructs a new RGB shift node. - * - * @param {TextureNode} textureNode - The texture node that represents the input of the effect. - * @param {number} [amount=0.005] - The amount of the RGB shift. - * @param {number} [angle=0] - Defines the orientation in which colors are shifted. - */ - constructor(textureNode: TextureNode, amount?: number, angle?: number); - /** - * The texture node that represents the input of the effect. - * - * @type {TextureNode} - */ - textureNode: TextureNode; - /** - * The amount of the RGB shift. - * - * @type {UniformNode} - */ - amount: UniformNode; - /** - * Defines in which direction colors are shifted. - * - * @type {UniformNode} - */ - angle: UniformNode; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {ShaderCallNodeInternal} - */ - setup(): ShaderCallNodeInternal; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/RetroPassNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/RetroPassNode.d.ts deleted file mode 100644 index 26e36a922..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/RetroPassNode.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -export default RetroPassNode; -export function retroPass(scene: Scene, camera: Camera, options?: { - affineDistortion?: Node | undefined; -}): RetroPassNode; -/** - * A post-processing pass that applies a retro PS1-style effect to the scene. - * - * This node renders the scene with classic PlayStation 1 visual characteristics: - * - **Vertex snapping**: Vertices are snapped to screen pixels, creating the iconic "wobbly" geometry - * - **Affine texture mapping**: Textures are sampled without perspective correction, resulting in distortion effects - * - **Low resolution**: Default 0.25 scale (typical 320x240 equivalent) - * - **Nearest-neighbor filtering**: Sharp pixelated textures without smoothing - * - * @augments PassNode - */ -declare class RetroPassNode extends PassNode { - /** - * Creates a new RetroPassNode instance. - * - * @param {Scene} scene - The scene to render. - * @param {Camera} camera - The camera to render from. - * @param {Object} [options={}] - Additional options for the retro pass. - * @param {Node} [options.affineDistortion=null] - An optional node to apply affine distortion to UVs. - */ - constructor(scene: Scene, camera: Camera, options?: { - affineDistortion?: Node | undefined; - }); - affineDistortionNode: Node | null; - filterTextures: any; - _materialCache: Map; - /** - * Updates the retro pass before rendering. - * - * @override - * @param {Frame} frame - The current frame information. - * @returns {void} - */ - override updateBefore(frame: Frame): void; -} -import { PassNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SMAANode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SMAANode.d.ts deleted file mode 100644 index 412d29a3a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SMAANode.d.ts +++ /dev/null @@ -1,166 +0,0 @@ -export default SMAANode; -export function smaa(node: Node): SMAANode; -/** - * Post processing node for applying SMAA. Unlike FXAA, this node - * should be applied before converting colors to sRGB. SMAA should produce - * better results than FXAA but is also more expensive to execute. - * - * Used Preset: SMAA 1x Medium (with color edge detection) - * Reference: {@link https://github.com/iryoku/smaa/releases/tag/v2.8}. - * - * @augments TempNode - * @three_import import { smaa } from 'three/addons/tsl/display/SMAANode.js'; - */ -declare class SMAANode extends TempNode { - /** - * Constructs a new SMAA node. - * - * @param {TextureNode} textureNode - The texture node that represents the input of the effect. - */ - constructor(textureNode: TextureNode); - /** - * The texture node that represents the input of the effect. - * - * @type {TextureNode} - */ - textureNode: TextureNode; - /** - * The render target used for the edges pass. - * - * @private - * @type {RenderTarget} - */ - private _renderTargetEdges; - /** - * The render target used for the weights pass. - * - * @private - * @type {RenderTarget} - */ - private _renderTargetWeights; - /** - * The render target used for the blend pass. - * - * @private - * @type {RenderTarget} - */ - private _renderTargetBlend; - /** - * Represents the "area" texture used by the SMAA implementation. - * - * @private - * @type {RenderTarget} - */ - private _areaTexture; - /** - * Represents the "search" texture used by the SMAA implementation. - * - * @private - * @type {RenderTarget} - */ - private _searchTexture; - /** - * A uniform node holding the inverse resolution value. - * - * @private - * @type {UniformNode} - */ - private _invSize; - /** - * A uniform texture node holding the area texture. - * - * @private - * @type {TextureNode} - */ - private _areaTextureUniform; - /** - * A uniform texture node holding the search texture. - * - * @private - * @type {TextureNode} - */ - private _searchTextureUniform; - /** - * A uniform texture node representing the edges pass. - * - * @private - * @type {TextureNode} - */ - private _edgesTextureUniform; - /** - * A uniform texture node representing the weights pass. - * - * @private - * @type {TextureNode} - */ - private _weightsTextureUniform; - /** - * The node material that holds the TSL for rendering the edges pass. - * - * @private - * @type {NodeMaterial} - */ - private _materialEdges; - /** - * The node material that holds the TSL for rendering the weights pass. - * - * @private - * @type {NodeMaterial} - */ - private _materialWeights; - /** - * The node material that holds the TSL for rendering the blend pass. - * - * @private - * @type {NodeMaterial} - */ - private _materialBlend; - /** - * The result of the effect is represented as a separate texture node. - * - * @private - * @type {PassTextureNode} - */ - private _textureNode; - /** - * Returns the result of the effect as a texture node. - * - * @return {PassTextureNode} A texture node that represents the result of the effect. - */ - getTextureNode(): PassTextureNode; - /** - * Sets the size of the effect. - * - * @param {number} width - The width of the effect. - * @param {number} height - The height of the effect. - */ - setSize(width: number, height: number): void; - /** - * This method is used to render the effect once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(frame: NodeFrame): void; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {PassTextureNode} - */ - setup(builder: NodeBuilder): PassTextureNode; - /** - * Returns the area texture as a Base64 string. - * - * @private - * @return {string} The area texture. - */ - private _getAreaTexture; - /** - * Returns the search texture as a Base64 string.. - * - * @private - * @return {string} The search texture. - */ - private _getSearchTexture; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSAAPassNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSAAPassNode.d.ts deleted file mode 100644 index 3aeeb2f9c..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSAAPassNode.d.ts +++ /dev/null @@ -1,82 +0,0 @@ -export default SSAAPassNode; -export function ssaaPass(scene: Scene, camera: Camera): SSAAPassNode; -/** - * A special render pass node that renders the scene with SSAA (Supersampling Anti-Aliasing). - * This manual SSAA approach re-renders the scene ones for each sample with camera jitter and accumulates the results. - * - * This node produces a high-quality anti-aliased output but is also extremely expensive because of - * its brute-force approach of re-rendering the entire scene multiple times. - * - * Reference: {@link https://en.wikipedia.org/wiki/Supersampling} - * - * @augments PassNode - * @three_import import { ssaaPass } from 'three/addons/tsl/display/SSAAPassNode.js'; - */ -declare class SSAAPassNode extends PassNode { - /** - * Constructs a new SSAA pass node. - * - * @param {Scene} scene - The scene to render. - * @param {Camera} camera - The camera to render the scene with. - */ - constructor(scene: Scene, camera: Camera); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSSAAPassNode: boolean; - /** - * The sample level specified as n, where the number of samples is 2^n, - * so sampleLevel = 4, is 2^4 samples, 16. - * - * @type {number} - * @default 4 - */ - sampleLevel: number; - /** - * Whether rounding errors should be mitigated or not. - * - * @type {boolean} - * @default true - */ - unbiased: boolean; - /** - * A uniform node representing the sample weight. - * - * @type {UniformNode} - * @default 1 - */ - sampleWeight: UniformNode; - /** - * Reference to the internal render target that holds the current sample. - * - * @private - * @type {?RenderTarget} - * @default null - */ - private _sampleRenderTarget; - /** - * Reference to the internal quad mesh. - * - * @private - * @type {QuadMesh} - */ - private _quadMesh; - /** - * This method is used to render the SSAA effect once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(frame: NodeFrame): void; - /** - * This method is used to setup the effect's MRT configuration and quad mesh. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {PassTextureNode} - */ - setup(builder: NodeBuilder): PassTextureNode; -} -import { PassNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSGINode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSGINode.d.ts deleted file mode 100644 index fbd9f302b..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSGINode.d.ts +++ /dev/null @@ -1,263 +0,0 @@ -export default SSGINode; -export function ssgi(beautyNode: TextureNode, depthNode: TextureNode, normalNode: TextureNode, camera: Camera): SSGINode; -/** - * Post processing node for applying Screen Space Global Illumination (SSGI) to a scene. - * - * References: - * - {@link https://github.com/cdrinmatane/SSRT3}. - * - {@link https://cdrinmatane.github.io/posts/ssaovb-code/}. - * - {@link https://cdrinmatane.github.io/cgspotlight-slides/ssilvb_slides.pdf}. - * - * The quality and performance of the effect mainly depend on `sliceCount` and `stepCount`. - * The total number of samples taken per pixel is `sliceCount` * `stepCount` * `2`. Here are some - * recommended presets depending on whether temporal filtering is used or not. - * - * With temporal filtering (recommended): - * - * - Low: `sliceCount` of `1`, `stepCount` of `12`. - * - Medium: `sliceCount` of `2`, `stepCount` of `8`. - * - High: `sliceCount` of `3`, `stepCount` of `16`. - * - * Use for a higher slice count if you notice temporal instabilities like flickering. Reduce the sample - * count then to mitigate the performance lost. - * - * Without temporal filtering: - * - * - Low: `sliceCount` of `2`, `stepCount` of `6`. - * - Medium: `sliceCount` of `3`, `stepCount` of `8`. - * - High: `sliceCount` of `4`, `stepCount` of `12`. - * - * @augments TempNode - * @three_import import { ssgi } from 'three/addons/tsl/display/SSGINode.js'; - */ -declare class SSGINode extends TempNode { - /** - * Constructs a new SSGI node. - * - * @param {TextureNode} beautyNode - A texture node that represents the beauty or scene pass. - * @param {TextureNode} depthNode - A texture node that represents the scene's depth. - * @param {TextureNode} normalNode - A texture node that represents the scene's normals. - * @param {PerspectiveCamera} camera - The camera the scene is rendered with. - */ - constructor(beautyNode: TextureNode, depthNode: TextureNode, normalNode: TextureNode, camera: PerspectiveCamera); - /** - * A texture node that represents the beauty or scene pass. - * - * @type {TextureNode} - */ - beautyNode: TextureNode; - /** - * A node that represents the scene's depth. - * - * @type {TextureNode} - */ - depthNode: TextureNode; - /** - * A node that represents the scene's normals. If no normals are passed to the - * constructor (because MRT is not available), normals can be automatically - * reconstructed from depth values in the shader. - * - * @type {TextureNode} - */ - normalNode: TextureNode; - /** - * Number of per-pixel hemisphere slices. This has a big performance cost and should be kept as low as possible. - * Should be in the range `[1, 4]`. - * - * @type {UniformNode} - * @default 1 - */ - sliceCount: UniformNode; - /** - * Number of samples taken along one side of a given hemisphere slice. This has a big performance cost and should - * be kept as low as possible. Should be in the range `[1, 32]`. - * - * @type {UniformNode} - * @default 12 - */ - stepCount: UniformNode; - /** - * Power function applied to AO to make it appear darker/lighter. Should be in the range `[0, 4]`. - * - * @type {UniformNode} - * @default 1 - */ - aoIntensity: UniformNode; - /** - * Intensity of the indirect diffuse light. Should be in the range `[0, 100]`. - * - * @type {UniformNode} - * @default 10 - */ - giIntensity: UniformNode; - /** - * Effective sampling radius in world space. AO and GI can only have influence within that radius. - * Should be in the range `[1, 25]`. - * - * @type {UniformNode} - * @default 12 - */ - radius: UniformNode; - /** - * Makes the sample distance in screen space instead of world-space (helps having more detail up close). - * - * @type {UniformNode} - * @default false - */ - useScreenSpaceSampling: UniformNode; - /** - * Controls samples distribution. It's an exponent applied at each step get increasing step size over the distance. - * Should be in the range `[1, 3]`. - * - * @type {UniformNode} - * @default 2 - */ - expFactor: UniformNode; - /** - * Constant thickness value of objects on the screen in world units. Allows light to pass behind surfaces past that thickness value. - * Should be in the range `[0.01, 10]`. - * - * @type {UniformNode} - * @default 1 - */ - thickness: UniformNode; - /** - * Whether to increase thickness linearly over distance or not (avoid losing detail over the distance). - * - * @type {UniformNode} - * @default false - */ - useLinearThickness: UniformNode; - /** - * How much light backface surfaces emit. - * Should be in the range `[0, 1]`. - * - * @type {UniformNode} - * @default 0 - */ - backfaceLighting: UniformNode; - /** - * Whether to use temporal filtering or not. Setting this property to - * `true` requires the usage of `TRAANode`. This will help to reduce noise - * although it introduces typical TAA artifacts like ghosting and temporal - * instabilities. - * - * If setting this property to `false`, a manual denoise via `DenoiseNode` - * is required. - * - * @type {boolean} - * @default true - */ - useTemporalFiltering: boolean; - /** - * The resolution of the effect. - * - * @private - * @type {UniformNode} - */ - private _resolution; - /** - * Used to compute the effective step radius when viewSpaceSampling is `false`. - * - * @private - * @type {UniformNode} - */ - private _halfProjScale; - /** - * Temporal direction that influences the rotation angle for each slice. - * - * @private - * @type {UniformNode} - */ - private _temporalDirection; - /** - * Temporal offset added to the initial ray step. - * - * @private - * @type {UniformNode} - */ - private _temporalOffset; - /** - * Represents the projection matrix of the scene's camera. - * - * @private - * @type {UniformNode} - */ - private _cameraProjectionMatrix; - /** - * Represents the inverse projection matrix of the scene's camera. - * - * @private - * @type {UniformNode} - */ - private _cameraProjectionMatrixInverse; - /** - * Represents the near value of the scene's camera. - * - * @private - * @type {ReferenceNode} - */ - private _cameraNear; - /** - * Represents the far value of the scene's camera. - * - * @private - * @type {ReferenceNode} - */ - private _cameraFar; - /** - * A reference to the scene's camera. - * - * @private - * @type {PerspectiveCamera} - */ - private _camera; - /** - * The render target the GI is rendered into. - * - * @private - * @type {RenderTarget} - */ - private _ssgiRenderTarget; - /** - * The material that is used to render the effect. - * - * @private - * @type {NodeMaterial} - */ - private _material; - /** - * The result of the effect is represented as a separate texture node. - * - * @private - * @type {PassTextureNode} - */ - private _textureNode; - /** - * Returns the result of the effect as a texture node. - * - * @return {PassTextureNode} A texture node that represents the result of the effect. - */ - getTextureNode(): PassTextureNode; - /** - * Sets the size of the effect. - * - * @param {number} width - The width of the effect. - * @param {number} height - The height of the effect. - */ - setSize(width: number, height: number): void; - /** - * This method is used to render the effect once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(frame: NodeFrame): void; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {PassTextureNode} - */ - setup(builder: NodeBuilder): PassTextureNode; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSRNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSRNode.d.ts deleted file mode 100644 index 5c187d6a7..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSRNode.d.ts +++ /dev/null @@ -1,235 +0,0 @@ -export default SSRNode; -export function ssr(colorNode: Node, depthNode: Node, normalNode: Node, metalnessNode: Node, roughnessNode?: Node | null, camera?: Camera | null): SSRNode; -/** - * Post processing node for computing screen space reflections (SSR). - * - * Reference: {@link https://lettier.github.io/3d-game-shaders-for-beginners/screen-space-reflection.html} - * - * @augments TempNode - * @three_import import { ssr } from 'three/addons/tsl/display/SSRNode.js'; - */ -declare class SSRNode extends TempNode { - /** - * Constructs a new SSR node. - * - * @param {Node} colorNode - The node that represents the beauty pass. - * @param {Node} depthNode - A node that represents the beauty pass's depth. - * @param {Node} normalNode - A node that represents the beauty pass's normals. - * @param {Node} metalnessNode - A node that represents the beauty pass's metalness. - * @param {?Node} [roughnessNode=null] - A node that represents the beauty pass's roughness. - * @param {?Camera} [camera=null] - The camera the scene is rendered with. - */ - constructor(colorNode: Node, depthNode: Node, normalNode: Node, metalnessNode: Node, roughnessNode?: Node | null, camera?: Camera | null); - /** - * The node that represents the beauty pass. - * - * @type {Node} - */ - colorNode: Node; - /** - * A node that represents the beauty pass's depth. - * - * @type {Node} - */ - depthNode: Node; - /** - * A node that represents the beauty pass's normals. - * - * @type {Node} - */ - normalNode: Node; - /** - * A node that represents the beauty pass's metalness. - * - * @type {Node} - */ - metalnessNode: Node; - /** - * Whether the SSR reflections should be blurred or not. Blurring is a costly - * operation so turn it off if you encounter performance issues on certain - * devices. - * - * @private - * @type {Node} - * @default false - */ - private roughnessNode; - /** - * The resolution scale. Valid values are in the range - * `[0,1]`. `1` means best quality but also results in - * more computational overhead. Setting to `0.5` means - * the effect is computed in half-resolution. - * - * @type {number} - * @default 1 - */ - resolutionScale: number; - /** - * Controls how far a fragment can reflect. Increasing this value result in more - * computational overhead but also increases the reflection distance. - * - * @type {UniformNode} - */ - maxDistance: UniformNode; - /** - * Controls the cutoff between what counts as a possible reflection hit and what does not. - * - * @type {UniformNode} - */ - thickness: UniformNode; - /** - * Controls how the SSR reflections are blended with the beauty pass. - * - * @type {UniformNode} - */ - opacity: UniformNode; - /** - * This parameter controls how detailed the raymarching process works. - * The value ranges is `[0,1]` where `1` means best quality (the maximum number - * of raymarching iterations/samples) and `0` means no samples at all. - * - * A quality of `0.5` is usually sufficient for most use cases. Try to keep - * this parameter as low as possible. Larger values result in noticeable more - * overhead. - * - * @type {UniformNode} - */ - quality: UniformNode; - /** - * The quality of the blur. Must be an integer in the range `[1,3]`. - * - * @type {UniformNode} - */ - blurQuality: UniformNode; - /** - * The camera the scene is rendered with. - * - * @type {Camera} - */ - camera: Camera; - /** - * The spread of the blur. Automatically set when generating mips. - * - * @private - * @type {UniformNode} - */ - private _blurSpread; - /** - * Represents the projection matrix of the scene's camera. - * - * @private - * @type {UniformNode} - */ - private _cameraProjectionMatrix; - /** - * Represents the inverse projection matrix of the scene's camera. - * - * @private - * @type {UniformNode} - */ - private _cameraProjectionMatrixInverse; - /** - * Represents the near value of the scene's camera. - * - * @private - * @type {ReferenceNode} - */ - private _cameraNear; - /** - * Represents the far value of the scene's camera. - * - * @private - * @type {ReferenceNode} - */ - private _cameraFar; - /** - * Whether the scene's camera is perspective or orthographic. - * - * @private - * @type {UniformNode} - */ - private _isPerspectiveCamera; - /** - * The resolution of the pass. - * - * @private - * @type {UniformNode} - */ - private _resolution; - /** - * The render target the SSR is rendered into. - * - * @private - * @type {RenderTarget} - */ - private _ssrRenderTarget; - /** - * The render target for the blurred SSR reflections. - * - * @private - * @type {RenderTarget} - */ - private _blurRenderTarget; - /** - * The material that is used to render the effect. - * - * @private - * @type {NodeMaterial} - */ - private _ssrMaterial; - /** - * The blur material. - * - * @private - * @type {NodeMaterial} - */ - private _blurMaterial; - /** - * The copy material. - * - * @private - * @type {NodeMaterial} - */ - private _copyMaterial; - /** - * The result of the effect is represented as a separate texture node. - * - * @private - * @type {PassTextureNode} - */ - private _textureNode; - /** - * Holds the blurred SSR reflections. - * - * @private - * @type {?PassTextureNode} - */ - private _blurredTextureNode; - /** - * Returns the result of the effect as a texture node. - * - * @return {PassTextureNode} A texture node that represents the result of the effect. - */ - getTextureNode(): PassTextureNode; - /** - * Sets the size of the effect. - * - * @param {number} width - The width of the effect. - * @param {number} height - The height of the effect. - */ - setSize(width: number, height: number): void; - /** - * This method is used to render the effect once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(frame: NodeFrame): void; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {PassTextureNode} - */ - setup(builder: NodeBuilder): PassTextureNode; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSSNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSSNode.d.ts deleted file mode 100644 index dec7a6ea5..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SSSNode.d.ts +++ /dev/null @@ -1,226 +0,0 @@ -export default SSSNode; -export function sss(depthNode: TextureNode, camera: Camera, mainLight: DirectionalLight): SSSNode; -/** - * Post processing node for applying Screen-Space Shadows (SSS) to a scene. - * - * Screen-Space Shadows (also known as Contact Shadows) should ideally be used to complement - * traditional shadow maps. They are best suited for rendering detailed shadows of smaller - * objects at a closer scale like intricate shadowing on highly detailed models. In other words: - * Use Shadow Maps for the foundation and Screen-Space Shadows for the details. - * - * The shadows produced by this implementation might have too hard edges for certain use cases. - * Use a box, gaussian or hash blur to soften the edges before doing the composite with the - * beauty pass. Code example: - * - * ```js - * const sssPass = sss( scenePassDepth, camera, mainLight ); - * - * const sssBlur = boxBlur( sssPass.r, { size: 2, separation: 1 } ); // optional blur - * ``` - * - * Limitations: - * - * - Ideally the maximum shadow length should not exceed `1` meter. Otherwise the effect gets - * computationally very expensive since more samples during the ray marching process are evaluated. - * You can mitigate this issue by reducing the `quality` paramter. - * - The effect can only be used with a single directional light, the main light of your scene. - * This main light usually represents the sun or daylight. - * - Like other Screen-Space techniques SSS can only honor objects in the shadowing computation that - * are currently visible within the camera's view. - * - * References: - * - {@link https://panoskarabelas.com/posts/screen_space_shadows/}. - * - {@link https://www.bendstudio.com/blog/inside-bend-screen-space-shadows/}. - * - * @augments TempNode - * @three_import import { sss } from 'three/addons/tsl/display/SSSNode.js'; - */ -declare class SSSNode extends TempNode { - /** - * Constructs a new SSS node. - * - * @param {TextureNode} depthNode - A texture node that represents the scene's depth. - * @param {Camera} camera - The camera the scene is rendered with. - * @param {DirectionalLight} mainLight - The main directional light of the scene. - */ - constructor(depthNode: TextureNode, camera: Camera, mainLight: DirectionalLight); - /** - * A node that represents the beauty pass's depth. - * - * @type {TextureNode} - */ - depthNode: TextureNode; - /** - * Maximum shadow length in world units. Longer shadows result in more computational - * overhead. - * - * @type {UniformNode} - * @default 0.1 - */ - maxDistance: UniformNode; - /** - * Depth testing thickness. - * - * @type {UniformNode} - * @default 0.01 - */ - thickness: UniformNode; - /** - * Shadow intensity. Must be in the range `[0, 1]`. - * - * @type {UniformNode} - * @default 1.0 - */ - shadowIntensity: UniformNode; - /** - * This parameter controls how detailed the raymarching process works. - * The value ranges is `[0,1]` where `1` means best quality (the maximum number - * of raymarching iterations/samples) and `0` means no samples at all. - * - * A quality of `0.5` is usually sufficient for most use cases. Try to keep - * this parameter as low as possible. Larger values result in noticeable more - * overhead. - * - * @type {UniformNode} - * @default 0.5 - */ - quality: UniformNode; - /** - * The resolution scale. Valid values are in the range - * `[0,1]`. `1` means best quality but also results in - * more computational overhead. Setting to `0.5` means - * the effect is computed in half-resolution. - * - * @type {number} - * @default 1 - */ - resolutionScale: number; - /** - * Whether to use temporal filtering or not. Setting this property to - * `true` requires the usage of `TRAANode`. This will help to reduce noice - * although it introduces typical TAA artifacts like ghosting and temporal - * instabilities. - * - * @type {boolean} - * @default false - */ - useTemporalFiltering: boolean; - /** - * Represents the view matrix of the scene's camera. - * - * @private - * @type {UniformNode} - */ - private _cameraViewMatrix; - /** - * Represents the projection matrix of the scene's camera. - * - * @private - * @type {UniformNode} - */ - private _cameraProjectionMatrix; - /** - * Represents the inverse projection matrix of the scene's camera. - * - * @private - * @type {UniformNode} - */ - private _cameraProjectionMatrixInverse; - /** - * Represents the near value of the scene's camera. - * - * @private - * @type {ReferenceNode} - */ - private _cameraNear; - /** - * Represents the far value of the scene's camera. - * - * @private - * @type {ReferenceNode} - */ - private _cameraFar; - /** - * The resolution of the pass. - * - * @private - * @type {UniformNode} - */ - private _resolution; - /** - * Temporal offset added to the initial ray step. - * - * @private - * @type {UniformNode} - */ - private _temporalOffset; - /** - * The frame ID use when temporal filtering is enabled. - * - * @private - * @type {UniformNode} - */ - private _frameId; - /** - * A reference to the scene's main light. - * - * @private - * @type {DirectionalLight} - */ - private _mainLight; - /** - * The camera the scene is rendered with. - * - * @private - * @type {Camera} - */ - private _camera; - /** - * The render target the SSS is rendered into. - * - * @private - * @type {RenderTarget} - */ - private _sssRenderTarget; - /** - * The material that is used to render the effect. - * - * @private - * @type {NodeMaterial} - */ - private _material; - /** - * The result of the effect is represented as a separate texture node. - * - * @private - * @type {PassTextureNode} - */ - private _textureNode; - /** - * Returns the result of the effect as a texture node. - * - * @return {PassTextureNode} A texture node that represents the result of the effect. - */ - getTextureNode(): PassTextureNode; - /** - * Sets the size of the effect. - * - * @param {number} width - The width of the effect. - * @param {number} height - The height of the effect. - */ - setSize(width: number, height: number): void; - /** - * This method is used to render the effect once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(frame: NodeFrame): void; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {PassTextureNode} - */ - setup(builder: NodeBuilder): PassTextureNode; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/Sepia.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/Sepia.d.ts deleted file mode 100644 index a1ddcf38d..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/Sepia.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Applies a sepia effect to the given color node. - * - * @tsl - * @function - * @param {Node} color - The color node to apply the sepia for. - * @return {Node} The updated color node. - */ -export const sepia: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/Shape.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/Shape.d.ts deleted file mode 100644 index 2df2ca224..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/Shape.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Returns a radial gradient from center (white) to edges (black). - * Useful for masking effects based on distance from center. - * - * @tsl - * @function - * @param {Node} [scale=1.0] - Controls the size of the gradient (0 = all black, 1 = full circle). - * @param {Node} [softness=0.5] - Controls the edge softness (0 = hard edge, 1 = soft gradient). - * @param {Node} [coord=uv()] - The input UV coordinates. - * @return {Node} 1.0 at center, 0.0 at edges. - */ -export const circle: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SharpenNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SharpenNode.d.ts deleted file mode 100644 index c6886ab8a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SharpenNode.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -export default SharpenNode; -export function sharpen(node: Node, sharpness?: (number | Node), denoise?: (boolean | Node)): SharpenNode; -/** - * Post processing node for contrast-adaptive sharpening (RCAS). - * - * Reference: {@link https://gpuopen.com/fidelityfx-superresolution/}. - * - * @augments TempNode - * @three_import import { sharpen } from 'three/addons/tsl/display/SharpenNode.js'; - */ -declare class SharpenNode extends TempNode { - /** - * Constructs a new sharpen node. - * - * @param {TextureNode} textureNode - The texture node that represents the input of the effect. - * @param {Node} [sharpness=0.2] - Sharpening strength. 0 = maximum sharpening, 2 = no sharpening. - * @param {Node} [denoise=false] - Whether to attenuate sharpening in noisy areas. - */ - constructor(textureNode: TextureNode, sharpness?: Node, denoise?: Node); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSharpenNode: boolean; - /** - * The texture node that represents the input of the effect. - * - * @type {TextureNode} - */ - textureNode: TextureNode; - /** - * Sharpening strength. 0 = maximum, 2 = none. - * - * @type {Node} - * @default 0.2 - */ - sharpness: Node; - /** - * Whether to attenuate sharpening in noisy areas. - * - * @type {Node} - * @default false - */ - denoise: Node; - /** - * The render target for the sharpening pass. - * - * @private - * @type {RenderTarget} - */ - private _renderTarget; - /** - * The result of the effect as a texture node. - * - * @private - * @type {PassTextureNode} - */ - private _textureNode; - /** - * The material for the sharpening pass. - * - * @private - * @type {?NodeMaterial} - */ - private _material; - /** - * Sets the output size of the effect. - * - * @param {number} width - The width in pixels. - * @param {number} height - The height in pixels. - */ - setSize(width: number, height: number): void; - /** - * This method is used to render the effect once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(frame: NodeFrame): void; - /** - * Returns the result of the effect as a texture node. - * - * @return {PassTextureNode} A texture node that represents the result of the effect. - */ - getTextureNode(): PassTextureNode; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {PassTextureNode} - */ - setup(builder: NodeBuilder): PassTextureNode; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SobelOperatorNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SobelOperatorNode.d.ts deleted file mode 100644 index 251c245d8..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/SobelOperatorNode.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -export default SobelOperatorNode; -export function sobel(node: Node): SobelOperatorNode; -/** - * Post processing node for detecting edges with a sobel filter. - * A sobel filter should be applied after tone mapping and output color - * space conversion. - * - * @augments TempNode - * @three_import import { sobel } from 'three/addons/tsl/display/SobelOperatorNode.js'; - */ -declare class SobelOperatorNode extends TempNode { - /** - * Constructs a new sobel operator node. - * - * @param {TextureNode} textureNode - The texture node that represents the input of the effect. - */ - constructor(textureNode: TextureNode); - /** - * The texture node that represents the input of the effect. - * - * @type {TextureNode} - */ - textureNode: TextureNode; - /** - * A uniform node holding the inverse resolution value. - * - * @private - * @type {UniformNode} - */ - private _invSize; - /** - * This method is used to update the effect's uniforms once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(): void; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {ShaderCallNodeInternal} - */ - setup(): ShaderCallNodeInternal; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/StereoCompositePassNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/StereoCompositePassNode.d.ts deleted file mode 100644 index 007849257..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/StereoCompositePassNode.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -export default StereoCompositePassNode; -/** - * A special (abstract) render pass node that renders the scene - * as a stereoscopic image. Unlike {@link StereoPassNode}, this - * node merges the image for the left and right eye - * into a single one. That is required for effects like - * anaglyph or parallax barrier. - * - * @abstract - * @augments PassNode - * @three_import import { StereoCompositePassNode } from 'three/addons/tsl/display/StereoCompositePassNode.js'; - */ -declare class StereoCompositePassNode extends PassNode { - /** - * Constructs a new stereo composite pass node. - * - * @param {Scene} scene - The scene to render. - * @param {Camera} camera - The camera to render the scene with. - */ - constructor(scene: Scene, camera: Camera); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStereoCompositePassNode: boolean; - /** - * The internal stereo camera that is used to render the scene. - * - * @type {StereoCamera} - */ - stereo: StereoCamera; - /** - * The render target for rendering the left eye's view. - * - * @private - * @type {RenderTarget} - */ - private _renderTargetL; - /** - * The render target for rendering the right eye's view. - * - * @private - * @type {RenderTarget} - */ - private _renderTargetR; - /** - * A texture node representing the left's eye view. - * - * @private - * @type {TextureNode} - */ - private _mapLeft; - /** - * A texture node representing the right's eye view. - * - * @private - * @type {TextureNode} - */ - private _mapRight; - /** - * The node material that implements the composite. All - * derived effect passes must provide an instance for rendering. - * - * @private - * @type {?NodeMaterial} - * @default null - */ - private _material; - /** - * Updates the internal stereo camera. - * - * @param {number} coordinateSystem - The current coordinate system. - */ - updateStereoCamera(coordinateSystem: number): void; - /** - * This method is used to render the effect once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(frame: NodeFrame): void; -} -import { PassNode } from 'three/webgpu'; -import { StereoCamera } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/StereoPassNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/StereoPassNode.d.ts deleted file mode 100644 index 758e3f40e..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/StereoPassNode.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -export default StereoPassNode; -export function stereoPass(scene: Scene, camera: Camera): StereoPassNode; -/** - * A special render pass node that renders the scene as a stereoscopic image. - * - * @augments PassNode - * @three_import import { stereoPass } from 'three/addons/tsl/display/StereoPassNode.js'; - */ -declare class StereoPassNode extends PassNode { - /** - * Constructs a new stereo pass node. - * - * @param {Scene} scene - The scene to render. - * @param {Camera} camera - The camera to render the scene with. - */ - constructor(scene: Scene, camera: Camera); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStereoPassNode: boolean; - /** - * The internal stereo camera that is used to render the scene. - * - * @type {StereoCamera} - */ - stereo: StereoCamera; - /** - * This method is used to render the stereo effect once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(frame: NodeFrame): void; -} -import { PassNode } from 'three/webgpu'; -import { StereoCamera } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/TAAUNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/TAAUNode.d.ts deleted file mode 100644 index b2315c1b2..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/TAAUNode.d.ts +++ /dev/null @@ -1,275 +0,0 @@ -export default TAAUNode; -export function taau(beautyNode: TextureNode, depthNode: TextureNode, velocityNode: TextureNode, camera: Camera): TAAUNode; -/** - * A special node that performs Temporal Anti-Aliasing Upscaling (TAAU). - * - * Like TRAA, the node accumulates jittered samples over multiple frames and - * reprojects history with motion vectors. Unlike TRAA, the input buffers - * (beauty, depth, velocity) are expected to be rendered at a lower resolution - * than the renderer's drawing buffer — typically by lowering the upstream - * pass's resolution via {@link PassNode#setResolutionScale} — and the resolve - * pass reconstructs an output-resolution image using a 9-tap Blackman-Harris - * filter (Gaussian approximation) over the jittered input samples. The result - * is an alternative to FSR2/3 that does anti-aliasing and upscaling in a - * single pass. - * - * References: - * - Karis, "High Quality Temporal Supersampling", SIGGRAPH 2014, {@link https://advances.realtimerendering.com/s2014/} - * - Riley/Arcila, FidelityFX Super Resolution 2, GDC 2022, {@link https://gpuopen.com/download/GDC_FidelityFX_Super_Resolution_2_0.pdf} - * - * Note: MSAA must be disabled when TAAU is in use. - * - * @augments TempNode - * @three_import import { taau } from 'three/addons/tsl/display/TAAUNode.js'; - */ -declare class TAAUNode extends TempNode { - /** - * Constructs a new TAAU node. - * - * @param {TextureNode} beautyNode - The texture node that represents the input of the effect. - * @param {TextureNode} depthNode - A node that represents the scene's depth. - * @param {TextureNode} velocityNode - A node that represents the scene's velocity. - * @param {Camera} camera - The camera the scene is rendered with. - */ - constructor(beautyNode: TextureNode, depthNode: TextureNode, velocityNode: TextureNode, camera: Camera); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isTAAUNode: boolean; - /** - * The texture node that represents the input of the effect. - * - * @type {TextureNode} - */ - beautyNode: TextureNode; - /** - * A node that represents the scene's depth. - * - * @type {TextureNode} - */ - depthNode: TextureNode; - /** - * A node that represents the scene's velocity. - * - * @type {TextureNode} - */ - velocityNode: TextureNode; - /** - * The camera the scene is rendered with. - * - * @type {Camera} - */ - camera: Camera; - /** - * When the difference between the current and previous depth goes above this threshold, - * the history is considered invalid. - * - * @type {number} - * @default 0.0005 - */ - depthThreshold: number; - /** - * The depth difference within the 3×3 neighborhood to consider a pixel as an edge. - * - * @type {number} - * @default 0.001 - */ - edgeDepthDiff: number; - /** - * The history becomes invalid as the pixel length of the velocity approaches this value. - * - * @type {number} - * @default 128 - */ - maxVelocityLength: number; - /** - * Baseline weight applied to the current frame in the resolve. Lower - * values produce smoother results with longer accumulation but slower - * convergence on disoccluded regions; the motion factor is added on - * top, so fast-moving pixels still respond quickly. - * - * @type {number} - * @default 0.025 - */ - currentFrameWeight: number; - /** - * The jitter index selects the current camera offset value. - * - * @private - * @type {number} - * @default 0 - */ - private _jitterIndex; - /** - * A uniform node holding the current jitter offset in input-pixel - * units. The shader needs this to know where each input sample was - * actually rendered when computing per-tap reconstruction weights. - * - * @private - * @type {UniformNode} - */ - private _jitterOffset; - /** - * The render target that represents the history of frame data. - * Sized to the renderer's drawing buffer (the output resolution). - * - * @private - * @type {?RenderTarget} - */ - private _historyRenderTarget; - /** - * The render target for the resolve. Sized to the renderer's drawing - * buffer (the output resolution). - * - * @private - * @type {?RenderTarget} - */ - private _resolveRenderTarget; - /** - * Render target whose depth attachment holds the previous frame's - * depth buffer. The depth texture must be owned by a render target - * so that `copyTextureToTexture` can copy into it on the WebGL - * backend, which uses a framebuffer blit and therefore needs the - * destination depth texture to be attached to a framebuffer. This - * render target is sized independently of the history target so it - * can match the (lower-resolution) input depth texture. - * - * @private - * @type {RenderTarget} - */ - private _previousDepthRenderTarget; - /** - * Material used for the resolve step. - * - * @private - * @type {NodeMaterial} - */ - private _resolveMaterial; - /** - * Material used to seed the history render target on resize. It - * performs a bilinear upscale of the current beauty buffer into the - * output-sized history target so that the first frames after a - * resize do not fade in from black. - * - * @private - * @type {NodeMaterial} - */ - private _seedMaterial; - /** - * The result of the effect is represented as a separate texture node. - * - * @private - * @type {PassTextureNode} - */ - private _textureNode; - /** - * Used to save the original/unjittered projection matrix. - * - * @private - * @type {Matrix4} - */ - private _originalProjectionMatrix; - /** - * A uniform node holding the camera's near and far. - * - * @private - * @type {UniformNode} - */ - private _cameraNearFar; - /** - * A uniform node holding the camera world matrix. - * - * @private - * @type {UniformNode} - */ - private _cameraWorldMatrix; - /** - * A uniform node holding the camera world matrix inverse. - * - * @private - * @type {UniformNode} - */ - private _cameraWorldMatrixInverse; - /** - * A uniform node holding the camera projection matrix inverse. - * - * @private - * @type {UniformNode} - */ - private _cameraProjectionMatrixInverse; - /** - * A uniform node holding the previous frame's view matrix. - * - * @private - * @type {UniformNode} - */ - private _previousCameraWorldMatrix; - /** - * A uniform node holding the previous frame's projection matrix inverse. - * - * @private - * @type {UniformNode} - */ - private _previousCameraProjectionMatrixInverse; - /** - * A texture node for the previous depth buffer. - * - * @private - * @type {TextureNode} - */ - private _previousDepthNode; - /** - * Sync the post processing stack with the TAAU node. - * - * @private - * @type {boolean} - */ - private _needsPostProcessingSync; - /** - * Returns the result of the effect as a texture node. - * - * @return {PassTextureNode} A texture node that represents the result of the effect. - */ - getTextureNode(): PassTextureNode; - /** - * Sets the output size of the effect (history and resolve targets). The - * previous-depth texture is sized independently in `updateBefore()` to - * track the scene's current depth texture. - * - * @param {number} outputWidth - The output width (drawing buffer width). - * @param {number} outputHeight - The output height (drawing buffer height). - */ - setSize(outputWidth: number, outputHeight: number): void; - /** - * Defines the TAAU's current jitter as a view offset to the scene's - * camera. The jitter is shrunk to one *output* pixel (rather than one - * input pixel) so that the halton sequence gradually fills the output - * sub-pixel grid over multiple frames. - * - * @param {number} inputWidth - The width of the input buffers the camera renders into. - * @param {number} inputHeight - The height of the input buffers the camera renders into. - */ - setViewOffset(inputWidth: number, inputHeight: number): void; - /** - * Clears the view offset from the scene's camera. - */ - clearViewOffset(): void; - /** - * This method is used to render the effect once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(frame: NodeFrame): void; - /** - * This method is used to setup the effect's render targets and TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {PassTextureNode} - */ - setup(builder: NodeBuilder): PassTextureNode; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/TRAANode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/TRAANode.d.ts deleted file mode 100644 index 56581bb40..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/TRAANode.d.ts +++ /dev/null @@ -1,239 +0,0 @@ -export default TRAANode; -export function traa(beautyNode: TextureNode, depthNode: TextureNode, velocityNode: TextureNode, camera: Camera): TRAANode; -/** - * A special node that applies TRAA (Temporal Reprojection Anti-Aliasing). - * - * References: - * - {@link https://alextardif.com/TAA.html} - * - {@link https://www.elopezr.com/temporal-aa-and-the-quest-for-the-holy-trail/} - * - * Note: MSAA must be disabled when TRAA is in use. - * - * @augments TempNode - * @three_import import { traa } from 'three/addons/tsl/display/TRAANode.js'; - */ -declare class TRAANode extends TempNode { - /** - * Constructs a new TRAA node. - * - * @param {TextureNode} beautyNode - The texture node that represents the input of the effect. - * @param {TextureNode} depthNode - A node that represents the scene's depth. - * @param {TextureNode} velocityNode - A node that represents the scene's velocity. - * @param {Camera} camera - The camera the scene is rendered with. - */ - constructor(beautyNode: TextureNode, depthNode: TextureNode, velocityNode: TextureNode, camera: Camera); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isTRAANode: boolean; - /** - * The texture node that represents the input of the effect. - * - * @type {TextureNode} - */ - beautyNode: TextureNode; - /** - * A node that represents the scene's velocity. - * - * @type {TextureNode} - */ - depthNode: TextureNode; - /** - * A node that represents the scene's velocity. - * - * @type {TextureNode} - */ - velocityNode: TextureNode; - /** - * The camera the scene is rendered with. - * - * @type {Camera} - */ - camera: Camera; - /** - * When the difference between the current and previous depth goes above this threshold, - * the history is considered invalid. - * - * @type {number} - * @default 0.0005 - */ - depthThreshold: number; - /** - * The depth difference within the 3×3 neighborhood to consider a pixel as an edge. - * - * @type {number} - * @default 0.001 - */ - edgeDepthDiff: number; - /** - * The history becomes invalid as the pixel length of the velocity approaches this value. - * - * @type {number} - * @default 128 - */ - maxVelocityLength: number; - /** - * Whether to decrease the weight on the current frame when the velocity is more subpixel. - * This reduces blurriness under motion, but can introduce a square pattern artifact. - * - * @type {boolean} - * @default true - */ - useSubpixelCorrection: boolean; - /** - * The jitter index selects the current camera offset value. - * - * @private - * @type {number} - * @default 0 - */ - private _jitterIndex; - /** - * A uniform node holding the inverse resolution value. - * - * @private - * @type {UniformNode} - */ - private _invSize; - /** - * The render target that represents the history of frame data. - * - * @private - * @type {?RenderTarget} - */ - private _historyRenderTarget; - /** - * The render target for the resolve. - * - * @private - * @type {?RenderTarget} - */ - private _resolveRenderTarget; - /** - * Material used for the resolve step. - * - * @private - * @type {NodeMaterial} - */ - private _resolveMaterial; - /** - * The result of the effect is represented as a separate texture node. - * - * @private - * @type {PassTextureNode} - */ - private _textureNode; - /** - * Used to save the original/unjittered projection matrix. - * - * @private - * @type {Matrix4} - */ - private _originalProjectionMatrix; - /** - * A uniform node holding the camera's near and far. - * - * @private - * @type {UniformNode} - */ - private _cameraNearFar; - /** - * A uniform node holding the camera world matrix. - * - * @private - * @type {UniformNode} - */ - private _cameraWorldMatrix; - /** - * A uniform node holding the camera world matrix inverse. - * - * @private - * @type {UniformNode} - */ - private _cameraWorldMatrixInverse; - /** - * A uniform node holding the camera projection matrix inverse. - * - * @private - * @type {UniformNode} - */ - private _cameraProjectionMatrixInverse; - /** - * A uniform node holding the previous frame's view matrix. - * - * @private - * @type {UniformNode} - */ - private _previousCameraWorldMatrix; - /** - * A uniform node holding the previous frame's projection matrix inverse. - * - * @private - * @type {UniformNode} - */ - private _previousCameraProjectionMatrixInverse; - /** - * A texture node for the previous depth buffer. - * - * @private - * @type {TextureNode} - */ - private _previousDepthNode; - /** - * Sync the post processing stack with the TRAA node. - * - * @private - * @type {boolean} - */ - private _needsPostProcessingSync; - /** - * The node used to render the scene's velocity. - * - * @private - * @type {?VelocityNode} - */ - private _velocityNode; - /** - * Returns the result of the effect as a texture node. - * - * @return {PassTextureNode} A texture node that represents the result of the effect. - */ - getTextureNode(): PassTextureNode; - /** - * Sets the size of the effect. - * - * @param {number} width - The width of the effect. - * @param {number} height - The height of the effect. - */ - setSize(width: number, height: number): void; - /** - * Defines the TRAA's current jitter as a view offset - * to the scene's camera. - * - * @param {number} width - The width of the effect. - * @param {number} height - The height of the effect. - */ - setViewOffset(width: number, height: number): void; - /** - * Clears the view offset from the scene's camera. - */ - clearViewOffset(): void; - /** - * This method is used to render the effect once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(frame: NodeFrame): void; - /** - * This method is used to setup the effect's render targets and TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {PassTextureNode} - */ - setup(builder: NodeBuilder): PassTextureNode; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/TransitionNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/TransitionNode.d.ts deleted file mode 100644 index 71665d855..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/TransitionNode.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -export default TransitionNode; -export function transition(nodeA: Node, nodeB: Node, mixTextureNode: Node, mixRatio: Node | number, threshold: Node | number, useTexture: Node | number): TransitionNode; -/** - * Post processing node for creating a transition effect between scenes. - * - * @augments TempNode - * @three_import import { transition } from 'three/addons/tsl/display/TransitionNode.js'; - */ -declare class TransitionNode extends TempNode { - /** - * Constructs a new transition node. - * - * @param {TextureNode} textureNodeA - A texture node that represents the beauty pass of the first scene. - * @param {TextureNode} textureNodeB - A texture node that represents the beauty pass of the second scene. - * @param {TextureNode} mixTextureNode - A texture node that defines how the transition effect should look like. - * @param {Node} mixRatioNode - The interpolation factor that controls the mix. - * @param {Node} thresholdNode - Can be used to tweak the linear interpolation. - * @param {Node} useTextureNode - Whether `mixTextureNode` should influence the transition or not. - */ - constructor(textureNodeA: TextureNode, textureNodeB: TextureNode, mixTextureNode: TextureNode, mixRatioNode: Node, thresholdNode: Node, useTextureNode: Node); - /** - * A texture node that represents the beauty pass of the first scene. - * - * @type {TextureNode} - */ - textureNodeA: TextureNode; - /** - * A texture node that represents the beauty pass of the second scene. - * - * @type {TextureNode} - */ - textureNodeB: TextureNode; - /** - * A texture that defines how the transition effect should look like. - * - * @type {TextureNode} - */ - mixTextureNode: TextureNode; - /** - * The interpolation factor that controls the mix. - * - * @type {Node} - */ - mixRatioNode: Node; - /** - * Can be used to tweak the linear interpolation. - * - * @type {Node} - */ - thresholdNode: Node; - /** - * Whether `mixTextureNode` should influence the transition or not. - * - * @type {Node} - */ - useTextureNode: Node; - /** - * This method is used to setup the effect's TSL code. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {ShaderCallNodeInternal} - */ - setup(): ShaderCallNodeInternal; -} -import { TempNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/boxBlur.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/boxBlur.d.ts deleted file mode 100644 index db00aa0d9..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/boxBlur.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * Applies a box blur effect to the given texture node. - * - * Compared to Gaussian blur, box blur produces a more blocky result but with better performance when correctly - * configured. It is intended for mobile devices or performance restricted use cases where Gaussian is too heavy. - * - * The (kernel) `size` parameter should be small (1, 2 or 3) since it determines the number of samples based on (size * 2 + 1)^2. - * This implementation uses a single pass approach so the kernel is not applied as a separable filter. That means larger - * kernels won't perform well. Use Gaussian instead if you need a more high-quality blur. - * - * To produce wider blurs, increase the `separation` parameter instead which has no influence on the performance. - * - * Reference: {@link https://github.com/lettier/3d-game-shaders-for-beginners/blob/master/demonstration/shaders/fragment/box-blur.frag}. - * - * @tsl - * @function - * @param {Node} textureNode - The texture node that should be blurred. - * @param {Object} [options={}] - Additional options for the hash blur effect. - * @param {Node} [options.size=int(1)] - Controls the blur's kernel. For performant results, the range should within [1, 3]. - * @param {Node} [options.separation=int(1)] - Spreads out the blur without having to sample additional fragments. Ranges from [1, Infinity]. - * @param {boolean} [options.premultipliedAlpha=false] - Whether to use premultiplied alpha for the blur effect. - * @return {Node} The blurred texture node. - */ -export const boxBlur: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/depthAwareBlend.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/depthAwareBlend.d.ts deleted file mode 100644 index 7027dea2f..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/depthAwareBlend.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Performs a depth-aware blend between a base scene and a secondary effect (like godrays). - * This function uses a Poisson disk sampling pattern to detect depth discontinuities - * in the neighborhood of the current pixel. If an edge is detected, it shifts the - * sampling coordinate for the blend node away from the edge to prevent light leaking/haloing. - * - * @param {Node} baseNode - The main scene/beauty pass texture node. - * @param {Node} blendNode - The effect to be blended (e.g., Godrays, Bloom). - * @param {Node} depthNode - The scene depth texture node. - * @param {Camera} camera - The camera used for the scene. - * @param {Object} [options={}] - Configuration for the blend effect. - * @param {Node|Color} [options.blendColor=Color(0xff0000)] - The color applied to the blend node. - * @param {Node | number} [options.edgeRadius=2] - The search radius (in pixels) for detecting depth edges. - * @param {Node | number} [options.edgeStrength=2] - How far to "push" the UV away from detected edges. - * @returns {Node} The resulting blended color node. - */ -export const depthAwareBlend: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/hashBlur.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/hashBlur.d.ts deleted file mode 100644 index e02a15356..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/hashBlur.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Applies a hash blur effect to the given texture node. - * - * The approach of this blur is different compared to Gaussian and box blur since - * it does not rely on a kernel to apply a convolution. Instead, it reads the base - * texture multiple times in a random pattern and then averages the samples. A - * typical artifact of this technique is a slightly noisy appearance of the blur which - * can be mitigated by increasing the number of iterations (see `repeats` parameter). - * Compared to Gaussian blur, hash blur requires just a single pass. - * - * Reference: {@link https://www.shadertoy.com/view/4lXXWn}. - * - * @tsl - * @function - * @param {Node} textureNode - The texture node that should be blurred. - * @param {Node} [bluramount=float(0.1)] - This node determines the amount of blur. - * @param {Object} [options={}] - Additional options for the hash blur effect. - * @param {Node} [options.repeats=float(45)] - The number of iterations for the blur effect. - * @param {boolean} [options.premultipliedAlpha=false] - Whether to use premultiplied alpha for the blur effect. - * @return {Node} The blurred texture node. - */ -export const hashBlur: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/radialBlur.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/display/radialBlur.d.ts deleted file mode 100644 index 0450409a0..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/display/radialBlur.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * This TSL function blurs an image in a circular pattern, radiating from a configurable center point in screen space. - * - * Radial blurs can be used for different kind of effects like producing simple faked lighting effects also known as - * "light shafts". The major limitation of this specific usage is the center point can only be defined in 2D so the - * effect does not honor the depth of 3D objects. Consequently, it is not intended for physically correct lit scenes. - * - * @tsl - * @function - * @param {Node} textureNode - The texture node that should be blurred. - * @param {Object} [options={}] - Additional options for the radial blur effect. - * @param {Node} [options.center=vec2(0.5, 0.5)] - The center of the light in screen uvs. - * @param {Node} [options.weight=float(0.9)] - Base weight factor for each sample in the range `[0,1]`. - * @param {Node} [options.decay=float(0.95)] - Decreases the weight factor so each iteration adds less to the sum. Must be in the range `[0,1]`. - * If you increase the sample count, you have to increase this option as well to avoid a darking effect. - * @param {Node} [options.count=int(32)] - The number if iterations. Should be in the range `[16,64]`. - * @param {Node} [options.exposure=float(5)] - Exposure control of the blur. - * @return {Node} The blurred texture node. - */ -export const radialBlur: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/ClusteredLightsNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/ClusteredLightsNode.d.ts deleted file mode 100644 index 3fc0b16d1..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/ClusteredLightsNode.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -export default ClusteredLightsNode; -/** - * TSL function that creates a clustered lights node. - * - * @tsl - * @function - * @param {number} [maxLights=1024] - Maximum number of point lights. - * @param {number} [tileSize=32] - Screen tile size in pixels. - * @param {number} [zSlices=24] - Depth slice count. - * @param {number} [maxLightsPerCluster=64] - Per-cluster light-list capacity. - * @return {ClusteredLightsNode} The clustered lights node. - */ -export const clusteredLights: any; -/** - * A custom version of `LightsNode` implementing Forward+ clustered shading: - * the view frustum is subdivided into a 3D grid of clusters (X × Y screen tiles - * times an exponentially-spaced set of Z depth slices), and each cluster holds - * only the point lights whose spheres intersect it. At shading time each fragment - * looks up its cluster and loops over just that cluster's lights. Unlike 2D tiled - * lighting, clustered shading culls lights that share screen pixels but lie at - * different depths — suitable for 3D scenes with real depth complexity. - * - * @augments LightsNode - * @three_import import { clusteredLights } from 'three/addons/tsl/lighting/ClusteredLightsNode.js'; - */ -declare class ClusteredLightsNode extends LightsNode { - /** - * Constructs a new clustered lights node. - * - * @param {number} [maxLights=1024] - Maximum number of point lights. - * @param {number} [tileSize=32] - Screen tile size in pixels (cluster XY size). - * @param {number} [zSlices=24] - Number of exponential depth slices. - * @param {number} [maxLightsPerCluster=64] - Per-cluster light-list capacity. - */ - constructor(maxLights?: number, tileSize?: number, zSlices?: number, maxLightsPerCluster?: number); - materialLights: any[]; - clusteredLights: any[]; - maxLights: number; - tileSize: number; - zSlices: number; - maxLightsPerCluster: number; - _chunksPerCluster: number; - _bufferSize: Vector2 | null; - _lightIndexes: import("three/webgpu").UniformNode | null; - _screenClusterIndex: any; - _compute: any; - _lightsTexture: DataTexture | null; - _zSliceRangesTexture: DataTexture | null; - _zSliceRangesData: Float32Array | null; - _lightViewZ: Float32Array; - _lightSortOrder: any[]; - _lightsCount: import("three/webgpu").UniformNode; - _cameraNear: import("three/webgpu").UniformNode; - _cameraFar: import("three/webgpu").UniformNode; - _cameraViewMatrix: import("three/webgpu").UniformNode; - _cameraProjectionMatrix: import("three/webgpu").UniformNode; - _gridDimensions: import("three/webgpu").UniformNode; - customCacheKey(): any; - updateLightsTexture(camera: any): void; - updateBefore(frame: any): void; - setLights(lights: any): LightsNode; - getBlock(): any; - getTile(element: any): any; - getClusterLightCount(zSliceNode: any): void; - getLightData(index: any): { - position: any; - viewPosition: any; - distance: any; - color: any; - decay: any; - }; - setupLights(builder: any, lightNodes: any): void; - getBufferFitSize(value: any): number; - setSize(width: any, height: any): this; - updateProgram(renderer: any): void; - create(width: any, height: any): void; -} -import { LightsNode } from 'three/webgpu'; -import { Vector2 } from 'three/webgpu'; -import { DataTexture } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/DynamicLightsNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/DynamicLightsNode.d.ts deleted file mode 100644 index 0cb027cb7..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/DynamicLightsNode.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -export default DynamicLightsNode; -export function dynamicLights(options?: Object): DynamicLightsNode; -/** - * A custom version of `LightsNode` that batches supported analytic lights into - * uniform arrays and loops. - * - * Unsupported lights, node lights, shadow-casting lights, and projected spot - * lights keep the default per-light path. - * - * @augments LightsNode - * @three_import import { DynamicLightsNode } from 'three/addons/tsl/lighting/DynamicLightsNode.js'; - */ -declare class DynamicLightsNode extends LightsNode { - /** - * Constructs a new dynamic lights node. - * - * @param {Object} [options={}] - Dynamic lighting configuration. - * @param {number} [options.maxDirectionalLights=8] - Maximum number of batched directional lights. - * @param {number} [options.maxPointLights=16] - Maximum number of batched point lights. - * @param {number} [options.maxSpotLights=16] - Maximum number of batched spot lights. - * @param {number} [options.maxHemisphereLights=4] - Maximum number of batched hemisphere lights. - */ - constructor(options?: { - maxDirectionalLights?: number | undefined; - maxPointLights?: number | undefined; - maxSpotLights?: number | undefined; - maxHemisphereLights?: number | undefined; - }); - maxDirectionalLights: number; - maxPointLights: number; - maxSpotLights: number; - maxHemisphereLights: number; - _dataNodes: Map; - setupLightsNode(builder: any): void; - setLights(lights: any): this; - _updateDataNodeLights(lights: any): void; -} -import { LightsNode } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/TiledLightsNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/TiledLightsNode.d.ts deleted file mode 100644 index 3109b43c9..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/TiledLightsNode.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -/** - * TSL function that checks if a circle intersects with an axis-aligned bounding box (AABB). - * - * @tsl - * @function - * @param {Node} circleCenter - The center of the circle. - * @param {Node} radius - The radius of the circle. - * @param {Node} minBounds - The minimum bounds of the AABB. - * @param {Node} maxBounds - The maximum bounds of the AABB. - * @return {Node} True if the circle intersects the AABB. - */ -export const circleIntersectsAABB: any; -export default TiledLightsNode; -/** - * TSL function that creates a tiled lights node. - * - * @tsl - * @function - * @param {number} [maxLights=1024] - The maximum number of lights. - * @param {number} [tileSize=32] - The tile size. - * @return {TiledLightsNode} The tiled lights node. - */ -export const tiledLights: any; -/** - * A custom version of `LightsNode` implementing tiled lighting. This node is used in - * {@link TiledLighting} to overwrite the renderer's default lighting with - * a custom implementation. - * - * @augments LightsNode - * @three_import import { tiledLights } from 'three/addons/tsl/lighting/TiledLightsNode.js'; - */ -declare class TiledLightsNode extends LightsNode { - /** - * Constructs a new tiled lights node. - * - * @param {number} [maxLights=1024] - The maximum number of lights. - * @param {number} [tileSize=32] - The tile size. - */ - constructor(maxLights?: number, tileSize?: number); - materialLights: any[]; - tiledLights: any[]; - /** - * The maximum number of lights. - * - * @type {number} - * @default 1024 - */ - maxLights: number; - /** - * The tile size. - * - * @type {number} - * @default 32 - */ - tileSize: number; - _bufferSize: Vector2 | null; - _lightIndexes: import("three/webgpu").UniformNode | null; - _screenTileIndex: any; - _compute: any; - _lightsTexture: DataTexture | null; - _lightsCount: import("three/webgpu").UniformNode; - _tileLightCount: number; - _screenSize: import("three/webgpu").UniformNode; - _cameraProjectionMatrix: import("three/webgpu").UniformNode; - _cameraViewMatrix: import("three/webgpu").UniformNode; - customCacheKey(): any; - updateLightsTexture(): void; - updateBefore(frame: any): void; - setLights(lights: any): LightsNode; - getBlock(block?: number): any; - getTile(element: any): any; - getLightData(index: any): { - position: any; - viewPosition: any; - distance: any; - color: any; - decay: any; - }; - setupLights(builder: any, lightNodes: any): void; - getBufferFitSize(value: any): number; - setSize(width: any, height: any): this; - updateProgram(renderer: any): void; - create(width: any, height: any): void; -} -import { LightsNode } from 'three/webgpu'; -import { Vector2 } from 'three/webgpu'; -import { DataTexture } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/AmbientLightDataNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/AmbientLightDataNode.d.ts deleted file mode 100644 index fe894a9c0..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/AmbientLightDataNode.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default AmbientLightDataNode; -/** - * Batched data node for ambient lights in dynamic lighting mode. - * - * @augments Node - */ -declare class AmbientLightDataNode extends Node { - constructor(); - _color: Color; - _lights: any[]; - colorNode: import("three/webgpu").UniformNode; - setLights(lights: any): this; - update(): void; - setup(builder: any): void; -} -import { Node } from 'three/webgpu'; -import { Color } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/DirectionalLightDataNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/DirectionalLightDataNode.d.ts deleted file mode 100644 index 8aefc7b47..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/DirectionalLightDataNode.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -export default DirectionalLightDataNode; -/** - * Batched data node for directional lights in dynamic lighting mode. - * - * @augments Node - */ -declare class DirectionalLightDataNode extends Node { - constructor(maxCount?: number); - maxCount: number; - _lights: any[]; - _colors: Color[]; - _directions: Vector3[]; - colorsNode: import("three/webgpu").UniformNode; - directionsNode: import("three/webgpu").UniformNode; - countNode: import("three/webgpu").UniformNode; - setLights(lights: any): this; - update({ camera }: { - camera: any; - }): void; - setup(builder: any): void; -} -import { Node } from 'three/webgpu'; -import { Color } from 'three/webgpu'; -import { Vector3 } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/HemisphereLightDataNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/HemisphereLightDataNode.d.ts deleted file mode 100644 index 20c3132df..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/HemisphereLightDataNode.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -export default HemisphereLightDataNode; -/** - * Batched data node for hemisphere lights in dynamic lighting mode. - * - * @augments Node - */ -declare class HemisphereLightDataNode extends Node { - constructor(maxCount?: number); - maxCount: number; - _lights: any[]; - _skyColors: Color[]; - _groundColors: Color[]; - _directions: Vector3[]; - skyColorsNode: import("three/webgpu").UniformNode; - groundColorsNode: import("three/webgpu").UniformNode; - directionsNode: import("three/webgpu").UniformNode; - countNode: import("three/webgpu").UniformNode; - setLights(lights: any): this; - update(): void; - setup(builder: any): void; -} -import { Node } from 'three/webgpu'; -import { Color } from 'three/webgpu'; -import { Vector3 } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/PointLightDataNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/PointLightDataNode.d.ts deleted file mode 100644 index 693924670..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/PointLightDataNode.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -export default PointLightDataNode; -/** - * Batched data node for point lights in dynamic lighting mode. - * - * @augments Node - */ -declare class PointLightDataNode extends Node { - constructor(maxCount?: number); - maxCount: number; - _lights: any[]; - _colors: Color[]; - _positionsAndCutoff: Vector4[]; - _decays: Vector4[]; - colorsNode: import("three/webgpu").UniformNode; - positionsAndCutoffNode: import("three/webgpu").UniformNode; - decaysNode: import("three/webgpu").UniformNode; - countNode: import("three/webgpu").UniformNode; - setLights(lights: any): this; - update({ camera }: { - camera: any; - }): void; - setup(builder: any): void; -} -import { Node } from 'three/webgpu'; -import { Color } from 'three/webgpu'; -import { Vector4 } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/SpotLightDataNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/SpotLightDataNode.d.ts deleted file mode 100644 index b46db542a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/lighting/data/SpotLightDataNode.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -export default SpotLightDataNode; -/** - * Batched data node for simple spot lights in dynamic lighting mode. - * - * Projected spot lights keep the default per-light path. - * - * @augments Node - */ -declare class SpotLightDataNode extends Node { - constructor(maxCount?: number); - maxCount: number; - _lights: any[]; - _colors: Color[]; - _positionsAndCutoff: Vector4[]; - _directionsAndDecay: Vector4[]; - _cones: Vector4[]; - colorsNode: import("three/webgpu").UniformNode; - positionsAndCutoffNode: import("three/webgpu").UniformNode; - directionsAndDecayNode: import("three/webgpu").UniformNode; - conesNode: import("three/webgpu").UniformNode; - countNode: import("three/webgpu").UniformNode; - setLights(lights: any): this; - update({ camera }: { - camera: any; - }): void; - setup(builder: any): void; -} -import { Node } from 'three/webgpu'; -import { Color } from 'three/webgpu'; -import { Vector4 } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/math/Bayer.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/math/Bayer.d.ts deleted file mode 100644 index 87b7fcb02..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/math/Bayer.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * This TSL function can be used to sample a Bayer16 texture which is a 16x16 texture with a Bayer Matrix pattern. - * It can be used for dithering effects but also as an alternative to blue-noise. When used with Ray Marching - * specifically in {@link VolumeNodeMaterial#offsetNode}, it reduces banding problem, thus being able to use - * fewer steps without affecting the visuals as much. - * - * @tsl - * @function - * @param {Node} uv - The uv to sample the bayer16 texture. - * @return {Node} The sampled bayer value. - */ -export const bayer16: () => void; -/** - * This TSL function applies Bayer dithering to a color input. It uses a 4x4 Bayer matrix - * pattern to add structured noise before color quantization, which helps reduce visible - * color banding when limiting color depth. - * - * @tsl - * @function - * @param {Node} color - The input color to apply dithering to. - * @param {Node} [steps=32] - The number of color steps per channel. - * @return {Node} The dithered color ready for quantization. - * - * @example - * // Apply dithering with posterize - * const ditheredColor = bayerDither( inputColor, 32 ); - * const finalColor = posterize( ditheredColor, 32 ); - */ -export const bayerDither: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/shadows/TileShadowNode.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/shadows/TileShadowNode.d.ts deleted file mode 100644 index 70c1b42db..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/shadows/TileShadowNode.d.ts +++ /dev/null @@ -1,115 +0,0 @@ -/** - * A class that extends `ShadowBaseNode` to implement tiled shadow mapping. - * This allows splitting a shadow map into multiple tiles, each with its own light and camera, - * to improve shadow quality and performance for large scenes. - * - * **Note:** This class does not support `VSMShadowMap` at the moment. - * - * @class - * @augments ShadowBaseNode - * @three_import import { TileShadowNode } from 'three/addons/tsl/shadows/TileShadowNode.js'; - */ -export class TileShadowNode extends ShadowBaseNode { - /** - * Creates an instance of `TileShadowNode`. - * - * @param {Light} light - The original light source used for shadow mapping. - * @param {Object} [options={}] - Configuration options for the tiled shadow node. - * @param {number} [options.tilesX=2] - The number of tiles along the X-axis. - * @param {number} [options.tilesY=2] - The number of tiles along the Y-axis. - * @param {Object} [options.resolution] - The resolution of the shadow map. - * @param {boolean} [options.debug=false] - Whether to enable debug mode. - */ - constructor(light: Light, options?: { - tilesX?: number | undefined; - tilesY?: number | undefined; - resolution?: Object | undefined; - debug?: boolean | undefined; - }); - config: { - tilesX: number; - tilesY: number; - resolution: any; - debug: boolean; - }; - debug: boolean; - originalLight: Light; - lightPlane: Plane; - line: Line3; - initialLightDirection: Vector3; - _cameraFrameId: WeakMap; - shadowSize: { - top: any; - bottom: any; - left: any; - right: any; - }; - lights: any[]; - _shadowNodes: any[]; - tiles: Object[]; - /** - * Generates the tiles for the shadow map based on the specified number of tiles along the X and Y axes. - * - * @param {number} tilesX - The number of tiles along the X-axis. - * @param {number} tilesY - The number of tiles along the Y-axis. - * @returns {Array} An array of tile objects, each containing the tile's bounds and index. - */ - generateTiles(tilesX: number, tilesY: number): Array; - /** - * Updates the initial light direction based on the light's target position. - */ - updateLightDirection(): void; - /** - * Initializes the tiled shadow node by creating lights, cameras, and shadow maps for each tile. - * - * @param {Builder} builder - The builder used to create render targets and other resources. - */ - init(builder: Builder): void; - shadowMap: any; - cameraArray: ArrayCamera | undefined; - /** - * Updates the light transformations and shadow cameras for each tile. - */ - update(): void; - /** - * Updates the shadow map rendering. - * @param {NodeFrame} frame - A reference to the current node frame. - */ - updateShadow(frame: NodeFrame): void; - _depthVersionCached: any; - /** - * The implementation performs the update of the shadow map if necessary. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - updateBefore(frame: NodeFrame): void; - /** - * Synchronizes the transformation of a tile light with the source light. - * - * @param {LwLight} lwLight - The tile light to synchronize. - * @param {Light} sourceLight - The source light to copy transformations from. - */ - syncLightTransformation(lwLight: LwLight, sourceLight: Light): void; - /** - * Sets up the shadow node for rendering. - * - * @param {Builder} builder - The builder used to set up the shadow node. - * @returns {Node} A node representing the shadow value. - */ - setup(builder: Builder): Node; - /** - * Helper method to remove lights and associated nodes/targets. - * Used internally during dispose and potential re-initialization. - */ - disposeLightsAndNodes(): void; -} -import { ShadowBaseNode } from 'three/webgpu'; -import { Plane } from 'three/webgpu'; -import { Line3 } from 'three/webgpu'; -import { Vector3 } from 'three/webgpu'; -import { ArrayCamera } from 'three/webgpu'; -declare class LwLight extends Object3D { - target: Object3D; -} -import { Object3D } from 'three/webgpu'; -export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/shadows/TileShadowNodeHelper.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/shadows/TileShadowNodeHelper.d.ts deleted file mode 100644 index 95987dc0e..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/shadows/TileShadowNodeHelper.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Helper class to manage and display debug visuals for TileShadowNode. - * - * @augments Group - * @three_import import { TileShadowNodeHelper } from 'three/addons/tsl/shadows/TileShadowNodeHelper.js'; - */ -export class TileShadowNodeHelper extends Group { - /** - * @param {TileShadowNode} tileShadowNode The TileShadowNode instance to debug. - */ - constructor(tileShadowNode: TileShadowNode); - tileShadowNode: any; - config: any; - tiles: any; - _debugMeshes: any[]; - _shadowCamHelpers: any[]; - initialized: boolean; - /** - * Initializes the debug displays (planes and camera helpers). - * Should be called after TileShadowNode has initialized its lights and shadow nodes. - */ - init(): void; - /** - * Updates the debug visuals (specifically camera helpers). - * Should be called within TileShadowNode's update method. - */ - update(): void; - /** - * Removes all debug objects (planes and helpers) from the scene. - */ - dispose(): void; -} -import { Group } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/utils/GroundedSkybox.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/utils/GroundedSkybox.d.ts deleted file mode 100644 index e49e7c2b6..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/utils/GroundedSkybox.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @module GroundedSkybox - * @three_import import { getGroundProjectedNormal } from 'three/addons/tsl/utils/GroundedSkybox.js'; - */ -/** - * Projects the world position onto a sphere whose bottom is clipped by a ground disk, - * then returns a vector usable for sampling an environment cube map. - * - * @tsl - * @function - * @param {Node} radiusNode - The radius of the projection sphere. Must be large enough to ensure the scene's camera stays inside. - * @param {Node} heightNode - The height is how far the camera that took the photo was above the ground. A larger value will magnify the downward part of the image. - * @return {Node} A direction vector for sampling the environment cube map. - */ -export const getGroundProjectedNormal: () => void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/tsl/utils/Raymarching.d.ts b/jsdoc-testing/jsdoc/examples/jsm/tsl/utils/Raymarching.d.ts deleted file mode 100644 index 82ad5f77c..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/tsl/utils/Raymarching.d.ts +++ /dev/null @@ -1 +0,0 @@ -export function RaymarchingBox(steps: number | Node, callback: Function | FunctionNode): void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/BufferGeometryUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/BufferGeometryUtils.d.ts deleted file mode 100644 index 45f64a18c..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/utils/BufferGeometryUtils.d.ts +++ /dev/null @@ -1,123 +0,0 @@ -/** - * @module BufferGeometryUtils - * @three_import import * as BufferGeometryUtils from 'three/addons/utils/BufferGeometryUtils.js'; - */ -/** - * Computes vertex tangents using the MikkTSpace algorithm. MikkTSpace generates the same tangents consistently, - * and is used in most modelling tools and normal map bakers. Use MikkTSpace for materials with normal maps, - * because inconsistent tangents may lead to subtle visual issues in the normal map, particularly around mirrored - * UV seams. - * - * In comparison to this method, {@link BufferGeometry#computeTangents} (a custom algorithm) generates tangents that - * probably will not match the tangents in other software. The custom algorithm is sufficient for general use with a - * custom material, and may be faster than MikkTSpace. - * - * Returns the original BufferGeometry. Indexed geometries will be de-indexed. Requires position, normal, and uv attributes. - * - * @param {BufferGeometry} geometry - The geometry to compute tangents for. - * @param {Object} MikkTSpace - Instance of `examples/jsm/libs/mikktspace.module.js`, or `mikktspace` npm package. - * Await `MikkTSpace.ready` before use. - * @param {boolean} [negateSign=true] - Whether to negate the sign component (.w) of each tangent. - * Required for normal map conventions in some formats, including glTF. - * @return {BufferGeometry} The updated geometry. - */ -export function computeMikkTSpaceTangents(geometry: BufferGeometry, MikkTSpace: Object, negateSign?: boolean): BufferGeometry; -/** - * Merges a set of geometries into a single instance. All geometries must have compatible attributes. - * - * @param {Array} geometries - The geometries to merge. - * @param {boolean} [useGroups=false] - Whether to use groups or not. - * @return {?BufferGeometry} The merged geometry. Returns `null` if the merge does not succeed. - */ -export function mergeGeometries(geometries: Array, useGroups?: boolean): BufferGeometry | null; -/** - * Merges a set of attributes into a single instance. All attributes must have compatible properties and types. - * Instances of {@link InterleavedBufferAttribute} are not supported. - * - * @param {Array} attributes - The attributes to merge. - * @return {?BufferAttribute} The merged attribute. Returns `null` if the merge does not succeed. - */ -export function mergeAttributes(attributes: Array): BufferAttribute | null; -/** - * Performs a deep clone of the given buffer attribute. - * - * @param {BufferAttribute} attribute - The attribute to clone. - * @return {BufferAttribute} The cloned attribute. - */ -export function deepCloneAttribute(attribute: BufferAttribute): BufferAttribute; -/** - * Returns a new, non-interleaved version of the given attribute. - * - * @param {InterleavedBufferAttribute} attribute - The interleaved attribute. - * @return {BufferAttribute} The non-interleaved attribute. - */ -export function deinterleaveAttribute(attribute: InterleavedBufferAttribute): BufferAttribute; -/** - * Deinterleaves all attributes on the given geometry. - * - * @param {BufferGeometry} geometry - The geometry to deinterleave. - */ -export function deinterleaveGeometry(geometry: BufferGeometry): void; -/** - * Interleaves a set of attributes and returns a new array of corresponding attributes that share a - * single {@link InterleavedBuffer} instance. All attributes must have compatible types. - * - * @param {Array} attributes - The attributes to interleave. - * @return {?Array} An array of interleaved attributes. If interleave does not succeed, the method returns `null`. - */ -export function interleaveAttributes(attributes: Array): Array | null; -/** - * Returns the amount of bytes used by all attributes to represent the geometry. - * - * @param {BufferGeometry} geometry - The geometry. - * @return {number} The estimate bytes used. - */ -export function estimateBytesUsed(geometry: BufferGeometry): number; -/** - * Returns a new geometry with vertices for which all similar vertex attributes (within tolerance) are merged. - * - * @param {BufferGeometry} geometry - The geometry to merge vertices for. - * @param {number} [tolerance=1e-4] - The tolerance value. - * @return {BufferGeometry} - The new geometry with merged vertices. - */ -export function mergeVertices(geometry: BufferGeometry, tolerance?: number): BufferGeometry; -/** - * Returns a new indexed geometry based on `TrianglesDrawMode` draw mode. - * This mode corresponds to the `gl.TRIANGLES` primitive in WebGL. - * - * @param {BufferGeometry} geometry - The geometry to convert. - * @param {number} drawMode - The current draw mode. - * @return {BufferGeometry} The new geometry using `TrianglesDrawMode`. - */ -export function toTrianglesDrawMode(geometry: BufferGeometry, drawMode: number): BufferGeometry; -/** - * Calculates the morphed attributes of a morphed/skinned BufferGeometry. - * - * Helpful for Raytracing or Decals (i.e. a `DecalGeometry` applied to a morphed Object with a `BufferGeometry` - * will use the original `BufferGeometry`, not the morphed/skinned one, generating an incorrect result. - * Using this function to create a shadow `Object3`D the `DecalGeometry` can be correctly generated). - * - * @param {Mesh|Line|Points} object - The 3D object to compute morph attributes for. - * @return {Object} An object with original position/normal attributes and morphed ones. - */ -export function computeMorphedAttributes(object: Mesh | Line | Points): Object; -/** - * Merges the {@link BufferGeometry#groups} for the given geometry. - * - * @param {BufferGeometry} geometry - The geometry to modify. - * @return {BufferGeometry} - The updated geometry - */ -export function mergeGroups(geometry: BufferGeometry): BufferGeometry; -/** - * Modifies the supplied geometry if it is non-indexed, otherwise creates a new, - * non-indexed geometry. Returns the geometry with smooth normals everywhere except - * faces that meet at an angle greater than the crease angle. - * - * @param {BufferGeometry} geometry - The geometry to modify. - * @param {number} [creaseAngle=Math.PI/3] - The crease angle in radians. - * @return {BufferGeometry} - The updated geometry - */ -export function toCreasedNormals(geometry: BufferGeometry, creaseAngle?: number): BufferGeometry; -import { BufferGeometry } from 'three'; -import { BufferAttribute } from 'three'; -import { InterleavedBufferAttribute } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/CameraUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/CameraUtils.d.ts deleted file mode 100644 index 42813c0bf..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/utils/CameraUtils.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Set projection matrix and the orientation of a perspective camera - * to exactly frame the corners of an arbitrary rectangle. - * NOTE: This function ignores the standard parameters; - * do not call `updateProjectionMatrix()` after this. - * - * @param {PerspectiveCamera} camera - The camera. - * @param {Vector3} bottomLeftCorner - The bottom-left corner point. - * @param {Vector3} bottomRightCorner - The bottom-right corner point. - * @param {Vector3} topLeftCorner - The top-left corner point. - * @param {boolean} [estimateViewFrustum=false] - If set to `true`, the function tries to estimate the camera's FOV. - */ -export function frameCorners(camera: PerspectiveCamera, bottomLeftCorner: Vector3, bottomRightCorner: Vector3, topLeftCorner: Vector3, estimateViewFrustum?: boolean): void; -import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/ColorUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/ColorUtils.d.ts deleted file mode 100644 index fd8d570bc..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/utils/ColorUtils.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @module ColorUtils - * @three_import import * as ColorUtils from 'three/addons/utils/ColorUtils.js'; - */ -/** - * Sets the given color from a color temperature in Kelvin. - * - * Converts a correlated color temperature (CTT) to an approximate sRGB color - * using Tanner Helland's algorithm. Useful for physically-based lighting - * setups — e.g. candle flame (~1900K), tungsten bulb (~3200K), daylight - * (~6500K), or clear blue sky (~10000K). Values outside [1000, 40000] are - * clamped. - * - * Reference: https://tannerhelland.com/2012/09/18/convert-temperature-rgb-algorithm-code.html - * - * @param {Color} color - The color to set. - * @param {number} kelvin - Color temperature in Kelvin. Clamped to [1000, 40000]. - * @return {Color} The updated color. - */ -export function setKelvin(color: Color, kelvin: number): Color; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/GeometryCompressionUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/GeometryCompressionUtils.d.ts deleted file mode 100644 index 30aa1ef4b..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/utils/GeometryCompressionUtils.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @module GeometryCompressionUtils - * @three_import import * as GeometryCompressionUtils from 'three/addons/utils/GeometryCompressionUtils.js'; - */ -/** - * Compressed the given geometry's `normal` attribute by the selected encode method. - * - * @param {BufferGeometry} geometry - The geometry whose normals should be compressed. - * @param {('DEFAULT'|'OCT1Byte'|'OCT2Byte'|'ANGLES')} encodeMethod - The compression method. - */ -export function compressNormals(geometry: BufferGeometry, encodeMethod: ("DEFAULT" | "OCT1Byte" | "OCT2Byte" | "ANGLES")): void; -/** - * Compressed the given geometry's `position` attribute. - * - * @param {BufferGeometry} geometry - The geometry whose position values should be compressed. - */ -export function compressPositions(geometry: BufferGeometry): void; -/** - * Compressed the given geometry's `uv` attribute. - * - * @param {BufferGeometry} geometry - The geometry whose texture coordinates should be compressed. - */ -export function compressUvs(geometry: BufferGeometry): void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/GeometryUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/GeometryUtils.d.ts deleted file mode 100644 index a5d2f6c5e..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/utils/GeometryUtils.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * @module GeometryUtils - * @three_import import * as GeometryUtils from 'three/addons/utils/GeometryUtils.js'; - */ -/** - * Generates 2D-Coordinates along a Hilbert curve. - * - * Based on work by: {@link http://www.openprocessing.org/sketch/15493} - * - * @param {Vector3} [center] - Center of Hilbert curve. - * @param {number} [size=10] - Total width of Hilbert curve. - * @param {number} [iterations=10] - Number of subdivisions. - * @param {number} [v0=0] - Corner index -X, -Z. - * @param {number} [v1=1] - Corner index -X, +Z. - * @param {number} [v2=2] - Corner index +X, +Z. - * @param {number} [v3=3] - Corner index +X, -Z. - * @returns {Array} The Hilbert curve points. - */ -export function hilbert2D(center?: Vector3, size?: number, iterations?: number, v0?: number, v1?: number, v2?: number, v3?: number): Array; -/** - * Generates 3D-Coordinates along a Hilbert curve. - * - * Based on work by: {@link https://openprocessing.org/user/5654} - * - * @param {Vector3} [center] - Center of Hilbert curve. - * @param {number} [size=10] - Total width of Hilbert curve. - * @param {number} [iterations=1] - Number of subdivisions. - * @param {number} [v0=0] - Corner index -X, +Y, -Z. - * @param {number} [v1=1] - Corner index -X, +Y, +Z. - * @param {number} [v2=2] - Corner index -X, -Y, +Z. - * @param {number} [v3=3] - Corner index -X, -Y, -Z. - * @param {number} [v4=4] - Corner index +X, -Y, -Z. - * @param {number} [v5=5] - Corner index +X, -Y, +Z. - * @param {number} [v6=6] - Corner index +X, +Y, +Z. - * @param {number} [v7=7] - Corner index +X, +Y, -Z. - * @returns {Array} - The Hilbert curve points. - */ -export function hilbert3D(center?: Vector3, size?: number, iterations?: number, v0?: number, v1?: number, v2?: number, v3?: number, v4?: number, v5?: number, v6?: number, v7?: number): Array; -/** - * Generates a Gosper curve (lying in the XY plane). - * - * Reference: {@link https://gist.github.com/nitaku/6521802} - * - * @param {number} [size=1] - The size of a single gosper island. - * @return {Array} The gosper island points. - */ -export function gosper(size?: number): Array; -import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/LDrawUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/LDrawUtils.d.ts deleted file mode 100644 index 6345ec25f..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/utils/LDrawUtils.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Utility class for LDraw models. - * - * @three_import import { LDrawUtils } from 'three/addons/utils/LDrawUtils.js'; - */ -export class LDrawUtils { - /** - * Merges geometries in the given object by materials and returns a new group object. - * Use on not indexed geometries. The object buffers reference the old object ones. - * Special treatment is done to the conditional lines generated by LDrawLoader. - * - * @param {Object3D} object - The object to merge. - * @returns {Group} The merged object. - */ - static mergeObject(object: Object3D): Group; -} -import { Group } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/SceneOptimizer.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/SceneOptimizer.d.ts deleted file mode 100644 index e8def1ced..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/utils/SceneOptimizer.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -/** - * ~Options - */ -export type SceneOptimizer = { - /** - * - Whether to enable debug mode or not. - */ - debug?: boolean | undefined; -}; -/** - * This class can be used to optimized scenes by converting - * individual meshes into {@link BatchedMesh}. This component - * is an experimental attempt to implement auto-batching in three.js. - * - * @three_import import { SceneOptimizer } from 'three/addons/utils/SceneOptimizer.js'; - */ -export class SceneOptimizer { - /** - * Constructs a new scene optimizer. - * - * @param {Scene} scene - The scene to optimize. - * @param {SceneOptimizer~Options} options - The configuration options. - */ - constructor(scene: Scene, options?: {}); - scene: Scene; - debug: any; - _bufferToHash(buffer: any): number; - _getMaterialPropertiesHash(material: any): string; - _getAttributesSignature(geometry: any): string; - _getGeometryHash(geometry: any): string; - _getBatchKey(materialProps: any, attributesSignature: any): string; - _analyzeModel(): { - batchGroups: Map; - singleGroups: Map; - uniqueGeometries: number; - }; - _createBatchedMeshes(batchGroups: any): Set; - /** - * Removes empty nodes from all descendants of the given 3D object. - * - * @param {Object3D} object - The 3D object to process. - */ - removeEmptyNodes(object: Object3D): void; - /** - * Removes the given array of meshes from the scene. - * - * @param {Set} meshesToRemove - The meshes to remove. - */ - disposeMeshes(meshesToRemove: Set): void; - _logDebugInfo(stats: any): void; - /** - * Performs the auto-baching by identifying groups of meshes in the scene - * that can be represented as a single {@link BatchedMesh}. The method modifies - * the scene by adding instances of `BatchedMesh` and removing the now redundant - * individual meshes. - * - * @return {Scene} The optimized scene. - */ - toBatchedMesh(): Scene; - /** - * Performs the auto-instancing by identifying groups of meshes in the scene - * that can be represented as a single {@link InstancedMesh}. The method modifies - * the scene by adding instances of `InstancedMesh` and removing the now redundant - * individual meshes. - * - * This method is not yet implemented. - * - * @abstract - * @return {Scene} The optimized scene. - */ - toInstancingMesh(): Scene; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/SceneUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/SceneUtils.d.ts deleted file mode 100644 index c25850d82..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/utils/SceneUtils.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -/** - * This function creates a mesh for each instance of the given instanced mesh and - * adds it to a group. Each mesh will honor the current 3D transformation of its - * corresponding instance. - * - * @param {InstancedMesh} instancedMesh - The instanced mesh. - * @return {Group} A group of meshes. - */ -export function createMeshesFromInstancedMesh(instancedMesh: InstancedMesh): Group; -/** - * This function creates a mesh for each geometry-group of the given multi-material mesh and - * adds it to a group. - * - * @param {Mesh} mesh - The multi-material mesh. - * @return {Group} A group of meshes. - */ -export function createMeshesFromMultiMaterialMesh(mesh: Mesh): Group; -/** - * This function represents an alternative way to create 3D objects with multiple materials. - * Normally, {@link BufferGeometry#groups} are used which might introduce issues e.g. when - * exporting the object to a 3D format. This function accepts a geometry and an array of - * materials and creates for each material a mesh that is added to a group. - * - * @param {BufferGeometry} geometry - The geometry. - * @param {Array} materials - An array of materials. - * @return {Group} A group representing a multi-material object. - */ -export function createMultiMaterialObject(geometry: BufferGeometry, materials: Array): Group; -/** - * Executes a reducer function for each vertex of the given 3D object. - * `reduceVertices()` returns a single value: the function's accumulated result. - * - * @param {Object3D} object - The 3D object that should be processed. It must have a - * geometry with a `position` attribute. - * @param {function(number,Vector3):number} func - The reducer function. First argument - * is the current value, second argument the current vertex. - * @param {any} initialValue - The initial value. - * @return {any} The result. - */ -export function reduceVertices(object: Object3D, func: (arg0: number, arg1: Vector3) => number, initialValue: any): any; -/** - * Sorts the instances of the given instanced mesh. - * - * @param {InstancedMesh} mesh - The instanced mesh to sort. - * @param {function(number, number):number} compareFn - A custom compare function for the sort. - */ -export function sortInstancedMesh(mesh: InstancedMesh, compareFn: (arg0: number, arg1: number) => number): void; -/** - * Generator based alternative to {@link Object3D#traverse}. - * - * @param {Object3D} object - Object to traverse. - * @yields {Object3D} Objects that passed the filter condition. - */ -export function traverseGenerator(object: Object3D): any; -/** - * Generator based alternative to {@link Object3D#traverseVisible}. - * - * @param {Object3D} object Object to traverse. - * @yields {Object3D} Objects that passed the filter condition. - */ -export function traverseVisibleGenerator(object: Object3D): any; -/** - * Generator based alternative to {@link Object3D#traverseAncestors}. - * - * @param {Object3D} object Object to traverse. - * @yields {Object3D} Objects that passed the filter condition. - */ -export function traverseAncestorsGenerator(object: Object3D): any; -import { Group } from 'three'; -import { Mesh } from 'three'; -import { BufferGeometry } from 'three'; -import { Vector3 } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/ShadowMapViewer.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/ShadowMapViewer.d.ts deleted file mode 100644 index 868c5d524..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/utils/ShadowMapViewer.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -/** - * This is a helper for visualising a given light's shadow map. - * It works for shadow casting lights: DirectionalLight and SpotLight. - * It renders out the shadow map and displays it on a HUD. - * - * This module can only be used with {@link WebGLRenderer}. When using {@link WebGPURenderer}, - * import the class from `ShadowMapViewerGPU.js`. - * - * ```js - * const lightShadowMapViewer = new ShadowMapViewer( light ); - * lightShadowMapViewer.position.x = 10; - * lightShadowMapViewer.position.y = SCREEN_HEIGHT - ( SHADOW_MAP_HEIGHT / 4 ) - 10; - * lightShadowMapViewer.size.width = SHADOW_MAP_WIDTH / 4; - * lightShadowMapViewer.size.height = SHADOW_MAP_HEIGHT / 4; - * lightShadowMapViewer.update(); - * ``` - * - * @three_import import { ShadowMapViewer } from 'three/addons/utils/ShadowMapViewer.js'; - */ -export class ShadowMapViewer { - /** - * Constructs a new shadow map viewer. - * - * @param {Light} light - The shadow casting light. - */ - constructor(light: Light); - /** - * Whether to display the shadow map viewer or not. - * - * @type {boolean} - * @default true - */ - enabled: boolean; - /** - * The size of the viewer. When changing this property, make sure - * to call {@link ShadowMapViewer#update}. - * - * @type {{width:number,height:number}} - * @default true - */ - size: { - width: number; - height: number; - }; - /** - * The position of the viewer. When changing this property, make sure - * to call {@link ShadowMapViewer#update}. - * - * @type {{x:number,y:number, set:function(number,number)}} - * @default true - */ - position: { - x: number; - y: number; - set: (arg0: number, arg1: number) => any; - }; - /** - * Renders the viewer. This method must be called in the app's animation loop. - * - * @param {WebGLRenderer} renderer - The renderer. - */ - render: (renderer: WebGLRenderer) => void; - /** - * Resizes the viewer. This method should be called whenever the app's - * window is resized. - */ - updateForWindowResize: () => void; - /** - * Updates the viewer. - */ - update: () => void; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/ShadowMapViewerGPU.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/ShadowMapViewerGPU.d.ts deleted file mode 100644 index b32070902..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/utils/ShadowMapViewerGPU.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -/** - * This is a helper for visualising a given light's shadow map. - * It works for shadow casting lights: DirectionalLight and SpotLight. - * It renders out the shadow map and displays it on a HUD. - * - * This module can only be used with {@link WebGPURenderer}. When using {@link WebGLRenderer}, - * import the class from `ShadowMapViewer.js`. - * - * ```js - * const lightShadowMapViewer = new ShadowMapViewer( light ); - * lightShadowMapViewer.position.x = 10; - * lightShadowMapViewer.position.y = SCREEN_HEIGHT - ( SHADOW_MAP_HEIGHT / 4 ) - 10; - * lightShadowMapViewer.size.width = SHADOW_MAP_WIDTH / 4; - * lightShadowMapViewer.size.height = SHADOW_MAP_HEIGHT / 4; - * lightShadowMapViewer.update(); - * ``` - * - * @three_import import { ShadowMapViewer } from 'three/addons/utils/ShadowMapViewerGPU.js'; - */ -export class ShadowMapViewer { - /** - * Constructs a new shadow map viewer. - * - * @param {Light} light - The shadow casting light. - */ - constructor(light: Light); - /** - * Whether to display the shadow map viewer or not. - * - * @type {boolean} - * @default true - */ - enabled: boolean; - /** - * The size of the viewer. When changing this property, make sure - * to call {@link ShadowMapViewer#update}. - * - * @type {{width:number,height:number}} - * @default true - */ - size: { - width: number; - height: number; - }; - /** - * The position of the viewer. When changing this property, make sure - * to call {@link ShadowMapViewer#update}. - * - * @type {{width:number,height:number}} - * @default true - */ - position: { - width: number; - height: number; - }; - /** - * Renders the viewer. This method must be called in the app's animation loop. - * - * @param {WebGPURenderer} renderer - The renderer. - */ - render: (renderer: WebGPURenderer) => void; - /** - * Resizes the viewer. This method should be called whenever the app's - * window is resized. - */ - updateForWindowResize: () => void; - /** - * Updates the viewer. - */ - update: () => void; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/SkeletonUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/SkeletonUtils.d.ts deleted file mode 100644 index d4841dd3a..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/utils/SkeletonUtils.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * :SkeletonUtils~RetargetOptions - */ -export type module = { - /** - * - Whether to use the position of the first frame or not. - */ - useFirstFramePosition?: boolean | undefined; - /** - * - The FPS of the clip. - */ - fps?: number | undefined; - /** - * - A dictionary for mapping target to source bone names. - */ - names?: { - [x: string]: string; - } | undefined; - /** - * - A function for mapping bone names. Alternative to `names`. - */ - getBoneName?: ((arg0: string) => string) | undefined; - /** - * - Whether to trim the clip or not. If set the array should hold two values for the start and end. - */ - trim?: number[] | undefined; - /** - * - Whether to preserve bone matrices or not. - */ - preserveBoneMatrix?: boolean | undefined; - /** - * - Whether to preserve bone positions or not. - */ - preserveBonePositions?: boolean | undefined; - /** - * - Whether to use the target matrix or not. - */ - useTargetMatrix?: boolean | undefined; - /** - * - The name of the source's hip bone. - */ - hip?: string | undefined; - /** - * - The hip influence. - */ - hipInfluence?: Vector3 | undefined; - /** - * - The scale. - */ - scale?: number | undefined; - /** - * - Per-bone local offset matrices, keyed by bone name. - */ - localOffsets?: { - [x: string]: Matrix4; - } | undefined; - /** - * - An additional position offset applied to the hip bone. - */ - hipPosition?: Vector3 | undefined; -}; -/** - * Retargets the skeleton from the given source to the target. - * - * Both `target` and `source` can be a 3D object with a skeleton property (e.g. a skinned mesh) - * or a {@link Skeleton} directly. - * - * @param {Object3D|Skeleton} target - The target object. - * @param {Object3D|Skeleton} source - The source object. - * @param {module:SkeletonUtils~RetargetOptions} options - The options. - */ -export function retarget(target: Object3D | Skeleton, source: Object3D | Skeleton, options?: any): void; -/** - * Retargets the animation clip of the source to the target 3D object. - * - * The `source` can be a 3D object with a skeleton property (e.g. a skinned mesh) - * or a {@link Skeleton} directly. - * - * @param {Object3D} target - The target 3D object. Must have a `skeleton` property. - * @param {Object3D|Skeleton} source - The source object. - * @param {AnimationClip} clip - The animation clip. - * @param {module:SkeletonUtils~RetargetOptions} options - The options. - * @return {AnimationClip} The retargeted animation clip. - */ -export function retargetClip(target: Object3D, source: Object3D | Skeleton, clip: AnimationClip, options?: any): AnimationClip; -/** - * Clones the given 3D object and its descendants, ensuring that any `SkinnedMesh` instances are - * correctly associated with their bones. Bones are also cloned, and must be descendants of the - * object passed to this method. Other data, like geometries and materials, are reused by reference. - * - * @param {Object3D} source - The 3D object to clone. - * @return {Object3D} The cloned 3D object. - */ -export function clone(source: Object3D): Object3D; -import { Vector3 } from 'three'; -import { Matrix4 } from 'three'; -import { AnimationClip } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/SortUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/SortUtils.d.ts deleted file mode 100644 index c3b427e51..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/utils/SortUtils.d.ts +++ /dev/null @@ -1 +0,0 @@ -export function radixSort(arr: Array, opt: Object): void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/UVsDebug.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/UVsDebug.d.ts deleted file mode 100644 index 241f84f5f..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/utils/UVsDebug.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * @module UVsDebug - * @three_import import { UVsDebug } from 'three/addons/utils/UVsDebug.js'; - */ -/** - * Function for "unwrapping" and debugging three.js geometries UV mapping. - * - * ```js - * document.body.appendChild( UVsDebug( new THREE.SphereGeometry() ) ); - * ``` - * - * @param {BufferGeometry} geometry - The geometry whose uv coordinates should be inspected. - * @param {number} [size=1024] - The size of the debug canvas. - * @return {HTMLCanvasElement} A canvas element with visualized uv coordinates. - */ -export function UVsDebug(geometry: BufferGeometry, size?: number): HTMLCanvasElement; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/WebGLTextureUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/WebGLTextureUtils.d.ts deleted file mode 100644 index 2e39c5f77..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/utils/WebGLTextureUtils.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Returns an uncompressed version of the given compressed texture. - * - * This module can only be used with {@link WebGLRenderer}. When using {@link WebGPURenderer}, - * import the function from {@link WebGPUTextureUtils}. - * - * @param {CompressedTexture} texture - The compressed texture. - * @param {number} [maxTextureSize=Infinity] - The maximum size of the uncompressed texture. - * @param {?WebGLRenderer} [renderer=null] - A reference to a renderer. - * @return {CanvasTexture} The uncompressed texture. - */ -export function decompress(texture: CompressedTexture, maxTextureSize?: number, renderer?: WebGLRenderer | null): CanvasTexture; -import { WebGLRenderer } from 'three'; -import { CanvasTexture } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/WebGPUTextureUtils.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/WebGPUTextureUtils.d.ts deleted file mode 100644 index 24b790efc..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/utils/WebGPUTextureUtils.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Returns an uncompressed version of the given compressed texture. - * - * This module can only be used with {@link WebGPURenderer}. When using {@link WebGLRenderer}, - * import the function from {@link WebGLTextureUtils}. - * - * @async - * @param {CompressedTexture} blitTexture - The compressed texture. - * @param {number} [maxTextureSize=Infinity] - The maximum size of the uncompressed texture. - * @param {?WebGPURenderer} [renderer=null] - A reference to a renderer. - * @return {Promise} A Promise that resolved with the uncompressed texture. - */ -export function decompress(blitTexture: CompressedTexture, maxTextureSize?: number, renderer?: WebGPURenderer | null): Promise; -import { WebGPURenderer } from 'three/webgpu'; -import { CanvasTexture } from 'three/webgpu'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/utils/WorkerPool.d.ts b/jsdoc-testing/jsdoc/examples/jsm/utils/WorkerPool.d.ts deleted file mode 100644 index 054151041..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/utils/WorkerPool.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -/** - * A simple pool for managing Web Workers. - * - * @three_import import { WorkerPool } from 'three/addons/utils/WorkerPool.js'; - */ -export class WorkerPool { - /** - * Constructs a new Worker pool. - * - * @param {number} [pool=4] - The size of the pool. - */ - constructor(pool?: number); - /** - * The size of the pool. - * - * @type {number} - * @default 4 - */ - pool: number; - /** - * A message queue. - * - * @type {Array} - */ - queue: Array; - /** - * An array of Workers. - * - * @type {Array} - */ - workers: Array; - /** - * An array with resolve functions for messages. - * - * @type {Array} - */ - workersResolve: Array; - /** - * The current worker status. - * - * @type {number} - */ - workerStatus: number; - /** - * A factory function for creating workers. - * - * @type {?Function} - */ - workerCreator: Function | null; - _initWorker(workerId: any): void; - _getIdleWorker(): number; - _onMessage(workerId: any, msg: any): void; - /** - * Sets a function that is responsible for creating Workers. - * - * @param {Function} workerCreator - The worker creator function. - */ - setWorkerCreator(workerCreator: Function): void; - /** - * Sets the Worker limit - * - * @param {number} pool - The size of the pool. - */ - setWorkerLimit(pool: number): void; - /** - * Post a message to an idle Worker. If no Worker is available, - * the message is pushed into a message queue for later processing. - * - * @param {Object} msg - The message. - * @param {Array} transfer - An array with array buffers for data transfer. - * @return {Promise} A Promise that resolves when the message has been processed. - */ - postMessage(msg: Object, transfer: Array): Promise; - /** - * Terminates all Workers of this pool. Call this method whenever this - * Worker pool is no longer used in your app. - */ - dispose(): void; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/ARButton.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/ARButton.d.ts deleted file mode 100644 index 64886c1b3..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/webxr/ARButton.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * A utility class for creating a button that allows to initiate - * immersive AR sessions based on WebXR. The button can be created - * with a factory method and then appended to the website's DOM. - * - * ```js - * document.body.appendChild( ARButton.createButton( renderer ) ); - * ``` - * - * @hideconstructor - * @three_import import { ARButton } from 'three/addons/webxr/ARButton.js'; - */ -export class ARButton { - /** - * Constructs a new AR button. - * - * @param {WebGLRenderer|WebGPURenderer} renderer - The renderer. - * @param {XRSessionInit} [sessionInit] - The a configuration object for the AR session. - * @return {HTMLElement} The button or an error message if `immersive-ar` isn't supported. - */ - static createButton(renderer: WebGLRenderer | WebGPURenderer, sessionInit?: XRSessionInit): HTMLElement; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/OculusHandModel.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/OculusHandModel.d.ts deleted file mode 100644 index 7d8e29631..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/webxr/OculusHandModel.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Represents an Oculus hand model. - * - * @augments Object3D - * @three_import import { OculusHandModel } from 'three/addons/webxr/OculusHandModel.js'; - */ -export class OculusHandModel extends Object3D { - /** - * Constructs a new Oculus hand model. - * - * @param {Group} controller - The hand controller. - * @param {?Loader} [loader=null] - A loader that is used to load hand models. - * @param {?Function} [onLoad=null] - A callback that is executed when a hand model has been loaded. - */ - constructor(controller: Group, loader?: Loader | null, onLoad?: Function | null); - /** - * The hand controller. - * - * @type {Group} - */ - controller: Group; - /** - * The motion controller. - * - * @type {?MotionController} - * @default null - */ - motionController: MotionController | null; - /** - * The model's environment map. - * - * @type {?Texture} - * @default null - */ - envMap: Texture | null; - /** - * A loader that is used to load hand models. - * - * @type {?Loader} - * @default null - */ - loader: Loader | null; - /** - * A callback that is executed when a hand model has been loaded. - * - * @type {?Function} - * @default null - */ - onLoad: Function | null; - /** - * The path to the model repository. - * - * @type {?string} - * @default null - */ - path: string | null; - /** - * The model mesh. - * - * @type {Mesh} - * @default null - */ - mesh: Mesh; - xrInputSource: any; - /** - * Returns the pointer position which is the position of the index finger tip. - * - * @return {?Vector3} The pointer position. Returns `null` if not index finger tip joint was found. - */ - getPointerPosition(): Vector3 | null; - /** - * Returns `true` if the current pointer position (the index finger tip) intersections - * with the given box object. - * - * @param {Mesh} boxObject - The box object. - * @return {boolean} Whether an intersection was found or not. - */ - intersectBoxObject(boxObject: Mesh): boolean; - /** - * Executed actions depending on the interaction state with - * the given button. - * - * @param {Object} button - The button. - */ - checkButton(button: Object): void; -} -import { Object3D } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/OculusHandPointerModel.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/OculusHandPointerModel.d.ts deleted file mode 100644 index 4eed6ebf5..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/webxr/OculusHandPointerModel.d.ts +++ /dev/null @@ -1,151 +0,0 @@ -/** - * Represents an Oculus hand pointer model. - * - * @augments Object3D - * @three_import import { OculusHandPointerModel } from 'three/addons/webxr/OculusHandPointerModel.js'; - */ -export class OculusHandPointerModel extends Object3D { - /** - * Constructs a new Oculus hand model. - * - * @param {Group} hand - The hand controller. - * @param {Group} controller - The WebXR controller in target ray space. - */ - constructor(hand: Group, controller: Group); - /** - * The hand controller. - * - * @type {Group} - */ - hand: Group; - /** - * The WebXR controller in target ray space. - * - * @type {Group} - */ - controller: Group; - motionController: any; - envMap: any; - mesh: any; - /** - * The pointer geometry. - * - * @type {?BufferGeometry} - * @default null - */ - pointerGeometry: BufferGeometry | null; - /** - * The pointer mesh. - * - * @type {?Mesh} - * @default null - */ - pointerMesh: Mesh | null; - /** - * The pointer object that holds the pointer mesh. - * - * @type {?Object3D} - * @default null - */ - pointerObject: Object3D | null; - /** - * Whether the model is pinched or not. - * - * @type {?boolean} - * @default false - */ - pinched: boolean | null; - /** - * Whether the model is attached or not. - * - * @type {boolean} - * @default false - */ - attached: boolean; - /** - * The cursor object. - * - * @type {?Mesh} - * @default null - */ - cursorObject: Mesh | null; - /** - * The internal raycaster used for detecting - * intersections. - * - * @type {?Raycaster} - * @default null - */ - raycaster: Raycaster | null; - _onConnected(event: any): void; - _onDisconnected(): void; - xrInputSource: any; - _drawVerticesRing(vertices: any, baseVector: any, ringIndex: any): void; - _updatePointerVertices(rearRadius: any): void; - /** - * Creates a pointer mesh and adds it to this model. - */ - createPointer(): void; - _updateRaycaster(): void; - _updatePointer(): void; - /** - * Returns `true` is the model is pinched. - * - * @return {boolean} Whether the model is pinched or not. - */ - isPinched(): boolean; - /** - * Sets the attached state. - * - * @param {boolean} attached - Whether the model is attached or not. - */ - setAttached(attached: boolean): void; - /** - * Returns `true` is the model is attached. - * - * @return {boolean} Whether the model is attached or not. - */ - isAttached(): boolean; - /** - * Performs an intersection test with the model's raycaster and the given object. - * - * @param {Object3D} object - The 3D object to check for intersection with the ray. - * @param {boolean} [recursive=true] - If set to `true`, it also checks all descendants. - * Otherwise it only checks intersection with the object. - * @return {Array} An array holding the intersection points. - */ - intersectObject(object: Object3D, recursive?: boolean): Array; - /** - * Performs an intersection test with the model's raycaster and the given objects. - * - * @param {Array} objects - The 3D objects to check for intersection with the ray. - * @param {boolean} [recursive=true] - If set to `true`, it also checks all descendants. - * Otherwise it only checks intersection with the object. - * @return {Array} An array holding the intersection points. - */ - intersectObjects(objects: Array, recursive?: boolean): Array; - /** - * Checks for intersections between the model's raycaster and the given objects. The method - * updates the cursor object to the intersection point. - * - * @param {Array} objects - The 3D objects to check for intersection with the ray. - * @param {boolean} [recursive=false] - If set to `true`, it also checks all descendants. - * Otherwise it only checks intersection with the object. - */ - checkIntersections(objects: Array, recursive?: boolean): void; - /** - * Sets the cursor to the given distance. - * - * @param {number} distance - The distance to set the cursor to. - */ - setCursor(distance: number): void; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { Object3D } from 'three'; -import { BufferGeometry } from 'three'; -import { Mesh } from 'three'; -import { Raycaster } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/Text2D.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/Text2D.d.ts deleted file mode 100644 index 4101f890c..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/webxr/Text2D.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * @module Text2D - * @three_import import * as Text2D from 'three/addons/webxr/Text2D.js'; - */ -/** - * A helper function for creating a simple plane mesh - * that can be used as a text label. The mesh's material - * holds a canvas texture that displays the given message. - * - * @param {string} message - The message to display. - * @param {number} height - The labels height. - * @return {Mesh} The plane mesh representing a text label. - */ -export function createText(message: string, height: number): Mesh; -import { Mesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/VRButton.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/VRButton.d.ts deleted file mode 100644 index 5901f3ec3..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/webxr/VRButton.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -/** - * A utility class for creating a button that allows to initiate - * immersive VR sessions based on WebXR. The button can be created - * with a factory method and then appended ot the website's DOM. - * - * ```js - * document.body.appendChild( VRButton.createButton( renderer ) ); - * ``` - * - * @hideconstructor - * @three_import import { VRButton } from 'three/addons/webxr/VRButton.js'; - */ -export class VRButton { - /** - * Constructs a new VR button. - * - * @param {WebGLRenderer|WebGPURenderer} renderer - The renderer. - * @param {XRSessionInit} [sessionInit] - The a configuration object for the AR session. - * @return {HTMLElement} The button or an error message if `immersive-ar` isn't supported. - */ - static createButton(renderer: WebGLRenderer | WebGPURenderer, sessionInit?: XRSessionInit): HTMLElement; - /** - * Registers a `sessiongranted` event listener. When a session is granted, the {@link VRButton#xrSessionIsGranted} - * flag will evaluate to `true`. This method is automatically called by the module itself so there - * should be no need to use it on app level. - */ - static registerSessionGrantedListener(): void; -} -export namespace VRButton { - let xrSessionIsGranted: boolean; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/WebGLXRFallback.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/WebGLXRFallback.d.ts deleted file mode 100644 index 113ff7df3..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/webxr/WebGLXRFallback.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Sets up a construction-time WebGL fallback for WebGPU XR examples. - * - * @param {WebGPURenderer} renderer - The initial renderer. - * @param {Function} createFallbackRenderer - A function that returns a new renderer with a WebGL backend. - * @param {Function} onFallback - A function that installs the new renderer in the app. - */ -export function setupWebGLXRFallback(renderer: WebGPURenderer, createFallbackRenderer: Function, onFallback?: Function): void; diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/XRButton.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/XRButton.d.ts deleted file mode 100644 index ad3f844b1..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/webxr/XRButton.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * A utility class for creating a button that allows to initiate - * immersive XR sessions based on WebXR. The button can be created - * with a factory method and then appended ot the website's DOM. - * - * ```js - * document.body.appendChild( XRButton.createButton( renderer ) ); - * ``` - * - * Compared to {@link ARButton} and {@link VRButton}, this class will - * try to offer an immersive AR session first. If the device does not - * support this type of session, it uses an immersive VR session. - * - * @hideconstructor - * @three_import import { XRButton } from 'three/addons/webxr/XRButton.js'; - */ -export class XRButton { - /** - * Constructs a new XR button. - * - * @param {WebGLRenderer|WebGPURenderer} renderer - The renderer. - * @param {XRSessionInit} [sessionInit] - The a configuration object for the AR session. - * @return {HTMLElement} The button or an error message if WebXR isn't supported. - */ - static createButton(renderer: WebGLRenderer | WebGPURenderer, sessionInit?: XRSessionInit): HTMLElement; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/XRControllerModelFactory.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/XRControllerModelFactory.d.ts deleted file mode 100644 index b4a44651c..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/webxr/XRControllerModelFactory.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Allows to create controller models for WebXR controllers that can be added as a visual - * representation to your scene. `XRControllerModelFactory` will automatically fetch controller - * models that match what the user is holding as closely as possible. The models should be - * attached to the object returned from getControllerGrip in order to match the orientation of - * the held device. - * - * This module depends on the [motion-controllers](https://github.com/immersive-web/webxr-input-profiles/blob/main/packages/motion-controllers/README.md) - * third-part library. - * - * ```js - * const controllerModelFactory = new XRControllerModelFactory(); - * - * const controllerGrip = renderer.xr.getControllerGrip( 0 ); - * controllerGrip.add( controllerModelFactory.createControllerModel( controllerGrip ) ); - * scene.add( controllerGrip ); - * ``` - * - * @three_import import { XRControllerModelFactory } from 'three/addons/webxr/XRControllerModelFactory.js'; - */ -export class XRControllerModelFactory { - /** - * Constructs a new XR controller model factory. - * - * @param {?GLTFLoader} [gltfLoader=null] - A glTF loader that is used to load controller models. - * @param {?Function} [onLoad=null] - A callback that is executed when a controller model has been loaded. - */ - constructor(gltfLoader?: GLTFLoader | null, onLoad?: Function | null); - /** - * A glTF loader that is used to load controller models. - * - * @type {?GLTFLoader} - * @default null - */ - gltfLoader: GLTFLoader | null; - /** - * The path to the model repository. - * - * @type {string} - */ - path: string; - _assetCache: {}; - /** - * A callback that is executed when a controller model has been loaded. - * - * @type {?Function} - * @default null - */ - onLoad: Function | null; - /** - * Sets the path to the model repository. - * - * @param {string} path - The path to set. - * @return {XRControllerModelFactory} A reference to this instance. - */ - setPath(path: string): XRControllerModelFactory; - /** - * Creates a controller model for the given WebXR controller. - * - * @param {Group} controller - The controller. - * @return {XRControllerModel} The XR controller model. - */ - createControllerModel(controller: Group): XRControllerModel; -} -import { GLTFLoader } from '../loaders/GLTFLoader.js'; -/** - * Represents a XR controller model. - * - * @augments Object3D - */ -declare class XRControllerModel extends Object3D { - /** - * The motion controller. - * - * @type {?MotionController} - * @default null - */ - motionController: MotionController | null; - /** - * The controller's environment map. - * - * @type {?Texture} - * @default null - */ - envMap: Texture | null; - /** - * Sets an environment map that is applied to the controller model. - * - * @param {?Texture} envMap - The environment map to apply. - * @return {XRControllerModel} A reference to this instance. - */ - setEnvironmentMap(envMap: Texture | null): XRControllerModel; -} -import { Object3D } from 'three'; -import { MotionController } from '../libs/motion-controllers.module.js'; -export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/XREstimatedLight.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/XREstimatedLight.d.ts deleted file mode 100644 index 6e67a9aa0..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/webxr/XREstimatedLight.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * This class can be used to represent the environmental light of - * a XR session. It relies on the WebXR Lighting Estimation API. - * - * @augments Group - * @three_import import { XREstimatedLight } from 'three/addons/webxr/XREstimatedLight.js'; - */ -export class XREstimatedLight extends Group { - /** - * Constructs a new light. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {boolean} [environmentEstimation=true] - Whether to use environment estimation or not. - */ - constructor(renderer: WebGLRenderer, environmentEstimation?: boolean); - /** - * The light probe that represents the estimated light. - * - * @type {LightProbe} - */ - lightProbe: LightProbe; - /** - * Represents the primary light from the XR environment. - * - * @type {DirectionalLight} - */ - directionalLight: DirectionalLight; - /** - * Will be set to a cube map in the SessionLightProbe if environment estimation is - * available and requested. - * - * @type {?Texture} - * @default null - */ - environment: Texture | null; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose: () => void; -} -import { Group } from 'three'; -import { LightProbe } from 'three'; -import { DirectionalLight } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandMeshModel.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandMeshModel.d.ts deleted file mode 100644 index 7cb18fa25..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandMeshModel.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Represents one of the hand model types {@link XRHandModelFactory} might produce - * depending on the selected profile. `XRHandMeshModel` represents a hand with a - * custom asset. - * - * @three_import import { XRHandMeshModel } from 'three/addons/webxr/XRHandMeshModel.js'; - */ -export class XRHandMeshModel { - /** - * Constructs a new XR hand mesh model. - * - * @param {XRHandModel} handModel - The hand model. - * @param {Group} controller - The WebXR controller. - * @param {?string} path - The model path. - * @param {XRHandedness} handedness - The handedness of the XR input source. - * @param {?Loader} [loader=null] - The loader. If not provided, an instance of `GLTFLoader` will be used to load models. - * @param {?Function} [onLoad=null] - A callback that is executed when a controller model has been loaded. - * @param {?Object} [customCache=null] - An optional shared cache object for storing and reusing loaded assets across instances. - */ - constructor(handModel: XRHandModel, controller: Group, path: string | null, handedness: XRHandedness, loader?: Loader | null, onLoad?: Function | null, customCache?: Object | null); - /** - * The WebXR controller. - * - * @type {Group} - */ - controller: Group; - /** - * The hand model. - * - * @type {XRHandModel} - */ - handModel: XRHandModel; - /** - * An array of bones representing the bones - * of the hand skeleton. - * - * @type {Array} - */ - bones: Array; - /** - * Updates the mesh based on the tracked XR joints data. - */ - updateMesh(): void; -} diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandModelFactory.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandModelFactory.d.ts deleted file mode 100644 index 720ee0cd7..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandModelFactory.d.ts +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Similar to {@link XRControllerModelFactory}, this class allows to create hand models - * for WebXR controllers that can be added as a visual representation to your scene. - * - * ```js - * const handModelFactory = new XRHandModelFactory(); - * - * const hand = renderer.xr.getHand( 0 ); - * hand.add( handModelFactory.createHandModel( hand ) ); - * scene.add( hand ); - * ``` - * - * @three_import import { XRHandModelFactory } from 'three/addons/webxr/XRHandModelFactory.js'; - */ -export class XRHandModelFactory { - /** - * Constructs a new XR hand model factory. - * - * @param {?GLTFLoader} [gltfLoader=null] - A glTF loader that is used to load hand models. - * @param {?Function} [onLoad=null] - A callback that is executed when a hand model has been loaded. - */ - constructor(gltfLoader?: GLTFLoader | null, onLoad?: Function | null); - /** - * A glTF loader that is used to load hand models. - * - * @type {?GLTFLoader} - * @default null - */ - gltfLoader: GLTFLoader | null; - /** - * The path to the model repository. - * - * @type {?string} - * @default null - */ - path: string | null; - _assetCache: {}; - /** - * A callback that is executed when a hand model has been loaded. - * - * @type {?Function} - * @default null - */ - onLoad: Function | null; - /** - * Sets the path to the hand model repository. - * - * @param {string} path - The path to set. - * @return {XRHandModelFactory} A reference to this instance. - */ - setPath(path: string): XRHandModelFactory; - /** - * Creates a controller model for the given WebXR hand controller. - * - * @param {Group} controller - The hand controller. - * @param {('spheres'|'boxes'|'mesh')} [profile] - The model profile that defines the model type. - * @return {XRHandModel} The XR hand model. - */ - createHandModel(controller: Group, profile?: ("spheres" | "boxes" | "mesh")): XRHandModel; -} -/** - * Represents a XR hand model. - * - * @augments Object3D - */ -declare class XRHandModel extends Object3D { - /** - * Constructs a new XR hand model. - * - * @param {Group} controller - The hand controller. - */ - constructor(controller: Group); - /** - * The hand controller. - * - * @type {Group} - */ - controller: Group; - /** - * The motion controller. - * - * @type {?MotionController} - * @default null - */ - motionController: MotionController | null; - /** - * The controller's environment map. - * - * @type {?Texture} - * @default null - */ - envMap: Texture | null; - /** - * The model mesh. - * - * @type {Mesh} - * @default null - */ - mesh: Mesh; -} -import { Object3D } from 'three'; -export {}; diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandPrimitiveModel.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandPrimitiveModel.d.ts deleted file mode 100644 index fbe6ed543..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/webxr/XRHandPrimitiveModel.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * ~Options - */ -export type XRHandPrimitiveModel = { - /** - * - The primitive type. - */ - primitive?: "sphere" | "box" | undefined; -}; -/** - * Represents one of the hand model types {@link XRHandModelFactory} might produce - * depending on the selected profile. `XRHandPrimitiveModel` represents a hand - * with sphere or box primitives according to the selected `primitive` option. - * - * @three_import import { XRHandPrimitiveModel } from 'three/addons/webxr/XRHandPrimitiveModel.js'; - */ -export class XRHandPrimitiveModel { - /** - * Constructs a new XR hand primitive model. - * - * @param {XRHandModel} handModel - The hand model. - * @param {Group} controller - The WebXR controller. - * @param {string} path - The model path. - * @param {XRHandedness} handedness - The handedness of the XR input source. - * @param {XRHandPrimitiveModel~Options} options - The model options. - */ - constructor(handModel: XRHandModel, controller: Group, path: string, handedness: XRHandedness, options: any); - /** - * The WebXR controller. - * - * @type {Group} - */ - controller: Group; - /** - * The hand model. - * - * @type {XRHandModel} - */ - handModel: XRHandModel; - /** - * The model's environment map. - * - * @type {?Texture} - * @default null - */ - envMap: Texture | null; - handMesh: InstancedMesh; - joints: string[]; - /** - * Updates the mesh based on the tracked XR joints data. - */ - updateMesh(): void; -} -import { InstancedMesh } from 'three'; diff --git a/jsdoc-testing/jsdoc/examples/jsm/webxr/XRPlanes.d.ts b/jsdoc-testing/jsdoc/examples/jsm/webxr/XRPlanes.d.ts deleted file mode 100644 index de818107d..000000000 --- a/jsdoc-testing/jsdoc/examples/jsm/webxr/XRPlanes.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * A utility class for the WebXR Plane Detection Module. If planes - * are detected by WebXR, this class will automatically add them - * as thin box meshes to the scene when below code snippet is used. - * - * ```js - * const planes = new XRPlanes( renderer ); - * scene.add( planes ); - * ``` - * - * @augments Object3D - * @three_import import { XRPlanes } from 'three/addons/webxr/XRPlanes.js'; - */ -export class XRPlanes extends Object3D { - /** - * Constructs a new XR plane container. - * - * @param {WebGLRenderer|WebGPURenderer} renderer - The renderer. - */ - constructor(renderer: WebGLRenderer | WebGPURenderer); -} -import { Object3D } from 'three'; diff --git a/jsdoc-testing/jsdoc/src/Three.Core.d.ts b/jsdoc-testing/jsdoc/src/Three.Core.d.ts deleted file mode 100644 index 035a14a67..000000000 --- a/jsdoc-testing/jsdoc/src/Three.Core.d.ts +++ /dev/null @@ -1,162 +0,0 @@ -export { WebGLArrayRenderTarget } from "./renderers/WebGLArrayRenderTarget.js"; -export { WebGL3DRenderTarget } from "./renderers/WebGL3DRenderTarget.js"; -export { WebGLRenderTarget } from "./renderers/WebGLRenderTarget.js"; -export { WebXRController } from "./renderers/webxr/WebXRController.js"; -export { FogExp2 } from "./scenes/FogExp2.js"; -export { Fog } from "./scenes/Fog.js"; -export { Scene } from "./scenes/Scene.js"; -export { Sprite } from "./objects/Sprite.js"; -export { LOD } from "./objects/LOD.js"; -export { SkinnedMesh } from "./objects/SkinnedMesh.js"; -export { Skeleton } from "./objects/Skeleton.js"; -export { Bone } from "./objects/Bone.js"; -export { Mesh } from "./objects/Mesh.js"; -export { InstancedMesh } from "./objects/InstancedMesh.js"; -export { BatchedMesh } from "./objects/BatchedMesh.js"; -export { LineSegments } from "./objects/LineSegments.js"; -export { LineLoop } from "./objects/LineLoop.js"; -export { Line } from "./objects/Line.js"; -export { Points } from "./objects/Points.js"; -export { Group } from "./objects/Group.js"; -export { VideoTexture } from "./textures/VideoTexture.js"; -export { VideoFrameTexture } from "./textures/VideoFrameTexture.js"; -export { FramebufferTexture } from "./textures/FramebufferTexture.js"; -export { Source } from "./textures/Source.js"; -export { DataTexture } from "./textures/DataTexture.js"; -export { DataArrayTexture } from "./textures/DataArrayTexture.js"; -export { Data3DTexture } from "./textures/Data3DTexture.js"; -export { CompressedTexture } from "./textures/CompressedTexture.js"; -export { CompressedArrayTexture } from "./textures/CompressedArrayTexture.js"; -export { CompressedCubeTexture } from "./textures/CompressedCubeTexture.js"; -export { CubeTexture } from "./textures/CubeTexture.js"; -export { CanvasTexture } from "./textures/CanvasTexture.js"; -export { HTMLTexture } from "./textures/HTMLTexture.js"; -export { DepthTexture } from "./textures/DepthTexture.js"; -export { CubeDepthTexture } from "./textures/CubeDepthTexture.js"; -export { ExternalTexture } from "./textures/ExternalTexture.js"; -export { Texture } from "./textures/Texture.js"; -export * from "./geometries/Geometries.js"; -export * from "./materials/Materials.js"; -export * from "./core/BufferAttribute.js"; -export * from "./extras/curves/Curves.js"; -export * from "./constants.js"; -export * from "./Three.Legacy.js"; -export { AnimationLoader } from "./loaders/AnimationLoader.js"; -export { CompressedTextureLoader } from "./loaders/CompressedTextureLoader.js"; -export { CubeTextureLoader } from "./loaders/CubeTextureLoader.js"; -export { DataTextureLoader } from "./loaders/DataTextureLoader.js"; -export { TextureLoader } from "./loaders/TextureLoader.js"; -export { ObjectLoader } from "./loaders/ObjectLoader.js"; -export { MaterialLoader } from "./loaders/MaterialLoader.js"; -export { BufferGeometryLoader } from "./loaders/BufferGeometryLoader.js"; -export { ImageLoader } from "./loaders/ImageLoader.js"; -export { ImageBitmapLoader } from "./loaders/ImageBitmapLoader.js"; -export { FileLoader } from "./loaders/FileLoader.js"; -export { Loader } from "./loaders/Loader.js"; -export { LoaderUtils } from "./loaders/LoaderUtils.js"; -export { Cache } from "./loaders/Cache.js"; -export { AudioLoader } from "./loaders/AudioLoader.js"; -export { SpotLight } from "./lights/SpotLight.js"; -export { PointLight } from "./lights/PointLight.js"; -export { RectAreaLight } from "./lights/RectAreaLight.js"; -export { HemisphereLight } from "./lights/HemisphereLight.js"; -export { DirectionalLight } from "./lights/DirectionalLight.js"; -export { AmbientLight } from "./lights/AmbientLight.js"; -export { Light } from "./lights/Light.js"; -export { LightProbe } from "./lights/LightProbe.js"; -export { StereoCamera } from "./cameras/StereoCamera.js"; -export { PerspectiveCamera } from "./cameras/PerspectiveCamera.js"; -export { OrthographicCamera } from "./cameras/OrthographicCamera.js"; -export { CubeCamera } from "./cameras/CubeCamera.js"; -export { ArrayCamera } from "./cameras/ArrayCamera.js"; -export { Camera } from "./cameras/Camera.js"; -export { AudioListener } from "./audio/AudioListener.js"; -export { PositionalAudio } from "./audio/PositionalAudio.js"; -export { AudioContext } from "./audio/AudioContext.js"; -export { AudioAnalyser } from "./audio/AudioAnalyser.js"; -export { Audio } from "./audio/Audio.js"; -export { VectorKeyframeTrack } from "./animation/tracks/VectorKeyframeTrack.js"; -export { StringKeyframeTrack } from "./animation/tracks/StringKeyframeTrack.js"; -export { QuaternionKeyframeTrack } from "./animation/tracks/QuaternionKeyframeTrack.js"; -export { NumberKeyframeTrack } from "./animation/tracks/NumberKeyframeTrack.js"; -export { ColorKeyframeTrack } from "./animation/tracks/ColorKeyframeTrack.js"; -export { BooleanKeyframeTrack } from "./animation/tracks/BooleanKeyframeTrack.js"; -export { PropertyMixer } from "./animation/PropertyMixer.js"; -export { PropertyBinding } from "./animation/PropertyBinding.js"; -export { KeyframeTrack } from "./animation/KeyframeTrack.js"; -export { AnimationUtils } from "./animation/AnimationUtils.js"; -export { AnimationObjectGroup } from "./animation/AnimationObjectGroup.js"; -export { AnimationMixer } from "./animation/AnimationMixer.js"; -export { AnimationClip } from "./animation/AnimationClip.js"; -export { AnimationAction } from "./animation/AnimationAction.js"; -export { RenderTarget } from "./core/RenderTarget.js"; -export { RenderTarget3D } from "./core/RenderTarget3D.js"; -export { Uniform } from "./core/Uniform.js"; -export { UniformsGroup } from "./core/UniformsGroup.js"; -export { InstancedBufferGeometry } from "./core/InstancedBufferGeometry.js"; -export { BufferGeometry } from "./core/BufferGeometry.js"; -export { InterleavedBufferAttribute } from "./core/InterleavedBufferAttribute.js"; -export { InstancedInterleavedBuffer } from "./core/InstancedInterleavedBuffer.js"; -export { InterleavedBuffer } from "./core/InterleavedBuffer.js"; -export { InstancedBufferAttribute } from "./core/InstancedBufferAttribute.js"; -export { GLBufferAttribute } from "./core/GLBufferAttribute.js"; -export { Object3D } from "./core/Object3D.js"; -export { Raycaster } from "./core/Raycaster.js"; -export { Layers } from "./core/Layers.js"; -export { EventDispatcher } from "./core/EventDispatcher.js"; -export { Clock } from "./core/Clock.js"; -export { Timer } from "./core/Timer.js"; -export { QuaternionLinearInterpolant } from "./math/interpolants/QuaternionLinearInterpolant.js"; -export { LinearInterpolant } from "./math/interpolants/LinearInterpolant.js"; -export { DiscreteInterpolant } from "./math/interpolants/DiscreteInterpolant.js"; -export { CubicInterpolant } from "./math/interpolants/CubicInterpolant.js"; -export { BezierInterpolant } from "./math/interpolants/BezierInterpolant.js"; -export { Interpolant } from "./math/Interpolant.js"; -export { Triangle } from "./math/Triangle.js"; -export { MathUtils } from "./math/MathUtils.js"; -export { Spherical } from "./math/Spherical.js"; -export { Cylindrical } from "./math/Cylindrical.js"; -export { Plane } from "./math/Plane.js"; -export { Frustum } from "./math/Frustum.js"; -export { FrustumArray } from "./math/FrustumArray.js"; -export { Sphere } from "./math/Sphere.js"; -export { Ray } from "./math/Ray.js"; -export { Matrix4 } from "./math/Matrix4.js"; -export { Matrix3 } from "./math/Matrix3.js"; -export { Matrix2 } from "./math/Matrix2.js"; -export { Box3 } from "./math/Box3.js"; -export { Box2 } from "./math/Box2.js"; -export { Line3 } from "./math/Line3.js"; -export { Euler } from "./math/Euler.js"; -export { Vector4 } from "./math/Vector4.js"; -export { Vector3 } from "./math/Vector3.js"; -export { Vector2 } from "./math/Vector2.js"; -export { Quaternion } from "./math/Quaternion.js"; -export { Color } from "./math/Color.js"; -export { ColorManagement } from "./math/ColorManagement.js"; -export { SphericalHarmonics3 } from "./math/SphericalHarmonics3.js"; -export { SpotLightHelper } from "./helpers/SpotLightHelper.js"; -export { SkeletonHelper } from "./helpers/SkeletonHelper.js"; -export { PointLightHelper } from "./helpers/PointLightHelper.js"; -export { HemisphereLightHelper } from "./helpers/HemisphereLightHelper.js"; -export { GridHelper } from "./helpers/GridHelper.js"; -export { PolarGridHelper } from "./helpers/PolarGridHelper.js"; -export { DirectionalLightHelper } from "./helpers/DirectionalLightHelper.js"; -export { CameraHelper } from "./helpers/CameraHelper.js"; -export { BoxHelper } from "./helpers/BoxHelper.js"; -export { Box3Helper } from "./helpers/Box3Helper.js"; -export { PlaneHelper } from "./helpers/PlaneHelper.js"; -export { ArrowHelper } from "./helpers/ArrowHelper.js"; -export { AxesHelper } from "./helpers/AxesHelper.js"; -export { Shape } from "./extras/core/Shape.js"; -export { Path } from "./extras/core/Path.js"; -export { ShapePath } from "./extras/core/ShapePath.js"; -export { CurvePath } from "./extras/core/CurvePath.js"; -export { Curve } from "./extras/core/Curve.js"; -export { Controls } from "./extras/Controls.js"; -export { DataUtils } from "./extras/DataUtils.js"; -export { ImageUtils } from "./extras/ImageUtils.js"; -export { ShapeUtils } from "./extras/ShapeUtils.js"; -export { TextureUtils } from "./extras/TextureUtils.js"; -export { DefaultLoadingManager, LoadingManager } from "./loaders/LoadingManager.js"; -export { createCanvasElement, setConsoleFunction, getConsoleFunction, log, warn, error, warnOnce } from "./utils.js"; diff --git a/jsdoc-testing/jsdoc/src/Three.Legacy.d.ts b/jsdoc-testing/jsdoc/src/Three.Legacy.d.ts deleted file mode 100644 index cb0ff5c3b..000000000 --- a/jsdoc-testing/jsdoc/src/Three.Legacy.d.ts +++ /dev/null @@ -1 +0,0 @@ -export {}; diff --git a/jsdoc-testing/jsdoc/src/Three.WebGPU.Nodes.d.ts b/jsdoc-testing/jsdoc/src/Three.WebGPU.Nodes.d.ts deleted file mode 100644 index dd82de32b..000000000 --- a/jsdoc-testing/jsdoc/src/Three.WebGPU.Nodes.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export * from "./Three.Core.js"; -export * from "./materials/nodes/NodeMaterials.js"; -export * from "./nodes/Nodes.js"; -export { default as WebGPURenderer } from "./renderers/webgpu/WebGPURenderer.Nodes.js"; -export { default as WebGPUBackend } from "./renderers/webgpu/WebGPUBackend.js"; -export { default as WebGLBackend } from "./renderers/webgl-fallback/WebGLBackend.js"; -export { default as Lighting } from "./renderers/common/Lighting.js"; -export { default as BundleGroup } from "./renderers/common/BundleGroup.js"; -export { default as QuadMesh } from "./renderers/common/QuadMesh.js"; -export { default as PMREMGenerator } from "./renderers/common/extras/PMREMGenerator.js"; -export { default as RenderPipeline } from "./renderers/common/RenderPipeline.js"; -export { default as PostProcessing } from "./renderers/common/PostProcessing.js"; -export { default as ReadbackBuffer } from "./renderers/common/ReadbackBuffer.js"; -export { default as StorageTexture } from "./renderers/common/StorageTexture.js"; -export { default as StorageBufferAttribute } from "./renderers/common/StorageBufferAttribute.js"; -export { default as StorageInstancedBufferAttribute } from "./renderers/common/StorageInstancedBufferAttribute.js"; -export { default as IndirectStorageBufferAttribute } from "./renderers/common/IndirectStorageBufferAttribute.js"; -export { default as IESSpotLight } from "./lights/webgpu/IESSpotLight.js"; -export { default as ProjectorLight } from "./lights/webgpu/ProjectorLight.js"; -export { default as NodeLoader } from "./loaders/nodes/NodeLoader.js"; -export { default as NodeObjectLoader } from "./loaders/nodes/NodeObjectLoader.js"; -export { default as NodeMaterialLoader } from "./loaders/nodes/NodeMaterialLoader.js"; -export { default as InspectorBase } from "./renderers/common/InspectorBase.js"; -export { default as CanvasTarget } from "./renderers/common/CanvasTarget.js"; -export { default as BlendMode } from "./renderers/common/BlendMode.js"; -export { ClippingGroup } from "./objects/ClippingGroup.js"; -import * as RendererUtils from './renderers/common/RendererUtils.js'; -import * as TSL from './nodes/TSL.js'; -export { RendererUtils, TSL }; diff --git a/jsdoc-testing/jsdoc/src/Three.WebGPU.d.ts b/jsdoc-testing/jsdoc/src/Three.WebGPU.d.ts deleted file mode 100644 index 4cc27bf85..000000000 --- a/jsdoc-testing/jsdoc/src/Three.WebGPU.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -export * from "./Three.Core.js"; -export * from "./materials/nodes/NodeMaterials.js"; -export * from "./nodes/Nodes.js"; -export { default as WebGPURenderer } from "./renderers/webgpu/WebGPURenderer.js"; -export { default as WebGPUBackend } from "./renderers/webgpu/WebGPUBackend.js"; -export { default as WebGLBackend } from "./renderers/webgl-fallback/WebGLBackend.js"; -export { default as WebGLCapabilities } from "./renderers/webgl-fallback/utils/WebGLCapabilities.js"; -export { default as Lighting } from "./renderers/common/Lighting.js"; -export { default as BundleGroup } from "./renderers/common/BundleGroup.js"; -export { default as QuadMesh } from "./renderers/common/QuadMesh.js"; -export { default as PMREMGenerator } from "./renderers/common/extras/PMREMGenerator.js"; -export { default as RenderPipeline } from "./renderers/common/RenderPipeline.js"; -export { default as PostProcessing } from "./renderers/common/PostProcessing.js"; -export { default as ReadbackBuffer } from "./renderers/common/ReadbackBuffer.js"; -export { default as CubeRenderTarget } from "./renderers/common/CubeRenderTarget.js"; -export { default as StorageTexture } from "./renderers/common/StorageTexture.js"; -export { default as Storage3DTexture } from "./renderers/common/Storage3DTexture.js"; -export { default as StorageArrayTexture } from "./renderers/common/StorageArrayTexture.js"; -export { default as StorageBufferAttribute } from "./renderers/common/StorageBufferAttribute.js"; -export { default as StorageInstancedBufferAttribute } from "./renderers/common/StorageInstancedBufferAttribute.js"; -export { default as IndirectStorageBufferAttribute } from "./renderers/common/IndirectStorageBufferAttribute.js"; -export { default as IESSpotLight } from "./lights/webgpu/IESSpotLight.js"; -export { default as ProjectorLight } from "./lights/webgpu/ProjectorLight.js"; -export { default as NodeLoader } from "./loaders/nodes/NodeLoader.js"; -export { default as NodeObjectLoader } from "./loaders/nodes/NodeObjectLoader.js"; -export { default as NodeMaterialLoader } from "./loaders/nodes/NodeMaterialLoader.js"; -export { default as InspectorBase } from "./renderers/common/InspectorBase.js"; -export { default as CanvasTarget } from "./renderers/common/CanvasTarget.js"; -export { default as BlendMode } from "./renderers/common/BlendMode.js"; -export { default as GLSLNodeBuilder } from "./renderers/webgl-fallback/nodes/GLSLNodeBuilder.js"; -export { default as BasicNodeLibrary } from "./renderers/webgpu/nodes/BasicNodeLibrary.js"; -export { ClippingGroup } from "./objects/ClippingGroup.js"; -import * as RendererUtils from './renderers/common/RendererUtils.js'; -import * as TSL from './nodes/TSL.js'; -export { RendererUtils, TSL }; diff --git a/jsdoc-testing/jsdoc/src/Three.d.ts b/jsdoc-testing/jsdoc/src/Three.d.ts deleted file mode 100644 index 3c8c6cd87..000000000 --- a/jsdoc-testing/jsdoc/src/Three.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export * from "./Three.Core.js"; -export { WebGLRenderer } from "./renderers/WebGLRenderer.js"; -export { WebGLCubeRenderTarget } from "./renderers/WebGLCubeRenderTarget.js"; -export { ShaderLib } from "./renderers/shaders/ShaderLib.js"; -export { UniformsLib } from "./renderers/shaders/UniformsLib.js"; -export { UniformsUtils } from "./renderers/shaders/UniformsUtils.js"; -export { ShaderChunk } from "./renderers/shaders/ShaderChunk.js"; -export { PMREMGenerator } from "./extras/PMREMGenerator.js"; -export { WebGLUtils } from "./renderers/webgl/WebGLUtils.js"; diff --git a/jsdoc-testing/jsdoc/src/animation/AnimationAction.d.ts b/jsdoc-testing/jsdoc/src/animation/AnimationAction.d.ts deleted file mode 100644 index 543005806..000000000 --- a/jsdoc-testing/jsdoc/src/animation/AnimationAction.d.ts +++ /dev/null @@ -1,311 +0,0 @@ -/** - * An instance of `AnimationAction` schedules the playback of an animation which is - * stored in {@link AnimationClip}. - */ -export class AnimationAction { - /** - * Constructs a new animation action. - * - * @param {AnimationMixer} mixer - The mixer that is controlled by this action. - * @param {AnimationClip} clip - The animation clip that holds the actual keyframes. - * @param {?Object3D} [localRoot=null] - The root object on which this action is performed. - * @param {(NormalAnimationBlendMode|AdditiveAnimationBlendMode)} [blendMode] - The blend mode. - */ - constructor(mixer: AnimationMixer, clip: AnimationClip, localRoot?: Object3D | null, blendMode?: (number | number)); - _mixer: AnimationMixer; - _clip: AnimationClip; - _localRoot: any; - /** - * Defines how the animation is blended/combined when two or more animations - * are simultaneously played. - * - * @type {(NormalAnimationBlendMode|AdditiveAnimationBlendMode)} - */ - blendMode: (number | number); - _interpolantSettings: { - endingStart: number; - endingEnd: number; - }; - _interpolants: any[]; - _propertyBindings: any[]; - _cacheIndex: any; - _byClipCacheIndex: any; - _timeScaleInterpolant: any; - _restoreTimeScale: number | null; - _weightInterpolant: any; - /** - * The loop mode, set via {@link AnimationAction#setLoop}. - * - * @type {(LoopRepeat|LoopOnce|LoopPingPong)} - * @default LoopRepeat - */ - loop: (number | number | number); - _loopCount: number; - _startTime: number | null; - /** - * The local time of this action (in seconds, starting with `0`). - * - * The value gets clamped or wrapped to `[0,clip.duration]` (according to the - * loop state). - * - * @type {number} - * @default Infinity - */ - time: number; - /** - * Scaling factor for the {@link AnimationAction#time}. A value of `0` causes the - * animation to pause. Negative values cause the animation to play backwards. - * - * @type {number} - * @default 1 - */ - timeScale: number; - _effectiveTimeScale: number; - /** - * The degree of influence of this action (in the interval `[0, 1]`). Values - * between `0` (no impact) and `1` (full impact) can be used to blend between - * several actions. - * - * @type {number} - * @default 1 - */ - weight: number; - _effectiveWeight: number; - /** - * The number of repetitions of the performed clip over the course of this action. - * Can be set via {@link AnimationAction#setLoop}. - * - * Setting this number has no effect if {@link AnimationAction#loop} is set to - * `THREE:LoopOnce`. - * - * @type {number} - * @default Infinity - */ - repetitions: number; - /** - * If set to `true`, the playback of the action is paused. - * - * @type {boolean} - * @default false - */ - paused: boolean; - /** - * If set to `false`, the action is disabled so it has no impact. - * - * When the action is re-enabled, the animation continues from its current - * time (setting `enabled` to `false` doesn't reset the action). - * - * @type {boolean} - * @default true - */ - enabled: boolean; - /** - * If set to true the animation will automatically be paused on its last frame. - * - * If set to false, {@link AnimationAction#enabled} will automatically be switched - * to `false` when the last loop of the action has finished, so that this action has - * no further impact. - * - * Note: This member has no impact if the action is interrupted (it - * has only an effect if its last loop has really finished). - * - * @type {boolean} - * @default false - */ - clampWhenFinished: boolean; - /** - * Enables smooth interpolation without separate clips for start, loop and end. - * - * @type {boolean} - * @default true - */ - zeroSlopeAtStart: boolean; - /** - * Enables smooth interpolation without separate clips for start, loop and end. - * - * @type {boolean} - * @default true - */ - zeroSlopeAtEnd: boolean; - /** - * Starts the playback of the animation. - * - * @return {AnimationAction} A reference to this animation action. - */ - play(): AnimationAction; - /** - * Stops the playback of the animation. - * - * @return {AnimationAction} A reference to this animation action. - */ - stop(): AnimationAction; - /** - * Resets the playback of the animation. - * - * @return {AnimationAction} A reference to this animation action. - */ - reset(): AnimationAction; - /** - * Returns `true` if the animation is running. - * - * @return {boolean} Whether the animation is running or not. - */ - isRunning(): boolean; - /** - * Returns `true` when {@link AnimationAction#play} has been called. - * - * @return {boolean} Whether the animation is scheduled or not. - */ - isScheduled(): boolean; - /** - * Defines the time when the animation should start. - * - * @param {number} time - The start time in seconds. - * @return {AnimationAction} A reference to this animation action. - */ - startAt(time: number): AnimationAction; - /** - * Configures the loop settings for this action. - * - * @param {(LoopRepeat|LoopOnce|LoopPingPong)} mode - The loop mode. - * @param {number} repetitions - The number of repetitions. - * @return {AnimationAction} A reference to this animation action. - */ - setLoop(mode: (number | number | number), repetitions: number): AnimationAction; - /** - * Sets the effective weight of this action. - * - * An action has no effect and thus an effective weight of zero when the - * action is disabled. - * - * @param {number} weight - The weight to set. - * @return {AnimationAction} A reference to this animation action. - */ - setEffectiveWeight(weight: number): AnimationAction; - /** - * Returns the effective weight of this action. - * - * @return {number} The effective weight. - */ - getEffectiveWeight(): number; - /** - * Fades the animation in by increasing its weight gradually from `0` to `1`, - * within the passed time interval. - * - * @param {number} duration - The duration of the fade. - * @return {AnimationAction} A reference to this animation action. - */ - fadeIn(duration: number): AnimationAction; - /** - * Fades the animation out by decreasing its weight gradually from `1` to `0`, - * within the passed time interval. - * - * @param {number} duration - The duration of the fade. - * @return {AnimationAction} A reference to this animation action. - */ - fadeOut(duration: number): AnimationAction; - /** - * Causes this action to fade in and the given action to fade out, - * within the passed time interval. - * - * @param {AnimationAction} fadeOutAction - The animation action to fade out. - * @param {number} duration - The duration of the fade. - * @param {boolean} [warp=false] - Whether warping should be used or not. - * @return {AnimationAction} A reference to this animation action. - */ - crossFadeFrom(fadeOutAction: AnimationAction, duration: number, warp?: boolean): AnimationAction; - /** - * Causes this action to fade out and the given action to fade in, - * within the passed time interval. - * - * @param {AnimationAction} fadeInAction - The animation action to fade in. - * @param {number} duration - The duration of the fade. - * @param {boolean} [warp=false] - Whether warping should be used or not. - * @return {AnimationAction} A reference to this animation action. - */ - crossFadeTo(fadeInAction: AnimationAction, duration: number, warp?: boolean): AnimationAction; - /** - * Stops any fading which is applied to this action. - * - * @return {AnimationAction} A reference to this animation action. - */ - stopFading(): AnimationAction; - /** - * Sets the effective time scale of this action. - * - * An action has no effect and thus an effective time scale of zero when the - * action is paused. - * - * @param {number} timeScale - The time scale to set. - * @return {AnimationAction} A reference to this animation action. - */ - setEffectiveTimeScale(timeScale: number): AnimationAction; - /** - * Returns the effective time scale of this action. - * - * @return {number} The effective time scale. - */ - getEffectiveTimeScale(): number; - /** - * Sets the duration for a single loop of this action. - * - * @param {number} duration - The duration to set. - * @return {AnimationAction} A reference to this animation action. - */ - setDuration(duration: number): AnimationAction; - /** - * Synchronizes this action with the passed other action. - * - * @param {AnimationAction} action - The action to sync with. - * @return {AnimationAction} A reference to this animation action. - */ - syncWith(action: AnimationAction): AnimationAction; - /** - * Decelerates this animation's speed to `0` within the passed time interval. - * - * @param {number} duration - The duration. - * @return {AnimationAction} A reference to this animation action. - */ - halt(duration: number): AnimationAction; - /** - * Changes the playback speed, within the passed time interval, by modifying - * {@link AnimationAction#timeScale} gradually from `startTimeScale` to - * `endTimeScale`. - * - * @param {number} startTimeScale - The start time scale. - * @param {number} endTimeScale - The end time scale. - * @param {number} duration - The duration. - * @return {AnimationAction} A reference to this animation action. - */ - warp(startTimeScale: number, endTimeScale: number, duration: number): AnimationAction; - /** - * Stops any scheduled warping which is applied to this action. - * - * @return {AnimationAction} A reference to this animation action. - */ - stopWarping(): AnimationAction; - /** - * Returns the animation mixer of this animation action. - * - * @return {AnimationMixer} The animation mixer. - */ - getMixer(): AnimationMixer; - /** - * Returns the animation clip of this animation action. - * - * @return {AnimationClip} The animation clip. - */ - getClip(): AnimationClip; - /** - * Returns the root object of this animation action. - * - * @return {Object3D} The root object. - */ - getRoot(): Object3D; - _update(time: any, deltaTime: any, timeDirection: any, accuIndex: any): void; - _updateWeight(time: any): number; - _updateTimeScale(time: any): number; - _updateTime(deltaTime: any): any; - _setEndings(atStart: any, atEnd: any, pingPong: any): void; - _scheduleFading(duration: any, weightNow: any, weightThen: any): this; -} diff --git a/jsdoc-testing/jsdoc/src/animation/AnimationClip.d.ts b/jsdoc-testing/jsdoc/src/animation/AnimationClip.d.ts deleted file mode 100644 index 23194681c..000000000 --- a/jsdoc-testing/jsdoc/src/animation/AnimationClip.d.ts +++ /dev/null @@ -1,154 +0,0 @@ -/** - * A reusable set of keyframe tracks which represent an animation. - */ -export class AnimationClip { - /** - * Factory method for creating an animation clip from the given JSON. - * - * @static - * @param {Object} json - The serialized animation clip. - * @return {AnimationClip} The new animation clip. - */ - static parse(json: Object): AnimationClip; - /** - * Serializes the given animation clip into JSON. - * - * @static - * @param {AnimationClip} clip - The animation clip to serialize. - * @return {Object} The JSON object. - */ - static toJSON(clip: AnimationClip): Object; - /** - * Returns a new animation clip from the passed morph targets array of a - * geometry, taking a name and the number of frames per second. - * - * Note: The fps parameter is required, but the animation speed can be - * overridden via {@link AnimationAction#setDuration}. - * - * @static - * @param {string} name - The name of the animation clip. - * @param {Array} morphTargetSequence - A sequence of morph targets. - * @param {number} fps - The Frames-Per-Second value. - * @param {boolean} noLoop - Whether the clip should be no loop or not. - * @return {AnimationClip} The new animation clip. - */ - static CreateFromMorphTargetSequence(name: string, morphTargetSequence: Array, fps: number, noLoop: boolean): AnimationClip; - /** - * Searches for an animation clip by name, taking as its first parameter - * either an array of clips, or a mesh or geometry that contains an - * array named "animations" property. - * - * @static - * @param {(Array|Object3D)} objectOrClipArray - The array or object to search through. - * @param {string} name - The name to search for. - * @return {?AnimationClip} The found animation clip. Returns `null` if no clip has been found. - */ - static findByName(objectOrClipArray: (Array | Object3D), name: string): AnimationClip | null; - /** - * Returns an array of new AnimationClips created from the morph target - * sequences of a geometry, trying to sort morph target names into - * animation-group-based patterns like "Walk_001, Walk_002, Run_001, Run_002...". - * - * See {@link MD2Loader#parse} as an example for how the method should be used. - * - * @static - * @param {Array} morphTargets - A sequence of morph targets. - * @param {number} fps - The Frames-Per-Second value. - * @param {boolean} noLoop - Whether the clip should be no loop or not. - * @return {Array} An array of new animation clips. - */ - static CreateClipsFromMorphTargetSequences(morphTargets: Array, fps: number, noLoop: boolean): Array; - /** - * Constructs a new animation clip. - * - * Note: Instead of instantiating an AnimationClip directly with the constructor, you can - * use the static interface of this class for creating clips. In most cases though, animation clips - * will automatically be created by loaders when importing animated 3D assets. - * - * @param {string} [name=''] - The clip's name. - * @param {number} [duration=-1] - The clip's duration in seconds. If a negative value is passed, - * the duration will be calculated from the passed keyframes. - * @param {Array} tracks - An array of keyframe tracks. - * @param {(NormalAnimationBlendMode|AdditiveAnimationBlendMode)} [blendMode=NormalAnimationBlendMode] - Defines how the animation - * is blended/combined when two or more animations are simultaneously played. - */ - constructor(name?: string, duration?: number, tracks?: Array, blendMode?: (number | AdditiveAnimationBlendMode)); - /** - * The clip's name. - * - * @type {string} - */ - name: string; - /** - * An array of keyframe tracks. - * - * @type {Array} - */ - tracks: Array; - /** - * The clip's duration in seconds. - * - * @type {number} - */ - duration: number; - /** - * Defines how the animation is blended/combined when two or more animations - * are simultaneously played. - * - * @type {(NormalAnimationBlendMode|AdditiveAnimationBlendMode)} - */ - blendMode: (number | AdditiveAnimationBlendMode); - /** - * The UUID of the animation clip. - * - * @type {string} - * @readonly - */ - readonly uuid: string; - /** - * An object that can be used to store custom data about the animation clip. - * It should not hold references to functions as these will not be cloned. - * - * @type {Object} - */ - userData: Object; - /** - * Sets the duration of this clip to the duration of its longest keyframe track. - * - * @return {AnimationClip} A reference to this animation clip. - */ - resetDuration(): AnimationClip; - /** - * Trims all tracks to the clip's duration. - * - * @return {AnimationClip} A reference to this animation clip. - */ - trim(): AnimationClip; - /** - * Performs minimal validation on each track in the clip. Returns `true` if all - * tracks are valid. - * - * @return {boolean} Whether the clip's keyframes are valid or not. - */ - validate(): boolean; - /** - * Optimizes each track by removing equivalent sequential keys (which are - * common in morph target sequences). - * - * @return {AnimationClip} A reference to this animation clip. - */ - optimize(): AnimationClip; - /** - * Returns a new animation clip with copied values from this instance. - * - * @return {AnimationClip} A clone of this instance. - */ - clone(): AnimationClip; - /** - * Serializes this animation clip into JSON. - * - * @return {Object} The JSON object. - */ - toJSON(): Object; -} -import { KeyframeTrack } from './KeyframeTrack.js'; diff --git a/jsdoc-testing/jsdoc/src/animation/AnimationMixer.d.ts b/jsdoc-testing/jsdoc/src/animation/AnimationMixer.d.ts deleted file mode 100644 index b474470e7..000000000 --- a/jsdoc-testing/jsdoc/src/animation/AnimationMixer.d.ts +++ /dev/null @@ -1,152 +0,0 @@ -/** - * `AnimationMixer` is a player for animations on a particular object in - * the scene. When multiple objects in the scene are animated independently, - * one `AnimationMixer` may be used for each object. - */ -export class AnimationMixer extends EventDispatcher { - /** - * Constructs a new animation mixer. - * - * @param {Object3D} root - The object whose animations shall be played by this mixer. - */ - constructor(root: Object3D); - _root: Object3D; - _accuIndex: number; - /** - * The global mixer time (in seconds; starting with `0` on the mixer's creation). - * - * @type {number} - * @default 0 - */ - time: number; - /** - * A scaling factor for the global time. - * - * Note: Setting this member to `0` and later back to `1` is a - * possibility to pause/unpause all actions that are controlled by this - * mixer. - * - * @type {number} - * @default 1 - */ - timeScale: number; - _bindAction(action: any, prototypeAction: any): void; - _activateAction(action: any): void; - _deactivateAction(action: any): void; - _initMemoryManager(): void; - _actions: any[] | undefined; - _nActiveActions: number | undefined; - _actionsByClip: {} | undefined; - _bindings: any[] | undefined; - _nActiveBindings: number | undefined; - _bindingsByRootAndName: {} | undefined; - _controlInterpolants: any[] | undefined; - _nActiveControlInterpolants: number | undefined; - stats: { - actions: { - readonly total: number; - readonly inUse: number | undefined; - }; - bindings: { - readonly total: number; - readonly inUse: number | undefined; - }; - controlInterpolants: { - readonly total: number; - readonly inUse: number | undefined; - }; - } | undefined; - _isActiveAction(action: any): boolean; - _addInactiveAction(action: any, clipUuid: any, rootUuid: any): void; - _removeInactiveAction(action: any): void; - _removeInactiveBindingsForAction(action: any): void; - _lendAction(action: any): void; - _takeBackAction(action: any): void; - _addInactiveBinding(binding: any, rootUuid: any, trackName: any): void; - _removeInactiveBinding(binding: any): void; - _lendBinding(binding: any): void; - _takeBackBinding(binding: any): void; - _lendControlInterpolant(): any; - _takeBackControlInterpolant(interpolant: any): void; - /** - * Returns an instance of {@link AnimationAction} for the passed clip. - * - * If an action fitting the clip and root parameters doesn't yet exist, it - * will be created by this method. Calling this method several times with the - * same clip and root parameters always returns the same action. - * - * @param {AnimationClip|string} clip - An animation clip or alternatively the name of the animation clip. - * @param {Object3D} [optionalRoot] - An alternative root object. - * @param {(NormalAnimationBlendMode|AdditiveAnimationBlendMode)} [blendMode] - The blend mode. - * @return {?AnimationAction} The animation action. - */ - clipAction(clip: AnimationClip | string, optionalRoot?: Object3D, blendMode?: (number | AdditiveAnimationBlendMode)): AnimationAction | null; - /** - * Returns an existing animation action for the passed clip. - * - * @param {AnimationClip|string} clip - An animation clip or alternatively the name of the animation clip. - * @param {Object3D} [optionalRoot] - An alternative root object. - * @return {?AnimationAction} The animation action. Returns `null` if no action was found. - */ - existingAction(clip: AnimationClip | string, optionalRoot?: Object3D): AnimationAction | null; - /** - * Deactivates all previously scheduled actions on this mixer. - * - * @return {AnimationMixer} A reference to this animation mixer. - */ - stopAllAction(): AnimationMixer; - /** - * Advances the global mixer time and updates the animation. - * - * This is usually done in the render loop by passing the delta - * time from {@link Clock} or {@link Timer}. - * - * @param {number} deltaTime - The delta time in seconds. - * @return {AnimationMixer} A reference to this animation mixer. - */ - update(deltaTime: number): AnimationMixer; - /** - * Sets the global mixer to a specific time and updates the animation accordingly. - * - * This is useful when you need to jump to an exact time in an animation. The - * input parameter will be scaled by {@link AnimationMixer#timeScale} - * - * @param {number} time - The time to set in seconds. - * @return {AnimationMixer} A reference to this animation mixer. - */ - setTime(time: number): AnimationMixer; - /** - * Returns this mixer's root object. - * - * @return {Object3D} The mixer's root object. - */ - getRoot(): Object3D; - /** - * Deallocates all memory resources for a clip. Before using this method make - * sure to call {@link AnimationAction#stop} for all related actions. - * - * @param {AnimationClip} clip - The clip to uncache. - */ - uncacheClip(clip: AnimationClip): void; - /** - * Deallocates all memory resources for a root object. Before using this - * method make sure to call {@link AnimationAction#stop} for all related - * actions or alternatively {@link AnimationMixer#stopAllAction} when the - * mixer operates on a single root. - * - * @param {Object3D} root - The root object to uncache. - */ - uncacheRoot(root: Object3D): void; - /** - * Deallocates all memory resources for an action. The action is identified by the - * given clip and an optional root object. Before using this method make - * sure to call {@link AnimationAction#stop} to deactivate the action. - * - * @param {AnimationClip|string} clip - An animation clip or alternatively the name of the animation clip. - * @param {Object3D} [optionalRoot] - An alternative root object. - */ - uncacheAction(clip: AnimationClip | string, optionalRoot?: Object3D): void; -} -import { EventDispatcher } from '../core/EventDispatcher.js'; -import { AnimationClip } from './AnimationClip.js'; -import { AnimationAction } from './AnimationAction.js'; diff --git a/jsdoc-testing/jsdoc/src/animation/AnimationObjectGroup.d.ts b/jsdoc-testing/jsdoc/src/animation/AnimationObjectGroup.d.ts deleted file mode 100644 index 040c4af5c..000000000 --- a/jsdoc-testing/jsdoc/src/animation/AnimationObjectGroup.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -/** - * A group of objects that receives a shared animation state. - * - * Usage: - * - * - Add objects you would otherwise pass as 'root' to the - * constructor or the .clipAction method of AnimationMixer. - * - Instead pass this object as 'root'. - * - You can also add and remove objects later when the mixer is running. - * - * Note: - * - * - Objects of this class appear as one object to the mixer, - * so cache control of the individual objects must be done on the group. - * - * Limitation: - * - * - The animated properties must be compatible among the all objects in the group. - * - A single property can either be controlled through a target group or directly, but not both. - */ -export class AnimationObjectGroup { - /** - * Constructs a new animation group. - * - * @param {...Object3D} arguments - An arbitrary number of 3D objects that share the same animation state. - */ - constructor(...args: Object3D[]); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isAnimationObjectGroup: boolean; - /** - * The UUID of the 3D object. - * - * @type {string} - * @readonly - */ - readonly uuid: string; - _objects: any[]; - nCachedObjects_: number; - _indicesByUUID: {}; - _paths: any[]; - _parsedPaths: any[]; - _bindings: any[]; - _bindingsIndicesByPath: {}; - stats: { - objects: { - readonly total: number; - readonly inUse: number; - }; - readonly bindingsPerObject: number; - }; - /** - * Adds an arbitrary number of objects to this animation group. - * - * @param {...Object3D} arguments - The 3D objects to add. - */ - add(...args: Object3D[]): void; - /** - * Removes an arbitrary number of objects to this animation group - * - * @param {...Object3D} arguments - The 3D objects to remove. - */ - remove(...args: Object3D[]): void; - /** - * Deallocates all memory resources for the passed 3D objects of this animation group. - * - * @param {...Object3D} arguments - The 3D objects to uncache. - */ - uncache(...args: Object3D[]): void; - subscribe_(path: any, parsedPath: any): any; - unsubscribe_(path: any): void; -} diff --git a/jsdoc-testing/jsdoc/src/animation/AnimationUtils.d.ts b/jsdoc-testing/jsdoc/src/animation/AnimationUtils.d.ts deleted file mode 100644 index 7355fe037..000000000 --- a/jsdoc-testing/jsdoc/src/animation/AnimationUtils.d.ts +++ /dev/null @@ -1,131 +0,0 @@ -/** - * Converts an array to a specific type. - * - * @param {TypedArray|Array} array - The array to convert. - * @param {TypedArray.constructor} type - The constructor of a typed array that defines the new type. - * @return {TypedArray} The converted array. - */ -export function convertArray(array: TypedArray | any[], type: TypedArray.constructor): TypedArray; -import { isTypedArray } from '../utils.js'; -/** - * Returns an array by which times and values can be sorted. - * - * @param {Array} times - The keyframe time values. - * @return {Array} The array. - */ -export function getKeyframeOrder(times: Array): Array; -/** - * Sorts the given array by the previously computed order via `getKeyframeOrder()`. - * - * @param {Array} values - The values to sort. - * @param {number} stride - The stride. - * @param {Array} order - The sort order. - * @return {Array} The sorted values. - */ -export function sortedArray(values: Array, stride: number, order: Array): Array; -/** - * Used for parsing AOS keyframe formats. - * - * @param {Array} jsonKeys - A list of JSON keyframes. - * @param {Array} times - This array will be filled with keyframe times by this function. - * @param {Array} values - This array will be filled with keyframe values by this function. - * @param {string} valuePropertyName - The name of the property to use. - */ -export function flattenJSON(jsonKeys: Array, times: Array, values: Array, valuePropertyName: string): void; -/** - * Creates a new clip, containing only the segment of the original clip between the given frames. - * - * @param {AnimationClip} sourceClip - The values to sort. - * @param {string} name - The name of the clip. - * @param {number} startFrame - The start frame. - * @param {number} endFrame - The end frame. - * @param {number} [fps=30] - The FPS. - * @return {AnimationClip} The new sub clip. - */ -export function subclip(sourceClip: AnimationClip, name: string, startFrame: number, endFrame: number, fps?: number): AnimationClip; -/** - * Converts the keyframes of the given animation clip to an additive format. - * - * @param {AnimationClip} targetClip - The clip to make additive. - * @param {number} [referenceFrame=0] - The reference frame. - * @param {AnimationClip} [referenceClip=targetClip] - The reference clip. - * @param {number} [fps=30] - The FPS. - * @return {AnimationClip} The updated clip which is now additive. - */ -export function makeClipAdditive(targetClip: AnimationClip, referenceFrame?: number, referenceClip?: AnimationClip, fps?: number): AnimationClip; -/** - * A class with various methods to assist with animations. - * - * @hideconstructor - */ -export class AnimationUtils { - /** - * Converts an array to a specific type - * - * @static - * @param {TypedArray|Array} array - The array to convert. - * @param {TypedArray.constructor} type - The constructor of a type array. - * @return {TypedArray} The converted array - */ - static convertArray(array: TypedArray | any[], type: TypedArray.constructor): TypedArray; - /** - * Returns `true` if the given object is a typed array. - * - * @static - * @param {any} object - The object to check. - * @return {boolean} Whether the given object is a typed array. - */ - static isTypedArray(object: any): boolean; - /** - * Returns an array by which times and values can be sorted. - * - * @static - * @param {Array} times - The keyframe time values. - * @return {Array} The array. - */ - static getKeyframeOrder(times: Array): Array; - /** - * Sorts the given array by the previously computed order via `getKeyframeOrder()`. - * - * @static - * @param {Array} values - The values to sort. - * @param {number} stride - The stride. - * @param {Array} order - The sort order. - * @return {Array} The sorted values. - */ - static sortedArray(values: Array, stride: number, order: Array): Array; - /** - * Used for parsing AOS keyframe formats. - * - * @static - * @param {Array} jsonKeys - A list of JSON keyframes. - * @param {Array} times - This array will be filled with keyframe times by this method. - * @param {Array} values - This array will be filled with keyframe values by this method. - * @param {string} valuePropertyName - The name of the property to use. - */ - static flattenJSON(jsonKeys: Array, times: Array, values: Array, valuePropertyName: string): void; - /** - * Creates a new clip, containing only the segment of the original clip between the given frames. - * - * @static - * @param {AnimationClip} sourceClip - The values to sort. - * @param {string} name - The name of the clip. - * @param {number} startFrame - The start frame. - * @param {number} endFrame - The end frame. - * @param {number} [fps=30] - The FPS. - * @return {AnimationClip} The new sub clip. - */ - static subclip(sourceClip: AnimationClip, name: string, startFrame: number, endFrame: number, fps?: number): AnimationClip; - /** - * Converts the keyframes of the given animation clip to an additive format. - * - * @static - * @param {AnimationClip} targetClip - The clip to make additive. - * @param {number} [referenceFrame=0] - The reference frame. - * @param {AnimationClip} [referenceClip=targetClip] - The reference clip. - * @param {number} [fps=30] - The FPS. - * @return {AnimationClip} The updated clip which is now additive. - */ - static makeClipAdditive(targetClip: AnimationClip, referenceFrame?: number, referenceClip?: AnimationClip, fps?: number): AnimationClip; -} -export { isTypedArray }; diff --git a/jsdoc-testing/jsdoc/src/animation/KeyframeTrack.d.ts b/jsdoc-testing/jsdoc/src/animation/KeyframeTrack.d.ts deleted file mode 100644 index 72239e7a2..000000000 --- a/jsdoc-testing/jsdoc/src/animation/KeyframeTrack.d.ts +++ /dev/null @@ -1,178 +0,0 @@ -/** - * Represents a timed sequence of keyframes, which are composed of lists of - * times and related values, and which are used to animate a specific property - * of an object. - */ -export class KeyframeTrack { - /** - * Converts the keyframe track to JSON. - * - * @static - * @param {KeyframeTrack} track - The keyframe track to serialize. - * @return {Object} The serialized keyframe track as JSON. - */ - static toJSON(track: KeyframeTrack): Object; - /** - * Constructs a new keyframe track. - * - * @param {string} name - The keyframe track's name. - * @param {Array} times - A list of keyframe times. - * @param {Array} values - A list of keyframe values. - * @param {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth|InterpolateBezier)} [interpolation] - The interpolation type. - */ - constructor(name: string, times: Array, values: Array, interpolation?: (number | number | number | number)); - /** - * The track's name can refer to morph targets or bones or - * possibly other values within an animated object. See {@link PropertyBinding#parseTrackName} - * for the forms of strings that can be parsed for property binding. - * - * @type {string} - */ - name: string; - /** - * The keyframe times. - * - * @type {Float32Array} - */ - times: Float32Array; - /** - * The keyframe values. - * - * @type {Float32Array} - */ - values: Float32Array; - /** - * Factory method for creating a new discrete interpolant. - * - * @static - * @param {TypedArray} [result] - The result buffer. - * @return {DiscreteInterpolant} The new interpolant. - */ - InterpolantFactoryMethodDiscrete(result?: TypedArray): DiscreteInterpolant; - /** - * Factory method for creating a new linear interpolant. - * - * @static - * @param {TypedArray} [result] - The result buffer. - * @return {LinearInterpolant} The new interpolant. - */ - InterpolantFactoryMethodLinear(result?: TypedArray): LinearInterpolant; - /** - * Factory method for creating a new smooth interpolant. - * - * @static - * @param {TypedArray} [result] - The result buffer. - * @return {CubicInterpolant} The new interpolant. - */ - InterpolantFactoryMethodSmooth(result?: TypedArray): CubicInterpolant; - /** - * Factory method for creating a new Bezier interpolant. - * - * The Bezier interpolant requires tangent data to be set via the `settings` property - * on the track before creating the interpolant. The settings should contain: - * - `inTangents`: Float32Array with [time, value] pairs per keyframe per component - * - `outTangents`: Float32Array with [time, value] pairs per keyframe per component - * - * @static - * @param {TypedArray} [result] - The result buffer. - * @return {BezierInterpolant} The new interpolant. - */ - InterpolantFactoryMethodBezier(result?: TypedArray): BezierInterpolant; - /** - * Defines the interpolation factor method for this keyframe track. - * - * @param {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth|InterpolateBezier)} interpolation - The interpolation type. - * @return {KeyframeTrack} A reference to this keyframe track. - */ - setInterpolation(interpolation: (number | number | number | number)): KeyframeTrack; - createInterpolant: ((result?: TypedArray) => LinearInterpolant) | ((result?: TypedArray) => CubicInterpolant) | undefined; - /** - * Returns the current interpolation type. - * - * @return {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth|InterpolateBezier)} The interpolation type. - */ - getInterpolation(): (number | number | number | number); - /** - * Returns the value size. - * - * @return {number} The value size. - */ - getValueSize(): number; - /** - * Moves all keyframes either forward or backward in time. - * - * @param {number} timeOffset - The offset to move the time values. - * @return {KeyframeTrack} A reference to this keyframe track. - */ - shift(timeOffset: number): KeyframeTrack; - /** - * Scale all keyframe times by a factor (useful for frame - seconds conversions). - * - * @param {number} timeScale - The time scale. - * @return {KeyframeTrack} A reference to this keyframe track. - */ - scale(timeScale: number): KeyframeTrack; - /** - * Removes keyframes before and after animation without changing any values within the defined time range. - * - * Note: The method does not shift around keys to the start of the track time, because for interpolated - * keys this will change their values - * - * @param {number} startTime - The start time. - * @param {number} endTime - The end time. - * @return {KeyframeTrack} A reference to this keyframe track. - */ - trim(startTime: number, endTime: number): KeyframeTrack; - /** - * Performs minimal validation on the keyframe track. Returns `true` if the values - * are valid. - * - * @return {boolean} Whether the keyframes are valid or not. - */ - validate(): boolean; - /** - * Optimizes this keyframe track by removing equivalent sequential keys (which are - * common in morph target sequences). - * - * @return {KeyframeTrack} A reference to this keyframe track. - */ - optimize(): KeyframeTrack; - /** - * Returns a new keyframe track with copied values from this instance. - * - * @return {KeyframeTrack} A clone of this instance. - */ - clone(): KeyframeTrack; - /** - * The value type name. - * - * @type {string} - * @default '' - */ - ValueTypeName: string; - /** - * The time buffer type of this keyframe track. - * - * @type {TypedArray|Array} - * @default Float32Array.constructor - */ - TimeBufferType: TypedArray | any[]; - /** - * The value buffer type of this keyframe track. - * - * @type {TypedArray|Array} - * @default Float32Array.constructor - */ - ValueBufferType: TypedArray | any[]; - /** - * The default interpolation type of this keyframe track. - * - * @type {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth|InterpolateBezier)} - * @default InterpolateLinear - */ - DefaultInterpolation: (number | number | number | number); -} -import { DiscreteInterpolant } from '../math/interpolants/DiscreteInterpolant.js'; -import { LinearInterpolant } from '../math/interpolants/LinearInterpolant.js'; -import { CubicInterpolant } from '../math/interpolants/CubicInterpolant.js'; -import { BezierInterpolant } from '../math/interpolants/BezierInterpolant.js'; diff --git a/jsdoc-testing/jsdoc/src/animation/PropertyBinding.d.ts b/jsdoc-testing/jsdoc/src/animation/PropertyBinding.d.ts deleted file mode 100644 index af4e99d9d..000000000 --- a/jsdoc-testing/jsdoc/src/animation/PropertyBinding.d.ts +++ /dev/null @@ -1,144 +0,0 @@ -/** - * This holds a reference to a real property in the scene graph; used internally. - */ -export class PropertyBinding { - /** - * Factory method for creating a property binding from the given parameters. - * - * @static - * @param {Object} root - The root node. - * @param {string} path - The path. - * @param {?Object} [parsedPath] - The parsed path. - * @return {PropertyBinding|Composite} The created property binding or composite. - */ - static create(root: Object, path: string, parsedPath?: Object | null): PropertyBinding | Composite; - /** - * Replaces spaces with underscores and removes unsupported characters from - * node names, to ensure compatibility with parseTrackName(). - * - * @param {string} name - Node name to be sanitized. - * @return {string} The sanitized node name. - */ - static sanitizeNodeName(name: string): string; - /** - * Parses the given track name (an object path to an animated property) and - * returns an object with information about the path. Matches strings in the following forms: - * - * - nodeName.property - * - nodeName.property[accessor] - * - nodeName.material.property[accessor] - * - uuid.property[accessor] - * - uuid.objectName[objectIndex].propertyName[propertyIndex] - * - parentName/nodeName.property - * - parentName/parentName/nodeName.property[index] - * - .bone[Armature.DEF_cog].position - * - scene:helium_balloon_model:helium_balloon_model.position - * - * @static - * @param {string} trackName - The track name to parse. - * @return {Object} The parsed track name as an object. - */ - static parseTrackName(trackName: string): Object; - /** - * Searches for a node in the hierarchy of the given root object by the given - * node name. - * - * @static - * @param {Object} root - The root object. - * @param {string|number} nodeName - The name of the node. - * @return {?Object} The found node. Returns `null` if no object was found. - */ - static findNode(root: Object, nodeName: string | number): Object | null; - /** - * Constructs a new property binding. - * - * @param {Object} rootNode - The root node. - * @param {string} path - The path. - * @param {?Object} [parsedPath] - The parsed path. - */ - constructor(rootNode: Object, path: string, parsedPath?: Object | null); - /** - * The object path to the animated property. - * - * @type {string} - */ - path: string; - /** - * An object holding information about the path. - * - * @type {Object} - */ - parsedPath: Object; - /** - * The object owns the animated property. - * - * @type {?Object} - */ - node: Object | null; - /** - * The root node. - * - * @type {Object3D|Skeleton} - */ - rootNode: Object3D | Skeleton; - getValue: (targetArray: any, offset: any) => void; - setValue: (sourceArray: any, offset: any) => void; - _getValue_unavailable(): void; - _setValue_unavailable(): void; - _getValue_direct(buffer: any, offset: any): void; - _getValue_array(buffer: any, offset: any): void; - _getValue_arrayElement(buffer: any, offset: any): void; - _getValue_toArray(buffer: any, offset: any): void; - _setValue_direct(buffer: any, offset: any): void; - _setValue_direct_setNeedsUpdate(buffer: any, offset: any): void; - _setValue_direct_setMatrixWorldNeedsUpdate(buffer: any, offset: any): void; - _setValue_array(buffer: any, offset: any): void; - _setValue_array_setNeedsUpdate(buffer: any, offset: any): void; - _setValue_array_setMatrixWorldNeedsUpdate(buffer: any, offset: any): void; - _setValue_arrayElement(buffer: any, offset: any): void; - _setValue_arrayElement_setNeedsUpdate(buffer: any, offset: any): void; - _setValue_arrayElement_setMatrixWorldNeedsUpdate(buffer: any, offset: any): void; - _setValue_fromArray(buffer: any, offset: any): void; - _setValue_fromArray_setNeedsUpdate(buffer: any, offset: any): void; - _setValue_fromArray_setMatrixWorldNeedsUpdate(buffer: any, offset: any): void; - _getValue_unbound(targetArray: any, offset: any): void; - _setValue_unbound(sourceArray: any, offset: any): void; - /** - * Creates a getter / setter pair for the property tracked by this binding. - */ - bind(): void; - targetObject: Object | null | undefined; - resolvedProperty: any; - propertyIndex: any; - propertyName: any; - /** - * Unbinds the property. - */ - unbind(): void; - BindingType: { - Direct: number; - EntireArray: number; - ArrayElement: number; - HasFromToArray: number; - }; - Versioning: { - None: number; - NeedsUpdate: number; - MatrixWorldNeedsUpdate: number; - }; - GetterByBindingType: ((buffer: any, offset: any) => void)[]; - SetterByBindingTypeAndVersioning: ((buffer: any, offset: any) => void)[][]; -} -export namespace PropertyBinding { - export { Composite }; -} -declare class Composite { - constructor(targetGroup: any, path: any, optionalParsedPath: any); - _targetGroup: any; - _bindings: any; - getValue(array: any, offset: any): void; - setValue(array: any, offset: any): void; - bind(): void; - unbind(): void; -} -export {}; diff --git a/jsdoc-testing/jsdoc/src/animation/PropertyMixer.d.ts b/jsdoc-testing/jsdoc/src/animation/PropertyMixer.d.ts deleted file mode 100644 index 0f715aa7b..000000000 --- a/jsdoc-testing/jsdoc/src/animation/PropertyMixer.d.ts +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Buffered scene graph property that allows weighted accumulation; used internally. - */ -export class PropertyMixer { - /** - * Constructs a new property mixer. - * - * @param {PropertyBinding} binding - The property binding. - * @param {string} typeName - The keyframe track type name. - * @param {number} valueSize - The keyframe track value size. - */ - constructor(binding: PropertyBinding, typeName: string, valueSize: number); - /** - * The property binding. - * - * @type {PropertyBinding} - */ - binding: PropertyBinding; - /** - * The keyframe track value size. - * - * @type {number} - */ - valueSize: number; - buffer: any[] | Float64Array; - _workIndex: number | undefined; - _mixBufferRegion: (buffer: any, dstOffset: any, srcOffset: any, t: any, stride: any) => void; - _mixBufferRegionAdditive: (buffer: any, dstOffset: any, srcOffset: any, t: any, stride: any) => void; - _setIdentity: () => void; - _origIndex: number; - _addIndex: number; - /** - * Accumulated weight of the property binding. - * - * @type {number} - * @default 0 - */ - cumulativeWeight: number; - /** - * Accumulated additive weight of the property binding. - * - * @type {number} - * @default 0 - */ - cumulativeWeightAdditive: number; - /** - * Number of active keyframe tracks currently using this property binding. - * - * @type {number} - * @default 0 - */ - useCount: number; - /** - * Number of keyframe tracks referencing this property binding. - * - * @type {number} - * @default 0 - */ - referenceCount: number; - /** - * Accumulates data in the `incoming` region into `accu`. - * - * @param {number} accuIndex - The accumulation index. - * @param {number} weight - The weight. - */ - accumulate(accuIndex: number, weight: number): void; - /** - * Accumulates data in the `incoming` region into `add`. - * - * @param {number} weight - The weight. - */ - accumulateAdditive(weight: number): void; - /** - * Applies the state of `accu` to the binding when accus differ. - * - * @param {number} accuIndex - The accumulation index. - */ - apply(accuIndex: number): void; - /** - * Remembers the state of the bound property and copy it to both accus. - */ - saveOriginalState(): void; - /** - * Applies the state previously taken via {@link PropertyMixer#saveOriginalState} to the binding. - */ - restoreOriginalState(): void; - _setAdditiveIdentityNumeric(): void; - _setAdditiveIdentityQuaternion(): void; - _setAdditiveIdentityOther(): void; - _select(buffer: any, dstOffset: any, srcOffset: any, t: any, stride: any): void; - _slerp(buffer: any, dstOffset: any, srcOffset: any, t: any): void; - _slerpAdditive(buffer: any, dstOffset: any, srcOffset: any, t: any, stride: any): void; - _lerp(buffer: any, dstOffset: any, srcOffset: any, t: any, stride: any): void; - _lerpAdditive(buffer: any, dstOffset: any, srcOffset: any, t: any, stride: any): void; -} diff --git a/jsdoc-testing/jsdoc/src/animation/tracks/BooleanKeyframeTrack.d.ts b/jsdoc-testing/jsdoc/src/animation/tracks/BooleanKeyframeTrack.d.ts deleted file mode 100644 index d8e3cfd7f..000000000 --- a/jsdoc-testing/jsdoc/src/animation/tracks/BooleanKeyframeTrack.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * A track for boolean keyframe values. - * - * @augments KeyframeTrack - */ -export class BooleanKeyframeTrack extends KeyframeTrack { - /** - * Constructs a new boolean keyframe track. - * - * This keyframe track type has no `interpolation` parameter because the - * interpolation is always discrete. - * - * @param {string} name - The keyframe track's name. - * @param {Array} times - A list of keyframe times. - * @param {Array} values - A list of keyframe values. - */ - constructor(name: string, times: Array, values: Array); - /** - * The default interpolation type of this keyframe track. - * - * @type {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth)} - * @default InterpolateDiscrete - */ - DefaultInterpolation: (InterpolateLinear | number | InterpolateSmooth); - InterpolantFactoryMethodLinear: any; - InterpolantFactoryMethodSmooth: any; -} -import { KeyframeTrack } from '../KeyframeTrack.js'; diff --git a/jsdoc-testing/jsdoc/src/animation/tracks/ColorKeyframeTrack.d.ts b/jsdoc-testing/jsdoc/src/animation/tracks/ColorKeyframeTrack.d.ts deleted file mode 100644 index aa0f64d74..000000000 --- a/jsdoc-testing/jsdoc/src/animation/tracks/ColorKeyframeTrack.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * A track for color keyframe values. - * - * @augments KeyframeTrack - */ -export class ColorKeyframeTrack extends KeyframeTrack { - /** - * Constructs a new color keyframe track. - * - * @param {string} name - The keyframe track's name. - * @param {Array} times - A list of keyframe times. - * @param {Array} values - A list of keyframe values. - * @param {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth)} [interpolation] - The interpolation type. - */ - constructor(name: string, times: Array, values: Array, interpolation?: (InterpolateLinear | InterpolateDiscrete | InterpolateSmooth)); -} -import { KeyframeTrack } from '../KeyframeTrack.js'; diff --git a/jsdoc-testing/jsdoc/src/animation/tracks/NumberKeyframeTrack.d.ts b/jsdoc-testing/jsdoc/src/animation/tracks/NumberKeyframeTrack.d.ts deleted file mode 100644 index f83c955ca..000000000 --- a/jsdoc-testing/jsdoc/src/animation/tracks/NumberKeyframeTrack.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * A track for numeric keyframe values. - * - * @augments KeyframeTrack - */ -export class NumberKeyframeTrack extends KeyframeTrack { - /** - * Constructs a new number keyframe track. - * - * @param {string} name - The keyframe track's name. - * @param {Array} times - A list of keyframe times. - * @param {Array} values - A list of keyframe values. - * @param {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth)} [interpolation] - The interpolation type. - */ - constructor(name: string, times: Array, values: Array, interpolation?: (InterpolateLinear | InterpolateDiscrete | InterpolateSmooth)); -} -import { KeyframeTrack } from '../KeyframeTrack.js'; diff --git a/jsdoc-testing/jsdoc/src/animation/tracks/QuaternionKeyframeTrack.d.ts b/jsdoc-testing/jsdoc/src/animation/tracks/QuaternionKeyframeTrack.d.ts deleted file mode 100644 index 98e4a75e2..000000000 --- a/jsdoc-testing/jsdoc/src/animation/tracks/QuaternionKeyframeTrack.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * A track for Quaternion keyframe values. - * - * @augments KeyframeTrack - */ -export class QuaternionKeyframeTrack extends KeyframeTrack { - /** - * Constructs a new Quaternion keyframe track. - * - * @param {string} name - The keyframe track's name. - * @param {Array} times - A list of keyframe times. - * @param {Array} values - A list of keyframe values. - * @param {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth)} [interpolation] - The interpolation type. - */ - constructor(name: string, times: Array, values: Array, interpolation?: (InterpolateLinear | InterpolateDiscrete | InterpolateSmooth)); - InterpolantFactoryMethodSmooth: any; -} -import { KeyframeTrack } from '../KeyframeTrack.js'; diff --git a/jsdoc-testing/jsdoc/src/animation/tracks/StringKeyframeTrack.d.ts b/jsdoc-testing/jsdoc/src/animation/tracks/StringKeyframeTrack.d.ts deleted file mode 100644 index 95c5bd155..000000000 --- a/jsdoc-testing/jsdoc/src/animation/tracks/StringKeyframeTrack.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * A track for string keyframe values. - * - * @augments KeyframeTrack - */ -export class StringKeyframeTrack extends KeyframeTrack { - /** - * Constructs a new string keyframe track. - * - * This keyframe track type has no `interpolation` parameter because the - * interpolation is always discrete. - * - * @param {string} name - The keyframe track's name. - * @param {Array} times - A list of keyframe times. - * @param {Array} values - A list of keyframe values. - */ - constructor(name: string, times: Array, values: Array); - /** - * The default interpolation type of this keyframe track. - * - * @type {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth)} - * @default InterpolateDiscrete - */ - DefaultInterpolation: (InterpolateLinear | number | InterpolateSmooth); - InterpolantFactoryMethodLinear: any; - InterpolantFactoryMethodSmooth: any; -} -import { KeyframeTrack } from '../KeyframeTrack.js'; diff --git a/jsdoc-testing/jsdoc/src/animation/tracks/VectorKeyframeTrack.d.ts b/jsdoc-testing/jsdoc/src/animation/tracks/VectorKeyframeTrack.d.ts deleted file mode 100644 index 856db2d58..000000000 --- a/jsdoc-testing/jsdoc/src/animation/tracks/VectorKeyframeTrack.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * A track for vector keyframe values. - * - * @augments KeyframeTrack - */ -export class VectorKeyframeTrack extends KeyframeTrack { - /** - * Constructs a new vector keyframe track. - * - * @param {string} name - The keyframe track's name. - * @param {Array} times - A list of keyframe times. - * @param {Array} values - A list of keyframe values. - * @param {(InterpolateLinear|InterpolateDiscrete|InterpolateSmooth)} [interpolation] - The interpolation type. - */ - constructor(name: string, times: Array, values: Array, interpolation?: (InterpolateLinear | InterpolateDiscrete | InterpolateSmooth)); -} -import { KeyframeTrack } from '../KeyframeTrack.js'; diff --git a/jsdoc-testing/jsdoc/src/audio/Audio.d.ts b/jsdoc-testing/jsdoc/src/audio/Audio.d.ts deleted file mode 100644 index 755622769..000000000 --- a/jsdoc-testing/jsdoc/src/audio/Audio.d.ts +++ /dev/null @@ -1,379 +0,0 @@ -/** - * Represents a non-positional ( global ) audio object. - * - * This and related audio modules make use of the [Web Audio API](https://www.w3.org/TR/webaudio-1.1/). - * - * ```js - * // create an AudioListener and add it to the camera - * const listener = new THREE.AudioListener(); - * camera.add( listener ); - * - * // create a global audio source - * const sound = new THREE.Audio( listener ); - * - * // load a sound and set it as the Audio object's buffer - * const audioLoader = new THREE.AudioLoader(); - * audioLoader.load( 'sounds/ambient.ogg', function( buffer ) { - * sound.setBuffer( buffer ); - * sound.setLoop( true ); - * sound.setVolume( 0.5 ); - * sound.play(); - * }); - * ``` - * - * @augments Object3D - */ -export class Audio extends Object3D { - /** - * Constructs a new audio. - * - * @param {AudioListener} listener - The global audio listener. - */ - constructor(listener: AudioListener); - type: string; - /** - * The global audio listener. - * - * @type {AudioListener} - * @readonly - */ - readonly listener: AudioListener; - /** - * The audio context. - * - * @type {AudioContext} - * @readonly - */ - readonly context: AudioContext; - /** - * The gain node used for volume control. - * - * @type {GainNode} - * @readonly - */ - readonly gain: GainNode; - /** - * Whether to start playback automatically or not. - * - * @type {boolean} - * @default false - */ - autoplay: boolean; - /** - * A reference to an audio buffer. - * - * Defined via {@link Audio#setBuffer}. - * - * @type {?AudioBuffer} - * @default null - * @readonly - */ - readonly buffer: AudioBuffer | null; - /** - * Modify pitch, measured in cents. +/- 100 is a semitone. - * +/- 1200 is an octave. - * - * Defined via {@link Audio#setDetune}. - * - * @type {number} - * @default 0 - * @readonly - */ - readonly detune: number; - /** - * Whether the audio should loop or not. - * - * Defined via {@link Audio#setLoop}. - * - * @type {boolean} - * @default false - * @readonly - */ - readonly loop: boolean; - /** - * Defines where in the audio buffer the replay should - * start, in seconds. - * - * @type {number} - * @default 0 - */ - loopStart: number; - /** - * Defines where in the audio buffer the replay should - * stop, in seconds. - * - * @type {number} - * @default 0 - */ - loopEnd: number; - /** - * An offset to the time within the audio buffer the playback - * should begin, in seconds. - * - * @type {number} - * @default 0 - */ - offset: number; - /** - * Overrides the default duration of the audio. - * - * @type {undefined|number} - * @default undefined - */ - duration: undefined | number; - /** - * The playback speed. - * - * Defined via {@link Audio#setPlaybackRate}. - * - * @type {number} - * @readonly - * @default 1 - */ - readonly playbackRate: number; - /** - * Indicates whether the audio is playing or not. - * - * This flag will be automatically set when using {@link Audio#play}, - * {@link Audio#pause}, {@link Audio#stop}. - * - * @type {boolean} - * @readonly - * @default false - */ - readonly isPlaying: boolean; - /** - * Indicates whether the audio playback can be controlled - * with method like {@link Audio#play} or {@link Audio#pause}. - * - * This flag will be automatically set when audio sources are - * defined. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly hasPlaybackControl: boolean; - /** - * Holds a reference to the current audio source. - * - * The property is automatically by one of the `set*()` methods. - * - * @type {?AudioNode} - * @readonly - * @default null - */ - readonly source: AudioNode | null; - /** - * Defines the source type. - * - * The property is automatically set by one of the `set*()` methods. - * - * @type {('empty'|'audioNode'|'mediaNode'|'mediaStreamNode'|'buffer')} - * @readonly - * @default 'empty' - */ - readonly sourceType: ("empty" | "audioNode" | "mediaNode" | "mediaStreamNode" | "buffer"); - _startedAt: number; - _progress: number; - _connected: boolean; - /** - * Can be used to apply a variety of low-order filters to create - * more complex sound effects e.g. via `BiquadFilterNode`. - * - * The property is automatically set by {@link Audio#setFilters}. - * - * @type {Array} - * @readonly - */ - readonly filters: Array; - /** - * Returns the output audio node. - * - * @return {GainNode} The output node. - */ - getOutput(): GainNode; - /** - * Sets the given audio node as the source of this instance. - * - * {@link Audio#sourceType} is set to `audioNode` and {@link Audio#hasPlaybackControl} to `false`. - * - * @param {AudioNode} audioNode - The audio node like an instance of `OscillatorNode`. - * @return {Audio} A reference to this instance. - */ - setNodeSource(audioNode: AudioNode): Audio; - /** - * Sets the given media element as the source of this instance. - * - * {@link Audio#sourceType} is set to `mediaNode` and {@link Audio#hasPlaybackControl} to `false`. - * - * @param {HTMLMediaElement} mediaElement - The media element. - * @return {Audio} A reference to this instance. - */ - setMediaElementSource(mediaElement: HTMLMediaElement): Audio; - /** - * Sets the given media stream as the source of this instance. - * - * {@link Audio#sourceType} is set to `mediaStreamNode` and {@link Audio#hasPlaybackControl} to `false`. - * - * @param {MediaStream} mediaStream - The media stream. - * @return {Audio} A reference to this instance. - */ - setMediaStreamSource(mediaStream: MediaStream): Audio; - /** - * Sets the given audio buffer as the source of this instance. - * - * {@link Audio#sourceType} is set to `buffer` and {@link Audio#hasPlaybackControl} to `true`. - * - * @param {AudioBuffer} audioBuffer - The audio buffer. - * @return {Audio} A reference to this instance. - */ - setBuffer(audioBuffer: AudioBuffer): Audio; - /** - * Starts the playback of the audio. - * - * Can only be used with compatible audio sources that allow playback control. - * - * @param {number} [delay=0] - The delay, in seconds, at which the audio should start playing. - * @return {Audio|undefined} A reference to this instance. - */ - play(delay?: number): Audio | undefined; - /** - * Pauses the playback of the audio. - * - * Can only be used with compatible audio sources that allow playback control. - * - * @return {Audio|undefined} A reference to this instance. - */ - pause(): Audio | undefined; - /** - * Stops the playback of the audio. - * - * Can only be used with compatible audio sources that allow playback control. - * - * @param {number} [delay=0] - The delay, in seconds, at which the audio should stop playing. - * @return {Audio|undefined} A reference to this instance. - */ - stop(delay?: number): Audio | undefined; - /** - * Connects to the audio source. This is used internally on - * initialisation and when setting / removing filters. - * - * @return {Audio} A reference to this instance. - */ - connect(): Audio; - /** - * Disconnects to the audio source. This is used internally on - * initialisation and when setting / removing filters. - * - * @return {Audio|undefined} A reference to this instance. - */ - disconnect(): Audio | undefined; - /** - * Returns the current set filters. - * - * @return {Array} The list of filters. - */ - getFilters(): Array; - /** - * Sets an array of filters and connects them with the audio source. - * - * @param {Array} [value] - A list of filters. - * @return {Audio} A reference to this instance. - */ - setFilters(value?: Array): Audio; - /** - * Defines the detuning of oscillation in cents. - * - * @param {number} value - The detuning of oscillation in cents. - * @return {Audio} A reference to this instance. - */ - setDetune(value: number): Audio; - /** - * Returns the detuning of oscillation in cents. - * - * @return {number} The detuning of oscillation in cents. - */ - getDetune(): number; - /** - * Returns the first filter in the list of filters. - * - * @return {AudioNode|undefined} The first filter in the list of filters. - */ - getFilter(): AudioNode | undefined; - /** - * Applies a single filter node to the audio. - * - * @param {AudioNode} [filter] - The filter to set. - * @return {Audio} A reference to this instance. - */ - setFilter(filter?: AudioNode): Audio; - /** - * Sets the playback rate. - * - * Can only be used with compatible audio sources that allow playback control. - * - * @param {number} [value] - The playback rate to set. - * @return {Audio|undefined} A reference to this instance. - */ - setPlaybackRate(value?: number): Audio | undefined; - /** - * Returns the current playback rate. - - * @return {number} The playback rate. - */ - getPlaybackRate(): number; - /** - * Automatically called when playback finished. - */ - onEnded(): void; - /** - * Returns the loop flag. - * - * Can only be used with compatible audio sources that allow playback control. - * - * @return {boolean} Whether the audio should loop or not. - */ - getLoop(): boolean; - /** - * Sets the loop flag. - * - * Can only be used with compatible audio sources that allow playback control. - * - * @param {boolean} value - Whether the audio should loop or not. - * @return {Audio|undefined} A reference to this instance. - */ - setLoop(value: boolean): Audio | undefined; - /** - * Sets the loop start value which defines where in the audio buffer the replay should - * start, in seconds. - * - * @param {number} value - The loop start value. - * @return {Audio} A reference to this instance. - */ - setLoopStart(value: number): Audio; - /** - * Sets the loop end value which defines where in the audio buffer the replay should - * stop, in seconds. - * - * @param {number} value - The loop end value. - * @return {Audio} A reference to this instance. - */ - setLoopEnd(value: number): Audio; - /** - * Returns the volume. - * - * @return {number} The volume. - */ - getVolume(): number; - /** - * Sets the volume. - * - * @param {number} value - The volume to set. - * @return {Audio} A reference to this instance. - */ - setVolume(value: number): Audio; - copy(source: any, recursive: any): this; - clone(recursive: any): any; -} -import { Object3D } from '../core/Object3D.js'; diff --git a/jsdoc-testing/jsdoc/src/audio/AudioAnalyser.d.ts b/jsdoc-testing/jsdoc/src/audio/AudioAnalyser.d.ts deleted file mode 100644 index 241498397..000000000 --- a/jsdoc-testing/jsdoc/src/audio/AudioAnalyser.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -/** - * This class can be used to analyse audio data. - * - * ```js - * // create an AudioListener and add it to the camera - * const listener = new THREE.AudioListener(); - * camera.add( listener ); - * - * // create an Audio source - * const sound = new THREE.Audio( listener ); - * - * // load a sound and set it as the Audio object's buffer - * const audioLoader = new THREE.AudioLoader(); - * audioLoader.load( 'sounds/ambient.ogg', function( buffer ) { - * sound.setBuffer( buffer ); - * sound.setLoop(true); - * sound.setVolume(0.5); - * sound.play(); - * }); - * - * // create an AudioAnalyser, passing in the sound and desired fftSize - * const analyser = new THREE.AudioAnalyser( sound, 32 ); - * - * // get the average frequency of the sound - * const data = analyser.getAverageFrequency(); - * ``` - */ -export class AudioAnalyser { - /** - * Constructs a new audio analyzer. - * - * @param {Audio} audio - The audio to analyze. - * @param {number} [fftSize=2048] - The window size in samples that is used when performing a Fast Fourier Transform (FFT) to get frequency domain data. - */ - constructor(audio: new (src?: string) => HTMLAudioElement, fftSize?: number); - /** - * The global audio listener. - * - * @type {AnalyserNode} - */ - analyser: AnalyserNode; - /** - * Holds the analyzed data. - * - * @type {Uint8Array} - */ - data: Uint8Array; - /** - * Returns an array with frequency data of the audio. - * - * Each item in the array represents the decibel value for a specific frequency. - * The frequencies are spread linearly from 0 to 1/2 of the sample rate. - * For example, for 48000 sample rate, the last item of the array will represent - * the decibel value for 24000 Hz. - * - * @return {Uint8Array} The frequency data. - */ - getFrequencyData(): Uint8Array; - /** - * Returns the average of the frequencies returned by {@link AudioAnalyser#getFrequencyData}. - * - * @return {number} The average frequency. - */ - getAverageFrequency(): number; -} diff --git a/jsdoc-testing/jsdoc/src/audio/AudioContext.d.ts b/jsdoc-testing/jsdoc/src/audio/AudioContext.d.ts deleted file mode 100644 index 3a4632519..000000000 --- a/jsdoc-testing/jsdoc/src/audio/AudioContext.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * Manages the global audio context in the engine. - * - * @hideconstructor - */ -export class AudioContext { - /** - * Returns the global native audio context. - * - * @return {Window.AudioContext} The native audio context. - */ - static getContext(): Window.AudioContext; - /** - * Allows to set the global native audio context from outside. - * - * @param {Window.AudioContext} value - The native context to set. - */ - static setContext(value: Window.AudioContext): void; -} diff --git a/jsdoc-testing/jsdoc/src/audio/AudioListener.d.ts b/jsdoc-testing/jsdoc/src/audio/AudioListener.d.ts deleted file mode 100644 index c668dd516..000000000 --- a/jsdoc-testing/jsdoc/src/audio/AudioListener.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * The class represents a virtual listener of the all positional and non-positional audio effects - * in the scene. A three.js application usually creates a single listener. It is a mandatory - * constructor parameter for audios entities like {@link Audio} and {@link PositionalAudio}. - * - * In most cases, the listener object is a child of the camera. So the 3D transformation of the - * camera represents the 3D transformation of the listener. - * - * @augments Object3D - */ -export class AudioListener extends Object3D { - type: string; - /** - * The native audio context. - * - * @type {AudioContext} - * @readonly - */ - readonly context: AudioContext; - /** - * The gain node used for volume control. - * - * @type {GainNode} - * @readonly - */ - readonly gain: GainNode; - /** - * An optional filter. - * - * Defined via {@link AudioListener#setFilter}. - * - * @type {?AudioNode} - * @default null - * @readonly - */ - readonly filter: AudioNode | null; - /** - * Time delta values required for `linearRampToValueAtTime()` usage. - * - * @type {number} - * @default 0 - * @readonly - */ - readonly timeDelta: number; - _timer: Timer; - /** - * Returns the listener's input node. - * - * This method is used by other audio nodes to connect to this listener. - * - * @return {GainNode} The input node. - */ - getInput(): GainNode; - /** - * Removes the current filter from this listener. - * - * @return {AudioListener} A reference to this listener. - */ - removeFilter(): AudioListener; - /** - * Returns the current set filter. - * - * @return {?AudioNode} The filter. - */ - getFilter(): AudioNode | null; - /** - * Sets the given filter to this listener. - * - * @param {AudioNode} value - The filter to set. - * @return {AudioListener} A reference to this listener. - */ - setFilter(value: AudioNode): AudioListener; - /** - * Returns the applications master volume. - * - * @return {number} The master volume. - */ - getMasterVolume(): number; - /** - * Sets the applications master volume. This volume setting affects - * all audio nodes in the scene. - * - * @param {number} value - The master volume to set. - * @return {AudioListener} A reference to this listener. - */ - setMasterVolume(value: number): AudioListener; - updateMatrixWorld(force: any): void; -} -import { Object3D } from '../core/Object3D.js'; -import { AudioContext } from './AudioContext.js'; -import { Timer } from '../core/Timer.js'; diff --git a/jsdoc-testing/jsdoc/src/audio/PositionalAudio.d.ts b/jsdoc-testing/jsdoc/src/audio/PositionalAudio.d.ts deleted file mode 100644 index 03307384c..000000000 --- a/jsdoc-testing/jsdoc/src/audio/PositionalAudio.d.ts +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Represents a positional audio object. - * - * ```js - * // create an AudioListener and add it to the camera - * const listener = new THREE.AudioListener(); - * camera.add( listener ); - * - * // create the PositionalAudio object (passing in the listener) - * const sound = new THREE.PositionalAudio( listener ); - * - * // load a sound and set it as the PositionalAudio object's buffer - * const audioLoader = new THREE.AudioLoader(); - * audioLoader.load( 'sounds/song.ogg', function( buffer ) { - * sound.setBuffer( buffer ); - * sound.setRefDistance( 20 ); - * sound.play(); - * }); - * - * // create an object for the sound to play from - * const sphere = new THREE.SphereGeometry( 20, 32, 16 ); - * const material = new THREE.MeshPhongMaterial( { color: 0xff2200 } ); - * const mesh = new THREE.Mesh( sphere, material ); - * scene.add( mesh ); - * - * // finally add the sound to the mesh - * mesh.add( sound ); - * - * @augments Audio - */ -export class PositionalAudio extends Audio { - /** - * The panner node represents the location, direction, and behavior of an audio - * source in 3D space. - * - * @type {PannerNode} - * @readonly - */ - readonly panner: PannerNode; - connect(): this; - disconnect(): this; - getOutput(): PannerNode; - /** - * Returns the current reference distance. - * - * @return {number} The reference distance. - */ - getRefDistance(): number; - /** - * Defines the reference distance for reducing volume as the audio source moves - * further from the listener – i.e. the distance at which the volume reduction - * starts taking effect. - * - * @param {number} value - The reference distance to set. - * @return {PositionalAudio} A reference to this instance. - */ - setRefDistance(value: number): PositionalAudio; - /** - * Returns the current rolloff factor. - * - * @return {number} The rolloff factor. - */ - getRolloffFactor(): number; - /** - * Defines how quickly the volume is reduced as the source moves away from the listener. - * - * @param {number} value - The rolloff factor. - * @return {PositionalAudio} A reference to this instance. - */ - setRolloffFactor(value: number): PositionalAudio; - /** - * Returns the current distance model. - * - * @return {('linear'|'inverse'|'exponential')} The distance model. - */ - getDistanceModel(): ("linear" | "inverse" | "exponential"); - /** - * Defines which algorithm to use to reduce the volume of the audio source - * as it moves away from the listener. - * - * Read [the spec](https://www.w3.org/TR/webaudio-1.1/#enumdef-distancemodeltype) - * for more details. - * - * @param {('linear'|'inverse'|'exponential')} value - The distance model to set. - * @return {PositionalAudio} A reference to this instance. - */ - setDistanceModel(value: ("linear" | "inverse" | "exponential")): PositionalAudio; - /** - * Returns the current max distance. - * - * @return {number} The max distance. - */ - getMaxDistance(): number; - /** - * Defines the maximum distance between the audio source and the listener, - * after which the volume is not reduced any further. - * - * This value is used only by the `linear` distance model. - * - * @param {number} value - The max distance. - * @return {PositionalAudio} A reference to this instance. - */ - setMaxDistance(value: number): PositionalAudio; - /** - * Sets the directional cone in which the audio can be listened. - * - * @param {number} coneInnerAngle - An angle, in degrees, of a cone inside of which there will be no volume reduction. - * @param {number} coneOuterAngle - An angle, in degrees, of a cone outside of which the volume will be reduced by a constant value, defined by the `coneOuterGain` parameter. - * @param {number} coneOuterGain - The amount of volume reduction outside the cone defined by the `coneOuterAngle`. When set to `0`, no sound can be heard. - * @return {PositionalAudio} A reference to this instance. - */ - setDirectionalCone(coneInnerAngle: number, coneOuterAngle: number, coneOuterGain: number): PositionalAudio; - updateMatrixWorld(force: any): void; -} -import { Audio } from './Audio.js'; diff --git a/jsdoc-testing/jsdoc/src/cameras/ArrayCamera.d.ts b/jsdoc-testing/jsdoc/src/cameras/ArrayCamera.d.ts deleted file mode 100644 index d1dd98d30..000000000 --- a/jsdoc-testing/jsdoc/src/cameras/ArrayCamera.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * This type of camera can be used in order to efficiently render a scene with a - * predefined set of cameras. This is an important performance aspect for - * rendering VR scenes. - * - * An instance of `ArrayCamera` always has an array of sub cameras. It's mandatory - * to define for each sub camera the `viewport` property which determines the - * part of the viewport that is rendered with this camera. - * - * @augments PerspectiveCamera - */ -export class ArrayCamera extends PerspectiveCamera { - /** - * Constructs a new array camera. - * - * @param {Array} [array=[]] - An array of perspective sub cameras. - */ - constructor(array?: Array); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isArrayCamera: boolean; - /** - * Whether this camera is used with multiview rendering or not. - * - * @type {boolean} - * @readonly - * @default false - */ - readonly isMultiViewCamera: boolean; - /** - * An array of perspective sub cameras. - * - * @type {Array} - */ - cameras: Array; -} -import { PerspectiveCamera } from './PerspectiveCamera.js'; diff --git a/jsdoc-testing/jsdoc/src/cameras/Camera.d.ts b/jsdoc-testing/jsdoc/src/cameras/Camera.d.ts deleted file mode 100644 index b24b6e34a..000000000 --- a/jsdoc-testing/jsdoc/src/cameras/Camera.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Abstract base class for cameras. This class should always be inherited - * when you build a new camera. - * - * @abstract - * @augments Object3D - */ -export class Camera extends Object3D { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isCamera: boolean; - type: string; - /** - * The inverse of the camera's world matrix. - * - * @type {Matrix4} - */ - matrixWorldInverse: Matrix4; - /** - * The camera's projection matrix. - * - * @type {Matrix4} - */ - projectionMatrix: Matrix4; - /** - * The inverse of the camera's projection matrix. - * - * @type {Matrix4} - */ - projectionMatrixInverse: Matrix4; - /** - * The coordinate system in which the camera is used. - * - * @type {(WebGLCoordinateSystem|WebGPUCoordinateSystem)} - */ - coordinateSystem: (number | WebGPUCoordinateSystem); - _reversedDepth: boolean; - /** - * The flag that indicates whether the camera uses a reversed depth buffer. - * - * @type {boolean} - * @default false - */ - get reversedDepth(): boolean; - copy(source: any, recursive: any): this; - updateMatrixWorld(force: any): void; - updateWorldMatrix(updateParents: any, updateChildren: any): void; - clone(): any; -} -import { Object3D } from '../core/Object3D.js'; -import { Matrix4 } from '../math/Matrix4.js'; diff --git a/jsdoc-testing/jsdoc/src/cameras/CubeCamera.d.ts b/jsdoc-testing/jsdoc/src/cameras/CubeCamera.d.ts deleted file mode 100644 index 28a2ba9c1..000000000 --- a/jsdoc-testing/jsdoc/src/cameras/CubeCamera.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -/** - * A special type of camera that is positioned in 3D space to render its surroundings into a - * cube render target. The render target can then be used as an environment map for rendering - * realtime reflections in your scene. - * - * ```js - * // Create cube render target - * const cubeRenderTarget = new THREE.WebGLCubeRenderTarget( 256, { generateMipmaps: true, minFilter: THREE.LinearMipmapLinearFilter } ); - * - * // Create cube camera - * const cubeCamera = new THREE.CubeCamera( 1, 100000, cubeRenderTarget ); - * scene.add( cubeCamera ); - * - * // Create car - * const chromeMaterial = new THREE.MeshLambertMaterial( { color: 0xffffff, envMap: cubeRenderTarget.texture } ); - * const car = new THREE.Mesh( carGeometry, chromeMaterial ); - * scene.add( car ); - * - * // Update the render target cube - * car.visible = false; - * cubeCamera.position.copy( car.position ); - * cubeCamera.update( renderer, scene ); - * - * // Render the scene - * car.visible = true; - * renderer.render( scene, camera ); - * ``` - * - * @augments Object3D - */ -export class CubeCamera extends Object3D { - /** - * Constructs a new cube camera. - * - * @param {number} near - The camera's near plane. - * @param {number} far - The camera's far plane. - * @param {WebGLCubeRenderTarget} renderTarget - The cube render target. - */ - constructor(near: number, far: number, renderTarget: WebGLCubeRenderTarget); - type: string; - /** - * A reference to the cube render target. - * - * @type {WebGLCubeRenderTarget} - */ - renderTarget: WebGLCubeRenderTarget; - /** - * The current active coordinate system. - * - * @type {?(WebGLCoordinateSystem|WebGPUCoordinateSystem)} - * @default null - */ - coordinateSystem: (number | number) | null; - /** - * The current active mipmap level - * - * @type {number} - * @default 0 - */ - activeMipmapLevel: number; - /** - * Must be called when the coordinate system of the cube camera is changed. - */ - updateCoordinateSystem(): void; - /** - * Calling this method will render the given scene with the given renderer - * into the cube render target of the camera. - * - * @param {(Renderer|WebGLRenderer)} renderer - The renderer. - * @param {Scene} scene - The scene to render. - */ - update(renderer: (Renderer | WebGLRenderer), scene: Scene): void; -} -import { Object3D } from '../core/Object3D.js'; diff --git a/jsdoc-testing/jsdoc/src/cameras/OrthographicCamera.d.ts b/jsdoc-testing/jsdoc/src/cameras/OrthographicCamera.d.ts deleted file mode 100644 index b6269a9b1..000000000 --- a/jsdoc-testing/jsdoc/src/cameras/OrthographicCamera.d.ts +++ /dev/null @@ -1,122 +0,0 @@ -/** - * Camera that uses [orthographic projection](https://en.wikipedia.org/wiki/Orthographic_projection). - * - * In this projection mode, an object's size in the rendered image stays - * constant regardless of its distance from the camera. This can be useful - * for rendering 2D scenes and UI elements, amongst other things. - * - * ```js - * const camera = new THREE.OrthographicCamera( width / - 2, width / 2, height / 2, height / - 2, 1, 1000 ); - * scene.add( camera ); - * ``` - * - * @augments Camera - */ -export class OrthographicCamera extends Camera { - /** - * Constructs a new orthographic camera. - * - * @param {number} [left=-1] - The left plane of the camera's frustum. - * @param {number} [right=1] - The right plane of the camera's frustum. - * @param {number} [top=1] - The top plane of the camera's frustum. - * @param {number} [bottom=-1] - The bottom plane of the camera's frustum. - * @param {number} [near=0.1] - The camera's near plane. - * @param {number} [far=2000] - The camera's far plane. - */ - constructor(left?: number, right?: number, top?: number, bottom?: number, near?: number, far?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isOrthographicCamera: boolean; - /** - * The zoom factor of the camera. - * - * @type {number} - * @default 1 - */ - zoom: number; - /** - * Represents the frustum window specification. This property should not be edited - * directly but via {@link PerspectiveCamera#setViewOffset} and {@link PerspectiveCamera#clearViewOffset}. - * - * @type {?Object} - * @default null - */ - view: Object | null; - /** - * The left plane of the camera's frustum. - * - * @type {number} - * @default -1 - */ - left: number; - /** - * The right plane of the camera's frustum. - * - * @type {number} - * @default 1 - */ - right: number; - /** - * The top plane of the camera's frustum. - * - * @type {number} - * @default 1 - */ - top: number; - /** - * The bottom plane of the camera's frustum. - * - * @type {number} - * @default -1 - */ - bottom: number; - /** - * The camera's near plane. The valid range is greater than `0` - * and less than the current value of {@link OrthographicCamera#far}. - * - * Note that, unlike for the {@link PerspectiveCamera}, `0` is a - * valid value for an orthographic camera's near plane. - * - * @type {number} - * @default 0.1 - */ - near: number; - /** - * The camera's far plane. Must be greater than the - * current value of {@link OrthographicCamera#near}. - * - * @type {number} - * @default 2000 - */ - far: number; - copy(source: any, recursive: any): this; - /** - * Sets an offset in a larger frustum. This is useful for multi-window or - * multi-monitor/multi-machine setups. - * - * @param {number} fullWidth - The full width of multiview setup. - * @param {number} fullHeight - The full height of multiview setup. - * @param {number} x - The horizontal offset of the subcamera. - * @param {number} y - The vertical offset of the subcamera. - * @param {number} width - The width of subcamera. - * @param {number} height - The height of subcamera. - * @see {@link PerspectiveCamera#setViewOffset} - */ - setViewOffset(fullWidth: number, fullHeight: number, x: number, y: number, width: number, height: number): void; - /** - * Removes the view offset from the projection matrix. - */ - clearViewOffset(): void; - /** - * Updates the camera's projection matrix. Must be called after any change of - * camera properties. - */ - updateProjectionMatrix(): void; - toJSON(meta: any): Object; -} -import { Camera } from './Camera.js'; diff --git a/jsdoc-testing/jsdoc/src/cameras/PerspectiveCamera.d.ts b/jsdoc-testing/jsdoc/src/cameras/PerspectiveCamera.d.ts deleted file mode 100644 index 0bf274692..000000000 --- a/jsdoc-testing/jsdoc/src/cameras/PerspectiveCamera.d.ts +++ /dev/null @@ -1,216 +0,0 @@ -/** - * Camera that uses [perspective projection](https://en.wikipedia.org/wiki/Perspective_(graphical)). - * - * This projection mode is designed to mimic the way the human eye sees. It - * is the most common projection mode used for rendering a 3D scene. - * - * ```js - * const camera = new THREE.PerspectiveCamera( 45, width / height, 1, 1000 ); - * scene.add( camera ); - * ``` - * - * @augments Camera - */ -export class PerspectiveCamera extends Camera { - /** - * Constructs a new perspective camera. - * - * @param {number} [fov=50] - The vertical field of view. - * @param {number} [aspect=1] - The aspect ratio. - * @param {number} [near=0.1] - The camera's near plane. - * @param {number} [far=2000] - The camera's far plane. - */ - constructor(fov?: number, aspect?: number, near?: number, far?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isPerspectiveCamera: boolean; - /** - * The vertical field of view, from bottom to top of view, - * in degrees. - * - * @type {number} - * @default 50 - */ - fov: number; - /** - * The zoom factor of the camera. - * - * @type {number} - * @default 1 - */ - zoom: number; - /** - * The camera's near plane. The valid range is greater than `0` - * and less than the current value of {@link PerspectiveCamera#far}. - * - * Note that, unlike for the {@link OrthographicCamera}, `0` is not a - * valid value for a perspective camera's near plane. - * - * @type {number} - * @default 0.1 - */ - near: number; - /** - * The camera's far plane. Must be greater than the - * current value of {@link PerspectiveCamera#near}. - * - * @type {number} - * @default 2000 - */ - far: number; - /** - * Object distance used for stereoscopy and depth-of-field effects. This - * parameter does not influence the projection matrix unless a - * {@link StereoCamera} is being used. - * - * @type {number} - * @default 10 - */ - focus: number; - /** - * The aspect ratio, usually the canvas width / canvas height. - * - * @type {number} - * @default 1 - */ - aspect: number; - /** - * Represents the frustum window specification. This property should not be edited - * directly but via {@link PerspectiveCamera#setViewOffset} and {@link PerspectiveCamera#clearViewOffset}. - * - * @type {?Object} - * @default null - */ - view: Object | null; - /** - * Film size used for the larger axis. Default is `35` (millimeters). This - * parameter does not influence the projection matrix unless {@link PerspectiveCamera#filmOffset} - * is set to a nonzero value. - * - * @type {number} - * @default 35 - */ - filmGauge: number; - /** - * Horizontal off-center offset in the same unit as {@link PerspectiveCamera#filmGauge}. - * - * @type {number} - * @default 0 - */ - filmOffset: number; - copy(source: any, recursive: any): this; - /** - * Sets the FOV by focal length in respect to the current {@link PerspectiveCamera#filmGauge}. - * - * The default film gauge is 35, so that the focal length can be specified for - * a 35mm (full frame) camera. - * - * @param {number} focalLength - Values for focal length and film gauge must have the same unit. - */ - setFocalLength(focalLength: number): void; - /** - * Returns the focal length from the current {@link PerspectiveCamera#fov} and - * {@link PerspectiveCamera#filmGauge}. - * - * @return {number} The computed focal length. - */ - getFocalLength(): number; - /** - * Returns the current vertical field of view angle in degrees considering {@link PerspectiveCamera#zoom}. - * - * @return {number} The effective FOV. - */ - getEffectiveFOV(): number; - /** - * Returns the width of the image on the film. If {@link PerspectiveCamera#aspect} is greater than or - * equal to one (landscape format), the result equals {@link PerspectiveCamera#filmGauge}. - * - * @return {number} The film width. - */ - getFilmWidth(): number; - /** - * Returns the height of the image on the film. If {@link PerspectiveCamera#aspect} is greater than or - * equal to one (landscape format), the result equals {@link PerspectiveCamera#filmGauge}. - * - * @return {number} The film width. - */ - getFilmHeight(): number; - /** - * Computes the 2D bounds of the camera's viewable rectangle at a given distance along the viewing direction. - * Sets `minTarget` and `maxTarget` to the coordinates of the lower-left and upper-right corners of the view rectangle. - * - * @param {number} distance - The viewing distance. - * @param {Vector2} minTarget - The lower-left corner of the view rectangle is written into this vector. - * @param {Vector2} maxTarget - The upper-right corner of the view rectangle is written into this vector. - */ - getViewBounds(distance: number, minTarget: Vector2, maxTarget: Vector2): void; - /** - * Computes the width and height of the camera's viewable rectangle at a given distance along the viewing direction. - * - * @param {number} distance - The viewing distance. - * @param {Vector2} target - The target vector that is used to store result where x is width and y is height. - * @returns {Vector2} The view size. - */ - getViewSize(distance: number, target: Vector2): Vector2; - /** - * Sets an offset in a larger frustum. This is useful for multi-window or - * multi-monitor/multi-machine setups. - * - * For example, if you have 3x2 monitors and each monitor is 1920x1080 and - * the monitors are in grid like this - *``` - * +---+---+---+ - * | A | B | C | - * +---+---+---+ - * | D | E | F | - * +---+---+---+ - *``` - * then for each monitor you would call it like this: - *```js - * const w = 1920; - * const h = 1080; - * const fullWidth = w * 3; - * const fullHeight = h * 2; - * - * // --A-- - * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 0, w, h ); - * // --B-- - * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 0, w, h ); - * // --C-- - * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 0, w, h ); - * // --D-- - * camera.setViewOffset( fullWidth, fullHeight, w * 0, h * 1, w, h ); - * // --E-- - * camera.setViewOffset( fullWidth, fullHeight, w * 1, h * 1, w, h ); - * // --F-- - * camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h ); - * ``` - * - * Note there is no reason monitors have to be the same size or in a grid. - * - * @param {number} fullWidth - The full width of multiview setup. - * @param {number} fullHeight - The full height of multiview setup. - * @param {number} x - The horizontal offset of the subcamera. - * @param {number} y - The vertical offset of the subcamera. - * @param {number} width - The width of subcamera. - * @param {number} height - The height of subcamera. - */ - setViewOffset(fullWidth: number, fullHeight: number, x: number, y: number, width: number, height: number): void; - /** - * Removes the view offset from the projection matrix. - */ - clearViewOffset(): void; - /** - * Updates the camera's projection matrix. Must be called after any change of - * camera properties. - */ - updateProjectionMatrix(): void; - toJSON(meta: any): Object; -} -import { Camera } from './Camera.js'; -import { Vector2 } from '../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/cameras/StereoCamera.d.ts b/jsdoc-testing/jsdoc/src/cameras/StereoCamera.d.ts deleted file mode 100644 index 929bf5258..000000000 --- a/jsdoc-testing/jsdoc/src/cameras/StereoCamera.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * A special type of camera that uses two perspective cameras with - * stereoscopic projection. Can be used for rendering stereo effects - * like [3D Anaglyph](https://en.wikipedia.org/wiki/Anaglyph_3D) or - * [Parallax Barrier](https://en.wikipedia.org/wiki/parallax_barrier). - */ -export class StereoCamera { - /** - * The type property is used for detecting the object type - * in context of serialization/deserialization. - * - * @type {string} - * @readonly - */ - readonly type: string; - /** - * The aspect. - * - * @type {number} - * @default 1 - */ - aspect: number; - /** - * The eye separation which represents the distance - * between the left and right camera. - * - * @type {number} - * @default 0.064 - */ - eyeSep: number; - /** - * The camera representing the left eye. This is added to layer `1` so objects to be - * rendered by the left camera must also be added to this layer. - * - * @type {PerspectiveCamera} - */ - cameraL: PerspectiveCamera; - /** - * The camera representing the right eye. This is added to layer `2` so objects to be - * rendered by the right camera must also be added to this layer. - * - * @type {PerspectiveCamera} - */ - cameraR: PerspectiveCamera; - _cache: { - focus: null; - fov: null; - aspect: null; - near: null; - far: null; - zoom: null; - eyeSep: null; - }; - /** - * Updates the stereo camera based on the given perspective camera. - * - * @param {PerspectiveCamera} camera - The perspective camera. - */ - update(camera: PerspectiveCamera): void; -} -import { PerspectiveCamera } from './PerspectiveCamera.js'; diff --git a/jsdoc-testing/jsdoc/src/constants.d.ts b/jsdoc-testing/jsdoc/src/constants.d.ts deleted file mode 100644 index 91e0cd072..000000000 --- a/jsdoc-testing/jsdoc/src/constants.d.ts +++ /dev/null @@ -1,1592 +0,0 @@ -export const REVISION: "185dev"; -/** - * Represents mouse buttons and interaction types in context of controls. - * - * @type {ConstantsMouse} - * @constant - */ -export const MOUSE: ConstantsMouse; -/** - * Represents touch interaction types in context of controls. - * - * @type {ConstantsTouch} - * @constant - */ -export const TOUCH: ConstantsTouch; -/** - * Disables face culling. - * - * @type {number} - * @constant - */ -export const CullFaceNone: number; -/** - * Culls back faces. - * - * @type {number} - * @constant - */ -export const CullFaceBack: number; -/** - * Culls front faces. - * - * @type {number} - * @constant - */ -export const CullFaceFront: number; -/** - * Culls both front and back faces. - * - * @type {number} - * @constant - */ -export const CullFaceFrontBack: number; -/** - * Gives unfiltered shadow maps - fastest, but lowest quality. - * - * @type {number} - * @constant - */ -export const BasicShadowMap: number; -/** - * Filters shadow maps using the Percentage-Closer Filtering (PCF) algorithm. - * - * @type {number} - * @constant - */ -export const PCFShadowMap: number; -/** - * Filters shadow maps using the Percentage-Closer Filtering (PCF) algorithm with - * better soft shadows especially when using low-resolution shadow maps. - * - * @type {number} - * @constant - */ -export const PCFSoftShadowMap: number; -/** - * Filters shadow maps using the Variance Shadow Map (VSM) algorithm. - * When using VSMShadowMap all shadow receivers will also cast shadows. - * - * @type {number} - * @constant - */ -export const VSMShadowMap: number; -/** - * Only front faces are rendered. - * - * @type {number} - * @constant - */ -export const FrontSide: number; -/** - * Only back faces are rendered. - * - * @type {number} - * @constant - */ -export const BackSide: number; -/** - * Both front and back faces are rendered. - * - * @type {number} - * @constant - */ -export const DoubleSide: number; -/** - * No blending is performed which effectively disables - * alpha transparency. - * - * @type {number} - * @constant - */ -export const NoBlending: number; -/** - * The default blending. - * - * @type {number} - * @constant - */ -export const NormalBlending: number; -/** - * Represents additive blending. - * - * @type {number} - * @constant - */ -export const AdditiveBlending: number; -/** - * Represents subtractive blending. - * - * @type {number} - * @constant - */ -export const SubtractiveBlending: number; -/** - * Represents multiply blending. - * - * @type {number} - * @constant - */ -export const MultiplyBlending: number; -/** - * Represents custom blending. - * - * @type {number} - * @constant - */ -export const CustomBlending: number; -/** - * Represents material blending. - * - * @type {number} - * @constant - */ -export const MaterialBlending: number; -/** - * A `source + destination` blending equation. - * - * @type {number} - * @constant - */ -export const AddEquation: number; -/** - * A `source - destination` blending equation. - * - * @type {number} - * @constant - */ -export const SubtractEquation: number; -/** - * A `destination - source` blending equation. - * - * @type {number} - * @constant - */ -export const ReverseSubtractEquation: number; -/** - * A blend equation that uses the minimum of source and destination. - * - * @type {number} - * @constant - */ -export const MinEquation: number; -/** - * A blend equation that uses the maximum of source and destination. - * - * @type {number} - * @constant - */ -export const MaxEquation: number; -/** - * Multiplies all colors by `0`. - * - * @type {number} - * @constant - */ -export const ZeroFactor: number; -/** - * Multiplies all colors by `1`. - * - * @type {number} - * @constant - */ -export const OneFactor: number; -/** - * Multiplies all colors by the source colors. - * - * @type {number} - * @constant - */ -export const SrcColorFactor: number; -/** - * Multiplies all colors by `1` minus each source color. - * - * @type {number} - * @constant - */ -export const OneMinusSrcColorFactor: number; -/** - * Multiplies all colors by the source alpha value. - * - * @type {number} - * @constant - */ -export const SrcAlphaFactor: number; -/** - * Multiplies all colors by 1 minus the source alpha value. - * - * @type {number} - * @constant - */ -export const OneMinusSrcAlphaFactor: number; -/** - * Multiplies all colors by the destination alpha value. - * - * @type {number} - * @constant - */ -export const DstAlphaFactor: number; -/** - * Multiplies all colors by `1` minus the destination alpha value. - * - * @type {number} - * @constant - */ -export const OneMinusDstAlphaFactor: number; -/** - * Multiplies all colors by the destination color. - * - * @type {number} - * @constant - */ -export const DstColorFactor: number; -/** - * Multiplies all colors by `1` minus each destination color. - * - * @type {number} - * @constant - */ -export const OneMinusDstColorFactor: number; -/** - * Multiplies the RGB colors by the smaller of either the source alpha - * value or the value of `1` minus the destination alpha value. The alpha - * value is multiplied by `1`. - * - * @type {number} - * @constant - */ -export const SrcAlphaSaturateFactor: number; -/** - * Multiplies all colors by a constant color. - * - * @type {number} - * @constant - */ -export const ConstantColorFactor: number; -/** - * Multiplies all colors by `1` minus a constant color. - * - * @type {number} - * @constant - */ -export const OneMinusConstantColorFactor: number; -/** - * Multiplies all colors by a constant alpha value. - * - * @type {number} - * @constant - */ -export const ConstantAlphaFactor: number; -/** - * Multiplies all colors by 1 minus a constant alpha value. - * - * @type {number} - * @constant - */ -export const OneMinusConstantAlphaFactor: number; -/** - * Never pass. - * - * @type {number} - * @constant - */ -export const NeverDepth: number; -/** - * Always pass. - * - * @type {number} - * @constant - */ -export const AlwaysDepth: number; -/** - * Pass if the incoming value is less than the depth buffer value. - * - * @type {number} - * @constant - */ -export const LessDepth: number; -/** - * Pass if the incoming value is less than or equal to the depth buffer value. - * - * @type {number} - * @constant - */ -export const LessEqualDepth: number; -/** - * Pass if the incoming value equals the depth buffer value. - * - * @type {number} - * @constant - */ -export const EqualDepth: number; -/** - * Pass if the incoming value is greater than or equal to the depth buffer value. - * - * @type {number} - * @constant - */ -export const GreaterEqualDepth: number; -/** - * Pass if the incoming value is greater than the depth buffer value. - * - * @type {number} - * @constant - */ -export const GreaterDepth: number; -/** - * Pass if the incoming value is not equal to the depth buffer value. - * - * @type {number} - * @constant - */ -export const NotEqualDepth: number; -/** - * Multiplies the environment map color with the surface color. - * - * @type {number} - * @constant - */ -export const MultiplyOperation: number; -/** - * Uses reflectivity to blend between the two colors. - * - * @type {number} - * @constant - */ -export const MixOperation: number; -/** - * Adds the two colors. - * - * @type {number} - * @constant - */ -export const AddOperation: number; -/** - * No tone mapping is applied. - * - * @type {number} - * @constant - */ -export const NoToneMapping: number; -/** - * Linear tone mapping. - * - * @type {number} - * @constant - */ -export const LinearToneMapping: number; -/** - * Reinhard tone mapping. - * - * @type {number} - * @constant - */ -export const ReinhardToneMapping: number; -/** - * Cineon tone mapping. - * - * @type {number} - * @constant - */ -export const CineonToneMapping: number; -/** - * ACES Filmic tone mapping. - * - * @type {number} - * @constant - */ -export const ACESFilmicToneMapping: number; -/** - * Custom tone mapping. - * - * Expects a custom implementation by modifying shader code of the material's fragment shader. - * - * @type {number} - * @constant - */ -export const CustomToneMapping: number; -/** - * AgX tone mapping. - * - * @type {number} - * @constant - */ -export const AgXToneMapping: number; -/** - * Neutral tone mapping. - * - * Implementation based on the Khronos 3D Commerce Group standard tone mapping. - * - * @type {number} - * @constant - */ -export const NeutralToneMapping: number; -/** - * The skinned mesh shares the same world space as the skeleton. - * - * @type {string} - * @constant - */ -export const AttachedBindMode: string; -/** - * The skinned mesh does not share the same world space as the skeleton. - * This is useful when a skeleton is shared across multiple skinned meshes. - * - * @type {string} - * @constant - */ -export const DetachedBindMode: string; -/** - * Maps textures using the geometry's UV coordinates. - * - * @type {number} - * @constant - */ -export const UVMapping: number; -/** - * Reflection mapping for cube textures. - * - * @type {number} - * @constant - */ -export const CubeReflectionMapping: number; -/** - * Refraction mapping for cube textures. - * - * @type {number} - * @constant - */ -export const CubeRefractionMapping: number; -/** - * Reflection mapping for equirectangular textures. - * - * @type {number} - * @constant - */ -export const EquirectangularReflectionMapping: number; -/** - * Refraction mapping for equirectangular textures. - * - * @type {number} - * @constant - */ -export const EquirectangularRefractionMapping: number; -/** - * Reflection mapping for PMREM textures. - * - * @type {number} - * @constant - */ -export const CubeUVReflectionMapping: number; -/** - * The texture will simply repeat to infinity. - * - * @type {number} - * @constant - */ -export const RepeatWrapping: number; -/** - * The last pixel of the texture stretches to the edge of the mesh. - * - * @type {number} - * @constant - */ -export const ClampToEdgeWrapping: number; -/** - * The texture will repeats to infinity, mirroring on each repeat. - * - * @type {number} - * @constant - */ -export const MirroredRepeatWrapping: number; -/** - * Returns the value of the texture element that is nearest (in Manhattan distance) - * to the specified texture coordinates. - * - * @type {number} - * @constant - */ -export const NearestFilter: number; -/** - * Chooses the mipmap that most closely matches the size of the pixel being textured - * and uses the `NearestFilter` criterion (the texel nearest to the center of the pixel) - * to produce a texture value. - * - * @type {number} - * @constant - */ -export const NearestMipmapNearestFilter: number; -export const NearestMipMapNearestFilter: 1004; -/** - * Chooses the two mipmaps that most closely match the size of the pixel being textured and - * uses the `NearestFilter` criterion to produce a texture value from each mipmap. - * The final texture value is a weighted average of those two values. - * - * @type {number} - * @constant - */ -export const NearestMipmapLinearFilter: number; -export const NearestMipMapLinearFilter: 1005; -/** - * Returns the weighted average of the four texture elements that are closest to the specified - * texture coordinates, and can include items wrapped or repeated from other parts of a texture, - * depending on the values of `wrapS` and `wrapT`, and on the exact mapping. - * - * @type {number} - * @constant - */ -export const LinearFilter: number; -/** - * Chooses the mipmap that most closely matches the size of the pixel being textured and uses - * the `LinearFilter` criterion (a weighted average of the four texels that are closest to the - * center of the pixel) to produce a texture value. - * - * @type {number} - * @constant - */ -export const LinearMipmapNearestFilter: number; -export const LinearMipMapNearestFilter: 1007; -/** - * Chooses the two mipmaps that most closely match the size of the pixel being textured and uses - * the `LinearFilter` criterion to produce a texture value from each mipmap. The final texture value - * is a weighted average of those two values. - * - * @type {number} - * @constant - */ -export const LinearMipmapLinearFilter: number; -export const LinearMipMapLinearFilter: 1008; -/** - * An unsigned byte data type for textures. - * - * @type {number} - * @constant - */ -export const UnsignedByteType: number; -/** - * A byte data type for textures. - * - * @type {number} - * @constant - */ -export const ByteType: number; -/** - * A short data type for textures. - * - * @type {number} - * @constant - */ -export const ShortType: number; -/** - * An unsigned short data type for textures. - * - * @type {number} - * @constant - */ -export const UnsignedShortType: number; -/** - * An int data type for textures. - * - * @type {number} - * @constant - */ -export const IntType: number; -/** - * An unsigned int data type for textures. - * - * @type {number} - * @constant - */ -export const UnsignedIntType: number; -/** - * A float data type for textures. - * - * @type {number} - * @constant - */ -export const FloatType: number; -/** - * A half float data type for textures. - * - * @type {number} - * @constant - */ -export const HalfFloatType: number; -/** - * An unsigned short 4_4_4_4 (packed) data type for textures. - * - * @type {number} - * @constant - */ -export const UnsignedShort4444Type: number; -/** - * An unsigned short 5_5_5_1 (packed) data type for textures. - * - * @type {number} - * @constant - */ -export const UnsignedShort5551Type: number; -/** - * An unsigned int 24_8 data type for textures. - * - * @type {number} - * @constant - */ -export const UnsignedInt248Type: number; -/** - * An unsigned int 5_9_9_9 (packed) data type for textures. - * - * @type {number} - * @constant - */ -export const UnsignedInt5999Type: number; -/** - * An unsigned int 10_11_11 (packed) data type for textures. - * - * @type {number} - * @constant - */ -export const UnsignedInt101111Type: number; -/** - * Discards the red, green and blue components and reads just the alpha component. - * - * @type {number} - * @constant - */ -export const AlphaFormat: number; -/** - * Discards the alpha component and reads the red, green and blue component. - * - * @type {number} - * @constant - */ -export const RGBFormat: number; -/** - * Reads the red, green, blue and alpha components. - * - * @type {number} - * @constant - */ -export const RGBAFormat: number; -/** - * Reads each element as a single depth value, converts it to floating point, and clamps to the range `[0,1]`. - * - * @type {number} - * @constant - */ -export const DepthFormat: number; -/** - * Reads each element is a pair of depth and stencil values. The depth component of the pair is interpreted as - * in `DepthFormat`. The stencil component is interpreted based on the depth + stencil internal format. - * - * @type {number} - * @constant - */ -export const DepthStencilFormat: number; -/** - * Discards the green, blue and alpha components and reads just the red component. - * - * @type {number} - * @constant - */ -export const RedFormat: number; -/** - * Discards the green, blue and alpha components and reads just the red component. The texels are read as integers instead of floating point. - * - * @type {number} - * @constant - */ -export const RedIntegerFormat: number; -/** - * Discards the alpha, and blue components and reads the red, and green components. - * - * @type {number} - * @constant - */ -export const RGFormat: number; -/** - * Discards the alpha, and blue components and reads the red, and green components. The texels are read as integers instead of floating point. - * - * @type {number} - * @constant - */ -export const RGIntegerFormat: number; -/** - * Discards the alpha component and reads the red, green and blue component. The texels are read as integers instead of floating point. - * - * @type {number} - * @constant - */ -export const RGBIntegerFormat: number; -/** - * Reads the red, green, blue and alpha components. The texels are read as integers instead of floating point. - * - * @type {number} - * @constant - */ -export const RGBAIntegerFormat: number; -/** - * A DXT1-compressed image in an RGB image format. - * - * @type {number} - * @constant - */ -export const RGB_S3TC_DXT1_Format: number; -/** - * A DXT1-compressed image in an RGB image format with a simple on/off alpha value. - * - * @type {number} - * @constant - */ -export const RGBA_S3TC_DXT1_Format: number; -/** - * A DXT3-compressed image in an RGBA image format. Compared to a 32-bit RGBA texture, it offers 4:1 compression. - * - * @type {number} - * @constant - */ -export const RGBA_S3TC_DXT3_Format: number; -/** - * A DXT5-compressed image in an RGBA image format. It also provides a 4:1 compression, but differs to the DXT3 - * compression in how the alpha compression is done. - * - * @type {number} - * @constant - */ -export const RGBA_S3TC_DXT5_Format: number; -/** - * PVRTC RGB compression in 4-bit mode. One block for each 4×4 pixels. - * - * @type {number} - * @constant - */ -export const RGB_PVRTC_4BPPV1_Format: number; -/** - * PVRTC RGB compression in 2-bit mode. One block for each 8×4 pixels. - * - * @type {number} - * @constant - */ -export const RGB_PVRTC_2BPPV1_Format: number; -/** - * PVRTC RGBA compression in 4-bit mode. One block for each 4×4 pixels. - * - * @type {number} - * @constant - */ -export const RGBA_PVRTC_4BPPV1_Format: number; -/** - * PVRTC RGBA compression in 2-bit mode. One block for each 8×4 pixels. - * - * @type {number} - * @constant - */ -export const RGBA_PVRTC_2BPPV1_Format: number; -/** - * ETC1 RGB format. - * - * @type {number} - * @constant - */ -export const RGB_ETC1_Format: number; -/** - * ETC2 RGB format. - * - * @type {number} - * @constant - */ -export const RGB_ETC2_Format: number; -/** - * ETC2 RGBA format. - * - * @type {number} - * @constant - */ -export const RGBA_ETC2_EAC_Format: number; -/** - * EAC R11 UNORM format. - * - * @type {number} - * @constant - */ -export const R11_EAC_Format: number; -/** - * EAC R11 SNORM format. - * - * @type {number} - * @constant - */ -export const SIGNED_R11_EAC_Format: number; -/** - * EAC RG11 UNORM format. - * - * @type {number} - * @constant - */ -export const RG11_EAC_Format: number; -/** - * EAC RG11 SNORM format. - * - * @type {number} - * @constant - */ -export const SIGNED_RG11_EAC_Format: number; -/** - * ASTC RGBA 4x4 format. - * - * @type {number} - * @constant - */ -export const RGBA_ASTC_4x4_Format: number; -/** - * ASTC RGBA 5x4 format. - * - * @type {number} - * @constant - */ -export const RGBA_ASTC_5x4_Format: number; -/** - * ASTC RGBA 5x5 format. - * - * @type {number} - * @constant - */ -export const RGBA_ASTC_5x5_Format: number; -/** - * ASTC RGBA 6x5 format. - * - * @type {number} - * @constant - */ -export const RGBA_ASTC_6x5_Format: number; -/** - * ASTC RGBA 6x6 format. - * - * @type {number} - * @constant - */ -export const RGBA_ASTC_6x6_Format: number; -/** - * ASTC RGBA 8x5 format. - * - * @type {number} - * @constant - */ -export const RGBA_ASTC_8x5_Format: number; -/** - * ASTC RGBA 8x6 format. - * - * @type {number} - * @constant - */ -export const RGBA_ASTC_8x6_Format: number; -/** - * ASTC RGBA 8x8 format. - * - * @type {number} - * @constant - */ -export const RGBA_ASTC_8x8_Format: number; -/** - * ASTC RGBA 10x5 format. - * - * @type {number} - * @constant - */ -export const RGBA_ASTC_10x5_Format: number; -/** - * ASTC RGBA 10x6 format. - * - * @type {number} - * @constant - */ -export const RGBA_ASTC_10x6_Format: number; -/** - * ASTC RGBA 10x8 format. - * - * @type {number} - * @constant - */ -export const RGBA_ASTC_10x8_Format: number; -/** - * ASTC RGBA 10x10 format. - * - * @type {number} - * @constant - */ -export const RGBA_ASTC_10x10_Format: number; -/** - * ASTC RGBA 12x10 format. - * - * @type {number} - * @constant - */ -export const RGBA_ASTC_12x10_Format: number; -/** - * ASTC RGBA 12x12 format. - * - * @type {number} - * @constant - */ -export const RGBA_ASTC_12x12_Format: number; -/** - * BPTC RGBA format. - * - * @type {number} - * @constant - */ -export const RGBA_BPTC_Format: number; -/** - * BPTC Signed RGB format. - * - * @type {number} - * @constant - */ -export const RGB_BPTC_SIGNED_Format: number; -/** - * BPTC Unsigned RGB format. - * - * @type {number} - * @constant - */ -export const RGB_BPTC_UNSIGNED_Format: number; -/** - * RGTC1 Red format. - * - * @type {number} - * @constant - */ -export const RED_RGTC1_Format: number; -/** - * RGTC1 Signed Red format. - * - * @type {number} - * @constant - */ -export const SIGNED_RED_RGTC1_Format: number; -/** - * RGTC2 Red Green format. - * - * @type {number} - * @constant - */ -export const RED_GREEN_RGTC2_Format: number; -/** - * RGTC2 Signed Red Green format. - * - * @type {number} - * @constant - */ -export const SIGNED_RED_GREEN_RGTC2_Format: number; -/** - * Animations are played once. - * - * @type {number} - * @constant - */ -export const LoopOnce: number; -/** - * Animations are played with a chosen number of repetitions, each time jumping from - * the end of the clip directly to its beginning. - * - * @type {number} - * @constant - */ -export const LoopRepeat: number; -/** - * Animations are played with a chosen number of repetitions, alternately playing forward - * and backward. - * - * @type {number} - * @constant - */ -export const LoopPingPong: number; -/** - * Discrete interpolation mode for keyframe tracks. - * - * @type {number} - * @constant - */ -export const InterpolateDiscrete: number; -/** - * Linear interpolation mode for keyframe tracks. - * - * @type {number} - * @constant - */ -export const InterpolateLinear: number; -/** - * Smooth interpolation mode for keyframe tracks. - * - * @type {number} - * @constant - */ -export const InterpolateSmooth: number; -/** - * Bezier interpolation mode for keyframe tracks. - * - * Uses cubic Bezier curves with explicit 2D control points. - * Requires tangent data to be set on the track. - * - * @type {number} - * @constant - */ -export const InterpolateBezier: number; -/** - * Zero curvature ending for animations. - * - * @type {number} - * @constant - */ -export const ZeroCurvatureEnding: number; -/** - * Zero slope ending for animations. - * - * @type {number} - * @constant - */ -export const ZeroSlopeEnding: number; -/** - * Wrap around ending for animations. - * - * @type {number} - * @constant - */ -export const WrapAroundEnding: number; -/** - * Default animation blend mode. - * - * @type {number} - * @constant - */ -export const NormalAnimationBlendMode: number; -/** - * Additive animation blend mode. Can be used to layer motions on top of - * each other to build complex performances from smaller re-usable assets. - * - * @type {number} - * @constant - */ -export const AdditiveAnimationBlendMode: number; -/** - * For every three vertices draw a single triangle. - * - * @type {number} - * @constant - */ -export const TrianglesDrawMode: number; -/** - * For each vertex draw a triangle from the last three vertices. - * - * @type {number} - * @constant - */ -export const TriangleStripDrawMode: number; -/** - * For each vertex draw a triangle from the first vertex and the last two vertices. - * - * @type {number} - * @constant - */ -export const TriangleFanDrawMode: number; -/** - * The depth value is inverted (1.0 - z) for visualization purposes. - * - * @type {number} - * @constant - */ -export const BasicDepthPacking: number; -/** - * The depth value is packed into 32 bit RGBA. - * - * @type {number} - * @constant - */ -export const RGBADepthPacking: number; -/** - * The depth value is packed into 24 bit RGB. - * - * @type {number} - * @constant - */ -export const RGBDepthPacking: number; -/** - * The depth value is packed into 16 bit RG. - * - * @type {number} - * @constant - */ -export const RGDepthPacking: number; -/** - * Normal information is relative to the underlying surface. - * - * @type {number} - * @constant - */ -export const TangentSpaceNormalMap: number; -/** - * Normal information is relative to the object orientation. - * - * @type {number} - * @constant - */ -export const ObjectSpaceNormalMap: number; -/** - * No color space. - * - * @type {string} - * @constant - */ -export const NoColorSpace: string; -/** - * sRGB color space. - * - * @type {string} - * @constant - */ -export const SRGBColorSpace: string; -/** - * sRGB-linear color space. - * - * @type {string} - * @constant - */ -export const LinearSRGBColorSpace: string; -/** - * Linear transfer function. - * - * @type {string} - * @constant - */ -export const LinearTransfer: string; -/** - * sRGB transfer function. - * - * @type {string} - * @constant - */ -export const SRGBTransfer: string; -/** - * No normal map packing. - * - * @type {string} - * @constant - */ -export const NoNormalPacking: string; -/** - * Normal RG packing. - * - * @type {string} - * @constant - */ -export const NormalRGPacking: string; -/** - * Normal GA packing. - * - * @type {string} - * @constant - */ -export const NormalGAPacking: string; -/** - * Sets the stencil buffer value to `0`. - * - * @type {number} - * @constant - */ -export const ZeroStencilOp: number; -/** - * Keeps the current value. - * - * @type {number} - * @constant - */ -export const KeepStencilOp: number; -/** - * Sets the stencil buffer value to the specified reference value. - * - * @type {number} - * @constant - */ -export const ReplaceStencilOp: number; -/** - * Increments the current stencil buffer value. Clamps to the maximum representable unsigned value. - * - * @type {number} - * @constant - */ -export const IncrementStencilOp: number; -/** - * Decrements the current stencil buffer value. Clamps to `0`. - * - * @type {number} - * @constant - */ -export const DecrementStencilOp: number; -/** - * Increments the current stencil buffer value. Wraps stencil buffer value to zero when incrementing - * the maximum representable unsigned value. - * - * @type {number} - * @constant - */ -export const IncrementWrapStencilOp: number; -/** - * Decrements the current stencil buffer value. Wraps stencil buffer value to the maximum representable - * unsigned value when decrementing a stencil buffer value of `0`. - * - * @type {number} - * @constant - */ -export const DecrementWrapStencilOp: number; -/** - * Inverts the current stencil buffer value bitwise. - * - * @type {number} - * @constant - */ -export const InvertStencilOp: number; -/** - * Will never return true. - * - * @type {number} - * @constant - */ -export const NeverStencilFunc: number; -/** - * Will return true if the stencil reference value is less than the current stencil value. - * - * @type {number} - * @constant - */ -export const LessStencilFunc: number; -/** - * Will return true if the stencil reference value is equal to the current stencil value. - * - * @type {number} - * @constant - */ -export const EqualStencilFunc: number; -/** - * Will return true if the stencil reference value is less than or equal to the current stencil value. - * - * @type {number} - * @constant - */ -export const LessEqualStencilFunc: number; -/** - * Will return true if the stencil reference value is greater than the current stencil value. - * - * @type {number} - * @constant - */ -export const GreaterStencilFunc: number; -/** - * Will return true if the stencil reference value is not equal to the current stencil value. - * - * @type {number} - * @constant - */ -export const NotEqualStencilFunc: number; -/** - * Will return true if the stencil reference value is greater than or equal to the current stencil value. - * - * @type {number} - * @constant - */ -export const GreaterEqualStencilFunc: number; -/** - * Will always return true. - * - * @type {number} - * @constant - */ -export const AlwaysStencilFunc: number; -/** - * Never pass. - * - * @type {number} - * @constant - */ -export const NeverCompare: number; -/** - * Pass if the incoming value is less than the texture value. - * - * @type {number} - * @constant - */ -export const LessCompare: number; -/** - * Pass if the incoming value equals the texture value. - * - * @type {number} - * @constant - */ -export const EqualCompare: number; -/** - * Pass if the incoming value is less than or equal to the texture value. - * - * @type {number} - * @constant - */ -export const LessEqualCompare: number; -/** - * Pass if the incoming value is greater than the texture value. - * - * @type {number} - * @constant - */ -export const GreaterCompare: number; -/** - * Pass if the incoming value is not equal to the texture value. - * - * @type {number} - * @constant - */ -export const NotEqualCompare: number; -/** - * Pass if the incoming value is greater than or equal to the texture value. - * - * @type {number} - * @constant - */ -export const GreaterEqualCompare: number; -/** - * Always pass. - * - * @type {number} - * @constant - */ -export const AlwaysCompare: number; -/** - * The contents are intended to be specified once by the application, and used many - * times as the source for drawing and image specification commands. - * - * @type {number} - * @constant - */ -export const StaticDrawUsage: number; -/** - * The contents are intended to be respecified repeatedly by the application, and - * used many times as the source for drawing and image specification commands. - * - * @type {number} - * @constant - */ -export const DynamicDrawUsage: number; -/** - * The contents are intended to be specified once by the application, and used at most - * a few times as the source for drawing and image specification commands. - * - * @type {number} - * @constant - */ -export const StreamDrawUsage: number; -/** - * The contents are intended to be specified once by reading data from the 3D API, and queried - * many times by the application. - * - * @type {number} - * @constant - */ -export const StaticReadUsage: number; -/** - * The contents are intended to be respecified repeatedly by reading data from the 3D API, and queried - * many times by the application. - * - * @type {number} - * @constant - */ -export const DynamicReadUsage: number; -/** - * The contents are intended to be specified once by reading data from the 3D API, and queried at most - * a few times by the application - * - * @type {number} - * @constant - */ -export const StreamReadUsage: number; -/** - * The contents are intended to be specified once by reading data from the 3D API, and used many times as - * the source for WebGL drawing and image specification commands. - * - * @type {number} - * @constant - */ -export const StaticCopyUsage: number; -/** - * The contents are intended to be respecified repeatedly by reading data from the 3D API, and used many times - * as the source for WebGL drawing and image specification commands. - * - * @type {number} - * @constant - */ -export const DynamicCopyUsage: number; -/** - * The contents are intended to be specified once by reading data from the 3D API, and used at most a few times - * as the source for WebGL drawing and image specification commands. - * - * @type {number} - * @constant - */ -export const StreamCopyUsage: number; -/** - * GLSL 1 shader code. - * - * @type {string} - * @constant - */ -export const GLSL1: string; -/** - * GLSL 3 shader code. - * - * @type {string} - * @constant - */ -export const GLSL3: string; -/** - * WebGL coordinate system. - * - * @type {number} - * @constant - */ -export const WebGLCoordinateSystem: number; -/** - * WebGPU coordinate system. - * - * @type {number} - * @constant - */ -export const WebGPUCoordinateSystem: number; -/** - * Represents the different timestamp query types. - * - * @type {ConstantsTimestampQuery} - * @constant - */ -export const TimestampQuery: ConstantsTimestampQuery; -/** - * Represents mouse buttons and interaction types in context of controls. - * - * @type {ConstantsInterpolationSamplingType} - * @constant - */ -export const InterpolationSamplingType: ConstantsInterpolationSamplingType; -/** - * Represents the different interpolation sampling modes. - * - * @type {ConstantsInterpolationSamplingMode} - * @constant - */ -export const InterpolationSamplingMode: ConstantsInterpolationSamplingMode; -/** - * Compatibility flags for features that may not be supported across all platforms. - * - * @type {Object} - * @constant - */ -export const Compatibility: Object; -/** - * This type represents mouse buttons and interaction types in context of controls. - */ -export type ConstantsMouse = { - /** - * - The left mouse button. - */ - MIDDLE: number; - /** - * - The middle mouse button. - */ - LEFT: number; - /** - * - The right mouse button. - */ - RIGHT: number; - /** - * - A rotate interaction. - */ - ROTATE: number; - /** - * - A dolly interaction. - */ - DOLLY: number; - /** - * - A pan interaction. - */ - PAN: number; -}; -/** - * This type represents touch interaction types in context of controls. - */ -export type ConstantsTouch = { - /** - * - A rotate interaction. - */ - ROTATE: number; - /** - * - A pan interaction. - */ - PAN: number; - /** - * - The dolly-pan interaction. - */ - DOLLY_PAN: number; - /** - * - A dolly-rotate interaction. - */ - DOLLY_ROTATE: number; -}; -/** - * This type represents the different timestamp query types. - */ -export type ConstantsTimestampQuery = { - /** - * - A `compute` timestamp query. - */ - COMPUTE: string; - /** - * - A `render` timestamp query. - */ - RENDER: string; -}; -/** - * Represents the different interpolation sampling types. - */ -export type ConstantsInterpolationSamplingType = { - /** - * - Perspective-correct interpolation. - */ - PERSPECTIVE: string; - /** - * - Linear interpolation. - */ - LINEAR: string; - /** - * - Flat interpolation. - */ - FLAT: string; -}; -/** - * Represents the different interpolation sampling modes. - */ -export type ConstantsInterpolationSamplingMode = { - /** - * - Normal sampling mode. - */ - NORMAL: string; - /** - * - Centroid sampling mode. - */ - CENTROID: string; - /** - * - Sample-specific sampling mode. - */ - SAMPLE: string; - /** - * - Flat interpolation using the first vertex. - */ - FIRST: string; - /** - * - Flat interpolation using either vertex. - */ - EITHER: string; -}; diff --git a/jsdoc-testing/jsdoc/src/core/BufferAttribute.d.ts b/jsdoc-testing/jsdoc/src/core/BufferAttribute.d.ts deleted file mode 100644 index 577098a58..000000000 --- a/jsdoc-testing/jsdoc/src/core/BufferAttribute.d.ts +++ /dev/null @@ -1,487 +0,0 @@ -/** - * Convenient class that can be used when creating a `Float32` buffer attribute with - * a plain `Array` instance. - * - * @augments BufferAttribute - */ -export class Float32BufferAttribute extends BufferAttribute { - /** - * Constructs a new buffer attribute. - * - * @param {(Array|Float32Array)} array - The array holding the attribute data. - * @param {number} itemSize - The item size. - * @param {boolean} [normalized=false] - Whether the data are normalized or not. - */ - constructor(array: (Array | Float32Array), itemSize: number, normalized?: boolean); -} -/** - * Convenient class that can be used when creating a `Float16` buffer attribute with - * a plain `Array` instance. - * - * This class automatically converts to and from FP16 via `Uint16Array` since `Float16Array` - * browser support is still problematic. - * - * @augments BufferAttribute - */ -export class Float16BufferAttribute extends BufferAttribute { - /** - * Constructs a new buffer attribute. - * - * @param {(Array|Uint16Array)} array - The array holding the attribute data. - * @param {number} itemSize - The item size. - * @param {boolean} [normalized=false] - Whether the data are normalized or not. - */ - constructor(array: (Array | Uint16Array), itemSize: number, normalized?: boolean); - isFloat16BufferAttribute: boolean; - getX(index: any): number; - setX(index: any, x: any): this; - getY(index: any): number; - setY(index: any, y: any): this; - getZ(index: any): number; - setZ(index: any, z: any): this; - getW(index: any): number; - setW(index: any, w: any): this; - setXY(index: any, x: any, y: any): this; - setXYZ(index: any, x: any, y: any, z: any): this; - setXYZW(index: any, x: any, y: any, z: any, w: any): this; -} -/** - * Convenient class that can be used when creating a `UInt32` buffer attribute with - * a plain `Array` instance. - * - * @augments BufferAttribute - */ -export class Uint32BufferAttribute extends BufferAttribute { - /** - * Constructs a new buffer attribute. - * - * @param {(Array|Uint32Array)} array - The array holding the attribute data. - * @param {number} itemSize - The item size. - * @param {boolean} [normalized=false] - Whether the data are normalized or not. - */ - constructor(array: (Array | Uint32Array), itemSize: number, normalized?: boolean); -} -/** - * Convenient class that can be used when creating a `Int32` buffer attribute with - * a plain `Array` instance. - * - * @augments BufferAttribute - */ -export class Int32BufferAttribute extends BufferAttribute { - /** - * Constructs a new buffer attribute. - * - * @param {(Array|Int32Array)} array - The array holding the attribute data. - * @param {number} itemSize - The item size. - * @param {boolean} [normalized=false] - Whether the data are normalized or not. - */ - constructor(array: (Array | Int32Array), itemSize: number, normalized?: boolean); -} -/** - * Convenient class that can be used when creating a `UInt16` buffer attribute with - * a plain `Array` instance. - * - * @augments BufferAttribute - */ -export class Uint16BufferAttribute extends BufferAttribute { - /** - * Constructs a new buffer attribute. - * - * @param {(Array|Uint16Array)} array - The array holding the attribute data. - * @param {number} itemSize - The item size. - * @param {boolean} [normalized=false] - Whether the data are normalized or not. - */ - constructor(array: (Array | Uint16Array), itemSize: number, normalized?: boolean); -} -/** - * Convenient class that can be used when creating a `Int16` buffer attribute with - * a plain `Array` instance. - * - * @augments BufferAttribute - */ -export class Int16BufferAttribute extends BufferAttribute { - /** - * Constructs a new buffer attribute. - * - * @param {(Array|Int16Array)} array - The array holding the attribute data. - * @param {number} itemSize - The item size. - * @param {boolean} [normalized=false] - Whether the data are normalized or not. - */ - constructor(array: (Array | Int16Array), itemSize: number, normalized?: boolean); -} -/** - * Convenient class that can be used when creating a `UInt8Clamped` buffer attribute with - * a plain `Array` instance. - * - * @augments BufferAttribute - */ -export class Uint8ClampedBufferAttribute extends BufferAttribute { - /** - * Constructs a new buffer attribute. - * - * @param {(Array|Uint8ClampedArray)} array - The array holding the attribute data. - * @param {number} itemSize - The item size. - * @param {boolean} [normalized=false] - Whether the data are normalized or not. - */ - constructor(array: (Array | Uint8ClampedArray), itemSize: number, normalized?: boolean); -} -/** - * Convenient class that can be used when creating a `UInt8` buffer attribute with - * a plain `Array` instance. - * - * @augments BufferAttribute - */ -export class Uint8BufferAttribute extends BufferAttribute { - /** - * Constructs a new buffer attribute. - * - * @param {(Array|Uint8Array)} array - The array holding the attribute data. - * @param {number} itemSize - The item size. - * @param {boolean} [normalized=false] - Whether the data are normalized or not. - */ - constructor(array: (Array | Uint8Array), itemSize: number, normalized?: boolean); -} -/** - * Convenient class that can be used when creating a `Int8` buffer attribute with - * a plain `Array` instance. - * - * @augments BufferAttribute - */ -export class Int8BufferAttribute extends BufferAttribute { - /** - * Constructs a new buffer attribute. - * - * @param {(Array|Int8Array)} array - The array holding the attribute data. - * @param {number} itemSize - The item size. - * @param {boolean} [normalized=false] - Whether the data are normalized or not. - */ - constructor(array: (Array | Int8Array), itemSize: number, normalized?: boolean); -} -/** - * This class stores data for an attribute (such as vertex positions, face - * indices, normals, colors, UVs, and any custom attributes ) associated with - * a geometry, which allows for more efficient passing of data to the GPU. - * - * When working with vector-like data, the `fromBufferAttribute( attribute, index )` - * helper methods on vector and color class might be helpful. E.g. {@link Vector3#fromBufferAttribute}. - */ -export class BufferAttribute extends EventDispatcher { - /** - * Constructs a new buffer attribute. - * - * @param {TypedArray} array - The array holding the attribute data. - * @param {number} itemSize - The item size. - * @param {boolean} [normalized=false] - Whether the data are normalized or not. - */ - constructor(array: TypedArray, itemSize: number, normalized?: boolean); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBufferAttribute: boolean; - /** - * The name of the buffer attribute. - * - * @type {string} - */ - name: string; - /** - * The array holding the attribute data. It should have `itemSize * numVertices` - * elements, where `numVertices` is the number of vertices in the associated geometry. - * - * @type {TypedArray} - */ - array: TypedArray; - /** - * The number of values of the array that should be associated with a particular vertex. - * For instance, if this attribute is storing a 3-component vector (such as a position, - * normal, or color), then the value should be `3`. - * - * @type {number} - */ - itemSize: number; - /** - * Represents the number of items this buffer attribute stores. It is internally computed - * by dividing the `array` length by the `itemSize`. - * - * @type {number} - * @readonly - */ - readonly count: number; - /** - * Applies to integer data only. Indicates how the underlying data in the buffer maps to - * the values in the GLSL code. For instance, if `array` is an instance of `UInt16Array`, - * and `normalized` is `true`, the values `0 - +65535` in the array data will be mapped to - * `0.0f - +1.0f` in the GLSL attribute. If `normalized` is `false`, the values will be converted - * to floats unmodified, i.e. `65535` becomes `65535.0f`. - * - * @type {boolean} - */ - normalized: boolean; - /** - * Defines the intended usage pattern of the data store for optimization purposes. - * - * Note: After the initial use of a buffer, its usage cannot be changed. Instead, - * instantiate a new one and set the desired usage before the next render. - * - * @type {(StaticDrawUsage|DynamicDrawUsage|StreamDrawUsage|StaticReadUsage|DynamicReadUsage|StreamReadUsage|StaticCopyUsage|DynamicCopyUsage|StreamCopyUsage)} - * @default StaticDrawUsage - */ - usage: (number | DynamicDrawUsage | StreamDrawUsage | StaticReadUsage | DynamicReadUsage | StreamReadUsage | StaticCopyUsage | DynamicCopyUsage | StreamCopyUsage); - /** - * This can be used to only update some components of stored vectors (for example, just the - * component related to color). Use the `addUpdateRange()` function to add ranges to this array. - * - * @type {Array} - */ - updateRanges: Array; - /** - * Configures the bound GPU type for use in shaders. - * - * Note: this only has an effect for integer arrays and is not configurable for float arrays. - * For lower precision float types, use `Float16BufferAttribute`. - * - * @type {(FloatType|IntType)} - * @default FloatType - */ - gpuType: (number | IntType); - /** - * A version number, incremented every time the `needsUpdate` is set to `true`. - * - * @type {number} - */ - version: number; - /** - * A callback function that is executed after the renderer has transferred the attribute - * array data to the GPU. - */ - onUploadCallback(): void; - /** - * Flag to indicate that this attribute has changed and should be re-sent to - * the GPU. Set this to `true` when you modify the value of the array. - * - * @type {number} - * @default false - * @param {boolean} value - */ - set needsUpdate(value: boolean); - /** - * Sets the usage of this buffer attribute. - * - * @param {(StaticDrawUsage|DynamicDrawUsage|StreamDrawUsage|StaticReadUsage|DynamicReadUsage|StreamReadUsage|StaticCopyUsage|DynamicCopyUsage|StreamCopyUsage)} value - The usage to set. - * @return {BufferAttribute} A reference to this buffer attribute. - */ - setUsage(value: (number | DynamicDrawUsage | StreamDrawUsage | StaticReadUsage | DynamicReadUsage | StreamReadUsage | StaticCopyUsage | DynamicCopyUsage | StreamCopyUsage)): BufferAttribute; - /** - * Adds a range of data in the data array to be updated on the GPU. - * - * @param {number} start - Position at which to start update. - * @param {number} count - The number of components to update. - */ - addUpdateRange(start: number, count: number): void; - /** - * Clears the update ranges. - */ - clearUpdateRanges(): void; - /** - * Copies the values of the given buffer attribute to this instance. - * - * @param {BufferAttribute} source - The buffer attribute to copy. - * @return {BufferAttribute} A reference to this instance. - */ - copy(source: BufferAttribute): BufferAttribute; - /** - * Copies a vector from the given buffer attribute to this one. The start - * and destination position in the attribute buffers are represented by the - * given indices. - * - * @param {number} index1 - The destination index into this buffer attribute. - * @param {BufferAttribute} attribute - The buffer attribute to copy from. - * @param {number} index2 - The source index into the given buffer attribute. - * @return {BufferAttribute} A reference to this instance. - */ - copyAt(index1: number, attribute: BufferAttribute, index2: number): BufferAttribute; - /** - * Copies the given array data into this buffer attribute. - * - * @param {(TypedArray|Array)} array - The array to copy. - * @return {BufferAttribute} A reference to this instance. - */ - copyArray(array: (TypedArray | any[])): BufferAttribute; - /** - * Applies the given 3x3 matrix to the given attribute. Works with - * item size `2` and `3`. - * - * @param {Matrix3} m - The matrix to apply. - * @return {BufferAttribute} A reference to this instance. - */ - applyMatrix3(m: Matrix3): BufferAttribute; - /** - * Applies the given 4x4 matrix to the given attribute. Only works with - * item size `3`. - * - * @param {Matrix4} m - The matrix to apply. - * @return {BufferAttribute} A reference to this instance. - */ - applyMatrix4(m: Matrix4): BufferAttribute; - /** - * Applies the given 3x3 normal matrix to the given attribute. Only works with - * item size `3`. - * - * @param {Matrix3} m - The normal matrix to apply. - * @return {BufferAttribute} A reference to this instance. - */ - applyNormalMatrix(m: Matrix3): BufferAttribute; - /** - * Applies the given 4x4 matrix to the given attribute. Only works with - * item size `3` and with direction vectors. - * - * @param {Matrix4} m - The matrix to apply. - * @return {BufferAttribute} A reference to this instance. - */ - transformDirection(m: Matrix4): BufferAttribute; - /** - * Sets the given array data in the buffer attribute. - * - * @param {(TypedArray|Array)} value - The array data to set. - * @param {number} [offset=0] - The offset in this buffer attribute's array. - * @return {BufferAttribute} A reference to this instance. - */ - set(value: (TypedArray | any[]), offset?: number): BufferAttribute; - /** - * Returns the given component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @param {number} component - The component index. - * @return {number} The returned value. - */ - getComponent(index: number, component: number): number; - /** - * Sets the given value to the given component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @param {number} component - The component index. - * @param {number} value - The value to set. - * @return {BufferAttribute} A reference to this instance. - */ - setComponent(index: number, component: number, value: number): BufferAttribute; - /** - * Returns the x component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @return {number} The x component. - */ - getX(index: number): number; - /** - * Sets the x component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @param {number} x - The value to set. - * @return {BufferAttribute} A reference to this instance. - */ - setX(index: number, x: number): BufferAttribute; - /** - * Returns the y component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @return {number} The y component. - */ - getY(index: number): number; - /** - * Sets the y component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @param {number} y - The value to set. - * @return {BufferAttribute} A reference to this instance. - */ - setY(index: number, y: number): BufferAttribute; - /** - * Returns the z component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @return {number} The z component. - */ - getZ(index: number): number; - /** - * Sets the z component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @param {number} z - The value to set. - * @return {BufferAttribute} A reference to this instance. - */ - setZ(index: number, z: number): BufferAttribute; - /** - * Returns the w component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @return {number} The w component. - */ - getW(index: number): number; - /** - * Sets the w component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @param {number} w - The value to set. - * @return {BufferAttribute} A reference to this instance. - */ - setW(index: number, w: number): BufferAttribute; - /** - * Sets the x and y component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @param {number} x - The value for the x component to set. - * @param {number} y - The value for the y component to set. - * @return {BufferAttribute} A reference to this instance. - */ - setXY(index: number, x: number, y: number): BufferAttribute; - /** - * Sets the x, y and z component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @param {number} x - The value for the x component to set. - * @param {number} y - The value for the y component to set. - * @param {number} z - The value for the z component to set. - * @return {BufferAttribute} A reference to this instance. - */ - setXYZ(index: number, x: number, y: number, z: number): BufferAttribute; - /** - * Sets the x, y, z and w component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @param {number} x - The value for the x component to set. - * @param {number} y - The value for the y component to set. - * @param {number} z - The value for the z component to set. - * @param {number} w - The value for the w component to set. - * @return {BufferAttribute} A reference to this instance. - */ - setXYZW(index: number, x: number, y: number, z: number, w: number): BufferAttribute; - /** - * Sets the given callback function that is executed after the Renderer has transferred - * the attribute array data to the GPU. Can be used to perform clean-up operations after - * the upload when attribute data are not needed anymore on the CPU side. - * - * @param {Function} callback - The `onUpload()` callback. - * @return {BufferAttribute} A reference to this instance. - */ - onUpload(callback: Function): BufferAttribute; - /** - * Returns a new buffer attribute with copied values from this instance. - * - * @return {BufferAttribute} A clone of this instance. - */ - clone(): BufferAttribute; - /** - * Serializes the buffer attribute into JSON. - * - * @return {Object} A JSON object representing the serialized buffer attribute. - */ - toJSON(): Object; - /** - * Disposes of the buffer attribute. Available only in {@link WebGPURenderer}. - */ - dispose(): void; -} -import { EventDispatcher } from './EventDispatcher.js'; diff --git a/jsdoc-testing/jsdoc/src/core/BufferGeometry.d.ts b/jsdoc-testing/jsdoc/src/core/BufferGeometry.d.ts deleted file mode 100644 index 82a3230ad..000000000 --- a/jsdoc-testing/jsdoc/src/core/BufferGeometry.d.ts +++ /dev/null @@ -1,391 +0,0 @@ -/** - * A representation of mesh, line, or point geometry. Includes vertex - * positions, face indices, normals, colors, UVs, and custom attributes - * within buffers, reducing the cost of passing all this data to the GPU. - * - * ```js - * const geometry = new THREE.BufferGeometry(); - * // create a simple square shape. We duplicate the top left and bottom right - * // vertices because each vertex needs to appear once per triangle. - * const vertices = new Float32Array( [ - * -1.0, -1.0, 1.0, // v0 - * 1.0, -1.0, 1.0, // v1 - * 1.0, 1.0, 1.0, // v2 - * - * 1.0, 1.0, 1.0, // v3 - * -1.0, 1.0, 1.0, // v4 - * -1.0, -1.0, 1.0 // v5 - * ] ); - * // itemSize = 3 because there are 3 values (components) per vertex - * geometry.setAttribute( 'position', new THREE.BufferAttribute( vertices, 3 ) ); - * const material = new THREE.MeshBasicMaterial( { color: 0xff0000 } ); - * const mesh = new THREE.Mesh( geometry, material ); - * ``` - * - * @augments EventDispatcher - */ -export class BufferGeometry extends EventDispatcher { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBufferGeometry: boolean; - /** - * The UUID of the geometry. - * - * @type {string} - * @readonly - */ - readonly uuid: string; - /** - * The name of the geometry. - * - * @type {string} - */ - name: string; - type: string; - /** - * Allows for vertices to be re-used across multiple triangles; this is - * called using "indexed triangles". Each triangle is associated with the - * indices of three vertices. This attribute therefore stores the index of - * each vertex for each triangular face. If this attribute is not set, the - * renderer assumes that each three contiguous positions represent a single triangle. - * - * @type {?BufferAttribute} - * @default null - */ - index: BufferAttribute | null; - /** - * A (storage) buffer attribute which was generated with a compute shader and - * now defines indirect draw calls. - * - * Can only be used with {@link WebGPURenderer} and a WebGPU backend. - * - * @type {?BufferAttribute} - * @default null - */ - indirect: BufferAttribute | null; - /** - * The offset, in bytes, into the indirect drawing buffer where the value data begins. If an array is provided, multiple indirect draw calls will be made for each offset. - * - * Can only be used with {@link WebGPURenderer} and a WebGPU backend. - * - * @type {number|Array} - * @default 0 - */ - indirectOffset: number | Array; - /** - * This dictionary has as id the name of the attribute to be set and as value - * the buffer attribute to set it to. Rather than accessing this property directly, - * use `setAttribute()` and `getAttribute()` to access attributes of this geometry. - * - * @type {Object} - */ - attributes: { - [x: string]: any; - }; - /** - * This dictionary holds the morph targets of the geometry. - * - * Note: Once the geometry has been rendered, the morph attribute data cannot - * be changed. You will have to call `dispose()`, and create a new geometry instance. - * - * @type {Object} - */ - morphAttributes: Object; - /** - * Used to control the morph target behavior; when set to `true`, the morph - * target data is treated as relative offsets, rather than as absolute - * positions/normals. - * - * @type {boolean} - * @default false - */ - morphTargetsRelative: boolean; - /** - * Split the geometry into groups, each of which will be rendered in a - * separate draw call. This allows an array of materials to be used with the geometry. - * - * Use `addGroup()` and `clearGroups()` to edit groups, rather than modifying this array directly. - * - * Every vertex and index must belong to exactly one group — groups must not share vertices or - * indices, and must not leave vertices or indices unused. - * - * @type {Array} - */ - groups: Array; - /** - * Bounding box for the geometry which can be calculated with `computeBoundingBox()`. - * - * @type {?Box3} - * @default null - */ - boundingBox: Box3 | null; - /** - * Bounding sphere for the geometry which can be calculated with `computeBoundingSphere()`. - * - * @type {?Sphere} - * @default null - */ - boundingSphere: Sphere | null; - /** - * Determines the part of the geometry to render. This should not be set directly, - * instead use `setDrawRange()`. - * - * @type {{start:number,count:number}} - */ - drawRange: { - start: number; - count: number; - }; - /** - * An object that can be used to store custom data about the geometry. - * It should not hold references to functions as these will not be cloned. - * - * @type {Object} - */ - userData: Object; - /** - * Returns the index of this geometry. - * - * @return {?BufferAttribute} The index. Returns `null` if no index is defined. - */ - getIndex(): BufferAttribute | null; - /** - * Sets the given index to this geometry. - * - * @param {Array|BufferAttribute} index - The index to set. - * @return {BufferGeometry} A reference to this instance. - */ - setIndex(index: Array | BufferAttribute): BufferGeometry; - /** - * Sets the given indirect attribute to this geometry. - * - * @param {BufferAttribute} indirect - The attribute holding indirect draw calls. - * @param {number|Array} [indirectOffset=0] - The offset, in bytes, into the indirect drawing buffer where the value data begins. If an array is provided, multiple indirect draw calls will be made for each offset. - * @return {BufferGeometry} A reference to this instance. - */ - setIndirect(indirect: BufferAttribute, indirectOffset?: number | Array): BufferGeometry; - /** - * Returns the indirect attribute of this geometry. - * - * @return {?BufferAttribute} The indirect attribute. Returns `null` if no indirect attribute is defined. - */ - getIndirect(): BufferAttribute | null; - /** - * Returns the buffer attribute for the given name. - * - * @param {string} name - The attribute name. - * @return {BufferAttribute|InterleavedBufferAttribute|undefined} The buffer attribute. - * Returns `undefined` if not attribute has been found. - */ - getAttribute(name: string): BufferAttribute | InterleavedBufferAttribute | undefined; - /** - * Sets the given attribute for the given name. - * - * @param {string} name - The attribute name. - * @param {BufferAttribute|InterleavedBufferAttribute} attribute - The attribute to set. - * @return {BufferGeometry} A reference to this instance. - */ - setAttribute(name: string, attribute: BufferAttribute | InterleavedBufferAttribute): BufferGeometry; - /** - * Deletes the attribute for the given name. - * - * @param {string} name - The attribute name to delete. - * @return {BufferGeometry} A reference to this instance. - */ - deleteAttribute(name: string): BufferGeometry; - /** - * Returns `true` if this geometry has an attribute for the given name. - * - * @param {string} name - The attribute name. - * @return {boolean} Whether this geometry has an attribute for the given name or not. - */ - hasAttribute(name: string): boolean; - /** - * Adds a group to this geometry. - * - * @param {number} start - The first element in this draw call. That is the first - * vertex for non-indexed geometry, otherwise the first triangle index. - * @param {number} count - Specifies how many vertices (or indices) are part of this group. - * @param {number} [materialIndex=0] - The material array index to use. - */ - addGroup(start: number, count: number, materialIndex?: number): void; - /** - * Clears all groups. - */ - clearGroups(): void; - /** - * Sets the draw range for this geometry. - * - * @param {number} start - The first vertex for non-indexed geometry, otherwise the first triangle index. - * @param {number} count - For non-indexed BufferGeometry, `count` is the number of vertices to render. - * For indexed BufferGeometry, `count` is the number of indices to render. - */ - setDrawRange(start: number, count: number): void; - /** - * Applies the given 4x4 transformation matrix to the geometry. - * - * @param {Matrix4} matrix - The matrix to apply. - * @return {BufferGeometry} A reference to this instance. - */ - applyMatrix4(matrix: Matrix4): BufferGeometry; - /** - * Applies the rotation represented by the Quaternion to the geometry. - * - * @param {Quaternion} q - The Quaternion to apply. - * @return {BufferGeometry} A reference to this instance. - */ - applyQuaternion(q: Quaternion): BufferGeometry; - /** - * Rotates the geometry about the X axis. This is typically done as a one time - * operation, and not during a loop. Use {@link Object3D#rotation} for typical - * real-time mesh rotation. - * - * @param {number} angle - The angle in radians. - * @return {BufferGeometry} A reference to this instance. - */ - rotateX(angle: number): BufferGeometry; - /** - * Rotates the geometry about the Y axis. This is typically done as a one time - * operation, and not during a loop. Use {@link Object3D#rotation} for typical - * real-time mesh rotation. - * - * @param {number} angle - The angle in radians. - * @return {BufferGeometry} A reference to this instance. - */ - rotateY(angle: number): BufferGeometry; - /** - * Rotates the geometry about the Z axis. This is typically done as a one time - * operation, and not during a loop. Use {@link Object3D#rotation} for typical - * real-time mesh rotation. - * - * @param {number} angle - The angle in radians. - * @return {BufferGeometry} A reference to this instance. - */ - rotateZ(angle: number): BufferGeometry; - /** - * Translates the geometry. This is typically done as a one time - * operation, and not during a loop. Use {@link Object3D#position} for typical - * real-time mesh rotation. - * - * @param {number} x - The x offset. - * @param {number} y - The y offset. - * @param {number} z - The z offset. - * @return {BufferGeometry} A reference to this instance. - */ - translate(x: number, y: number, z: number): BufferGeometry; - /** - * Scales the geometry. This is typically done as a one time - * operation, and not during a loop. Use {@link Object3D#scale} for typical - * real-time mesh rotation. - * - * @param {number} x - The x scale. - * @param {number} y - The y scale. - * @param {number} z - The z scale. - * @return {BufferGeometry} A reference to this instance. - */ - scale(x: number, y: number, z: number): BufferGeometry; - /** - * Rotates the geometry to face a point in 3D space. This is typically done as a one time - * operation, and not during a loop. Use {@link Object3D#lookAt} for typical - * real-time mesh rotation. - * - * @param {Vector3} vector - The target point. - * @return {BufferGeometry} A reference to this instance. - */ - lookAt(vector: Vector3): BufferGeometry; - /** - * Center the geometry based on its bounding box. - * - * @return {BufferGeometry} A reference to this instance. - */ - center(): BufferGeometry; - /** - * Defines a geometry by creating a `position` attribute based on the given array of points. The array - * can hold 2D or 3D vectors. When using two-dimensional data, the `z` coordinate for all vertices is - * set to `0`. - * - * If the method is used with an existing `position` attribute, the vertex data are overwritten with the - * data from the array. The length of the array must match the vertex count. - * - * @param {Array|Array} points - The points. - * @return {BufferGeometry} A reference to this instance. - */ - setFromPoints(points: Array | Array): BufferGeometry; - /** - * Computes the bounding box of the geometry, and updates the `boundingBox` member. - * The bounding box is not computed by the engine; it must be computed by your app. - * You may need to recompute the bounding box if the geometry vertices are modified. - */ - computeBoundingBox(): void; - /** - * Computes the bounding sphere of the geometry, and updates the `boundingSphere` member. - * The engine automatically computes the bounding sphere when it is needed, e.g., for ray casting or view frustum culling. - * You may need to recompute the bounding sphere if the geometry vertices are modified. - */ - computeBoundingSphere(): void; - /** - * Calculates and adds a tangent attribute to this geometry. - * - * The computation is only supported for indexed geometries and if position, normal, and uv attributes - * are defined. When using a tangent space normal map, prefer the MikkTSpace algorithm provided by - * {@link BufferGeometryUtils#computeMikkTSpaceTangents} instead. - */ - computeTangents(): void; - /** - * Computes vertex normals for the given vertex data. For indexed geometries, the method sets - * each vertex normal to be the average of the face normals of the faces that share that vertex. - * For non-indexed geometries, vertices are not shared, and the method sets each vertex normal - * to be the same as the face normal. - */ - computeVertexNormals(): void; - /** - * Ensures every normal vector in a geometry will have a magnitude of `1`. This will - * correct lighting on the geometry surfaces. - */ - normalizeNormals(): void; - /** - * Return a new non-index version of this indexed geometry. If the geometry - * is already non-indexed, the method is a NOOP. - * - * @return {BufferGeometry} The non-indexed version of this indexed geometry. - */ - toNonIndexed(): BufferGeometry; - /** - * Serializes the geometry into JSON. - * - * @return {Object} A JSON object representing the serialized geometry. - */ - toJSON(): Object; - /** - * Returns a new geometry with copied values from this instance. - * - * @return {BufferGeometry} A clone of this instance. - */ - clone(): BufferGeometry; - /** - * Copies the values of the given geometry to this instance. - * - * @param {BufferGeometry} source - The geometry to copy. - * @return {BufferGeometry} A reference to this instance. - */ - copy(source: BufferGeometry): BufferGeometry; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - * - * @fires BufferGeometry#dispose - */ - dispose(): void; -} -import { EventDispatcher } from './EventDispatcher.js'; -import { BufferAttribute } from './BufferAttribute.js'; -import { Box3 } from '../math/Box3.js'; -import { Sphere } from '../math/Sphere.js'; -import { Matrix4 } from '../math/Matrix4.js'; -import { Vector3 } from '../math/Vector3.js'; -import { Vector2 } from '../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/core/Clock.d.ts b/jsdoc-testing/jsdoc/src/core/Clock.d.ts deleted file mode 100644 index d8945c215..000000000 --- a/jsdoc-testing/jsdoc/src/core/Clock.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -/** - * Class for keeping track of time. - * - * @deprecated since r183. - */ -export class Clock { - /** - * Constructs a new clock. - * - * @deprecated since 183. - * @param {boolean} [autoStart=true] - Whether to automatically start the clock when - * `getDelta()` is called for the first time. - */ - constructor(autoStart?: boolean); - /** - * If set to `true`, the clock starts automatically when `getDelta()` is called - * for the first time. - * - * @type {boolean} - * @default true - */ - autoStart: boolean; - /** - * Holds the time at which the clock's `start()` method was last called. - * - * @type {number} - * @default 0 - */ - startTime: number; - /** - * Holds the time at which the clock's `start()`, `getElapsedTime()` or - * `getDelta()` methods were last called. - * - * @type {number} - * @default 0 - */ - oldTime: number; - /** - * Keeps track of the total time that the clock has been running. - * - * @type {number} - * @default 0 - */ - elapsedTime: number; - /** - * Whether the clock is running or not. - * - * @type {boolean} - * @default true - */ - running: boolean; - /** - * Starts the clock. When `autoStart` is set to `true`, the method is automatically - * called by the class. - */ - start(): void; - /** - * Stops the clock. - */ - stop(): void; - /** - * Returns the elapsed time in seconds. - * - * @return {number} The elapsed time. - */ - getElapsedTime(): number; - /** - * Returns the delta time in seconds. - * - * @return {number} The delta time. - */ - getDelta(): number; -} diff --git a/jsdoc-testing/jsdoc/src/core/EventDispatcher.d.ts b/jsdoc-testing/jsdoc/src/core/EventDispatcher.d.ts deleted file mode 100644 index b53482ecc..000000000 --- a/jsdoc-testing/jsdoc/src/core/EventDispatcher.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * This modules allows to dispatch event objects on custom JavaScript objects. - * - * Main repository: [eventdispatcher.js](https://github.com/mrdoob/eventdispatcher.js/) - * - * Code Example: - * ```js - * class Car extends EventDispatcher { - * start() { - * this.dispatchEvent( { type: 'start', message: 'vroom vroom!' } ); - * } - *}; - * - * // Using events with the custom object - * const car = new Car(); - * car.addEventListener( 'start', function ( event ) { - * alert( event.message ); - * } ); - * - * car.start(); - * ``` - */ -export class EventDispatcher { - /** - * Adds the given event listener to the given event type. - * - * @param {string} type - The type of event to listen to. - * @param {Function} listener - The function that gets called when the event is fired. - */ - addEventListener(type: string, listener: Function): void; - _listeners: {} | undefined; - /** - * Returns `true` if the given event listener has been added to the given event type. - * - * @param {string} type - The type of event. - * @param {Function} listener - The listener to check. - * @return {boolean} Whether the given event listener has been added to the given event type. - */ - hasEventListener(type: string, listener: Function): boolean; - /** - * Removes the given event listener from the given event type. - * - * @param {string} type - The type of event. - * @param {Function} listener - The listener to remove. - */ - removeEventListener(type: string, listener: Function): void; - /** - * Dispatches an event object. - * - * @param {Object} event - The event that gets fired. - */ - dispatchEvent(event: Object): void; -} diff --git a/jsdoc-testing/jsdoc/src/core/GLBufferAttribute.d.ts b/jsdoc-testing/jsdoc/src/core/GLBufferAttribute.d.ts deleted file mode 100644 index 636d7b1e6..000000000 --- a/jsdoc-testing/jsdoc/src/core/GLBufferAttribute.d.ts +++ /dev/null @@ -1,122 +0,0 @@ -/** - * An alternative version of a buffer attribute with more control over the VBO. - * - * The renderer does not construct a VBO for this kind of attribute. Instead, it uses - * whatever VBO is passed in constructor and can later be altered via the `buffer` property. - * - * The most common use case for this class is when some kind of GPGPU calculation interferes - * or even produces the VBOs in question. - * - * Notice that this class can only be used with {@link WebGLRenderer}. - */ -export class GLBufferAttribute { - /** - * Constructs a new GL buffer attribute. - * - * @param {WebGLBuffer} buffer - The native WebGL buffer. - * @param {number} type - The native data type (e.g. `gl.FLOAT`). - * @param {number} itemSize - The item size. - * @param {number} elementSize - The corresponding size (in bytes) for the given `type` parameter. - * @param {number} count - The expected number of vertices in VBO. - * @param {boolean} [normalized=false] - Whether the data are normalized or not. - */ - constructor(buffer: WebGLBuffer, type: number, itemSize: number, elementSize: number, count: number, normalized?: boolean); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isGLBufferAttribute: boolean; - /** - * The name of the buffer attribute. - * - * @type {string} - */ - name: string; - /** - * The native WebGL buffer. - * - * @type {WebGLBuffer} - */ - buffer: WebGLBuffer; - /** - * The native data type. - * - * @type {number} - */ - type: number; - /** - * The item size, see {@link BufferAttribute#itemSize}. - * - * @type {number} - */ - itemSize: number; - /** - * The corresponding size (in bytes) for the given `type` parameter. - * - * @type {number} - */ - elementSize: number; - /** - * The expected number of vertices in VBO. - * - * @type {number} - */ - count: number; - /** - * Applies to integer data only. Indicates how the underlying data in the buffer maps to - * the values in the GLSL code. For instance, if `buffer` contains data of `gl.UNSIGNED_SHORT`, - * and `normalized` is `true`, the values `0 - +65535` in the buffer data will be mapped to - * `0.0f - +1.0f` in the GLSL attribute. If `normalized` is `false`, the values will be converted - * to floats unmodified, i.e. `65535` becomes `65535.0f`. - * - * @type {boolean} - */ - normalized: boolean; - /** - * A version number, incremented every time the `needsUpdate` is set to `true`. - * - * @type {number} - */ - version: number; - /** - * Flag to indicate that this attribute has changed and should be re-sent to - * the GPU. Set this to `true` when you modify the value of the array. - * - * @type {number} - * @default false - * @param {boolean} value - */ - set needsUpdate(value: boolean); - /** - * Sets the given native WebGL buffer. - * - * @param {WebGLBuffer} buffer - The buffer to set. - * @return {BufferAttribute} A reference to this instance. - */ - setBuffer(buffer: WebGLBuffer): BufferAttribute; - /** - * Sets the given native data type and element size. - * - * @param {number} type - The native data type (e.g. `gl.FLOAT`). - * @param {number} elementSize - The corresponding size (in bytes) for the given `type` parameter. - * @return {BufferAttribute} A reference to this instance. - */ - setType(type: number, elementSize: number): BufferAttribute; - /** - * Sets the item size. - * - * @param {number} itemSize - The item size. - * @return {BufferAttribute} A reference to this instance. - */ - setItemSize(itemSize: number): BufferAttribute; - /** - * Sets the count (the expected number of vertices in VBO). - * - * @param {number} count - The count. - * @return {BufferAttribute} A reference to this instance. - */ - setCount(count: number): BufferAttribute; -} diff --git a/jsdoc-testing/jsdoc/src/core/InstancedBufferAttribute.d.ts b/jsdoc-testing/jsdoc/src/core/InstancedBufferAttribute.d.ts deleted file mode 100644 index aed6b3ff4..000000000 --- a/jsdoc-testing/jsdoc/src/core/InstancedBufferAttribute.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * An instanced version of a buffer attribute. - * - * @augments BufferAttribute - */ -export class InstancedBufferAttribute extends BufferAttribute { - /** - * Constructs a new instanced buffer attribute. - * - * @param {TypedArray} array - The array holding the attribute data. - * @param {number} itemSize - The item size. - * @param {boolean} [normalized=false] - Whether the data are normalized or not. - * @param {number} [meshPerAttribute=1] - How often a value of this buffer attribute should be repeated. - */ - constructor(array: TypedArray, itemSize: number, normalized?: boolean, meshPerAttribute?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isInstancedBufferAttribute: boolean; - /** - * Defines how often a value of this buffer attribute should be repeated. A - * value of one means that each value of the instanced attribute is used for - * a single instance. A value of two means that each value is used for two - * consecutive instances (and so on). - * - * @type {number} - * @default 1 - */ - meshPerAttribute: number; - copy(source: any): this; -} -import { BufferAttribute } from './BufferAttribute.js'; diff --git a/jsdoc-testing/jsdoc/src/core/InstancedBufferGeometry.d.ts b/jsdoc-testing/jsdoc/src/core/InstancedBufferGeometry.d.ts deleted file mode 100644 index 4ea16abdd..000000000 --- a/jsdoc-testing/jsdoc/src/core/InstancedBufferGeometry.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * An instanced version of a geometry. - */ -export class InstancedBufferGeometry extends BufferGeometry { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isInstancedBufferGeometry: boolean; - /** - * The instance count. - * - * @type {number} - * @default Infinity - */ - instanceCount: number; - copy(source: any): this; -} -import { BufferGeometry } from './BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/core/InstancedInterleavedBuffer.d.ts b/jsdoc-testing/jsdoc/src/core/InstancedInterleavedBuffer.d.ts deleted file mode 100644 index 3f95ae1bb..000000000 --- a/jsdoc-testing/jsdoc/src/core/InstancedInterleavedBuffer.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * An instanced version of an interleaved buffer. - * - * @augments InterleavedBuffer - */ -export class InstancedInterleavedBuffer extends InterleavedBuffer { - /** - * Constructs a new instanced interleaved buffer. - * - * @param {TypedArray} array - A typed array with a shared buffer storing attribute data. - * @param {number} stride - The number of typed-array elements per vertex. - * @param {number} [meshPerAttribute=1] - Defines how often a value of this interleaved buffer should be repeated. - */ - constructor(array: TypedArray, stride: number, meshPerAttribute?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isInstancedInterleavedBuffer: boolean; - /** - * Defines how often a value of this buffer attribute should be repeated, - * see {@link InstancedBufferAttribute#meshPerAttribute}. - * - * @type {number} - * @default 1 - */ - meshPerAttribute: number; - copy(source: any): this; - clone(data: any): InterleavedBuffer; - toJSON(data: any): Object; -} -import { InterleavedBuffer } from './InterleavedBuffer.js'; diff --git a/jsdoc-testing/jsdoc/src/core/InterleavedBuffer.d.ts b/jsdoc-testing/jsdoc/src/core/InterleavedBuffer.d.ts deleted file mode 100644 index c6054ce83..000000000 --- a/jsdoc-testing/jsdoc/src/core/InterleavedBuffer.d.ts +++ /dev/null @@ -1,153 +0,0 @@ -/** - * "Interleaved" means that multiple attributes, possibly of different types, - * (e.g., position, normal, uv, color) are packed into a single array buffer. - * - * An introduction into interleaved arrays can be found here: [Interleaved array basics](https://blog.tojicode.com/2011/05/interleaved-array-basics.html) - */ -export class InterleavedBuffer { - /** - * Constructs a new interleaved buffer. - * - * @param {TypedArray} array - A typed array with a shared buffer storing attribute data. - * @param {number} stride - The number of typed-array elements per vertex. - */ - constructor(array: TypedArray, stride: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isInterleavedBuffer: boolean; - /** - * A typed array with a shared buffer storing attribute data. - * - * @type {TypedArray} - */ - array: TypedArray; - /** - * The number of typed-array elements per vertex. - * - * @type {number} - */ - stride: number; - /** - * The total number of elements in the array - * - * @type {number} - * @readonly - */ - readonly count: number; - /** - * Defines the intended usage pattern of the data store for optimization purposes. - * - * Note: After the initial use of a buffer, its usage cannot be changed. Instead, - * instantiate a new one and set the desired usage before the next render. - * - * @type {(StaticDrawUsage|DynamicDrawUsage|StreamDrawUsage|StaticReadUsage|DynamicReadUsage|StreamReadUsage|StaticCopyUsage|DynamicCopyUsage|StreamCopyUsage)} - * @default StaticDrawUsage - */ - usage: (number | DynamicDrawUsage | StreamDrawUsage | StaticReadUsage | DynamicReadUsage | StreamReadUsage | StaticCopyUsage | DynamicCopyUsage | StreamCopyUsage); - /** - * This can be used to only update some components of stored vectors (for example, just the - * component related to color). Use the `addUpdateRange()` function to add ranges to this array. - * - * @type {Array} - */ - updateRanges: Array; - /** - * A version number, incremented every time the `needsUpdate` is set to `true`. - * - * @type {number} - */ - version: number; - /** - * The UUID of the interleaved buffer. - * - * @type {string} - * @readonly - */ - readonly uuid: string; - /** - * A callback function that is executed after the renderer has transferred the attribute array - * data to the GPU. - */ - onUploadCallback(): void; - /** - * Flag to indicate that this attribute has changed and should be re-sent to - * the GPU. Set this to `true` when you modify the value of the array. - * - * @type {number} - * @default false - * @param {boolean} value - */ - set needsUpdate(value: boolean); - /** - * Sets the usage of this interleaved buffer. - * - * @param {(StaticDrawUsage|DynamicDrawUsage|StreamDrawUsage|StaticReadUsage|DynamicReadUsage|StreamReadUsage|StaticCopyUsage|DynamicCopyUsage|StreamCopyUsage)} value - The usage to set. - * @return {InterleavedBuffer} A reference to this interleaved buffer. - */ - setUsage(value: (number | DynamicDrawUsage | StreamDrawUsage | StaticReadUsage | DynamicReadUsage | StreamReadUsage | StaticCopyUsage | DynamicCopyUsage | StreamCopyUsage)): InterleavedBuffer; - /** - * Adds a range of data in the data array to be updated on the GPU. - * - * @param {number} start - Position at which to start update. - * @param {number} count - The number of components to update. - */ - addUpdateRange(start: number, count: number): void; - /** - * Clears the update ranges. - */ - clearUpdateRanges(): void; - /** - * Copies the values of the given interleaved buffer to this instance. - * - * @param {InterleavedBuffer} source - The interleaved buffer to copy. - * @return {InterleavedBuffer} A reference to this instance. - */ - copy(source: InterleavedBuffer): InterleavedBuffer; - /** - * Copies a vector from the given interleaved buffer to this one. The start - * and destination position in the attribute buffers are represented by the - * given indices. - * - * @param {number} index1 - The destination index into this interleaved buffer. - * @param {InterleavedBuffer} interleavedBuffer - The interleaved buffer to copy from. - * @param {number} index2 - The source index into the given interleaved buffer. - * @return {InterleavedBuffer} A reference to this instance. - */ - copyAt(index1: number, interleavedBuffer: InterleavedBuffer, index2: number): InterleavedBuffer; - /** - * Sets the given array data in the interleaved buffer. - * - * @param {(TypedArray|Array)} value - The array data to set. - * @param {number} [offset=0] - The offset in this interleaved buffer's array. - * @return {InterleavedBuffer} A reference to this instance. - */ - set(value: (TypedArray | any[]), offset?: number): InterleavedBuffer; - /** - * Returns a new interleaved buffer with copied values from this instance. - * - * @param {Object} [data] - An object with shared array buffers that allows to retain shared structures. - * @return {InterleavedBuffer} A clone of this instance. - */ - clone(data?: Object): InterleavedBuffer; - /** - * Sets the given callback function that is executed after the Renderer has transferred - * the array data to the GPU. Can be used to perform clean-up operations after - * the upload when data are not needed anymore on the CPU side. - * - * @param {Function} callback - The `onUpload()` callback. - * @return {InterleavedBuffer} A reference to this instance. - */ - onUpload(callback: Function): InterleavedBuffer; - /** - * Serializes the interleaved buffer into JSON. - * - * @param {Object} [data] - An optional value holding meta information about the serialization. - * @return {Object} A JSON object representing the serialized interleaved buffer. - */ - toJSON(data?: Object): Object; -} diff --git a/jsdoc-testing/jsdoc/src/core/InterleavedBufferAttribute.d.ts b/jsdoc-testing/jsdoc/src/core/InterleavedBufferAttribute.d.ts deleted file mode 100644 index 8fd60911e..000000000 --- a/jsdoc-testing/jsdoc/src/core/InterleavedBufferAttribute.d.ts +++ /dev/null @@ -1,226 +0,0 @@ -/** - * An alternative version of a buffer attribute with interleaved data. Interleaved - * attributes share a common interleaved data storage ({@link InterleavedBuffer}) and refer with - * different offsets into the buffer. - */ -export class InterleavedBufferAttribute { - /** - * Constructs a new interleaved buffer attribute. - * - * @param {InterleavedBuffer} interleavedBuffer - The buffer holding the interleaved data. - * @param {number} itemSize - The item size. - * @param {number} offset - The attribute offset into the buffer. - * @param {boolean} [normalized=false] - Whether the data are normalized or not. - */ - constructor(interleavedBuffer: InterleavedBuffer, itemSize: number, offset: number, normalized?: boolean); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isInterleavedBufferAttribute: boolean; - /** - * The name of the buffer attribute. - * - * @type {string} - */ - name: string; - /** - * The buffer holding the interleaved data. - * - * @type {InterleavedBuffer} - */ - data: InterleavedBuffer; - /** - * The item size, see {@link BufferAttribute#itemSize}. - * - * @type {number} - */ - itemSize: number; - /** - * The attribute offset into the buffer. - * - * @type {number} - */ - offset: number; - /** - * Whether the data are normalized or not, see {@link BufferAttribute#normalized} - * - * @type {InterleavedBuffer} - */ - normalized: InterleavedBuffer; - /** - * The item count of this buffer attribute. - * - * @type {number} - * @readonly - */ - readonly get count(): number; - /** - * The array holding the interleaved buffer attribute data. - * - * @type {TypedArray} - */ - get array(): TypedArray; - /** - * Flag to indicate that this attribute has changed and should be re-sent to - * the GPU. Set this to `true` when you modify the value of the array. - * - * @type {number} - * @default false - * @param {boolean} value - */ - set needsUpdate(value: boolean); - /** - * Applies the given 4x4 matrix to the given attribute. Only works with - * item size `3`. - * - * @param {Matrix4} m - The matrix to apply. - * @return {InterleavedBufferAttribute} A reference to this instance. - */ - applyMatrix4(m: Matrix4): InterleavedBufferAttribute; - /** - * Applies the given 3x3 normal matrix to the given attribute. Only works with - * item size `3`. - * - * @param {Matrix3} m - The normal matrix to apply. - * @return {InterleavedBufferAttribute} A reference to this instance. - */ - applyNormalMatrix(m: Matrix3): InterleavedBufferAttribute; - /** - * Applies the given 4x4 matrix to the given attribute. Only works with - * item size `3` and with direction vectors. - * - * @param {Matrix4} m - The matrix to apply. - * @return {InterleavedBufferAttribute} A reference to this instance. - */ - transformDirection(m: Matrix4): InterleavedBufferAttribute; - /** - * Returns the given component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @param {number} component - The component index. - * @return {number} The returned value. - */ - getComponent(index: number, component: number): number; - /** - * Sets the given value to the given component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @param {number} component - The component index. - * @param {number} value - The value to set. - * @return {InterleavedBufferAttribute} A reference to this instance. - */ - setComponent(index: number, component: number, value: number): InterleavedBufferAttribute; - /** - * Sets the x component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @param {number} x - The value to set. - * @return {InterleavedBufferAttribute} A reference to this instance. - */ - setX(index: number, x: number): InterleavedBufferAttribute; - /** - * Sets the y component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @param {number} y - The value to set. - * @return {InterleavedBufferAttribute} A reference to this instance. - */ - setY(index: number, y: number): InterleavedBufferAttribute; - /** - * Sets the z component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @param {number} z - The value to set. - * @return {InterleavedBufferAttribute} A reference to this instance. - */ - setZ(index: number, z: number): InterleavedBufferAttribute; - /** - * Sets the w component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @param {number} w - The value to set. - * @return {InterleavedBufferAttribute} A reference to this instance. - */ - setW(index: number, w: number): InterleavedBufferAttribute; - /** - * Returns the x component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @return {number} The x component. - */ - getX(index: number): number; - /** - * Returns the y component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @return {number} The y component. - */ - getY(index: number): number; - /** - * Returns the z component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @return {number} The z component. - */ - getZ(index: number): number; - /** - * Returns the w component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @return {number} The w component. - */ - getW(index: number): number; - /** - * Sets the x and y component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @param {number} x - The value for the x component to set. - * @param {number} y - The value for the y component to set. - * @return {InterleavedBufferAttribute} A reference to this instance. - */ - setXY(index: number, x: number, y: number): InterleavedBufferAttribute; - /** - * Sets the x, y and z component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @param {number} x - The value for the x component to set. - * @param {number} y - The value for the y component to set. - * @param {number} z - The value for the z component to set. - * @return {InterleavedBufferAttribute} A reference to this instance. - */ - setXYZ(index: number, x: number, y: number, z: number): InterleavedBufferAttribute; - /** - * Sets the x, y, z and w component of the vector at the given index. - * - * @param {number} index - The index into the buffer attribute. - * @param {number} x - The value for the x component to set. - * @param {number} y - The value for the y component to set. - * @param {number} z - The value for the z component to set. - * @param {number} w - The value for the w component to set. - * @return {InterleavedBufferAttribute} A reference to this instance. - */ - setXYZW(index: number, x: number, y: number, z: number, w: number): InterleavedBufferAttribute; - /** - * Returns a new buffer attribute with copied values from this instance. - * - * If no parameter is provided, cloning an interleaved buffer attribute will de-interleave buffer data. - * - * @param {Object} [data] - An object with interleaved buffers that allows to retain the interleaved property. - * @return {BufferAttribute|InterleavedBufferAttribute} A clone of this instance. - */ - clone(data?: Object): BufferAttribute | InterleavedBufferAttribute; - /** - * Serializes the buffer attribute into JSON. - * - * If no parameter is provided, cloning an interleaved buffer attribute will de-interleave buffer data. - * - * @param {Object} [data] - An optional value holding meta information about the serialization. - * @return {Object} A JSON object representing the serialized buffer attribute. - */ - toJSON(data?: Object): Object; -} -import { BufferAttribute } from './BufferAttribute.js'; diff --git a/jsdoc-testing/jsdoc/src/core/Layers.d.ts b/jsdoc-testing/jsdoc/src/core/Layers.d.ts deleted file mode 100644 index 34b3c6175..000000000 --- a/jsdoc-testing/jsdoc/src/core/Layers.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * A layers object assigns an 3D object to 1 or more of 32 - * layers numbered `0` to `31` - internally the layers are stored as a - * bit mask], and by default all 3D objects are a member of layer `0`. - * - * This can be used to control visibility - an object must share a layer with - * a camera to be visible when that camera's view is - * rendered. - * - * All classes that inherit from {@link Object3D} have an `layers` property which - * is an instance of this class. - */ -export class Layers { - /** - * A bit mask storing which of the 32 layers this layers object is currently - * a member of. - * - * @type {number} - */ - mask: number; - /** - * Sets membership to the given layer, and remove membership all other layers. - * - * @param {number} layer - The layer to set. - */ - set(layer: number): void; - /** - * Adds membership of the given layer. - * - * @param {number} layer - The layer to enable. - */ - enable(layer: number): void; - /** - * Adds membership to all layers. - */ - enableAll(): void; - /** - * Toggles the membership of the given layer. - * - * @param {number} layer - The layer to toggle. - */ - toggle(layer: number): void; - /** - * Removes membership of the given layer. - * - * @param {number} layer - The layer to enable. - */ - disable(layer: number): void; - /** - * Removes the membership from all layers. - */ - disableAll(): void; - /** - * Returns `true` if this and the given layers object have at least one - * layer in common. - * - * @param {Layers} layers - The layers to test. - * @return {boolean } Whether this and the given layers object have at least one layer in common or not. - */ - test(layers: Layers): boolean; - /** - * Returns `true` if the given layer is enabled. - * - * @param {number} layer - The layer to test. - * @return {boolean } Whether the given layer is enabled or not. - */ - isEnabled(layer: number): boolean; -} diff --git a/jsdoc-testing/jsdoc/src/core/Object3D.d.ts b/jsdoc-testing/jsdoc/src/core/Object3D.d.ts deleted file mode 100644 index b6e8715c8..000000000 --- a/jsdoc-testing/jsdoc/src/core/Object3D.d.ts +++ /dev/null @@ -1,584 +0,0 @@ -/** - * This is the base class for most objects in three.js and provides a set of - * properties and methods for manipulating objects in 3D space. - * - * @augments EventDispatcher - */ -export class Object3D extends EventDispatcher { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isObject3D: boolean; - /** - * The UUID of the 3D object. - * - * @type {string} - * @readonly - */ - readonly uuid: string; - /** - * The name of the 3D object. - * - * @type {string} - */ - name: string; - /** - * The type property is used for detecting the object type - * in context of serialization/deserialization. - * - * @type {string} - * @readonly - */ - readonly type: string; - /** - * A reference to the parent object. - * - * @type {?Object3D} - * @default null - */ - parent: Object3D | null; - /** - * An array holding the child 3D objects of this instance. - * - * @type {Array} - */ - children: Array; - /** - * Defines the `up` direction of the 3D object which influences - * the orientation via methods like {@link Object3D#lookAt}. - * - * The default values for all 3D objects is defined by `Object3D.DEFAULT_UP`. - * - * @type {Vector3} - */ - up: Vector3; - /** - * Represents the object's transformation matrix in local space. - * - * @type {Matrix4} - */ - matrix: Matrix4; - /** - * Represents the object's transformation matrix in world space. - * If the 3D object has no parent, then it's identical to the local transformation matrix - * - * @type {Matrix4} - */ - matrixWorld: Matrix4; - /** - * When set to `true`, the engine automatically computes the local matrix from position, - * rotation and scale every frame. If set to `false`, the app is responsible for recomputing - * the local matrix by calling `updateMatrix()`. - * - * The default values for all 3D objects is defined by `Object3D.DEFAULT_MATRIX_AUTO_UPDATE`. - * - * @type {boolean} - * @default true - */ - matrixAutoUpdate: boolean; - /** - * When set to `true`, the engine automatically computes the world matrix from the current local - * matrix and the object's transformation hierarchy. If set to `false`, the app is responsible for - * recomputing the world matrix by directly updating the `matrixWorld` property. - * - * The default values for all 3D objects is defined by `Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE`. - * - * @type {boolean} - * @default true - */ - matrixWorldAutoUpdate: boolean; - /** - * When set to `true`, it calculates the world matrix in that frame and resets this property - * to `false`. - * - * @type {boolean} - * @default false - */ - matrixWorldNeedsUpdate: boolean; - /** - * The layer membership of the 3D object. The 3D object is only visible if it has - * at least one layer in common with the camera in use. This property can also be - * used to filter out unwanted objects in ray-intersection tests when using {@link Raycaster}. - * - * @type {Layers} - */ - layers: Layers; - /** - * When set to `true`, the 3D object gets rendered. - * - * @type {boolean} - * @default true - */ - visible: boolean; - /** - * When set to `true`, the 3D object gets rendered into shadow maps. - * - * @type {boolean} - * @default false - */ - castShadow: boolean; - /** - * When set to `true`, the 3D object is affected by shadows in the scene. - * - * @type {boolean} - * @default false - */ - receiveShadow: boolean; - /** - * When set to `true`, the 3D object is honored by view frustum culling. - * - * @type {boolean} - * @default true - */ - frustumCulled: boolean; - /** - * This value allows the default rendering order of scene graph objects to be - * overridden although opaque and transparent objects remain sorted independently. - * When this property is set for an instance of {@link Group},all descendants - * objects will be sorted and rendered together. Sorting is from lowest to highest - * render order. - * - * @type {number} - * @default 0 - */ - renderOrder: number; - /** - * An array holding the animation clips of the 3D object. - * - * @type {Array} - */ - animations: Array; - /** - * Custom depth material to be used when rendering to the depth map. Can only be used - * in context of meshes. When shadow-casting with a {@link DirectionalLight} or {@link SpotLight}, - * if you are modifying vertex positions in the vertex shader you must specify a custom depth - * material for proper shadows. - * - * Only relevant in context of {@link WebGLRenderer}. - * - * @type {(Material|undefined)} - * @default undefined - */ - customDepthMaterial: (Material | undefined); - /** - * Same as {@link Object3D#customDepthMaterial}, but used with {@link PointLight}. - * - * Only relevant in context of {@link WebGLRenderer}. - * - * @type {(Material|undefined)} - * @default undefined - */ - customDistanceMaterial: (Material | undefined); - /** - * Whether the 3D object is supposed to be static or not. If set to `true`, it means - * the 3D object is not going to be changed after the initial renderer. This includes - * geometry and material settings. A static 3D object can be processed by the renderer - * slightly faster since certain state checks can be bypassed. - * - * Only relevant in context of {@link WebGPURenderer}. - * - * @type {boolean} - * @default false - */ - static: boolean; - /** - * An object that can be used to store custom data about the 3D object. It - * should not hold references to functions as these will not be cloned. - * - * @type {Object} - */ - userData: Object; - /** - * The pivot point for rotation and scale transformations. - * When set, rotation and scale are applied around this point - * instead of the object's origin. - * - * @type {?Vector3} - * @default null - */ - pivot: Vector3 | null; - /** - * A callback that is executed immediately before a 3D object is rendered to a shadow map. - * - * @param {Renderer|WebGLRenderer} renderer - The renderer. - * @param {Object3D} object - The 3D object. - * @param {Camera} camera - The camera that is used to render the scene. - * @param {Camera} shadowCamera - The shadow camera. - * @param {BufferGeometry} geometry - The 3D object's geometry. - * @param {Material} depthMaterial - The depth material. - * @param {Object} group - The geometry group data. - */ - onBeforeShadow(): void; - /** - * A callback that is executed immediately after a 3D object is rendered to a shadow map. - * - * @param {Renderer|WebGLRenderer} renderer - The renderer. - * @param {Object3D} object - The 3D object. - * @param {Camera} camera - The camera that is used to render the scene. - * @param {Camera} shadowCamera - The shadow camera. - * @param {BufferGeometry} geometry - The 3D object's geometry. - * @param {Material} depthMaterial - The depth material. - * @param {Object} group - The geometry group data. - */ - onAfterShadow(): void; - /** - * A callback that is executed immediately before a 3D object is rendered. - * - * @param {Renderer|WebGLRenderer} renderer - The renderer. - * @param {Object3D} object - The 3D object. - * @param {Camera} camera - The camera that is used to render the scene. - * @param {BufferGeometry} geometry - The 3D object's geometry. - * @param {Material} material - The 3D object's material. - * @param {Object} group - The geometry group data. - */ - onBeforeRender(): void; - /** - * A callback that is executed immediately after a 3D object is rendered. - * - * @param {Renderer|WebGLRenderer} renderer - The renderer. - * @param {Object3D} object - The 3D object. - * @param {Camera} camera - The camera that is used to render the scene. - * @param {BufferGeometry} geometry - The 3D object's geometry. - * @param {Material} material - The 3D object's material. - * @param {Object} group - The geometry group data. - */ - onAfterRender(): void; - /** - * Applies the given transformation matrix to the object and updates the object's position, - * rotation and scale. - * - * @param {Matrix4} matrix - The transformation matrix. - */ - applyMatrix4(matrix: Matrix4): void; - /** - * Applies a rotation represented by given the quaternion to the 3D object. - * - * @param {Quaternion} q - The quaternion. - * @return {Object3D} A reference to this instance. - */ - applyQuaternion(q: Quaternion): Object3D; - /** - * Sets the given rotation represented as an axis/angle couple to the 3D object. - * - * @param {Vector3} axis - The (normalized) axis vector. - * @param {number} angle - The angle in radians. - */ - setRotationFromAxisAngle(axis: Vector3, angle: number): void; - /** - * Sets the given rotation represented as Euler angles to the 3D object. - * - * @param {Euler} euler - The Euler angles. - */ - setRotationFromEuler(euler: Euler): void; - /** - * Sets the given rotation represented as rotation matrix to the 3D object. - * - * @param {Matrix4} m - Although a 4x4 matrix is expected, the upper 3x3 portion must be - * a pure rotation matrix (i.e, unscaled). - */ - setRotationFromMatrix(m: Matrix4): void; - /** - * Sets the given rotation represented as a Quaternion to the 3D object. - * - * @param {Quaternion} q - The Quaternion - */ - setRotationFromQuaternion(q: Quaternion): void; - /** - * Rotates the 3D object along an axis in local space. - * - * @param {Vector3} axis - The (normalized) axis vector. - * @param {number} angle - The angle in radians. - * @return {Object3D} A reference to this instance. - */ - rotateOnAxis(axis: Vector3, angle: number): Object3D; - /** - * Rotates the 3D object along an axis in world space. - * - * @param {Vector3} axis - The (normalized) axis vector. - * @param {number} angle - The angle in radians. - * @return {Object3D} A reference to this instance. - */ - rotateOnWorldAxis(axis: Vector3, angle: number): Object3D; - /** - * Rotates the 3D object around its X axis in local space. - * - * @param {number} angle - The angle in radians. - * @return {Object3D} A reference to this instance. - */ - rotateX(angle: number): Object3D; - /** - * Rotates the 3D object around its Y axis in local space. - * - * @param {number} angle - The angle in radians. - * @return {Object3D} A reference to this instance. - */ - rotateY(angle: number): Object3D; - /** - * Rotates the 3D object around its Z axis in local space. - * - * @param {number} angle - The angle in radians. - * @return {Object3D} A reference to this instance. - */ - rotateZ(angle: number): Object3D; - /** - * Translate the 3D object by a distance along the given axis in local space. - * - * @param {Vector3} axis - The (normalized) axis vector. - * @param {number} distance - The distance in world units. - * @return {Object3D} A reference to this instance. - */ - translateOnAxis(axis: Vector3, distance: number): Object3D; - /** - * Translate the 3D object by a distance along its X-axis in local space. - * - * @param {number} distance - The distance in world units. - * @return {Object3D} A reference to this instance. - */ - translateX(distance: number): Object3D; - /** - * Translate the 3D object by a distance along its Y-axis in local space. - * - * @param {number} distance - The distance in world units. - * @return {Object3D} A reference to this instance. - */ - translateY(distance: number): Object3D; - /** - * Translate the 3D object by a distance along its Z-axis in local space. - * - * @param {number} distance - The distance in world units. - * @return {Object3D} A reference to this instance. - */ - translateZ(distance: number): Object3D; - /** - * Converts the given vector from this 3D object's local space to world space. - * - * @param {Vector3} vector - The vector to convert. - * @return {Vector3} The converted vector. - */ - localToWorld(vector: Vector3): Vector3; - /** - * Converts the given vector from this 3D object's world space to local space. - * - * @param {Vector3} vector - The vector to convert. - * @return {Vector3} The converted vector. - */ - worldToLocal(vector: Vector3): Vector3; - /** - * Rotates the object to face a point in world space. - * - * This method does not support objects having non-uniformly-scaled parent(s). - * - * @param {number|Vector3} x - The x coordinate in world space. Alternatively, a vector representing a position in world space - * @param {number} [y] - The y coordinate in world space. - * @param {number} [z] - The z coordinate in world space. - */ - lookAt(x: number | Vector3, y?: number, z?: number): void; - /** - * Adds the given 3D object as a child to this 3D object. An arbitrary number of - * objects may be added. Any current parent on an object passed in here will be - * removed, since an object can have at most one parent. - * - * @fires Object3D#added - * @fires Object3D#childadded - * @param {Object3D} object - The 3D object to add. - * @return {Object3D} A reference to this instance. - */ - add(object: Object3D, ...args: any[]): Object3D; - /** - * Removes the given 3D object as child from this 3D object. - * An arbitrary number of objects may be removed. - * - * @fires Object3D#removed - * @fires Object3D#childremoved - * @param {Object3D} object - The 3D object to remove. - * @return {Object3D} A reference to this instance. - */ - remove(object: Object3D, ...args: any[]): Object3D; - /** - * Removes this 3D object from its current parent. - * - * @fires Object3D#removed - * @fires Object3D#childremoved - * @return {Object3D} A reference to this instance. - */ - removeFromParent(): Object3D; - /** - * Removes all child objects. - * - * @fires Object3D#removed - * @fires Object3D#childremoved - * @return {Object3D} A reference to this instance. - */ - clear(): Object3D; - /** - * Adds the given 3D object as a child of this 3D object, while maintaining the object's world - * transform. This method does not support scene graphs having non-uniformly-scaled nodes(s). - * - * @fires Object3D#added - * @fires Object3D#childadded - * @param {Object3D} object - The 3D object to attach. - * @return {Object3D} A reference to this instance. - */ - attach(object: Object3D): Object3D; - /** - * Searches through the 3D object and its children, starting with the 3D object - * itself, and returns the first with a matching ID. - * - * @param {number} id - The id. - * @return {Object3D|undefined} The found 3D object. Returns `undefined` if no 3D object has been found. - */ - getObjectById(id: number): Object3D | undefined; - /** - * Searches through the 3D object and its children, starting with the 3D object - * itself, and returns the first with a matching name. - * - * @param {string} name - The name. - * @return {Object3D|undefined} The found 3D object. Returns `undefined` if no 3D object has been found. - */ - getObjectByName(name: string): Object3D | undefined; - /** - * Searches through the 3D object and its children, starting with the 3D object - * itself, and returns the first with a matching property value. - * - * @param {string} name - The name of the property. - * @param {any} value - The value. - * @return {Object3D|undefined} The found 3D object. Returns `undefined` if no 3D object has been found. - */ - getObjectByProperty(name: string, value: any): Object3D | undefined; - /** - * Searches through the 3D object and its children, starting with the 3D object - * itself, and returns all 3D objects with a matching property value. - * - * @param {string} name - The name of the property. - * @param {any} value - The value. - * @param {Array} result - The method stores the result in this array. - * @return {Array} The found 3D objects. - */ - getObjectsByProperty(name: string, value: any, result?: Array): Array; - /** - * Returns a vector representing the position of the 3D object in world space. - * - * @param {Vector3} target - The target vector the result is stored to. - * @return {Vector3} The 3D object's position in world space. - */ - getWorldPosition(target: Vector3): Vector3; - /** - * Returns a Quaternion representing the position of the 3D object in world space. - * - * @param {Quaternion} target - The target Quaternion the result is stored to. - * @return {Quaternion} The 3D object's rotation in world space. - */ - getWorldQuaternion(target: Quaternion): Quaternion; - /** - * Returns a vector representing the scale of the 3D object in world space. - * - * @param {Vector3} target - The target vector the result is stored to. - * @return {Vector3} The 3D object's scale in world space. - */ - getWorldScale(target: Vector3): Vector3; - /** - * Returns a vector representing the ("look") direction of the 3D object in world space. - * - * @param {Vector3} target - The target vector the result is stored to. - * @return {Vector3} The 3D object's direction in world space. - */ - getWorldDirection(target: Vector3): Vector3; - /** - * Abstract method to get intersections between a casted ray and this - * 3D object. Renderable 3D objects such as {@link Mesh}, {@link Line} or {@link Points} - * implement this method in order to use raycasting. - * - * @abstract - * @param {Raycaster} raycaster - The raycaster. - * @param {Array} intersects - An array holding the result of the method. - */ - raycast(): void; - /** - * Executes the callback on this 3D object and all descendants. - * - * Note: Modifying the scene graph inside the callback is discouraged. - * - * @param {Function} callback - A callback function that allows to process the current 3D object. - */ - traverse(callback: Function): void; - /** - * Like {@link Object3D#traverse}, but the callback will only be executed for visible 3D objects. - * Descendants of invisible 3D objects are not traversed. - * - * Note: Modifying the scene graph inside the callback is discouraged. - * - * @param {Function} callback - A callback function that allows to process the current 3D object. - */ - traverseVisible(callback: Function): void; - /** - * Like {@link Object3D#traverse}, but the callback will only be executed for all ancestors. - * - * Note: Modifying the scene graph inside the callback is discouraged. - * - * @param {Function} callback - A callback function that allows to process the current 3D object. - */ - traverseAncestors(callback: Function): void; - /** - * Updates the transformation matrix in local space by computing it from the current - * position, rotation and scale values. - */ - updateMatrix(): void; - /** - * Updates the transformation matrix in world space of this 3D objects and its descendants. - * - * To ensure correct results, this method also recomputes the 3D object's transformation matrix in - * local space. The computation of the local and world matrix can be controlled with the - * {@link Object3D#matrixAutoUpdate} and {@link Object3D#matrixWorldAutoUpdate} flags which are both - * `true` by default. Set these flags to `false` if you need more control over the update matrix process. - * - * @param {boolean} [force=false] - When set to `true`, a recomputation of world matrices is forced even - * when {@link Object3D#matrixWorldNeedsUpdate} is `false`. - */ - updateMatrixWorld(force?: boolean): void; - /** - * An alternative version of {@link Object3D#updateMatrixWorld} with more control over the - * update of ancestor and descendant nodes. - * - * @param {boolean} [updateParents=false] Whether ancestor nodes should be updated or not. - * @param {boolean} [updateChildren=false] Whether descendant nodes should be updated or not. - */ - updateWorldMatrix(updateParents?: boolean, updateChildren?: boolean): void; - /** - * Serializes the 3D object into JSON. - * - * @param {?(Object|string)} meta - An optional value holding meta information about the serialization. - * @return {Object} A JSON object representing the serialized 3D object. - * @see {@link ObjectLoader#parse} - */ - toJSON(meta: (Object | string) | null): Object; - /** - * Returns a new 3D object with copied values from this instance. - * - * @param {boolean} [recursive=true] - When set to `true`, descendants of the 3D object are also cloned. - * @return {Object3D} A clone of this instance. - */ - clone(recursive?: boolean): Object3D; - /** - * Copies the values of the given 3D object to this instance. - * - * @param {Object3D} source - The 3D object to copy. - * @param {boolean} [recursive=true] - When set to `true`, descendants of the 3D object are cloned. - * @return {Object3D} A reference to this instance. - */ - copy(source: Object3D, recursive?: boolean): Object3D; -} -export namespace Object3D { - let DEFAULT_UP: Vector3; - let DEFAULT_MATRIX_AUTO_UPDATE: boolean; - let DEFAULT_MATRIX_WORLD_AUTO_UPDATE: boolean; -} -import { EventDispatcher } from './EventDispatcher.js'; -import { Vector3 } from '../math/Vector3.js'; -import { Matrix4 } from '../math/Matrix4.js'; -import { Layers } from './Layers.js'; -import { Quaternion } from '../math/Quaternion.js'; -import { Euler } from '../math/Euler.js'; diff --git a/jsdoc-testing/jsdoc/src/core/Raycaster.d.ts b/jsdoc-testing/jsdoc/src/core/Raycaster.d.ts deleted file mode 100644 index aed4ba48a..000000000 --- a/jsdoc-testing/jsdoc/src/core/Raycaster.d.ts +++ /dev/null @@ -1,145 +0,0 @@ -/** - * This class is designed to assist with raycasting. Raycasting is used for - * mouse picking (working out what objects in the 3d space the mouse is over) - * amongst other things. - */ -export class Raycaster { - /** - * Constructs a new raycaster. - * - * @param {Vector3} origin - The origin vector where the ray casts from. - * @param {Vector3} direction - The (normalized) direction vector that gives direction to the ray. - * @param {number} [near=0] - All results returned are further away than near. Near can't be negative. - * @param {number} [far=Infinity] - All results returned are closer than far. Far can't be lower than near. - */ - constructor(origin: Vector3, direction: Vector3, near?: number, far?: number); - /** - * The ray used for raycasting. - * - * @type {Ray} - */ - ray: Ray; - /** - * All results returned are further away than near. Near can't be negative. - * - * @type {number} - * @default 0 - */ - near: number; - /** - * All results returned are closer than far. Far can't be lower than near. - * - * @type {number} - * @default Infinity - */ - far: number; - /** - * The camera to use when raycasting against view-dependent objects such as - * billboarded objects like sprites. This field can be set manually or - * is set when calling `setFromCamera()`. - * - * @type {?Camera} - * @default null - */ - camera: Camera | null; - /** - * Allows to selectively ignore 3D objects when performing intersection tests. - * The following code example ensures that only 3D objects on layer `1` will be - * honored by raycaster. - * ```js - * raycaster.layers.set( 1 ); - * object.layers.enable( 1 ); - * ``` - * - * @type {Layers} - */ - layers: Layers; - /** - * A parameter object that configures the raycasting. It has the structure: - * - * ``` - * { - * Mesh: {}, - * Line: { threshold: 1 }, - * LOD: {}, - * Points: { threshold: 1 }, - * Sprite: {} - * } - * ``` - * Where `threshold` is the precision of the raycaster when intersecting objects, in world units. - * - * @type {Object} - */ - params: Object; - /** - * Updates the ray with a new origin and direction by copying the values from the arguments. - * - * @param {Vector3} origin - The origin vector where the ray casts from. - * @param {Vector3} direction - The (normalized) direction vector that gives direction to the ray. - */ - set(origin: Vector3, direction: Vector3): void; - /** - * Uses the given coordinates and camera to compute a new origin and direction for the internal ray. - * - * @param {Vector2} coords - 2D coordinates of the mouse, in normalized device coordinates (NDC). - * X and Y components should be between `-1` and `1`. - * @param {Camera} camera - The camera from which the ray should originate. - */ - setFromCamera(coords: Vector2, camera: Camera): void; - /** - * Uses the given WebXR controller to compute a new origin and direction for the internal ray. - * - * @param {WebXRController} controller - The controller to copy the position and direction from. - * @return {Raycaster} A reference to this raycaster. - */ - setFromXRController(controller: WebXRController): Raycaster; - /** - * The intersection point of a raycaster intersection test. - * @typedef {Object} Raycaster~Intersection - * @property {number} distance - The distance from the ray's origin to the intersection point. - * @property {number} distanceToRay - Some 3D objects e.g. {@link Points} provide the distance of the - * intersection to the nearest point on the ray. For other objects it will be `undefined`. - * @property {Vector3} point - The intersection point, in world coordinates. - * @property {Object} face - The face that has been intersected. - * @property {number} faceIndex - The face index. - * @property {Object3D} object - The 3D object that has been intersected. - * @property {Vector2} uv - U,V coordinates at point of intersection. - * @property {Vector2} uv1 - Second set of U,V coordinates at point of intersection. - * @property {Vector3} normal - Interpolated normal vector at point of intersection. - * @property {number} instanceId - The index number of the instance where the ray - * intersects the {@link InstancedMesh}. - */ - /** - * Checks all intersection between the ray and the object with or without the - * descendants. Intersections are returned sorted by distance, closest first. - * - * `Raycaster` delegates to the `raycast()` method of the passed 3D object, when - * evaluating whether the ray intersects the object or not. This allows meshes to respond - * differently to ray casting than lines or points. - * - * Note that for meshes, faces must be pointed towards the origin of the ray in order - * to be detected; intersections of the ray passing through the back of a face will not - * be detected. To raycast against both faces of an object, you'll want to set {@link Material#side} - * to `THREE.DoubleSide`. - * - * @param {Object3D} object - The 3D object to check for intersection with the ray. - * @param {boolean} [recursive=true] - If set to `true`, it also checks all descendants. - * Otherwise it only checks intersection with the object. - * @param {Array} [intersects=[]] The target array that holds the result of the method. - * @return {Array} An array holding the intersection points. - */ - intersectObject(object: Object3D, recursive?: boolean, intersects?: any[]): Array; - /** - * Checks all intersection between the ray and the objects with or without - * the descendants. Intersections are returned sorted by distance, closest first. - * - * @param {Array} objects - The 3D objects to check for intersection with the ray. - * @param {boolean} [recursive=true] - If set to `true`, it also checks all descendants. - * Otherwise it only checks intersection with the object. - * @param {Array} [intersects=[]] The target array that holds the result of the method. - * @return {Array} An array holding the intersection points. - */ - intersectObjects(objects: Array, recursive?: boolean, intersects?: any[]): Array; -} -import { Ray } from '../math/Ray.js'; -import { Layers } from './Layers.js'; diff --git a/jsdoc-testing/jsdoc/src/core/RenderTarget.d.ts b/jsdoc-testing/jsdoc/src/core/RenderTarget.d.ts deleted file mode 100644 index 1b6fe91ad..000000000 --- a/jsdoc-testing/jsdoc/src/core/RenderTarget.d.ts +++ /dev/null @@ -1,207 +0,0 @@ -/** - * A render target is a buffer where the video card draws pixels for a scene - * that is being rendered in the background. It is used in different effects, - * such as applying postprocessing to a rendered image before displaying it - * on the screen. - * - * @augments EventDispatcher - */ -export class RenderTarget extends EventDispatcher { - /** - * Render target options. - * - * @typedef {Object} RenderTarget~Options - * @property {boolean} [generateMipmaps=false] - Whether to generate mipmaps or not. - * @property {number} [magFilter=LinearFilter] - The mag filter. - * @property {number} [minFilter=LinearFilter] - The min filter. - * @property {number} [format=RGBAFormat] - The texture format. - * @property {number} [type=UnsignedByteType] - The texture type. - * @property {?string} [internalFormat=null] - The texture's internal format. - * @property {number} [wrapS=ClampToEdgeWrapping] - The texture's uv wrapping mode. - * @property {number} [wrapT=ClampToEdgeWrapping] - The texture's uv wrapping mode. - * @property {number} [anisotropy=1] - The texture's anisotropy value. - * @property {string} [colorSpace=NoColorSpace] - The texture's color space. - * @property {boolean} [depthBuffer=true] - Whether to allocate a depth buffer or not. - * @property {boolean} [stencilBuffer=false] - Whether to allocate a stencil buffer or not. - * @property {boolean} [resolveDepthBuffer=true] - Whether to resolve the depth buffer or not. - * @property {boolean} [resolveStencilBuffer=true] - Whether to resolve the stencil buffer or not. - * @property {?Texture} [depthTexture=null] - Reference to a depth texture. - * @property {number} [samples=0] - The MSAA samples count. - * @property {number} [count=1] - Defines the number of color attachments . Must be at least `1`. - * @property {number} [depth=1] - The texture depth. - * @property {boolean} [multiview=false] - Whether this target is used for multiview rendering (WebGL OVR_multiview2 extension). - * @property {boolean} [useArrayDepthTexture=false] - Whether to create the depth texture as an array texture for per-layer depth testing. This is separate from multiview so layered render targets can use array depth without the multiview extension. - */ - /** - * Constructs a new render target. - * - * @param {number} [width=1] - The width of the render target. - * @param {number} [height=1] - The height of the render target. - * @param {RenderTarget~Options} [options] - The configuration object. - */ - constructor(width?: number, height?: number, options?: {}); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isRenderTarget: boolean; - /** - * The width of the render target. - * - * @type {number} - * @default 1 - */ - width: number; - /** - * The height of the render target. - * - * @type {number} - * @default 1 - */ - height: number; - /** - * The depth of the render target. - * - * @type {number} - * @default 1 - */ - depth: number; - /** - * A rectangular area inside the render target's viewport. Fragments that are - * outside the area will be discarded. - * - * @type {Vector4} - * @default (0,0,width,height) - */ - scissor: Vector4; - /** - * Indicates whether the scissor test should be enabled when rendering into - * this render target or not. - * - * @type {boolean} - * @default false - */ - scissorTest: boolean; - /** - * A rectangular area representing the render target's viewport. - * - * @type {Vector4} - * @default (0,0,width,height) - */ - viewport: Vector4; - /** - * An array of textures. Each color attachment is represented as a separate texture. - * Has at least a single entry for the default color attachment. - * - * @type {Array} - */ - textures: Array; - /** - * Whether to allocate a depth buffer or not. - * - * @type {boolean} - * @default true - */ - depthBuffer: boolean; - /** - * Whether to allocate a stencil buffer or not. - * - * @type {boolean} - * @default false - */ - stencilBuffer: boolean; - /** - * Whether to resolve the depth buffer or not. - * - * @type {boolean} - * @default true - */ - resolveDepthBuffer: boolean; - /** - * Whether to resolve the stencil buffer or not. - * - * @type {boolean} - * @default true - */ - resolveStencilBuffer: boolean; - _depthTexture: any; - set depthTexture(current: DepthTexture | null); - /** - * Instead of saving the depth in a renderbuffer, a texture - * can be used instead which is useful for further processing - * e.g. in context of post-processing. - * - * @type {?DepthTexture} - * @default null - */ - get depthTexture(): DepthTexture | null; - /** - * The number of MSAA samples. - * - * A value of `0` disables MSAA. - * - * @type {number} - * @default 0 - */ - samples: number; - /** - * Whether to this target is used in multiview rendering. - * - * @type {boolean} - * @default false - */ - multiview: boolean; - /** - * Whether to create the depth texture as an array texture for per-layer depth testing. - * This is separate from multiview so layered render targets can use array depth without - * the multiview extension. - * - * @type {boolean} - * @default false - */ - useArrayDepthTexture: boolean; - _setTextureOptions(options?: {}): void; - set texture(value: Texture); - /** - * The texture representing the default color attachment. - * - * @type {Texture} - */ - get texture(): Texture; - /** - * Sets the size of this render target. - * - * @param {number} width - The width. - * @param {number} height - The height. - * @param {number} [depth=1] - The depth. - */ - setSize(width: number, height: number, depth?: number): void; - /** - * Returns a new render target with copied values from this instance. - * - * @return {RenderTarget} A clone of this instance. - */ - clone(): RenderTarget; - /** - * Copies the settings of the given render target. This is a structural copy so - * no resources are shared between render targets after the copy. That includes - * all MRT textures and the depth texture. - * - * @param {RenderTarget} source - The render target to copy. - * @return {RenderTarget} A reference to this instance. - */ - copy(source: RenderTarget): RenderTarget; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - * - * @fires RenderTarget#dispose - */ - dispose(): void; -} -import { EventDispatcher } from './EventDispatcher.js'; -import { Vector4 } from '../math/Vector4.js'; -import { Texture } from '../textures/Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/core/RenderTarget3D.d.ts b/jsdoc-testing/jsdoc/src/core/RenderTarget3D.d.ts deleted file mode 100644 index 11621efd2..000000000 --- a/jsdoc-testing/jsdoc/src/core/RenderTarget3D.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Represents a 3D render target. - * - * @augments RenderTarget - */ -export class RenderTarget3D extends RenderTarget { - /** - * Constructs a new 3D render target. - * - * @param {number} [width=1] - The width of the render target. - * @param {number} [height=1] - The height of the render target. - * @param {number} [depth=1] - The height of the render target. - * @param {RenderTarget~Options} [options] - The configuration object. - */ - constructor(width?: number, height?: number, depth?: number, options?: {}); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isRenderTarget3D: boolean; -} -import { RenderTarget } from './RenderTarget.js'; diff --git a/jsdoc-testing/jsdoc/src/core/Timer.d.ts b/jsdoc-testing/jsdoc/src/core/Timer.d.ts deleted file mode 100644 index d47c2d4bd..000000000 --- a/jsdoc-testing/jsdoc/src/core/Timer.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This class is an alternative to {@link Clock} with a different API design and behavior. - * The goal is to avoid the conceptual flaws that became apparent in `Clock` over time. - * - * - `Timer` has an `update()` method that updates its internal state. That makes it possible to - * call `getDelta()` and `getElapsed()` multiple times per simulation step without getting different values. - * - The class can make use of the Page Visibility API to avoid large time delta values when the app - * is inactive (e.g. tab switched or browser hidden). - * - * ```js - * const timer = new Timer(); - * timer.connect( document ); // use Page Visibility API - * ``` - */ -export class Timer { - _previousTime: number; - _currentTime: number; - _startTime: number; - _delta: number; - _elapsed: number; - _timescale: number; - _document: Document | null; - _pageVisibilityHandler: typeof handleVisibilityChange | null; - /** - * Connect the timer to the given document.Calling this method is not mandatory to - * use the timer but enables the usage of the Page Visibility API to avoid large time - * delta values. - * - * @param {Document} document - The document. - */ - connect(document: Document): void; - /** - * Disconnects the timer from the DOM and also disables the usage of the Page Visibility API. - */ - disconnect(): void; - /** - * Returns the time delta in seconds. - * - * @return {number} The time delta in second. - */ - getDelta(): number; - /** - * Returns the elapsed time in seconds. - * - * @return {number} The elapsed time in second. - */ - getElapsed(): number; - /** - * Returns the timescale. - * - * @return {number} The timescale. - */ - getTimescale(): number; - /** - * Sets the given timescale which scale the time delta computation - * in `update()`. - * - * @param {number} timescale - The timescale to set. - * @return {Timer} A reference to this timer. - */ - setTimescale(timescale: number): Timer; - /** - * Resets the time computation for the current simulation step. - * - * @return {Timer} A reference to this timer. - */ - reset(): Timer; - /** - * Can be used to free all internal resources. Usually called when - * the timer instance isn't required anymore. - */ - dispose(): void; - /** - * Updates the internal state of the timer. This method should be called - * once per simulation step and before you perform queries against the timer - * (e.g. via `getDelta()`). - * - * @param {number} timestamp - The current time in milliseconds. Can be obtained - * from the `requestAnimationFrame` callback argument. If not provided, the current - * time will be determined with `performance.now`. - * @return {Timer} A reference to this timer. - */ - update(timestamp: number): Timer; -} -declare function handleVisibilityChange(): void; -export {}; diff --git a/jsdoc-testing/jsdoc/src/core/Uniform.d.ts b/jsdoc-testing/jsdoc/src/core/Uniform.d.ts deleted file mode 100644 index 4febfde95..000000000 --- a/jsdoc-testing/jsdoc/src/core/Uniform.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Represents a uniform which is a global shader variable. They are passed to shader programs. - * - * When declaring a uniform of a {@link ShaderMaterial}, it is declared by value or by object. - * ```js - * uniforms: { - * time: { value: 1.0 }, - * resolution: new Uniform( new Vector2() ) - * }; - * ``` - * Since this class can only be used in context of {@link ShaderMaterial}, it is only supported - * in {@link WebGLRenderer}. - */ -export class Uniform { - /** - * Constructs a new uniform. - * - * @param {any} value - The uniform value. - */ - constructor(value: any); - /** - * The uniform value. - * - * @type {any} - */ - value: any; - /** - * Returns a new uniform with copied values from this instance. - * If the value has a `clone()` method, the value is cloned as well. - * - * @return {Uniform} A clone of this instance. - */ - clone(): Uniform; -} diff --git a/jsdoc-testing/jsdoc/src/core/UniformsGroup.d.ts b/jsdoc-testing/jsdoc/src/core/UniformsGroup.d.ts deleted file mode 100644 index fd08bb44b..000000000 --- a/jsdoc-testing/jsdoc/src/core/UniformsGroup.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -/** - * A class for managing multiple uniforms in a single group. The renderer will process - * such a definition as a single UBO. - * - * Since this class can only be used in context of {@link ShaderMaterial}, it is only supported - * in {@link WebGLRenderer}. - * - * @augments EventDispatcher - */ -export class UniformsGroup extends EventDispatcher { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isUniformsGroup: boolean; - /** - * The name of the uniforms group. - * - * @type {string} - */ - name: string; - /** - * The buffer usage. - * - * @type {(StaticDrawUsage|DynamicDrawUsage|StreamDrawUsage|StaticReadUsage|DynamicReadUsage|StreamReadUsage|StaticCopyUsage|DynamicCopyUsage|StreamCopyUsage)} - * @default StaticDrawUsage - */ - usage: (number | DynamicDrawUsage | StreamDrawUsage | StaticReadUsage | DynamicReadUsage | StreamReadUsage | StaticCopyUsage | DynamicCopyUsage | StreamCopyUsage); - /** - * An array holding the uniforms. - * - * @type {Array} - */ - uniforms: Array; - /** - * Adds the given uniform to this uniforms group. - * - * @param {Uniform} uniform - The uniform to add. - * @return {UniformsGroup} A reference to this uniforms group. - */ - add(uniform: Uniform): UniformsGroup; - /** - * Removes the given uniform from this uniforms group. - * - * @param {Uniform} uniform - The uniform to remove. - * @return {UniformsGroup} A reference to this uniforms group. - */ - remove(uniform: Uniform): UniformsGroup; - /** - * Sets the name of this uniforms group. - * - * @param {string} name - The name to set. - * @return {UniformsGroup} A reference to this uniforms group. - */ - setName(name: string): UniformsGroup; - /** - * Sets the usage of this uniforms group. - * - * @param {(StaticDrawUsage|DynamicDrawUsage|StreamDrawUsage|StaticReadUsage|DynamicReadUsage|StreamReadUsage|StaticCopyUsage|DynamicCopyUsage|StreamCopyUsage)} value - The usage to set. - * @return {UniformsGroup} A reference to this uniforms group. - */ - setUsage(value: (number | DynamicDrawUsage | StreamDrawUsage | StaticReadUsage | DynamicReadUsage | StreamReadUsage | StaticCopyUsage | DynamicCopyUsage | StreamCopyUsage)): UniformsGroup; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - * - * @fires Texture#dispose - */ - dispose(): void; - /** - * Copies the values of the given uniforms group to this instance. - * - * @param {UniformsGroup} source - The uniforms group to copy. - * @return {UniformsGroup} A reference to this uniforms group. - */ - copy(source: UniformsGroup): UniformsGroup; - /** - * Returns a new uniforms group with copied values from this instance. - * - * @return {UniformsGroup} A clone of this instance. - */ - clone(): UniformsGroup; -} -import { EventDispatcher } from './EventDispatcher.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/Controls.d.ts b/jsdoc-testing/jsdoc/src/extras/Controls.d.ts deleted file mode 100644 index f9b5a381f..000000000 --- a/jsdoc-testing/jsdoc/src/extras/Controls.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Abstract base class for controls. - * - * @abstract - * @augments EventDispatcher - */ -export class Controls extends EventDispatcher { - /** - * Constructs a new controls instance. - * - * @param {Object3D} object - The object that is managed by the controls. - * @param {?HTMLElement} domElement - The HTML element used for event listeners. - */ - constructor(object: Object3D, domElement?: HTMLElement | null); - /** - * The object that is managed by the controls. - * - * @type {Object3D} - */ - object: Object3D; - /** - * The HTML element used for event listeners. - * - * @type {?HTMLElement} - * @default null - */ - domElement: HTMLElement | null; - /** - * Whether the controls responds to user input or not. - * - * @type {boolean} - * @default true - */ - enabled: boolean; - /** - * The internal state of the controls. - * - * @type {number} - * @default -1 - */ - state: number; - /** - * This object defines the keyboard input of the controls. - * - * @type {Object} - */ - keys: Object; - /** - * This object defines what type of actions are assigned to the available mouse buttons. - * It depends on the control implementation what kind of mouse buttons and actions are supported. - * - * @type {{LEFT: ?number, MIDDLE: ?number, RIGHT: ?number}} - */ - mouseButtons: { - LEFT: number | null; - MIDDLE: number | null; - RIGHT: number | null; - }; - /** - * This object defines what type of actions are assigned to what kind of touch interaction. - * It depends on the control implementation what kind of touch interaction and actions are supported. - * - * @type {{ONE: ?number, TWO: ?number}} - */ - touches: { - ONE: number | null; - TWO: number | null; - }; - /** - * Connects the controls to the DOM. This method has so called "side effects" since - * it adds the module's event listeners to the DOM. - * - * @param {HTMLElement} element - The DOM element to connect to. - */ - connect(element: HTMLElement): void; - /** - * Disconnects the controls from the DOM. - */ - disconnect(): void; - /** - * Call this method if you no longer want use to the controls. It frees all internal - * resources and removes all event listeners. - */ - dispose(): void; - /** - * Controls should implement this method if they have to update their internal state - * per simulation step. - * - * @param {number} [delta] - The time delta in seconds. - */ - update(): void; -} -import { EventDispatcher } from '../core/EventDispatcher.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/DataUtils.d.ts b/jsdoc-testing/jsdoc/src/extras/DataUtils.d.ts deleted file mode 100644 index 66cfe1590..000000000 --- a/jsdoc-testing/jsdoc/src/extras/DataUtils.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Returns a half precision floating point value (FP16) from the given single - * precision floating point value (FP32). - * - * @param {number} val - A single precision floating point value. - * @return {number} The FP16 value. - */ -export function toHalfFloat(val: number): number; -/** - * Returns a single precision floating point value (FP32) from the given half - * precision floating point value (FP16). - * - * @param {number} val - A half precision floating point value. - * @return {number} The FP32 value. - */ -export function fromHalfFloat(val: number): number; -/** - * A class containing utility functions for data. - * - * @hideconstructor - */ -export class DataUtils { - /** - * Returns a half precision floating point value (FP16) from the given single - * precision floating point value (FP32). - * - * @param {number} val - A single precision floating point value. - * @return {number} The FP16 value. - */ - static toHalfFloat(val: number): number; - /** - * Returns a single precision floating point value (FP32) from the given half - * precision floating point value (FP16). - * - * @param {number} val - A half precision floating point value. - * @return {number} The FP32 value. - */ - static fromHalfFloat(val: number): number; -} diff --git a/jsdoc-testing/jsdoc/src/extras/Earcut.d.ts b/jsdoc-testing/jsdoc/src/extras/Earcut.d.ts deleted file mode 100644 index 77d051e6a..000000000 --- a/jsdoc-testing/jsdoc/src/extras/Earcut.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * An implementation of the earcut polygon triangulation algorithm. - * The code is a port of [mapbox/earcut](https://github.com/mapbox/earcut). - * - * @see https://github.com/mapbox/earcut - */ -export class Earcut { - /** - * Triangulates the given shape definition by returning an array of triangles. - * - * @param {Array} data - An array with 2D points. - * @param {Array} holeIndices - An array with indices defining holes. - * @param {number} [dim=2] - The number of coordinates per vertex in the input array. - * @return {Array} An array representing the triangulated faces. Each face is defined by three consecutive numbers - * representing vertex indices. - */ - static triangulate(data: Array, holeIndices: Array, dim?: number): Array; -} diff --git a/jsdoc-testing/jsdoc/src/extras/ImageUtils.d.ts b/jsdoc-testing/jsdoc/src/extras/ImageUtils.d.ts deleted file mode 100644 index 26077e10c..000000000 --- a/jsdoc-testing/jsdoc/src/extras/ImageUtils.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * A class containing utility functions for images. - * - * @hideconstructor - */ -export class ImageUtils { - /** - * Returns a data URI containing a representation of the given image. - * - * @param {(HTMLImageElement|HTMLCanvasElement)} image - The image object. - * @param {string} [type='image/png'] - Indicates the image format. - * @return {string} The data URI. - */ - static getDataURL(image: (HTMLImageElement | HTMLCanvasElement), type?: string): string; - /** - * Converts the given sRGB image data to linear color space. - * - * @param {(HTMLImageElement|HTMLCanvasElement|ImageBitmap|Object)} image - The image object. - * @return {HTMLCanvasElement|Object} The converted image. - */ - static sRGBToLinear(image: (HTMLImageElement | HTMLCanvasElement | ImageBitmap | Object)): HTMLCanvasElement | Object; -} diff --git a/jsdoc-testing/jsdoc/src/extras/PMREMGenerator.d.ts b/jsdoc-testing/jsdoc/src/extras/PMREMGenerator.d.ts deleted file mode 100644 index 07465624d..000000000 --- a/jsdoc-testing/jsdoc/src/extras/PMREMGenerator.d.ts +++ /dev/null @@ -1,556 +0,0 @@ -/** - * This class generates a Prefiltered, Mipmapped Radiance Environment Map - * (PMREM) from a cubeMap environment texture. This allows different levels of - * blur to be quickly accessed based on material roughness. It is packed into a - * special CubeUV format that allows us to perform custom interpolation so that - * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap - * chain, it only goes down to the LOD_MIN level (above), and then creates extra - * even more filtered 'mips' at the same LOD_MIN resolution, associated with - * higher roughness levels. In this way we maintain resolution to smoothly - * interpolate diffuse lighting while limiting sampling computation. - * - * The prefiltering uses GGX VNDF (Visible Normal Distribution Function) - * importance sampling based on "Sampling the GGX Distribution of Visible Normals" - * (Heitz, 2018) to generate environment maps that accurately match the GGX BRDF - * used in material rendering for physically-based image-based lighting. - */ -export class PMREMGenerator { - /** - * Constructs a new PMREM generator. - * - * @param {WebGLRenderer} renderer - The renderer. - */ - constructor(renderer: WebGLRenderer); - _renderer: WebGLRenderer; - _pingPongRenderTarget: any; - _lodMax: number; - _cubeSize: number; - _sizeLods: any[]; - _sigmas: any[]; - _lodMeshes: any[]; - _backgroundBox: Mesh | null; - _cubemapMaterial: { - readonly isShaderMaterial: boolean; - type: string; - defines: Object; - uniforms: Object; - uniformsGroups: Array; - vertexShader: string; - fragmentShader: string; - linewidth: number; - wireframe: boolean; - wireframeLinewidth: number; - fog: boolean; - lights: boolean; - clipping: boolean; - forceSinglePass: boolean; - extensions: { - clipCullDistance: false; - multiDraw: false; - }; - defaultAttributeValues: Object; - index0AttributeName: string | undefined; - uniformsNeedUpdate: boolean; - glslVersion: (GLSL1 | GLSL3) | null; - copy(source: any): /*elided*/ any; - toJSON(meta: any): Object; - readonly isMaterial: boolean; - readonly uuid: string; - name: string; - blending: (NoBlending /** - * This class generates a Prefiltered, Mipmapped Radiance Environment Map - * (PMREM) from a cubeMap environment texture. This allows different levels of - * blur to be quickly accessed based on material roughness. It is packed into a - * special CubeUV format that allows us to perform custom interpolation so that - * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap - * chain, it only goes down to the LOD_MIN level (above), and then creates extra - * even more filtered 'mips' at the same LOD_MIN resolution, associated with - * higher roughness levels. In this way we maintain resolution to smoothly - * interpolate diffuse lighting while limiting sampling computation. - * - * The prefiltering uses GGX VNDF (Visible Normal Distribution Function) - * importance sampling based on "Sampling the GGX Distribution of Visible Normals" - * (Heitz, 2018) to generate environment maps that accurately match the GGX BRDF - * used in material rendering for physically-based image-based lighting. - */ | number | AdditiveBlending | SubtractiveBlending | MultiplyBlending | CustomBlending); - side: (number | BackSide | DoubleSide); - vertexColors: boolean; - opacity: number; - transparent: boolean; - alphaHash: boolean; - blendSrc: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); - blendDst: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); - blendEquation: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation); - blendSrcAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; - blendDstAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; - blendEquationAlpha: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation) | null; - blendColor: Color; - blendAlpha: number; - depthFunc: (NeverDepth | AlwaysDepth | LessDepth | number | EqualDepth | GreaterEqualDepth | - /** - * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during - * your texture's network fetch for increased concurrency. - */ - GreaterDepth | NotEqualDepth); - depthTest: boolean; - depthWrite: boolean; - stencilWriteMask: number; - stencilFunc: NeverStencilFunc | LessStencilFunc | EqualStencilFunc | LessEqualStencilFunc | GreaterStencilFunc | NotEqualStencilFunc | GreaterEqualStencilFunc | number; - stencilRef: number; - stencilFuncMask: number; - stencilFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; - stencilZFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; - stencilZPass: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; - stencilWrite: boolean; - clippingPlanes: Array | null; - clipIntersection: boolean; - clipShadows: boolean; - shadowSide: (number | BackSide | DoubleSide) | null; - colorWrite: boolean; - precision: ("highp" | "mediump" | "lowp") | null; - polygonOffset: boolean; - polygonOffsetFactor: number; - polygonOffsetUnits: number; - dithering: boolean; - alphaToCoverage: boolean; - premultipliedAlpha: boolean; - allowOverride: boolean; - visible: boolean; - toneMapped: boolean; - userData: Object; - readonly version: number; - _alphaTest: number; - get alphaTest(): number; - set alphaTest(value: number); - onBeforeRender(): void; - onBeforeCompile(): void; - customProgramCacheKey(): string; - setValues(values?: Object): void; - clone(): Material; - dispose(): void; - set needsUpdate(value: boolean); - addEventListener(type: string, listener: Function): void; - _listeners: {} | undefined; - hasEventListener(type: string, listener: Function): boolean; - removeEventListener(type: string, listener: Function): void; - dispatchEvent(event: Object): void; - } | null; - _equirectMaterial: { - readonly isShaderMaterial: boolean; - type: string; - defines: Object; - uniforms: Object; - uniformsGroups: Array; - vertexShader: string; - fragmentShader: string; - linewidth: number; - wireframe: boolean; - wireframeLinewidth: number; - fog: boolean; - lights: boolean; - clipping: boolean; - forceSinglePass: boolean; - extensions: { - clipCullDistance: false; - multiDraw: false; - }; - defaultAttributeValues: Object; - index0AttributeName: string | undefined; - uniformsNeedUpdate: boolean; - glslVersion: (GLSL1 | GLSL3) | null; - copy(source: any): /*elided*/ any; - toJSON(meta: any): Object; - readonly isMaterial: boolean; - readonly uuid: string; - name: string; - blending: (NoBlending /** - * This class generates a Prefiltered, Mipmapped Radiance Environment Map - * (PMREM) from a cubeMap environment texture. This allows different levels of - * blur to be quickly accessed based on material roughness. It is packed into a - * special CubeUV format that allows us to perform custom interpolation so that - * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap - * chain, it only goes down to the LOD_MIN level (above), and then creates extra - * even more filtered 'mips' at the same LOD_MIN resolution, associated with - * higher roughness levels. In this way we maintain resolution to smoothly - * interpolate diffuse lighting while limiting sampling computation. - * - * The prefiltering uses GGX VNDF (Visible Normal Distribution Function) - * importance sampling based on "Sampling the GGX Distribution of Visible Normals" - * (Heitz, 2018) to generate environment maps that accurately match the GGX BRDF - * used in material rendering for physically-based image-based lighting. - */ | number | AdditiveBlending | SubtractiveBlending | MultiplyBlending | CustomBlending); - side: (number | BackSide | DoubleSide); - vertexColors: boolean; - opacity: number; - transparent: boolean; - alphaHash: boolean; - blendSrc: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); - blendDst: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); - blendEquation: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation); - blendSrcAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; - blendDstAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; - blendEquationAlpha: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation) | null; - blendColor: Color; - blendAlpha: number; - depthFunc: (NeverDepth | AlwaysDepth | LessDepth | number | EqualDepth | GreaterEqualDepth | - /** - * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during - * your texture's network fetch for increased concurrency. - */ - GreaterDepth | NotEqualDepth); - depthTest: boolean; - depthWrite: boolean; - stencilWriteMask: number; - stencilFunc: NeverStencilFunc | LessStencilFunc | EqualStencilFunc | LessEqualStencilFunc | GreaterStencilFunc | NotEqualStencilFunc | GreaterEqualStencilFunc | number; - stencilRef: number; - stencilFuncMask: number; - stencilFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; - stencilZFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; - stencilZPass: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; - stencilWrite: boolean; - clippingPlanes: Array | null; - clipIntersection: boolean; - clipShadows: boolean; - shadowSide: (number | BackSide | DoubleSide) | null; - colorWrite: boolean; - precision: ("highp" | "mediump" | "lowp") | null; - polygonOffset: boolean; - polygonOffsetFactor: number; - polygonOffsetUnits: number; - dithering: boolean; - alphaToCoverage: boolean; - premultipliedAlpha: boolean; - allowOverride: boolean; - visible: boolean; - toneMapped: boolean; - userData: Object; - readonly version: number; - _alphaTest: number; - get alphaTest(): number; - set alphaTest(value: number); - onBeforeRender(): void; - onBeforeCompile(): void; - customProgramCacheKey(): string; - setValues(values?: Object): void; - clone(): Material; - dispose(): void; - set needsUpdate(value: boolean); - addEventListener(type: string, listener: Function): void; - _listeners: {} | undefined; - hasEventListener(type: string, listener: Function): boolean; - removeEventListener(type: string, listener: Function): void; - dispatchEvent(event: Object): void; - } | null; - _blurMaterial: { - readonly isShaderMaterial: boolean; - type: string; - defines: Object; - uniforms: Object; - uniformsGroups: Array; - vertexShader: string; - fragmentShader: string; - linewidth: number; - wireframe: boolean; - wireframeLinewidth: number; - fog: boolean; - lights: boolean; - clipping: boolean; - forceSinglePass: boolean; - extensions: { - clipCullDistance: false; - multiDraw: false; - }; - defaultAttributeValues: Object; - index0AttributeName: string | undefined; - uniformsNeedUpdate: boolean; - glslVersion: (GLSL1 | GLSL3) | null; - copy(source: any): /*elided*/ any; - toJSON(meta: any): Object; - readonly isMaterial: boolean; - readonly uuid: string; - name: string; - blending: (NoBlending /** - * This class generates a Prefiltered, Mipmapped Radiance Environment Map - * (PMREM) from a cubeMap environment texture. This allows different levels of - * blur to be quickly accessed based on material roughness. It is packed into a - * special CubeUV format that allows us to perform custom interpolation so that - * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap - * chain, it only goes down to the LOD_MIN level (above), and then creates extra - * even more filtered 'mips' at the same LOD_MIN resolution, associated with - * higher roughness levels. In this way we maintain resolution to smoothly - * interpolate diffuse lighting while limiting sampling computation. - * - * The prefiltering uses GGX VNDF (Visible Normal Distribution Function) - * importance sampling based on "Sampling the GGX Distribution of Visible Normals" - * (Heitz, 2018) to generate environment maps that accurately match the GGX BRDF - * used in material rendering for physically-based image-based lighting. - */ | number | AdditiveBlending | SubtractiveBlending | MultiplyBlending | CustomBlending); - side: (number | BackSide | DoubleSide); - vertexColors: boolean; - opacity: number; - transparent: boolean; - alphaHash: boolean; - blendSrc: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); - blendDst: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); - blendEquation: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation); - blendSrcAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; - blendDstAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; - blendEquationAlpha: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation) | null; - blendColor: Color; - blendAlpha: number; - depthFunc: (NeverDepth | AlwaysDepth | LessDepth | number | EqualDepth | GreaterEqualDepth | - /** - * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during - * your texture's network fetch for increased concurrency. - */ - GreaterDepth | NotEqualDepth); - depthTest: boolean; - depthWrite: boolean; - stencilWriteMask: number; - stencilFunc: NeverStencilFunc | LessStencilFunc | EqualStencilFunc | LessEqualStencilFunc | GreaterStencilFunc | NotEqualStencilFunc | GreaterEqualStencilFunc | number; - stencilRef: number; - stencilFuncMask: number; - stencilFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; - stencilZFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; - stencilZPass: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; - stencilWrite: boolean; - clippingPlanes: Array | null; - clipIntersection: boolean; - clipShadows: boolean; - shadowSide: (number | BackSide | DoubleSide) | null; - colorWrite: boolean; - precision: ("highp" | "mediump" | "lowp") | null; - polygonOffset: boolean; - polygonOffsetFactor: number; - polygonOffsetUnits: number; - dithering: boolean; - alphaToCoverage: boolean; - premultipliedAlpha: boolean; - allowOverride: boolean; - visible: boolean; - toneMapped: boolean; - userData: Object; - readonly version: number; - _alphaTest: number; - get alphaTest(): number; - set alphaTest(value: number); - onBeforeRender(): void; - onBeforeCompile(): void; - customProgramCacheKey(): string; - setValues(values?: Object): void; - clone(): Material; - dispose(): void; - set needsUpdate(value: boolean); - addEventListener(type: string, listener: Function): void; - _listeners: {} | undefined; - hasEventListener(type: string, listener: Function): boolean; - removeEventListener(type: string, listener: Function): void; - dispatchEvent(event: Object): void; - } | null; - _ggxMaterial: { - readonly isShaderMaterial: boolean; - type: string; - defines: Object; - uniforms: Object; - uniformsGroups: Array; - vertexShader: string; - fragmentShader: string; - linewidth: number; - wireframe: boolean; - wireframeLinewidth: number; - fog: boolean; - lights: boolean; - clipping: boolean; - forceSinglePass: boolean; - extensions: { - clipCullDistance: false; - multiDraw: false; - }; - defaultAttributeValues: Object; - index0AttributeName: string | undefined; - uniformsNeedUpdate: boolean; - glslVersion: (GLSL1 | GLSL3) | null; - copy(source: any): /*elided*/ any; - toJSON(meta: any): Object; - readonly isMaterial: boolean; - readonly uuid: string; - name: string; - blending: (NoBlending /** - * This class generates a Prefiltered, Mipmapped Radiance Environment Map - * (PMREM) from a cubeMap environment texture. This allows different levels of - * blur to be quickly accessed based on material roughness. It is packed into a - * special CubeUV format that allows us to perform custom interpolation so that - * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap - * chain, it only goes down to the LOD_MIN level (above), and then creates extra - * even more filtered 'mips' at the same LOD_MIN resolution, associated with - * higher roughness levels. In this way we maintain resolution to smoothly - * interpolate diffuse lighting while limiting sampling computation. - * - * The prefiltering uses GGX VNDF (Visible Normal Distribution Function) - * importance sampling based on "Sampling the GGX Distribution of Visible Normals" - * (Heitz, 2018) to generate environment maps that accurately match the GGX BRDF - * used in material rendering for physically-based image-based lighting. - */ | number | AdditiveBlending | SubtractiveBlending | MultiplyBlending | CustomBlending); - side: (number | BackSide | DoubleSide); - vertexColors: boolean; - opacity: number; - transparent: boolean; - alphaHash: boolean; - blendSrc: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); - blendDst: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); - blendEquation: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation); - blendSrcAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; - blendDstAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; - blendEquationAlpha: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation) | null; - blendColor: Color; - blendAlpha: number; - depthFunc: (NeverDepth | AlwaysDepth | LessDepth | number | EqualDepth | GreaterEqualDepth | - /** - * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during - * your texture's network fetch for increased concurrency. - */ - GreaterDepth | NotEqualDepth); - depthTest: boolean; - depthWrite: boolean; - stencilWriteMask: number; - stencilFunc: NeverStencilFunc | LessStencilFunc | EqualStencilFunc | LessEqualStencilFunc | GreaterStencilFunc | NotEqualStencilFunc | GreaterEqualStencilFunc | number; - stencilRef: number; - stencilFuncMask: number; - stencilFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; - stencilZFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; - stencilZPass: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; - stencilWrite: boolean; - clippingPlanes: Array | null; - clipIntersection: boolean; - clipShadows: boolean; - shadowSide: (number | BackSide | DoubleSide) | null; - colorWrite: boolean; - precision: ("highp" | "mediump" | "lowp") | null; - polygonOffset: boolean; - polygonOffsetFactor: number; - polygonOffsetUnits: number; - dithering: boolean; - alphaToCoverage: boolean; - premultipliedAlpha: boolean; - allowOverride: boolean; - visible: boolean; - toneMapped: boolean; - userData: Object; - readonly version: number; - _alphaTest: number; - get alphaTest(): number; - set alphaTest(value: number); - onBeforeRender(): void; - onBeforeCompile(): void; - customProgramCacheKey(): string; - setValues(values?: Object): void; - clone(): Material; - dispose(): void; - set needsUpdate(value: boolean); - addEventListener(type: string, listener: Function): void; - _listeners: {} | undefined; - hasEventListener(type: string, listener: Function): boolean; - removeEventListener(type: string, listener: Function): void; - dispatchEvent(event: Object): void; - } | null; - /** - * Generates a PMREM from a supplied Scene, which can be faster than using an - * image if networking bandwidth is low. Optional sigma specifies a blur radius - * in radians to be applied to the scene before PMREM generation. Optional near - * and far planes ensure the scene is rendered in its entirety. - * - * @param {Scene} scene - The scene to be captured. - * @param {number} [sigma=0] - The blur radius in radians. - * @param {number} [near=0.1] - The near plane distance. - * @param {number} [far=100] - The far plane distance. - * @param {Object} [options={}] - The configuration options. - * @param {number} [options.size=256] - The texture size of the PMREM. - * @param {Vector3} [options.position=origin] - The position of the internal cube camera that renders the scene. - * @return {WebGLRenderTarget} The resulting PMREM. - */ - fromScene(scene: Scene, sigma?: number, near?: number, far?: number, options?: { - size?: number | undefined; - position?: Vector3 | undefined; - }): WebGLRenderTarget; - /** - * Generates a PMREM from an equirectangular texture, which can be either LDR - * or HDR. The ideal input image size is 1k (1024 x 512), as this matches best - * with the 256 x 256 cubemap output. The minimum supported input image size - * is 64 x 32. - * - * @param {Texture} equirectangular - The equirectangular texture to be converted. - * @param {?WebGLRenderTarget} [renderTarget=null] - The render target to use. - * @return {WebGLRenderTarget} The resulting PMREM. - */ - fromEquirectangular(equirectangular: Texture, renderTarget?: WebGLRenderTarget | null): WebGLRenderTarget; - /** - * Generates a PMREM from an cubemap texture, which can be either LDR - * or HDR. The ideal input cube size is 256 x 256, as this matches best - * with the 256 x 256 cubemap output. The minimum supported input cube - * size is 16 x 16 per face. - * - * @param {Texture} cubemap - The cubemap texture to be converted. - * @param {?WebGLRenderTarget} [renderTarget=null] - The render target to use. - * @return {WebGLRenderTarget} The resulting PMREM. - */ - fromCubemap(cubemap: Texture, renderTarget?: WebGLRenderTarget | null): WebGLRenderTarget; - /** - * Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during - * your texture's network fetch for increased concurrency. - */ - compileCubemapShader(): void; - /** - * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during - * your texture's network fetch for increased concurrency. - */ - compileEquirectangularShader(): void; - /** - * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class, - * so you should not need more than one PMREMGenerator object. If you do, calling dispose() on - * one of them will cause any others to also become unusable. - */ - dispose(): void; - _setSize(cubeSize: any): void; - _dispose(): void; - _cleanup(outputTarget: any): void; - _fromTexture(texture: any, renderTarget: any): any; - _allocateTargets(): WebGLRenderTarget; - _compileMaterial(material: any): void; - _sceneToCubeUV(scene: any, near: any, far: any, cubeUVRenderTarget: any, position: any): void; - _textureToCubeUV(texture: any, cubeUVRenderTarget: any): void; - _applyPMREM(cubeUVRenderTarget: any): void; - /** - * Applies GGX VNDF importance sampling filter to generate a prefiltered environment map. - * Uses Monte Carlo integration with VNDF importance sampling to accurately represent the - * GGX BRDF for physically-based rendering. Reads from the previous LOD level and - * applies incremental roughness filtering to avoid over-blurring. - * - * @private - * @param {WebGLRenderTarget} cubeUVRenderTarget - * @param {number} lodIn - Source LOD level to read from - * @param {number} lodOut - Target LOD level to write to - */ - private _applyGGXFilter; - /** - * This is a two-pass Gaussian blur for a cubemap. Normally this is done - * vertically and horizontally, but this breaks down on a cube. Here we apply - * the blur latitudinally (around the poles), and then longitudinally (towards - * the poles) to approximate the orthogonally-separable blur. It is least - * accurate at the poles, but still does a decent job. - * - * Used for initial scene blur in fromScene() method when sigma > 0. - * - * @private - * @param {WebGLRenderTarget} cubeUVRenderTarget - * @param {number} lodIn - * @param {number} lodOut - * @param {number} sigma - * @param {Vector3} [poleAxis] - */ - private _blur; - _halfBlur(targetIn: any, targetOut: any, lodIn: any, lodOut: any, sigmaRadians: any, direction: any, poleAxis: any): void; -} -import { Mesh } from '../objects/Mesh.js'; -import { Color } from '../math/Color.js'; -import { Vector3 } from '../math/Vector3.js'; -import { WebGLRenderTarget } from '../renderers/WebGLRenderTarget.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/ShapeUtils.d.ts b/jsdoc-testing/jsdoc/src/extras/ShapeUtils.d.ts deleted file mode 100644 index 333966c85..000000000 --- a/jsdoc-testing/jsdoc/src/extras/ShapeUtils.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * A class containing utility functions for shapes. - * - * @hideconstructor - */ -export class ShapeUtils { - /** - * Calculate area of a ( 2D ) contour polygon. - * - * @param {Array} contour - An array of 2D points. - * @return {number} The area. - */ - static area(contour: Array): number; - /** - * Returns `true` if the given contour uses a clockwise winding order. - * - * @param {Array} pts - An array of 2D points defining a polygon. - * @return {boolean} Whether the given contour uses a clockwise winding order or not. - */ - static isClockWise(pts: Array): boolean; - /** - * Triangulates the given shape definition. - * - * @param {Array} contour - An array of 2D points defining the contour. - * @param {Array>} holes - An array that holds arrays of 2D points defining the holes. - * @return {Array>} An array that holds for each face definition an array with three indices. - */ - static triangulateShape(contour: Array, holes: Array>): Array>; -} diff --git a/jsdoc-testing/jsdoc/src/extras/TextureUtils.d.ts b/jsdoc-testing/jsdoc/src/extras/TextureUtils.d.ts deleted file mode 100644 index 5de7a1677..000000000 --- a/jsdoc-testing/jsdoc/src/extras/TextureUtils.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Scales the texture as large as possible within its surface without cropping - * or stretching the texture. The method preserves the original aspect ratio of - * the texture. Akin to CSS `object-fit: contain` - * - * @param {Texture} texture - The texture. - * @param {number} aspect - The texture's aspect ratio. - * @return {Texture} The updated texture. - */ -export function contain(texture: Texture, aspect: number): Texture; -/** - * Scales the texture to the smallest possible size to fill the surface, leaving - * no empty space. The method preserves the original aspect ratio of the texture. - * Akin to CSS `object-fit: cover`. - * - * @param {Texture} texture - The texture. - * @param {number} aspect - The texture's aspect ratio. - * @return {Texture} The updated texture. - */ -export function cover(texture: Texture, aspect: number): Texture; -/** - * Configures the texture to the default transformation. Akin to CSS `object-fit: fill`. - * - * @param {Texture} texture - The texture. - * @return {Texture} The updated texture. - */ -export function fill(texture: Texture): Texture; -/** - * Determines how many bytes must be used to represent the texture. - * - * @param {number} width - The width of the texture. - * @param {number} height - The height of the texture. - * @param {number} format - The texture's format. - * @param {number} type - The texture's type. - * @return {number} The byte length. - */ -export function getByteLength(width: number, height: number, format: number, type: number): number; -/** - * A class containing utility functions for textures. - * - * @hideconstructor - */ -export class TextureUtils { - /** - * Scales the texture as large as possible within its surface without cropping - * or stretching the texture. The method preserves the original aspect ratio of - * the texture. Akin to CSS `object-fit: contain` - * - * @param {Texture} texture - The texture. - * @param {number} aspect - The texture's aspect ratio. - * @return {Texture} The updated texture. - */ - static contain(texture: Texture, aspect: number): Texture; - /** - * Scales the texture to the smallest possible size to fill the surface, leaving - * no empty space. The method preserves the original aspect ratio of the texture. - * Akin to CSS `object-fit: cover`. - * - * @param {Texture} texture - The texture. - * @param {number} aspect - The texture's aspect ratio. - * @return {Texture} The updated texture. - */ - static cover(texture: Texture, aspect: number): Texture; - /** - * Configures the texture to the default transformation. Akin to CSS `object-fit: fill`. - * - * @param {Texture} texture - The texture. - * @return {Texture} The updated texture. - */ - static fill(texture: Texture): Texture; - /** - * Determines how many bytes must be used to represent the texture. - * - * @param {number} width - The width of the texture. - * @param {number} height - The height of the texture. - * @param {number} format - The texture's format. - * @param {number} type - The texture's type. - * @return {number} The byte length. - */ - static getByteLength(width: number, height: number, format: number, type: number): number; -} diff --git a/jsdoc-testing/jsdoc/src/extras/core/Curve.d.ts b/jsdoc-testing/jsdoc/src/extras/core/Curve.d.ts deleted file mode 100644 index ff7e9b470..000000000 --- a/jsdoc-testing/jsdoc/src/extras/core/Curve.d.ts +++ /dev/null @@ -1,170 +0,0 @@ -/** - * An abstract base class for creating an analytic curve object that contains methods - * for interpolation. - * - * @abstract - */ -export class Curve { - /** - * The type property is used for detecting the object type - * in context of serialization/deserialization. - * - * @type {string} - * @readonly - */ - readonly type: string; - /** - * This value determines the amount of divisions when calculating the - * cumulative segment lengths of a curve via {@link Curve#getLengths}. To ensure - * precision when using methods like {@link Curve#getSpacedPoints}, it is - * recommended to increase the value of this property if the curve is very large. - * - * @type {number} - * @default 200 - */ - arcLengthDivisions: number; - /** - * Must be set to `true` if the curve parameters have changed. - * - * @type {boolean} - * @default false - */ - needsUpdate: boolean; - /** - * An internal cache that holds precomputed curve length values. - * - * @private - * @type {?Array} - * @default null - */ - private cacheArcLengths; - /** - * This method returns a vector in 2D or 3D space (depending on the curve definition) - * for the given interpolation factor. - * - * @abstract - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {(Vector2|Vector3)} [optionalTarget] - The optional target vector the result is written to. - * @return {(Vector2|Vector3)} The position on the curve. It can be a 2D or 3D vector depending on the curve definition. - */ - getPoint(): (Vector2 | Vector3); - /** - * This method returns a vector in 2D or 3D space (depending on the curve definition) - * for the given interpolation factor. Unlike {@link Curve#getPoint}, this method honors the length - * of the curve which equidistant samples. - * - * @param {number} u - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {(Vector2|Vector3)} [optionalTarget] - The optional target vector the result is written to. - * @return {(Vector2|Vector3)} The position on the curve. It can be a 2D or 3D vector depending on the curve definition. - */ - getPointAt(u: number, optionalTarget?: (Vector2 | Vector3)): (Vector2 | Vector3); - /** - * This method samples the curve via {@link Curve#getPoint} and returns an array of points representing - * the curve shape. - * - * @param {number} [divisions=5] - The number of divisions. - * @return {Array<(Vector2|Vector3)>} An array holding the sampled curve values. The number of points is `divisions + 1`. - */ - getPoints(divisions?: number): Array<(Vector2 | Vector3)>; - /** - * This method samples the curve via {@link Curve#getPointAt} and returns an array of points representing - * the curve shape. Unlike {@link Curve#getPoints}, this method returns equi-spaced points across the entire - * curve. - * - * @param {number} [divisions=5] - The number of divisions. - * @return {Array<(Vector2|Vector3)>} An array holding the sampled curve values. The number of points is `divisions + 1`. - */ - getSpacedPoints(divisions?: number): Array<(Vector2 | Vector3)>; - /** - * Returns the total arc length of the curve. - * - * @return {number} The length of the curve. - */ - getLength(): number; - /** - * Returns an array of cumulative segment lengths of the curve. - * - * @param {number} [divisions=this.arcLengthDivisions] - The number of divisions. - * @return {Array} An array holding the cumulative segment lengths. - */ - getLengths(divisions?: number): Array; - /** - * Update the cumulative segment distance cache. The method must be called - * every time curve parameters are changed. If an updated curve is part of a - * composed curve like {@link CurvePath}, this method must be called on the - * composed curve, too. - */ - updateArcLengths(): void; - /** - * Given an interpolation factor in the range `[0,1]`, this method returns an updated - * interpolation factor in the same range that can be ued to sample equidistant points - * from a curve. - * - * @param {number} u - The interpolation factor. - * @param {?number} distance - An optional distance on the curve. - * @return {number} The updated interpolation factor. - */ - getUtoTmapping(u: number, distance?: number | null): number; - /** - * Returns a unit vector tangent for the given interpolation factor. - * If the derived curve does not implement its tangent derivation, - * two points a small delta apart will be used to find its gradient - * which seems to give a reasonable approximation. - * - * @param {number} t - The interpolation factor. - * @param {(Vector2|Vector3)} [optionalTarget] - The optional target vector the result is written to. - * @return {(Vector2|Vector3)} The tangent vector. - */ - getTangent(t: number, optionalTarget?: (Vector2 | Vector3)): (Vector2 | Vector3); - /** - * Same as {@link Curve#getTangent} but with equidistant samples. - * - * @param {number} u - The interpolation factor. - * @param {(Vector2|Vector3)} [optionalTarget] - The optional target vector the result is written to. - * @return {(Vector2|Vector3)} The tangent vector. - * @see {@link Curve#getPointAt} - */ - getTangentAt(u: number, optionalTarget?: (Vector2 | Vector3)): (Vector2 | Vector3); - /** - * Generates the Frenet Frames. Requires a curve definition in 3D space. Used - * in geometries like {@link TubeGeometry} or {@link ExtrudeGeometry}. - * - * @param {number} segments - The number of segments. - * @param {boolean} [closed=false] - Whether the curve is closed or not. - * @return {{tangents: Array, normals: Array, binormals: Array}} The Frenet Frames. - */ - computeFrenetFrames(segments: number, closed?: boolean): { - tangents: Array; - normals: Array; - binormals: Array; - }; - /** - * Returns a new curve with copied values from this instance. - * - * @return {Curve} A clone of this instance. - */ - clone(): Curve; - /** - * Copies the values of the given curve to this instance. - * - * @param {Curve} source - The curve to copy. - * @return {Curve} A reference to this curve. - */ - copy(source: Curve): Curve; - /** - * Serializes the curve into JSON. - * - * @return {Object} A JSON object representing the serialized curve. - * @see {@link ObjectLoader#parse} - */ - toJSON(): Object; - /** - * Deserializes the curve from the given JSON. - * - * @param {Object} json - The JSON holding the serialized curve. - * @return {Curve} A reference to this curve. - */ - fromJSON(json: Object): Curve; -} -import { Vector2 } from '../../math/Vector2.js'; -import { Vector3 } from '../../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/core/CurvePath.d.ts b/jsdoc-testing/jsdoc/src/extras/core/CurvePath.d.ts deleted file mode 100644 index a92079be5..000000000 --- a/jsdoc-testing/jsdoc/src/extras/core/CurvePath.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * A base class extending {@link Curve}. `CurvePath` is simply an - * array of connected curves, but retains the API of a curve. - * - * @augments Curve - */ -export class CurvePath extends Curve { - type: string; - /** - * An array of curves defining the - * path. - * - * @type {Array} - */ - curves: Array; - /** - * Whether the path should automatically be closed - * by a line curve. - * - * @type {boolean} - * @default false - */ - autoClose: boolean; - /** - * Adds a curve to this curve path. - * - * @param {Curve} curve - The curve to add. - */ - add(curve: Curve): void; - /** - * Adds a line curve to close the path. - * - * @return {CurvePath} A reference to this curve path. - */ - closePath(): CurvePath; - /** - * This method returns a vector in 2D or 3D space (depending on the curve definitions) - * for the given interpolation factor. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {(Vector2|Vector3)} [optionalTarget] - The optional target vector the result is written to. - * @return {?(Vector2|Vector3)} The position on the curve. It can be a 2D or 3D vector depending on the curve definition. - */ - getPoint(t: number, optionalTarget?: (Vector2 | Vector3)): (Vector2 | Vector3) | null; - cacheLengths: number[] | null | undefined; - /** - * Returns list of cumulative curve lengths of the defined curves. - * - * @return {Array} The curve lengths. - */ - getCurveLengths(): Array; - getSpacedPoints(divisions?: number): any[]; - copy(source: any): this; - fromJSON(json: any): this; -} -import { Curve } from './Curve.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/core/Interpolations.d.ts b/jsdoc-testing/jsdoc/src/extras/core/Interpolations.d.ts deleted file mode 100644 index aa80afbc8..000000000 --- a/jsdoc-testing/jsdoc/src/extras/core/Interpolations.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Interpolations contains spline and Bézier functions internally used by concrete curve classes. - * - * Bezier Curves formulas obtained from: https://en.wikipedia.org/wiki/B%C3%A9zier_curve - * - * @module Interpolations - */ -/** - * Computes a point on a Catmull-Rom spline. - * - * @param {number} t - The interpolation factor. - * @param {number} p0 - The first control point. - * @param {number} p1 - The second control point. - * @param {number} p2 - The third control point. - * @param {number} p3 - The fourth control point. - * @return {number} The calculated point on a Catmull-Rom spline. - */ -export function CatmullRom(t: number, p0: number, p1: number, p2: number, p3: number): number; -/** - * Computes a point on a Quadratic Bezier curve. - * - * @param {number} t - The interpolation factor. - * @param {number} p0 - The first control point. - * @param {number} p1 - The second control point. - * @param {number} p2 - The third control point. - * @return {number} The calculated point on a Quadratic Bezier curve. - */ -export function QuadraticBezier(t: number, p0: number, p1: number, p2: number): number; -/** - * Computes a point on a Cubic Bezier curve. - * - * @param {number} t - The interpolation factor. - * @param {number} p0 - The first control point. - * @param {number} p1 - The second control point. - * @param {number} p2 - The third control point. - * @param {number} p3 - The fourth control point. - * @return {number} The calculated point on a Cubic Bezier curve. - */ -export function CubicBezier(t: number, p0: number, p1: number, p2: number, p3: number): number; diff --git a/jsdoc-testing/jsdoc/src/extras/core/Path.d.ts b/jsdoc-testing/jsdoc/src/extras/core/Path.d.ts deleted file mode 100644 index 521287532..000000000 --- a/jsdoc-testing/jsdoc/src/extras/core/Path.d.ts +++ /dev/null @@ -1,151 +0,0 @@ -/** - * A 2D path representation. The class provides methods for creating paths - * and contours of 2D shapes similar to the 2D Canvas API. - * - * ```js - * const path = new THREE.Path(); - * - * path.lineTo( 0, 0.8 ); - * path.quadraticCurveTo( 0, 1, 0.2, 1 ); - * path.lineTo( 1, 1 ); - * - * const points = path.getPoints(); - * - * const geometry = new THREE.BufferGeometry().setFromPoints( points ); - * const material = new THREE.LineBasicMaterial( { color: 0xffffff } ); - * - * const line = new THREE.Line( geometry, material ); - * scene.add( line ); - * ``` - * - * @augments CurvePath - */ -export class Path extends CurvePath { - /** - * Constructs a new path. - * - * @param {Array} [points] - An array of 2D points defining the path. - */ - constructor(points?: Array); - /** - * The current offset of the path. Any new curve added will start here. - * - * @type {Vector2} - */ - currentPoint: Vector2; - /** - * Creates a path from the given list of points. The points are added - * to the path as instances of {@link LineCurve}. - * - * @param {Array} points - An array of 2D points. - * @return {Path} A reference to this path. - */ - setFromPoints(points: Array): Path; - /** - * Moves {@link Path#currentPoint} to the given point. - * - * @param {number} x - The x coordinate. - * @param {number} y - The y coordinate. - * @return {Path} A reference to this path. - */ - moveTo(x: number, y: number): Path; - /** - * Adds an instance of {@link LineCurve} to the path by connecting - * the current point with the given one. - * - * @param {number} x - The x coordinate of the end point. - * @param {number} y - The y coordinate of the end point. - * @return {Path} A reference to this path. - */ - lineTo(x: number, y: number): Path; - /** - * Adds an instance of {@link QuadraticBezierCurve} to the path by connecting - * the current point with the given one. - * - * @param {number} aCPx - The x coordinate of the control point. - * @param {number} aCPy - The y coordinate of the control point. - * @param {number} aX - The x coordinate of the end point. - * @param {number} aY - The y coordinate of the end point. - * @return {Path} A reference to this path. - */ - quadraticCurveTo(aCPx: number, aCPy: number, aX: number, aY: number): Path; - /** - * Adds an instance of {@link CubicBezierCurve} to the path by connecting - * the current point with the given one. - * - * @param {number} aCP1x - The x coordinate of the first control point. - * @param {number} aCP1y - The y coordinate of the first control point. - * @param {number} aCP2x - The x coordinate of the second control point. - * @param {number} aCP2y - The y coordinate of the second control point. - * @param {number} aX - The x coordinate of the end point. - * @param {number} aY - The y coordinate of the end point. - * @return {Path} A reference to this path. - */ - bezierCurveTo(aCP1x: number, aCP1y: number, aCP2x: number, aCP2y: number, aX: number, aY: number): Path; - /** - * Adds an instance of {@link SplineCurve} to the path by connecting - * the current point with the given list of points. - * - * @param {Array} pts - An array of points in 2D space. - * @return {Path} A reference to this path. - */ - splineThru(pts: Array): Path; - /** - * Adds an arc as an instance of {@link EllipseCurve} to the path, positioned relative - * to the current point. - * - * @param {number} [aX=0] - The x coordinate of the center of the arc offsetted from the previous curve. - * @param {number} [aY=0] - The y coordinate of the center of the arc offsetted from the previous curve. - * @param {number} [aRadius=1] - The radius of the arc. - * @param {number} [aStartAngle=0] - The start angle in radians. - * @param {number} [aEndAngle=Math.PI*2] - The end angle in radians. - * @param {boolean} [aClockwise=false] - Whether to sweep the arc clockwise or not. - * @return {Path} A reference to this path. - */ - arc(aX?: number, aY?: number, aRadius?: number, aStartAngle?: number, aEndAngle?: number, aClockwise?: boolean): Path; - /** - * Adds an absolutely positioned arc as an instance of {@link EllipseCurve} to the path. - * - * @param {number} [aX=0] - The x coordinate of the center of the arc. - * @param {number} [aY=0] - The y coordinate of the center of the arc. - * @param {number} [aRadius=1] - The radius of the arc. - * @param {number} [aStartAngle=0] - The start angle in radians. - * @param {number} [aEndAngle=Math.PI*2] - The end angle in radians. - * @param {boolean} [aClockwise=false] - Whether to sweep the arc clockwise or not. - * @return {Path} A reference to this path. - */ - absarc(aX?: number, aY?: number, aRadius?: number, aStartAngle?: number, aEndAngle?: number, aClockwise?: boolean): Path; - /** - * Adds an ellipse as an instance of {@link EllipseCurve} to the path, positioned relative - * to the current point - * - * @param {number} [aX=0] - The x coordinate of the center of the ellipse offsetted from the previous curve. - * @param {number} [aY=0] - The y coordinate of the center of the ellipse offsetted from the previous curve. - * @param {number} [xRadius=1] - The radius of the ellipse in the x axis. - * @param {number} [yRadius=1] - The radius of the ellipse in the y axis. - * @param {number} [aStartAngle=0] - The start angle in radians. - * @param {number} [aEndAngle=Math.PI*2] - The end angle in radians. - * @param {boolean} [aClockwise=false] - Whether to sweep the ellipse clockwise or not. - * @param {number} [aRotation=0] - The rotation angle of the ellipse in radians, counterclockwise from the positive X axis. - * @return {Path} A reference to this path. - */ - ellipse(aX?: number, aY?: number, xRadius?: number, yRadius?: number, aStartAngle?: number, aEndAngle?: number, aClockwise?: boolean, aRotation?: number): Path; - /** - * Adds an absolutely positioned ellipse as an instance of {@link EllipseCurve} to the path. - * - * @param {number} [aX=0] - The x coordinate of the absolute center of the ellipse. - * @param {number} [aY=0] - The y coordinate of the absolute center of the ellipse. - * @param {number} [xRadius=1] - The radius of the ellipse in the x axis. - * @param {number} [yRadius=1] - The radius of the ellipse in the y axis. - * @param {number} [aStartAngle=0] - The start angle in radians. - * @param {number} [aEndAngle=Math.PI*2] - The end angle in radians. - * @param {boolean} [aClockwise=false] - Whether to sweep the ellipse clockwise or not. - * @param {number} [aRotation=0] - The rotation angle of the ellipse in radians, counterclockwise from the positive X axis. - * @return {Path} A reference to this path. - */ - absellipse(aX?: number, aY?: number, xRadius?: number, yRadius?: number, aStartAngle?: number, aEndAngle?: number, aClockwise?: boolean, aRotation?: number): Path; - copy(source: any): this; - fromJSON(json: any): this; -} -import { CurvePath } from './CurvePath.js'; -import { Vector2 } from '../../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/core/Shape.d.ts b/jsdoc-testing/jsdoc/src/extras/core/Shape.d.ts deleted file mode 100644 index 056fdb610..000000000 --- a/jsdoc-testing/jsdoc/src/extras/core/Shape.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Defines an arbitrary 2d shape plane using paths with optional holes. It - * can be used with {@link ExtrudeGeometry}, {@link ShapeGeometry}, to get - * points, or to get triangulated faces. - * - * ```js - * const heartShape = new THREE.Shape(); - * - * heartShape.moveTo( 25, 25 ); - * heartShape.bezierCurveTo( 25, 25, 20, 0, 0, 0 ); - * heartShape.bezierCurveTo( - 30, 0, - 30, 35, - 30, 35 ); - * heartShape.bezierCurveTo( - 30, 55, - 10, 77, 25, 95 ); - * heartShape.bezierCurveTo( 60, 77, 80, 55, 80, 35 ); - * heartShape.bezierCurveTo( 80, 35, 80, 0, 50, 0 ); - * heartShape.bezierCurveTo( 35, 0, 25, 25, 25, 25 ); - * - * const extrudeSettings = { - * depth: 8, - * bevelEnabled: true, - * bevelSegments: 2, - * steps: 2, - * bevelSize: 1, - * bevelThickness: 1 - * }; - * - * const geometry = new THREE.ExtrudeGeometry( heartShape, extrudeSettings ); - * const mesh = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial() ); - * ``` - * - * @augments Path - */ -export class Shape extends Path { - /** - * Constructs a new shape. - * - * @param {Array} [points] - An array of 2D points defining the shape. - */ - constructor(points?: Array); - /** - * The UUID of the shape. - * - * @type {string} - * @readonly - */ - readonly uuid: string; - /** - * Defines the holes in the shape. Hole definitions must use the - * opposite winding order (CW/CCW) than the outer shape. - * - * @type {Array} - * @readonly - */ - readonly holes: Array; - /** - * Returns an array representing each contour of the holes - * as a list of 2D points. - * - * @param {number} divisions - The fineness of the result. - * @return {Array>} The holes as a series of 2D points. - */ - getPointsHoles(divisions: number): Array>; - /** - * Returns an object that holds contour data for the shape and its holes as - * arrays of 2D points. - * - * @param {number} divisions - The fineness of the result. - * @return {{shape:Array,holes:Array>}} An object with contour data. - */ - extractPoints(divisions: number): { - shape: Array; - holes: Array>; - }; - copy(source: any): this; - fromJSON(json: any): this; -} -import { Path } from './Path.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/core/ShapePath.d.ts b/jsdoc-testing/jsdoc/src/extras/core/ShapePath.d.ts deleted file mode 100644 index 04032cbd6..000000000 --- a/jsdoc-testing/jsdoc/src/extras/core/ShapePath.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -/** - * This class is used to convert a series of paths to an array of - * shapes. It is specifically used in context of fonts and SVG. - */ -export class ShapePath { - type: string; - /** - * The color of the shape. - * - * @type {Color} - */ - color: Color; - /** - * The paths that have been generated for this shape. - * - * @type {Array} - * @default null - */ - subPaths: Array; - /** - * The current path that is being generated. - * - * @type {?Path} - * @default null - */ - currentPath: Path | null; - /** - * An object that can be used to store custom data about the shape path. - * Mainly used by SVGLoader to store style information. - * - * @type {Object} - */ - userData: Object; - /** - * Creates a new path and moves it current point to the given one. - * - * @param {number} x - The x coordinate. - * @param {number} y - The y coordinate. - * @return {ShapePath} A reference to this shape path. - */ - moveTo(x: number, y: number): ShapePath; - /** - * Adds an instance of {@link LineCurve} to the path by connecting - * the current point with the given one. - * - * @param {number} x - The x coordinate of the end point. - * @param {number} y - The y coordinate of the end point. - * @return {ShapePath} A reference to this shape path. - */ - lineTo(x: number, y: number): ShapePath; - /** - * Adds an instance of {@link QuadraticBezierCurve} to the path by connecting - * the current point with the given one. - * - * @param {number} aCPx - The x coordinate of the control point. - * @param {number} aCPy - The y coordinate of the control point. - * @param {number} aX - The x coordinate of the end point. - * @param {number} aY - The y coordinate of the end point. - * @return {ShapePath} A reference to this shape path. - */ - quadraticCurveTo(aCPx: number, aCPy: number, aX: number, aY: number): ShapePath; - /** - * Adds an instance of {@link CubicBezierCurve} to the path by connecting - * the current point with the given one. - * - * @param {number} aCP1x - The x coordinate of the first control point. - * @param {number} aCP1y - The y coordinate of the first control point. - * @param {number} aCP2x - The x coordinate of the second control point. - * @param {number} aCP2y - The y coordinate of the second control point. - * @param {number} aX - The x coordinate of the end point. - * @param {number} aY - The y coordinate of the end point. - * @return {ShapePath} A reference to this shape path. - */ - bezierCurveTo(aCP1x: number, aCP1y: number, aCP2x: number, aCP2y: number, aX: number, aY: number): ShapePath; - /** - * Adds an instance of {@link SplineCurve} to the path by connecting - * the current point with the given list of points. - * - * @param {Array} pts - An array of points in 2D space. - * @return {ShapePath} A reference to this shape path. - */ - splineThru(pts: Array): ShapePath; - /** - * Converts the paths into an array of shapes. - * - * @return {Array} An array of shapes. - */ - toShapes(): Array; -} -import { Color } from '../../math/Color.js'; -import { Path } from './Path.js'; -import { Vector2 } from '../../math/Vector2.js'; -import { Shape } from './Shape.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/ArcCurve.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/ArcCurve.d.ts deleted file mode 100644 index 3ae4feae2..000000000 --- a/jsdoc-testing/jsdoc/src/extras/curves/ArcCurve.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * A curve representing an arc. - * - * @augments EllipseCurve - */ -export class ArcCurve extends EllipseCurve { - /** - * Constructs a new arc curve. - * - * @param {number} [aX=0] - The X center of the ellipse. - * @param {number} [aY=0] - The Y center of the ellipse. - * @param {number} [aRadius=1] - The radius of the ellipse in the x direction. - * @param {number} [aStartAngle=0] - The start angle of the curve in radians starting from the positive X axis. - * @param {number} [aEndAngle=Math.PI*2] - The end angle of the curve in radians starting from the positive X axis. - * @param {boolean} [aClockwise=false] - Whether the ellipse is drawn clockwise or not. - */ - constructor(aX?: number, aY?: number, aRadius?: number, aStartAngle?: number, aEndAngle?: number, aClockwise?: boolean); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isArcCurve: boolean; -} -import { EllipseCurve } from './EllipseCurve.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/CatmullRomCurve3.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/CatmullRomCurve3.d.ts deleted file mode 100644 index 8798e6d39..000000000 --- a/jsdoc-testing/jsdoc/src/extras/curves/CatmullRomCurve3.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -/** - * A curve representing a Catmull-Rom spline. - * - * ```js - * //Create a closed wavey loop - * const curve = new THREE.CatmullRomCurve3( [ - * new THREE.Vector3( -10, 0, 10 ), - * new THREE.Vector3( -5, 5, 5 ), - * new THREE.Vector3( 0, 0, 0 ), - * new THREE.Vector3( 5, -5, 5 ), - * new THREE.Vector3( 10, 0, 10 ) - * ] ); - * - * const points = curve.getPoints( 50 ); - * const geometry = new THREE.BufferGeometry().setFromPoints( points ); - * - * const material = new THREE.LineBasicMaterial( { color: 0xff0000 } ); - * - * // Create the final object to add to the scene - * const curveObject = new THREE.Line( geometry, material ); - * ``` - * - * @augments Curve - */ -export class CatmullRomCurve3 extends Curve { - /** - * Constructs a new Catmull-Rom curve. - * - * @param {Array} [points] - An array of 3D points defining the curve. - * @param {boolean} [closed=false] - Whether the curve is closed or not. - * @param {('centripetal'|'chordal'|'catmullrom')} [curveType='centripetal'] - The curve type. - * @param {number} [tension=0.5] - Tension of the curve. - */ - constructor(points?: Array, closed?: boolean, curveType?: ("centripetal" | "chordal" | "catmullrom"), tension?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isCatmullRomCurve3: boolean; - type: string; - /** - * An array of 3D points defining the curve. - * - * @type {Array} - */ - points: Array; - /** - * Whether the curve is closed or not. - * - * @type {boolean} - * @default false - */ - closed: boolean; - /** - * The curve type. - * - * @type {('centripetal'|'chordal'|'catmullrom')} - * @default 'centripetal' - */ - curveType: ("centripetal" | "chordal" | "catmullrom"); - /** - * Tension of the curve. - * - * @type {number} - * @default 0.5 - */ - tension: number; - /** - * Returns a point on the curve. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector3} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector3): Vector3; - copy(source: any): this; - fromJSON(json: any): this; -} -import { Curve } from '../core/Curve.js'; -import { Vector3 } from '../../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/CubicBezierCurve.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/CubicBezierCurve.d.ts deleted file mode 100644 index 434713a9f..000000000 --- a/jsdoc-testing/jsdoc/src/extras/curves/CubicBezierCurve.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -/** - * A curve representing a 2D Cubic Bezier curve. - * - * ```js - * const curve = new THREE.CubicBezierCurve( - * new THREE.Vector2( - 0, 0 ), - * new THREE.Vector2( - 5, 15 ), - * new THREE.Vector2( 20, 15 ), - * new THREE.Vector2( 10, 0 ) - * ); - * - * const points = curve.getPoints( 50 ); - * const geometry = new THREE.BufferGeometry().setFromPoints( points ); - * - * const material = new THREE.LineBasicMaterial( { color: 0xff0000 } ); - * - * // Create the final object to add to the scene - * const curveObject = new THREE.Line( geometry, material ); - * ``` - * - * @augments Curve - */ -export class CubicBezierCurve extends Curve { - /** - * Constructs a new Cubic Bezier curve. - * - * @param {Vector2} [v0] - The start point. - * @param {Vector2} [v1] - The first control point. - * @param {Vector2} [v2] - The second control point. - * @param {Vector2} [v3] - The end point. - */ - constructor(v0?: Vector2, v1?: Vector2, v2?: Vector2, v3?: Vector2); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isCubicBezierCurve: boolean; - type: string; - /** - * The start point. - * - * @type {Vector2} - */ - v0: Vector2; - /** - * The first control point. - * - * @type {Vector2} - */ - v1: Vector2; - /** - * The second control point. - * - * @type {Vector2} - */ - v2: Vector2; - /** - * The end point. - * - * @type {Vector2} - */ - v3: Vector2; - /** - * Returns a point on the curve. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector2} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector2} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector2): Vector2; - copy(source: any): this; - fromJSON(json: any): this; -} -import { Curve } from '../core/Curve.js'; -import { Vector2 } from '../../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/CubicBezierCurve3.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/CubicBezierCurve3.d.ts deleted file mode 100644 index ccc99379e..000000000 --- a/jsdoc-testing/jsdoc/src/extras/curves/CubicBezierCurve3.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * A curve representing a 3D Cubic Bezier curve. - * - * @augments Curve - */ -export class CubicBezierCurve3 extends Curve { - /** - * Constructs a new Cubic Bezier curve. - * - * @param {Vector3} [v0] - The start point. - * @param {Vector3} [v1] - The first control point. - * @param {Vector3} [v2] - The second control point. - * @param {Vector3} [v3] - The end point. - */ - constructor(v0?: Vector3, v1?: Vector3, v2?: Vector3, v3?: Vector3); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isCubicBezierCurve3: boolean; - type: string; - /** - * The start point. - * - * @type {Vector3} - */ - v0: Vector3; - /** - * The first control point. - * - * @type {Vector3} - */ - v1: Vector3; - /** - * The second control point. - * - * @type {Vector3} - */ - v2: Vector3; - /** - * The end point. - * - * @type {Vector3} - */ - v3: Vector3; - /** - * Returns a point on the curve. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector3} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector3): Vector3; - copy(source: any): this; - fromJSON(json: any): this; -} -import { Curve } from '../core/Curve.js'; -import { Vector3 } from '../../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/Curves.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/Curves.d.ts deleted file mode 100644 index ce726ca5a..000000000 --- a/jsdoc-testing/jsdoc/src/extras/curves/Curves.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export { ArcCurve } from "./ArcCurve.js"; -export { CatmullRomCurve3 } from "./CatmullRomCurve3.js"; -export { CubicBezierCurve } from "./CubicBezierCurve.js"; -export { CubicBezierCurve3 } from "./CubicBezierCurve3.js"; -export { EllipseCurve } from "./EllipseCurve.js"; -export { LineCurve } from "./LineCurve.js"; -export { LineCurve3 } from "./LineCurve3.js"; -export { QuadraticBezierCurve } from "./QuadraticBezierCurve.js"; -export { QuadraticBezierCurve3 } from "./QuadraticBezierCurve3.js"; -export { SplineCurve } from "./SplineCurve.js"; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/EllipseCurve.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/EllipseCurve.d.ts deleted file mode 100644 index 4080dab88..000000000 --- a/jsdoc-testing/jsdoc/src/extras/curves/EllipseCurve.d.ts +++ /dev/null @@ -1,117 +0,0 @@ -/** - * A curve representing an ellipse. - * - * ```js - * const curve = new THREE.EllipseCurve( - * 0, 0, - * 10, 10, - * 0, 2 * Math.PI, - * false, - * 0 - * ); - * - * const points = curve.getPoints( 50 ); - * const geometry = new THREE.BufferGeometry().setFromPoints( points ); - * - * const material = new THREE.LineBasicMaterial( { color: 0xff0000 } ); - * - * // Create the final object to add to the scene - * const ellipse = new THREE.Line( geometry, material ); - * ``` - * - * @augments Curve - */ -export class EllipseCurve extends Curve { - /** - * Constructs a new ellipse curve. - * - * @param {number} [aX=0] - The X center of the ellipse. - * @param {number} [aY=0] - The Y center of the ellipse. - * @param {number} [xRadius=1] - The radius of the ellipse in the x direction. - * @param {number} [yRadius=1] - The radius of the ellipse in the y direction. - * @param {number} [aStartAngle=0] - The start angle of the curve in radians starting from the positive X axis. - * @param {number} [aEndAngle=Math.PI*2] - The end angle of the curve in radians starting from the positive X axis. - * @param {boolean} [aClockwise=false] - Whether the ellipse is drawn clockwise or not. - * @param {number} [aRotation=0] - The rotation angle of the ellipse in radians, counterclockwise from the positive X axis. - */ - constructor(aX?: number, aY?: number, xRadius?: number, yRadius?: number, aStartAngle?: number, aEndAngle?: number, aClockwise?: boolean, aRotation?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isEllipseCurve: boolean; - type: string; - /** - * The X center of the ellipse. - * - * @type {number} - * @default 0 - */ - aX: number; - /** - * The Y center of the ellipse. - * - * @type {number} - * @default 0 - */ - aY: number; - /** - * The radius of the ellipse in the x direction. - * Setting the this value equal to the {@link EllipseCurve#yRadius} will result in a circle. - * - * @type {number} - * @default 1 - */ - xRadius: number; - /** - * The radius of the ellipse in the y direction. - * Setting the this value equal to the {@link EllipseCurve#xRadius} will result in a circle. - * - * @type {number} - * @default 1 - */ - yRadius: number; - /** - * The start angle of the curve in radians starting from the positive X axis. - * - * @type {number} - * @default 0 - */ - aStartAngle: number; - /** - * The end angle of the curve in radians starting from the positive X axis. - * - * @type {number} - * @default Math.PI*2 - */ - aEndAngle: number; - /** - * Whether the ellipse is drawn clockwise or not. - * - * @type {boolean} - * @default false - */ - aClockwise: boolean; - /** - * The rotation angle of the ellipse in radians, counterclockwise from the positive X axis. - * - * @type {number} - * @default 0 - */ - aRotation: number; - /** - * Returns a point on the curve. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector2} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector2} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector2): Vector2; - copy(source: any): this; - fromJSON(json: any): this; -} -import { Curve } from '../core/Curve.js'; -import { Vector2 } from '../../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/LineCurve.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/LineCurve.d.ts deleted file mode 100644 index 3a0f08206..000000000 --- a/jsdoc-testing/jsdoc/src/extras/curves/LineCurve.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * A curve representing a 2D line segment. - * - * @augments Curve - */ -export class LineCurve extends Curve { - /** - * Constructs a new line curve. - * - * @param {Vector2} [v1] - The start point. - * @param {Vector2} [v2] - The end point. - */ - constructor(v1?: Vector2, v2?: Vector2); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLineCurve: boolean; - type: string; - /** - * The start point. - * - * @type {Vector2} - */ - v1: Vector2; - /** - * The end point. - * - * @type {Vector2} - */ - v2: Vector2; - /** - * Returns a point on the line. - * - * @param {number} t - A interpolation factor representing a position on the line. Must be in the range `[0,1]`. - * @param {Vector2} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector2} The position on the line. - */ - getPoint(t: number, optionalTarget?: Vector2): Vector2; - getPointAt(u: any, optionalTarget: any): Vector2; - getTangent(t: any, optionalTarget?: Vector2): Vector2; - getTangentAt(u: any, optionalTarget: any): Vector2; - copy(source: any): this; - fromJSON(json: any): this; -} -import { Curve } from '../core/Curve.js'; -import { Vector2 } from '../../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/LineCurve3.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/LineCurve3.d.ts deleted file mode 100644 index 5f03eb30d..000000000 --- a/jsdoc-testing/jsdoc/src/extras/curves/LineCurve3.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * A curve representing a 3D line segment. - * - * @augments Curve - */ -export class LineCurve3 extends Curve { - /** - * Constructs a new line curve. - * - * @param {Vector3} [v1] - The start point. - * @param {Vector3} [v2] - The end point. - */ - constructor(v1?: Vector3, v2?: Vector3); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLineCurve3: boolean; - type: string; - /** - * The start point. - * - * @type {Vector3} - */ - v1: Vector3; - /** - * The end point. - * - * @type {Vector2} - */ - v2: Vector2; - /** - * Returns a point on the line. - * - * @param {number} t - A interpolation factor representing a position on the line. Must be in the range `[0,1]`. - * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector3} The position on the line. - */ - getPoint(t: number, optionalTarget?: Vector3): Vector3; - getPointAt(u: any, optionalTarget: any): Vector3; - getTangent(t: any, optionalTarget?: Vector3): Vector3; - getTangentAt(u: any, optionalTarget: any): Vector3; - copy(source: any): this; - fromJSON(json: any): this; -} -import { Curve } from '../core/Curve.js'; -import { Vector3 } from '../../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/QuadraticBezierCurve.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/QuadraticBezierCurve.d.ts deleted file mode 100644 index d123a23b5..000000000 --- a/jsdoc-testing/jsdoc/src/extras/curves/QuadraticBezierCurve.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * A curve representing a 2D Quadratic Bezier curve. - * - * ```js - * const curve = new THREE.QuadraticBezierCurve( - * new THREE.Vector2( - 10, 0 ), - * new THREE.Vector2( 20, 15 ), - * new THREE.Vector2( 10, 0 ) - * ) - * - * const points = curve.getPoints( 50 ); - * const geometry = new THREE.BufferGeometry().setFromPoints( points ); - * - * const material = new THREE.LineBasicMaterial( { color: 0xff0000 } ); - * - * // Create the final object to add to the scene - * const curveObject = new THREE.Line( geometry, material ); - * ``` - * - * @augments Curve - */ -export class QuadraticBezierCurve extends Curve { - /** - * Constructs a new Quadratic Bezier curve. - * - * @param {Vector2} [v0] - The start point. - * @param {Vector2} [v1] - The control point. - * @param {Vector2} [v2] - The end point. - */ - constructor(v0?: Vector2, v1?: Vector2, v2?: Vector2); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isQuadraticBezierCurve: boolean; - type: string; - /** - * The start point. - * - * @type {Vector2} - */ - v0: Vector2; - /** - * The control point. - * - * @type {Vector2} - */ - v1: Vector2; - /** - * The end point. - * - * @type {Vector2} - */ - v2: Vector2; - /** - * Returns a point on the curve. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector2} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector2} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector2): Vector2; - copy(source: any): this; - fromJSON(json: any): this; -} -import { Curve } from '../core/Curve.js'; -import { Vector2 } from '../../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/QuadraticBezierCurve3.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/QuadraticBezierCurve3.d.ts deleted file mode 100644 index 5166fe270..000000000 --- a/jsdoc-testing/jsdoc/src/extras/curves/QuadraticBezierCurve3.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * A curve representing a 3D Quadratic Bezier curve. - * - * @augments Curve - */ -export class QuadraticBezierCurve3 extends Curve { - /** - * Constructs a new Quadratic Bezier curve. - * - * @param {Vector3} [v0] - The start point. - * @param {Vector3} [v1] - The control point. - * @param {Vector3} [v2] - The end point. - */ - constructor(v0?: Vector3, v1?: Vector3, v2?: Vector3); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isQuadraticBezierCurve3: boolean; - type: string; - /** - * The start point. - * - * @type {Vector3} - */ - v0: Vector3; - /** - * The control point. - * - * @type {Vector3} - */ - v1: Vector3; - /** - * The end point. - * - * @type {Vector3} - */ - v2: Vector3; - /** - * Returns a point on the curve. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector3} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector3} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector3): Vector3; - copy(source: any): this; - fromJSON(json: any): this; -} -import { Curve } from '../core/Curve.js'; -import { Vector3 } from '../../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/curves/SplineCurve.d.ts b/jsdoc-testing/jsdoc/src/extras/curves/SplineCurve.d.ts deleted file mode 100644 index 10e62e17d..000000000 --- a/jsdoc-testing/jsdoc/src/extras/curves/SplineCurve.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * A curve representing a 2D spline curve. - * - * ```js - * // Create a sine-like wave - * const curve = new THREE.SplineCurve( [ - * new THREE.Vector2( -10, 0 ), - * new THREE.Vector2( -5, 5 ), - * new THREE.Vector2( 0, 0 ), - * new THREE.Vector2( 5, -5 ), - * new THREE.Vector2( 10, 0 ) - * ] ); - * - * const points = curve.getPoints( 50 ); - * const geometry = new THREE.BufferGeometry().setFromPoints( points ); - * - * const material = new THREE.LineBasicMaterial( { color: 0xff0000 } ); - * - * // Create the final object to add to the scene - * const splineObject = new THREE.Line( geometry, material ); - * ``` - * - * @augments Curve - */ -export class SplineCurve extends Curve { - /** - * Constructs a new 2D spline curve. - * - * @param {Array} [points] - An array of 2D points defining the curve. - */ - constructor(points?: Array); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSplineCurve: boolean; - type: string; - /** - * An array of 2D points defining the curve. - * - * @type {Array} - */ - points: Array; - /** - * Returns a point on the curve. - * - * @param {number} t - A interpolation factor representing a position on the curve. Must be in the range `[0,1]`. - * @param {Vector2} [optionalTarget] - The optional target vector the result is written to. - * @return {Vector2} The position on the curve. - */ - getPoint(t: number, optionalTarget?: Vector2): Vector2; - copy(source: any): this; - fromJSON(json: any): this; -} -import { Curve } from '../core/Curve.js'; -import { Vector2 } from '../../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/extras/lib/earcut.d.ts b/jsdoc-testing/jsdoc/src/extras/lib/earcut.d.ts deleted file mode 100644 index 8cf03b1bf..000000000 --- a/jsdoc-testing/jsdoc/src/extras/lib/earcut.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default function earcut(data: any, holeIndices: any, dim?: number): any[]; -export function deviation(data: any, holeIndices: any, dim: any, triangles: any): number; -export function flatten(data: any): { - vertices: any[]; - holes: number[]; - dimensions: any; -}; diff --git a/jsdoc-testing/jsdoc/src/geometries/BoxGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/BoxGeometry.d.ts deleted file mode 100644 index 36fb50dad..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/BoxGeometry.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * A geometry class for a rectangular cuboid with a given width, height, and depth. - * On creation, the cuboid is centred on the origin, with each edge parallel to one - * of the axes. - * - * ```js - * const geometry = new THREE.BoxGeometry( 1, 1, 1 ); - * const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); - * const cube = new THREE.Mesh( geometry, material ); - * scene.add( cube ); - * ``` - * - * @augments BufferGeometry - * @demo scenes/geometry-browser.html#BoxGeometry - */ -export class BoxGeometry extends BufferGeometry { - /** - * Factory method for creating an instance of this class from the given - * JSON object. - * - * @param {Object} data - A JSON object representing the serialized geometry. - * @return {BoxGeometry} A new instance. - */ - static fromJSON(data: Object): BoxGeometry; - /** - * Constructs a new box geometry. - * - * @param {number} [width=1] - The width. That is, the length of the edges parallel to the X axis. - * @param {number} [height=1] - The height. That is, the length of the edges parallel to the Y axis. - * @param {number} [depth=1] - The depth. That is, the length of the edges parallel to the Z axis. - * @param {number} [widthSegments=1] - Number of segmented rectangular faces along the width of the sides. - * @param {number} [heightSegments=1] - Number of segmented rectangular faces along the height of the sides. - * @param {number} [depthSegments=1] - Number of segmented rectangular faces along the depth of the sides. - */ - constructor(width?: number, height?: number, depth?: number, widthSegments?: number, heightSegments?: number, depthSegments?: number); - /** - * Holds the constructor parameters that have been - * used to generate the geometry. Any modification - * after instantiation does not change the geometry. - * - * @type {Object} - */ - parameters: Object; - copy(source: any): this; -} -import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/CapsuleGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/CapsuleGeometry.d.ts deleted file mode 100644 index 207ba310c..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/CapsuleGeometry.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * A geometry class for representing a capsule. - * - * ```js - * const geometry = new THREE.CapsuleGeometry( 1, 1, 4, 8, 1 ); - * const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); - * const capsule = new THREE.Mesh( geometry, material ); - * scene.add( capsule ); - * ``` - * - * @augments BufferGeometry - * @demo scenes/geometry-browser.html#CapsuleGeometry - */ -export class CapsuleGeometry extends BufferGeometry { - /** - * Factory method for creating an instance of this class from the given - * JSON object. - * - * @param {Object} data - A JSON object representing the serialized geometry. - * @return {CapsuleGeometry} A new instance. - */ - static fromJSON(data: Object): CapsuleGeometry; - /** - * Constructs a new capsule geometry. - * - * @param {number} [radius=1] - Radius of the capsule. - * @param {number} [height=1] - Height of the middle section. - * @param {number} [capSegments=4] - Number of curve segments used to build each cap. - * @param {number} [radialSegments=8] - Number of segmented faces around the circumference of the capsule. Must be an integer >= 3. - * @param {number} [heightSegments=1] - Number of rows of faces along the height of the middle section. Must be an integer >= 1. - */ - constructor(radius?: number, height?: number, capSegments?: number, radialSegments?: number, heightSegments?: number); - /** - * Holds the constructor parameters that have been - * used to generate the geometry. Any modification - * after instantiation does not change the geometry. - * - * @type {Object} - */ - parameters: Object; - copy(source: any): this; -} -import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/CircleGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/CircleGeometry.d.ts deleted file mode 100644 index 964d89897..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/CircleGeometry.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * A simple shape of Euclidean geometry. It is constructed from a - * number of triangular segments that are oriented around a central point and - * extend as far out as a given radius. It is built counter-clockwise from a - * start angle and a given central angle. It can also be used to create - * regular polygons, where the number of segments determines the number of - * sides. - * - * ```js - * const geometry = new THREE.CircleGeometry( 5, 32 ); - * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); - * const circle = new THREE.Mesh( geometry, material ); - * scene.add( circle ) - * ``` - * - * @augments BufferGeometry - * @demo scenes/geometry-browser.html#CircleGeometry - */ -export class CircleGeometry extends BufferGeometry { - /** - * Factory method for creating an instance of this class from the given - * JSON object. - * - * @param {Object} data - A JSON object representing the serialized geometry. - * @return {CircleGeometry} A new instance. - */ - static fromJSON(data: Object): CircleGeometry; - /** - * Constructs a new circle geometry. - * - * @param {number} [radius=1] - Radius of the circle. - * @param {number} [segments=32] - Number of segments (triangles), minimum = `3`. - * @param {number} [thetaStart=0] - Start angle for first segment in radians. - * @param {number} [thetaLength=Math.PI*2] - The central angle, often called theta, - * of the circular sector in radians. The default value results in a complete circle. - */ - constructor(radius?: number, segments?: number, thetaStart?: number, thetaLength?: number); - /** - * Holds the constructor parameters that have been - * used to generate the geometry. Any modification - * after instantiation does not change the geometry. - * - * @type {Object} - */ - parameters: Object; - copy(source: any): this; -} -import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/ConeGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/ConeGeometry.d.ts deleted file mode 100644 index 0df48d532..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/ConeGeometry.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * A geometry class for representing a cone. - * - * ```js - * const geometry = new THREE.ConeGeometry( 5, 20, 32 ); - * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); - * const cone = new THREE.Mesh(geometry, material ); - * scene.add( cone ); - * ``` - * - * @augments CylinderGeometry - * @demo scenes/geometry-browser.html#ConeGeometry - */ -export class ConeGeometry extends CylinderGeometry { - /** - * Constructs a new cone geometry. - * - * @param {number} [radius=1] - Radius of the cone base. - * @param {number} [height=1] - Height of the cone. - * @param {number} [radialSegments=32] - Number of segmented faces around the circumference of the cone. - * @param {number} [heightSegments=1] - Number of rows of faces along the height of the cone. - * @param {boolean} [openEnded=false] - Whether the base of the cone is open or capped. - * @param {number} [thetaStart=0] - Start angle for first segment, in radians. - * @param {number} [thetaLength=Math.PI*2] - The central angle, often called theta, of the circular sector, in radians. - * The default value results in a complete cone. - */ - constructor(radius?: number, height?: number, radialSegments?: number, heightSegments?: number, openEnded?: boolean, thetaStart?: number, thetaLength?: number); -} -import { CylinderGeometry } from './CylinderGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/CylinderGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/CylinderGeometry.d.ts deleted file mode 100644 index 6b28774bd..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/CylinderGeometry.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -/** - * A geometry class for representing a cylinder. - * - * ```js - * const geometry = new THREE.CylinderGeometry( 5, 5, 20, 32 ); - * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); - * const cylinder = new THREE.Mesh( geometry, material ); - * scene.add( cylinder ); - * ``` - * - * @augments BufferGeometry - * @demo scenes/geometry-browser.html#CylinderGeometry - */ -export class CylinderGeometry extends BufferGeometry { - /** - * Factory method for creating an instance of this class from the given - * JSON object. - * - * @param {Object} data - A JSON object representing the serialized geometry. - * @return {CylinderGeometry} A new instance. - */ - static fromJSON(data: Object): CylinderGeometry; - /** - * Constructs a new cylinder geometry. - * - * @param {number} [radiusTop=1] - Radius of the cylinder at the top. - * @param {number} [radiusBottom=1] - Radius of the cylinder at the bottom. - * @param {number} [height=1] - Height of the cylinder. - * @param {number} [radialSegments=32] - Number of segmented faces around the circumference of the cylinder. - * @param {number} [heightSegments=1] - Number of rows of faces along the height of the cylinder. - * @param {boolean} [openEnded=false] - Whether the base of the cylinder is open or capped. - * @param {number} [thetaStart=0] - Start angle for first segment, in radians. - * @param {number} [thetaLength=Math.PI*2] - The central angle, often called theta, of the circular sector, in radians. - * The default value results in a complete cylinder. - */ - constructor(radiusTop?: number, radiusBottom?: number, height?: number, radialSegments?: number, heightSegments?: number, openEnded?: boolean, thetaStart?: number, thetaLength?: number); - /** - * Holds the constructor parameters that have been - * used to generate the geometry. Any modification - * after instantiation does not change the geometry. - * - * @type {Object} - */ - parameters: Object; - copy(source: any): this; -} -import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/DodecahedronGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/DodecahedronGeometry.d.ts deleted file mode 100644 index dd5a084d9..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/DodecahedronGeometry.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * A geometry class for representing a dodecahedron. - * - * ```js - * const geometry = new THREE.DodecahedronGeometry(); - * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); - * const dodecahedron = new THREE.Mesh( geometry, material ); - * scene.add( dodecahedron ); - * ``` - * - * @augments PolyhedronGeometry - * @demo scenes/geometry-browser.html#DodecahedronGeometry - */ -export class DodecahedronGeometry extends PolyhedronGeometry { - /** - * Constructs a new dodecahedron geometry. - * - * @param {number} [radius=1] - Radius of the dodecahedron. - * @param {number} [detail=0] - Setting this to a value greater than `0` adds vertices making it no longer a dodecahedron. - */ - constructor(radius?: number, detail?: number); -} -import { PolyhedronGeometry } from './PolyhedronGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/EdgesGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/EdgesGeometry.d.ts deleted file mode 100644 index e8a57e60b..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/EdgesGeometry.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Can be used as a helper object to view the edges of a geometry. - * - * ```js - * const geometry = new THREE.BoxGeometry(); - * const edges = new THREE.EdgesGeometry( geometry ); - * const line = new THREE.LineSegments( edges ); - * scene.add( line ); - * ``` - * - * Note: It is not yet possible to serialize/deserialize instances of this class. - * - * @augments BufferGeometry - */ -export class EdgesGeometry extends BufferGeometry { - /** - * Constructs a new edges geometry. - * - * @param {?BufferGeometry} [geometry=null] - The geometry. - * @param {number} [thresholdAngle=1] - An edge is only rendered if the angle (in degrees) - * between the face normals of the adjoining faces exceeds this value. - */ - constructor(geometry?: BufferGeometry | null, thresholdAngle?: number); - /** - * Holds the constructor parameters that have been - * used to generate the geometry. Any modification - * after instantiation does not change the geometry. - * - * @type {Object} - */ - parameters: Object; - copy(source: any): this; -} -import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/ExtrudeGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/ExtrudeGeometry.d.ts deleted file mode 100644 index 92ba6a8a5..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/ExtrudeGeometry.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * ~Options - */ -export type ExtrudeGeometry = { - /** - * - Number of points on the curves. - */ - curveSegments?: number | undefined; - /** - * - Number of points used for subdividing segments along the depth of the extruded spline. - */ - steps?: number | undefined; - /** - * - Depth to extrude the shape. - */ - depth?: number | undefined; - /** - * - Whether to beveling to the shape or not. - */ - bevelEnabled?: boolean | undefined; - /** - * - How deep into the original shape the bevel goes. - */ - bevelThickness?: number | undefined; - /** - * - Distance from the shape outline that the bevel extends. - */ - bevelSize?: number | undefined; - /** - * - Distance from the shape outline that the bevel starts. - */ - bevelOffset?: number | undefined; - /** - * - Number of bevel layers. - */ - bevelSegments?: number | undefined; - /** - * - A 3D spline path along which the shape should be extruded. Bevels not supported for path extrusion. - */ - extrudePath?: Curve | null; - /** - * - An object that provides UV generator functions for custom UV generation. - */ - UVGenerator?: Object | undefined; -}; -/** - * Creates extruded geometry from a path shape. - * - * ```js - * const length = 12, width = 8; - * - * const shape = new THREE.Shape(); - * shape.moveTo( 0,0 ); - * shape.lineTo( 0, width ); - * shape.lineTo( length, width ); - * shape.lineTo( length, 0 ); - * shape.lineTo( 0, 0 ); - * - * const geometry = new THREE.ExtrudeGeometry( shape ); - * const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); - * const mesh = new THREE.Mesh( geometry, material ) ; - * scene.add( mesh ); - * ``` - * - * @augments BufferGeometry - * @demo scenes/geometry-browser.html#ExtrudeGeometry - */ -export class ExtrudeGeometry extends BufferGeometry { - /** - * Factory method for creating an instance of this class from the given - * JSON object. - * - * @param {Object} data - A JSON object representing the serialized geometry. - * @param {Array} shapes - An array of shapes. - * @return {ExtrudeGeometry} A new instance. - */ - static fromJSON(data: Object, shapes: Array): ExtrudeGeometry; - /** - * Constructs a new extrude geometry. - * - * @param {Shape|Array} [shapes] - A shape or an array of shapes. - * @param {ExtrudeGeometry~Options} [options] - The extrude settings. - */ - constructor(shapes?: Shape | Array, options?: {}); - /** - * Holds the constructor parameters that have been - * used to generate the geometry. Any modification - * after instantiation does not change the geometry. - * - * @type {Object} - */ - parameters: Object; - copy(source: any): this; - toJSON(): any; -} -import { BufferGeometry } from '../core/BufferGeometry.js'; -import { Shape } from '../extras/core/Shape.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/Geometries.d.ts b/jsdoc-testing/jsdoc/src/geometries/Geometries.d.ts deleted file mode 100644 index b1be46c46..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/Geometries.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export * from "./BoxGeometry.js"; -export * from "./CapsuleGeometry.js"; -export * from "./CircleGeometry.js"; -export * from "./ConeGeometry.js"; -export * from "./CylinderGeometry.js"; -export * from "./DodecahedronGeometry.js"; -export * from "./EdgesGeometry.js"; -export * from "./ExtrudeGeometry.js"; -export * from "./IcosahedronGeometry.js"; -export * from "./LatheGeometry.js"; -export * from "./OctahedronGeometry.js"; -export * from "./PlaneGeometry.js"; -export * from "./PolyhedronGeometry.js"; -export * from "./RingGeometry.js"; -export * from "./ShapeGeometry.js"; -export * from "./SphereGeometry.js"; -export * from "./TetrahedronGeometry.js"; -export * from "./TorusGeometry.js"; -export * from "./TorusKnotGeometry.js"; -export * from "./TubeGeometry.js"; -export * from "./WireframeGeometry.js"; diff --git a/jsdoc-testing/jsdoc/src/geometries/IcosahedronGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/IcosahedronGeometry.d.ts deleted file mode 100644 index fb50e77df..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/IcosahedronGeometry.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * A geometry class for representing an icosahedron. - * - * ```js - * const geometry = new THREE.IcosahedronGeometry(); - * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); - * const icosahedron = new THREE.Mesh( geometry, material ); - * scene.add( icosahedron ); - * ``` - * - * @augments PolyhedronGeometry - * @demo scenes/geometry-browser.html#IcosahedronGeometry - */ -export class IcosahedronGeometry extends PolyhedronGeometry { - /** - * Constructs a new icosahedron geometry. - * - * @param {number} [radius=1] - Radius of the icosahedron. - * @param {number} [detail=0] - Setting this to a value greater than `0` adds vertices making it no longer a icosahedron. - */ - constructor(radius?: number, detail?: number); -} -import { PolyhedronGeometry } from './PolyhedronGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/LatheGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/LatheGeometry.d.ts deleted file mode 100644 index cce939fca..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/LatheGeometry.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Creates meshes with axial symmetry like vases. The lathe rotates around the Y axis. - * - * ```js - * const points = []; - * for ( let i = 0; i < 10; i ++ ) { - * points.push( new THREE.Vector2( Math.sin( i * 0.2 ) * 10 + 5, ( i - 5 ) * 2 ) ); - * } - * const geometry = new THREE.LatheGeometry( points ); - * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); - * const lathe = new THREE.Mesh( geometry, material ); - * scene.add( lathe ); - * ``` - * - * @augments BufferGeometry - * @demo scenes/geometry-browser.html#LatheGeometry - */ -export class LatheGeometry extends BufferGeometry { - /** - * Factory method for creating an instance of this class from the given - * JSON object. - * - * @param {Object} data - A JSON object representing the serialized geometry. - * @return {LatheGeometry} A new instance. - */ - static fromJSON(data: Object): LatheGeometry; - /** - * Constructs a new lathe geometry. - * - * @param {Array} [points] - An array of points in 2D space. The x-coordinate of each point - * must be greater than zero. - * @param {number} [segments=12] - The number of circumference segments to generate. - * @param {number} [phiStart=0] - The starting angle in radians. - * @param {number} [phiLength=Math.PI*2] - The radian (0 to 2PI) range of the lathed section 2PI is a - * closed lathe, less than 2PI is a portion. - */ - constructor(points?: Array, segments?: number, phiStart?: number, phiLength?: number); - /** - * Holds the constructor parameters that have been - * used to generate the geometry. Any modification - * after instantiation does not change the geometry. - * - * @type {Object} - */ - parameters: Object; - copy(source: any): this; -} -import { BufferGeometry } from '../core/BufferGeometry.js'; -import { Vector2 } from '../math/Vector2.js'; -import { Vector3 } from '../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/OctahedronGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/OctahedronGeometry.d.ts deleted file mode 100644 index d61fe28a2..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/OctahedronGeometry.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * A geometry class for representing an octahedron. - * - * ```js - * const geometry = new THREE.OctahedronGeometry(); - * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); - * const octahedron = new THREE.Mesh( geometry, material ); - * scene.add( octahedron ); - * ``` - * - * @augments PolyhedronGeometry - * @demo scenes/geometry-browser.html#OctahedronGeometry - */ -export class OctahedronGeometry extends PolyhedronGeometry { - /** - * Constructs a new octahedron geometry. - * - * @param {number} [radius=1] - Radius of the octahedron. - * @param {number} [detail=0] - Setting this to a value greater than `0` adds vertices making it no longer a octahedron. - */ - constructor(radius?: number, detail?: number); -} -import { PolyhedronGeometry } from './PolyhedronGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/PlaneGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/PlaneGeometry.d.ts deleted file mode 100644 index d75a367ea..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/PlaneGeometry.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * A geometry class for representing a plane. - * - * ```js - * const geometry = new THREE.PlaneGeometry( 1, 1 ); - * const material = new THREE.MeshBasicMaterial( { color: 0xffff00, side: THREE.DoubleSide } ); - * const plane = new THREE.Mesh( geometry, material ); - * scene.add( plane ); - * ``` - * - * @augments BufferGeometry - * @demo scenes/geometry-browser.html#PlaneGeometry - */ -export class PlaneGeometry extends BufferGeometry { - /** - * Factory method for creating an instance of this class from the given - * JSON object. - * - * @param {Object} data - A JSON object representing the serialized geometry. - * @return {PlaneGeometry} A new instance. - */ - static fromJSON(data: Object): PlaneGeometry; - /** - * Constructs a new plane geometry. - * - * @param {number} [width=1] - The width along the X axis. - * @param {number} [height=1] - The height along the Y axis - * @param {number} [widthSegments=1] - The number of segments along the X axis. - * @param {number} [heightSegments=1] - The number of segments along the Y axis. - */ - constructor(width?: number, height?: number, widthSegments?: number, heightSegments?: number); - /** - * Holds the constructor parameters that have been - * used to generate the geometry. Any modification - * after instantiation does not change the geometry. - * - * @type {Object} - */ - parameters: Object; - copy(source: any): this; -} -import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/PolyhedronGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/PolyhedronGeometry.d.ts deleted file mode 100644 index c0ef0437c..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/PolyhedronGeometry.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * A polyhedron is a solid in three dimensions with flat faces. This class - * will take an array of vertices, project them onto a sphere, and then - * divide them up to the desired level of detail. - * - * @augments BufferGeometry - */ -export class PolyhedronGeometry extends BufferGeometry { - /** - * Factory method for creating an instance of this class from the given - * JSON object. - * - * @param {Object} data - A JSON object representing the serialized geometry. - * @return {PolyhedronGeometry} A new instance. - */ - static fromJSON(data: Object): PolyhedronGeometry; - /** - * Constructs a new polyhedron geometry. - * - * @param {Array} [vertices] - A flat array of vertices describing the base shape. - * @param {Array} [indices] - A flat array of indices describing the base shape. - * @param {number} [radius=1] - The radius of the shape. - * @param {number} [detail=0] - How many levels to subdivide the geometry. The more detail, the smoother the shape. - */ - constructor(vertices?: Array, indices?: Array, radius?: number, detail?: number); - /** - * Holds the constructor parameters that have been - * used to generate the geometry. Any modification - * after instantiation does not change the geometry. - * - * @type {Object} - */ - parameters: Object; - copy(source: any): this; -} -import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/RingGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/RingGeometry.d.ts deleted file mode 100644 index 3d54a0d1a..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/RingGeometry.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * A class for generating a two-dimensional ring geometry. - * - * ```js - * const geometry = new THREE.RingGeometry( 1, 5, 32 ); - * const material = new THREE.MeshBasicMaterial( { color: 0xffff00, side: THREE.DoubleSide } ); - * const mesh = new THREE.Mesh( geometry, material ); - * scene.add( mesh ); - * ``` - * - * @augments BufferGeometry - * @demo scenes/geometry-browser.html#RingGeometry - */ -export class RingGeometry extends BufferGeometry { - /** - * Factory method for creating an instance of this class from the given - * JSON object. - * - * @param {Object} data - A JSON object representing the serialized geometry. - * @return {RingGeometry} A new instance. - */ - static fromJSON(data: Object): RingGeometry; - /** - * Constructs a new ring geometry. - * - * @param {number} [innerRadius=0.5] - The inner radius of the ring. - * @param {number} [outerRadius=1] - The outer radius of the ring. - * @param {number} [thetaSegments=32] - Number of segments. A higher number means the ring will be more round. Minimum is `3`. - * @param {number} [phiSegments=1] - Number of segments per ring segment. Minimum is `1`. - * @param {number} [thetaStart=0] - Starting angle in radians. - * @param {number} [thetaLength=Math.PI*2] - Central angle in radians. - */ - constructor(innerRadius?: number, outerRadius?: number, thetaSegments?: number, phiSegments?: number, thetaStart?: number, thetaLength?: number); - /** - * Holds the constructor parameters that have been - * used to generate the geometry. Any modification - * after instantiation does not change the geometry. - * - * @type {Object} - */ - parameters: Object; - copy(source: any): this; -} -import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/ShapeGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/ShapeGeometry.d.ts deleted file mode 100644 index 335290e14..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/ShapeGeometry.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Creates an one-sided polygonal geometry from one or more path shapes. - * - * ```js - * const arcShape = new THREE.Shape() - * .moveTo( 5, 1 ) - * .absarc( 1, 1, 4, 0, Math.PI * 2, false ); - * - * const geometry = new THREE.ShapeGeometry( arcShape ); - * const material = new THREE.MeshBasicMaterial( { color: 0x00ff00, side: THREE.DoubleSide } ); - * const mesh = new THREE.Mesh( geometry, material ) ; - * scene.add( mesh ); - * ``` - * - * @augments BufferGeometry - * @demo scenes/geometry-browser.html#ShapeGeometry - */ -export class ShapeGeometry extends BufferGeometry { - /** - * Factory method for creating an instance of this class from the given - * JSON object. - * - * @param {Object} data - A JSON object representing the serialized geometry. - * @param {Array} shapes - An array of shapes. - * @return {ShapeGeometry} A new instance. - */ - static fromJSON(data: Object, shapes: Array): ShapeGeometry; - /** - * Constructs a new shape geometry. - * - * @param {Shape|Array} [shapes] - A shape or an array of shapes. - * @param {number} [curveSegments=12] - Number of segments per shape. - */ - constructor(shapes?: Shape | Array, curveSegments?: number); - /** - * Holds the constructor parameters that have been - * used to generate the geometry. Any modification - * after instantiation does not change the geometry. - * - * @type {Object} - */ - parameters: Object; - copy(source: any): this; - toJSON(): any; -} -import { BufferGeometry } from '../core/BufferGeometry.js'; -import { Shape } from '../extras/core/Shape.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/SphereGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/SphereGeometry.d.ts deleted file mode 100644 index b150fa7df..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/SphereGeometry.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * A class for generating a sphere geometry. - * - * ```js - * const geometry = new THREE.SphereGeometry( 15, 32, 16 ); - * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); - * const sphere = new THREE.Mesh( geometry, material ); - * scene.add( sphere ); - * ``` - * - * @augments BufferGeometry - * @demo scenes/geometry-browser.html#SphereGeometry - */ -export class SphereGeometry extends BufferGeometry { - /** - * Factory method for creating an instance of this class from the given - * JSON object. - * - * @param {Object} data - A JSON object representing the serialized geometry. - * @return {SphereGeometry} A new instance. - */ - static fromJSON(data: Object): SphereGeometry; - /** - * Constructs a new sphere geometry. - * - * @param {number} [radius=1] - The sphere radius. - * @param {number} [widthSegments=32] - The number of horizontal segments. Minimum value is `3`. - * @param {number} [heightSegments=16] - The number of vertical segments. Minimum value is `2`. - * @param {number} [phiStart=0] - The horizontal starting angle in radians. - * @param {number} [phiLength=Math.PI*2] - The horizontal sweep angle size. - * @param {number} [thetaStart=0] - The vertical starting angle in radians. - * @param {number} [thetaLength=Math.PI] - The vertical sweep angle size. - */ - constructor(radius?: number, widthSegments?: number, heightSegments?: number, phiStart?: number, phiLength?: number, thetaStart?: number, thetaLength?: number); - /** - * Holds the constructor parameters that have been - * used to generate the geometry. Any modification - * after instantiation does not change the geometry. - * - * @type {Object} - */ - parameters: Object; - copy(source: any): this; -} -import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/TetrahedronGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/TetrahedronGeometry.d.ts deleted file mode 100644 index 20b8cc1f3..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/TetrahedronGeometry.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * A geometry class for representing an tetrahedron. - * - * ```js - * const geometry = new THREE.TetrahedronGeometry(); - * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); - * const tetrahedron = new THREE.Mesh( geometry, material ); - * scene.add( tetrahedron ); - * ``` - * - * @augments PolyhedronGeometry - * @demo scenes/geometry-browser.html#TetrahedronGeometry - */ -export class TetrahedronGeometry extends PolyhedronGeometry { - /** - * Constructs a new tetrahedron geometry. - * - * @param {number} [radius=1] - Radius of the tetrahedron. - * @param {number} [detail=0] - Setting this to a value greater than `0` adds vertices making it no longer a tetrahedron. - */ - constructor(radius?: number, detail?: number); -} -import { PolyhedronGeometry } from './PolyhedronGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/TorusGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/TorusGeometry.d.ts deleted file mode 100644 index cb545919c..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/TorusGeometry.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * A geometry class for representing an torus. - * - * ```js - * const geometry = new THREE.TorusGeometry( 10, 3, 16, 100 ); - * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); - * const torus = new THREE.Mesh( geometry, material ); - * scene.add( torus ); - * ``` - * - * @augments BufferGeometry - * @demo scenes/geometry-browser.html#TorusGeometry - */ -export class TorusGeometry extends BufferGeometry { - /** - * Factory method for creating an instance of this class from the given - * JSON object. - * - * @param {Object} data - A JSON object representing the serialized geometry. - * @return {TorusGeometry} A new instance. - */ - static fromJSON(data: Object): TorusGeometry; - /** - * Constructs a new torus geometry. - * - * @param {number} [radius=1] - Radius of the torus, from the center of the torus to the center of the tube. - * @param {number} [tube=0.4] - Radius of the tube. Must be smaller than `radius`. - * @param {number} [radialSegments=12] - The number of radial segments. - * @param {number} [tubularSegments=48] - The number of tubular segments. - * @param {number} [arc=Math.PI*2] - Central angle in radians. - * @param {number} [thetaStart=0] - Start of the tubular sweep in radians. - * @param {number} [thetaLength=Math.PI*2] - Length of the tubular sweep in radians. - */ - constructor(radius?: number, tube?: number, radialSegments?: number, tubularSegments?: number, arc?: number, thetaStart?: number, thetaLength?: number); - /** - * Holds the constructor parameters that have been - * used to generate the geometry. Any modification - * after instantiation does not change the geometry. - * - * @type {Object} - */ - parameters: Object; - copy(source: any): this; -} -import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/TorusKnotGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/TorusKnotGeometry.d.ts deleted file mode 100644 index 5f7272dfe..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/TorusKnotGeometry.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Creates a torus knot, the particular shape of which is defined by a pair - * of coprime integers, p and q. If p and q are not coprime, the result will - * be a torus link. - * - * ```js - * const geometry = new THREE.TorusKnotGeometry( 10, 3, 100, 16 ); - * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); - * const torusKnot = new THREE.Mesh( geometry, material ); - * scene.add( torusKnot ); - * ``` - * - * @augments BufferGeometry - * @demo scenes/geometry-browser.html#TorusKnotGeometry - */ -export class TorusKnotGeometry extends BufferGeometry { - /** - * Factory method for creating an instance of this class from the given - * JSON object. - * - * @param {Object} data - A JSON object representing the serialized geometry. - * @return {TorusKnotGeometry} A new instance. - */ - static fromJSON(data: Object): TorusKnotGeometry; - /** - * Constructs a new torus knot geometry. - * - * @param {number} [radius=1] - Radius of the torus knot. - * @param {number} [tube=0.4] - Radius of the tube. - * @param {number} [tubularSegments=64] - The number of tubular segments. - * @param {number} [radialSegments=8] - The number of radial segments. - * @param {number} [p=2] - This value determines, how many times the geometry winds around its axis of rotational symmetry. - * @param {number} [q=3] - This value determines, how many times the geometry winds around a circle in the interior of the torus. - */ - constructor(radius?: number, tube?: number, tubularSegments?: number, radialSegments?: number, p?: number, q?: number); - /** - * Holds the constructor parameters that have been - * used to generate the geometry. Any modification - * after instantiation does not change the geometry. - * - * @type {Object} - */ - parameters: Object; - copy(source: any): this; -} -import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/TubeGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/TubeGeometry.d.ts deleted file mode 100644 index f34277010..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/TubeGeometry.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Creates a tube that extrudes along a 3D curve. - * - * ```js - * class CustomSinCurve extends THREE.Curve { - * - * getPoint( t, optionalTarget = new THREE.Vector3() ) { - * - * const tx = t * 3 - 1.5; - * const ty = Math.sin( 2 * Math.PI * t ); - * const tz = 0; - * - * return optionalTarget.set( tx, ty, tz ); - * } - * - * } - * - * const path = new CustomSinCurve( 10 ); - * const geometry = new THREE.TubeGeometry( path, 20, 2, 8, false ); - * const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); - * const mesh = new THREE.Mesh( geometry, material ); - * scene.add( mesh ); - * ``` - * - * @augments BufferGeometry - * @demo scenes/geometry-browser.html#TubeGeometry - */ -export class TubeGeometry extends BufferGeometry { - /** - * Factory method for creating an instance of this class from the given - * JSON object. - * - * @param {Object} data - A JSON object representing the serialized geometry. - * @return {TubeGeometry} A new instance. - */ - static fromJSON(data: Object): TubeGeometry; - /** - * Constructs a new tube geometry. - * - * @param {Curve} [path=QuadraticBezierCurve3] - A 3D curve defining the path of the tube. - * @param {number} [tubularSegments=64] - The number of segments that make up the tube. - * @param {number} [radius=1] -The radius of the tube. - * @param {number} [radialSegments=8] - The number of segments that make up the cross-section. - * @param {boolean} [closed=false] - Whether the tube is closed or not. - */ - constructor(path?: Curve, tubularSegments?: number, radius?: number, radialSegments?: number, closed?: boolean); - /** - * Holds the constructor parameters that have been - * used to generate the geometry. Any modification - * after instantiation does not change the geometry. - * - * @type {Object} - */ - parameters: Object; - tangents: any; - normals: any; - binormals: any; - copy(source: any): this; -} -import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/geometries/WireframeGeometry.d.ts b/jsdoc-testing/jsdoc/src/geometries/WireframeGeometry.d.ts deleted file mode 100644 index 39f9908ab..000000000 --- a/jsdoc-testing/jsdoc/src/geometries/WireframeGeometry.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Can be used as a helper object to visualize a geometry as a wireframe. - * - * ```js - * const geometry = new THREE.SphereGeometry(); - * - * const wireframe = new THREE.WireframeGeometry( geometry ); - * - * const line = new THREE.LineSegments( wireframe ); - * line.material.depthWrite = false; - * line.material.opacity = 0.25; - * line.material.transparent = true; - * - * scene.add( line ); - * ``` - * - * Note: It is not yet possible to serialize/deserialize instances of this class. - * - * @augments BufferGeometry - */ -export class WireframeGeometry extends BufferGeometry { - /** - * Constructs a new wireframe geometry. - * - * @param {?BufferGeometry} [geometry=null] - The geometry. - */ - constructor(geometry?: BufferGeometry | null); - /** - * Holds the constructor parameters that have been - * used to generate the geometry. Any modification - * after instantiation does not change the geometry. - * - * @type {Object} - */ - parameters: Object; - copy(source: any): this; -} -import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/ArrowHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/ArrowHelper.d.ts deleted file mode 100644 index 302ccad5a..000000000 --- a/jsdoc-testing/jsdoc/src/helpers/ArrowHelper.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -/** - * An 3D arrow object for visualizing directions. - * - * ```js - * const dir = new THREE.Vector3( 1, 2, 0 ); - * - * //normalize the direction vector (convert to vector of length 1) - * dir.normalize(); - * - * const origin = new THREE.Vector3( 0, 0, 0 ); - * const length = 1; - * const hex = 0xffff00; - * - * const arrowHelper = new THREE.ArrowHelper( dir, origin, length, hex ); - * scene.add( arrowHelper ); - * ``` - * - * @augments Object3D - */ -export class ArrowHelper extends Object3D { - /** - * Constructs a new arrow helper. - * - * @param {Vector3} [dir=(0, 0, 1)] - The (normalized) direction vector. - * @param {Vector3} [origin=(0, 0, 0)] - Point at which the arrow starts. - * @param {number} [length=1] - Length of the arrow in world units. - * @param {(number|Color|string)} [color=0xffff00] - Color of the arrow. - * @param {number} [headLength=length*0.2] - The length of the head of the arrow. - * @param {number} [headWidth=headLength*0.2] - The width of the head of the arrow. - */ - constructor(dir?: Vector3, origin?: Vector3, length?: number, color?: (number | Color | string), headLength?: number, headWidth?: number); - type: string; - /** - * The line part of the arrow helper. - * - * @type {Line} - */ - line: Line; - /** - * The cone part of the arrow helper. - * - * @type {Mesh} - */ - cone: Mesh; - /** - * Sets the direction of the helper. - * - * @param {Vector3} dir - The normalized direction vector. - */ - setDirection(dir: Vector3): void; - /** - * Sets the length of the helper. - * - * @param {number} length - Length of the arrow in world units. - * @param {number} [headLength=length*0.2] - The length of the head of the arrow. - * @param {number} [headWidth=headLength*0.2] - The width of the head of the arrow. - */ - setLength(length: number, headLength?: number, headWidth?: number): void; - /** - * Sets the color of the helper. - * - * @param {number|Color|string} color - The color to set. - */ - setColor(color: number | Color | string): void; - copy(source: any): this; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { Object3D } from '../core/Object3D.js'; -import { Line } from '../objects/Line.js'; -import { Mesh } from '../objects/Mesh.js'; -import { Vector3 } from '../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/AxesHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/AxesHelper.d.ts deleted file mode 100644 index cc7858bfe..000000000 --- a/jsdoc-testing/jsdoc/src/helpers/AxesHelper.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * An axis object to visualize the 3 axes in a simple way. - * The X axis is red. The Y axis is green. The Z axis is blue. - * - * ```js - * const axesHelper = new THREE.AxesHelper( 5 ); - * scene.add( axesHelper ); - * ``` - * - * @augments LineSegments - */ -export class AxesHelper extends LineSegments { - /** - * Constructs a new axes helper. - * - * @param {number} [size=1] - Size of the lines representing the axes. - */ - constructor(size?: number); - /** - * Defines the colors of the axes helper. - * - * @param {number|Color|string} xAxisColor - The color for the x axis. - * @param {number|Color|string} yAxisColor - The color for the y axis. - * @param {number|Color|string} zAxisColor - The color for the z axis. - * @return {AxesHelper} A reference to this axes helper. - */ - setColors(xAxisColor: number | Color | string, yAxisColor: number | Color | string, zAxisColor: number | Color | string): AxesHelper; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { LineSegments } from '../objects/LineSegments.js'; -import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/Box3Helper.d.ts b/jsdoc-testing/jsdoc/src/helpers/Box3Helper.d.ts deleted file mode 100644 index 982072dbb..000000000 --- a/jsdoc-testing/jsdoc/src/helpers/Box3Helper.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * A helper object to visualize an instance of {@link Box3}. - * - * ```js - * const box = new THREE.Box3(); - * box.setFromCenterAndSize( new THREE.Vector3( 1, 1, 1 ), new THREE.Vector3( 2, 1, 3 ) ); - * - * const helper = new THREE.Box3Helper( box, 0xffff00 ); - * scene.add( helper ) - * ``` - * - * @augments LineSegments - */ -export class Box3Helper extends LineSegments { - /** - * Constructs a new box3 helper. - * - * @param {Box3} box - The box to visualize. - * @param {number|Color|string} [color=0xffff00] - The box's color. - */ - constructor(box: Box3, color?: number | Color | string); - /** - * The box being visualized. - * - * @type {Box3} - */ - box: Box3; - updateMatrixWorld(force: any): void; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { LineSegments } from '../objects/LineSegments.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/BoxHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/BoxHelper.d.ts deleted file mode 100644 index 0b864050e..000000000 --- a/jsdoc-testing/jsdoc/src/helpers/BoxHelper.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Helper object to graphically show the world-axis-aligned bounding box - * around an object. The actual bounding box is handled with {@link Box3}, - * this is just a visual helper for debugging. It can be automatically - * resized with {@link BoxHelper#update} when the object it's created from - * is transformed. Note that the object must have a geometry for this to work, - * so it won't work with sprites. - * - * ```js - * const sphere = new THREE.SphereGeometry(); - * const object = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( 0xff0000 ) ); - * const box = new THREE.BoxHelper( object, 0xffff00 ); - * scene.add( box ); - * ``` - * - * @augments LineSegments - */ -export class BoxHelper extends LineSegments { - /** - * The 3D object being visualized. - * - * @type {Object3D} - */ - object: Object3D; - /** - * Updates the helper's geometry to match the dimensions of the object, - * including any children. - */ - update(): void; - /** - * Updates the wireframe box for the passed object. - * - * @param {Object3D} object - The 3D object to create the helper for. - * @return {BoxHelper} A reference to this instance. - */ - setFromObject(object: Object3D): BoxHelper; - copy(source: any, recursive: any): this; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { LineSegments } from '../objects/LineSegments.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/CameraHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/CameraHelper.d.ts deleted file mode 100644 index 69f517585..000000000 --- a/jsdoc-testing/jsdoc/src/helpers/CameraHelper.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * This helps with visualizing what a camera contains in its frustum. It - * visualizes the frustum of a camera using a line segments. - * - * Based on frustum visualization in [lightgl.js shadowmap example](https://github.com/evanw/lightgl.js/blob/master/tests/shadowmap.html). - * - * `CameraHelper` must be a child of the scene. - * - * When the camera is transformed or its projection matrix is changed, it's necessary - * to call the `update()` method of the respective helper. - * - * ```js - * const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 ); - * const helper = new THREE.CameraHelper( camera ); - * scene.add( helper ); - * ``` - * - * @augments LineSegments - */ -export class CameraHelper extends LineSegments { - /** - * Constructs a new arrow helper. - * - * @param {Camera} camera - The camera to visualize. - */ - constructor(camera: Camera); - /** - * The camera being visualized. - * - * @type {Camera} - */ - camera: Camera; - /** - * This contains the points used to visualize the camera. - * - * @type {Object>} - */ - pointMap: { - [x: string]: number[]; - }; - /** - * Defines the colors of the helper. - * - * @param {Color} frustum - The frustum line color. - * @param {Color} cone - The cone line color. - * @param {Color} up - The up line color. - * @param {Color} target - The target line color. - * @param {Color} cross - The cross line color. - * @return {CameraHelper} A reference to this helper. - */ - setColors(frustum: Color, cone: Color, up: Color, target: Color, cross: Color): CameraHelper; - /** - * Updates the helper based on the projection matrix of the camera. - */ - update(): void; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { LineSegments } from '../objects/LineSegments.js'; -import { Camera } from '../cameras/Camera.js'; -import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/DirectionalLightHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/DirectionalLightHelper.d.ts deleted file mode 100644 index edd4fa7ff..000000000 --- a/jsdoc-testing/jsdoc/src/helpers/DirectionalLightHelper.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Helper object to assist with visualizing a {@link DirectionalLight}'s - * effect on the scene. This consists of a plane and a line representing the - * light's position and direction. - * - * When the directional light or its target are transformed or light properties - * are changed, it's necessary to call the `update()` method of the respective helper. - * - * ```js - * const light = new THREE.DirectionalLight( 0xFFFFFF ); - * scene.add( light ); - * - * const helper = new THREE.DirectionalLightHelper( light, 5 ); - * scene.add( helper ); - * ``` - * - * @augments Object3D - */ -export class DirectionalLightHelper extends Object3D { - /** - * Constructs a new directional light helper. - * - * @param {DirectionalLight} light - The light to be visualized. - * @param {number} [size=1] - The dimensions of the plane. - * @param {number|Color|string} [color] - The helper's color. If not set, the helper will take - * the color of the light. - */ - constructor(light: DirectionalLight, size?: number, color?: number | Color | string); - /** - * The light being visualized. - * - * @type {DirectionalLight} - */ - light: DirectionalLight; - matrix: any; - /** - * The color parameter passed in the constructor. - * If not set, the helper will take the color of the light. - * - * @type {number|Color|string} - */ - color: number | Color | string; - type: string; - /** - * Contains the line showing the location of the directional light. - * - * @type {Line} - */ - lightPlane: Line; - /** - * Represents the target line of the directional light. - * - * @type {Line} - */ - targetLine: Line; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; - /** - * Updates the helper to match the position and direction of the - * light being visualized. - */ - update(): void; -} -import { Object3D } from '../core/Object3D.js'; -import { Line } from '../objects/Line.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/GridHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/GridHelper.d.ts deleted file mode 100644 index c0df154aa..000000000 --- a/jsdoc-testing/jsdoc/src/helpers/GridHelper.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * The helper is an object to define grids. Grids are two-dimensional - * arrays of lines. - * - * ```js - * const size = 10; - * const divisions = 10; - * - * const gridHelper = new THREE.GridHelper( size, divisions ); - * scene.add( gridHelper ); - * ``` - * - * @augments LineSegments - */ -export class GridHelper extends LineSegments { - /** - * Constructs a new grid helper. - * - * @param {number} [size=10] - The size of the grid. - * @param {number} [divisions=10] - The number of divisions across the grid. - * @param {number|Color|string} [color1=0x444444] - The color of the center line. - * @param {number|Color|string} [color2=0x888888] - The color of the lines of the grid. - */ - constructor(size?: number, divisions?: number, color1?: number | Color | string, color2?: number | Color | string); - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { LineSegments } from '../objects/LineSegments.js'; -import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/HemisphereLightHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/HemisphereLightHelper.d.ts deleted file mode 100644 index 5920f3014..000000000 --- a/jsdoc-testing/jsdoc/src/helpers/HemisphereLightHelper.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Creates a visual aid consisting of a spherical mesh for a - * given {@link HemisphereLight}. - * - * When the hemisphere light is transformed or its light properties are changed, - * it's necessary to call the `update()` method of the respective helper. - * - * ```js - * const light = new THREE.HemisphereLight( 0xffffbb, 0x080820, 1 ); - * const helper = new THREE.HemisphereLightHelper( light, 5 ); - * scene.add( helper ); - * ``` - * - * @augments Object3D - */ -export class HemisphereLightHelper extends Object3D { - /** - * Constructs a new hemisphere light helper. - * - * @param {HemisphereLight} light - The light to be visualized. - * @param {number} [size=1] - The size of the mesh used to visualize the light. - * @param {number|Color|string} [color] - The helper's color. If not set, the helper will take - * the color of the light. - */ - constructor(light: HemisphereLight, size?: number, color?: number | Color | string); - /** - * The light being visualized. - * - * @type {HemisphereLight} - */ - light: HemisphereLight; - matrix: any; - /** - * The color parameter passed in the constructor. - * If not set, the helper will take the color of the light. - * - * @type {number|Color|string} - */ - color: number | Color | string; - type: string; - material: MeshBasicMaterial; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; - /** - * Updates the helper to match the position and direction of the - * light being visualized. - */ - update(): void; -} -import { Object3D } from '../core/Object3D.js'; -import { Color } from '../math/Color.js'; -import { MeshBasicMaterial } from '../materials/MeshBasicMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/PlaneHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/PlaneHelper.d.ts deleted file mode 100644 index be6163223..000000000 --- a/jsdoc-testing/jsdoc/src/helpers/PlaneHelper.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -/** - * A helper object to visualize an instance of {@link Plane}. - * - * ```js - * const plane = new THREE.Plane( new THREE.Vector3( 1, 1, 0.2 ), 3 ); - * const helper = new THREE.PlaneHelper( plane, 1, 0xffff00 ); - * scene.add( helper ); - * ``` - * - * @augments Line - */ -export class PlaneHelper extends Line { - /** - * Constructs a new plane helper. - * - * @param {Plane} plane - The plane to be visualized. - * @param {number} [size=1] - The side length of plane helper. - * @param {number|Color|string} [hex=0xffff00] - The helper's color. - */ - constructor(plane: Plane, size?: number, hex?: number | Color | string); - /** - * The plane being visualized. - * - * @type {Plane} - */ - plane: Plane; - /** - * The side length of plane helper. - * - * @type {number} - * @default 1 - */ - size: number; - updateMatrixWorld(force: any): void; - /** - * Updates the helper to match the position and direction of the - * light being visualized. - */ - dispose(): void; -} -import { Line } from '../objects/Line.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/PointLightHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/PointLightHelper.d.ts deleted file mode 100644 index f2f51e312..000000000 --- a/jsdoc-testing/jsdoc/src/helpers/PointLightHelper.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * This displays a helper object consisting of a spherical mesh for - * visualizing an instance of {@link PointLight}. - * - * ```js - * const pointLight = new THREE.PointLight( 0xff0000, 1, 100 ); - * pointLight.position.set( 10, 10, 10 ); - * scene.add( pointLight ); - * - * const sphereSize = 1; - * const pointLightHelper = new THREE.PointLightHelper( pointLight, sphereSize ); - * scene.add( pointLightHelper ); - * ``` - * - * @augments Mesh - */ -export class PointLightHelper extends Mesh { - /** - * Constructs a new point light helper. - * - * @param {PointLight} light - The light to be visualized. - * @param {number} [sphereSize=1] - The size of the sphere helper. - * @param {number|Color|string} [color] - The helper's color. If not set, the helper will take - * the color of the light. - */ - constructor(light: PointLight, sphereSize?: number, color?: number | Color | string); - /** - * The light being visualized. - * - * @type {PointLight} - */ - light: PointLight; - /** - * The color parameter passed in the constructor. - * If not set, the helper will take the color of the light. - * - * @type {number|Color|string} - */ - color: number | Color | string; - matrix: any; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; - /** - * Updates the helper to match the position of the - * light being visualized. - */ - update(): void; -} -import { Mesh } from '../objects/Mesh.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/PolarGridHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/PolarGridHelper.d.ts deleted file mode 100644 index 9d4caa9c7..000000000 --- a/jsdoc-testing/jsdoc/src/helpers/PolarGridHelper.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This helper is an object to define polar grids. Grids are - * two-dimensional arrays of lines. - * - * ```js - * const radius = 10; - * const sectors = 16; - * const rings = 8; - * const divisions = 64; - * - * const helper = new THREE.PolarGridHelper( radius, sectors, rings, divisions ); - * scene.add( helper ); - * ``` - * - * @augments LineSegments - */ -export class PolarGridHelper extends LineSegments { - /** - * Constructs a new polar grid helper. - * - * @param {number} [radius=10] - The radius of the polar grid. This can be any positive number. - * @param {number} [sectors=16] - The number of sectors the grid will be divided into. This can be any positive integer. - * @param {number} [rings=16] - The number of rings. This can be any positive integer. - * @param {number} [divisions=64] - The number of line segments used for each circle. This can be any positive integer. - * @param {number|Color|string} [color1=0x444444] - The first color used for grid elements. - * @param {number|Color|string} [color2=0x888888] - The second color used for grid elements. - */ - constructor(radius?: number, sectors?: number, rings?: number, divisions?: number, color1?: number | Color | string, color2?: number | Color | string); - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { LineSegments } from '../objects/LineSegments.js'; -import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/SkeletonHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/SkeletonHelper.d.ts deleted file mode 100644 index a129e99ab..000000000 --- a/jsdoc-testing/jsdoc/src/helpers/SkeletonHelper.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * A helper object to assist with visualizing a {@link Skeleton}. - * - * ```js - * const helper = new THREE.SkeletonHelper( skinnedMesh ); - * scene.add( helper ); - * ``` - * - * @augments LineSegments - */ -export class SkeletonHelper extends LineSegments { - /** - * Constructs a new skeleton helper. - * - * @param {Object3D} object - Usually an instance of {@link SkinnedMesh}. However, any 3D object - * can be used if it represents a hierarchy of bones (see {@link Bone}). - */ - constructor(object: Object3D); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSkeletonHelper: boolean; - /** - * The object being visualized. - * - * @type {Object3D} - */ - root: Object3D; - /** - * The list of bones that the helper visualizes. - * - * @type {Array} - */ - bones: Array; - matrix: any; - updateMatrixWorld(force: any): void; - /** - * Defines the colors of the helper. - * - * @param {Color} color1 - The first line color for each bone. - * @param {Color} color2 - The second line color for each bone. - * @return {SkeletonHelper} A reference to this helper. - */ - setColors(color1: Color, color2: Color): SkeletonHelper; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { LineSegments } from '../objects/LineSegments.js'; -import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/helpers/SpotLightHelper.d.ts b/jsdoc-testing/jsdoc/src/helpers/SpotLightHelper.d.ts deleted file mode 100644 index 7e73edcef..000000000 --- a/jsdoc-testing/jsdoc/src/helpers/SpotLightHelper.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * This displays a cone shaped helper object for a {@link SpotLight}. - * - * When the spot light or its target are transformed or light properties are - * changed, it's necessary to call the `update()` method of the respective helper. - * - * ```js - * const spotLight = new THREE.SpotLight( 0xffffff ); - * spotLight.position.set( 10, 10, 10 ); - * scene.add( spotLight ); - * - * const spotLightHelper = new THREE.SpotLightHelper( spotLight ); - * scene.add( spotLightHelper ); - * ``` - * - * @augments Object3D - */ -export class SpotLightHelper extends Object3D { - /** - * Constructs a new spot light helper. - * - * @param {HemisphereLight} light - The light to be visualized. - * @param {number|Color|string} [color] - The helper's color. If not set, the helper will take - * the color of the light. - */ - constructor(light: HemisphereLight, color?: number | Color | string); - /** - * The light being visualized. - * - * @type {SpotLight} - */ - light: SpotLight; - /** - * The color parameter passed in the constructor. - * If not set, the helper will take the color of the light. - * - * @type {number|Color|string} - */ - color: number | Color | string; - type: string; - cone: LineSegments; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; - /** - * Updates the helper to match the position and direction of the - * light being visualized. - */ - update(): void; -} -import { Object3D } from '../core/Object3D.js'; -import { LineSegments } from '../objects/LineSegments.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/AmbientLight.d.ts b/jsdoc-testing/jsdoc/src/lights/AmbientLight.d.ts deleted file mode 100644 index 78c3196fd..000000000 --- a/jsdoc-testing/jsdoc/src/lights/AmbientLight.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * This light globally illuminates all objects in the scene equally. - * - * It cannot be used to cast shadows as it does not have a direction. - * - * ```js - * const light = new THREE.AmbientLight( 0x404040 ); // soft white light - * scene.add( light ); - * ``` - * - * @augments Light - */ -export class AmbientLight extends Light { - /** - * Constructs a new ambient light. - * - * @param {(number|Color|string)} [color=0xffffff] - The light's color. - * @param {number} [intensity=1] - The light's strength/intensity. - */ - constructor(color?: (number | Color | string), intensity?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isAmbientLight: boolean; -} -import { Light } from './Light.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/DirectionalLight.d.ts b/jsdoc-testing/jsdoc/src/lights/DirectionalLight.d.ts deleted file mode 100644 index 753317423..000000000 --- a/jsdoc-testing/jsdoc/src/lights/DirectionalLight.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -/** - * A light that gets emitted in a specific direction. This light will behave - * as though it is infinitely far away and the rays produced from it are all - * parallel. The common use case for this is to simulate daylight; the sun is - * far enough away that its position can be considered to be infinite, and - * all light rays coming from it are parallel. - * - * A common point of confusion for directional lights is that setting the - * rotation has no effect. This is because three.js's DirectionalLight is the - * equivalent to what is often called a 'Target Direct Light' in other - * applications. - * - * This means that its direction is calculated as pointing from the light's - * {@link Object3D#position} to the {@link DirectionalLight#target} position - * (as opposed to a 'Free Direct Light' that just has a rotation - * component). - * - * This light can cast shadows - see the {@link DirectionalLightShadow} for details. - * - * ```js - * // White directional light at half intensity shining from the top. - * const directionalLight = new THREE.DirectionalLight( 0xffffff, 0.5 ); - * scene.add( directionalLight ); - * ``` - * - * @augments Light - */ -export class DirectionalLight extends Light { - /** - * Constructs a new directional light. - * - * @param {(number|Color|string)} [color=0xffffff] - The light's color. - * @param {number} [intensity=1] - The light's strength/intensity. - */ - constructor(color?: (number | Color | string), intensity?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isDirectionalLight: boolean; - /** - * The directional light points from its position to the - * target's position. - * - * For the target's position to be changed to anything other - * than the default, it must be added to the scene. - * - * It is also possible to set the target to be another 3D object - * in the scene. The light will now track the target object. - * - * @type {Object3D} - */ - target: Object3D; - /** - * This property holds the light's shadow configuration. - * - * @type {DirectionalLightShadow} - */ - shadow: DirectionalLightShadow; - copy(source: any): this; -} -import { Light } from './Light.js'; -import { Object3D } from '../core/Object3D.js'; -import { DirectionalLightShadow } from './DirectionalLightShadow.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/DirectionalLightShadow.d.ts b/jsdoc-testing/jsdoc/src/lights/DirectionalLightShadow.d.ts deleted file mode 100644 index 69d809ea1..000000000 --- a/jsdoc-testing/jsdoc/src/lights/DirectionalLightShadow.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Represents the shadow configuration of directional lights. - * - * @augments LightShadow - */ -export class DirectionalLightShadow extends LightShadow { - /** - * Constructs a new directional light shadow. - */ - constructor(); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isDirectionalLightShadow: boolean; -} -import { LightShadow } from './LightShadow.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/HemisphereLight.d.ts b/jsdoc-testing/jsdoc/src/lights/HemisphereLight.d.ts deleted file mode 100644 index 9bffa0d03..000000000 --- a/jsdoc-testing/jsdoc/src/lights/HemisphereLight.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * A light source positioned directly above the scene, with color fading from - * the sky color to the ground color. - * - * This light cannot be used to cast shadows. - * - * ```js - * const light = new THREE.HemisphereLight( 0xffffbb, 0x080820, 1 ); - * scene.add( light ); - * ``` - * - * @augments Light - */ -export class HemisphereLight extends Light { - /** - * Constructs a new hemisphere light. - * - * @param {(number|Color|string)} [skyColor=0xffffff] - The light's sky color. - * @param {(number|Color|string)} [groundColor=0xffffff] - The light's ground color. - * @param {number} [intensity=1] - The light's strength/intensity. - */ - constructor(skyColor?: (number | Color | string), groundColor?: (number | Color | string), intensity?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isHemisphereLight: boolean; - /** - * The light's ground color. - * - * @type {Color} - */ - groundColor: Color; - copy(source: any, recursive: any): this; -} -import { Light } from './Light.js'; -import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/Light.d.ts b/jsdoc-testing/jsdoc/src/lights/Light.d.ts deleted file mode 100644 index 15a77b361..000000000 --- a/jsdoc-testing/jsdoc/src/lights/Light.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Abstract base class for lights - all other light types inherit the - * properties and methods described here. - * - * @abstract - * @augments Object3D - */ -export class Light extends Object3D { - /** - * Constructs a new light. - * - * @param {(number|Color|string)} [color=0xffffff] - The light's color. - * @param {number} [intensity=1] - The light's strength/intensity. - */ - constructor(color?: (number | Color | string), intensity?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLight: boolean; - type: string; - /** - * The light's color. - * - * @type {Color} - */ - color: Color; - /** - * The light's intensity. - * - * @type {number} - * @default 1 - */ - intensity: number; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; - copy(source: any, recursive: any): this; - toJSON(meta: any): Object; -} -import { Object3D } from '../core/Object3D.js'; -import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/LightProbe.d.ts b/jsdoc-testing/jsdoc/src/lights/LightProbe.d.ts deleted file mode 100644 index 8a03aa8cf..000000000 --- a/jsdoc-testing/jsdoc/src/lights/LightProbe.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Light probes are an alternative way of adding light to a 3D scene. Unlike - * classical light sources (e.g. directional, point or spot lights), light - * probes do not emit light. Instead they store information about light - * passing through 3D space. During rendering, the light that hits a 3D - * object is approximated by using the data from the light probe. - * - * Light probes are usually created from (radiance) environment maps. The - * class {@link LightProbeGenerator} can be used to create light probes from - * cube textures or render targets. However, light estimation data could also - * be provided in other forms e.g. by WebXR. This enables the rendering of - * augmented reality content that reacts to real world lighting. - * - * The current probe implementation in three.js supports so-called diffuse - * light probes. This type of light probe is functionally equivalent to an - * irradiance environment map. - * - * @augments Light - */ -export class LightProbe extends Light { - /** - * Constructs a new light probe. - * - * @param {SphericalHarmonics3} sh - The spherical harmonics which represents encoded lighting information. - * @param {number} [intensity=1] - The light's strength/intensity. - */ - constructor(sh?: SphericalHarmonics3, intensity?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLightProbe: boolean; - /** - * A light probe uses spherical harmonics to encode lighting information. - * - * @type {SphericalHarmonics3} - */ - sh: SphericalHarmonics3; - copy(source: any): this; -} -import { Light } from './Light.js'; -import { SphericalHarmonics3 } from '../math/SphericalHarmonics3.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/LightShadow.d.ts b/jsdoc-testing/jsdoc/src/lights/LightShadow.d.ts deleted file mode 100644 index 24ffaf5b3..000000000 --- a/jsdoc-testing/jsdoc/src/lights/LightShadow.d.ts +++ /dev/null @@ -1,198 +0,0 @@ -/** - * Abstract base class for light shadow classes. These classes - * represent the shadow configuration for different light types. - * - * @abstract - */ -export class LightShadow { - /** - * Constructs a new light shadow. - * - * @param {Camera} camera - The light's view of the world. - */ - constructor(camera: Camera); - /** - * The light's view of the world. - * - * @type {Camera} - */ - camera: Camera; - /** - * The intensity of the shadow. The default is `1`. - * Valid values are in the range `[0, 1]`. - * - * @type {number} - * @default 1 - */ - intensity: number; - /** - * Shadow map bias, how much to add or subtract from the normalized depth - * when deciding whether a surface is in shadow. - * - * The default is `0`. Very tiny adjustments here (in the order of `0.0001`) - * may help reduce artifacts in shadows. - * - * @type {number} - * @default 0 - */ - bias: number; - /** - * A node version of `bias`. Only supported with `WebGPURenderer`. - * - * If a bias node is defined, `bias` has no effect. - * - * @type {?Node} - * @default null - */ - biasNode: Node | null; - /** - * Defines how much the position used to query the shadow map is offset along - * the object normal. The default is `0`. Increasing this value can be used to - * reduce shadow acne especially in large scenes where light shines onto - * geometry at a shallow angle. The cost is that shadows may appear distorted. - * - * @type {number} - * @default 0 - */ - normalBias: number; - /** - * Setting this to values greater than 1 will blur the edges of the shadow. - * High values will cause unwanted banding effects in the shadows - a greater - * map size will allow for a higher value to be used here before these effects - * become visible. - * - * The property has no effect when the shadow map type is `BasicShadowMap`. - * - * @type {number} - * @default 1 - */ - radius: number; - /** - * The amount of samples to use when blurring a VSM shadow map. - * - * @type {number} - * @default 8 - */ - blurSamples: number; - /** - * Defines the width and height of the shadow map. Higher values give better quality - * shadows at the cost of computation time. Values must be powers of two. - * - * @type {Vector2} - * @default (512,512) - */ - mapSize: Vector2; - /** - * The type of shadow texture. The default is `UnsignedByteType`. - * - * @type {number} - * @default UnsignedByteType - */ - mapType: number; - /** - * The depth map generated using the internal camera; a location beyond a - * pixel's depth is in shadow. Computed internally during rendering. - * - * @type {?RenderTarget} - * @default null - */ - map: RenderTarget | null; - /** - * The distribution map generated using the internal camera; an occlusion is - * calculated based on the distribution of depths. Computed internally during - * rendering. - * - * @type {?RenderTarget} - * @default null - */ - mapPass: RenderTarget | null; - /** - * Model to shadow camera space, to compute location and depth in shadow map. - * This is computed internally during rendering. - * - * @type {Matrix4} - */ - matrix: Matrix4; - /** - * Enables automatic updates of the light's shadow. If you do not require dynamic - * lighting / shadows, you may set this to `false`. - * - * @type {boolean} - * @default true - */ - autoUpdate: boolean; - /** - * When set to `true`, shadow maps will be updated in the next `render` call. - * If you have set {@link LightShadow#autoUpdate} to `false`, you will need to - * set this property to `true` and then make a render call to update the light's shadow. - * - * @type {boolean} - * @default false - */ - needsUpdate: boolean; - _frustum: Frustum; - _frameExtents: Vector2; - _viewportCount: number; - _viewports: Vector4[]; - /** - * Used internally by the renderer to get the number of viewports that need - * to be rendered for this shadow. - * - * @return {number} The viewport count. - */ - getViewportCount(): number; - /** - * Gets the shadow cameras frustum. Used internally by the renderer to cull objects. - * - * @return {Frustum} The shadow camera frustum. - */ - getFrustum(): Frustum; - /** - * Update the matrices for the camera and shadow, used internally by the renderer. - * - * @param {Light} light - The light for which the shadow is being rendered. - */ - updateMatrices(light: Light): void; - /** - * Returns a viewport definition for the given viewport index. - * - * @param {number} viewportIndex - The viewport index. - * @return {Vector4} The viewport. - */ - getViewport(viewportIndex: number): Vector4; - /** - * Returns the frame extends. - * - * @return {Vector2} The frame extends. - */ - getFrameExtents(): Vector2; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; - /** - * Copies the values of the given light shadow instance to this instance. - * - * @param {LightShadow} source - The light shadow to copy. - * @return {LightShadow} A reference to this light shadow instance. - */ - copy(source: LightShadow): LightShadow; - /** - * Returns a new light shadow instance with copied values from this instance. - * - * @return {LightShadow} A clone of this instance. - */ - clone(): LightShadow; - /** - * Serializes the light shadow into JSON. - * - * @return {Object} A JSON object representing the serialized light shadow. - * @see {@link ObjectLoader#parse} - */ - toJSON(): Object; -} -import { Vector2 } from '../math/Vector2.js'; -import { Matrix4 } from '../math/Matrix4.js'; -import { Frustum } from '../math/Frustum.js'; -import { Vector4 } from '../math/Vector4.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/PointLight.d.ts b/jsdoc-testing/jsdoc/src/lights/PointLight.d.ts deleted file mode 100644 index f42ec0f7c..000000000 --- a/jsdoc-testing/jsdoc/src/lights/PointLight.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * A light that gets emitted from a single point in all directions. A common - * use case for this is to replicate the light emitted from a bare - * lightbulb. - * - * This light can cast shadows - see the {@link PointLightShadow} for details. - * - * ```js - * const light = new THREE.PointLight( 0xff0000, 1, 100 ); - * light.position.set( 50, 50, 50 ); - * scene.add( light ); - * ``` - * - * @augments Light - */ -export class PointLight extends Light { - /** - * Constructs a new point light. - * - * @param {(number|Color|string)} [color=0xffffff] - The light's color. - * @param {number} [intensity=1] - The light's strength/intensity measured in candela (cd). - * @param {number} [distance=0] - Maximum range of the light. `0` means no limit. - * @param {number} [decay=2] - The amount the light dims along the distance of the light. - */ - constructor(color?: (number | Color | string), intensity?: number, distance?: number, decay?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isPointLight: boolean; - /** - * When distance is zero, light will attenuate according to inverse-square - * law to infinite distance. When distance is non-zero, light will attenuate - * according to inverse-square law until near the distance cutoff, where it - * will then attenuate quickly and smoothly to 0. Inherently, cutoffs are not - * physically correct. - * - * @type {number} - * @default 0 - */ - distance: number; - /** - * The amount the light dims along the distance of the light. In context of - * physically-correct rendering the default value should not be changed. - * - * @type {number} - * @default 2 - */ - decay: number; - /** - * This property holds the light's shadow configuration. - * - * @type {PointLightShadow} - */ - shadow: PointLightShadow; - set power(power: number); - /** - * The light's power. Power is the luminous power of the light measured in lumens (lm). - * Changing the power will also change the light's intensity. - * - * @type {number} - */ - get power(): number; - copy(source: any, recursive: any): this; -} -import { Light } from './Light.js'; -import { PointLightShadow } from './PointLightShadow.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/PointLightShadow.d.ts b/jsdoc-testing/jsdoc/src/lights/PointLightShadow.d.ts deleted file mode 100644 index 9157a63b8..000000000 --- a/jsdoc-testing/jsdoc/src/lights/PointLightShadow.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Represents the shadow configuration of point lights. - * - * @augments LightShadow - */ -export class PointLightShadow extends LightShadow { - /** - * Constructs a new point light shadow. - */ - constructor(); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isPointLightShadow: boolean; -} -import { LightShadow } from './LightShadow.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/RectAreaLight.d.ts b/jsdoc-testing/jsdoc/src/lights/RectAreaLight.d.ts deleted file mode 100644 index 6d4b7b657..000000000 --- a/jsdoc-testing/jsdoc/src/lights/RectAreaLight.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * This class emits light uniformly across the face a rectangular plane. - * This light type can be used to simulate light sources such as bright - * windows or strip lighting. - * - * Important Notes: - * - * - There is no shadow support. - * - Only PBR materials are supported. - * - You have to include `RectAreaLightUniformsLib` (`WebGLRenderer`) or `RectAreaLightTexturesLib` (`WebGPURenderer`) - * into your app and init the uniforms/textures. - * - * ```js - * RectAreaLightUniformsLib.init(); // only relevant for WebGLRenderer - * THREE.RectAreaLightNode.setLTC( RectAreaLightTexturesLib.init() ); // only relevant for WebGPURenderer - * - * const intensity = 1; const width = 10; const height = 10; - * const rectLight = new THREE.RectAreaLight( 0xffffff, intensity, width, height ); - * rectLight.position.set( 5, 5, 0 ); - * rectLight.lookAt( 0, 0, 0 ); - * scene.add( rectLight ) - * ``` - * - * @augments Light - */ -export class RectAreaLight extends Light { - /** - * Constructs a new area light. - * - * @param {(number|Color|string)} [color=0xffffff] - The light's color. - * @param {number} [intensity=1] - The light's strength/intensity. - * @param {number} [width=10] - The width of the light. - * @param {number} [height=10] - The height of the light. - */ - constructor(color?: (number | Color | string), intensity?: number, width?: number, height?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isRectAreaLight: boolean; - /** - * The width of the light. - * - * @type {number} - * @default 10 - */ - width: number; - /** - * The height of the light. - * - * @type {number} - * @default 10 - */ - height: number; - set power(power: number); - /** - * The light's power. Power is the luminous power of the light measured in lumens (lm). - * Changing the power will also change the light's intensity. - * - * @type {number} - */ - get power(): number; - copy(source: any): this; -} -import { Light } from './Light.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/SpotLight.d.ts b/jsdoc-testing/jsdoc/src/lights/SpotLight.d.ts deleted file mode 100644 index 1197fdf27..000000000 --- a/jsdoc-testing/jsdoc/src/lights/SpotLight.d.ts +++ /dev/null @@ -1,116 +0,0 @@ -/** - * This light gets emitted from a single point in one direction, along a cone - * that increases in size the further from the light it gets. - * - * This light can cast shadows - see the {@link SpotLightShadow} for details. - * - * ```js - * // white spotlight shining from the side, modulated by a texture - * const spotLight = new THREE.SpotLight( 0xffffff ); - * spotLight.position.set( 100, 1000, 100 ); - * spotLight.map = new THREE.TextureLoader().load( url ); - * - * spotLight.castShadow = true; - * spotLight.shadow.mapSize.width = 1024; - * spotLight.shadow.mapSize.height = 1024; - * spotLight.shadow.camera.near = 500; - * spotLight.shadow.camera.far = 4000; - * spotLight.shadow.camera.fov = 30;s - * ``` - * - * @augments Light - */ -export class SpotLight extends Light { - /** - * Constructs a new spot light. - * - * @param {(number|Color|string)} [color=0xffffff] - The light's color. - * @param {number} [intensity=1] - The light's strength/intensity measured in candela (cd). - * @param {number} [distance=0] - Maximum range of the light. `0` means no limit. - * @param {number} [angle=Math.PI/3] - Maximum angle of light dispersion from its direction whose upper bound is `Math.PI/2`. - * @param {number} [penumbra=0] - Percent of the spotlight cone that is attenuated due to penumbra. Value range is `[0,1]`. - * @param {number} [decay=2] - The amount the light dims along the distance of the light. - */ - constructor(color?: (number | Color | string), intensity?: number, distance?: number, angle?: number, penumbra?: number, decay?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSpotLight: boolean; - /** - * The spot light points from its position to the - * target's position. - * - * For the target's position to be changed to anything other - * than the default, it must be added to the scene. - * - * It is also possible to set the target to be another 3D object - * in the scene. The light will now track the target object. - * - * @type {Object3D} - */ - target: Object3D; - /** - * Maximum range of the light. `0` means no limit. - * - * @type {number} - * @default 0 - */ - distance: number; - /** - * Maximum angle of light dispersion from its direction whose upper bound is `Math.PI/2`. - * - * @type {number} - * @default Math.PI/3 - */ - angle: number; - /** - * Percent of the spotlight cone that is attenuated due to penumbra. - * Value range is `[0,1]`. - * - * @type {number} - * @default 0 - */ - penumbra: number; - /** - * The amount the light dims along the distance of the light. In context of - * physically-correct rendering the default value should not be changed. - * - * @type {number} - * @default 2 - */ - decay: number; - /** - * A texture used to modulate the color of the light. The spot light - * color is mixed with the RGB value of this texture, with a ratio - * corresponding to its alpha value. The cookie-like masking effect is - * reproduced using pixel values (0, 0, 0, 1-cookie_value). - * - * *Warning*: This property is disabled if {@link Object3D#castShadow} is set to `false`. - * - * @type {?Texture} - * @default null - */ - map: Texture | null; - /** - * This property holds the light's shadow configuration. - * - * @type {SpotLightShadow} - */ - shadow: SpotLightShadow; - set power(power: number); - /** - * The light's power. Power is the luminous power of the light measured in lumens (lm). - * Changing the power will also change the light's intensity. - * - * @type {number} - */ - get power(): number; - copy(source: any, recursive: any): this; -} -import { Light } from './Light.js'; -import { Object3D } from '../core/Object3D.js'; -import { SpotLightShadow } from './SpotLightShadow.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/SpotLightShadow.d.ts b/jsdoc-testing/jsdoc/src/lights/SpotLightShadow.d.ts deleted file mode 100644 index 0de4c95b0..000000000 --- a/jsdoc-testing/jsdoc/src/lights/SpotLightShadow.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Represents the shadow configuration of directional lights. - * - * @augments LightShadow - */ -export class SpotLightShadow extends LightShadow { - /** - * Constructs a new spot light shadow. - */ - constructor(); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSpotLightShadow: boolean; - /** - * Used to focus the shadow camera. The camera's field of view is set as a - * percentage of the spotlight's field-of-view. Range is `[0, 1]`. - * - * @type {number} - * @default 1 - */ - focus: number; - /** - * Texture aspect ratio. - * - * @type {number} - * @default 1 - */ - aspect: number; - updateMatrices(light: any): void; - copy(source: any): this; -} -import { LightShadow } from './LightShadow.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/webgpu/IESSpotLight.d.ts b/jsdoc-testing/jsdoc/src/lights/webgpu/IESSpotLight.d.ts deleted file mode 100644 index 0e372ff20..000000000 --- a/jsdoc-testing/jsdoc/src/lights/webgpu/IESSpotLight.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export default IESSpotLight; -/** - * A IES version of {@link SpotLight}. Can only be used with {@link WebGPURenderer}. - * - * @augments SpotLight - */ -declare class IESSpotLight extends SpotLight { - /** - * The IES map. It's a lookup table that stores normalized attenuation factors - * (0.0 to 1.0) that represent the light's intensity at a specific angle. - * - * @type {?Texture} - * @default null - */ - iesMap: Texture | null; - copy(source: any, recursive: any): this; -} -import { SpotLight } from '../SpotLight.js'; diff --git a/jsdoc-testing/jsdoc/src/lights/webgpu/ProjectorLight.d.ts b/jsdoc-testing/jsdoc/src/lights/webgpu/ProjectorLight.d.ts deleted file mode 100644 index f561855ff..000000000 --- a/jsdoc-testing/jsdoc/src/lights/webgpu/ProjectorLight.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default ProjectorLight; -/** - * A projector light version of {@link SpotLight}. Can only be used with {@link WebGPURenderer}. - * - * @augments SpotLight - */ -declare class ProjectorLight extends SpotLight { - /** - * Aspect ratio of the light. Set to `null` to use the texture aspect ratio. - * - * @type {?number} - * @default null - */ - aspect: number | null; - copy(source: any, recursive: any): this; -} -import { SpotLight } from '../SpotLight.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/AnimationLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/AnimationLoader.d.ts deleted file mode 100644 index 4bed37855..000000000 --- a/jsdoc-testing/jsdoc/src/loaders/AnimationLoader.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Class for loading animation clips in the JSON format. The files are internally - * loaded via {@link FileLoader}. - * - * ```js - * const loader = new THREE.AnimationLoader(); - * const animations = await loader.loadAsync( 'animations/animation.js' ); - * ``` - * - * @augments Loader - */ -export class AnimationLoader extends Loader { - /** - * Starts loading from the given URL and pass the loaded animations as an array - * holding instances of {@link AnimationClip} to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Array)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: Array) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given JSON object and returns an array of animation clips. - * - * @param {Object} json - The serialized animation clips. - * @return {Array} The parsed animation clips. - */ - parse(json: Object): Array; -} -import { Loader } from './Loader.js'; -import { AnimationClip } from '../animation/AnimationClip.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/AudioLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/AudioLoader.d.ts deleted file mode 100644 index c9c2c4c2c..000000000 --- a/jsdoc-testing/jsdoc/src/loaders/AudioLoader.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Class for loading audio buffers. Audios are internally - * loaded via {@link FileLoader}. - * - * ```js - * const audioListener = new THREE.AudioListener(); - * const ambientSound = new THREE.Audio( audioListener ); - * - * const loader = new THREE.AudioLoader(); - * const audioBuffer = await loader.loadAsync( 'audio/ambient_ocean.ogg' ); - * - * ambientSound.setBuffer( audioBuffer ); - * ambientSound.play(); - * ``` - * - * @augments Loader - */ -export class AudioLoader extends Loader { - /** - * Starts loading from the given URL and passes the loaded audio buffer - * to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(AudioBuffer)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: AudioBuffer) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; -} -import { Loader } from './Loader.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/BufferGeometryLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/BufferGeometryLoader.d.ts deleted file mode 100644 index b85f471e0..000000000 --- a/jsdoc-testing/jsdoc/src/loaders/BufferGeometryLoader.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Class for loading geometries. The files are internally - * loaded via {@link FileLoader}. - * - * ```js - * const loader = new THREE.BufferGeometryLoader(); - * const geometry = await loader.loadAsync( 'models/json/pressure.json' ); - * - * const material = new THREE.MeshBasicMaterial( { color: 0xF5F5F5 } ); - * const object = new THREE.Mesh( geometry, material ); - * scene.add( object ); - * ``` - * - * @augments Loader - */ -export class BufferGeometryLoader extends Loader { - /** - * Starts loading from the given URL and pass the loaded geometry to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(BufferGeometry)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: BufferGeometry) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given JSON object and returns a geometry. - * - * @param {Object} json - The serialized geometry. - * @return {BufferGeometry} The parsed geometry. - */ - parse(json: Object): BufferGeometry; -} -import { Loader } from './Loader.js'; -import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/CompressedTextureLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/CompressedTextureLoader.d.ts deleted file mode 100644 index 652d27243..000000000 --- a/jsdoc-testing/jsdoc/src/loaders/CompressedTextureLoader.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * ~TexData - */ -export type CompressedTextureLoader = { - /** - * - The width of the base mip. - */ - width: number; - /** - * - The width of the base mip. - */ - height: number; - /** - * - Whether the data represent a cubemap or not. - */ - isCubemap: boolean; - /** - * - The mipmap count. - */ - mipmapCount: number; - /** - * - An array holding the mipmaps. - * Each entry holds the data and the dimensions for each level. - */ - mipmaps: Array<{ - data: TypedArray; - width: number; - height: number; - }>; - /** - * - The texture format. - */ - format: number; -}; -/** - * Abstract base class for loading compressed texture formats S3TC, ASTC or ETC. - * Textures are internally loaded via {@link FileLoader}. - * - * Derived classes have to implement the `parse()` method which holds the parsing - * for the respective format. - * - * @abstract - * @augments Loader - */ -export class CompressedTextureLoader extends Loader { - /** - * Starts loading from the given URL and passes the loaded compressed texture - * to the `onLoad()` callback. The method also returns a new texture object which can - * directly be used for material creation. If you do it this way, the texture - * may pop up in your scene once the respective loading process is finished. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(CompressedTexture)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - * @return {CompressedTexture} The compressed texture. - */ - load(url: string, onLoad: (arg0: CompressedTexture) => any, onProgress: onProgressCallback, onError: onErrorCallback): CompressedTexture; -} -import { Loader } from './Loader.js'; -import { CompressedTexture } from '../textures/CompressedTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/CubeTextureLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/CubeTextureLoader.d.ts deleted file mode 100644 index 8ac41df2c..000000000 --- a/jsdoc-testing/jsdoc/src/loaders/CubeTextureLoader.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Class for loading cube textures. Images are internally loaded via {@link ImageLoader}. - * - * The loader returns an instance of {@link CubeTexture} and expects the cube map to - * be defined as six separate images representing the sides of a cube. Other cube map definitions - * like vertical and horizontal cross, column and row layouts are not supported. - * - * Note that, by convention, cube maps are specified in a coordinate system - * in which positive-x is to the right when looking up the positive-z axis -- - * in other words, using a left-handed coordinate system. Since three.js uses - * a right-handed coordinate system, environment maps used in three.js will - * have pos-x and neg-x swapped. - * - * The loaded cube texture is in sRGB color space. Meaning {@link Texture#colorSpace} - * is set to `SRGBColorSpace` by default. - * - * ```js - * const loader = new THREE.CubeTextureLoader().setPath( 'textures/cubeMaps/' ); - * const cubeTexture = await loader.loadAsync( [ - * 'px.png', 'nx.png', 'py.png', 'ny.png', 'pz.png', 'nz.png' - * ] ); - * scene.background = cubeTexture; - * ``` - * - * @augments Loader - */ -export class CubeTextureLoader extends Loader { - /** - * Starts loading from the given URL and pass the fully loaded cube texture - * to the `onLoad()` callback. The method also returns a new cube texture object which can - * directly be used for material creation. If you do it this way, the cube texture - * may pop up in your scene once the respective loading process is finished. - * - * @param {Array} urls - Array of 6 URLs to images, one for each side of the - * cube texture. The urls should be specified in the following order: pos-x, - * neg-x, pos-y, neg-y, pos-z, neg-z. An array of data URIs are allowed as well. - * @param {function(CubeTexture)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Unsupported in this loader. - * @param {onErrorCallback} onError - Executed when errors occur. - * @return {CubeTexture} The cube texture. - */ - load(urls: Array, onLoad: (arg0: CubeTexture) => any, onProgress: onProgressCallback, onError: onErrorCallback): CubeTexture; -} -import { Loader } from './Loader.js'; -import { CubeTexture } from '../textures/CubeTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/DataTextureLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/DataTextureLoader.d.ts deleted file mode 100644 index 5f26b0e5b..000000000 --- a/jsdoc-testing/jsdoc/src/loaders/DataTextureLoader.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -/** - * ~TexData - */ -export type DataTextureLoader = { - /** - * - An object holding width, height and the texture data. - */ - image?: Object | undefined; - /** - * - The width of the base mip. - */ - width?: number | undefined; - /** - * - The width of the base mip. - */ - height?: number | undefined; - /** - * - The texture data. - */ - data?: TypedArray; - /** - * - The texture format. - */ - format?: number | undefined; - /** - * - The texture type. - */ - type?: number | undefined; - /** - * - If set to `true`, the texture is flipped along the vertical axis when uploaded to the GPU. - */ - flipY?: boolean | undefined; - /** - * - The wrapS value. - */ - wrapS?: number | undefined; - /** - * - The wrapT value. - */ - wrapT?: number | undefined; - /** - * - The anisotropy value. - */ - anisotropy?: number | undefined; - /** - * - Whether to generate mipmaps or not. - */ - generateMipmaps?: boolean | undefined; - /** - * - The color space. - */ - colorSpace?: string | undefined; - /** - * - The mag filter. - */ - magFilter?: number | undefined; - /** - * - The min filter. - */ - minFilter?: number | undefined; - /** - * - The mipmaps. - */ - mipmaps?: Object[] | undefined; -}; -/** - * Abstract base class for loading binary texture formats RGBE, EXR or TGA. - * Textures are internally loaded via {@link FileLoader}. - * - * Derived classes have to implement the `parse()` method which holds the parsing - * for the respective format. - * - * @abstract - * @augments Loader - */ -export class DataTextureLoader extends Loader { - /** - * Starts loading from the given URL and passes the loaded data texture - * to the `onLoad()` callback. The method also returns a new texture object which can - * directly be used for material creation. If you do it this way, the texture - * may pop up in your scene once the respective loading process is finished. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(DataTexture)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - * @return {DataTexture} The data texture. - */ - load(url: string, onLoad: (arg0: DataTexture) => any, onProgress: onProgressCallback, onError: onErrorCallback): DataTexture; -} -import { Loader } from './Loader.js'; -import { DataTexture } from '../textures/DataTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/FileLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/FileLoader.d.ts deleted file mode 100644 index bdad7b69a..000000000 --- a/jsdoc-testing/jsdoc/src/loaders/FileLoader.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * A low level class for loading resources with the Fetch API, used internally by - * most loaders. It can also be used directly to load any file type that does - * not have a loader. - * - * This loader supports caching. If you want to use it, add `THREE.Cache.enabled = true;` - * once to your application. - * - * ```js - * const loader = new THREE.FileLoader(); - * const data = await loader.loadAsync( 'example.txt' ); - * ``` - * - * @augments Loader - */ -export class FileLoader extends Loader { - /** - * The expected mime type. Valid values can be found - * [here](https://developer.mozilla.org/en-US/docs/Web/API/DOMParser/parseFromString#mimetype) - * - * @type {string} - */ - mimeType: string; - /** - * The expected response type. - * - * @type {('arraybuffer'|'blob'|'document'|'json'|'')} - * @default '' - */ - responseType: ("arraybuffer" | "blob" | "document" | "json" | ""); - /** - * Used for aborting requests. - * - * @private - * @type {AbortController} - */ - private _abortController; - /** - * Starts loading from the given URL and pass the loaded response to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(any)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} [onProgress] - Executed while the loading is in progress. - * @param {onErrorCallback} [onError] - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: any) => any, onProgress?: onProgressCallback, onError?: onErrorCallback): void; - /** - * Sets the expected response type. - * - * @param {('arraybuffer'|'blob'|'document'|'json'|'')} value - The response type. - * @return {FileLoader} A reference to this file loader. - */ - setResponseType(value: ("arraybuffer" | "blob" | "document" | "json" | "")): FileLoader; - /** - * Sets the expected mime type of the loaded file. - * - * @param {string} value - The mime type. - * @return {FileLoader} A reference to this file loader. - */ - setMimeType(value: string): FileLoader; - /** - * Aborts ongoing fetch requests. - * - * @return {FileLoader} A reference to this instance. - */ - abort(): FileLoader; -} -import { Loader } from './Loader.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/ImageBitmapLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/ImageBitmapLoader.d.ts deleted file mode 100644 index c060ff5b6..000000000 --- a/jsdoc-testing/jsdoc/src/loaders/ImageBitmapLoader.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -/** - * A loader for loading images as an [ImageBitmap](https://developer.mozilla.org/en-US/docs/Web/API/ImageBitmap). - * An `ImageBitmap` provides an asynchronous and resource efficient pathway to prepare - * textures for rendering. - * - * Note that {@link Texture#flipY} and {@link Texture#premultiplyAlpha} are ignored with image bitmaps. - * These options need to be configured via {@link ImageBitmapLoader#setOptions} prior to loading, - * unlike regular images which can be configured on the Texture to set these options on GPU upload instead. - * - * To match the default behaviour of {@link Texture}, the following options are needed: - * - * ```js - * { imageOrientation: 'flipY', premultiplyAlpha: 'none' } - * ``` - * - * Also note that unlike {@link FileLoader}, this loader will only avoid multiple concurrent requests to the same URL if {@link Cache} is enabled. - * - * ```js - * const loader = new THREE.ImageBitmapLoader(); - * loader.setOptions( { imageOrientation: 'flipY' } ); // set options if needed - * const imageBitmap = await loader.loadAsync( 'image.png' ); - * - * const texture = new THREE.Texture( imageBitmap ); - * texture.needsUpdate = true; - * ``` - * - * @augments Loader - */ -export class ImageBitmapLoader extends Loader { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isImageBitmapLoader: boolean; - /** - * Represents the loader options. - * - * @type {Object} - * @default {premultiplyAlpha:'none'} - */ - options: Object; - /** - * Used for aborting requests. - * - * @private - * @type {AbortController} - */ - private _abortController; - /** - * Sets the given loader options. The structure of the object must match the `options` parameter of - * [createImageBitmap](https://developer.mozilla.org/en-US/docs/Web/API/Window/createImageBitmap). - * - * Note: When caching is enabled, the cache key is based on the URL only. Loading the same URL with - * different options will return the cached result of the first request. - * - * @param {Object} options - The loader options to set. - * @return {ImageBitmapLoader} A reference to this image bitmap loader. - */ - setOptions(options: Object): ImageBitmapLoader; - /** - * Starts loading from the given URL and pass the loaded image bitmap to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(ImageBitmap)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Unsupported in this loader. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: ImageBitmap) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Aborts ongoing fetch requests. - * - * @return {ImageBitmapLoader} A reference to this instance. - */ - abort(): ImageBitmapLoader; -} -import { Loader } from './Loader.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/ImageLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/ImageLoader.d.ts deleted file mode 100644 index 0b4296abc..000000000 --- a/jsdoc-testing/jsdoc/src/loaders/ImageLoader.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * A loader for loading images. The class loads images with the HTML `Image` API. - * - * ```js - * const loader = new THREE.ImageLoader(); - * const image = await loader.loadAsync( 'image.png' ); - * ``` - * Please note that `ImageLoader` has dropped support for progress - * events in `r84`. For an `ImageLoader` that supports progress events, see - * [this thread](https://github.com/mrdoob/three.js/issues/10439#issuecomment-275785639). - * - * @augments Loader - */ -export class ImageLoader extends Loader { - /** - * Starts loading from the given URL and passes the loaded image - * to the `onLoad()` callback. The method also returns a new `Image` object which can - * directly be used for texture creation. If you do it this way, the texture - * may pop up in your scene once the respective loading process is finished. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Image)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Unsupported in this loader. - * @param {onErrorCallback} onError - Executed when errors occur. - * @return {Image} The image. - */ - load(url: string, onLoad: (arg0: new (width?: number, height?: number) => HTMLImageElement) => any, onProgress: onProgressCallback, onError: onErrorCallback): new (width?: number, height?: number) => HTMLImageElement; -} -import { Loader } from './Loader.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/Loader.d.ts b/jsdoc-testing/jsdoc/src/loaders/Loader.d.ts deleted file mode 100644 index a1e704eb9..000000000 --- a/jsdoc-testing/jsdoc/src/loaders/Loader.d.ts +++ /dev/null @@ -1,141 +0,0 @@ -/** - * Callback for onProgress in loaders. - */ -export type onProgressCallback = (event: ProgressEvent) => any; -/** - * Callback for onError in loaders. - */ -export type onErrorCallback = (error: Error) => any; -/** - * Abstract base class for loaders. - * - * @abstract - */ -export class Loader { - /** - * Constructs a new loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * The loading manager. - * - * @type {LoadingManager} - * @default DefaultLoadingManager - */ - manager: LoadingManager; - /** - * The crossOrigin string to implement CORS for loading the url from a - * different domain that allows CORS. - * - * @type {string} - * @default 'anonymous' - */ - crossOrigin: string; - /** - * Whether the XMLHttpRequest uses credentials. - * - * @type {boolean} - * @default false - */ - withCredentials: boolean; - /** - * The base path from which the asset will be loaded. - * - * @type {string} - */ - path: string; - /** - * The base path from which additional resources like textures will be loaded. - * - * @type {string} - */ - resourcePath: string; - /** - * The [request header](https://developer.mozilla.org/en-US/docs/Glossary/Request_header) - * used in HTTP request. - * - * @type {Object} - */ - requestHeader: { - [x: string]: any; - }; - /** - * This method needs to be implemented by all concrete loaders. It holds the - * logic for loading assets from the backend. - * - * @abstract - * @param {string} url - The path/URL of the file to be loaded. - * @param {Function} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} [onProgress] - Executed while the loading is in progress. - * @param {onErrorCallback} [onError] - Executed when errors occur. - */ - load(): void; - /** - * A async version of {@link Loader#load}. - * - * @param {string} url - The path/URL of the file to be loaded. - * @param {onProgressCallback} [onProgress] - Executed while the loading is in progress. - * @return {Promise} A Promise that resolves when the asset has been loaded. - */ - loadAsync(url: string, onProgress?: onProgressCallback): Promise; - /** - * This method needs to be implemented by all concrete loaders. It holds the - * logic for parsing the asset into three.js entities. - * - * @abstract - * @param {any} data - The data to parse. - */ - parse(): void; - /** - * Sets the `crossOrigin` String to implement CORS for loading the URL - * from a different domain that allows CORS. - * - * @param {string} crossOrigin - The `crossOrigin` value. - * @return {Loader} A reference to this instance. - */ - setCrossOrigin(crossOrigin: string): Loader; - /** - * Whether the XMLHttpRequest uses credentials such as cookies, authorization - * headers or TLS client certificates, see [XMLHttpRequest.withCredentials](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials). - * - * Note: This setting has no effect if you are loading files locally or from the same domain. - * - * @param {boolean} value - The `withCredentials` value. - * @return {Loader} A reference to this instance. - */ - setWithCredentials(value: boolean): Loader; - /** - * Sets the base path for the asset. - * - * @param {string} path - The base path. - * @return {Loader} A reference to this instance. - */ - setPath(path: string): Loader; - /** - * Sets the base path for dependent resources like textures. - * - * @param {string} resourcePath - The resource path. - * @return {Loader} A reference to this instance. - */ - setResourcePath(resourcePath: string): Loader; - /** - * Sets the given request header. - * - * @param {Object} requestHeader - A [request header](https://developer.mozilla.org/en-US/docs/Glossary/Request_header) - * for configuring the HTTP request. - * @return {Loader} A reference to this instance. - */ - setRequestHeader(requestHeader: Object): Loader; - /** - * This method can be implemented in loaders for aborting ongoing requests. - * - * @abstract - * @return {Loader} A reference to this instance. - */ - abort(): Loader; -} -export namespace Loader { - let DEFAULT_MATERIAL_NAME: string; -} diff --git a/jsdoc-testing/jsdoc/src/loaders/LoaderUtils.d.ts b/jsdoc-testing/jsdoc/src/loaders/LoaderUtils.d.ts deleted file mode 100644 index ce241791d..000000000 --- a/jsdoc-testing/jsdoc/src/loaders/LoaderUtils.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * A class with loader utility functions. - */ -export class LoaderUtils { - /** - * Extracts the base URL from the given URL. - * - * @param {string} url -The URL to extract the base URL from. - * @return {string} The extracted base URL. - */ - static extractUrlBase(url: string): string; - /** - * Resolves relative URLs against the given path. Absolute paths, data urls, - * and blob URLs will be returned as is. Invalid URLs will return an empty - * string. - * - * @param {string} url -The URL to resolve. - * @param {string} path - The base path for relative URLs to be resolved against. - * @return {string} The resolved URL. - */ - static resolveURL(url: string, path: string): string; -} diff --git a/jsdoc-testing/jsdoc/src/loaders/MaterialLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/MaterialLoader.d.ts deleted file mode 100644 index ba72a5bee..000000000 --- a/jsdoc-testing/jsdoc/src/loaders/MaterialLoader.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -/** - * Class for loading materials. The files are internally - * loaded via {@link FileLoader}. - * - * ```js - * const loader = new THREE.MaterialLoader(); - * const material = await loader.loadAsync( 'material.json' ); - * ``` - * This loader does not support node materials. Use {@link NodeMaterialLoader} instead. - * - * @augments Loader - */ -export class MaterialLoader extends Loader { - /** - * Creates a material for the given type. - * - * @static - * @param {string} type - The material type. - * @return {Material} The new material. - */ - static createMaterialFromType(type: string): Material; - /** - * A dictionary holding textures used by the material. - * - * @type {Object} - */ - textures: { - [x: string]: Texture; - }; - /** - * Starts loading from the given URL and pass the loaded material to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Material)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: Material) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Parses the given JSON object and returns a material. - * - * @param {Object} json - The serialized material. - * @return {Material} The parsed material. - */ - parse(json: Object): Material; - /** - * Textures are not embedded in the material JSON so they have - * to be injected before the loading process starts. - * - * @param {Object} value - A dictionary holding textures for material properties. - * @return {MaterialLoader} A reference to this material loader. - */ - setTextures(value: Object): MaterialLoader; - /** - * Creates a material for the given type. - * - * @param {string} type - The material type. - * @return {Material} The new material. - */ - createMaterialFromType(type: string): Material; -} -import { Loader } from './Loader.js'; -import { Material } from '../materials/Materials.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/ObjectLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/ObjectLoader.d.ts deleted file mode 100644 index def8eb4b2..000000000 --- a/jsdoc-testing/jsdoc/src/loaders/ObjectLoader.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -/** - * A loader for loading a JSON resource in the [JSON Object/Scene format](https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4). - * The files are internally loaded via {@link FileLoader}. - * - * ```js - * const loader = new THREE.ObjectLoader(); - * const obj = await loader.loadAsync( 'models/json/example.json' ); - * scene.add( obj ); - * - * // Alternatively, to parse a previously loaded JSON structure - * const object = await loader.parseAsync( a_json_object ); - * scene.add( object ); - * ``` - * - * @augments Loader - */ -export class ObjectLoader extends Loader { - /** - * Registers the given geometry at the internal - * geometry library. - * - * @static - * @param {string} type - The geometry type. - * @param {BufferGeometry.constructor} geometryClass - The geometry class. - */ - static registerGeometry(type: string, geometryClass: BufferGeometry.constructor): void; - /** - * Constructs a new object loader. - * - * @param {LoadingManager} [manager] - The loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Starts loading from the given URL and pass the loaded 3D object to the `onLoad()` callback. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Object3D)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @param {onErrorCallback} onError - Executed when errors occur. - */ - load(url: string, onLoad: (arg0: Object3D) => any, onProgress: onProgressCallback, onError: onErrorCallback): void; - /** - * Async version of {@link ObjectLoader#load}. - * - * @async - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {onProgressCallback} onProgress - Executed while the loading is in progress. - * @return {Promise} A Promise that resolves with the loaded 3D object. - */ - loadAsync(url: string, onProgress: onProgressCallback): Promise; - /** - * Parses the given JSON. This is used internally by {@link ObjectLoader#load} - * but can also be used directly to parse a previously loaded JSON structure. - * - * @param {Object} json - The serialized 3D object. - * @param {onLoad} onLoad - Executed when all resources (e.g. textures) have been fully loaded. - * @return {Object3D} The parsed 3D object. - */ - parse(json: Object, onLoad: any): Object3D; - /** - * Async version of {@link ObjectLoader#parse}. - * - * @param {Object} json - The serialized 3D object. - * @return {Promise} A Promise that resolves with the parsed 3D object. - */ - parseAsync(json: Object): Promise; - parseShapes(json: any): {}; - parseSkeletons(json: any, object: any): {}; - parseGeometries(json: any, shapes: any): {}; - parseMaterials(json: any, textures: any): {}; - parseAnimations(json: any): {}; - parseImages(json: any, onLoad: any): {}; - parseImagesAsync(json: any): Promise<{}>; - parseTextures(json: any, images: any): {}; - parseObject(data: any, geometries: any, materials: any, textures: any, animations: any): Object3D | Sprite | LOD | Mesh | SkinnedMesh | InstancedMesh | BatchedMesh | Line | Points | PerspectiveCamera | OrthographicCamera; - bindSkeletons(object: any, skeletons: any): void; - bindLightTargets(object: any): void; -} -import { Loader } from './Loader.js'; -import { Object3D } from '../core/Object3D.js'; -import { Sprite } from '../objects/Sprite.js'; -import { LOD } from '../objects/LOD.js'; -import { Mesh } from '../objects/Mesh.js'; -import { SkinnedMesh } from '../objects/SkinnedMesh.js'; -import { InstancedMesh } from '../objects/InstancedMesh.js'; -import { BatchedMesh } from '../objects/BatchedMesh.js'; -import { Line } from '../objects/Line.js'; -import { Points } from '../objects/Points.js'; -import { PerspectiveCamera } from '../cameras/PerspectiveCamera.js'; -import { OrthographicCamera } from '../cameras/OrthographicCamera.js'; -import { LoadingManager } from './LoadingManager.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/TextureLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/TextureLoader.d.ts deleted file mode 100644 index 8069b4948..000000000 --- a/jsdoc-testing/jsdoc/src/loaders/TextureLoader.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Class for loading textures. Images are internally - * loaded via {@link ImageLoader}. - * - * ```js - * const loader = new THREE.TextureLoader(); - * const texture = await loader.loadAsync( 'textures/land_ocean_ice_cloud_2048.jpg' ); - * - * const material = new THREE.MeshBasicMaterial( { map:texture } ); - * ``` - * Please note that `TextureLoader` has dropped support for progress - * events in `r84`. For a `TextureLoader` that supports progress events, see - * [this thread](https://github.com/mrdoob/three.js/issues/10439#issuecomment-293260145). - * - * @augments Loader - */ -export class TextureLoader extends Loader { - /** - * Starts loading from the given URL and pass the fully loaded texture - * to the `onLoad()` callback. The method also returns a new texture object which can - * directly be used for material creation. If you do it this way, the texture - * may pop up in your scene once the respective loading process is finished. - * - * @param {string} url - The path/URL of the file to be loaded. This can also be a data URI. - * @param {function(Texture)} onLoad - Executed when the loading process has been finished. - * @param {onProgressCallback} onProgress - Unsupported in this loader. - * @param {onErrorCallback} onError - Executed when errors occur. - * @return {Texture} The texture. - */ - load(url: string, onLoad: (arg0: Texture) => any, onProgress: onProgressCallback, onError: onErrorCallback): Texture; -} -import { Loader } from './Loader.js'; -import { Texture } from '../textures/Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/nodes/NodeLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/nodes/NodeLoader.d.ts deleted file mode 100644 index 58b362d35..000000000 --- a/jsdoc-testing/jsdoc/src/loaders/nodes/NodeLoader.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -export default NodeLoader; -/** - * A loader for loading node objects in the three.js JSON Object/Scene format. - * - * @augments Loader - */ -declare class NodeLoader extends Loader { - /** - * Represents a dictionary of textures. - * - * @type {Object} - */ - textures: { - [x: string]: Texture; - }; - /** - * Represents a dictionary of node types. - * - * @type {Object} - */ - nodes: { - [x: string]: Node.constructor; - }; - /** - * Loads the node definitions from the given URL. - * - * @param {string} url - The path/URL of the file to be loaded. - * @param {Function} onLoad - Will be called when load completes. - * @param {Function} onProgress - Will be called while load progresses. - * @param {Function} onError - Will be called when errors are thrown during the loading process. - */ - load(url: string, onLoad: Function, onProgress: Function, onError: Function): void; - /** - * Parse the node dependencies for the loaded node. - * - * @param {Array} [json] - The JSON definition - * @return {Object} A dictionary with node dependencies. - */ - parseNodes(json?: Array): { - [x: string]: Node; - }; - /** - * Parses the node from the given JSON. - * - * @param {Object} json - The JSON definition - * @param {string} json.type - The node type. - * @param {string} json.uuid - The node UUID. - * @param {Array} [json.nodes] - The node dependencies. - * @param {Object} [json.meta] - The meta data. - * @return {Node} The parsed node. - */ - parse(json: { - type: string; - uuid: string; - nodes?: Object[] | undefined; - meta?: Object | undefined; - }): Node; - /** - * Defines the dictionary of textures. - * - * @param {Object} value - The texture library defines as ``. - * @return {NodeLoader} A reference to this loader. - */ - setTextures(value: { - [x: string]: Texture; - }): NodeLoader; - /** - * Defines the dictionary of node types. - * - * @param {Object} value - The node library defined as ``. - * @return {NodeLoader} A reference to this loader. - */ - setNodes(value: { - [x: string]: Node.constructor; - }): NodeLoader; - /** - * Creates a node object from the given type. - * - * @param {string} type - The node type. - * @return {Node} The created node instance. - */ - createNodeFromType(type: string): Node; -} -import { Loader } from '../Loader.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/nodes/NodeMaterialLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/nodes/NodeMaterialLoader.d.ts deleted file mode 100644 index cf350a240..000000000 --- a/jsdoc-testing/jsdoc/src/loaders/nodes/NodeMaterialLoader.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -export default NodeMaterialLoader; -/** - * A special type of material loader for loading node materials. - * - * @augments MaterialLoader - */ -declare class NodeMaterialLoader extends MaterialLoader { - /** - * Represents a dictionary of node types. - * - * @type {Object} - */ - nodes: { - [x: string]: Node.constructor; - }; - /** - * Represents a dictionary of node material types. - * - * @type {Object} - */ - nodeMaterials: { - [x: string]: NodeMaterial.constructor; - }; - /** - * Parses the node material from the given JSON. - * - * @param {Object} json - The JSON definition - * @return {NodeMaterial}. The parsed material. - */ - parse(json: Object): NodeMaterial; - /** - * Defines the dictionary of node types. - * - * @param {Object} value - The node library defined as ``. - * @return {NodeLoader} A reference to this loader. - */ - setNodes(value: { - [x: string]: Node.constructor; - }): NodeLoader; - /** - * Defines the dictionary of node material types. - * - * @param {Object} value - The node material library defined as ``. - * @return {NodeLoader} A reference to this loader. - */ - setNodeMaterials(value: { - [x: string]: NodeMaterial.constructor; - }): NodeLoader; - /** - * Creates a node material from the given type. - * - * @param {string} type - The node material type. - * @return {Node} The created node material instance. - */ - createMaterialFromType(type: string): Node; -} -import { MaterialLoader } from '../../loaders/MaterialLoader.js'; diff --git a/jsdoc-testing/jsdoc/src/loaders/nodes/NodeObjectLoader.d.ts b/jsdoc-testing/jsdoc/src/loaders/nodes/NodeObjectLoader.d.ts deleted file mode 100644 index b5954eab2..000000000 --- a/jsdoc-testing/jsdoc/src/loaders/nodes/NodeObjectLoader.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -export default NodeObjectLoader; -/** - * A special type of object loader for loading 3D objects using - * node materials. - * - * @augments ObjectLoader - */ -declare class NodeObjectLoader extends ObjectLoader { - /** - * Constructs a new node object loader. - * - * @param {LoadingManager} [manager] - A reference to a loading manager. - */ - constructor(manager?: LoadingManager); - /** - * Represents a dictionary of node types. - * - * @type {Object} - */ - nodes: { - [x: string]: Node.constructor; - }; - /** - * Represents a dictionary of node material types. - * - * @type {Object} - */ - nodeMaterials: { - [x: string]: NodeMaterial.constructor; - }; - /** - * A reference to hold the `nodes` JSON property. - * - * @private - * @type {?Object[]} - */ - private _nodesJSON; - /** - * Defines the dictionary of node types. - * - * @param {Object} value - The node library defined as ``. - * @return {NodeObjectLoader} A reference to this loader. - */ - setNodes(value: { - [x: string]: Node.constructor; - }): NodeObjectLoader; - /** - * Defines the dictionary of node material types. - * - * @param {Object} value - The node material library defined as ``. - * @return {NodeObjectLoader} A reference to this loader. - */ - setNodeMaterials(value: { - [x: string]: NodeMaterial.constructor; - }): NodeObjectLoader; - /** - * Parses the node objects from the given JSON. - * - * @param {Object} json - The JSON definition - * @param {Function} onLoad - The onLoad callback function. - * @return {Object3D}. The parsed 3D object. - */ - parse(json: Object, onLoad: Function): Object3D; - /** - * Async version of {@link NodeObjectLoader#parse}. - * - * @param {Object} json - The JSON definition - * @return {Promise} A Promise that resolves with the parsed 3D object. - */ - parseAsync(json: Object): Promise; - /** - * Parses the node objects from the given JSON and textures. - * - * @param {Object[]} json - The JSON definition - * @param {Object} textures - The texture library. - * @return {Object}. The parsed nodes. - */ - parseNodes(json: Object[], textures: { - [x: string]: Texture; - }): { - [x: string]: Node; - }; - /** - * Parses the node objects from the given JSON and textures. - * - * @param {Object} json - The JSON definition - * @param {Object} textures - The texture library. - * @return {Object}. The parsed materials. - */ - parseMaterials(json: Object, textures: { - [x: string]: Texture; - }): { - [x: string]: NodeMaterial; - }; -} -import { ObjectLoader } from '../../loaders/ObjectLoader.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/LineBasicMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/LineBasicMaterial.d.ts deleted file mode 100644 index 64e5c7024..000000000 --- a/jsdoc-testing/jsdoc/src/materials/LineBasicMaterial.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -/** - * A material for rendering line primitives. - * - * Materials define the appearance of renderable 3D objects. - * - * ```js - * const material = new THREE.LineBasicMaterial( { color: 0xffffff } ); - * ``` - * - * @augments Material - */ -export class LineBasicMaterial extends Material { - /** - * Constructs a new line basic material. - * - * @param {Object} [parameters] - An object with one or more properties - * defining the material's appearance. Any property of the material - * (including any property from inherited materials) can be passed - * in here. Color values can be passed any type of value accepted - * by {@link Color#set}. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLineBasicMaterial: boolean; - type: string; - /** - * Color of the material. - * - * @type {Color} - * @default (1,1,1) - */ - color: Color; - /** - * Sets the color of the lines using data from a texture. The texture map - * color is modulated by the diffuse `color`. - * - * @type {?Texture} - * @default null - */ - map: Texture | null; - /** - * Controls line thickness or lines. - * - * Can only be used with {@link SVGRenderer}. WebGL and WebGPU - * ignore this setting and always render line primitives with a - * width of one pixel. - * - * @type {number} - * @default 1 - */ - linewidth: number; - /** - * Defines appearance of line ends. - * - * Can only be used with {@link SVGRenderer}. - * - * @type {('butt'|'round'|'square')} - * @default 'round' - */ - linecap: ("butt" | "round" | "square"); - /** - * Defines appearance of line joints. - * - * Can only be used with {@link SVGRenderer}. - * - * @type {('round'|'bevel'|'miter')} - * @default 'round' - */ - linejoin: ("round" | "bevel" | "miter"); - /** - * Whether the material is affected by fog or not. - * - * @type {boolean} - * @default true - */ - fog: boolean; - copy(source: any): this; -} -import { Material } from './Material.js'; -import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/LineDashedMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/LineDashedMaterial.d.ts deleted file mode 100644 index 3cb1a34d8..000000000 --- a/jsdoc-testing/jsdoc/src/materials/LineDashedMaterial.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * A material for rendering line primitives. - * - * Materials define the appearance of renderable 3D objects. - * - * ```js - * const material = new THREE.LineDashedMaterial( { - * color: 0xffffff, - * scale: 1, - * dashSize: 3, - * gapSize: 1, - * } ); - * ``` - * - * @augments LineBasicMaterial - */ -export class LineDashedMaterial extends LineBasicMaterial { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLineDashedMaterial: boolean; - /** - * The scale of the dashed part of a line. - * - * @type {number} - * @default 1 - */ - scale: number; - /** - * The size of the dash. This is both the gap with the stroke. - * - * @type {number} - * @default 3 - */ - dashSize: number; - /** - * The size of the gap. - * - * @type {number} - * @default 1 - */ - gapSize: number; - copy(source: any): this; -} -import { LineBasicMaterial } from './LineBasicMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/Material.d.ts b/jsdoc-testing/jsdoc/src/materials/Material.d.ts deleted file mode 100644 index c05cd91f7..000000000 --- a/jsdoc-testing/jsdoc/src/materials/Material.d.ts +++ /dev/null @@ -1,497 +0,0 @@ -/** - * Abstract base class for materials. - * - * Materials define the appearance of renderable 3D objects. - * - * @abstract - * @augments EventDispatcher - */ -export class Material extends EventDispatcher { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMaterial: boolean; - /** - * The UUID of the material. - * - * @type {string} - * @readonly - */ - readonly uuid: string; - /** - * The name of the material. - * - * @type {string} - */ - name: string; - /** - * The type property is used for detecting the object type - * in context of serialization/deserialization. - * - * @type {string} - * @readonly - */ - readonly type: string; - /** - * Defines the blending type of the material. - * - * It must be set to `CustomBlending` if custom blending properties like - * {@link Material#blendSrc}, {@link Material#blendDst} or {@link Material#blendEquation} - * should have any effect. - * - * @type {(NoBlending|NormalBlending|AdditiveBlending|SubtractiveBlending|MultiplyBlending|CustomBlending)} - * @default NormalBlending - */ - blending: (NoBlending | number | AdditiveBlending | SubtractiveBlending | MultiplyBlending | CustomBlending); - /** - * Defines which side of faces will be rendered - front, back or both. - * - * @type {(FrontSide|BackSide|DoubleSide)} - * @default FrontSide - */ - side: (number | BackSide | DoubleSide); - /** - * If set to `true`, vertex colors should be used. - * - * The engine supports RGB and RGBA vertex colors depending on whether a three (RGB) or - * four (RGBA) component color buffer attribute is used. - * - * @type {boolean} - * @default false - */ - vertexColors: boolean; - /** - * Defines how transparent the material is. - * A value of `0.0` indicates fully transparent, `1.0` is fully opaque. - * - * If the {@link Material#transparent} is not set to `true`, - * the material will remain fully opaque and this value will only affect its color. - * - * @type {number} - * @default 1 - */ - opacity: number; - /** - * Defines whether this material is transparent. This has an effect on - * rendering as transparent objects need special treatment and are rendered - * after non-transparent objects. - * - * When set to true, the extent to which the material is transparent is - * controlled by {@link Material#opacity}. - * - * @type {boolean} - * @default false - */ - transparent: boolean; - /** - * Enables alpha hashed transparency, an alternative to {@link Material#transparent} or - * {@link Material#alphaTest}. The material will not be rendered if opacity is lower than - * a random threshold. Randomization introduces some grain or noise, but approximates alpha - * blending without the associated problems of sorting. Using TAA can reduce the resulting noise. - * - * @type {boolean} - * @default false - */ - alphaHash: boolean; - /** - * Defines the blending source factor. - * - * @type {(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} - * @default SrcAlphaFactor - */ - blendSrc: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); - /** - * Defines the blending destination factor. - * - * @type {(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} - * @default OneMinusSrcAlphaFactor - */ - blendDst: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); - /** - * Defines the blending equation. - * - * @type {(AddEquation|SubtractEquation|ReverseSubtractEquation|MinEquation|MaxEquation)} - * @default AddEquation - */ - blendEquation: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation); - /** - * Defines the blending source alpha factor. - * - * @type {?(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} - * @default null - */ - blendSrcAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; - /** - * Defines the blending destination alpha factor. - * - * @type {?(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} - * @default null - */ - blendDstAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; - /** - * Defines the blending equation of the alpha channel. - * - * @type {?(AddEquation|SubtractEquation|ReverseSubtractEquation|MinEquation|MaxEquation)} - * @default null - */ - blendEquationAlpha: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation) | null; - /** - * Represents the RGB values of the constant blend color. - * - * This property has only an effect when using custom blending with `ConstantColor` or `OneMinusConstantColor`. - * - * @type {Color} - * @default (0,0,0) - */ - blendColor: Color; - /** - * Represents the alpha value of the constant blend color. - * - * This property has only an effect when using custom blending with `ConstantAlpha` or `OneMinusConstantAlpha`. - * - * @type {number} - * @default 0 - */ - blendAlpha: number; - /** - * Defines the depth function. - * - * @type {(NeverDepth|AlwaysDepth|LessDepth|LessEqualDepth|EqualDepth|GreaterEqualDepth|GreaterDepth|NotEqualDepth)} - * @default LessEqualDepth - */ - depthFunc: (NeverDepth | AlwaysDepth | LessDepth | number | EqualDepth | GreaterEqualDepth | GreaterDepth | NotEqualDepth); - /** - * Whether to have depth test enabled when rendering this material. - * When the depth test is disabled, the depth write will also be implicitly disabled. - * - * @type {boolean} - * @default true - */ - depthTest: boolean; - /** - * Whether rendering this material has any effect on the depth buffer. - * - * When drawing 2D overlays it can be useful to disable the depth writing in - * order to layer several things together without creating z-index artifacts. - * - * @type {boolean} - * @default true - */ - depthWrite: boolean; - /** - * The bit mask to use when writing to the stencil buffer. - * - * @type {number} - * @default 0xff - */ - stencilWriteMask: number; - /** - * The stencil comparison function to use. - * - * @type {NeverStencilFunc|LessStencilFunc|EqualStencilFunc|LessEqualStencilFunc|GreaterStencilFunc|NotEqualStencilFunc|GreaterEqualStencilFunc|AlwaysStencilFunc} - * @default AlwaysStencilFunc - */ - stencilFunc: NeverStencilFunc | LessStencilFunc | EqualStencilFunc | LessEqualStencilFunc | GreaterStencilFunc | NotEqualStencilFunc | GreaterEqualStencilFunc | number; - /** - * The value to use when performing stencil comparisons or stencil operations. - * - * @type {number} - * @default 0 - */ - stencilRef: number; - /** - * The bit mask to use when comparing against the stencil buffer. - * - * @type {number} - * @default 0xff - */ - stencilFuncMask: number; - /** - * Which stencil operation to perform when the comparison function returns `false`. - * - * @type {ZeroStencilOp|KeepStencilOp|ReplaceStencilOp|IncrementStencilOp|DecrementStencilOp|IncrementWrapStencilOp|DecrementWrapStencilOp|InvertStencilOp} - * @default KeepStencilOp - */ - stencilFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; - /** - * Which stencil operation to perform when the comparison function returns - * `true` but the depth test fails. - * - * @type {ZeroStencilOp|KeepStencilOp|ReplaceStencilOp|IncrementStencilOp|DecrementStencilOp|IncrementWrapStencilOp|DecrementWrapStencilOp|InvertStencilOp} - * @default KeepStencilOp - */ - stencilZFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; - /** - * Which stencil operation to perform when the comparison function returns - * `true` and the depth test passes. - * - * @type {ZeroStencilOp|KeepStencilOp|ReplaceStencilOp|IncrementStencilOp|DecrementStencilOp|IncrementWrapStencilOp|DecrementWrapStencilOp|InvertStencilOp} - * @default KeepStencilOp - */ - stencilZPass: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; - /** - * Whether stencil operations are performed against the stencil buffer. In - * order to perform writes or comparisons against the stencil buffer this - * value must be `true`. - * - * @type {boolean} - * @default false - */ - stencilWrite: boolean; - /** - * User-defined clipping planes specified as THREE.Plane objects in world - * space. These planes apply to the objects this material is attached to. - * Points in space whose signed distance to the plane is negative are clipped - * (not rendered). This requires {@link WebGLRenderer#localClippingEnabled} to - * be `true`. - * - * @type {?Array} - * @default null - */ - clippingPlanes: Array | null; - /** - * Changes the behavior of clipping planes so that only their intersection is - * clipped, rather than their union. - * - * @type {boolean} - * @default false - */ - clipIntersection: boolean; - /** - * Defines whether to clip shadows according to the clipping planes specified - * on this material. - * - * @type {boolean} - * @default false - */ - clipShadows: boolean; - /** - * Defines which side of faces cast shadows. If `null`, the side casting shadows - * is determined as follows: - * - * - When {@link Material#side} is set to `FrontSide`, the back side cast shadows. - * - When {@link Material#side} is set to `BackSide`, the front side cast shadows. - * - When {@link Material#side} is set to `DoubleSide`, both sides cast shadows. - * - * @type {?(FrontSide|BackSide|DoubleSide)} - * @default null - */ - shadowSide: (number | BackSide | DoubleSide) | null; - /** - * Whether to render the material's color. - * - * This can be used in conjunction with {@link Object3D#renderOder} to create invisible - * objects that occlude other objects. - * - * @type {boolean} - * @default true - */ - colorWrite: boolean; - /** - * Override the renderer's default precision for this material. - * - * @type {?('highp'|'mediump'|'lowp')} - * @default null - */ - precision: ("highp" | "mediump" | "lowp") | null; - /** - * Whether to use polygon offset or not. When enabled, each fragment's depth value will - * be offset after it is interpolated from the depth values of the appropriate vertices. - * The offset is added before the depth test is performed and before the value is written - * into the depth buffer. - * - * Can be useful for rendering hidden-line images, for applying decals to surfaces, and for - * rendering solids with highlighted edges. - * - * @type {boolean} - * @default false - */ - polygonOffset: boolean; - /** - * Specifies a scale factor that is used to create a variable depth offset for each polygon. - * - * @type {number} - * @default 0 - */ - polygonOffsetFactor: number; - /** - * Is multiplied by an implementation-specific value to create a constant depth offset. - * - * @type {number} - * @default 0 - */ - polygonOffsetUnits: number; - /** - * Whether to apply dithering to the color to remove the appearance of banding. - * - * @type {boolean} - * @default false - */ - dithering: boolean; - /** - * Whether alpha to coverage should be enabled or not. Can only be used with MSAA-enabled contexts - * (meaning when the renderer was created with *antialias* parameter set to `true`). Enabling this - * will smooth aliasing on clip plane edges and alphaTest-clipped edges. - * - * @type {boolean} - * @default false - */ - alphaToCoverage: boolean; - /** - * Whether to premultiply the alpha (transparency) value. - * - * @type {boolean} - * @default false - */ - premultipliedAlpha: boolean; - /** - * Whether double-sided, transparent objects should be rendered with a single pass or not. - * - * The engine renders double-sided, transparent objects with two draw calls (back faces first, - * then front faces) to mitigate transparency artifacts. There are scenarios however where this - * approach produces no quality gains but still doubles draw calls e.g. when rendering flat - * vegetation like grass sprites. In these cases, set the `forceSinglePass` flag to `true` to - * disable the two pass rendering to avoid performance issues. - * - * @type {boolean} - * @default false - */ - forceSinglePass: boolean; - /** - * Whether it's possible to override the material with {@link Scene#overrideMaterial} or not. - * - * @type {boolean} - * @default true - */ - allowOverride: boolean; - /** - * Defines whether 3D objects using this material are visible. - * - * @type {boolean} - * @default true - */ - visible: boolean; - /** - * Defines whether this material is tone mapped according to the renderer's tone mapping setting. - * - * It is ignored when rendering to a render target or using post processing or when using - * `WebGPURenderer`. In all these cases, all materials are honored by tone mapping. - * - * @type {boolean} - * @default true - */ - toneMapped: boolean; - /** - * An object that can be used to store custom data about the Material. It - * should not hold references to functions as these will not be cloned. - * - * @type {Object} - */ - userData: Object; - /** - * This starts at `0` and counts how many times {@link Material#needsUpdate} is set to `true`. - * - * @type {number} - * @readonly - * @default 0 - */ - readonly version: number; - _alphaTest: number; - readonly set alphaTest(value: number); - /** - * Sets the alpha value to be used when running an alpha test. The material - * will not be rendered if the opacity is lower than this value. - * - * @type {number} - * @readonly - * @default 0 - */ - readonly get alphaTest(): number; - /** - * An optional callback that is executed immediately before the material is used to render a 3D object. - * - * This method can only be used when rendering with {@link WebGLRenderer}. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {Scene} scene - The scene. - * @param {Camera} camera - The camera that is used to render the scene. - * @param {BufferGeometry} geometry - The 3D object's geometry. - * @param {Object3D} object - The 3D object. - * @param {Object} group - The geometry group data. - */ - onBeforeRender(): void; - /** - * An optional callback that is executed immediately before the shader - * program is compiled. This function is called with the shader source code - * as a parameter. Useful for the modification of built-in materials. - * - * This method can only be used when rendering with {@link WebGLRenderer}. The - * recommended approach when customizing materials is to use `WebGPURenderer` with the new - * Node Material system and [TSL](https://github.com/mrdoob/three.js/wiki/Three.js-Shading-Language). - * - * @param {{vertexShader:string,fragmentShader:string,uniforms:Object}} shaderobject - The object holds the uniforms and the vertex and fragment shader source. - * @param {WebGLRenderer} renderer - A reference to the renderer. - */ - onBeforeCompile(): void; - /** - * In case {@link Material#onBeforeCompile} is used, this callback can be used to identify - * values of settings used in `onBeforeCompile()`, so three.js can reuse a cached - * shader or recompile the shader for this material as needed. - * - * This method can only be used when rendering with {@link WebGLRenderer}. - * - * @return {string} The custom program cache key. - */ - customProgramCacheKey(): string; - /** - * This method can be used to set default values from parameter objects. - * It is a generic implementation so it can be used with different types - * of materials. - * - * @param {Object} [values] - The material values to set. - */ - setValues(values?: Object): void; - /** - * Serializes the material into JSON. - * - * @param {?(Object|string)} meta - An optional value holding meta information about the serialization. - * @return {Object} A JSON object representing the serialized material. - * @see {@link ObjectLoader#parse} - */ - toJSON(meta: (Object | string) | null): Object; - /** - * Returns a new material with copied values from this instance. - * - * @return {Material} A clone of this instance. - */ - clone(): Material; - /** - * Copies the values of the given material to this instance. - * - * @param {Material} source - The material to copy. - * @return {Material} A reference to this instance. - */ - copy(source: Material): Material; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - * - * @fires Material#dispose - */ - dispose(): void; - /** - * Setting this property to `true` indicates the engine the material - * needs to be recompiled. - * - * @type {boolean} - * @default false - * @param {boolean} value - */ - set needsUpdate(value: boolean); -} -import { EventDispatcher } from '../core/EventDispatcher.js'; -import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/Materials.d.ts b/jsdoc-testing/jsdoc/src/materials/Materials.d.ts deleted file mode 100644 index 3f555b856..000000000 --- a/jsdoc-testing/jsdoc/src/materials/Materials.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { ShadowMaterial } from './ShadowMaterial.js'; -import { SpriteMaterial } from './SpriteMaterial.js'; -import { RawShaderMaterial } from './RawShaderMaterial.js'; -import { ShaderMaterial } from './ShaderMaterial.js'; -import { PointsMaterial } from './PointsMaterial.js'; -import { MeshPhysicalMaterial } from './MeshPhysicalMaterial.js'; -import { MeshStandardMaterial } from './MeshStandardMaterial.js'; -import { MeshPhongMaterial } from './MeshPhongMaterial.js'; -import { MeshToonMaterial } from './MeshToonMaterial.js'; -import { MeshNormalMaterial } from './MeshNormalMaterial.js'; -import { MeshLambertMaterial } from './MeshLambertMaterial.js'; -import { MeshDepthMaterial } from './MeshDepthMaterial.js'; -import { MeshDistanceMaterial } from './MeshDistanceMaterial.js'; -import { MeshBasicMaterial } from './MeshBasicMaterial.js'; -import { MeshMatcapMaterial } from './MeshMatcapMaterial.js'; -import { LineDashedMaterial } from './LineDashedMaterial.js'; -import { LineBasicMaterial } from './LineBasicMaterial.js'; -import { Material } from './Material.js'; -export { ShadowMaterial, SpriteMaterial, RawShaderMaterial, ShaderMaterial, PointsMaterial, MeshPhysicalMaterial, MeshStandardMaterial, MeshPhongMaterial, MeshToonMaterial, MeshNormalMaterial, MeshLambertMaterial, MeshDepthMaterial, MeshDistanceMaterial, MeshBasicMaterial, MeshMatcapMaterial, LineDashedMaterial, LineBasicMaterial, Material }; diff --git a/jsdoc-testing/jsdoc/src/materials/MeshBasicMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/MeshBasicMaterial.d.ts deleted file mode 100644 index 83636586f..000000000 --- a/jsdoc-testing/jsdoc/src/materials/MeshBasicMaterial.d.ts +++ /dev/null @@ -1,184 +0,0 @@ -/** - * A material for drawing geometries in a simple shaded (flat or wireframe) way. - * - * This material is not affected by lights. - * - * @augments Material - * @demo scenes/material-browser.html#MeshBasicMaterial - */ -export class MeshBasicMaterial extends Material { - /** - * Constructs a new mesh basic material. - * - * @param {Object} [parameters] - An object with one or more properties - * defining the material's appearance. Any property of the material - * (including any property from inherited materials) can be passed - * in here. Color values can be passed any type of value accepted - * by {@link Color#set}. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshBasicMaterial: boolean; - type: string; - /** - * Color of the material. - * - * @type {Color} - * @default (1,1,1) - */ - color: Color; - /** - * The color map. May optionally include an alpha channel, typically combined - * with {@link Material#transparent} or {@link Material#alphaTest}. The texture map - * color is modulated by the diffuse `color`. - * - * @type {?Texture} - * @default null - */ - map: Texture | null; - /** - * The light map. Requires a second set of UVs. - * - * @type {?Texture} - * @default null - */ - lightMap: Texture | null; - /** - * Intensity of the baked light. - * - * @type {number} - * @default 1 - */ - lightMapIntensity: number; - /** - * The red channel of this texture is used as the ambient occlusion map. - * Requires a second set of UVs. - * - * @type {?Texture} - * @default null - */ - aoMap: Texture | null; - /** - * Intensity of the ambient occlusion effect. Range is `[0,1]`, where `0` - * disables ambient occlusion. Where intensity is `1` and the AO map's - * red channel is also `1`, ambient light is fully occluded on a surface. - * - * @type {number} - * @default 1 - */ - aoMapIntensity: number; - /** - * Specular map used by the material. - * - * @type {?Texture} - * @default null - */ - specularMap: Texture | null; - /** - * The alpha map is a grayscale texture that controls the opacity across the - * surface (black: fully transparent; white: fully opaque). - * - * Only the color of the texture is used, ignoring the alpha channel if one - * exists. For RGB and RGBA textures, the renderer will use the green channel - * when sampling this texture due to the extra bit of precision provided for - * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and - * luminance/alpha textures will also still work as expected. - * - * @type {?Texture} - * @default null - */ - alphaMap: Texture | null; - /** - * The environment map. - * - * @type {?Texture} - * @default null - */ - envMap: Texture | null; - /** - * The rotation of the environment map in radians. - * - * @type {Euler} - * @default (0,0,0) - */ - envMapRotation: Euler; - /** - * How to combine the result of the surface's color with the environment map, if any. - * - * When set to `MixOperation`, the {@link MeshBasicMaterial#reflectivity} is used to - * blend between the two colors. - * - * @type {(MultiplyOperation|MixOperation|AddOperation)} - * @default MultiplyOperation - */ - combine: (number | MixOperation | AddOperation); - /** - * How much the environment map affects the surface. - * The valid range is between `0` (no reflections) and `1` (full reflections). - * - * @type {number} - * @default 1 - */ - reflectivity: number; - /** - * The index of refraction (IOR) of air (approximately 1) divided by the - * index of refraction of the material. It is used with environment mapping - * modes {@link CubeRefractionMapping} and {@link EquirectangularRefractionMapping}. - * The refraction ratio should not exceed `1`. - * - * @type {number} - * @default 0.98 - */ - refractionRatio: number; - /** - * Renders the geometry as a wireframe. - * - * @type {boolean} - * @default false - */ - wireframe: boolean; - /** - * Controls the thickness of the wireframe. - * - * Can only be used with {@link SVGRenderer}. - * - * @type {number} - * @default 1 - */ - wireframeLinewidth: number; - /** - * Defines appearance of wireframe ends. - * - * Can only be used with {@link SVGRenderer}. - * - * @type {('round'|'bevel'|'miter')} - * @default 'round' - */ - wireframeLinecap: ("round" | "bevel" | "miter"); - /** - * Defines appearance of wireframe joints. - * - * Can only be used with {@link SVGRenderer}. - * - * @type {('round'|'bevel'|'miter')} - * @default 'round' - */ - wireframeLinejoin: ("round" | "bevel" | "miter"); - /** - * Whether the material is affected by fog or not. - * - * @type {boolean} - * @default true - */ - fog: boolean; - copy(source: any): this; -} -import { Material } from './Material.js'; -import { Color } from '../math/Color.js'; -import { Euler } from '../math/Euler.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/MeshDepthMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/MeshDepthMaterial.d.ts deleted file mode 100644 index a85883a0e..000000000 --- a/jsdoc-testing/jsdoc/src/materials/MeshDepthMaterial.d.ts +++ /dev/null @@ -1,106 +0,0 @@ -/** - * A material for drawing geometry by depth. Depth is based off of the camera - * near and far plane. White is nearest, black is farthest. - * - * @augments Material - * @demo scenes/material-browser.html#MeshDepthMaterial - */ -export class MeshDepthMaterial extends Material { - /** - * Constructs a new mesh depth material. - * - * @param {Object} [parameters] - An object with one or more properties - * defining the material's appearance. Any property of the material - * (including any property from inherited materials) can be passed - * in here. Color values can be passed any type of value accepted - * by {@link Color#set}. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshDepthMaterial: boolean; - type: string; - /** - * Type for depth packing. - * - * @type {(BasicDepthPacking|RGBADepthPacking|RGBDepthPacking|RGDepthPacking)} - * @default BasicDepthPacking - */ - depthPacking: (number | RGBADepthPacking | RGBDepthPacking | RGDepthPacking); - /** - * The color map. May optionally include an alpha channel, typically combined - * with {@link Material#transparent} or {@link Material#alphaTest}. - * - * @type {?Texture} - * @default null - */ - map: Texture | null; - /** - * The alpha map is a grayscale texture that controls the opacity across the - * surface (black: fully transparent; white: fully opaque). - * - * Only the color of the texture is used, ignoring the alpha channel if one - * exists. For RGB and RGBA textures, the renderer will use the green channel - * when sampling this texture due to the extra bit of precision provided for - * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and - * luminance/alpha textures will also still work as expected. - * - * @type {?Texture} - * @default null - */ - alphaMap: Texture | null; - /** - * The displacement map affects the position of the mesh's vertices. Unlike - * other maps which only affect the light and shade of the material the - * displaced vertices can cast shadows, block other objects, and otherwise - * act as real geometry. The displacement texture is an image where the value - * of each pixel (white being the highest) is mapped against, and - * repositions, the vertices of the mesh. - * - * @type {?Texture} - * @default null - */ - displacementMap: Texture | null; - /** - * How much the displacement map affects the mesh (where black is no - * displacement, and white is maximum displacement). Without a displacement - * map set, this value is not applied. - * - * @type {number} - * @default 0 - */ - displacementScale: number; - /** - * The offset of the displacement map's values on the mesh's vertices. - * The bias is added to the scaled sample of the displacement map. - * Without a displacement map set, this value is not applied. - * - * @type {number} - * @default 0 - */ - displacementBias: number; - /** - * Renders the geometry as a wireframe. - * - * @type {boolean} - * @default false - */ - wireframe: boolean; - /** - * Controls the thickness of the wireframe. - * - * WebGL and WebGPU ignore this property and always render - * 1 pixel wide lines. - * - * @type {number} - * @default 1 - */ - wireframeLinewidth: number; - copy(source: any): this; -} -import { Material } from './Material.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/MeshDistanceMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/MeshDistanceMaterial.d.ts deleted file mode 100644 index bddc4ff5c..000000000 --- a/jsdoc-testing/jsdoc/src/materials/MeshDistanceMaterial.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -/** - * A material used internally for implementing shadow mapping with - * point lights. - * - * Can also be used to customize the shadow casting of an object by assigning - * an instance of `MeshDistanceMaterial` to {@link Object3D#customDistanceMaterial}. - * The following examples demonstrates this approach in order to ensure - * transparent parts of objects do not cast shadows. - * - * @augments Material - */ -export class MeshDistanceMaterial extends Material { - /** - * Constructs a new mesh distance material. - * - * @param {Object} [parameters] - An object with one or more properties - * defining the material's appearance. Any property of the material - * (including any property from inherited materials) can be passed - * in here. Color values can be passed any type of value accepted - * by {@link Color#set}. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshDistanceMaterial: boolean; - type: string; - /** - * The color map. May optionally include an alpha channel, typically combined - * with {@link Material#transparent} or {@link Material#alphaTest}. - * - * @type {?Texture} - * @default null - */ - map: Texture | null; - /** - * The alpha map is a grayscale texture that controls the opacity across the - * surface (black: fully transparent; white: fully opaque). - * - * Only the color of the texture is used, ignoring the alpha channel if one - * exists. For RGB and RGBA textures, the renderer will use the green channel - * when sampling this texture due to the extra bit of precision provided for - * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and - * luminance/alpha textures will also still work as expected. - * - * @type {?Texture} - * @default null - */ - alphaMap: Texture | null; - /** - * The displacement map affects the position of the mesh's vertices. Unlike - * other maps which only affect the light and shade of the material the - * displaced vertices can cast shadows, block other objects, and otherwise - * act as real geometry. The displacement texture is an image where the value - * of each pixel (white being the highest) is mapped against, and - * repositions, the vertices of the mesh. - * - * @type {?Texture} - * @default null - */ - displacementMap: Texture | null; - /** - * How much the displacement map affects the mesh (where black is no - * displacement, and white is maximum displacement). Without a displacement - * map set, this value is not applied. - * - * @type {number} - * @default 0 - */ - displacementScale: number; - /** - * The offset of the displacement map's values on the mesh's vertices. - * The bias is added to the scaled sample of the displacement map. - * Without a displacement map set, this value is not applied. - * - * @type {number} - * @default 0 - */ - displacementBias: number; - copy(source: any): this; -} -import { Material } from './Material.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/MeshLambertMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/MeshLambertMaterial.d.ts deleted file mode 100644 index 1fd0fda22..000000000 --- a/jsdoc-testing/jsdoc/src/materials/MeshLambertMaterial.d.ts +++ /dev/null @@ -1,307 +0,0 @@ -/** - * A material for non-shiny surfaces, without specular highlights. - * - * The material uses a non-physically based [Lambertian](https://en.wikipedia.org/wiki/Lambertian_reflectance) - * model for calculating reflectance. This can simulate some surfaces (such - * as untreated wood or stone) well, but cannot simulate shiny surfaces with - * specular highlights (such as varnished wood). `MeshLambertMaterial` uses per-fragment - * shading. - * - * Due to the simplicity of the reflectance and illumination models, - * performance will be greater when using this material over the - * {@link MeshPhongMaterial}, {@link MeshStandardMaterial} or - * {@link MeshPhysicalMaterial}, at the cost of some graphical accuracy. - * - * @augments Material - * @demo scenes/material-browser.html#MeshLambertMaterial - */ -export class MeshLambertMaterial extends Material { - /** - * Constructs a new mesh lambert material. - * - * @param {Object} [parameters] - An object with one or more properties - * defining the material's appearance. Any property of the material - * (including any property from inherited materials) can be passed - * in here. Color values can be passed any type of value accepted - * by {@link Color#set}. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshLambertMaterial: boolean; - type: string; - /** - * Color of the material. - * - * @type {Color} - * @default (1,1,1) - */ - color: Color; - /** - * The color map. May optionally include an alpha channel, typically combined - * with {@link Material#transparent} or {@link Material#alphaTest}. The texture map - * color is modulated by the diffuse `color`. - * - * @type {?Texture} - * @default null - */ - map: Texture | null; - /** - * The light map. Requires a second set of UVs. - * - * @type {?Texture} - * @default null - */ - lightMap: Texture | null; - /** - * Intensity of the baked light. - * - * @type {number} - * @default 1 - */ - lightMapIntensity: number; - /** - * The red channel of this texture is used as the ambient occlusion map. - * Requires a second set of UVs. - * - * @type {?Texture} - * @default null - */ - aoMap: Texture | null; - /** - * Intensity of the ambient occlusion effect. Range is `[0,1]`, where `0` - * disables ambient occlusion. Where intensity is `1` and the AO map's - * red channel is also `1`, ambient light is fully occluded on a surface. - * - * @type {number} - * @default 1 - */ - aoMapIntensity: number; - /** - * Emissive (light) color of the material, essentially a solid color - * unaffected by other lighting. - * - * @type {Color} - * @default (0,0,0) - */ - emissive: Color; - /** - * Intensity of the emissive light. Modulates the emissive color. - * - * @type {number} - * @default 1 - */ - emissiveIntensity: number; - /** - * Set emissive (glow) map. The emissive map color is modulated by the - * emissive color and the emissive intensity. If you have an emissive map, - * be sure to set the emissive color to something other than black. - * - * @type {?Texture} - * @default null - */ - emissiveMap: Texture | null; - /** - * The texture to create a bump map. The black and white values map to the - * perceived depth in relation to the lights. Bump doesn't actually affect - * the geometry of the object, only the lighting. If a normal map is defined - * this will be ignored. - * - * @type {?Texture} - * @default null - */ - bumpMap: Texture | null; - /** - * How much the bump map affects the material. Typical range is `[0,1]`. - * - * @type {number} - * @default 1 - */ - bumpScale: number; - /** - * The texture to create a normal map. The RGB values affect the surface - * normal for each pixel fragment and change the way the color is lit. Normal - * maps do not change the actual shape of the surface, only the lighting. In - * case the material has a normal map authored using the left handed - * convention, the `y` component of `normalScale` should be negated to compensate - * for the different handedness. - * - * @type {?Texture} - * @default null - */ - normalMap: Texture | null; - /** - * The type of normal map. - * - * @type {(TangentSpaceNormalMap|ObjectSpaceNormalMap)} - * @default TangentSpaceNormalMap - */ - normalMapType: (number | ObjectSpaceNormalMap); - /** - * How much the normal map affects the material. Typical value range is `[0,1]`. - * - * @type {Vector2} - * @default (1,1) - */ - normalScale: Vector2; - /** - * The displacement map affects the position of the mesh's vertices. Unlike - * other maps which only affect the light and shade of the material the - * displaced vertices can cast shadows, block other objects, and otherwise - * act as real geometry. The displacement texture is an image where the value - * of each pixel (white being the highest) is mapped against, and - * repositions, the vertices of the mesh. For best results, pair a - * displacement map with a matching normal map, since the renderer can - * not recompute surface normals from the displaced vertices. - * - * @type {?Texture} - * @default null - */ - displacementMap: Texture | null; - /** - * How much the displacement map affects the mesh (where black is no - * displacement, and white is maximum displacement). Without a displacement - * map set, this value is not applied. - * - * @type {number} - * @default 0 - */ - displacementScale: number; - /** - * The offset of the displacement map's values on the mesh's vertices. - * The bias is added to the scaled sample of the displacement map. - * Without a displacement map set, this value is not applied. - * - * @type {number} - * @default 0 - */ - displacementBias: number; - /** - * Specular map used by the material. - * - * @type {?Texture} - * @default null - */ - specularMap: Texture | null; - /** - * The alpha map is a grayscale texture that controls the opacity across the - * surface (black: fully transparent; white: fully opaque). - * - * Only the color of the texture is used, ignoring the alpha channel if one - * exists. For RGB and RGBA textures, the renderer will use the green channel - * when sampling this texture due to the extra bit of precision provided for - * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and - * luminance/alpha textures will also still work as expected. - * - * @type {?Texture} - * @default null - */ - alphaMap: Texture | null; - /** - * The environment map. - * - * @type {?Texture} - * @default null - */ - envMap: Texture | null; - /** - * The rotation of the environment map in radians. - * - * @type {Euler} - * @default (0,0,0) - */ - envMapRotation: Euler; - /** - * How to combine the result of the surface's color with the environment map, if any. - * - * When set to `MixOperation`, the {@link MeshBasicMaterial#reflectivity} is used to - * blend between the two colors. - * - * @type {(MultiplyOperation|MixOperation|AddOperation)} - * @default MultiplyOperation - */ - combine: (number | MixOperation | AddOperation); - /** - * How much the environment map affects the surface. - * The valid range is between `0` (no reflections) and `1` (full reflections). - * - * @type {number} - * @default 1 - */ - reflectivity: number; - /** - * Scales the effect of the environment map by multiplying its color. - * - * @type {number} - * @default 1 - */ - envMapIntensity: number; - /** - * The index of refraction (IOR) of air (approximately 1) divided by the - * index of refraction of the material. It is used with environment mapping - * modes {@link CubeRefractionMapping} and {@link EquirectangularRefractionMapping}. - * The refraction ratio should not exceed `1`. - * - * @type {number} - * @default 0.98 - */ - refractionRatio: number; - /** - * Renders the geometry as a wireframe. - * - * @type {boolean} - * @default false - */ - wireframe: boolean; - /** - * Controls the thickness of the wireframe. - * - * Can only be used with {@link SVGRenderer}. - * - * @type {number} - * @default 1 - */ - wireframeLinewidth: number; - /** - * Defines appearance of wireframe ends. - * - * Can only be used with {@link SVGRenderer}. - * - * @type {('round'|'bevel'|'miter')} - * @default 'round' - */ - wireframeLinecap: ("round" | "bevel" | "miter"); - /** - * Defines appearance of wireframe joints. - * - * Can only be used with {@link SVGRenderer}. - * - * @type {('round'|'bevel'|'miter')} - * @default 'round' - */ - wireframeLinejoin: ("round" | "bevel" | "miter"); - /** - * Whether the material is rendered with flat shading or not. - * - * @type {boolean} - * @default false - */ - flatShading: boolean; - /** - * Whether the material is affected by fog or not. - * - * @type {boolean} - * @default true - */ - fog: boolean; - copy(source: any): this; -} -import { Material } from './Material.js'; -import { Color } from '../math/Color.js'; -import { Vector2 } from '../math/Vector2.js'; -import { Euler } from '../math/Euler.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/MeshMatcapMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/MeshMatcapMaterial.d.ts deleted file mode 100644 index 8597043ad..000000000 --- a/jsdoc-testing/jsdoc/src/materials/MeshMatcapMaterial.d.ts +++ /dev/null @@ -1,182 +0,0 @@ -/** - * This material is defined by a MatCap (or Lit Sphere) texture, which encodes the - * material color and shading. - * - * `MeshMatcapMaterial` does not respond to lights since the matcap image file encodes - * baked lighting. It will cast a shadow onto an object that receives shadows - * (and shadow clipping works), but it will not self-shadow or receive - * shadows. - * - * @augments Material - * @demo scenes/material-browser.html#MeshMatcapMaterial - */ -export class MeshMatcapMaterial extends Material { - /** - * Constructs a new mesh matcap material. - * - * @param {Object} [parameters] - An object with one or more properties - * defining the material's appearance. Any property of the material - * (including any property from inherited materials) can be passed - * in here. Color values can be passed any type of value accepted - * by {@link Color#set}. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshMatcapMaterial: boolean; - defines: { - MATCAP: string; - }; - type: string; - /** - * Color of the material. - * - * @type {Color} - * @default (1,1,1) - */ - color: Color; - /** - * The matcap map. - * - * @type {?Texture} - * @default null - */ - matcap: Texture | null; - /** - * The color map. May optionally include an alpha channel, typically combined - * with {@link Material#transparent} or {@link Material#alphaTest}. The texture map - * color is modulated by the diffuse `color`. - * - * @type {?Texture} - * @default null - */ - map: Texture | null; - /** - * The texture to create a bump map. The black and white values map to the - * perceived depth in relation to the lights. Bump doesn't actually affect - * the geometry of the object, only the lighting. If a normal map is defined - * this will be ignored. - * - * @type {?Texture} - * @default null - */ - bumpMap: Texture | null; - /** - * How much the bump map affects the material. Typical range is `[0,1]`. - * - * @type {number} - * @default 1 - */ - bumpScale: number; - /** - * The texture to create a normal map. The RGB values affect the surface - * normal for each pixel fragment and change the way the color is lit. Normal - * maps do not change the actual shape of the surface, only the lighting. In - * case the material has a normal map authored using the left handed - * convention, the `y` component of `normalScale` should be negated to compensate - * for the different handedness. - * - * @type {?Texture} - * @default null - */ - normalMap: Texture | null; - /** - * The type of normal map. - * - * @type {(TangentSpaceNormalMap|ObjectSpaceNormalMap)} - * @default TangentSpaceNormalMap - */ - normalMapType: (number | ObjectSpaceNormalMap); - /** - * How much the normal map affects the material. Typical value range is `[0,1]`. - * - * @type {Vector2} - * @default (1,1) - */ - normalScale: Vector2; - /** - * The displacement map affects the position of the mesh's vertices. Unlike - * other maps which only affect the light and shade of the material the - * displaced vertices can cast shadows, block other objects, and otherwise - * act as real geometry. The displacement texture is an image where the value - * of each pixel (white being the highest) is mapped against, and - * repositions, the vertices of the mesh. For best results, pair a - * displacement map with a matching normal map, since the renderer can - * not recompute surface normals from the displaced vertices. - * - * @type {?Texture} - * @default null - */ - displacementMap: Texture | null; - /** - * How much the displacement map affects the mesh (where black is no - * displacement, and white is maximum displacement). Without a displacement - * map set, this value is not applied. - * - * @type {number} - * @default 0 - */ - displacementScale: number; - /** - * The offset of the displacement map's values on the mesh's vertices. - * The bias is added to the scaled sample of the displacement map. - * Without a displacement map set, this value is not applied. - * - * @type {number} - * @default 0 - */ - displacementBias: number; - /** - * The alpha map is a grayscale texture that controls the opacity across the - * surface (black: fully transparent; white: fully opaque). - * - * Only the color of the texture is used, ignoring the alpha channel if one - * exists. For RGB and RGBA textures, the renderer will use the green channel - * when sampling this texture due to the extra bit of precision provided for - * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and - * luminance/alpha textures will also still work as expected. - * - * @type {?Texture} - * @default null - */ - alphaMap: Texture | null; - /** - * Renders the geometry as a wireframe. - * - * @type {boolean} - * @default false - */ - wireframe: boolean; - /** - * Controls the thickness of the wireframe. - * - * Can only be used with {@link SVGRenderer}. - * - * @type {number} - * @default 1 - */ - wireframeLinewidth: number; - /** - * Whether the material is rendered with flat shading or not. - * - * @type {boolean} - * @default false - */ - flatShading: boolean; - /** - * Whether the material is affected by fog or not. - * - * @type {boolean} - * @default true - */ - fog: boolean; - copy(source: any): this; -} -import { Material } from './Material.js'; -import { Color } from '../math/Color.js'; -import { Vector2 } from '../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/MeshNormalMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/MeshNormalMaterial.d.ts deleted file mode 100644 index 50a3a855d..000000000 --- a/jsdoc-testing/jsdoc/src/materials/MeshNormalMaterial.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -/** - * A material that maps the normal vectors to RGB colors. - * - * @augments Material - * @demo scenes/material-browser.html#MeshNormalMaterial - */ -export class MeshNormalMaterial extends Material { - /** - * Constructs a new mesh normal material. - * - * @param {Object} [parameters] - An object with one or more properties - * defining the material's appearance. Any property of the material - * (including any property from inherited materials) can be passed - * in here. Color values can be passed any type of value accepted - * by {@link Color#set}. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshNormalMaterial: boolean; - type: string; - /** - * The texture to create a bump map. The black and white values map to the - * perceived depth in relation to the lights. Bump doesn't actually affect - * the geometry of the object, only the lighting. If a normal map is defined - * this will be ignored. - * - * @type {?Texture} - * @default null - */ - bumpMap: Texture | null; - /** - * How much the bump map affects the material. Typical range is `[0,1]`. - * - * @type {number} - * @default 1 - */ - bumpScale: number; - /** - * The texture to create a normal map. The RGB values affect the surface - * normal for each pixel fragment and change the way the color is lit. Normal - * maps do not change the actual shape of the surface, only the lighting. In - * case the material has a normal map authored using the left handed - * convention, the `y` component of `normalScale` should be negated to compensate - * for the different handedness. - * - * @type {?Texture} - * @default null - */ - normalMap: Texture | null; - /** - * The type of normal map. - * - * @type {(TangentSpaceNormalMap|ObjectSpaceNormalMap)} - * @default TangentSpaceNormalMap - */ - normalMapType: (number | ObjectSpaceNormalMap); - /** - * How much the normal map affects the material. Typical value range is `[0,1]`. - * - * @type {Vector2} - * @default (1,1) - */ - normalScale: Vector2; - /** - * The displacement map affects the position of the mesh's vertices. Unlike - * other maps which only affect the light and shade of the material the - * displaced vertices can cast shadows, block other objects, and otherwise - * act as real geometry. The displacement texture is an image where the value - * of each pixel (white being the highest) is mapped against, and - * repositions, the vertices of the mesh. For best results, pair a - * displacement map with a matching normal map, since the renderer can - * not recompute surface normals from the displaced vertices. - * - * @type {?Texture} - * @default null - */ - displacementMap: Texture | null; - /** - * How much the displacement map affects the mesh (where black is no - * displacement, and white is maximum displacement). Without a displacement - * map set, this value is not applied. - * - * @type {number} - * @default 0 - */ - displacementScale: number; - /** - * The offset of the displacement map's values on the mesh's vertices. - * The bias is added to the scaled sample of the displacement map. - * Without a displacement map set, this value is not applied. - * - * @type {number} - * @default 0 - */ - displacementBias: number; - /** - * Renders the geometry as a wireframe. - * - * @type {boolean} - * @default false - */ - wireframe: boolean; - /** - * Controls the thickness of the wireframe. - * - * WebGL and WebGPU ignore this property and always render - * 1 pixel wide lines. - * - * @type {number} - * @default 1 - */ - wireframeLinewidth: number; - /** - * Whether the material is rendered with flat shading or not. - * - * @type {boolean} - * @default false - */ - flatShading: boolean; - copy(source: any): this; -} -import { Material } from './Material.js'; -import { Vector2 } from '../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/MeshPhongMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/MeshPhongMaterial.d.ts deleted file mode 100644 index 187fcc1ec..000000000 --- a/jsdoc-testing/jsdoc/src/materials/MeshPhongMaterial.d.ts +++ /dev/null @@ -1,322 +0,0 @@ -/** - * A material for shiny surfaces with specular highlights. - * - * The material uses a non-physically based [Blinn-Phong](https://en.wikipedia.org/wiki/Blinn-Phong_shading_model) - * model for calculating reflectance. Unlike the Lambertian model used in the - * {@link MeshLambertMaterial} this can simulate shiny surfaces with specular - * highlights (such as varnished wood). `MeshPhongMaterial` uses per-fragment shading. - * - * Performance will generally be greater when using this material over the - * {@link MeshStandardMaterial} or {@link MeshPhysicalMaterial}, at the cost of - * some graphical accuracy. - * - * @augments Material - * @demo scenes/material-browser.html#MeshPhongMaterial - */ -export class MeshPhongMaterial extends Material { - /** - * Constructs a new mesh phong material. - * - * @param {Object} [parameters] - An object with one or more properties - * defining the material's appearance. Any property of the material - * (including any property from inherited materials) can be passed - * in here. Color values can be passed any type of value accepted - * by {@link Color#set}. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshPhongMaterial: boolean; - type: string; - /** - * Color of the material. - * - * @type {Color} - * @default (1,1,1) - */ - color: Color; - /** - * Specular color of the material. The default color is set to `0x111111` (very dark grey) - * - * This defines how shiny the material is and the color of its shine. - * - * @type {Color} - */ - specular: Color; - /** - * How shiny the specular highlight is; a higher value gives a sharper highlight. - * - * @type {number} - * @default 30 - */ - shininess: number; - /** - * The color map. May optionally include an alpha channel, typically combined - * with {@link Material#transparent} or {@link Material#alphaTest}. The texture map - * color is modulated by the diffuse `color`. - * - * @type {?Texture} - * @default null - */ - map: Texture | null; - /** - * The light map. Requires a second set of UVs. - * - * @type {?Texture} - * @default null - */ - lightMap: Texture | null; - /** - * Intensity of the baked light. - * - * @type {number} - * @default 1 - */ - lightMapIntensity: number; - /** - * The red channel of this texture is used as the ambient occlusion map. - * Requires a second set of UVs. - * - * @type {?Texture} - * @default null - */ - aoMap: Texture | null; - /** - * Intensity of the ambient occlusion effect. Range is `[0,1]`, where `0` - * disables ambient occlusion. Where intensity is `1` and the AO map's - * red channel is also `1`, ambient light is fully occluded on a surface. - * - * @type {number} - * @default 1 - */ - aoMapIntensity: number; - /** - * Emissive (light) color of the material, essentially a solid color - * unaffected by other lighting. - * - * @type {Color} - * @default (0,0,0) - */ - emissive: Color; - /** - * Intensity of the emissive light. Modulates the emissive color. - * - * @type {number} - * @default 1 - */ - emissiveIntensity: number; - /** - * Set emissive (glow) map. The emissive map color is modulated by the - * emissive color and the emissive intensity. If you have an emissive map, - * be sure to set the emissive color to something other than black. - * - * @type {?Texture} - * @default null - */ - emissiveMap: Texture | null; - /** - * The texture to create a bump map. The black and white values map to the - * perceived depth in relation to the lights. Bump doesn't actually affect - * the geometry of the object, only the lighting. If a normal map is defined - * this will be ignored. - * - * @type {?Texture} - * @default null - */ - bumpMap: Texture | null; - /** - * How much the bump map affects the material. Typical range is `[0,1]`. - * - * @type {number} - * @default 1 - */ - bumpScale: number; - /** - * The texture to create a normal map. The RGB values affect the surface - * normal for each pixel fragment and change the way the color is lit. Normal - * maps do not change the actual shape of the surface, only the lighting. In - * case the material has a normal map authored using the left handed - * convention, the `y` component of `normalScale` should be negated to compensate - * for the different handedness. - * - * @type {?Texture} - * @default null - */ - normalMap: Texture | null; - /** - * The type of normal map. - * - * @type {(TangentSpaceNormalMap|ObjectSpaceNormalMap)} - * @default TangentSpaceNormalMap - */ - normalMapType: (number | ObjectSpaceNormalMap); - /** - * How much the normal map affects the material. Typical value range is `[0,1]`. - * - * @type {Vector2} - * @default (1,1) - */ - normalScale: Vector2; - /** - * The displacement map affects the position of the mesh's vertices. Unlike - * other maps which only affect the light and shade of the material the - * displaced vertices can cast shadows, block other objects, and otherwise - * act as real geometry. The displacement texture is an image where the value - * of each pixel (white being the highest) is mapped against, and - * repositions, the vertices of the mesh. For best results, pair a - * displacement map with a matching normal map, since the renderer can - * not recompute surface normals from the displaced vertices. - * - * @type {?Texture} - * @default null - */ - displacementMap: Texture | null; - /** - * How much the displacement map affects the mesh (where black is no - * displacement, and white is maximum displacement). Without a displacement - * map set, this value is not applied. - * - * @type {number} - * @default 0 - */ - displacementScale: number; - /** - * The offset of the displacement map's values on the mesh's vertices. - * The bias is added to the scaled sample of the displacement map. - * Without a displacement map set, this value is not applied. - * - * @type {number} - * @default 0 - */ - displacementBias: number; - /** - * The specular map value affects both how much the specular surface - * highlight contributes and how much of the environment map affects the - * surface. - * - * @type {?Texture} - * @default null - */ - specularMap: Texture | null; - /** - * The alpha map is a grayscale texture that controls the opacity across the - * surface (black: fully transparent; white: fully opaque). - * - * Only the color of the texture is used, ignoring the alpha channel if one - * exists. For RGB and RGBA textures, the renderer will use the green channel - * when sampling this texture due to the extra bit of precision provided for - * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and - * luminance/alpha textures will also still work as expected. - * - * @type {?Texture} - * @default null - */ - alphaMap: Texture | null; - /** - * The environment map. - * - * @type {?Texture} - * @default null - */ - envMap: Texture | null; - /** - * The rotation of the environment map in radians. - * - * @type {Euler} - * @default (0,0,0) - */ - envMapRotation: Euler; - /** - * How to combine the result of the surface's color with the environment map, if any. - * - * When set to `MixOperation`, the {@link MeshBasicMaterial#reflectivity} is used to - * blend between the two colors. - * - * @type {(MultiplyOperation|MixOperation|AddOperation)} - * @default MultiplyOperation - */ - combine: (number | MixOperation | AddOperation); - /** - * How much the environment map affects the surface. - * The valid range is between `0` (no reflections) and `1` (full reflections). - * - * @type {number} - * @default 1 - */ - reflectivity: number; - /** - * Scales the effect of the environment map by multiplying its color. - * - * @type {number} - * @default 1 - */ - envMapIntensity: number; - /** - * The index of refraction (IOR) of air (approximately 1) divided by the - * index of refraction of the material. It is used with environment mapping - * modes {@link CubeRefractionMapping} and {@link EquirectangularRefractionMapping}. - * The refraction ratio should not exceed `1`. - * - * @type {number} - * @default 0.98 - */ - refractionRatio: number; - /** - * Renders the geometry as a wireframe. - * - * @type {boolean} - * @default false - */ - wireframe: boolean; - /** - * Controls the thickness of the wireframe. - * - * Can only be used with {@link SVGRenderer}. - * - * @type {number} - * @default 1 - */ - wireframeLinewidth: number; - /** - * Defines appearance of wireframe ends. - * - * Can only be used with {@link SVGRenderer}. - * - * @type {('round'|'bevel'|'miter')} - * @default 'round' - */ - wireframeLinecap: ("round" | "bevel" | "miter"); - /** - * Defines appearance of wireframe joints. - * - * Can only be used with {@link SVGRenderer}. - * - * @type {('round'|'bevel'|'miter')} - * @default 'round' - */ - wireframeLinejoin: ("round" | "bevel" | "miter"); - /** - * Whether the material is rendered with flat shading or not. - * - * @type {boolean} - * @default false - */ - flatShading: boolean; - /** - * Whether the material is affected by fog or not. - * - * @type {boolean} - * @default true - */ - fog: boolean; - copy(source: any): this; -} -import { Material } from './Material.js'; -import { Color } from '../math/Color.js'; -import { Vector2 } from '../math/Vector2.js'; -import { Euler } from '../math/Euler.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/MeshPhysicalMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/MeshPhysicalMaterial.d.ts deleted file mode 100644 index 3dd61375e..000000000 --- a/jsdoc-testing/jsdoc/src/materials/MeshPhysicalMaterial.d.ts +++ /dev/null @@ -1,310 +0,0 @@ -/** - * An extension of the {@link MeshStandardMaterial}, providing more advanced - * physically-based rendering properties: - * - * - Anisotropy: Ability to represent the anisotropic property of materials - * as observable with brushed metals. - * - Clearcoat: Some materials — like car paints, carbon fiber, and wet surfaces — require - * a clear, reflective layer on top of another layer that may be irregular or rough. - * Clearcoat approximates this effect, without the need for a separate transparent surface. - * - Iridescence: Allows to render the effect where hue varies depending on the viewing - * angle and illumination angle. This can be seen on soap bubbles, oil films, or on the - * wings of many insects. - * - Physically-based transparency: One limitation of {@link Material#opacity} is that highly - * transparent materials are less reflective. Physically-based transmission provides a more - * realistic option for thin, transparent surfaces like glass. - * - Advanced reflectivity: More flexible reflectivity for non-metallic materials. - * - Sheen: Can be used for representing cloth and fabric materials. - * - * As a result of these complex shading features, `MeshPhysicalMaterial` has a - * higher performance cost, per pixel, than other three.js materials. Most - * effects are disabled by default, and add cost as they are enabled. For - * best results, always specify an environment map when using this material. - * - * @augments MeshStandardMaterial - * @demo scenes/material-browser.html#MeshPhysicalMaterial - */ -export class MeshPhysicalMaterial extends MeshStandardMaterial { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshPhysicalMaterial: boolean; - defines: { - STANDARD: string; - PHYSICAL: string; - }; - /** - * The rotation of the anisotropy in tangent, bitangent space, measured in radians - * counter-clockwise from the tangent. When `anisotropyMap` is present, this - * property provides additional rotation to the vectors in the texture. - * - * @type {number} - * @default 1 - */ - anisotropyRotation: number; - /** - * Red and green channels represent the anisotropy direction in `[-1, 1]` tangent, - * bitangent space, to be rotated by `anisotropyRotation`. The blue channel - * contains strength as `[0, 1]` to be multiplied by `anisotropy`. - * - * @type {?Texture} - * @default null - */ - anisotropyMap: Texture | null; - /** - * The red channel of this texture is multiplied against `clearcoat`, - * for per-pixel control over a coating's intensity. - * - * @type {?Texture} - * @default null - */ - clearcoatMap: Texture | null; - /** - * Roughness of the clear coat layer, from `0.0` to `1.0`. - * - * @type {number} - * @default 0 - */ - clearcoatRoughness: number; - /** - * The green channel of this texture is multiplied against - * `clearcoatRoughness`, for per-pixel control over a coating's roughness. - * - * @type {?Texture} - * @default null - */ - clearcoatRoughnessMap: Texture | null; - /** - * How much `clearcoatNormalMap` affects the clear coat layer, from - * `(0,0)` to `(1,1)`. - * - * @type {Vector2} - * @default (1,1) - */ - clearcoatNormalScale: Vector2; - /** - * Can be used to enable independent normals for the clear coat layer. - * - * @type {?Texture} - * @default null - */ - clearcoatNormalMap: Texture | null; - /** - * Index-of-refraction for non-metallic materials, from `1.0` to `2.333`. - * - * @type {number} - * @default 1.5 - */ - ior: number; - /** - * The red channel of this texture is multiplied against `iridescence`, for per-pixel - * control over iridescence. - * - * @type {?Texture} - * @default null - */ - iridescenceMap: Texture | null; - /** - * Strength of the iridescence RGB color shift effect, represented by an index-of-refraction. - * Between `1.0` to `2.333`. - * - * @type {number} - * @default 1.3 - */ - iridescenceIOR: number; - /** - *Array of exactly 2 elements, specifying minimum and maximum thickness of the iridescence layer. - Thickness of iridescence layer has an equivalent effect of the one `thickness` has on `ior`. - * - * @type {Array} - * @default [100,400] - */ - iridescenceThicknessRange: Array; - /** - * A texture that defines the thickness of the iridescence layer, stored in the green channel. - * Minimum and maximum values of thickness are defined by `iridescenceThicknessRange` array: - * - `0.0` in the green channel will result in thickness equal to first element of the array. - * - `1.0` in the green channel will result in thickness equal to second element of the array. - * - Values in-between will linearly interpolate between the elements of the array. - * - * @type {?Texture} - * @default null - */ - iridescenceThicknessMap: Texture | null; - /** - * The sheen tint. - * - * @type {Color} - * @default (0,0,0) - */ - sheenColor: Color; - /** - * The RGB channels of this texture are multiplied against `sheenColor`, for per-pixel control - * over sheen tint. - * - * @type {?Texture} - * @default null - */ - sheenColorMap: Texture | null; - /** - * Roughness of the sheen layer, from `0.0` to `1.0`. - * - * @type {number} - * @default 1 - */ - sheenRoughness: number; - /** - * The alpha channel of this texture is multiplied against `sheenRoughness`, for per-pixel control - * over sheen roughness. - * - * @type {?Texture} - * @default null - */ - sheenRoughnessMap: Texture | null; - /** - * The red channel of this texture is multiplied against `transmission`, for per-pixel control over - * optical transparency. - * - * @type {?Texture} - * @default null - */ - transmissionMap: Texture | null; - /** - * The thickness of the volume beneath the surface. The value is given in the - * coordinate space of the mesh. If the value is `0` the material is - * thin-walled. Otherwise the material is a volume boundary. - * - * @type {number} - * @default 0 - */ - thickness: number; - /** - * A texture that defines the thickness, stored in the green channel. This will - * be multiplied by `thickness`. - * - * @type {?Texture} - * @default null - */ - thicknessMap: Texture | null; - /** - * Density of the medium given as the average distance that light travels in - * the medium before interacting with a particle. The value is given in world - * space units, and must be greater than zero. - * - * @type {number} - * @default Infinity - */ - attenuationDistance: number; - /** - * The color that white light turns into due to absorption when reaching the - * attenuation distance. - * - * @type {Color} - * @default (1,1,1) - */ - attenuationColor: Color; - /** - * A float that scales the amount of specular reflection for non-metals only. - * When set to zero, the model is effectively Lambertian. From `0.0` to `1.0`. - * - * @type {number} - * @default 1 - */ - specularIntensity: number; - /** - * The alpha channel of this texture is multiplied against `specularIntensity`, - * for per-pixel control over specular intensity. - * - * @type {?Texture} - * @default null - */ - specularIntensityMap: Texture | null; - /** - * Tints the specular reflection at normal incidence for non-metals only. - * - * @type {Color} - * @default (1,1,1) - */ - specularColor: Color; - /** - * The RGB channels of this texture are multiplied against `specularColor`, - * for per-pixel control over specular color. - * - * @type {?Texture} - * @default null - */ - specularColorMap: Texture | null; - _anisotropy: number; - _clearcoat: number; - _dispersion: number; - _iridescence: number; - _sheen: number; - _transmission: number; - set anisotropy(value: number); - /** - * The anisotropy strength, from `0.0` to `1.0`. - * - * @type {number} - * @default 0 - */ - get anisotropy(): number; - set clearcoat(value: number); - /** - * Represents the intensity of the clear coat layer, from `0.0` to `1.0`. Use - * clear coat related properties to enable multilayer materials that have a - * thin translucent layer over the base layer. - * - * @type {number} - * @default 0 - */ - get clearcoat(): number; - set iridescence(value: number); - /** - * The intensity of the iridescence layer, simulating RGB color shift based on the angle between - * the surface and the viewer, from `0.0` to `1.0`. - * - * @type {number} - * @default 0 - */ - get iridescence(): number; - set dispersion(value: number); - /** - * Defines the strength of the angular separation of colors (chromatic aberration) transmitting - * through a relatively clear volume. Any value zero or larger is valid, the typical range of - * realistic values is `[0, 1]`. This property can be only be used with transmissive objects. - * - * @type {number} - * @default 0 - */ - get dispersion(): number; - set sheen(value: number); - /** - * The intensity of the sheen layer, from `0.0` to `1.0`. - * - * @type {number} - * @default 0 - */ - get sheen(): number; - set transmission(value: number); - /** - * Degree of transmission (or optical transparency), from `0.0` to `1.0`. - * - * Thin, transparent or semitransparent, plastic or glass materials remain - * largely reflective even if they are fully transmissive. The transmission - * property can be used to model these materials. - * - * When transmission is non-zero, `opacity` should be set to `1`. - * - * @type {number} - * @default 0 - */ - get transmission(): number; - copy(source: any): this; -} -import { MeshStandardMaterial } from './MeshStandardMaterial.js'; -import { Vector2 } from '../math/Vector2.js'; -import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/MeshStandardMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/MeshStandardMaterial.d.ts deleted file mode 100644 index 087811b7f..000000000 --- a/jsdoc-testing/jsdoc/src/materials/MeshStandardMaterial.d.ts +++ /dev/null @@ -1,328 +0,0 @@ -/** - * A standard physically based material, using Metallic-Roughness workflow. - * - * Physically based rendering (PBR) has recently become the standard in many - * 3D applications, such as [Unity](https://blogs.unity3d.com/2014/10/29/physically-based-shading-in-unity-5-a-primer/), - * [Unreal](https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/PhysicallyBased/) and - * [3D Studio Max](http://area.autodesk.com/blogs/the-3ds-max-blog/what039s-new-for-rendering-in-3ds-max-2017). - * - * This approach differs from older approaches in that instead of using - * approximations for the way in which light interacts with a surface, a - * physically correct model is used. The idea is that, instead of tweaking - * materials to look good under specific lighting, a material can be created - * that will react 'correctly' under all lighting scenarios. - * - * In practice this gives a more accurate and realistic looking result than - * the {@link MeshLambertMaterial} or {@link MeshPhongMaterial}, at the cost of - * being somewhat more computationally expensive. `MeshStandardMaterial` uses per-fragment - * shading. - * - * Note that for best results you should always specify an environment map when using this material. - * - * For a non-technical introduction to the concept of PBR and how to set up a - * PBR material, check out these articles by the people at [marmoset](https://www.marmoset.co): - * - * - [Basic Theory of Physically Based Rendering](https://www.marmoset.co/posts/basic-theory-of-physically-based-rendering/) - * - [Physically Based Rendering and You Can Too](https://www.marmoset.co/posts/physically-based-rendering-and-you-can-too/) - * - * Technical details of the approach used in three.js (and most other PBR systems) can be found is this - * [paper from Disney](https://media.disneyanimation.com/uploads/production/publication_asset/48/asset/s2012_pbs_disney_brdf_notes_v3.pdf) - * (pdf), by Brent Burley. - * - * @augments Material - * @demo scenes/material-browser.html#MeshStandardMaterial - */ -export class MeshStandardMaterial extends Material { - /** - * Constructs a new mesh standard material. - * - * @param {Object} [parameters] - An object with one or more properties - * defining the material's appearance. Any property of the material - * (including any property from inherited materials) can be passed - * in here. Color values can be passed any type of value accepted - * by {@link Color#set}. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshStandardMaterial: boolean; - type: string; - defines: { - STANDARD: string; - }; - /** - * Color of the material. - * - * @type {Color} - * @default (1,1,1) - */ - color: Color; - /** - * How rough the material appears. `0.0` means a smooth mirror reflection, `1.0` - * means fully diffuse. If `roughnessMap` is also provided, - * both values are multiplied. - * - * @type {number} - * @default 1 - */ - roughness: number; - /** - * How much the material is like a metal. Non-metallic materials such as wood - * or stone use `0.0`, metallic use `1.0`, with nothing (usually) in between. - * A value between `0.0` and `1.0` could be used for a rusty metal look. - * If `metalnessMap` is also provided, both values are multiplied. - * - * @type {number} - * @default 0 - */ - metalness: number; - /** - * The color map. May optionally include an alpha channel, typically combined - * with {@link Material#transparent} or {@link Material#alphaTest}. The texture map - * color is modulated by the diffuse `color`. - * - * @type {?Texture} - * @default null - */ - map: Texture | null; - /** - * The light map. Requires a second set of UVs. - * - * @type {?Texture} - * @default null - */ - lightMap: Texture | null; - /** - * Intensity of the baked light. - * - * @type {number} - * @default 1 - */ - lightMapIntensity: number; - /** - * The red channel of this texture is used as the ambient occlusion map. - * Requires a second set of UVs. - * - * @type {?Texture} - * @default null - */ - aoMap: Texture | null; - /** - * Intensity of the ambient occlusion effect. Range is `[0,1]`, where `0` - * disables ambient occlusion. Where intensity is `1` and the AO map's - * red channel is also `1`, ambient light is fully occluded on a surface. - * - * @type {number} - * @default 1 - */ - aoMapIntensity: number; - /** - * Emissive (light) color of the material, essentially a solid color - * unaffected by other lighting. - * - * @type {Color} - * @default (0,0,0) - */ - emissive: Color; - /** - * Intensity of the emissive light. Modulates the emissive color. - * - * @type {number} - * @default 1 - */ - emissiveIntensity: number; - /** - * Set emissive (glow) map. The emissive map color is modulated by the - * emissive color and the emissive intensity. If you have an emissive map, - * be sure to set the emissive color to something other than black. - * - * @type {?Texture} - * @default null - */ - emissiveMap: Texture | null; - /** - * The texture to create a bump map. The black and white values map to the - * perceived depth in relation to the lights. Bump doesn't actually affect - * the geometry of the object, only the lighting. If a normal map is defined - * this will be ignored. - * - * @type {?Texture} - * @default null - */ - bumpMap: Texture | null; - /** - * How much the bump map affects the material. Typical range is `[0,1]`. - * - * @type {number} - * @default 1 - */ - bumpScale: number; - /** - * The texture to create a normal map. The RGB values affect the surface - * normal for each pixel fragment and change the way the color is lit. Normal - * maps do not change the actual shape of the surface, only the lighting. In - * case the material has a normal map authored using the left handed - * convention, the `y` component of `normalScale` should be negated to compensate - * for the different handedness. - * - * @type {?Texture} - * @default null - */ - normalMap: Texture | null; - /** - * The type of normal map. - * - * @type {(TangentSpaceNormalMap|ObjectSpaceNormalMap)} - * @default TangentSpaceNormalMap - */ - normalMapType: (number | ObjectSpaceNormalMap); - /** - * How much the normal map affects the material. Typical value range is `[0,1]`. - * - * @type {Vector2} - * @default (1,1) - */ - normalScale: Vector2; - /** - * The displacement map affects the position of the mesh's vertices. Unlike - * other maps which only affect the light and shade of the material the - * displaced vertices can cast shadows, block other objects, and otherwise - * act as real geometry. The displacement texture is an image where the value - * of each pixel (white being the highest) is mapped against, and - * repositions, the vertices of the mesh. For best results, pair a - * displacement map with a matching normal map, since the renderer can - * not recompute surface normals from the displaced vertices. - * - * @type {?Texture} - * @default null - */ - displacementMap: Texture | null; - /** - * How much the displacement map affects the mesh (where black is no - * displacement, and white is maximum displacement). Without a displacement - * map set, this value is not applied. - * - * @type {number} - * @default 0 - */ - displacementScale: number; - /** - * The offset of the displacement map's values on the mesh's vertices. - * The bias is added to the scaled sample of the displacement map. - * Without a displacement map set, this value is not applied. - * - * @type {number} - * @default 0 - */ - displacementBias: number; - /** - * The green channel of this texture is used to alter the roughness of the - * material. - * - * @type {?Texture} - * @default null - */ - roughnessMap: Texture | null; - /** - * The blue channel of this texture is used to alter the metalness of the - * material. - * - * @type {?Texture} - * @default null - */ - metalnessMap: Texture | null; - /** - * The alpha map is a grayscale texture that controls the opacity across the - * surface (black: fully transparent; white: fully opaque). - * - * Only the color of the texture is used, ignoring the alpha channel if one - * exists. For RGB and RGBA textures, the renderer will use the green channel - * when sampling this texture due to the extra bit of precision provided for - * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and - * luminance/alpha textures will also still work as expected. - * - * @type {?Texture} - * @default null - */ - alphaMap: Texture | null; - /** - * The environment map. To ensure a physically correct rendering, environment maps - * are internally pre-processed with {@link PMREMGenerator}. - * - * @type {?Texture} - * @default null - */ - envMap: Texture | null; - /** - * The rotation of the environment map in radians. - * - * @type {Euler} - * @default (0,0,0) - */ - envMapRotation: Euler; - /** - * Scales the effect of the environment map by multiplying its color. - * - * @type {number} - * @default 1 - */ - envMapIntensity: number; - /** - * Renders the geometry as a wireframe. - * - * @type {boolean} - * @default false - */ - wireframe: boolean; - /** - * Controls the thickness of the wireframe. - * - * Can only be used with {@link SVGRenderer}. - * - * @type {number} - * @default 1 - */ - wireframeLinewidth: number; - /** - * Defines appearance of wireframe ends. - * - * Can only be used with {@link SVGRenderer}. - * - * @type {('round'|'bevel'|'miter')} - * @default 'round' - */ - wireframeLinecap: ("round" | "bevel" | "miter"); - /** - * Defines appearance of wireframe joints. - * - * Can only be used with {@link SVGRenderer}. - * - * @type {('round'|'bevel'|'miter')} - * @default 'round' - */ - wireframeLinejoin: ("round" | "bevel" | "miter"); - /** - * Whether the material is rendered with flat shading or not. - * - * @type {boolean} - * @default false - */ - flatShading: boolean; - /** - * Whether the material is affected by fog or not. - * - * @type {boolean} - * @default true - */ - fog: boolean; - copy(source: any): this; -} -import { Material } from './Material.js'; -import { Color } from '../math/Color.js'; -import { Vector2 } from '../math/Vector2.js'; -import { Euler } from '../math/Euler.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/MeshToonMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/MeshToonMaterial.d.ts deleted file mode 100644 index 4003cc6aa..000000000 --- a/jsdoc-testing/jsdoc/src/materials/MeshToonMaterial.d.ts +++ /dev/null @@ -1,244 +0,0 @@ -/** - * A material implementing toon shading. - * - * @augments Material - * @demo scenes/material-browser.html#MeshToonMaterial - */ -export class MeshToonMaterial extends Material { - /** - * Constructs a new mesh toon material. - * - * @param {Object} [parameters] - An object with one or more properties - * defining the material's appearance. Any property of the material - * (including any property from inherited materials) can be passed - * in here. Color values can be passed any type of value accepted - * by {@link Color#set}. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshToonMaterial: boolean; - defines: { - TOON: string; - }; - type: string; - /** - * Color of the material. - * - * @type {Color} - * @default (1,1,1) - */ - color: Color; - /** - * The color map. May optionally include an alpha channel, typically combined - * with {@link Material#transparent} or {@link Material#alphaTest}. The texture map - * color is modulated by the diffuse `color`. - * - * @type {?Texture} - * @default null - */ - map: Texture | null; - /** - * Gradient map for toon shading. It's required to set - * {@link Texture#minFilter} and {@link Texture#magFilter} to {@link NearestFilter} - * when using this type of texture. - * - * @type {?Texture} - * @default null - */ - gradientMap: Texture | null; - /** - * The light map. Requires a second set of UVs. - * - * @type {?Texture} - * @default null - */ - lightMap: Texture | null; - /** - * Intensity of the baked light. - * - * @type {number} - * @default 1 - */ - lightMapIntensity: number; - /** - * The red channel of this texture is used as the ambient occlusion map. - * Requires a second set of UVs. - * - * @type {?Texture} - * @default null - */ - aoMap: Texture | null; - /** - * Intensity of the ambient occlusion effect. Range is `[0,1]`, where `0` - * disables ambient occlusion. Where intensity is `1` and the AO map's - * red channel is also `1`, ambient light is fully occluded on a surface. - * - * @type {number} - * @default 1 - */ - aoMapIntensity: number; - /** - * Emissive (light) color of the material, essentially a solid color - * unaffected by other lighting. - * - * @type {Color} - * @default (0,0,0) - */ - emissive: Color; - /** - * Intensity of the emissive light. Modulates the emissive color. - * - * @type {number} - * @default 1 - */ - emissiveIntensity: number; - /** - * Set emissive (glow) map. The emissive map color is modulated by the - * emissive color and the emissive intensity. If you have an emissive map, - * be sure to set the emissive color to something other than black. - * - * @type {?Texture} - * @default null - */ - emissiveMap: Texture | null; - /** - * The texture to create a bump map. The black and white values map to the - * perceived depth in relation to the lights. Bump doesn't actually affect - * the geometry of the object, only the lighting. If a normal map is defined - * this will be ignored. - * - * @type {?Texture} - * @default null - */ - bumpMap: Texture | null; - /** - * How much the bump map affects the material. Typical range is `[0,1]`. - * - * @type {number} - * @default 1 - */ - bumpScale: number; - /** - * The texture to create a normal map. The RGB values affect the surface - * normal for each pixel fragment and change the way the color is lit. Normal - * maps do not change the actual shape of the surface, only the lighting. In - * case the material has a normal map authored using the left handed - * convention, the `y` component of `normalScale` should be negated to compensate - * for the different handedness. - * - * @type {?Texture} - * @default null - */ - normalMap: Texture | null; - /** - * The type of normal map. - * - * @type {(TangentSpaceNormalMap|ObjectSpaceNormalMap)} - * @default TangentSpaceNormalMap - */ - normalMapType: (number | ObjectSpaceNormalMap); - /** - * How much the normal map affects the material. Typical value range is `[0,1]`. - * - * @type {Vector2} - * @default (1,1) - */ - normalScale: Vector2; - /** - * The displacement map affects the position of the mesh's vertices. Unlike - * other maps which only affect the light and shade of the material the - * displaced vertices can cast shadows, block other objects, and otherwise - * act as real geometry. The displacement texture is an image where the value - * of each pixel (white being the highest) is mapped against, and - * repositions, the vertices of the mesh. For best results, pair a - * displacement map with a matching normal map, since the renderer can - * not recompute surface normals from the displaced vertices. - * - * @type {?Texture} - * @default null - */ - displacementMap: Texture | null; - /** - * How much the displacement map affects the mesh (where black is no - * displacement, and white is maximum displacement). Without a displacement - * map set, this value is not applied. - * - * @type {number} - * @default 0 - */ - displacementScale: number; - /** - * The offset of the displacement map's values on the mesh's vertices. - * The bias is added to the scaled sample of the displacement map. - * Without a displacement map set, this value is not applied. - * - * @type {number} - * @default 0 - */ - displacementBias: number; - /** - * The alpha map is a grayscale texture that controls the opacity across the - * surface (black: fully transparent; white: fully opaque). - * - * Only the color of the texture is used, ignoring the alpha channel if one - * exists. For RGB and RGBA textures, the renderer will use the green channel - * when sampling this texture due to the extra bit of precision provided for - * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and - * luminance/alpha textures will also still work as expected. - * - * @type {?Texture} - * @default null - */ - alphaMap: Texture | null; - /** - * Renders the geometry as a wireframe. - * - * @type {boolean} - * @default false - */ - wireframe: boolean; - /** - * Controls the thickness of the wireframe. - * - * Can only be used with {@link SVGRenderer}. - * - * @type {number} - * @default 1 - */ - wireframeLinewidth: number; - /** - * Defines appearance of wireframe ends. - * - * Can only be used with {@link SVGRenderer}. - * - * @type {('round'|'bevel'|'miter')} - * @default 'round' - */ - wireframeLinecap: ("round" | "bevel" | "miter"); - /** - * Defines appearance of wireframe joints. - * - * Can only be used with {@link SVGRenderer}. - * - * @type {('round'|'bevel'|'miter')} - * @default 'round' - */ - wireframeLinejoin: ("round" | "bevel" | "miter"); - /** - * Whether the material is affected by fog or not. - * - * @type {boolean} - * @default true - */ - fog: boolean; - copy(source: any): this; -} -import { Material } from './Material.js'; -import { Color } from '../math/Color.js'; -import { Vector2 } from '../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/PointsMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/PointsMaterial.d.ts deleted file mode 100644 index b6869b31b..000000000 --- a/jsdoc-testing/jsdoc/src/materials/PointsMaterial.d.ts +++ /dev/null @@ -1,102 +0,0 @@ -/** - * A material for rendering point primitives. - * - * Materials define the appearance of renderable 3D objects. - * - * ```js - * const vertices = []; - * - * for ( let i = 0; i < 10000; i ++ ) { - * const x = THREE.MathUtils.randFloatSpread( 2000 ); - * const y = THREE.MathUtils.randFloatSpread( 2000 ); - * const z = THREE.MathUtils.randFloatSpread( 2000 ); - * - * vertices.push( x, y, z ); - * } - * - * const geometry = new THREE.BufferGeometry(); - * geometry.setAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) ); - * const material = new THREE.PointsMaterial( { color: 0x888888 } ); - * const points = new THREE.Points( geometry, material ); - * scene.add( points ); - * ``` - * - * @augments Material - */ -export class PointsMaterial extends Material { - /** - * Constructs a new points material. - * - * @param {Object} [parameters] - An object with one or more properties - * defining the material's appearance. Any property of the material - * (including any property from inherited materials) can be passed - * in here. Color values can be passed any type of value accepted - * by {@link Color#set}. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isPointsMaterial: boolean; - type: string; - /** - * Color of the material. - * - * @type {Color} - * @default (1,1,1) - */ - color: Color; - /** - * The color map. May optionally include an alpha channel, typically combined - * with {@link Material#transparent} or {@link Material#alphaTest}. The texture map - * color is modulated by the diffuse `color`. - * - * @type {?Texture} - * @default null - */ - map: Texture | null; - /** - * The alpha map is a grayscale texture that controls the opacity across the - * surface (black: fully transparent; white: fully opaque). - * - * Only the color of the texture is used, ignoring the alpha channel if one - * exists. For RGB and RGBA textures, the renderer will use the green channel - * when sampling this texture due to the extra bit of precision provided for - * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and - * luminance/alpha textures will also still work as expected. - * - * @type {?Texture} - * @default null - */ - alphaMap: Texture | null; - /** - * Defines the size of the points in pixels. - * - * Might be capped if the value exceeds hardware dependent parameters like [gl.ALIASED_POINT_SIZE_RANGE](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/getParamete). - * - * @type {number} - * @default 1 - */ - size: number; - /** - * Specifies whether size of individual points is attenuated by the camera depth (perspective camera only). - * - * @type {boolean} - * @default true - */ - sizeAttenuation: boolean; - /** - * Whether the material is affected by fog or not. - * - * @type {boolean} - * @default true - */ - fog: boolean; - copy(source: any): this; -} -import { Material } from './Material.js'; -import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/RawShaderMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/RawShaderMaterial.d.ts deleted file mode 100644 index 0ce09ac16..000000000 --- a/jsdoc-testing/jsdoc/src/materials/RawShaderMaterial.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -declare const RawShaderMaterial_base: { - new (parameters?: Object): { - readonly isShaderMaterial: boolean; - type: string; - defines: Object; - uniforms: Object; - uniformsGroups: Array; - vertexShader: string; - fragmentShader: string; - linewidth: number; - wireframe: boolean; - wireframeLinewidth: number; - fog: boolean; - lights: boolean; - clipping: boolean; - forceSinglePass: boolean; - extensions: { - clipCullDistance: false; - multiDraw: false; - }; - defaultAttributeValues: Object; - index0AttributeName: string | undefined; - uniformsNeedUpdate: boolean; - glslVersion: (GLSL1 | GLSL3) | null; - copy(source: any): /*elided*/ any; - toJSON(meta: any): Object; - readonly isMaterial: boolean; - readonly uuid: string; - name: string; - blending: (NoBlending | number | AdditiveBlending | SubtractiveBlending | MultiplyBlending | CustomBlending); - side: (number | BackSide | DoubleSide); - vertexColors: boolean; - opacity: number; - transparent: boolean; - alphaHash: boolean; - blendSrc: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); - blendDst: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); - blendEquation: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation); - blendSrcAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; - blendDstAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; - blendEquationAlpha: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation) | null; - blendColor: import("../Three.Core.js").Color; - blendAlpha: number; - depthFunc: (NeverDepth | AlwaysDepth | LessDepth | number | EqualDepth | GreaterEqualDepth | GreaterDepth | NotEqualDepth); - depthTest: boolean; - depthWrite: boolean; - stencilWriteMask: number; - stencilFunc: NeverStencilFunc | LessStencilFunc | EqualStencilFunc | LessEqualStencilFunc | GreaterStencilFunc | NotEqualStencilFunc | GreaterEqualStencilFunc | number; - stencilRef: number; - stencilFuncMask: number; - stencilFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; - stencilZFail: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; - stencilZPass: ZeroStencilOp | number | ReplaceStencilOp | IncrementStencilOp | DecrementStencilOp | IncrementWrapStencilOp | DecrementWrapStencilOp | InvertStencilOp; - stencilWrite: boolean; - clippingPlanes: Array | null; - clipIntersection: boolean; - clipShadows: boolean; - shadowSide: (number | BackSide | DoubleSide) | null; - colorWrite: boolean; - precision: ("highp" | "mediump" | "lowp") | null; - polygonOffset: boolean; - polygonOffsetFactor: number; - polygonOffsetUnits: number; - dithering: boolean; - alphaToCoverage: boolean; - premultipliedAlpha: boolean; - allowOverride: boolean; - visible: boolean; - toneMapped: boolean; - userData: Object; - readonly version: number; - _alphaTest: number; - get alphaTest(): number; - set alphaTest(value: number); - onBeforeRender(): void; - onBeforeCompile(): void; - customProgramCacheKey(): string; - setValues(values?: Object): void; - clone(): Material; - dispose(): void; - set needsUpdate(value: boolean); - addEventListener(type: string, listener: Function): void; - _listeners: {} | undefined; - hasEventListener(type: string, listener: Function): boolean; - removeEventListener(type: string, listener: Function): void; - dispatchEvent(event: Object): void; - }; -}; -/** - * This class works just like {@link ShaderMaterial}, except that definitions - * of built-in uniforms and attributes are not automatically prepended to the - * GLSL shader code. - * - * `RawShaderMaterial` can only be used with {@link WebGLRenderer}. - * - * @augments ShaderMaterial - */ -export class RawShaderMaterial extends RawShaderMaterial_base { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isRawShaderMaterial: boolean; -} -export {}; diff --git a/jsdoc-testing/jsdoc/src/materials/ShaderMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/ShaderMaterial.d.ts deleted file mode 100644 index 63d1da267..000000000 --- a/jsdoc-testing/jsdoc/src/materials/ShaderMaterial.d.ts +++ /dev/null @@ -1,256 +0,0 @@ -/** - * ~Shader - */ -export type ShaderMaterial = { - /** - * - The name of the shader. - */ - name: string; - /** - * - The uniforms of the shader. - */ - uniforms: { - [x: string]: Uniform; - }; - /** - * - The defines of the shader. - */ - defines: { - [x: string]: any; - }; - /** - * - The vertex shader code. - */ - vertexShader: string; - /** - * - The fragment shader code. - */ - fragmentShader: string; -}; -/** - * A material rendered with custom shaders. A shader is a small program written in GLSL. - * that runs on the GPU. You may want to use a custom shader if you need to implement an - * effect not included with any of the built-in materials. - * - * There are the following notes to bear in mind when using a `ShaderMaterial`: - * - * - `ShaderMaterial` can only be used with {@link WebGLRenderer}. - * - Built in attributes and uniforms are passed to the shaders along with your code. If - * you don't want that, use {@link RawShaderMaterial} instead. - * - You can use the directive `#pragma unroll_loop_start` and `#pragma unroll_loop_end` - * in order to unroll a `for` loop in GLSL by the shader preprocessor. The directive has - * to be placed right above the loop. The loop formatting has to correspond to a defined standard. - * - The loop has to be [normalized](https://en.wikipedia.org/wiki/Normalized_loop). - * - The loop variable has to be *i*. - * - The value `UNROLLED_LOOP_INDEX` will be replaced with the explicitly - * value of *i* for the given iteration and can be used in preprocessor - * statements. - * - * ```js - * const material = new THREE.ShaderMaterial( { - * uniforms: { - * time: { value: 1.0 }, - * resolution: { value: new THREE.Vector2() } - * }, - * vertexShader: document.getElementById( 'vertexShader' ).textContent, - * fragmentShader: document.getElementById( 'fragmentShader' ).textContent - * } ); - * ``` - * - * @augments Material - */ -export class ShaderMaterial extends Material { - /** - * Constructs a new shader material. - * - * @param {Object} [parameters] - An object with one or more properties - * defining the material's appearance. Any property of the material - * (including any property from inherited materials) can be passed - * in here. Color values can be passed any type of value accepted - * by {@link Color#set}. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isShaderMaterial: boolean; - type: string; - /** - * Defines custom constants using `#define` directives within the GLSL code - * for both the vertex shader and the fragment shader; each key/value pair - * yields another directive. - * ```js - * defines: { - * FOO: 15, - * BAR: true - * } - * ``` - * Yields the lines: - * ``` - * #define FOO 15 - * #define BAR true - * ``` - * - * @type {Object} - */ - defines: Object; - /** - * An object of the form: - * ```js - * { - * "uniform1": { value: 1.0 }, - * "uniform2": { value: 2 } - * } - * ``` - * specifying the uniforms to be passed to the shader code; keys are uniform - * names, values are definitions of the form - * ``` - * { - * value: 1.0 - * } - * ``` - * where `value` is the value of the uniform. Names must match the name of - * the uniform, as defined in the GLSL code. Note that uniforms are refreshed - * on every frame, so updating the value of the uniform will immediately - * update the value available to the GLSL code. - * - * @type {Object} - */ - uniforms: Object; - /** - * An array holding uniforms groups for configuring UBOs. - * - * @type {Array} - */ - uniformsGroups: Array; - /** - * Vertex shader GLSL code. This is the actual code for the shader. - * - * @type {string} - */ - vertexShader: string; - /** - * Fragment shader GLSL code. This is the actual code for the shader. - * - * @type {string} - */ - fragmentShader: string; - /** - * Controls line thickness or lines. - * - * WebGL and WebGPU ignore this setting and always render line primitives with a - * width of one pixel. - * - * @type {number} - * @default 1 - */ - linewidth: number; - /** - * Renders the geometry as a wireframe. - * - * @type {boolean} - * @default false - */ - wireframe: boolean; - /** - * Controls the thickness of the wireframe. - * - * WebGL and WebGPU ignore this property and always render - * 1 pixel wide lines. - * - * @type {number} - * @default 1 - */ - wireframeLinewidth: number; - /** - * Defines whether the material color is affected by global fog settings; `true` - * to pass fog uniforms to the shader. - * - * Setting this property to `true` requires the definition of fog uniforms. It is - * recommended to use `UniformsUtils.merge()` to combine the custom shader uniforms - * with predefined fog uniforms. - * - * ```js - * const material = new ShaderMaterial( { - * uniforms: UniformsUtils.merge( [ UniformsLib[ 'fog' ], shaderUniforms ] ); - * vertexShader: vertexShader, - * fragmentShader: fragmentShader, - * fog: true - * } ); - * ``` - * - * @type {boolean} - * @default false - */ - fog: boolean; - /** - * Defines whether this material uses lighting; `true` to pass uniform data - * related to lighting to this shader. - * - * @type {boolean} - * @default false - */ - lights: boolean; - /** - * Defines whether this material supports clipping; `true` to let the renderer - * pass the clippingPlanes uniform. - * - * @type {boolean} - * @default false - */ - clipping: boolean; - /** - * This object allows to enable certain WebGL 2 extensions. - * - * - clipCullDistance: set to `true` to use vertex shader clipping - * - multiDraw: set to `true` to use vertex shader multi_draw / enable gl_DrawID - * - * @type {{clipCullDistance:false,multiDraw:false}} - */ - extensions: { - clipCullDistance: false; - multiDraw: false; - }; - /** - * When the rendered geometry doesn't include these attributes but the - * material does, these default values will be passed to the shaders. This - * avoids errors when buffer data is missing. - * - * - color: [ 1, 1, 1 ] - * - uv: [ 0, 0 ] - * - uv1: [ 0, 0 ] - * - * @type {Object} - */ - defaultAttributeValues: Object; - /** - * If set, this calls [gl.bindAttribLocation](https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bindAttribLocation) - * to bind a generic vertex index to an attribute variable. - * - * @type {string|undefined} - * @default undefined - */ - index0AttributeName: string | undefined; - /** - * Can be used to force a uniform update while changing uniforms in - * {@link Object3D#onBeforeRender}. - * - * @type {boolean} - * @default false - */ - uniformsNeedUpdate: boolean; - /** - * Defines the GLSL version of custom shader code. - * - * @type {?(GLSL1|GLSL3)} - * @default null - */ - glslVersion: (GLSL1 | GLSL3) | null; - copy(source: any): this; - toJSON(meta: any): Object; -} -import { Material } from './Material.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/ShadowMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/ShadowMaterial.d.ts deleted file mode 100644 index 2e66a5668..000000000 --- a/jsdoc-testing/jsdoc/src/materials/ShadowMaterial.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This material can receive shadows, but otherwise is completely transparent. - * - * ```js - * const geometry = new THREE.PlaneGeometry( 2000, 2000 ); - * geometry.rotateX( - Math.PI / 2 ); - * - * const material = new THREE.ShadowMaterial(); - * material.opacity = 0.2; - * - * const plane = new THREE.Mesh( geometry, material ); - * plane.position.y = -200; - * plane.receiveShadow = true; - * scene.add( plane ); - * ``` - * - * @augments Material - */ -export class ShadowMaterial extends Material { - /** - * Constructs a new shadow material. - * - * @param {Object} [parameters] - An object with one or more properties - * defining the material's appearance. Any property of the material - * (including any property from inherited materials) can be passed - * in here. Color values can be passed any type of value accepted - * by {@link Color#set}. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isShadowMaterial: boolean; - type: string; - /** - * Color of the material. - * - * @type {Color} - * @default (0,0,0) - */ - color: Color; - /** - * Whether the material is affected by fog or not. - * - * @type {boolean} - * @default true - */ - fog: boolean; - copy(source: any): this; -} -import { Material } from './Material.js'; -import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/SpriteMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/SpriteMaterial.d.ts deleted file mode 100644 index e44d5d72d..000000000 --- a/jsdoc-testing/jsdoc/src/materials/SpriteMaterial.d.ts +++ /dev/null @@ -1,89 +0,0 @@ -/** - * A material for rendering instances of {@link Sprite}. - * - * ```js - * const map = new THREE.TextureLoader().load( 'textures/sprite.png' ); - * const material = new THREE.SpriteMaterial( { map: map, color: 0xffffff } ); - * - * const sprite = new THREE.Sprite( material ); - * sprite.scale.set(200, 200, 1) - * scene.add( sprite ); - * ``` - * - * @augments Material - */ -export class SpriteMaterial extends Material { - /** - * Constructs a new sprite material. - * - * @param {Object} [parameters] - An object with one or more properties - * defining the material's appearance. Any property of the material - * (including any property from inherited materials) can be passed - * in here. Color values can be passed any type of value accepted - * by {@link Color#set}. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSpriteMaterial: boolean; - type: string; - /** - * Color of the material. - * - * @type {Color} - * @default (1,1,1) - */ - color: Color; - /** - * The color map. May optionally include an alpha channel, typically combined - * with {@link Material#transparent} or {@link Material#alphaTest}. The texture map - * color is modulated by the diffuse `color`. - * - * @type {?Texture} - * @default null - */ - map: Texture | null; - /** - * The alpha map is a grayscale texture that controls the opacity across the - * surface (black: fully transparent; white: fully opaque). - * - * Only the color of the texture is used, ignoring the alpha channel if one - * exists. For RGB and RGBA textures, the renderer will use the green channel - * when sampling this texture due to the extra bit of precision provided for - * green in DXT-compressed and uncompressed RGB 565 formats. Luminance-only and - * luminance/alpha textures will also still work as expected. - * - * @type {?Texture} - * @default null - */ - alphaMap: Texture | null; - /** - * The rotation of the sprite in radians. - * - * @type {number} - * @default 0 - */ - rotation: number; - /** - * Specifies whether size of the sprite is attenuated by the camera depth (perspective camera only). - * - * @type {boolean} - * @default true - */ - sizeAttenuation: boolean; - /** - * Whether the material is affected by fog or not. - * - * @type {boolean} - * @default true - */ - fog: boolean; - copy(source: any): this; -} -import { Material } from './Material.js'; -import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/Line2NodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/Line2NodeMaterial.d.ts deleted file mode 100644 index 82f46fddc..000000000 --- a/jsdoc-testing/jsdoc/src/materials/nodes/Line2NodeMaterial.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -export default Line2NodeMaterial; -/** - * This node material can be used to render lines with a size larger than one - * by representing them as instanced meshes. - * - * @augments NodeMaterial - */ -declare class Line2NodeMaterial extends NodeMaterial { - /** - * Constructs a new node material for wide line rendering. - * - * @param {Object} [parameters={}] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLine2NodeMaterial: boolean; - /** - * The dash offset. - * - * @type {number} - * @default 0 - */ - dashOffset: number; - /** - * Defines the lines color. - * - * @type {?Node} - * @default null - */ - lineColorNode: Node | null; - /** - * Defines the offset. - * - * @type {?Node} - * @default null - */ - offsetNode: Node | null; - /** - * Defines the dash scale. - * - * @type {?Node} - * @default null - */ - dashScaleNode: Node | null; - /** - * Defines the dash size. - * - * @type {?Node} - * @default null - */ - dashSizeNode: Node | null; - /** - * Defines the gap size. - * - * @type {?Node} - * @default null - */ - gapSizeNode: Node | null; - _useDash: any; - _useAlphaToCoverage: boolean; - _useWorldUnits: boolean; - set worldUnits(value: boolean); - /** - * Whether the lines should sized in world units or not. - * When set to `false` the unit is pixel. - * - * @type {boolean} - * @default false - */ - get worldUnits(): boolean; - set dashed(value: boolean); - /** - * Whether the lines should be dashed or not. - * - * @type {boolean} - * @default false - */ - get dashed(): boolean; - /** - * Copies the properties of the given material to this instance. - * - * @param {Line2NodeMaterial} source - The material to copy. - * @return {Line2NodeMaterial} A reference to this material. - */ - copy(source: Line2NodeMaterial): Line2NodeMaterial; -} -import NodeMaterial from './NodeMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/LineBasicNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/LineBasicNodeMaterial.d.ts deleted file mode 100644 index da65dc888..000000000 --- a/jsdoc-testing/jsdoc/src/materials/nodes/LineBasicNodeMaterial.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -export default LineBasicNodeMaterial; -/** - * Node material version of {@link LineBasicMaterial}. - * - * @augments NodeMaterial - */ -declare class LineBasicNodeMaterial extends NodeMaterial { - /** - * Constructs a new line basic node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLineBasicNodeMaterial: boolean; -} -import NodeMaterial from './NodeMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/LineDashedNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/LineDashedNodeMaterial.d.ts deleted file mode 100644 index 89820e463..000000000 --- a/jsdoc-testing/jsdoc/src/materials/nodes/LineDashedNodeMaterial.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -export default LineDashedNodeMaterial; -/** - * Node material version of {@link LineDashedMaterial}. - * - * @augments NodeMaterial - */ -declare class LineDashedNodeMaterial extends NodeMaterial { - /** - * Constructs a new line dashed node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLineDashedNodeMaterial: boolean; - /** - * The dash offset. - * - * @type {number} - * @default 0 - */ - dashOffset: number; - /** - * The offset of dash materials is by default inferred from the `dashOffset` - * property. This node property allows to overwrite the default - * and define the offset with a node instead. - * - * If you don't want to overwrite the offset but modify the existing - * value instead, use {@link materialLineDashOffset}. - * - * @type {?Node} - * @default null - */ - offsetNode: Node | null; - /** - * The scale of dash materials is by default inferred from the `scale` - * property. This node property allows to overwrite the default - * and define the scale with a node instead. - * - * If you don't want to overwrite the scale but modify the existing - * value instead, use {@link materialLineScale}. - * - * @type {?Node} - * @default null - */ - dashScaleNode: Node | null; - /** - * The dash size of dash materials is by default inferred from the `dashSize` - * property. This node property allows to overwrite the default - * and define the dash size with a node instead. - * - * If you don't want to overwrite the dash size but modify the existing - * value instead, use {@link materialLineDashSize}. - * - * @type {?Node} - * @default null - */ - dashSizeNode: Node | null; - /** - * The gap size of dash materials is by default inferred from the `gapSize` - * property. This node property allows to overwrite the default - * and define the gap size with a node instead. - * - * If you don't want to overwrite the gap size but modify the existing - * value instead, use {@link materialLineGapSize}. - * - * @type {?Node} - * @default null - */ - gapSizeNode: Node | null; -} -import NodeMaterial from './NodeMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/MeshBasicNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/MeshBasicNodeMaterial.d.ts deleted file mode 100644 index 97d6b1cb4..000000000 --- a/jsdoc-testing/jsdoc/src/materials/nodes/MeshBasicNodeMaterial.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -export default MeshBasicNodeMaterial; -/** - * Node material version of {@link MeshBasicMaterial}. - * - * @augments NodeMaterial - */ -declare class MeshBasicNodeMaterial extends NodeMaterial { - /** - * Constructs a new mesh basic node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshBasicNodeMaterial: boolean; - /** - * Overwritten since this type of material uses {@link BasicEnvironmentNode} - * to implement the default environment mapping. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {?BasicEnvironmentNode} The environment node. - */ - setupEnvironment(builder: NodeBuilder): BasicEnvironmentNode | null; - /** - * Setups the lighting model. - * - * @return {BasicLightingModel} The lighting model. - */ - setupLightingModel(): BasicLightingModel; -} -import NodeMaterial from './NodeMaterial.js'; -import BasicEnvironmentNode from '../../nodes/lighting/BasicEnvironmentNode.js'; -import BasicLightingModel from '../../nodes/functions/BasicLightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/MeshLambertNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/MeshLambertNodeMaterial.d.ts deleted file mode 100644 index a5e110905..000000000 --- a/jsdoc-testing/jsdoc/src/materials/nodes/MeshLambertNodeMaterial.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -export default MeshLambertNodeMaterial; -/** - * Node material version of {@link MeshLambertMaterial}. - * - * @augments NodeMaterial - */ -declare class MeshLambertNodeMaterial extends NodeMaterial { - /** - * Constructs a new mesh lambert node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshLambertNodeMaterial: boolean; - /** - * Overwritten since this type of material uses {@link BasicEnvironmentNode} - * to implement the default environment mapping. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {?BasicEnvironmentNode} The environment node. - */ - setupEnvironment(builder: NodeBuilder): BasicEnvironmentNode | null; - /** - * Setups the lighting model. - * - * @return {PhongLightingModel} The lighting model. - */ - setupLightingModel(): PhongLightingModel; -} -import NodeMaterial from './NodeMaterial.js'; -import BasicEnvironmentNode from '../../nodes/lighting/BasicEnvironmentNode.js'; -import PhongLightingModel from '../../nodes/functions/PhongLightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/MeshMatcapNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/MeshMatcapNodeMaterial.d.ts deleted file mode 100644 index 1a2d32c8c..000000000 --- a/jsdoc-testing/jsdoc/src/materials/nodes/MeshMatcapNodeMaterial.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export default MeshMatcapNodeMaterial; -/** - * Node material version of {@link MeshMatcapMaterial}. - * - * @augments NodeMaterial - */ -declare class MeshMatcapNodeMaterial extends NodeMaterial { - /** - * Constructs a new mesh normal node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshMatcapNodeMaterial: boolean; - /** - * Setups the matcap specific node variables. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setupVariants(builder: NodeBuilder): void; -} -import NodeMaterial from './NodeMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/MeshNormalNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/MeshNormalNodeMaterial.d.ts deleted file mode 100644 index effc5951b..000000000 --- a/jsdoc-testing/jsdoc/src/materials/nodes/MeshNormalNodeMaterial.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -export default MeshNormalNodeMaterial; -/** - * Node material version of {@link MeshNormalMaterial}. - * - * @augments NodeMaterial - */ -declare class MeshNormalNodeMaterial extends NodeMaterial { - /** - * Constructs a new mesh normal node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshNormalNodeMaterial: boolean; - /** - * Overwrites the default implementation by computing the diffuse color - * based on the normal data. - */ - setupDiffuseColor(): void; -} -import NodeMaterial from './NodeMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/MeshPhongNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/MeshPhongNodeMaterial.d.ts deleted file mode 100644 index b55a9c942..000000000 --- a/jsdoc-testing/jsdoc/src/materials/nodes/MeshPhongNodeMaterial.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -export default MeshPhongNodeMaterial; -/** - * Node material version of {@link MeshPhongMaterial}. - * - * @augments NodeMaterial - */ -declare class MeshPhongNodeMaterial extends NodeMaterial { - /** - * Constructs a new mesh lambert node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshPhongNodeMaterial: boolean; - /** - * The shininess of phong materials is by default inferred from the `shininess` - * property. This node property allows to overwrite the default - * and define the shininess with a node instead. - * - * If you don't want to overwrite the shininess but modify the existing - * value instead, use {@link materialShininess}. - * - * @type {?Node} - * @default null - */ - shininessNode: Node | null; - /** - * The specular color of phong materials is by default inferred from the - * `specular` property. This node property allows to overwrite the default - * and define the specular color with a node instead. - * - * If you don't want to overwrite the specular color but modify the existing - * value instead, use {@link materialSpecular}. - * - * @type {?Node} - * @default null - */ - specularNode: Node | null; - /** - * Overwritten since this type of material uses {@link BasicEnvironmentNode} - * to implement the default environment mapping. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {?BasicEnvironmentNode} The environment node. - */ - setupEnvironment(builder: NodeBuilder): BasicEnvironmentNode | null; - /** - * Setups the lighting model. - * - * @return {PhongLightingModel} The lighting model. - */ - setupLightingModel(): PhongLightingModel; - copy(source: any): NodeMaterial; -} -import NodeMaterial from './NodeMaterial.js'; -import BasicEnvironmentNode from '../../nodes/lighting/BasicEnvironmentNode.js'; -import PhongLightingModel from '../../nodes/functions/PhongLightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/MeshPhysicalNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/MeshPhysicalNodeMaterial.d.ts deleted file mode 100644 index 0545af43c..000000000 --- a/jsdoc-testing/jsdoc/src/materials/nodes/MeshPhysicalNodeMaterial.d.ts +++ /dev/null @@ -1,276 +0,0 @@ -export default MeshPhysicalNodeMaterial; -/** - * Node material version of {@link MeshPhysicalMaterial}. - * - * @augments MeshStandardNodeMaterial - */ -declare class MeshPhysicalNodeMaterial extends MeshStandardNodeMaterial { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshPhysicalNodeMaterial: boolean; - /** - * The clearcoat of physical materials is by default inferred from the `clearcoat` - * and `clearcoatMap` properties. This node property allows to overwrite the default - * and define the clearcoat with a node instead. - * - * If you don't want to overwrite the clearcoat but modify the existing - * value instead, use {@link materialClearcoat}. - * - * @type {?Node} - * @default null - */ - clearcoatNode: Node | null; - /** - * The clearcoat roughness of physical materials is by default inferred from the `clearcoatRoughness` - * and `clearcoatRoughnessMap` properties. This node property allows to overwrite the default - * and define the clearcoat roughness with a node instead. - * - * If you don't want to overwrite the clearcoat roughness but modify the existing - * value instead, use {@link materialClearcoatRoughness}. - * - * @type {?Node} - * @default null - */ - clearcoatRoughnessNode: Node | null; - /** - * The clearcoat normal of physical materials is by default inferred from the `clearcoatNormalMap` - * property. This node property allows to overwrite the default - * and define the clearcoat normal with a node instead. - * - * If you don't want to overwrite the clearcoat normal but modify the existing - * value instead, use {@link materialClearcoatNormal}. - * - * @type {?Node} - * @default null - */ - clearcoatNormalNode: Node | null; - /** - * The sheen of physical materials is by default inferred from the `sheen`, `sheenColor` - * and `sheenColorMap` properties. This node property allows to overwrite the default - * and define the sheen with a node instead. - * - * If you don't want to overwrite the sheen but modify the existing - * value instead, use {@link materialSheen}. - * - * @type {?Node} - * @default null - */ - sheenNode: Node | null; - /** - * The sheen roughness of physical materials is by default inferred from the `sheenRoughness` and - * `sheenRoughnessMap` properties. This node property allows to overwrite the default - * and define the sheen roughness with a node instead. - * - * If you don't want to overwrite the sheen roughness but modify the existing - * value instead, use {@link materialSheenRoughness}. - * - * @type {?Node} - * @default null - */ - sheenRoughnessNode: Node | null; - /** - * The iridescence of physical materials is by default inferred from the `iridescence` - * property. This node property allows to overwrite the default - * and define the iridescence with a node instead. - * - * If you don't want to overwrite the iridescence but modify the existing - * value instead, use {@link materialIridescence}. - * - * @type {?Node} - * @default null - */ - iridescenceNode: Node | null; - /** - * The iridescence IOR of physical materials is by default inferred from the `iridescenceIOR` - * property. This node property allows to overwrite the default - * and define the iridescence IOR with a node instead. - * - * If you don't want to overwrite the iridescence IOR but modify the existing - * value instead, use {@link materialIridescenceIOR}. - * - * @type {?Node} - * @default null - */ - iridescenceIORNode: Node | null; - /** - * The iridescence thickness of physical materials is by default inferred from the `iridescenceThicknessRange` - * and `iridescenceThicknessMap` properties. This node property allows to overwrite the default - * and define the iridescence thickness with a node instead. - * - * If you don't want to overwrite the iridescence thickness but modify the existing - * value instead, use {@link materialIridescenceThickness}. - * - * @type {?Node} - * @default null - */ - iridescenceThicknessNode: Node | null; - /** - * The specular intensity of physical materials is by default inferred from the `specularIntensity` - * and `specularIntensityMap` properties. This node property allows to overwrite the default - * and define the specular intensity with a node instead. - * - * If you don't want to overwrite the specular intensity but modify the existing - * value instead, use {@link materialSpecularIntensity}. - * - * @type {?Node} - * @default null - */ - specularIntensityNode: Node | null; - /** - * The specular color of physical materials is by default inferred from the `specularColor` - * and `specularColorMap` properties. This node property allows to overwrite the default - * and define the specular color with a node instead. - * - * If you don't want to overwrite the specular color but modify the existing - * value instead, use {@link materialSpecularColor}. - * - * @type {?Node} - * @default null - */ - specularColorNode: Node | null; - /** - * The ior of physical materials is by default inferred from the `ior` - * property. This node property allows to overwrite the default - * and define the ior with a node instead. - * - * If you don't want to overwrite the ior but modify the existing - * value instead, use {@link materialIOR}. - * - * @type {?Node} - * @default null - */ - iorNode: Node | null; - /** - * The transmission of physical materials is by default inferred from the `transmission` and - * `transmissionMap` properties. This node property allows to overwrite the default - * and define the transmission with a node instead. - * - * If you don't want to overwrite the transmission but modify the existing - * value instead, use {@link materialTransmission}. - * - * @type {?Node} - * @default null - */ - transmissionNode: Node | null; - /** - * The thickness of physical materials is by default inferred from the `thickness` and - * `thicknessMap` properties. This node property allows to overwrite the default - * and define the thickness with a node instead. - * - * If you don't want to overwrite the thickness but modify the existing - * value instead, use {@link materialThickness}. - * - * @type {?Node} - * @default null - */ - thicknessNode: Node | null; - /** - * The attenuation distance of physical materials is by default inferred from the - * `attenuationDistance` property. This node property allows to overwrite the default - * and define the attenuation distance with a node instead. - * - * If you don't want to overwrite the attenuation distance but modify the existing - * value instead, use {@link materialAttenuationDistance}. - * - * @type {?Node} - * @default null - */ - attenuationDistanceNode: Node | null; - /** - * The attenuation color of physical materials is by default inferred from the - * `attenuationColor` property. This node property allows to overwrite the default - * and define the attenuation color with a node instead. - * - * If you don't want to overwrite the attenuation color but modify the existing - * value instead, use {@link materialAttenuationColor}. - * - * @type {?Node} - * @default null - */ - attenuationColorNode: Node | null; - /** - * The dispersion of physical materials is by default inferred from the - * `dispersion` property. This node property allows to overwrite the default - * and define the dispersion with a node instead. - * - * If you don't want to overwrite the dispersion but modify the existing - * value instead, use {@link materialDispersion}. - * - * @type {?Node} - * @default null - */ - dispersionNode: Node | null; - /** - * The anisotropy of physical materials is by default inferred from the - * `anisotropy` property. This node property allows to overwrite the default - * and define the anisotropy with a node instead. - * - * If you don't want to overwrite the anisotropy but modify the existing - * value instead, use {@link materialAnisotropy}. - * - * @type {?Node} - * @default null - */ - anisotropyNode: Node | null; - /** - * Whether the lighting model should use clearcoat or not. - * - * @type {boolean} - * @default true - */ - get useClearcoat(): boolean; - /** - * Whether the lighting model should use iridescence or not. - * - * @type {boolean} - * @default true - */ - get useIridescence(): boolean; - /** - * Whether the lighting model should use sheen or not. - * - * @type {boolean} - * @default true - */ - get useSheen(): boolean; - /** - * Whether the lighting model should use anisotropy or not. - * - * @type {boolean} - * @default true - */ - get useAnisotropy(): boolean; - /** - * Whether the lighting model should use transmission or not. - * - * @type {boolean} - * @default true - */ - get useTransmission(): boolean; - /** - * Whether the lighting model should use dispersion or not. - * - * @type {boolean} - * @default true - */ - get useDispersion(): boolean; - /** - * Setups the physical specific node variables. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setupVariants(builder: NodeBuilder): void; - /** - * Setups the clearcoat normal node. - * - * @return {Node} The clearcoat normal. - */ - setupClearcoatNormal(): Node; - setup(builder: any): void; -} -import MeshStandardNodeMaterial from './MeshStandardNodeMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/MeshSSSNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/MeshSSSNodeMaterial.d.ts deleted file mode 100644 index ca33d8128..000000000 --- a/jsdoc-testing/jsdoc/src/materials/nodes/MeshSSSNodeMaterial.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -export default MeshSSSNodeMaterial; -/** - * This node material is an experimental extension of {@link MeshPhysicalNodeMaterial} - * that implements a Subsurface scattering (SSS) term. - * - * @augments MeshPhysicalNodeMaterial - */ -declare class MeshSSSNodeMaterial extends MeshPhysicalNodeMaterial { - /** - * Represents the thickness color. - * - * @type {?Node} - * @default null - */ - thicknessColorNode: Node | null; - /** - * Represents the distortion factor. - * - * @type {?Node} - */ - thicknessDistortionNode: Node | null; - /** - * Represents the thickness ambient factor. - * - * @type {?Node} - */ - thicknessAmbientNode: Node | null; - /** - * Represents the thickness attenuation. - * - * @type {?Node} - */ - thicknessAttenuationNode: Node | null; - /** - * Represents the thickness power. - * - * @type {?Node} - */ - thicknessPowerNode: Node | null; - /** - * Represents the thickness scale. - * - * @type {?Node} - */ - thicknessScaleNode: Node | null; - /** - * Whether the lighting model should use SSS or not. - * - * @type {boolean} - * @default true - */ - get useSSS(): boolean; - /** - * Setups the lighting model. - * - * @return {SSSLightingModel} The lighting model. - */ - setupLightingModel(): SSSLightingModel; -} -import MeshPhysicalNodeMaterial from './MeshPhysicalNodeMaterial.js'; -/** - * Represents the lighting model for {@link MeshSSSNodeMaterial}. - * - * @augments PhysicalLightingModel - */ -declare class SSSLightingModel extends PhysicalLightingModel { - /** - * Constructs a new physical lighting model. - * - * @param {boolean} [clearcoat=false] - Whether clearcoat is supported or not. - * @param {boolean} [sheen=false] - Whether sheen is supported or not. - * @param {boolean} [iridescence=false] - Whether iridescence is supported or not. - * @param {boolean} [anisotropy=false] - Whether anisotropy is supported or not. - * @param {boolean} [transmission=false] - Whether transmission is supported or not. - * @param {boolean} [dispersion=false] - Whether dispersion is supported or not. - * @param {boolean} [sss=false] - Whether SSS is supported or not. - */ - constructor(clearcoat?: boolean, sheen?: boolean, iridescence?: boolean, anisotropy?: boolean, transmission?: boolean, dispersion?: boolean, sss?: boolean); - /** - * Whether the lighting model should use SSS or not. - * - * @type {boolean} - * @default false - */ - useSSS: boolean; - /** - * Extends the default implementation with a SSS term. - * - * Reference: [Approximating Translucency for a Fast, Cheap and Convincing Subsurface Scattering Look](https://colinbarrebrisebois.com/2011/03/07/gdc-2011-approximating-translucency-for-a-fast-cheap-and-convincing-subsurface-scattering-look/) - * - * @param {Object} input - The input data. - * @param {NodeBuilder} builder - The current node builder. - */ - direct({ lightDirection, lightColor, reflectedLight }: Object, builder: NodeBuilder): void; -} -import PhysicalLightingModel from '../../nodes/functions/PhysicalLightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/MeshStandardNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/MeshStandardNodeMaterial.d.ts deleted file mode 100644 index 2128d9631..000000000 --- a/jsdoc-testing/jsdoc/src/materials/nodes/MeshStandardNodeMaterial.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -export default MeshStandardNodeMaterial; -/** - * Node material version of {@link MeshStandardMaterial}. - * - * @augments NodeMaterial - */ -declare class MeshStandardNodeMaterial extends NodeMaterial { - /** - * Constructs a new mesh standard node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshStandardNodeMaterial: boolean; - /** - * The emissive color of standard materials is by default inferred from the `emissive`, - * `emissiveIntensity` and `emissiveMap` properties. This node property allows to - * overwrite the default and define the emissive color with a node instead. - * - * If you don't want to overwrite the emissive color but modify the existing - * value instead, use {@link materialEmissive}. - * - * @type {?Node} - * @default null - */ - emissiveNode: Node | null; - /** - * The metalness of standard materials is by default inferred from the `metalness`, - * and `metalnessMap` properties. This node property allows to - * overwrite the default and define the metalness with a node instead. - * - * If you don't want to overwrite the metalness but modify the existing - * value instead, use {@link materialMetalness}. - * - * @type {?Node} - * @default null - */ - metalnessNode: Node | null; - /** - * The roughness of standard materials is by default inferred from the `roughness`, - * and `roughnessMap` properties. This node property allows to - * overwrite the default and define the roughness with a node instead. - * - * If you don't want to overwrite the roughness but modify the existing - * value instead, use {@link materialRoughness}. - * - * @type {?Node} - * @default null - */ - roughnessNode: Node | null; - /** - * Overwritten since this type of material uses {@link EnvironmentNode} - * to implement the PBR (PMREM based) environment mapping. Besides, the - * method honors `Scene.environment`. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {?EnvironmentNode} The environment node. - */ - setupEnvironment(builder: NodeBuilder): EnvironmentNode | null; - /** - * Setups the lighting model. - * - * @return {PhysicalLightingModel} The lighting model. - */ - setupLightingModel(): PhysicalLightingModel; - /** - * Setups the specular related node variables. - */ - setupSpecular(): void; - copy(source: any): NodeMaterial; -} -import NodeMaterial from './NodeMaterial.js'; -import EnvironmentNode from '../../nodes/lighting/EnvironmentNode.js'; -import PhysicalLightingModel from '../../nodes/functions/PhysicalLightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/MeshToonNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/MeshToonNodeMaterial.d.ts deleted file mode 100644 index 1ffe1bd1b..000000000 --- a/jsdoc-testing/jsdoc/src/materials/nodes/MeshToonNodeMaterial.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -export default MeshToonNodeMaterial; -/** - * Node material version of {@link MeshToonMaterial}. - * - * @augments NodeMaterial - */ -declare class MeshToonNodeMaterial extends NodeMaterial { - /** - * Constructs a new mesh toon node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMeshToonNodeMaterial: boolean; - /** - * Setups the lighting model. - * - * @return {ToonLightingModel} The lighting model. - */ - setupLightingModel(): ToonLightingModel; -} -import NodeMaterial from './NodeMaterial.js'; -import ToonLightingModel from '../../nodes/functions/ToonLightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/NodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/NodeMaterial.d.ts deleted file mode 100644 index 3c8a1d19f..000000000 --- a/jsdoc-testing/jsdoc/src/materials/nodes/NodeMaterial.d.ts +++ /dev/null @@ -1,505 +0,0 @@ -export default NodeMaterial; -/** - * Base class for all node materials. - * - * @augments Material - */ -declare class NodeMaterial extends Material { - static get type(): string; - set type(_value: string); - /** - * Represents the type of the node material. - * - * @type {string} - */ - get type(): string; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isNodeMaterial: boolean; - /** - * Whether this material is affected by fog or not. - * - * @type {boolean} - * @default true - */ - fog: boolean; - /** - * Whether this material is affected by lights or not. - * - * @type {boolean} - * @default false - */ - lights: boolean; - /** - * Whether this material uses hardware clipping or not. - * This property is managed by the engine and should not be - * modified by apps. - * - * @type {boolean} - * @default false - */ - hardwareClipping: boolean; - /** - * Node materials which set their `lights` property to `true` - * are affected by all lights of the scene. Sometimes selective - * lighting is wanted which means only _some_ lights in the scene - * affect a material. This can be achieved by creating an instance - * of {@link LightsNode} with a list of selective - * lights and assign the node to this property. - * - * ```js - * const customLightsNode = lights( [ light1, light2 ] ); - * material.lightsNode = customLightsNode; - * ``` - * - * @type {?LightsNode} - * @default null - */ - lightsNode: LightsNode | null; - /** - * The environment of node materials can be defined by an environment - * map assigned to the `envMap` property or by `Scene.environment` - * if the node material is a PBR material. This node property allows to overwrite - * the default behavior and define the environment with a custom node. - * - * ```js - * material.envNode = pmremTexture( renderTarget.texture ); - * ``` - * - * @type {?Node} - * @default null - */ - envNode: Node | null; - /** - * The lighting of node materials might be influenced by ambient occlusion. - * The default AO is inferred from an ambient occlusion map assigned to `aoMap` - * and the respective `aoMapIntensity`. This node property allows to overwrite - * the default and define the ambient occlusion with a custom node instead. - * - * If you don't want to overwrite the diffuse color but modify the existing - * values instead, use {@link materialAO}. - * - * @type {?Node} - * @default null - */ - aoNode: Node | null; - /** - * The diffuse color of node materials is by default inferred from the - * `color` and `map` properties. This node property allows to overwrite the default - * and define the diffuse color with a node instead. - * - * ```js - * material.colorNode = color( 0xff0000 ); // define red color - * ``` - * - * If you don't want to overwrite the diffuse color but modify the existing - * values instead, use {@link materialColor}. - * - * ```js - * material.colorNode = materialColor.mul( color( 0xff0000 ) ); // give diffuse colors a red tint - * ``` - * - * @type {?Node} - * @default null - */ - colorNode: Node | null; - /** - * The normals of node materials are by default inferred from the `normalMap`/`normalScale` - * or `bumpMap`/`bumpScale` properties. This node property allows to overwrite the default - * and define the normals with a node instead. - * - * If you don't want to overwrite the normals but modify the existing values instead, - * use {@link materialNormal}. - * - * @type {?Node} - * @default null - */ - normalNode: Node | null; - /** - * The opacity of node materials is by default inferred from the `opacity` - * and `alphaMap` properties. This node property allows to overwrite the default - * and define the opacity with a node instead. - * - * If you don't want to overwrite the opacity but modify the existing - * value instead, use {@link materialOpacity}. - * - * @type {?Node} - * @default null - */ - opacityNode: Node | null; - /** - * This node can be used to implement a variety of filter-like effects. The idea is - * to store the current rendering into a texture e.g. via `viewportSharedTexture()`, use it - * to create an arbitrary effect and then assign the node composition to this property. - * Everything behind the object using this material will now be affected by a filter. - * - * ```js - * const material = new NodeMaterial() - * material.transparent = true; - * - * // everything behind the object will be monochromatic - * material.backdropNode = saturation( viewportSharedTexture().rgb, 0 ); - * ``` - * - * Backdrop computations are part of the lighting so only lit materials can use this property. - * - * @type {?Node} - * @default null - */ - backdropNode: Node | null; - /** - * This node allows to modulate the influence of `backdropNode` to the outgoing light. - * - * @type {?Node} - * @default null - */ - backdropAlphaNode: Node | null; - /** - * The alpha test of node materials is by default inferred from the `alphaTest` - * property. This node property allows to overwrite the default and define the - * alpha test with a node instead. - * - * If you don't want to overwrite the alpha test but modify the existing - * value instead, use {@link materialAlphaTest}. - * - * @type {?Node} - * @default null - */ - alphaTestNode: Node | null; - /** - * Discards the fragment if the mask value is `false`. - * - * @type {?Node} - * @default null - */ - maskNode: Node | null; - /** - * This node can be used to implement a shadow mask for the material. - * - * @type {?Node} - * @default null - */ - maskShadowNode: Node | null; - /** - * The local vertex positions are computed based on multiple factors like the - * attribute data, morphing or skinning. This node property allows to overwrite - * the default and define local vertex positions with nodes instead. - * - * If you don't want to overwrite the vertex positions but modify the existing - * values instead, use {@link positionLocal}. - * - *```js - * material.positionNode = positionLocal.add( displace ); - * ``` - * - * @type {?Node} - * @default null - */ - positionNode: Node | null; - /** - * This node property is intended for logic which modifies geometry data once or per animation step. - * Apps usually place such logic randomly in initialization routines or in the animation loop. - * `geometryNode` is intended as a dedicated API so there is an intended spot where geometry modifications - * can be implemented. - * - * The idea is to assign a `Fn` definition that holds the geometry modification logic. A typical example - * would be a GPU based particle system that provides a node material for usage on app level. The particle - * simulation would be implemented as compute shaders and managed inside a `Fn` function. This function is - * eventually assigned to `geometryNode`. - * - * @type {?Function} - * @default null - */ - geometryNode: Function | null; - /** - * Allows to overwrite depth values in the fragment shader. - * - * @type {?Node} - * @default null - */ - depthNode: Node | null; - /** - * Allows to overwrite the position used for shadow map rendering which - * is by default {@link positionWorld}, the vertex position - * in world space. - * - * @type {?Node} - * @default null - */ - receivedShadowPositionNode: Node | null; - /** - * Allows to overwrite the geometry position used for shadow map projection which - * is by default {@link positionLocal}, the vertex position in local space. - * - * @type {?Node} - * @default null - */ - castShadowPositionNode: Node | null; - /** - * This node can be used to influence how an object using this node material - * receive shadows. - * - * ```js - * const totalShadows = float( 1 ).toVar(); - * material.receivedShadowNode = Fn( ( [ shadow ] ) => { - * totalShadows.mulAssign( shadow ); - * //return float( 1 ); // bypass received shadows - * return shadow.mix( color( 0xff0000 ), 1 ); // modify shadow color - * } ); - * - * @type {?(Function|FunctionNode)} - * @default null - */ - receivedShadowNode: (Function | FunctionNode) | null; - /** - * This node can be used to influence how an object using this node material - * casts shadows. To apply a color to shadows, you can simply do: - * - * ```js - * material.castShadowNode = vec4( 1, 0, 0, 1 ); - * ``` - * - * Which can be nice to fake colored shadows of semi-transparent objects. It - * is also common to use the property with `Fn` function so checks are performed - * per fragment. - * - * ```js - * materialCustomShadow.castShadowNode = Fn( () => { - * hash( vertexIndex ).greaterThan( 0.5 ).discard(); - * return materialColor; - * } )(); - * ``` - * - * @type {?Node} - * @default null - */ - castShadowNode: Node | null; - /** - * This node can be used to define the final output of the material. - * - * TODO: Explain the differences to `fragmentNode`. - * - * @type {?Node} - * @default null - */ - outputNode: Node | null; - /** - * MRT configuration is done on renderer or pass level. This node allows to - * overwrite what values are written into MRT targets on material level. This - * can be useful for implementing selective FX features that should only affect - * specific objects. - * - * @type {?MRTNode} - * @default null - */ - mrtNode: MRTNode | null; - /** - * This node property can be used if you need complete freedom in implementing - * the fragment shader. Assigning a node will replace the built-in material - * logic used in the fragment stage. - * - * @type {?Node} - * @default null - */ - fragmentNode: Node | null; - /** - * This node property can be used if you need complete freedom in implementing - * the vertex shader. Assigning a node will replace the built-in material logic - * used in the vertex stage. - * - * @type {?Node} - * @default null - */ - vertexNode: Node | null; - /** - * This node can be used as a global context management component for this material. - * - * @type {?ContextNode} - * @default null - */ - contextNode: ContextNode | null; - /** - * Returns an array of child nodes for this material. - * - * @private - * @returns {Array<{property: string, childNode: Node}>} - */ - private _getNodeChildren; - /** - * Builds this material with the given node builder. - * - * @param {NodeBuilder} builder - The current node builder. - */ - build(builder: NodeBuilder): void; - /** - * Setups a node material observer with the given builder. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {NodeMaterialObserver} The node material observer. - */ - setupObserver(builder: NodeBuilder): NodeMaterialObserver; - /** - * Setups the vertex and fragment stage of this node material. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setup(builder: NodeBuilder): void; - /** - * Setups the clipping node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {ClippingNode} The clipping node. - */ - setupClipping(builder: NodeBuilder): ClippingNode; - /** - * Setups the hardware clipping if available on the current device. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setupHardwareClipping(builder: NodeBuilder): void; - /** - * Setups the depth of this material. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setupDepth(builder: NodeBuilder): void; - /** - * Setups the position node in view space. This method exists - * so derived node materials can modify the implementation e.g. sprite materials. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The position in view space. - */ - setupPositionView(): Node; - /** - * Setups the position in clip space. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The position in view space. - */ - setupModelViewProjection(): Node; - /** - * Setups the logic for the vertex stage. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The position in clip space. - */ - setupVertex(builder: NodeBuilder): Node; - /** - * Setups the computation of the position in local space. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The position in local space. - */ - setupPosition(builder: NodeBuilder): Node; - /** - * Setups the computation of the material's diffuse color. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {BufferGeometry} geometry - The geometry. - */ - setupDiffuseColor(builder: NodeBuilder): void; - /** - * Abstract interface method that can be implemented by derived materials - * to setup material-specific node variables. - * - * @abstract - * @param {NodeBuilder} builder - The current node builder. - */ - setupVariants(): void; - /** - * Setups the outgoing light node variable - * - * @return {Node} The outgoing light node. - */ - setupOutgoingLight(): Node; - /** - * Setups the normal node from the material. - * - * @return {Node} The normal node. - */ - setupNormal(): Node; - /** - * Setups the environment node from the material. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The environment node. - */ - setupEnvironment(): Node; - /** - * Setups the light map node from the material. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The light map node. - */ - setupLightMap(builder: NodeBuilder): Node; - /** - * Setups the lights node based on the scene, environment and material. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {LightsNode} The lights node. - */ - setupLights(builder: NodeBuilder): LightsNode; - /** - * This method should be implemented by most derived materials - * since it defines the material's lighting model. - * - * @abstract - * @param {NodeBuilder} builder - The current node builder. - * @return {LightingModel} The lighting model. - */ - setupLightingModel(): LightingModel; - /** - * Setups the outgoing light node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The outgoing light node. - */ - setupLighting(builder: NodeBuilder): Node; - /** - * Setup the fog. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {Node} outputNode - The existing output node. - * @return {Node} The output node. - */ - setupFog(builder: NodeBuilder, outputNode: Node): Node; - /** - * Setups premultiplied alpha. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {Node} outputNode - The existing output node. - * @return {Node} The output node. - */ - setupPremultipliedAlpha(builder: NodeBuilder, outputNode: Node): Node; - /** - * Setups the output node. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {Node} outputNode - The existing output node. - * @return {Node} The output node. - */ - setupOutput(builder: NodeBuilder, outputNode: Node): Node; - /** - * Most classic material types have a node pendant e.g. for `MeshBasicMaterial` - * there is `MeshBasicNodeMaterial`. This utility method is intended for - * defining all material properties of the classic type in the node type. - * - * @param {Material} material - The material to copy properties with their values to this node material. - */ - setDefaultValues(material: Material): void; - /** - * Copies the properties of the given node material to this instance. - * - * @param {NodeMaterial} source - The material to copy. - * @return {NodeMaterial} A reference to this node material. - */ - copy(source: NodeMaterial): NodeMaterial; -} -import { Material } from '../Material.js'; -import NodeMaterialObserver from './manager/NodeMaterialObserver.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/NodeMaterials.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/NodeMaterials.d.ts deleted file mode 100644 index 3ab3141d1..000000000 --- a/jsdoc-testing/jsdoc/src/materials/nodes/NodeMaterials.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export { default as NodeMaterialObserver } from "./manager/NodeMaterialObserver.js"; -export { default as NodeMaterial } from "./NodeMaterial.js"; -export { default as LineBasicNodeMaterial } from "./LineBasicNodeMaterial.js"; -export { default as LineDashedNodeMaterial } from "./LineDashedNodeMaterial.js"; -export { default as Line2NodeMaterial } from "./Line2NodeMaterial.js"; -export { default as MeshNormalNodeMaterial } from "./MeshNormalNodeMaterial.js"; -export { default as MeshBasicNodeMaterial } from "./MeshBasicNodeMaterial.js"; -export { default as MeshLambertNodeMaterial } from "./MeshLambertNodeMaterial.js"; -export { default as MeshPhongNodeMaterial } from "./MeshPhongNodeMaterial.js"; -export { default as MeshStandardNodeMaterial } from "./MeshStandardNodeMaterial.js"; -export { default as MeshPhysicalNodeMaterial } from "./MeshPhysicalNodeMaterial.js"; -export { default as MeshSSSNodeMaterial } from "./MeshSSSNodeMaterial.js"; -export { default as MeshToonNodeMaterial } from "./MeshToonNodeMaterial.js"; -export { default as MeshMatcapNodeMaterial } from "./MeshMatcapNodeMaterial.js"; -export { default as PointsNodeMaterial } from "./PointsNodeMaterial.js"; -export { default as SpriteNodeMaterial } from "./SpriteNodeMaterial.js"; -export { default as ShadowNodeMaterial } from "./ShadowNodeMaterial.js"; -export { default as VolumeNodeMaterial } from "./VolumeNodeMaterial.js"; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/PointsNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/PointsNodeMaterial.d.ts deleted file mode 100644 index 1a6e48eef..000000000 --- a/jsdoc-testing/jsdoc/src/materials/nodes/PointsNodeMaterial.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -export default PointsNodeMaterial; -/** - * Node material version of {@link PointsMaterial}. - * - * This material can be used in two ways: - * - * - By rendering point primitives with {@link Points}. Since WebGPU only supports point primitives - * with a pixel size of `1`, it's not possible to define a size. - * - * ```js - * const pointCloud = new THREE.Points( geometry, new THREE.PointsNodeMaterial() ); - * ``` - * - * - By rendering point primitives with {@link Sprites}. In this case, size is honored, - * see {@link PointsNodeMaterial#sizeNode}. - * - * ```js - * const instancedPoints = new THREE.Sprite( new THREE.PointsNodeMaterial( { positionNode: instancedBufferAttribute( positionAttribute ) } ) ); - * ``` - * - * @augments SpriteNodeMaterial - */ -declare class PointsNodeMaterial extends SpriteNodeMaterial { - /** - * This node property provides an additional way to set the point size. - * - * Note that WebGPU only supports point primitives with 1 pixel size. Consequently, - * this node has no effect when the material is used with {@link Points} and a WebGPU - * backend. If an application wants to render points with a size larger than 1 pixel, - * the material should be used with {@link Sprite} and instancing. - * - * @type {?Node} - * @default null - */ - sizeNode: Node | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isPointsNodeMaterial: boolean; - setupPositionView(): any; - setupVertexSprite(builder: any): any; - setupVertex(builder: any): any; - _useAlphaToCoverage: any; -} -import SpriteNodeMaterial from './SpriteNodeMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/ShadowNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/ShadowNodeMaterial.d.ts deleted file mode 100644 index edf904684..000000000 --- a/jsdoc-testing/jsdoc/src/materials/nodes/ShadowNodeMaterial.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -export default ShadowNodeMaterial; -/** - * Node material version of {@link ShadowMaterial}. - * - * @augments NodeMaterial - */ -declare class ShadowNodeMaterial extends NodeMaterial { - /** - * Constructs a new shadow node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isShadowNodeMaterial: boolean; - /** - * Setups the lighting model. - * - * @return {ShadowMaskModel} The lighting model. - */ - setupLightingModel(): ShadowMaskModel; -} -import NodeMaterial from './NodeMaterial.js'; -import ShadowMaskModel from '../../nodes/functions/ShadowMaskModel.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/SpriteNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/SpriteNodeMaterial.d.ts deleted file mode 100644 index 7f8da84d3..000000000 --- a/jsdoc-testing/jsdoc/src/materials/nodes/SpriteNodeMaterial.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -export default SpriteNodeMaterial; -/** - * Node material version of {@link SpriteMaterial}. - * - * @augments NodeMaterial - */ -declare class SpriteNodeMaterial extends NodeMaterial { - /** - * Constructs a new sprite node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSpriteNodeMaterial: boolean; - _useSizeAttenuation: boolean; - /** - * The rotation of sprite materials is by default inferred from the `rotation`, - * property. This node property allows to overwrite the default and define - * the rotation with a node instead. - * - * If you don't want to overwrite the rotation but modify the existing - * value instead, use {@link materialRotation}. - * - * @type {?Node} - * @default null - */ - rotationNode: Node | null; - /** - * This node property provides an additional way to scale sprites next to - * `Object3D.scale`. The scale transformation based in `Object3D.scale` - * is multiplied with the scale value of this node in the vertex shader. - * - * @type {?Node} - * @default null - */ - scaleNode: Node | null; - /** - * Setups the position node in view space. This method implements - * the sprite specific vertex shader. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The position in view space. - */ - setupPositionView(builder: NodeBuilder): Node; - copy(source: any): NodeMaterial; - set sizeAttenuation(value: boolean); - /** - * Whether to use size attenuation or not. - * - * @type {boolean} - * @default true - */ - get sizeAttenuation(): boolean; -} -import NodeMaterial from './NodeMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/VolumeNodeMaterial.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/VolumeNodeMaterial.d.ts deleted file mode 100644 index 8b5885c3c..000000000 --- a/jsdoc-testing/jsdoc/src/materials/nodes/VolumeNodeMaterial.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -export default VolumeNodeMaterial; -/** - * Volume node material. - * - * @augments NodeMaterial - */ -declare class VolumeNodeMaterial extends NodeMaterial { - /** - * Constructs a new volume node material. - * - * @param {Object} [parameters] - The configuration parameter. - */ - constructor(parameters?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isVolumeNodeMaterial: boolean; - /** - * Number of steps used for raymarching. - * - * @type {number} - * @default 25 - */ - steps: number; - /** - * Offsets the distance a ray has been traveled through a volume. - * Can be used to implement dithering to reduce banding. - * - * @type {Node} - * @default null - */ - offsetNode: Node; - /** - * Node used for scattering calculations. - * - * @type {Function|FunctionNode} - * @default null - */ - scatteringNode: Function | FunctionNode; - side: number; - setupLightingModel(): VolumetricLightingModel; -} -import NodeMaterial from './NodeMaterial.js'; -import VolumetricLightingModel from '../../nodes/functions/VolumetricLightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/materials/nodes/manager/NodeMaterialObserver.d.ts b/jsdoc-testing/jsdoc/src/materials/nodes/manager/NodeMaterialObserver.d.ts deleted file mode 100644 index 4d9e0160a..000000000 --- a/jsdoc-testing/jsdoc/src/materials/nodes/manager/NodeMaterialObserver.d.ts +++ /dev/null @@ -1,131 +0,0 @@ -export default NodeMaterialObserver; -/** - * This class is used by {@link WebGPURenderer} as management component. - * It's primary purpose is to determine whether render objects require a - * refresh right before they are going to be rendered or not. - */ -declare class NodeMaterialObserver { - /** - * Constructs a new node material observer. - * - * @param {NodeBuilder} builder - The node builder. - */ - constructor(builder: NodeBuilder); - /** - * A node material can be used by more than one render object so the - * monitor must maintain a list of render objects. - * - * @type {WeakMap} - */ - renderObjects: WeakMap; - /** - * Whether the material uses node objects or not. - * - * @type {boolean} - */ - hasNode: boolean; - /** - * Whether the node builder's 3D object is animated or not. - * - * @type {boolean} - */ - hasAnimation: boolean; - /** - * A list of all possible material uniforms - * - * @type {Array} - */ - refreshUniforms: Array; - /** - * Holds the current render ID from the node frame. - * - * @type {number} - * @default 0 - */ - renderId: number; - /** - * Returns `true` if the given render object is verified for the first time of this observer. - * - * @param {RenderObject} renderObject - The render object. - * @return {boolean} Whether the given render object is verified for the first time of this observer. - */ - firstInitialization(renderObject: RenderObject): boolean; - /** - * Returns `true` if the current rendering produces motion vectors. - * - * @param {Renderer} renderer - The renderer. - * @return {boolean} Whether the current rendering produces motion vectors or not. - */ - needsVelocity(renderer: Renderer): boolean; - /** - * Returns monitoring data for the given render object. - * - * @param {RenderObject} renderObject - The render object. - * @return {Object} The monitoring data. - */ - getRenderObjectData(renderObject: RenderObject): Object; - /** - * Returns an attribute data structure holding the attributes versions for - * monitoring. - * - * @param {Object} attributes - The geometry attributes. - * @return {Object} An object for monitoring the versions of attributes. - */ - getAttributesData(attributes: Object): Object; - /** - * Returns `true` if the node builder's material uses - * node properties. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {boolean} Whether the node builder's material uses node properties or not. - */ - containsNode(builder: NodeBuilder): boolean; - /** - * Returns a geometry data structure holding the geometry property values for - * monitoring. - * - * @param {BufferGeometry} geometry - The geometry. - * @return {Object} An object for monitoring geometry properties. - */ - getGeometryData(geometry: BufferGeometry): Object; - /** - * Returns a material data structure holding the material property values for - * monitoring. - * - * @param {Material} material - The material. - * @return {Object} An object for monitoring material properties. - */ - getMaterialData(material: Material): Object; - /** - * Returns `true` if the given render object has not changed its state. - * - * @param {RenderObject} renderObject - The render object. - * @param {Array} lightsData - The current material lights. - * @param {number} renderId - The current render ID. - * @return {boolean} Whether the given render object has changed its state or not. - */ - equals(renderObject: RenderObject, lightsData: Array, renderId: number): boolean; - /** - * Returns the lights data for the given material lights. - * - * @param {Array} materialLights - The material lights. - * @return {Array} The lights data for the given material lights. - */ - getLightsData(materialLights: Array, lights: any): Array; - /** - * Returns the lights for the given lights node and render ID. - * - * @param {LightsNode} lightsNode - The lights node. - * @param {number} renderId - The render ID. - * @return {Array} The lights for the given lights node and render ID. - */ - getLights(lightsNode: LightsNode, renderId: number): Array; - /** - * Checks if the given render object requires a refresh. - * - * @param {RenderObject} renderObject - The render object. - * @param {NodeFrame} nodeFrame - The current node frame. - * @return {boolean} Whether the given render object requires a refresh or not. - */ - needsRefresh(renderObject: RenderObject, nodeFrame: NodeFrame): boolean; -} diff --git a/jsdoc-testing/jsdoc/src/math/Box2.d.ts b/jsdoc-testing/jsdoc/src/math/Box2.d.ts deleted file mode 100644 index cc99e0f2f..000000000 --- a/jsdoc-testing/jsdoc/src/math/Box2.d.ts +++ /dev/null @@ -1,205 +0,0 @@ -/** - * Represents an axis-aligned bounding box (AABB) in 2D space. - */ -export class Box2 { - /** - * Constructs a new bounding box. - * - * @param {Vector2} [min=(Infinity,Infinity)] - A vector representing the lower boundary of the box. - * @param {Vector2} [max=(-Infinity,-Infinity)] - A vector representing the upper boundary of the box. - */ - constructor(min?: Vector2, max?: Vector2); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBox2: boolean; - /** - * The lower boundary of the box. - * - * @type {Vector2} - */ - min: Vector2; - /** - * The upper boundary of the box. - * - * @type {Vector2} - */ - max: Vector2; - /** - * Sets the lower and upper boundaries of this box. - * Please note that this method only copies the values from the given objects. - * - * @param {Vector2} min - The lower boundary of the box. - * @param {Vector2} max - The upper boundary of the box. - * @return {Box2} A reference to this bounding box. - */ - set(min: Vector2, max: Vector2): Box2; - /** - * Sets the upper and lower bounds of this box so it encloses the position data - * in the given array. - * - * @param {Array} points - An array holding 2D position data as instances of {@link Vector2}. - * @return {Box2} A reference to this bounding box. - */ - setFromPoints(points: Array): Box2; - /** - * Centers this box on the given center vector and sets this box's width, height and - * depth to the given size values. - * - * @param {Vector2} center - The center of the box. - * @param {Vector2} size - The x and y dimensions of the box. - * @return {Box2} A reference to this bounding box. - */ - setFromCenterAndSize(center: Vector2, size: Vector2): Box2; - /** - * Returns a new box with copied values from this instance. - * - * @return {Box2} A clone of this instance. - */ - clone(): Box2; - /** - * Copies the values of the given box to this instance. - * - * @param {Box2} box - The box to copy. - * @return {Box2} A reference to this bounding box. - */ - copy(box: Box2): Box2; - /** - * Makes this box empty which means in encloses a zero space in 2D. - * - * @return {Box2} A reference to this bounding box. - */ - makeEmpty(): Box2; - /** - * Returns true if this box includes zero points within its bounds. - * Note that a box with equal lower and upper bounds still includes one - * point, the one both bounds share. - * - * @return {boolean} Whether this box is empty or not. - */ - isEmpty(): boolean; - /** - * Returns the center point of this box. - * - * @param {Vector2} target - The target vector that is used to store the method's result. - * @return {Vector2} The center point. - */ - getCenter(target: Vector2): Vector2; - /** - * Returns the dimensions of this box. - * - * @param {Vector2} target - The target vector that is used to store the method's result. - * @return {Vector2} The size. - */ - getSize(target: Vector2): Vector2; - /** - * Expands the boundaries of this box to include the given point. - * - * @param {Vector2} point - The point that should be included by the bounding box. - * @return {Box2} A reference to this bounding box. - */ - expandByPoint(point: Vector2): Box2; - /** - * Expands this box equilaterally by the given vector. The width of this - * box will be expanded by the x component of the vector in both - * directions. The height of this box will be expanded by the y component of - * the vector in both directions. - * - * @param {Vector2} vector - The vector that should expand the bounding box. - * @return {Box2} A reference to this bounding box. - */ - expandByVector(vector: Vector2): Box2; - /** - * Expands each dimension of the box by the given scalar. If negative, the - * dimensions of the box will be contracted. - * - * @param {number} scalar - The scalar value that should expand the bounding box. - * @return {Box2} A reference to this bounding box. - */ - expandByScalar(scalar: number): Box2; - /** - * Returns `true` if the given point lies within or on the boundaries of this box. - * - * @param {Vector2} point - The point to test. - * @return {boolean} Whether the bounding box contains the given point or not. - */ - containsPoint(point: Vector2): boolean; - /** - * Returns `true` if this bounding box includes the entirety of the given bounding box. - * If this box and the given one are identical, this function also returns `true`. - * - * @param {Box2} box - The bounding box to test. - * @return {boolean} Whether the bounding box contains the given bounding box or not. - */ - containsBox(box: Box2): boolean; - /** - * Returns a point as a proportion of this box's width and height. - * - * @param {Vector2} point - A point in 2D space. - * @param {Vector2} target - The target vector that is used to store the method's result. - * @return {Vector2} A point as a proportion of this box's width and height. - */ - getParameter(point: Vector2, target: Vector2): Vector2; - /** - * Returns `true` if the given bounding box intersects with this bounding box. - * - * @param {Box2} box - The bounding box to test. - * @return {boolean} Whether the given bounding box intersects with this bounding box. - */ - intersectsBox(box: Box2): boolean; - /** - * Clamps the given point within the bounds of this box. - * - * @param {Vector2} point - The point to clamp. - * @param {Vector2} target - The target vector that is used to store the method's result. - * @return {Vector2} The clamped point. - */ - clampPoint(point: Vector2, target: Vector2): Vector2; - /** - * Returns the euclidean distance from any edge of this box to the specified point. If - * the given point lies inside of this box, the distance will be `0`. - * - * @param {Vector2} point - The point to compute the distance to. - * @return {number} The euclidean distance. - */ - distanceToPoint(point: Vector2): number; - /** - * Computes the intersection of this bounding box and the given one, setting the upper - * bound of this box to the lesser of the two boxes' upper bounds and the - * lower bound of this box to the greater of the two boxes' lower bounds. If - * there's no overlap, makes this box empty. - * - * @param {Box2} box - The bounding box to intersect with. - * @return {Box2} A reference to this bounding box. - */ - intersect(box: Box2): Box2; - /** - * Computes the union of this box and another and the given one, setting the upper - * bound of this box to the greater of the two boxes' upper bounds and the - * lower bound of this box to the lesser of the two boxes' lower bounds. - * - * @param {Box2} box - The bounding box that will be unioned with this instance. - * @return {Box2} A reference to this bounding box. - */ - union(box: Box2): Box2; - /** - * Adds the given offset to both the upper and lower bounds of this bounding box, - * effectively moving it in 2D space. - * - * @param {Vector2} offset - The offset that should be used to translate the bounding box. - * @return {Box2} A reference to this bounding box. - */ - translate(offset: Vector2): Box2; - /** - * Returns `true` if this bounding box is equal with the given one. - * - * @param {Box2} box - The box to test for equality. - * @return {boolean} Whether this bounding box is equal with the given one. - */ - equals(box: Box2): boolean; -} -import { Vector2 } from './Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Box3.d.ts b/jsdoc-testing/jsdoc/src/math/Box3.d.ts deleted file mode 100644 index b1c152106..000000000 --- a/jsdoc-testing/jsdoc/src/math/Box3.d.ts +++ /dev/null @@ -1,298 +0,0 @@ -/** - * Represents an axis-aligned bounding box (AABB) in 3D space. - */ -export class Box3 { - /** - * Constructs a new bounding box. - * - * @param {Vector3} [min=(Infinity,Infinity,Infinity)] - A vector representing the lower boundary of the box. - * @param {Vector3} [max=(-Infinity,-Infinity,-Infinity)] - A vector representing the upper boundary of the box. - */ - constructor(min?: Vector3, max?: Vector3); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBox3: boolean; - /** - * The lower boundary of the box. - * - * @type {Vector3} - */ - min: Vector3; - /** - * The upper boundary of the box. - * - * @type {Vector3} - */ - max: Vector3; - /** - * Sets the lower and upper boundaries of this box. - * Please note that this method only copies the values from the given objects. - * - * @param {Vector3} min - The lower boundary of the box. - * @param {Vector3} max - The upper boundary of the box. - * @return {Box3} A reference to this bounding box. - */ - set(min: Vector3, max: Vector3): Box3; - /** - * Sets the upper and lower bounds of this box so it encloses the position data - * in the given array. - * - * @param {Array} array - An array holding 3D position data. - * @return {Box3} A reference to this bounding box. - */ - setFromArray(array: Array): Box3; - /** - * Sets the upper and lower bounds of this box so it encloses the position data - * in the given buffer attribute. - * - * @param {BufferAttribute} attribute - A buffer attribute holding 3D position data. - * @return {Box3} A reference to this bounding box. - */ - setFromBufferAttribute(attribute: BufferAttribute): Box3; - /** - * Sets the upper and lower bounds of this box so it encloses the position data - * in the given array. - * - * @param {Array} points - An array holding 3D position data as instances of {@link Vector3}. - * @return {Box3} A reference to this bounding box. - */ - setFromPoints(points: Array): Box3; - /** - * Centers this box on the given center vector and sets this box's width, height and - * depth to the given size values. - * - * @param {Vector3} center - The center of the box. - * @param {Vector3} size - The x, y and z dimensions of the box. - * @return {Box3} A reference to this bounding box. - */ - setFromCenterAndSize(center: Vector3, size: Vector3): Box3; - /** - * Computes the world-axis-aligned bounding box for the given 3D object - * (including its children), accounting for the object's, and children's, - * world transforms. The function may result in a larger box than strictly necessary. - * - * Note: To compute the correct bounding box, make sure the given 3D object - * has an up-to-date world matrix that reflects the current transformation of its - * ancestor nodes. Call `object.updateWorldMatrix( true, false )` beforehand if - * you're unsure. - * - * @param {Object3D} object - The 3D object to compute the bounding box for. - * @param {boolean} [precise=false] - If set to `true`, the method computes the smallest - * world-axis-aligned bounding box at the expense of more computation. - * @return {Box3} A reference to this bounding box. - */ - setFromObject(object: Object3D, precise?: boolean): Box3; - /** - * Returns a new box with copied values from this instance. - * - * @return {Box3} A clone of this instance. - */ - clone(): Box3; - /** - * Copies the values of the given box to this instance. - * - * @param {Box3} box - The box to copy. - * @return {Box3} A reference to this bounding box. - */ - copy(box: Box3): Box3; - /** - * Makes this box empty which means in encloses a zero space in 3D. - * - * @return {Box3} A reference to this bounding box. - */ - makeEmpty(): Box3; - /** - * Returns true if this box includes zero points within its bounds. - * Note that a box with equal lower and upper bounds still includes one - * point, the one both bounds share. - * - * @return {boolean} Whether this box is empty or not. - */ - isEmpty(): boolean; - /** - * Returns the center point of this box. - * - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} The center point. - */ - getCenter(target: Vector3): Vector3; - /** - * Returns the dimensions of this box. - * - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} The size. - */ - getSize(target: Vector3): Vector3; - /** - * Expands the boundaries of this box to include the given point. - * - * @param {Vector3} point - The point that should be included by the bounding box. - * @return {Box3} A reference to this bounding box. - */ - expandByPoint(point: Vector3): Box3; - /** - * Expands this box equilaterally by the given vector. The width of this - * box will be expanded by the x component of the vector in both - * directions. The height of this box will be expanded by the y component of - * the vector in both directions. The depth of this box will be - * expanded by the z component of the vector in both directions. - * - * @param {Vector3} vector - The vector that should expand the bounding box. - * @return {Box3} A reference to this bounding box. - */ - expandByVector(vector: Vector3): Box3; - /** - * Expands each dimension of the box by the given scalar. If negative, the - * dimensions of the box will be contracted. - * - * @param {number} scalar - The scalar value that should expand the bounding box. - * @return {Box3} A reference to this bounding box. - */ - expandByScalar(scalar: number): Box3; - /** - * Expands the boundaries of this box to include the given 3D object and - * its children, accounting for the object's, and children's, world - * transforms. The function may result in a larger box than strictly - * necessary (unless the precise parameter is set to true). - * - * @param {Object3D} object - The 3D object that should expand the bounding box. - * @param {boolean} precise - If set to `true`, the method expands the bounding box - * as little as necessary at the expense of more computation. - * @return {Box3} A reference to this bounding box. - */ - expandByObject(object: Object3D, precise?: boolean): Box3; - /** - * Returns `true` if the given point lies within or on the boundaries of this box. - * - * @param {Vector3} point - The point to test. - * @return {boolean} Whether the bounding box contains the given point or not. - */ - containsPoint(point: Vector3): boolean; - /** - * Returns `true` if this bounding box includes the entirety of the given bounding box. - * If this box and the given one are identical, this function also returns `true`. - * - * @param {Box3} box - The bounding box to test. - * @return {boolean} Whether the bounding box contains the given bounding box or not. - */ - containsBox(box: Box3): boolean; - /** - * Returns a point as a proportion of this box's width, height and depth. - * - * @param {Vector3} point - A point in 3D space. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} A point as a proportion of this box's width, height and depth. - */ - getParameter(point: Vector3, target: Vector3): Vector3; - /** - * Returns `true` if the given bounding box intersects with this bounding box. - * - * @param {Box3} box - The bounding box to test. - * @return {boolean} Whether the given bounding box intersects with this bounding box. - */ - intersectsBox(box: Box3): boolean; - /** - * Returns `true` if the given bounding sphere intersects with this bounding box. - * - * @param {Sphere} sphere - The bounding sphere to test. - * @return {boolean} Whether the given bounding sphere intersects with this bounding box. - */ - intersectsSphere(sphere: Sphere): boolean; - /** - * Returns `true` if the given plane intersects with this bounding box. - * - * @param {Plane} plane - The plane to test. - * @return {boolean} Whether the given plane intersects with this bounding box. - */ - intersectsPlane(plane: Plane): boolean; - /** - * Returns `true` if the given triangle intersects with this bounding box. - * - * @param {Triangle} triangle - The triangle to test. - * @return {boolean} Whether the given triangle intersects with this bounding box. - */ - intersectsTriangle(triangle: Triangle): boolean; - /** - * Clamps the given point within the bounds of this box. - * - * @param {Vector3} point - The point to clamp. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} The clamped point. - */ - clampPoint(point: Vector3, target: Vector3): Vector3; - /** - * Returns the euclidean distance from any edge of this box to the specified point. If - * the given point lies inside of this box, the distance will be `0`. - * - * @param {Vector3} point - The point to compute the distance to. - * @return {number} The euclidean distance. - */ - distanceToPoint(point: Vector3): number; - /** - * Returns a bounding sphere that encloses this bounding box. - * - * @param {Sphere} target - The target sphere that is used to store the method's result. - * @return {Sphere} The bounding sphere that encloses this bounding box. - */ - getBoundingSphere(target: Sphere): Sphere; - /** - * Computes the intersection of this bounding box and the given one, setting the upper - * bound of this box to the lesser of the two boxes' upper bounds and the - * lower bound of this box to the greater of the two boxes' lower bounds. If - * there's no overlap, makes this box empty. - * - * @param {Box3} box - The bounding box to intersect with. - * @return {Box3} A reference to this bounding box. - */ - intersect(box: Box3): Box3; - /** - * Computes the union of this box and another and the given one, setting the upper - * bound of this box to the greater of the two boxes' upper bounds and the - * lower bound of this box to the lesser of the two boxes' lower bounds. - * - * @param {Box3} box - The bounding box that will be unioned with this instance. - * @return {Box3} A reference to this bounding box. - */ - union(box: Box3): Box3; - /** - * Transforms this bounding box by the given 4x4 transformation matrix. - * - * @param {Matrix4} matrix - The transformation matrix. - * @return {Box3} A reference to this bounding box. - */ - applyMatrix4(matrix: Matrix4): Box3; - /** - * Adds the given offset to both the upper and lower bounds of this bounding box, - * effectively moving it in 3D space. - * - * @param {Vector3} offset - The offset that should be used to translate the bounding box. - * @return {Box3} A reference to this bounding box. - */ - translate(offset: Vector3): Box3; - /** - * Returns `true` if this bounding box is equal with the given one. - * - * @param {Box3} box - The box to test for equality. - * @return {boolean} Whether this bounding box is equal with the given one. - */ - equals(box: Box3): boolean; - /** - * Returns a serialized structure of the bounding box. - * - * @return {Object} Serialized structure with fields representing the object state. - */ - toJSON(): Object; - /** - * Returns a serialized structure of the bounding box. - * - * @param {Object} json - The serialized json to set the box from. - * @return {Box3} A reference to this bounding box. - */ - fromJSON(json: Object): Box3; -} -import { Vector3 } from './Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Color.d.ts b/jsdoc-testing/jsdoc/src/math/Color.d.ts deleted file mode 100644 index 88445d822..000000000 --- a/jsdoc-testing/jsdoc/src/math/Color.d.ts +++ /dev/null @@ -1,538 +0,0 @@ -/** - * A Color instance is represented by RGB components in the linear working - * color space, which defaults to `LinearSRGBColorSpace`. Inputs - * conventionally using `SRGBColorSpace` (such as hexadecimals and CSS - * strings) are converted to the working color space automatically. - * - * ```js - * // converted automatically from SRGBColorSpace to LinearSRGBColorSpace - * const color = new THREE.Color().setHex( 0x112233 ); - * ``` - * Source color spaces may be specified explicitly, to ensure correct conversions. - * ```js - * // assumed already LinearSRGBColorSpace; no conversion - * const color = new THREE.Color().setRGB( 0.5, 0.5, 0.5 ); - * - * // converted explicitly from SRGBColorSpace to LinearSRGBColorSpace - * const color = new THREE.Color().setRGB( 0.5, 0.5, 0.5, SRGBColorSpace ); - * ``` - * If THREE.ColorManagement is disabled, no conversions occur. For details, - * see Color management. Iterating through a Color instance will yield - * its components (r, g, b) in the corresponding order. A Color can be initialised - * in any of the following ways: - * ```js - * //empty constructor - will default white - * const color1 = new THREE.Color(); - * - * //Hexadecimal color (recommended) - * const color2 = new THREE.Color( 0xff0000 ); - * - * //RGB string - * const color3 = new THREE.Color("rgb(255, 0, 0)"); - * const color4 = new THREE.Color("rgb(100%, 0%, 0%)"); - * - * //X11 color name - all 140 color names are supported. - * //Note the lack of CamelCase in the name - * const color5 = new THREE.Color( 'skyblue' ); - * //HSL string - * const color6 = new THREE.Color("hsl(0, 100%, 50%)"); - * - * //Separate RGB values between 0 and 1 - * const color7 = new THREE.Color( 1, 0, 0 ); - * ``` - */ -export class Color { - /** - * Constructs a new color. - * - * Note that standard method of specifying color in three.js is with a hexadecimal triplet, - * and that method is used throughout the rest of the documentation. - * - * @param {(number|string|Color)} [r] - The red component of the color. If `g` and `b` are - * not provided, it can be hexadecimal triplet, a CSS-style string or another `Color` instance. - * @param {number} [g] - The green component. - * @param {number} [b] - The blue component. - */ - constructor(r?: (number | string | Color), g?: number, b?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isColor: boolean; - /** - * The red component. - * - * @type {number} - * @default 1 - */ - r: number; - /** - * The green component. - * - * @type {number} - * @default 1 - */ - g: number; - /** - * The blue component. - * - * @type {number} - * @default 1 - */ - b: number; - /** - * Sets the colors's components from the given values. - * - * @param {(number|string|Color)} [r] - The red component of the color. If `g` and `b` are - * not provided, it can be hexadecimal triplet, a CSS-style string or another `Color` instance. - * @param {number} [g] - The green component. - * @param {number} [b] - The blue component. - * @return {Color} A reference to this color. - */ - set(r?: (number | string | Color), g?: number, b?: number): Color; - /** - * Sets the colors's components to the given scalar value. - * - * @param {number} scalar - The scalar value. - * @return {Color} A reference to this color. - */ - setScalar(scalar: number): Color; - /** - * Sets this color from a hexadecimal value. - * - * @param {number} hex - The hexadecimal value. - * @param {string} [colorSpace=SRGBColorSpace] - The color space. - * @return {Color} A reference to this color. - */ - setHex(hex: number, colorSpace?: string): Color; - /** - * Sets this color from RGB values. - * - * @param {number} r - Red channel value between `0.0` and `1.0`. - * @param {number} g - Green channel value between `0.0` and `1.0`. - * @param {number} b - Blue channel value between `0.0` and `1.0`. - * @param {string} [colorSpace=ColorManagement.workingColorSpace] - The color space. - * @return {Color} A reference to this color. - */ - setRGB(r: number, g: number, b: number, colorSpace?: string): Color; - /** - * Sets this color from RGB values. - * - * @param {number} h - Hue value between `0.0` and `1.0`. - * @param {number} s - Saturation value between `0.0` and `1.0`. - * @param {number} l - Lightness value between `0.0` and `1.0`. - * @param {string} [colorSpace=ColorManagement.workingColorSpace] - The color space. - * @return {Color} A reference to this color. - */ - setHSL(h: number, s: number, l: number, colorSpace?: string): Color; - /** - * Sets this color from a CSS-style string. For example, `rgb(250, 0,0)`, - * `rgb(100%, 0%, 0%)`, `hsl(0, 100%, 50%)`, `#ff0000`, `#f00`, or `red` ( or - * any [X11 color name](https://en.wikipedia.org/wiki/X11_color_names#Color_name_chart) - - * all 140 color names are supported). - * - * @param {string} style - Color as a CSS-style string. - * @param {string} [colorSpace=SRGBColorSpace] - The color space. - * @return {Color} A reference to this color. - */ - setStyle(style: string, colorSpace?: string): Color; - /** - * Sets this color from a color name. Faster than {@link Color#setStyle} if - * you don't need the other CSS-style formats. - * - * For convenience, the list of names is exposed in `Color.NAMES` as a hash. - * ```js - * Color.NAMES.aliceblue // returns 0xF0F8FF - * ``` - * - * @param {string} style - The color name. - * @param {string} [colorSpace=SRGBColorSpace] - The color space. - * @return {Color} A reference to this color. - */ - setColorName(style: string, colorSpace?: string): Color; - /** - * Returns a new color with copied values from this instance. - * - * @return {Color} A clone of this instance. - */ - clone(): Color; - /** - * Copies the values of the given color to this instance. - * - * @param {Color} color - The color to copy. - * @return {Color} A reference to this color. - */ - copy(color: Color): Color; - /** - * Copies the given color into this color, and then converts this color from - * `SRGBColorSpace` to `LinearSRGBColorSpace`. - * - * @param {Color} color - The color to copy/convert. - * @return {Color} A reference to this color. - */ - copySRGBToLinear(color: Color): Color; - /** - * Copies the given color into this color, and then converts this color from - * `LinearSRGBColorSpace` to `SRGBColorSpace`. - * - * @param {Color} color - The color to copy/convert. - * @return {Color} A reference to this color. - */ - copyLinearToSRGB(color: Color): Color; - /** - * Converts this color from `SRGBColorSpace` to `LinearSRGBColorSpace`. - * - * @return {Color} A reference to this color. - */ - convertSRGBToLinear(): Color; - /** - * Converts this color from `LinearSRGBColorSpace` to `SRGBColorSpace`. - * - * @return {Color} A reference to this color. - */ - convertLinearToSRGB(): Color; - /** - * Returns the hexadecimal value of this color. - * - * @param {string} [colorSpace=SRGBColorSpace] - The color space. - * @return {number} The hexadecimal value. - */ - getHex(colorSpace?: string): number; - /** - * Returns the hexadecimal value of this color as a string (for example, 'FFFFFF'). - * - * @param {string} [colorSpace=SRGBColorSpace] - The color space. - * @return {string} The hexadecimal value as a string. - */ - getHexString(colorSpace?: string): string; - /** - * Converts the colors RGB values into the HSL format and stores them into the - * given target object. - * - * @param {{h:number,s:number,l:number}} target - The target object that is used to store the method's result. - * @param {string} [colorSpace=ColorManagement.workingColorSpace] - The color space. - * @return {{h:number,s:number,l:number}} The HSL representation of this color. - */ - getHSL(target: { - h: number; - s: number; - l: number; - }, colorSpace?: string): { - h: number; - s: number; - l: number; - }; - /** - * Returns the RGB values of this color and stores them into the given target object. - * - * @param {Color} target - The target color that is used to store the method's result. - * @param {string} [colorSpace=ColorManagement.workingColorSpace] - The color space. - * @return {Color} The RGB representation of this color. - */ - getRGB(target: Color, colorSpace?: string): Color; - /** - * Returns the value of this color as a CSS style string. Example: `rgb(255,0,0)`. - * - * @param {string} [colorSpace=SRGBColorSpace] - The color space. - * @return {string} The CSS representation of this color. - */ - getStyle(colorSpace?: string): string; - /** - * Adds the given HSL values to this color's values. - * Internally, this converts the color's RGB values to HSL, adds HSL - * and then converts the color back to RGB. - * - * @param {number} h - Hue value between `0.0` and `1.0`. - * @param {number} s - Saturation value between `0.0` and `1.0`. - * @param {number} l - Lightness value between `0.0` and `1.0`. - * @return {Color} A reference to this color. - */ - offsetHSL(h: number, s: number, l: number): Color; - /** - * Adds the RGB values of the given color to the RGB values of this color. - * - * @param {Color} color - The color to add. - * @return {Color} A reference to this color. - */ - add(color: Color): Color; - /** - * Adds the RGB values of the given colors and stores the result in this instance. - * - * @param {Color} color1 - The first color. - * @param {Color} color2 - The second color. - * @return {Color} A reference to this color. - */ - addColors(color1: Color, color2: Color): Color; - /** - * Adds the given scalar value to the RGB values of this color. - * - * @param {number} s - The scalar to add. - * @return {Color} A reference to this color. - */ - addScalar(s: number): Color; - /** - * Subtracts the RGB values of the given color from the RGB values of this color. - * - * @param {Color} color - The color to subtract. - * @return {Color} A reference to this color. - */ - sub(color: Color): Color; - /** - * Multiplies the RGB values of the given color with the RGB values of this color. - * - * @param {Color} color - The color to multiply. - * @return {Color} A reference to this color. - */ - multiply(color: Color): Color; - /** - * Multiplies the given scalar value with the RGB values of this color. - * - * @param {number} s - The scalar to multiply. - * @return {Color} A reference to this color. - */ - multiplyScalar(s: number): Color; - /** - * Linearly interpolates this color's RGB values toward the RGB values of the - * given color. The alpha argument can be thought of as the ratio between - * the two colors, where `0.0` is this color and `1.0` is the first argument. - * - * @param {Color} color - The color to converge on. - * @param {number} alpha - The interpolation factor in the closed interval `[0,1]`. - * @return {Color} A reference to this color. - */ - lerp(color: Color, alpha: number): Color; - /** - * Linearly interpolates between the given colors and stores the result in this instance. - * The alpha argument can be thought of as the ratio between the two colors, where `0.0` - * is the first and `1.0` is the second color. - * - * @param {Color} color1 - The first color. - * @param {Color} color2 - The second color. - * @param {number} alpha - The interpolation factor in the closed interval `[0,1]`. - * @return {Color} A reference to this color. - */ - lerpColors(color1: Color, color2: Color, alpha: number): Color; - /** - * Linearly interpolates this color's HSL values toward the HSL values of the - * given color. It differs from {@link Color#lerp} by not interpolating straight - * from one color to the other, but instead going through all the hues in between - * those two colors. The alpha argument can be thought of as the ratio between - * the two colors, where 0.0 is this color and 1.0 is the first argument. - * - * @param {Color} color - The color to converge on. - * @param {number} alpha - The interpolation factor in the closed interval `[0,1]`. - * @return {Color} A reference to this color. - */ - lerpHSL(color: Color, alpha: number): Color; - /** - * Sets the color's RGB components from the given 3D vector. - * - * @param {Vector3} v - The vector to set. - * @return {Color} A reference to this color. - */ - setFromVector3(v: Vector3): Color; - /** - * Transforms this color with the given 3x3 matrix. - * - * @param {Matrix3} m - The matrix. - * @return {Color} A reference to this color. - */ - applyMatrix3(m: Matrix3): Color; - /** - * Returns `true` if this color is equal with the given one. - * - * @param {Color} c - The color to test for equality. - * @return {boolean} Whether this bounding color is equal with the given one. - */ - equals(c: Color): boolean; - /** - * Sets this color's RGB components from the given array. - * - * @param {Array} array - An array holding the RGB values. - * @param {number} [offset=0] - The offset into the array. - * @return {Color} A reference to this color. - */ - fromArray(array: Array, offset?: number): Color; - /** - * Writes the RGB components of this color to the given array. If no array is provided, - * the method returns a new instance. - * - * @param {Array} [array=[]] - The target array holding the color components. - * @param {number} [offset=0] - Index of the first element in the array. - * @return {Array} The color components. - */ - toArray(array?: Array, offset?: number): Array; - /** - * Sets the components of this color from the given buffer attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute holding color data. - * @param {number} index - The index into the attribute. - * @return {Color} A reference to this color. - */ - fromBufferAttribute(attribute: BufferAttribute, index: number): Color; - /** - * This methods defines the serialization result of this class. Returns the color - * as a hexadecimal value. - * - * @return {number} The hexadecimal value. - */ - toJSON(): number; - [Symbol.iterator](): Generator; -} -export namespace Color { - export { _colorKeywords as NAMES }; -} -declare namespace _colorKeywords { - let aliceblue: number; - let antiquewhite: number; - let aqua: number; - let aquamarine: number; - let azure: number; - let beige: number; - let bisque: number; - let black: number; - let blanchedalmond: number; - let blue: number; - let blueviolet: number; - let brown: number; - let burlywood: number; - let cadetblue: number; - let chartreuse: number; - let chocolate: number; - let coral: number; - let cornflowerblue: number; - let cornsilk: number; - let crimson: number; - let cyan: number; - let darkblue: number; - let darkcyan: number; - let darkgoldenrod: number; - let darkgray: number; - let darkgreen: number; - let darkgrey: number; - let darkkhaki: number; - let darkmagenta: number; - let darkolivegreen: number; - let darkorange: number; - let darkorchid: number; - let darkred: number; - let darksalmon: number; - let darkseagreen: number; - let darkslateblue: number; - let darkslategray: number; - let darkslategrey: number; - let darkturquoise: number; - let darkviolet: number; - let deeppink: number; - let deepskyblue: number; - let dimgray: number; - let dimgrey: number; - let dodgerblue: number; - let firebrick: number; - let floralwhite: number; - let forestgreen: number; - let fuchsia: number; - let gainsboro: number; - let ghostwhite: number; - let gold: number; - let goldenrod: number; - let gray: number; - let green: number; - let greenyellow: number; - let grey: number; - let honeydew: number; - let hotpink: number; - let indianred: number; - let indigo: number; - let ivory: number; - let khaki: number; - let lavender: number; - let lavenderblush: number; - let lawngreen: number; - let lemonchiffon: number; - let lightblue: number; - let lightcoral: number; - let lightcyan: number; - let lightgoldenrodyellow: number; - let lightgray: number; - let lightgreen: number; - let lightgrey: number; - let lightpink: number; - let lightsalmon: number; - let lightseagreen: number; - let lightskyblue: number; - let lightslategray: number; - let lightslategrey: number; - let lightsteelblue: number; - let lightyellow: number; - let lime: number; - let limegreen: number; - let linen: number; - let magenta: number; - let maroon: number; - let mediumaquamarine: number; - let mediumblue: number; - let mediumorchid: number; - let mediumpurple: number; - let mediumseagreen: number; - let mediumslateblue: number; - let mediumspringgreen: number; - let mediumturquoise: number; - let mediumvioletred: number; - let midnightblue: number; - let mintcream: number; - let mistyrose: number; - let moccasin: number; - let navajowhite: number; - let navy: number; - let oldlace: number; - let olive: number; - let olivedrab: number; - let orange: number; - let orangered: number; - let orchid: number; - let palegoldenrod: number; - let palegreen: number; - let paleturquoise: number; - let palevioletred: number; - let papayawhip: number; - let peachpuff: number; - let peru: number; - let pink: number; - let plum: number; - let powderblue: number; - let purple: number; - let rebeccapurple: number; - let red: number; - let rosybrown: number; - let royalblue: number; - let saddlebrown: number; - let salmon: number; - let sandybrown: number; - let seagreen: number; - let seashell: number; - let sienna: number; - let silver: number; - let skyblue: number; - let slateblue: number; - let slategray: number; - let slategrey: number; - let snow: number; - let springgreen: number; - let steelblue: number; - let tan: number; - let teal: number; - let thistle: number; - let tomato: number; - let turquoise: number; - let violet: number; - let wheat: number; - let white: number; - let whitesmoke: number; - let yellow: number; - let yellowgreen: number; -} -export {}; diff --git a/jsdoc-testing/jsdoc/src/math/ColorManagement.d.ts b/jsdoc-testing/jsdoc/src/math/ColorManagement.d.ts deleted file mode 100644 index 63d1502b9..000000000 --- a/jsdoc-testing/jsdoc/src/math/ColorManagement.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export function SRGBToLinear(c: any): number; -export function LinearToSRGB(c: any): number; -export namespace ColorManagement { - export let enabled: boolean; - export { LinearSRGBColorSpace as workingColorSpace }; - export let spaces: {}; - export function convert(color: any, sourceColorSpace: any, targetColorSpace: any): any; - export function workingToColorSpace(color: any, targetColorSpace: any): any; - export function colorSpaceToWorking(color: any, sourceColorSpace: any): any; - export function getPrimaries(colorSpace: any): any; - export function getTransfer(colorSpace: any): any; - export function getToneMappingMode(colorSpace: any): any; - export function getLuminanceCoefficients(target: any, colorSpace?: any): any; - export function define(colorSpaces: any): void; - export function _getMatrix(targetMatrix: any, sourceColorSpace: any, targetColorSpace: any): any; - export function _getDrawingBufferColorSpace(colorSpace: any): any; - export function _getUnpackColorSpace(colorSpace?: any): any; - export function fromWorkingColorSpace(color: any, targetColorSpace: any): any; - export function toWorkingColorSpace(color: any, sourceColorSpace: any): any; -} -import { LinearSRGBColorSpace } from '../constants.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Cylindrical.d.ts b/jsdoc-testing/jsdoc/src/math/Cylindrical.d.ts deleted file mode 100644 index 8c5d91627..000000000 --- a/jsdoc-testing/jsdoc/src/math/Cylindrical.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This class can be used to represent points in 3D space as - * [Cylindrical coordinates](https://en.wikipedia.org/wiki/Cylindrical_coordinate_system). - */ -export class Cylindrical { - /** - * Constructs a new cylindrical. - * - * @param {number} [radius=1] - The distance from the origin to a point in the x-z plane. - * @param {number} [theta=0] - A counterclockwise angle in the x-z plane measured in radians from the positive z-axis. - * @param {number} [y=0] - The height above the x-z plane. - */ - constructor(radius?: number, theta?: number, y?: number); - /** - * The distance from the origin to a point in the x-z plane. - * - * @type {number} - * @default 1 - */ - radius: number; - /** - * A counterclockwise angle in the x-z plane measured in radians from the positive z-axis. - * - * @type {number} - * @default 0 - */ - theta: number; - /** - * The height above the x-z plane. - * - * @type {number} - * @default 0 - */ - y: number; - /** - * Sets the cylindrical components by copying the given values. - * - * @param {number} radius - The radius. - * @param {number} theta - The theta angle. - * @param {number} y - The height value. - * @return {Cylindrical} A reference to this cylindrical. - */ - set(radius: number, theta: number, y: number): Cylindrical; - /** - * Copies the values of the given cylindrical to this instance. - * - * @param {Cylindrical} other - The cylindrical to copy. - * @return {Cylindrical} A reference to this cylindrical. - */ - copy(other: Cylindrical): Cylindrical; - /** - * Sets the cylindrical components from the given vector which is assumed to hold - * Cartesian coordinates. - * - * @param {Vector3} v - The vector to set. - * @return {Cylindrical} A reference to this cylindrical. - */ - setFromVector3(v: Vector3): Cylindrical; - /** - * Sets the cylindrical components from the given Cartesian coordinates. - * - * @param {number} x - The x value. - * @param {number} y - The x value. - * @param {number} z - The x value. - * @return {Cylindrical} A reference to this cylindrical. - */ - setFromCartesianCoords(x: number, y: number, z: number): Cylindrical; - /** - * Returns a new cylindrical with copied values from this instance. - * - * @return {Cylindrical} A clone of this instance. - */ - clone(): Cylindrical; -} diff --git a/jsdoc-testing/jsdoc/src/math/Euler.d.ts b/jsdoc-testing/jsdoc/src/math/Euler.d.ts deleted file mode 100644 index 8ba21b0f2..000000000 --- a/jsdoc-testing/jsdoc/src/math/Euler.d.ts +++ /dev/null @@ -1,164 +0,0 @@ -/** - * A class representing Euler angles. - * - * Euler angles describe a rotational transformation by rotating an object on - * its various axes in specified amounts per axis, and a specified axis - * order. - * - * Iterating through an instance will yield its components (x, y, z, - * order) in the corresponding order. - * - * ```js - * const a = new THREE.Euler( 0, 1, 1.57, 'XYZ' ); - * const b = new THREE.Vector3( 1, 0, 1 ); - * b.applyEuler(a); - * ``` - */ -export class Euler { - /** - * Constructs a new euler instance. - * - * @param {number} [x=0] - The angle of the x axis in radians. - * @param {number} [y=0] - The angle of the y axis in radians. - * @param {number} [z=0] - The angle of the z axis in radians. - * @param {string} [order=Euler.DEFAULT_ORDER] - A string representing the order that the rotations are applied. - */ - constructor(x?: number, y?: number, z?: number, order?: string); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isEuler: boolean; - _x: number; - _y: number; - _z: number; - _order: string; - set x(value: number); - /** - * The angle of the x axis in radians. - * - * @type {number} - * @default 0 - */ - get x(): number; - set y(value: number); - /** - * The angle of the y axis in radians. - * - * @type {number} - * @default 0 - */ - get y(): number; - set z(value: number); - /** - * The angle of the z axis in radians. - * - * @type {number} - * @default 0 - */ - get z(): number; - set order(value: string); - /** - * A string representing the order that the rotations are applied. - * - * @type {string} - * @default 'XYZ' - */ - get order(): string; - /** - * Sets the Euler components. - * - * @param {number} x - The angle of the x axis in radians. - * @param {number} y - The angle of the y axis in radians. - * @param {number} z - The angle of the z axis in radians. - * @param {string} [order] - A string representing the order that the rotations are applied. - * @return {Euler} A reference to this Euler instance. - */ - set(x: number, y: number, z: number, order?: string): Euler; - /** - * Returns a new Euler instance with copied values from this instance. - * - * @return {Euler} A clone of this instance. - */ - clone(): Euler; - /** - * Copies the values of the given Euler instance to this instance. - * - * @param {Euler} euler - The Euler instance to copy. - * @return {Euler} A reference to this Euler instance. - */ - copy(euler: Euler): Euler; - /** - * Sets the angles of this Euler instance from a pure rotation matrix. - * - * @param {Matrix4} m - A 4x4 matrix of which the upper 3x3 of matrix is a pure rotation matrix (i.e. unscaled). - * @param {string} [order] - A string representing the order that the rotations are applied. - * @param {boolean} [update=true] - Whether the internal `onChange` callback should be executed or not. - * @return {Euler} A reference to this Euler instance. - */ - setFromRotationMatrix(m: Matrix4, order?: string, update?: boolean): Euler; - /** - * Sets the angles of this Euler instance from a normalized quaternion. - * - * @param {Quaternion} q - A normalized Quaternion. - * @param {string} [order] - A string representing the order that the rotations are applied. - * @param {boolean} [update=true] - Whether the internal `onChange` callback should be executed or not. - * @return {Euler} A reference to this Euler instance. - */ - setFromQuaternion(q: Quaternion, order?: string, update?: boolean): Euler; - /** - * Sets the angles of this Euler instance from the given vector. - * - * @param {Vector3} v - The vector. - * @param {string} [order] - A string representing the order that the rotations are applied. - * @return {Euler} A reference to this Euler instance. - */ - setFromVector3(v: Vector3, order?: string): Euler; - /** - * Resets the euler angle with a new order by creating a quaternion from this - * euler angle and then setting this euler angle with the quaternion and the - * new order. - * - * Warning: This discards revolution information. - * - * @param {string} [newOrder] - A string representing the new order that the rotations are applied. - * @return {Euler} A reference to this Euler instance. - */ - reorder(newOrder?: string): Euler; - /** - * Returns `true` if this Euler instance is equal with the given one. - * - * @param {Euler} euler - The Euler instance to test for equality. - * @return {boolean} Whether this Euler instance is equal with the given one. - */ - equals(euler: Euler): boolean; - /** - * Sets this Euler instance's components to values from the given array. The first three - * entries of the array are assign to the x,y and z components. An optional fourth entry - * defines the Euler order. - * - * @param {Array} array - An array holding the Euler component values. - * @return {Euler} A reference to this Euler instance. - */ - fromArray(array: Array): Euler; - /** - * Writes the components of this Euler instance to the given array. If no array is provided, - * the method returns a new instance. - * - * @param {Array} [array=[]] - The target array holding the Euler components. - * @param {number} [offset=0] - Index of the first element in the array. - * @return {Array} The Euler components. - */ - toArray(array?: Array, offset?: number): Array; - _onChange(callback: any): this; - _onChangeCallback(): void; - [Symbol.iterator](): Generator; -} -export namespace Euler { - let DEFAULT_ORDER: string; -} -import { Matrix4 } from './Matrix4.js'; -import { Quaternion } from './Quaternion.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Frustum.d.ts b/jsdoc-testing/jsdoc/src/math/Frustum.d.ts deleted file mode 100644 index d6e9231b3..000000000 --- a/jsdoc-testing/jsdoc/src/math/Frustum.d.ts +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Frustums are used to determine what is inside the camera's field of view. - * They help speed up the rendering process - objects which lie outside a camera's - * frustum can safely be excluded from rendering. - * - * This class is mainly intended for use internally by a renderer. - */ -export class Frustum { - /** - * Constructs a new frustum. - * - * @param {Plane} [p0] - The first plane that encloses the frustum. - * @param {Plane} [p1] - The second plane that encloses the frustum. - * @param {Plane} [p2] - The third plane that encloses the frustum. - * @param {Plane} [p3] - The fourth plane that encloses the frustum. - * @param {Plane} [p4] - The fifth plane that encloses the frustum. - * @param {Plane} [p5] - The sixth plane that encloses the frustum. - */ - constructor(p0?: Plane, p1?: Plane, p2?: Plane, p3?: Plane, p4?: Plane, p5?: Plane); - /** - * This array holds the planes that enclose the frustum. - * - * @type {Array} - */ - planes: Array; - /** - * Sets the frustum planes by copying the given planes. - * - * @param {Plane} [p0] - The first plane that encloses the frustum. - * @param {Plane} [p1] - The second plane that encloses the frustum. - * @param {Plane} [p2] - The third plane that encloses the frustum. - * @param {Plane} [p3] - The fourth plane that encloses the frustum. - * @param {Plane} [p4] - The fifth plane that encloses the frustum. - * @param {Plane} [p5] - The sixth plane that encloses the frustum. - * @return {Frustum} A reference to this frustum. - */ - set(p0?: Plane, p1?: Plane, p2?: Plane, p3?: Plane, p4?: Plane, p5?: Plane): Frustum; - /** - * Copies the values of the given frustum to this instance. - * - * @param {Frustum} frustum - The frustum to copy. - * @return {Frustum} A reference to this frustum. - */ - copy(frustum: Frustum): Frustum; - /** - * Sets the frustum planes from the given projection matrix. - * - * @param {Matrix4} m - The projection matrix. - * @param {(WebGLCoordinateSystem|WebGPUCoordinateSystem)} coordinateSystem - The coordinate system. - * @param {boolean} [reversedDepth=false] - Whether to use a reversed depth. - * @return {Frustum} A reference to this frustum. - */ - setFromProjectionMatrix(m: Matrix4, coordinateSystem?: (number | number), reversedDepth?: boolean): Frustum; - /** - * Returns `true` if the 3D object's bounding sphere is intersecting this frustum. - * - * Note that the 3D object must have a geometry so that the bounding sphere can be calculated. - * - * @param {Object3D} object - The 3D object to test. - * @return {boolean} Whether the 3D object's bounding sphere is intersecting this frustum or not. - */ - intersectsObject(object: Object3D): boolean; - /** - * Returns `true` if the given sprite is intersecting this frustum. - * - * @param {Sprite} sprite - The sprite to test. - * @return {boolean} Whether the sprite is intersecting this frustum or not. - */ - intersectsSprite(sprite: Sprite): boolean; - /** - * Returns `true` if the given bounding sphere is intersecting this frustum. - * - * @param {Sphere} sphere - The bounding sphere to test. - * @return {boolean} Whether the bounding sphere is intersecting this frustum or not. - */ - intersectsSphere(sphere: Sphere): boolean; - /** - * Returns `true` if the given bounding box is intersecting this frustum. - * - * @param {Box3} box - The bounding box to test. - * @return {boolean} Whether the bounding box is intersecting this frustum or not. - */ - intersectsBox(box: Box3): boolean; - /** - * Returns `true` if the given point lies within the frustum. - * - * @param {Vector3} point - The point to test. - * @return {boolean} Whether the point lies within this frustum or not. - */ - containsPoint(point: Vector3): boolean; - /** - * Returns a new frustum with copied values from this instance. - * - * @return {Frustum} A clone of this instance. - */ - clone(): Frustum; -} -import { Plane } from './Plane.js'; -import { Sphere } from './Sphere.js'; -import { Vector3 } from './Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/math/FrustumArray.d.ts b/jsdoc-testing/jsdoc/src/math/FrustumArray.d.ts deleted file mode 100644 index f5f5b4bd9..000000000 --- a/jsdoc-testing/jsdoc/src/math/FrustumArray.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * FrustumArray is used to determine if an object is visible in at least one camera - * from an array of cameras. This is particularly useful for multi-view renderers. -*/ -export class FrustumArray { - /** - * The coordinate system to use. - * - * @type {WebGLCoordinateSystem|WebGPUCoordinateSystem} - * @default WebGLCoordinateSystem - */ - coordinateSystem: number | WebGPUCoordinateSystem; - /** - * Returns `true` if the 3D object's bounding sphere is intersecting any frustum - * from the camera array. - * - * @param {Object3D} object - The 3D object to test. - * @param {Object} cameraArray - An object with a cameras property containing an array of cameras. - * @return {boolean} Whether the 3D object is visible in any camera. - */ - intersectsObject(object: Object3D, cameraArray: Object): boolean; - /** - * Returns `true` if the given sprite is intersecting any frustum - * from the camera array. - * - * @param {Sprite} sprite - The sprite to test. - * @param {Object} cameraArray - An object with a cameras property containing an array of cameras. - * @return {boolean} Whether the sprite is visible in any camera. - */ - intersectsSprite(sprite: Sprite, cameraArray: Object): boolean; - /** - * Returns `true` if the given bounding sphere is intersecting any frustum - * from the camera array. - * - * @param {Sphere} sphere - The bounding sphere to test. - * @param {Object} cameraArray - An object with a cameras property containing an array of cameras. - * @return {boolean} Whether the sphere is visible in any camera. - */ - intersectsSphere(sphere: Sphere, cameraArray: Object): boolean; - /** - * Returns `true` if the given bounding box is intersecting any frustum - * from the camera array. - * - * @param {Box3} box - The bounding box to test. - * @param {Object} cameraArray - An object with a cameras property containing an array of cameras. - * @return {boolean} Whether the box is visible in any camera. - */ - intersectsBox(box: Box3, cameraArray: Object): boolean; - /** - * Returns `true` if the given point lies within any frustum - * from the camera array. - * - * @param {Vector3} point - The point to test. - * @param {Object} cameraArray - An object with a cameras property containing an array of cameras. - * @return {boolean} Whether the point is visible in any camera. - */ - containsPoint(point: Vector3, cameraArray: Object): boolean; - /** - * Returns a new frustum array with copied values from this instance. - * - * @return {FrustumArray} A clone of this instance. - */ - clone(): FrustumArray; -} diff --git a/jsdoc-testing/jsdoc/src/math/Interpolant.d.ts b/jsdoc-testing/jsdoc/src/math/Interpolant.d.ts deleted file mode 100644 index 561415c0e..000000000 --- a/jsdoc-testing/jsdoc/src/math/Interpolant.d.ts +++ /dev/null @@ -1,114 +0,0 @@ -/** - * Abstract base class of interpolants over parametric samples. - * - * The parameter domain is one dimensional, typically the time or a path - * along a curve defined by the data. - * - * The sample values can have any dimensionality and derived classes may - * apply special interpretations to the data. - * - * This class provides the interval seek in a Template Method, deferring - * the actual interpolation to derived classes. - * - * Time complexity is O(1) for linear access crossing at most two points - * and O(log N) for random access, where N is the number of positions. - * - * References: {@link http://www.oodesign.com/template-method-pattern.html} - * - * @abstract - */ -export class Interpolant { - /** - * Constructs a new interpolant. - * - * @param {TypedArray} parameterPositions - The parameter positions hold the interpolation factors. - * @param {TypedArray} sampleValues - The sample values. - * @param {number} sampleSize - The sample size - * @param {TypedArray} [resultBuffer] - The result buffer. - */ - constructor(parameterPositions: TypedArray, sampleValues: TypedArray, sampleSize: number, resultBuffer?: TypedArray); - /** - * The parameter positions. - * - * @type {TypedArray} - */ - parameterPositions: TypedArray; - /** - * A cache index. - * - * @private - * @type {number} - * @default 0 - */ - private _cachedIndex; - /** - * The result buffer. - * - * @type {TypedArray} - */ - resultBuffer: TypedArray; - /** - * The sample values. - * - * @type {TypedArray} - */ - sampleValues: TypedArray; - /** - * The value size. - * - * @type {TypedArray} - */ - valueSize: TypedArray; - /** - * The interpolation settings. - * - * @type {?Object} - * @default null - */ - settings: Object | null; - /** - * The default settings object. - * - * @type {Object} - */ - DefaultSettings_: Object; - /** - * Evaluate the interpolant at position `t`. - * - * @param {number} t - The interpolation factor. - * @return {TypedArray} The result buffer. - */ - evaluate(t: number): TypedArray; - /** - * Returns the interpolation settings. - * - * @return {Object} The interpolation settings. - */ - getSettings_(): Object; - /** - * Copies a sample value to the result buffer. - * - * @param {number} index - An index into the sample value buffer. - * @return {TypedArray} The result buffer. - */ - copySampleValue_(index: number): TypedArray; - /** - * Copies a sample value to the result buffer. - * - * @abstract - * @param {number} i1 - An index into the sample value buffer. - * @param {number} t0 - The previous interpolation factor. - * @param {number} t - The current interpolation factor. - * @param {number} t1 - The next interpolation factor. - * @return {TypedArray} The result buffer. - */ - interpolate_(): TypedArray; - /** - * Optional method that is executed when the interval has changed. - * - * @param {number} i1 - An index into the sample value buffer. - * @param {number} t0 - The previous interpolation factor. - * @param {number} t - The current interpolation factor. - */ - intervalChanged_(): void; -} diff --git a/jsdoc-testing/jsdoc/src/math/Line3.d.ts b/jsdoc-testing/jsdoc/src/math/Line3.d.ts deleted file mode 100644 index 339e53546..000000000 --- a/jsdoc-testing/jsdoc/src/math/Line3.d.ts +++ /dev/null @@ -1,120 +0,0 @@ -/** - * An analytical line segment in 3D space represented by a start and end point. - */ -export class Line3 { - /** - * Constructs a new line segment. - * - * @param {Vector3} [start=(0,0,0)] - Start of the line segment. - * @param {Vector3} [end=(0,0,0)] - End of the line segment. - */ - constructor(start?: Vector3, end?: Vector3); - /** - * Start of the line segment. - * - * @type {Vector3} - */ - start: Vector3; - /** - * End of the line segment. - * - * @type {Vector3} - */ - end: Vector3; - /** - * Sets the start and end values by copying the given vectors. - * - * @param {Vector3} start - The start point. - * @param {Vector3} end - The end point. - * @return {Line3} A reference to this line segment. - */ - set(start: Vector3, end: Vector3): Line3; - /** - * Copies the values of the given line segment to this instance. - * - * @param {Line3} line - The line segment to copy. - * @return {Line3} A reference to this line segment. - */ - copy(line: Line3): Line3; - /** - * Returns the center of the line segment. - * - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} The center point. - */ - getCenter(target: Vector3): Vector3; - /** - * Returns the delta vector of the line segment's start and end point. - * - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} The delta vector. - */ - delta(target: Vector3): Vector3; - /** - * Returns the squared Euclidean distance between the line' start and end point. - * - * @return {number} The squared Euclidean distance. - */ - distanceSq(): number; - /** - * Returns the Euclidean distance between the line' start and end point. - * - * @return {number} The Euclidean distance. - */ - distance(): number; - /** - * Returns a vector at a certain position along the line segment. - * - * @param {number} t - A value between `[0,1]` to represent a position along the line segment. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} The delta vector. - */ - at(t: number, target: Vector3): Vector3; - /** - * Returns a point parameter based on the closest point as projected on the line segment. - * - * @param {Vector3} point - The point for which to return a point parameter. - * @param {boolean} clampToLine - Whether to clamp the result to the range `[0,1]` or not. - * @return {number} The point parameter. - */ - closestPointToPointParameter(point: Vector3, clampToLine: boolean): number; - /** - * Returns the closest point on the line for a given point. - * - * @param {Vector3} point - The point to compute the closest point on the line for. - * @param {boolean} clampToLine - Whether to clamp the result to the range `[0,1]` or not. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} The closest point on the line. - */ - closestPointToPoint(point: Vector3, clampToLine: boolean, target: Vector3): Vector3; - /** - * Returns the closest squared distance between this line segment and the given one. - * - * @param {Line3} line - The line segment to compute the closest squared distance to. - * @param {Vector3} [c1] - The closest point on this line segment. - * @param {Vector3} [c2] - The closest point on the given line segment. - * @return {number} The squared distance between this line segment and the given one. - */ - distanceSqToLine3(line: Line3, c1?: Vector3, c2?: Vector3): number; - /** - * Applies a 4x4 transformation matrix to this line segment. - * - * @param {Matrix4} matrix - The transformation matrix. - * @return {Line3} A reference to this line segment. - */ - applyMatrix4(matrix: Matrix4): Line3; - /** - * Returns `true` if this line segment is equal with the given one. - * - * @param {Line3} line - The line segment to test for equality. - * @return {boolean} Whether this line segment is equal with the given one. - */ - equals(line: Line3): boolean; - /** - * Returns a new line segment with copied values from this instance. - * - * @return {Line3} A clone of this instance. - */ - clone(): Line3; -} -import { Vector3 } from './Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/math/MathUtils.d.ts b/jsdoc-testing/jsdoc/src/math/MathUtils.d.ts deleted file mode 100644 index bc4d11f77..000000000 --- a/jsdoc-testing/jsdoc/src/math/MathUtils.d.ts +++ /dev/null @@ -1,224 +0,0 @@ -export const DEG2RAD: number; -export const RAD2DEG: number; -/** - * Generate a [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) - * (universally unique identifier). - * - * @return {string} The UUID. - */ -export function generateUUID(): string; -/** - * Clamps the given value between min and max. - * - * @param {number} value - The value to clamp. - * @param {number} min - The min value. - * @param {number} max - The max value. - * @return {number} The clamped value. - */ -export function clamp(value: number, min: number, max: number): number; -/** - * Computes the Euclidean modulo of the given parameters that - * is `( ( n % m ) + m ) % m`. - * - * @param {number} n - The first parameter. - * @param {number} m - The second parameter. - * @return {number} The Euclidean modulo. - */ -export function euclideanModulo(n: number, m: number): number; -/** - * Performs a linear mapping from range `` to range `` - * for the given value. `a2` must be greater than `a1`. - * - * @param {number} x - The value to be mapped. - * @param {number} a1 - Minimum value for range A. - * @param {number} a2 - Maximum value for range A. - * @param {number} b1 - Minimum value for range B. - * @param {number} b2 - Maximum value for range B. - * @return {number} The mapped value. - */ -export function mapLinear(x: number, a1: number, a2: number, b1: number, b2: number): number; -/** - * Returns the percentage in the closed interval `[0, 1]` of the given value - * between the start and end point. - * - * @param {number} x - The start point - * @param {number} y - The end point. - * @param {number} value - A value between start and end. - * @return {number} The interpolation factor. - */ -export function inverseLerp(x: number, y: number, value: number): number; -/** - * Returns a value linearly interpolated from two known points based on the given interval - - * `t = 0` will return `x` and `t = 1` will return `y`. - * - * @param {number} x - The start point - * @param {number} y - The end point. - * @param {number} t - The interpolation factor in the closed interval `[0, 1]`. - * @return {number} The interpolated value. - */ -export function lerp(x: number, y: number, t: number): number; -/** - * Smoothly interpolate a number from `x` to `y` in a spring-like manner using a delta - * time to maintain frame rate independent movement. For details, see - * [Frame rate independent damping using lerp](http://www.rorydriscoll.com/2016/03/07/frame-rate-independent-damping-using-lerp/). - * - * @param {number} x - The current point. - * @param {number} y - The target point. - * @param {number} lambda - A higher lambda value will make the movement more sudden, - * and a lower value will make the movement more gradual. - * @param {number} dt - Delta time in seconds. - * @return {number} The interpolated value. - */ -export function damp(x: number, y: number, lambda: number, dt: number): number; -/** - * Returns a value that alternates between `0` and the given `length` parameter. - * - * @param {number} x - The value to pingpong. - * @param {number} [length=1] - The positive value the function will pingpong to. - * @return {number} The alternated value. - */ -export function pingpong(x: number, length?: number): number; -/** - * Returns a value in the range `[0,1]` that represents the percentage that `x` has - * moved between `min` and `max`, but smoothed or slowed down the closer `x` is to - * the `min` and `max`. - * - * See [Smoothstep](http://en.wikipedia.org/wiki/Smoothstep) for more details. - * - * @param {number} x - The value to evaluate based on its position between `min` and `max`. - * @param {number} min - The min value. Any `x` value below `min` will be `0`. `min` must be lower than `max`. - * @param {number} max - The max value. Any `x` value above `max` will be `1`. `max` must be greater than `min`. - * @return {number} The alternated value. - */ -export function smoothstep(x: number, min: number, max: number): number; -/** - * A [variation on smoothstep](https://en.wikipedia.org/wiki/Smoothstep#Variations) - * that has zero 1st and 2nd order derivatives at `x=0` and `x=1`. - * - * @param {number} x - The value to evaluate based on its position between `min` and `max`. - * @param {number} min - The min value. Any `x` value below `min` will be `0`. `min` must be lower than `max`. - * @param {number} max - The max value. Any `x` value above `max` will be `1`. `max` must be greater than `min`. - * @return {number} The alternated value. - */ -export function smootherstep(x: number, min: number, max: number): number; -/** - * Returns a random integer from `` interval. - * - * @param {number} low - The lower value boundary. - * @param {number} high - The upper value boundary - * @return {number} A random integer. - */ -export function randInt(low: number, high: number): number; -/** - * Returns a random float from `` interval. - * - * @param {number} low - The lower value boundary. - * @param {number} high - The upper value boundary - * @return {number} A random float. - */ -export function randFloat(low: number, high: number): number; -/** - * Returns a random integer from `<-range/2, range/2>` interval. - * - * @param {number} range - Defines the value range. - * @return {number} A random float. - */ -export function randFloatSpread(range: number): number; -/** - * Returns a deterministic pseudo-random float in the interval `[0, 1]`. - * - * @param {number} [s] - The integer seed. - * @return {number} A random float. - */ -export function seededRandom(s?: number): number; -/** - * Converts degrees to radians. - * - * @param {number} degrees - A value in degrees. - * @return {number} The converted value in radians. - */ -export function degToRad(degrees: number): number; -/** - * Converts radians to degrees. - * - * @param {number} radians - A value in radians. - * @return {number} The converted value in degrees. - */ -export function radToDeg(radians: number): number; -/** - * Returns `true` if the given number is a power of two. - * - * @param {number} value - The value to check. - * @return {boolean} Whether the given number is a power of two or not. - */ -export function isPowerOfTwo(value: number): boolean; -/** - * Returns the smallest power of two that is greater than or equal to the given number. - * - * @param {number} value - The value to find a POT for. Must be greater than `0`. - * @return {number} The smallest power of two that is greater than or equal to the given number. - */ -export function ceilPowerOfTwo(value: number): number; -/** - * Returns the largest power of two that is less than or equal to the given number. - * - * @param {number} value - The value to find a POT for. Must be greater than `0`. - * @return {number} The largest power of two that is less than or equal to the given number. - */ -export function floorPowerOfTwo(value: number): number; -/** - * Sets the given quaternion from the [Intrinsic Proper Euler Angles](https://en.wikipedia.org/wiki/Euler_angles) - * defined by the given angles and order. - * - * Rotations are applied to the axes in the order specified by order: - * rotation by angle `a` is applied first, then by angle `b`, then by angle `c`. - * - * @param {Quaternion} q - The quaternion to set. - * @param {number} a - The rotation applied to the first axis, in radians. - * @param {number} b - The rotation applied to the second axis, in radians. - * @param {number} c - The rotation applied to the third axis, in radians. - * @param {('XYX'|'XZX'|'YXY'|'YZY'|'ZXZ'|'ZYZ')} order - A string specifying the axes order. - */ -export function setQuaternionFromProperEuler(q: Quaternion, a: number, b: number, c: number, order: ("XYX" | "XZX" | "YXY" | "YZY" | "ZXZ" | "ZYZ")): void; -/** - * Normalizes the given value according to the given typed array. - * - * @param {number} value - The float value in the range `[0,1]` to normalize. - * @param {TypedArray} array - The typed array that defines the data type of the value. - * @return {number} The normalize value. - */ -export function normalize(value: number, array: TypedArray): number; -/** - * Denormalizes the given value according to the given typed array. - * - * @param {number} value - The value to denormalize. - * @param {TypedArray} array - The typed array that defines the data type of the value. - * @return {number} The denormalize (float) value in the range `[0,1]`. - */ -export function denormalize(value: number, array: TypedArray): number; -export namespace MathUtils { - export { DEG2RAD }; - export { RAD2DEG }; - export { generateUUID }; - export { clamp }; - export { euclideanModulo }; - export { mapLinear }; - export { inverseLerp }; - export { lerp }; - export { damp }; - export { pingpong }; - export { smoothstep }; - export { smootherstep }; - export { randInt }; - export { randFloat }; - export { randFloatSpread }; - export { seededRandom }; - export { degToRad }; - export { radToDeg }; - export { isPowerOfTwo }; - export { ceilPowerOfTwo }; - export { floorPowerOfTwo }; - export { setQuaternionFromProperEuler }; - export { normalize }; - export { denormalize }; -} diff --git a/jsdoc-testing/jsdoc/src/math/Matrix2.d.ts b/jsdoc-testing/jsdoc/src/math/Matrix2.d.ts deleted file mode 100644 index 7eac72d0b..000000000 --- a/jsdoc-testing/jsdoc/src/math/Matrix2.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Represents a 2x2 matrix. - * - * A Note on Row-Major and Column-Major Ordering: - * - * The constructor and {@link Matrix2#set} method take arguments in - * [row-major](https://en.wikipedia.org/wiki/Row-_and_column-major_order#Column-major_order) - * order, while internally they are stored in the {@link Matrix2#elements} array in column-major order. - * This means that calling: - * ```js - * const m = new THREE.Matrix2(); - * m.set( 11, 12, - * 21, 22 ); - * ``` - * will result in the elements array containing: - * ```js - * m.elements = [ 11, 21, - * 12, 22 ]; - * ``` - * and internally all calculations are performed using column-major ordering. - * However, as the actual ordering makes no difference mathematically and - * most people are used to thinking about matrices in row-major order, the - * three.js documentation shows matrices in row-major order. Just bear in - * mind that if you are reading the source code, you'll have to take the - * transpose of any matrices outlined here to make sense of the calculations. - */ -export class Matrix2 { - /** - * Constructs a new 2x2 matrix. The arguments are supposed to be - * in row-major order. If no arguments are provided, the constructor - * initializes the matrix as an identity matrix. - * - * @param {number} [n11] - 1-1 matrix element. - * @param {number} [n12] - 1-2 matrix element. - * @param {number} [n21] - 2-1 matrix element. - * @param {number} [n22] - 2-2 matrix element. - */ - constructor(n11?: number, n12?: number, n21?: number, n22?: number); - /** - * A column-major list of matrix values. - * - * @type {Array} - */ - elements: Array; - /** - * Sets this matrix to the 2x2 identity matrix. - * - * @return {Matrix2} A reference to this matrix. - */ - identity(): Matrix2; - /** - * Sets the elements of the matrix from the given array. - * - * @param {Array} array - The matrix elements in column-major order. - * @param {number} [offset=0] - Index of the first element in the array. - * @return {Matrix2} A reference to this matrix. - */ - fromArray(array: Array, offset?: number): Matrix2; - /** - * Sets the elements of the matrix.The arguments are supposed to be - * in row-major order. - * - * @param {number} n11 - 1-1 matrix element. - * @param {number} n12 - 1-2 matrix element. - * @param {number} n21 - 2-1 matrix element. - * @param {number} n22 - 2-2 matrix element. - * @return {Matrix2} A reference to this matrix. - */ - set(n11: number, n12: number, n21: number, n22: number): Matrix2; -} diff --git a/jsdoc-testing/jsdoc/src/math/Matrix3.d.ts b/jsdoc-testing/jsdoc/src/math/Matrix3.d.ts deleted file mode 100644 index 0aea68708..000000000 --- a/jsdoc-testing/jsdoc/src/math/Matrix3.d.ts +++ /dev/null @@ -1,251 +0,0 @@ -/** - * Represents a 3x3 matrix. - * - * A Note on Row-Major and Column-Major Ordering: - * - * The constructor and {@link Matrix3#set} method take arguments in - * [row-major](https://en.wikipedia.org/wiki/Row-_and_column-major_order#Column-major_order) - * order, while internally they are stored in the {@link Matrix3#elements} array in column-major order. - * This means that calling: - * ```js - * const m = new THREE.Matrix(); - * m.set( 11, 12, 13, - * 21, 22, 23, - * 31, 32, 33 ); - * ``` - * will result in the elements array containing: - * ```js - * m.elements = [ 11, 21, 31, - * 12, 22, 32, - * 13, 23, 33 ]; - * ``` - * and internally all calculations are performed using column-major ordering. - * However, as the actual ordering makes no difference mathematically and - * most people are used to thinking about matrices in row-major order, the - * three.js documentation shows matrices in row-major order. Just bear in - * mind that if you are reading the source code, you'll have to take the - * transpose of any matrices outlined here to make sense of the calculations. - */ -export class Matrix3 { - /** - * Constructs a new 3x3 matrix. The arguments are supposed to be - * in row-major order. If no arguments are provided, the constructor - * initializes the matrix as an identity matrix. - * - * @param {number} [n11] - 1-1 matrix element. - * @param {number} [n12] - 1-2 matrix element. - * @param {number} [n13] - 1-3 matrix element. - * @param {number} [n21] - 2-1 matrix element. - * @param {number} [n22] - 2-2 matrix element. - * @param {number} [n23] - 2-3 matrix element. - * @param {number} [n31] - 3-1 matrix element. - * @param {number} [n32] - 3-2 matrix element. - * @param {number} [n33] - 3-3 matrix element. - */ - constructor(n11?: number, n12?: number, n13?: number, n21?: number, n22?: number, n23?: number, n31?: number, n32?: number, n33?: number); - /** - * A column-major list of matrix values. - * - * @type {Array} - */ - elements: Array; - /** - * Sets the elements of the matrix.The arguments are supposed to be - * in row-major order. - * - * @param {number} [n11] - 1-1 matrix element. - * @param {number} [n12] - 1-2 matrix element. - * @param {number} [n13] - 1-3 matrix element. - * @param {number} [n21] - 2-1 matrix element. - * @param {number} [n22] - 2-2 matrix element. - * @param {number} [n23] - 2-3 matrix element. - * @param {number} [n31] - 3-1 matrix element. - * @param {number} [n32] - 3-2 matrix element. - * @param {number} [n33] - 3-3 matrix element. - * @return {Matrix3} A reference to this matrix. - */ - set(n11?: number, n12?: number, n13?: number, n21?: number, n22?: number, n23?: number, n31?: number, n32?: number, n33?: number): Matrix3; - /** - * Sets this matrix to the 3x3 identity matrix. - * - * @return {Matrix3} A reference to this matrix. - */ - identity(): Matrix3; - /** - * Copies the values of the given matrix to this instance. - * - * @param {Matrix3} m - The matrix to copy. - * @return {Matrix3} A reference to this matrix. - */ - copy(m: Matrix3): Matrix3; - /** - * Extracts the basis of this matrix into the three axis vectors provided. - * - * @param {Vector3} xAxis - The basis's x axis. - * @param {Vector3} yAxis - The basis's y axis. - * @param {Vector3} zAxis - The basis's z axis. - * @return {Matrix3} A reference to this matrix. - */ - extractBasis(xAxis: Vector3, yAxis: Vector3, zAxis: Vector3): Matrix3; - /** - * Set this matrix to the upper 3x3 matrix of the given 4x4 matrix. - * - * @param {Matrix4} m - The 4x4 matrix. - * @return {Matrix3} A reference to this matrix. - */ - setFromMatrix4(m: Matrix4): Matrix3; - /** - * Post-multiplies this matrix by the given 3x3 matrix. - * - * @param {Matrix3} m - The matrix to multiply with. - * @return {Matrix3} A reference to this matrix. - */ - multiply(m: Matrix3): Matrix3; - /** - * Pre-multiplies this matrix by the given 3x3 matrix. - * - * @param {Matrix3} m - The matrix to multiply with. - * @return {Matrix3} A reference to this matrix. - */ - premultiply(m: Matrix3): Matrix3; - /** - * Multiples the given 3x3 matrices and stores the result - * in this matrix. - * - * @param {Matrix3} a - The first matrix. - * @param {Matrix3} b - The second matrix. - * @return {Matrix3} A reference to this matrix. - */ - multiplyMatrices(a: Matrix3, b: Matrix3): Matrix3; - /** - * Multiplies every component of the matrix by the given scalar. - * - * @param {number} s - The scalar. - * @return {Matrix3} A reference to this matrix. - */ - multiplyScalar(s: number): Matrix3; - /** - * Computes and returns the determinant of this matrix. - * - * @return {number} The determinant. - */ - determinant(): number; - /** - * Inverts this matrix, using the [analytic method](https://en.wikipedia.org/wiki/Invertible_matrix#Analytic_solution). - * You can not invert with a determinant of zero. If you attempt this, the method produces - * a zero matrix instead. - * - * @return {Matrix3} A reference to this matrix. - */ - invert(): Matrix3; - /** - * Transposes this matrix in place. - * - * @return {Matrix3} A reference to this matrix. - */ - transpose(): Matrix3; - /** - * Computes the normal matrix which is the inverse transpose of the upper - * left 3x3 portion of the given 4x4 matrix. - * - * @param {Matrix4} matrix4 - The 4x4 matrix. - * @return {Matrix3} A reference to this matrix. - */ - getNormalMatrix(matrix4: Matrix4): Matrix3; - /** - * Transposes this matrix into the supplied array, and returns itself unchanged. - * - * @param {Array} r - An array to store the transposed matrix elements. - * @return {Matrix3} A reference to this matrix. - */ - transposeIntoArray(r: Array): Matrix3; - /** - * Sets the UV transform matrix from offset, repeat, rotation, and center. - * - * @param {number} tx - Offset x. - * @param {number} ty - Offset y. - * @param {number} sx - Repeat x. - * @param {number} sy - Repeat y. - * @param {number} rotation - Rotation, in radians. Positive values rotate counterclockwise. - * @param {number} cx - Center x of rotation. - * @param {number} cy - Center y of rotation - * @return {Matrix3} A reference to this matrix. - */ - setUvTransform(tx: number, ty: number, sx: number, sy: number, rotation: number, cx: number, cy: number): Matrix3; - /** - * Scales this matrix with the given scalar values. - * - * @param {number} sx - The amount to scale in the X axis. - * @param {number} sy - The amount to scale in the Y axis. - * @return {Matrix3} A reference to this matrix. - */ - scale(sx: number, sy: number): Matrix3; - /** - * Rotates this matrix by the given angle. - * - * @param {number} theta - The rotation in radians. - * @return {Matrix3} A reference to this matrix. - */ - rotate(theta: number): Matrix3; - /** - * Translates this matrix by the given scalar values. - * - * @param {number} tx - The amount to translate in the X axis. - * @param {number} ty - The amount to translate in the Y axis. - * @return {Matrix3} A reference to this matrix. - */ - translate(tx: number, ty: number): Matrix3; - /** - * Sets this matrix as a 2D translation transform. - * - * @param {number|Vector2} x - The amount to translate in the X axis or alternatively a translation vector. - * @param {number} y - The amount to translate in the Y axis. - * @return {Matrix3} A reference to this matrix. - */ - makeTranslation(x: number | Vector2, y: number): Matrix3; - /** - * Sets this matrix as a 2D rotational transformation. - * - * @param {number} theta - The rotation in radians. - * @return {Matrix3} A reference to this matrix. - */ - makeRotation(theta: number): Matrix3; - /** - * Sets this matrix as a 2D scale transform. - * - * @param {number} x - The amount to scale in the X axis. - * @param {number} y - The amount to scale in the Y axis. - * @return {Matrix3} A reference to this matrix. - */ - makeScale(x: number, y: number): Matrix3; - /** - * Returns `true` if this matrix is equal with the given one. - * - * @param {Matrix3} matrix - The matrix to test for equality. - * @return {boolean} Whether this matrix is equal with the given one. - */ - equals(matrix: Matrix3): boolean; - /** - * Sets the elements of the matrix from the given array. - * - * @param {Array} array - The matrix elements in column-major order. - * @param {number} [offset=0] - Index of the first element in the array. - * @return {Matrix3} A reference to this matrix. - */ - fromArray(array: Array, offset?: number): Matrix3; - /** - * Writes the elements of this matrix to the given array. If no array is provided, - * the method returns a new instance. - * - * @param {Array} [array=[]] - The target array holding the matrix elements in column-major order. - * @param {number} [offset=0] - Index of the first element in the array. - * @return {Array} The matrix elements in column-major order. - */ - toArray(array?: Array, offset?: number): Array; - /** - * Returns a matrix with copied values from this instance. - * - * @return {Matrix3} A clone of this instance. - */ - clone(): Matrix3; -} diff --git a/jsdoc-testing/jsdoc/src/math/Matrix4.d.ts b/jsdoc-testing/jsdoc/src/math/Matrix4.d.ts deleted file mode 100644 index 6f15181df..000000000 --- a/jsdoc-testing/jsdoc/src/math/Matrix4.d.ts +++ /dev/null @@ -1,404 +0,0 @@ -/** - * Represents a 4x4 matrix. - * - * The most common use of a 4x4 matrix in 3D computer graphics is as a transformation matrix. - * For an introduction to transformation matrices as used in WebGL, check out [this tutorial](https://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices) - * - * This allows a 3D vector representing a point in 3D space to undergo - * transformations such as translation, rotation, shear, scale, reflection, - * orthogonal or perspective projection and so on, by being multiplied by the - * matrix. This is known as `applying` the matrix to the vector. - * - * A Note on Row-Major and Column-Major Ordering: - * - * The constructor and {@link Matrix3#set} method take arguments in - * [row-major](https://en.wikipedia.org/wiki/Row-_and_column-major_order#Column-major_order) - * order, while internally they are stored in the {@link Matrix3#elements} array in column-major order. - * This means that calling: - * ```js - * const m = new THREE.Matrix4(); - * m.set( 11, 12, 13, 14, - * 21, 22, 23, 24, - * 31, 32, 33, 34, - * 41, 42, 43, 44 ); - * ``` - * will result in the elements array containing: - * ```js - * m.elements = [ 11, 21, 31, 41, - * 12, 22, 32, 42, - * 13, 23, 33, 43, - * 14, 24, 34, 44 ]; - * ``` - * and internally all calculations are performed using column-major ordering. - * However, as the actual ordering makes no difference mathematically and - * most people are used to thinking about matrices in row-major order, the - * three.js documentation shows matrices in row-major order. Just bear in - * mind that if you are reading the source code, you'll have to take the - * transpose of any matrices outlined here to make sense of the calculations. - */ -export class Matrix4 { - /** - * Constructs a new 4x4 matrix. The arguments are supposed to be - * in row-major order. If no arguments are provided, the constructor - * initializes the matrix as an identity matrix. - * - * @param {number} [n11] - 1-1 matrix element. - * @param {number} [n12] - 1-2 matrix element. - * @param {number} [n13] - 1-3 matrix element. - * @param {number} [n14] - 1-4 matrix element. - * @param {number} [n21] - 2-1 matrix element. - * @param {number} [n22] - 2-2 matrix element. - * @param {number} [n23] - 2-3 matrix element. - * @param {number} [n24] - 2-4 matrix element. - * @param {number} [n31] - 3-1 matrix element. - * @param {number} [n32] - 3-2 matrix element. - * @param {number} [n33] - 3-3 matrix element. - * @param {number} [n34] - 3-4 matrix element. - * @param {number} [n41] - 4-1 matrix element. - * @param {number} [n42] - 4-2 matrix element. - * @param {number} [n43] - 4-3 matrix element. - * @param {number} [n44] - 4-4 matrix element. - */ - constructor(n11?: number, n12?: number, n13?: number, n14?: number, n21?: number, n22?: number, n23?: number, n24?: number, n31?: number, n32?: number, n33?: number, n34?: number, n41?: number, n42?: number, n43?: number, n44?: number); - /** - * A column-major list of matrix values. - * - * @type {Array} - */ - elements: Array; - /** - * Sets the elements of the matrix.The arguments are supposed to be - * in row-major order. - * - * @param {number} [n11] - 1-1 matrix element. - * @param {number} [n12] - 1-2 matrix element. - * @param {number} [n13] - 1-3 matrix element. - * @param {number} [n14] - 1-4 matrix element. - * @param {number} [n21] - 2-1 matrix element. - * @param {number} [n22] - 2-2 matrix element. - * @param {number} [n23] - 2-3 matrix element. - * @param {number} [n24] - 2-4 matrix element. - * @param {number} [n31] - 3-1 matrix element. - * @param {number} [n32] - 3-2 matrix element. - * @param {number} [n33] - 3-3 matrix element. - * @param {number} [n34] - 3-4 matrix element. - * @param {number} [n41] - 4-1 matrix element. - * @param {number} [n42] - 4-2 matrix element. - * @param {number} [n43] - 4-3 matrix element. - * @param {number} [n44] - 4-4 matrix element. - * @return {Matrix4} A reference to this matrix. - */ - set(n11?: number, n12?: number, n13?: number, n14?: number, n21?: number, n22?: number, n23?: number, n24?: number, n31?: number, n32?: number, n33?: number, n34?: number, n41?: number, n42?: number, n43?: number, n44?: number): Matrix4; - /** - * Sets this matrix to the 4x4 identity matrix. - * - * @return {Matrix4} A reference to this matrix. - */ - identity(): Matrix4; - /** - * Returns a matrix with copied values from this instance. - * - * @return {Matrix4} A clone of this instance. - */ - clone(): Matrix4; - /** - * Copies the values of the given matrix to this instance. - * - * @param {Matrix4} m - The matrix to copy. - * @return {Matrix4} A reference to this matrix. - */ - copy(m: Matrix4): Matrix4; - /** - * Copies the translation component of the given matrix - * into this matrix's translation component. - * - * @param {Matrix4} m - The matrix to copy the translation component. - * @return {Matrix4} A reference to this matrix. - */ - copyPosition(m: Matrix4): Matrix4; - /** - * Set the upper 3x3 elements of this matrix to the values of given 3x3 matrix. - * - * @param {Matrix3} m - The 3x3 matrix. - * @return {Matrix4} A reference to this matrix. - */ - setFromMatrix3(m: Matrix3): Matrix4; - /** - * Extracts the basis of this matrix into the three axis vectors provided. - * - * @param {Vector3} xAxis - The basis's x axis. - * @param {Vector3} yAxis - The basis's y axis. - * @param {Vector3} zAxis - The basis's z axis. - * @return {Matrix4} A reference to this matrix. - */ - extractBasis(xAxis: Vector3, yAxis: Vector3, zAxis: Vector3): Matrix4; - /** - * Sets the given basis vectors to this matrix. - * - * @param {Vector3} xAxis - The basis's x axis. - * @param {Vector3} yAxis - The basis's y axis. - * @param {Vector3} zAxis - The basis's z axis. - * @return {Matrix4} A reference to this matrix. - */ - makeBasis(xAxis: Vector3, yAxis: Vector3, zAxis: Vector3): Matrix4; - /** - * Extracts the rotation component of the given matrix - * into this matrix's rotation component. - * - * Note: This method does not support reflection matrices. - * - * @param {Matrix4} m - The matrix. - * @return {Matrix4} A reference to this matrix. - */ - extractRotation(m: Matrix4): Matrix4; - /** - * Sets the rotation component (the upper left 3x3 matrix) of this matrix to - * the rotation specified by the given Euler angles. The rest of - * the matrix is set to the identity. Depending on the {@link Euler#order}, - * there are six possible outcomes. See [this page](https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix) - * for a complete list. - * - * @param {Euler} euler - The Euler angles. - * @return {Matrix4} A reference to this matrix. - */ - makeRotationFromEuler(euler: Euler): Matrix4; - /** - * Sets the rotation component of this matrix to the rotation specified by - * the given Quaternion as outlined [here](https://en.wikipedia.org/wiki/Rotation_matrix#Quaternion) - * The rest of the matrix is set to the identity. - * - * @param {Quaternion} q - The Quaternion. - * @return {Matrix4} A reference to this matrix. - */ - makeRotationFromQuaternion(q: Quaternion): Matrix4; - /** - * Sets the rotation component of the transformation matrix, looking from `eye` towards - * `target`, and oriented by the up-direction. - * - * @param {Vector3} eye - The eye vector. - * @param {Vector3} target - The target vector. - * @param {Vector3} up - The up vector. - * @return {Matrix4} A reference to this matrix. - */ - lookAt(eye: Vector3, target: Vector3, up: Vector3): Matrix4; - /** - * Post-multiplies this matrix by the given 4x4 matrix. - * - * @param {Matrix4} m - The matrix to multiply with. - * @return {Matrix4} A reference to this matrix. - */ - multiply(m: Matrix4): Matrix4; - /** - * Pre-multiplies this matrix by the given 4x4 matrix. - * - * @param {Matrix4} m - The matrix to multiply with. - * @return {Matrix4} A reference to this matrix. - */ - premultiply(m: Matrix4): Matrix4; - /** - * Multiples the given 4x4 matrices and stores the result - * in this matrix. - * - * @param {Matrix4} a - The first matrix. - * @param {Matrix4} b - The second matrix. - * @return {Matrix4} A reference to this matrix. - */ - multiplyMatrices(a: Matrix4, b: Matrix4): Matrix4; - /** - * Multiplies every component of the matrix by the given scalar. - * - * @param {number} s - The scalar. - * @return {Matrix4} A reference to this matrix. - */ - multiplyScalar(s: number): Matrix4; - /** - * Computes and returns the determinant of this matrix. - * - * Based on the method outlined [here](http://www.euclideanspace.com/maths/algebra/matrix/functions/inverse/fourD/index.html). - * - * @return {number} The determinant. - */ - determinant(): number; - /** - * Transposes this matrix in place. - * - * @return {Matrix4} A reference to this matrix. - */ - transpose(): Matrix4; - /** - * Sets the position component for this matrix from the given vector, - * without affecting the rest of the matrix. - * - * @param {number|Vector3} x - The x component of the vector or alternatively the vector object. - * @param {number} y - The y component of the vector. - * @param {number} z - The z component of the vector. - * @return {Matrix4} A reference to this matrix. - */ - setPosition(x: number | Vector3, y: number, z: number): Matrix4; - /** - * Inverts this matrix, using the [analytic method](https://en.wikipedia.org/wiki/Invertible_matrix#Analytic_solution). - * You can not invert with a determinant of zero. If you attempt this, the method produces - * a zero matrix instead. - * - * @return {Matrix4} A reference to this matrix. - */ - invert(): Matrix4; - /** - * Multiplies the columns of this matrix by the given vector. - * - * @param {Vector3} v - The scale vector. - * @return {Matrix4} A reference to this matrix. - */ - scale(v: Vector3): Matrix4; - /** - * Gets the maximum scale value of the three axes. - * - * @return {number} The maximum scale. - */ - getMaxScaleOnAxis(): number; - /** - * Sets this matrix as a translation transform from the given vector. - * - * @param {number|Vector3} x - The amount to translate in the X axis or alternatively a translation vector. - * @param {number} y - The amount to translate in the Y axis. - * @param {number} z - The amount to translate in the z axis. - * @return {Matrix4} A reference to this matrix. - */ - makeTranslation(x: number | Vector3, y: number, z: number): Matrix4; - /** - * Sets this matrix as a rotational transformation around the X axis by - * the given angle. - * - * @param {number} theta - The rotation in radians. - * @return {Matrix4} A reference to this matrix. - */ - makeRotationX(theta: number): Matrix4; - /** - * Sets this matrix as a rotational transformation around the Y axis by - * the given angle. - * - * @param {number} theta - The rotation in radians. - * @return {Matrix4} A reference to this matrix. - */ - makeRotationY(theta: number): Matrix4; - /** - * Sets this matrix as a rotational transformation around the Z axis by - * the given angle. - * - * @param {number} theta - The rotation in radians. - * @return {Matrix4} A reference to this matrix. - */ - makeRotationZ(theta: number): Matrix4; - /** - * Sets this matrix as a rotational transformation around the given axis by - * the given angle. - * - * This is a somewhat controversial but mathematically sound alternative to - * rotating via Quaternions. See the discussion [here](https://www.gamedev.net/articles/programming/math-and-physics/do-we-really-need-quaternions-r1199). - * - * @param {Vector3} axis - The normalized rotation axis. - * @param {number} angle - The rotation in radians. - * @return {Matrix4} A reference to this matrix. - */ - makeRotationAxis(axis: Vector3, angle: number): Matrix4; - /** - * Sets this matrix as a scale transformation. - * - * @param {number} x - The amount to scale in the X axis. - * @param {number} y - The amount to scale in the Y axis. - * @param {number} z - The amount to scale in the Z axis. - * @return {Matrix4} A reference to this matrix. - */ - makeScale(x: number, y: number, z: number): Matrix4; - /** - * Sets this matrix as a shear transformation. - * - * @param {number} xy - The amount to shear X by Y. - * @param {number} xz - The amount to shear X by Z. - * @param {number} yx - The amount to shear Y by X. - * @param {number} yz - The amount to shear Y by Z. - * @param {number} zx - The amount to shear Z by X. - * @param {number} zy - The amount to shear Z by Y. - * @return {Matrix4} A reference to this matrix. - */ - makeShear(xy: number, xz: number, yx: number, yz: number, zx: number, zy: number): Matrix4; - /** - * Sets this matrix to the transformation composed of the given position, - * rotation (Quaternion) and scale. - * - * @param {Vector3} position - The position vector. - * @param {Quaternion} quaternion - The rotation as a Quaternion. - * @param {Vector3} scale - The scale vector. - * @return {Matrix4} A reference to this matrix. - */ - compose(position: Vector3, quaternion: Quaternion, scale: Vector3): Matrix4; - /** - * Decomposes this matrix into its position, rotation and scale components - * and provides the result in the given objects. - * - * Note: Not all matrices are decomposable in this way. For example, if an - * object has a non-uniformly scaled parent, then the object's world matrix - * may not be decomposable, and this method may not be appropriate. - * - * @param {Vector3} position - The position vector. - * @param {Quaternion} quaternion - The rotation as a Quaternion. - * @param {Vector3} scale - The scale vector. - * @return {Matrix4} A reference to this matrix. - */ - decompose(position: Vector3, quaternion: Quaternion, scale: Vector3): Matrix4; - /** - * Creates a perspective projection matrix. This is used internally by - * {@link PerspectiveCamera#updateProjectionMatrix}. - - * @param {number} left - Left boundary of the viewing frustum at the near plane. - * @param {number} right - Right boundary of the viewing frustum at the near plane. - * @param {number} top - Top boundary of the viewing frustum at the near plane. - * @param {number} bottom - Bottom boundary of the viewing frustum at the near plane. - * @param {number} near - The distance from the camera to the near plane. - * @param {number} far - The distance from the camera to the far plane. - * @param {(WebGLCoordinateSystem|WebGPUCoordinateSystem)} [coordinateSystem=WebGLCoordinateSystem] - The coordinate system. - * @param {boolean} [reversedDepth=false] - Whether to use a reversed depth. - * @return {Matrix4} A reference to this matrix. - */ - makePerspective(left: number, right: number, top: number, bottom: number, near: number, far: number, coordinateSystem?: (number | number), reversedDepth?: boolean): Matrix4; - /** - * Creates a orthographic projection matrix. This is used internally by - * {@link OrthographicCamera#updateProjectionMatrix}. - - * @param {number} left - Left boundary of the viewing frustum at the near plane. - * @param {number} right - Right boundary of the viewing frustum at the near plane. - * @param {number} top - Top boundary of the viewing frustum at the near plane. - * @param {number} bottom - Bottom boundary of the viewing frustum at the near plane. - * @param {number} near - The distance from the camera to the near plane. - * @param {number} far - The distance from the camera to the far plane. - * @param {(WebGLCoordinateSystem|WebGPUCoordinateSystem)} [coordinateSystem=WebGLCoordinateSystem] - The coordinate system. - * @param {boolean} [reversedDepth=false] - Whether to use a reversed depth. - * @return {Matrix4} A reference to this matrix. - */ - makeOrthographic(left: number, right: number, top: number, bottom: number, near: number, far: number, coordinateSystem?: (number | number), reversedDepth?: boolean): Matrix4; - /** - * Returns `true` if this matrix is equal with the given one. - * - * @param {Matrix4} matrix - The matrix to test for equality. - * @return {boolean} Whether this matrix is equal with the given one. - */ - equals(matrix: Matrix4): boolean; - /** - * Sets the elements of the matrix from the given array. - * - * @param {Array} array - The matrix elements in column-major order. - * @param {number} [offset=0] - Index of the first element in the array. - * @return {Matrix4} A reference to this matrix. - */ - fromArray(array: Array, offset?: number): Matrix4; - /** - * Writes the elements of this matrix to the given array. If no array is provided, - * the method returns a new instance. - * - * @param {Array} [array=[]] - The target array holding the matrix elements in column-major order. - * @param {number} [offset=0] - Index of the first element in the array. - * @return {Array} The matrix elements in column-major order. - */ - toArray(array?: Array, offset?: number): Array; -} -import { Vector3 } from './Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Plane.d.ts b/jsdoc-testing/jsdoc/src/math/Plane.d.ts deleted file mode 100644 index 1c49071b2..000000000 --- a/jsdoc-testing/jsdoc/src/math/Plane.d.ts +++ /dev/null @@ -1,190 +0,0 @@ -/** - * A two dimensional surface that extends infinitely in 3D space, represented - * in [Hessian normal form](http://mathworld.wolfram.com/HessianNormalForm.html) - * by a unit length normal vector and a constant. - */ -export class Plane { - /** - * Constructs a new plane. - * - * @param {Vector3} [normal=(1,0,0)] - A unit length vector defining the normal of the plane. - * @param {number} [constant=0] - The signed distance from the origin to the plane. - */ - constructor(normal?: Vector3, constant?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isPlane: boolean; - /** - * A unit length vector defining the normal of the plane. - * - * @type {Vector3} - */ - normal: Vector3; - /** - * The signed distance from the origin to the plane. - * - * @type {number} - * @default 0 - */ - constant: number; - /** - * Sets the plane components by copying the given values. - * - * @param {Vector3} normal - The normal. - * @param {number} constant - The constant. - * @return {Plane} A reference to this plane. - */ - set(normal: Vector3, constant: number): Plane; - /** - * Sets the plane components by defining `x`, `y`, `z` as the - * plane normal and `w` as the constant. - * - * @param {number} x - The value for the normal's x component. - * @param {number} y - The value for the normal's y component. - * @param {number} z - The value for the normal's z component. - * @param {number} w - The constant value. - * @return {Plane} A reference to this plane. - */ - setComponents(x: number, y: number, z: number, w: number): Plane; - /** - * Sets the plane from the given normal and coplanar point (that is a point - * that lies onto the plane). - * - * @param {Vector3} normal - The normal. - * @param {Vector3} point - A coplanar point. - * @return {Plane} A reference to this plane. - */ - setFromNormalAndCoplanarPoint(normal: Vector3, point: Vector3): Plane; - /** - * Sets the plane from three coplanar points. The winding order is - * assumed to be counter-clockwise, and determines the direction of - * the plane normal. - * - * @param {Vector3} a - The first coplanar point. - * @param {Vector3} b - The second coplanar point. - * @param {Vector3} c - The third coplanar point. - * @return {Plane} A reference to this plane. - */ - setFromCoplanarPoints(a: Vector3, b: Vector3, c: Vector3): Plane; - /** - * Copies the values of the given plane to this instance. - * - * @param {Plane} plane - The plane to copy. - * @return {Plane} A reference to this plane. - */ - copy(plane: Plane): Plane; - /** - * Normalizes the plane normal and adjusts the constant accordingly. - * - * @return {Plane} A reference to this plane. - */ - normalize(): Plane; - /** - * Negates both the plane normal and the constant. - * - * @return {Plane} A reference to this plane. - */ - negate(): Plane; - /** - * Returns the signed distance from the given point to this plane. - * - * @param {Vector3} point - The point to compute the distance for. - * @return {number} The signed distance. - */ - distanceToPoint(point: Vector3): number; - /** - * Returns the signed distance from the given sphere to this plane. - * - * @param {Sphere} sphere - The sphere to compute the distance for. - * @return {number} The signed distance. - */ - distanceToSphere(sphere: Sphere): number; - /** - * Projects a the given point onto the plane. - * - * @param {Vector3} point - The point to project. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} The projected point on the plane. - */ - projectPoint(point: Vector3, target: Vector3): Vector3; - /** - * Returns the intersection point of the passed line and the plane. Returns - * `null` if the line does not intersect. Returns the line's starting point if - * the line is coplanar with the plane. - * - * @param {Line3} line - The line to compute the intersection for. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @param {boolean} [clampToLine=true] - Whether to clamp the intersection to the line segment. - * @return {?Vector3} The intersection point. Returns `null` if no intersection is detected. - */ - intersectLine(line: Line3, target: Vector3, clampToLine?: boolean): Vector3 | null; - /** - * Returns `true` if the given line segment intersects with (passes through) the plane. - * - * @param {Line3} line - The line to test. - * @return {boolean} Whether the given line segment intersects with the plane or not. - */ - intersectsLine(line: Line3): boolean; - /** - * Returns `true` if the given bounding box intersects with the plane. - * - * @param {Box3} box - The bounding box to test. - * @return {boolean} Whether the given bounding box intersects with the plane or not. - */ - intersectsBox(box: Box3): boolean; - /** - * Returns `true` if the given bounding sphere intersects with the plane. - * - * @param {Sphere} sphere - The bounding sphere to test. - * @return {boolean} Whether the given bounding sphere intersects with the plane or not. - */ - intersectsSphere(sphere: Sphere): boolean; - /** - * Returns a coplanar vector to the plane, by calculating the - * projection of the normal at the origin onto the plane. - * - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} The coplanar point. - */ - coplanarPoint(target: Vector3): Vector3; - /** - * Apply a 4x4 matrix to the plane. The matrix must be an affine, homogeneous transform. - * - * The optional normal matrix can be pre-computed like so: - * ```js - * const optionalNormalMatrix = new THREE.Matrix3().getNormalMatrix( matrix ); - * ``` - * - * @param {Matrix4} matrix - The transformation matrix. - * @param {Matrix4} [optionalNormalMatrix] - A pre-computed normal matrix. - * @return {Plane} A reference to this plane. - */ - applyMatrix4(matrix: Matrix4, optionalNormalMatrix?: Matrix4): Plane; - /** - * Translates the plane by the distance defined by the given offset vector. - * Note that this only affects the plane constant and will not affect the normal vector. - * - * @param {Vector3} offset - The offset vector. - * @return {Plane} A reference to this plane. - */ - translate(offset: Vector3): Plane; - /** - * Returns `true` if this plane is equal with the given one. - * - * @param {Plane} plane - The plane to test for equality. - * @return {boolean} Whether this plane is equal with the given one. - */ - equals(plane: Plane): boolean; - /** - * Returns a new plane with copied values from this instance. - * - * @return {Plane} A clone of this instance. - */ - clone(): Plane; -} -import { Vector3 } from './Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Quaternion.d.ts b/jsdoc-testing/jsdoc/src/math/Quaternion.d.ts deleted file mode 100644 index 214548cde..000000000 --- a/jsdoc-testing/jsdoc/src/math/Quaternion.d.ts +++ /dev/null @@ -1,310 +0,0 @@ -/** - * Class for representing a Quaternion. Quaternions are used in three.js to represent rotations. - * - * Iterating through a vector instance will yield its components `(x, y, z, w)` in - * the corresponding order. - * - * Note that three.js expects Quaternions to be normalized. - * ```js - * const quaternion = new THREE.Quaternion(); - * quaternion.setFromAxisAngle( new THREE.Vector3( 0, 1, 0 ), Math.PI / 2 ); - * - * const vector = new THREE.Vector3( 1, 0, 0 ); - * vector.applyQuaternion( quaternion ); - * ``` - */ -export class Quaternion { - /** - * Interpolates between two quaternions via SLERP. This implementation assumes the - * quaternion data are managed in flat arrays. - * - * @param {Array} dst - The destination array. - * @param {number} dstOffset - An offset into the destination array. - * @param {Array} src0 - The source array of the first quaternion. - * @param {number} srcOffset0 - An offset into the first source array. - * @param {Array} src1 - The source array of the second quaternion. - * @param {number} srcOffset1 - An offset into the second source array. - * @param {number} t - The interpolation factor. A value in the range `[0,1]` will interpolate. A value outside the range `[0,1]` will extrapolate. - * @see {@link Quaternion#slerp} - */ - static slerpFlat(dst: Array, dstOffset: number, src0: Array, srcOffset0: number, src1: Array, srcOffset1: number, t: number): void; - /** - * Multiplies two quaternions. This implementation assumes the quaternion data are managed - * in flat arrays. - * - * @param {Array} dst - The destination array. - * @param {number} dstOffset - An offset into the destination array. - * @param {Array} src0 - The source array of the first quaternion. - * @param {number} srcOffset0 - An offset into the first source array. - * @param {Array} src1 - The source array of the second quaternion. - * @param {number} srcOffset1 - An offset into the second source array. - * @return {Array} The destination array. - * @see {@link Quaternion#multiplyQuaternions}. - */ - static multiplyQuaternionsFlat(dst: Array, dstOffset: number, src0: Array, srcOffset0: number, src1: Array, srcOffset1: number): Array; - /** - * Constructs a new quaternion. - * - * @param {number} [x=0] - The x value of this quaternion. - * @param {number} [y=0] - The y value of this quaternion. - * @param {number} [z=0] - The z value of this quaternion. - * @param {number} [w=1] - The w value of this quaternion. - */ - constructor(x?: number, y?: number, z?: number, w?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isQuaternion: boolean; - _x: number; - _y: number; - _z: number; - _w: number; - set x(value: number); - /** - * The x value of this quaternion. - * - * @type {number} - * @default 0 - */ - get x(): number; - set y(value: number); - /** - * The y value of this quaternion. - * - * @type {number} - * @default 0 - */ - get y(): number; - set z(value: number); - /** - * The z value of this quaternion. - * - * @type {number} - * @default 0 - */ - get z(): number; - set w(value: number); - /** - * The w value of this quaternion. - * - * @type {number} - * @default 1 - */ - get w(): number; - /** - * Sets the quaternion components. - * - * @param {number} x - The x value of this quaternion. - * @param {number} y - The y value of this quaternion. - * @param {number} z - The z value of this quaternion. - * @param {number} w - The w value of this quaternion. - * @return {Quaternion} A reference to this quaternion. - */ - set(x: number, y: number, z: number, w: number): Quaternion; - /** - * Returns a new quaternion with copied values from this instance. - * - * @return {Quaternion} A clone of this instance. - */ - clone(): Quaternion; - /** - * Copies the values of the given quaternion to this instance. - * - * @param {Quaternion} quaternion - The quaternion to copy. - * @return {Quaternion} A reference to this quaternion. - */ - copy(quaternion: Quaternion): Quaternion; - /** - * Sets this quaternion from the rotation specified by the given - * Euler angles. - * - * @param {Euler} euler - The Euler angles. - * @param {boolean} [update=true] - Whether the internal `onChange` callback should be executed or not. - * @return {Quaternion} A reference to this quaternion. - */ - setFromEuler(euler: Euler, update?: boolean): Quaternion; - /** - * Sets this quaternion from the given axis and angle. - * - * @param {Vector3} axis - The normalized axis. - * @param {number} angle - The angle in radians. - * @return {Quaternion} A reference to this quaternion. - */ - setFromAxisAngle(axis: Vector3, angle: number): Quaternion; - /** - * Sets this quaternion from the given rotation matrix. - * - * @param {Matrix4} m - A 4x4 matrix of which the upper 3x3 of matrix is a pure rotation matrix (i.e. unscaled). - * @return {Quaternion} A reference to this quaternion. - */ - setFromRotationMatrix(m: Matrix4): Quaternion; - /** - * Sets this quaternion to the rotation required to rotate the direction vector - * `vFrom` to the direction vector `vTo`. - * - * @param {Vector3} vFrom - The first (normalized) direction vector. - * @param {Vector3} vTo - The second (normalized) direction vector. - * @return {Quaternion} A reference to this quaternion. - */ - setFromUnitVectors(vFrom: Vector3, vTo: Vector3): Quaternion; - /** - * Returns the angle between this quaternion and the given one in radians. - * - * @param {Quaternion} q - The quaternion to compute the angle with. - * @return {number} The angle in radians. - */ - angleTo(q: Quaternion): number; - /** - * Rotates this quaternion by a given angular step to the given quaternion. - * The method ensures that the final quaternion will not overshoot `q`. - * - * @param {Quaternion} q - The target quaternion. - * @param {number} step - The angular step in radians. - * @return {Quaternion} A reference to this quaternion. - */ - rotateTowards(q: Quaternion, step: number): Quaternion; - /** - * Sets this quaternion to the identity quaternion; that is, to the - * quaternion that represents "no rotation". - * - * @return {Quaternion} A reference to this quaternion. - */ - identity(): Quaternion; - /** - * Inverts this quaternion via {@link Quaternion#conjugate}. The - * quaternion is assumed to have unit length. - * - * @return {Quaternion} A reference to this quaternion. - */ - invert(): Quaternion; - /** - * Returns the rotational conjugate of this quaternion. The conjugate of a - * quaternion represents the same rotation in the opposite direction about - * the rotational axis. - * - * @return {Quaternion} A reference to this quaternion. - */ - conjugate(): Quaternion; - /** - * Calculates the dot product of this quaternion and the given one. - * - * @param {Quaternion} v - The quaternion to compute the dot product with. - * @return {number} The result of the dot product. - */ - dot(v: Quaternion): number; - /** - * Computes the squared Euclidean length (straight-line length) of this quaternion, - * considered as a 4 dimensional vector. This can be useful if you are comparing the - * lengths of two quaternions, as this is a slightly more efficient calculation than - * {@link Quaternion#length}. - * - * @return {number} The squared Euclidean length. - */ - lengthSq(): number; - /** - * Computes the Euclidean length (straight-line length) of this quaternion, - * considered as a 4 dimensional vector. - * - * @return {number} The Euclidean length. - */ - length(): number; - /** - * Normalizes this quaternion - that is, calculated the quaternion that performs - * the same rotation as this one, but has a length equal to `1`. - * - * @return {Quaternion} A reference to this quaternion. - */ - normalize(): Quaternion; - /** - * Multiplies this quaternion by the given one. - * - * @param {Quaternion} q - The quaternion. - * @return {Quaternion} A reference to this quaternion. - */ - multiply(q: Quaternion): Quaternion; - /** - * Pre-multiplies this quaternion by the given one. - * - * @param {Quaternion} q - The quaternion. - * @return {Quaternion} A reference to this quaternion. - */ - premultiply(q: Quaternion): Quaternion; - /** - * Multiplies the given quaternions and stores the result in this instance. - * - * @param {Quaternion} a - The first quaternion. - * @param {Quaternion} b - The second quaternion. - * @return {Quaternion} A reference to this quaternion. - */ - multiplyQuaternions(a: Quaternion, b: Quaternion): Quaternion; - /** - * Performs a spherical linear interpolation between this quaternion and the target quaternion. - * - * @param {Quaternion} qb - The target quaternion. - * @param {number} t - The interpolation factor. A value in the range `[0,1]` will interpolate. A value outside the range `[0,1]` will extrapolate. - * @return {Quaternion} A reference to this quaternion. - */ - slerp(qb: Quaternion, t: number): Quaternion; - /** - * Performs a spherical linear interpolation between the given quaternions - * and stores the result in this quaternion. - * - * @param {Quaternion} qa - The source quaternion. - * @param {Quaternion} qb - The target quaternion. - * @param {number} t - The interpolation factor in the closed interval `[0, 1]`. - * @return {Quaternion} A reference to this quaternion. - */ - slerpQuaternions(qa: Quaternion, qb: Quaternion, t: number): Quaternion; - /** - * Sets this quaternion to a uniformly random, normalized quaternion. - * - * @return {Quaternion} A reference to this quaternion. - */ - random(): Quaternion; - /** - * Returns `true` if this quaternion is equal with the given one. - * - * @param {Quaternion} quaternion - The quaternion to test for equality. - * @return {boolean} Whether this quaternion is equal with the given one. - */ - equals(quaternion: Quaternion): boolean; - /** - * Sets this quaternion's components from the given array. - * - * @param {Array} array - An array holding the quaternion component values. - * @param {number} [offset=0] - The offset into the array. - * @return {Quaternion} A reference to this quaternion. - */ - fromArray(array: Array, offset?: number): Quaternion; - /** - * Writes the components of this quaternion to the given array. If no array is provided, - * the method returns a new instance. - * - * @param {Array} [array=[]] - The target array holding the quaternion components. - * @param {number} [offset=0] - Index of the first element in the array. - * @return {Array} The quaternion components. - */ - toArray(array?: Array, offset?: number): Array; - /** - * Sets the components of this quaternion from the given buffer attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute holding quaternion data. - * @param {number} index - The index into the attribute. - * @return {Quaternion} A reference to this quaternion. - */ - fromBufferAttribute(attribute: BufferAttribute, index: number): Quaternion; - /** - * This methods defines the serialization result of this class. Returns the - * numerical elements of this quaternion in an array of format `[x, y, z, w]`. - * - * @return {Array} The serialized quaternion. - */ - toJSON(): Array; - _onChange(callback: any): this; - _onChangeCallback(): void; - [Symbol.iterator](): Generator; -} diff --git a/jsdoc-testing/jsdoc/src/math/Ray.d.ts b/jsdoc-testing/jsdoc/src/math/Ray.d.ts deleted file mode 100644 index 02531c54e..000000000 --- a/jsdoc-testing/jsdoc/src/math/Ray.d.ts +++ /dev/null @@ -1,185 +0,0 @@ -/** - * A ray that emits from an origin in a certain direction. The class is used by - * {@link Raycaster} to assist with raycasting. Raycasting is used for - * mouse picking (working out what objects in the 3D space the mouse is over) - * amongst other things. - */ -export class Ray { - /** - * Constructs a new ray. - * - * @param {Vector3} [origin=(0,0,0)] - The origin of the ray. - * @param {Vector3} [direction=(0,0,-1)] - The (normalized) direction of the ray. - */ - constructor(origin?: Vector3, direction?: Vector3); - /** - * The origin of the ray. - * - * @type {Vector3} - */ - origin: Vector3; - /** - * The (normalized) direction of the ray. - * - * @type {Vector3} - */ - direction: Vector3; - /** - * Sets the ray's components by copying the given values. - * - * @param {Vector3} origin - The origin. - * @param {Vector3} direction - The direction. - * @return {Ray} A reference to this ray. - */ - set(origin: Vector3, direction: Vector3): Ray; - /** - * Copies the values of the given ray to this instance. - * - * @param {Ray} ray - The ray to copy. - * @return {Ray} A reference to this ray. - */ - copy(ray: Ray): Ray; - /** - * Returns a vector that is located at a given distance along this ray. - * - * @param {number} t - The distance along the ray to retrieve a position for. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} A position on the ray. - */ - at(t: number, target: Vector3): Vector3; - /** - * Adjusts the direction of the ray to point at the given vector in world space. - * - * @param {Vector3} v - The target position. - * @return {Ray} A reference to this ray. - */ - lookAt(v: Vector3): Ray; - /** - * Shift the origin of this ray along its direction by the given distance. - * - * @param {number} t - The distance along the ray to interpolate. - * @return {Ray} A reference to this ray. - */ - recast(t: number): Ray; - /** - * Returns the point along this ray that is closest to the given point. - * - * @param {Vector3} point - A point in 3D space to get the closet location on the ray for. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} The closest point on this ray. - */ - closestPointToPoint(point: Vector3, target: Vector3): Vector3; - /** - * Returns the distance of the closest approach between this ray and the given point. - * - * @param {Vector3} point - A point in 3D space to compute the distance to. - * @return {number} The distance. - */ - distanceToPoint(point: Vector3): number; - /** - * Returns the squared distance of the closest approach between this ray and the given point. - * - * @param {Vector3} point - A point in 3D space to compute the distance to. - * @return {number} The squared distance. - */ - distanceSqToPoint(point: Vector3): number; - /** - * Returns the squared distance between this ray and the given line segment. - * - * @param {Vector3} v0 - The start point of the line segment. - * @param {Vector3} v1 - The end point of the line segment. - * @param {Vector3} [optionalPointOnRay] - When provided, it receives the point on this ray that is closest to the segment. - * @param {Vector3} [optionalPointOnSegment] - When provided, it receives the point on the line segment that is closest to this ray. - * @return {number} The squared distance. - */ - distanceSqToSegment(v0: Vector3, v1: Vector3, optionalPointOnRay?: Vector3, optionalPointOnSegment?: Vector3): number; - /** - * Intersects this ray with the given sphere, returning the intersection - * point or `null` if there is no intersection. - * - * @param {Sphere} sphere - The sphere to intersect. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {?Vector3} The intersection point. - */ - intersectSphere(sphere: Sphere, target: Vector3): Vector3 | null; - /** - * Returns `true` if this ray intersects with the given sphere. - * - * @param {Sphere} sphere - The sphere to intersect. - * @return {boolean} Whether this ray intersects with the given sphere or not. - */ - intersectsSphere(sphere: Sphere): boolean; - /** - * Computes the distance from the ray's origin to the given plane. Returns `null` if the ray - * does not intersect with the plane. - * - * @param {Plane} plane - The plane to compute the distance to. - * @return {?number} Whether this ray intersects with the given sphere or not. - */ - distanceToPlane(plane: Plane): number | null; - /** - * Intersects this ray with the given plane, returning the intersection - * point or `null` if there is no intersection. - * - * @param {Plane} plane - The plane to intersect. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {?Vector3} The intersection point. - */ - intersectPlane(plane: Plane, target: Vector3): Vector3 | null; - /** - * Returns `true` if this ray intersects with the given plane. - * - * @param {Plane} plane - The plane to intersect. - * @return {boolean} Whether this ray intersects with the given plane or not. - */ - intersectsPlane(plane: Plane): boolean; - /** - * Intersects this ray with the given bounding box, returning the intersection - * point or `null` if there is no intersection. - * - * @param {Box3} box - The box to intersect. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {?Vector3} The intersection point. - */ - intersectBox(box: Box3, target: Vector3): Vector3 | null; - /** - * Returns `true` if this ray intersects with the given box. - * - * @param {Box3} box - The box to intersect. - * @return {boolean} Whether this ray intersects with the given box or not. - */ - intersectsBox(box: Box3): boolean; - /** - * Intersects this ray with the given triangle, returning the intersection - * point or `null` if there is no intersection. - * - * @param {Vector3} a - The first vertex of the triangle. - * @param {Vector3} b - The second vertex of the triangle. - * @param {Vector3} c - The third vertex of the triangle. - * @param {boolean} backfaceCulling - Whether to use backface culling or not. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {?Vector3} The intersection point. - */ - intersectTriangle(a: Vector3, b: Vector3, c: Vector3, backfaceCulling: boolean, target: Vector3): Vector3 | null; - /** - * Transforms this ray with the given 4x4 transformation matrix. - * - * @param {Matrix4} matrix4 - The transformation matrix. - * @return {Ray} A reference to this ray. - */ - applyMatrix4(matrix4: Matrix4): Ray; - /** - * Returns `true` if this ray is equal with the given one. - * - * @param {Ray} ray - The ray to test for equality. - * @return {boolean} Whether this ray is equal with the given one. - */ - equals(ray: Ray): boolean; - /** - * Returns a new ray with copied values from this instance. - * - * @return {Ray} A clone of this instance. - */ - clone(): Ray; -} -import { Vector3 } from './Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Sphere.d.ts b/jsdoc-testing/jsdoc/src/math/Sphere.d.ts deleted file mode 100644 index 5d7e4ac67..000000000 --- a/jsdoc-testing/jsdoc/src/math/Sphere.d.ts +++ /dev/null @@ -1,185 +0,0 @@ -/** - * An analytical 3D sphere defined by a center and radius. This class is mainly - * used as a Bounding Sphere for 3D objects. - */ -export class Sphere { - /** - * Constructs a new sphere. - * - * @param {Vector3} [center=(0,0,0)] - The center of the sphere - * @param {number} [radius=-1] - The radius of the sphere. - */ - constructor(center?: Vector3, radius?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSphere: boolean; - /** - * The center of the sphere - * - * @type {Vector3} - */ - center: Vector3; - /** - * The radius of the sphere. - * - * @type {number} - */ - radius: number; - /** - * Sets the sphere's components by copying the given values. - * - * @param {Vector3} center - The center. - * @param {number} radius - The radius. - * @return {Sphere} A reference to this sphere. - */ - set(center: Vector3, radius: number): Sphere; - /** - * Computes the minimum bounding sphere for list of points. - * If the optional center point is given, it is used as the sphere's - * center. Otherwise, the center of the axis-aligned bounding box - * encompassing the points is calculated. - * - * @param {Array} points - A list of points in 3D space. - * @param {Vector3} [optionalCenter] - The center of the sphere. - * @return {Sphere} A reference to this sphere. - */ - setFromPoints(points: Array, optionalCenter?: Vector3): Sphere; - /** - * Copies the values of the given sphere to this instance. - * - * @param {Sphere} sphere - The sphere to copy. - * @return {Sphere} A reference to this sphere. - */ - copy(sphere: Sphere): Sphere; - /** - * Returns `true` if the sphere is empty (the radius set to a negative number). - * - * Spheres with a radius of `0` contain only their center point and are not - * considered to be empty. - * - * @return {boolean} Whether this sphere is empty or not. - */ - isEmpty(): boolean; - /** - * Makes this sphere empty which means in encloses a zero space in 3D. - * - * @return {Sphere} A reference to this sphere. - */ - makeEmpty(): Sphere; - /** - * Returns `true` if this sphere contains the given point inclusive of - * the surface of the sphere. - * - * @param {Vector3} point - The point to check. - * @return {boolean} Whether this sphere contains the given point or not. - */ - containsPoint(point: Vector3): boolean; - /** - * Returns the closest distance from the boundary of the sphere to the - * given point. If the sphere contains the point, the distance will - * be negative. - * - * @param {Vector3} point - The point to compute the distance to. - * @return {number} The distance to the point. - */ - distanceToPoint(point: Vector3): number; - /** - * Returns `true` if this sphere intersects with the given one. - * - * @param {Sphere} sphere - The sphere to test. - * @return {boolean} Whether this sphere intersects with the given one or not. - */ - intersectsSphere(sphere: Sphere): boolean; - /** - * Returns `true` if this sphere intersects with the given box. - * - * @param {Box3} box - The box to test. - * @return {boolean} Whether this sphere intersects with the given box or not. - */ - intersectsBox(box: Box3): boolean; - /** - * Returns `true` if this sphere intersects with the given plane. - * - * @param {Plane} plane - The plane to test. - * @return {boolean} Whether this sphere intersects with the given plane or not. - */ - intersectsPlane(plane: Plane): boolean; - /** - * Clamps a point within the sphere. If the point is outside the sphere, it - * will clamp it to the closest point on the edge of the sphere. Points - * already inside the sphere will not be affected. - * - * @param {Vector3} point - The plane to clamp. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} The clamped point. - */ - clampPoint(point: Vector3, target: Vector3): Vector3; - /** - * Returns a bounding box that encloses this sphere. - * - * @param {Box3} target - The target box that is used to store the method's result. - * @return {Box3} The bounding box that encloses this sphere. - */ - getBoundingBox(target: Box3): Box3; - /** - * Transforms this sphere with the given 4x4 transformation matrix. - * - * @param {Matrix4} matrix - The transformation matrix. - * @return {Sphere} A reference to this sphere. - */ - applyMatrix4(matrix: Matrix4): Sphere; - /** - * Translates the sphere's center by the given offset. - * - * @param {Vector3} offset - The offset. - * @return {Sphere} A reference to this sphere. - */ - translate(offset: Vector3): Sphere; - /** - * Expands the boundaries of this sphere to include the given point. - * - * @param {Vector3} point - The point to include. - * @return {Sphere} A reference to this sphere. - */ - expandByPoint(point: Vector3): Sphere; - /** - * Expands this sphere to enclose both the original sphere and the given sphere. - * - * @param {Sphere} sphere - The sphere to include. - * @return {Sphere} A reference to this sphere. - */ - union(sphere: Sphere): Sphere; - /** - * Returns `true` if this sphere is equal with the given one. - * - * @param {Sphere} sphere - The sphere to test for equality. - * @return {boolean} Whether this bounding sphere is equal with the given one. - */ - equals(sphere: Sphere): boolean; - /** - * Returns a new sphere with copied values from this instance. - * - * @return {Sphere} A clone of this instance. - */ - clone(): Sphere; - /** - * Returns a serialized structure of the bounding sphere. - * - * @return {Object} Serialized structure with fields representing the object state. - */ - toJSON(): Object; - /** - * Returns a serialized structure of the bounding sphere. - * - * @param {Object} json - The serialized json to set the sphere from. - * @return {Sphere} A reference to this bounding sphere. - */ - fromJSON(json: Object): Sphere; -} -import { Vector3 } from './Vector3.js'; -import { Box3 } from './Box3.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Spherical.d.ts b/jsdoc-testing/jsdoc/src/math/Spherical.d.ts deleted file mode 100644 index 300c0481a..000000000 --- a/jsdoc-testing/jsdoc/src/math/Spherical.d.ts +++ /dev/null @@ -1,81 +0,0 @@ -/** - * This class can be used to represent points in 3D space as - * [Spherical coordinates](https://en.wikipedia.org/wiki/Spherical_coordinate_system). - */ -export class Spherical { - /** - * Constructs a new spherical. - * - * @param {number} [radius=1] - The radius, or the Euclidean distance (straight-line distance) from the point to the origin. - * @param {number} [phi=0] - The polar angle in radians from the y (up) axis. - * @param {number} [theta=0] - The equator/azimuthal angle in radians around the y (up) axis. - */ - constructor(radius?: number, phi?: number, theta?: number); - /** - * The radius, or the Euclidean distance (straight-line distance) from the point to the origin. - * - * @type {number} - * @default 1 - */ - radius: number; - /** - * The polar angle in radians from the y (up) axis. - * - * @type {number} - * @default 0 - */ - phi: number; - /** - * The equator/azimuthal angle in radians around the y (up) axis. - * - * @type {number} - * @default 0 - */ - theta: number; - /** - * Sets the spherical components by copying the given values. - * - * @param {number} radius - The radius. - * @param {number} phi - The polar angle. - * @param {number} theta - The azimuthal angle. - * @return {Spherical} A reference to this spherical. - */ - set(radius: number, phi: number, theta: number): Spherical; - /** - * Copies the values of the given spherical to this instance. - * - * @param {Spherical} other - The spherical to copy. - * @return {Spherical} A reference to this spherical. - */ - copy(other: Spherical): Spherical; - /** - * Restricts the polar angle [page:.phi phi] to be between `0.000001` and pi - - * `0.000001`. - * - * @return {Spherical} A reference to this spherical. - */ - makeSafe(): Spherical; - /** - * Sets the spherical components from the given vector which is assumed to hold - * Cartesian coordinates. - * - * @param {Vector3} v - The vector to set. - * @return {Spherical} A reference to this spherical. - */ - setFromVector3(v: Vector3): Spherical; - /** - * Sets the spherical components from the given Cartesian coordinates. - * - * @param {number} x - The x value. - * @param {number} y - The y value. - * @param {number} z - The z value. - * @return {Spherical} A reference to this spherical. - */ - setFromCartesianCoords(x: number, y: number, z: number): Spherical; - /** - * Returns a new spherical with copied values from this instance. - * - * @return {Spherical} A clone of this instance. - */ - clone(): Spherical; -} diff --git a/jsdoc-testing/jsdoc/src/math/SphericalHarmonics3.d.ts b/jsdoc-testing/jsdoc/src/math/SphericalHarmonics3.d.ts deleted file mode 100644 index 307ff49fa..000000000 --- a/jsdoc-testing/jsdoc/src/math/SphericalHarmonics3.d.ts +++ /dev/null @@ -1,131 +0,0 @@ -/** - * Represents a third-order spherical harmonics (SH). Light probes use this class - * to encode lighting information. - * - * - Primary reference: {@link https://graphics.stanford.edu/papers/envmap/envmap.pdf} - * - Secondary reference: {@link https://www.ppsloan.org/publications/StupidSH36.pdf} - */ -export class SphericalHarmonics3 { - /** - * Computes the SH basis for the given normal vector. - * - * @param {Vector3} normal - The normal. - * @param {Array} shBasis - The target array holding the SH basis. - */ - static getBasisAt(normal: Vector3, shBasis: Array): void; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSphericalHarmonics3: boolean; - /** - * An array holding the (9) SH coefficients. - * - * @type {Array} - */ - coefficients: Array; - /** - * Sets the given SH coefficients to this instance by copying - * the values. - * - * @param {Array} coefficients - The SH coefficients. - * @return {SphericalHarmonics3} A reference to this spherical harmonics. - */ - set(coefficients: Array): SphericalHarmonics3; - /** - * Sets all SH coefficients to `0`. - * - * @return {SphericalHarmonics3} A reference to this spherical harmonics. - */ - zero(): SphericalHarmonics3; - /** - * Returns the radiance in the direction of the given normal. - * - * @param {Vector3} normal - The normal vector (assumed to be unit length) - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} The radiance. - */ - getAt(normal: Vector3, target: Vector3): Vector3; - /** - * Returns the irradiance (radiance convolved with cosine lobe) in the - * direction of the given normal. - * - * @param {Vector3} normal - The normal vector (assumed to be unit length) - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} The irradiance. - */ - getIrradianceAt(normal: Vector3, target: Vector3): Vector3; - /** - * Adds the given SH to this instance. - * - * @param {SphericalHarmonics3} sh - The SH to add. - * @return {SphericalHarmonics3} A reference to this spherical harmonics. - */ - add(sh: SphericalHarmonics3): SphericalHarmonics3; - /** - * A convenience method for performing {@link SphericalHarmonics3#add} and - * {@link SphericalHarmonics3#scale} at once. - * - * @param {SphericalHarmonics3} sh - The SH to add. - * @param {number} s - The scale factor. - * @return {SphericalHarmonics3} A reference to this spherical harmonics. - */ - addScaledSH(sh: SphericalHarmonics3, s: number): SphericalHarmonics3; - /** - * Scales this SH by the given scale factor. - * - * @param {number} s - The scale factor. - * @return {SphericalHarmonics3} A reference to this spherical harmonics. - */ - scale(s: number): SphericalHarmonics3; - /** - * Linear interpolates between the given SH and this instance by the given - * alpha factor. - * - * @param {SphericalHarmonics3} sh - The SH to interpolate with. - * @param {number} alpha - The alpha factor. - * @return {SphericalHarmonics3} A reference to this spherical harmonics. - */ - lerp(sh: SphericalHarmonics3, alpha: number): SphericalHarmonics3; - /** - * Returns `true` if this spherical harmonics is equal with the given one. - * - * @param {SphericalHarmonics3} sh - The spherical harmonics to test for equality. - * @return {boolean} Whether this spherical harmonics is equal with the given one. - */ - equals(sh: SphericalHarmonics3): boolean; - /** - * Copies the values of the given spherical harmonics to this instance. - * - * @param {SphericalHarmonics3} sh - The spherical harmonics to copy. - * @return {SphericalHarmonics3} A reference to this spherical harmonics. - */ - copy(sh: SphericalHarmonics3): SphericalHarmonics3; - /** - * Returns a new spherical harmonics with copied values from this instance. - * - * @return {SphericalHarmonics3} A clone of this instance. - */ - clone(): SphericalHarmonics3; - /** - * Sets the SH coefficients of this instance from the given array. - * - * @param {Array} array - An array holding the SH coefficients. - * @param {number} [offset=0] - The array offset where to start copying. - * @return {SphericalHarmonics3} A clone of this instance. - */ - fromArray(array: Array, offset?: number): SphericalHarmonics3; - /** - * Returns an array with the SH coefficients, or copies them into the provided - * array. The coefficients are represented as numbers. - * - * @param {Array} [array=[]] - The target array. - * @param {number} [offset=0] - The array offset where to start copying. - * @return {Array} An array with flat SH coefficients. - */ - toArray(array?: Array, offset?: number): Array; -} -import { Vector3 } from './Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Triangle.d.ts b/jsdoc-testing/jsdoc/src/math/Triangle.d.ts deleted file mode 100644 index 3841d3852..000000000 --- a/jsdoc-testing/jsdoc/src/math/Triangle.d.ts +++ /dev/null @@ -1,231 +0,0 @@ -/** - * A geometric triangle as defined by three vectors representing its three corners. - */ -export class Triangle { - /** - * Computes the normal vector of a triangle. - * - * @param {Vector3} a - The first corner of the triangle. - * @param {Vector3} b - The second corner of the triangle. - * @param {Vector3} c - The third corner of the triangle. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} The triangle's normal. - */ - static getNormal(a: Vector3, b: Vector3, c: Vector3, target: Vector3): Vector3; - /** - * Computes a barycentric coordinates from the given vector. - * Returns `null` if the triangle is degenerate. - * - * @param {Vector3} point - A point in 3D space. - * @param {Vector3} a - The first corner of the triangle. - * @param {Vector3} b - The second corner of the triangle. - * @param {Vector3} c - The third corner of the triangle. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {?Vector3} The barycentric coordinates for the given point - */ - static getBarycoord(point: Vector3, a: Vector3, b: Vector3, c: Vector3, target: Vector3): Vector3 | null; - /** - * Returns `true` if the given point, when projected onto the plane of the - * triangle, lies within the triangle. - * - * @param {Vector3} point - The point in 3D space to test. - * @param {Vector3} a - The first corner of the triangle. - * @param {Vector3} b - The second corner of the triangle. - * @param {Vector3} c - The third corner of the triangle. - * @return {boolean} Whether the given point, when projected onto the plane of the - * triangle, lies within the triangle or not. - */ - static containsPoint(point: Vector3, a: Vector3, b: Vector3, c: Vector3): boolean; - /** - * Computes the value barycentrically interpolated for the given point on the - * triangle. Returns `null` if the triangle is degenerate. - * - * @param {Vector3} point - Position of interpolated point. - * @param {Vector3} p1 - The first corner of the triangle. - * @param {Vector3} p2 - The second corner of the triangle. - * @param {Vector3} p3 - The third corner of the triangle. - * @param {Vector3} v1 - Value to interpolate of first vertex. - * @param {Vector3} v2 - Value to interpolate of second vertex. - * @param {Vector3} v3 - Value to interpolate of third vertex. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {?Vector3} The interpolated value. - */ - static getInterpolation(point: Vector3, p1: Vector3, p2: Vector3, p3: Vector3, v1: Vector3, v2: Vector3, v3: Vector3, target: Vector3): Vector3 | null; - /** - * Computes the value barycentrically interpolated for the given attribute and indices. - * - * @param {BufferAttribute} attr - The attribute to interpolate. - * @param {number} i1 - Index of first vertex. - * @param {number} i2 - Index of second vertex. - * @param {number} i3 - Index of third vertex. - * @param {Vector3} barycoord - The barycoordinate value to use to interpolate. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} The interpolated attribute value. - */ - static getInterpolatedAttribute(attr: BufferAttribute, i1: number, i2: number, i3: number, barycoord: Vector3, target: Vector3): Vector3; - /** - * Returns `true` if the triangle is oriented towards the given direction. - * - * @param {Vector3} a - The first corner of the triangle. - * @param {Vector3} b - The second corner of the triangle. - * @param {Vector3} c - The third corner of the triangle. - * @param {Vector3} direction - The (normalized) direction vector. - * @return {boolean} Whether the triangle is oriented towards the given direction or not. - */ - static isFrontFacing(a: Vector3, b: Vector3, c: Vector3, direction: Vector3): boolean; - /** - * Constructs a new triangle. - * - * @param {Vector3} [a=(0,0,0)] - The first corner of the triangle. - * @param {Vector3} [b=(0,0,0)] - The second corner of the triangle. - * @param {Vector3} [c=(0,0,0)] - The third corner of the triangle. - */ - constructor(a?: Vector3, b?: Vector3, c?: Vector3); - /** - * The first corner of the triangle. - * - * @type {Vector3} - */ - a: Vector3; - /** - * The second corner of the triangle. - * - * @type {Vector3} - */ - b: Vector3; - /** - * The third corner of the triangle. - * - * @type {Vector3} - */ - c: Vector3; - /** - * Sets the triangle's vertices by copying the given values. - * - * @param {Vector3} a - The first corner of the triangle. - * @param {Vector3} b - The second corner of the triangle. - * @param {Vector3} c - The third corner of the triangle. - * @return {Triangle} A reference to this triangle. - */ - set(a: Vector3, b: Vector3, c: Vector3): Triangle; - /** - * Sets the triangle's vertices by copying the given array values. - * - * @param {Array} points - An array with 3D points. - * @param {number} i0 - The array index representing the first corner of the triangle. - * @param {number} i1 - The array index representing the second corner of the triangle. - * @param {number} i2 - The array index representing the third corner of the triangle. - * @return {Triangle} A reference to this triangle. - */ - setFromPointsAndIndices(points: Array, i0: number, i1: number, i2: number): Triangle; - /** - * Sets the triangle's vertices by copying the given attribute values. - * - * @param {BufferAttribute} attribute - A buffer attribute with 3D points data. - * @param {number} i0 - The attribute index representing the first corner of the triangle. - * @param {number} i1 - The attribute index representing the second corner of the triangle. - * @param {number} i2 - The attribute index representing the third corner of the triangle. - * @return {Triangle} A reference to this triangle. - */ - setFromAttributeAndIndices(attribute: BufferAttribute, i0: number, i1: number, i2: number): Triangle; - /** - * Returns a new triangle with copied values from this instance. - * - * @return {Triangle} A clone of this instance. - */ - clone(): Triangle; - /** - * Copies the values of the given triangle to this instance. - * - * @param {Triangle} triangle - The triangle to copy. - * @return {Triangle} A reference to this triangle. - */ - copy(triangle: Triangle): Triangle; - /** - * Computes the area of the triangle. - * - * @return {number} The triangle's area. - */ - getArea(): number; - /** - * Computes the midpoint of the triangle. - * - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} The triangle's midpoint. - */ - getMidpoint(target: Vector3): Vector3; - /** - * Computes the normal of the triangle. - * - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} The triangle's normal. - */ - getNormal(target: Vector3): Vector3; - /** - * Computes a plane the triangle lies within. - * - * @param {Plane} target - The target vector that is used to store the method's result. - * @return {Plane} The plane the triangle lies within. - */ - getPlane(target: Plane): Plane; - /** - * Computes a barycentric coordinates from the given vector. - * Returns `null` if the triangle is degenerate. - * - * @param {Vector3} point - A point in 3D space. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {?Vector3} The barycentric coordinates for the given point - */ - getBarycoord(point: Vector3, target: Vector3): Vector3 | null; - /** - * Computes the value barycentrically interpolated for the given point on the - * triangle. Returns `null` if the triangle is degenerate. - * - * @param {Vector3} point - Position of interpolated point. - * @param {Vector3} v1 - Value to interpolate of first vertex. - * @param {Vector3} v2 - Value to interpolate of second vertex. - * @param {Vector3} v3 - Value to interpolate of third vertex. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {?Vector3} The interpolated value. - */ - getInterpolation(point: Vector3, v1: Vector3, v2: Vector3, v3: Vector3, target: Vector3): Vector3 | null; - /** - * Returns `true` if the given point, when projected onto the plane of the - * triangle, lies within the triangle. - * - * @param {Vector3} point - The point in 3D space to test. - * @return {boolean} Whether the given point, when projected onto the plane of the - * triangle, lies within the triangle or not. - */ - containsPoint(point: Vector3): boolean; - /** - * Returns `true` if the triangle is oriented towards the given direction. - * - * @param {Vector3} direction - The (normalized) direction vector. - * @return {boolean} Whether the triangle is oriented towards the given direction or not. - */ - isFrontFacing(direction: Vector3): boolean; - /** - * Returns `true` if this triangle intersects with the given box. - * - * @param {Box3} box - The box to intersect. - * @return {boolean} Whether this triangle intersects with the given box or not. - */ - intersectsBox(box: Box3): boolean; - /** - * Returns the closest point on the triangle to the given point. - * - * @param {Vector3} p - The point to compute the closest point for. - * @param {Vector3} target - The target vector that is used to store the method's result. - * @return {Vector3} The closest point on the triangle. - */ - closestPointToPoint(p: Vector3, target: Vector3): Vector3; - /** - * Returns `true` if this triangle is equal with the given one. - * - * @param {Triangle} triangle - The triangle to test for equality. - * @return {boolean} Whether this triangle is equal with the given one. - */ - equals(triangle: Triangle): boolean; -} -import { Vector3 } from './Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Vector2.d.ts b/jsdoc-testing/jsdoc/src/math/Vector2.d.ts deleted file mode 100644 index aeaeb509d..000000000 --- a/jsdoc-testing/jsdoc/src/math/Vector2.d.ts +++ /dev/null @@ -1,440 +0,0 @@ -/** - * Class representing a 2D vector. A 2D vector is an ordered pair of numbers - * (labeled x and y), which can be used to represent a number of things, such as: - * - * - A point in 2D space (i.e. a position on a plane). - * - A direction and length across a plane. In three.js the length will - * always be the Euclidean distance(straight-line distance) from `(0, 0)` to `(x, y)` - * and the direction is also measured from `(0, 0)` towards `(x, y)`. - * - Any arbitrary ordered pair of numbers. - * - * There are other things a 2D vector can be used to represent, such as - * momentum vectors, complex numbers and so on, however these are the most - * common uses in three.js. - * - * Iterating through a vector instance will yield its components `(x, y)` in - * the corresponding order. - * ```js - * const a = new THREE.Vector2( 0, 1 ); - * - * //no arguments; will be initialised to (0, 0) - * const b = new THREE.Vector2( ); - * - * const d = a.distanceTo( b ); - * ``` - */ -export class Vector2 { - /** - * Constructs a new 2D vector. - * - * @param {number} [x=0] - The x value of this vector. - * @param {number} [y=0] - The y value of this vector. - */ - constructor(x?: number, y?: number); - /** - * The x value of this vector. - * - * @type {number} - */ - x: number; - /** - * The y value of this vector. - * - * @type {number} - */ - y: number; - set width(value: number); - /** - * Alias for {@link Vector2#x}. - * - * @type {number} - */ - get width(): number; - set height(value: number); - /** - * Alias for {@link Vector2#y}. - * - * @type {number} - */ - get height(): number; - /** - * Sets the vector components. - * - * @param {number} x - The value of the x component. - * @param {number} y - The value of the y component. - * @return {Vector2} A reference to this vector. - */ - set(x: number, y: number): Vector2; - /** - * Sets the vector components to the same value. - * - * @param {number} scalar - The value to set for all vector components. - * @return {Vector2} A reference to this vector. - */ - setScalar(scalar: number): Vector2; - /** - * Sets the vector's x component to the given value - * - * @param {number} x - The value to set. - * @return {Vector2} A reference to this vector. - */ - setX(x: number): Vector2; - /** - * Sets the vector's y component to the given value - * - * @param {number} y - The value to set. - * @return {Vector2} A reference to this vector. - */ - setY(y: number): Vector2; - /** - * Allows to set a vector component with an index. - * - * @param {number} index - The component index. `0` equals to x, `1` equals to y. - * @param {number} value - The value to set. - * @return {Vector2} A reference to this vector. - */ - setComponent(index: number, value: number): Vector2; - /** - * Returns the value of the vector component which matches the given index. - * - * @param {number} index - The component index. `0` equals to x, `1` equals to y. - * @return {number} A vector component value. - */ - getComponent(index: number): number; - /** - * Returns a new vector with copied values from this instance. - * - * @return {Vector2} A clone of this instance. - */ - clone(): Vector2; - /** - * Copies the values of the given vector to this instance. - * - * @param {Vector2} v - The vector to copy. - * @return {Vector2} A reference to this vector. - */ - copy(v: Vector2): Vector2; - /** - * Adds the given vector to this instance. - * - * @param {Vector2} v - The vector to add. - * @return {Vector2} A reference to this vector. - */ - add(v: Vector2): Vector2; - /** - * Adds the given scalar value to all components of this instance. - * - * @param {number} s - The scalar to add. - * @return {Vector2} A reference to this vector. - */ - addScalar(s: number): Vector2; - /** - * Adds the given vectors and stores the result in this instance. - * - * @param {Vector2} a - The first vector. - * @param {Vector2} b - The second vector. - * @return {Vector2} A reference to this vector. - */ - addVectors(a: Vector2, b: Vector2): Vector2; - /** - * Adds the given vector scaled by the given factor to this instance. - * - * @param {Vector2} v - The vector. - * @param {number} s - The factor that scales `v`. - * @return {Vector2} A reference to this vector. - */ - addScaledVector(v: Vector2, s: number): Vector2; - /** - * Subtracts the given vector from this instance. - * - * @param {Vector2} v - The vector to subtract. - * @return {Vector2} A reference to this vector. - */ - sub(v: Vector2): Vector2; - /** - * Subtracts the given scalar value from all components of this instance. - * - * @param {number} s - The scalar to subtract. - * @return {Vector2} A reference to this vector. - */ - subScalar(s: number): Vector2; - /** - * Subtracts the given vectors and stores the result in this instance. - * - * @param {Vector2} a - The first vector. - * @param {Vector2} b - The second vector. - * @return {Vector2} A reference to this vector. - */ - subVectors(a: Vector2, b: Vector2): Vector2; - /** - * Multiplies the given vector with this instance. - * - * @param {Vector2} v - The vector to multiply. - * @return {Vector2} A reference to this vector. - */ - multiply(v: Vector2): Vector2; - /** - * Multiplies the given scalar value with all components of this instance. - * - * @param {number} scalar - The scalar to multiply. - * @return {Vector2} A reference to this vector. - */ - multiplyScalar(scalar: number): Vector2; - /** - * Divides this instance by the given vector. - * - * @param {Vector2} v - The vector to divide. - * @return {Vector2} A reference to this vector. - */ - divide(v: Vector2): Vector2; - /** - * Divides this vector by the given scalar. - * - * @param {number} scalar - The scalar to divide. - * @return {Vector2} A reference to this vector. - */ - divideScalar(scalar: number): Vector2; - /** - * Multiplies this vector (with an implicit 1 as the 3rd component) by - * the given 3x3 matrix. - * - * @param {Matrix3} m - The matrix to apply. - * @return {Vector2} A reference to this vector. - */ - applyMatrix3(m: Matrix3): Vector2; - /** - * If this vector's x or y value is greater than the given vector's x or y - * value, replace that value with the corresponding min value. - * - * @param {Vector2} v - The vector. - * @return {Vector2} A reference to this vector. - */ - min(v: Vector2): Vector2; - /** - * If this vector's x or y value is less than the given vector's x or y - * value, replace that value with the corresponding max value. - * - * @param {Vector2} v - The vector. - * @return {Vector2} A reference to this vector. - */ - max(v: Vector2): Vector2; - /** - * If this vector's x or y value is greater than the max vector's x or y - * value, it is replaced by the corresponding value. - * If this vector's x or y value is less than the min vector's x or y value, - * it is replaced by the corresponding value. - * - * @param {Vector2} min - The minimum x and y values. - * @param {Vector2} max - The maximum x and y values in the desired range. - * @return {Vector2} A reference to this vector. - */ - clamp(min: Vector2, max: Vector2): Vector2; - /** - * If this vector's x or y values are greater than the max value, they are - * replaced by the max value. - * If this vector's x or y values are less than the min value, they are - * replaced by the min value. - * - * @param {number} minVal - The minimum value the components will be clamped to. - * @param {number} maxVal - The maximum value the components will be clamped to. - * @return {Vector2} A reference to this vector. - */ - clampScalar(minVal: number, maxVal: number): Vector2; - /** - * If this vector's length is greater than the max value, it is replaced by - * the max value. - * If this vector's length is less than the min value, it is replaced by the - * min value. - * - * @param {number} min - The minimum value the vector length will be clamped to. - * @param {number} max - The maximum value the vector length will be clamped to. - * @return {Vector2} A reference to this vector. - */ - clampLength(min: number, max: number): Vector2; - /** - * The components of this vector are rounded down to the nearest integer value. - * - * @return {Vector2} A reference to this vector. - */ - floor(): Vector2; - /** - * The components of this vector are rounded up to the nearest integer value. - * - * @return {Vector2} A reference to this vector. - */ - ceil(): Vector2; - /** - * The components of this vector are rounded to the nearest integer value - * - * @return {Vector2} A reference to this vector. - */ - round(): Vector2; - /** - * The components of this vector are rounded towards zero (up if negative, - * down if positive) to an integer value. - * - * @return {Vector2} A reference to this vector. - */ - roundToZero(): Vector2; - /** - * Inverts this vector - i.e. sets x = -x and y = -y. - * - * @return {Vector2} A reference to this vector. - */ - negate(): Vector2; - /** - * Calculates the dot product of the given vector with this instance. - * - * @param {Vector2} v - The vector to compute the dot product with. - * @return {number} The result of the dot product. - */ - dot(v: Vector2): number; - /** - * Calculates the cross product of the given vector with this instance. - * - * @param {Vector2} v - The vector to compute the cross product with. - * @return {number} The result of the cross product. - */ - cross(v: Vector2): number; - /** - * Computes the square of the Euclidean length (straight-line length) from - * (0, 0) to (x, y). If you are comparing the lengths of vectors, you should - * compare the length squared instead as it is slightly more efficient to calculate. - * - * @return {number} The square length of this vector. - */ - lengthSq(): number; - /** - * Computes the Euclidean length (straight-line length) from (0, 0) to (x, y). - * - * @return {number} The length of this vector. - */ - length(): number; - /** - * Computes the Manhattan length of this vector. - * - * @return {number} The length of this vector. - */ - manhattanLength(): number; - /** - * Converts this vector to a unit vector - that is, sets it equal to a vector - * with the same direction as this one, but with a vector length of `1`. - * - * @return {Vector2} A reference to this vector. - */ - normalize(): Vector2; - /** - * Computes the angle in radians of this vector with respect to the positive x-axis. - * - * @return {number} The angle in radians. - */ - angle(): number; - /** - * Returns the angle between the given vector and this instance in radians. - * - * @param {Vector2} v - The vector to compute the angle with. - * @return {number} The angle in radians. - */ - angleTo(v: Vector2): number; - /** - * Computes the distance from the given vector to this instance. - * - * @param {Vector2} v - The vector to compute the distance to. - * @return {number} The distance. - */ - distanceTo(v: Vector2): number; - /** - * Computes the squared distance from the given vector to this instance. - * If you are just comparing the distance with another distance, you should compare - * the distance squared instead as it is slightly more efficient to calculate. - * - * @param {Vector2} v - The vector to compute the squared distance to. - * @return {number} The squared distance. - */ - distanceToSquared(v: Vector2): number; - /** - * Computes the Manhattan distance from the given vector to this instance. - * - * @param {Vector2} v - The vector to compute the Manhattan distance to. - * @return {number} The Manhattan distance. - */ - manhattanDistanceTo(v: Vector2): number; - /** - * Sets this vector to a vector with the same direction as this one, but - * with the specified length. - * - * @param {number} length - The new length of this vector. - * @return {Vector2} A reference to this vector. - */ - setLength(length: number): Vector2; - /** - * Linearly interpolates between the given vector and this instance, where - * alpha is the percent distance along the line - alpha = 0 will be this - * vector, and alpha = 1 will be the given one. - * - * @param {Vector2} v - The vector to interpolate towards. - * @param {number} alpha - The interpolation factor, typically in the closed interval `[0, 1]`. - * @return {Vector2} A reference to this vector. - */ - lerp(v: Vector2, alpha: number): Vector2; - /** - * Linearly interpolates between the given vectors, where alpha is the percent - * distance along the line - alpha = 0 will be first vector, and alpha = 1 will - * be the second one. The result is stored in this instance. - * - * @param {Vector2} v1 - The first vector. - * @param {Vector2} v2 - The second vector. - * @param {number} alpha - The interpolation factor, typically in the closed interval `[0, 1]`. - * @return {Vector2} A reference to this vector. - */ - lerpVectors(v1: Vector2, v2: Vector2, alpha: number): Vector2; - /** - * Returns `true` if this vector is equal with the given one. - * - * @param {Vector2} v - The vector to test for equality. - * @return {boolean} Whether this vector is equal with the given one. - */ - equals(v: Vector2): boolean; - /** - * Sets this vector's x value to be `array[ offset ]` and y - * value to be `array[ offset + 1 ]`. - * - * @param {Array} array - An array holding the vector component values. - * @param {number} [offset=0] - The offset into the array. - * @return {Vector2} A reference to this vector. - */ - fromArray(array: Array, offset?: number): Vector2; - /** - * Writes the components of this vector to the given array. If no array is provided, - * the method returns a new instance. - * - * @param {Array} [array=[]] - The target array holding the vector components. - * @param {number} [offset=0] - Index of the first element in the array. - * @return {Array} The vector components. - */ - toArray(array?: Array, offset?: number): Array; - /** - * Sets the components of this vector from the given buffer attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute holding vector data. - * @param {number} index - The index into the attribute. - * @return {Vector2} A reference to this vector. - */ - fromBufferAttribute(attribute: BufferAttribute, index: number): Vector2; - /** - * Rotates this vector around the given center by the given angle. - * - * @param {Vector2} center - The point around which to rotate. - * @param {number} angle - The angle to rotate, in radians. - * @return {Vector2} A reference to this vector. - */ - rotateAround(center: Vector2, angle: number): Vector2; - /** - * Sets each component of this vector to a pseudo-random value between `0` and - * `1`, excluding `1`. - * - * @return {Vector2} A reference to this vector. - */ - random(): Vector2; - [Symbol.iterator](): Generator; -} diff --git a/jsdoc-testing/jsdoc/src/math/Vector3.d.ts b/jsdoc-testing/jsdoc/src/math/Vector3.d.ts deleted file mode 100644 index df65f7998..000000000 --- a/jsdoc-testing/jsdoc/src/math/Vector3.d.ts +++ /dev/null @@ -1,613 +0,0 @@ -/** - * Class representing a 3D vector. A 3D vector is an ordered triplet of numbers - * (labeled x, y and z), which can be used to represent a number of things, such as: - * - * - A point in 3D space. - * - A direction and length in 3D space. In three.js the length will - * always be the Euclidean distance(straight-line distance) from `(0, 0, 0)` to `(x, y, z)` - * and the direction is also measured from `(0, 0, 0)` towards `(x, y, z)`. - * - Any arbitrary ordered triplet of numbers. - * - * There are other things a 3D vector can be used to represent, such as - * momentum vectors and so on, however these are the most - * common uses in three.js. - * - * Iterating through a vector instance will yield its components `(x, y, z)` in - * the corresponding order. - * ```js - * const a = new THREE.Vector3( 0, 1, 0 ); - * - * //no arguments; will be initialised to (0, 0, 0) - * const b = new THREE.Vector3( ); - * - * const d = a.distanceTo( b ); - * ``` - */ -export class Vector3 { - /** - * Constructs a new 3D vector. - * - * @param {number} [x=0] - The x value of this vector. - * @param {number} [y=0] - The y value of this vector. - * @param {number} [z=0] - The z value of this vector. - */ - constructor(x?: number, y?: number, z?: number); - /** - * The x value of this vector. - * - * @type {number} - */ - x: number; - /** - * The y value of this vector. - * - * @type {number} - */ - y: number; - /** - * The z value of this vector. - * - * @type {number} - */ - z: number; - /** - * Sets the vector components. - * - * @param {number} x - The value of the x component. - * @param {number} y - The value of the y component. - * @param {number} z - The value of the z component. - * @return {Vector3} A reference to this vector. - */ - set(x: number, y: number, z: number): Vector3; - /** - * Sets the vector components to the same value. - * - * @param {number} scalar - The value to set for all vector components. - * @return {Vector3} A reference to this vector. - */ - setScalar(scalar: number): Vector3; - /** - * Sets the vector's x component to the given value. - * - * @param {number} x - The value to set. - * @return {Vector3} A reference to this vector. - */ - setX(x: number): Vector3; - /** - * Sets the vector's y component to the given value. - * - * @param {number} y - The value to set. - * @return {Vector3} A reference to this vector. - */ - setY(y: number): Vector3; - /** - * Sets the vector's z component to the given value. - * - * @param {number} z - The value to set. - * @return {Vector3} A reference to this vector. - */ - setZ(z: number): Vector3; - /** - * Allows to set a vector component with an index. - * - * @param {number} index - The component index. `0` equals to x, `1` equals to y, `2` equals to z. - * @param {number} value - The value to set. - * @return {Vector3} A reference to this vector. - */ - setComponent(index: number, value: number): Vector3; - /** - * Returns the value of the vector component which matches the given index. - * - * @param {number} index - The component index. `0` equals to x, `1` equals to y, `2` equals to z. - * @return {number} A vector component value. - */ - getComponent(index: number): number; - /** - * Returns a new vector with copied values from this instance. - * - * @return {Vector3} A clone of this instance. - */ - clone(): Vector3; - /** - * Copies the values of the given vector to this instance. - * - * @param {Vector3} v - The vector to copy. - * @return {Vector3} A reference to this vector. - */ - copy(v: Vector3): Vector3; - /** - * Adds the given vector to this instance. - * - * @param {Vector3} v - The vector to add. - * @return {Vector3} A reference to this vector. - */ - add(v: Vector3): Vector3; - /** - * Adds the given scalar value to all components of this instance. - * - * @param {number} s - The scalar to add. - * @return {Vector3} A reference to this vector. - */ - addScalar(s: number): Vector3; - /** - * Adds the given vectors and stores the result in this instance. - * - * @param {Vector3} a - The first vector. - * @param {Vector3} b - The second vector. - * @return {Vector3} A reference to this vector. - */ - addVectors(a: Vector3, b: Vector3): Vector3; - /** - * Adds the given vector scaled by the given factor to this instance. - * - * @param {Vector3|Vector4} v - The vector. - * @param {number} s - The factor that scales `v`. - * @return {Vector3} A reference to this vector. - */ - addScaledVector(v: Vector3 | Vector4, s: number): Vector3; - /** - * Subtracts the given vector from this instance. - * - * @param {Vector3} v - The vector to subtract. - * @return {Vector3} A reference to this vector. - */ - sub(v: Vector3): Vector3; - /** - * Subtracts the given scalar value from all components of this instance. - * - * @param {number} s - The scalar to subtract. - * @return {Vector3} A reference to this vector. - */ - subScalar(s: number): Vector3; - /** - * Subtracts the given vectors and stores the result in this instance. - * - * @param {Vector3} a - The first vector. - * @param {Vector3} b - The second vector. - * @return {Vector3} A reference to this vector. - */ - subVectors(a: Vector3, b: Vector3): Vector3; - /** - * Multiplies the given vector with this instance. - * - * @param {Vector3} v - The vector to multiply. - * @return {Vector3} A reference to this vector. - */ - multiply(v: Vector3): Vector3; - /** - * Multiplies the given scalar value with all components of this instance. - * - * @param {number} scalar - The scalar to multiply. - * @return {Vector3} A reference to this vector. - */ - multiplyScalar(scalar: number): Vector3; - /** - * Multiplies the given vectors and stores the result in this instance. - * - * @param {Vector3} a - The first vector. - * @param {Vector3} b - The second vector. - * @return {Vector3} A reference to this vector. - */ - multiplyVectors(a: Vector3, b: Vector3): Vector3; - /** - * Applies the given Euler rotation to this vector. - * - * @param {Euler} euler - The Euler angles. - * @return {Vector3} A reference to this vector. - */ - applyEuler(euler: Euler): Vector3; - /** - * Applies a rotation specified by an axis and an angle to this vector. - * - * @param {Vector3} axis - A normalized vector representing the rotation axis. - * @param {number} angle - The angle in radians. - * @return {Vector3} A reference to this vector. - */ - applyAxisAngle(axis: Vector3, angle: number): Vector3; - /** - * Multiplies this vector with the given 3x3 matrix. - * - * @param {Matrix3} m - The 3x3 matrix. - * @return {Vector3} A reference to this vector. - */ - applyMatrix3(m: Matrix3): Vector3; - /** - * Multiplies this vector by the given normal matrix and normalizes - * the result. - * - * @param {Matrix3} m - The normal matrix. - * @return {Vector3} A reference to this vector. - */ - applyNormalMatrix(m: Matrix3): Vector3; - /** - * Multiplies this vector (with an implicit 1 in the 4th dimension) by m, and - * divides by perspective. - * - * @param {Matrix4} m - The matrix to apply. - * @return {Vector3} A reference to this vector. - */ - applyMatrix4(m: Matrix4): Vector3; - /** - * Applies the given Quaternion to this vector. - * - * @param {Quaternion} q - The Quaternion. - * @return {Vector3} A reference to this vector. - */ - applyQuaternion(q: Quaternion): Vector3; - /** - * Projects this vector from world space into the camera's normalized - * device coordinate (NDC) space. - * - * @param {Camera} camera - The camera. - * @return {Vector3} A reference to this vector. - */ - project(camera: Camera): Vector3; - /** - * Unprojects this vector from the camera's normalized device coordinate (NDC) - * space into world space. - * - * @param {Camera} camera - The camera. - * @return {Vector3} A reference to this vector. - */ - unproject(camera: Camera): Vector3; - /** - * Transforms the direction of this vector by a matrix (the upper left 3 x 3 - * subset of the given 4x4 matrix and then normalizes the result. - * - * @param {Matrix4} m - The matrix. - * @return {Vector3} A reference to this vector. - */ - transformDirection(m: Matrix4): Vector3; - /** - * Divides this instance by the given vector. - * - * @param {Vector3} v - The vector to divide. - * @return {Vector3} A reference to this vector. - */ - divide(v: Vector3): Vector3; - /** - * Divides this vector by the given scalar. - * - * @param {number} scalar - The scalar to divide. - * @return {Vector3} A reference to this vector. - */ - divideScalar(scalar: number): Vector3; - /** - * If this vector's x, y or z value is greater than the given vector's x, y or z - * value, replace that value with the corresponding min value. - * - * @param {Vector3} v - The vector. - * @return {Vector3} A reference to this vector. - */ - min(v: Vector3): Vector3; - /** - * If this vector's x, y or z value is less than the given vector's x, y or z - * value, replace that value with the corresponding max value. - * - * @param {Vector3} v - The vector. - * @return {Vector3} A reference to this vector. - */ - max(v: Vector3): Vector3; - /** - * If this vector's x, y or z value is greater than the max vector's x, y or z - * value, it is replaced by the corresponding value. - * If this vector's x, y or z value is less than the min vector's x, y or z value, - * it is replaced by the corresponding value. - * - * @param {Vector3} min - The minimum x, y and z values. - * @param {Vector3} max - The maximum x, y and z values in the desired range. - * @return {Vector3} A reference to this vector. - */ - clamp(min: Vector3, max: Vector3): Vector3; - /** - * If this vector's x, y or z values are greater than the max value, they are - * replaced by the max value. - * If this vector's x, y or z values are less than the min value, they are - * replaced by the min value. - * - * @param {number} minVal - The minimum value the components will be clamped to. - * @param {number} maxVal - The maximum value the components will be clamped to. - * @return {Vector3} A reference to this vector. - */ - clampScalar(minVal: number, maxVal: number): Vector3; - /** - * If this vector's length is greater than the max value, it is replaced by - * the max value. - * If this vector's length is less than the min value, it is replaced by the - * min value. - * - * @param {number} min - The minimum value the vector length will be clamped to. - * @param {number} max - The maximum value the vector length will be clamped to. - * @return {Vector3} A reference to this vector. - */ - clampLength(min: number, max: number): Vector3; - /** - * The components of this vector are rounded down to the nearest integer value. - * - * @return {Vector3} A reference to this vector. - */ - floor(): Vector3; - /** - * The components of this vector are rounded up to the nearest integer value. - * - * @return {Vector3} A reference to this vector. - */ - ceil(): Vector3; - /** - * The components of this vector are rounded to the nearest integer value - * - * @return {Vector3} A reference to this vector. - */ - round(): Vector3; - /** - * The components of this vector are rounded towards zero (up if negative, - * down if positive) to an integer value. - * - * @return {Vector3} A reference to this vector. - */ - roundToZero(): Vector3; - /** - * Inverts this vector - i.e. sets x = -x, y = -y and z = -z. - * - * @return {Vector3} A reference to this vector. - */ - negate(): Vector3; - /** - * Calculates the dot product of the given vector with this instance. - * - * @param {Vector3} v - The vector to compute the dot product with. - * @return {number} The result of the dot product. - */ - dot(v: Vector3): number; - /** - * Computes the square of the Euclidean length (straight-line length) from - * (0, 0, 0) to (x, y, z). If you are comparing the lengths of vectors, you should - * compare the length squared instead as it is slightly more efficient to calculate. - * - * @return {number} The square length of this vector. - */ - lengthSq(): number; - /** - * Computes the Euclidean length (straight-line length) from (0, 0, 0) to (x, y, z). - * - * @return {number} The length of this vector. - */ - length(): number; - /** - * Computes the Manhattan length of this vector. - * - * @return {number} The length of this vector. - */ - manhattanLength(): number; - /** - * Converts this vector to a unit vector - that is, sets it equal to a vector - * with the same direction as this one, but with a vector length of `1`. - * - * @return {Vector3} A reference to this vector. - */ - normalize(): Vector3; - /** - * Sets this vector to a vector with the same direction as this one, but - * with the specified length. - * - * @param {number} length - The new length of this vector. - * @return {Vector3} A reference to this vector. - */ - setLength(length: number): Vector3; - /** - * Linearly interpolates between the given vector and this instance, where - * alpha is the percent distance along the line - alpha = 0 will be this - * vector, and alpha = 1 will be the given one. - * - * @param {Vector3} v - The vector to interpolate towards. - * @param {number} alpha - The interpolation factor, typically in the closed interval `[0, 1]`. - * @return {Vector3} A reference to this vector. - */ - lerp(v: Vector3, alpha: number): Vector3; - /** - * Linearly interpolates between the given vectors, where alpha is the percent - * distance along the line - alpha = 0 will be first vector, and alpha = 1 will - * be the second one. The result is stored in this instance. - * - * @param {Vector3} v1 - The first vector. - * @param {Vector3} v2 - The second vector. - * @param {number} alpha - The interpolation factor, typically in the closed interval `[0, 1]`. - * @return {Vector3} A reference to this vector. - */ - lerpVectors(v1: Vector3, v2: Vector3, alpha: number): Vector3; - /** - * Calculates the cross product of the given vector with this instance. - * - * @param {Vector3} v - The vector to compute the cross product with. - * @return {Vector3} The result of the cross product. - */ - cross(v: Vector3): Vector3; - /** - * Calculates the cross product of the given vectors and stores the result - * in this instance. - * - * @param {Vector3} a - The first vector. - * @param {Vector3} b - The second vector. - * @return {Vector3} A reference to this vector. - */ - crossVectors(a: Vector3, b: Vector3): Vector3; - /** - * Projects this vector onto the given one. - * - * @param {Vector3} v - The vector to project to. - * @return {Vector3} A reference to this vector. - */ - projectOnVector(v: Vector3): Vector3; - /** - * Projects this vector onto a plane by subtracting this - * vector projected onto the plane's normal from this vector. - * - * @param {Vector3} planeNormal - The plane normal. - * @return {Vector3} A reference to this vector. - */ - projectOnPlane(planeNormal: Vector3): Vector3; - /** - * Reflects this vector off a plane orthogonal to the given normal vector. - * - * @param {Vector3} normal - The (normalized) normal vector. - * @return {Vector3} A reference to this vector. - */ - reflect(normal: Vector3): Vector3; - /** - * Returns the angle between the given vector and this instance in radians. - * - * @param {Vector3} v - The vector to compute the angle with. - * @return {number} The angle in radians. - */ - angleTo(v: Vector3): number; - /** - * Computes the distance from the given vector to this instance. - * - * @param {Vector3} v - The vector to compute the distance to. - * @return {number} The distance. - */ - distanceTo(v: Vector3): number; - /** - * Computes the squared distance from the given vector to this instance. - * If you are just comparing the distance with another distance, you should compare - * the distance squared instead as it is slightly more efficient to calculate. - * - * @param {Vector3} v - The vector to compute the squared distance to. - * @return {number} The squared distance. - */ - distanceToSquared(v: Vector3): number; - /** - * Computes the Manhattan distance from the given vector to this instance. - * - * @param {Vector3} v - The vector to compute the Manhattan distance to. - * @return {number} The Manhattan distance. - */ - manhattanDistanceTo(v: Vector3): number; - /** - * Sets the vector components from the given spherical coordinates. - * - * @param {Spherical} s - The spherical coordinates. - * @return {Vector3} A reference to this vector. - */ - setFromSpherical(s: Spherical): Vector3; - /** - * Sets the vector components from the given spherical coordinates. - * - * @param {number} radius - The radius. - * @param {number} phi - The phi angle in radians. - * @param {number} theta - The theta angle in radians. - * @return {Vector3} A reference to this vector. - */ - setFromSphericalCoords(radius: number, phi: number, theta: number): Vector3; - /** - * Sets the vector components from the given cylindrical coordinates. - * - * @param {Cylindrical} c - The cylindrical coordinates. - * @return {Vector3} A reference to this vector. - */ - setFromCylindrical(c: Cylindrical): Vector3; - /** - * Sets the vector components from the given cylindrical coordinates. - * - * @param {number} radius - The radius. - * @param {number} theta - The theta angle in radians. - * @param {number} y - The y value. - * @return {Vector3} A reference to this vector. - */ - setFromCylindricalCoords(radius: number, theta: number, y: number): Vector3; - /** - * Sets the vector components to the position elements of the - * given transformation matrix. - * - * @param {Matrix4} m - The 4x4 matrix. - * @return {Vector3} A reference to this vector. - */ - setFromMatrixPosition(m: Matrix4): Vector3; - /** - * Sets the vector components to the scale elements of the - * given transformation matrix. - * - * @param {Matrix4} m - The 4x4 matrix. - * @return {Vector3} A reference to this vector. - */ - setFromMatrixScale(m: Matrix4): Vector3; - /** - * Sets the vector components from the specified matrix column. - * - * @param {Matrix4} m - The 4x4 matrix. - * @param {number} index - The column index. - * @return {Vector3} A reference to this vector. - */ - setFromMatrixColumn(m: Matrix4, index: number): Vector3; - /** - * Sets the vector components from the specified matrix column. - * - * @param {Matrix3} m - The 3x3 matrix. - * @param {number} index - The column index. - * @return {Vector3} A reference to this vector. - */ - setFromMatrix3Column(m: Matrix3, index: number): Vector3; - /** - * Sets the vector components from the given Euler angles. - * - * @param {Euler} e - The Euler angles to set. - * @return {Vector3} A reference to this vector. - */ - setFromEuler(e: Euler): Vector3; - /** - * Sets the vector components from the RGB components of the - * given color. - * - * @param {Color} c - The color to set. - * @return {Vector3} A reference to this vector. - */ - setFromColor(c: Color): Vector3; - /** - * Returns `true` if this vector is equal with the given one. - * - * @param {Vector3} v - The vector to test for equality. - * @return {boolean} Whether this vector is equal with the given one. - */ - equals(v: Vector3): boolean; - /** - * Sets this vector's x value to be `array[ offset ]`, y value to be `array[ offset + 1 ]` - * and z value to be `array[ offset + 2 ]`. - * - * @param {Array} array - An array holding the vector component values. - * @param {number} [offset=0] - The offset into the array. - * @return {Vector3} A reference to this vector. - */ - fromArray(array: Array, offset?: number): Vector3; - /** - * Writes the components of this vector to the given array. If no array is provided, - * the method returns a new instance. - * - * @param {Array} [array=[]] - The target array holding the vector components. - * @param {number} [offset=0] - Index of the first element in the array. - * @return {Array} The vector components. - */ - toArray(array?: Array, offset?: number): Array; - /** - * Sets the components of this vector from the given buffer attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute holding vector data. - * @param {number} index - The index into the attribute. - * @return {Vector3} A reference to this vector. - */ - fromBufferAttribute(attribute: BufferAttribute, index: number): Vector3; - /** - * Sets each component of this vector to a pseudo-random value between `0` and - * `1`, excluding `1`. - * - * @return {Vector3} A reference to this vector. - */ - random(): Vector3; - /** - * Sets this vector to a uniformly random point on a unit sphere. - * - * @return {Vector3} A reference to this vector. - */ - randomDirection(): Vector3; - [Symbol.iterator](): Generator; -} -import { Quaternion } from './Quaternion.js'; diff --git a/jsdoc-testing/jsdoc/src/math/Vector4.d.ts b/jsdoc-testing/jsdoc/src/math/Vector4.d.ts deleted file mode 100644 index 2360be77d..000000000 --- a/jsdoc-testing/jsdoc/src/math/Vector4.d.ts +++ /dev/null @@ -1,443 +0,0 @@ -/** - * Class representing a 4D vector. A 4D vector is an ordered quadruplet of numbers - * (labeled x, y, z and w), which can be used to represent a number of things, such as: - * - * - A point in 4D space. - * - A direction and length in 4D space. In three.js the length will - * always be the Euclidean distance(straight-line distance) from `(0, 0, 0, 0)` to `(x, y, z, w)` - * and the direction is also measured from `(0, 0, 0, 0)` towards `(x, y, z, w)`. - * - Any arbitrary ordered quadruplet of numbers. - * - * There are other things a 4D vector can be used to represent, however these - * are the most common uses in *three.js*. - * - * Iterating through a vector instance will yield its components `(x, y, z, w)` in - * the corresponding order. - * ```js - * const a = new THREE.Vector4( 0, 1, 0, 0 ); - * - * //no arguments; will be initialised to (0, 0, 0, 1) - * const b = new THREE.Vector4( ); - * - * const d = a.dot( b ); - * ``` - */ -export class Vector4 { - /** - * Constructs a new 4D vector. - * - * @param {number} [x=0] - The x value of this vector. - * @param {number} [y=0] - The y value of this vector. - * @param {number} [z=0] - The z value of this vector. - * @param {number} [w=1] - The w value of this vector. - */ - constructor(x?: number, y?: number, z?: number, w?: number); - /** - * The x value of this vector. - * - * @type {number} - */ - x: number; - /** - * The y value of this vector. - * - * @type {number} - */ - y: number; - /** - * The z value of this vector. - * - * @type {number} - */ - z: number; - /** - * The w value of this vector. - * - * @type {number} - */ - w: number; - set width(value: number); - /** - * Alias for {@link Vector4#z}. - * - * @type {number} - */ - get width(): number; - set height(value: number); - /** - * Alias for {@link Vector4#w}. - * - * @type {number} - */ - get height(): number; - /** - * Sets the vector components. - * - * @param {number} x - The value of the x component. - * @param {number} y - The value of the y component. - * @param {number} z - The value of the z component. - * @param {number} w - The value of the w component. - * @return {Vector4} A reference to this vector. - */ - set(x: number, y: number, z: number, w: number): Vector4; - /** - * Sets the vector components to the same value. - * - * @param {number} scalar - The value to set for all vector components. - * @return {Vector4} A reference to this vector. - */ - setScalar(scalar: number): Vector4; - /** - * Sets the vector's x component to the given value - * - * @param {number} x - The value to set. - * @return {Vector4} A reference to this vector. - */ - setX(x: number): Vector4; - /** - * Sets the vector's y component to the given value - * - * @param {number} y - The value to set. - * @return {Vector4} A reference to this vector. - */ - setY(y: number): Vector4; - /** - * Sets the vector's z component to the given value - * - * @param {number} z - The value to set. - * @return {Vector4} A reference to this vector. - */ - setZ(z: number): Vector4; - /** - * Sets the vector's w component to the given value - * - * @param {number} w - The value to set. - * @return {Vector4} A reference to this vector. - */ - setW(w: number): Vector4; - /** - * Allows to set a vector component with an index. - * - * @param {number} index - The component index. `0` equals to x, `1` equals to y, - * `2` equals to z, `3` equals to w. - * @param {number} value - The value to set. - * @return {Vector4} A reference to this vector. - */ - setComponent(index: number, value: number): Vector4; - /** - * Returns the value of the vector component which matches the given index. - * - * @param {number} index - The component index. `0` equals to x, `1` equals to y, - * `2` equals to z, `3` equals to w. - * @return {number} A vector component value. - */ - getComponent(index: number): number; - /** - * Returns a new vector with copied values from this instance. - * - * @return {Vector4} A clone of this instance. - */ - clone(): Vector4; - /** - * Copies the values of the given vector to this instance. - * - * @param {Vector3|Vector4} v - The vector to copy. - * @return {Vector4} A reference to this vector. - */ - copy(v: Vector3 | Vector4): Vector4; - /** - * Adds the given vector to this instance. - * - * @param {Vector4} v - The vector to add. - * @return {Vector4} A reference to this vector. - */ - add(v: Vector4): Vector4; - /** - * Adds the given scalar value to all components of this instance. - * - * @param {number} s - The scalar to add. - * @return {Vector4} A reference to this vector. - */ - addScalar(s: number): Vector4; - /** - * Adds the given vectors and stores the result in this instance. - * - * @param {Vector4} a - The first vector. - * @param {Vector4} b - The second vector. - * @return {Vector4} A reference to this vector. - */ - addVectors(a: Vector4, b: Vector4): Vector4; - /** - * Adds the given vector scaled by the given factor to this instance. - * - * @param {Vector4} v - The vector. - * @param {number} s - The factor that scales `v`. - * @return {Vector4} A reference to this vector. - */ - addScaledVector(v: Vector4, s: number): Vector4; - /** - * Subtracts the given vector from this instance. - * - * @param {Vector4} v - The vector to subtract. - * @return {Vector4} A reference to this vector. - */ - sub(v: Vector4): Vector4; - /** - * Subtracts the given scalar value from all components of this instance. - * - * @param {number} s - The scalar to subtract. - * @return {Vector4} A reference to this vector. - */ - subScalar(s: number): Vector4; - /** - * Subtracts the given vectors and stores the result in this instance. - * - * @param {Vector4} a - The first vector. - * @param {Vector4} b - The second vector. - * @return {Vector4} A reference to this vector. - */ - subVectors(a: Vector4, b: Vector4): Vector4; - /** - * Multiplies the given vector with this instance. - * - * @param {Vector4} v - The vector to multiply. - * @return {Vector4} A reference to this vector. - */ - multiply(v: Vector4): Vector4; - /** - * Multiplies the given scalar value with all components of this instance. - * - * @param {number} scalar - The scalar to multiply. - * @return {Vector4} A reference to this vector. - */ - multiplyScalar(scalar: number): Vector4; - /** - * Multiplies this vector with the given 4x4 matrix. - * - * @param {Matrix4} m - The 4x4 matrix. - * @return {Vector4} A reference to this vector. - */ - applyMatrix4(m: Matrix4): Vector4; - /** - * Divides this instance by the given vector. - * - * @param {Vector4} v - The vector to divide. - * @return {Vector4} A reference to this vector. - */ - divide(v: Vector4): Vector4; - /** - * Divides this vector by the given scalar. - * - * @param {number} scalar - The scalar to divide. - * @return {Vector4} A reference to this vector. - */ - divideScalar(scalar: number): Vector4; - /** - * Sets the x, y and z components of this - * vector to the quaternion's axis and w to the angle. - * - * @param {Quaternion} q - The Quaternion to set. - * @return {Vector4} A reference to this vector. - */ - setAxisAngleFromQuaternion(q: Quaternion): Vector4; - /** - * Sets the x, y and z components of this - * vector to the axis of rotation and w to the angle. - * - * @param {Matrix4} m - A 4x4 matrix of which the upper left 3x3 matrix is a pure rotation matrix. - * @return {Vector4} A reference to this vector. - */ - setAxisAngleFromRotationMatrix(m: Matrix4): Vector4; - /** - * Sets the vector components to the position elements of the - * given transformation matrix. - * - * @param {Matrix4} m - The 4x4 matrix. - * @return {Vector4} A reference to this vector. - */ - setFromMatrixPosition(m: Matrix4): Vector4; - /** - * If this vector's x, y, z or w value is greater than the given vector's x, y, z or w - * value, replace that value with the corresponding min value. - * - * @param {Vector4} v - The vector. - * @return {Vector4} A reference to this vector. - */ - min(v: Vector4): Vector4; - /** - * If this vector's x, y, z or w value is less than the given vector's x, y, z or w - * value, replace that value with the corresponding max value. - * - * @param {Vector4} v - The vector. - * @return {Vector4} A reference to this vector. - */ - max(v: Vector4): Vector4; - /** - * If this vector's x, y, z or w value is greater than the max vector's x, y, z or w - * value, it is replaced by the corresponding value. - * If this vector's x, y, z or w value is less than the min vector's x, y, z or w value, - * it is replaced by the corresponding value. - * - * @param {Vector4} min - The minimum x, y and z values. - * @param {Vector4} max - The maximum x, y and z values in the desired range. - * @return {Vector4} A reference to this vector. - */ - clamp(min: Vector4, max: Vector4): Vector4; - /** - * If this vector's x, y, z or w values are greater than the max value, they are - * replaced by the max value. - * If this vector's x, y, z or w values are less than the min value, they are - * replaced by the min value. - * - * @param {number} minVal - The minimum value the components will be clamped to. - * @param {number} maxVal - The maximum value the components will be clamped to. - * @return {Vector4} A reference to this vector. - */ - clampScalar(minVal: number, maxVal: number): Vector4; - /** - * If this vector's length is greater than the max value, it is replaced by - * the max value. - * If this vector's length is less than the min value, it is replaced by the - * min value. - * - * @param {number} min - The minimum value the vector length will be clamped to. - * @param {number} max - The maximum value the vector length will be clamped to. - * @return {Vector4} A reference to this vector. - */ - clampLength(min: number, max: number): Vector4; - /** - * The components of this vector are rounded down to the nearest integer value. - * - * @return {Vector4} A reference to this vector. - */ - floor(): Vector4; - /** - * The components of this vector are rounded up to the nearest integer value. - * - * @return {Vector4} A reference to this vector. - */ - ceil(): Vector4; - /** - * The components of this vector are rounded to the nearest integer value - * - * @return {Vector4} A reference to this vector. - */ - round(): Vector4; - /** - * The components of this vector are rounded towards zero (up if negative, - * down if positive) to an integer value. - * - * @return {Vector4} A reference to this vector. - */ - roundToZero(): Vector4; - /** - * Inverts this vector - i.e. sets x = -x, y = -y, z = -z, w = -w. - * - * @return {Vector4} A reference to this vector. - */ - negate(): Vector4; - /** - * Calculates the dot product of the given vector with this instance. - * - * @param {Vector4} v - The vector to compute the dot product with. - * @return {number} The result of the dot product. - */ - dot(v: Vector4): number; - /** - * Computes the square of the Euclidean length (straight-line length) from - * (0, 0, 0, 0) to (x, y, z, w). If you are comparing the lengths of vectors, you should - * compare the length squared instead as it is slightly more efficient to calculate. - * - * @return {number} The square length of this vector. - */ - lengthSq(): number; - /** - * Computes the Euclidean length (straight-line length) from (0, 0, 0, 0) to (x, y, z, w). - * - * @return {number} The length of this vector. - */ - length(): number; - /** - * Computes the Manhattan length of this vector. - * - * @return {number} The length of this vector. - */ - manhattanLength(): number; - /** - * Converts this vector to a unit vector - that is, sets it equal to a vector - * with the same direction as this one, but with a vector length of `1`. - * - * @return {Vector4} A reference to this vector. - */ - normalize(): Vector4; - /** - * Sets this vector to a vector with the same direction as this one, but - * with the specified length. - * - * @param {number} length - The new length of this vector. - * @return {Vector4} A reference to this vector. - */ - setLength(length: number): Vector4; - /** - * Linearly interpolates between the given vector and this instance, where - * alpha is the percent distance along the line - alpha = 0 will be this - * vector, and alpha = 1 will be the given one. - * - * @param {Vector4} v - The vector to interpolate towards. - * @param {number} alpha - The interpolation factor, typically in the closed interval `[0, 1]`. - * @return {Vector4} A reference to this vector. - */ - lerp(v: Vector4, alpha: number): Vector4; - /** - * Linearly interpolates between the given vectors, where alpha is the percent - * distance along the line - alpha = 0 will be first vector, and alpha = 1 will - * be the second one. The result is stored in this instance. - * - * @param {Vector4} v1 - The first vector. - * @param {Vector4} v2 - The second vector. - * @param {number} alpha - The interpolation factor, typically in the closed interval `[0, 1]`. - * @return {Vector4} A reference to this vector. - */ - lerpVectors(v1: Vector4, v2: Vector4, alpha: number): Vector4; - /** - * Returns `true` if this vector is equal with the given one. - * - * @param {Vector4} v - The vector to test for equality. - * @return {boolean} Whether this vector is equal with the given one. - */ - equals(v: Vector4): boolean; - /** - * Sets this vector's x value to be `array[ offset ]`, y value to be `array[ offset + 1 ]`, - * z value to be `array[ offset + 2 ]`, w value to be `array[ offset + 3 ]`. - * - * @param {Array} array - An array holding the vector component values. - * @param {number} [offset=0] - The offset into the array. - * @return {Vector4} A reference to this vector. - */ - fromArray(array: Array, offset?: number): Vector4; - /** - * Writes the components of this vector to the given array. If no array is provided, - * the method returns a new instance. - * - * @param {Array} [array=[]] - The target array holding the vector components. - * @param {number} [offset=0] - Index of the first element in the array. - * @return {Array} The vector components. - */ - toArray(array?: Array, offset?: number): Array; - /** - * Sets the components of this vector from the given buffer attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute holding vector data. - * @param {number} index - The index into the attribute. - * @return {Vector4} A reference to this vector. - */ - fromBufferAttribute(attribute: BufferAttribute, index: number): Vector4; - /** - * Sets each component of this vector to a pseudo-random value between `0` and - * `1`, excluding `1`. - * - * @return {Vector4} A reference to this vector. - */ - random(): Vector4; - [Symbol.iterator](): Generator; -} diff --git a/jsdoc-testing/jsdoc/src/math/interpolants/BezierInterpolant.d.ts b/jsdoc-testing/jsdoc/src/math/interpolants/BezierInterpolant.d.ts deleted file mode 100644 index a3d1715dc..000000000 --- a/jsdoc-testing/jsdoc/src/math/interpolants/BezierInterpolant.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * A Bezier interpolant using cubic Bezier curves with 2D control points. - * - * This interpolant supports the COLLADA/Maya style of Bezier animation where - * each keyframe has explicit in/out tangent control points specified as - * 2D coordinates (time, value). - * - * Tangent data is read from `inTangents` and `outTangents` on the interpolant - * (populated by `KeyframeTrack.InterpolantFactoryMethodBezier`). - * - * For a track with N keyframes and stride S: - * - Each tangent array has N * S * 2 values - * - Layout: [k0_c0_time, k0_c0_value, k0_c1_time, k0_c1_value, ..., k0_cS_time, k0_cS_value, - * k1_c0_time, k1_c0_value, ...] - * - * @augments Interpolant - */ -export class BezierInterpolant extends Interpolant { - interpolate_(i1: any, t0: any, t: any, t1: any): TypedArray; -} -import { Interpolant } from '../Interpolant.js'; diff --git a/jsdoc-testing/jsdoc/src/math/interpolants/CubicInterpolant.d.ts b/jsdoc-testing/jsdoc/src/math/interpolants/CubicInterpolant.d.ts deleted file mode 100644 index ca53c5e9a..000000000 --- a/jsdoc-testing/jsdoc/src/math/interpolants/CubicInterpolant.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Fast and simple cubic spline interpolant. - * - * It was derived from a Hermitian construction setting the first derivative - * at each sample position to the linear slope between neighboring positions - * over their parameter interval. - * - * @augments Interpolant - */ -export class CubicInterpolant extends Interpolant { - _weightPrev: number; - _offsetPrev: number; - _weightNext: number; - _offsetNext: number; - DefaultSettings_: { - endingStart: number; - endingEnd: number; - }; - intervalChanged_(i1: any, t0: any, t1: any): void; - interpolate_(i1: any, t0: any, t: any, t1: any): TypedArray; -} -import { Interpolant } from '../Interpolant.js'; diff --git a/jsdoc-testing/jsdoc/src/math/interpolants/DiscreteInterpolant.d.ts b/jsdoc-testing/jsdoc/src/math/interpolants/DiscreteInterpolant.d.ts deleted file mode 100644 index 04ce01eb6..000000000 --- a/jsdoc-testing/jsdoc/src/math/interpolants/DiscreteInterpolant.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Interpolant that evaluates to the sample value at the position preceding - * the parameter. - * - * @augments Interpolant - */ -export class DiscreteInterpolant extends Interpolant { - interpolate_(i1: any): TypedArray; -} -import { Interpolant } from '../Interpolant.js'; diff --git a/jsdoc-testing/jsdoc/src/math/interpolants/LinearInterpolant.d.ts b/jsdoc-testing/jsdoc/src/math/interpolants/LinearInterpolant.d.ts deleted file mode 100644 index d36003868..000000000 --- a/jsdoc-testing/jsdoc/src/math/interpolants/LinearInterpolant.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * A basic linear interpolant. - * - * @augments Interpolant - */ -export class LinearInterpolant extends Interpolant { - interpolate_(i1: any, t0: any, t: any, t1: any): TypedArray; -} -import { Interpolant } from '../Interpolant.js'; diff --git a/jsdoc-testing/jsdoc/src/math/interpolants/QuaternionLinearInterpolant.d.ts b/jsdoc-testing/jsdoc/src/math/interpolants/QuaternionLinearInterpolant.d.ts deleted file mode 100644 index e8ddddc6e..000000000 --- a/jsdoc-testing/jsdoc/src/math/interpolants/QuaternionLinearInterpolant.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Spherical linear unit quaternion interpolant. - * - * @augments Interpolant - */ -export class QuaternionLinearInterpolant extends Interpolant { - interpolate_(i1: any, t0: any, t: any, t1: any): TypedArray; -} -import { Interpolant } from '../Interpolant.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/Nodes.d.ts b/jsdoc-testing/jsdoc/src/nodes/Nodes.d.ts deleted file mode 100644 index ba6b08284..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/Nodes.d.ts +++ /dev/null @@ -1,141 +0,0 @@ -export * from "./core/constants.js"; -export { default as ArrayNode } from "./core/ArrayNode.js"; -export { default as AssignNode } from "./core/AssignNode.js"; -export { default as AttributeNode } from "./core/AttributeNode.js"; -export { default as BypassNode } from "./core/BypassNode.js"; -export { default as ConstNode } from "./core/ConstNode.js"; -export { default as ContextNode } from "./core/ContextNode.js"; -export { default as IndexNode } from "./core/IndexNode.js"; -export { default as InputNode } from "./core/InputNode.js"; -export { default as InspectorNode } from "./core/InspectorNode.js"; -export { default as IsolateNode } from "./core/IsolateNode.js"; -export { default as LightingModel } from "./core/LightingModel.js"; -export { default as MRTNode } from "./core/MRTNode.js"; -export { default as Node } from "./core/Node.js"; -export { default as NodeAttribute } from "./core/NodeAttribute.js"; -export { default as NodeBuilder } from "./core/NodeBuilder.js"; -export { default as NodeCache } from "./core/NodeCache.js"; -export { default as NodeCode } from "./core/NodeCode.js"; -export { default as NodeError } from "./core/NodeError.js"; -export { default as NodeFrame } from "./core/NodeFrame.js"; -export { default as NodeFunctionInput } from "./core/NodeFunctionInput.js"; -export { default as NodeUniform } from "./core/NodeUniform.js"; -export { default as NodeVar } from "./core/NodeVar.js"; -export { default as NodeVarying } from "./core/NodeVarying.js"; -export { default as OutputStructNode } from "./core/OutputStructNode.js"; -export { default as ParameterNode } from "./core/ParameterNode.js"; -export { default as PropertyNode } from "./core/PropertyNode.js"; -export { default as StackNode } from "./core/StackNode.js"; -export { default as StackTrace } from "./core/StackTrace.js"; -export { default as StructNode } from "./core/StructNode.js"; -export { default as StructTypeNode } from "./core/StructTypeNode.js"; -export { default as SubBuildNode } from "./core/SubBuildNode.js"; -export { default as TempNode } from "./core/TempNode.js"; -export { default as UniformGroupNode } from "./core/UniformGroupNode.js"; -export { default as UniformNode } from "./core/UniformNode.js"; -export { default as VarNode } from "./core/VarNode.js"; -export { default as VaryingNode } from "./core/VaryingNode.js"; -export { NodeUtils }; -export { default as BatchNode } from "./accessors/BatchNode.js"; -export { default as BufferAttributeNode } from "./accessors/BufferAttributeNode.js"; -export { default as BufferNode } from "./accessors/BufferNode.js"; -export { default as BuiltinNode } from "./accessors/BuiltinNode.js"; -export { default as ClippingNode } from "./accessors/ClippingNode.js"; -export { default as CubeTextureNode } from "./accessors/CubeTextureNode.js"; -export { default as InstanceNode } from "./accessors/InstanceNode.js"; -export { default as InstancedMeshNode } from "./accessors/InstancedMeshNode.js"; -export { default as MaterialNode } from "./accessors/MaterialNode.js"; -export { default as MaterialReferenceNode } from "./accessors/MaterialReferenceNode.js"; -export { default as ModelNode } from "./accessors/ModelNode.js"; -export { default as MorphNode } from "./accessors/MorphNode.js"; -export { default as Object3DNode } from "./accessors/Object3DNode.js"; -export { default as PointUVNode } from "./accessors/PointUVNode.js"; -export { default as ReferenceBaseNode } from "./accessors/ReferenceBaseNode.js"; -export { default as ReferenceNode } from "./accessors/ReferenceNode.js"; -export { default as RendererReferenceNode } from "./accessors/RendererReferenceNode.js"; -export { default as SkinningNode } from "./accessors/SkinningNode.js"; -export { default as StorageBufferNode } from "./accessors/StorageBufferNode.js"; -export { default as StorageTexture3DNode } from "./accessors/StorageTexture3DNode.js"; -export { default as StorageTextureNode } from "./accessors/StorageTextureNode.js"; -export { default as Texture3DNode } from "./accessors/Texture3DNode.js"; -export { default as TextureNode } from "./accessors/TextureNode.js"; -export { default as TextureSizeNode } from "./accessors/TextureSizeNode.js"; -export { default as UniformArrayNode } from "./accessors/UniformArrayNode.js"; -export { default as UserDataNode } from "./accessors/UserDataNode.js"; -export { default as VelocityNode } from "./accessors/VelocityNode.js"; -export { default as VertexColorNode } from "./accessors/VertexColorNode.js"; -export { default as CodeNode } from "./code/CodeNode.js"; -export { default as ExpressionNode } from "./code/ExpressionNode.js"; -export { default as FunctionCallNode } from "./code/FunctionCallNode.js"; -export { default as FunctionNode } from "./code/FunctionNode.js"; -export { default as BumpMapNode } from "./display/BumpMapNode.js"; -export { default as ColorSpaceNode } from "./display/ColorSpaceNode.js"; -export { default as FrontFacingNode } from "./display/FrontFacingNode.js"; -export { default as NormalMapNode } from "./display/NormalMapNode.js"; -export { default as PassNode } from "./display/PassNode.js"; -export { default as RenderOutputNode } from "./display/RenderOutputNode.js"; -export { default as ScreenNode } from "./display/ScreenNode.js"; -export { default as ToneMappingNode } from "./display/ToneMappingNode.js"; -export { default as ToonOutlinePassNode } from "./display/ToonOutlinePassNode.js"; -export { default as ViewportDepthNode } from "./display/ViewportDepthNode.js"; -export { default as ViewportDepthTextureNode } from "./display/ViewportDepthTextureNode.js"; -export { default as ViewportSharedTextureNode } from "./display/ViewportSharedTextureNode.js"; -export { default as ViewportTextureNode } from "./display/ViewportTextureNode.js"; -export { default as RangeNode } from "./geometry/RangeNode.js"; -export { default as AtomicFunctionNode } from "./gpgpu/AtomicFunctionNode.js"; -export { default as BarrierNode } from "./gpgpu/BarrierNode.js"; -export { default as ComputeBuiltinNode } from "./gpgpu/ComputeBuiltinNode.js"; -export { default as ComputeNode } from "./gpgpu/ComputeNode.js"; -export { default as SubgroupFunctionNode } from "./gpgpu/SubgroupFunctionNode.js"; -export { default as WorkgroupInfoNode } from "./gpgpu/WorkgroupInfoNode.js"; -export { default as AmbientLightNode } from "./lighting/AmbientLightNode.js"; -export { default as AnalyticLightNode } from "./lighting/AnalyticLightNode.js"; -export { default as AONode } from "./lighting/AONode.js"; -export { default as BasicEnvironmentNode } from "./lighting/BasicEnvironmentNode.js"; -export { default as BasicLightMapNode } from "./lighting/BasicLightMapNode.js"; -export { default as DirectionalLightNode } from "./lighting/DirectionalLightNode.js"; -export { default as EnvironmentNode } from "./lighting/EnvironmentNode.js"; -export { default as HemisphereLightNode } from "./lighting/HemisphereLightNode.js"; -export { default as IESSpotLightNode } from "./lighting/IESSpotLightNode.js"; -export { default as IrradianceNode } from "./lighting/IrradianceNode.js"; -export { default as LightingContextNode } from "./lighting/LightingContextNode.js"; -export { default as LightingNode } from "./lighting/LightingNode.js"; -export { default as LightProbeNode } from "./lighting/LightProbeNode.js"; -export { default as LightsNode } from "./lighting/LightsNode.js"; -export { default as PointLightNode } from "./lighting/PointLightNode.js"; -export { default as PointShadowNode } from "./lighting/PointShadowNode.js"; -export { default as ProjectorLightNode } from "./lighting/ProjectorLightNode.js"; -export { default as RectAreaLightNode } from "./lighting/RectAreaLightNode.js"; -export { default as ShadowBaseNode } from "./lighting/ShadowBaseNode.js"; -export { default as ShadowNode } from "./lighting/ShadowNode.js"; -export { default as SpotLightNode } from "./lighting/SpotLightNode.js"; -export { default as BitcastNode } from "./math/BitcastNode.js"; -export { default as BitcountNode } from "./math/BitcountNode.js"; -export { default as ConditionalNode } from "./math/ConditionalNode.js"; -export { default as MathNode } from "./math/MathNode.js"; -export { default as OperatorNode } from "./math/OperatorNode.js"; -export { default as PackFloatNode } from "./math/PackFloatNode.js"; -export { default as UnpackFloatNode } from "./math/UnpackFloatNode.js"; -export { default as GLSLNodeParser } from "./parsers/GLSLNodeParser.js"; -export { default as PMREMNode } from "./pmrem/PMREMNode.js"; -export { default as ArrayElementNode } from "./utils/ArrayElementNode.js"; -export { default as ConvertNode } from "./utils/ConvertNode.js"; -export { default as CubeMapNode } from "./utils/CubeMapNode.js"; -export { default as DebugNode } from "./utils/DebugNode.js"; -export { default as EventNode } from "./utils/EventNode.js"; -export { default as FlipNode } from "./utils/FlipNode.js"; -export { default as FunctionOverloadingNode } from "./utils/FunctionOverloadingNode.js"; -export { default as JoinNode } from "./utils/JoinNode.js"; -export { default as LoopNode } from "./utils/LoopNode.js"; -export { default as MaxMipLevelNode } from "./utils/MaxMipLevelNode.js"; -export { default as MemberNode } from "./utils/MemberNode.js"; -export { default as ReflectorNode } from "./utils/ReflectorNode.js"; -export { default as RotateNode } from "./utils/RotateNode.js"; -export { default as RTTNode } from "./utils/RTTNode.js"; -export { default as SampleNode } from "./utils/SampleNode.js"; -export { default as SetNode } from "./utils/SetNode.js"; -export { default as SplitNode } from "./utils/SplitNode.js"; -export { default as StorageArrayElementNode } from "./utils/StorageArrayElementNode.js"; -export { default as PhongLightingModel } from "./functions/PhongLightingModel.js"; -export { default as PhysicalLightingModel } from "./functions/PhysicalLightingModel.js"; -import * as NodeUtils from './core/NodeUtils.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/TSL.d.ts b/jsdoc-testing/jsdoc/src/nodes/TSL.d.ts deleted file mode 100644 index 6f297a21c..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/TSL.d.ts +++ /dev/null @@ -1,138 +0,0 @@ -export * from "./core/constants.js"; -export * from "./core/AssignNode.js"; -export * from "./core/AttributeNode.js"; -export * from "./core/BypassNode.js"; -export * from "./core/IsolateNode.js"; -export * from "./core/ContextNode.js"; -export * from "./core/IndexNode.js"; -export * from "./core/ParameterNode.js"; -export * from "./core/PropertyNode.js"; -export * from "./core/StackNode.js"; -export * from "./core/StructNode.js"; -export * from "./core/UniformGroupNode.js"; -export * from "./core/UniformNode.js"; -export * from "./core/VaryingNode.js"; -export * from "./core/OutputStructNode.js"; -export * from "./core/MRTNode.js"; -export * from "./math/BitcastNode.js"; -export * from "./math/BitcountNode.js"; -export * from "./math/Hash.js"; -export * from "./math/MathUtils.js"; -export * from "./math/PackFloatNode.js"; -export * from "./math/UnpackFloatNode.js"; -export * from "./math/TriNoise3D.js"; -export * from "./utils/EquirectUV.js"; -export * from "./utils/FunctionOverloadingNode.js"; -export * from "./utils/LoopNode.js"; -export * from "./utils/MatcapUV.js"; -export * from "./utils/MaxMipLevelNode.js"; -export * from "./utils/Oscillators.js"; -export * from "./utils/Packing.js"; -export * from "./utils/Remap.js"; -export * from "./utils/UVUtils.js"; -export * from "./utils/SpriteUtils.js"; -export * from "./utils/ViewportUtils.js"; -export * from "./utils/RotateNode.js"; -export * from "./utils/SpriteSheetUV.js"; -export * from "./utils/Timer.js"; -export * from "./utils/TriplanarTextures.js"; -export * from "./utils/ReflectorNode.js"; -export * from "./utils/RTTNode.js"; -export * from "./utils/PostProcessingUtils.js"; -export * from "./utils/SampleNode.js"; -export * from "./utils/EventNode.js"; -export * from "./tsl/TSLBase.js"; -export * from "./accessors/AccessorsUtils.js"; -export * from "./accessors/Arrays.js"; -export * from "./accessors/UniformArrayNode.js"; -export * from "./accessors/Bitangent.js"; -export * from "./accessors/BufferAttributeNode.js"; -export * from "./accessors/BufferNode.js"; -export * from "./accessors/BuiltinNode.js"; -export * from "./accessors/Camera.js"; -export * from "./accessors/VertexColorNode.js"; -export * from "./accessors/CubeTextureNode.js"; -export * from "./accessors/InstanceNode.js"; -export * from "./accessors/InstancedMeshNode.js"; -export * from "./accessors/BatchNode.js"; -export * from "./accessors/MaterialNode.js"; -export * from "./accessors/MaterialProperties.js"; -export * from "./accessors/MaterialReferenceNode.js"; -export * from "./accessors/RendererReferenceNode.js"; -export * from "./accessors/MorphNode.js"; -export * from "./accessors/TextureBicubic.js"; -export * from "./accessors/ModelNode.js"; -export * from "./accessors/ModelViewProjectionNode.js"; -export * from "./accessors/Normal.js"; -export * from "./accessors/Object3DNode.js"; -export * from "./accessors/PointUVNode.js"; -export * from "./accessors/Position.js"; -export * from "./accessors/ReferenceNode.js"; -export * from "./accessors/ReflectVector.js"; -export * from "./accessors/SkinningNode.js"; -export * from "./accessors/SceneProperties.js"; -export * from "./accessors/StorageBufferNode.js"; -export * from "./accessors/StorageTexture3DNode.js"; -export * from "./accessors/StorageTextureNode.js"; -export * from "./accessors/Tangent.js"; -export * from "./accessors/TextureNode.js"; -export * from "./accessors/TextureSizeNode.js"; -export * from "./accessors/Texture3DNode.js"; -export * from "./accessors/UV.js"; -export * from "./accessors/UserDataNode.js"; -export * from "./accessors/VelocityNode.js"; -export * from "./display/BlendModes.js"; -export * from "./display/BumpMapNode.js"; -export * from "./display/ColorAdjustment.js"; -export * from "./display/ColorSpaceNode.js"; -export * from "./display/FrontFacingNode.js"; -export * from "./display/NormalMapNode.js"; -export * from "./display/PremultiplyAlphaFunctions.js"; -export * from "./display/ToneMappingNode.js"; -export * from "./display/ScreenNode.js"; -export * from "./display/ViewportTextureNode.js"; -export * from "./display/ViewportSharedTextureNode.js"; -export * from "./display/ViewportDepthTextureNode.js"; -export * from "./display/ViewportDepthNode.js"; -export * from "./display/RenderOutputNode.js"; -export * from "./display/ToonOutlinePassNode.js"; -export * from "./display/PassNode.js"; -export * from "./display/ColorSpaceFunctions.js"; -export * from "./display/ToneMappingFunctions.js"; -export * from "./code/ExpressionNode.js"; -export * from "./code/CodeNode.js"; -export * from "./code/FunctionCallNode.js"; -export * from "./code/FunctionNode.js"; -export * from "./fog/Fog.js"; -export * from "./geometry/RangeNode.js"; -export * from "./gpgpu/ComputeNode.js"; -export * from "./gpgpu/ComputeBuiltinNode.js"; -export * from "./gpgpu/BarrierNode.js"; -export * from "./gpgpu/WorkgroupInfoNode.js"; -export * from "./gpgpu/AtomicFunctionNode.js"; -export * from "./gpgpu/SubgroupFunctionNode.js"; -export * from "./accessors/Lights.js"; -export * from "./lighting/LightsNode.js"; -export * from "./lighting/LightingContextNode.js"; -export * from "./lighting/ShadowBaseNode.js"; -export * from "./lighting/ShadowNode.js"; -export * from "./lighting/ShadowFilterNode.js"; -export * from "./lighting/PointShadowNode.js"; -export * from "./lighting/PointLightNode.js"; -export * from "./pmrem/PMREMNode.js"; -export * from "./pmrem/PMREMUtils.js"; -export * from "./procedural/Checker.js"; -export * from "./shapes/Shapes.js"; -export * from "./materialx/MaterialXNodes.js"; -export * from "./lighting/LightUtils.js"; -export { default as BRDF_GGX } from "./functions/BSDF/BRDF_GGX.js"; -export { default as BRDF_Lambert } from "./functions/BSDF/BRDF_Lambert.js"; -export { default as D_GGX } from "./functions/BSDF/D_GGX.js"; -export { default as DFGLUT } from "./functions/BSDF/DFGLUT.js"; -export { default as F_Schlick } from "./functions/BSDF/F_Schlick.js"; -export { default as Schlick_to_F0 } from "./functions/BSDF/Schlick_to_F0.js"; -export { default as V_GGX_SmithCorrelated } from "./functions/BSDF/V_GGX_SmithCorrelated.js"; -export { default as getGeometryRoughness } from "./functions/material/getGeometryRoughness.js"; -export { default as getParallaxCorrectNormal } from "./functions/material/getParallaxCorrectNormal.js"; -export { default as getRoughness } from "./functions/material/getRoughness.js"; -export { default as getShIrradianceAt } from "./functions/material/getShIrradianceAt.js"; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/AccessorsUtils.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/AccessorsUtils.d.ts deleted file mode 100644 index 07177caec..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/AccessorsUtils.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/** - * TSL object that represents the TBN matrix in view space. - * - * @tsl - * @type {Node} - */ -export const TBNViewMatrix: Node; -/** - * TSL object that represents the parallax direction. - * - * @tsl - * @type {Node} - */ -export const parallaxDirection: Node; -export function parallaxUV(uv: Node, scale: Node): Node; -/** - * TSL function for computing bent normals. - * - * @tsl - * @function - * @returns {Node} Bent normals. - */ -export const bentNormalView: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/Arrays.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/Arrays.d.ts deleted file mode 100644 index 6c9184803..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/Arrays.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function attributeArray(count: number | TypedArray, type?: string | Struct): StorageBufferNode; -export function instancedArray(count: number | TypedArray, type?: string | Struct): StorageBufferNode; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/BatchNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/BatchNode.d.ts deleted file mode 100644 index 1fa7fd4cc..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/BatchNode.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -export default BatchNode; -/** - * TSL function for creating a batch node. - * - * @tsl - * @function - * @param {BatchedMesh} batchMesh - A reference to batched mesh. - * @returns {BatchNode} - */ -export const batch: any; -/** - * This node implements the vertex shader logic which is required - * when rendering 3D objects via batching. `BatchNode` must be used - * with instances of {@link BatchedMesh}. - * - * @augments Node - */ -declare class BatchNode extends Node { - /** - * Constructs a new batch node. - * - * @param {BatchedMesh} batchMesh - A reference to batched mesh. - */ - constructor(batchMesh: BatchedMesh); - /** - * A reference to batched mesh. - * - * @type {BatchedMesh} - */ - batchMesh: BatchedMesh; - /** - * The batching index node. - * - * @type {?IndexNode} - * @default null - */ - batchingIdNode: IndexNode | null; - /** - * Setups the internal buffers and nodes and assigns the transformed vertex data - * to predefined node variables for accumulation. That follows the same patterns - * like with morph and skinning nodes. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setup(builder: NodeBuilder): void; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/Bitangent.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/Bitangent.d.ts deleted file mode 100644 index 7694a53fc..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/Bitangent.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * TSL object that represents the bitangent attribute of the current rendered object. - * - * @tsl - * @type {Node} - */ -export const bitangentGeometry: Node; -/** - * TSL object that represents the vertex bitangent in local space of the current rendered object. - * - * @tsl - * @type {Node} - */ -export const bitangentLocal: Node; -/** - * TSL object that represents the vertex bitangent in view space of the current rendered object. - * - * @tsl - * @type {Node} - */ -export const bitangentView: Node; -/** - * TSL object that represents the vertex bitangent in world space of the current rendered object. - * - * @tsl - * @type {Node} - */ -export const bitangentWorld: Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/BufferAttributeNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/BufferAttributeNode.d.ts deleted file mode 100644 index 60775a2a1..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/BufferAttributeNode.d.ts +++ /dev/null @@ -1,143 +0,0 @@ -export default BufferAttributeNode; -export function bufferAttribute(array: BufferAttribute | InterleavedBuffer | TypedArray, type?: string | null, stride?: number, offset?: number): BufferAttributeNode | Node; -export function dynamicBufferAttribute(array: BufferAttribute | InterleavedBuffer | TypedArray, type?: string | null, stride?: number, offset?: number): BufferAttributeNode | Node; -export function instancedBufferAttribute(array: BufferAttribute | InterleavedBuffer | TypedArray, type?: string | null, stride?: number, offset?: number): BufferAttributeNode | Node; -export function instancedDynamicBufferAttribute(array: BufferAttribute | InterleavedBuffer | TypedArray, type?: string | null, stride?: number, offset?: number): BufferAttributeNode | Node; -/** - * In earlier `three.js` versions it was only possible to define attribute data - * on geometry level. With `BufferAttributeNode`, it is also possible to do this - * on the node level. - * ```js - * const geometry = new THREE.PlaneGeometry(); - * const positionAttribute = geometry.getAttribute( 'position' ); - * - * const colors = []; - * for ( let i = 0; i < position.count; i ++ ) { - * colors.push( 1, 0, 0 ); - * } - * - * material.colorNode = bufferAttribute( new THREE.Float32BufferAttribute( colors, 3 ) ); - * ``` - * This new approach is especially interesting when geometry data are generated via - * compute shaders. The below line converts a storage buffer into an attribute node. - * ```js - * material.positionNode = positionBuffer.toAttribute(); - * ``` - * @augments InputNode - */ -declare class BufferAttributeNode extends InputNode { - /** - * Constructs a new buffer attribute node. - * - * @param {BufferAttribute|InterleavedBuffer|TypedArray} value - The attribute data. - * @param {?string} [bufferType=null] - The buffer type (e.g. `'vec3'`). - * @param {number} [bufferStride=0] - The buffer stride. - * @param {number} [bufferOffset=0] - The buffer offset. - */ - constructor(value: BufferAttribute | InterleavedBuffer | TypedArray, bufferType?: string | null, bufferStride?: number, bufferOffset?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBufferNode: boolean; - /** - * The buffer type (e.g. `'vec3'`). - * - * @type {?string} - * @default null - */ - bufferType: string | null; - /** - * The buffer stride. - * - * @type {number} - * @default 0 - */ - bufferStride: number; - /** - * The buffer offset. - * - * @type {number} - * @default 0 - */ - bufferOffset: number; - /** - * The usage property. Set this to `THREE.DynamicDrawUsage` via `.setUsage()`, - * if you are planning to update the attribute data per frame. - * - * @type {number} - * @default StaticDrawUsage - */ - usage: number; - /** - * Whether the attribute is instanced or not. - * - * @type {boolean} - * @default false - */ - instanced: boolean; - /** - * A reference to the buffer attribute. - * - * @type {?BufferAttribute} - * @default null - */ - attribute: BufferAttribute | null; - /** - * This method is overwritten since the attribute data might be shared - * and thus the hash should be shared as well. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The hash. - */ - getHash(builder: NodeBuilder): string; - /** - * This method is overwritten since the node type is inferred from - * the buffer attribute. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Depending on which value was passed to the node, `setup()` behaves - * differently. If no instance of `BufferAttribute` was passed, the method - * creates an internal attribute and configures it respectively. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setup(builder: NodeBuilder): void; - /** - * Generates the code snippet of the buffer attribute node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The generated code snippet. - */ - generate(builder: NodeBuilder): string; - /** - * Overwrites the default implementation to return a fixed value `'bufferAttribute'`. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The input type. - */ - getInputType(): string; - /** - * Sets the `usage` property to the given value. - * - * @param {number} value - The usage to set. - * @return {BufferAttributeNode} A reference to this node. - */ - setUsage(value: number): BufferAttributeNode; - /** - * Sets the `instanced` property to the given value. - * - * @param {boolean} value - The value to set. - * @return {BufferAttributeNode} A reference to this node. - */ - setInstanced(value: boolean): BufferAttributeNode; -} -import { InterleavedBuffer } from '../../core/InterleavedBuffer.js'; -import InputNode from '../core/InputNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/BufferNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/BufferNode.d.ts deleted file mode 100644 index a0765ba1c..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/BufferNode.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -export default BufferNode; -export function buffer(value: Array, type: string, count: number): BufferNode; -/** - * A special type of uniform node which represents array-like data - * as uniform buffers. The access usually happens via `element()` - * which returns an instance of {@link ArrayElementNode}. For example: - * - * ```js - * const bufferNode = buffer( array, 'mat4', count ); - * const matrixNode = bufferNode.element( index ); // access a matrix from the buffer - * ``` - * In general, it is recommended to use the more managed {@link UniformArrayNode} - * since it handles more input types and automatically cares about buffer paddings. - * - * @augments UniformNode - */ -declare class BufferNode extends UniformNode { - /** - * Constructs a new buffer node. - * - * @param {Array} value - Array-like buffer data. - * @param {string} bufferType - The data type of the buffer. - * @param {number} [bufferCount=0] - The count of buffer elements. - */ - constructor(value: Array, bufferType: string, bufferCount?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBufferNode: boolean; - /** - * The data type of the buffer. - * - * @type {string} - */ - bufferType: string; - /** - * The uniform node that holds the value of the reference node. - * - * @type {number} - * @default 0 - */ - bufferCount: number; - /** - * An array of update ranges. - * - * @type {Array<{start: number, count: number}>} - */ - updateRanges: Array<{ - start: number; - count: number; - }>; - /** - * Adds a range of data in the data array to be updated on the GPU. - * - * @param {number} start - Position at which to start update. - * @param {number} count - The number of components to update. - */ - addUpdateRange(start: number, count: number): void; - /** - * Clears the update ranges. - */ - clearUpdateRanges(): void; - /** - * Overwrites the default implementation to return a fixed value `'buffer'`. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The input type. - */ - getInputType(): string; -} -import UniformNode from '../core/UniformNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/BuiltinNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/BuiltinNode.d.ts deleted file mode 100644 index 1081d0ec4..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/BuiltinNode.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -export default BuiltinNode; -/** - * TSL function for creating a builtin node. - * - * @tsl - * @function - * @param {string} name - The name of the built-in shader variable. - * @returns {BuiltinNode} - */ -export const builtin: any; -/** - * The node allows to set values for built-in shader variables. That is - * required for features like hardware-accelerated vertex clipping. - * - * @augments Node - */ -declare class BuiltinNode extends Node { - /** - * Constructs a new builtin node. - * - * @param {string} name - The name of the built-in shader variable. - */ - constructor(name: string); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBuiltinNode: boolean; - /** - * Generates the code snippet of the builtin node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The generated code snippet. - */ - generate(): string; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/Camera.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/Camera.d.ts deleted file mode 100644 index 1af86bd26..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/Camera.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * TSL object that represents the current `index` value of the camera if used ArrayCamera. - * - * @tsl - * @type {UniformNode} - */ -export const cameraIndex: UniformNode; -/** - * TSL object that represents the `near` value of the camera used for the current render. - * - * @tsl - * @type {UniformNode} - */ -export const cameraNear: UniformNode; -/** - * TSL object that represents the `far` value of the camera used for the current render. - * - * @tsl - * @type {UniformNode} - */ -export const cameraFar: UniformNode; -/** - * TSL object that represents the projection matrix of the camera used for the current render. - * - * @tsl - * @type {UniformNode} - */ -export const cameraProjectionMatrix: UniformNode; -/** - * TSL object that represents the inverse projection matrix of the camera used for the current render. - * - * @tsl - * @type {UniformNode} - */ -export const cameraProjectionMatrixInverse: UniformNode; -/** - * TSL object that represents the view matrix of the camera used for the current render. - * - * @tsl - * @type {UniformNode} - */ -export const cameraViewMatrix: UniformNode; -/** - * TSL object that represents the world matrix of the camera used for the current render. - * - * @tsl - * @type {UniformNode} - */ -export const cameraWorldMatrix: UniformNode; -/** - * TSL object that represents the normal matrix of the camera used for the current render. - * - * @tsl - * @type {UniformNode} - */ -export const cameraNormalMatrix: UniformNode; -/** - * TSL object that represents the position in world space of the camera used for the current render. - * - * @tsl - * @type {UniformNode} - */ -export const cameraPosition: UniformNode; -/** - * TSL object that represents the viewport of the camera used for the current render. - * - * @tsl - * @type {UniformNode} - */ -export const cameraViewport: UniformNode; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/ClippingNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/ClippingNode.d.ts deleted file mode 100644 index 5ee80d125..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/ClippingNode.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -export default ClippingNode; -export function clipping(): ClippingNode; -export function clippingAlpha(): ClippingNode; -export function hardwareClipping(): ClippingNode; -/** - * This node is used in {@link NodeMaterial} to setup the clipping - * which can happen hardware-accelerated (if supported) and optionally - * use alpha-to-coverage for anti-aliasing clipped edges. - * - * @augments Node - */ -declare class ClippingNode extends Node { - /** - * Constructs a new clipping node. - * - * @param {('default'|'hardware'|'alphaToCoverage')} [scope='default'] - The node's scope. Similar to other nodes, - * the selected scope influences the behavior of the node and what type of code is generated. - */ - constructor(scope?: ("default" | "hardware" | "alphaToCoverage")); - /** - * The node's scope. Similar to other nodes, the selected scope influences - * the behavior of the node and what type of code is generated. - * - * @type {('default'|'hardware'|'alphaToCoverage')} - */ - scope: ("default" | "hardware" | "alphaToCoverage"); - /** - * Setups the node depending on the selected scope. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The result node. - */ - setup(builder: NodeBuilder): Node; - hardwareClipping: any; - /** - * Setups alpha to coverage. - * - * @param {Array} intersectionPlanes - The intersection planes. - * @param {Array} unionPlanes - The union planes. - * @return {Node} The result node. - */ - setupAlphaToCoverage(intersectionPlanes: Array, unionPlanes: Array): Node; - /** - * Setups the default clipping. - * - * @param {Array} intersectionPlanes - The intersection planes. - * @param {Array} unionPlanes - The union planes. - * @return {Node} The result node. - */ - setupDefault(intersectionPlanes: Array, unionPlanes: Array): Node; - /** - * Setups hardware clipping. - * - * @param {Array} unionPlanes - The union planes. - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The result node. - */ - setupHardwareClipping(unionPlanes: Array, builder: NodeBuilder): Node; -} -declare namespace ClippingNode { - let ALPHA_TO_COVERAGE: string; - let DEFAULT: string; - let HARDWARE: string; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/CubeTextureNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/CubeTextureNode.d.ts deleted file mode 100644 index 23a01c90a..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/CubeTextureNode.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -export default CubeTextureNode; -/** - * TSL function for creating a cube texture node. - * - * @tsl - * @function - * @param {CubeTexture} value - The cube texture. - * @param {?Node} [uvNode=null] - The uv node. - * @param {?Node} [levelNode=null] - The level node. - * @param {?Node} [biasNode=null] - The bias node. - * @returns {CubeTextureNode} - */ -export const cubeTextureBase: any; -export function cubeTexture(value?: (CubeTexture | CubeTextureNode) | null, uvNode?: Node | null, levelNode?: Node | null, biasNode?: Node | null): CubeTextureNode; -export function uniformCubeTexture(value?: CubeTexture | null): CubeTextureNode; -/** - * This type of uniform node represents a cube texture. - * - * @augments TextureNode - */ -declare class CubeTextureNode extends TextureNode { - /** - * Constructs a new cube texture node. - * - * @param {CubeTexture} value - The cube texture. - * @param {?Node} [uvNode=null] - The uv node. - * @param {?Node} [levelNode=null] - The level node. - * @param {?Node} [biasNode=null] - The bias node. - */ - constructor(value: CubeTexture, uvNode?: Node | null, levelNode?: Node | null, biasNode?: Node | null); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isCubeTextureNode: boolean; - /** - * Overwritten with an empty implementation since the `updateMatrix` flag is ignored - * for cube textures. The uv transformation matrix is not applied to cube textures. - * - * @param {boolean} value - The update toggle. - */ - setUpdateMatrix(): void; -} -import { CubeTexture } from '../../textures/CubeTexture.js'; -import TextureNode from './TextureNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/InstanceNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/InstanceNode.d.ts deleted file mode 100644 index 544f2e966..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/InstanceNode.d.ts +++ /dev/null @@ -1,131 +0,0 @@ -export default InstanceNode; -/** - * TSL function for creating an instance node. - * - * @tsl - * @function - * @param {number} count - The number of instances. - * @param {InstancedBufferAttribute|StorageInstancedBufferAttribute} instanceMatrix - Instanced buffer attribute representing the instance transformations. - * @param {?InstancedBufferAttribute|StorageInstancedBufferAttribute} instanceColor - Instanced buffer attribute representing the instance colors. - * @returns {InstanceNode} - */ -export const instance: any; -/** - * This node implements the vertex shader logic which is required - * when rendering 3D objects via instancing. The code makes sure - * vertex positions, normals and colors can be modified via instanced - * data. - * - * @augments Node - */ -declare class InstanceNode extends Node { - /** - * Constructs a new instance node. - * - * @param {number} count - The number of instances. - * @param {InstancedBufferAttribute|StorageInstancedBufferAttribute} instanceMatrix - Instanced buffer attribute representing the instance transformations. - * @param {?InstancedBufferAttribute|StorageInstancedBufferAttribute} instanceColor - Instanced buffer attribute representing the instance colors. - */ - constructor(count: number, instanceMatrix: InstancedBufferAttribute | StorageInstancedBufferAttribute, instanceColor?: (InstancedBufferAttribute | StorageInstancedBufferAttribute) | null); - /** - * The number of instances. - * - * @type {number} - */ - count: number; - /** - * Instanced buffer attribute representing the transformation of instances. - * - * @type {InstancedBufferAttribute} - */ - instanceMatrix: InstancedBufferAttribute; - /** - * Instanced buffer attribute representing the color of instances. - * - * @type {InstancedBufferAttribute} - */ - instanceColor: InstancedBufferAttribute; - /** - * The node that represents the instance matrix data. - * - * @type {?Node} - */ - instanceMatrixNode: Node | null; - /** - * The node that represents the instance color data. - * - * @type {?Node} - * @default null - */ - instanceColorNode: Node | null; - /** - * A reference to a buffer that is used by `instanceMatrixNode`. - * - * @type {?InstancedInterleavedBuffer} - */ - buffer: InstancedInterleavedBuffer | null; - /** - * A reference to a buffer that is used by `instanceColorNode`. - * - * @type {?InstancedBufferAttribute} - */ - bufferColor: InstancedBufferAttribute | null; - /** - * The previous instance matrices. Required for computing motion vectors. - * - * @type {?Node} - * @default null - */ - previousInstanceMatrixNode: Node | null; - /** - * Tracks whether the matrix data is provided via a storage buffer. - * - * @type {boolean} - */ - get isStorageMatrix(): boolean; - /** - * Tracks whether the color data is provided via a storage buffer. - * - * @type {boolean} - */ - get isStorageColor(): boolean; - /** - * Setups the internal buffers and nodes and assigns the transformed vertex data - * to predefined node variables for accumulation. That follows the same patterns - * like with morph and skinning nodes. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setup(builder: NodeBuilder): void; - /** - * Checks if the internal buffers require an update. - * - * @param {NodeFrame} frame - The current node frame. - */ - updateBefore(): void; - /** - * Updates velocity-related data if necessary. - * - * @param {NodeFrame} frame - The current node frame. - */ - update(frame: NodeFrame): void; - /** - * Computes the transformed/instanced vertex position of the previous frame. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The instanced position from the previous frame. - */ - getPreviousInstancedPosition(builder: NodeBuilder): Node; - /** - * Creates a node representing the instance matrix data. - * - * @private - * @param {boolean} assignBuffer - Whether the created interleaved buffer should be assigned to the `buffer` member or not. - * @param {NodeBuilder} builder - A reference to the current node builder. - * @return {Node} The instance matrix node. - */ - private _createInstanceMatrixNode; -} -import Node from '../core/Node.js'; -import { InstancedBufferAttribute } from '../../core/InstancedBufferAttribute.js'; -import { InstancedInterleavedBuffer } from '../../core/InstancedInterleavedBuffer.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/InstancedMeshNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/InstancedMeshNode.d.ts deleted file mode 100644 index d9619f9e8..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/InstancedMeshNode.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default InstancedMeshNode; -/** - * TSL function for creating an instanced mesh node. - * - * @tsl - * @function - * @param {InstancedMesh} instancedMesh - The instancedMesh. - * @returns {InstancedMeshNode} - */ -export const instancedMesh: any; -/** - * This is a special version of `InstanceNode` which requires the usage of {@link InstancedMesh}. - * It allows an easier setup of the instance node. - * - * @augments InstanceNode - */ -declare class InstancedMeshNode extends InstanceNode { - /** - * Constructs a new instanced mesh node. - * - * @param {InstancedMesh} instancedMesh - The instanced mesh. - */ - constructor(instancedMesh: InstancedMesh); - /** - * A reference to the instanced mesh. - * - * @type {InstancedMesh} - */ - instancedMesh: InstancedMesh; -} -import InstanceNode from './InstanceNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/Lights.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/Lights.d.ts deleted file mode 100644 index 1639939c2..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/Lights.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -/** - * TSL function for getting a shadow matrix uniform node for the given light. - * - * @tsl - * @function - * @param {Light} light -The light source. - * @returns {UniformNode} The shadow matrix uniform node. - */ -export function lightShadowMatrix(light: Light): UniformNode; -/** - * TSL function for getting projected uv coordinates for the given light. - * Relevant when using maps with spot lights. - * - * @tsl - * @function - * @param {Light} light -The light source. - * @param {Node} [position=positionWorld] -The position to project. - * @returns {Node} The projected uvs. - */ -export function lightProjectionUV(light: Light, position?: Node): Node; -/** - * TSL function for getting the position in world space for the given light. - * - * @tsl - * @function - * @param {Light} light -The light source. - * @returns {UniformNode} The light's position in world space. - */ -export function lightPosition(light: Light): UniformNode; -/** - * TSL function for getting the light target position in world space for the given light. - * - * @tsl - * @function - * @param {Light} light -The light source. - * @returns {UniformNode} The light target position in world space. - */ -export function lightTargetPosition(light: Light): UniformNode; -/** - * TSL function for getting the position in view space for the given light. - * - * @tsl - * @function - * @param {Light} light - The light source. - * @returns {UniformNode} The light's position in view space. - */ -export function lightViewPosition(light: Light): UniformNode; -export function lightTargetDirection(light: Light): Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/MaterialNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/MaterialNode.d.ts deleted file mode 100644 index 3bfbe299d..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/MaterialNode.d.ts +++ /dev/null @@ -1,384 +0,0 @@ -export default MaterialNode; -/** - * TSL object that represents alpha test of the current material. - * - * @tsl - * @type {Node} - */ -export const materialAlphaTest: Node; -/** - * TSL object that represents the diffuse color of the current material. - * The value is composed via `color` * `map`. - * - * @tsl - * @type {Node} - */ -export const materialColor: Node; -/** - * TSL object that represents the shininess of the current material. - * - * @tsl - * @type {Node} - */ -export const materialShininess: Node; -/** - * TSL object that represents the emissive color of the current material. - * The value is composed via `emissive` * `emissiveIntensity` * `emissiveMap`. - * - * @tsl - * @type {Node} - */ -export const materialEmissive: Node; -/** - * TSL object that represents the opacity of the current material. - * The value is composed via `opacity` * `alphaMap`. - * - * @tsl - * @type {Node} - */ -export const materialOpacity: Node; -/** - * TSL object that represents the specular of the current material. - * - * @tsl - * @type {Node} - */ -export const materialSpecular: Node; -/** - * TSL object that represents the specular intensity of the current material. - * The value is composed via `specularIntensity` * `specularMap.a`. - * - * @tsl - * @type {Node} - */ -export const materialSpecularIntensity: Node; -/** - * TSL object that represents the specular color of the current material. - * The value is composed via `specularColor` * `specularMap.rgb`. - * - * @tsl - * @type {Node} - */ -export const materialSpecularColor: Node; -/** - * TSL object that represents the specular strength of the current material. - * The value is composed via `specularMap.r`. - * - * @tsl - * @type {Node} - */ -export const materialSpecularStrength: Node; -/** - * TSL object that represents the reflectivity of the current material. - * - * @tsl - * @type {Node} - */ -export const materialReflectivity: Node; -/** - * TSL object that represents the roughness of the current material. - * The value is composed via `roughness` * `roughnessMap.g`. - * - * @tsl - * @type {Node} - */ -export const materialRoughness: Node; -/** - * TSL object that represents the metalness of the current material. - * The value is composed via `metalness` * `metalnessMap.b`. - * - * @tsl - * @type {Node} - */ -export const materialMetalness: Node; -/** - * TSL object that represents the normal of the current material. - * The value will be either `normalMap` * `normalScale`, `bumpMap` * `bumpScale` or `normalView`. - * - * @tsl - * @type {Node} - */ -export const materialNormal: Node; -/** - * TSL object that represents the clearcoat of the current material. - * The value is composed via `clearcoat` * `clearcoatMap.r` - * - * @tsl - * @type {Node} - */ -export const materialClearcoat: Node; -/** - * TSL object that represents the clearcoat roughness of the current material. - * The value is composed via `clearcoatRoughness` * `clearcoatRoughnessMap.r`. - * - * @tsl - * @type {Node} - */ -export const materialClearcoatRoughness: Node; -/** - * TSL object that represents the clearcoat normal of the current material. - * The value will be either `clearcoatNormalMap` or `normalView`. - * - * @tsl - * @type {Node} - */ -export const materialClearcoatNormal: Node; -/** - * TSL object that represents the rotation of the current sprite material. - * - * @tsl - * @type {Node} - */ -export const materialRotation: Node; -/** - * TSL object that represents the sheen color of the current material. - * The value is composed via `sheen` * `sheenColor` * `sheenColorMap`. - * - * @tsl - * @type {Node} - */ -export const materialSheen: Node; -/** - * TSL object that represents the sheen roughness of the current material. - * The value is composed via `sheenRoughness` * `sheenRoughnessMap.a`. - * - * @tsl - * @type {Node} - */ -export const materialSheenRoughness: Node; -/** - * TSL object that represents the anisotropy of the current material. - * - * @tsl - * @type {Node} - */ -export const materialAnisotropy: Node; -/** - * TSL object that represents the iridescence of the current material. - * - * @tsl - * @type {Node} - */ -export const materialIridescence: Node; -/** - * TSL object that represents the iridescence IOR of the current material. - * - * @tsl - * @type {Node} - */ -export const materialIridescenceIOR: Node; -/** - * TSL object that represents the iridescence thickness of the current material. - * - * @tsl - * @type {Node} - */ -export const materialIridescenceThickness: Node; -/** - * TSL object that represents the transmission of the current material. - * The value is composed via `transmission` * `transmissionMap.r`. - * - * @tsl - * @type {Node} - */ -export const materialTransmission: Node; -/** - * TSL object that represents the thickness of the current material. - * The value is composed via `thickness` * `thicknessMap.g`. - * - * @tsl - * @type {Node} - */ -export const materialThickness: Node; -/** - * TSL object that represents the IOR of the current material. - * - * @tsl - * @type {Node} - */ -export const materialIOR: Node; -/** - * TSL object that represents the attenuation distance of the current material. - * - * @tsl - * @type {Node} - */ -export const materialAttenuationDistance: Node; -/** - * TSL object that represents the attenuation color of the current material. - * - * @tsl - * @type {Node} - */ -export const materialAttenuationColor: Node; -/** - * TSL object that represents the scale of the current dashed line material. - * - * @tsl - * @type {Node} - */ -export const materialLineScale: Node; -/** - * TSL object that represents the dash size of the current dashed line material. - * - * @tsl - * @type {Node} - */ -export const materialLineDashSize: Node; -/** - * TSL object that represents the gap size of the current dashed line material. - * - * @tsl - * @type {Node} - */ -export const materialLineGapSize: Node; -/** - * TSL object that represents the line width of the current line material. - * - * @tsl - * @type {Node} - */ -export const materialLineWidth: Node; -/** - * TSL object that represents the dash offset of the current line material. - * - * @tsl - * @type {Node} - */ -export const materialLineDashOffset: Node; -/** - * TSL object that represents the point size of the current points material. - * - * @tsl - * @type {Node} - */ -export const materialPointSize: Node; -/** - * TSL object that represents the dispersion of the current material. - * - * @tsl - * @type {Node} - */ -export const materialDispersion: Node; -/** - * TSL object that represents the light map of the current material. - * The value is composed via `lightMapIntensity` * `lightMap.rgb`. - * - * @tsl - * @type {Node} - */ -export const materialLightMap: Node; -/** - * TSL object that represents the ambient occlusion map of the current material. - * The value is composed via `aoMap.r` - 1 * `aoMapIntensity` + 1. - * - * @tsl - * @type {Node} - */ -export const materialAO: Node; -/** - * TSL object that represents the anisotropy vector of the current material. - * - * @tsl - * @type {Node} - */ -export const materialAnisotropyVector: Node; -/** - * This class should simplify the node access to material properties. - * It internal uses reference nodes to make sure changes to material - * properties are automatically reflected to predefined TSL objects - * like e.g. `materialColor`. - * - * @augments Node - */ -declare class MaterialNode extends Node { - /** - * Constructs a new material node. - * - * @param {string} scope - The scope defines what kind of material property is referred by the node. - */ - constructor(scope: string); - /** - * The scope defines what material property is referred by the node. - * - * @type {string} - */ - scope: string; - /** - * Returns a cached reference node for the given property and type. - * - * @param {string} property - The name of the material property. - * @param {string} type - The uniform type of the property. - * @return {MaterialReferenceNode} A material reference node representing the property access. - */ - getCache(property: string, type: string): MaterialReferenceNode; - /** - * Returns a float-typed material reference node for the given property name. - * - * @param {string} property - The name of the material property. - * @return {MaterialReferenceNode} A material reference node representing the property access. - */ - getFloat(property: string): MaterialReferenceNode; - /** - * Returns a color-typed material reference node for the given property name. - * - * @param {string} property - The name of the material property. - * @return {MaterialReferenceNode} A material reference node representing the property access. - */ - getColor(property: string): MaterialReferenceNode; - /** - * Returns a texture-typed material reference node for the given property name. - * - * @param {string} property - The name of the material property. - * @return {MaterialReferenceNode} A material reference node representing the property access. - */ - getTexture(property: string): MaterialReferenceNode; - /** - * The node setup is done depending on the selected scope. Multiple material properties - * might be grouped into a single node composition if they logically belong together. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The node representing the selected scope. - */ - setup(builder: NodeBuilder): Node; -} -declare namespace MaterialNode { - let ALPHA_TEST: string; - let COLOR: string; - let OPACITY: string; - let SHININESS: string; - let SPECULAR: string; - let SPECULAR_STRENGTH: string; - let SPECULAR_INTENSITY: string; - let SPECULAR_COLOR: string; - let REFLECTIVITY: string; - let ROUGHNESS: string; - let METALNESS: string; - let NORMAL: string; - let CLEARCOAT: string; - let CLEARCOAT_ROUGHNESS: string; - let CLEARCOAT_NORMAL: string; - let EMISSIVE: string; - let ROTATION: string; - let SHEEN: string; - let SHEEN_ROUGHNESS: string; - let ANISOTROPY: string; - let IRIDESCENCE: string; - let IRIDESCENCE_IOR: string; - let IRIDESCENCE_THICKNESS: string; - let IOR: string; - let TRANSMISSION: string; - let THICKNESS: string; - let ATTENUATION_DISTANCE: string; - let ATTENUATION_COLOR: string; - let LINE_SCALE: string; - let LINE_DASH_SIZE: string; - let LINE_GAP_SIZE: string; - let LINE_WIDTH: string; - let LINE_DASH_OFFSET: string; - let POINT_SIZE: string; - let DISPERSION: string; - let LIGHT_MAP: string; - let AO: string; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/MaterialProperties.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/MaterialProperties.d.ts deleted file mode 100644 index 0525adf5a..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/MaterialProperties.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * TSL object that represents the refraction ratio of the material used for rendering the current object. - * - * @tsl - * @type {UniformNode} - */ -export const materialRefractionRatio: UniformNode; -/** - * TSL object that represents the intensity of environment maps of PBR materials. - * When `material.envMap` is set, the value is `material.envMapIntensity` otherwise `scene.environmentIntensity`. - * - * @tsl - * @type {Node} - */ -export const materialEnvIntensity: Node; -/** - * TSL object that represents the rotation of environment maps. - * When `material.envMap` is set, the value is `material.envMapRotation`. `scene.environmentRotation` controls the - * rotation of `scene.environment` instead. - * - * @tsl - * @type {Node} - */ -export const materialEnvRotation: Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/MaterialReferenceNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/MaterialReferenceNode.d.ts deleted file mode 100644 index 7a6029df8..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/MaterialReferenceNode.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -export default MaterialReferenceNode; -export function materialReference(name: string, type: string, material?: Material | null): MaterialReferenceNode; -/** - * This node is a special type of reference node which is intended - * for linking material properties with node values. - * ```js - * const opacityNode = materialReference( 'opacity', 'float', material ); - * ``` - * When changing `material.opacity`, the node value of `opacityNode` will - * automatically be updated. - * - * @augments ReferenceNode - */ -declare class MaterialReferenceNode extends ReferenceNode { - /** - * Constructs a new material reference node. - * - * @param {string} property - The name of the property the node refers to. - * @param {string} inputType - The uniform type that should be used to represent the property value. - * @param {?Material} [material=null] - The material the property belongs to. When no material is set, - * the node refers to the material of the current rendered object. - */ - constructor(property: string, inputType: string, material?: Material | null); - /** - * The material the property belongs to. When no material is set, - * the node refers to the material of the current rendered object. - * - * @type {?Material} - * @default null - */ - material: Material | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMaterialReferenceNode: boolean; -} -import ReferenceNode from './ReferenceNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/ModelNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/ModelNode.d.ts deleted file mode 100644 index b5523dfa3..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/ModelNode.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -export default ModelNode; -/** - * TSL object that represents the object's direction in world space. - * - * @tsl - * @type {ModelNode} - */ -export const modelDirection: ModelNode; -/** - * TSL object that represents the object's world matrix. - * - * @tsl - * @type {ModelNode} - */ -export const modelWorldMatrix: ModelNode; -/** - * TSL object that represents the object's position in world space. - * - * @tsl - * @type {ModelNode} - */ -export const modelPosition: ModelNode; -/** - * TSL object that represents the object's scale in world space. - * - * @tsl - * @type {ModelNode} - */ -export const modelScale: ModelNode; -/** - * TSL object that represents the object's position in view/camera space. - * - * @tsl - * @type {ModelNode} - */ -export const modelViewPosition: ModelNode; -/** - * TSL object that represents the object's radius. - * - * @tsl - * @type {ModelNode} - */ -export const modelRadius: ModelNode; -/** - * TSL object that represents the object's normal matrix. - * - * @tsl - * @type {UniformNode} - */ -export const modelNormalMatrix: UniformNode; -/** - * TSL object that represents the object's inverse world matrix. - * - * @tsl - * @type {UniformNode} - */ -export const modelWorldMatrixInverse: UniformNode; -/** - * TSL object that represents the object's model view matrix. - * - * @tsl - * @type {Node} - */ -export const modelViewMatrix: Node; -/** - * TSL object that represents the object's model view in `mediump` precision. - * - * @tsl - * @type {Node} - */ -export const mediumpModelViewMatrix: Node; -/** - * TSL object that represents the object's model view in `highp` precision - * which is achieved by computing the matrix in JS and not in the shader. - * - * @tsl - * @type {Node} - */ -export const highpModelViewMatrix: Node; -/** - * TSL object that represents the object's model normal view in `highp` precision - * which is achieved by computing the matrix in JS and not in the shader. - * - * @tsl - * @type {Node} - */ -export const highpModelNormalViewMatrix: Node; -/** - * This type of node is a specialized version of `Object3DNode` - * with larger set of model related metrics. Unlike `Object3DNode`, - * `ModelNode` extracts the reference to the 3D object from the - * current node frame state. - * - * @augments Object3DNode - */ -declare class ModelNode extends Object3DNode { - /** - * Constructs a new object model node. - * - * @param {('position'|'viewPosition'|'direction'|'scale'|'worldMatrix')} scope - The node represents a different type of transformation depending on the scope. - */ - constructor(scope: ("position" | "viewPosition" | "direction" | "scale" | "worldMatrix")); -} -import Object3DNode from './Object3DNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/ModelViewProjectionNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/ModelViewProjectionNode.d.ts deleted file mode 100644 index 40d0ac691..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/ModelViewProjectionNode.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * TSL object that represents the position in clip space after the model-view-projection transform of the current rendered object. - * - * @tsl - * @type {VaryingNode} - */ -export const modelViewProjection: VaryingNode; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/MorphNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/MorphNode.d.ts deleted file mode 100644 index 70c2b991f..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/MorphNode.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -export default MorphNode; -/** - * TSL function for creating a morph node. - * - * @tsl - * @function - * @param {Mesh} mesh - The mesh holding the morph targets. - * @returns {MorphNode} - */ -export const morphReference: any; -/** - * This node implements the vertex transformation shader logic which is required - * for morph target animation. - * - * @augments Node - */ -declare class MorphNode extends Node { - /** - * Constructs a new morph node. - * - * @param {Mesh} mesh - The mesh holding the morph targets. - */ - constructor(mesh: Mesh); - /** - * The mesh holding the morph targets. - * - * @type {Mesh} - */ - mesh: Mesh; - /** - * A uniform node which represents the morph base influence value. - * - * @type {UniformNode} - */ - morphBaseInfluence: UniformNode; - /** - * Setups the morph node by assigning the transformed vertex data to predefined node variables. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setup(builder: NodeBuilder): void; - /** - * Updates the state of the morphed mesh by updating the base influence. - * - * @param {NodeFrame} frame - The current node frame. - */ - update(): void; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/Normal.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/Normal.d.ts deleted file mode 100644 index b75ce8778..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/Normal.d.ts +++ /dev/null @@ -1,100 +0,0 @@ -/** - * TSL object that represents the normal attribute of the current rendered object in local space. - * - * @tsl - * @type {Node} - */ -export const normalGeometry: Node; -/** - * TSL object that represents the vertex normal of the current rendered object in local space. - * - * @tsl - * @type {Node} - */ -export const normalLocal: Node; -/** - * TSL object that represents the flat vertex normal of the current rendered object in view space. - * - * @tsl - * @type {Node} - */ -export const normalFlat: Node; -/** - * TSL object that represents the vertex normal of the current rendered object in view space. - * - * @tsl - * @type {Node} - */ -export const normalViewGeometry: Node; -/** - * TSL object that represents the vertex normal of the current rendered object in world space. - * - * @tsl - * @type {Node} - */ -export const normalWorldGeometry: Node; -/** - * TSL object that represents the vertex normal of the current rendered object in view space. - * - * @tsl - * @type {Node} - */ -export const normalView: Node; -/** - * TSL object that represents the vertex normal of the current rendered object in world space. - * - * @tsl - * @type {Node} - */ -export const normalWorld: Node; -/** - * TSL object that represents the clearcoat vertex normal of the current rendered object in view space. - * - * @tsl - * @type {Node} - */ -export const clearcoatNormalView: Node; -/** - * Transforms the normal with the given matrix. - * - * @tsl - * @function - * @param {Node} normal - The normal. - * @param {Node} [matrix=modelWorldMatrix] - The matrix. - * @return {Node} The transformed normal. - */ -export const transformNormal: () => void; -/** - * Transforms the given normal from local to view space. - * - * @tsl - * @function - * @param {Node} normal - The normal. - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The transformed normal. - */ -export const transformNormalToView: () => void; -/** - * TSL object that represents the transformed vertex normal of the current rendered object in view space. - * - * @tsl - * @type {Node} - * @deprecated since r178. Use `normalView` instead. - */ -export const transformedNormalView: Node; -/** - * TSL object that represents the transformed vertex normal of the current rendered object in world space. - * - * @tsl - * @type {Node} - * @deprecated since r178. Use `normalWorld` instead. - */ -export const transformedNormalWorld: Node; -/** - * TSL object that represents the transformed clearcoat vertex normal of the current rendered object in view space. - * - * @tsl - * @type {Node} - * @deprecated since r178. Use `clearcoatNormalView` instead. - */ -export const transformedClearcoatNormalView: Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/Object3DNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/Object3DNode.d.ts deleted file mode 100644 index 99b15b948..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/Object3DNode.d.ts +++ /dev/null @@ -1,128 +0,0 @@ -export default Object3DNode; -/** - * TSL function for creating an object 3D node that represents the object's direction in world space. - * - * @tsl - * @function - * @param {?Object3D} [object3d] - The 3D object. - * @returns {Object3DNode} - */ -export const objectDirection: any; -/** - * TSL function for creating an object 3D node that represents the object's world matrix. - * - * @tsl - * @function - * @param {?Object3D} [object3d] - The 3D object. - * @returns {Object3DNode} - */ -export const objectWorldMatrix: any; -/** - * TSL function for creating an object 3D node that represents the object's position in world space. - * - * @tsl - * @function - * @param {?Object3D} [object3d] - The 3D object. - * @returns {Object3DNode} - */ -export const objectPosition: any; -/** - * TSL function for creating an object 3D node that represents the object's scale in world space. - * - * @tsl - * @function - * @param {?Object3D} [object3d] - The 3D object. - * @returns {Object3DNode} - */ -export const objectScale: any; -/** - * TSL function for creating an object 3D node that represents the object's position in view/camera space. - * - * @tsl - * @function - * @param {?Object3D} [object3d] - The 3D object. - * @returns {Object3DNode} - */ -export const objectViewPosition: any; -/** - * TSL function for creating an object 3D node that represents the object's radius. - * - * @tsl - * @function - * @param {?Object3D} [object3d] - The 3D object. - * @returns {Object3DNode} - */ -export const objectRadius: any; -/** - * This node can be used to access transformation related metrics of 3D objects. - * Depending on the selected scope, a different metric is represented as a uniform - * in the shader. The following scopes are supported: - * - * - `POSITION`: The object's position in world space. - * - `VIEW_POSITION`: The object's position in view/camera space. - * - `DIRECTION`: The object's direction in world space. - * - `SCALE`: The object's scale in world space. - * - `WORLD_MATRIX`: The object's matrix in world space. - * - * @augments Node - */ -declare class Object3DNode extends Node { - /** - * Constructs a new object 3D node. - * - * @param {('position'|'viewPosition'|'direction'|'scale'|'worldMatrix')} scope - The node represents a different type of transformation depending on the scope. - * @param {?Object3D} [object3d=null] - The 3D object. - */ - constructor(scope: ("position" | "viewPosition" | "direction" | "scale" | "worldMatrix"), object3d?: Object3D | null); - /** - * The node reports a different type of transformation depending on the scope. - * - * @type {('position'|'viewPosition'|'direction'|'scale'|'worldMatrix')} - */ - scope: ("position" | "viewPosition" | "direction" | "scale" | "worldMatrix"); - /** - * The 3D object. - * - * @type {?Object3D} - * @default null - */ - object3d: Object3D | null; - /** - * Holds the value of the node as a uniform. - * - * @type {UniformNode} - */ - uniformNode: UniformNode; - /** - * Overwritten since the node type is inferred from the scope. - * - * @return {('mat4'|'vec3'|'float')} The node type. - */ - generateNodeType(): ("mat4" | "vec3" | "float"); - /** - * Updates the uniform value depending on the scope. - * - * @param {NodeFrame} frame - The current node frame. - */ - update(frame: NodeFrame): void; - /** - * Generates the code snippet of the uniform node. The node type of the uniform - * node also depends on the selected scope. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The generated code snippet. - */ - generate(builder: NodeBuilder): string; - serialize(data: any): void; - deserialize(data: any): void; -} -declare namespace Object3DNode { - let WORLD_MATRIX: string; - let POSITION: string; - let SCALE: string; - let VIEW_POSITION: string; - let DIRECTION: string; - let RADIUS: string; -} -import Node from '../core/Node.js'; -import UniformNode from '../core/UniformNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/PointUVNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/PointUVNode.d.ts deleted file mode 100644 index 67872c0e7..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/PointUVNode.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -export default PointUVNode; -/** - * TSL object that represents the uv coordinates of points. - * - * @tsl - * @type {PointUVNode} - */ -export const pointUV: PointUVNode; -/** - * A node for representing the uv coordinates of points. - * - * Can only be used with a WebGL backend. In WebGPU, point - * primitives always have the size of one pixel and can thus - * can't be used as sprite-like objects that display textures. - * - * @augments Node - */ -declare class PointUVNode extends Node { - /** - * Constructs a new point uv node. - */ - constructor(); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isPointUVNode: boolean; - generate(): string; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/Position.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/Position.d.ts deleted file mode 100644 index 4562c2971..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/Position.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * TSL object that represents the clip space position of the current rendered object. - * - * @tsl - * @type {VaryingNode} - */ -export const clipSpace: VaryingNode; -/** - * TSL object that represents the position attribute of the current rendered object. - * - * @tsl - * @type {AttributeNode} - */ -export const positionGeometry: AttributeNode; -/** - * TSL object that represents the vertex position in local space of the current rendered object. - * - * @tsl - * @type {AttributeNode} - */ -export const positionLocal: AttributeNode; -/** - * TSL object that represents the previous vertex position in local space of the current rendered object. - * Used in context of {@link VelocityNode} for rendering motion vectors. - * - * @tsl - * @type {AttributeNode} - */ -export const positionPrevious: AttributeNode; -/** - * TSL object that represents the vertex position in world space of the current rendered object. - * - * @tsl - * @type {VaryingNode} - */ -export const positionWorld: VaryingNode; -/** - * TSL object that represents the position world direction of the current rendered object. - * - * @tsl - * @type {Node} - */ -export const positionWorldDirection: Node; -/** - * TSL object that represents the vertex position in view space of the current rendered object. - * - * @tsl - * @type {VaryingNode} - */ -export const positionView: VaryingNode; -/** - * TSL object that represents the position view direction of the current rendered object. - * - * @tsl - * @type {VaryingNode} - */ -export const positionViewDirection: VaryingNode; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/ReferenceBaseNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/ReferenceBaseNode.d.ts deleted file mode 100644 index 413924422..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/ReferenceBaseNode.d.ts +++ /dev/null @@ -1,181 +0,0 @@ -export default ReferenceBaseNode; -export function reference(name: string, type: string, object: Object): ReferenceBaseNode; -export function referenceBuffer(name: string, type: string, count: number, object?: Object): ReferenceBaseNode; -/** - * Base class for nodes which establishes a reference to a property of another object. - * In this way, the value of the node is automatically linked to the value of - * referenced object. Reference nodes internally represent the linked value - * as a uniform. - * - * @augments Node - */ -declare class ReferenceBaseNode extends Node { - /** - * Constructs a new reference base node. - * - * @param {string} property - The name of the property the node refers to. - * @param {string} uniformType - The uniform type that should be used to represent the property value. - * @param {?Object} [object=null] - The object the property belongs to. - * @param {?number} [count=null] - When the linked property is an array-like, this parameter defines its length. - */ - constructor(property: string, uniformType: string, object?: Object | null, count?: number | null); - /** - * The name of the property the node refers to. - * - * @type {string} - */ - property: string; - /** - * The uniform type that should be used to represent the property value. - * - * @type {string} - */ - uniformType: string; - /** - * The object the property belongs to. - * - * @type {?Object} - * @default null - */ - object: Object | null; - /** - * When the linked property is an array, this parameter defines its length. - * - * @type {?number} - * @default null - */ - count: number | null; - /** - * The property name might have dots so nested properties can be referred. - * The hierarchy of the names is stored inside this array. - * - * @type {Array} - */ - properties: Array; - /** - * Points to the current referred object. This property exists next to {@link ReferenceNode#object} - * since the final reference might be updated from calling code. - * - * @type {?Object} - * @default null - */ - reference: Object | null; - /** - * The uniform node that holds the value of the reference node. - * - * @type {UniformNode} - * @default null - */ - node: UniformNode; - /** - * The uniform group of the internal uniform. - * - * @type {UniformGroupNode} - * @default null - */ - group: UniformGroupNode; - /** - * Sets the uniform group for this reference node. - * - * @param {UniformGroupNode} group - The uniform group to set. - * @return {ReferenceBaseNode} A reference to this node. - */ - setGroup(group: UniformGroupNode): ReferenceBaseNode; - /** - * When the referred property is array-like, this method can be used - * to access elements via an index node. - * - * @param {IndexNode} indexNode - indexNode. - * @return {ReferenceElementNode} A reference to an element. - */ - element(indexNode: IndexNode): ReferenceElementNode; - /** - * Sets the node type which automatically defines the internal - * uniform type. - * - * @param {string} uniformType - The type to set. - */ - setNodeType(uniformType: string): void; - /** - * This method is overwritten since the node type is inferred from - * the type of the reference node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Returns the property value from the given referred object. - * - * @param {Object} [object=this.reference] - The object to retrieve the property value from. - * @return {any} The value. - */ - getValueFromReference(object?: Object): any; - /** - * Allows to update the reference based on the given state. The state is only - * evaluated {@link ReferenceBaseNode#object} is not set. - * - * @param {(NodeFrame|NodeBuilder)} state - The current state. - * @return {Object} The updated reference. - */ - updateReference(state: (NodeFrame | NodeBuilder)): Object; - /** - * The output of the reference node is the internal uniform node. - * - * @return {UniformNode} The output node. - */ - setup(): UniformNode; - /** - * Overwritten to update the internal uniform value. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update(): void; - /** - * Retrieves the value from the referred object property and uses it - * to updated the internal uniform. - */ - updateValue(): void; -} -import Node from '../core/Node.js'; -/** - * This class is only relevant if the referenced property is array-like. - * In this case, `ReferenceElementNode` allows to refer to a specific - * element inside the data structure via an index. - * - * @augments ArrayElementNode - */ -declare class ReferenceElementNode extends ArrayElementNode { - /** - * Constructs a new reference element node. - * - * @param {ReferenceBaseNode} referenceNode - The reference node. - * @param {Node} indexNode - The index node that defines the element access. - */ - constructor(referenceNode: ReferenceBaseNode, indexNode: Node); - /** - * Similar to {@link ReferenceBaseNode#reference}, an additional - * property references to the current node. - * - * @type {?ReferenceBaseNode} - * @default null - */ - referenceNode: ReferenceBaseNode | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isReferenceElementNode: boolean; - /** - * This method is overwritten since the node type is inferred from - * the uniform type of the reference node. - * - * @return {string} The node type. - */ - generateNodeType(): string; - generate(builder: any): any; -} -import ArrayElementNode from '../utils/ArrayElementNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/ReferenceNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/ReferenceNode.d.ts deleted file mode 100644 index 7476c25c4..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/ReferenceNode.d.ts +++ /dev/null @@ -1,197 +0,0 @@ -export default ReferenceNode; -export function reference(name: string, type: string, object?: Object | null): ReferenceNode; -export function referenceBuffer(name: string, type: string, count: number, object: Object): ReferenceNode; -/** - * This type of node establishes a reference to a property of another object. - * In this way, the value of the node is automatically linked to the value of - * referenced object. Reference nodes internally represent the linked value - * as a uniform. - * - * @augments Node - */ -declare class ReferenceNode extends Node { - /** - * Constructs a new reference node. - * - * @param {string} property - The name of the property the node refers to. - * @param {string} uniformType - The uniform type that should be used to represent the property value. - * @param {?Object} [object=null] - The object the property belongs to. - * @param {?number} [count=null] - When the linked property is an array-like, this parameter defines its length. - */ - constructor(property: string, uniformType: string, object?: Object | null, count?: number | null); - /** - * The name of the property the node refers to. - * - * @type {string} - */ - property: string; - /** - * The uniform type that should be used to represent the property value. - * - * @type {string} - */ - uniformType: string; - /** - * The object the property belongs to. - * - * @type {?Object} - * @default null - */ - object: Object | null; - /** - * When the linked property is an array, this parameter defines its length. - * - * @type {?number} - * @default null - */ - count: number | null; - /** - * The property name might have dots so nested properties can be referred. - * The hierarchy of the names is stored inside this array. - * - * @type {Array} - */ - properties: Array; - /** - * Points to the current referred object. This property exists next to {@link ReferenceNode#object} - * since the final reference might be updated from calling code. - * - * @type {?Object} - * @default null - */ - reference: Object | null; - /** - * The uniform node that holds the value of the reference node. - * - * @type {UniformNode} - * @default null - */ - node: UniformNode; - /** - * The uniform group of the internal uniform. - * - * @type {UniformGroupNode} - * @default null - */ - group: UniformGroupNode; - /** - * When the referred property is array-like, this method can be used - * to access elements via an index node. - * - * @param {IndexNode} indexNode - indexNode. - * @return {ReferenceElementNode} A reference to an element. - */ - element(indexNode: IndexNode): ReferenceElementNode; - /** - * Sets the uniform group for this reference node. - * - * @param {UniformGroupNode} group - The uniform group to set. - * @return {ReferenceNode} A reference to this node. - */ - setGroup(group: UniformGroupNode): ReferenceNode; - /** - * Sets the name for the internal uniform. - * - * @param {string} name - The label to set. - * @return {ReferenceNode} A reference to this node. - */ - setName(name: string): ReferenceNode; - /** - * Sets the label for the internal uniform. - * - * @deprecated - * @param {string} name - The label to set. - * @return {ReferenceNode} A reference to this node. - */ - label(name: string): ReferenceNode; - /** - * Sets the node type which automatically defines the internal - * uniform type. - * - * @param {string} uniformType - The type to set. - */ - setNodeType(uniformType: string): void; - /** - * This method is overwritten since the node type is inferred from - * the type of the reference node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Returns the property value from the given referred object. - * - * @param {Object} [object=this.reference] - The object to retrieve the property value from. - * @return {any} The value. - */ - getValueFromReference(object?: Object): any; - /** - * Allows to update the reference based on the given state. The state is only - * evaluated {@link ReferenceNode#object} is not set. - * - * @param {(NodeFrame|NodeBuilder)} state - The current state. - * @return {Object} The updated reference. - */ - updateReference(state: (NodeFrame | NodeBuilder)): Object; - /** - * The output of the reference node is the internal uniform node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {UniformNode} The output node. - */ - setup(): UniformNode; - /** - * Overwritten to update the internal uniform value. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update(): void; - /** - * Retrieves the value from the referred object property and uses it - * to updated the internal uniform. - */ - updateValue(): void; -} -import Node from '../core/Node.js'; -/** - * This class is only relevant if the referenced property is array-like. - * In this case, `ReferenceElementNode` allows to refer to a specific - * element inside the data structure via an index. - * - * @augments ArrayElementNode - */ -declare class ReferenceElementNode extends ArrayElementNode { - /** - * Constructs a new reference element node. - * - * @param {?ReferenceNode} referenceNode - The reference node. - * @param {Node} indexNode - The index node that defines the element access. - */ - constructor(referenceNode: ReferenceNode | null, indexNode: Node); - /** - * Similar to {@link ReferenceNode#reference}, an additional - * property references to the current node. - * - * @type {?ReferenceNode} - * @default null - */ - referenceNode: ReferenceNode | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isReferenceElementNode: boolean; - /** - * This method is overwritten since the node type is inferred from - * the uniform type of the reference node. - * - * @return {string} The node type. - */ - generateNodeType(): string; - generate(builder: any): any; -} -import ArrayElementNode from '../utils/ArrayElementNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/ReflectVector.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/ReflectVector.d.ts deleted file mode 100644 index 6cf15717c..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/ReflectVector.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * The reflect vector in view space. - * - * @tsl - * @type {Node} - */ -export const reflectView: Node; -/** - * The refract vector in view space. - * - * @tsl - * @type {Node} - */ -export const refractView: Node; -/** - * Used for sampling cube maps when using cube reflection mapping. - * - * @tsl - * @type {Node} - */ -export const reflectVector: Node; -/** - * Used for sampling cube maps when using cube refraction mapping. - * - * @tsl - * @type {Node} - */ -export const refractVector: Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/RendererReferenceNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/RendererReferenceNode.d.ts deleted file mode 100644 index 43bd3b071..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/RendererReferenceNode.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -export default RendererReferenceNode; -export function rendererReference(name: string, type: string, renderer?: Renderer | null): RendererReferenceNode; -/** - * This node is a special type of reference node which is intended - * for linking renderer properties with node values. - * ```js - * const exposureNode = rendererReference( 'toneMappingExposure', 'float', renderer ); - * ``` - * When changing `renderer.toneMappingExposure`, the node value of `exposureNode` will - * automatically be updated. - * - * @augments ReferenceBaseNode - */ -declare class RendererReferenceNode extends ReferenceBaseNode { - /** - * Constructs a new renderer reference node. - * - * @param {string} property - The name of the property the node refers to. - * @param {string} inputType - The uniform type that should be used to represent the property value. - * @param {?Renderer} [renderer=null] - The renderer the property belongs to. When no renderer is set, - * the node refers to the renderer of the current state. - */ - constructor(property: string, inputType: string, renderer?: Renderer | null); - /** - * The renderer the property belongs to. When no renderer is set, - * the node refers to the renderer of the current state. - * - * @type {?Renderer} - * @default null - */ - renderer: Renderer | null; -} -import ReferenceBaseNode from './ReferenceBaseNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/SceneProperties.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/SceneProperties.d.ts deleted file mode 100644 index 12f6b0aef..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/SceneProperties.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * TSL object that represents the scene's background blurriness. - * - * @tsl - * @type {Node} - */ -export const backgroundBlurriness: Node; -/** - * TSL object that represents the scene's background intensity. - * - * @tsl - * @type {Node} - */ -export const backgroundIntensity: Node; -/** - * TSL object that represents the scene's background rotation. - * - * @tsl - * @type {Node} - */ -export const backgroundRotation: Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/SkinningNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/SkinningNode.d.ts deleted file mode 100644 index d649f273b..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/SkinningNode.d.ts +++ /dev/null @@ -1,122 +0,0 @@ -export default SkinningNode; -export function skinning(skinnedMesh: SkinnedMesh): SkinningNode; -export function computeSkinning(skinnedMesh: SkinnedMesh, toPosition?: Node): SkinningNode; -/** - * This node implements the vertex transformation shader logic which is required - * for skinning/skeletal animation. - * - * @augments Node - */ -declare class SkinningNode extends Node { - /** - * Constructs a new skinning node. - * - * @param {SkinnedMesh} skinnedMesh - The skinned mesh. - */ - constructor(skinnedMesh: SkinnedMesh); - /** - * The skinned mesh. - * - * @type {SkinnedMesh} - */ - skinnedMesh: SkinnedMesh; - /** - * The skin index attribute. - * - * @type {AttributeNode} - */ - skinIndexNode: AttributeNode; - /** - * The skin weight attribute. - * - * @type {AttributeNode} - */ - skinWeightNode: AttributeNode; - /** - * The bind matrix node. - * - * @type {Node} - */ - bindMatrixNode: Node; - /** - * The bind matrix inverse node. - * - * @type {Node} - */ - bindMatrixInverseNode: Node; - /** - * The bind matrices as a uniform buffer node. - * - * @type {Node} - */ - boneMatricesNode: Node; - /** - * The current vertex position in local space. - * - * @type {Node} - */ - positionNode: Node; - /** - * The result of vertex position in local space. - * - * @type {Node} - */ - toPositionNode: Node; - /** - * The previous bind matrices as a uniform buffer node. - * Required for computing motion vectors. - * - * @type {?Node} - * @default null - */ - previousBoneMatricesNode: Node | null; - /** - * Transforms the given vertex position via skinning. - * - * @param {Node} [boneMatrices=this.boneMatricesNode] - The bone matrices - * @param {Node} [position=this.positionNode] - The vertex position in local space. - * @return {Node} The transformed vertex position. - */ - getSkinnedPosition(boneMatrices?: Node, position?: Node): Node; - /** - * Transforms the given vertex normal and tangent via skinning. - * - * @param {Node} [boneMatrices=this.boneMatricesNode] - The bone matrices - * @param {Node} [normal=normalLocal] - The vertex normal in local space. - * @param {Node} [tangent=tangentLocal] - The vertex tangent in local space. - * @return {{skinNormal: Node, skinTangent:Node}} The transformed vertex normal and tangent. - */ - getSkinnedNormalAndTangent(boneMatrices?: Node, normal?: Node, tangent?: Node): { - skinNormal: Node; - skinTangent: Node; - }; - /** - * Computes the transformed/skinned vertex position of the previous frame. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The skinned position from the previous frame. - */ - getPreviousSkinnedPosition(builder: NodeBuilder): Node; - /** - * Setups the skinning node by assigning the transformed vertex data to predefined node variables. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The transformed vertex position. - */ - setup(builder: NodeBuilder): Node; - /** - * Generates the code snippet of the skinning node. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} output - The current output. - * @return {string} The generated code snippet. - */ - generate(builder: NodeBuilder, output: string): string; - /** - * Updates the state of the skinned mesh by updating the skeleton once per frame. - * - * @param {NodeFrame} frame - The current node frame. - */ - update(frame: NodeFrame): void; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/StorageBufferNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/StorageBufferNode.d.ts deleted file mode 100644 index fea4f9cd4..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/StorageBufferNode.d.ts +++ /dev/null @@ -1,183 +0,0 @@ -export default StorageBufferNode; -export function storage(value: StorageBufferAttribute | StorageInstancedBufferAttribute | BufferAttribute, type?: (string | Struct) | null, count?: number): StorageBufferNode; -/** - * This node is used in context of compute shaders and allows to define a - * storage buffer for data. A typical workflow is to create instances of - * this node with the convenience functions `attributeArray()` or `instancedArray()`, - * setup up a compute shader that writes into the buffers and then convert - * the storage buffers to attribute nodes for rendering. - * - * ```js - * const positionBuffer = instancedArray( particleCount, 'vec3' ); // the storage buffer node - * - * const computeInit = Fn( () => { // the compute shader - * - * const position = positionBuffer.element( instanceIndex ); - * - * // compute position data - * - * position.x = 1; - * position.y = 1; - * position.z = 1; - * - * } )().compute( particleCount ); - * - * const particleMaterial = new THREE.SpriteNodeMaterial(); - * particleMaterial.positionNode = positionBuffer.toAttribute(); - * - * renderer.computeAsync( computeInit ); - * - * ``` - * - * @augments BufferNode - */ -declare class StorageBufferNode extends BufferNode { - /** - * Constructs a new storage buffer node. - * - * @param {StorageBufferAttribute|StorageInstancedBufferAttribute|BufferAttribute} value - The buffer data. - * @param {?(string|Struct)} [bufferType=null] - The buffer type (e.g. `'vec3'`). - * @param {number} [bufferCount=0] - The buffer count. - */ - constructor(value: StorageBufferAttribute | StorageInstancedBufferAttribute | BufferAttribute, bufferType?: (string | Struct) | null, bufferCount?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStorageBufferNode: boolean; - /** - * The buffer struct type. - * - * @type {?StructTypeNode} - * @default null - */ - structTypeNode: StructTypeNode | null; - /** - * The access type of the texture node. - * - * @type {string} - * @default 'readWrite' - */ - access: string; - /** - * Whether the node is atomic or not. - * - * @type {boolean} - * @default false - */ - isAtomic: boolean; - /** - * Whether the node represents a PBO or not. - * Only relevant for WebGL. - * - * @type {boolean} - * @default false - */ - isPBO: boolean; - /** - * A reference to the internal buffer attribute node. - * - * @private - * @type {?BufferAttributeNode} - * @default null - */ - private _attribute; - /** - * A reference to the internal varying node. - * - * @private - * @type {?VaryingNode} - * @default null - */ - private _varying; - /** - * This method is overwritten since the buffer data might be shared - * and thus the hash should be shared as well. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The hash. - */ - getHash(builder: NodeBuilder): string; - /** - * Enables element access with the given index node. - * - * @param {IndexNode} indexNode - The index node. - * @return {StorageArrayElementNode} A node representing the element access. - */ - element(indexNode: IndexNode): StorageArrayElementNode; - /** - * Defines whether this node is a PBO or not. Only relevant for WebGL. - * - * @param {boolean} value - The value so set. - * @return {StorageBufferNode} A reference to this node. - */ - setPBO(value: boolean): StorageBufferNode; - /** - * Returns the `isPBO` value. - * - * @return {boolean} Whether the node represents a PBO or not. - */ - getPBO(): boolean; - /** - * Defines the node access. - * - * @param {string} value - The node access. - * @return {StorageBufferNode} A reference to this node. - */ - setAccess(value: string): StorageBufferNode; - /** - * Convenience method for configuring a read-only node access. - * - * @return {StorageBufferNode} A reference to this node. - */ - toReadOnly(): StorageBufferNode; - /** - * Defines whether the node is atomic or not. - * - * @param {boolean} value - The atomic flag. - * @return {StorageBufferNode} A reference to this node. - */ - setAtomic(value: boolean): StorageBufferNode; - /** - * Convenience method for making this node atomic. - * - * @return {StorageBufferNode} A reference to this node. - */ - toAtomic(): StorageBufferNode; - /** - * Returns attribute data for this storage buffer node. - * - * @return {{attribute: BufferAttributeNode, varying: VaryingNode}} The attribute data. - */ - getAttributeData(): { - attribute: BufferAttributeNode; - varying: VaryingNode; - }; - /** - * This method is overwritten since the node type from the availability of storage buffers - * and the attribute data. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Returns the type of a member of the struct. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} name - The name of the member. - * @return {string} The type of the member. - */ - getMemberType(builder: NodeBuilder, name: string): string; - /** - * Generates the code snippet of the storage buffer node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The generated code snippet. - */ - generate(builder: NodeBuilder): string; -} -import BufferNode from './BufferNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/StorageTexture3DNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/StorageTexture3DNode.d.ts deleted file mode 100644 index 72f129b88..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/StorageTexture3DNode.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -export default StorageTexture3DNode; -/** - * TSL function for creating a 3D storage texture node. - * - * @tsl - * @function - * @param {Storage3DTexture} value - The 3D storage texture. - * @param {?Node} [uvNode=null] - The uv node. - * @param {?Node} [storeNode=null] - The value node that should be stored in the texture. - * @returns {StorageTexture3DNode} - */ -export const storageTexture3D: any; -/** - * This special version of a texture node can be used to - * write data into a 3D storage texture with a compute shader. - * - * @augments StorageTextureNode - */ -declare class StorageTexture3DNode extends StorageTextureNode { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStorageTexture3DNode: boolean; - /** - * Overwritten with an empty implementation since the `updateMatrix` flag is ignored - * for 3D textures. The uv transformation matrix is not applied to 3D textures. - * - * @param {boolean} value - The update toggle. - */ - setUpdateMatrix(): void; -} -import StorageTextureNode from './StorageTextureNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/StorageTextureNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/StorageTextureNode.d.ts deleted file mode 100644 index f1ac56640..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/StorageTextureNode.d.ts +++ /dev/null @@ -1,146 +0,0 @@ -export default StorageTextureNode; -/** - * TSL function for creating a storage texture node. - * - * @tsl - * @function - * @param {StorageTexture} value - The storage texture. - * @param {?Node} uvNode - The uv node. - * @param {?Node} [storeNode=null] - The value node that should be stored in the texture. - * @returns {StorageTextureNode} - */ -export const storageTexture: any; -export function textureStore(value: StorageTexture | StorageTextureNode, uvNode: Node, storeNode?: Node | null): StorageTextureNode; -/** - * This special version of a texture node can be used to - * write data into a storage texture with a compute shader. - * - * ```js - * const storageTexture = new THREE.StorageTexture( width, height ); - * - * const computeTexture = Fn( ( { storageTexture } ) => { - * - * const posX = instanceIndex.mod( width ); - * const posY = instanceIndex.div( width ); - * const indexUV = uvec2( posX, posY ); - * - * // generate RGB values - * - * const r = 1; - * const g = 1; - * const b = 1; - * - * textureStore( storageTexture, indexUV, vec4( r, g, b, 1 ) ).toWriteOnly(); - * - * } ); - * - * const computeNode = computeTexture( { storageTexture } ).compute( width * height ); - * renderer.computeAsync( computeNode ); - * ``` - * - * This node can only be used with a WebGPU backend. - * - * @augments TextureNode - */ -declare class StorageTextureNode extends TextureNode { - /** - * Constructs a new storage texture node. - * - * @param {StorageTexture} value - The storage texture. - * @param {Node} uvNode - The uv node. - * @param {?Node} [storeNode=null] - The value node that should be stored in the texture. - */ - constructor(value: StorageTexture, uvNode: Node, storeNode?: Node | null); - /** - * The value node that should be stored in the texture. - * - * @type {?Node} - * @default null - */ - storeNode: Node | null; - /** - * The mip level to write to for storage textures. - * - * @type {number} - * @default 0 - */ - mipLevel: number; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStorageTextureNode: boolean; - /** - * The access type of the texture node. - * - * @type {string} - * @default 'writeOnly' - */ - access: string; - setup(builder: any): any; - /** - * Defines the node access. - * - * @param {string} value - The node access. - * @return {StorageTextureNode} A reference to this node. - */ - setAccess(value: string): StorageTextureNode; - /** - * Sets the mip level to write to. - * - * @param {number} level - The mip level. - * @return {StorageTextureNode} A reference to this node. - */ - setMipLevel(level: number): StorageTextureNode; - /** - * Generates the snippet for the storage texture. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} textureProperty - The texture property. - * @param {string} uvSnippet - The uv snippet. - * @param {?string} levelSnippet - The level snippet. - * @param {?string} biasSnippet - The bias snippet. - * @param {?string} depthSnippet - The depth snippet. - * @param {?string} compareSnippet - The compare snippet. - * @param {?Array} gradSnippet - The grad snippet. - * @param {?string} offsetSnippet - The offset snippet. - * @return {string} The generated code snippet. - */ - generateSnippet(builder: NodeBuilder, textureProperty: string, uvSnippet: string, levelSnippet: string | null, biasSnippet: string | null, depthSnippet: string | null, compareSnippet: string | null, gradSnippet: Array | null, offsetSnippet: string | null): string; - /** - * Convenience method for configuring a read/write node access. - * - * @return {StorageTextureNode} A reference to this node. - */ - toReadWrite(): StorageTextureNode; - /** - * Convenience method for configuring a read-only node access. - * - * @return {StorageTextureNode} A reference to this node. - */ - toReadOnly(): StorageTextureNode; - /** - * Convenience method for configuring a write-only node access. - * - * @return {StorageTextureNode} A reference to this node. - */ - toWriteOnly(): StorageTextureNode; - /** - * Stores a value in this storage texture at the given coordinates. - * - * @param {Node} uvNode - The storage texture coordinates. - * @param {?Node} [storeNode=null] - The value node that should be stored in the texture. - * @return {StorageTextureNode} A storage texture node representing the store operation. - */ - store(uvNode: Node, storeNode?: Node | null): StorageTextureNode; - /** - * Generates the code snippet of the storage texture node. - * - * @param {NodeBuilder} builder - The current node builder. - */ - generateStore(builder: NodeBuilder): void; -} -import TextureNode from './TextureNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/Tangent.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/Tangent.d.ts deleted file mode 100644 index fa48ada28..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/Tangent.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * TSL object that represents the tangent attribute of the current rendered object. - * - * @tsl - * @type {Node} - */ -export const tangentGeometry: Node; -/** - * TSL object that represents the vertex tangent in local space of the current rendered object. - * - * @tsl - * @type {Node} - */ -export const tangentLocal: Node; -/** - * TSL object that represents the vertex tangent in view space of the current rendered object. - * - * @tsl - * @type {Node} - */ -export const tangentView: Node; -/** - * TSL object that represents the vertex tangent in world space of the current rendered object. - * - * @tsl - * @type {Node} - */ -export const tangentWorld: Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/TangentUtils.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/TangentUtils.d.ts deleted file mode 100644 index 5ae231172..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/TangentUtils.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Tangent vector in view space, computed dynamically from geometry and UV derivatives. - * Useful for normal mapping without precomputed tangents. - * - * Reference: http://www.thetenthplanet.de/archives/1180 - * - * @tsl - * @type {Node} - */ -export const tangentViewFrame: Node; -/** - * Bitangent vector in view space, computed dynamically from geometry and UV derivatives. - * Complements the tangentViewFrame for constructing the tangent space basis. - * - * Reference: http://www.thetenthplanet.de/archives/1180 - * - * @tsl - * @type {Node} - */ -export const bitangentViewFrame: Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/Texture3DNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/Texture3DNode.d.ts deleted file mode 100644 index 1b1066b8b..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/Texture3DNode.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -export default Texture3DNode; -/** - * TSL function for creating a 3D texture node. - * - * @tsl - * @function - * @param {Data3DTexture} value - The 3D texture. - * @param {?Node} [uvNode=null] - The uv node. - * @param {?Node} [levelNode=null] - The level node. - * @returns {Texture3DNode} - */ -export const texture3D: any; -export function texture3DLoad(...params: any[]): TextureNode; -export function texture3DLevel(value?: (Texture | TextureNode) | null, uvNode?: Node | null, levelNode?: Node | null): TextureNode; -/** - * This type of uniform node represents a 3D texture. - * - * @augments TextureNode - */ -declare class Texture3DNode extends TextureNode { - /** - * Constructs a new 3D texture node. - * - * @param {Data3DTexture} value - The 3D texture. - * @param {?Node} [uvNode=null] - The uv node. - * @param {?Node} [levelNode=null] - The level node. - */ - constructor(value: Data3DTexture, uvNode?: Node | null, levelNode?: Node | null); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isTexture3DNode: boolean; - /** - * Overwritten with an empty implementation since the `updateMatrix` flag is ignored - * for 3D textures. The uv transformation matrix is not applied to 3D textures. - * - * @param {boolean} value - The update toggle. - */ - setUpdateMatrix(): void; - /** - * Computes the normal for the given uv. These texture coordiantes represent a - * position inside the 3D texture. Unlike geometric normals, this normal - * represents a slope or gradient of scalar data inside the 3D texture. - * - * @param {Node} uvNode - The uv node that defines a position in the 3D texture. - * @return {Node} The normal representing the slope/gradient in the data. - */ - normal(uvNode: Node): Node; -} -import TextureNode from './TextureNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/TextureBicubic.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/TextureBicubic.d.ts deleted file mode 100644 index ff3a05aad..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/TextureBicubic.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Applies mipped bicubic texture filtering to the given texture node. - * - * @tsl - * @function - * @param {TextureNode} textureNode - The texture node that should be filtered. - * @param {Node} lodNode - Defines the LOD to sample from. - * @return {Node} The filtered texture sample. - */ -export const textureBicubicLevel: () => void; -/** - * Applies mipped bicubic texture filtering to the given texture node. - * - * @tsl - * @function - * @param {TextureNode} textureNode - The texture node that should be filtered. - * @param {Node} [strength] - Defines the strength of the bicubic filtering. - * @return {Node} The filtered texture sample. - */ -export const textureBicubic: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/TextureNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/TextureNode.d.ts deleted file mode 100644 index f82705bc7..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/TextureNode.d.ts +++ /dev/null @@ -1,354 +0,0 @@ -export default TextureNode; -export function texture(value?: (Texture | TextureNode) | null, uvNode?: Node | null, levelNode?: Node | null, biasNode?: Node | null): TextureNode; -export function uniformTexture(value?: Texture | null): TextureNode; -export function textureLoad(...params: any[]): TextureNode; -export function textureLevel(value: any, uv: any, level: any): TextureNode; -export function sampler(value: TextureNode | Texture): Node; -export function samplerComparison(value: TextureNode | Texture): Node; -/** - * This type of uniform node represents a 2D texture. - * - * @augments UniformNode - */ -declare class TextureNode extends UniformNode { - /** - * Constructs a new texture node. - * - * @param {Texture} [value=EmptyTexture] - The texture. - * @param {?Node} [uvNode=null] - The uv node. - * @param {?Node} [levelNode=null] - The level node. - * @param {?Node} [biasNode=null] - The bias node. - */ - constructor(value?: Texture, uvNode?: Node | null, levelNode?: Node | null, biasNode?: Node | null); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isTextureNode: boolean; - /** - * Represents the texture coordinates. - * - * @type {?Node} - * @default null - */ - uvNode: Node | null; - /** - * Represents the mip level that should be selected. - * - * @type {?Node} - * @default null - */ - levelNode: Node | null; - /** - * Represents the bias to be applied during level-of-detail computation. - * - * @type {?Node} - * @default null - */ - biasNode: Node | null; - /** - * Represents a reference value a texture sample is compared to. - * - * @type {?Node} - * @default null - */ - compareNode: Node | null; - /** - * When using texture arrays, the depth node defines the layer to select. - * - * @type {?Node} - * @default null - */ - depthNode: Node | null; - /** - * When defined, a texture is sampled using explicit gradients. - * - * @type {?Array>} - * @default null - */ - gradNode: Array> | null; - /** - * Represents the optional index constant of the channel to gather. - * This must be in range [0, 3] and a compile-time constant. - * - * @type {?Node} - * @default null - */ - gatherNode: Node | null; - /** - * Represents the optional texel offset applied to the unnormalized texture - * coordinate before sampling the texture. - * - * @type {?Node} - * @default null - */ - offsetNode: Node | null; - /** - * Whether texture values should be sampled or fetched. - * - * @type {boolean} - * @default true - */ - sampler: boolean; - /** - * Whether the uv transformation matrix should be - * automatically updated or not. Use `setUpdateMatrix()` - * if you want to change the value of the property. - * - * @type {boolean} - * @default false - */ - updateMatrix: boolean; - /** - * The reference node. - * - * @type {?Node} - * @default null - */ - referenceNode: Node | null; - /** - * The texture value is stored in a private property. - * - * @private - * @type {Texture} - */ - private _value; - /** - * The uniform node that represents the uv transformation matrix. - * - * @private - * @type {?UniformNode} - * @default null - */ - private _matrixUniform; - /** - * The uniform node that represents the y-flip. Only required for WebGL. - * - * @private - * @type {?UniformNode} - * @default null - */ - private _flipYUniform; - set value(value: Texture); - /** - * The texture value. - * - * @type {Texture} - */ - get value(): Texture; - /** - * Overwritten since the uniform hash is defined by the texture's UUID. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The uniform hash. - */ - getUniformHash(): string; - /** - * Overwritten since the node type is inferred from the texture type. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(): string; - /** - * Overwrites the default implementation to return a fixed value `'texture'`. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The input type. - */ - getInputType(): string; - /** - * Returns a default uvs based on the current texture's channel. - * - * @return {AttributeNode} The default uvs. - */ - getDefaultUV(): AttributeNode; - /** - * Overwritten to always return the texture reference of the node. - * - * @param {any} state - This method can be invocated in different contexts so `state` can refer to any object type. - * @return {Texture} The texture reference. - */ - updateReference(): Texture; - /** - * Transforms the given uv node with the texture transformation matrix. - * - * @param {Node} uvNode - The uv node to transform. - * @return {Node} The transformed uv node. - */ - getTransformedUV(uvNode: Node): Node; - /** - * Defines whether the uv transformation matrix should automatically be updated or not. - * - * @param {boolean} value - The update toggle. - * @return {TextureNode} A reference to this node. - */ - setUpdateMatrix(value: boolean): TextureNode; - /** - * Setups the uv node. Depending on the backend as well as texture's image and type, it might be necessary - * to modify the uv node for correct sampling. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {Node} uvNode - The uv node to setup. - * @return {Node} The updated uv node. - */ - setupUV(builder: NodeBuilder, uvNode: Node): Node; - /** - * Setups texture node by preparing the internal nodes for code generation. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setup(builder: NodeBuilder): void; - /** - * Generates the uv code snippet. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {Node} uvNode - The uv node to generate code for. - * @return {string} The generated code snippet. - */ - generateUV(builder: NodeBuilder, uvNode: Node): string; - /** - * Generates the offset code snippet. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {Node} offsetNode - The offset node to generate code for. - * @return {string} The generated code snippet. - */ - generateOffset(builder: NodeBuilder, offsetNode: Node): string; - /** - * Generates the snippet for the texture sampling. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} textureProperty - The texture property. - * @param {string} uvSnippet - The uv snippet. - * @param {?string} levelSnippet - The level snippet. - * @param {?string} biasSnippet - The bias snippet. - * @param {?string} depthSnippet - The depth snippet. - * @param {?string} compareSnippet - The compare snippet. - * @param {?Array} gradSnippet - The grad snippet. - * @param {?string} gatherSnippet - The gather snippet. - * @param {?string} offsetSnippet - The offset snippet. - * @param {?string} flipYSnippet - The y-flip snippet. Only used for WebGL. - * @return {string} The generated code snippet. - */ - generateSnippet(builder: NodeBuilder, textureProperty: string, uvSnippet: string, levelSnippet: string | null, biasSnippet: string | null, depthSnippet: string | null, compareSnippet: string | null, gradSnippet: Array | null, gatherSnippet: string | null, offsetSnippet: string | null, flipYSnippet: string | null): string; - /** - * Generates the code snippet of the texture node. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} output - The current output. - * @return {string} The generated code snippet. - */ - generate(builder: NodeBuilder, output: string): string; - /** - * Sets the sampler value. - * - * @param {boolean} value - The sampler value to set. - * @return {TextureNode} A reference to this texture node. - */ - setSampler(value: boolean): TextureNode; - /** - * Returns the sampler value. - * - * @return {boolean} The sampler value. - */ - getSampler(): boolean; - /** - * Samples the texture with the given uv node. - * - * @param {Node} uvNode - The uv node. - * @return {TextureNode} A texture node representing the texture sample. - */ - sample(uvNode: Node): TextureNode; - /** - * TSL function for creating a texture node that fetches/loads texels without interpolation. - * - * @param {Node} uvNode - The uv node. - * @returns {TextureNode} A texture node representing the texture load. - */ - load(uvNode: Node): TextureNode; - /** - * Samples a blurred version of the texture by defining an internal bias. - * - * @param {Node} amountNode - How blurred the texture should be. - * @return {TextureNode} A texture node representing the texture sample. - */ - blur(amountNode: Node): TextureNode; - /** - * Samples a specific mip of the texture. - * - * @param {Node} levelNode - The mip level to sample. - * @return {TextureNode} A texture node representing the texture sample. - */ - level(levelNode: Node): TextureNode; - /** - * Returns the texture size of the requested level. - * - * @param {Node} levelNode - The level to compute the size for. - * @return {TextureSizeNode} The texture size. - */ - size(levelNode: Node): TextureSizeNode; - /** - * Samples the texture with the given bias. - * - * @param {Node} biasNode - The bias node. - * @return {TextureNode} A texture node representing the texture sample. - */ - bias(biasNode: Node): TextureNode; - /** - * Returns the base texture of this node. - * @return {TextureNode} The base texture node. - */ - getBase(): TextureNode; - /** - * Samples the texture by executing a compare operation. - * - * @param {Node} compareNode - The node that defines the compare value. - * @return {TextureNode} A texture node representing the texture sample. - */ - compare(compareNode: Node): TextureNode; - /** - * Samples the texture using an explicit gradient. - * - * @param {Node} gradNodeX - The gradX node. - * @param {Node} gradNodeY - The gradY node. - * @return {TextureNode} A texture node representing the texture sample. - */ - grad(gradNodeX: Node, gradNodeY: Node): TextureNode; - /** - * Gathers four texels from the texture. - * - * @param {Node} gatherNode - The index of the channel to read. This must be in range [0, 3] and a compile-time constant. - * @return {TextureNode} A texture node representing the texture sample. - */ - gather(gatherNode?: Node): TextureNode; - /** - * Samples the texture by defining a depth node. - * - * @param {Node} depthNode - The depth node. - * @return {TextureNode} A texture node representing the texture sample. - */ - depth(depthNode: Node): TextureNode; - /** - * Samples the texture by defining an offset node. - * - * @param {Node} offsetNode - The offset node. - * @return {TextureNode} A texture node representing the texture sample. - */ - offset(offsetNode: Node): TextureNode; - /** - * The update is used to implement the update of the uv transformation matrix. - */ - update(): void; - /** - * Clones the texture node. - * - * @return {TextureNode} The cloned texture node. - */ - clone(): TextureNode; -} -import { Texture } from '../../textures/Texture.js'; -import UniformNode from '../core/UniformNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/TextureSizeNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/TextureSizeNode.d.ts deleted file mode 100644 index 994971036..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/TextureSizeNode.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -export default TextureSizeNode; -/** - * TSL function for creating a texture size node. - * - * @tsl - * @function - * @param {TextureNode} textureNode - A texture node which size should be retrieved. - * @param {?Node} [levelNode=null] - A level node which defines the requested mip. - * @returns {TextureSizeNode} - */ -export const textureSize: any; -/** - * A node that represents the dimensions of a texture. The texture size is - * retrieved in the shader via built-in shader functions like `textureDimensions()` - * or `textureSize()`. - * - * @augments Node - */ -declare class TextureSizeNode extends Node { - /** - * Constructs a new texture size node. - * - * @param {TextureNode} textureNode - A texture node which size should be retrieved. - * @param {?Node} [levelNode=null] - A level node which defines the requested mip. - */ - constructor(textureNode: TextureNode, levelNode?: Node | null); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isTextureSizeNode: boolean; - /** - * A texture node which size should be retrieved. - * - * @type {TextureNode} - */ - textureNode: TextureNode; - /** - * A level node which defines the requested mip. - * - * @type {Node} - * @default null - */ - levelNode: Node; - generate(builder: any, output: any): any; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/UV.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/UV.d.ts deleted file mode 100644 index 959b2be65..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/UV.d.ts +++ /dev/null @@ -1 +0,0 @@ -export function uv(index?: number): AttributeNode; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/UniformArrayNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/UniformArrayNode.d.ts deleted file mode 100644 index 290ab3d93..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/UniformArrayNode.d.ts +++ /dev/null @@ -1,125 +0,0 @@ -export default UniformArrayNode; -export function uniformArray(values: Array, nodeType?: string | null): UniformArrayNode; -/** - * Similar to {@link BufferNode} this module represents array-like data as - * uniform buffers. Unlike {@link BufferNode}, it can handle more common - * data types in the array (e.g `three.js` primitives) and automatically - * manage buffer padding. It should be the first choice when working with - * uniforms buffers. - * ```js - * const tintColors = uniformArray( [ - * new Color( 1, 0, 0 ), - * new Color( 0, 1, 0 ), - * new Color( 0, 0, 1 ) - * ], 'color' ); - * - * const redColor = tintColors.element( 0 ); - * - * @augments BufferNode - */ -declare class UniformArrayNode extends BufferNode { - /** - * Constructs a new uniform array node. - * - * @param {Array} value - Array holding the buffer data. - * @param {?string} [elementType=null] - The data type of a buffer element. - */ - constructor(value: Array, elementType?: string | null); - /** - * Array holding the buffer data. Unlike {@link BufferNode}, the array can - * hold number primitives as well as three.js objects like vectors, matrices - * or colors. - * - * @type {Array} - */ - array: Array; - /** - * The data type of an array element. - * - * @type {string} - */ - elementType: string; - /** - * The padded type. Uniform buffers must conform to a certain buffer layout - * so a separate type is computed to ensure correct buffer size. - * - * @type {string} - */ - paddedType: string; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isArrayBufferNode: boolean; - /** - * This method is overwritten since the node type is inferred from the - * {@link UniformArrayNode#paddedType}. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(): string; - /** - * The data type of the array elements. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The element type. - */ - getElementType(): string; - /** - * Returns the padded type based on the element type. - * - * @return {string} The padded type. - */ - getPaddedType(): string; - /** - * The update makes sure to correctly transfer the data from the (complex) objects - * in the array to the internal, correctly padded value buffer. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update(): void; - /** - * Implement the value buffer creation based on the array data. - * - * @param {NodeBuilder} builder - A reference to the current node builder. - * @return {null} - */ - setup(builder: NodeBuilder): null; - /** - * Overwrites the default `element()` method to provide element access - * based on {@link UniformArrayNode}. - * - * @param {IndexNode} indexNode - The index node. - * @return {UniformArrayElementNode} - */ - element(indexNode: IndexNode): UniformArrayElementNode; -} -import BufferNode from './BufferNode.js'; -/** - * Represents the element access on uniform array nodes. - * - * @augments ArrayElementNode - */ -declare class UniformArrayElementNode extends ArrayElementNode { - /** - * Constructs a new buffer node. - * - * @param {UniformArrayNode} uniformArrayNode - The uniform array node to access. - * @param {IndexNode} indexNode - The index data that define the position of the accessed element in the array. - */ - constructor(uniformArrayNode: UniformArrayNode, indexNode: IndexNode); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isArrayBufferElementNode: boolean; - generate(builder: any): any; -} -import ArrayElementNode from '../utils/ArrayElementNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/UserDataNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/UserDataNode.d.ts deleted file mode 100644 index e526f57c7..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/UserDataNode.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -export default UserDataNode; -export function userData(name: string, inputType: string, userData: Object | null): UserDataNode; -/** - * A special type of reference node that allows to link values in - * `userData` fields to node objects. - * ```js - * sprite.userData.rotation = 1; // stores individual rotation per sprite - * - * const material = new THREE.SpriteNodeMaterial(); - * material.rotationNode = userData( 'rotation', 'float' ); - * ``` - * Since `UserDataNode` is extended from {@link ReferenceNode}, the node value - * will automatically be updated when the `rotation` user data field changes. - * - * @augments ReferenceNode - */ -declare class UserDataNode extends ReferenceNode { - /** - * Constructs a new user data node. - * - * @param {string} property - The property name that should be referenced by the node. - * @param {string} inputType - The node data type of the reference. - * @param {?Object} [userData=null] - A reference to the `userData` object. If not provided, the `userData` property of the 3D object that uses the node material is evaluated. - */ - constructor(property: string, inputType: string, userData?: Object | null); - /** - * A reference to the `userData` object. If not provided, the `userData` - * property of the 3D object that uses the node material is evaluated. - * - * @type {?Object} - * @default null - */ - userData: Object | null; -} -import ReferenceNode from './ReferenceNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/VelocityNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/VelocityNode.d.ts deleted file mode 100644 index 476ee206d..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/VelocityNode.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -export default VelocityNode; -/** - * TSL object that represents the velocity of a render pass. - * - * @tsl - * @type {VelocityNode} - */ -export const velocity: VelocityNode; -/** - * A node for representing motion or velocity vectors. Foundation - * for advanced post processing effects like motion blur or TRAA. - * - * The node keeps track of the model, view and projection matrices - * of the previous frame and uses them to compute offsets in NDC space. - * These offsets represent the final velocity. - * - * @augments TempNode - */ -declare class VelocityNode extends TempNode { - /** - * Constructs a new vertex color node. - */ - constructor(); - /** - * The current projection matrix. - * - * @type {?Matrix4} - * @default null - */ - projectionMatrix: Matrix4 | null; - /** - * Uniform node representing the previous model matrix in world space. - * - * @type {UniformNode} - * @default null - */ - previousModelWorldMatrix: UniformNode; - /** - * Uniform node representing the previous projection matrix. - * - * @type {UniformNode} - * @default null - */ - previousProjectionMatrix: UniformNode; - /** - * Uniform node representing the previous view matrix. - * - * @type {UniformNode} - * @default null - */ - previousCameraViewMatrix: UniformNode; - /** - * Sets the given projection matrix. - * - * @param {Matrix4} projectionMatrix - The projection matrix to set. - */ - setProjectionMatrix(projectionMatrix: Matrix4): void; - /** - * Updates velocity specific uniforms. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update({ frameId, camera, object }: NodeFrame): void; - /** - * Overwritten to updated velocity specific uniforms. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - updateAfter({ object }: NodeFrame): void; - /** - * Implements the velocity computation based on the previous and current vertex data. - * - * @param {NodeBuilder} builder - A reference to the current node builder. - * @return {Node} The motion vector. - */ - setup(): Node; -} -import TempNode from '../core/TempNode.js'; -import { Matrix4 } from '../../math/Matrix4.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/accessors/VertexColorNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/accessors/VertexColorNode.d.ts deleted file mode 100644 index c55c763bd..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/accessors/VertexColorNode.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default VertexColorNode; -export function vertexColor(index?: number): VertexColorNode; -/** - * An attribute node for representing vertex colors. - * - * @augments AttributeNode - */ -declare class VertexColorNode extends AttributeNode { - /** - * Constructs a new vertex color node. - * - * @param {number} index - The attribute index. - */ - constructor(index: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isVertexColorNode: boolean; - /** - * The attribute index to enable more than one sets of vertex colors. - * - * @type {number} - * @default 0 - */ - index: number; -} -import AttributeNode from '../core/AttributeNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/code/CodeNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/code/CodeNode.d.ts deleted file mode 100644 index 13ca56a3d..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/code/CodeNode.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -export default CodeNode; -/** - * TSL function for creating a code node. - * - * @tsl - * @function - * @param {string} [code] - The native code. - * @param {?Array} [includes=[]] - An array of includes. - * @param {?('js'|'wgsl'|'glsl')} [language=''] - The used language. - * @returns {CodeNode} - */ -export const code: any; -export function js(src: string, includes: Array): CodeNode; -export function wgsl(src: string, includes: Array): CodeNode; -export function glsl(src: string, includes: Array): CodeNode; -/** - * This class represents native code sections. It is the base - * class for modules like {@link FunctionNode} which allows to implement - * functions with native shader languages. - * - * @augments Node - */ -declare class CodeNode extends Node { - /** - * Constructs a new code node. - * - * @param {string} [code=''] - The native code. - * @param {Array} [includes=[]] - An array of includes. - * @param {('js'|'wgsl'|'glsl')} [language=''] - The used language. - */ - constructor(code?: string, includes?: Array, language?: ("js" | "wgsl" | "glsl")); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isCodeNode: boolean; - /** - * The native code. - * - * @type {string} - * @default '' - */ - code: string; - /** - * An array of includes - * - * @type {Array} - * @default [] - */ - includes: Array; - /** - * The used language. - * - * @type {('js'|'wgsl'|'glsl')} - * @default '' - */ - language: ("js" | "wgsl" | "glsl"); - /** - * Sets the includes of this code node. - * - * @param {Array} includes - The includes to set. - * @return {CodeNode} A reference to this node. - */ - setIncludes(includes: Array): CodeNode; - /** - * Returns the includes of this code node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Array} The includes. - */ - getIncludes(): Array; - generate(builder: any): any; - serialize(data: any): void; - deserialize(data: any): void; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/code/ExpressionNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/code/ExpressionNode.d.ts deleted file mode 100644 index 47f1180ff..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/code/ExpressionNode.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -export default ExpressionNode; -/** - * TSL function for creating an expression node. - * - * @tsl - * @function - * @param {string} [snippet] - The native code snippet. - * @param {?string} [nodeType='void'] - The node type. - * @returns {ExpressionNode} - */ -export const expression: any; -/** - * This class can be used to implement basic expressions in shader code. - * Basic examples for that are `return`, `continue` or `discard` statements. - * - * @augments Node - */ -declare class ExpressionNode extends Node { - /** - * Constructs a new expression node. - * - * @param {string} [snippet=''] - The native code snippet. - * @param {string} [nodeType='void'] - The node type. - */ - constructor(snippet?: string, nodeType?: string); - /** - * The native code snippet. - * - * @type {string} - * @default '' - */ - snippet: string; - generate(builder: any, output: any): any; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/code/FunctionCallNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/code/FunctionCallNode.d.ts deleted file mode 100644 index 38783b5a5..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/code/FunctionCallNode.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -export default FunctionCallNode; -export function call(func: any, ...params: any[]): FunctionCallNode; -/** - * This module represents the call of a {@link FunctionNode}. Developers are usually not confronted - * with this module since they use the predefined TSL syntax `wgslFn` and `glslFn` which encapsulate - * this logic. - * - * @augments TempNode - */ -declare class FunctionCallNode extends TempNode { - /** - * Constructs a new function call node. - * - * @param {?FunctionNode} functionNode - The function node. - * @param {Object} [parameters={}] - The parameters for the function call. - */ - constructor(functionNode?: FunctionNode | null, parameters?: { - [x: string]: Node; - }); - /** - * The function node. - * - * @type {?FunctionNode} - * @default null - */ - functionNode: FunctionNode | null; - /** - * The parameters of the function call. - * - * @type {Object} - * @default {} - */ - parameters: { - [x: string]: Node; - }; - /** - * Sets the parameters of the function call node. - * - * @param {Object} parameters - The parameters to set. - * @return {FunctionCallNode} A reference to this node. - */ - setParameters(parameters: { - [x: string]: Node; - }): FunctionCallNode; - /** - * Returns the parameters of the function call node. - * - * @return {Object} The parameters of this node. - */ - getParameters(): { - [x: string]: Node; - }; - /** - * Returns the type of this function call node. - * - * @param {NodeBuilder} builder - The current node builder. - * @returns {string} The type of this node. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Returns the function node of this function call node. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} [name] - The name of the member. - * @returns {string} The type of the member. - */ - getMemberType(builder: NodeBuilder, name?: string): string; - generate(builder: any): string; -} -import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/code/FunctionNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/code/FunctionNode.d.ts deleted file mode 100644 index d17722e1f..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/code/FunctionNode.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -export default FunctionNode; -export function glslFn(code: any, includes: any): any; -export function wgslFn(code: any, includes: any): any; -/** - * This class represents a native shader function. It can be used to implement - * certain aspects of a node material with native shader code. There are two predefined - * TSL functions for easier usage. - * - * - `wgslFn`: Creates a WGSL function node. - * - `glslFn`: Creates a GLSL function node. - * - * A basic example with one include looks like so: - * - * ```js - * const desaturateWGSLFn = wgslFn( ` - * fn desaturate( color:vec3 ) -> vec3 { - * let lum = vec3( 0.299, 0.587, 0.114 ); - * return vec3( dot( lum, color ) ); - * }` - *); - * const someWGSLFn = wgslFn( ` - * fn someFn( color:vec3 ) -> vec3 { - * return desaturate( color ); - * } - * `, [ desaturateWGSLFn ] ); - * material.colorNode = someWGSLFn( { color: texture( map ) } ); - *``` - * @augments CodeNode - */ -declare class FunctionNode extends CodeNode { - /** - * Constructs a new function node. - * - * @param {string} [code=''] - The native code. - * @param {Array} [includes=[]] - An array of includes. - * @param {('js'|'wgsl'|'glsl')} [language=''] - The used language. - */ - constructor(code?: string, includes?: Array, language?: ("js" | "wgsl" | "glsl")); - /** - * Returns the type of this function node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The type. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Returns the type of a member of this function node. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} name - The name of the member. - * @return {string} The type of the member. - */ - getMemberType(builder: NodeBuilder, name: string): string; - /** - * Returns the inputs of this function node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Array} The inputs. - */ - getInputs(builder: NodeBuilder): Array; - /** - * Returns the node function for this function node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {NodeFunction} The node function. - */ - getNodeFunction(builder: NodeBuilder): NodeFunction; - generate(builder: any, output: any): any; -} -import CodeNode from './CodeNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/ArrayNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/ArrayNode.d.ts deleted file mode 100644 index 41339a0bd..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/ArrayNode.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -export default ArrayNode; -export function array(...params: any[]): ArrayNode; -/** - * ArrayNode represents a collection of nodes, typically created using the {@link array} function. - * ```js - * const colors = array( [ - * vec3( 1, 0, 0 ), - * vec3( 0, 1, 0 ), - * vec3( 0, 0, 1 ) - * ] ); - * - * const redColor = tintColors.element( 0 ); - * ``` - * - * @augments TempNode - */ -declare class ArrayNode extends TempNode { - /** - * Constructs a new array node. - * - * @param {?string} nodeType - The data type of the elements. - * @param {number} count - Size of the array. - * @param {?Array} [values=null] - Array default values. - */ - constructor(nodeType: string | null, count: number, values?: Array | null); - /** - * Array size. - * - * @type {number} - */ - count: number; - /** - * Array default values. - * - * @type {?Array} - */ - values: Array | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isArrayNode: boolean; - /** - * Returns the number of elements in the node array. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {number} The number of elements in the node array. - */ - getArrayCount(): number; - /** - * Returns the node's type. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The type of the node. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Returns the type of a member variable. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} name - The name of the member variable. - * @return {string} The type of the member variable. - */ - getMemberType(builder: NodeBuilder, name: string): string; - /** - * This method builds the output node and returns the resulting array as a shader string. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The generated shader string. - */ - generate(builder: NodeBuilder): string; -} -import TempNode from './TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/AssignNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/AssignNode.d.ts deleted file mode 100644 index 3f1ab4808..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/AssignNode.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -export default AssignNode; -/** - * TSL function for creating an assign node. - * - * @tsl - * @function - * @param {Node} targetNode - The target node. - * @param {Node} sourceNode - The source type. - * @returns {AssignNode} - */ -export const assign: any; -/** - * These node represents an assign operation. Meaning a node is assigned - * to another node. - * - * @augments TempNode - */ -declare class AssignNode extends TempNode { - /** - * Constructs a new assign node. - * - * @param {Node} targetNode - The target node. - * @param {Node} sourceNode - The source type. - */ - constructor(targetNode: Node, sourceNode: Node); - /** - * The target node. - * - * @type {Node} - */ - targetNode: Node; - /** - * The source node. - * - * @type {Node} - */ - sourceNode: Node; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isAssignNode: boolean; - /** - * Whether this node is used more than once in context of other nodes. This method - * is overwritten since it always returns `false` (assigns are unique). - * - * @return {boolean} A flag that indicates if there is more than one dependency to other nodes. Always `false`. - */ - hasDependencies(): boolean; - generateNodeType(builder: any, output: any): any; - /** - * Whether a split is required when assigning source to target. This can happen when the component length of - * target and source data type does not match. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {boolean} Whether a split is required when assigning source to target. - */ - needsSplitAssign(builder: NodeBuilder): boolean; - setup(builder: any): void; - generate(builder: any, output: any): any; -} -import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/AttributeNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/AttributeNode.d.ts deleted file mode 100644 index 0f8b0bf15..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/AttributeNode.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -export default AttributeNode; -export function attribute(name: string, nodeType?: string | null): AttributeNode; -/** - * Base class for representing shader attributes as nodes. - * - * @augments Node - */ -declare class AttributeNode extends Node { - /** - * Constructs a new attribute node. - * - * @param {string} attributeName - The name of the attribute. - * @param {?string} nodeType - The node type. - */ - constructor(attributeName: string, nodeType?: string | null); - _attributeName: string; - getHash(builder: any): string; - generateNodeType(builder: any): string | null; - /** - * Sets the attribute name to the given value. The method can be - * overwritten in derived classes if the final name must be computed - * analytically. - * - * @param {string} attributeName - The name of the attribute. - * @return {AttributeNode} A reference to this node. - */ - setAttributeName(attributeName: string): AttributeNode; - /** - * Returns the attribute name of this node. The method can be - * overwritten in derived classes if the final name must be computed - * analytically. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The attribute name. - */ - getAttributeName(): string; - generate(builder: any): any; - serialize(data: any): void; - deserialize(data: any): void; -} -import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/BypassNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/BypassNode.d.ts deleted file mode 100644 index db68f52f5..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/BypassNode.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -export default BypassNode; -/** - * TSL function for creating a bypass node. - * - * @tsl - * @function - * @param {Node} outputNode - The output node. - * @param {Node} callNode - The call node. - * @returns {BypassNode} - */ -export const bypass: any; -/** - * The class generates the code of a given node but returns another node in the output. - * This can be used to call a method or node that does not return a value, i.e. - * type `void` on an input where returning a value is required. Example: - * - * ```js - * material.colorNode = myColor.bypass( runVoidFn() ) - *``` - * - * @augments Node - */ -declare class BypassNode extends Node { - /** - * Constructs a new bypass node. - * - * @param {Node} outputNode - The output node. - * @param {Node} callNode - The call node. - */ - constructor(outputNode: Node, callNode: Node); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBypassNode: boolean; - /** - * The output node. - * - * @type {Node} - */ - outputNode: Node; - /** - * The call node. - * - * @type {Node} - */ - callNode: Node; - generateNodeType(builder: any): string; - generate(builder: any): string | Node | null; -} -import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/ConstNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/ConstNode.d.ts deleted file mode 100644 index f26ae9eb3..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/ConstNode.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default ConstNode; -/** - * Class for representing a constant value in the shader. - * - * @augments InputNode - */ -declare class ConstNode extends InputNode { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isConstNode: boolean; - /** - * Generates the shader string of the value with the current node builder. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The generated value as a shader string. - */ - generateConst(builder: NodeBuilder): string; - generate(builder: any, output: any): any; -} -import InputNode from './InputNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/ContextNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/ContextNode.d.ts deleted file mode 100644 index 40becdbad..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/ContextNode.d.ts +++ /dev/null @@ -1,107 +0,0 @@ -/** - * TSL function for defining a built-in shadow context for a given node. - * - * @tsl - * @function - * @param {ShadowNode} shadowNode - The shadow node representing the light's shadow. - * @param {Light} light - The light associated with the shadow. - * @param {Node} [node=null] - The node whose context should be modified. - * @returns {ContextNode} - */ -export function builtinShadowContext(shadowNode: ShadowNode, light: Light, node?: Node): ContextNode; -/** - * TSL function for defining a built-in ambient occlusion context for a given node. - * - * @tsl - * @function - * @param {Node} aoNode - The ambient occlusion value node to apply. - * @param {Node} [node=null] - The node whose context should be modified. - * @returns {ContextNode} - */ -export function builtinAOContext(aoNode: Node, node?: Node): ContextNode; -/** - * TSL function for defining a label context value for a given node. - * - * @tsl - * @function - * @deprecated - * @param {Node} node - The node whose context should be modified. - * @param {string} name - The name/label to set. - * @returns {ContextNode} - */ -export function label(node: Node, name: string): ContextNode; -export default ContextNode; -export function context(nodeOrValue?: Node | Object, value?: Object): ContextNode; -export function uniformFlow(node: Node): ContextNode; -export function setName(node: Node, name: string): ContextNode; -import Node from './Node.js'; -/** - * This node can be used as a context management component for another node. - * {@link NodeBuilder} performs its node building process in a specific context and - * this node allows the modify the context. A typical use case is to overwrite `getUV()` e.g.: - * - * ```js - *node.context( { getUV: () => customCoord } ); - *\// or - *material.contextNode = context( { getUV: () => customCoord } ); - *\// or - *renderer.contextNode = context( { getUV: () => customCoord } ); - *\// or - *scenePass.contextNode = context( { getUV: () => customCoord } ); - *``` - * @augments Node - */ -declare class ContextNode extends Node { - /** - * Constructs a new context node. - * - * @param {Node} node - The node whose context should be modified. - * @param {Object} [value={}] - The modified context data. - */ - constructor(node?: Node, value?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isContextNode: boolean; - /** - * The node whose context should be modified. - * - * @type {Node} - */ - node: Node; - /** - * The modified context data. - * - * @type {Object} - * @default {} - */ - value: Object; - /** - * This method is overwritten to ensure it returns the type of {@link ContextNode#node}. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Gathers the context data from all parent context nodes. - * - * @return {Object} The gathered context data. - */ - getFlowContextData(): Object; - /** - * This method is overwritten to ensure it returns the member type of {@link ContextNode#node}. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} name - The member name. - * @returns {string} The member type. - */ - getMemberType(builder: NodeBuilder, name: string): string; - analyze(builder: any): void; - setup(builder: any): void; - generate(builder: any, output: any): string | Node | null; -} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/IndexNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/IndexNode.d.ts deleted file mode 100644 index 6117487c5..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/IndexNode.d.ts +++ /dev/null @@ -1,88 +0,0 @@ -export default IndexNode; -/** - * TSL object that represents the index of a vertex within a mesh. - * - * @tsl - * @type {IndexNode} - */ -export const vertexIndex: IndexNode; -/** - * TSL object that represents the index of either a mesh instance or an invocation of a compute shader. - * - * @tsl - * @type {IndexNode} - */ -export const instanceIndex: IndexNode; -/** - * TSL object that represents the index of the subgroup the current compute invocation belongs to. - * - * @tsl - * @type {IndexNode} - */ -export const subgroupIndex: IndexNode; -/** - * TSL object that represents the index of a compute invocation within the scope of a subgroup. - * - * @tsl - * @type {IndexNode} - */ -export const invocationSubgroupIndex: IndexNode; -/** - * TSL object that represents the index of a compute invocation within the scope of a workgroup load. - * - * @tsl - * @type {IndexNode} - */ -export const invocationLocalIndex: IndexNode; -/** - * TSL object that represents the index of a draw call. - * - * @tsl - * @type {IndexNode} - */ -export const drawIndex: IndexNode; -/** - * This class represents shader indices of different types. The following predefined node - * objects cover frequent use cases: - * - * - `vertexIndex`: The index of a vertex within a mesh. - * - `instanceIndex`: The index of either a mesh instance or an invocation of a compute shader. - * - `drawIndex`: The index of a draw call. - * - `invocationLocalIndex`: The index of a compute invocation within the scope of a workgroup load. - * - `invocationSubgroupIndex`: The index of a compute invocation within the scope of a subgroup. - * - `subgroupIndex`: The index of a compute invocation's subgroup within its workgroup. - * - * @augments Node - */ -declare class IndexNode extends Node { - /** - * Constructs a new index node. - * - * @param {('vertex'|'instance'|'subgroup'|'invocationLocal'|'invocationGlobal'|'invocationSubgroup'|'draw')} scope - The scope of the index node. - */ - constructor(scope: ("vertex" | "instance" | "subgroup" | "invocationLocal" | "invocationGlobal" | "invocationSubgroup" | "draw")); - /** - * The scope of the index node. - * - * @type {string} - */ - scope: string; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isIndexNode: boolean; - generate(builder: any): any; -} -declare namespace IndexNode { - let VERTEX: string; - let INSTANCE: string; - let SUBGROUP: string; - let INVOCATION_LOCAL: string; - let INVOCATION_SUBGROUP: string; - let DRAW: string; -} -import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/InputNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/InputNode.d.ts deleted file mode 100644 index fc285a964..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/InputNode.d.ts +++ /dev/null @@ -1,61 +0,0 @@ -export default InputNode; -/** - * Base class for representing data input nodes. - * - * @augments Node - */ -declare class InputNode extends Node { - /** - * Constructs a new input node. - * - * @param {any} value - The value of this node. This can be any JS primitive, functions, array buffers or even three.js objects (vector, matrices, colors). - * @param {?string} nodeType - The node type. If no explicit type is defined, the node tries to derive the type from its value. - */ - constructor(value: any, nodeType?: string | null); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isInputNode: boolean; - /** - * The value of this node. This can be any JS primitive, functions, array buffers or even three.js objects (vector, matrices, colors). - * - * @type {any} - */ - value: any; - /** - * The precision of the value in the shader. - * - * @type {?('low'|'medium'|'high')} - * @default null - */ - precision: ("low" | "medium" | "high") | null; - generateNodeType(): string | null; - /** - * Returns the input type of the node which is by default the node type. Derived modules - * might overwrite this method and use a fixed type or compute one analytically. - * - * A typical example for different input and node types are textures. The input type of a - * normal RGBA texture is `texture` whereas its node type is `vec4`. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The input type. - */ - getInputType(builder: NodeBuilder): string; - /** - * Sets the precision to the given value. The method can be - * overwritten in derived classes if the final precision must be computed - * analytically. - * - * @param {('low'|'medium'|'high')} precision - The precision of the input value in the shader. - * @return {InputNode} A reference to this node. - */ - setPrecision(precision: ("low" | "medium" | "high")): InputNode; - serialize(data: any): void; - deserialize(data: any): void; - generate(): void; -} -import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/InspectorNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/InspectorNode.d.ts deleted file mode 100644 index 7fd327733..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/InspectorNode.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Creates an inspector node to wrap around a given node for inspection purposes. - * - * @tsl - * @param {Node} node - The node to inspect. - * @param {string} [name=''] - Optional name for the inspector node. - * @param {Function|null} [callback=null] - Optional callback to modify the node during setup. - * @returns {Node} The inspector node. - */ -export function inspector(node: Node, name?: string, callback?: Function | null): Node; -export default InspectorNode; -import Node from './Node.js'; -/** - * InspectorNode is a wrapper node that allows inspection of node values during rendering. - * It can be used to debug or analyze node outputs in the rendering pipeline. - * - * @augments Node - */ -declare class InspectorNode extends Node { - /** - * Creates an InspectorNode. - * - * @param {Node} node - The node to inspect. - * @param {string} [name=''] - Optional name for the inspector node. - * @param {Function|null} [callback=null] - Optional callback to modify the node during setup. - */ - constructor(node: Node, name?: string, callback?: Function | null); - node: Node; - callback: Function | null; - isInspectorNode: boolean; - /** - * Returns the name of the inspector node. - * - * @returns {string} - */ - getName(): string; - /** - * Updates the inspector node, allowing inspection of the wrapped node. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update(frame: NodeFrame): void; - /** - * Returns the type of the wrapped node. - * - * @param {NodeBuilder} builder - The node builder. - * @returns {string} - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Sets up the inspector node. - * - * @param {NodeBuilder} builder - The node builder. - * @returns {Node} The setup node. - */ - setup(builder: NodeBuilder): Node; -} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/IsolateNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/IsolateNode.d.ts deleted file mode 100644 index 23e65acba..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/IsolateNode.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * TSL function for creating a cache node. - * - * @tsl - * @function - * @deprecated - * @param {Node} node - The node that should be cached. - * @param {boolean} [parent=true] - Whether this node refers to a shared parent cache or not. - * @returns {IsolateNode} - */ -export function cache(node: Node, parent?: boolean): IsolateNode; -export default IsolateNode; -export function isolate(node: Node): IsolateNode; -import Node from './Node.js'; -/** - * This node can be used as a cache management component for another node. - * Caching is in general used by default in {@link NodeBuilder} but this node - * allows the usage of a shared parent cache during the build process. - * - * @augments Node - */ -declare class IsolateNode extends Node { - /** - * Constructs a new cache node. - * - * @param {Node} node - The node that should be cached. - * @param {boolean} [parent=true] - Whether this node refers to a shared parent cache or not. - */ - constructor(node: Node, parent?: boolean); - /** - * The node that should be cached. - * - * @type {Node} - */ - node: Node; - /** - * Whether this node refers to a shared parent cache or not. - * - * @type {boolean} - * @default true - */ - parent: boolean; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isIsolateNode: boolean; - generateNodeType(builder: any): string; - build(builder: any, ...params: any[]): string | Node | null; - setParent(parent: any): this; - getParent(): boolean; -} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/LightingModel.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/LightingModel.d.ts deleted file mode 100644 index e281d8a3c..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/LightingModel.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -export default LightingModel; -/** - * Abstract class for implementing lighting models. The module defines - * multiple methods that concrete lighting models can implement. These - * methods are executed at different points during the light evaluation - * process. - */ -declare class LightingModel { - /** - * This method is intended for setting up lighting model and context data - * which are later used in the evaluation process. - * - * @abstract - * @param {NodeBuilder} builder - The current node builder. - */ - start(builder: NodeBuilder): void; - /** - * This method is intended for executing final tasks like final updates - * to the outgoing light. - * - * @abstract - * @param {NodeBuilder} builder - The current node builder. - */ - finish(): void; - /** - * This method is intended for implementing the direct light term and - * executed during the build process of directional, point and spot light nodes. - * - * @abstract - * @param {Object} lightData - The light data. - * @param {NodeBuilder} builder - The current node builder. - */ - direct(): void; - /** - * This method is intended for implementing the direct light term for - * rect area light nodes. - * - * @abstract - * @param {Object} lightData - The light data. - * @param {NodeBuilder} builder - The current node builder. - */ - directRectArea(): void; - /** - * This method is intended for implementing the indirect light term. - * - * @abstract - * @param {NodeBuilder} builder - The current node builder. - */ - indirect(): void; - /** - * This method is intended for implementing the ambient occlusion term. - * Unlike other methods, this method must be called manually by the lighting - * model in its indirect term. - * - * @abstract - * @param {NodeBuilder} builder - The current node builder. - */ - ambientOcclusion(): void; -} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/MRTNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/MRTNode.d.ts deleted file mode 100644 index 8d1b4d0be..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/MRTNode.d.ts +++ /dev/null @@ -1,106 +0,0 @@ -/** - * Returns the MRT texture index for the given name. - * - * @param {Array} textures - The textures of a MRT-configured render target. - * @param {string} name - The name of the MRT texture which index is requested. - * @return {number} The texture index. - */ -export function getTextureIndex(textures: Array, name: string): number; -export default MRTNode; -/** - * TSL function for creating a MRT node. - * - * @tsl - * @function - * @param {Object} outputNodes - The MRT outputs. - * @returns {MRTNode} - */ -export const mrt: any; -/** - * This node can be used setup a MRT context for rendering. A typical MRT setup for - * post-processing is shown below: - * ```js - * const mrtNode = mrt( { - * output: output, - * normal: normalView - * } ) ; - * ``` - * The MRT output is defined as a dictionary. - * - * @augments OutputStructNode - */ -declare class MRTNode extends OutputStructNode { - /** - * Constructs a new output struct node. - * - * @param {Object} outputNodes - The MRT outputs. - */ - constructor(outputNodes: { - [x: string]: Node; - }); - /** - * A dictionary representing the MRT outputs. The key - * is the name of the output, the value the node which produces - * the output result. - * - * @type {Object} - */ - outputNodes: { - [x: string]: Node; - }; - /** - * A dictionary storing the blend modes for each output. - * - * @type {Object} - */ - blendModes: { - [x: string]: BlendMode; - }; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMRTNode: boolean; - /** - * Sets the blend mode for the given output name. - * - * @param {string} name - The name of the output. - * @param {BlendMode} blend - The blending mode. - * @return {MRTNode} The current MRT node. - */ - setBlendMode(name: string, blend: BlendMode): MRTNode; - /** - * Returns the blend mode for the given output name. - * - * @param {string} name - The name of the output. - * @return {BlendMode} The blend mode. - */ - getBlendMode(name: string): BlendMode; - /** - * Returns `true` if the MRT node has an output with the given name. - * - * @param {string} name - The name of the output. - * @return {NodeBuilder} Whether the MRT node has an output for the given name or not. - */ - has(name: string): NodeBuilder; - /** - * Returns the output node for the given name. - * - * @param {string} name - The name of the output. - * @return {Node} The output node. - */ - get(name: string): Node; - /** - * Merges the outputs of the given MRT node with the outputs of this node. - * - * @param {MRTNode} mrtNode - The MRT to merge. - * @return {MRTNode} A new MRT node with merged outputs.. - */ - merge(mrtNode: MRTNode): MRTNode; - setup(builder: any): import("./Node.js").default | null; -} -import OutputStructNode from './OutputStructNode.js'; -import BlendMode from '../../renderers/common/BlendMode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/Node.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/Node.d.ts deleted file mode 100644 index 8299d6c54..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/Node.d.ts +++ /dev/null @@ -1,437 +0,0 @@ -export default Node; -/** - * Base class for all nodes. - * - * @augments EventDispatcher - */ -declare class Node extends EventDispatcher { - static get type(): string; - /** - * Constructs a new node. - * - * @param {?string} nodeType - The node type. - */ - constructor(nodeType?: string | null); - /** - * The node type. This represents the result type of the node (e.g. `float` or `vec3`). - * - * @type {?string} - * @default null - */ - nodeType: string | null; - /** - * The update type of the node's {@link Node#update} method. Possible values are listed in {@link NodeUpdateType}. - * - * @type {string} - * @default 'none' - */ - updateType: string; - /** - * The update type of the node's {@link Node#updateBefore} method. Possible values are listed in {@link NodeUpdateType}. - * - * @type {string} - * @default 'none' - */ - updateBeforeType: string; - /** - * The update type of the node's {@link Node#updateAfter} method. Possible values are listed in {@link NodeUpdateType}. - * - * @type {string} - * @default 'none' - */ - updateAfterType: string; - /** - * The version of the node. The version automatically is increased when {@link Node#needsUpdate} is set to `true`. - * - * @type {number} - * @readonly - * @default 0 - */ - readonly version: number; - /** - * The name of the node. - * - * @type {string} - * @default '' - */ - name: string; - /** - * Whether this node is global or not. This property is relevant for the internal - * node caching system. All nodes which should be declared just once should - * set this flag to `true` (a typical example is {@link AttributeNode}). - * - * @type {boolean} - * @default false - */ - global: boolean; - /** - * Create a list of parents for this node during the build process. - * - * @type {boolean} - * @default false - */ - parents: boolean; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isNode: boolean; - _beforeNodes: any; - /** - * The cache key of this node. - * - * @private - * @type {?number} - * @default null - */ - private _cacheKey; - /** - * The UUID of the node. - * - * @type {string} - * @default null - * @private - */ - private _uuid; - /** - * The cache key's version. - * - * @private - * @type {number} - * @default 0 - */ - private _cacheKeyVersion; - /** - * The unique ID of the node. - * - * @type {number} - * @readonly - */ - readonly id: number; - /** - * The stack trace of the node for debugging purposes. - * - * @type {?string} - * @default null - */ - stackTrace: string | null; - /** - * Set this property to `true` when the node should be regenerated. - * - * @type {boolean} - * @default false - * @param {boolean} value - */ - set needsUpdate(value: boolean); - /** - * The UUID of the node. - * - * @type {string} - * @readonly - */ - readonly get uuid(): string; - /** - * The type of the class. The value is usually the constructor name. - * - * @type {string} - * @readonly - */ - readonly get type(): string; - /** - * Convenient method for defining {@link Node#update}. - * - * @param {Function} callback - The update method. - * @param {string} updateType - The update type. - * @return {Node} A reference to this node. - */ - onUpdate(callback: Function, updateType: string): Node; - /** - * The method can be implemented to update the node's internal state when it is used to render an object. - * The {@link Node#updateType} property defines how often the update is executed. - * - * @abstract - * @param {NodeFrame} frame - A reference to the current node frame. - * @return {?boolean} An optional bool that indicates whether the implementation actually performed an update or not (e.g. due to caching). - */ - update(): boolean | null; - /** - * Convenient method for defining {@link Node#update}. Similar to {@link Node#onUpdate}, but - * this method automatically sets the update type to `FRAME`. - * - * @param {Function} callback - The update method. - * @return {Node} A reference to this node. - */ - onFrameUpdate(callback: Function): Node; - /** - * Convenient method for defining {@link Node#update}. Similar to {@link Node#onUpdate}, but - * this method automatically sets the update type to `RENDER`. - * - * @param {Function} callback - The update method. - * @return {Node} A reference to this node. - */ - onRenderUpdate(callback: Function): Node; - /** - * Convenient method for defining {@link Node#update}. Similar to {@link Node#onUpdate}, but - * this method automatically sets the update type to `OBJECT`. - * - * @param {Function} callback - The update method. - * @return {Node} A reference to this node. - */ - onObjectUpdate(callback: Function): Node; - /** - * Convenient method for defining {@link Node#updateReference}. - * - * @param {Function} callback - The update method. - * @return {Node} A reference to this node. - */ - onReference(callback: Function): Node; - /** - * Nodes might refer to other objects like materials. This method allows to dynamically update the reference - * to such objects based on a given state (e.g. the current node frame or builder). - * - * @param {any} state - This method can be invocated in different contexts so `state` can refer to any object type. - * @return {any} The updated reference. - */ - updateReference(): any; - /** - * By default this method returns the value of the {@link Node#global} flag. This method - * can be overwritten in derived classes if an analytical way is required to determine the - * global cache referring to the current shader-stage. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {boolean} Whether this node is global or not. - */ - isGlobal(): boolean; - /** - * Generator function that can be used to iterate over the child nodes. - * - * @generator - * @yields {Node} A child node. - */ - getChildren(): Generator; - /** - * Calling this method dispatches the `dispose` event. This event can be used - * to register event listeners for clean up tasks. - */ - dispose(): void; - /** - * Callback for {@link Node#traverse}. - * - * @callback traverseCallback - * @param {Node} node - The current node. - */ - /** - * Can be used to traverse through the node's hierarchy. - * - * @param {traverseCallback} callback - A callback that is executed per node. - */ - traverse(callback: (node: Node) => any): void; - /** - * Returns the child nodes of this node. - * - * @private - * @param {Set} [ignores=new Set()] - A set of nodes to ignore during the search to avoid circular references. - * @returns {Array} An array of objects describing the child nodes. - */ - private _getChildren; - /** - * Returns the cache key for this node. - * - * @param {boolean} [force=false] - When set to `true`, a recomputation of the cache key is forced. - * @param {Set} [ignores=null] - A set of nodes to ignore during the computation of the cache key. - * @return {number} The cache key of the node. - */ - getCacheKey(force?: boolean, ignores?: Set): number; - /** - * Generate a custom cache key for this node. - * - * @return {number} The cache key of the node. - */ - customCacheKey(): number; - /** - * Returns the references to this node which is by default `this`. - * - * @return {Node} A reference to this node. - */ - getScope(): Node; - /** - * Returns the hash of the node which is used to identify the node. By default it's - * the {@link Node#uuid} however derived node classes might have to overwrite this method - * depending on their implementation. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The hash. - */ - getHash(): string; - /** - * Returns the update type of {@link Node#update}. - * - * @return {NodeUpdateType} The update type. - */ - getUpdateType(): { - NONE: string; - FRAME: string; - RENDER: string; - OBJECT: string; - }; - /** - * Returns the update type of {@link Node#updateBefore}. - * - * @return {NodeUpdateType} The update type. - */ - getUpdateBeforeType(): { - NONE: string; - FRAME: string; - RENDER: string; - OBJECT: string; - }; - /** - * Returns the update type of {@link Node#updateAfter}. - * - * @return {NodeUpdateType} The update type. - */ - getUpdateAfterType(): { - NONE: string; - FRAME: string; - RENDER: string; - OBJECT: string; - }; - /** - * Certain types are composed of multiple elements. For example a `vec3` - * is composed of three `float` values. This method returns the type of - * these elements. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The type of the node. - */ - getElementType(builder: NodeBuilder): string; - /** - * Returns the node member type for the given name. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} name - The name of the member. - * @return {string} The type of the node. - */ - getMemberType(): string; - /** - * Returns the node's type. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} [output=null] - The output of the node. - * @return {string} The type of the node. - */ - getNodeType(builder: NodeBuilder, output?: string): string; - /** - * Returns the node's type. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} [output=null] - The output of the node. - * @return {string} The type of the node. - */ - generateNodeType(builder: NodeBuilder, output?: string): string; - /** - * This method is used during the build process of a node and ensures - * equal nodes are not built multiple times but just once. For example if - * `attribute( 'uv' )` is used multiple times by the user, the build - * process makes sure to process just the first node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The shared node if possible. Otherwise `this` is returned. - */ - getShared(builder: NodeBuilder): Node; - /** - * Returns the number of elements in the node array. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {?number} The number of elements in the node array. - */ - getArrayCount(): number | null; - /** - * Represents the setup stage which is the first step of the build process, see {@link Node#build} method. - * This method is often overwritten in derived modules to prepare the node which is used as a node's output/result. - * If an output node is prepared, then it must be returned in the `return` statement of the derived module's setup function. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {?Node} The output node. - */ - setup(builder: NodeBuilder): Node | null; - /** - * Represents the analyze stage which is the second step of the build process, see {@link Node#build} method. - * This stage analyzes the node hierarchy and ensures descendent nodes are built. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {?Node} output - The target output node. - */ - analyze(builder: NodeBuilder, output?: Node | null): void; - /** - * Represents the generate stage which is the third step of the build process, see {@link Node#build} method. - * This state builds the output node and returns the resulting shader string. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {?string} [output] - Can be used to define the output type. - * @return {?string} The generated shader string. - */ - generate(builder: NodeBuilder, output?: string | null): string | null; - /** - * The method can be implemented to update the node's internal state before it is used to render an object. - * The {@link Node#updateBeforeType} property defines how often the update is executed. - * - * @abstract - * @param {NodeFrame} frame - A reference to the current node frame. - * @return {?boolean} An optional bool that indicates whether the implementation actually performed an update or not (e.g. due to caching). - */ - updateBefore(): boolean | null; - /** - * The method can be implemented to update the node's internal state after it was used to render an object. - * The {@link Node#updateAfterType} property defines how often the update is executed. - * - * @abstract - * @param {NodeFrame} frame - A reference to the current node frame. - * @return {?boolean} An optional bool that indicates whether the implementation actually performed an update or not (e.g. due to caching). - */ - updateAfter(): boolean | null; - before(node: any): this; - /** - * This method performs the build of a node. The behavior and return value depend on the current build stage: - * - **setup**: Prepares the node and its children for the build process. This process can also create new nodes. Returns the node itself or a variant. - * - **analyze**: Analyzes the node hierarchy for optimizations in the code generation stage. Returns `null`. - * - **generate**: Generates the shader code for the node. Returns the generated shader string. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {?(string|Node)} [output=null] - Can be used to define the output type. - * @return {?(Node|string)} The result of the build process, depending on the build stage. - */ - build(builder: NodeBuilder, output?: (string | Node) | null): (Node | string) | null; - /** - * Returns the child nodes as a JSON object. - * - * @return {Generator} An iterable list of serialized child objects as JSON. - */ - getSerializeChildren(): Generator; - /** - * Serializes the node to JSON. - * - * @param {Object} json - The output JSON object. - */ - serialize(json: Object): void; - /** - * Deserializes the node from the given JSON. - * - * @param {Object} json - The JSON object. - */ - deserialize(json: Object): void; - /** - * Serializes the node into the three.js JSON Object/Scene format. - * - * @param {?Object} meta - An optional JSON object that already holds serialized data from other scene objects. - * @return {Object} The serialized node. - */ - toJSON(meta: Object | null): Object; -} -declare namespace Node { - let captureStackTrace: boolean; -} -import { EventDispatcher } from '../../core/EventDispatcher.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeAttribute.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeAttribute.d.ts deleted file mode 100644 index d6414185f..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/NodeAttribute.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -export default NodeAttribute; -/** - * {@link NodeBuilder} is going to create instances of this class during the build process - * of nodes. They represent the final shader attributes that are going to be generated - * by the builder. Arrays of node attributes is maintained in {@link NodeBuilder#attributes} - * and {@link NodeBuilder#bufferAttributes} for this purpose. - */ -declare class NodeAttribute { - /** - * Constructs a new node attribute. - * - * @param {string} name - The name of the attribute. - * @param {string} type - The type of the attribute. - * @param {?Node} node - An optional reference to the node. - */ - constructor(name: string, type: string, node?: Node | null); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isNodeAttribute: boolean; - /** - * The name of the attribute. - * - * @type {string} - */ - name: string; - /** - * The type of the attribute. - * - * @type {string} - */ - type: string; - /** - * An optional reference to the node. - * - * @type {?Node} - * @default null - */ - node: Node | null; -} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeBuilder.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeBuilder.d.ts deleted file mode 100644 index 998490e38..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/NodeBuilder.d.ts +++ /dev/null @@ -1,1335 +0,0 @@ -export default NodeBuilder; -/** - * Base class for builders which generate a shader program based - * on a 3D object and its node material definition. - */ -declare class NodeBuilder { - /** - * Constructs a new node builder. - * - * @param {Object3D} object - The 3D object. - * @param {Renderer} renderer - The current renderer. - * @param {NodeParser} parser - A reference to a node parser. - */ - constructor(object: Object3D, renderer: Renderer, parser: NodeParser); - /** - * The 3D object. - * - * @type {Object3D} - */ - object: Object3D; - /** - * The material of the 3D object. - * - * @type {?Material} - */ - material: Material | null; - /** - * The geometry of the 3D object. - * - * @type {?BufferGeometry} - */ - geometry: BufferGeometry | null; - /** - * The current renderer. - * - * @type {Renderer} - */ - renderer: Renderer; - /** - * A reference to a node parser. - * - * @type {NodeParser} - */ - parser: NodeParser; - /** - * The scene the 3D object belongs to. - * - * @type {?Scene} - * @default null - */ - scene: Scene | null; - /** - * The camera the 3D object is rendered with. - * - * @type {?Camera} - * @default null - */ - camera: Camera | null; - /** - * A list of all nodes the builder is processing - * for this 3D object. - * - * @type {Array} - */ - nodes: Array; - /** - * A list of all nodes the builder is processing in sequential order. - * - * This is used to determine the update order of nodes, which is important for - * {@link NodeUpdateType#UPDATE_BEFORE} and {@link NodeUpdateType#UPDATE_AFTER}. - * - * @type {Array} - */ - sequentialNodes: Array; - /** - * A list of all nodes which {@link Node#update} method should be executed. - * - * @type {Array} - */ - updateNodes: Array; - /** - * A list of all nodes which {@link Node#updateBefore} method should be executed. - * - * @type {Array} - */ - updateBeforeNodes: Array; - /** - * A list of all nodes which {@link Node#updateAfter} method should be executed. - * - * @type {Array} - */ - updateAfterNodes: Array; - /** - * A dictionary that assigns each node to a unique hash. - * - * @type {Object} - */ - hashNodes: { - [x: number]: Node; - }; - /** - * A reference to a node material observer. - * - * @type {?NodeMaterialObserver} - * @default null - */ - observer: NodeMaterialObserver | null; - /** - * A reference to the current lights node. - * - * @type {?LightsNode} - * @default null - */ - lightsNode: LightsNode | null; - /** - * A reference to the current environment node. - * - * @type {?Node} - * @default null - */ - environmentNode: Node | null; - /** - * A reference to the current fog node. - * - * @type {?Node} - * @default null - */ - fogNode: Node | null; - /** - * The current clipping context. - * - * @type {?ClippingContext} - */ - clippingContext: ClippingContext | null; - /** - * The generated vertex shader. - * - * @type {?string} - */ - vertexShader: string | null; - /** - * The generated fragment shader. - * - * @type {?string} - */ - fragmentShader: string | null; - /** - * The generated compute shader. - * - * @type {?string} - */ - computeShader: string | null; - /** - * Nodes used in the primary flow of code generation. - * - * @type {Object>} - */ - flowNodes: { - [x: string]: Node[]; - }; - /** - * Nodes code from `.flowNodes`. - * - * @type {Object} - */ - flowCode: { - [x: string]: string; - }; - /** - * This dictionary holds the node uniforms of the builder. - * The uniforms are maintained in an array for each shader stage. - * - * @type {Object} - */ - uniforms: Object; - /** - * This dictionary holds the output structs of the builder. - * The structs are maintained in an array for each shader stage. - * - * @type {Object} - */ - structs: Object; - /** - * This dictionary holds the types of the builder. - * - * @type {Object} - */ - types: Object; - /** - * This dictionary holds the bindings for each shader stage. - * - * @type {Object} - */ - bindings: Object; - /** - * This dictionary maintains the binding indices per bind group. - * - * @type {Object} - */ - bindingsIndexes: Object; - /** - * Reference to the array of bind groups. - * - * @type {?Array} - */ - bindGroups: Array | null; - /** - * This array holds the node attributes of this builder - * created via {@link AttributeNode}. - * - * @type {Array} - */ - attributes: Array; - /** - * This array holds the node attributes of this builder - * created via {@link BufferAttributeNode}. - * - * @type {Array} - */ - bufferAttributes: Array; - /** - * This array holds the node varyings of this builder. - * - * @type {Array} - */ - varyings: Array; - /** - * This dictionary holds the (native) node codes of this builder. - * The codes are maintained in an array for each shader stage. - * - * @type {Object>} - */ - codes: { - [x: string]: NodeCode[]; - }; - /** - * This dictionary holds the node variables of this builder. - * The variables are maintained in an array for each shader stage. - * This dictionary is also used to count the number of variables - * according to their type (const, vars). - * - * @type {Object|number>} - */ - vars: { - [x: string]: number | NodeVar[]; - }; - /** - * This dictionary holds the declarations for each shader stage. - * - * @type {Object} - */ - declarations: Object; - /** - * Current code flow. - * All code generated in this stack will be stored in `.flow`. - * - * @type {{code: string}} - */ - flow: { - code: string; - }; - /** - * A chain of nodes. - * Used to check recursive calls in node-graph. - * - * @type {Array} - */ - chaining: Array; - /** - * The current stack. - * This reflects the current process in the code block hierarchy, - * it is useful to know if the current process is inside a conditional for example. - * - * @type {StackNode} - */ - stack: StackNode; - /** - * List of stack nodes. - * The current stack hierarchy is stored in an array. - * - * @type {Array} - */ - stacks: Array; - /** - * A tab value. Used for shader string generation. - * - * @type {string} - * @default '\t' - */ - tab: string; - /** - * Reference to the current function node. - * - * @type {?FunctionNode} - * @default null - */ - currentFunctionNode: FunctionNode | null; - /** - * The builder's context. - * - * @type {Object} - */ - context: Object; - /** - * The builder's cache. - * - * @type {NodeCache} - */ - cache: NodeCache; - /** - * Since the {@link NodeBuilder#cache} might be temporarily - * overwritten by other caches, this member retains the reference - * to the builder's own cache. - * - * @type {NodeCache} - * @default this.cache - */ - globalCache: NodeCache; - flowsData: WeakMap; - /** - * The current shader stage. - * - * @type {?('vertex'|'fragment'|'compute'|'any')} - */ - shaderStage: ("vertex" | "fragment" | "compute" | "any") | null; - /** - * The current build stage. - * - * @type {?('setup'|'analyze'|'generate')} - */ - buildStage: ("setup" | "analyze" | "generate") | null; - /** - * The sub-build layers. - * - * @type {Array} - * @default [] - */ - subBuildLayers: Array; - /** - * The active stack nodes. - * - * @type {Array} - */ - activeStacks: Array; - /** - * The current sub-build TSL function(Fn). - * - * @type {?string} - * @default null - */ - subBuildFn: string | null; - /** - * The current TSL function(Fn) call node. - * - * @type {?Node} - * @default null - */ - fnCall: Node | null; - /** - * Whether the material is using flat shading or not. - * - * @returns {boolean} Whether the material is using flat shading or not. - */ - isFlatShading(): boolean; - /** - * Whether the material is opaque or not. - * - * @return {boolean} Whether the material is opaque or not. - */ - isOpaque(): boolean; - /** - * Factory method for creating an instance of {@link RenderTarget} with the given - * dimensions and options. - * - * @param {number} width - The width of the render target. - * @param {number} height - The height of the render target. - * @param {Object} options - The options of the render target. - * @return {RenderTarget} The render target. - */ - createRenderTarget(width: number, height: number, options: Object): RenderTarget; - /** - * Factory method for creating an instance of {@link CubeRenderTarget} with the given - * dimensions and options. - * - * @param {number} size - The size of the cube render target. - * @param {Object} options - The options of the cube render target. - * @return {CubeRenderTarget} The cube render target. - */ - createCubeRenderTarget(size: number, options: Object): CubeRenderTarget; - /** - * Whether the given node is included in the internal array of nodes or not. - * - * @param {Node} node - The node to test. - * @return {boolean} Whether the given node is included in the internal array of nodes or not. - */ - includes(node: Node): boolean; - /** - * Returns the type of the color output based on the renderer's render target. - * - * @param {number} [index=0] - The index of the render target texture. - * @return {string} The type. - */ - getOutputType(index?: number): string; - /** - * Returns the output struct name which is required by - * {@link OutputStructNode}. - * - * @abstract - * @return {string} The name of the output struct. - */ - getOutputStructName(): string; - /** - * Returns a bind group for the given group name and binding. - * - * @private - * @param {string} groupName - The group name. - * @param {Array} bindings - List of bindings. - * @return {BindGroup} The bind group - */ - private _getBindGroup; - /** - * Returns an array of node uniform groups for the given group name and shader stage. - * - * @param {string} groupName - The group name. - * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. - * @return {Array} The array of node uniform groups. - */ - getBindGroupArray(groupName: string, shaderStage: ("vertex" | "fragment" | "compute" | "any")): Array; - /** - * Returns a list bindings of all shader stages separated by groups. - * - * @return {Array} The list of bindings. - */ - getBindings(): Array; - /** - * Sorts the bind groups and updates {@link NodeBuilder#bindingsIndexes}. - */ - sortBindingGroups(): void; - /** - * The builder maintains each node in a hash-based dictionary. - * This method sets the given node (value) with the given hash (key) into this dictionary. - * - * @param {Node} node - The node to add. - * @param {number} hash - The hash of the node. - */ - setHashNode(node: Node, hash: number): void; - /** - * Adds a node to this builder. - * - * @param {Node} node - The node to add. - */ - addNode(node: Node): void; - /** - * It is used to add Nodes that will be used as FRAME and RENDER events, - * and need to follow a certain sequence in the calls to work correctly. - * This function should be called after 'setup()' in the 'build()' process to ensure that the child nodes are processed first. - * - * @param {Node} node - The node to add. - */ - addSequentialNode(node: Node): void; - /** - * Checks the update types of nodes - */ - buildUpdateNodes(): void; - /** - * A reference the current node which is the - * last node in the chain of nodes. - * - * @type {Node} - */ - get currentNode(): Node; - /** - * Whether the given texture is filtered or not. - * - * @param {Texture} texture - The texture to check. - * @return {boolean} Whether the given texture is filtered or not. - */ - isFilteredTexture(texture: Texture): boolean; - /** - * Returns the maximum number of bytes available for uniform buffers. - * - * @return {number} The maximum number of bytes available for uniform buffers. - */ - getUniformBufferLimit(): number; - /** - * Adds the given node to the internal node chain. - * This is used to check recursive calls in node-graph. - * - * @param {Node} node - The node to add. - */ - addChain(node: Node): void; - /** - * Removes the given node from the internal node chain. - * - * @param {Node} node - The node to remove. - */ - removeChain(node: Node): void; - /** - * Returns the native shader method name for a given generic name. E.g. - * the method name `textureDimensions` matches the WGSL name but must be - * resolved to `textureSize` in GLSL. - * - * @abstract - * @param {string} method - The method name to resolve. - * @return {string} The resolved method name. - */ - getMethod(method: string): string; - /** - * Returns the native snippet for a ternary operation. E.g. GLSL would output - * a ternary op as `cond ? x : y` whereas WGSL would output it as `select(y, x, cond)` - * - * @abstract - * @param {string} condSnippet - The condition determining which expression gets resolved. - * @param {string} ifSnippet - The expression to resolve to if the condition is true. - * @param {string} elseSnippet - The expression to resolve to if the condition is false. - * @return {string} The resolved method name. - */ - getTernary(): string; - /** - * Returns a node for the given hash, see {@link NodeBuilder#setHashNode}. - * - * @param {number} hash - The hash of the node. - * @return {Node} The found node. - */ - getNodeFromHash(hash: number): Node; - /** - * Adds the Node to a target flow so that it can generate code in the 'generate' process. - * - * @param {('vertex'|'fragment'|'compute')} shaderStage - The shader stage. - * @param {Node} node - The node to add. - * @return {Node} The node. - */ - addFlow(shaderStage: ("vertex" | "fragment" | "compute"), node: Node): Node; - /** - * Sets builder's context. - * - * @param {Object} context - The context to set. - */ - setContext(context: Object): void; - /** - * Returns the builder's current context. - * - * @return {Object} The builder's current context. - */ - getContext(): Object; - /** - * Adds context data to the builder's current context. - * - * @param {Object} context - The context to add. - * @return {Object} The previous context. - */ - addContext(context: Object): Object; - /** - * Gets a context used in shader construction that can be shared across different materials. - * This is necessary since the renderer cache can reuse shaders generated in one material and use them in another. - * - * @return {Object} The builder's current context without material. - */ - getSharedContext(): Object; - /** - * Sets builder's cache. - * - * @param {NodeCache} cache - The cache to set. - */ - setCache(cache: NodeCache): void; - /** - * Returns the builder's current cache. - * - * @return {NodeCache} The builder's current cache. - */ - getCache(): NodeCache; - /** - * Returns a cache for the given node. - * - * @param {Node} node - The node. - * @param {boolean} [parent=true] - Whether this node refers to a shared parent cache or not. - * @return {NodeCache} The cache. - */ - getCacheFromNode(node: Node, parent?: boolean): NodeCache; - /** - * Whether the requested feature is available or not. - * - * @abstract - * @param {string} name - The requested feature. - * @return {boolean} Whether the requested feature is supported or not. - */ - isAvailable(): boolean; - /** - * Returns the vertexIndex input variable as a native shader string. - * - * @abstract - * @return {string} The instanceIndex shader string. - */ - getVertexIndex(): string; - /** - * Contextually returns either the vertex stage instance index builtin - * or the linearized index of an compute invocation within a grid of workgroups. - * - * @abstract - * @return {string} The instanceIndex shader string. - */ - getInstanceIndex(): string; - /** - * Returns the drawIndex input variable as a native shader string. - * Only relevant for WebGL and its `WEBGL_multi_draw` extension. - * - * @abstract - * @return {?string} The drawIndex shader string. - */ - getDrawIndex(): string | null; - /** - * Returns the frontFacing input variable as a native shader string. - * - * @abstract - * @return {string} The frontFacing shader string. - */ - getFrontFacing(): string; - /** - * Returns the fragCoord input variable as a native shader string. - * - * @abstract - * @return {string} The fragCoord shader string. - */ - getFragCoord(): string; - /** - * Whether to flip texture data along its vertical axis or not. WebGL needs - * this method evaluate to `true`, WebGPU to `false`. - * - * @abstract - * @return {boolean} Whether to flip texture data along its vertical axis or not. - */ - isFlipY(): boolean; - /** - * Calling this method increases the usage count for the given node by one. - * - * @param {Node} node - The node to increase the usage count for. - * @return {number} The updated usage count. - */ - increaseUsage(node: Node): number; - /** - * Generates a texture sample shader string for the given texture data. - * - * @abstract - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The texture property name. - * @param {string} uvSnippet - Snippet defining the texture coordinates. - * @return {string} The generated shader string. - */ - generateTexture(): string; - /** - * Generates a texture LOD shader string for the given texture data. - * - * @abstract - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The texture property name. - * @param {string} uvSnippet - Snippet defining the texture coordinates. - * @param {?string} depthSnippet - Snippet defining the 0-based texture array index to sample. - * @param {string} levelSnippet - Snippet defining the mip level. - * @return {string} The generated shader string. - */ - generateTextureLod(): string; - /** - * Generates the array declaration string. - * - * @param {string} type - The type. - * @param {?number} [count] - The count. - * @return {string} The generated value as a shader string. - */ - generateArrayDeclaration(type: string, count?: number | null): string; - /** - * Generates the array shader string for the given type and value. - * - * @param {string} type - The type. - * @param {?number} [count] - The count. - * @param {?Array} [values=null] - The default values. - * @return {string} The generated value as a shader string. - */ - generateArray(type: string, count?: number | null, values?: Array | null): string; - /** - * Generates the struct shader string. - * - * @param {string} type - The type. - * @param {Array} [membersLayout] - The count. - * @param {?Array} [values=null] - The default values. - * @return {string} The generated value as a shader string. - */ - generateStruct(type: string, membersLayout?: Array, values?: Array | null): string; - /** - * Generates the shader string for the given type and value. - * - * @param {string} type - The type. - * @param {?any} [value=null] - The value. - * @return {string} The generated value as a shader string. - */ - generateConst(type: string, value?: any | null): string; - /** - * It might be necessary to convert certain data types to different ones - * so this method can be used to hide the conversion. - * - * @param {string} type - The type. - * @return {string} The updated type. - */ - getType(type: string): string; - /** - * Whether the given attribute name is defined in the geometry or not. - * - * @param {string} name - The attribute name. - * @return {boolean} Whether the given attribute name is defined in the geometry. - */ - hasGeometryAttribute(name: string): boolean; - /** - * Returns a node attribute for the given name and type. - * - * @param {string} name - The attribute's name. - * @param {string} type - The attribute's type. - * @return {NodeAttribute} The node attribute. - */ - getAttribute(name: string, type: string): NodeAttribute; - /** - * Returns for the given node and shader stage the property name for the shader. - * - * @param {Node} node - The node. - * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. - * @return {string} The property name. - */ - getPropertyName(node: Node): string; - /** - * Whether the given type is a vector type or not. - * - * @param {string} type - The type to check. - * @return {boolean} Whether the given type is a vector type or not. - */ - isVector(type: string): boolean; - /** - * Whether the given type is a matrix type or not. - * - * @param {string} type - The type to check. - * @return {boolean} Whether the given type is a matrix type or not. - */ - isMatrix(type: string): boolean; - /** - * Whether the given type is a reference type or not. - * - * @param {string} type - The type to check. - * @return {boolean} Whether the given type is a reference type or not. - */ - isReference(type: string): boolean; - /** - * Checks if the given texture requires a manual conversion to the working color space. - * - * @abstract - * @param {Texture} texture - The texture to check. - * @return {boolean} Whether the given texture requires a conversion to working color space or not. - */ - needsToWorkingColorSpace(): boolean; - /** - * Returns the component type of a given texture. - * - * @param {Texture} texture - The texture. - * @return {string} The component type. - */ - getComponentTypeFromTexture(texture: Texture): string; - /** - * Returns the element type for a given type. - * - * @param {string} type - The type. - * @return {string} The element type. - */ - getElementType(type: string): string; - /** - * Returns the component type for a given type. - * - * @param {string} type - The type. - * @return {string} The component type. - */ - getComponentType(type: string): string; - /** - * Returns the vector type for a given type. - * - * @param {string} type - The type. - * @return {string} The vector type. - */ - getVectorType(type: string): string; - /** - * Returns the data type for the given the length and component type. - * - * @param {number} length - The length. - * @param {string} [componentType='float'] - The component type. - * @return {string} The type. - */ - getTypeFromLength(length: number, componentType?: string): string; - /** - * Returns the type for a given typed array. - * - * @param {TypedArray} array - The typed array. - * @return {string} The type. - */ - getTypeFromArray(array: TypedArray): string; - /** - * Returns the type is an integer type. - * - * @param {string} type - The type. - * @return {boolean} Whether the type is an integer type or not. - */ - isInteger(type: string): boolean; - /** - * Returns the type for a given buffer attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - * @return {string} The type. - */ - getTypeFromAttribute(attribute: BufferAttribute): string; - /** - * Returns the length for the given data type. - * - * @param {string} type - The data type. - * @return {number} The length. - */ - getTypeLength(type: string): number; - /** - * Returns the vector type for a given matrix type. - * - * @param {string} type - The matrix type. - * @return {string} The vector type. - */ - getVectorFromMatrix(type: string): string; - /** - * For a given type this method changes the component type to the - * given value. E.g. `vec4` should be changed to the new component type - * `uint` which results in `uvec4`. - * - * @param {string} type - The type. - * @param {string} newComponentType - The new component type. - * @return {string} The new type. - */ - changeComponentType(type: string, newComponentType: string): string; - /** - * Returns the integer type pendant for the given type. - * - * @param {string} type - The type. - * @return {string} The integer type. - */ - getIntegerType(type: string): string; - /** - * Adds an active stack to the internal stack. - * - * @param {StackNode} stack - The stack node to add. - */ - setActiveStack(stack: StackNode): void; - /** - * Removes the active stack from the internal stack. - * - * @param {StackNode} stack - The stack node to remove. - */ - removeActiveStack(stack: StackNode): void; - /** - * Returns the active stack. - * - * @return {StackNode} The active stack. - */ - getActiveStack(): StackNode; - /** - * Returns the base stack. - * - * @return {StackNode} The base stack. - */ - getBaseStack(): StackNode; - /** - * Adds a stack node to the internal stack. - * - * @return {StackNode} The added stack node. - */ - addStack(): StackNode; - /** - * Removes the last stack node from the internal stack. - * - * @return {StackNode} The removed stack node. - */ - removeStack(): StackNode; - /** - * The builder maintains (cached) data for each node during the building process. This method - * can be used to get these data for a specific shader stage and cache. - * - * @param {Node} node - The node to get the data for. - * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. - * @param {?NodeCache} cache - An optional cache. - * @return {Object} The node data. - */ - getDataFromNode(node: Node, shaderStage?: ("vertex" | "fragment" | "compute" | "any"), cache?: NodeCache | null): Object; - /** - * Returns the properties for the given node and shader stage. - * - * Properties are typically used within a build stage to reference a node's - * child node or nodes manually assigned to the properties in a separate build stage. - * A typical usage pattern for defining nodes manually would be assigning dependency nodes - * to the current node's properties in the setup stage and building those properties in the generate stage. - * - * @param {Node} node - The node to get the properties for. - * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage='any'] - The shader stage. - * @return {Object} The node properties. - */ - getNodeProperties(node: Node, shaderStage?: ("vertex" | "fragment" | "compute" | "any")): Object; - /** - * Returns an instance of {@link NodeAttribute} for the given buffer attribute node. - * - * @param {BufferAttributeNode} node - The buffer attribute node. - * @param {string} type - The node type. - * @param {?string} [name=null] - The name of the buffer attribute. - * @return {NodeAttribute} The node attribute. - */ - getBufferAttributeFromNode(node: BufferAttributeNode, type: string, name?: string | null): NodeAttribute; - /** - * Returns an instance of {@link StructType} for the given struct name and shader stage - * or null if not found. - * - * @param {string} name - The name of the struct. - * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. - * @return {?StructType} The struct type or null if not found. - */ - getStructTypeNode(name: string, shaderStage?: ("vertex" | "fragment" | "compute" | "any")): StructType | null; - /** - * Returns an instance of {@link StructType} for the given output struct node. - * - * @param {OutputStructNode} node - The output struct node. - * @param {Array} membersLayout - The output struct types. - * @param {?string} [name=null] - The name of the struct. - * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. - * @return {StructType} The struct type attribute. - */ - getStructTypeFromNode(node: OutputStructNode, membersLayout: Array, name?: string | null, shaderStage?: ("vertex" | "fragment" | "compute" | "any")): StructType; - /** - * Returns an instance of {@link StructType} for the given output struct node. - * - * @param {OutputStructNode} node - The output struct node. - * @param {Array} membersLayout - The output struct types. - * @return {StructType} The struct type attribute. - */ - getOutputStructTypeFromNode(node: OutputStructNode, membersLayout: Array): StructType; - /** - * Returns an instance of {@link NodeUniform} for the given uniform node. - * - * @param {UniformNode} node - The uniform node. - * @param {string} type - The uniform type. - * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. - * @param {?string} name - The name of the uniform. - * @return {NodeUniform} The node uniform. - */ - getUniformFromNode(node: UniformNode, type: string, shaderStage?: ("vertex" | "fragment" | "compute" | "any"), name?: string | null): NodeUniform; - /** - * Returns an instance of {@link NodeVar} for the given variable node. - * - * @param {VarNode} node - The variable node. - * @param {?string} name - The variable's name. - * @param {string} [type=node.getNodeType( this )] - The variable's type. - * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. - * @param {boolean} [readOnly=false] - Whether the variable is read-only or not. - * - * @return {NodeVar} The node variable. - */ - getVarFromNode(node: VarNode, name?: string | null, type?: string, shaderStage?: ("vertex" | "fragment" | "compute" | "any"), readOnly?: boolean): NodeVar; - /** - * Returns whether a Node or its flow is deterministic, useful for use in `const`. - * - * @param {Node} node - The varying node. - * @return {boolean} Returns true if deterministic. - */ - isDeterministic(node: Node): boolean; - /** - * Returns an instance of {@link NodeVarying} for the given varying node. - * - * @param {(VaryingNode|PropertyNode)} node - The varying node. - * @param {?string} name - The varying's name. - * @param {string} [type=node.getNodeType( this )] - The varying's type. - * @param {?string} interpolationType - The interpolation type of the varying. - * @param {?string} interpolationSampling - The interpolation sampling type of the varying. - * @return {NodeVar} The node varying. - */ - getVaryingFromNode(node: (VaryingNode | PropertyNode), name?: string | null, type?: string, interpolationType?: string | null, interpolationSampling?: string | null): NodeVar; - /** - * Registers a node declaration in the current shader stage. - * - * @param {Object} node - The node to be registered. - */ - registerDeclaration(node: Object): void; - /** - * Returns an instance of {@link NodeCode} for the given code node. - * - * @param {CodeNode} node - The code node. - * @param {string} type - The node type. - * @param {('vertex'|'fragment'|'compute'|'any')} [shaderStage=this.shaderStage] - The shader stage. - * @return {NodeCode} The node code. - */ - getCodeFromNode(node: CodeNode, type: string, shaderStage?: ("vertex" | "fragment" | "compute" | "any")): NodeCode; - /** - * Adds a code flow based on the code-block hierarchy. - - * This is used so that code-blocks like If,Else create their variables locally if the Node - * is only used inside one of these conditionals in the current shader stage. - * - * @param {Node} node - The node to add. - * @param {Node} nodeBlock - Node-based code-block. Usually 'ConditionalNode'. - */ - addFlowCodeHierarchy(node: Node, nodeBlock: Node): void; - /** - * Add a inline-code to the current flow code-block. - * - * @param {Node} node - The node to add. - * @param {string} code - The code to add. - * @param {Node} nodeBlock - Current ConditionalNode - */ - addLineFlowCodeBlock(node: Node, code: string, nodeBlock: Node): void; - /** - * Add a inline-code to the current flow. - * - * @param {string} code - The code to add. - * @param {?Node} [node= null] - Optional Node, can help the system understand if the Node is part of a code-block. - * @return {NodeBuilder} A reference to this node builder. - */ - addLineFlowCode(code: string, node?: Node | null): NodeBuilder; - /** - * Adds a code to the current code flow. - * - * @param {string} code - Shader code. - * @return {NodeBuilder} A reference to this node builder. - */ - addFlowCode(code: string): NodeBuilder; - /** - * Add tab in the code that will be generated so that other snippets respect the current tabulation. - * Typically used in codes with If,Else. - * - * @return {NodeBuilder} A reference to this node builder. - */ - addFlowTab(): NodeBuilder; - /** - * Removes a tab. - * - * @return {NodeBuilder} A reference to this node builder. - */ - removeFlowTab(): NodeBuilder; - /** - * Gets the current flow data based on a Node. - * - * @param {Node} node - Node that the flow was started. - * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. - * @return {Object} The flow data. - */ - getFlowData(node: Node): Object; - /** - * Executes the node flow based on a root node to generate the final shader code. - * - * @param {Node} node - The node to execute. - * @return {Object} The code flow. - */ - flowNode(node: Node): Object; - /** - * Includes a node in the current function node. - * - * @param {Node} node - The node to include. - * @returns {void} - */ - addInclude(node: Node): void; - /** - * Returns the native shader operator name for a given generic name. - * It is a similar type of method like {@link NodeBuilder#getMethod}. - * - * @param {ShaderNodeInternal} shaderNode - The shader node to build the function node with. - * @return {FunctionNode} The build function node. - */ - buildFunctionNode(shaderNode: ShaderNodeInternal): FunctionNode; - /** - * Generates a code flow based on a TSL function: Fn(). - * - * @param {ShaderNodeInternal} shaderNode - A function code will be generated based on the input. - * @return {Object} - */ - flowShaderNode(shaderNode: ShaderNodeInternal): Object; - /** - * Executes the node in a specific build stage. - * - * This function can be used to arbitrarily execute the specified build stage - * outside of the standard build process. For instance, if a node's type depends - * on properties created by the 'setup' stage, then flowBuildStage(node, 'setup') - * can be used to execute the setup build stage and access its generated nodes - * before the standard build process begins. - * - * @param {Node} node - The node to execute. - * @param {string} buildStage - The build stage to execute the node in. - * @param {?(Node|string)} [output=null] - Expected output type. For example 'vec3'. - * @return {?(Node|string)} The result of the node build. - */ - flowBuildStage(node: Node, buildStage: string, output?: (Node | string) | null): (Node | string) | null; - /** - * Runs the node flow through all the steps of creation, 'setup', 'analyze', 'generate'. - * - * @param {Node} node - The node to execute. - * @param {?string} output - Expected output type. For example 'vec3'. - * @return {Object} - */ - flowStagesNode(node: Node, output?: string | null): Object; - /** - * Returns the native shader operator name for a given generic name. - * It is a similar type of method like {@link NodeBuilder#getMethod}. - * - * @abstract - * @param {string} op - The operator name to resolve. - * @return {?string} The resolved operator name. - */ - getFunctionOperator(): string | null; - /** - * Builds the given shader node. - * - * @abstract - * @param {ShaderNodeInternal} shaderNode - The shader node. - * @return {string} The function code. - */ - buildFunctionCode(): string; - /** - * Generates a code flow based on a child Node. - * - * @param {Node} node - The node to execute. - * @param {?string} output - Expected output type. For example 'vec3'. - * @return {Object} The code flow. - */ - flowChildNode(node: Node, output?: string | null): Object; - /** - * Executes a flow of code in a different stage. - * - * Some nodes like `varying()` have the ability to compute code in vertex-stage and - * return the value in fragment-stage even if it is being executed in an input fragment. - * - * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. - * @param {Node} node - The node to execute. - * @param {?string} output - Expected output type. For example 'vec3'. - * @param {?string} propertyName - The property name to assign the result. - * @return {?(Object|Node)} The code flow or node.build() result. - */ - flowNodeFromShaderStage(shaderStage: ("vertex" | "fragment" | "compute" | "any"), node: Node, output?: string | null, propertyName?: string | null): (Object | Node) | null; - /** - * Returns an array holding all node attributes of this node builder. - * - * @return {Array} The node attributes of this builder. - */ - getAttributesArray(): Array; - /** - * Returns the attribute definitions as a shader string for the given shader stage. - * - * @abstract - * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. - * @return {string} The attribute code section. - */ - getAttributes(): string; - /** - * Returns the varying definitions as a shader string for the given shader stage. - * - * @abstract - * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. - * @return {string} The varying code section. - */ - getVaryings(): string; - /** - * Returns a single variable definition as a shader string for the given variable type and name. - * - * @param {string} type - The variable's type. - * @param {string} name - The variable's name. - * @param {?number} [count=null] - The array length. - * @return {string} The shader string. - */ - getVar(type: string, name: string, count?: number | null): string; - /** - * Returns the variable definitions as a shader string for the given shader stage. - * - * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. - * @param {boolean} [global=false] - Whether the variables are global. - * @return {string} The variable code section. - */ - getVars(shaderStage: ("vertex" | "fragment" | "compute" | "any"), global?: boolean): string; - /** - * Returns the uniform definitions as a shader string for the given shader stage. - * - * @abstract - * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. - * @return {string} The uniform code section. - */ - getUniforms(): string; - /** - * Returns the native code definitions as a shader string for the given shader stage. - * - * @param {('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage. - * @return {string} The native code section. - */ - getCodes(shaderStage: ("vertex" | "fragment" | "compute" | "any")): string; - /** - * Returns the hash of this node builder. - * - * @return {string} The hash. - */ - getHash(): string; - /** - * Sets the current shader stage. - * - * @param {?('vertex'|'fragment'|'compute'|'any')} shaderStage - The shader stage to set. - */ - setShaderStage(shaderStage: ("vertex" | "fragment" | "compute" | "any") | null): void; - /** - * Returns the current shader stage. - * - * @return {?('vertex'|'fragment'|'compute'|'any')} The current shader stage. - */ - getShaderStage(): ("vertex" | "fragment" | "compute" | "any") | null; - /** - * Sets the current build stage. - * - * @param {?('setup'|'analyze'|'generate')} buildStage - The build stage to set. - */ - setBuildStage(buildStage: ("setup" | "analyze" | "generate") | null): void; - /** - * Returns the current build stage. - * - * @return {?('setup'|'analyze'|'generate')} The current build stage. - */ - getBuildStage(): ("setup" | "analyze" | "generate") | null; - /** - * Controls the code build of the shader stages. - * - * @abstract - */ - buildCode(): void; - /** - * Returns the current sub-build layer. - * - * @return {SubBuildNode} The current sub-build layers. - */ - get subBuild(): SubBuildNode; - /** - * Adds a sub-build layer to the node builder. - * - * @param {SubBuildNode} subBuild - The sub-build layer to add. - */ - addSubBuild(subBuild: SubBuildNode): void; - /** - * Removes the last sub-build layer from the node builder. - * - * @return {SubBuildNode} The removed sub-build layer. - */ - removeSubBuild(): SubBuildNode; - /** - * Returns the closest sub-build layer for the given data. - * - * @param {Node|Set|Array} data - The data to get the closest sub-build layer from. - * @return {?string} The closest sub-build name or null if none found. - */ - getClosestSubBuild(data: Node | Set | Array): string | null; - /** - * Returns the output node of a sub-build layer. - * - * @param {Node} node - The node to get the output from. - * @return {string} The output node name. - */ - getSubBuildOutput(node: Node): string; - /** - * Returns the sub-build property name for the given property and node. - * - * @param {string} [property=''] - The property name. - * @param {?Node} [node=null] - The node to get the sub-build from. - * @return {string} The sub-build property name. - */ - getSubBuildProperty(property?: string, node?: Node | null): string; - /** - * Prebuild the node builder. - */ - prebuild(): void; - /** - * Central build method which controls the build for the given object. - * - * @return {NodeBuilder} A reference to this node builder. - */ - build(): NodeBuilder; - /** - * Async version of build() that yields to main thread between shader stages. - * Use this in compileAsync() to prevent blocking the main thread. - * - * @return {Promise} A promise that resolves to this node builder. - */ - buildAsync(): Promise; - /** - * Returns shared data object for the given node. - * - * @param {Node} node - The node to get shared data from. - * @return {Object} The shared data. - */ - getSharedDataFromNode(node: Node): Object; - /** - * Returns a uniform representation which is later used for UBO generation and rendering. - * - * @param {NodeUniform} uniformNode - The uniform node. - * @param {string} type - The requested type. - * @return {Uniform} The uniform. - */ - getNodeUniform(uniformNode: NodeUniform, type: string): Uniform; - /** - * Formats the given shader snippet from a given type into another one. E.g. - * this method might be used to convert a simple float string `"1.0"` into a - * `vec3` representation: `"vec3( 1.0 )"`. - * - * @param {string} snippet - The shader snippet. - * @param {string} fromType - The source type. - * @param {string} toType - The target type. - * @return {string} The updated shader string. - */ - format(snippet: string, fromType: string, toType: string): string; - /** - * Returns a signature with the engine's current revision. - * - * @return {string} The signature. - */ - getSignature(): string; - /** - * Returns `true` if data from the previous frame are required. Relevant - * when computing motion vectors with {@link VelocityNode}. - * - * @return {boolean} Whether data from the previous frame are required or not. - */ - needsPreviousData(): boolean; -} -import BindGroup from '../../renderers/common/BindGroup.js'; -import NodeAttribute from './NodeAttribute.js'; -import NodeVarying from './NodeVarying.js'; -import NodeCode from './NodeCode.js'; -import NodeVar from './NodeVar.js'; -import FunctionNode from '../code/FunctionNode.js'; -import NodeCache from './NodeCache.js'; -import { RenderTarget } from '../../core/RenderTarget.js'; -import CubeRenderTarget from '../../renderers/common/CubeRenderTarget.js'; -import StructType from './StructType.js'; -import NodeUniform from './NodeUniform.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeCache.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeCache.d.ts deleted file mode 100644 index 0c192004d..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/NodeCache.d.ts +++ /dev/null @@ -1,47 +0,0 @@ -export default NodeCache; -/** - * This utility class is used in {@link NodeBuilder} as an internal - * cache data structure for node data. - */ -declare class NodeCache { - /** - * Constructs a new node cache. - * - * @param {?NodeCache} parent - A reference to a parent cache. - */ - constructor(parent?: NodeCache | null); - /** - * The id of the cache. - * - * @type {number} - * @readonly - */ - readonly id: number; - /** - * A weak map for managing node data. - * - * @type {WeakMap} - */ - nodesData: WeakMap; - /** - * Reference to a parent node cache. - * - * @type {?NodeCache} - * @default null - */ - parent: NodeCache | null; - /** - * Returns the data for the given node. - * - * @param {Node} node - The node. - * @return {?Object} The data for the node. - */ - getData(node: Node): Object | null; - /** - * Sets the data for a given node. - * - * @param {Node} node - The node. - * @param {Object} data - The data that should be cached. - */ - setData(node: Node, data: Object): void; -} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeCode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeCode.d.ts deleted file mode 100644 index f96665f26..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/NodeCode.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -export default NodeCode; -/** - * {@link NodeBuilder} is going to create instances of this class during the build process - * of nodes. They represent user-defined, native shader code portions that are going to be - * injected by the builder. A dictionary of node codes is maintained in {@link NodeBuilder#codes} - * for this purpose. - */ -declare class NodeCode { - /** - * Constructs a new code node. - * - * @param {string} name - The name of the code. - * @param {string} type - The node type. - * @param {string} [code=''] - The native shader code. - */ - constructor(name: string, type: string, code?: string); - /** - * The name of the code. - * - * @type {string} - */ - name: string; - /** - * The node type. - * - * @type {string} - */ - type: string; - /** - * The native shader code. - * - * @type {string} - * @default '' - */ - code: string; -} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeError.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeError.d.ts deleted file mode 100644 index 71d14d55f..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/NodeError.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default NodeError; -/** - * Custom error class for node-related errors, including stack trace information. - */ -declare class NodeError extends Error { - constructor(message: any, stackTrace?: null); - /** - * The stack trace associated with the error. - * - * @type {?StackTrace} - */ - stackTrace: StackTrace | null; -} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeFrame.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeFrame.d.ts deleted file mode 100644 index afaee4fe4..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/NodeFrame.d.ts +++ /dev/null @@ -1,133 +0,0 @@ -export default NodeFrame; -/** - * Management class for updating nodes. The module tracks metrics like - * the elapsed time, delta time, the render and frame ID to correctly - * call the node update methods {@link Node#updateBefore}, {@link Node#update} - * and {@link Node#updateAfter} depending on the node's configuration. - */ -declare class NodeFrame { - /** - * The elapsed time in seconds. - * - * @type {number} - * @default 0 - */ - time: number; - /** - * The delta time in seconds. - * - * @type {number} - * @default 0 - */ - deltaTime: number; - /** - * The frame ID. - * - * @type {number} - * @default 0 - */ - frameId: number; - /** - * The render ID. - * - * @type {number} - * @default 0 - */ - renderId: number; - /** - * Used to control the {@link Node#update} call. - * - * @type {WeakMap} - */ - updateMap: WeakMap; - /** - * Used to control the {@link Node#updateBefore} call. - * - * @type {WeakMap} - */ - updateBeforeMap: WeakMap; - /** - * Used to control the {@link Node#updateAfter} call. - * - * @type {WeakMap} - */ - updateAfterMap: WeakMap; - /** - * A reference to the current renderer. - * - * @type {?Renderer} - * @default null - */ - renderer: Renderer | null; - /** - * A reference to the current material. - * - * @type {?Material} - * @default null - */ - material: Material | null; - /** - * A reference to the current camera. - * - * @type {?Camera} - * @default null - */ - camera: Camera | null; - /** - * A reference to the current 3D object. - * - * @type {?Object3D} - * @default null - */ - object: Object3D | null; - /** - * A reference to the current scene. - * - * @type {?Scene} - * @default null - */ - scene: Scene | null; - /** - * Returns a dictionary for a given node and update map which - * is used to correctly call node update methods per frame or render. - * - * @private - * @param {WeakMap} referenceMap - The reference weak map. - * @param {Node} nodeRef - The reference to the current node. - * @return {Object>} The dictionary. - */ - private _getMaps; - /** - * This method executes the {@link Node#updateBefore} for the given node. - * It makes sure {@link Node#updateBeforeType} is honored meaning the update - * is only executed once per frame, render or object depending on the update - * type. - * - * @param {Node} node - The node that should be updated. - */ - updateBeforeNode(node: Node): void; - /** - * This method executes the {@link Node#updateAfter} for the given node. - * It makes sure {@link Node#updateAfterType} is honored meaning the update - * is only executed once per frame, render or object depending on the update - * type. - * - * @param {Node} node - The node that should be updated. - */ - updateAfterNode(node: Node): void; - /** - * This method executes the {@link Node#update} for the given node. - * It makes sure {@link Node#updateType} is honored meaning the update - * is only executed once per frame, render or object depending on the update - * type. - * - * @param {Node} node - The node that should be updated. - */ - updateNode(node: Node): void; - /** - * Updates the internal state of the node frame. This method is - * called by the renderer in its internal animation loop. - */ - update(): void; - lastTime: number | undefined; -} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeFunction.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeFunction.d.ts deleted file mode 100644 index ef2cdbc0a..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/NodeFunction.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -export default NodeFunction; -/** - * Base class for node functions. A derived module must be implemented - * for each supported native shader language. Similar to other `Node*` modules, - * this class is only relevant during the building process and not used - * in user-level code. - */ -declare class NodeFunction { - /** - * Constructs a new node function. - * - * @param {string} type - The node type. This type is the return type of the node function. - * @param {Array} inputs - The function's inputs. - * @param {string} [name=''] - The function's name. - * @param {string} [precision=''] - The precision qualifier. - */ - constructor(type: string, inputs: Array, name?: string, precision?: string); - /** - * The node type. This type is the return type of the node function. - * - * @type {string} - */ - type: string; - /** - * The function's inputs. - * - * @type {Array} - */ - inputs: Array; - /** - * The name of the uniform. - * - * @type {string} - * @default '' - */ - name: string; - /** - * The precision qualifier. - * - * @type {string} - * @default '' - */ - precision: string; - /** - * This method returns the native code of the node function. - * - * @abstract - * @param {string} name - The function's name. - * @return {string} A shader code. - */ - getCode(): string; -} -declare namespace NodeFunction { - let isNodeFunction: boolean; -} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeFunctionInput.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeFunctionInput.d.ts deleted file mode 100644 index 3df5a1b75..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/NodeFunctionInput.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -export default NodeFunctionInput; -/** - * Describes the input of a {@link NodeFunction}. - */ -declare class NodeFunctionInput { - /** - * Constructs a new node function input. - * - * @param {string} type - The input type. - * @param {string} name - The input name. - * @param {?number} [count=null] - If the input is an Array, count will be the length. - * @param {('in'|'out'|'inout')} [qualifier=''] - The parameter qualifier (only relevant for GLSL). - * @param {boolean} [isConst=false] - Whether the input uses a const qualifier or not (only relevant for GLSL). - */ - constructor(type: string, name: string, count?: number | null, qualifier?: ("in" | "out" | "inout"), isConst?: boolean); - /** - * The input type. - * - * @type {string} - */ - type: string; - /** - * The input name. - * - * @type {string} - */ - name: string; - /** - * If the input is an Array, count will be the length. - * - * @type {?number} - * @default null - */ - count: number | null; - /** - *The parameter qualifier (only relevant for GLSL). - * - * @type {('in'|'out'|'inout')} - * @default '' - */ - qualifier: ("in" | "out" | "inout"); - /** - * Whether the input uses a const qualifier or not (only relevant for GLSL). - * - * @type {boolean} - * @default false - */ - isConst: boolean; -} -declare namespace NodeFunctionInput { - let isNodeFunctionInput: boolean; -} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeParser.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeParser.d.ts deleted file mode 100644 index f15875899..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/NodeParser.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export default NodeParser; -/** - * Base class for node parsers. A derived parser must be implemented - * for each supported native shader language. - */ -declare class NodeParser { - /** - * The method parses the given native code an returns a node function. - * - * @abstract - * @param {string} source - The native shader code. - * @return {NodeFunction} A node function. - */ - parseFunction(): NodeFunction; -} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeUniform.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeUniform.d.ts deleted file mode 100644 index 3f872f033..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/NodeUniform.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -export default NodeUniform; -/** - * {@link NodeBuilder} is going to create instances of this class during the build process - * of nodes. They represent the final shader uniforms that are going to be generated - * by the builder. A dictionary of node uniforms is maintained in {@link NodeBuilder#uniforms} - * for this purpose. - */ -declare class NodeUniform { - /** - * Constructs a new node uniform. - * - * @param {string} name - The name of the uniform. - * @param {string} type - The type of the uniform. - * @param {UniformNode} node - An reference to the node. - */ - constructor(name: string, type: string, node: UniformNode); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isNodeUniform: boolean; - /** - * The name of the uniform. - * - * @type {string} - */ - name: string; - /** - * The type of the uniform. - * - * @type {string} - */ - type: string; - /** - * An reference to the node. - * - * @type {UniformNode} - */ - node: UniformNode; - set value(val: any); - /** - * The value of the uniform node. - * - * @type {any} - */ - get value(): any; - /** - * The id of the uniform node. - * - * @type {number} - */ - get id(): number; - /** - * The uniform node's group. - * - * @type {UniformGroupNode} - */ - get groupNode(): UniformGroupNode; -} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeUtils.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeUtils.d.ts deleted file mode 100644 index a5265224d..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/NodeUtils.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Returns the data type for the given the length. - * - * @private - * @method - * @param {number} length - The length. - * @return {string} The data type. - */ -export function getTypeFromLength(length: number): string; -/** - * Returns the typed array for the given data type. - * - * @private - * @method - * @param {string} type - The data type. - * @return {TypedArray} The typed array. - */ -export function getTypedArrayFromType(type: string): TypedArray; -/** - * Returns the length for the given data type. - * - * @private - * @method - * @param {string} type - The data type. - * @return {number} The length. - */ -export function getLengthFromType(type: string): number; -/** - * Returns the gpu memory length for the given data type in 4-byte elements. - * - * @private - * @method - * @param {string} type - The data type. - * @return {number} The memory length in 4-byte elements. - */ -export function getMemoryLengthFromType(type: string): number; -/** - * Returns the alignment requirement for the given data type in 4-byte elements. - * - * @private - * @method - * @param {string} type - The data type. - * @return {number} The alignment requirement in 4-byte elements. - */ -export function getAlignmentFromType(type: string): number; -/** - * Returns the data type for the given value. - * - * @private - * @method - * @param {any} value - The value. - * @return {?string} The data type. - */ -export function getValueType(value: any): string | null; -/** - * Returns the value/object for the given data type and parameters. - * - * @private - * @method - * @param {string} type - The given type. - * @param {...any} params - A parameter list. - * @return {any} The value/object. - */ -export function getValueFromType(type: string, ...params: any[]): any; -/** - * Gets the object data that can be shared between different rendering steps. - * - * @private - * @param {Object} object - The object to get the data for. - * @return {Object} The object data. - */ -export function getDataFromObject(object: Object): Object; -/** - * Converts the given array buffer to a Base64 string. - * - * @private - * @method - * @param {ArrayBuffer} arrayBuffer - The array buffer. - * @return {string} The Base64 string. - */ -export function arrayBufferToBase64(arrayBuffer: ArrayBuffer): string; -/** - * Converts the given Base64 string to an array buffer. - * - * @private - * @method - * @param {string} base64 - The Base64 string. - * @return {ArrayBuffer} The array buffer. - */ -export function base64ToArrayBuffer(base64: string): ArrayBuffer; -export function hashString(str: string): number; -export function hashArray(array: Array): number; -export function hash(...params: number[]): number; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeVar.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeVar.d.ts deleted file mode 100644 index 43e82262f..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/NodeVar.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -export default NodeVar; -/** - * {@link NodeBuilder} is going to create instances of this class during the build process - * of nodes. They represent the final shader variables that are going to be generated - * by the builder. A dictionary of node variables is maintained in {@link NodeBuilder#vars} for - * this purpose. - */ -declare class NodeVar { - /** - * Constructs a new node variable. - * - * @param {string} name - The name of the variable. - * @param {string} type - The type of the variable. - * @param {boolean} [readOnly=false] - The read-only flag. - * @param {?number} [count=null] - The size. - */ - constructor(name: string, type: string, readOnly?: boolean, count?: number | null); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isNodeVar: boolean; - /** - * The name of the variable. - * - * @type {string} - */ - name: string; - /** - * The type of the variable. - * - * @type {string} - */ - type: string; - /** - * The read-only flag. - * - * @type {boolean} - */ - readOnly: boolean; - /** - * The size. - * - * @type {?number} - */ - count: number | null; -} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/NodeVarying.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/NodeVarying.d.ts deleted file mode 100644 index 587fb0896..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/NodeVarying.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -export default NodeVarying; -/** - * {@link NodeBuilder} is going to create instances of this class during the build process - * of nodes. They represent the final shader varyings that are going to be generated - * by the builder. An array of node varyings is maintained in {@link NodeBuilder#varyings} for - * this purpose. - * - * @augments NodeVar - */ -declare class NodeVarying extends NodeVar { - /** - * Constructs a new node varying. - * - * @param {string} name - The name of the varying. - * @param {string} type - The type of the varying. - * @param {?string} interpolationType - The interpolation type of the varying. - * @param {?string} interpolationSampling - The interpolation sampling type of the varying. - */ - constructor(name: string, type: string, interpolationType?: string | null, interpolationSampling?: string | null); - /** - * Whether this varying requires interpolation or not. This property can be used - * to check if the varying can be optimized for a variable. - * - * @type {boolean} - * @default false - */ - needsInterpolation: boolean; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isNodeVarying: boolean; - /** - * The interpolation type of the varying data. - * - * @type {?string} - * @default null - */ - interpolationType: string | null; - /** - * The interpolation sampling type of varying data. - * - * @type {?string} - * @default null - */ - interpolationSampling: string | null; -} -import NodeVar from './NodeVar.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/OutputStructNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/OutputStructNode.d.ts deleted file mode 100644 index ea5448089..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/OutputStructNode.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -export default OutputStructNode; -/** - * TSL function for creating an output struct node. - * - * @tsl - * @function - * @param {...Node} members - A parameter list of nodes. - * @returns {OutputStructNode} - */ -export const outputStruct: any; -/** - * This node can be used to define multiple outputs in a shader programs. - * - * @augments Node - */ -declare class OutputStructNode extends Node { - /** - * Constructs a new output struct node. The constructor can be invoked with an - * arbitrary number of nodes representing the members. - * - * @param {...Node} members - A parameter list of nodes. - */ - constructor(...members: Node[]); - /** - * An array of nodes which defines the output. - * - * @type {Array} - */ - members: Array; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isOutputStructNode: boolean; - generateNodeType(): string; - generate(builder: any): any; -} -import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/ParameterNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/ParameterNode.d.ts deleted file mode 100644 index 6ab531096..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/ParameterNode.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -export default ParameterNode; -export function parameter(type: string, name: string | null): ParameterNode; -/** - * Special version of {@link PropertyNode} which is used for parameters. - * - * @augments PropertyNode - */ -declare class ParameterNode extends PropertyNode { - /** - * Constructs a new parameter node. - * - * @param {string} nodeType - The type of the node. - * @param {?string} [name=null] - The name of the parameter in the shader. - */ - constructor(nodeType: string, name?: string | null); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isParameterNode: boolean; - /** - * Gets the type of a member variable in the parameter node. - * - * @param {NodeBuilder} builder - The node builder. - * @param {string} name - The name of the member variable. - * @returns {string} - */ - getMemberType(builder: NodeBuilder, name: string): string; - getHash(): string; - generate(): string; -} -import PropertyNode from './PropertyNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/PropertyNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/PropertyNode.d.ts deleted file mode 100644 index b781c6217..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/PropertyNode.d.ts +++ /dev/null @@ -1,254 +0,0 @@ -export default PropertyNode; -export function property(type: string, name?: string | null): PropertyNode; -export function varyingProperty(type: string, name?: string | null): PropertyNode; -/** - * TSL object that represents the shader variable `DiffuseColor`. - * - * @tsl - * @type {PropertyNode} - */ -export const diffuseColor: PropertyNode; -/** - * TSL object that represents the shader variable `DiffuseContribution`. - * - * @tsl - * @type {PropertyNode} - */ -export const diffuseContribution: PropertyNode; -/** - * TSL object that represents the shader variable `EmissiveColor`. - * - * @tsl - * @type {PropertyNode} - */ -export const emissive: PropertyNode; -/** - * TSL object that represents the shader variable `Roughness`. - * - * @tsl - * @type {PropertyNode} - */ -export const roughness: PropertyNode; -/** - * TSL object that represents the shader variable `Metalness`. - * - * @tsl - * @type {PropertyNode} - */ -export const metalness: PropertyNode; -/** - * TSL object that represents the shader variable `Clearcoat`. - * - * @tsl - * @type {PropertyNode} - */ -export const clearcoat: PropertyNode; -/** - * TSL object that represents the shader variable `ClearcoatRoughness`. - * - * @tsl - * @type {PropertyNode} - */ -export const clearcoatRoughness: PropertyNode; -/** - * TSL object that represents the shader variable `Sheen`. - * - * @tsl - * @type {PropertyNode} - */ -export const sheen: PropertyNode; -/** - * TSL object that represents the shader variable `SheenRoughness`. - * - * @tsl - * @type {PropertyNode} - */ -export const sheenRoughness: PropertyNode; -/** - * TSL object that represents the shader variable `Iridescence`. - * - * @tsl - * @type {PropertyNode} - */ -export const iridescence: PropertyNode; -/** - * TSL object that represents the shader variable `IridescenceIOR`. - * - * @tsl - * @type {PropertyNode} - */ -export const iridescenceIOR: PropertyNode; -/** - * TSL object that represents the shader variable `IridescenceThickness`. - * - * @tsl - * @type {PropertyNode} - */ -export const iridescenceThickness: PropertyNode; -/** - * TSL object that represents the shader variable `AlphaT`. - * - * @tsl - * @type {PropertyNode} - */ -export const alphaT: PropertyNode; -/** - * TSL object that represents the shader variable `Anisotropy`. - * - * @tsl - * @type {PropertyNode} - */ -export const anisotropy: PropertyNode; -/** - * TSL object that represents the shader variable `AnisotropyT`. - * - * @tsl - * @type {PropertyNode} - */ -export const anisotropyT: PropertyNode; -/** - * TSL object that represents the shader variable `AnisotropyB`. - * - * @tsl - * @type {PropertyNode} - */ -export const anisotropyB: PropertyNode; -/** - * TSL object that represents the shader variable `SpecularColor`. - * - * @tsl - * @type {PropertyNode} - */ -export const specularColor: PropertyNode; -/** - * TSL object that represents the shader variable `SpecularColorBlended`. - * - * @tsl - * @type {PropertyNode} - */ -export const specularColorBlended: PropertyNode; -/** - * TSL object that represents the shader variable `SpecularF90`. - * - * @tsl - * @type {PropertyNode} - */ -export const specularF90: PropertyNode; -/** - * TSL object that represents the shader variable `Shininess`. - * - * @tsl - * @type {PropertyNode} - */ -export const shininess: PropertyNode; -/** - * TSL object that represents the shader variable `Output`. - * - * @tsl - * @type {PropertyNode} - */ -export const output: PropertyNode; -/** - * TSL object that represents the shader variable `dashSize`. - * - * @tsl - * @type {PropertyNode} - */ -export const dashSize: PropertyNode; -/** - * TSL object that represents the shader variable `gapSize`. - * - * @tsl - * @type {PropertyNode} - */ -export const gapSize: PropertyNode; -/** - * TSL object that represents the shader variable `pointWidth`. - * - * @tsl - * @type {PropertyNode} - */ -export const pointWidth: PropertyNode; -/** - * TSL object that represents the shader variable `IOR`. - * - * @tsl - * @type {PropertyNode} - */ -export const ior: PropertyNode; -/** - * TSL object that represents the shader variable `Transmission`. - * - * @tsl - * @type {PropertyNode} - */ -export const transmission: PropertyNode; -/** - * TSL object that represents the shader variable `Thickness`. - * - * @tsl - * @type {PropertyNode} - */ -export const thickness: PropertyNode; -/** - * TSL object that represents the shader variable `AttenuationDistance`. - * - * @tsl - * @type {PropertyNode} - */ -export const attenuationDistance: PropertyNode; -/** - * TSL object that represents the shader variable `AttenuationColor`. - * - * @tsl - * @type {PropertyNode} - */ -export const attenuationColor: PropertyNode; -/** - * TSL object that represents the shader variable `Dispersion`. - * - * @tsl - * @type {PropertyNode} - */ -export const dispersion: PropertyNode; -/** - * This class represents a shader property. It can be used - * to explicitly define a property and assign a value to it. - * - * ```js - * const threshold = property( 'float', 'threshold' ).assign( THRESHOLD ); - *``` - * `PropertyNode` is used by the engine to predefined common material properties - * for TSL code. - * - * @augments Node - */ -declare class PropertyNode extends Node { - /** - * Constructs a new property node. - * - * @param {string} nodeType - The type of the node. - * @param {?string} [name=null] - The name of the property in the shader. - * @param {boolean} [varying=false] - Whether this property is a varying or not. - */ - constructor(nodeType: string, name?: string | null, varying?: boolean); - /** - * Whether this property is a varying or not. - * - * @type {boolean} - * @default false - */ - varying: boolean; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isPropertyNode: boolean; - getNodeType(builder: any): any; - getHash(builder: any): string; - generate(builder: any): any; -} -import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/StackNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/StackNode.d.ts deleted file mode 100644 index f15deeef5..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/StackNode.d.ts +++ /dev/null @@ -1,151 +0,0 @@ -export default StackNode; -/** - * TSL function for creating a stack node. - * - * @tsl - * @function - * @param {?StackNode} [parent=null] - The parent stack node. - * @returns {StackNode} - */ -export const stack: any; -/** - * Stack is a helper for Nodes that need to produce stack-based code instead of continuous flow. - * They are usually needed in cases like `If`, `Else`. - * - * @augments Node - */ -declare class StackNode extends Node { - /** - * Constructs a new stack node. - * - * @param {?StackNode} [parent=null] - The parent stack node. - */ - constructor(parent?: StackNode | null); - /** - * List of nodes. - * - * @type {Array} - */ - nodes: Array; - /** - * The output node. - * - * @type {?Node} - * @default null - */ - outputNode: Node | null; - /** - * The parent stack node. - * - * @type {?StackNode} - * @default null - */ - parent: StackNode | null; - /** - * The current conditional node. - * - * @private - * @type {ConditionalNode} - * @default null - */ - private _currentCond; - /** - * The expression node. Only - * relevant for Switch/Case. - * - * @private - * @type {Node} - * @default null - */ - private _expressionNode; - /** - * The current node being processed. - * - * @private - * @type {Node} - * @default null - */ - private _currentNode; - /** - * Stores additional data for nodes that are added to the stack. - * - * @private - * @type {Map} - */ - private _nodeDataLibrary; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStackNode: boolean; - getElementType(builder: any): string; - generateNodeType(builder: any): string; - getMemberType(builder: any, name: any): string; - /** - * Adds a node to this stack. - * - * @param {Node} node - The node to add. - * @param {number} [index=-1] - The index of the node. If not specified, the node will be added to the end of the stack. - * @return {StackNode} A reference to this stack node. - */ - addToStack(node: Node, index?: number): StackNode; - /** - * Adds a node to the stack before the current node. - * - * @param {Node} node - The node to add. - * @return {StackNode} A reference to this stack node. - */ - addToStackBefore(node: Node): StackNode; - /** - * Represent an `if` statement in TSL. - * - * @param {Node} boolNode - Represents the condition. - * @param {Function} method - TSL code which is executed if the condition evaluates to `true`. - * @return {StackNode} A reference to this stack node. - */ - If(boolNode: Node, method: Function): StackNode; - /** - * Represent an `elseif` statement in TSL. - * - * @param {Node} boolNode - Represents the condition. - * @param {Function} method - TSL code which is executed if the condition evaluates to `true`. - * @return {StackNode} A reference to this stack node. - */ - ElseIf(boolNode: Node, method: Function): StackNode; - /** - * Represent an `else` statement in TSL. - * - * @param {Function} method - TSL code which is executed in the `else` case. - * @return {StackNode} A reference to this stack node. - */ - Else(method: Function): StackNode; - /** - * Represents a `switch` statement in TSL. - * - * @param {any} expression - Represents the expression. - * @param {Function} method - TSL code which is executed if the condition evaluates to `true`. - * @return {StackNode} A reference to this stack node. - */ - Switch(expression: any): StackNode; - /** - * Represents a `case` statement in TSL. The TSL version accepts an arbitrary numbers of values. - * The last parameter must be the callback method that should be executed in the `true` case. - * - * @param {...any} params - The values of the `Case()` statement as well as the callback method. - * @return {StackNode} A reference to this stack node. - */ - Case(...params: any[]): StackNode; - /** - * Represents the default code block of a Switch/Case statement. - * - * @param {Function} method - TSL code which is executed in the `else` case. - * @return {StackNode} A reference to this stack node. - */ - Default(method: Function): StackNode; - setup(builder: any): any; - build(builder: any, ...params: any[]): string | Node | null | undefined; -} -import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/StackTrace.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/StackTrace.d.ts deleted file mode 100644 index d870b1d2f..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/StackTrace.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -export default StackTrace; -/** - * Class representing a stack trace for debugging purposes. - */ -declare class StackTrace { - /** - * Creates a StackTrace instance by capturing and filtering the current stack trace. - * - * @param {Error|string|null} stackMessage - An optional stack trace to use instead of capturing a new one. - */ - constructor(stackMessage?: Error | string | null); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStackTrace: boolean; - /** - * The stack trace. - * - * @type {Array<{fn: string, file: string, line: number, column: number}>} - */ - stack: Array<{ - fn: string; - file: string; - line: number; - column: number; - }>; - /** - * Returns a formatted location string of the top stack frame. - * - * @returns {string} The formatted stack trace message. - */ - getLocation(): string; - /** - * Returns the full error message including the stack trace. - * - * @param {string} message - The error message. - * @returns {string} The full error message with stack trace. - */ - getError(message: string): string; -} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/StructNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/StructNode.d.ts deleted file mode 100644 index 0b9c6e2d8..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/StructNode.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -export default StructNode; -export function struct(membersLayout: Object, name?: string | null): Function; -/** - * StructNode allows to create custom structures with multiple members. - * This can also be used to define structures in attribute and uniform data. - * - * ```js - * // Define a custom struct - * const BoundingBox = struct( { min: 'vec3', max: 'vec3' } ); - * - * // Create a new instance of the struct - * const bb = BoundingBox( vec3( 0 ), vec3( 1 ) ); // style 1 - * const bb = BoundingBox( { min: vec3( 0 ), max: vec3( 1 ) } ); // style 2 - * - * // Access the struct members - * const min = bb.get( 'min' ); - * - * // Assign a new value to a member - * min.assign( vec3() ); - * ``` - * @augments Node - */ -declare class StructNode extends Node { - constructor(structTypeNode: any, values: any); - structTypeNode: any; - values: any; - isStructNode: boolean; - generateNodeType(builder: any): any; - getMemberType(builder: any, name: any): any; - _getChildren(): Object[]; - generate(builder: any): any; -} -import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/StructType.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/StructType.d.ts deleted file mode 100644 index af08042f6..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/StructType.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export default StructType; -declare class StructType { - constructor(name: any, members: any); - name: any; - members: any; - output: boolean; -} diff --git a/jsdoc-testing/jsdoc/src/nodes/core/StructTypeNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/StructTypeNode.d.ts deleted file mode 100644 index 7fb5881df..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/StructTypeNode.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -export default StructTypeNode; -/** - * Represents a struct type node in the node-based system. - * This class is used to define and manage the layout and types of struct members. - * It extends the base Node class and provides methods to get the length of the struct, - * retrieve member types, and generate the struct type for a builder. - * - * @augments Node - */ -declare class StructTypeNode extends Node { - /** - * Creates an instance of StructTypeNode. - * - * @param {Object} membersLayout - The layout of the members for the struct. - * @param {?string} [name=null] - The optional name of the struct. - */ - constructor(membersLayout: Object, name?: string | null); - /** - * The layout of the members for the struct - * - * @type {Array.<{name: string, type: string, atomic: boolean}>} - */ - membersLayout: Array<{ - name: string; - type: string; - atomic: boolean; - }>; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStructTypeNode: boolean; - /** - * Returns the length of the struct in 4-byte elements (e.g. float or int components). - * The length is calculated by summing the lengths of the struct's members, accounting for memory alignment. - * To get the size in bytes, multiply the returned value by 4. - * - * @returns {number} The length of the struct in 4-byte elements. - */ - getLength(): number; - getMemberType(builder: any, name: any): string; - generateNodeType(builder: any): any; - setup(builder: any): void; - generate(builder: any): string; -} -import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/SubBuildNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/SubBuildNode.d.ts deleted file mode 100644 index a5227f1b6..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/SubBuildNode.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -export default SubBuildNode; -export function subBuild(node: Node, name: string, type?: string | null): Node; -/** - * This node is used to build a sub-build in the node system. - * - * @augments Node - * @param {Node} node - The node to be built in the sub-build. - * @param {string} name - The name of the sub-build. - * @param {?string} [nodeType=null] - The type of the node, if known. - */ -declare class SubBuildNode extends Node { - constructor(node: any, name: any, nodeType?: null); - /** - * The node to be built in the sub-build. - * - * @type {Node} - */ - node: Node; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSubBuildNode: boolean; - generateNodeType(builder: any): string; - build(builder: any, ...params: any[]): string | Node | null; -} -import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/TempNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/TempNode.d.ts deleted file mode 100644 index ed3119f09..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/TempNode.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -export default TempNode; -/** - * This module uses cache management to create temporary variables - * if the node is used more than once to prevent duplicate calculations. - * - * The class acts as a base class for many other nodes types. - * - * @augments Node - */ -declare class TempNode extends Node { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isTempNode: boolean; - /** - * Whether this node is used more than once in context of other nodes. - * - * @param {NodeBuilder} builder - The node builder. - * @return {boolean} A flag that indicates if there is more than one dependency to other nodes. - */ - hasDependencies(builder: NodeBuilder): boolean; - build(builder: any, output: any): any; -} -import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/UniformGroupNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/UniformGroupNode.d.ts deleted file mode 100644 index f61fdbe5b..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/UniformGroupNode.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -export default UniformGroupNode; -export function uniformGroup(name: string, order?: number, updateType?: null): UniformGroupNode; -export function sharedUniformGroup(name: string, order?: number, updateType?: null): UniformGroupNode; -/** - * TSL object that represents a shared uniform group node which is updated once per frame. - * - * @tsl - * @type {UniformGroupNode} - */ -export const frameGroup: UniformGroupNode; -/** - * TSL object that represents a shared uniform group node which is updated once per render. - * - * @tsl - * @type {UniformGroupNode} - */ -export const renderGroup: UniformGroupNode; -/** - * TSL object that represents a uniform group node which is updated once per object. - * - * @tsl - * @type {UniformGroupNode} - */ -export const objectGroup: UniformGroupNode; -/** - * This node can be used to group single instances of {@link UniformNode} - * and manage them as a uniform buffer. - * - * In most cases, the predefined nodes `objectGroup`, `renderGroup` and `frameGroup` - * will be used when defining the {@link UniformNode#groupNode} property. - * - * - `objectGroup`: Uniform buffer per object. - * - `renderGroup`: Shared uniform buffer, updated once per render call. - * - `frameGroup`: Shared uniform buffer, updated once per frame. - * - * @augments Node - */ -declare class UniformGroupNode extends Node { - /** - * Constructs a new uniform group node. - * - * @param {string} name - The name of the uniform group node. - * @param {boolean} [shared=false] - Whether this uniform group node is shared or not. - * @param {number} [order=1] - Influences the internal sorting. - * @param {string|null} [updateType=null] - The update type of the uniform group node. - */ - constructor(name: string, shared?: boolean, order?: number, updateType?: string | null); - /** - * Whether this uniform group node is shared or not. - * - * @type {boolean} - * @default false - */ - shared: boolean; - /** - * Influences the internal sorting. - * TODO: Add details when this property should be changed. - * - * @type {number} - * @default 1 - */ - order: number; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isUniformGroup: boolean; - /** - * Marks the uniform group node as needing an update. - * This will trigger the necessary updates in the rendering process. - */ - update(): void; -} -import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/UniformNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/UniformNode.d.ts deleted file mode 100644 index f4cb493fb..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/UniformNode.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -export default UniformNode; -export function uniform(value: any | string, type?: string): UniformNode; -/** - * Class for representing a uniform. - * - * @augments InputNode - */ -declare class UniformNode extends InputNode { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isUniformNode: boolean; - /** - * The uniform group of this uniform. By default, uniforms are - * managed per object but they might belong to a shared group - * which is updated per frame or render call. - * - * @type {UniformGroupNode} - */ - groupNode: UniformGroupNode; - /** - * Sets the {@link UniformNode#name} property. - * - * @param {string} name - The name of the uniform. - * @return {UniformNode} A reference to this node. - */ - setName(name: string): UniformNode; - /** - * Sets the {@link UniformNode#name} property. - * - * @deprecated - * @param {string} name - The name of the uniform. - * @return {UniformNode} A reference to this node. - */ - label(name: string): UniformNode; - /** - * Sets the {@link UniformNode#groupNode} property. - * - * @param {UniformGroupNode} group - The uniform group. - * @return {UniformNode} A reference to this node. - */ - setGroup(group: UniformGroupNode): UniformNode; - /** - * Returns the {@link UniformNode#groupNode}. - * - * @return {UniformGroupNode} The uniform group. - */ - getGroup(): UniformGroupNode; - /** - * By default, this method returns the result of {@link Node#getHash} but derived - * classes might overwrite this method with a different implementation. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The uniform hash. - */ - getUniformHash(builder: NodeBuilder): string; - onUpdate(callback: any, updateType: any): import("./Node.js").default; - getInputType(builder: any): string; - generate(builder: any, output: any): any; -} -import InputNode from './InputNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/VarNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/VarNode.d.ts deleted file mode 100644 index 5e200133c..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/VarNode.d.ts +++ /dev/null @@ -1,88 +0,0 @@ -export default VarNode; -export function Var(node: Node, name?: string | null): VarNode; -export function Const(node: Node, name?: string | null): VarNode; -export function VarIntent(node: Node): VarNode; -/** - * Class for representing shader variables as nodes. Variables are created from - * existing nodes like the following: - * - * ```js - * const depth = sampleDepth( uvNode ).toVar( 'depth' ); - * ``` - * - * @augments Node - */ -declare class VarNode extends Node { - /** - * Constructs a new variable node. - * - * @param {Node} node - The node for which a variable should be created. - * @param {?string} [name=null] - The name of the variable in the shader. - * @param {boolean} [readOnly=false] - The read-only flag. - */ - constructor(node: Node, name?: string | null, readOnly?: boolean); - /** - * The node for which a variable should be created. - * - * @type {Node} - */ - node: Node; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isVarNode: boolean; - /** - * - * The read-only flag. - * - * @type {boolean} - * @default false - */ - readOnly: boolean; - /** - * This flag is used to indicate that this node is used for intent. - * - * @type {boolean} - * @default false - */ - intent: boolean; - /** - * Sets the intent flag for this node. - * - * This flag is used to indicate that this node is used for intent - * and should not be built directly. Instead, it is used to indicate that - * the node should be treated as a variable intent. - * - * It's useful for assigning variables without needing creating a new variable node. - * - * @param {boolean} value - The value to set for the intent flag. - * @returns {VarNode} This node. - */ - setIntent(value: boolean): VarNode; - /** - * Checks if this node is used for intent. - * - * @param {NodeBuilder} builder - The node builder. - * @returns {boolean} Whether this node is used for intent. - */ - isIntent(builder: NodeBuilder): boolean; - /** - * Returns the intent flag of this node. - * - * @return {boolean} The intent flag. - */ - getIntent(): boolean; - getMemberType(builder: any, name: any): string; - getElementType(builder: any): string; - generateNodeType(builder: any): string; - getArrayCount(builder: any): number | null; - isAssign(builder: any): any; - build(...params: any[]): string | Node | null; - generate(builder: any): any; - _hasStack(builder: any): boolean; -} -import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/VaryingNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/VaryingNode.d.ts deleted file mode 100644 index 4833ad311..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/VaryingNode.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -export default VaryingNode; -/** - * TSL function for creating a varying node. - * - * @tsl - * @function - * @param {Node} node - The node for which a varying should be created. - * @param {?string} name - The name of the varying in the shader. - * @returns {VaryingNode} - */ -export const varying: any; -export function vertexStage(node: Node): VaryingNode; -/** - * Class for representing shader varyings as nodes. Varyings are create from - * existing nodes like the following: - * - * ```js - * const positionLocal = positionGeometry.toVarying( 'vPositionLocal' ); - * ``` - * - * @augments Node - */ -declare class VaryingNode extends Node { - /** - * Constructs a new varying node. - * - * @param {Node} node - The node for which a varying should be created. - * @param {?string} name - The name of the varying in the shader. - */ - constructor(node: Node, name?: string | null); - /** - * The node for which a varying should be created. - * - * @type {Node} - */ - node: Node; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isVaryingNode: boolean; - /** - * The interpolation type of the varying data. - * - * @type {?string} - * @default null - */ - interpolationType: string | null; - /** - * The interpolation sampling type of varying data. - * - * @type {?string} - * @default null - */ - interpolationSampling: string | null; - /** - * Defines the interpolation type of the varying. - * - * @param {string} type - The interpolation type. - * @param {?string} sampling - The interpolation sampling type - * @return {VaryingNode} A reference to this node. - */ - setInterpolation(type: string, sampling?: string | null): VaryingNode; - getHash(builder: any): string; - generateNodeType(builder: any): string; - /** - * This method performs the setup of a varying node with the current node builder. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {NodeVarying} The node varying from the node builder. - */ - setupVarying(builder: NodeBuilder): NodeVarying; - setup(builder: any): void; - analyze(builder: any): void; - generate(builder: any): any; -} -import Node from './Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/core/constants.d.ts b/jsdoc-testing/jsdoc/src/nodes/core/constants.d.ts deleted file mode 100644 index 5d342ff3a..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/core/constants.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -export namespace NodeShaderStage { - let VERTEX: string; - let FRAGMENT: string; -} -export namespace NodeUpdateType { - let NONE: string; - let FRAME: string; - let RENDER: string; - let OBJECT: string; -} -export namespace NodeType { - let BOOLEAN: string; - let INTEGER: string; - let FLOAT: string; - let VECTOR2: string; - let VECTOR3: string; - let VECTOR4: string; - let MATRIX2: string; - let MATRIX3: string; - let MATRIX4: string; -} -export namespace NodeAccess { - let READ_ONLY: string; - let WRITE_ONLY: string; - let READ_WRITE: string; -} -export const defaultShaderStages: string[]; -export const defaultBuildStages: string[]; -export const shaderStages: string[]; -export const vectorComponents: string[]; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/BlendModes.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/BlendModes.d.ts deleted file mode 100644 index 243a98ae5..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/display/BlendModes.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Represents a "Color Burn" blend mode. - * - * It's designed to darken the base layer's colors based on the color of the blend layer. - * It significantly increases the contrast of the base layer, making the colors more vibrant and saturated. - * The darker the color in the blend layer, the stronger the darkening and contrast effect on the base layer. - * - * @tsl - * @function - * @param {Node} base - The base color. - * @param {Node} blend - The blend color. A white (#ffffff) blend color does not alter the base color. - * @return {Node} The result. - */ -export const blendBurn: any; -/** - * Represents a "Color Dodge" blend mode. - * - * It's designed to lighten the base layer's colors based on the color of the blend layer. - * It significantly increases the brightness of the base layer, making the colors lighter and more vibrant. - * The brighter the color in the blend layer, the stronger the lightening and contrast effect on the base layer. - * - * @tsl - * @function - * @param {Node} base - The base color. - * @param {Node} blend - The blend color. A black (#000000) blend color does not alter the base color. - * @return {Node} The result. - */ -export const blendDodge: any; -/** - * Represents a "Screen" blend mode. - * - * Similar to `blendDodge()`, this mode also lightens the base layer's colors based on the color of the blend layer. - * The "Screen" blend mode is better for general brightening whereas the "Dodge" results in more subtle and nuanced - * effects. - * - * @tsl - * @function - * @param {Node} base - The base color. - * @param {Node} blend - The blend color. A black (#000000) blend color does not alter the base color. - * @return {Node} The result. - */ -export const blendScreen: any; -/** - * Represents a "Overlay" blend mode. - * - * It's designed to increase the contrast of the base layer based on the color of the blend layer. - * It amplifies the existing colors and contrast in the base layer, making lighter areas lighter and darker areas darker. - * The color of the blend layer significantly influences the resulting contrast and color shift in the base layer. - * - * @tsl - * @function - * @param {Node} base - The base color. - * @param {Node} blend - The blend color - * @return {Node} The result. - */ -export const blendOverlay: any; -/** - * This function blends two color based on their alpha values by replicating the behavior of `THREE.NormalBlending`. - * It assumes both input colors have non-premultiplied alpha. - * - * @tsl - * @function - * @param {Node} base - The base color. - * @param {Node} blend - The blend color - * @return {Node} The result. - */ -export const blendColor: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/BumpMapNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/BumpMapNode.d.ts deleted file mode 100644 index 08aa47f62..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/display/BumpMapNode.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -export default BumpMapNode; -/** - * TSL function for creating a bump map node. - * - * @tsl - * @function - * @param {Node} textureNode - Represents the bump map data. - * @param {?Node} [scaleNode=null] - Controls the intensity of the bump effect. - * @returns {BumpMapNode} - */ -export const bumpMap: any; -/** - * This class can be used for applying bump maps to materials. - * - * ```js - * material.normalNode = bumpMap( texture( bumpTex ) ); - * ``` - * - * @augments TempNode - */ -declare class BumpMapNode extends TempNode { - /** - * Constructs a new bump map node. - * - * @param {Node} textureNode - Represents the bump map data. - * @param {?Node} [scaleNode=null] - Controls the intensity of the bump effect. - */ - constructor(textureNode: Node, scaleNode?: Node | null); - /** - * Represents the bump map data. - * - * @type {Node} - */ - textureNode: Node; - /** - * Controls the intensity of the bump effect. - * - * @type {?Node} - * @default null - */ - scaleNode: Node | null; - setup(): void; -} -import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ColorAdjustment.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ColorAdjustment.d.ts deleted file mode 100644 index 342c82742..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/display/ColorAdjustment.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Computes a grayscale value for the given RGB color value. - * - * @tsl - * @function - * @param {Node} color - The color value to compute the grayscale for. - * @return {Node} The grayscale color. - */ -export const grayscale: () => void; -/** - * Super-saturates or desaturates the given RGB color. - * - * @tsl - * @function - * @param {Node} color - The input color. - * @param {Node} [adjustment=1] - Specifies the amount of the conversion. A value under `1` desaturates the color, a value over `1` super-saturates it. - * @return {Node} The saturated color. - */ -export const saturation: () => void; -/** - * Selectively enhance the intensity of less saturated RGB colors. Can result - * in a more natural and visually appealing image with enhanced color depth - * compared to {@link ColorAdjustment#saturation}. - * - * @tsl - * @function - * @param {Node} color - The input color. - * @param {Node} [adjustment=1] - Controls the intensity of the vibrance effect. - * @return {Node} The updated color. - */ -export const vibrance: () => void; -/** - * Updates the hue component of the given RGB color while preserving its luminance and saturation. - * - * @tsl - * @function - * @param {Node} color - The input color. - * @param {Node} [adjustment=1] - Defines the degree of hue rotation in radians. A positive value rotates the hue clockwise, while a negative value rotates it counterclockwise. - * @return {Node} The updated color. - */ -export const hue: () => void; -export function luminance(color: Node, luminanceCoefficients?: Node | null): Node; -/** - * Color Decision List (CDL) v1.2 - * - * Compact representation of color grading information, defined by slope, offset, power, and - * saturation. The CDL should be typically be given input in a log space (such as LogC, ACEScc, - * or AgX Log), and will return output in the same space. Output may require clamping >=0. - * - * @tsl - * @function - * @param {Node} color Input (-Infinity < input < +Infinity) - * @param {Node} slope Slope (0 ≤ slope < +Infinity) - * @param {Node} offset Offset (-Infinity < offset < +Infinity; typically -1 < offset < 1) - * @param {Node} power Power (0 < power < +Infinity) - * @param {Node} saturation Saturation (0 ≤ saturation < +Infinity; typically 0 ≤ saturation < 4) - * @param {Node} luminanceCoefficients Luminance coefficients for saturation term, typically Rec. 709 - * @return {Node} Output, -Infinity < output < +Infinity - * - * References: - * - ASC CDL v1.2 - * - {@link https://blender.stackexchange.com/a/55239/43930} - * - {@link https://docs.acescentral.com/specifications/acescc/} - */ -export const cdl: () => void; -/** - * TSL function for creating a posterize effect which reduces the number of colors - * in an image, resulting in a more blocky and stylized appearance. - * - * @tsl - * @function - * @param {Node} sourceNode - The input color. - * @param {Node} stepsNode - Controls the intensity of the posterization effect. A lower number results in a more blocky appearance. - * @returns {Node} The posterized color. - */ -export const posterize: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ColorSpaceFunctions.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ColorSpaceFunctions.d.ts deleted file mode 100644 index 2677fb978..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/display/ColorSpaceFunctions.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Converts the given color value from sRGB to linear-sRGB color space. - * - * @tsl - * @function - * @param {Node} color - The sRGB color. - * @return {Node} The linear-sRGB color. - */ -export const sRGBTransferEOTF: any; -/** - * Converts the given color value from linear-sRGB to sRGB color space. - * - * @tsl - * @function - * @param {Node} color - The linear-sRGB color. - * @return {Node} The sRGB color. - */ -export const sRGBTransferOETF: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ColorSpaceNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ColorSpaceNode.d.ts deleted file mode 100644 index 37eaac303..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/display/ColorSpaceNode.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -export default ColorSpaceNode; -export function workingToColorSpace(node: Node, targetColorSpace: string): ColorSpaceNode; -export function colorSpaceToWorking(node: Node, sourceColorSpace: string): ColorSpaceNode; -export function convertColorSpace(node: Node, sourceColorSpace: string, targetColorSpace: string): ColorSpaceNode; -/** - * This node represents a color space conversion. Meaning it converts - * a color value from a source to a target color space. - * - * @augments TempNode - */ -declare class ColorSpaceNode extends TempNode { - /** - * Constructs a new color space node. - * - * @param {Node} colorNode - Represents the color to convert. - * @param {string} source - The source color space. - * @param {string} target - The target color space. - */ - constructor(colorNode: Node, source: string, target: string); - /** - * Represents the color to convert. - * - * @type {Node} - */ - colorNode: Node; - /** - * The source color space. - * - * @type {string} - */ - source: string; - /** - * The target color space. - * - * @type {string} - */ - target: string; - /** - * This method resolves the constants `WORKING_COLOR_SPACE` and - * `OUTPUT_COLOR_SPACE` based on the current configuration of the - * color management and renderer. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} colorSpace - The color space to resolve. - * @return {string} The resolved color space. - */ - resolveColorSpace(builder: NodeBuilder, colorSpace: string): string; - setup(builder: any): Node; -} -import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/FrontFacingNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/FrontFacingNode.d.ts deleted file mode 100644 index 8a54e2d33..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/display/FrontFacingNode.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -export default FrontFacingNode; -/** - * TSL object that represents whether a primitive is front or back facing - * - * @tsl - * @type {FrontFacingNode} - */ -export const frontFacing: FrontFacingNode; -/** - * TSL object that represents the front facing status as a number instead of a bool. - * `1` means front facing, `-1` means back facing. - * - * @tsl - * @type {Node} - */ -export const faceDirection: Node; -/** - * Converts a direction vector to a face direction vector based on the material's side. - * - * If the material is set to `BackSide`, the direction is inverted. - * If the material is set to `DoubleSide`, the direction is multiplied by `faceDirection`. - * - * @tsl - * @param {Node} direction - The direction vector to convert. - * @returns {Node} The converted direction vector. - */ -export const directionToFaceDirection: () => void; -/** - * This node can be used to evaluate whether a primitive is front or back facing. - * - * @augments Node - */ -declare class FrontFacingNode extends Node { - /** - * Constructs a new front facing node. - */ - constructor(); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isFrontFacingNode: boolean; - generate(builder: any): any; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/NormalMapNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/NormalMapNode.d.ts deleted file mode 100644 index a87be475f..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/display/NormalMapNode.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -export default NormalMapNode; -/** - * TSL function for creating a normal map node. - * - * @tsl - * @function - * @param {Node} node - Represents the normal map data. - * @param {?Node} [scaleNode=null] - Controls the intensity of the effect. - * @returns {NormalMapNode} - */ -export const normalMap: any; -/** - * This class can be used for applying normals maps to materials. - * - * ```js - * material.normalNode = normalMap( texture( normalTex ) ); - * ``` - * - * @augments TempNode - */ -declare class NormalMapNode extends TempNode { - /** - * Constructs a new normal map node. - * - * @param {Node} node - Represents the normal map data. - * @param {?Node} [scaleNode=null] - Controls the intensity of the effect. - */ - constructor(node: Node, scaleNode?: Node | null); - /** - * Represents the normal map data. - * - * @type {Node} - */ - node: Node; - /** - * Controls the intensity of the effect. - * - * @type {?Node} - * @default null - */ - scaleNode: Node | null; - /** - * The normal map type. - * - * @type {(TangentSpaceNormalMap|ObjectSpaceNormalMap)} - * @default TangentSpaceNormalMap - */ - normalMapType: (number | number); - /** - * Controls how to unpack the sampled normal map values. - * - * @type {string} - * @default NoNormalPacking - */ - unpackNormalMode: string; - setup(builder: any): any; -} -import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/PassNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/PassNode.d.ts deleted file mode 100644 index 2942924e3..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/display/PassNode.d.ts +++ /dev/null @@ -1,403 +0,0 @@ -export default PassNode; -export function pass(scene: Scene, camera: Camera, options: Object): PassNode; -export function passTexture(pass: PassNode, texture: Texture): PassTextureNode; -export function depthPass(scene: Scene, camera: Camera, options: Object): PassNode; -/** - * Represents a render pass (sometimes called beauty pass) in context of post processing. - * This pass produces a render for the given scene and camera and can provide multiple outputs - * via MRT for further processing. - * - * ```js - * const postProcessing = new RenderPipeline( renderer ); - * - * const scenePass = pass( scene, camera ); - * - * postProcessing.outputNode = scenePass; - * ``` - * - * @augments TempNode - */ -declare class PassNode extends TempNode { - /** - * Constructs a new pass node. - * - * @param {('color'|'depth')} scope - The scope of the pass. The scope determines whether the node outputs color or depth. - * @param {Scene} scene - A reference to the scene. - * @param {Camera} camera - A reference to the camera. - * @param {Object} options - Options for the internal render target. - */ - constructor(scope: ("color" | "depth"), scene: Scene, camera: Camera, options?: Object); - /** - * The scope of the pass. The scope determines whether the node outputs color or depth. - * - * @type {('color'|'depth')} - */ - scope: ("color" | "depth"); - /** - * A reference to the scene. - * - * @type {Scene} - */ - scene: Scene; - /** - * A reference to the camera. - * - * @type {Camera} - */ - camera: Camera; - /** - * Options for the internal render target. - * - * @type {Object} - */ - options: Object; - /** - * The pass's pixel width. Will be kept automatically kept in sync with the renderer's width. - * @private - * @type {number} - * @default 1 - */ - private _width; - /** - * The pass's pixel height. Will be kept automatically kept in sync with the renderer's height. - * @private - * @type {number} - * @default 1 - */ - private _height; - /** - * The pass's render target. - * - * @type {RenderTarget} - */ - renderTarget: RenderTarget; - /** - * An optional override material for the pass. - * - * @type {Material|null} - */ - overrideMaterial: Material | null; - /** - * Whether the pass is transparent. - * - * @type {boolean} - * @default false - */ - transparent: boolean; - /** - * Whether the pass is opaque. - * - * @type {boolean} - * @default true - */ - opaque: boolean; - /** - * An optional global context for the pass. - * - * @type {ContextNode|null} - */ - contextNode: ContextNode | null; - /** - * A cache for the context node. - * - * @private - * @type {?Object} - * @default null - */ - private _contextNodeCache; - /** - * A dictionary holding the internal result textures. - * - * @private - * @type {{ output: Texture, depth: ?DepthTexture }} - */ - private _textures; - /** - * A dictionary holding the internal texture nodes. - * - * @private - * @type {Object} - */ - private _textureNodes; - /** - * A dictionary holding the internal depth nodes. - * - * @private - * @type {Object} - */ - private _linearDepthNodes; - /** - * A dictionary holding the internal viewZ nodes. - * - * @private - * @type {Object} - */ - private _viewZNodes; - /** - * A dictionary holding the texture data of the previous frame. - * Used for computing velocity/motion vectors. - * - * @private - * @type {Object} - */ - private _previousTextures; - /** - * A dictionary holding the texture nodes of the previous frame. - * Used for computing velocity/motion vectors. - * - * @private - * @type {Object} - */ - private _previousTextureNodes; - /** - * The `near` property of the camera as a uniform. - * - * @private - * @type {UniformNode} - */ - private _cameraNear; - /** - * The `far` property of the camera as a uniform. - * - * @private - * @type {UniformNode} - */ - private _cameraFar; - /** - * A MRT node configuring the MRT settings. - * - * @private - * @type {?MRTNode} - * @default null - */ - private _mrt; - /** - * Layer object for configuring the camera that is used - * to produce the pass. - * - * @private - * @type {?Layers} - * @default null - */ - private _layers; - /** - * Scales the resolution of the internal render target. - * - * @private - * @type {number} - * @default 1 - */ - private _resolutionScale; - /** - * Custom viewport definition. - * - * @private - * @type {?Vector4} - * @default null - */ - private _viewport; - /** - * Custom scissor definition. - * - * @private - * @type {?Vector4} - * @default null - */ - private _scissor; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isPassNode: boolean; - /** - * Sets the resolution scale for the pass. - * The resolution scale is a factor that is multiplied with the renderer's width and height. - * - * @param {number} resolutionScale - The resolution scale to set. A value of `1` means full resolution. - * @return {PassNode} A reference to this pass. - */ - setResolutionScale(resolutionScale: number): PassNode; - /** - * Gets the current resolution scale of the pass. - * - * @return {number} The current resolution scale. A value of `1` means full resolution. - */ - getResolutionScale(): number; - /** - * Sets the resolution for the pass. - * The resolution is a factor that is multiplied with the renderer's width and height. - * - * @param {number} resolution - The resolution to set. A value of `1` means full resolution. - * @return {PassNode} A reference to this pass. - * @deprecated since r181. Use {@link PassNode#setResolutionScale `setResolutionScale()`} instead. - */ - setResolution(resolution: number): PassNode; - /** - * Gets the current resolution of the pass. - * - * @return {number} The current resolution. A value of `1` means full resolution. - * @deprecated since r181. Use {@link PassNode#getResolutionScale `getResolutionScale()`} instead. - */ - getResolution(): number; - /** - * Sets the layer configuration that should be used when rendering the pass. - * - * @param {Layers} layers - The layers object to set. - * @return {PassNode} A reference to this pass. - */ - setLayers(layers: Layers): PassNode; - /** - * Gets the current layer configuration of the pass. - * - * @return {?Layers} . - */ - getLayers(): Layers | null; - /** - * Sets the given MRT node to setup MRT for this pass. - * - * @param {MRTNode} mrt - The MRT object. - * @return {PassNode} A reference to this pass. - */ - setMRT(mrt: MRTNode): PassNode; - /** - * Returns the current MRT node. - * - * @return {MRTNode} The current MRT node. - */ - getMRT(): MRTNode; - /** - * Returns the texture for the given output name. - * - * @param {string} name - The output name to get the texture for. - * @return {Texture} The texture. - */ - getTexture(name: string): Texture; - /** - * Returns the texture holding the data of the previous frame for the given output name. - * - * @param {string} name - The output name to get the texture for. - * @return {Texture} The texture holding the data of the previous frame. - */ - getPreviousTexture(name: string): Texture; - /** - * Switches current and previous textures for the given output name. - * - * @param {string} name - The output name. - */ - toggleTexture(name: string): void; - /** - * Returns the texture node for the given output name. - * - * @param {string} [name='output'] - The output name to get the texture node for. - * @return {TextureNode} The texture node. - */ - getTextureNode(name?: string): TextureNode; - /** - * Returns the previous texture node for the given output name. - * - * @param {string} [name='output'] - The output name to get the previous texture node for. - * @return {TextureNode} The previous texture node. - */ - getPreviousTextureNode(name?: string): TextureNode; - /** - * Returns a viewZ node of this pass. - * - * @param {string} [name='depth'] - The output name to get the viewZ node for. In most cases the default `'depth'` can be used however the parameter exists for custom depth outputs. - * @return {Node} The viewZ node. - */ - getViewZNode(name?: string): Node; - /** - * Returns a linear depth node of this pass. - * - * @param {string} [name='depth'] - The output name to get the linear depth node for. In most cases the default `'depth'` can be used however the parameter exists for custom depth outputs. - * @return {Node} The linear depth node. - */ - getLinearDepthNode(name?: string): Node; - /** - * Precompiles the pass. - * - * Note that this method must be called after the pass configuration is complete. - * So calls like `setMRT()` and `getTextureNode()` must proceed the precompilation. - * - * @async - * @param {Renderer} renderer - The renderer. - * @return {Promise} A Promise that resolves when the compile has been finished. - * @see {@link Renderer#compileAsync} - */ - compileAsync(renderer: Renderer): Promise; - setup({ renderer }: { - renderer: any; - }): Node | TextureNode; - updateBefore(frame: any): void; - /** - * Sets the size of the pass's render target. Honors the pixel ratio. - * - * @param {number} width - The width to set. - * @param {number} height - The height to set. - */ - setSize(width: number, height: number): void; - /** - * This method allows to define the pass's scissor rectangle. By default, the scissor rectangle is kept - * in sync with the pass's dimensions. To reverse the process and use auto-sizing again, call the method - * with `null` as the single argument. - * - * @param {?(number | Vector4)} x - The horizontal coordinate for the lower left corner of the box in logical pixel unit. - * Instead of passing four arguments, the method also works with a single four-dimensional vector. - * @param {number} y - The vertical coordinate for the lower left corner of the box in logical pixel unit. - * @param {number} width - The width of the scissor box in logical pixel unit. - * @param {number} height - The height of the scissor box in logical pixel unit. - */ - setScissor(x: (number | Vector4) | null, y: number, width: number, height: number): void; - /** - * This method allows to define the pass's viewport. By default, the viewport is kept in sync - * with the pass's dimensions. To reverse the process and use auto-sizing again, call the method - * with `null` as the single argument. - * - * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the viewport origin in logical pixel unit. - * @param {number} y - The vertical coordinate for the lower left corner of the viewport origin in logical pixel unit. - * @param {number} width - The width of the viewport in logical pixel unit. - * @param {number} height - The height of the viewport in logical pixel unit. - */ - setViewport(x: number | Vector4, y: number, width: number, height: number): void; -} -declare namespace PassNode { - let COLOR: "color"; - let DEPTH: "depth"; -} -/** - * Represents the texture of a pass node. - * - * @augments TextureNode - */ -declare class PassTextureNode extends TextureNode { - /** - * Constructs a new pass texture node. - * - * @param {PassNode} passNode - The pass node. - * @param {Texture} texture - The output texture. - */ - constructor(passNode: PassNode, texture: Texture); - /** - * A reference to the pass node. - * - * @type {PassNode} - */ - passNode: PassNode; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @default true - * @readonly - */ - readonly isPassTextureNode: boolean; - setup(builder: any): void; - clone(): any; -} -import TempNode from '../core/TempNode.js'; -import { RenderTarget } from '../../core/RenderTarget.js'; -import { default as TextureNode } from '../accessors/TextureNode.js'; -import { Vector4 } from '../../math/Vector4.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/PremultiplyAlphaFunctions.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/PremultiplyAlphaFunctions.d.ts deleted file mode 100644 index bcf1b8bef..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/display/PremultiplyAlphaFunctions.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Premultiplies the RGB channels of a color by its alpha channel. - * - * This function is useful for converting a non-premultiplied alpha color - * into a premultiplied alpha format, where the RGB values are scaled - * by the alpha value. Premultiplied alpha is often used in graphics - * rendering for certain operations, such as compositing and image processing. - * - * @tsl - * @function - * @param {Node} color - The input color with non-premultiplied alpha. - * @return {Node} The color with premultiplied alpha. - */ -export const premultiplyAlpha: () => void; -/** - * Unpremultiplies the RGB channels of a color by its alpha channel. - * - * This function is useful for converting a premultiplied alpha color - * back into a non-premultiplied alpha format, where the RGB values are - * divided by the alpha value. Unpremultiplied alpha is often used in graphics - * rendering for certain operations, such as compositing and image processing. - * - * @tsl - * @function - * @param {Node} color - The input color with premultiplied alpha. - * @return {Node} The color with non-premultiplied alpha. - */ -export const unpremultiplyAlpha: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/RenderOutputNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/RenderOutputNode.d.ts deleted file mode 100644 index d469787e9..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/display/RenderOutputNode.d.ts +++ /dev/null @@ -1,79 +0,0 @@ -export default RenderOutputNode; -export function renderOutput(color: Node, toneMapping?: number | null, outputColorSpace?: string | null): RenderOutputNode; -/** - * Normally, tone mapping and color conversion happens automatically just - * before outputting a pixel to the default (screen) framebuffer. In certain - * post processing setups this is too late because some effects such as FXAA - * require e.g. sRGB input. For such scenarios, `RenderOutputNode` can be used - * to apply tone mapping and color space conversion at an arbitrary point - * in the effect chain. - * - * When applying tone mapping and color space conversion manually with this node, - * you have to set {@link RenderPipeline#outputColorTransform} to `false`. - * - * ```js - * const postProcessing = new RenderPipeline( renderer ); - * postProcessing.outputColorTransform = false; - * - * const scenePass = pass( scene, camera ); - * const outputPass = renderOutput( scenePass ); - * - * postProcessing.outputNode = outputPass; - * ``` - * - * @augments TempNode - */ -declare class RenderOutputNode extends TempNode { - /** - * Constructs a new render output node. - * - * @param {Node} colorNode - The color node to process. - * @param {?number} toneMapping - The tone mapping type. - * @param {?string} outputColorSpace - The output color space. - */ - constructor(colorNode: Node, toneMapping: number | null, outputColorSpace: string | null); - /** - * The color node to process. - * - * @type {Node} - */ - colorNode: Node; - /** - * The tone mapping type. - * - * @private - * @type {?number} - */ - private _toneMapping; - /** - * The output color space. - * - * @type {?string} - */ - outputColorSpace: string | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isRenderOutputNode: boolean; - /** - * Sets the tone mapping type. - * - * @param {number} value - The tone mapping type. - * @return {ToneMappingNode} A reference to this node. - */ - setToneMapping(value: number): ToneMappingNode; - /** - * Gets the tone mapping type. - * - * @returns {number} The tone mapping type. - */ - getToneMapping(): number; - setup({ context }: { - context: any; - }): Node; -} -import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ScreenNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ScreenNode.d.ts deleted file mode 100644 index b721d4072..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/display/ScreenNode.d.ts +++ /dev/null @@ -1,127 +0,0 @@ -export default ScreenNode; -/** - * TSL object that represents the current DPR. - * - * @tsl - * @type {ScreenNode} - */ -export const screenDPR: ScreenNode; -/** - * TSL object that represents normalized screen coordinates, unitless in `[0, 1]`. - * - * @tsl - * @type {ScreenNode} - */ -export const screenUV: ScreenNode; -/** - * TSL object that represents the screen resolution in physical pixel units. - * - * @tsl - * @type {ScreenNode} - */ -export const screenSize: ScreenNode; -/** - * TSL object that represents the current `x`/`y` pixel position on the screen in physical pixel units. - * - * @tsl - * @type {ScreenNode} - */ -export const screenCoordinate: ScreenNode; -/** - * TSL object that represents the viewport rectangle as `x`, `y`, `width` and `height` in physical pixel units. - * - * @tsl - * @type {ScreenNode} - */ -export const viewport: ScreenNode; -/** - * TSL object that represents the viewport resolution in physical pixel units. - * - * @tsl - * @type {ScreenNode} - */ -export const viewportSize: ScreenNode; -/** - * TSL object that represents the current `x`/`y` pixel position on the viewport in physical pixel units. - * - * @tsl - * @type {ScreenNode} - */ -export const viewportCoordinate: ScreenNode; -/** - * TSL object that represents normalized viewport coordinates, unitless in `[0, 1]`. - * - * @tsl - * @type {ScreenNode} - */ -export const viewportUV: ScreenNode; -/** - * @deprecated since r169. Use {@link screenSize} instead. - */ -export const viewportResolution: any; -/** - * This node provides a collection of screen related metrics. - * Depending on {@link ScreenNode#scope}, the nodes can represent - * resolution or viewport data as well as fragment or uv coordinates. - * - * @augments Node - */ -declare class ScreenNode extends Node { - /** - * Constructs a new screen node. - * - * @param {('coordinate'|'viewport'|'size'|'uv'|'dpr')} scope - The node's scope. - */ - constructor(scope: ("coordinate" | "viewport" | "size" | "uv" | "dpr")); - /** - * The node represents different metric depending on which scope is selected. - * - * - `ScreenNode.COORDINATE`: Window-relative coordinates of the current fragment according to WebGPU standards. - * - `ScreenNode.VIEWPORT`: The current viewport defined as a four-dimensional vector. - * - `ScreenNode.SIZE`: The dimensions of the current bound framebuffer. - * - `ScreenNode.UV`: Normalized coordinates. - * - `ScreenNode.DPR`: Device pixel ratio. - * - * @type {('coordinate'|'viewport'|'size'|'uv'|'dpr')} - */ - scope: ("coordinate" | "viewport" | "size" | "uv" | "dpr"); - /** - * This output node. - * - * @private - * @type {?Node} - * @default null - */ - private _output; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isViewportNode: boolean; - /** - * This method is overwritten since the node type depends on the selected scope. - * - * @return {('float'|'vec2'|'vec4')} The node type. - */ - generateNodeType(): ("float" | "vec2" | "vec4"); - /** - * `ScreenNode` implements {@link Node#update} to retrieve viewport and size information - * from the current renderer. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update({ renderer }: NodeFrame): void; - setup(): any; - generate(builder: any): any; -} -declare namespace ScreenNode { - let COORDINATE: string; - let VIEWPORT: string; - let SIZE: string; - let UV: string; - let DPR: string; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ToneMappingFunctions.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ToneMappingFunctions.d.ts deleted file mode 100644 index 2d04148f4..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/display/ToneMappingFunctions.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Linear tone mapping, exposure only. - * - * @tsl - * @function - * @param {Node} color - The color that should be tone mapped. - * @param {Node} exposure - The exposure. - * @return {Node} The tone mapped color. - */ -export const linearToneMapping: any; -/** - * Reinhard tone mapping. - * - * Reference: {@link https://www.cs.utah.edu/docs/techreports/2002/pdf/UUCS-02-001.pdf} - * - * @tsl - * @function - * @param {Node} color - The color that should be tone mapped. - * @param {Node} exposure - The exposure. - * @return {Node} The tone mapped color. - */ -export const reinhardToneMapping: any; -/** - * Cineon tone mapping. - * - * Reference: {@link http://filmicworlds.com/blog/filmic-tonemapping-operators/} - * - * @tsl - * @function - * @param {Node} color - The color that should be tone mapped. - * @param {Node} exposure - The exposure. - * @return {Node} The tone mapped color. - */ -export const cineonToneMapping: any; -/** - * ACESFilmic tone mapping. - * - * Reference: {@link https://github.com/selfshadow/ltc_code/blob/master/webgl/shaders/ltc/ltc_blit.fs} - * - * @tsl - * @function - * @param {Node} color - The color that should be tone mapped. - * @param {Node} exposure - The exposure. - * @return {Node} The tone mapped color. - */ -export const acesFilmicToneMapping: any; -/** - * AgX tone mapping. - * - * @tsl - * @function - * @param {Node} color - The color that should be tone mapped. - * @param {Node} exposure - The exposure. - * @return {Node} The tone mapped color. - */ -export const agxToneMapping: any; -/** - * Neutral tone mapping. - * - * Reference: {@link https://modelviewer.dev/examples/tone-mapping} - * - * @tsl - * @function - * @param {Node} color - The color that should be tone mapped. - * @param {Node} exposure - The exposure. - * @return {Node} The tone mapped color. - */ -export const neutralToneMapping: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ToneMappingNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ToneMappingNode.d.ts deleted file mode 100644 index 7e8ca1871..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/display/ToneMappingNode.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -export default ToneMappingNode; -export function toneMapping(mapping: number, exposure: Node | number, color: Node | Color): ToneMappingNode; -/** - * TSL object that represents the global tone mapping exposure of the renderer. - * - * @tsl - * @type {RendererReferenceNode} - */ -export const toneMappingExposure: RendererReferenceNode; -/** - * This node represents a tone mapping operation. - * - * @augments TempNode - */ -declare class ToneMappingNode extends TempNode { - /** - * Constructs a new tone mapping node. - * - * @param {number} toneMapping - The tone mapping type. - * @param {Node} exposureNode - The tone mapping exposure. - * @param {Node} [colorNode=null] - The color node to process. - */ - constructor(toneMapping: number, exposureNode?: Node, colorNode?: Node); - /** - * The tone mapping type. - * - * @private - * @type {number} - */ - private _toneMapping; - /** - * The tone mapping exposure. - * - * @type {Node} - * @default null - */ - exposureNode: Node; - /** - * Represents the color to process. - * - * @type {?Node} - * @default null - */ - colorNode: Node | null; - /** - * Sets the tone mapping type. - * - * @param {number} value - The tone mapping type. - * @return {ToneMappingNode} A reference to this node. - */ - setToneMapping(value: number): ToneMappingNode; - /** - * Gets the tone mapping type. - * - * @returns {number} The tone mapping type. - */ - getToneMapping(): number; - setup(builder: any): any; -} -import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ToonOutlinePassNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ToonOutlinePassNode.d.ts deleted file mode 100644 index cb934f4cb..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/display/ToonOutlinePassNode.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -export default ToonOutlinePassNode; -export function toonOutlinePass(scene: Scene, camera: Camera, color?: Color, thickness?: number, alpha?: number): ToonOutlinePassNode; -/** - * Represents a render pass for producing a toon outline effect on compatible objects. - * Only 3D objects with materials of type `MeshToonMaterial` and `MeshToonNodeMaterial` - * will receive the outline. - * - * ```js - * const postProcessing = new RenderPipeline( renderer ); - * - * const scenePass = toonOutlinePass( scene, camera ); - * - * postProcessing.outputNode = scenePass; - * ``` - * @augments PassNode - */ -declare class ToonOutlinePassNode extends PassNode { - /** - * Constructs a new outline pass node. - * - * @param {Scene} scene - A reference to the scene. - * @param {Camera} camera - A reference to the camera. - * @param {Node} colorNode - Defines the outline's color. - * @param {Node} thicknessNode - Defines the outline's thickness. - * @param {Node} alphaNode - Defines the outline's alpha. - */ - constructor(scene: Scene, camera: Camera, colorNode: Node, thicknessNode: Node, alphaNode: Node); - /** - * Defines the outline's color. - * - * @type {Node} - */ - colorNode: Node; - /** - * Defines the outline's thickness. - * - * @type {Node} - */ - thicknessNode: Node; - /** - * Defines the outline's alpha. - * - * @type {Node} - */ - alphaNode: Node; - /** - * An internal material cache. - * - * @private - * @type {WeakMap} - */ - private _materialCache; - /** - * Creates the material used for outline rendering. - * - * @private - * @return {NodeMaterial} The outline material. - */ - private _createMaterial; - /** - * For the given toon material, this method returns a corresponding - * outline material. - * - * @private - * @param {(MeshToonMaterial|MeshToonNodeMaterial)} originalMaterial - The toon material. - * @return {NodeMaterial} The outline material. - */ - private _getOutlineMaterial; -} -import { Color } from '../../math/Color.js'; -import PassNode from './PassNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ViewportDepthNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ViewportDepthNode.d.ts deleted file mode 100644 index 6b0693f40..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/display/ViewportDepthNode.d.ts +++ /dev/null @@ -1,105 +0,0 @@ -export default ViewportDepthNode; -export function viewZToOrthographicDepth(viewZ: Node, near: Node, far: Node): Node; -export function viewZToReversedOrthographicDepth(viewZ: Node, near: Node, far: Node): Node; -/** - * TSL function for converting an orthographic depth value to a viewZ value. - * - * @tsl - * @function - * @param {Node} depth - The orthographic depth. - * @param {Node} near - The camera's near value. - * @param {Node} far - The camera's far value. - * @returns {Node} - */ -export const orthographicDepthToViewZ: () => void; -export function viewZToPerspectiveDepth(viewZ: Node, near: Node, far: Node): Node; -export function viewZToReversedPerspectiveDepth(viewZ: Node, near: Node, far: Node): Node; -/** - * TSL function for converting a perspective depth value to a viewZ value. - * - * @tsl - * @function - * @param {Node} depth - The perspective depth. - * @param {Node} near - The camera's near value. - * @param {Node} far - The camera's far value. - * @returns {Node} - */ -export const perspectiveDepthToViewZ: () => void; -export function viewZToLogarithmicDepth(viewZ: Node, near: Node, far: Node): Node; -export function logarithmicDepthToViewZ(depth: Node, near: Node, far: Node): Node; -/** - * TSL object that represents the depth value for the current fragment. - * - * @tsl - * @type {ViewportDepthNode} - */ -export const depth: ViewportDepthNode; -/** - * TSL function for converting a perspective depth value to linear depth. - * - * @tsl - * @function - * @param {?Node} [value=null] - The perspective depth. If `null` is provided, the current fragment's depth is used. - * @returns {ViewportDepthNode} - */ -export const linearDepth: any; -/** - * TSL object that represents the linear (orthographic) depth value of the current fragment - * - * @tsl - * @type {ViewportDepthNode} - */ -export const viewportLinearDepth: ViewportDepthNode; -/** - * This node offers a collection of features in context of the depth logic in the fragment shader. - * Depending on {@link ViewportDepthNode#scope}, it can be used to define a depth value for the current - * fragment or for depth evaluation purposes. - * - * @augments Node - */ -declare class ViewportDepthNode extends Node { - /** - * Constructs a new viewport depth node. - * - * @param {('depth'|'depthBase'|'linearDepth')} scope - The node's scope. - * @param {?Node} [valueNode=null] - The value node. - */ - constructor(scope: ("depth" | "depthBase" | "linearDepth"), valueNode?: Node | null); - /** - * The node behaves differently depending on which scope is selected. - * - * - `ViewportDepthNode.DEPTH_BASE`: Allows to define a value for the current fragment's depth. - * - `ViewportDepthNode.DEPTH`: Represents the depth value for the current fragment (`valueNode` is ignored). - * - `ViewportDepthNode.LINEAR_DEPTH`: Represents the linear (orthographic) depth value of the current fragment. - * If a `valueNode` is set, the scope can be used to convert perspective depth data to linear data. - * - * @type {('depth'|'depthBase'|'linearDepth')} - */ - scope: ("depth" | "depthBase" | "linearDepth"); - /** - * Can be used to define a custom depth value. - * The property is ignored in the `ViewportDepthNode.DEPTH` scope. - * - * @type {?Node} - * @default null - */ - valueNode: Node | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isViewportDepthNode: boolean; - generate(builder: any): any; - setup({ camera }: { - camera: any; - }): any; -} -declare namespace ViewportDepthNode { - let DEPTH_BASE: string; - let DEPTH: string; - let LINEAR_DEPTH: string; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ViewportDepthTextureNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ViewportDepthTextureNode.d.ts deleted file mode 100644 index c70252a7e..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/display/ViewportDepthTextureNode.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default ViewportDepthTextureNode; -/** - * TSL function for a viewport depth texture node. - * - * @tsl - * @function - * @param {?Node} [uvNode=screenUV] - The uv node. - * @param {?Node} [levelNode=null] - The level node. - * @param {?DepthTexture} [depthTexture=null] - A depth texture. If not provided, a depth texture is created automatically. - * @returns {ViewportDepthTextureNode} - */ -export const viewportDepthTexture: any; -/** - * Represents the depth of the current viewport as a texture. This module - * can be used in combination with viewport texture to achieve effects - * that require depth evaluation. - * - * @augments ViewportTextureNode - */ -declare class ViewportDepthTextureNode extends ViewportTextureNode { - /** - * Constructs a new viewport depth texture node. - * - * @param {Node} [uvNode=screenUV] - The uv node. - * @param {?Node} [levelNode=null] - The level node. - * @param {?DepthTexture} [depthTexture=null] - A depth texture. If not provided, uses a shared depth texture. - */ - constructor(uvNode?: Node, levelNode?: Node | null, depthTexture?: DepthTexture | null); -} -import ViewportTextureNode from './ViewportTextureNode.js'; -import { DepthTexture } from '../../textures/DepthTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ViewportSharedTextureNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ViewportSharedTextureNode.d.ts deleted file mode 100644 index 46859c337..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/display/ViewportSharedTextureNode.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -export default ViewportSharedTextureNode; -/** - * TSL function for creating a shared viewport texture node. - * - * @tsl - * @function - * @param {?Node} [uvNode=screenUV] - The uv node. - * @param {?Node} [levelNode=null] - The level node. - * @returns {ViewportSharedTextureNode} - */ -export const viewportSharedTexture: any; -/** - * `ViewportTextureNode` creates an internal texture for each node instance. This module - * shares a texture across all instances of `ViewportSharedTextureNode`. It should - * be the first choice when using data of the default/screen framebuffer for performance reasons. - * - * @augments ViewportTextureNode - */ -declare class ViewportSharedTextureNode extends ViewportTextureNode { - /** - * Constructs a new viewport shared texture node. - * - * @param {Node} [uvNode=screenUV] - The uv node. - * @param {?Node} [levelNode=null] - The level node. - */ - constructor(uvNode?: Node, levelNode?: Node | null); - /** - * Overwritten so the method always returns the unique shared - * framebuffer texture. - * - * @return {FramebufferTexture} The shared framebuffer texture. - */ - getTextureForReference(): FramebufferTexture; - updateReference(): this; -} -import ViewportTextureNode from './ViewportTextureNode.js'; -import { FramebufferTexture } from '../../textures/FramebufferTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/display/ViewportTextureNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/display/ViewportTextureNode.d.ts deleted file mode 100644 index e679f9d6a..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/display/ViewportTextureNode.d.ts +++ /dev/null @@ -1,89 +0,0 @@ -export default ViewportTextureNode; -/** - * TSL function for creating a viewport texture node. - * - * @tsl - * @function - * @param {?Node} [uvNode=screenUV] - The uv node. - * @param {?Node} [levelNode=null] - The level node. - * @param {?Texture} [framebufferTexture=null] - A framebuffer texture holding the viewport data. If not provided, a framebuffer texture is created automatically. - * @returns {ViewportTextureNode} - */ -export const viewportTexture: any; -/** - * TSL function for creating a viewport texture node with enabled mipmap generation. - * - * @tsl - * @function - * @param {?Node} [uvNode=screenUV] - The uv node. - * @param {?Node} [levelNode=null] - The level node. - * @param {?Texture} [framebufferTexture=null] - A framebuffer texture holding the viewport data. If not provided, a framebuffer texture is created automatically. - * @returns {ViewportTextureNode} - */ -export const viewportMipTexture: any; -export function viewportOpaqueMipTexture(uv?: Node | null, level?: Node | null): ViewportTextureNode; -/** - * A special type of texture node which represents the data of the current viewport - * as a texture. The module extracts data from the current bound framebuffer with - * a copy operation so no extra render pass is required to produce the texture data - * (which is good for performance). `ViewportTextureNode` can be used as an input for a - * variety of effects like refractive or transmissive materials. - * - * @augments TextureNode - */ -declare class ViewportTextureNode extends TextureNode { - /** - * Constructs a new viewport texture node. - * - * @param {Node} [uvNode=screenUV] - The uv node. - * @param {?Node} [levelNode=null] - The level node. - * @param {?Texture} [framebufferTexture=null] - A framebuffer texture holding the viewport data. If not provided, a framebuffer texture is created automatically. - */ - constructor(uvNode?: Node, levelNode?: Node | null, framebufferTexture?: Texture | null); - /** - * Whether to generate mipmaps or not. - * - * @type {boolean} - * @default false - */ - generateMipmaps: boolean; - /** - * The reference framebuffer texture. This is used to store the framebuffer texture - * for the current render target. If the render target changes, a new framebuffer texture - * is created automatically. - * - * @type {FramebufferTexture} - * @default null - */ - defaultFramebuffer: FramebufferTexture; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isOutputTextureNode: boolean; - /** - * The framebuffer texture for the current renderer context. - * - * @type {WeakMap} - * @private - */ - private _cacheTextures; - /** - * This methods returns a texture for the given render target or canvas target reference. - * - * To avoid rendering errors, `ViewportTextureNode` must use unique framebuffer textures - * for different render contexts. - * - * @param {?(RenderTarget|CanvasTarget)} [reference=null] - The render target or canvas target reference. - * @return {Texture} The framebuffer texture. - */ - getTextureForReference(reference?: (RenderTarget | CanvasTarget) | null): Texture; - updateReference(frame: any): import("../../Three.Core.js").Texture; - updateBefore(frame: any): void; - clone(): any; -} -import TextureNode from '../accessors/TextureNode.js'; -import { FramebufferTexture } from '../../textures/FramebufferTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/fog/Fog.d.ts b/jsdoc-testing/jsdoc/src/nodes/fog/Fog.d.ts deleted file mode 100644 index 34f7636b6..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/fog/Fog.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Constructs a new range factor node. - * - * @tsl - * @function - * @param {Node} near - Defines the near value. - * @param {Node} far - Defines the far value. - */ -export const rangeFogFactor: () => void; -/** - * Represents an exponential squared fog. This type of fog gives - * a clear view near the camera and a faster than exponentially - * densening fog farther from the camera. - * - * @tsl - * @function - * @param {Node} density - Defines the fog density. - */ -export const densityFogFactor: () => void; -/** - * Constructs a new height fog factor node. This fog factor requires a Y-up coordinate system. - * - * @tsl - * @function - * @param {Node} density - Defines the fog density. - * @param {Node} height - The height threshold in world space. Everything below this y-coordinate is affected by fog. - */ -export const exponentialHeightFogFactor: () => void; -/** - * This class can be used to configure a fog for the scene. - * Nodes of this type are assigned to `Scene.fogNode`. - * - * @tsl - * @function - * @param {Node} color - Defines the color of the fog. - * @param {Node} factor - Defines how the fog is factored in the scene. - */ -export const fog: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_GGX.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_GGX.d.ts deleted file mode 100644 index c47f5559a..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_GGX.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default BRDF_GGX; -declare const BRDF_GGX: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_GGX_Multiscatter.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_GGX_Multiscatter.d.ts deleted file mode 100644 index 7da6ffd76..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_GGX_Multiscatter.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default BRDF_GGX_Multiscatter; -declare const BRDF_GGX_Multiscatter: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_Lambert.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_Lambert.d.ts deleted file mode 100644 index 71b76485d..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_Lambert.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default BRDF_Lambert; -declare const BRDF_Lambert: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_Sheen.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_Sheen.d.ts deleted file mode 100644 index eb31b60ad..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/BRDF_Sheen.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default BRDF_Sheen; -declare const BRDF_Sheen: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/DFGLUT.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/DFGLUT.d.ts deleted file mode 100644 index 5a20667ef..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/DFGLUT.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default DFGLUT; -declare const DFGLUT: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/D_GGX.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/D_GGX.d.ts deleted file mode 100644 index ee1081261..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/D_GGX.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default D_GGX; -declare const D_GGX: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts deleted file mode 100644 index 788dd6c3b..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/D_GGX_Anisotropic.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default D_GGX_Anisotropic; -declare const D_GGX_Anisotropic: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/EnvironmentBRDF.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/EnvironmentBRDF.d.ts deleted file mode 100644 index ebc316a79..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/EnvironmentBRDF.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default EnvironmentBRDF; -declare const EnvironmentBRDF: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/F_Schlick.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/F_Schlick.d.ts deleted file mode 100644 index a1d2caea7..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/F_Schlick.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default F_Schlick; -declare const F_Schlick: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/LTC.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/LTC.d.ts deleted file mode 100644 index 3f41af9a6..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/LTC.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const LTC_Evaluate: any; -export const LTC_Evaluate_Volume: any; -export const LTC_Uv: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/Schlick_to_F0.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/Schlick_to_F0.d.ts deleted file mode 100644 index 316542c93..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/Schlick_to_F0.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default Schlick_to_F0; -declare const Schlick_to_F0: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts deleted file mode 100644 index aeaeb6109..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default V_GGX_SmithCorrelated; -declare const V_GGX_SmithCorrelated: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts deleted file mode 100644 index 7c2c87243..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/BSDF/V_GGX_SmithCorrelated_Anisotropic.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default V_GGX_SmithCorrelated_Anisotropic; -declare const V_GGX_SmithCorrelated_Anisotropic: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/BasicLightingModel.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/BasicLightingModel.d.ts deleted file mode 100644 index 3db9024d7..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/BasicLightingModel.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -export default BasicLightingModel; -/** - * Represents the lighting model for unlit materials. The only light contribution - * is baked indirect lighting modulated with ambient occlusion and the material's - * diffuse color. Environment mapping is supported. Used in {@link MeshBasicNodeMaterial}. - * - * @augments LightingModel - */ -declare class BasicLightingModel extends LightingModel { - /** - * Implements the baked indirect lighting with its modulation. - * - * @param {NodeBuilder} builder - The current node builder. - */ - indirect({ context }: NodeBuilder): void; - /** - * Implements the environment mapping. - * - * @param {NodeBuilder} builder - The current node builder. - */ - finish(builder: NodeBuilder): void; -} -import LightingModel from '../core/LightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/PhongLightingModel.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/PhongLightingModel.d.ts deleted file mode 100644 index 8d016e0a0..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/PhongLightingModel.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default PhongLightingModel; -/** - * Represents the lighting model for a phong material. Used in {@link MeshPhongNodeMaterial}. - * - * @augments BasicLightingModel - */ -declare class PhongLightingModel extends BasicLightingModel { - /** - * Constructs a new phong lighting model. - * - * @param {boolean} [specular=true] - Whether specular is supported or not. - */ - constructor(specular?: boolean); - /** - * Whether specular is supported or not. Set this to `false` if you are - * looking for a Lambert-like material meaning a material for non-shiny - * surfaces, without specular highlights. - * - * @type {boolean} - * @default true - */ - specular: boolean; - /** - * Implements the direct lighting. The specular portion is optional an can be controlled - * with the {@link PhongLightingModel#specular} flag. - * - * @param {Object} lightData - The light data. - */ - direct({ lightDirection, lightColor, reflectedLight }: Object): void; -} -import BasicLightingModel from './BasicLightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/PhysicalLightingModel.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/PhysicalLightingModel.d.ts deleted file mode 100644 index 3b3294a26..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/PhysicalLightingModel.d.ts +++ /dev/null @@ -1,171 +0,0 @@ -export default PhysicalLightingModel; -/** - * Represents the lighting model for a PBR material. - * - * @augments LightingModel - */ -declare class PhysicalLightingModel extends LightingModel { - /** - * Constructs a new physical lighting model. - * - * @param {boolean} [clearcoat=false] - Whether clearcoat is supported or not. - * @param {boolean} [sheen=false] - Whether sheen is supported or not. - * @param {boolean} [iridescence=false] - Whether iridescence is supported or not. - * @param {boolean} [anisotropy=false] - Whether anisotropy is supported or not. - * @param {boolean} [transmission=false] - Whether transmission is supported or not. - * @param {boolean} [dispersion=false] - Whether dispersion is supported or not. - */ - constructor(clearcoat?: boolean, sheen?: boolean, iridescence?: boolean, anisotropy?: boolean, transmission?: boolean, dispersion?: boolean); - /** - * Whether clearcoat is supported or not. - * - * @type {boolean} - * @default false - */ - clearcoat: boolean; - /** - * Whether sheen is supported or not. - * - * @type {boolean} - * @default false - */ - sheen: boolean; - /** - * Whether iridescence is supported or not. - * - * @type {boolean} - * @default false - */ - iridescence: boolean; - /** - * Whether anisotropy is supported or not. - * - * @type {boolean} - * @default false - */ - anisotropy: boolean; - /** - * Whether transmission is supported or not. - * - * @type {boolean} - * @default false - */ - transmission: boolean; - /** - * Whether dispersion is supported or not. - * - * @type {boolean} - * @default false - */ - dispersion: boolean; - /** - * The clear coat radiance. - * - * @type {?Node} - * @default null - */ - clearcoatRadiance: Node | null; - /** - * The clear coat specular direct. - * - * @type {?Node} - * @default null - */ - clearcoatSpecularDirect: Node | null; - /** - * The clear coat specular indirect. - * - * @type {?Node} - * @default null - */ - clearcoatSpecularIndirect: Node | null; - /** - * The sheen specular direct. - * - * @type {?Node} - * @default null - */ - sheenSpecularDirect: Node | null; - /** - * The sheen specular indirect. - * - * @type {?Node} - * @default null - */ - sheenSpecularIndirect: Node | null; - /** - * The iridescence Fresnel. - * - * @type {?Node} - * @default null - */ - iridescenceFresnel: Node | null; - /** - * The iridescence F0. - * - * @type {?Node} - * @default null - */ - iridescenceF0: Node | null; - /** - * The iridescence F0 dielectric. - * - * @type {?Node} - * @default null - */ - iridescenceF0Dielectric: Node | null; - /** - * The iridescence F0 metallic. - * - * @type {?Node} - * @default null - */ - iridescenceF0Metallic: Node | null; - computeMultiscattering(singleScatter: any, multiScatter: any, specularF90: any, f0: any, iridescenceF0?: null): void; - /** - * Implements the direct light. - * - * @param {Object} lightData - The light data. - * @param {NodeBuilder} builder - The current node builder. - */ - direct({ lightDirection, lightColor, reflectedLight }: Object): void; - /** - * This method is intended for implementing the direct light term for - * rect area light nodes. - * - * @param {Object} input - The input data. - * @param {NodeBuilder} builder - The current node builder. - */ - directRectArea({ lightColor, lightPosition, halfWidth, halfHeight, reflectedLight, ltc_1, ltc_2 }: Object): void; - /** - * Implements the indirect lighting. - * - * @param {NodeBuilder} builder - The current node builder. - */ - indirect(builder: NodeBuilder): void; - /** - * Implements the indirect diffuse term. - * - * @param {NodeBuilder} builder - The current node builder. - */ - indirectDiffuse(builder: NodeBuilder): void; - /** - * Implements the indirect specular term. - * - * @param {NodeBuilder} builder - The current node builder. - */ - indirectSpecular(builder: NodeBuilder): void; - /** - * Implements the ambient occlusion term. - * - * @param {NodeBuilder} builder - The current node builder. - */ - ambientOcclusion(builder: NodeBuilder): void; - /** - * Used for final lighting accumulations depending on the requested features. - * - * @param {NodeBuilder} builder - The current node builder. - */ - finish({ context }: NodeBuilder): void; -} -import LightingModel from '../core/LightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/ShadowMaskModel.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/ShadowMaskModel.d.ts deleted file mode 100644 index 84e3d6ecf..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/ShadowMaskModel.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -export default ShadowMaskModel; -/** - * Represents lighting model for a shadow material. Used in {@link ShadowNodeMaterial}. - * - * @augments LightingModel - */ -declare class ShadowMaskModel extends LightingModel { - /** - * The shadow mask node. - * - * @type {Node} - */ - shadowNode: Node; - /** - * Only used to save the shadow mask. - * - * @param {Object} input - The input data. - */ - direct({ lightNode }: Object): void; - /** - * Uses the shadow mask to produce the final color. - * - * @param {NodeBuilder} builder - The current node builder. - */ - finish({ context }: NodeBuilder): void; -} -import LightingModel from '../core/LightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/ToonLightingModel.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/ToonLightingModel.d.ts deleted file mode 100644 index 420e9ee87..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/ToonLightingModel.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -export default ToonLightingModel; -/** - * Represents the lighting model for a toon material. Used in {@link MeshToonNodeMaterial}. - * - * @augments LightingModel - */ -declare class ToonLightingModel extends LightingModel { - /** - * Implements the direct lighting. Instead of using a conventional smooth irradiance, the irradiance is - * reduced to a small number of discrete shades to create a comic-like, flat look. - * - * @param {Object} lightData - The light data. - * @param {NodeBuilder} builder - The current node builder. - */ - direct({ lightDirection, lightColor, reflectedLight }: Object, builder: NodeBuilder): void; - /** - * Implements the indirect lighting. - * - * @param {NodeBuilder} builder - The current node builder. - */ - indirect(builder: NodeBuilder): void; -} -import LightingModel from '../core/LightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/VolumetricLightingModel.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/VolumetricLightingModel.d.ts deleted file mode 100644 index 1cf33cba5..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/VolumetricLightingModel.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default VolumetricLightingModel; -/** - * VolumetricLightingModel class extends the LightingModel to implement volumetric lighting effects. - * This model calculates the scattering and transmittance of light through a volumetric medium. - * It dynamically adjusts the direction of the ray based on the camera and object positions. - * The model supports custom scattering and depth nodes to enhance the lighting effects. - * - * @augments LightingModel - */ -declare class VolumetricLightingModel extends LightingModel { - start(builder: any): void; - scatteringLight(lightColor: any, builder: any): void; - direct({ lightNode, lightColor }: { - lightNode: any; - lightColor: any; - }, builder: any): void; - directRectArea({ lightColor, lightPosition, halfWidth, halfHeight }: { - lightColor: any; - lightPosition: any; - halfWidth: any; - halfHeight: any; - }, builder: any): void; - finish(builder: any): void; -} -import LightingModel from '../core/LightingModel.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/material/getAlphaHashThreshold.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/material/getAlphaHashThreshold.d.ts deleted file mode 100644 index 30b15c98e..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/material/getAlphaHashThreshold.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default getAlphaHashThreshold; -declare const getAlphaHashThreshold: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/material/getGeometryRoughness.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/material/getGeometryRoughness.d.ts deleted file mode 100644 index 30ea57be5..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/material/getGeometryRoughness.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default getGeometryRoughness; -declare const getGeometryRoughness: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/material/getParallaxCorrectNormal.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/material/getParallaxCorrectNormal.d.ts deleted file mode 100644 index 4c4a103a4..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/material/getParallaxCorrectNormal.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -export default getParallaxCorrectNormal; -/** - * This computes a parallax corrected normal which is used for box-projected cube mapping (BPCEM). - * - * Reference: {@link https://devlog-martinsh.blogspot.com/2011/09/box-projected-cube-environment-mapping.html} - * - * ```js - * const uvNode = getParallaxCorrectNormal( reflectVector, vec3( 200, 100, 100 ), vec3( 0, - 50, 0 ) ); - * material.envNode = pmremTexture( renderTarget.texture, uvNode ); - * ``` - * - * @tsl - * @function - * @param {Node} normal - The normal to correct. - * @param {Node} cubeSize - The cube size should reflect the size of the environment (BPCEM is usually applied in closed environments like rooms). - * @param {Node} cubePos - The cube position. - * @return {Node} The parallax corrected normal. - */ -declare const getParallaxCorrectNormal: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/material/getRoughness.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/material/getRoughness.d.ts deleted file mode 100644 index 18eff5982..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/material/getRoughness.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default getRoughness; -declare const getRoughness: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/functions/material/getShIrradianceAt.d.ts b/jsdoc-testing/jsdoc/src/nodes/functions/material/getShIrradianceAt.d.ts deleted file mode 100644 index 627b15982..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/functions/material/getShIrradianceAt.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export default getShIrradianceAt; -declare const getShIrradianceAt: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/geometry/RangeNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/geometry/RangeNode.d.ts deleted file mode 100644 index 3630a9978..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/geometry/RangeNode.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -export default RangeNode; -/** - * TSL function for creating a range node. - * - * @tsl - * @function - * @param {Node} [minNode=float()] - A node defining the lower bound of the range. - * @param {Node} [maxNode=float()] - A node defining the upper bound of the range. - * @returns {RangeNode} - */ -export const range: any; -/** - * `RangeNode` generates random instanced attribute data in a defined range. - * An exemplary use case for this utility node is to generate random per-instance - * colors: - * ```js - * const material = new MeshBasicNodeMaterial(); - * material.colorNode = range( new Color( 0x000000 ), new Color( 0xFFFFFF ) ); - * const mesh = new InstancedMesh( geometry, material, count ); - * ``` - * @augments Node - */ -declare class RangeNode extends Node { - /** - * Constructs a new range node. - * - * @param {Node} [minNode=float()] - A node defining the lower bound of the range. - * @param {Node} [maxNode=float()] - A node defining the upper bound of the range. - */ - constructor(minNode?: Node, maxNode?: Node); - /** - * A node defining the lower bound of the range. - * - * @type {Node} - * @default float() - */ - minNode: Node; - /** - * A node defining the upper bound of the range. - * - * @type {Node} - * @default float() - */ - maxNode: Node; - /** - * Returns the vector length which is computed based on the range definition. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {number} The vector length. - */ - getVectorLength(builder: NodeBuilder): number; - /** - * This method is overwritten since the node type is inferred from range definition. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Returns a constant node from the given node by traversing it. - * - * @param {Node} node - The node to traverse. - * @returns {Node} The constant node, if found. - */ - getConstNode(node: Node): Node; - setup(builder: any): any; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/gpgpu/AtomicFunctionNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/gpgpu/AtomicFunctionNode.d.ts deleted file mode 100644 index 956f26c33..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/gpgpu/AtomicFunctionNode.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -export default AtomicFunctionNode; -export function atomicFunc(method: string, pointerNode: Node, valueNode: Node): AtomicFunctionNode; -export function atomicLoad(pointerNode: Node): AtomicFunctionNode; -export function atomicStore(pointerNode: Node, valueNode: Node): AtomicFunctionNode; -export function atomicAdd(pointerNode: Node, valueNode: Node): AtomicFunctionNode; -export function atomicSub(pointerNode: Node, valueNode: Node): AtomicFunctionNode; -export function atomicMax(pointerNode: Node, valueNode: Node): AtomicFunctionNode; -export function atomicMin(pointerNode: Node, valueNode: Node): AtomicFunctionNode; -export function atomicAnd(pointerNode: Node, valueNode: Node): AtomicFunctionNode; -export function atomicOr(pointerNode: Node, valueNode: Node): AtomicFunctionNode; -export function atomicXor(pointerNode: Node, valueNode: Node): AtomicFunctionNode; -/** - * `AtomicFunctionNode` represents any function that can operate on atomic variable types - * within a shader. In an atomic function, any modification to an atomic variable will - * occur as an indivisible step with a defined order relative to other modifications. - * Accordingly, even if multiple atomic functions are modifying an atomic variable at once - * atomic operations will not interfere with each other. - * - * This node can only be used with a WebGPU backend. - * - * @augments Node - */ -declare class AtomicFunctionNode extends Node { - /** - * Constructs a new atomic function node. - * - * @param {string} method - The signature of the atomic function to construct. - * @param {Node} pointerNode - An atomic variable or element of an atomic buffer. - * @param {Node} valueNode - The value that mutates the atomic variable. - */ - constructor(method: string, pointerNode: Node, valueNode: Node); - /** - * The signature of the atomic function to construct. - * - * @type {string} - */ - method: string; - /** - * An atomic variable or element of an atomic buffer. - * - * @type {Node} - */ - pointerNode: Node; - /** - * A value that modifies the atomic variable. - * - * @type {Node} - */ - valueNode: Node; - /** - * Overwrites the default implementation to return the type of - * the pointer node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The input type. - */ - getInputType(builder: NodeBuilder): string; - /** - * Overwritten since the node type is inferred from the input type. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - generate(builder: any): any; -} -declare namespace AtomicFunctionNode { - let ATOMIC_LOAD: string; - let ATOMIC_STORE: string; - let ATOMIC_ADD: string; - let ATOMIC_SUB: string; - let ATOMIC_MAX: string; - let ATOMIC_MIN: string; - let ATOMIC_AND: string; - let ATOMIC_OR: string; - let ATOMIC_XOR: string; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/gpgpu/BarrierNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/gpgpu/BarrierNode.d.ts deleted file mode 100644 index 6879cc29f..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/gpgpu/BarrierNode.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -export default BarrierNode; -export function workgroupBarrier(): BarrierNode; -export function storageBarrier(): BarrierNode; -export function textureBarrier(): BarrierNode; -/** - * Represents a GPU control barrier that synchronizes compute operations within a given scope. - * - * This node can only be used with a WebGPU backend. - * - * @augments Node - */ -declare class BarrierNode extends Node { - /** - * Constructs a new barrier node. - * - * @param {string} scope - The scope defines the behavior of the node. - */ - constructor(scope: string); - scope: string; - isBarrierNode: boolean; - setup(builder: any): void; - generate(builder: any): void; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/gpgpu/ComputeBuiltinNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/gpgpu/ComputeBuiltinNode.d.ts deleted file mode 100644 index d5dbfe59e..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/gpgpu/ComputeBuiltinNode.d.ts +++ /dev/null @@ -1,135 +0,0 @@ -export default ComputeBuiltinNode; -/** - * Represents the number of workgroups dispatched by the compute shader. - * ```js - * // Run 512 invocations/threads with a workgroup size of 128. - * const computeFn = Fn(() => { - * - * // numWorkgroups.x = 4 - * storageBuffer.element(0).assign(numWorkgroups.x) - * - * })().compute(512, [128]); - * - * // Run 512 invocations/threads with the default workgroup size of 64. - * const computeFn = Fn(() => { - * - * // numWorkgroups.x = 8 - * storageBuffer.element(0).assign(numWorkgroups.x) - * - * })().compute(512); - * ``` - * - * @tsl - * @type {ComputeBuiltinNode} - */ -export const numWorkgroups: ComputeBuiltinNode; -/** - * Represents the 3-dimensional index of the workgroup the current compute invocation belongs to. - * ```js - * // Execute 12 compute threads with a workgroup size of 3. - * const computeFn = Fn( () => { - * - * If( workgroupId.x.mod( 2 ).equal( 0 ), () => { - * - * storageBuffer.element( instanceIndex ).assign( instanceIndex ); - * - * } ).Else( () => { - * - * storageBuffer.element( instanceIndex ).assign( 0 ); - * - * } ); - * - * } )().compute( 12, [ 3 ] ); - * - * // workgroupId.x = [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3]; - * // Buffer Output = [0, 1, 2, 0, 0, 0, 6, 7, 8, 0, 0, 0]; - * ``` - * - * @tsl - * @type {ComputeBuiltinNode} - */ -export const workgroupId: ComputeBuiltinNode; -/** - * A non-linearized 3-dimensional representation of the current invocation's position within a 3D global grid. - * - * @tsl - * @type {ComputeBuiltinNode} - */ -export const globalId: ComputeBuiltinNode; -/** - * A non-linearized 3-dimensional representation of the current invocation's position within a 3D workgroup grid. - * - * @tsl - * @type {ComputeBuiltinNode} - */ -export const localId: ComputeBuiltinNode; -/** - * A device dependent variable that exposes the size of the current invocation's subgroup. - * - * @tsl - * @type {ComputeBuiltinNode} - */ -export const subgroupSize: ComputeBuiltinNode; -/** - * `ComputeBuiltinNode` represents a compute-scope builtin value that expose information - * about the currently running dispatch and/or the device it is running on. - * - * This node can only be used with a WebGPU backend. - * - * @augments Node - */ -declare class ComputeBuiltinNode extends Node { - /** - * Constructs a new compute builtin node. - * - * @param {string} builtinName - The built-in name. - * @param {string} nodeType - The node type. - */ - constructor(builtinName: string, nodeType: string); - /** - * The built-in name. - * - * @private - * @type {string} - */ - private _builtinName; - /** - * This method is overwritten since hash is derived from the built-in name. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The hash. - */ - getHash(builder: NodeBuilder): string; - /** - * This method is overwritten since the node type is simply derived from `nodeType`.. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(): string; - /** - * Sets the builtin name. - * - * @param {string} builtinName - The built-in name. - * @return {ComputeBuiltinNode} A reference to this node. - */ - setBuiltinName(builtinName: string): ComputeBuiltinNode; - /** - * Returns the builtin name. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The builtin name. - */ - getBuiltinName(): string; - /** - * Whether the current node builder has the builtin or not. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {boolean} Whether the builder has the builtin or not. - */ - hasBuiltin(builder: NodeBuilder): boolean; - generate(builder: any, output: any): any; - serialize(data: any): void; - deserialize(data: any): void; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/gpgpu/ComputeNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/gpgpu/ComputeNode.d.ts deleted file mode 100644 index 66213c478..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/gpgpu/ComputeNode.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -export default ComputeNode; -export function computeKernel(node: Node, workgroupSize?: Array): ComputeNode; -export function compute(node: Node, count: number | Array, workgroupSize?: Array): ComputeNode; -/** - * Represents a compute shader node. - * - * @augments Node - */ -declare class ComputeNode extends Node { - /** - * Constructs a new compute node. - * - * @param {Node} computeNode - The node that defines the compute shader logic. - * @param {Array} workgroupSize - An array defining the X, Y, and Z dimensions of the workgroup for compute shader execution. - */ - constructor(computeNode: Node, workgroupSize: Array); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isComputeNode: boolean; - /** - * The node that defines the compute shader logic. - * - * @type {Node} - */ - computeNode: Node; - /** - * An array defining the X, Y, and Z dimensions of the workgroup for compute shader execution. - * - * @type {Array} - * @default [ 64 ] - */ - workgroupSize: Array; - /** - * The total number of threads (invocations) to execute. If it is a number, it will be used - * to automatically generate bounds checking against `instanceIndex`. - * - * @type {number|Array} - */ - count: number | Array; - /** - * The dispatch size for workgroups on X, Y, and Z axes. - * Used directly if `count` is not provided. - * - * @type {number|Array} - */ - dispatchSize: number | Array; - /** - * A callback executed when the compute node finishes initialization. - * - * @type {?Function} - */ - onInitFunction: Function | null; - /** - * A uniform node holding the dispatch count for bounds checking. - * Created automatically when `count` is a number. - * - * @type {?UniformNode} - */ - countNode: UniformNode | null; - /** - * Sets the {@link ComputeNode#name} property. - * - * @param {string} name - The name of the uniform. - * @return {ComputeNode} A reference to this node. - */ - setName(name: string): ComputeNode; - /** - * Sets the {@link ComputeNode#name} property. - * - * @deprecated - * @param {string} name - The name of the uniform. - * @return {ComputeNode} A reference to this node. - */ - label(name: string): ComputeNode; - /** - * Sets the callback to run during initialization. - * - * @param {Function} callback - The callback function. - * @return {ComputeNode} A reference to this node. - */ - onInit(callback: Function): ComputeNode; - /** - * The method execute the compute for this node. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - updateBefore({ renderer }: NodeFrame): void; - setup(builder: any): string | Node | null; - generate(builder: any, output: any): any; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/gpgpu/SubgroupFunctionNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/gpgpu/SubgroupFunctionNode.d.ts deleted file mode 100644 index 19c603f9b..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/gpgpu/SubgroupFunctionNode.d.ts +++ /dev/null @@ -1,303 +0,0 @@ -export default SubgroupFunctionNode; -/** - * Returns true if this invocation has the lowest subgroup_invocation_id - * among active invocations in the subgroup. - * - * @tsl - * @method - * @return {bool} The result of the computation. - */ -export const subgroupElect: any; -/** - * Returns a set of bitfields where the bit corresponding to subgroup_invocation_id - * is 1 if pred is true for that active invocation and 0 otherwise. - * - * @tsl - * @method - * @param {bool} pred - A boolean that sets the bit corresponding to the invocations subgroup invocation id. - * @return {vec4}- A bitfield corresponding to the pred value of each subgroup invocation. - */ -export const subgroupBallot: any; -/** - * A reduction that adds e among all active invocations and returns that result. - * - * @tsl - * @method - * @param {number} e - The value provided to the reduction by the current invocation. - * @return {number} The accumulated result of the reduction operation. - */ -export const subgroupAdd: any; -/** - * An inclusive scan returning the sum of e for all active invocations with subgroup_invocation_id less than or equal to this invocation. - * - * @tsl - * @method - * @param {number} e - The value provided to the inclusive scan by the current invocation. - * @return {number} The accumulated result of the inclusive scan operation. - */ -export const subgroupInclusiveAdd: any; -/** - * An exclusive scan that returns the sum of e for all active invocations with subgroup_invocation_id less than this invocation. - * - * @tsl - * @method - * @param {number} e - The value provided to the exclusive scan by the current invocation. - * @return {number} The accumulated result of the exclusive scan operation. - */ -export const subgroupExclusiveAdd: any; -/** - * A reduction that multiplies e among all active invocations and returns that result. - * - * @tsl - * @method - * @param {number} e - The value provided to the reduction by the current invocation. - * @return {number} The accumulated result of the reduction operation. - */ -export const subgroupMul: any; -/** - * An inclusive scan returning the product of e for all active invocations with subgroup_invocation_id less than or equal to this invocation. - * - * @tsl - * @method - * @param {number} e - The value provided to the inclusive scan by the current invocation. - * @return {number} The accumulated result of the inclusive scan operation. - */ -export const subgroupInclusiveMul: any; -/** - * An exclusive scan that returns the product of e for all active invocations with subgroup_invocation_id less than this invocation. - * - * @tsl - * @method - * @param {number} e - The value provided to the exclusive scan by the current invocation. - * @return {number} The accumulated result of the exclusive scan operation. - */ -export const subgroupExclusiveMul: any; -/** - * A reduction that performs a bitwise and of e among all active invocations and returns that result. - * - * @tsl - * @method - * @param {number} e - The value provided to the reduction by the current invocation. - * @return {number} The result of the reduction operation. - */ -export const subgroupAnd: any; -/** - * A reduction that performs a bitwise or of e among all active invocations and returns that result. - * - * @tsl - * @method - * @param {number} e - The value provided to the reduction by the current invocation. - * @return {number} The result of the reduction operation. - */ -export const subgroupOr: any; -/** - * A reduction that performs a bitwise xor of e among all active invocations and returns that result. - * - * @tsl - * @method - * @param {number} e - The value provided to the reduction by the current invocation. - * @return {number} The result of the reduction operation. - */ -export const subgroupXor: any; -/** - * A reduction that performs a min of e among all active invocations and returns that result. - * - * @tsl - * @method - * @param {number} e - The value provided to the reduction by the current invocation. - * @return {number} The result of the reduction operation. - */ -export const subgroupMin: any; -/** - * A reduction that performs a max of e among all active invocations and returns that result. - * - * @tsl - * @method - * @param {number} e - The value provided to the reduction by the current invocation. - * @return {number} The result of the reduction operation. - */ -export const subgroupMax: any; -/** - * Returns true if e is true for all active invocations in the subgroup. - * - * @tsl - * @method - * @return {bool} The result of the computation. - */ -export const subgroupAll: any; -/** - * Returns true if e is true for any active invocation in the subgroup - * - * @tsl - * @method - * @return {bool} The result of the computation. - */ -export const subgroupAny: any; -/** - * Broadcasts e from the active invocation with the lowest subgroup_invocation_id in the subgroup to all other active invocations. - * - * @tsl - * @method - * @param {number} e - The value to broadcast from the lowest subgroup invocation. - * @param {number} id - The subgroup invocation to broadcast from. - * @return {number} The broadcast value. - */ -export const subgroupBroadcastFirst: any; -/** - * Swaps e between invocations in the quad in the X direction. - * - * @tsl - * @method - * @param {number} e - The value to swap from the current invocation. - * @return {number} The value received from the swap operation. - */ -export const quadSwapX: any; -/** - * Swaps e between invocations in the quad in the Y direction. - * - * @tsl - * @method - * @param {number} e - The value to swap from the current invocation. - * @return {number} The value received from the swap operation. - */ -export const quadSwapY: any; -/** - * Swaps e between invocations in the quad diagonally. - * - * @tsl - * @method - * @param {number} e - The value to swap from the current invocation. - * @return {number} The value received from the swap operation. - */ -export const quadSwapDiagonal: any; -/** - * Broadcasts e from the invocation whose subgroup_invocation_id matches id, to all active invocations. - * - * @tsl - * @method - * @param {number} e - The value to broadcast from subgroup invocation 'id'. - * @param {number} id - The subgroup invocation to broadcast from. - * @return {number} The broadcast value. - */ -export const subgroupBroadcast: any; -/** - * Returns v from the active invocation whose subgroup_invocation_id matches id - * - * @tsl - * @method - * @param {number} v - The value to return from subgroup invocation id^mask. - * @param {number} id - The subgroup invocation which returns the value v. - * @return {number} The broadcast value. - */ -export const subgroupShuffle: any; -/** - * Returns v from the active invocation whose subgroup_invocation_id matches subgroup_invocation_id ^ mask. - * - * @tsl - * @method - * @param {number} v - The value to return from subgroup invocation id^mask. - * @param {number} mask - A bitmask that determines the target invocation via a XOR operation. - * @return {number} The broadcast value. - */ -export const subgroupShuffleXor: any; -/** - * Returns v from the active invocation whose subgroup_invocation_id matches subgroup_invocation_id - delta - * - * @tsl - * @method - * @param {number} v - The value to return from subgroup invocation id^mask. - * @param {number} delta - A value that offsets the current in. - * @return {number} The broadcast value. - */ -export const subgroupShuffleUp: any; -/** - * Returns v from the active invocation whose subgroup_invocation_id matches subgroup_invocation_id + delta - * - * @tsl - * @method - * @param {number} v - The value to return from subgroup invocation id^mask. - * @param {number} delta - A value that offsets the current subgroup invocation. - * @return {number} The broadcast value. - */ -export const subgroupShuffleDown: any; -/** - * Broadcasts e from the quad invocation with id equal to id. - * - * @tsl - * @method - * @param {number} e - The value to broadcast. - * @return {number} The broadcast value. - */ -export const quadBroadcast: any; -/** - * This class represents a set of built in WGSL shader functions that sync - * synchronously execute an operation across a subgroup, or 'warp', of compute - * or fragment shader invocations within a workgroup. Typically, these functions - * will synchronously execute an operation using data from all active invocations - * within the subgroup, then broadcast that result to all active invocations. In - * other graphics APIs, subgroup functions are also referred to as wave intrinsics - * (DirectX/HLSL) or warp intrinsics (CUDA). - * - * @augments TempNode - */ -declare class SubgroupFunctionNode extends TempNode { - /** - * Constructs a new function node. - * - * @param {string} method - The subgroup/wave intrinsic method to construct. - * @param {Node} [aNode=null] - The method's first argument. - * @param {Node} [bNode=null] - The method's second argument. - */ - constructor(method: string, aNode?: Node, bNode?: Node); - /** - * The subgroup/wave intrinsic method to construct. - * - * @type {string} - */ - method: string; - /** - * The method's first argument. - * - * @type {Node} - */ - aNode: Node; - /** - * The method's second argument. - * - * @type {Node} - */ - bNode: Node; - getInputType(builder: any): any; - generateNodeType(builder: any): any; - generate(builder: any, output: any): any; - serialize(data: any): void; - deserialize(data: any): void; -} -declare namespace SubgroupFunctionNode { - let SUBGROUP_ELECT: string; - let SUBGROUP_BALLOT: string; - let SUBGROUP_ADD: string; - let SUBGROUP_INCLUSIVE_ADD: string; - let SUBGROUP_EXCLUSIVE_AND: string; - let SUBGROUP_MUL: string; - let SUBGROUP_INCLUSIVE_MUL: string; - let SUBGROUP_EXCLUSIVE_MUL: string; - let SUBGROUP_AND: string; - let SUBGROUP_OR: string; - let SUBGROUP_XOR: string; - let SUBGROUP_MIN: string; - let SUBGROUP_MAX: string; - let SUBGROUP_ALL: string; - let SUBGROUP_ANY: string; - let SUBGROUP_BROADCAST_FIRST: string; - let QUAD_SWAP_X: string; - let QUAD_SWAP_Y: string; - let QUAD_SWAP_DIAGONAL: string; - let SUBGROUP_BROADCAST: string; - let SUBGROUP_SHUFFLE: string; - let SUBGROUP_SHUFFLE_XOR: string; - let SUBGROUP_SHUFFLE_UP: string; - let SUBGROUP_SHUFFLE_DOWN: string; - let QUAD_BROADCAST: string; -} -import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/gpgpu/WorkgroupInfoNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/gpgpu/WorkgroupInfoNode.d.ts deleted file mode 100644 index 2d1de77bc..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/gpgpu/WorkgroupInfoNode.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -export default WorkgroupInfoNode; -export function workgroupArray(type: string, count?: number): WorkgroupInfoNode; -/** - * A node allowing the user to create a 'workgroup' scoped buffer within the - * context of a compute shader. Typically, workgroup scoped buffers are - * created to hold data that is transferred from a global storage scope into - * a local workgroup scope. For invocations within a workgroup, data - * access speeds on 'workgroup' scoped buffers can be significantly faster - * than similar access operations on globally accessible storage buffers. - * - * This node can only be used with a WebGPU backend. - * - * @augments Node - */ -declare class WorkgroupInfoNode extends Node { - /** - * Constructs a new buffer scoped to type scope. - * - * @param {string} scope - TODO. - * @param {string} bufferType - The data type of a 'workgroup' scoped buffer element. - * @param {number} [bufferCount=0] - The number of elements in the buffer. - */ - constructor(scope: string, bufferType: string, bufferCount?: number); - /** - * The buffer type. - * - * @type {string} - */ - bufferType: string; - /** - * The buffer count. - * - * @type {number} - * @default 0 - */ - bufferCount: number; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWorkgroupInfoNode: boolean; - /** - * The data type of the array buffer. - * - * @type {string} - */ - elementType: string; - /** - * TODO. - * - * @type {string} - */ - scope: string; - /** - * Sets the name of this node. - * - * @param {string} name - The name to set. - * @return {WorkgroupInfoNode} A reference to this node. - */ - setName(name: string): WorkgroupInfoNode; - /** - * Sets the name/label of this node. - * - * @deprecated - * @param {string} name - The name to set. - * @return {WorkgroupInfoNode} A reference to this node. - */ - label(name: string): WorkgroupInfoNode; - /** - * Sets the scope of this node. - * - * @param {string} scope - The scope to set. - * @return {WorkgroupInfoNode} A reference to this node. - */ - setScope(scope: string): WorkgroupInfoNode; - /** - * The data type of the array buffer. - * - * @return {string} The element type. - */ - getElementType(): string; - /** - * Overwrites the default implementation since the input type - * is inferred from the scope. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The input type. - */ - getInputType(): string; - /** - * This method can be used to access elements via an index node. - * - * @param {IndexNode} indexNode - indexNode. - * @return {WorkgroupInfoElementNode} A reference to an element. - */ - element(indexNode: IndexNode): WorkgroupInfoElementNode; - generate(builder: any): any; -} -import Node from '../core/Node.js'; -/** - * Represents an element of a 'workgroup' scoped buffer. - * - * @augments ArrayElementNode - */ -declare class WorkgroupInfoElementNode extends ArrayElementNode { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWorkgroupInfoElementNode: boolean; - generate(builder: any, output: any): any; -} -import ArrayElementNode from '../utils/ArrayElementNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/AONode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/AONode.d.ts deleted file mode 100644 index 5c4e49ae2..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/AONode.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default AONode; -/** - * A generic class that can be used by nodes which contribute - * ambient occlusion to the scene. E.g. an ambient occlusion map - * node can be used as input for this module. Used in {@link NodeMaterial}. - * - * @augments LightingNode - */ -declare class AONode extends LightingNode { - /** - * Constructs a new AO node. - * - * @param {?Node} [aoNode=null] - The ambient occlusion node. - */ - constructor(aoNode?: Node | null); - /** - * The ambient occlusion node. - * - * @type {?Node} - * @default null - */ - aoNode: Node | null; - setup(builder: any): void; -} -import LightingNode from './LightingNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/AmbientLightNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/AmbientLightNode.d.ts deleted file mode 100644 index 5705b1d91..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/AmbientLightNode.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export default AmbientLightNode; -/** - * Module for representing ambient lights as nodes. - * - * @augments AnalyticLightNode - */ -declare class AmbientLightNode extends AnalyticLightNode { - setup({ context }: { - context: any; - }): void; -} -import AnalyticLightNode from './AnalyticLightNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/AnalyticLightNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/AnalyticLightNode.d.ts deleted file mode 100644 index e1c0209aa..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/AnalyticLightNode.d.ts +++ /dev/null @@ -1,127 +0,0 @@ -export default AnalyticLightNode; -/** - * Base class for analytic light nodes. - * - * @augments LightingNode - */ -declare class AnalyticLightNode extends LightingNode { - /** - * Constructs a new analytic light node. - * - * @param {?Light} [light=null] - The light source. - */ - constructor(light?: Light | null); - /** - * The light source. - * - * @type {?Light} - * @default null - */ - light: Light | null; - /** - * The light's color value. - * - * @type {Color} - */ - color: Color; - /** - * The light's color node. Points to `colorNode` of the light source, if set. Otherwise - * it creates a uniform node based on {@link AnalyticLightNode#color}. - * - * @type {Node} - */ - colorNode: Node; - /** - * This property is used to retain a reference to the original value of {@link AnalyticLightNode#colorNode}. - * The final color node is represented by a different node when using shadows. - * - * @type {?Node} - * @default null - */ - baseColorNode: Node | null; - /** - * Represents the light's shadow. - * - * @type {?ShadowNode} - * @default null - */ - shadowNode: ShadowNode | null; - /** - * Represents the light's shadow color. - * - * @type {?Node} - * @default null - */ - shadowColorNode: Node | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isAnalyticLightNode: boolean; - _shadowDisposeListener: (() => void) | undefined; - /** - * Frees internal resources related to shadows. - */ - disposeShadow(): void; - getHash(): any; - /** - * Returns a node representing a direction vector which points from the current - * position in view space to the light's position in view space. - * - * @param {NodeBuilder} builder - The builder object used for setting up the light. - * @return {Node} The light vector node. - */ - getLightVector(builder: NodeBuilder): Node; - /** - * Sets up the direct lighting for the analytic light node. - * - * @abstract - * @param {NodeBuilder} builder - The builder object used for setting up the light. - * @return {Object|undefined} The direct light data (color and direction). - */ - setupDirect(): Object | undefined; - /** - * Sets up the direct rect area lighting for the analytic light node. - * - * @abstract - * @param {NodeBuilder} builder - The builder object used for setting up the light. - * @return {Object|undefined} The direct rect area light data. - */ - setupDirectRectArea(): Object | undefined; - /** - * Setups the shadow node for this light. The method exists so concrete light classes - * can setup different types of shadow nodes. - * - * @return {ShadowNode} The created shadow node. - */ - setupShadowNode(): ShadowNode; - /** - * Setups the shadow for this light. This method is only executed if the light - * cast shadows and the current build object receives shadows. It incorporates - * shadows into the lighting computation. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setupShadow(builder: NodeBuilder): void; - /** - * Unlike most other nodes, lighting nodes do not return a output node in {@link Node#setup}. - * The main purpose of lighting nodes is to configure the current {@link LightingModel} and/or - * invocate the respective interface methods. - * - * @param {NodeBuilder} builder - The current node builder. - */ - setup(builder: NodeBuilder): void; - /** - * The update method is used to update light uniforms per frame. - * Potentially overwritten in concrete light nodes to update light - * specific uniforms. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update(): void; -} -import LightingNode from './LightingNode.js'; -import { Color } from '../../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/BasicEnvironmentNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/BasicEnvironmentNode.d.ts deleted file mode 100644 index 701118341..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/BasicEnvironmentNode.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -export default BasicEnvironmentNode; -/** - * Represents a basic model for Image-based lighting (IBL). The environment - * is defined via environment maps in the equirectangular or cube map format. - * `BasicEnvironmentNode` is intended for non-PBR materials like {@link MeshBasicNodeMaterial} - * or {@link MeshPhongNodeMaterial}. - * - * @augments LightingNode - */ -declare class BasicEnvironmentNode extends LightingNode { - /** - * Constructs a new basic environment node. - * - * @param {Node} [envNode=null] - A node representing the environment. - */ - constructor(envNode?: Node); - /** - * A node representing the environment. - * - * @type {Node} - * @default null - */ - envNode: Node; - setup(builder: any): void; -} -import LightingNode from './LightingNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/BasicLightMapNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/BasicLightMapNode.d.ts deleted file mode 100644 index b5173c497..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/BasicLightMapNode.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -export default BasicLightMapNode; -/** - * A specific version of {@link IrradianceNode} that is only relevant - * for {@link MeshBasicNodeMaterial}. Since the material is unlit, it - * requires a special scaling factor for the light map. - * - * @augments LightingNode - */ -declare class BasicLightMapNode extends LightingNode { - /** - * Constructs a new basic light map node. - * - * @param {?Node} [lightMapNode=null] - The light map node. - */ - constructor(lightMapNode?: Node | null); - /** - * The light map node. - * - * @type {?Node} - */ - lightMapNode: Node | null; - setup(builder: any): void; -} -import LightingNode from './LightingNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/DirectionalLightNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/DirectionalLightNode.d.ts deleted file mode 100644 index 723a2afc6..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/DirectionalLightNode.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export default DirectionalLightNode; -/** - * Module for representing directional lights as nodes. - * - * @augments AnalyticLightNode - */ -declare class DirectionalLightNode extends AnalyticLightNode { - setupDirect(): { - lightDirection: any; - lightColor: Node; - }; -} -import AnalyticLightNode from './AnalyticLightNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/EnvironmentNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/EnvironmentNode.d.ts deleted file mode 100644 index 6b87431fc..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/EnvironmentNode.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -export default EnvironmentNode; -/** - * Represents a physical model for Image-based lighting (IBL). The environment - * is defined via environment maps in the equirectangular, cube map or cubeUV (PMREM) format. - * `EnvironmentNode` is intended for PBR materials like {@link MeshStandardNodeMaterial}. - * - * @augments LightingNode - */ -declare class EnvironmentNode extends LightingNode { - /** - * Constructs a new environment node. - * - * @param {Node} [envNode=null] - A node representing the environment. - */ - constructor(envNode?: Node); - /** - * A node representing the environment. - * - * @type {?Node} - * @default null - */ - envNode: Node | null; - setup(builder: any): void; - /** - * Returns the PMREM node cache of the current renderer. - * - * @private - * @param {Renderer} renderer - The current renderer. - * @return {WeakMap} The node cache. - */ - private _getPMREMNodeCache; -} -import LightingNode from './LightingNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/HemisphereLightNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/HemisphereLightNode.d.ts deleted file mode 100644 index 6612f6067..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/HemisphereLightNode.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -export default HemisphereLightNode; -/** - * Module for representing hemisphere lights as nodes. - * - * @augments AnalyticLightNode - */ -declare class HemisphereLightNode extends AnalyticLightNode { - /** - * Uniform node representing the light's position. - * - * @type {UniformNode} - */ - lightPositionNode: UniformNode; - /** - * A node representing the light's direction. - * - * @type {Node} - */ - lightDirectionNode: Node; - /** - * Uniform node representing the light's ground color. - * - * @type {UniformNode} - */ - groundColorNode: UniformNode; - /** - * Overwritten to updated hemisphere light specific uniforms. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update(frame: NodeFrame): void; - setup(builder: any): void; -} -import AnalyticLightNode from './AnalyticLightNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/IESSpotLightNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/IESSpotLightNode.d.ts deleted file mode 100644 index 28a59eced..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/IESSpotLightNode.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export default IESSpotLightNode; -/** - * An IES version of the default spot light node. - * - * @augments SpotLightNode - */ -declare class IESSpotLightNode extends SpotLightNode { - /** - * The texture node representing the IES texture. - * - * @type {?TextureNode} - * @default null - */ - _iesTextureNode: TextureNode | null; -} -import SpotLightNode from './SpotLightNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/IrradianceNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/IrradianceNode.d.ts deleted file mode 100644 index 0498aea05..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/IrradianceNode.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -export default IrradianceNode; -/** - * A generic class that can be used by nodes which contribute - * irradiance to the scene. E.g. a light map node can be used - * as input for this module. Used in {@link NodeMaterial}. - * - * @augments LightingNode - */ -declare class IrradianceNode extends LightingNode { - /** - * Constructs a new irradiance node. - * - * @param {Node} node - A node contributing irradiance. - */ - constructor(node: Node); - /** - * A node contributing irradiance. - * - * @type {Node} - */ - node: Node; - setup(builder: any): void; -} -import LightingNode from './LightingNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/LightProbeNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/LightProbeNode.d.ts deleted file mode 100644 index 02fd000fd..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/LightProbeNode.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -export default LightProbeNode; -/** - * Module for representing light probes as nodes. - * - * @augments AnalyticLightNode - */ -declare class LightProbeNode extends AnalyticLightNode { - /** - * Light probe represented as a uniform of spherical harmonics. - * - * @type {UniformArrayNode} - */ - lightProbe: UniformArrayNode; - /** - * Overwritten to updated light probe specific uniforms. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update(frame: NodeFrame): void; - setup(builder: any): void; -} -import AnalyticLightNode from './AnalyticLightNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/LightUtils.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/LightUtils.d.ts deleted file mode 100644 index 9a60548b3..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/LightUtils.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Represents a `discard` shader operation in TSL. - * - * @method - * @param {Object} inputs - The input parameter object. - * @param {Node} inputs.lightDistance - The distance of the light's position to the current fragment position. - * @param {Node} inputs.cutoffDistance - The light's cutoff distance. - * @param {Node} inputs.decayExponent - The light's decay exponent. - * @return {Node} The distance falloff. - */ -export const getDistanceAttenuation: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/LightingContextNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/LightingContextNode.d.ts deleted file mode 100644 index 2917f05e4..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/LightingContextNode.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -export default LightingContextNode; -export const lightingContext: any; -/** - * `LightingContextNode` represents an extension of the {@link ContextNode} module - * by adding lighting specific context data. It represents the runtime context of - * {@link LightsNode}. - * - * @augments ContextNode - */ -declare class LightingContextNode extends ContextNode { - /** - * Constructs a new lighting context node. - * - * @param {LightsNode} lightsNode - The lights node. - * @param {?LightingModel} [lightingModel=null] - The current lighting model. - * @param {?Node} [backdropNode=null] - A backdrop node. - * @param {?Node} [backdropAlphaNode=null] - A backdrop alpha node. - */ - constructor(lightsNode: LightsNode, lightingModel?: LightingModel | null, backdropNode?: Node | null, backdropAlphaNode?: Node | null); - /** - * The current lighting model. - * - * @type {?LightingModel} - * @default null - */ - lightingModel: LightingModel | null; - /** - * A backdrop node. - * - * @type {?Node} - * @default null - */ - backdropNode: Node | null; - /** - * A backdrop alpha node. - * - * @type {?Node} - * @default null - */ - backdropAlphaNode: Node | null; - _value: { - radiance: Node; - irradiance: Node; - iblIrradiance: Node; - ambientOcclusion: Node; - reflectedLight: { - directDiffuse: Node; - directSpecular: Node; - indirectDiffuse: Node; - indirectSpecular: Node; - }; - backdrop: Node; - backdropAlpha: Node; - } | null; - /** - * Returns a lighting context object. - * - * @return {{ - * radiance: Node, - * irradiance: Node, - * iblIrradiance: Node, - * ambientOcclusion: Node, - * reflectedLight: {directDiffuse: Node, directSpecular: Node, indirectDiffuse: Node, indirectSpecular: Node}, - * backdrop: Node, - * backdropAlpha: Node - * }} The lighting context object. - */ - getContext(): { - radiance: Node; - irradiance: Node; - iblIrradiance: Node; - ambientOcclusion: Node; - reflectedLight: { - directDiffuse: Node; - directSpecular: Node; - indirectDiffuse: Node; - indirectSpecular: Node; - }; - backdrop: Node; - backdropAlpha: Node; - }; -} -import ContextNode from '../core/ContextNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/LightingNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/LightingNode.d.ts deleted file mode 100644 index adc145155..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/LightingNode.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -export default LightingNode; -/** - * Base class for lighting nodes. - * - * @augments Node - */ -declare class LightingNode extends Node { - /** - * Constructs a new lighting node. - */ - constructor(); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLightingNode: boolean; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/LightsNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/LightsNode.d.ts deleted file mode 100644 index 6ecec5a31..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/LightsNode.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -export default LightsNode; -export function lights(lights?: Array): LightsNode; -/** - * This node represents the scene's lighting and manages the lighting model's life cycle - * for the current build 3D object. It is responsible for computing the total outgoing - * light in a given lighting context. - * - * @augments Node - */ -declare class LightsNode extends Node { - /** - * Constructs a new lights node. - */ - constructor(); - /** - * A node representing the total diffuse light. - * - * @type {Node} - */ - totalDiffuseNode: Node; - /** - * A node representing the total specular light. - * - * @type {Node} - */ - totalSpecularNode: Node; - /** - * A node representing the outgoing light. - * - * @type {Node} - */ - outgoingLightNode: Node; - /** - * An array representing the lights in the scene. - * - * @private - * @type {Array} - */ - private _lights; - /** - * For each light in the scene, this node will create a - * corresponding light node. - * - * @private - * @type {?Array} - * @default null - */ - private _lightNodes; - /** - * A hash for identifying the current light nodes setup. - * - * @private - * @type {?string} - * @default null - */ - private _lightNodesHash; - /** - * Computes a hash value for identifying the current light nodes setup. - * - * @param {NodeBuilder} builder - A reference to the current node builder. - * @return {string} The computed hash. - */ - getHash(builder: NodeBuilder): string; - analyze(builder: any): void; - /** - * Creates lighting nodes for each scene light. This makes it possible to further - * process lights in the node system. - * - * @param {NodeBuilder} builder - A reference to the current node builder. - */ - setupLightsNode(builder: NodeBuilder): void; - /** - * Sets up a direct light in the lighting model. - * - * @param {Object} builder - The builder object containing the context and stack. - * @param {Object} lightNode - The light node. - * @param {Object} lightData - The light object containing color and direction properties. - */ - setupDirectLight(builder: Object, lightNode: Object, lightData: Object): void; - setupDirectRectAreaLight(builder: any, lightNode: any, lightData: any): void; - /** - * Setups the internal lights by building all respective - * light nodes. - * - * @param {NodeBuilder} builder - A reference to the current node builder. - * @param {Array} lightNodes - An array of lighting nodes. - */ - setupLights(builder: NodeBuilder, lightNodes: Array): void; - getLightNodes(builder: any): LightingNode[] | null; - /** - * The implementation makes sure that for each light in the scene - * there is a corresponding light node. By building the light nodes - * and evaluating the lighting model the outgoing light is computed. - * - * @param {NodeBuilder} builder - A reference to the current node builder. - * @return {Node} A node representing the outgoing light. - */ - setup(builder: NodeBuilder): Node; - /** - * Configures this node with an array of lights. - * - * @param {Array} lights - An array of lights. - * @return {LightsNode} A reference to this node. - */ - setLights(lights: Array): LightsNode; - /** - * Returns an array of the scene's lights. - * - * @return {Array} The scene's lights. - */ - getLights(): Array; - /** - * Whether the scene has lights or not. - * - * @type {boolean} - */ - get hasLights(): boolean; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/PointLightNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/PointLightNode.d.ts deleted file mode 100644 index 4dee5e49c..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/PointLightNode.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -export function directPointLight({ color, lightVector, cutoffDistance, decayExponent }: { - color: any; - lightVector: any; - cutoffDistance: any; - decayExponent: any; -}): { - lightDirection: any; - lightColor: any; -}; -export default PointLightNode; -/** - * Module for representing point lights as nodes. - * - * @augments AnalyticLightNode - */ -declare class PointLightNode extends AnalyticLightNode { - /** - * Uniform node representing the cutoff distance. - * - * @type {UniformNode} - */ - cutoffDistanceNode: UniformNode; - /** - * Uniform node representing the decay exponent. - * - * @type {UniformNode} - */ - decayExponentNode: UniformNode; - /** - * Overwritten to updated point light specific uniforms. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update(frame: NodeFrame): void; - setupDirect(builder: any): { - lightDirection: any; - lightColor: any; - }; -} -import AnalyticLightNode from './AnalyticLightNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/PointShadowNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/PointShadowNode.d.ts deleted file mode 100644 index 6215b48a3..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/PointShadowNode.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -export const BasicPointShadowFilter: () => void; -/** - * A shadow filtering function for point lights using Vogel disk sampling and IGN. - * - * Uses 5 samples distributed via Vogel disk pattern in tangent space around the - * sample direction, rotated per-pixel using Interleaved Gradient Noise (IGN). - * - * @method - * @param {Object} inputs - The input parameter object. - * @param {CubeDepthTexture} inputs.depthTexture - A reference to the shadow cube map. - * @param {Node} inputs.bd3D - The normalized direction from light to fragment. - * @param {Node} inputs.dp - The depth value to compare against. - * @param {LightShadow} inputs.shadow - The light shadow. - * @return {Node} The filtering result. - */ -export const PointShadowFilter: () => void; -export default PointShadowNode; -export function pointShadow(light: PointLight, shadow?: PointLightShadow | null): PointShadowNode; -/** - * Represents the shadow implementation for point light nodes. - * - * @augments ShadowNode - */ -declare class PointShadowNode extends ShadowNode { - /** - * Overwrites the default implementation to only use point light specific - * shadow filter functions. - * - * @param {NodeBuilder} builder - A reference to the current node builder. - * @param {Object} inputs - A configuration object that defines the shadow filtering. - * @param {Function} inputs.filterFn - This function defines the filtering type of the shadow map e.g. PCF. - * @param {DepthTexture} inputs.depthTexture - A reference to the shadow map's depth texture. - * @param {Node} inputs.shadowCoord - Shadow coordinates which are used to sample from the shadow map. - * @param {LightShadow} inputs.shadow - The light shadow. - * @return {Node} The result node of the shadow filtering. - */ - setupShadowFilter(builder: NodeBuilder, { filterFn, depthTexture, shadowCoord, shadow }: { - filterFn: Function; - depthTexture: DepthTexture; - shadowCoord: Node; - shadow: LightShadow; - }): Node; - /** - * Overwrites the default implementation to create a CubeRenderTarget with CubeDepthTexture. - * - * @param {LightShadow} shadow - The light shadow object. - * @param {NodeBuilder} builder - A reference to the current node builder. - * @return {Object} An object containing the shadow map and depth texture. - */ - setupRenderTarget(shadow: LightShadow, builder: NodeBuilder): Object; -} -import ShadowNode from './ShadowNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/ProjectorLightNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/ProjectorLightNode.d.ts deleted file mode 100644 index 22f3ffe8b..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/ProjectorLightNode.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default ProjectorLightNode; -/** - * An implementation of a projector light node. - * - * @augments SpotLightNode - */ -declare class ProjectorLightNode extends SpotLightNode { - update(frame: any): void; - /** - * Overwrites the default implementation to compute projection attenuation. - * - * @param {NodeBuilder} builder - The node builder. - * @return {Node} The spot attenuation. - */ - getSpotAttenuation(builder: NodeBuilder): Node; -} -import SpotLightNode from './SpotLightNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/RectAreaLightNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/RectAreaLightNode.d.ts deleted file mode 100644 index 0b4d56420..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/RectAreaLightNode.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -export default RectAreaLightNode; -/** - * Module for representing rect area lights as nodes. - * - * @augments AnalyticLightNode - */ -declare class RectAreaLightNode extends AnalyticLightNode { - /** - * Used to configure the internal BRDF approximation texture data. - * - * @param {RectAreaLightTexturesLib} ltc - The BRDF approximation texture data. - */ - static setLTC(ltc: RectAreaLightTexturesLib): void; - /** - * Uniform node representing the half height of the are light. - * - * @type {UniformNode} - */ - halfHeight: UniformNode; - /** - * Uniform node representing the half width of the are light. - * - * @type {UniformNode} - */ - halfWidth: UniformNode; - /** - * Overwritten to updated rect area light specific uniforms. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update(frame: NodeFrame): void; - setupDirectRectArea(builder: any): { - lightColor: Node; - lightPosition: UniformNode; - halfWidth: UniformNode; - halfHeight: UniformNode; - ltc_1: import("../accessors/TextureNode.js").default; - ltc_2: import("../accessors/TextureNode.js").default; - }; -} -import AnalyticLightNode from './AnalyticLightNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/ShadowBaseNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/ShadowBaseNode.d.ts deleted file mode 100644 index fbbfa5fd2..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/ShadowBaseNode.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -/** - * TSL object that represents the vertex position in world space during the shadow pass. - * - * @tsl - * @type {Node} - */ -export const shadowPositionWorld: Node; -export default ShadowBaseNode; -import Node from '../core/Node.js'; -/** - * Base class for all shadow nodes. - * - * Shadow nodes encapsulate shadow related logic and are always coupled to lighting nodes. - * Lighting nodes might share the same shadow node type or use specific ones depending on - * their requirements. - * - * @augments Node - */ -declare class ShadowBaseNode extends Node { - /** - * Constructs a new shadow base node. - * - * @param {Light} light - The shadow casting light. - */ - constructor(light: Light); - /** - * The shadow casting light. - * - * @type {Light} - */ - light: Light; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isShadowBaseNode: boolean; - /** - * Setups the shadow position node which is by default the predefined TSL node object `shadowPositionWorld`. - * - * @param {NodeBuilder} object - A configuration object that must at least hold a material reference. - */ - setupShadowPosition({ context, material }: NodeBuilder): void; -} diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/ShadowFilterNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/ShadowFilterNode.d.ts deleted file mode 100644 index 2fb0664f6..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/ShadowFilterNode.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * A shadow filtering function performing basic filtering. This is in fact an unfiltered version of the shadow map - * with a binary `[0,1]` result. - * - * @method - * @param {Object} inputs - The input parameter object. - * @param {DepthTexture} inputs.depthTexture - A reference to the shadow map's texture data. - * @param {Node} inputs.shadowCoord - The shadow coordinates. - * @return {Node} The filtering result. - */ -export const BasicShadowFilter: () => void; -/** - * A shadow filtering function performing PCF filtering with Vogel disk sampling and IGN. - * - * Uses 5 samples distributed via Vogel disk pattern, rotated per-pixel using Interleaved - * Gradient Noise (IGN) to break up banding artifacts. Combined with hardware PCF (4-tap - * filtering per sample), this effectively provides 20 filtered taps with better distribution. - * - * @method - * @param {Object} inputs - The input parameter object. - * @param {DepthTexture} inputs.depthTexture - A reference to the shadow map's texture data. - * @param {Node} inputs.shadowCoord - The shadow coordinates. - * @param {LightShadow} inputs.shadow - The light shadow. - * @return {Node} The filtering result. - */ -export const PCFShadowFilter: () => void; -/** - * A shadow filtering function performing PCF soft filtering. - * - * @method - * @param {Object} inputs - The input parameter object. - * @param {DepthTexture} inputs.depthTexture - A reference to the shadow map's texture data. - * @param {Node} inputs.shadowCoord - The shadow coordinates. - * @param {LightShadow} inputs.shadow - The light shadow. - * @return {Node} The filtering result. - */ -export const PCFSoftShadowFilter: () => void; -/** - * A shadow filtering function performing VSM filtering. - * - * @method - * @param {Object} inputs - The input parameter object. - * @param {DepthTexture} inputs.depthTexture - A reference to the shadow map's texture data. - * @param {Node} inputs.shadowCoord - The shadow coordinates. - * @return {Node} The filtering result. - */ -export const VSMShadowFilter: () => void; -export function getShadowMaterial(light: Light): NodeMaterial; -export function disposeShadowMaterial(light: Light): void; -import NodeMaterial from '../../materials/nodes/NodeMaterial.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/ShadowNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/ShadowNode.d.ts deleted file mode 100644 index d98fa7418..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/ShadowNode.d.ts +++ /dev/null @@ -1,193 +0,0 @@ -export function getShadowRenderObjectFunction(renderer: Renderer, shadow: LightShadow, shadowType: number, useVelocity: boolean): shadowRenderObjectFunction; -export default ShadowNode; -export function shadow(light: Light, shadow?: LightShadow | null): ShadowNode; -/** - * Represents the default shadow implementation for lighting nodes. - * - * @augments ShadowBaseNode - */ -declare class ShadowNode extends ShadowBaseNode { - /** - * Constructs a new shadow node. - * - * @param {Light} light - The shadow casting light. - * @param {?LightShadow} [shadow=null] - An optional light shadow. - */ - constructor(light: Light, shadow?: LightShadow | null); - /** - * The light shadow which defines the properties light's - * shadow. - * - * @type {?LightShadow} - * @default null - */ - shadow: LightShadow | null; - /** - * A reference to the shadow map which is a render target. - * - * @type {?RenderTarget} - * @default null - */ - shadowMap: RenderTarget | null; - /** - * Only relevant for VSM shadows. Render target for the - * first VSM render pass. - * - * @type {?RenderTarget} - * @default null - */ - vsmShadowMapVertical: RenderTarget | null; - /** - * Only relevant for VSM shadows. Render target for the - * second VSM render pass. - * - * @type {?RenderTarget} - * @default null - */ - vsmShadowMapHorizontal: RenderTarget | null; - /** - * Only relevant for VSM shadows. Node material which - * is used to render the first VSM pass. - * - * @type {?NodeMaterial} - * @default null - */ - vsmMaterialVertical: NodeMaterial | null; - /** - * Only relevant for VSM shadows. Node material which - * is used to render the second VSM pass. - * - * @type {?NodeMaterial} - * @default null - */ - vsmMaterialHorizontal: NodeMaterial | null; - /** - * A reference to the output node which defines the - * final result of this shadow node. - * - * @type {?Node} - * @private - * @default null - */ - private _node; - /** - * The current shadow map type of this shadow node. - * - * @type {?number} - * @private - * @default null - */ - private _currentShadowType; - /** - * A Weak Map holding the current frame ID per camera. Used - * to control the update of shadow maps. - * - * @type {WeakMap} - * @private - */ - private _cameraFrameId; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isShadowNode: boolean; - /** - * This index can be used when overriding setupRenderTarget with a RenderTarget Array to specify the depth layer. - * - * @type {number} - * @readonly - * @default true - */ - readonly depthLayer: number; - /** - * Setups the shadow filtering. - * - * @param {NodeBuilder} builder - A reference to the current node builder. - * @param {Object} inputs - A configuration object that defines the shadow filtering. - * @param {Function} inputs.filterFn - This function defines the filtering type of the shadow map e.g. PCF. - * @param {DepthTexture} inputs.depthTexture - A reference to the shadow map's texture data. - * @param {Node} inputs.shadowCoord - Shadow coordinates which are used to sample from the shadow map. - * @param {LightShadow} inputs.shadow - The light shadow. - * @return {Node} The result node of the shadow filtering. - */ - setupShadowFilter(builder: NodeBuilder, { filterFn, depthTexture, shadowCoord, shadow, depthLayer }: { - filterFn: Function; - depthTexture: DepthTexture; - shadowCoord: Node; - shadow: LightShadow; - }): Node; - /** - * Setups the shadow coordinates. - * - * @param {NodeBuilder} builder - A reference to the current node builder. - * @param {Node} shadowPosition - A node representing the shadow position. - * @return {Node} The shadow coordinates. - */ - setupShadowCoord(builder: NodeBuilder, shadowPosition: Node): Node; - /** - * Returns the shadow filtering function for the given shadow type. - * - * @param {number} type - The shadow type. - * @return {Function} The filtering function. - */ - getShadowFilterFn(type: number): Function; - setupRenderTarget(shadow: any, builder: any): { - shadowMap: any; - depthTexture: DepthTexture; - }; - /** - * Setups the shadow output node. - * - * @param {NodeBuilder} builder - A reference to the current node builder. - * @return {Node} The shadow output node. - */ - setupShadow(builder: NodeBuilder): Node; - /** - * The implementation performs the setup of the output node. An output is only - * produces if shadow mapping is globally enabled in the renderer. - * - * @param {NodeBuilder} builder - A reference to the current node builder. - * @return {ShaderCallNodeInternal} The output node. - */ - setup(builder: NodeBuilder): ShaderCallNodeInternal; - /** - * Renders the shadow. The logic of this function could be included - * into {@link ShadowNode#updateShadow} however more specialized shadow - * nodes might require a custom shadow map rendering. By having a - * dedicated method, it's easier to overwrite the default behavior. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - renderShadow(frame: NodeFrame): void; - /** - * Updates the shadow. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - updateShadow(frame: NodeFrame): void; - _depthVersionCached: any; - /** - * For VSM additional render passes are required. - * - * @param {Renderer} renderer - A reference to the current renderer. - */ - vsmPass(renderer: Renderer): void; - /** - * Resets the resouce state of this shadow node. - * - * @private - */ - private _reset; - /** - * The implementation performs the update of the shadow map if necessary. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - updateBefore(frame: NodeFrame): void; -} -import ShadowBaseNode from './ShadowBaseNode.js'; -import NodeMaterial from '../../materials/nodes/NodeMaterial.js'; -import { DepthTexture } from '../../textures/DepthTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/lighting/SpotLightNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/lighting/SpotLightNode.d.ts deleted file mode 100644 index 84f17e937..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/lighting/SpotLightNode.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -export default SpotLightNode; -/** - * Module for representing spot lights as nodes. - * - * @augments AnalyticLightNode - */ -declare class SpotLightNode extends AnalyticLightNode { - /** - * Uniform node representing the cone cosine. - * - * @type {UniformNode} - */ - coneCosNode: UniformNode; - /** - * Uniform node representing the penumbra cosine. - * - * @type {UniformNode} - */ - penumbraCosNode: UniformNode; - /** - * Uniform node representing the cutoff distance. - * - * @type {UniformNode} - */ - cutoffDistanceNode: UniformNode; - /** - * Uniform node representing the decay exponent. - * - * @type {UniformNode} - */ - decayExponentNode: UniformNode; - /** - * Overwritten to updated spot light specific uniforms. - * - * @param {NodeFrame} frame - A reference to the current node frame. - */ - update(frame: NodeFrame): void; - /** - * Computes the spot attenuation for the given angle. - * - * @param {NodeBuilder} builder - The node builder. - * @param {Node} angleCosine - The angle to compute the spot attenuation for. - * @return {Node} The spot attenuation. - */ - getSpotAttenuation(builder: NodeBuilder, angleCosine: Node): Node; - getLightCoord(builder: any): any; - setupDirect(builder: any): { - lightColor: any; - lightDirection: any; - }; -} -import AnalyticLightNode from './AnalyticLightNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/materialx/MaterialXNodes.d.ts b/jsdoc-testing/jsdoc/src/nodes/materialx/MaterialXNodes.d.ts deleted file mode 100644 index c994857f8..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/materialx/MaterialXNodes.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -export function mx_aastep(threshold: any, value: any): any; -export function mx_ramplr(valuel: any, valuer: any, texcoord?: AttributeNode): any; -export function mx_ramptb(valuet: any, valueb: any, texcoord?: AttributeNode): any; -export function mx_ramp4(valuetl: any, valuetr: any, valuebl: any, valuebr: any, texcoord?: AttributeNode): any; -export function mx_splitlr(valuel: any, valuer: any, center: any, texcoord?: AttributeNode): any; -export function mx_splittb(valuet: any, valueb: any, center: any, texcoord?: AttributeNode): any; -export function mx_transform_uv(uv_scale?: number, uv_offset?: number, uv_geo?: AttributeNode): any; -export function mx_safepower(in1: any, in2?: number): any; -export function mx_contrast(input: any, amount?: number, pivot?: number): any; -export function mx_noise_float(texcoord?: AttributeNode, amplitude?: number, pivot?: number): any; -export function mx_noise_vec3(texcoord?: AttributeNode, amplitude?: number, pivot?: number): any; -export function mx_noise_vec4(texcoord?: AttributeNode, amplitude?: number, pivot?: number): any; -export function mx_unifiednoise2d(noiseType: any, texcoord?: AttributeNode, freq?: any, offset?: any, jitter?: number, outmin?: number, outmax?: number, clampoutput?: boolean, octaves?: number, lacunarity?: number, diminish?: number): any; -export function mx_unifiednoise3d(noiseType: any, texcoord?: AttributeNode, freq?: any, offset?: any, jitter?: number, outmin?: number, outmax?: number, clampoutput?: boolean, octaves?: number, lacunarity?: number, diminish?: number): any; -export function mx_worley_noise_float(texcoord?: AttributeNode, jitter?: number): any; -export function mx_worley_noise_vec2(texcoord?: AttributeNode, jitter?: number): any; -export function mx_worley_noise_vec3(texcoord?: AttributeNode, jitter?: number): any; -export function mx_cell_noise_float(texcoord?: AttributeNode): any; -export function mx_fractal_noise_float(position?: AttributeNode, octaves?: number, lacunarity?: number, diminish?: number, amplitude?: number): any; -export function mx_fractal_noise_vec2(position?: AttributeNode, octaves?: number, lacunarity?: number, diminish?: number, amplitude?: number): any; -export function mx_fractal_noise_vec3(position?: AttributeNode, octaves?: number, lacunarity?: number, diminish?: number, amplitude?: number): any; -export function mx_fractal_noise_vec4(position?: AttributeNode, octaves?: number, lacunarity?: number, diminish?: number, amplitude?: number): any; -export function mx_add(in1: any, in2?: any): any; -export function mx_subtract(in1: any, in2?: any): any; -export function mx_multiply(in1: any, in2?: any): any; -export function mx_divide(in1: any, in2?: any): any; -export function mx_modulo(in1: any, in2?: any): any; -export function mx_power(in1: any, in2?: any): any; -export function mx_atan2(in1?: any, in2?: any): any; -export function mx_timer(): UniformNode; -export function mx_frame(): UniformNode; -export function mx_invert(in1: any, amount?: any): any; -export function mx_ifgreater(value1: any, value2: any, in1: any, in2: any): any; -export function mx_ifgreatereq(value1: any, value2: any, in1: any, in2: any): any; -export function mx_ifequal(value1: any, value2: any, in1: any, in2: any): any; -export function mx_separate(in1: any, channelOrOut?: null): any; -export function mx_place2d(texcoord: any, pivot?: any, scale?: any, rotate?: any, offset?: any): any; -export function mx_rotate2d(input: any, amount: any): any; -export function mx_rotate3d(input: any, amount: any, axis: any): any; -export function mx_heighttonormal(input: any, scale: any): any; -import { mx_hsvtorgb } from './lib/mx_hsv.js'; -import { mx_rgbtohsv } from './lib/mx_hsv.js'; -import { mx_srgb_texture_to_lin_rec709 } from './lib/mx_transform_color.js'; -export { mx_hsvtorgb, mx_rgbtohsv, mx_srgb_texture_to_lin_rec709 }; diff --git a/jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_hsv.d.ts b/jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_hsv.d.ts deleted file mode 100644 index 27d194964..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_hsv.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const mx_hsvtorgb: any; -export const mx_rgbtohsv: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_noise.d.ts b/jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_noise.d.ts deleted file mode 100644 index d22a57d41..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_noise.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -export const mx_select: any; -export const mx_negate_if: any; -export const mx_floor: any; -export const mx_floorfrac: () => void; -export const mx_bilerp_0: any; -export const mx_bilerp_1: any; -export const mx_bilerp: import("../../utils/FunctionOverloadingNode.js").default; -export const mx_trilerp_0: any; -export const mx_trilerp_1: any; -export const mx_trilerp: import("../../utils/FunctionOverloadingNode.js").default; -export const mx_gradient_float_0: any; -export const mx_gradient_float_1: any; -export const mx_gradient_float: import("../../utils/FunctionOverloadingNode.js").default; -export const mx_gradient_vec3_0: any; -export const mx_gradient_vec3_1: any; -export const mx_gradient_vec3: import("../../utils/FunctionOverloadingNode.js").default; -export const mx_gradient_scale2d_0: any; -export const mx_gradient_scale3d_0: any; -export const mx_gradient_scale2d_1: any; -export const mx_gradient_scale2d: import("../../utils/FunctionOverloadingNode.js").default; -export const mx_gradient_scale3d_1: any; -export const mx_gradient_scale3d: import("../../utils/FunctionOverloadingNode.js").default; -export const mx_rotl32: any; -export const mx_bjmix: () => void; -export const mx_bjfinal: any; -export const mx_bits_to_01: any; -export const mx_fade: any; -export const mx_hash_int_0: any; -export const mx_hash_int_1: any; -export const mx_hash_int_2: any; -export const mx_hash_int_3: any; -export const mx_hash_int_4: any; -export const mx_hash_int: import("../../utils/FunctionOverloadingNode.js").default; -export const mx_hash_vec3_0: any; -export const mx_hash_vec3_1: any; -export const mx_hash_vec3: import("../../utils/FunctionOverloadingNode.js").default; -export const mx_perlin_noise_float_0: any; -export const mx_perlin_noise_float_1: any; -export const mx_perlin_noise_float: import("../../utils/FunctionOverloadingNode.js").default; -export const mx_perlin_noise_vec3_0: any; -export const mx_perlin_noise_vec3_1: any; -export const mx_perlin_noise_vec3: import("../../utils/FunctionOverloadingNode.js").default; -export const mx_cell_noise_float_0: any; -export const mx_cell_noise_float_1: any; -export const mx_cell_noise_float_2: any; -export const mx_cell_noise_float_3: any; -export const mx_cell_noise_float: import("../../utils/FunctionOverloadingNode.js").default; -export const mx_cell_noise_vec3_0: any; -export const mx_cell_noise_vec3_1: any; -export const mx_cell_noise_vec3_2: any; -export const mx_cell_noise_vec3_3: any; -export const mx_cell_noise_vec3: import("../../utils/FunctionOverloadingNode.js").default; -export const mx_fractal_noise_float: any; -export const mx_fractal_noise_vec3: any; -export const mx_fractal_noise_vec2: any; -export const mx_fractal_noise_vec4: any; -export const mx_worley_distance_0: any; -export const mx_worley_distance_1: any; -export const mx_worley_distance: import("../../utils/FunctionOverloadingNode.js").default; -export const mx_worley_noise_float_0: any; -export const mx_worley_noise_vec2_0: any; -export const mx_worley_noise_vec3_0: any; -export const mx_worley_noise_float_1: any; -export const mx_worley_noise_float: import("../../utils/FunctionOverloadingNode.js").default; -export const mx_worley_noise_vec2_1: any; -export const mx_worley_noise_vec2: import("../../utils/FunctionOverloadingNode.js").default; -export const mx_worley_noise_vec3_1: any; -export const mx_worley_noise_vec3: import("../../utils/FunctionOverloadingNode.js").default; -export const mx_unifiednoise2d: any; -export const mx_unifiednoise3d: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_transform_color.d.ts b/jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_transform_color.d.ts deleted file mode 100644 index 521d93346..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/materialx/lib/mx_transform_color.d.ts +++ /dev/null @@ -1 +0,0 @@ -export const mx_srgb_texture_to_lin_rec709: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/math/BitcastNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/math/BitcastNode.d.ts deleted file mode 100644 index f15d7989b..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/math/BitcastNode.d.ts +++ /dev/null @@ -1,62 +0,0 @@ -export default BitcastNode; -/** - * Reinterpret the bit representation of a value in one type as a value in another type. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @param {string} y - The new type. - * @returns {Node} - */ -export const bitcast: any; -export function floatBitsToInt(value: Node): BitcastNode; -export function floatBitsToUint(value: Node): BitcastNode; -export function intBitsToFloat(value: Node): BitcastNode; -export function uintBitsToFloat(value: Node): BitcastNode; -/** - * This node represents an operation that reinterprets the bit representation of a value - * in one type as a value in another type. - * - * @augments TempNode - */ -declare class BitcastNode extends TempNode { - /** - * Constructs a new bitcast node. - * - * @param {Node} valueNode - The value to convert. - * @param {string} conversionType - The type to convert to. - * @param {?string} [inputType = null] - The expected input data type of the bitcast operation. - */ - constructor(valueNode: Node, conversionType: string, inputType?: string | null); - /** - * The data to bitcast to a new type. - * - * @type {Node} - */ - valueNode: Node; - /** - * The type the value will be converted to. - * - * @type {string} - */ - conversionType: string; - /** - * The expected input data type of the bitcast operation. - * - * - * @type {string} - * @default null - */ - inputType: string; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBitcastNode: boolean; - generateNodeType(builder: any): any; - generate(builder: any): string; -} -import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/math/BitcountNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/math/BitcountNode.d.ts deleted file mode 100644 index 5a85b0585..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/math/BitcountNode.d.ts +++ /dev/null @@ -1,111 +0,0 @@ -export default BitcountNode; -/** - * Finds the number of consecutive 0 bits from the least significant bit of the input value, - * which is also the index of the least significant bit of the input value. - * - * Can only be used with {@link WebGPURenderer} and a WebGPU backend. - * - * @tsl - * @function - * @param {Node | number} x - The input value. - * @returns {Node} - */ -export const countTrailingZeros: any; -/** - * Finds the number of consecutive 0 bits starting from the most significant bit of the input value. - * - * Can only be used with {@link WebGPURenderer} and a WebGPU backend. - * - * @tsl - * @function - * @param {Node | number} x - The input value. - * @returns {Node} - */ -export const countLeadingZeros: any; -/** - * Finds the number of '1' bits set in the input value - * - * Can only be used with {@link WebGPURenderer} and a WebGPU backend. - * - * @tsl - * @function - * @returns {Node} - */ -export const countOneBits: any; -/** - * This node represents an operation that counts the bits of a piece of shader data. - * - * @augments MathNode - */ -declare class BitcountNode extends MathNode { - /** - * Constructs a new math node. - * - * @param {'countTrailingZeros'|'countLeadingZeros'|'countOneBits'} method - The method name. - * @param {Node} aNode - The first input. - */ - constructor(method: "countTrailingZeros" | "countLeadingZeros" | "countOneBits", aNode: Node); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBitcountNode: boolean; - /** - * Casts the input value of the function to an integer if necessary. - * - * @private - * @param {Node|Node} inputNode - The input value. - * @param {Node} outputNode - The output value. - * @param {string} elementType - The type of the input value. - */ - private _resolveElementType; - _returnDataNode(inputType: any): any; - /** - * Creates and registers a reusable GLSL function that emulates the behavior of countTrailingZeros. - * - * @private - * @param {string} method - The name of the function to create. - * @param {string} elementType - The type of the input value. - * @returns {Function} - The generated function - */ - private _createTrailingZerosBaseLayout; - /** - * Creates and registers a reusable GLSL function that emulates the behavior of countLeadingZeros. - * - * @private - * @param {string} method - The name of the function to create. - * @param {string} elementType - The type of the input value. - * @returns {Function} - The generated function - */ - private _createLeadingZerosBaseLayout; - /** - * Creates and registers a reusable GLSL function that emulates the behavior of countOneBits. - * - * @private - * @param {string} method - The name of the function to create. - * @param {string} elementType - The type of the input value. - * @returns {Function} - The generated function - */ - private _createOneBitsBaseLayout; - /** - * Creates and registers a reusable GLSL function that emulates the behavior of the specified bitcount function. - * including considerations for component-wise bitcounts on vector type inputs. - * - * @private - * @param {string} method - The name of the function to create. - * @param {string} inputType - The type of the input value. - * @param {number} typeLength - The vec length of the input value. - * @param {Function} baseFn - The base function that operates on an individual component of the vector. - * @returns {Function} - The alias function for the specified bitcount method. - */ - private _createMainLayout; -} -declare namespace BitcountNode { - let COUNT_TRAILING_ZEROS: string; - let COUNT_LEADING_ZEROS: string; - let COUNT_ONE_BITS: string; -} -import MathNode from './MathNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/math/ConditionalNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/math/ConditionalNode.d.ts deleted file mode 100644 index 25e21f3e9..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/math/ConditionalNode.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -export default ConditionalNode; -/** - * TSL function for creating a conditional node. - * - * @tsl - * @function - * @param {Node} condNode - The node that defines the condition. - * @param {Node} ifNode - The node that is evaluate when the condition ends up `true`. - * @param {?Node} [elseNode=null] - The node that is evaluate when the condition ends up `false`. - * @returns {ConditionalNode} - */ -export const select: any; -/** - * Represents a logical `if/else` statement. Can be used as an alternative - * to the `If()`/`Else()` syntax. - * - * The `select()` method is called in a chaining fashion on a condition. The parameter nodes of `select()` - * determine the outcome of the entire statement. - * - * ```js - * velocity = position.greaterThanEqual( limit ).select( velocity.negate(), velocity ); - * ``` - * - * @augments Node - */ -declare class ConditionalNode extends Node { - /** - * Constructs a new conditional node. - * - * @param {Node} condNode - The node that defines the condition. - * @param {Node} ifNode - The node that is evaluate when the condition ends up `true`. - * @param {?Node} [elseNode=null] - The node that is evaluate when the condition ends up `false`. - */ - constructor(condNode: Node, ifNode: Node, elseNode?: Node | null); - /** - * The node that defines the condition. - * - * @type {Node} - */ - condNode: Node; - /** - * The node that is evaluate when the condition ends up `true`. - * - * @type {Node} - */ - ifNode: Node; - /** - * The node that is evaluate when the condition ends up `false`. - * - * @type {?Node} - * @default null - */ - elseNode: Node | null; - /** - * This method is overwritten since the node type is inferred from the if/else - * nodes. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - setup(builder: any): void; - generate(builder: any, output: any): any; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/math/Hash.d.ts b/jsdoc-testing/jsdoc/src/nodes/math/Hash.d.ts deleted file mode 100644 index e42866ba8..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/math/Hash.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Generates a hash value in the range `[0, 1]` from the given seed. - * - * @tsl - * @function - * @param {Node} seed - The seed. - * @return {Node} The hash value. - */ -export const hash: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/math/MathNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/math/MathNode.d.ts deleted file mode 100644 index 8cdc4720d..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/math/MathNode.d.ts +++ /dev/null @@ -1,701 +0,0 @@ -export default MathNode; -/** - * A small value used to handle floating-point precision errors. - * - * @tsl - * @type {Node} - */ -export const EPSILON: Node; -/** - * Represents infinity. - * - * @tsl - * @type {Node} - */ -export const INFINITY: Node; -/** - * Represents PI. - * - * @tsl - * @type {Node} - */ -export const PI: Node; -/** - * Represents PI * 2. Please use the non-deprecated version `TWO_PI`. - * - * @tsl - * @deprecated - * @type {Node} - */ -export const PI2: Node; -/** - * Represents PI * 2. - * - * @tsl - * @type {Node} - */ -export const TWO_PI: Node; -/** - * Represents PI / 2. - * - * @tsl - * @type {Node} - */ -export const HALF_PI: Node; -/** - * Returns `true` if all components of `x` are `true`. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const all: any; -/** - * Returns `true` if any components of `x` are `true`. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const any: any; -/** - * Converts a quantity in degrees to radians. - * - * @tsl - * @function - * @param {Node | number} x - The input in degrees. - * @returns {Node} - */ -export const radians: any; -/** - * Convert a quantity in radians to degrees. - * - * @tsl - * @function - * @param {Node | number} x - The input in radians. - * @returns {Node} - */ -export const degrees: any; -/** - * Returns the natural exponentiation of the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const exp: any; -/** - * Returns 2 raised to the power of the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const exp2: any; -/** - * Returns the natural logarithm of the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const log: any; -/** - * Returns the base 2 logarithm of the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const log2: any; -/** - * Returns the square root of the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const sqrt: any; -/** - * Returns the inverse of the square root of the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const inverseSqrt: any; -/** - * Finds the nearest integer less than or equal to the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const floor: any; -/** - * Finds the nearest integer that is greater than or equal to the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const ceil: any; -/** - * Calculates the unit vector in the same direction as the original vector. - * - * @tsl - * @function - * @param {Node} x - The input vector. - * @returns {Node} - */ -export const normalize: any; -/** - * Computes the fractional part of the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const fract: any; -/** - * Returns the sine of the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const sin: any; -/** - * Returns the hyperbolic sine of the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const sinh: any; -/** - * Returns the cosine of the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const cos: any; -/** - * Returns the hyperbolic cosine of the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const cosh: any; -/** - * Returns the tangent of the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const tan: any; -/** - * Returns the hyperbolic tangent of the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const tanh: any; -/** - * Returns the arcsine of the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const asin: any; -/** - * Returns the inverse hyperbolic sine of the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const asinh: any; -/** - * Returns the arccosine of the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const acos: any; -/** - * Returns the inverse hyperbolic cosine of the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const acosh: any; -/** - * Returns the arc-tangent of the parameter. - * If two parameters are provided, the result is `atan2(y/x)`. - * - * @tsl - * @function - * @param {Node | number} y - The y parameter. - * @param {?(Node | number)} x - The x parameter. - * @returns {Node} - */ -export const atan: any; -/** - * Returns the inverse hyperbolic tangent of the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const atanh: any; -/** - * Returns the absolute value of the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const abs: any; -/** - * Extracts the sign of the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const sign: any; -/** - * Calculates the length of a vector. - * - * @tsl - * @function - * @param {Node} x - The parameter. - * @returns {Node} - */ -export const length: any; -/** - * Negates the value of the parameter (-x). - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const negate: any; -/** - * Return `1` minus the parameter. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const oneMinus: any; -/** - * Returns the partial derivative of the parameter with respect to x. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const dFdx: any; -/** - * Returns the partial derivative of the parameter with respect to y. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const dFdy: any; -/** - * Rounds the parameter to the nearest integer. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const round: any; -/** - * Returns the reciprocal of the parameter `(1/x)`. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const reciprocal: any; -/** - * Truncates the parameter, removing the fractional part. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const trunc: any; -/** - * Returns the sum of the absolute derivatives in x and y. - * - * @tsl - * @function - * @param {Node | number} x - The parameter. - * @returns {Node} - */ -export const fwidth: any; -/** - * Returns the transpose of a matrix. - * - * @tsl - * @function - * @param {Node} x - The parameter. - * @returns {Node} - */ -export const transpose: any; -/** - * Returns the determinant of a matrix. - * - * @tsl - * @function - * @param {Node} x - The parameter. - * @returns {Node} - */ -export const determinant: any; -/** - * Returns the inverse of a matrix. - * - * @tsl - * @function - * @param {Node} x - The parameter. - * @returns {Node} - */ -export const inverse: any; -/** - * Returns the least of the given values. - * - * @tsl - * @function - * @param {...(Node | number)} values - The values to compare. - * @returns {Node} - */ -export const min: any; -/** - * Returns the greatest of the given values. - * - * @tsl - * @function - * @param {...(Node | number)} values - The values to compare. - * @returns {Node} - */ -export const max: any; -/** - * Generate a step function by comparing two values. - * - * @tsl - * @function - * @param {Node | number} x - The y parameter. - * @param {Node | number} y - The x parameter. - * @returns {Node} - */ -export const step: any; -/** - * Calculates the reflection direction for an incident vector. - * - * @tsl - * @function - * @param {Node} I - The incident vector. - * @param {Node} N - The normal vector. - * @returns {Node} - */ -export const reflect: any; -/** - * Calculates the distance between two points. - * - * @tsl - * @function - * @param {Node} x - The first point. - * @param {Node} y - The second point. - * @returns {Node} - */ -export const distance: any; -/** - * Calculates the absolute difference between two values. - * - * @tsl - * @function - * @param {Node | number} x - The first parameter. - * @param {Node | number} y - The second parameter. - * @returns {Node} - */ -export const difference: any; -/** - * Calculates the dot product of two vectors. - * - * @tsl - * @function - * @param {Node} x - The first vector. - * @param {Node} y - The second vector. - * @returns {Node} - */ -export const dot: any; -/** - * Calculates the cross product of two vectors. - * - * @tsl - * @function - * @param {Node} x - The first vector. - * @param {Node} y - The second vector. - * @returns {Node} - */ -export const cross: any; -/** - * Return the value of the first parameter raised to the power of the second one. - * - * @tsl - * @function - * @param {Node | number} x - The first parameter. - * @param {Node | number} y - The second parameter. - * @returns {Node} - */ -export const pow: any; -export function pow2(x: Node | number): Node; -export function pow3(x: Node | number): Node; -export function pow4(x: Node | number): Node; -/** - * Transforms the direction of a vector by a matrix and then normalizes the result. - * - * @tsl - * @function - * @param {Node} direction - The direction vector. - * @param {Node} matrix - The transformation matrix. - * @returns {Node} - */ -export const transformDirection: any; -export function cbrt(a: Node | number): Node; -export function lengthSq(a: Node): Node; -/** - * Linearly interpolates between two values. - * - * @tsl - * @function - * @param {Node | number} a - The first parameter. - * @param {Node | number} b - The second parameter. - * @param {Node | number} t - The interpolation value. - * @returns {Node} - */ -export const mix: any; -export function clamp(value: Node | number, low?: Node | number, high?: Node | number): Node; -export function saturate(value: Node | number): Node; -/** - * Calculates the refraction direction for an incident vector. - * - * @tsl - * @function - * @param {Node} I - The incident vector. - * @param {Node} N - The normal vector. - * @param {Node} eta - The ratio of indices of refraction. - * @returns {Node} - */ -export const refract: any; -/** - * Performs a Hermite interpolation between two values. - * - * @tsl - * @function - * @param {Node | number} low - The value of the lower edge of the Hermite function. - * @param {Node | number} high - The value of the upper edge of the Hermite function. - * @param {Node | number} x - The source value for interpolation. - * @returns {Node} - */ -export const smoothstep: any; -/** - * Returns a vector pointing in the same direction as another. - * - * @tsl - * @function - * @param {Node} N - The vector to orient. - * @param {Node} I - The incident vector. - * @param {Node} Nref - The reference vector. - * @returns {Node} - */ -export const faceForward: any; -/** - * Returns a random value for the given uv. - * - * @tsl - * @function - * @param {Node} uv - The uv node. - * @returns {Node} - */ -export const rand: () => void; -export function mixElement(t: Node | number, e1: Node | number, e2: Node | number): Node; -export function smoothstepElement(x: Node | number, low: Node | number, high: Node | number): Node; -export function stepElement(x: Node | number, edge: Node | number): Node; -export const faceforward: any; -export const inversesqrt: any; -/** - * This node represents a variety of mathematical methods available in shaders. - * They are divided into three categories: - * - * - Methods with one input like `sin`, `cos` or `normalize`. - * - Methods with two inputs like `dot`, `cross` or `pow`. - * - Methods with three inputs like `mix`, `clamp` or `smoothstep`. - * - * @augments TempNode - */ -declare class MathNode extends TempNode { - /** - * Constructs a new math node. - * - * @param {string} method - The method name. - * @param {Node} aNode - The first input. - * @param {?Node} [bNode=null] - The second input. - * @param {?Node} [cNode=null] - The third input. - */ - constructor(method: string, aNode: Node, bNode?: Node | null, cNode?: Node | null, ...args: any[]); - /** - * The method name. - * - * @type {string} - */ - method: string; - /** - * The first input. - * - * @type {Node} - */ - aNode: Node; - /** - * The second input. - * - * @type {?Node} - * @default null - */ - bNode: Node | null; - /** - * The third input. - * - * @type {?Node} - * @default null - */ - cNode: Node | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMathNode: boolean; - /** - * The input type is inferred from the node types of the input nodes. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The input type. - */ - getInputType(builder: NodeBuilder): string; - /** - * The selected method as well as the input type determine the node type of this node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - setup(builder: any): any; - generate(builder: any, output: any): any; - serialize(data: any): void; - deserialize(data: any): void; -} -declare namespace MathNode { - let ALL: string; - let ANY: string; - let RADIANS: string; - let DEGREES: string; - let EXP: string; - let EXP2: string; - let LOG: string; - let LOG2: string; - let SQRT: string; - let INVERSE_SQRT: string; - let FLOOR: string; - let CEIL: string; - let NORMALIZE: string; - let FRACT: string; - let SIN: string; - let SINH: string; - let COS: string; - let COSH: string; - let TAN: string; - let TANH: string; - let ASIN: string; - let ASINH: string; - let ACOS: string; - let ACOSH: string; - let ATAN: string; - let ATANH: string; - let ABS: string; - let SIGN: string; - let LENGTH: string; - let NEGATE: string; - let ONE_MINUS: string; - let DFDX: string; - let DFDY: string; - let ROUND: string; - let RECIPROCAL: string; - let TRUNC: string; - let FWIDTH: string; - let TRANSPOSE: string; - let DETERMINANT: string; - let INVERSE: string; - let EQUALS: string; - let MIN: string; - let MAX: string; - let STEP: string; - let REFLECT: string; - let DISTANCE: string; - let DIFFERENCE: string; - let DOT: string; - let CROSS: string; - let POW: string; - let TRANSFORM_DIRECTION: string; - let MIX: string; - let CLAMP: string; - let REFRACT: string; - let SMOOTHSTEP: string; - let FACEFORWARD: string; -} -import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/math/MathUtils.d.ts b/jsdoc-testing/jsdoc/src/nodes/math/MathUtils.d.ts deleted file mode 100644 index 69ed7ec52..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/math/MathUtils.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function parabola(x: Node, k: Node): Node; -export function gain(x: Node, k: Node): Node; -export function pcurve(x: Node, a: Node, b: Node): Node; -export function sinc(x: Node, k: Node): Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/math/OperatorNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/math/OperatorNode.d.ts deleted file mode 100644 index 34ed2e4b4..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/math/OperatorNode.d.ts +++ /dev/null @@ -1,312 +0,0 @@ -export default OperatorNode; -/** - * Returns the addition of two or more value. - * - * @tsl - * @function - * @param {Node} a - The first input. - * @param {Node} b - The second input. - * @param {...Node} params - Additional input parameters. - * @returns {OperatorNode} - */ -export const add: any; -/** - * Returns the subtraction of two or more value. - * - * @tsl - * @function - * @param {Node} a - The first input. - * @param {Node} b - The second input. - * @param {...Node} params - Additional input parameters. - * @returns {OperatorNode} - */ -export const sub: any; -/** - * Returns the multiplication of two or more value. - * - * @tsl - * @function - * @param {Node} a - The first input. - * @param {Node} b - The second input. - * @param {...Node} params - Additional input parameters. - * @returns {OperatorNode} - */ -export const mul: any; -/** - * Returns the division of two or more value. - * - * @tsl - * @function - * @param {Node} a - The first input. - * @param {Node} b - The second input. - * @param {...Node} params - Additional input parameters. - * @returns {OperatorNode} - */ -export const div: any; -/** - * Computes the remainder of dividing the first node by the second one. - * - * @tsl - * @function - * @param {Node} a - The first input. - * @param {Node} b - The second input. - * @returns {OperatorNode} - */ -export const mod: any; -/** - * Checks if two nodes are equal. - * - * @tsl - * @function - * @param {Node} a - The first input. - * @param {Node} b - The second input. - * @returns {OperatorNode} - */ -export const equal: any; -/** - * Checks if two nodes are not equal. - * - * @tsl - * @function - * @param {Node} a - The first input. - * @param {Node} b - The second input. - * @returns {OperatorNode} - */ -export const notEqual: any; -/** - * Checks if the first node is less than the second. - * - * @tsl - * @function - * @param {Node} a - The first input. - * @param {Node} b - The second input. - * @returns {OperatorNode} - */ -export const lessThan: any; -/** - * Checks if the first node is greater than the second. - * - * @tsl - * @function - * @param {Node} a - The first input. - * @param {Node} b - The second input. - * @returns {OperatorNode} - */ -export const greaterThan: any; -/** - * Checks if the first node is less than or equal to the second. - * - * @tsl - * @function - * @param {Node} a - The first input. - * @param {Node} b - The second input. - * @returns {OperatorNode} - */ -export const lessThanEqual: any; -/** - * Checks if the first node is greater than or equal to the second. - * - * @tsl - * @function - * @param {Node} a - The first input. - * @param {Node} b - The second input. - * @returns {OperatorNode} - */ -export const greaterThanEqual: any; -/** - * Performs a logical AND operation on multiple nodes. - * - * @tsl - * @function - * @param {...Node} nodes - The input nodes to be combined using AND. - * @returns {OperatorNode} - */ -export const and: any; -/** - * Performs a logical OR operation on multiple nodes. - * - * @tsl - * @function - * @param {...Node} nodes - The input nodes to be combined using OR. - * @returns {OperatorNode} - */ -export const or: any; -/** - * Performs logical NOT on a node. - * - * @tsl - * @function - * @param {Node} value - The value. - * @returns {OperatorNode} - */ -export const not: any; -/** - * Performs logical XOR on two nodes. - * - * @tsl - * @function - * @param {Node} a - The first input. - * @param {Node} b - The second input. - * @returns {OperatorNode} - */ -export const xor: any; -/** - * Performs bitwise AND on two nodes. - * - * @tsl - * @function - * @param {Node} a - The first input. - * @param {Node} b - The second input. - * @returns {OperatorNode} - */ -export const bitAnd: any; -/** - * Performs bitwise NOT on a node. - * - * @tsl - * @function - * @param {Node} a - The first input. - * @param {Node} b - The second input. - * @returns {OperatorNode} - */ -export const bitNot: any; -/** - * Performs bitwise OR on two nodes. - * - * @tsl - * @function - * @param {Node} a - The first input. - * @param {Node} b - The second input. - * @returns {OperatorNode} - */ -export const bitOr: any; -/** - * Performs bitwise XOR on two nodes. - * - * @tsl - * @function - * @param {Node} a - The first input. - * @param {Node} b - The second input. - * @returns {OperatorNode} - */ -export const bitXor: any; -/** - * Shifts a node to the left. - * - * @tsl - * @function - * @param {Node} a - The node to shift. - * @param {Node} b - The value to shift. - * @returns {OperatorNode} - */ -export const shiftLeft: any; -/** - * Shifts a node to the right. - * - * @tsl - * @function - * @param {Node} a - The node to shift. - * @param {Node} b - The value to shift. - * @returns {OperatorNode} - */ -export const shiftRight: any; -/** - * Increments a node by 1. - * - * @tsl - * @function - * @param {Node} a - The node to increment. - * @returns {OperatorNode} - */ -export const incrementBefore: () => void; -/** - * Decrements a node by 1. - * - * @tsl - * @function - * @param {Node} a - The node to decrement. - * @returns {OperatorNode} - */ -export const decrementBefore: () => void; -/** - * Increments a node by 1 and returns the previous value. - * - * @tsl - * @function - * @param {Node} a - The node to increment. - * @returns {OperatorNode} - */ -export const increment: () => void; -/** - * Decrements a node by 1 and returns the previous value. - * - * @tsl - * @function - * @param {Node} a - The node to decrement. - * @returns {OperatorNode} - */ -export const decrement: () => void; -/** - * This node represents basic mathematical and logical operations like addition, - * subtraction or comparisons (e.g. `equal()`). - * - * @augments TempNode - */ -declare class OperatorNode extends TempNode { - /** - * Constructs a new operator node. - * - * @param {string} op - The operator. - * @param {Node} aNode - The first input. - * @param {Node} bNode - The second input. - * @param {...Node} params - Additional input parameters. - */ - constructor(op: string, aNode: Node, bNode: Node, ...params: Node[]); - /** - * The operator. - * - * @type {string} - */ - op: string; - /** - * The first input. - * - * @type {Node} - */ - aNode: Node; - /** - * The second input. - * - * @type {Node} - */ - bNode: Node; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isOperatorNode: boolean; - /** - * Returns the operator method name. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} output - The output type. - * @returns {string} The operator method name. - */ - getOperatorMethod(builder: NodeBuilder, output: string): string; - /** - * This method is overwritten since the node type is inferred from the operator - * and the input node types. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {?string} [output=null] - The output type. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder, output?: string | null): string; - generate(builder: any, output: any): any; - serialize(data: any): void; - deserialize(data: any): void; -} -import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/math/PackFloatNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/math/PackFloatNode.d.ts deleted file mode 100644 index d59976ffb..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/math/PackFloatNode.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -export default PackFloatNode; -/** - * Converts each component of the normalized float to 16-bit integer values. The results are packed into a single unsigned integer. - * round(clamp(c, -1, +1) * 32767.0) - * - * @tsl - * @function - * @param {Node} value - The 2-component vector to be packed - * @returns {Node} - */ -export const packSnorm2x16: any; -/** - * Converts each component of the normalized float to 16-bit integer values. The results are packed into a single unsigned integer. - * round(clamp(c, 0, +1) * 65535.0) - * - * @tsl - * @function - * @param {Node} value - The 2-component vector to be packed - * @returns {Node} - */ -export const packUnorm2x16: any; -/** - * Converts each component of the vec2 to 16-bit floating-point values. The results are packed into a single unsigned integer. - * - * @tsl - * @function - * @param {Node} value - The 2-component vector to be packed - * @returns {Node} - */ -export const packHalf2x16: any; -/** - * This node represents an operation that packs floating-point values of a vector into an unsigned 32-bit integer - * - * @augments TempNode - */ -declare class PackFloatNode extends TempNode { - /** - * - * @param {'snorm' | 'unorm' | 'float16'} encoding - The numeric encoding that describes how the float values are mapped to the integer range. - * @param {Node} vectorNode - The vector node to be packed - */ - constructor(encoding: "snorm" | "unorm" | "float16", vectorNode: Node); - /** - * The vector to be packed. - * - * @type {Node} - */ - vectorNode: Node; - /** - * The numeric encoding. - * - * @type {string} - */ - encoding: string; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isPackFloatNode: boolean; - generateNodeType(): string; - generate(builder: any): string; -} -import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/math/TriNoise3D.d.ts b/jsdoc-testing/jsdoc/src/nodes/math/TriNoise3D.d.ts deleted file mode 100644 index 15dad5e5f..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/math/TriNoise3D.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Generates a noise value from the given position, speed and time parameters. - * - * @tsl - * @function - * @param {Node} position - The position. - * @param {Node} speed - The speed. - * @param {Node} time - The time. - * @return {Node} The generated noise. - */ -export const triNoise3D: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/math/UnpackFloatNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/math/UnpackFloatNode.d.ts deleted file mode 100644 index 9a47ed9e4..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/math/UnpackFloatNode.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -export default UnpackFloatNode; -/** - * Unpacks a 32-bit unsigned integer into two 16-bit values, interpreted as normalized signed integers. Returns a vec2 with both values. - * - * @tsl - * @function - * @param {Node} value - The unsigned integer to be unpacked - * @returns {Node} - */ -export const unpackSnorm2x16: any; -/** - * Unpacks a 32-bit unsigned integer into two 16-bit values, interpreted as normalized unsigned integers. Returns a vec2 with both values. - * - * @tsl - * @function - * @param {Node} value - The unsigned integer to be unpacked - * @returns {Node} - */ -export const unpackUnorm2x16: any; -/** - * Unpacks a 32-bit unsigned integer into two 16-bit values, interpreted as 16-bit floating-point numbers. Returns a vec2 with both values. - * - * @tsl - * @function - * @param {Node} value - The unsigned integer to be unpacked - * @returns {Node} - */ -export const unpackHalf2x16: any; -/** - * This node represents an operation that unpacks values from a 32-bit unsigned integer, reinterpreting the results as a floating-point vector - * - * @augments TempNode - */ -declare class UnpackFloatNode extends TempNode { - /** - * - * @param {'snorm' | 'unorm' | 'float16'} encoding - The numeric encoding that describes how the integer values are mapped to the float range - * @param {Node} uintNode - The uint node to be unpacked - */ - constructor(encoding: "snorm" | "unorm" | "float16", uintNode: Node); - /** - * The unsigned integer to be unpacked. - * - * @type {Node} - */ - uintNode: Node; - /** - * The numeric encoding. - * - * @type {string} - */ - encoding: string; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isUnpackFloatNode: boolean; - generateNodeType(): string; - generate(builder: any): string; -} -import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/parsers/GLSLNodeFunction.d.ts b/jsdoc-testing/jsdoc/src/nodes/parsers/GLSLNodeFunction.d.ts deleted file mode 100644 index 3b3ed5efe..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/parsers/GLSLNodeFunction.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default GLSLNodeFunction; -/** - * This class represents a GLSL node function. - * - * @augments NodeFunction - */ -declare class GLSLNodeFunction extends NodeFunction { - /** - * Constructs a new GLSL node function. - * - * @param {string} source - The GLSL source. - */ - constructor(source: string); - inputsCode: any; - blockCode: any; - headerCode: any; - /** - * This method returns the GLSL code of the node function. - * - * @param {string} [name=this.name] - The function's name. - * @return {string} The shader code. - */ - getCode(name?: string): string; -} -import NodeFunction from '../core/NodeFunction.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/parsers/GLSLNodeParser.d.ts b/jsdoc-testing/jsdoc/src/nodes/parsers/GLSLNodeParser.d.ts deleted file mode 100644 index 4219e9d0e..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/parsers/GLSLNodeParser.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default GLSLNodeParser; -/** - * A GLSL node parser. - * - * @augments NodeParser - */ -declare class GLSLNodeParser extends NodeParser { - /** - * The method parses the given GLSL code an returns a node function. - * - * @param {string} source - The GLSL code. - * @return {GLSLNodeFunction} A node function. - */ - parseFunction(source: string): GLSLNodeFunction; -} -import NodeParser from '../core/NodeParser.js'; -import GLSLNodeFunction from './GLSLNodeFunction.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/pmrem/PMREMNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/pmrem/PMREMNode.d.ts deleted file mode 100644 index 0ddba7546..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/pmrem/PMREMNode.d.ts +++ /dev/null @@ -1,113 +0,0 @@ -export default PMREMNode; -/** - * TSL function for creating a PMREM node. - * - * @tsl - * @function - * @param {Texture} value - The input texture. - * @param {?Node} [uvNode=null] - The uv node. - * @param {?Node} [levelNode=null] - The level node. - * @returns {PMREMNode} - */ -export const pmremTexture: any; -/** - * This node represents a PMREM which is a special type of preprocessed - * environment map intended for PBR materials. - * - * ```js - * const material = new MeshStandardNodeMaterial(); - * material.envNode = pmremTexture( envMap ); - * ``` - * - * @augments TempNode - */ -declare class PMREMNode extends TempNode { - /** - * Constructs a new function overloading node. - * - * @param {Texture} value - The input texture. - * @param {Node} [uvNode=null] - The uv node. - * @param {Node} [levelNode=null] - The level node. - */ - constructor(value: Texture, uvNode?: Node, levelNode?: Node); - /** - * Reference to the input texture. - * - * @private - * @type {Texture} - */ - private _value; - /** - * Reference to the generated PMREM. - * - * @private - * @type {Texture | null} - * @default null - */ - private _pmrem; - /** - * The uv node. - * - * @type {Node} - */ - uvNode: Node; - /** - * The level node. - * - * @type {Node} - */ - levelNode: Node; - /** - * Reference to a PMREM generator. - * - * @private - * @type {?PMREMGenerator} - * @default null - */ - private _generator; - /** - * The texture node holding the generated PMREM. - * - * @private - * @type {TextureNode} - */ - private _texture; - /** - * A uniform representing the PMREM's width. - * - * @private - * @type {UniformNode} - */ - private _width; - /** - * A uniform representing the PMREM's height. - * - * @private - * @type {UniformNode} - */ - private _height; - /** - * A uniform representing the PMREM's max Mip. - * - * @private - * @type {UniformNode} - */ - private _maxMip; - set value(value: Texture); - /** - * The node's texture value. - * - * @type {Texture} - */ - get value(): Texture; - /** - * Uses the given PMREM texture to update internal values. - * - * @param {Texture} texture - The PMREM texture. - */ - updateFromTexture(texture: Texture): void; - updateBefore(frame: any): void; - setup(builder: any): void; -} -import TempNode from '../core/TempNode.js'; -import { Texture } from '../../textures/Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/pmrem/PMREMUtils.d.ts b/jsdoc-testing/jsdoc/src/nodes/pmrem/PMREMUtils.d.ts deleted file mode 100644 index 8c287ef83..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/pmrem/PMREMUtils.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const getDirection: any; -export const textureCubeUV: () => void; -export const blur: () => void; -export const ggxConvolution: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/procedural/Checker.d.ts b/jsdoc-testing/jsdoc/src/nodes/procedural/Checker.d.ts deleted file mode 100644 index 622cf3968..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/procedural/Checker.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Creates a 2x2 checkerboard pattern that can be used as procedural texture data. - * - * @tsl - * @function - * @param {Node} coord - The uv coordinates. - * @return {Node} The result data. - */ -export const checker: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/shapes/Shapes.d.ts b/jsdoc-testing/jsdoc/src/nodes/shapes/Shapes.d.ts deleted file mode 100644 index 0777cf76d..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/shapes/Shapes.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Generates a circle based on the uv coordinates. - * - * @tsl - * @function - * @param {Node} coord - The uv to generate the circle. - * @return {Node} The circle shape. - */ -export const shapeCircle: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/tsl/TSLBase.d.ts b/jsdoc-testing/jsdoc/src/nodes/tsl/TSLBase.d.ts deleted file mode 100644 index cbad0a788..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/tsl/TSLBase.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -export function addNodeElement(name: any): void; -export * from "./TSLCore.js"; -export * from "../core/ArrayNode.js"; -export * from "../core/UniformNode.js"; -export * from "../core/PropertyNode.js"; -export * from "../core/AssignNode.js"; -export * from "../code/FunctionCallNode.js"; -export * from "../math/OperatorNode.js"; -export * from "../math/MathNode.js"; -export * from "../math/ConditionalNode.js"; -export * from "../core/ContextNode.js"; -export * from "../core/VarNode.js"; -export * from "../core/VaryingNode.js"; -export * from "../display/ColorSpaceNode.js"; -export * from "../display/ToneMappingNode.js"; -export * from "../accessors/BufferAttributeNode.js"; -export * from "../gpgpu/ComputeNode.js"; -export * from "../core/IsolateNode.js"; -export * from "../core/BypassNode.js"; -export * from "../utils/Remap.js"; -export * from "../code/ExpressionNode.js"; -export * from "../utils/Discard.js"; -export * from "../display/RenderOutputNode.js"; -export * from "../utils/DebugNode.js"; -export * from "../core/SubBuildNode.js"; -export * from "../core/InspectorNode.js"; diff --git a/jsdoc-testing/jsdoc/src/nodes/tsl/TSLCore.d.ts b/jsdoc-testing/jsdoc/src/nodes/tsl/TSLCore.d.ts deleted file mode 100644 index e78f515c5..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/tsl/TSLCore.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -export function addMethodChaining(name: any, nodeElement: any): void; -export function defined(value: any): boolean; -export function ShaderNode(jsFunc: any, nodeType: any): ShaderNodeInternal; -export function Fn(jsFunc: any, layout?: null): () => void; -/** - * Add the given node to the current stack. - * - * @param {Node} node - The node to add. - * @returns {Node} The node that was added to the stack. - */ -export function Stack(node: Node): Node; -export function getConstNodeType(value: any): any; -export function nodeObject(val: any, altType?: null): any; -export function nodeObjectIntent(val: any, altType?: null): any; -export function nodeObjects(val: any, altType?: null): any; -export function nodeArray(val: any, altType?: null): any; -export function nodeProxy(NodeClass: any, scope?: null, factor?: null, settings?: null): any; -export function nodeImmutable(NodeClass: any, ...params: any[]): any; -export function nodeProxyIntent(NodeClass: any, scope?: null, factor?: null, settings?: {}): any; -export function nodeProxyConstructor(constructorFunction: any, nodeInstance: any): any; -export function setCurrentStack(stack: any): void; -export function getCurrentStack(): any; -export function If(...params: any[]): StackNode; -export function Switch(...params: any[]): StackNode; -export const color: any; -export const float: any; -export const int: any; -export const uint: any; -export const bool: any; -export const vec2: any; -export const ivec2: any; -export const uvec2: any; -export const bvec2: any; -export const vec3: any; -export const ivec3: any; -export const uvec3: any; -export const bvec3: any; -export const vec4: any; -export const ivec4: any; -export const uvec4: any; -export const bvec4: any; -export const mat2: any; -export const mat3: any; -export const mat4: any; -export const element: any; -export function convert(node: any, types: any): ConvertNode; -export function split(node: any, channels: any): SplitNode; -export function append(node: Node): Function; -declare class ShaderNodeInternal extends Node { - constructor(jsFunc: any, nodeType: any); - jsFunc: any; - layout: any; - once: boolean; - setLayout(layout: any): this; - getLayout(): any; - call(rawInputs?: null): ShaderCallNodeInternal; - setup(): ShaderCallNodeInternal; -} -import Node from '../core/Node.js'; -import ConvertNode from '../utils/ConvertNode.js'; -import SplitNode from '../utils/SplitNode.js'; -declare class ShaderCallNodeInternal extends Node { - constructor(shaderNode: any, rawInputs: any); - shaderNode: any; - rawInputs: any; - isShaderCallNodeInternal: boolean; - generateNodeType(builder: any): any; - getElementType(builder: any): any; - getMemberType(builder: any, name: any): any; - call(builder: any): any; - setupOutput(builder: any): any; - getOutputNode(builder: any): any; - build(builder: any, output?: null): any; -} -export {}; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/ArrayElementNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/ArrayElementNode.d.ts deleted file mode 100644 index e5669d2f2..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/ArrayElementNode.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -export default ArrayElementNode; -/** - * Base class for representing element access on an array-like - * node data structures. - * - * @augments Node - */ -declare class ArrayElementNode extends Node { - /** - * Constructs an array element node. - * - * @param {Node} node - The array-like node. - * @param {Node} indexNode - The index node that defines the element access. - */ - constructor(node: Node, indexNode: Node); - /** - * The array-like node. - * - * @type {Node} - */ - node: Node; - /** - * The index node that defines the element access. - * - * @type {Node} - */ - indexNode: Node; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isArrayElementNode: boolean; - /** - * This method is overwritten since the node type is inferred from the array-like node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * This method is overwritten since the member type is inferred from the array-like node. - * - * @param {NodeBuilder} builder - The current node builder. - * @param {string} name - The member name. - * @return {string} The member type. - */ - getMemberType(builder: NodeBuilder, name: string): string; - generate(builder: any): string; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/ConvertNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/ConvertNode.d.ts deleted file mode 100644 index 77f0ea2f7..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/ConvertNode.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -export default ConvertNode; -/** - * This module is part of the TSL core and usually not used in app level code. - * It represents a convert operation during the shader generation process - * meaning it converts the data type of a node to a target data type. - * - * @augments Node - */ -declare class ConvertNode extends Node { - /** - * Constructs a new convert node. - * - * @param {Node} node - The node which type should be converted. - * @param {string} convertTo - The target node type. Multiple types can be defined by separating them with a `|` sign. - */ - constructor(node: Node, convertTo: string); - /** - * The node which type should be converted. - * - * @type {Node} - */ - node: Node; - /** - * The target node type. Multiple types can be defined by separating them with a `|` sign. - * - * @type {string} - */ - convertTo: string; - /** - * This method is overwritten since the implementation tries to infer the best - * matching type from the {@link ConvertNode#convertTo} property. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - serialize(data: any): void; - deserialize(data: any): void; - generate(builder: any, output: any): any; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/CubeMapNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/CubeMapNode.d.ts deleted file mode 100644 index a24a72427..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/CubeMapNode.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -export default CubeMapNode; -/** - * TSL function for creating a cube map node. - * - * @tsl - * @function - * @param {Node} envNode - The node representing the environment map. - * @returns {CubeMapNode} - */ -export const cubeMapNode: any; -/** - * This node can be used to automatically convert environment maps in the - * equirectangular format into the cube map format. - * - * @augments TempNode - */ -declare class CubeMapNode extends TempNode { - /** - * Constructs a new cube map node. - * - * @param {Node} envNode - The node representing the environment map. - */ - constructor(envNode: Node); - /** - * The node representing the environment map. - * - * @type {Node} - */ - envNode: Node; - /** - * A reference to the internal cube texture. - * - * @private - * @type {?CubeTexture} - * @default null - */ - private _cubeTexture; - /** - * A reference to the internal cube texture node. - * - * @private - * @type {CubeTextureNode} - */ - private _cubeTextureNode; - /** - * A default cube texture that acts as a placeholder. - * It is used when the conversion from equirectangular to cube - * map has not finished yet for a given texture. - * - * @private - * @type {CubeTexture} - */ - private _defaultTexture; - updateBefore(frame: any): void; - setup(builder: any): CubeTextureNode; -} -import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/DebugNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/DebugNode.d.ts deleted file mode 100644 index 526033e08..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/DebugNode.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export default DebugNode; -export function debug(node: Node, callback?: Function | null): DebugNode; -declare class DebugNode extends TempNode { - constructor(node: any, callback?: null); - node: any; - callback: any; - generateNodeType(builder: any): any; - setup(builder: any): any; - analyze(builder: any): any; - generate(builder: any): any; -} -import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/Discard.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/Discard.d.ts deleted file mode 100644 index 2d21a4048..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/Discard.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export function Discard(conditional: ConditionalNode | null): Node; -export function Return(): ExpressionNode; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/EquirectUV.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/EquirectUV.d.ts deleted file mode 100644 index a3e78acf6..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/EquirectUV.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * TSL function for creating an equirect uv node. - * - * Can be used to compute texture coordinates for projecting an - * equirectangular texture onto a mesh for using it as the scene's - * background. - * - * ```js - * scene.backgroundNode = texture( equirectTexture, equirectUV() ); - * ``` - * - * @tsl - * @function - * @param {?Node} [dirNode=positionWorldDirection] - A direction vector for sampling which is by default `positionWorldDirection`. - * @returns {Node} - */ -export const equirectUV: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/EventNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/EventNode.d.ts deleted file mode 100644 index c81ea099b..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/EventNode.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -export default EventNode; -export function OnObjectUpdate(callback: Function): EventNode; -export function OnMaterialUpdate(callback: Function): EventNode; -export function OnFrameUpdate(callback: Function): EventNode; -export function OnBeforeObjectUpdate(callback: Function): EventNode; -export function OnBeforeMaterialUpdate(callback: Function): EventNode; -export function OnBeforeFrameUpdate(callback: Function): EventNode; -/** - * EventNode is a node that executes a callback during specific update phases. - * - * @augments Node - */ -declare class EventNode extends Node { - /** - * Creates an EventNode. - * - * @param {string} eventType - The type of event - * @param {Function} callback - The callback to execute on update. - */ - constructor(eventType: string, callback: Function); - eventType: string; - callback: Function; - update(frame: any): void; - updateBefore(frame: any): void; -} -declare namespace EventNode { - let OBJECT: string; - let MATERIAL: string; - let FRAME: string; - let BEFORE_OBJECT: string; - let BEFORE_MATERIAL: string; - let BEFORE_FRAME: string; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/FlipNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/FlipNode.d.ts deleted file mode 100644 index 15e36f325..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/FlipNode.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -export default FlipNode; -/** - * This module is part of the TSL core and usually not used in app level code. - * It represents a flip operation during the shader generation process - * meaning it flips normalized values with the following formula: - * ``` - * x = 1 - x; - * ``` - * `FlipNode` is internally used to implement any `flipXYZW()`, `flipRGBA()` and - * `flipSTPQ()` method invocations on node objects. For example: - * ```js - * uvNode = uvNode.flipY(); - * ``` - * - * @augments TempNode - */ -declare class FlipNode extends TempNode { - /** - * Constructs a new flip node. - * - * @param {Node} sourceNode - The node which component(s) should be flipped. - * @param {string} components - The components that should be flipped e.g. `'x'` or `'xy'`. - */ - constructor(sourceNode: Node, components: string); - /** - * The node which component(s) should be flipped. - * - * @type {Node} - */ - sourceNode: Node; - /** - * The components that should be flipped e.g. `'x'` or `'xy'`. - * - * @type {string} - */ - components: string; - /** - * This method is overwritten since the node type is inferred from the source node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - generate(builder: any): string; -} -import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/FunctionOverloadingNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/FunctionOverloadingNode.d.ts deleted file mode 100644 index 765ca535c..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/FunctionOverloadingNode.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -export default FunctionOverloadingNode; -export function overloadingFn(functionNodes: Array): FunctionOverloadingNode; -/** - * This class allows to define multiple overloaded versions - * of the same function. Depending on the parameters of the function - * call, the node picks the best-fit overloaded version. - * - * @augments Node - */ -declare class FunctionOverloadingNode extends Node { - /** - * Constructs a new function overloading node. - * - * @param {Array} functionNodes - Array of `Fn` function definitions. - * @param {...Node} parametersNodes - A list of parameter nodes. - */ - constructor(functionNodes?: Array, ...parametersNodes: Node[]); - /** - * Array of `Fn` function definitions. - * - * @type {Array} - */ - functionNodes: Array; - /** - * A list of parameter nodes. - * - * @type {Array} - */ - parametersNodes: Array; - /** - * The selected overloaded function call. - * - * @private - * @type {ShaderCallNodeInternal} - */ - private _candidateFn; - /** - * This method is overwritten since the node type is inferred from - * the function's return type. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - /** - * Returns the candidate function for the current parameters. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {FunctionNode} The candidate function. - */ - getCandidateFn(builder: NodeBuilder): FunctionNode; - /** - * Sets up the node for the current parameters. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Node} The setup node. - */ - setup(builder: NodeBuilder): Node; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/JoinNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/JoinNode.d.ts deleted file mode 100644 index 70dfe5537..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/JoinNode.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -export default JoinNode; -/** - * This module is part of the TSL core and usually not used in app level code. - * It represents a join operation during the shader generation process. - * For example in can compose/join two single floats into a `vec2` type. - * - * @augments TempNode - */ -declare class JoinNode extends TempNode { - /** - * Constructs a new join node. - * - * @param {Array} nodes - An array of nodes that should be joined. - * @param {?string} [nodeType=null] - The node type. - */ - constructor(nodes?: Array, nodeType?: string | null); - /** - * An array of nodes that should be joined. - * - * @type {Array} - */ - nodes: Array; - /** - * This method is overwritten since the node type must be inferred from the - * joined data length if not explicitly defined. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - generate(builder: any, output: any): any; -} -import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/LoopNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/LoopNode.d.ts deleted file mode 100644 index 84ca0c5f4..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/LoopNode.d.ts +++ /dev/null @@ -1,67 +0,0 @@ -export default LoopNode; -export function Loop(...params: any[]): LoopNode; -export function Continue(): ExpressionNode; -export function Break(): ExpressionNode; -/** - * This module offers a variety of ways to implement loops in TSL. In it's basic form it's: - * ```js - * Loop( count, ( { i } ) => { - * - * } ); - * ``` - * However, it is also possible to define a start and end ranges, data types and loop conditions: - * ```js - * Loop( { start: int( 0 ), end: int( 10 ), type: 'int', condition: '<' }, ( { i } ) => { - * - * } ); - *``` - * Nested loops can be defined in a compacted form: - * ```js - * Loop( 10, 5, ( { i, j } ) => { - * - * } ); - * ``` - * Loops that should run backwards can be defined like so: - * ```js - * Loop( { start: 10 }, () => {} ); - * ``` - * It is possible to execute with boolean values, similar to the `while` syntax. - * ```js - * const value = float( 0 ).toVar(); - * - * Loop( value.lessThan( 10 ), () => { - * - * value.addAssign( 1 ); - * - * } ); - * ``` - * The module also provides `Break()` and `Continue()` TSL expression for loop control. - * @augments Node - */ -declare class LoopNode extends Node { - /** - * Constructs a new loop node. - * - * @param {Array} params - Depending on the loop type, array holds different parameterization values for the loop. - */ - constructor(params?: Array); - params: any[]; - /** - * Returns a loop variable name based on an index. The pattern is - * `0` = `i`, `1`= `j`, `2`= `k` and so on. - * - * @param {number} index - The index. - * @return {string} The loop variable name. - */ - getVarName(index: number): string; - /** - * Returns properties about this node. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {Object} The node properties. - */ - getProperties(builder: NodeBuilder): Object; - setup(builder: any): void; - generate(builder: any): void; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/MatcapUV.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/MatcapUV.d.ts deleted file mode 100644 index 11ccf7d5a..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/MatcapUV.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -/** - * TSL function for creating a matcap uv node. - * - * Can be used to compute texture coordinates for projecting a - * matcap onto a mesh. Used by {@link MeshMatcapNodeMaterial}. - * - * @tsl - * @function - * @returns {Node} The matcap UV coordinates. - */ -export const matcapUV: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/MaxMipLevelNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/MaxMipLevelNode.d.ts deleted file mode 100644 index a54346cc2..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/MaxMipLevelNode.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -export default MaxMipLevelNode; -/** - * TSL function for creating a max mip level node. - * - * @tsl - * @function - * @param {TextureNode} textureNode - The texture node to compute the max mip level for. - * @returns {MaxMipLevelNode} - */ -export const maxMipLevel: any; -/** - * A special type of uniform node that computes the - * maximum mipmap level for a given texture node. - * - * ```js - * const level = maxMipLevel( textureNode ); - * ``` - * - * @augments UniformNode - */ -declare class MaxMipLevelNode extends UniformNode { - /** - * Constructs a new max mip level node. - * - * @param {TextureNode} textureNode - The texture node to compute the max mip level for. - */ - constructor(textureNode: TextureNode); - /** - * The texture node to compute the max mip level for. - * - * @private - * @type {TextureNode} - */ - private _textureNode; - /** - * The texture node to compute the max mip level for. - * - * @readonly - * @type {TextureNode} - */ - readonly get textureNode(): TextureNode; - /** - * The texture. - * - * @readonly - * @type {Texture} - */ - readonly get texture(): Texture; - update(): void; -} -import UniformNode from '../core/UniformNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/MemberNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/MemberNode.d.ts deleted file mode 100644 index 45fabbe06..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/MemberNode.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -export default MemberNode; -/** - * Base class for representing member access on an object-like - * node data structures. - * - * @augments Node - */ -declare class MemberNode extends Node { - /** - * Constructs a member node. - * - * @param {Node} structNode - The struct node. - * @param {string} property - The property name. - */ - constructor(structNode: Node, property: string); - /** - * The struct node. - * - * @type {Node} - */ - structNode: Node; - /** - * The property name. - * - * @type {Node} - */ - property: Node; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMemberNode: boolean; - hasMember(builder: any): boolean; - generateNodeType(builder: any): string; - getMemberType(builder: any, name: any): any; - generate(builder: any): any; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/Oscillators.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/Oscillators.d.ts deleted file mode 100644 index 08bd81824..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/Oscillators.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function oscSine(t?: Node): Node; -export function oscSquare(t?: Node): Node; -export function oscTriangle(t?: Node): Node; -export function oscSawtooth(t?: Node): Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/Packing.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/Packing.d.ts deleted file mode 100644 index dcae33557..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/Packing.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function directionToColor(node: Node): Node; -export function colorToDirection(node: Node): Node; -export function unpackNormal(xy: Node): Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/PostProcessingUtils.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/PostProcessingUtils.d.ts deleted file mode 100644 index 2e88343c5..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/PostProcessingUtils.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Computes a position in view space based on a fragment's screen position expressed as uv coordinates, the fragments - * depth value and the camera's inverse projection matrix. - * - * @tsl - * @function - * @param {Node} screenPosition - The fragment's screen position expressed as uv coordinates. - * @param {Node} depth - The fragment's depth value. - * @param {Node} projectionMatrixInverse - The camera's inverse projection matrix. - * @return {Node} The fragments position in view space. - */ -export const getViewPosition: () => void; -/** - * Computes a screen position expressed as uv coordinates based on a fragment's position in view space - * and the camera's projection matrix - * - * @tsl - * @function - * @param {Node} viewPosition - The fragments position in view space. - * @param {Node} projectionMatrix - The camera's projection matrix. - * @return {Node} The fragment's screen position expressed as uv coordinates. - */ -export const getScreenPosition: () => void; -/** - * Computes a normal vector based on depth data. Can be used as a fallback when no normal render - * target is available or if flat surface normals are required. - * - * @tsl - * @function - * @param {Node} uv - The texture coordinate. - * @param {DepthTexture} depthTexture - The depth texture. - * @param {Node} projectionMatrixInverse - The camera's inverse projection matrix. - * @return {Node} The computed normal vector. - */ -export const getNormalFromDepth: () => void; -/** - * Interleaved Gradient Noise (IGN) from Jimenez 2014. - * - * IGN has "low discrepancy" resulting in evenly distributed samples. It's superior compared to - * default white noise, blue noise or Bayer. - * - * References: - * - {@link https://www.iryoku.com/next-generation-post-processing-in-call-of-duty-advanced-warfare/} - * - {@link https://blog.demofox.org/2022/01/01/interleaved-gradient-noise-a-different-kind-of-low-discrepancy-sequence/} - * - * @tsl - * @function - * @param {Node} position - The input position, usually screen coordinates. - * @return {Node} The noise value. - */ -export const interleavedGradientNoise: any; -/** - * Vogel disk sampling for uniform circular distribution. - * - * This function generates sample points distributed uniformly on a disk using the golden angle, - * resulting in an efficient low-discrepancy sequence for sampling. The rotation parameter (phi) - * allows randomizing the pattern per-pixel when combined with IGN. - * - * @tsl - * @function - * @param {Node} sampleIndex - The index of the current sample (0-based). - * @param {Node} samplesCount - The total number of samples. - * @param {Node} phi - Rotation angle in radians (typically from IGN * 2π). - * @return {Node} A 2D point on the unit disk. - */ -export const vogelDiskSample: any; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/RTTNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/RTTNode.d.ts deleted file mode 100644 index 7d9e10f5c..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/RTTNode.d.ts +++ /dev/null @@ -1,129 +0,0 @@ -export default RTTNode; -export function rtt(node: Node, ...params: any[]): RTTNode; -export function convertToTexture(node: Node, ...params: any[]): RTTNode; -/** - * `RTTNode` takes another node and uses it with a `QuadMesh` to render into a texture (RTT). - * This module is especially relevant in context of post processing where certain nodes require - * texture input for their effects. With the helper function `convertToTexture()` which is based - * on this module, the node system can automatically ensure texture input if required. - * - * @augments TextureNode - */ -declare class RTTNode extends TextureNode { - /** - * Constructs a new RTT node. - * - * @param {Node} node - The node to render a texture with. - * @param {?number} [width=null] - The width of the internal render target. If not width is applied, the render target is automatically resized. - * @param {?number} [height=null] - The height of the internal render target. - * @param {Object} [options={type:HalfFloatType}] - The options for the internal render target. - */ - constructor(node: Node, width?: number | null, height?: number | null, options?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isRTTNode: boolean; - /** - * The node to render a texture with. - * - * @type {Node} - */ - node: Node; - /** - * The width of the internal render target. - * If not width is applied, the render target is automatically resized. - * - * @type {?number} - * @default null - */ - width: number | null; - /** - * The height of the internal render target. - * - * @type {?number} - * @default null - */ - height: number | null; - /** - * The render target - * - * @type {RenderTarget} - */ - renderTarget: RenderTarget; - /** - * Whether the texture requires an update or not. - * - * @type {boolean} - * @default true - */ - textureNeedsUpdate: boolean; - /** - * Whether the texture should automatically be updated or not. - * - * @type {boolean} - * @default true - */ - autoUpdate: boolean; - /** - * The resolution scale - * - * @private - * @type {number} - * @default 1 - */ - private _resolutionScale; - /** - * The node which is used with the quad mesh for RTT. - * - * @private - * @type {Node} - * @default null - */ - private _rttNode; - /** - * The internal quad mesh for RTT. - * - * @private - * @type {QuadMesh} - */ - private _quadMesh; - /** - * Whether the internal render target should automatically be resized or not. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly get autoResize(): boolean; - setup(builder: any): void; - /** - * Sets the size of the internal render target - * - * @param {number} width - The width to set. - * @param {number} height - The width to set. - */ - setSize(width: number, height: number): void; - /** - * Sets the resolution scale. - * The resolution scale is a factor that is multiplied with the renderer's width and height. - * - * @param {number} resolutionScale - The resolution scale to set. A value of `1` means full resolution. - * @returns {RTTNode} A reference to this node. - */ - setResolutionScale(resolutionScale: number): RTTNode; - /** - * Gets the resolution scale. - * - * @returns {number} The resolution scale. - */ - getResolutionScale(): number; - updateBefore({ renderer }: { - renderer: any; - }): void; -} -import TextureNode from '../accessors/TextureNode.js'; -import { RenderTarget } from '../../core/RenderTarget.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/ReflectorNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/ReflectorNode.d.ts deleted file mode 100644 index 0ea38a3c6..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/ReflectorNode.d.ts +++ /dev/null @@ -1,233 +0,0 @@ -export function reflector(parameters?: { - target?: Object3D | undefined; - resolution?: number | undefined; - generateMipmaps?: boolean | undefined; - bounces?: boolean | undefined; - depth?: boolean | undefined; - samples?: number | undefined; - defaultTexture?: TextureNode | undefined; - reflector?: ReflectorBaseNode | undefined; -}): ReflectorNode; -export default ReflectorNode; -import { Object3D } from '../../core/Object3D.js'; -import TextureNode from '../accessors/TextureNode.js'; -/** - * Holds the actual implementation of the reflector. - * - * TODO: Explain why `ReflectorBaseNode`. Originally the entire logic was implemented - * in `ReflectorNode`, see #29619. - * - * @private - * @augments Node - */ -declare class ReflectorBaseNode extends Node { - /** - * Constructs a new reflector base node. - * - * @param {TextureNode} textureNode - Represents the rendered reflections as a texture node. - * @param {Object} [parameters={}] - An object holding configuration parameters. - * @param {Object3D} [parameters.target=new Object3D()] - The 3D object the reflector is linked to. - * @param {number} [parameters.resolutionScale=1] - The resolution scale. - * @param {boolean} [parameters.generateMipmaps=false] - Whether mipmaps should be generated or not. - * @param {boolean} [parameters.bounces=true] - Whether reflectors can render other reflector nodes or not. - * @param {boolean} [parameters.depth=false] - Whether depth data should be generated or not. - * @param {number} [parameters.samples] - Anti-Aliasing samples of the internal render-target. - */ - constructor(textureNode: TextureNode, parameters?: { - target?: Object3D | undefined; - resolutionScale?: number | undefined; - generateMipmaps?: boolean | undefined; - bounces?: boolean | undefined; - depth?: boolean | undefined; - samples?: number | undefined; - }); - /** - * Represents the rendered reflections as a texture node. - * - * @type {TextureNode} - */ - textureNode: TextureNode; - /** - * The 3D object the reflector is linked to. - * - * @type {Object3D} - * @default {new Object3D()} - */ - target: Object3D; - /** - * The resolution scale. - * - * @type {number} - * @default {1} - */ - resolutionScale: number; - /** - * Whether mipmaps should be generated or not. - * - * @type {boolean} - * @default {false} - */ - generateMipmaps: boolean; - /** - * Whether reflectors can render other reflector nodes or not. - * - * @type {boolean} - * @default {true} - */ - bounces: boolean; - /** - * Whether depth data should be generated or not. - * - * @type {boolean} - * @default {false} - */ - depth: boolean; - /** - * The number of anti-aliasing samples for the render-target - * - * @type {number} - * @default {0} - */ - samples: number; - /** - * Weak map for managing virtual cameras. - * - * @type {WeakMap} - */ - virtualCameras: WeakMap; - /** - * Weak map for managing render targets. - * - * @type {Map} - */ - renderTargets: Map; - /** - * Force render even if reflector is facing away from camera. - * - * @type {boolean} - * @default {false} - */ - forceUpdate: boolean; - /** - * Whether the reflector has been rendered or not. - * - * When the reflector is facing away from the camera, - * this flag is set to `false` and the texture will be empty(black). - * - * @type {boolean} - * @default {false} - */ - hasOutput: boolean; - /** - * Updates the resolution of the internal render target. - * - * @private - * @param {RenderTarget} renderTarget - The render target to resize. - * @param {Renderer} renderer - The renderer that is used to determine the new size. - */ - private _updateResolution; - setup(builder: any): Node | null; - /** - * Returns a virtual camera for the given camera. The virtual camera is used to - * render the scene from the reflector's view so correct reflections can be produced. - * - * @param {Camera} camera - The scene's camera. - * @return {Camera} The corresponding virtual camera. - */ - getVirtualCamera(camera: Camera): Camera; - /** - * Returns a render target for the given camera. The reflections are rendered - * into this render target. - * - * @param {Camera} camera - The scene's camera. - * @return {RenderTarget} The render target. - */ - getRenderTarget(camera: Camera): RenderTarget; - updateBefore(frame: any): false | undefined; - set resolution(value: number); - /** - * The resolution scale. - * - * @deprecated - * @type {number} - * @default {1} - */ - get resolution(): number; -} -/** - * This node can be used to implement mirror-like flat reflective surfaces. - * - * ```js - * const groundReflector = reflector(); - * material.colorNode = groundReflector; - * - * const plane = new Mesh( geometry, material ); - * plane.add( groundReflector.target ); - * ``` - * - * @augments TextureNode - */ -declare class ReflectorNode extends TextureNode { - /** - * Constructs a new reflector node. - * - * @param {Object} [parameters={}] - An object holding configuration parameters. - * @param {Object3D} [parameters.target=new Object3D()] - The 3D object the reflector is linked to. - * @param {number} [parameters.resolutionScale=1] - The resolution scale. - * @param {boolean} [parameters.generateMipmaps=false] - Whether mipmaps should be generated or not. - * @param {boolean} [parameters.bounces=true] - Whether reflectors can render other reflector nodes or not. - * @param {boolean} [parameters.depth=false] - Whether depth data should be generated or not. - * @param {number} [parameters.samples] - Anti-Aliasing samples of the internal render-target. - * @param {TextureNode} [parameters.defaultTexture] - The default texture node. - * @param {ReflectorBaseNode} [parameters.reflector] - The reflector base node. - */ - constructor(parameters?: { - target?: Object3D | undefined; - resolutionScale?: number | undefined; - generateMipmaps?: boolean | undefined; - bounces?: boolean | undefined; - depth?: boolean | undefined; - samples?: number | undefined; - defaultTexture?: TextureNode | undefined; - reflector?: ReflectorBaseNode | undefined; - }); - /** - * A reference to the internal reflector base node which holds the actual implementation. - * - * @private - * @type {ReflectorBaseNode} - * @default ReflectorBaseNode - */ - private _reflectorBaseNode; - /** - * A reference to the internal depth node. - * - * @private - * @type {?Node} - * @default null - */ - private _depthNode; - /** - * A reference to the internal reflector node. - * - * @type {ReflectorBaseNode} - */ - get reflector(): ReflectorBaseNode; - /** - * A reference to 3D object the reflector is linked to. - * - * @type {Object3D} - */ - get target(): Object3D; - /** - * Returns a node representing the mirror's depth. That can be used - * to implement more advanced reflection effects like distance attenuation. - * - * @return {Node} The depth node. - */ - getDepthNode(): Node; - setup(builder: any): void; - clone(): any; -} -import Node from '../core/Node.js'; -import { RenderTarget } from '../../core/RenderTarget.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/Remap.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/Remap.d.ts deleted file mode 100644 index b6aacd043..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/Remap.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * This node allows to remap a node value from one range into another but with enabled clamping. E.g a value of - * `0.4` in the range `[ 0.3, 0.5 ]` should be remapped into the normalized range `[ 0, 1 ]`. - * `remapClamp` takes care of that and converts the original value of `0.4` to `0.5`. - * - * @tsl - * @function - * @param {Node} node - The node that should be remapped. - * @param {Node} inLowNode - The source or current lower bound of the range. - * @param {Node} inHighNode - The source or current upper bound of the range. - * @param {?Node} [outLowNode=float(0)] - The target lower bound of the range. - * @param {?Node} [outHighNode=float(1)] - The target upper bound of the range. - * @returns {Node} - */ -export function remapClamp(node: Node, inLowNode: Node, inHighNode: Node, outLowNode?: Node | null, outHighNode?: Node | null): Node; -/** - * This node allows to remap a node value from one range into another. E.g a value of - * `0.4` in the range `[ 0.3, 0.5 ]` should be remapped into the normalized range `[ 0, 1 ]`. - * `remap` takes care of that and converts the original value of `0.4` to `0.5`. - * - * @tsl - * @function - * @param {Node} node - The node that should be remapped. - * @param {Node} inLowNode - The source or current lower bound of the range. - * @param {Node} inHighNode - The source or current upper bound of the range. - * @param {?Node} [outLowNode=float(0)] - The target lower bound of the range. - * @param {?Node} [outHighNode=float(1)] - The target upper bound of the range. - * @returns {Node} - */ -export const remap: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/RotateNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/RotateNode.d.ts deleted file mode 100644 index ed6dfe36b..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/RotateNode.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -export default RotateNode; -/** - * TSL function for creating a rotate node. - * - * @tsl - * @function - * @param {Node} positionNode - The position node. - * @param {Node} rotationNode - Represents the rotation that is applied to the position node. Depending - * on whether the position data are 2D or 3D, the rotation is expressed a single float value or an Euler value. - * @returns {RotateNode} - */ -export const rotate: any; -/** - * Applies a rotation to the given position node. - * - * @augments TempNode - */ -declare class RotateNode extends TempNode { - /** - * Constructs a new rotate node. - * - * @param {Node} positionNode - The position node. - * @param {Node} rotationNode - Represents the rotation that is applied to the position node. Depending - * on whether the position data are 2D or 3D, the rotation is expressed a single float value or an Euler value. - */ - constructor(positionNode: Node, rotationNode: Node); - /** - * The position node. - * - * @type {Node} - */ - positionNode: Node; - /** - * Represents the rotation that is applied to the position node. - * Depending on whether the position data are 2D or 3D, the rotation is expressed a single float value or an Euler value. - * - * @type {Node} - */ - rotationNode: Node; - /** - * The type of the {@link RotateNode#positionNode} defines the node's type. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node's type. - */ - generateNodeType(builder: NodeBuilder): string; - setup(builder: any): any; -} -import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/SampleNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/SampleNode.d.ts deleted file mode 100644 index 6fb9d738c..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/SampleNode.d.ts +++ /dev/null @@ -1,46 +0,0 @@ -export default SampleNode; -export function sample(callback: Function, uv?: Node | null): SampleNode; -/** - * Class representing a node that samples a value using a provided callback function. - * - * @extends Node - */ -declare class SampleNode extends Node { - /** - * Creates an instance of SampleNode. - * - * @param {Function} callback - The function to be called when sampling. Should accept a UV node and return a value. - * @param {?Node} [uvNode=null] - The UV node to be used in the texture sampling. - */ - constructor(callback: Function, uvNode?: Node | null); - callback: Function; - /** - * Represents the texture coordinates. - * - * @type {?Node} - * @default null - */ - uvNode: Node | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSampleNode: boolean; - /** - * Sets up the node by sampling with the default UV accessor. - * - * @returns {Node} The result of the callback function when called with the UV node. - */ - setup(): Node; - /** - * Calls the callback function with the provided UV node. - * - * @param {Node} uv - The UV node or value to be passed to the callback. - * @returns {Node} The result of the callback function. - */ - sample(uv: Node): Node; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/SetNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/SetNode.d.ts deleted file mode 100644 index 4dcfbd1b9..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/SetNode.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -export default SetNode; -/** - * This module is part of the TSL core and usually not used in app level code. - * `SetNode` represents a set operation which means it is used to implement any - * `setXYZW()`, `setRGBA()` and `setSTPQ()` method invocations on node objects. - * For example: - * ```js - * materialLine.colorNode = color( 0, 0, 0 ).setR( float( 1 ) ); - * ``` - * - * @augments TempNode - */ -declare class SetNode extends TempNode { - /** - * Constructs a new set node. - * - * @param {Node} sourceNode - The node that should be updated. - * @param {string} components - The components that should be updated. - * @param {Node} targetNode - The value node. - */ - constructor(sourceNode: Node, components: string, targetNode: Node); - /** - * The node that should be updated. - * - * @type {Node} - */ - sourceNode: Node; - /** - * The components that should be updated. - * - * @type {string} - */ - components: string; - /** - * The value node. - * - * @type {Node} - */ - targetNode: Node; - /** - * This method is overwritten since the node type is inferred from {@link SetNode#sourceNode}. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - generate(builder: any): string; -} -import TempNode from '../core/TempNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/SplitNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/SplitNode.d.ts deleted file mode 100644 index 9941f1852..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/SplitNode.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -export default SplitNode; -/** - * This module is part of the TSL core and usually not used in app level code. - * `SplitNode` represents a property access operation which means it is - * used to implement any `.xyzw`, `.rgba` and `stpq` usage on node objects. - * For example: - * ```js - * const redValue = color.r; - * ``` - * - * @augments Node - */ -declare class SplitNode extends Node { - /** - * Constructs a new split node. - * - * @param {Node} node - The node that should be accessed. - * @param {string} [components='x'] - The components that should be accessed. - */ - constructor(node: Node, components?: string); - /** - * The node that should be accessed. - * - * @type {Node} - */ - node: Node; - /** - * The components that should be accessed. - * - * @type {string} - */ - components: string; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSplitNode: boolean; - /** - * Returns the vector length which is computed based on the requested components. - * - * @return {number} The vector length. - */ - getVectorLength(): number; - /** - * Returns the component type of the node's type. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The component type. - */ - getComponentType(builder: NodeBuilder): string; - /** - * This method is overwritten since the node type is inferred from requested components. - * - * @param {NodeBuilder} builder - The current node builder. - * @return {string} The node type. - */ - generateNodeType(builder: NodeBuilder): string; - generate(builder: any, output: any): any; - serialize(data: any): void; - deserialize(data: any): void; -} -import Node from '../core/Node.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/SpriteSheetUV.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/SpriteSheetUV.d.ts deleted file mode 100644 index 572dccc2c..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/SpriteSheetUV.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * TSL function for computing texture coordinates for animated sprite sheets. - * - * ```js - * const uvNode = spritesheetUV( vec2( 6, 6 ), uv(), time.mul( animationSpeed ) ); - * - * material.colorNode = texture( spriteSheet, uvNode ); - * ``` - * - * @tsl - * @function - * @param {Node} countNode - The node that defines the number of sprites in the x and y direction (e.g 6x6). - * @param {?Node} [uvNode=uv()] - The uv node. - * @param {?Node} [frameNode=float(0)] - The node that defines the current frame/sprite. - * @returns {Node} - */ -export const spritesheetUV: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/SpriteUtils.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/SpriteUtils.d.ts deleted file mode 100644 index 5350a7581..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/SpriteUtils.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * This can be used to achieve a billboarding behavior for flat meshes. That means they are - * oriented always towards the camera. - * - * ```js - * material.vertexNode = billboarding(); - * ``` - * - * @tsl - * @function - * @param {Object} config - The configuration object. - * @param {?Node} [config.position=null] - Can be used to define the vertex positions in world space. - * @param {boolean} [config.horizontal=true] - Whether to follow the camera rotation horizontally or not. - * @param {boolean} [config.vertical=false] - Whether to follow the camera rotation vertically or not. - * @return {Node} The updated vertex position in clip space. - */ -export const billboarding: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/StorageArrayElementNode.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/StorageArrayElementNode.d.ts deleted file mode 100644 index 5257eebfd..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/StorageArrayElementNode.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -export default StorageArrayElementNode; -/** - * TSL function for creating a storage element node. - * - * @tsl - * @function - * @param {StorageBufferNode} storageBufferNode - The storage buffer node. - * @param {Node} indexNode - The index node that defines the element access. - * @returns {StorageArrayElementNode} - */ -export const storageElement: any; -/** - * This class enables element access on instances of {@link StorageBufferNode}. - * In most cases, it is indirectly used when accessing elements with the - * {@link StorageBufferNode#element} method. - * - * ```js - * const position = positionStorage.element( instanceIndex ); - * ``` - * - * @augments ArrayElementNode - */ -declare class StorageArrayElementNode extends ArrayElementNode { - /** - * Constructs storage buffer element node. - * - * @param {StorageBufferNode} storageBufferNode - The storage buffer node. - * @param {Node} indexNode - The index node that defines the element access. - */ - constructor(storageBufferNode: StorageBufferNode, indexNode: Node); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStorageArrayElementNode: boolean; - /** - * The storage buffer node. - * - * @param {Node} value - * @type {StorageBufferNode} - */ - set storageBufferNode(value: Node); - get storageBufferNode(): Node; - getMemberType(builder: any, name: any): any; - setup(builder: any): import("../Nodes.js").Node | null; - generate(builder: any, output: any): any; -} -import ArrayElementNode from './ArrayElementNode.js'; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/Timer.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/Timer.d.ts deleted file mode 100644 index 9131612ca..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/Timer.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Represents the elapsed time in seconds. - * - * @tsl - * @type {UniformNode} - */ -export const time: UniformNode; -/** - * Represents the delta time in seconds. - * - * @tsl - * @type {UniformNode} - */ -export const deltaTime: UniformNode; -/** - * Represents the current frame ID. - * - * @tsl - * @type {UniformNode} - */ -export const frameId: UniformNode; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/TriplanarTextures.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/TriplanarTextures.d.ts deleted file mode 100644 index df819d30b..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/TriplanarTextures.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * TSL function for creating a triplanar textures node. - * - * Can be used for triplanar texture mapping. - * - * ```js - * material.colorNode = triplanarTexture( texture( diffuseMap ) ); - * ``` - * - * @tsl - * @function - * @param {Node} textureXNode - First texture node. - * @param {?Node} [textureYNode=null] - Second texture node. When not set, the shader will sample from `textureXNode` instead. - * @param {?Node} [textureZNode=null] - Third texture node. When not set, the shader will sample from `textureXNode` instead. - * @param {?Node} [scaleNode=float(1)] - The scale node. - * @param {?Node} [positionNode=positionLocal] - Vertex positions in local space. - * @param {?Node} [normalNode=normalLocal] - Normals in local space. - * @returns {Node} - */ -export const triplanarTextures: () => void; -export function triplanarTexture(...params: any[]): Node; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/UVUtils.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/UVUtils.d.ts deleted file mode 100644 index fb078e354..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/UVUtils.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Replaces the default UV coordinates used in texture lookups. - * - * ```js - *material.contextNode = replaceDefaultUV( ( textureNode ) => { - * - * // ... - * return customUVCoordinates; - * - *} ); - *``` - * - * @tsl - * @function - * @param {function(Node):Node|Node} callback - A callback that receives the texture node - * and must return the new uv coordinates. - * @param {Node} [node=null] - An optional node to which the context will be applied. - * @return {ContextNode} A context node that replaces the default UV coordinates. - */ -export function replaceDefaultUV(callback: (arg0: Node) => Node | Node, node?: Node): ContextNode; -/** - * Rotates the given uv coordinates around a center point - * - * @tsl - * @function - * @param {Node} uv - The uv coordinates. - * @param {Node} rotation - The rotation defined in radians. - * @param {Node} center - The center of rotation - * @return {Node} The rotated uv coordinates. - */ -export const rotateUV: () => void; -/** - * Applies a spherical warping effect to the given uv coordinates. - * - * @tsl - * @function - * @param {Node} uv - The uv coordinates. - * @param {Node} strength - The strength of the effect. - * @param {Node} center - The center point - * @return {Node} The updated uv coordinates. - */ -export const spherizeUV: () => void; diff --git a/jsdoc-testing/jsdoc/src/nodes/utils/ViewportUtils.d.ts b/jsdoc-testing/jsdoc/src/nodes/utils/ViewportUtils.d.ts deleted file mode 100644 index 8622c377b..000000000 --- a/jsdoc-testing/jsdoc/src/nodes/utils/ViewportUtils.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * A special version of a screen uv function that involves a depth comparison - * when computing the final uvs. The function mitigates visual errors when - * using viewport texture nodes for refraction purposes. Without this function - * objects in front of a refractive surface might appear on the refractive surface - * which is incorrect. - * - * @tsl - * @function - * @param {?Node} uv - Optional uv coordinates. By default `screenUV` is used. - * @return {Node} The update uv coordinates. - */ -export const viewportSafeUV: () => void; diff --git a/jsdoc-testing/jsdoc/src/objects/BatchedMesh.d.ts b/jsdoc-testing/jsdoc/src/objects/BatchedMesh.d.ts deleted file mode 100644 index df6bdda31..000000000 --- a/jsdoc-testing/jsdoc/src/objects/BatchedMesh.d.ts +++ /dev/null @@ -1,366 +0,0 @@ -/** - * A special version of a mesh with multi draw batch rendering support. Use - * this class if you have to render a large number of objects with the same - * material but with different geometries or world transformations. The usage of - * `BatchedMesh` will help you to reduce the number of draw calls and thus improve the overall - * rendering performance in your application. - * - * ```js - * const box = new THREE.BoxGeometry( 1, 1, 1 ); - * const sphere = new THREE.SphereGeometry( 1, 12, 12 ); - * const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); - * - * // initialize and add geometries into the batched mesh - * const batchedMesh = new BatchedMesh( 10, 5000, 10000, material ); - * const boxGeometryId = batchedMesh.addGeometry( box ); - * const sphereGeometryId = batchedMesh.addGeometry( sphere ); - * - * // create instances of those geometries - * const boxInstancedId1 = batchedMesh.addInstance( boxGeometryId ); - * const boxInstancedId2 = batchedMesh.addInstance( boxGeometryId ); - * - * const sphereInstancedId1 = batchedMesh.addInstance( sphereGeometryId ); - * const sphereInstancedId2 = batchedMesh.addInstance( sphereGeometryId ); - * - * // position the geometries - * batchedMesh.setMatrixAt( boxInstancedId1, boxMatrix1 ); - * batchedMesh.setMatrixAt( boxInstancedId2, boxMatrix2 ); - * - * batchedMesh.setMatrixAt( sphereInstancedId1, sphereMatrix1 ); - * batchedMesh.setMatrixAt( sphereInstancedId2, sphereMatrix2 ); - * - * scene.add( batchedMesh ); - * ``` - * - * @augments Mesh - */ -export class BatchedMesh extends Mesh { - /** - * Constructs a new batched mesh. - * - * @param {number} maxInstanceCount - The maximum number of individual instances planned to be added and rendered. - * @param {number} maxVertexCount - The maximum number of vertices to be used by all unique geometries. - * @param {number} [maxIndexCount=maxVertexCount*2] - The maximum number of indices to be used by all unique geometries - * @param {Material|Array} [material] - The mesh material. - */ - constructor(maxInstanceCount: number, maxVertexCount: number, maxIndexCount?: number, material?: Material | Array); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBatchedMesh: boolean; - /** - * When set ot `true`, the individual objects of a batch are frustum culled. - * - * @type {boolean} - * @default true - */ - perObjectFrustumCulled: boolean; - /** - * When set to `true`, the individual objects of a batch are sorted to improve overdraw-related artifacts. - * If the material is marked as "transparent" objects are rendered back to front and if not then they are - * rendered front to back. - * - * @type {boolean} - * @default true - */ - sortObjects: boolean; - /** - * The bounding box of the batched mesh. Can be computed via {@link BatchedMesh#computeBoundingBox}. - * - * @type {?Box3} - * @default null - */ - boundingBox: Box3 | null; - /** - * The bounding sphere of the batched mesh. Can be computed via {@link BatchedMesh#computeBoundingSphere}. - * - * @type {?Sphere} - * @default null - */ - boundingSphere: Sphere | null; - /** - * Takes a sort a function that is run before render. The function takes a list of instances to - * sort and a camera. The objects in the list include a "z" field to perform a depth-ordered - * sort with. - * - * @type {?Function} - * @default null - */ - customSort: Function | null; - _instanceInfo: any[]; - _geometryInfo: any[]; - _availableInstanceIds: any[]; - _availableGeometryIds: any[]; - _nextIndexStart: number; - _nextVertexStart: number; - _geometryCount: number; - _visibilityChanged: boolean; - _geometryInitialized: boolean; - _maxInstanceCount: number; - _maxVertexCount: number; - _maxIndexCount: number; - _multiDrawCounts: Int32Array; - _multiDrawStarts: Int32Array; - _multiDrawCount: number; - _matricesTexture: any; - _indirectTexture: any; - _colorsTexture: any; - /** - * The maximum number of individual instances that can be stored in the batch. - * - * @type {number} - * @readonly - */ - readonly get maxInstanceCount(): number; - /** - * The instance count. - * - * @type {number} - * @readonly - */ - readonly get instanceCount(): number; - /** - * The number of unused vertices. - * - * @type {number} - * @readonly - */ - readonly get unusedVertexCount(): number; - /** - * The number of unused indices. - * - * @type {number} - * @readonly - */ - readonly get unusedIndexCount(): number; - _initMatricesTexture(): void; - _initIndirectTexture(): void; - _initColorsTexture(): void; - _initializeGeometry(reference: any): void; - _validateGeometry(geometry: any): void; - /** - * Validates the instance defined by the given ID. - * - * @param {number} instanceId - The instance to validate. - */ - validateInstanceId(instanceId: number): void; - /** - * Validates the geometry defined by the given ID. - * - * @param {number} geometryId - The geometry to validate. - */ - validateGeometryId(geometryId: number): void; - /** - * Takes a sort a function that is run before render. The function takes a list of instances to - * sort and a camera. The objects in the list include a "z" field to perform a depth-ordered sort with. - * - * @param {Function} func - The custom sort function. - * @return {BatchedMesh} A reference to this batched mesh. - */ - setCustomSort(func: Function): BatchedMesh; - /** - * Computes the bounding box, updating {@link BatchedMesh#boundingBox}. - * Bounding boxes aren't computed by default. They need to be explicitly computed, - * otherwise they are `null`. - */ - computeBoundingBox(): void; - /** - * Computes the bounding sphere, updating {@link BatchedMesh#boundingSphere}. - * Bounding spheres aren't computed by default. They need to be explicitly computed, - * otherwise they are `null`. - */ - computeBoundingSphere(): void; - /** - * Adds a new instance to the batch using the geometry of the given ID and returns - * a new id referring to the new instance to be used by other functions. - * - * @param {number} geometryId - The ID of a previously added geometry via {@link BatchedMesh#addGeometry}. - * @return {number} The instance ID. - */ - addInstance(geometryId: number): number; - /** - * Adds the given geometry to the batch and returns the associated - * geometry id referring to it to be used in other functions. - * - * @param {BufferGeometry} geometry - The geometry to add. - * @param {number} [reservedVertexCount=-1] - Optional parameter specifying the amount of - * vertex buffer space to reserve for the added geometry. This is necessary if it is planned - * to set a new geometry at this index at a later time that is larger than the original geometry. - * Defaults to the length of the given geometry vertex buffer. - * @param {number} [reservedIndexCount=-1] - Optional parameter specifying the amount of index - * buffer space to reserve for the added geometry. This is necessary if it is planned to set a - * new geometry at this index at a later time that is larger than the original geometry. Defaults to - * the length of the given geometry index buffer. - * @return {number} The geometry ID. - */ - addGeometry(geometry: BufferGeometry, reservedVertexCount?: number, reservedIndexCount?: number): number; - /** - * Replaces the geometry at the given ID with the provided geometry. Throws an error if there - * is not enough space reserved for geometry. Calling this will change all instances that are - * rendering that geometry. - * - * @param {number} geometryId - The ID of the geometry that should be replaced with the given geometry. - * @param {BufferGeometry} geometry - The new geometry. - * @return {number} The geometry ID. - */ - setGeometryAt(geometryId: number, geometry: BufferGeometry): number; - /** - * Deletes the geometry defined by the given ID from this batch. Any instances referencing - * this geometry will also be removed as a side effect. - * - * @param {number} geometryId - The ID of the geometry to remove from the batch. - * @return {BatchedMesh} A reference to this batched mesh. - */ - deleteGeometry(geometryId: number): BatchedMesh; - /** - * Deletes an existing instance from the batch using the given ID. - * - * @param {number} instanceId - The ID of the instance to remove from the batch. - * @return {BatchedMesh} A reference to this batched mesh. - */ - deleteInstance(instanceId: number): BatchedMesh; - /** - * Repacks the sub geometries in BatchedMesh to remove any unused space remaining from - * previously deleted geometry, freeing up space to add new geometry. - * - * @return {BatchedMesh} A reference to this batched mesh. - */ - optimize(): BatchedMesh; - /** - * Returns the bounding box for the given geometry. - * - * @param {number} geometryId - The ID of the geometry to return the bounding box for. - * @param {Box3} target - The target object that is used to store the method's result. - * @return {?Box3} The geometry's bounding box. Returns `null` if no geometry has been found for the given ID. - */ - getBoundingBoxAt(geometryId: number, target: Box3): Box3 | null; - /** - * Returns the bounding sphere for the given geometry. - * - * @param {number} geometryId - The ID of the geometry to return the bounding sphere for. - * @param {Sphere} target - The target object that is used to store the method's result. - * @return {?Sphere} The geometry's bounding sphere. Returns `null` if no geometry has been found for the given ID. - */ - getBoundingSphereAt(geometryId: number, target: Sphere): Sphere | null; - /** - * Sets the given local transformation matrix to the defined instance. - * Negatively scaled matrices are not supported. - * - * @param {number} instanceId - The ID of an instance to set the matrix of. - * @param {Matrix4} matrix - A 4x4 matrix representing the local transformation of a single instance. - * @return {BatchedMesh} A reference to this batched mesh. - */ - setMatrixAt(instanceId: number, matrix: Matrix4): BatchedMesh; - /** - * Returns the local transformation matrix of the defined instance. - * - * @param {number} instanceId - The ID of an instance to get the matrix of. - * @param {Matrix4} matrix - The target object that is used to store the method's result. - * @return {Matrix4} The instance's local transformation matrix. - */ - getMatrixAt(instanceId: number, matrix: Matrix4): Matrix4; - /** - * Sets the given color to the defined instance. - * - * @param {number} instanceId - The ID of an instance to set the color of. - * @param {Color|Vector4} color - The color to set the instance to. Use a `Vector4` to also define alpha. - * @return {BatchedMesh} A reference to this batched mesh. - */ - setColorAt(instanceId: number, color: Color | Vector4): BatchedMesh; - /** - * Returns the color of the defined instance. - * - * @param {number} instanceId - The ID of an instance to get the color of. - * @param {Color|Vector4} color - The target object that is used to store the method's result. - * @return {Color|Vector4} The instance's color. Use a `Vector4` to also retrieve alpha. - */ - getColorAt(instanceId: number, color: Color | Vector4): Color | Vector4; - /** - * Sets the visibility of the instance. - * - * @param {number} instanceId - The id of the instance to set the visibility of. - * @param {boolean} visible - Whether the instance is visible or not. - * @return {BatchedMesh} A reference to this batched mesh. - */ - setVisibleAt(instanceId: number, visible: boolean): BatchedMesh; - /** - * Returns the visibility state of the defined instance. - * - * @param {number} instanceId - The ID of an instance to get the visibility state of. - * @return {boolean} Whether the instance is visible or not. - */ - getVisibleAt(instanceId: number): boolean; - /** - * Sets the geometry ID of the instance at the given index. - * - * @param {number} instanceId - The ID of the instance to set the geometry ID of. - * @param {number} geometryId - The geometry ID to be use by the instance. - * @return {BatchedMesh} A reference to this batched mesh. - */ - setGeometryIdAt(instanceId: number, geometryId: number): BatchedMesh; - /** - * Returns the geometry ID of the defined instance. - * - * @param {number} instanceId - The ID of an instance to get the geometry ID of. - * @return {number} The instance's geometry ID. - */ - getGeometryIdAt(instanceId: number): number; - /** - * Get the range representing the subset of triangles related to the attached geometry, - * indicating the starting offset and count, or `null` if invalid. - * - * @param {number} geometryId - The id of the geometry to get the range of. - * @param {Object} [target] - The target object that is used to store the method's result. - * @return {{ - * vertexStart:number,vertexCount:number,reservedVertexCount:number, - * indexStart:number,indexCount:number,reservedIndexCount:number, - * start:number,count:number - * }} The result object with range data. - */ - getGeometryRangeAt(geometryId: number, target?: Object): { - vertexStart: number; - vertexCount: number; - reservedVertexCount: number; - indexStart: number; - indexCount: number; - reservedIndexCount: number; - start: number; - count: number; - }; - /** - * Resizes the necessary buffers to support the provided number of instances. - * If the provided arguments shrink the number of instances but there are not enough - * unused Ids at the end of the list then an error is thrown. - * - * @param {number} maxInstanceCount - The max number of individual instances that can be added and rendered by the batch. - */ - setInstanceCount(maxInstanceCount: number): void; - /** - * Resizes the available space in the batch's vertex and index buffer attributes to the provided sizes. - * If the provided arguments shrink the geometry buffers but there is not enough unused space at the - * end of the geometry attributes then an error is thrown. - * - * @param {number} maxVertexCount - The maximum number of vertices to be used by all unique geometries to resize to. - * @param {number} maxIndexCount - The maximum number of indices to be used by all unique geometries to resize to. - */ - setGeometrySize(maxVertexCount: number, maxIndexCount: number): void; - raycast(raycaster: any, intersects: any): void; - copy(source: any): this; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; - onBeforeRender(renderer: any, scene: any, camera: any, geometry: any, material: any): void; - onBeforeShadow(renderer: any, object: any, camera: any, shadowCamera: any, geometry: any, depthMaterial: any): void; -} -import { Mesh } from './Mesh.js'; -import { Box3 } from '../math/Box3.js'; -import { Sphere } from '../math/Sphere.js'; -import { BufferGeometry } from '../core/BufferGeometry.js'; -import { Matrix4 } from '../math/Matrix4.js'; -import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/Bone.d.ts b/jsdoc-testing/jsdoc/src/objects/Bone.d.ts deleted file mode 100644 index 5d0be09bc..000000000 --- a/jsdoc-testing/jsdoc/src/objects/Bone.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * A bone which is part of a {@link Skeleton}. The skeleton in turn is used by - * the {@link SkinnedMesh}. - * - * ```js - * const root = new THREE.Bone(); - * const child = new THREE.Bone(); - * - * root.add( child ); - * child.position.y = 5; - * ``` - * - * @augments Object3D - */ -export class Bone extends Object3D { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBone: boolean; - type: string; -} -import { Object3D } from '../core/Object3D.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/ClippingGroup.d.ts b/jsdoc-testing/jsdoc/src/objects/ClippingGroup.d.ts deleted file mode 100644 index 6183e90a1..000000000 --- a/jsdoc-testing/jsdoc/src/objects/ClippingGroup.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * In earlier three.js versions, clipping was defined globally - * on the renderer or on material level. This special version of - * `THREE.Group` allows to encode the clipping state into the scene - * graph. Meaning if you create an instance of this group, all - * descendant 3D objects will be affected by the respective clipping - * planes. - * - * Note: `ClippingGroup` can only be used with `WebGPURenderer`. - * - * @augments Group - */ -export class ClippingGroup extends Group { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isClippingGroup: boolean; - /** - * An array with clipping planes. - * - * @type {Array} - */ - clippingPlanes: Array; - /** - * Whether clipping should be enabled or not. - * - * @type {boolean} - * @default true - */ - enabled: boolean; - /** - * Whether the intersection of the clipping planes is used to clip objects, rather than their union. - * - * @type {boolean} - * @default false - */ - clipIntersection: boolean; - /** - * Whether shadows should be clipped or not. - * - * @type {boolean} - * @default false - */ - clipShadows: boolean; -} -import { Group } from './Group.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/Group.d.ts b/jsdoc-testing/jsdoc/src/objects/Group.d.ts deleted file mode 100644 index 4def40910..000000000 --- a/jsdoc-testing/jsdoc/src/objects/Group.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * This is almost identical to an {@link Object3D}. Its purpose is to - * make working with groups of objects syntactically clearer. - * - * ```js - * // Create a group and add the two cubes. - * // These cubes can now be rotated / scaled etc as a group. - * const group = new THREE.Group(); - * - * group.add( meshA ); - * group.add( meshB ); - * - * scene.add( group ); - * ``` - * - * @augments Object3D - */ -export class Group extends Object3D { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isGroup: boolean; - type: string; -} -import { Object3D } from '../core/Object3D.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/InstancedMesh.d.ts b/jsdoc-testing/jsdoc/src/objects/InstancedMesh.d.ts deleted file mode 100644 index 926cab0e0..000000000 --- a/jsdoc-testing/jsdoc/src/objects/InstancedMesh.d.ts +++ /dev/null @@ -1,151 +0,0 @@ -/** - * A special version of a mesh with instanced rendering support. Use - * this class if you have to render a large number of objects with the same - * geometry and material(s) but with different world transformations. The usage - * of 'InstancedMesh' will help you to reduce the number of draw calls and thus - * improve the overall rendering performance in your application. - * - * @augments Mesh - */ -export class InstancedMesh extends Mesh { - /** - * Constructs a new instanced mesh. - * - * @param {BufferGeometry} [geometry] - The mesh geometry. - * @param {Material|Array} [material] - The mesh material. - * @param {number} count - The number of instances. - */ - constructor(geometry?: BufferGeometry, material?: Material | Array, count: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isInstancedMesh: boolean; - /** - * Represents the local transformation of all instances. You have to set its - * {@link BufferAttribute#needsUpdate} flag to true if you modify instanced data - * via {@link InstancedMesh#setMatrixAt}. - * - * @type {InstancedBufferAttribute} - */ - instanceMatrix: InstancedBufferAttribute; - /** - * Represents the local transformation of all instances of the previous frame. - * Required for computing velocity. Maintained in {@link InstanceNode}. - * - * @type {?InstancedBufferAttribute} - * @default null - */ - previousInstanceMatrix: InstancedBufferAttribute | null; - /** - * Represents the color of all instances. You have to set its - * {@link BufferAttribute#needsUpdate} flag to true if you modify instanced data - * via {@link InstancedMesh#setColorAt}. - * - * @type {?InstancedBufferAttribute} - * @default null - */ - instanceColor: InstancedBufferAttribute | null; - /** - * Represents the morph target weights of all instances. You have to set its - * {@link Texture#needsUpdate} flag to true if you modify instanced data - * via {@link InstancedMesh#setMorphAt}. - * - * @type {?DataTexture} - * @default null - */ - morphTexture: DataTexture | null; - /** - * The bounding box of the instanced mesh. Can be computed via {@link InstancedMesh#computeBoundingBox}. - * - * @type {?Box3} - * @default null - */ - boundingBox: Box3 | null; - /** - * The bounding sphere of the instanced mesh. Can be computed via {@link InstancedMesh#computeBoundingSphere}. - * - * @type {?Sphere} - * @default null - */ - boundingSphere: Sphere | null; - /** - * Computes the bounding box of the instanced mesh, and updates {@link InstancedMesh#boundingBox}. - * The bounding box is not automatically computed by the engine; this method must be called by your app. - * You may need to recompute the bounding box if an instance is transformed via {@link InstancedMesh#setMatrixAt}. - */ - computeBoundingBox(): void; - /** - * Computes the bounding sphere of the instanced mesh, and updates {@link InstancedMesh#boundingSphere} - * The engine automatically computes the bounding sphere when it is needed, e.g., for ray casting or view frustum culling. - * You may need to recompute the bounding sphere if an instance is transformed via {@link InstancedMesh#setMatrixAt}. - */ - computeBoundingSphere(): void; - copy(source: any, recursive: any): this; - /** - * Gets the color of the defined instance. - * - * @param {number} index - The instance index. - * @param {Color} color - The target object that is used to store the method's result. - * @return {Color} A reference to the target color. - */ - getColorAt(index: number, color: Color): Color; - /** - * Gets the local transformation matrix of the defined instance. - * - * @param {number} index - The instance index. - * @param {Matrix4} matrix - The target object that is used to store the method's result. - * @return {Matrix4} A reference to the target matrix. - */ - getMatrixAt(index: number, matrix: Matrix4): Matrix4; - /** - * Gets the morph target weights of the defined instance. - * - * @param {number} index - The instance index. - * @param {Mesh} object - The target object that is used to store the method's result. - */ - getMorphAt(index: number, object: Mesh): void; - raycast(raycaster: any, intersects: any): void; - /** - * Sets the given color to the defined instance. Make sure you set the `needsUpdate` flag of - * {@link InstancedMesh#instanceColor} to `true` after updating all the colors. - * - * @param {number} index - The instance index. - * @param {Color} color - The instance color. - * @return {InstancedMesh} A reference to this instanced mesh. - */ - setColorAt(index: number, color: Color): InstancedMesh; - /** - * Sets the given local transformation matrix to the defined instance. Make sure you set the `needsUpdate` flag of - * {@link InstancedMesh#instanceMatrix} to `true` after updating all the matrices. - * - * @param {number} index - The instance index. - * @param {Matrix4} matrix - The local transformation. - * @return {InstancedMesh} A reference to this instanced mesh. - */ - setMatrixAt(index: number, matrix: Matrix4): InstancedMesh; - /** - * Sets the morph target weights to the defined instance. Make sure you set the `needsUpdate` flag of - * {@link InstancedMesh#morphTexture} to `true` after updating all the influences. - * - * @param {number} index - The instance index. - * @param {Mesh} object - A mesh which `morphTargetInfluences` property containing the morph target weights - * of a single instance. - * @return {InstancedMesh} A reference to this instanced mesh. - */ - setMorphAt(index: number, object: Mesh): InstancedMesh; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; -} -import { Mesh } from './Mesh.js'; -import { InstancedBufferAttribute } from '../core/InstancedBufferAttribute.js'; -import { DataTexture } from '../textures/DataTexture.js'; -import { Box3 } from '../math/Box3.js'; -import { Sphere } from '../math/Sphere.js'; -import { Matrix4 } from '../math/Matrix4.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/LOD.d.ts b/jsdoc-testing/jsdoc/src/objects/LOD.d.ts deleted file mode 100644 index d2f7d1004..000000000 --- a/jsdoc-testing/jsdoc/src/objects/LOD.d.ts +++ /dev/null @@ -1,103 +0,0 @@ -/** - * A component for providing a basic Level of Detail (LOD) mechanism. - * - * Every LOD level is associated with an object, and rendering can be switched - * between them at the distances specified. Typically you would create, say, - * three meshes, one for far away (low detail), one for mid range (medium - * detail) and one for close up (high detail). - * - * ```js - * const lod = new THREE.LOD(); - * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); - * - * //Create spheres with 3 levels of detail and create new LOD levels for them - * for( let i = 0; i < 3; i++ ) { - * - * const geometry = new THREE.IcosahedronGeometry( 10, 3 - i ); - * const mesh = new THREE.Mesh( geometry, material ); - * lod.addLevel( mesh, i * 75 ); - * - * } - * - * scene.add( lod ); - * ``` - * - * @augments Object3D - */ -export class LOD extends Object3D { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLOD: boolean; - /** - * The current LOD index. - * - * @private - * @type {number} - * @default 0 - */ - private _currentLevel; - type: string; - /** - * Whether the LOD object is updated automatically by the renderer per frame - * or not. If set to `false`, you have to call {@link LOD#update} in the - * render loop by yourself. - * - * @type {boolean} - * @default true - */ - autoUpdate: boolean; - copy(source: any): this; - /** - * Adds a mesh that will display at a certain distance and greater. Typically - * the further away the distance, the lower the detail on the mesh. - * - * @param {Object3D} object - The 3D object to display at this level. - * @param {number} [distance=0] - The distance at which to display this level of detail. - * @param {number} [hysteresis=0] - Threshold used to avoid flickering at LOD boundaries, as a fraction of distance. - * @return {LOD} A reference to this instance. - */ - addLevel(object: Object3D, distance?: number, hysteresis?: number): LOD; - /** - * Removes an existing level, based on the distance from the camera. - * Returns `true` when the level has been removed. Otherwise `false`. - * - * @param {number} distance - Distance of the level to remove. - * @return {boolean} Whether the level has been removed or not. - */ - removeLevel(distance: number): boolean; - /** - * Returns the currently active LOD level index. - * - * @return {number} The current active LOD level index. - */ - getCurrentLevel(): number; - /** - * Returns a reference to the first 3D object that is greater than - * the given distance. - * - * @param {number} distance - The LOD distance. - * @return {?Object3D} The found 3D object. `null` if no 3D object has been found. - */ - getObjectForDistance(distance: number): Object3D | null; - /** - * Computes intersection points between a casted ray and this LOD. - * - * @param {Raycaster} raycaster - The raycaster. - * @param {Array} intersects - The target array that holds the intersection points. - */ - raycast(raycaster: Raycaster, intersects: Array): void; - /** - * Updates the LOD by computing which LOD level should be visible according - * to the current distance of the given camera. - * - * @param {Camera} camera - The camera the scene is rendered with. - */ - update(camera: Camera): void; - toJSON(meta: any): Object; -} -import { Object3D } from '../core/Object3D.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/Line.d.ts b/jsdoc-testing/jsdoc/src/objects/Line.d.ts deleted file mode 100644 index 204db3fa8..000000000 --- a/jsdoc-testing/jsdoc/src/objects/Line.d.ts +++ /dev/null @@ -1,94 +0,0 @@ -/** - * A continuous line. The line are rendered by connecting consecutive - * vertices with straight lines. - * - * ```js - * const material = new THREE.LineBasicMaterial( { color: 0x0000ff } ); - * - * const points = []; - * points.push( new THREE.Vector3( - 10, 0, 0 ) ); - * points.push( new THREE.Vector3( 0, 10, 0 ) ); - * points.push( new THREE.Vector3( 10, 0, 0 ) ); - * - * const geometry = new THREE.BufferGeometry().setFromPoints( points ); - * - * const line = new THREE.Line( geometry, material ); - * scene.add( line ); - * ``` - * - * @augments Object3D - */ -export class Line extends Object3D { - /** - * Constructs a new line. - * - * @param {BufferGeometry} [geometry] - The line geometry. - * @param {Material|Array} [material] - The line material. - */ - constructor(geometry?: BufferGeometry, material?: Material | Array); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLine: boolean; - type: string; - /** - * The line geometry. - * - * @type {BufferGeometry} - */ - geometry: BufferGeometry; - /** - * The line material. - * - * @type {Material|Array} - * @default LineBasicMaterial - */ - material: Material | Array; - /** - * A dictionary representing the morph targets in the geometry. The key is the - * morph targets name, the value its attribute index. This member is `undefined` - * by default and only set when morph targets are detected in the geometry. - * - * @type {Object|undefined} - * @default undefined - */ - morphTargetDictionary: { - [x: string]: number; - } | undefined; - /** - * An array of weights typically in the range `[0,1]` that specify how much of the morph - * is applied. This member is `undefined` by default and only set when morph targets are - * detected in the geometry. - * - * @type {Array|undefined} - * @default undefined - */ - morphTargetInfluences: Array | undefined; - copy(source: any, recursive: any): this; - /** - * Computes an array of distance values which are necessary for rendering dashed lines. - * For each vertex in the geometry, the method calculates the cumulative length from the - * current point to the very beginning of the line. - * - * @return {Line} A reference to this line. - */ - computeLineDistances(): Line; - /** - * Computes intersection points between a casted ray and this line. - * - * @param {Raycaster} raycaster - The raycaster. - * @param {Array} intersects - The target array that holds the intersection points. - */ - raycast(raycaster: Raycaster, intersects: Array): void; - /** - * Sets the values of {@link Line#morphTargetDictionary} and {@link Line#morphTargetInfluences} - * to make sure existing morph targets can influence this 3D object. - */ - updateMorphTargets(): void; -} -import { Object3D } from '../core/Object3D.js'; -import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/LineLoop.d.ts b/jsdoc-testing/jsdoc/src/objects/LineLoop.d.ts deleted file mode 100644 index 2f08cb084..000000000 --- a/jsdoc-testing/jsdoc/src/objects/LineLoop.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * A continuous line. This is nearly the same as {@link Line} the only difference - * is that the last vertex is connected with the first vertex in order to close - * the line to form a loop. - * - * @augments Line - */ -export class LineLoop extends Line { - /** - * Constructs a new line loop. - * - * @param {BufferGeometry} [geometry] - The line geometry. - * @param {Material|Array} [material] - The line material. - */ - constructor(geometry?: BufferGeometry, material?: Material | Array); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLineLoop: boolean; -} -import { Line } from './Line.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/LineSegments.d.ts b/jsdoc-testing/jsdoc/src/objects/LineSegments.d.ts deleted file mode 100644 index 88df8f57f..000000000 --- a/jsdoc-testing/jsdoc/src/objects/LineSegments.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/** - * A series of lines drawn between pairs of vertices. - * - * @augments Line - */ -export class LineSegments extends Line { - /** - * Constructs a new line segments. - * - * @param {BufferGeometry} [geometry] - The line geometry. - * @param {Material|Array} [material] - The line material. - */ - constructor(geometry?: BufferGeometry, material?: Material | Array); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isLineSegments: boolean; - computeLineDistances(): this; -} -import { Line } from './Line.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/Mesh.d.ts b/jsdoc-testing/jsdoc/src/objects/Mesh.d.ts deleted file mode 100644 index a377e9c7d..000000000 --- a/jsdoc-testing/jsdoc/src/objects/Mesh.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Class representing triangular polygon mesh based objects. - * - * ```js - * const geometry = new THREE.BoxGeometry( 1, 1, 1 ); - * const material = new THREE.MeshBasicMaterial( { color: 0xffff00 } ); - * const mesh = new THREE.Mesh( geometry, material ); - * scene.add( mesh ); - * ``` - * - * @augments Object3D - */ -export class Mesh extends Object3D { - /** - * Constructs a new mesh. - * - * @param {BufferGeometry} [geometry] - The mesh geometry. - * @param {Material|Array} [material] - The mesh material. - */ - constructor(geometry?: BufferGeometry, material?: Material | Array); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMesh: boolean; - type: string; - /** - * The mesh geometry. - * - * @type {BufferGeometry} - */ - geometry: BufferGeometry; - /** - * The mesh material. - * - * @type {Material|Array} - * @default MeshBasicMaterial - */ - material: Material | Array; - /** - * A dictionary representing the morph targets in the geometry. The key is the - * morph targets name, the value its attribute index. This member is `undefined` - * by default and only set when morph targets are detected in the geometry. - * - * @type {Object|undefined} - * @default undefined - */ - morphTargetDictionary: { - [x: string]: number; - } | undefined; - /** - * An array of weights typically in the range `[0,1]` that specify how much of the morph - * is applied. This member is `undefined` by default and only set when morph targets are - * detected in the geometry. - * - * @type {Array|undefined} - * @default undefined - */ - morphTargetInfluences: Array | undefined; - /** - * The number of instances of this mesh. - * Can only be used with {@link WebGPURenderer}. - * - * @type {number} - * @default 1 - */ - count: number; - copy(source: any, recursive: any): this; - /** - * Sets the values of {@link Mesh#morphTargetDictionary} and {@link Mesh#morphTargetInfluences} - * to make sure existing morph targets can influence this 3D object. - */ - updateMorphTargets(): void; - /** - * Returns the local-space position of the vertex at the given index, taking into - * account the current animation state of both morph targets and skinning. - * - * @param {number} index - The vertex index. - * @param {Vector3} target - The target object that is used to store the method's result. - * @return {Vector3} The vertex position in local space. - */ - getVertexPosition(index: number, target: Vector3): Vector3; - /** - * Computes intersection points between a casted ray and this line. - * - * @param {Raycaster} raycaster - The raycaster. - * @param {Array} intersects - The target array that holds the intersection points. - */ - raycast(raycaster: Raycaster, intersects: Array): void; - _computeIntersections(raycaster: any, intersects: any, rayLocalSpace: any): void; -} -import { Object3D } from '../core/Object3D.js'; -import { BufferGeometry } from '../core/BufferGeometry.js'; -import { Vector3 } from '../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/Points.d.ts b/jsdoc-testing/jsdoc/src/objects/Points.d.ts deleted file mode 100644 index 68548e3e2..000000000 --- a/jsdoc-testing/jsdoc/src/objects/Points.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -/** - * A class for displaying points or point clouds. - * - * @augments Object3D - */ -export class Points extends Object3D { - /** - * Constructs a new point cloud. - * - * @param {BufferGeometry} [geometry] - The points geometry. - * @param {Material|Array} [material] - The points material. - */ - constructor(geometry?: BufferGeometry, material?: Material | Array); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isPoints: boolean; - type: string; - /** - * The points geometry. - * - * @type {BufferGeometry} - */ - geometry: BufferGeometry; - /** - * The line material. - * - * @type {Material|Array} - * @default PointsMaterial - */ - material: Material | Array; - /** - * A dictionary representing the morph targets in the geometry. The key is the - * morph targets name, the value its attribute index. This member is `undefined` - * by default and only set when morph targets are detected in the geometry. - * - * @type {Object|undefined} - * @default undefined - */ - morphTargetDictionary: { - [x: string]: number; - } | undefined; - /** - * An array of weights typically in the range `[0,1]` that specify how much of the morph - * is applied. This member is `undefined` by default and only set when morph targets are - * detected in the geometry. - * - * @type {Array|undefined} - * @default undefined - */ - morphTargetInfluences: Array | undefined; - copy(source: any, recursive: any): this; - /** - * Computes intersection points between a casted ray and this point cloud. - * - * @param {Raycaster} raycaster - The raycaster. - * @param {Array} intersects - The target array that holds the intersection points. - */ - raycast(raycaster: Raycaster, intersects: Array): void; - /** - * Sets the values of {@link Points#morphTargetDictionary} and {@link Points#morphTargetInfluences} - * to make sure existing morph targets can influence this 3D object. - */ - updateMorphTargets(): void; -} -import { Object3D } from '../core/Object3D.js'; -import { BufferGeometry } from '../core/BufferGeometry.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/Skeleton.d.ts b/jsdoc-testing/jsdoc/src/objects/Skeleton.d.ts deleted file mode 100644 index 7bab62ed2..000000000 --- a/jsdoc-testing/jsdoc/src/objects/Skeleton.d.ts +++ /dev/null @@ -1,134 +0,0 @@ -/** - * Class for representing the armatures in `three.js`. The skeleton - * is defined by a hierarchy of bones. - * - * ```js - * const bones = []; - * - * const shoulder = new THREE.Bone(); - * const elbow = new THREE.Bone(); - * const hand = new THREE.Bone(); - * - * shoulder.add( elbow ); - * elbow.add( hand ); - * - * bones.push( shoulder , elbow, hand); - * - * shoulder.position.y = -5; - * elbow.position.y = 0; - * hand.position.y = 5; - * - * const armSkeleton = new THREE.Skeleton( bones ); - * ``` - */ -export class Skeleton { - /** - * Constructs a new skeleton. - * - * @param {Array} [bones] - An array of bones. - * @param {Array} [boneInverses] - An array of bone inverse matrices. - * If not provided, these matrices will be computed automatically via {@link Skeleton#calculateInverses}. - */ - constructor(bones?: Array, boneInverses?: Array); - uuid: string; - /** - * An array of bones defining the skeleton. - * - * @type {Array} - */ - bones: Array; - /** - * An array of bone inverse matrices. - * - * @type {Array} - */ - boneInverses: Array; - /** - * An array buffer holding the bone data. - * Input data for {@link Skeleton#boneTexture}. - * - * @type {?Float32Array} - * @default null - */ - boneMatrices: Float32Array | null; - /** - * An array buffer holding the bone data of the previous frame. - * Required for computing velocity. Maintained in {@link SkinningNode}. - * - * @type {?Float32Array} - * @default null - */ - previousBoneMatrices: Float32Array | null; - /** - * A texture holding the bone data for use - * in the vertex shader. - * - * @type {?DataTexture} - * @default null - */ - boneTexture: DataTexture | null; - /** - * Initializes the skeleton. This method gets automatically called by the constructor - * but depending on how the skeleton is created it might be necessary to call this method - * manually. - */ - init(): void; - /** - * Computes the bone inverse matrices. This method resets {@link Skeleton#boneInverses} - * and fills it with new matrices. - */ - calculateInverses(): void; - /** - * Resets the skeleton to the base pose. - */ - pose(): void; - /** - * Resets the skeleton to the base pose. - */ - update(): void; - /** - * Returns a new skeleton with copied values from this instance. - * - * @return {Skeleton} A clone of this instance. - */ - clone(): Skeleton; - /** - * Computes a data texture for passing bone data to the vertex shader. - * - * @return {Skeleton} A reference of this instance. - */ - computeBoneTexture(): Skeleton; - /** - * Searches through the skeleton's bone array and returns the first with a - * matching name. - * - * @param {string} name - The name of the bone. - * @return {Bone|undefined} The found bone. `undefined` if no bone has been found. - */ - getBoneByName(name: string): Bone | undefined; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose(): void; - /** - * Setups the skeleton by the given JSON and bones. - * - * @param {Object} json - The skeleton as serialized JSON. - * @param {Object} bones - An array of bones. - * @return {Skeleton} A reference of this instance. - */ - fromJSON(json: Object, bones: { - [x: string]: Bone; - }): Skeleton; - /** - * Serializes the skeleton into JSON. - * - * @return {Object} A JSON object representing the serialized skeleton. - * @see {@link ObjectLoader#parse} - */ - toJSON(): Object; -} -import { Bone } from './Bone.js'; -import { Matrix4 } from '../math/Matrix4.js'; -import { DataTexture } from '../textures/DataTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/SkinnedMesh.d.ts b/jsdoc-testing/jsdoc/src/objects/SkinnedMesh.d.ts deleted file mode 100644 index 77cf71c4e..000000000 --- a/jsdoc-testing/jsdoc/src/objects/SkinnedMesh.d.ts +++ /dev/null @@ -1,118 +0,0 @@ -/** - * A mesh that has a {@link Skeleton} that can then be used to animate the - * vertices of the geometry with skinning/skeleton animation. - * - * Next to a valid skeleton, the skinned mesh requires skin indices and weights - * as buffer attributes in its geometry. These attribute define which bones affect a single - * vertex to a certain extend. - * - * Typically skinned meshes are not created manually but loaders like {@link GLTFLoader} - * or {@link FBXLoader } import respective models. - * - * @augments Mesh - * @demo scenes/bones-browser.html - */ -export class SkinnedMesh extends Mesh { - /** - * Constructs a new skinned mesh. - * - * @param {BufferGeometry} [geometry] - The mesh geometry. - * @param {Material|Array} [material] - The mesh material. - */ - constructor(geometry?: BufferGeometry, material?: Material | Array); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSkinnedMesh: boolean; - /** - * `AttachedBindMode` means the skinned mesh shares the same world space as the skeleton. - * This is not true when using `DetachedBindMode` which is useful when sharing a skeleton - * across multiple skinned meshes. - * - * @type {(AttachedBindMode|DetachedBindMode)} - * @default AttachedBindMode - */ - bindMode: (string | string); - /** - * The base matrix that is used for the bound bone transforms. - * - * @type {Matrix4} - */ - bindMatrix: Matrix4; - /** - * The base matrix that is used for resetting the bound bone transforms. - * - * @type {Matrix4} - */ - bindMatrixInverse: Matrix4; - /** - * The bounding box of the skinned mesh. Can be computed via {@link SkinnedMesh#computeBoundingBox}. - * - * @type {?Box3} - * @default null - */ - boundingBox: Box3 | null; - /** - * The bounding sphere of the skinned mesh. Can be computed via {@link SkinnedMesh#computeBoundingSphere}. - * - * @type {?Sphere} - * @default null - */ - boundingSphere: Sphere | null; - /** - * Computes the bounding box of the skinned mesh, and updates {@link SkinnedMesh#boundingBox}. - * The bounding box is not automatically computed by the engine; this method must be called by your app. - * If the skinned mesh is animated, the bounding box should be recomputed per frame in order to reflect - * the current animation state. - */ - computeBoundingBox(): void; - /** - * Computes the bounding sphere of the skinned mesh, and updates {@link SkinnedMesh#boundingSphere}. - * The bounding sphere is automatically computed by the engine once when it is needed, e.g., for ray casting - * and view frustum culling. If the skinned mesh is animated, the bounding sphere should be recomputed - * per frame in order to reflect the current animation state. - */ - computeBoundingSphere(): void; - copy(source: any, recursive: any): this; - skeleton: any; - raycast(raycaster: any, intersects: any): void; - getVertexPosition(index: any, target: any): any; - /** - * Binds the given skeleton to the skinned mesh. - * - * @param {Skeleton} skeleton - The skeleton to bind. - * @param {Matrix4} [bindMatrix] - The bind matrix. If no bind matrix is provided, - * the skinned mesh's world matrix will be used instead. - */ - bind(skeleton: Skeleton, bindMatrix?: Matrix4): void; - /** - * This method sets the skinned mesh in the rest pose). - */ - pose(): void; - /** - * Normalizes the skin weights which are defined as a buffer attribute - * in the skinned mesh's geometry. - */ - normalizeSkinWeights(): void; - updateMatrixWorld(force: any): void; - /** - * Applies the bone transform associated with the given index to the given - * vector. Can be used to transform positions or direction vectors by providing - * a Vector4 with 1 or 0 in the w component respectively. Returns the updated vector. - * - * @param {number} index - The vertex index. - * @param {Vector3|Vector4} target - The target object that is used to store the method's result. - * @return {Vector3|Vector4} The updated vertex attribute data. - */ - applyBoneTransform(index: number, target: Vector3 | Vector4): Vector3 | Vector4; -} -import { Mesh } from './Mesh.js'; -import { Matrix4 } from '../math/Matrix4.js'; -import { Box3 } from '../math/Box3.js'; -import { Sphere } from '../math/Sphere.js'; -import { Vector3 } from '../math/Vector3.js'; -import { Vector4 } from '../math/Vector4.js'; diff --git a/jsdoc-testing/jsdoc/src/objects/Sprite.d.ts b/jsdoc-testing/jsdoc/src/objects/Sprite.d.ts deleted file mode 100644 index adbf06c9b..000000000 --- a/jsdoc-testing/jsdoc/src/objects/Sprite.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -/** - * A sprite is a plane that always faces towards the camera, generally with a - * partially transparent texture applied. - * - * Sprites do not cast shadows, setting {@link Object3D#castShadow} to `true` will - * have no effect. - * - * ```js - * const map = new THREE.TextureLoader().load( 'sprite.png' ); - * const material = new THREE.SpriteMaterial( { map: map } ); - * - * const sprite = new THREE.Sprite( material ); - * scene.add( sprite ); - * ``` - * - * @augments Object3D - */ -export class Sprite extends Object3D { - /** - * Constructs a new sprite. - * - * @param {(SpriteMaterial|SpriteNodeMaterial)} [material] - The sprite material. - */ - constructor(material?: (SpriteMaterial | SpriteNodeMaterial)); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSprite: boolean; - type: string; - /** - * The sprite geometry. - * - * @type {BufferGeometry} - */ - geometry: BufferGeometry; - /** - * The sprite material. - * - * @type {(SpriteMaterial|SpriteNodeMaterial)} - */ - material: (SpriteMaterial | SpriteNodeMaterial); - /** - * The sprite's anchor point, and the point around which the sprite rotates. - * A value of `(0.5, 0.5)` corresponds to the midpoint of the sprite. A value - * of `(0, 0)` corresponds to the lower left corner of the sprite. - * - * @type {Vector2} - * @default (0.5,0.5) - */ - center: Vector2; - /** - * The number of instances of this sprite. - * Can only be used with {@link WebGPURenderer}. - * - * @type {number} - * @default 1 - */ - count: number; - /** - * Computes intersection points between a casted ray and this sprite. - * - * @param {Raycaster} raycaster - The raycaster. - * @param {Array} intersects - The target array that holds the intersection points. - */ - raycast(raycaster: Raycaster, intersects: Array): void; - copy(source: any, recursive: any): this; -} -import { Object3D } from '../core/Object3D.js'; -import { BufferGeometry } from '../core/BufferGeometry.js'; -import { SpriteMaterial } from '../materials/SpriteMaterial.js'; -import { Vector2 } from '../math/Vector2.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/WebGL3DRenderTarget.d.ts b/jsdoc-testing/jsdoc/src/renderers/WebGL3DRenderTarget.d.ts deleted file mode 100644 index e27e8a964..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/WebGL3DRenderTarget.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * A 3D render target used in context of {@link WebGLRenderer}. - * - * @augments WebGLRenderTarget - */ -export class WebGL3DRenderTarget extends WebGLRenderTarget { - /** - * Constructs a new 3D render target. - * - * @param {number} [width=1] - The width of the render target. - * @param {number} [height=1] - The height of the render target. - * @param {number} [depth=1] - The height of the render target. - * @param {RenderTarget~Options} [options] - The configuration object. - */ - constructor(width?: number, height?: number, depth?: number, options?: {}); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWebGL3DRenderTarget: boolean; -} -import { WebGLRenderTarget } from './WebGLRenderTarget.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/WebGLArrayRenderTarget.d.ts b/jsdoc-testing/jsdoc/src/renderers/WebGLArrayRenderTarget.d.ts deleted file mode 100644 index 22f9b0da1..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/WebGLArrayRenderTarget.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/** - * An array render target used in context of {@link WebGLRenderer}. - * - * @augments WebGLRenderTarget - */ -export class WebGLArrayRenderTarget extends WebGLRenderTarget { - /** - * Constructs a new array render target. - * - * @param {number} [width=1] - The width of the render target. - * @param {number} [height=1] - The height of the render target. - * @param {number} [depth=1] - The height of the render target. - * @param {RenderTarget~Options} [options] - The configuration object. - */ - constructor(width?: number, height?: number, depth?: number, options?: {}); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWebGLArrayRenderTarget: boolean; -} -import { WebGLRenderTarget } from './WebGLRenderTarget.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/WebGLCubeRenderTarget.d.ts b/jsdoc-testing/jsdoc/src/renderers/WebGLCubeRenderTarget.d.ts deleted file mode 100644 index c112d383d..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/WebGLCubeRenderTarget.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * A cube render target used in context of {@link WebGLRenderer}. - * - * @augments WebGLRenderTarget - */ -export class WebGLCubeRenderTarget extends WebGLRenderTarget { - /** - * Constructs a new cube render target. - * - * @param {number} [size=1] - The size of the render target. - * @param {RenderTarget~Options} [options] - The configuration object. - */ - constructor(size?: number, options?: {}); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWebGLCubeRenderTarget: boolean; - /** - * Converts the given equirectangular texture to a cube map. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {Texture} texture - The equirectangular texture. - * @return {WebGLCubeRenderTarget} A reference to this cube render target. - */ - fromEquirectangularTexture(renderer: WebGLRenderer, texture: Texture): WebGLCubeRenderTarget; - /** - * Clears this cube render target. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {boolean} [color=true] - Whether the color buffer should be cleared or not. - * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not. - * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not. - */ - clear(renderer: WebGLRenderer, color?: boolean, depth?: boolean, stencil?: boolean): void; -} -import { WebGLRenderTarget } from './WebGLRenderTarget.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/WebGLRenderTarget.d.ts b/jsdoc-testing/jsdoc/src/renderers/WebGLRenderTarget.d.ts deleted file mode 100644 index f20262ff0..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/WebGLRenderTarget.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * A render target used in context of {@link WebGLRenderer}. - * - * @augments RenderTarget - */ -export class WebGLRenderTarget extends RenderTarget { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWebGLRenderTarget: boolean; -} -import { RenderTarget } from '../core/RenderTarget.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/WebGLRenderer.d.ts b/jsdoc-testing/jsdoc/src/renderers/WebGLRenderer.d.ts deleted file mode 100644 index 7ed2e8df3..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/WebGLRenderer.d.ts +++ /dev/null @@ -1,580 +0,0 @@ -/** - * ~Options - */ -export type WebGLRenderer = { - /** - * - A canvas element where the renderer draws its output. If not passed in here, a new canvas element will be created by the renderer. - */ - canvas?: HTMLCanvasElement | OffscreenCanvas | undefined; - /** - * - Can be used to attach an existing rendering context to this renderer. - */ - context?: WebGL2RenderingContext | undefined; - /** - * - The default shader precision. Uses `highp` if supported by the device. - */ - precision?: "highp" | "mediump" | "lowp" | undefined; - /** - * - Controls the default clear alpha value. When set to`true`, the value is `0`. Otherwise it's `1`. - */ - alpha?: boolean | undefined; - /** - * Whether the renderer will assume colors have premultiplied alpha or not. - */ - premultipliedAlpha?: boolean | undefined; - /** - * Whether to use the default MSAA or not. - */ - antialias?: boolean | undefined; - /** - * Whether the drawing buffer has a stencil buffer of at least 8 bits or not. - */ - stencil?: boolean | undefined; - /** - * Whether to preserve the buffer until manually cleared or overwritten. - */ - preserveDrawingBuffer?: boolean | undefined; - /** - * Provides a hint to the user agent indicating what configuration of GPU is suitable for this WebGL context. - */ - powerPreference?: "default" | "high-performance" | "low-power" | undefined; - /** - * Whether the renderer creation will fail upon low performance is detected. - */ - failIfMajorPerformanceCaveat?: boolean | undefined; - /** - * Whether the drawing buffer has a depth buffer of at least 16 bits. - */ - depth?: boolean | undefined; - /** - * Whether to use a logarithmic depth buffer. It may be necessary to use this if dealing with huge differences in scale in a single scene. - * Note that this setting uses `gl_FragDepth` if available which disables the Early Fragment Test optimization and can cause a decrease in performance. - */ - logarithmicDepthBuffer?: boolean | undefined; - /** - * Whether to use a reverse depth buffer. Requires the `EXT_clip_control` extension. - * This is a more faster and accurate version than logarithmic depth buffer. - */ - reversedDepthBuffer?: boolean | undefined; - /** - * Defines the type of the output buffer. Use `HalfFloatType` for HDR rendering with tone mapping and post-processing support. - */ - outputBufferType?: number | undefined; -}; -/** - * This renderer uses WebGL 2 to display scenes. - * - * WebGL 1 is not supported since `r163`. - */ -export class WebGLRenderer { - /** - * Constructs a new WebGL renderer. - * - * @param {WebGLRenderer~Options} [parameters] - The configuration parameter. - */ - constructor(parameters?: {}); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWebGLRenderer: boolean; - /** - * A canvas where the renderer draws its output. This is automatically created by the renderer - * in the constructor (if not provided already); you just need to add it to your page like so: - * ```js - * document.body.appendChild( renderer.domElement ); - * ``` - * - * @type {HTMLCanvasElement|OffscreenCanvas} - */ - domElement: HTMLCanvasElement | OffscreenCanvas; - /** - * A object with debug configuration settings. - * - * - `checkShaderErrors`: If it is `true`, defines whether material shader programs are - * checked for errors during compilation and linkage process. It may be useful to disable - * this check in production for performance gain. It is strongly recommended to keep these - * checks enabled during development. If the shader does not compile and link, it will not - * work and associated material will not render. - * - `onShaderError(gl, program, glVertexShader,glFragmentShader)`: A callback function that - * can be used for custom error reporting. The callback receives the WebGL context, an instance - * of WebGLProgram as well two instances of WebGLShader representing the vertex and fragment shader. - * Assigning a custom function disables the default error reporting. - * - * @type {Object} - */ - debug: Object; - /** - * Whether the renderer should automatically clear its output before rendering a frame or not. - * - * @type {boolean} - * @default true - */ - autoClear: boolean; - /** - * If {@link WebGLRenderer#autoClear} set to `true`, whether the renderer should clear - * the color buffer or not. - * - * @type {boolean} - * @default true - */ - autoClearColor: boolean; - /** - * If {@link WebGLRenderer#autoClear} set to `true`, whether the renderer should clear - * the depth buffer or not. - * - * @type {boolean} - * @default true - */ - autoClearDepth: boolean; - /** - * If {@link WebGLRenderer#autoClear} set to `true`, whether the renderer should clear - * the stencil buffer or not. - * - * @type {boolean} - * @default true - */ - autoClearStencil: boolean; - /** - * Whether the renderer should sort objects or not. - * - * Note: Sorting is used to attempt to properly render objects that have some - * degree of transparency. By definition, sorting objects may not work in all - * cases. Depending on the needs of application, it may be necessary to turn - * off sorting and use other methods to deal with transparency rendering e.g. - * manually determining each object's rendering order. - * - * @type {boolean} - * @default true - */ - sortObjects: boolean; - /** - * User-defined clipping planes specified in world space. These planes apply globally. - * Points in space whose dot product with the plane is negative are cut away. - * - * @type {Array} - */ - clippingPlanes: Array; - /** - * Whether the renderer respects object-level clipping planes or not. - * - * @type {boolean} - * @default false - */ - localClippingEnabled: boolean; - /** - * The tone mapping technique of the renderer. - * - * @type {(NoToneMapping|LinearToneMapping|ReinhardToneMapping|CineonToneMapping|ACESFilmicToneMapping|CustomToneMapping|AgXToneMapping|NeutralToneMapping)} - * @default NoToneMapping - */ - toneMapping: (number | LinearToneMapping | ReinhardToneMapping | CineonToneMapping | ACESFilmicToneMapping | CustomToneMapping | AgXToneMapping | NeutralToneMapping); - /** - * Exposure level of tone mapping. - * - * @type {number} - * @default 1 - */ - toneMappingExposure: number; - /** - * The normalized resolution scale for the transmission render target, measured in percentage - * of viewport dimensions. Lowering this value can result in significant performance improvements - * when using {@link MeshPhysicalMaterial#transmission}. - * - * @type {number} - * @default 1 - */ - transmissionResolutionScale: number; - _outputColorSpace: string; - /** - * A reference to the XR manager. - * - * @type {WebXRManager} - */ - xr: WebXRManager; - /** - * Returns the rendering context. - * - * @return {WebGL2RenderingContext} The rendering context. - */ - getContext: () => WebGL2RenderingContext; - /** - * Returns the rendering context attributes. - * - * @return {WebGLContextAttributes} The rendering context attributes. - */ - getContextAttributes: () => WebGLContextAttributes; - /** - * Simulates a loss of the WebGL context. This requires support for the `WEBGL_lose_context` extension. - */ - forceContextLoss: () => void; - /** - * Simulates a restore of the WebGL context. This requires support for the `WEBGL_lose_context` extension. - */ - forceContextRestore: () => void; - /** - * Returns the pixel ratio. - * - * @return {number} The pixel ratio. - */ - getPixelRatio: () => number; - /** - * Sets the given pixel ratio and resizes the canvas if necessary. - * - * @param {number} value - The pixel ratio. - */ - setPixelRatio: (value: number) => void; - /** - * Returns the renderer's size in logical pixels. This method does not honor the pixel ratio. - * - * @param {Vector2} target - The method writes the result in this target object. - * @return {Vector2} The renderer's size in logical pixels. - */ - getSize: (target: Vector2) => Vector2; - /** - * Resizes the output canvas to (width, height) with device pixel ratio taken - * into account, and also sets the viewport to fit that size, starting in (0, - * 0). Setting `updateStyle` to false prevents any style changes to the output canvas. - * - * @param {number} width - The width in logical pixels. - * @param {number} height - The height in logical pixels. - * @param {boolean} [updateStyle=true] - Whether to update the `style` attribute of the canvas or not. - */ - setSize: (width: number, height: number, updateStyle?: boolean) => void; - /** - * Returns the drawing buffer size in physical pixels. This method honors the pixel ratio. - * - * @param {Vector2} target - The method writes the result in this target object. - * @return {Vector2} The drawing buffer size. - */ - getDrawingBufferSize: (target: Vector2) => Vector2; - /** - * This method allows to define the drawing buffer size by specifying - * width, height and pixel ratio all at once. The size of the drawing - * buffer is computed with this formula: - * ```js - * size.x = width * pixelRatio; - * size.y = height * pixelRatio; - * ``` - * - * @param {number} width - The width in logical pixels. - * @param {number} height - The height in logical pixels. - * @param {number} pixelRatio - The pixel ratio. - */ - setDrawingBufferSize: (width: number, height: number, pixelRatio: number) => void; - /** - * Sets the post-processing effects to be applied after rendering. - * - * @param {Array} effects - An array of post-processing effects. - */ - setEffects: (effects: any[]) => void; - /** - * Returns the current viewport definition. - * - * @param {Vector2} target - The method writes the result in this target object. - * @return {Vector2} The current viewport definition. - */ - getCurrentViewport: (target: Vector2) => Vector2; - /** - * Returns the viewport definition. - * - * @param {Vector4} target - The method writes the result in this target object. - * @return {Vector4} The viewport definition. - */ - getViewport: (target: Vector4) => Vector4; - /** - * Sets the viewport to render from `(x, y)` to `(x + width, y + height)`. - * - * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the viewport origin in logical pixel unit. - * Or alternatively a four-component vector specifying all the parameters of the viewport. - * @param {number} y - The vertical coordinate for the lower left corner of the viewport origin in logical pixel unit. - * @param {number} width - The width of the viewport in logical pixel unit. - * @param {number} height - The height of the viewport in logical pixel unit. - */ - setViewport: (x: number | Vector4, y: number, width: number, height: number) => void; - /** - * Returns the scissor region. - * - * @param {Vector4} target - The method writes the result in this target object. - * @return {Vector4} The scissor region. - */ - getScissor: (target: Vector4) => Vector4; - /** - * Sets the scissor region to render from `(x, y)` to `(x + width, y + height)`. - * - * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the scissor region origin in logical pixel unit. - * Or alternatively a four-component vector specifying all the parameters of the scissor region. - * @param {number} y - The vertical coordinate for the lower left corner of the scissor region origin in logical pixel unit. - * @param {number} width - The width of the scissor region in logical pixel unit. - * @param {number} height - The height of the scissor region in logical pixel unit. - */ - setScissor: (x: number | Vector4, y: number, width: number, height: number) => void; - /** - * Returns `true` if the scissor test is enabled. - * - * @return {boolean} Whether the scissor test is enabled or not. - */ - getScissorTest: () => boolean; - /** - * Enable or disable the scissor test. When this is enabled, only the pixels - * within the defined scissor area will be affected by further renderer - * actions. - * - * @param {boolean} boolean - Whether the scissor test is enabled or not. - */ - setScissorTest: (boolean: boolean) => void; - /** - * Sets a custom opaque sort function for the render lists. Pass `null` - * to use the default `painterSortStable` function. - * - * @param {?Function} method - The opaque sort function. - */ - setOpaqueSort: (method: Function | null) => void; - /** - * Sets a custom transparent sort function for the render lists. Pass `null` - * to use the default `reversePainterSortStable` function. - * - * @param {?Function} method - The opaque sort function. - */ - setTransparentSort: (method: Function | null) => void; - /** - * Returns the clear color. - * - * @param {Color} target - The method writes the result in this target object. - * @return {Color} The clear color. - */ - getClearColor: (target: Color) => Color; - /** - * Sets the clear color and alpha. - * - * @param {Color} color - The clear color. - * @param {number} [alpha=1] - The clear alpha. - */ - setClearColor: (...args: any[]) => void; - /** - * Returns the clear alpha. Ranges within `[0,1]`. - * - * @return {number} The clear alpha. - */ - getClearAlpha: () => number; - /** - * Sets the clear alpha. - * - * @param {number} alpha - The clear alpha. - */ - setClearAlpha: (...args: any[]) => void; - /** - * Tells the renderer to clear its color, depth or stencil drawing buffer(s). - * This method initializes the buffers to the current clear color values. - * - * @param {boolean} [color=true] - Whether the color buffer should be cleared or not. - * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not. - * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not. - */ - clear: (color?: boolean, depth?: boolean, stencil?: boolean) => void; - /** - * Clears the color buffer. Equivalent to calling `renderer.clear( true, false, false )`. - */ - clearColor: () => void; - /** - * Clears the depth buffer. Equivalent to calling `renderer.clear( false, true, false )`. - */ - clearDepth: () => void; - /** - * Clears the stencil buffer. Equivalent to calling `renderer.clear( false, false, true )`. - */ - clearStencil: () => void; - /** - * Sets a compatibility node builder for rendering node materials with WebGLRenderer. - * This enables using TSL (Three.js Shading Language) node materials to prepare - * for migration to WebGPURenderer. - * - * @param {WebGLNodesHandler} nodesHandler - The node builder instance. - */ - setNodesHandler: (nodesHandler: WebGLNodesHandler) => void; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - */ - dispose: () => void; - renderBufferDirect: (camera: any, scene: any, geometry: any, material: any, object: any, group: any) => void; - /** - * Compiles all materials in the scene with the camera. This is useful to precompile shaders - * before the first rendering. If you want to add a 3D object to an existing scene, use the third - * optional parameter for applying the target scene. - * - * Note that the (target) scene's lighting and environment must be configured before calling this method. - * - * @param {Object3D} scene - The scene or another type of 3D object to precompile. - * @param {Camera} camera - The camera. - * @param {?Scene} [targetScene=null] - The target scene. - * @return {Set} The precompiled materials. - */ - compile: (scene: Object3D, camera: Camera, targetScene?: Scene | null) => Set; - /** - * Asynchronous version of {@link WebGLRenderer#compile}. - * - * This method makes use of the `KHR_parallel_shader_compile` WebGL extension. Hence, - * it is recommended to use this version of `compile()` whenever possible. - * - * @async - * @param {Object3D} scene - The scene or another type of 3D object to precompile. - * @param {Camera} camera - The camera. - * @param {?Scene} [targetScene=null] - The target scene. - * @return {Promise} A Promise that resolves when the given scene can be rendered without unnecessary stalling due to shader compilation. - */ - compileAsync: (scene: Object3D, camera: Camera, targetScene?: Scene | null) => Promise; - /** - * Applications are advised to always define the animation loop - * with this method and not manually with `requestAnimationFrame()` - * for best compatibility. - * - * @param {?onAnimationCallback} callback - The application's animation loop. - */ - setAnimationLoop: (callback: onAnimationCallback | null) => void; - /** - * Renders the given scene (or other type of 3D object) using the given camera. - * - * The render is done to a previously specified render target set by calling {@link WebGLRenderer#setRenderTarget} - * or to the canvas as usual. - * - * By default render buffers are cleared before rendering but you can prevent - * this by setting the property `autoClear` to `false`. If you want to prevent - * only certain buffers being cleared you can `autoClearColor`, `autoClearDepth` - * or `autoClearStencil` to `false`. To force a clear, use {@link WebGLRenderer#clear}. - * - * @param {Object3D} scene - The scene to render. - * @param {Camera} camera - The camera. - */ - render: (scene: Object3D, camera: Camera) => void; - /** - * Returns the active cube face. - * - * @return {number} The active cube face. - */ - getActiveCubeFace: () => number; - /** - * Returns the active mipmap level. - * - * @return {number} The active mipmap level. - */ - getActiveMipmapLevel: () => number; - /** - * Returns the active render target. - * - * @return {?WebGLRenderTarget} The active render target. Returns `null` if no render target - * is currently set. - */ - getRenderTarget: () => WebGLRenderTarget | null; - setRenderTargetTextures: (renderTarget: any, colorTexture: any, depthTexture: any) => void; - setRenderTargetFramebuffer: (renderTarget: any, defaultFramebuffer: any) => void; - /** - * Sets the active rendertarget. - * - * @param {?WebGLRenderTarget} renderTarget - The render target to set. When `null` is given, - * the canvas is set as the active render target instead. - * @param {number} [activeCubeFace=0] - The active cube face when using a cube render target. - * Indicates the z layer to render in to when using 3D or array render targets. - * @param {number} [activeMipmapLevel=0] - The active mipmap level. - */ - setRenderTarget: (renderTarget: WebGLRenderTarget | null, activeCubeFace?: number, activeMipmapLevel?: number) => void; - /** - * Reads the pixel data from the given render target into the given buffer. - * - * @param {WebGLRenderTarget} renderTarget - The render target to read from. - * @param {number} x - The `x` coordinate of the copy region's origin. - * @param {number} y - The `y` coordinate of the copy region's origin. - * @param {number} width - The width of the copy region. - * @param {number} height - The height of the copy region. - * @param {TypedArray} buffer - The result buffer. - * @param {number} [activeCubeFaceIndex] - The active cube face index. - * @param {number} [textureIndex=0] - The texture index of an MRT render target. - */ - readRenderTargetPixels: (renderTarget: WebGLRenderTarget, x: number, y: number, width: number, height: number, buffer: TypedArray, activeCubeFaceIndex?: number, textureIndex?: number) => void; - /** - * Asynchronous, non-blocking version of {@link WebGLRenderer#readRenderTargetPixels}. - * - * It is recommended to use this version of `readRenderTargetPixels()` whenever possible. - * - * @async - * @param {WebGLRenderTarget} renderTarget - The render target to read from. - * @param {number} x - The `x` coordinate of the copy region's origin. - * @param {number} y - The `y` coordinate of the copy region's origin. - * @param {number} width - The width of the copy region. - * @param {number} height - The height of the copy region. - * @param {TypedArray} buffer - The result buffer. - * @param {number} [activeCubeFaceIndex] - The active cube face index. - * @param {number} [textureIndex=0] - The texture index of an MRT render target. - * @return {Promise} A Promise that resolves when the read has been finished. The resolve provides the read data as a typed array. - */ - readRenderTargetPixelsAsync: (renderTarget: WebGLRenderTarget, x: number, y: number, width: number, height: number, buffer: TypedArray, activeCubeFaceIndex?: number, textureIndex?: number) => Promise; - /** - * Copies pixels from the current bound framebuffer into the given texture. - * - * @param {FramebufferTexture} texture - The texture. - * @param {?Vector2} [position=null] - The start position of the copy operation. - * @param {number} [level=0] - The mip level. The default represents the base mip. - */ - copyFramebufferToTexture: (texture: FramebufferTexture, position?: Vector2 | null, level?: number) => void; - /** - * Copies data of the given source texture into a destination texture. - * - * When using render target textures as `srcTexture` and `dstTexture`, you must make sure both render targets are initialized - * {@link WebGLRenderer#initRenderTarget}. - * - * @param {Texture} srcTexture - The source texture. - * @param {Texture} dstTexture - The destination texture. - * @param {?(Box2|Box3)} [srcRegion=null] - A bounding box which describes the source region. Can be two or three-dimensional. - * @param {?(Vector2|Vector3)} [dstPosition=null] - A vector that represents the origin of the destination region. Can be two or three-dimensional. - * @param {number} [srcLevel=0] - The source mipmap level to copy. - * @param {?number} [dstLevel=0] - The destination mipmap level. - */ - copyTextureToTexture: (srcTexture: Texture, dstTexture: Texture, srcRegion?: (Box2 | Box3) | null, dstPosition?: (Vector2 | Vector3) | null, srcLevel?: number, dstLevel?: number | null) => void; - /** - * Initializes the given WebGLRenderTarget memory. Useful for initializing a render target so data - * can be copied into it using {@link WebGLRenderer#copyTextureToTexture} before it has been - * rendered to. - * - * @param {WebGLRenderTarget} target - The render target. - */ - initRenderTarget: (target: WebGLRenderTarget) => void; - /** - * Initializes the given texture. Useful for preloading a texture rather than waiting until first - * render (which can cause noticeable lags due to decode and GPU upload overhead). - * - * @param {Texture} texture - The texture. - */ - initTexture: (texture: Texture) => void; - /** - * Can be used to reset the internal WebGL state. This method is mostly - * relevant for applications which share a single WebGL context across - * multiple WebGL libraries. - */ - resetState: () => void; - /** - * Defines the coordinate system of the renderer. - * - * In `WebGLRenderer`, the value is always `WebGLCoordinateSystem`. - * - * @type {WebGLCoordinateSystem|WebGPUCoordinateSystem} - * @default WebGLCoordinateSystem - * @readonly - */ - readonly get coordinateSystem(): number | WebGPUCoordinateSystem; - set outputColorSpace(colorSpace: string | LinearSRGBColorSpace); - /** - * Defines the output color space of the renderer. - * - * @type {SRGBColorSpace|LinearSRGBColorSpace} - * @default SRGBColorSpace - */ - get outputColorSpace(): string | LinearSRGBColorSpace; -} -import { WebXRManager } from './webxr/WebXRManager.js'; -import { Vector4 } from '../math/Vector4.js'; -import { Color } from '../math/Color.js'; -import { WebGLRenderTarget } from './WebGLRenderTarget.js'; -import { Vector3 } from '../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Animation.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Animation.d.ts deleted file mode 100644 index 276e5a64c..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/Animation.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -export default Animation; -/** - * This module manages the internal animation loop of the renderer. - * - * @private - */ -declare class Animation { - /** - * Constructs a new animation loop management component. - * - * @param {Renderer} renderer - A reference to the main renderer. - * @param {NodeManager} nodes - Renderer component for managing nodes related logic. - * @param {Info} info - Renderer component for managing metrics and monitoring data. - */ - constructor(renderer: Renderer, nodes: NodeManager, info: Info); - /** - * A reference to the main renderer. - * - * @type {Renderer} - */ - renderer: Renderer; - /** - * Renderer component for managing nodes related logic. - * - * @type {NodeManager} - */ - nodes: NodeManager; - /** - * Renderer component for managing metrics and monitoring data. - * - * @type {Info} - */ - info: Info; - /** - * A reference to the context from `requestAnimationFrame()` can - * be called (usually `window`). - * - * @type {?(Window|XRSession)} - */ - _context: (Window | XRSession) | null; - /** - * The user-defined animation loop. - * - * @type {?Function} - * @default null - */ - _animationLoop: Function | null; - /** - * The requestId which is returned from the `requestAnimationFrame()` call. - * Can be used to cancel the stop the animation loop. - * - * @type {?number} - * @default null - */ - _requestId: number | null; - /** - * Starts the internal animation loop. - */ - start(): void; - /** - * Stops the internal animation loop. - */ - stop(): void; - /** - * Returns the user-level animation loop. - * - * @return {?Function} The animation loop. - */ - getAnimationLoop(): Function | null; - /** - * Defines the user-level animation loop. - * - * @param {?Function} callback - The animation loop. - */ - setAnimationLoop(callback: Function | null): void; - /** - * Returns the animation context. - * - * @return {Window|XRSession} The animation context. - */ - getContext(): Window | XRSession; - /** - * Defines the context in which `requestAnimationFrame()` is executed. - * - * @param {Window|XRSession} context - The context to set. - */ - setContext(context: Window | XRSession): void; - /** - * Frees all internal resources and stops the animation loop. - */ - dispose(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Attributes.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Attributes.d.ts deleted file mode 100644 index 40b80e84c..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/Attributes.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -export default Attributes; -/** - * This renderer module manages geometry attributes. - * - * @private - * @augments DataMap - */ -declare class Attributes extends DataMap { - /** - * Constructs a new attribute management component. - * - * @param {Backend} backend - The renderer's backend. - * @param {Info} info - Renderer component for managing metrics and monitoring data. - */ - constructor(backend: Backend, info: Info); - /** - * The renderer's backend. - * - * @type {Backend} - */ - backend: Backend; - /** - * Renderer component for managing metrics and monitoring data. - * - * @type {Info} - */ - info: Info; - /** - * Deletes the data for the given attribute. - * - * @param {BufferAttribute} attribute - The attribute. - * @return {?Object} The deleted attribute data. - */ - delete(attribute: BufferAttribute): Object | null; - /** - * Updates the given attribute. This method creates attribute buffers - * for new attributes and updates data for existing ones. - * - * @param {BufferAttribute} attribute - The attribute to update. - * @param {number} type - The attribute type. - */ - update(attribute: BufferAttribute, type: number): void; - /** - * Utility method for handling interleaved buffer attributes correctly. - * To process them, their `InterleavedBuffer` is returned. - * - * @param {BufferAttribute} attribute - The attribute. - * @return {BufferAttribute|InterleavedBuffer} - */ - _getBufferAttribute(attribute: BufferAttribute): BufferAttribute | InterleavedBuffer; -} -import DataMap from './DataMap.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Backend.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Backend.d.ts deleted file mode 100644 index fa76217f3..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/Backend.d.ts +++ /dev/null @@ -1,554 +0,0 @@ -export default Backend; -/** - * Most of the rendering related logic is implemented in the - * {@link Renderer} module and related management components. - * Sometimes it is required though to execute commands which are - * specific to the current 3D backend (which is WebGPU or WebGL 2). - * This abstract base class defines an interface that encapsulates - * all backend-related logic. Derived classes for each backend must - * implement the interface. - * - * @abstract - * @private - */ -declare class Backend { - /** - * Constructs a new backend. - * - * @param {Object} parameters - An object holding parameters for the backend. - */ - constructor(parameters?: Object); - /** - * The parameters of the backend. - * - * @type {Object} - */ - parameters: Object; - /** - * This weak map holds backend-specific data of objects - * like textures, attributes or render targets. - * - * @type {WeakMap} - */ - data: WeakMap; - /** - * A reference to the renderer. - * - * @type {?Renderer} - * @default null - */ - renderer: Renderer | null; - /** - * A reference to the canvas element the renderer is drawing to. - * - * @type {?(HTMLCanvasElement|OffscreenCanvas)} - * @default null - */ - domElement: (HTMLCanvasElement | OffscreenCanvas) | null; - /** - * A reference to the timestamp query pool. - * - * @type {{render: ?TimestampQueryPool, compute: ?TimestampQueryPool}} - */ - timestampQueryPool: { - render: TimestampQueryPool | null; - compute: TimestampQueryPool | null; - }; - /** - * Whether to track timestamps with a Timestamp Query API or not. - * - * @type {boolean} - * @default false - */ - trackTimestamp: boolean; - /** - * Initializes the backend so it is ready for usage. Concrete backends - * are supposed to implement their rendering context creation and related - * operations in this method. - * - * @async - * @param {Renderer} renderer - The renderer. - * @return {Promise} A Promise that resolves when the backend has been initialized. - */ - init(renderer: Renderer): Promise; - /** - * The coordinate system of the backend. - * - * @abstract - * @type {number} - * @readonly - */ - readonly get coordinateSystem(): number; - /** - * This method is executed at the beginning of a render call and - * can be used by the backend to prepare the state for upcoming - * draw calls. - * - * @abstract - * @param {RenderContext} renderContext - The render context. - */ - beginRender(): void; - /** - * This method is executed at the end of a render call and - * can be used by the backend to finalize work after draw - * calls. - * - * @abstract - * @param {RenderContext} renderContext - The render context. - */ - finishRender(): void; - /** - * Sets the XR rendering destination. - * - * Backends that render directly into XR framebuffers can override this hook. - * - * @param {?Object} xrTarget - The XR rendering destination. - */ - setXRTarget(): void; - /** - * This method is executed at the beginning of a compute call and - * can be used by the backend to prepare the state for upcoming - * compute tasks. - * - * @abstract - * @param {Node|Array} computeGroup - The compute node(s). - */ - beginCompute(): void; - /** - * This method is executed at the end of a compute call and - * can be used by the backend to finalize work after compute - * tasks. - * - * @abstract - * @param {Node|Array} computeGroup - The compute node(s). - */ - finishCompute(): void; - /** - * Executes a draw command for the given render object. - * - * @abstract - * @param {RenderObject} renderObject - The render object to draw. - * @param {Info} info - Holds a series of statistical information about the GPU memory and the rendering process. - */ - draw(): void; - /** - * Executes a compute command for the given compute node. - * - * @abstract - * @param {Node|Array} computeGroup - The group of compute nodes of a compute call. Can be a single compute node. - * @param {Node} computeNode - The compute node. - * @param {Array} bindings - The bindings. - * @param {ComputePipeline} computePipeline - The compute pipeline. - */ - compute(): void; - /** - * Creates a shader program from the given programmable stage. - * - * @abstract - * @param {ProgrammableStage} program - The programmable stage. - */ - createProgram(): void; - /** - * Destroys the shader program of the given programmable stage. - * - * @abstract - * @param {ProgrammableStage} program - The programmable stage. - */ - destroyProgram(): void; - /** - * Creates bindings from the given bind group definition. - * - * @abstract - * @param {BindGroup} bindGroup - The bind group. - * @param {Array} bindings - Array of bind groups. - * @param {number} cacheIndex - The cache index. - * @param {number} version - The version. - */ - createBindings(): void; - /** - * Updates the given bind group definition. - * - * @abstract - * @param {BindGroup} bindGroup - The bind group. - * @param {Array} bindings - Array of bind groups. - * @param {number} cacheIndex - The cache index. - * @param {number} version - The version. - */ - updateBindings(): void; - /** - * Updates a buffer binding. - * - * @abstract - * @param {Buffer} binding - The buffer binding to update. - */ - updateBinding(): void; - /** - * Creates a render pipeline for the given render object. - * - * @abstract - * @param {RenderObject} renderObject - The render object. - * @param {Array} promises - An array of compilation promises which are used in `compileAsync()`. - */ - createRenderPipeline(): void; - /** - * Creates a compute pipeline for the given compute node. - * - * @abstract - * @param {ComputePipeline} computePipeline - The compute pipeline. - * @param {Array} bindings - The bindings. - */ - createComputePipeline(): void; - /** - * Returns `true` if the render pipeline requires an update. - * - * @abstract - * @param {RenderObject} renderObject - The render object. - * @return {boolean} Whether the render pipeline requires an update or not. - */ - needsRenderUpdate(): boolean; - /** - * Returns a cache key that is used to identify render pipelines. - * - * @abstract - * @param {RenderObject} renderObject - The render object. - * @return {string} The cache key. - */ - getRenderCacheKey(): string; - /** - * Returns a node builder for the given render object. - * - * @abstract - * @param {RenderObject} renderObject - The render object. - * @param {Renderer} renderer - The renderer. - * @return {NodeBuilder} The node builder. - */ - createNodeBuilder(): NodeBuilder; - /** - * Updates a GPU sampler for the given texture. - * - * @abstract - * @param {Texture} texture - The texture to update the sampler for. - * @param {TextureNode} textureNode - The texture node to update the sampler with. - * @return {string} The current sampler key. - */ - updateSampler(): string; - /** - * Creates a default texture for the given texture that can be used - * as a placeholder until the actual texture is ready for usage. - * - * @abstract - * @param {Texture} texture - The texture to create a default texture for. - */ - createDefaultTexture(): void; - /** - * Defines a texture on the GPU for the given texture object. - * - * @abstract - * @param {Texture} texture - The texture. - * @param {Object} [options={}] - Optional configuration parameter. - */ - createTexture(): void; - /** - * Uploads the updated texture data to the GPU. - * - * @abstract - * @param {Texture} texture - The texture. - * @param {Object} [options={}] - Optional configuration parameter. - */ - updateTexture(): void; - /** - * Generates mipmaps for the given texture. - * - * @abstract - * @param {Texture} texture - The texture. - */ - generateMipmaps(): void; - /** - * Destroys the GPU data for the given texture object. - * - * @abstract - * @param {Texture} texture - The texture. - * @param {boolean} [isDefaultTexture=false] - Whether the texture uses a default GPU texture or not. - */ - destroyTexture(): void; - /** - * Returns texture data as a typed array. - * - * @abstract - * @async - * @param {Texture} texture - The texture to copy. - * @param {number} x - The x coordinate of the copy origin. - * @param {number} y - The y coordinate of the copy origin. - * @param {number} width - The width of the copy. - * @param {number} height - The height of the copy. - * @param {number} faceIndex - The face index. - * @return {Promise} A Promise that resolves with a typed array when the copy operation has finished. - */ - copyTextureToBuffer(): Promise; - /** - * Copies data of the given source texture to the given destination texture. - * - * @abstract - * @param {Texture} srcTexture - The source texture. - * @param {Texture} dstTexture - The destination texture. - * @param {?(Box3|Box2)} [srcRegion=null] - The region of the source texture to copy. - * @param {?(Vector2|Vector3)} [dstPosition=null] - The destination position of the copy. - * @param {number} [srcLevel=0] - The source mip level to copy from. - * @param {number} [dstLevel=0] - The destination mip level to copy to. - */ - copyTextureToTexture(): void; - /** - * Copies the current bound framebuffer to the given texture. - * - * @abstract - * @param {Texture} texture - The destination texture. - * @param {RenderContext} renderContext - The render context. - * @param {Vector4} rectangle - A four dimensional vector defining the origin and dimension of the copy. - */ - copyFramebufferToTexture(): void; - /** - * Creates the GPU buffer of a shader attribute. - * - * @abstract - * @param {BufferAttribute} attribute - The buffer attribute. - */ - createAttribute(): void; - /** - * Creates the GPU buffer of an indexed shader attribute. - * - * @abstract - * @param {BufferAttribute} attribute - The indexed buffer attribute. - */ - createIndexAttribute(): void; - /** - * Creates the GPU buffer of a storage attribute. - * - * @abstract - * @param {BufferAttribute} attribute - The buffer attribute. - */ - createStorageAttribute(): void; - /** - * Creates a uniform buffer. - * - * @abstract - * @param {Buffer} uniformBuffer - The uniform buffer. - */ - createUniformBuffer(): void; - /** - * Destroys a uniform buffer. - * - * @abstract - * @param {Buffer} uniformBuffer - The uniform buffer. - */ - destroyUniformBuffer(): void; - /** - * Updates the GPU buffer of a shader attribute. - * - * @abstract - * @param {BufferAttribute} attribute - The buffer attribute to update. - */ - updateAttribute(): void; - /** - * Destroys the GPU buffer of a shader attribute. - * - * @abstract - * @param {BufferAttribute} attribute - The buffer attribute to destroy. - */ - destroyAttribute(): void; - /** - * Returns the backend's rendering context. - * - * @abstract - * @return {Object} The rendering context. - */ - getContext(): Object; - /** - * Backends can use this method if they have to run - * logic when the renderer gets resized. - * - * @abstract - */ - updateSize(): void; - /** - * Updates the viewport with the values from the given render context. - * - * @abstract - * @param {RenderContext} renderContext - The render context. - */ - updateViewport(): void; - /** - * Updates a unique identifier for the given render context that can be used - * to allocate resources like occlusion queries or timestamp queries. - * - * @param {RenderContext|ComputeNode} abstractRenderContext - The render context. - */ - updateTimeStampUID(abstractRenderContext: RenderContext | ComputeNode): void; - /** - * Returns a unique identifier for the given render context that can be used - * to allocate resources like occlusion queries or timestamp queries. - * - * @param {RenderContext|ComputeNode} abstractRenderContext - The render context. - * @return {string} The unique identifier. - */ - getTimestampUID(abstractRenderContext: RenderContext | ComputeNode): string; - /** - * Returns all timestamp frames for the given type. - * - * @param {string} type - The type of the time stamp. - * @return {Array} The timestamp frames. - */ - getTimestampFrames(type: string): Array; - /** - * Returns the query pool for the given uid. - * - * @param {string} uid - The unique identifier. - * @return {TimestampQueryPool} The query pool. - */ - _getQueryPool(uid: string): TimestampQueryPool; - /** - * Returns the timestamp for the given uid. - * - * @param {string} uid - The unique identifier. - * @return {number} The timestamp. - */ - getTimestamp(uid: string): number; - /** - * Returns `true` if a timestamp for the given uid is available. - * - * @param {string} uid - The unique identifier. - * @return {boolean} Whether the timestamp is available or not. - */ - hasTimestamp(uid: string): boolean; - /** - * Returns `true` if the given 3D object is fully occluded by other - * 3D objects in the scene. Backends must implement this method by using - * a Occlusion Query API. - * - * @abstract - * @param {RenderContext} renderContext - The render context. - * @param {Object3D} object - The 3D object to test. - * @return {boolean} Whether the 3D object is fully occluded or not. - */ - isOccluded(): boolean; - /** - * Resolves the time stamp for the given render context and type. - * - * @async - * @abstract - * @param {string} [type='render'] - The type of the time stamp. - * @return {Promise} A Promise that resolves with the time stamp. - */ - resolveTimestampsAsync(type?: string): Promise; - /** - * This method performs a readback operation by moving buffer data from - * a storage buffer attribute from the GPU to the CPU. - * - * @async - * @param {StorageBufferAttribute} attribute - The storage buffer attribute. - * @return {Promise} A promise that resolves with the buffer data when the data are ready. - */ - getArrayBufferAsync(): Promise; - /** - * Checks if the given feature is supported by the backend. - * - * @async - * @abstract - * @param {string} name - The feature's name. - * @return {Promise} A Promise that resolves with a bool that indicates whether the feature is supported or not. - */ - hasFeatureAsync(): Promise; - /** - * Checks if the given feature is supported by the backend. - * - * @abstract - * @param {string} name - The feature's name. - * @return {boolean} Whether the feature is supported or not. - */ - hasFeature(): boolean; - /** - * Returns the drawing buffer size. - * - * @return {Vector2} The drawing buffer size. - */ - getDrawingBufferSize(): Vector2; - /** - * Defines the scissor test. - * - * @abstract - * @param {boolean} boolean - Whether the scissor test should be enabled or not. - */ - setScissorTest(): void; - /** - * Returns the clear color and alpha into a single - * color object. - * - * @return {Color4} The clear color. - */ - getClearColor(): Color4; - /** - * Returns the DOM element. If no DOM element exists, the backend - * creates a new one. - * - * @return {HTMLCanvasElement} The DOM element. - */ - getDomElement(): HTMLCanvasElement; - /** - * Checks if the backend has the given compatibility. - * - * @abstract - * @param {string} name - The compatibility. - * @return {boolean} Whether the backend has the given compatibility or not. - */ - hasCompatibility(): boolean; - /** - * Initializes the render target defined in the given render context. - * - * @abstract - * @param {RenderContext} renderContext - The render context. - */ - initRenderTarget(): void; - /** - * Sets a dictionary for the given object into the - * internal data structure. - * - * @param {Object} object - The object. - * @param {Object} value - The dictionary to set. - */ - set(object: Object, value: Object): void; - /** - * Returns the dictionary for the given object. - * - * @param {Object} object - The object. - * @return {Object} The object's dictionary. - */ - get(object: Object): Object; - /** - * Checks if the given object has a dictionary - * with data defined. - * - * @param {Object} object - The object. - * @return {boolean} Whether a dictionary for the given object as been defined or not. - */ - has(object: Object): boolean; - /** - * Deletes an object from the internal data structure. - * - * @param {Object} object - The object to delete. - */ - delete(object: Object): void; - /** - * Delete GPU data associated with a bind group. - * - * @abstract - * @param {BindGroup} bindGroup - The bind group. - */ - deleteBindGroupData(): void; - /** - * Frees internal resources. - * - * @abstract - */ - dispose(): void; -} -import { Vector2 } from '../../math/Vector2.js'; -import Color4 from './Color4.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Background.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Background.d.ts deleted file mode 100644 index f8262c348..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/Background.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -export default Background; -/** - * This renderer module manages the background. - * - * @private - * @augments DataMap - */ -declare class Background extends DataMap { - /** - * Constructs a new background management component. - * - * @param {Renderer} renderer - The renderer. - * @param {NodeManager} nodes - Renderer component for managing nodes related logic. - */ - constructor(renderer: Renderer, nodes: NodeManager); - /** - * The renderer. - * - * @type {Renderer} - */ - renderer: Renderer; - /** - * Renderer component for managing nodes related logic. - * - * @type {NodeManager} - */ - nodes: NodeManager; - /** - * Updates the background for the given scene. Depending on how `Scene.background` - * or `Scene.backgroundNode` are configured, this method might configure a simple clear - * or add a mesh to the render list for rendering the background as a textured plane - * or skybox. - * - * @param {Scene} scene - The scene. - * @param {RenderList} renderList - The current render list. - * @param {RenderContext} renderContext - The current render context. - */ - update(scene: Scene, renderList: RenderList, renderContext: RenderContext): void; -} -import DataMap from './DataMap.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/BindGroup.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/BindGroup.d.ts deleted file mode 100644 index b31f45e55..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/BindGroup.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -export default BindGroup; -/** - * A bind group represents a collection of bindings and thus a collection - * or resources. Bind groups are assigned to pipelines to provide them - * with the required resources (like uniform buffers or textures). - * - * @private - */ -declare class BindGroup { - /** - * Constructs a new bind group. - * - * @param {string} name - The bind group's name. - * @param {Array} bindings - An array of bindings. - * @param {number} index - The group index. - */ - constructor(name?: string, bindings?: Array); - /** - * The bind group's name. - * - * @type {string} - */ - name: string; - /** - * An array of bindings. - * - * @type {Array} - */ - bindings: Array; - /** - * The group's ID. - * - * @type {number} - */ - id: number; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Binding.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Binding.d.ts deleted file mode 100644 index 46356fdc4..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/Binding.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -export default Binding; -/** - * A binding represents the connection between a resource (like a texture, sampler - * or uniform buffer) and the resource definition in a shader stage. - * - * This module is an abstract base class for all concrete bindings types. - * - * @abstract - * @private - */ -declare class Binding { - /** - * Constructs a new binding. - * - * @param {string} [name=''] - The binding's name. - */ - constructor(name?: string); - /** - * The binding's name. - * - * @type {string} - */ - name: string; - /** - * A bitmask that defines in what shader stages the - * binding's resource is accessible. - * - * @type {number} - */ - visibility: number; - /** - * Makes sure binding's resource is visible for the given shader stage. - * - * @param {number} visibility - The shader stage. - */ - setVisibility(visibility: number): void; - /** - * The shader stages in which the binding's resource is visible. - * - * @return {number} The visibility bitmask. - */ - getVisibility(): number; - /** - * Clones the binding. - * - * @return {Binding} The cloned binding. - */ - clone(): Binding; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Bindings.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Bindings.d.ts deleted file mode 100644 index b7e63fd9b..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/Bindings.d.ts +++ /dev/null @@ -1,120 +0,0 @@ -export default Bindings; -/** - * This renderer module manages the bindings of the renderer. - * - * @private - * @augments DataMap - */ -declare class Bindings extends DataMap { - /** - * Constructs a new bindings management component. - * - * @param {Backend} backend - The renderer's backend. - * @param {NodeManager} nodes - Renderer component for managing nodes related logic. - * @param {Textures} textures - Renderer component for managing textures. - * @param {Attributes} attributes - Renderer component for managing attributes. - * @param {Pipelines} pipelines - Renderer component for managing pipelines. - * @param {Info} info - Renderer component for managing metrics and monitoring data. - */ - constructor(backend: Backend, nodes: NodeManager, textures: Textures, attributes: Attributes, pipelines: Pipelines, info: Info); - /** - * The renderer's backend. - * - * @type {Backend} - */ - backend: Backend; - /** - * Renderer component for managing textures. - * - * @type {Textures} - */ - textures: Textures; - /** - * Renderer component for managing pipelines. - * - * @type {Pipelines} - */ - pipelines: Pipelines; - /** - * Renderer component for managing attributes. - * - * @type {Attributes} - */ - attributes: Attributes; - /** - * Renderer component for managing nodes related logic. - * - * @type {NodeManager} - */ - nodes: NodeManager; - /** - * Renderer component for managing metrics and monitoring data. - * - * @type {Info} - */ - info: Info; - /** - * Returns the bind groups for the given render object. - * - * @param {RenderObject} renderObject - The render object. - * @return {Array} The bind groups. - */ - getForRender(renderObject: RenderObject): Array; - /** - * Returns the bind groups for the given compute node. - * - * @param {Node} computeNode - The compute node. - * @return {Array} The bind groups. - */ - getForCompute(computeNode: Node): Array; - /** - * Updates the bindings for the given compute node. - * - * @param {Node} computeNode - The compute node. - */ - updateForCompute(computeNode: Node): void; - /** - * Updates the bindings for the given render object. - * - * @param {RenderObject} renderObject - The render object. - */ - updateForRender(renderObject: RenderObject): void; - /** - * Deletes the bindings for the given compute node. - * - * @param {Node} computeNode - The compute node. - */ - deleteForCompute(computeNode: Node): void; - /** - * Deletes the bindings for the given renderObject node. - * - * @param {RenderObject} renderObject - The renderObject. - */ - deleteForRender(renderObject: RenderObject): void; - /** - * Creates the bindings for the given array of bindings. - * - * @param {Array} bindings - The bind groups. - */ - _createBindings(bindings: Array): void; - /** - * Deletes the given array of bindings. - * - * @param {Array} bindings - The bind groups. - */ - _destroyBindings(bindings: Array): void; - /** - * Updates the given array of bindings. - * - * @param {Array} bindings - The bind groups. - */ - _updateBindings(bindings: Array): void; - /** - * Updates the given bind group. - * - * @param {BindGroup} bindGroup - The bind group to update. - * @param {Array} bindings - The bind groups. - */ - _update(bindGroup: BindGroup, bindings: Array): void; -} -import DataMap from './DataMap.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/BlendMode.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/BlendMode.d.ts deleted file mode 100644 index 29223086e..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/BlendMode.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -export default BlendMode; -/** - * Represents blending configuration. - * - * This class encapsulates all blending-related properties that control how - * a material's colors are combined with the colors already in the frame buffer. - */ -declare class BlendMode { - /** - * Constructs a new blending configuration. - * - * @param {(NoBlending|NormalBlending|AdditiveBlending|SubtractiveBlending|MultiplyBlending|CustomBlending|MaterialBlending)} [blending=NormalBlending] - The blending mode. - */ - constructor(blending?: (NoBlending | number | AdditiveBlending | SubtractiveBlending | MultiplyBlending | CustomBlending | MaterialBlending)); - /** - * Defines the blending type. - * - * It must be set to `CustomBlending` if custom blending properties like - * {@link BlendMode#blendSrc}, {@link BlendMode#blendDst} or {@link BlendMode#blendEquation} - * should have any effect. - * - * @type {(NoBlending|NormalBlending|AdditiveBlending|SubtractiveBlending|MultiplyBlending|CustomBlending|MaterialBlending)} - * @default NormalBlending - */ - blending: (NoBlending | number | AdditiveBlending | SubtractiveBlending | MultiplyBlending | CustomBlending | MaterialBlending); - /** - * Defines the blending source factor. - * - * This determines how the source (incoming) fragment color is factored before being added - * to the destination (existing) fragment color in the frame buffer. - * - * @type {(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} - * @default SrcAlphaFactor - */ - blendSrc: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); - /** - * Defines the blending destination factor. - * - * This determines how the destination (existing) fragment color in the frame buffer - * is factored before being combined with the source (incoming) fragment color. - * - * @type {(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} - * @default OneMinusSrcAlphaFactor - */ - blendDst: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor); - /** - * Defines the blending equation. - * - * This determines how the source and destination colors are combined. - * - * @type {(AddEquation|SubtractEquation|ReverseSubtractEquation|MinEquation|MaxEquation)} - * @default AddEquation - */ - blendEquation: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation); - /** - * Defines the blending source alpha factor. - * - * When set, this allows separate control of the alpha channel's source blending factor. - * If `null`, {@link BlendMode#blendSrc} is used for the alpha channel as well. - * - * @type {?(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} - * @default null - */ - blendSrcAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; - /** - * Defines the blending destination alpha factor. - * - * When set, this allows separate control of the alpha channel's destination blending factor. - * If `null`, {@link BlendMode#blendDst} is used for the alpha channel as well. - * - * @type {?(ZeroFactor|OneFactor|SrcColorFactor|OneMinusSrcColorFactor|SrcAlphaFactor|OneMinusSrcAlphaFactor|DstAlphaFactor|OneMinusDstAlphaFactor|DstColorFactor|OneMinusDstColorFactor|SrcAlphaSaturateFactor|ConstantColorFactor|OneMinusConstantColorFactor|ConstantAlphaFactor|OneMinusConstantAlphaFactor)} - * @default null - */ - blendDstAlpha: (ZeroFactor | OneFactor | SrcColorFactor | OneMinusSrcColorFactor | number | number | DstAlphaFactor | OneMinusDstAlphaFactor | DstColorFactor | OneMinusDstColorFactor | SrcAlphaSaturateFactor | ConstantColorFactor | OneMinusConstantColorFactor | ConstantAlphaFactor | OneMinusConstantAlphaFactor) | null; - /** - * Defines the blending equation of the alpha channel. - * - * When set, this allows separate control of the alpha channel's blending equation. - * If `null`, {@link BlendMode#blendEquation} is used for the alpha channel as well. - * - * @type {?(AddEquation|SubtractEquation|ReverseSubtractEquation|MinEquation|MaxEquation)} - * @default null - */ - blendEquationAlpha: (number | SubtractEquation | ReverseSubtractEquation | MinEquation | MaxEquation) | null; - /** - * Defines whether to premultiply the alpha (transparency) value. - * - * If `true`, the RGB color of the texture or material is multiplied by its alpha value. - * This is useful for transparent textures/materials where the color data - * should already include the transparency information. - * - * @type {boolean} - * @default false - */ - premultiplyAlpha: boolean; - /** - * Copies the blending properties from the given source to this instance. - * - * @param {BlendMode} source - The blending configuration to copy from. - * @return {BlendMode} A reference to this instance. - */ - copy(source: BlendMode): BlendMode; - /** - * Returns a clone of this blending configuration. - * - * @return {BlendMode} A new Blending instance with the same properties. - */ - clone(): BlendMode; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Buffer.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Buffer.d.ts deleted file mode 100644 index 907f0ad0b..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/Buffer.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -export default Buffer; -/** - * Represents a buffer binding type. - * - * @private - * @abstract - * @augments Binding - */ -declare class Buffer extends Binding { - /** - * Constructs a new buffer. - * - * @param {string} name - The buffer's name. - * @param {TypedArray} [buffer=null] - The buffer. - */ - constructor(name: string, buffer?: TypedArray); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBuffer: boolean; - /** - * The bytes per element. - * - * @type {number} - */ - bytesPerElement: number; - /** - * A reference to the internal buffer. - * - * @private - * @type {TypedArray} - */ - private _buffer; - /** - * An array of update ranges. - * - * @private - * @type {Array<{start: number, count: number}>} - */ - private _updateRanges; - /** - * The array of update ranges. - * - * @type {Array<{start: number, count: number}>} - */ - get updateRanges(): Array<{ - start: number; - count: number; - }>; - /** - * Adds an update range. - * - * @param {number} start - The start index. - * @param {number} count - The number of elements. - */ - addUpdateRange(start: number, count: number): void; - /** - * Clears all update ranges. - */ - clearUpdateRanges(): void; - /** - * The buffer's byte length. - * - * @type {number} - * @readonly - */ - readonly get byteLength(): number; - /** - * A reference to the internal buffer. - * - * @type {Float32Array} - * @readonly - */ - readonly get buffer(): Float32Array; - /** - * Updates the binding. - * - * @return {boolean} Whether the buffer has been updated and must be - * uploaded to the GPU. - */ - update(): boolean; - /** - * Releases the buffer. - */ - release(): void; -} -import Binding from './Binding.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/BufferUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/BufferUtils.d.ts deleted file mode 100644 index 4d149b3a7..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/BufferUtils.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * This function is usually called with the length in bytes of an array buffer. - * It returns an padded value which ensure chunk size alignment according to STD140 layout. - * - * @function - * @param {number} floatLength - The buffer length. - * @return {number} The padded length. - */ -export function getFloatLength(floatLength: number): number; -/** - * Given the count of vectors and their vector length, this function computes - * a total length in bytes with buffer alignment according to STD140 layout. - * - * @function - * @param {number} count - The number of vectors. - * @param {number} [vectorLength=4] - The vector length. - * @return {number} The padded length. - */ -export function getVectorLength(count: number, vectorLength?: number): number; -/** - * This function is called with a vector length and ensure the computed length - * matches a predefined stride (in this case `4`). - * - * @function - * @param {number} vectorLength - The vector length. - * @return {number} The padded length. - */ -export function getStrideLength(vectorLength: number): number; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/BundleGroup.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/BundleGroup.d.ts deleted file mode 100644 index 90e98b1aa..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/BundleGroup.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -export default BundleGroup; -/** - * A specialized group which enables applications access to the - * Render Bundle API of WebGPU. The group with all its descendant nodes - * are considered as one render bundle and processed as such by - * the renderer. - * - * This module is only fully supported by `WebGPURenderer` with a WebGPU backend. - * With a WebGL backend, the group can technically be rendered but without - * any performance improvements. - * - * @augments Group - */ -declare class BundleGroup extends Group { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isBundleGroup: boolean; - /** - * The bundle group's version. - * - * @type {number} - * @readonly - * @default 0 - */ - readonly version: number; - /** - * Set this property to `true` when the bundle group has changed. - * - * @type {boolean} - * @default false - * @param {boolean} value - */ - set needsUpdate(value: boolean); -} -import { Group } from '../../objects/Group.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/CanvasTarget.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/CanvasTarget.d.ts deleted file mode 100644 index 9932067a0..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/CanvasTarget.d.ts +++ /dev/null @@ -1,189 +0,0 @@ -export default CanvasTarget; -/** - * CanvasTarget is a class that represents the final output destination of the renderer. - * - * @augments EventDispatcher - */ -declare class CanvasTarget extends EventDispatcher { - /** - * Constructs a new CanvasTarget. - * - * @param {HTMLCanvasElement|OffscreenCanvas} domElement - The canvas element to render to. - */ - constructor(domElement: HTMLCanvasElement | OffscreenCanvas); - /** - * A reference to the canvas element the renderer is drawing to. - * This value of this property will automatically be created by - * the renderer. - * - * @type {HTMLCanvasElement|OffscreenCanvas} - */ - domElement: HTMLCanvasElement | OffscreenCanvas; - /** - * The renderer's pixel ratio. - * - * @private - * @type {number} - * @default 1 - */ - private _pixelRatio; - /** - * The width of the renderer's default framebuffer in logical pixel unit. - * - * @private - * @type {number} - */ - private _width; - /** - * The height of the renderer's default framebuffer in logical pixel unit. - * - * @private - * @type {number} - */ - private _height; - /** - * The viewport of the renderer in logical pixel unit. - * - * @private - * @type {Vector4} - */ - private _viewport; - /** - * The scissor rectangle of the renderer in logical pixel unit. - * - * @private - * @type {Vector4} - */ - private _scissor; - /** - * Whether the scissor test should be enabled or not. - * - * @private - * @type {boolean} - */ - private _scissorTest; - /** - * The color texture of the default framebuffer. - * - * @type {FramebufferTexture} - */ - colorTexture: FramebufferTexture; - /** - * The depth texture of the default framebuffer. - * - * @type {DepthTexture} - */ - depthTexture: DepthTexture; - /** - * Returns the pixel ratio. - * - * @return {number} The pixel ratio. - */ - getPixelRatio(): number; - /** - * Returns the drawing buffer size in physical pixels. This method honors the pixel ratio. - * - * @param {Vector2} target - The method writes the result in this target object. - * @return {Vector2} The drawing buffer size. - */ - getDrawingBufferSize(target: Vector2): Vector2; - /** - * Returns the renderer's size in logical pixels. This method does not honor the pixel ratio. - * - * @param {Vector2} target - The method writes the result in this target object. - * @return {Vector2} The renderer's size in logical pixels. - */ - getSize(target: Vector2): Vector2; - /** - * Sets the given pixel ratio and resizes the canvas if necessary. - * - * @param {number} [value=1] - The pixel ratio. - */ - setPixelRatio(value?: number): void; - /** - * This method allows to define the drawing buffer size by specifying - * width, height and pixel ratio all at once. The size of the drawing - * buffer is computed with this formula: - * ```js - * size.x = width * pixelRatio; - * size.y = height * pixelRatio; - * ``` - * - * @param {number} width - The width in logical pixels. - * @param {number} height - The height in logical pixels. - * @param {number} pixelRatio - The pixel ratio. - */ - setDrawingBufferSize(width: number, height: number, pixelRatio: number): void; - /** - * Sets the size of the renderer. - * - * @param {number} width - The width in logical pixels. - * @param {number} height - The height in logical pixels. - * @param {boolean} [updateStyle=true] - Whether to update the `style` attribute of the canvas or not. - */ - setSize(width: number, height: number, updateStyle?: boolean): void; - /** - * Returns the scissor rectangle. - * - * @param {Vector4} target - The method writes the result in this target object. - * @return {Vector4} The scissor rectangle. - */ - getScissor(target: Vector4): Vector4; - /** - * Defines the scissor rectangle. - * - * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the box in logical pixel unit. - * Instead of passing four arguments, the method also works with a single four-dimensional vector. - * @param {number} y - The vertical coordinate for the lower left corner of the box in logical pixel unit. - * @param {number} width - The width of the scissor box in logical pixel unit. - * @param {number} height - The height of the scissor box in logical pixel unit. - */ - setScissor(x: number | Vector4, y: number, width: number, height: number): void; - /** - * Returns the scissor test value. - * - * @return {boolean} Whether the scissor test should be enabled or not. - */ - getScissorTest(): boolean; - /** - * Defines the scissor test. - * - * @param {boolean} boolean - Whether the scissor test should be enabled or not. - */ - setScissorTest(boolean: boolean): void; - /** - * Returns the viewport definition. - * - * @param {Vector4} target - The method writes the result in this target object. - * @return {Vector4} The viewport definition. - */ - getViewport(target: Vector4): Vector4; - /** - * Defines the viewport. - * - * @param {number | Vector4} x - The horizontal coordinate for the lower left corner of the viewport origin in logical pixel unit. - * @param {number} y - The vertical coordinate for the lower left corner of the viewport origin in logical pixel unit. - * @param {number} width - The width of the viewport in logical pixel unit. - * @param {number} height - The height of the viewport in logical pixel unit. - * @param {number} minDepth - The minimum depth value of the viewport. WebGPU only. - * @param {number} maxDepth - The maximum depth value of the viewport. WebGPU only. - */ - setViewport(x: number | Vector4, y: number, width: number, height: number, minDepth?: number, maxDepth?: number): void; - /** - * Dispatches the resize event. - * - * @private - */ - private _dispatchResize; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - * - * @fires RenderTarget#dispose - */ - dispose(): void; -} -import { EventDispatcher } from '../../core/EventDispatcher.js'; -import { FramebufferTexture } from '../../textures/FramebufferTexture.js'; -import { DepthTexture } from '../../textures/DepthTexture.js'; -import { Vector4 } from '../../math/Vector4.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/ChainMap.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/ChainMap.d.ts deleted file mode 100644 index 97e504734..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/ChainMap.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -export default ChainMap; -/** - * Data structure for the renderer. It allows defining values - * with chained, hierarchical keys. Keys are meant to be - * objects since the module internally works with Weak Maps - * for performance reasons. - * - * @private - */ -declare class ChainMap { - /** - * A map of Weak Maps by their key length. - * - * @type {Object} - */ - weakMaps: { - [x: number]: WeakMap; - }; - /** - * Returns the Weak Map for the given keys. - * - * @param {Array} keys - List of keys. - * @return {WeakMap} The weak map. - */ - _getWeakMap(keys: Array): WeakMap; - /** - * Returns the value for the given array of keys. - * - * @param {Array} keys - List of keys. - * @return {any} The value. Returns `undefined` if no value was found. - */ - get(keys: Array): any; - /** - * Sets the value for the given keys. - * - * @param {Array} keys - List of keys. - * @param {any} value - The value to set. - * @return {ChainMap} A reference to this Chain Map. - */ - set(keys: Array, value: any): ChainMap; - /** - * Deletes a value for the given keys. - * - * @param {Array} keys - The keys. - * @return {boolean} Returns `true` if the value has been removed successfully and `false` if the value has not be found. - */ - delete(keys: Array): boolean; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/ClippingContext.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/ClippingContext.d.ts deleted file mode 100644 index db3046a90..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/ClippingContext.d.ts +++ /dev/null @@ -1,122 +0,0 @@ -export default ClippingContext; -/** - * Represents the state that is used to perform clipping via clipping planes. - * There is a default clipping context for each render context. When the - * scene holds instances of `ClippingGroup`, there will be a context for each - * group. - * - * @private - */ -declare class ClippingContext { - /** - * Constructs a new clipping context. - * - * @param {?ClippingContext} [parentContext=null] - A reference to the parent clipping context. - */ - constructor(parentContext?: ClippingContext | null); - /** - * The clipping context's version. - * - * @type {number} - * @readonly - */ - readonly version: number; - /** - * Whether the intersection of the clipping planes is used to clip objects, rather than their union. - * - * @type {?boolean} - * @default null - */ - clipIntersection: boolean | null; - /** - * The clipping context's cache key. - * - * @type {string} - */ - cacheKey: string; - /** - * Whether the shadow pass is active or not. - * - * @type {boolean} - * @default false - */ - shadowPass: boolean; - /** - * The view matrix. - * - * @type {Matrix4} - */ - viewMatrix: Matrix4; - /** - * The view normal matrix. - * - * @type {Matrix3} - */ - viewNormalMatrix: Matrix3; - /** - * Internal cache for maintaining clipping contexts. - * - * @type {WeakMap} - */ - clippingGroupContexts: WeakMap; - /** - * The intersection planes. - * - * @type {Array} - */ - intersectionPlanes: Array; - /** - * The intersection planes. - * - * @type {Array} - */ - unionPlanes: Array; - /** - * The version of the clipping context's parent context. - * - * @type {?number} - * @readonly - */ - readonly parentVersion: number | null; - /** - * Projects the given source clipping planes and writes the result into the - * destination array. - * - * @param {Array} source - The source clipping planes. - * @param {Array} destination - The destination. - * @param {number} offset - The offset. - */ - projectPlanes(source: Array, destination: Array, offset: number): void; - /** - * Updates the root clipping context of a scene. - * - * @param {Scene} scene - The scene. - * @param {Camera} camera - The camera that is used to render the scene. - */ - updateGlobal(scene: Scene, camera: Camera): void; - /** - * Updates the clipping context. - * - * @param {ClippingContext} parentContext - The parent context. - * @param {ClippingGroup} clippingGroup - The clipping group this context belongs to. - */ - update(parentContext: ClippingContext, clippingGroup: ClippingGroup): void; - /** - * Returns a clipping context for the given clipping group. - * - * @param {ClippingGroup} clippingGroup - The clipping group. - * @return {ClippingContext} The clipping context. - */ - getGroupContext(clippingGroup: ClippingGroup): ClippingContext; - /** - * The count of union clipping planes. - * - * @type {number} - * @readonly - */ - readonly get unionClippingCount(): number; -} -import { Matrix4 } from '../../math/Matrix4.js'; -import { Matrix3 } from '../../math/Matrix3.js'; -import { Vector4 } from '../../math/Vector4.js'; -import { Plane } from '../../math/Plane.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Color4.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Color4.d.ts deleted file mode 100644 index 6f01003df..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/Color4.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -export default Color4; -/** - * A four-component version of {@link Color} which is internally - * used by the renderer to represents clear color with alpha as - * one object. - * - * @private - * @augments Color - */ -declare class Color4 extends Color { - /** - * Constructs a new four-component color. - * You can also pass a single THREE.Color, hex or - * string argument to this constructor. - * - * @param {number|string} [r=1] - The red value. - * @param {number} [g=1] - The green value. - * @param {number} [b=1] - The blue value. - * @param {number} [a=1] - The alpha value. - */ - constructor(r?: number | string, g?: number, b?: number, a?: number); - a: number; - /** - * Overwrites the default to honor alpha. - * You can also pass a single THREE.Color, hex or - * string argument to this method. - * - * @param {number|string|Color} r - The red value. - * @param {number} [g] - The green value. - * @param {number} [b] - The blue value. - * @param {number} [a=1] - The alpha value. - * @return {Color4} A reference to this object. - */ - set(r: number | string | Color, g?: number, b?: number, a?: number): Color4; - /** - * Overwrites the default to honor alpha. - * - * @param {Color4} color - The color to copy. - * @return {Color4} A reference to this object. - */ - copy(color: Color4): Color4; - /** - * Overwrites the default to honor alpha. - * - * @return {Color4} The cloned color. - */ - clone(): Color4; -} -import { Color } from '../../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/ComputePipeline.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/ComputePipeline.d.ts deleted file mode 100644 index c8740c38d..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/ComputePipeline.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default ComputePipeline; -/** - * Class for representing compute pipelines. - * - * @private - * @augments Pipeline - */ -declare class ComputePipeline extends Pipeline { - /** - * Constructs a new compute pipeline. - * - * @param {string} cacheKey - The pipeline's cache key. - * @param {ProgrammableStage} computeProgram - The pipeline's compute shader. - */ - constructor(cacheKey: string, computeProgram: ProgrammableStage); - /** - * The pipeline's compute shader. - * - * @type {ProgrammableStage} - */ - computeProgram: ProgrammableStage; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isComputePipeline: boolean; -} -import Pipeline from './Pipeline.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Constants.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Constants.d.ts deleted file mode 100644 index cf3261af0..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/Constants.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export namespace AttributeType { - let VERTEX: number; - let INDEX: number; - let STORAGE: number; - let INDIRECT: number; -} -export const GPU_CHUNK_BYTES: 16; -export const BlendColorFactor: 211; -export const OneMinusBlendColorFactor: 212; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/CubeRenderTarget.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/CubeRenderTarget.d.ts deleted file mode 100644 index e6cad71cf..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/CubeRenderTarget.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -export default CubeRenderTarget; -/** - * This class represents a cube render target. It is a special version - * of `WebGLCubeRenderTarget` which is compatible with `WebGPURenderer`. - * - * @augments RenderTarget - */ -declare class CubeRenderTarget extends RenderTarget { - /** - * Constructs a new cube render target. - * - * @param {number} [size=1] - The size of the render target. - * @param {RenderTarget~Options} [options] - The configuration object. - */ - constructor(size?: number, options?: {}); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isCubeRenderTarget: boolean; - /** - * Converts the given equirectangular texture to a cube map. - * - * @param {Renderer} renderer - The renderer. - * @param {Texture} texture - The equirectangular texture. - * @return {CubeRenderTarget} A reference to this cube render target. - */ - fromEquirectangularTexture(renderer: Renderer, texture: Texture): CubeRenderTarget; - /** - * Clears this cube render target. - * - * @param {Renderer} renderer - The renderer. - * @param {boolean} [color=true] - Whether the color buffer should be cleared or not. - * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not. - * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not. - */ - clear(renderer: Renderer, color?: boolean, depth?: boolean, stencil?: boolean): void; -} -import { RenderTarget } from '../../core/RenderTarget.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/DataMap.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/DataMap.d.ts deleted file mode 100644 index 5b407575a..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/DataMap.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -export default DataMap; -/** - * Data structure for the renderer. It is intended to manage - * data of objects in dictionaries. - * - * @private - */ -declare class DataMap { - /** - * `DataMap` internally uses a weak map - * to manage its data. - * - * @type {WeakMap} - */ - data: WeakMap; - /** - * Returns the dictionary for the given object. - * - * @param {Object} object - The object. - * @return {Object} The dictionary. - */ - get(object: Object): Object; - /** - * Deletes the dictionary for the given object. - * - * @param {Object} object - The object. - * @return {?Object} The deleted dictionary. - */ - delete(object: Object): Object | null; - /** - * Returns `true` if the given object has a dictionary defined. - * - * @param {Object} object - The object to test. - * @return {boolean} Whether a dictionary is defined or not. - */ - has(object: Object): boolean; - /** - * Frees internal resources. - */ - dispose(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Geometries.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Geometries.d.ts deleted file mode 100644 index a1cd970c9..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/Geometries.d.ts +++ /dev/null @@ -1,103 +0,0 @@ -export default Geometries; -/** - * This renderer module manages geometries. - * - * @private - * @augments DataMap - */ -declare class Geometries extends DataMap { - /** - * Constructs a new geometry management component. - * - * @param {Attributes} attributes - Renderer component for managing attributes. - * @param {Info} info - Renderer component for managing metrics and monitoring data. - */ - constructor(attributes: Attributes, info: Info); - /** - * Renderer component for managing attributes. - * - * @type {Attributes} - */ - attributes: Attributes; - /** - * Renderer component for managing metrics and monitoring data. - * - * @type {Info} - */ - info: Info; - /** - * Weak Map for managing attributes for wireframe rendering. - * - * @type {WeakMap} - */ - wireframes: WeakMap; - /** - * This Weak Map is used to make sure buffer attributes are - * updated only once per render call. - * - * @type {WeakMap} - */ - attributeCall: WeakMap; - /** - * Stores the event listeners attached to geometries. - * - * @private - * @type {Map} - */ - private _geometryDisposeListeners; - /** - * Returns `true` if the given render object has an initialized geometry. - * - * @param {RenderObject} renderObject - The render object. - * @return {boolean} Whether if the given render object has an initialized geometry or not. - */ - has(renderObject: RenderObject): boolean; - /** - * Prepares the geometry of the given render object for rendering. - * - * @param {RenderObject} renderObject - The render object. - */ - updateForRender(renderObject: RenderObject): void; - /** - * Initializes the geometry of the given render object. - * - * @param {RenderObject} renderObject - The render object. - */ - initGeometry(renderObject: RenderObject): void; - /** - * Updates the geometry attributes of the given render object. - * - * @param {RenderObject} renderObject - The render object. - */ - updateAttributes(renderObject: RenderObject): void; - /** - * Updates the given attribute. - * - * @param {BufferAttribute} attribute - The attribute to update. - * @param {number} type - The attribute type. - */ - updateAttribute(attribute: BufferAttribute, type: number): void; - /** - * Returns the indirect buffer attribute of the given render object. - * - * @param {RenderObject} renderObject - The render object. - * @return {?BufferAttribute} The indirect attribute. `null` if no indirect drawing is used. - */ - getIndirect(renderObject: RenderObject): BufferAttribute | null; - /** - * Returns the byte offset into the indirect attribute buffer of the given render object. - * - * @param {RenderObject} renderObject - The render object. - * @return {number} The byte offset into the indirect attribute buffer. - */ - getIndirectOffset(renderObject: RenderObject): number; - /** - * Returns the index of the given render object's geometry. This is implemented - * in a method to return a wireframe index if necessary. - * - * @param {RenderObject} renderObject - The render object. - * @return {?BufferAttribute} The index. Returns `null` for non-indexed geometries. - */ - getIndex(renderObject: RenderObject): BufferAttribute | null; -} -import DataMap from './DataMap.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/IndirectStorageBufferAttribute.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/IndirectStorageBufferAttribute.d.ts deleted file mode 100644 index 9084444e7..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/IndirectStorageBufferAttribute.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export default IndirectStorageBufferAttribute; -/** - * This special type of buffer attribute is intended for compute shaders. - * It can be used to encode draw parameters for indirect draw calls. - * - * Note: This type of buffer attribute can only be used with `WebGPURenderer` - * and a WebGPU backend. - * - * @augments StorageBufferAttribute - */ -declare class IndirectStorageBufferAttribute extends StorageBufferAttribute { - /** - * Constructs a new storage buffer attribute. - * - * @param {number|Uint32Array} count - The item count. It is also valid to pass a `Uint32Array` as an argument. - * The subsequent parameter is then obsolete. - * @param {number} itemSize - The item size. - */ - constructor(count: number | Uint32Array, itemSize: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isIndirectStorageBufferAttribute: boolean; -} -import StorageBufferAttribute from './StorageBufferAttribute.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Info.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Info.d.ts deleted file mode 100644 index 6f3fa816f..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/Info.d.ts +++ /dev/null @@ -1,211 +0,0 @@ -export default Info; -/** - * This renderer module provides a series of statistical information - * about the GPU memory and the rendering process. Useful for debugging - * and monitoring. - */ -declare class Info { - /** - * Whether frame related metrics should automatically - * be resetted or not. This property should be set to `false` - * by apps which manage their own animation loop. They must - * then call `renderer.info.reset()` once per frame manually. - * - * @type {boolean} - * @default true - */ - autoReset: boolean; - /** - * The current frame ID. This ID is managed - * by `NodeFrame`. - * - * @type {number} - * @readonly - * @default 0 - */ - readonly frame: number; - /** - * The number of render calls since the - * app has been started. - * - * @type {number} - * @readonly - * @default 0 - */ - readonly calls: number; - /** - * Render related metrics. - * - * @type {Object} - * @readonly - * @property {number} calls - The number of render calls since the app has been started. - * @property {number} frameCalls - The number of render calls of the current frame. - * @property {number} drawCalls - The number of draw calls of the current frame. - * @property {number} triangles - The number of rendered triangle primitives of the current frame. - * @property {number} points - The number of rendered point primitives of the current frame. - * @property {number} lines - The number of rendered line primitives of the current frame. - * @property {number} timestamp - The timestamp of the frame. - */ - readonly render: Object; - /** - * Compute related metrics. - * - * @type {Object} - * @readonly - * @property {number} calls - The number of compute calls since the app has been started. - * @property {number} frameCalls - The number of compute calls of the current frame. - * @property {number} timestamp - The timestamp of the frame when using `renderer.computeAsync()`. - */ - readonly compute: Object; - /** - * Memory related metrics. - * - * @type {Object} - * @readonly - * @property {number} attributes - The number of active attributes. - * @property {number} attributesSize - The memory size of active attributes in bytes. - * @property {number} geometries - The number of active geometries. - * @property {number} indexAttributes - The number of active index attributes. - * @property {number} indexAttributesSize - The memory size of active index attributes in bytes. - * @property {number} indirectStorageAttributes - The number of active indirect storage attributes. - * @property {number} indirectStorageAttributesSize - The memory size of active indirect storage attributes in bytes. - * @property {number} programs - The number of active programs. - * @property {number} programsSize - The memory size of active programs in bytes. - * @property {number} readbackBuffers - The number of active readback buffers. - * @property {number} readbackBuffersSize - The memory size of active readback buffers in bytes. - * @property {number} renderTargets - The number of active renderTargets. - * @property {number} storageAttributes - The number of active storage attributes. - * @property {number} storageAttributesSize - The memory size of active storage attributes in bytes. - * @property {number} textures - The number of active textures. - * @property {number} texturesSize - The memory size of active textures in bytes. - * @property {number} uniformBuffers - The number of active uniform buffers. - * @property {number} uniformBuffersSize - The memory size of active uniform buffers in bytes. - * @property {number} total - The total memory size in bytes. - */ - readonly memory: Object; - /** - * Map for storing calculated byte sizes of tracked objects. - * - * @type {Map} - * @private - */ - private memoryMap; - /** - * This method should be executed per draw call and updates the corresponding metrics. - * - * @param {Object3D} object - The 3D object that is going to be rendered. - * @param {number} count - The vertex or index count. - * @param {number} instanceCount - The instance count. - */ - update(object: Object3D, count: number, instanceCount: number): void; - /** - * Resets frame related metrics. - */ - reset(): void; - /** - * Performs a complete reset of the object. - */ - dispose(): void; - /** - * Tracks texture memory explicitly, updating counts and byte tracking. - * - * @param {Texture} texture - */ - createTexture(texture: Texture): void; - /** - * Tracks texture memory explicitly, updating counts and byte tracking. - * - * @param {Texture} texture - */ - destroyTexture(texture: Texture): void; - /** - * Tracks attribute memory explicitly, updating counts and byte tracking. - * - * @param {BufferAttribute} attribute - * @param {string} type - type of attribute - * @private - */ - private _createAttribute; - /** - * Tracks a regular attribute memory explicitly. - * - * @param {BufferAttribute} attribute - The attribute to track. - */ - createAttribute(attribute: BufferAttribute): void; - /** - * Tracks an index attribute memory explicitly. - * - * @param {BufferAttribute} attribute - The index attribute to track. - */ - createIndexAttribute(attribute: BufferAttribute): void; - /** - * Tracks a storage attribute memory explicitly. - * - * @param {BufferAttribute} attribute - The storage attribute to track. - */ - createStorageAttribute(attribute: BufferAttribute): void; - /** - * Tracks an indirect storage attribute memory explicitly. - * - * @param {BufferAttribute} attribute - The indirect storage attribute to track. - */ - createIndirectStorageAttribute(attribute: BufferAttribute): void; - /** - * Tracks attribute memory explicitly, updating counts and byte tracking. - * - * @param {BufferAttribute} attribute - */ - destroyAttribute(attribute: BufferAttribute): void; - /** - * Tracks a readback buffer memory explicitly. - * - * @param {ReadbackBuffer} readbackBuffer - The readback buffer to track. - */ - createReadbackBuffer(readbackBuffer: ReadbackBuffer): void; - /** - * Tracks a readback buffer memory explicitly. - * - * @param {ReadbackBuffer} readbackBuffer - The readback buffer to track. - */ - destroyReadbackBuffer(readbackBuffer: ReadbackBuffer): void; - /** - * Tracks a uniform buffer memory explicitly. - * - * @param {UniformBuffer} uniformBuffer - The uniform buffer to track. - */ - createUniformBuffer(uniformBuffer: UniformBuffer): void; - /** - * Tracks a uniform buffer memory explicitly. - * - * @param {UniformBuffer} uniformBuffer - The uniform buffer to track. - */ - destroyUniformBuffer(uniformBuffer: UniformBuffer): void; - /** - * Tracks program memory explicitly, updating counts and byte tracking. - * - * @param {ProgrammableStage} program - The program to track. - */ - createProgram(program: ProgrammableStage): void; - /** - * Tracks program memory explicitly, updating counts and byte tracking. - * - * @param {Object} program - The program to track. - */ - destroyProgram(program: Object): void; - /** - * Calculates the memory size of a texture in bytes. - * - * @param {Texture} texture - The texture to calculate the size for. - * @return {number} The calculated size in bytes. - * @private - */ - private _getTextureMemorySize; - /** - * Calculates the memory size of an attribute in bytes. - * - * @param {BufferAttribute} attribute - The attribute to calculate the size for. - * @return {number} The calculated size in bytes. - * @private - */ - private _getAttributeMemorySize; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/InspectorBase.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/InspectorBase.d.ts deleted file mode 100644 index 7deedcbb7..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/InspectorBase.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -export default InspectorBase; -/** - * InspectorBase is the base class for all inspectors. - * - * @class InspectorBase - * @augments EventDispatcher - */ -declare class InspectorBase extends EventDispatcher { - /** - * The renderer associated with this inspector. - * - * @type {WebGLRenderer} - * @private - */ - private _renderer; - /** - * The current frame being processed. - * - * @type {Object} - */ - currentFrame: Object; - /** - * Returns the node frame for the current renderer. - * - * @return {Object} The node frame. - */ - get nodeFrame(): Object; - /** - * Sets the renderer for this inspector. - * - * @param {WebGLRenderer} renderer - The renderer to associate with this inspector. - * @return {InspectorBase} This inspector instance. - */ - setRenderer(renderer: WebGLRenderer): InspectorBase; - /** - * Returns the renderer associated with this inspector. - * - * @return {WebGLRenderer} The associated renderer. - */ - getRenderer(): WebGLRenderer; - /** - * Initializes the inspector. - */ - init(): void; - /** - * Called when a frame begins. - */ - begin(): void; - /** - * Called when a frame ends. - */ - finish(): void; - /** - * Inspects a node. - * - * @param {Node} node - The node to inspect. - */ - inspect(): void; - /** - * When a compute operation is performed. - * - * @param {ComputeNode} computeNode - The compute node being executed. - * @param {number|Array} dispatchSizeOrCount - The dispatch size or count. - */ - computeAsync(): void; - /** - * Called when a compute operation begins. - * - * @param {string} uid - A unique identifier for the render context. - * @param {ComputeNode} computeNode - The compute node being executed. - */ - beginCompute(): void; - /** - * Called when a compute operation ends. - * - * @param {string} uid - A unique identifier for the render context. - * @param {ComputeNode} computeNode - The compute node being executed. - */ - finishCompute(): void; - /** - * Called when a render operation begins. - * - * @param {string} uid - A unique identifier for the render context. - * @param {Scene} scene - The scene being rendered. - * @param {Camera} camera - The camera being used for rendering. - * @param {?WebGLRenderTarget} renderTarget - The render target, if any. - */ - beginRender(): void; - /** - * Called when an animation loop ends. - * - * @param {string} uid - A unique identifier for the render context. - */ - finishRender(): void; - /** - * Called when a texture copy operation is performed. - * - * @param {Texture} srcTexture - The source texture. - * @param {Texture} dstTexture - The destination texture. - */ - copyTextureToTexture(): void; - /** - * Called when a framebuffer copy operation is performed. - * - * @param {Texture} framebufferTexture - The texture associated with the framebuffer. - */ - copyFramebufferToTexture(): void; -} -import { EventDispatcher } from '../../core/EventDispatcher.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Lighting.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Lighting.d.ts deleted file mode 100644 index b15d96025..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/Lighting.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -export default Lighting; -/** - * This renderer module manages the lights nodes which are unique - * per scene and camera combination. - * - * The lights node itself is later configured in the render list - * with the actual lights from the scene. - * - * @private - */ -declare class Lighting { - /** - * Creates a new lights node for the given array of lights. - * - * @param {Array} lights - The render object. - * @return {LightsNode} The lights node. - */ - createNode(lights?: Array): LightsNode; - /** - * Returns a lights node for the given scene and camera. - * - * @param {Scene} scene - The scene. - * @param {Camera} camera - The camera. - * @return {LightsNode} The lights node. - */ - getNode(scene: Scene): LightsNode; -} -import { LightsNode } from '../../nodes/Nodes.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Pipeline.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Pipeline.d.ts deleted file mode 100644 index db30b30a6..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/Pipeline.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -export default Pipeline; -/** - * Abstract class for representing pipelines. - * - * @private - * @abstract - */ -declare class Pipeline { - /** - * Constructs a new pipeline. - * - * @param {string} cacheKey - The pipeline's cache key. - */ - constructor(cacheKey: string); - /** - * The pipeline's cache key. - * - * @type {string} - */ - cacheKey: string; - /** - * How often the pipeline is currently in use. - * - * @type {number} - * @default 0 - */ - usedTimes: number; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Pipelines.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Pipelines.d.ts deleted file mode 100644 index 182374e08..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/Pipelines.d.ts +++ /dev/null @@ -1,174 +0,0 @@ -export default Pipelines; -/** - * This renderer module manages the pipelines of the renderer. - * - * @private - * @augments DataMap - */ -declare class Pipelines extends DataMap { - /** - * Constructs a new pipeline management component. - * - * @param {Backend} backend - The renderer's backend. - * @param {NodeManager} nodes - Renderer component for managing nodes related logic. - * @param {Info} info - Renderer component for managing metrics and monitoring data. - */ - constructor(backend: Backend, nodes: NodeManager, info: Info); - /** - * The renderer's backend. - * - * @type {Backend} - */ - backend: Backend; - /** - * Renderer component for managing nodes related logic. - * - * @type {NodeManager} - */ - nodes: NodeManager; - /** - * Renderer component for managing metrics and monitoring data. - * - * @type {Info} - */ - info: Info; - /** - * A references to the bindings management component. - * This reference will be set inside the `Bindings` - * constructor. - * - * @type {?Bindings} - * @default null - */ - bindings: Bindings | null; - /** - * Internal cache for maintaining pipelines. - * The key of the map is a cache key, the value the pipeline. - * - * @type {Map} - */ - caches: Map; - /** - * This dictionary maintains for each shader stage type (vertex, - * fragment and compute) the programmable stage objects which - * represent the actual shader code. - * - * @type {Object>} - */ - programs: { - [x: string]: Map; - }; - /** - * Returns a compute pipeline for the given compute node. - * - * @param {Node} computeNode - The compute node. - * @param {Array} bindings - The bindings. - * @return {ComputePipeline} The compute pipeline. - */ - getForCompute(computeNode: Node, bindings: Array): ComputePipeline; - /** - * Returns a render pipeline for the given render object. - * - * @param {RenderObject} renderObject - The render object. - * @param {?Array} [promises=null] - An array of compilation promises which is only relevant in context of `Renderer.compileAsync()`. - * @return {RenderObjectPipeline} The render pipeline. - */ - getForRender(renderObject: RenderObject, promises?: Array> | null): RenderObjectPipeline; - /** - * Checks if the render pipeline for the given render object is ready for drawing. - * Returns false if the GPU pipeline is still being compiled asynchronously. - * - * @param {RenderObject} renderObject - The render object. - * @return {boolean} True if the pipeline is ready for drawing. - */ - isReady(renderObject: RenderObject): boolean; - /** - * Deletes the pipeline for the given render object. - * - * @param {RenderObject} object - The render object. - * @return {?Object} The deleted dictionary. - */ - delete(object: RenderObject): Object | null; - /** - * Updates the pipeline for the given render object. - * - * @param {RenderObject} renderObject - The render object. - */ - updateForRender(renderObject: RenderObject): void; - /** - * Returns a compute pipeline for the given parameters. - * - * @private - * @param {Node} computeNode - The compute node. - * @param {ProgrammableStage} stageCompute - The programmable stage representing the compute shader. - * @param {string} cacheKey - The cache key. - * @param {Array} bindings - The bindings. - * @return {ComputePipeline} The compute pipeline. - */ - private _getComputePipeline; - /** - * Returns a render pipeline for the given parameters. - * - * @private - * @param {RenderObject} renderObject - The render object. - * @param {ProgrammableStage} stageVertex - The programmable stage representing the vertex shader. - * @param {ProgrammableStage} stageFragment - The programmable stage representing the fragment shader. - * @param {string} cacheKey - The cache key. - * @param {?Array} promises - An array of compilation promises which is only relevant in context of `Renderer.compileAsync()`. - * @return {RenderObjectPipeline} The render pipeline. - */ - private _getRenderPipeline; - /** - * Computes a cache key representing a compute pipeline. - * - * @private - * @param {Node} computeNode - The compute node. - * @param {ProgrammableStage} stageCompute - The programmable stage representing the compute shader. - * @return {string} The cache key. - */ - private _getComputeCacheKey; - /** - * Computes a cache key representing a render pipeline. - * - * @private - * @param {RenderObject} renderObject - The render object. - * @param {ProgrammableStage} stageVertex - The programmable stage representing the vertex shader. - * @param {ProgrammableStage} stageFragment - The programmable stage representing the fragment shader. - * @return {string} The cache key. - */ - private _getRenderCacheKey; - /** - * Releases the given pipeline. - * - * @private - * @param {Pipeline} pipeline - The pipeline to release. - */ - private _releasePipeline; - /** - * Releases the shader program. - * - * @private - * @param {Object} program - The shader program to release. - */ - private _releaseProgram; - /** - * Returns `true` if the compute pipeline for the given compute node requires an update. - * - * @private - * @param {Node} computeNode - The compute node. - * @return {boolean} Whether the compute pipeline for the given compute node requires an update or not. - */ - private _needsComputeUpdate; - /** - * Returns `true` if the render pipeline for the given render object requires an update. - * - * @private - * @param {RenderObject} renderObject - The render object. - * @return {boolean} Whether the render object for the given render object requires an update or not. - */ - private _needsRenderUpdate; -} -import DataMap from './DataMap.js'; -import ProgrammableStage from './ProgrammableStage.js'; -import ComputePipeline from './ComputePipeline.js'; -import RenderObjectPipeline from './RenderObjectPipeline.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/PostProcessing.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/PostProcessing.d.ts deleted file mode 100644 index 7bf242f58..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/PostProcessing.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default PostProcessing; -/** - * @deprecated since r183. Use {@link RenderPipeline} instead. PostProcessing has been renamed to RenderPipeline. - * - * This class is a wrapper for backward compatibility and will be removed in a future version. - */ -declare class PostProcessing extends RenderPipeline { - /** - * Constructs a new post processing management module. - * - * @param {Renderer} renderer - A reference to the renderer. - * @param {Node} outputNode - An optional output node. - * @deprecated since r183. Use {@link RenderPipeline} instead. - */ - constructor(renderer: Renderer, outputNode: Node); -} -import RenderPipeline from './RenderPipeline.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/ProgrammableStage.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/ProgrammableStage.d.ts deleted file mode 100644 index 5fdbd4d68..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/ProgrammableStage.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -export default ProgrammableStage; -/** - * Class for representing programmable stages which are vertex, - * fragment or compute shaders. Unlike fixed-function states (like blending), - * they represent the programmable part of a pipeline. - * - * @private - */ -declare class ProgrammableStage { - /** - * Constructs a new programmable stage. - * - * @param {string} code - The shader code. - * @param {('vertex'|'fragment'|'compute')} stage - The type of stage. - * @param {string} name - The name of the shader. - * @param {?Array} [transforms=null] - The transforms (only relevant for compute stages with WebGL 2 which uses Transform Feedback). - * @param {?Array} [attributes=null] - The attributes (only relevant for compute stages with WebGL 2 which uses Transform Feedback). - */ - constructor(code: string, stage: ("vertex" | "fragment" | "compute"), name: string, transforms?: Array | null, attributes?: Array | null); - /** - * The id of the programmable stage. - * - * @type {number} - */ - id: number; - /** - * The shader code. - * - * @type {string} - */ - code: string; - /** - * The type of stage. - * - * @type {string} - */ - stage: string; - /** - * The name of the stage. - * This is used for debugging purposes. - * - * @type {string} - */ - name: string; - /** - * The transforms (only relevant for compute stages with WebGL 2 which uses Transform Feedback). - * - * @type {?Array} - */ - transforms: Array | null; - /** - * The attributes (only relevant for compute stages with WebGL 2 which uses Transform Feedback). - * - * @type {?Array} - */ - attributes: Array | null; - /** - * How often the programmable stage is currently in use. - * - * @type {number} - * @default 0 - */ - usedTimes: number; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/QuadMesh.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/QuadMesh.d.ts deleted file mode 100644 index 5e42e77e0..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/QuadMesh.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -export default QuadMesh; -/** - * This module is a helper for passes which need to render a full - * screen effect which is quite common in context of post processing. - * - * The intended usage is to reuse a single quad mesh for rendering - * subsequent passes by just reassigning the `material` reference. - * - * Note: This module can only be used with `WebGPURenderer`. - * - * @augments Mesh - */ -declare class QuadMesh extends Mesh { - /** - * Constructs a new quad mesh. - * - * @param {?Material} [material=null] - The material to render the quad mesh with. - */ - constructor(material?: Material | null); - /** - * The camera to render the quad mesh with. - * - * @type {OrthographicCamera} - * @readonly - */ - readonly camera: OrthographicCamera; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isQuadMesh: boolean; - /** - * Async version of `render()`. - * - * @async - * @deprecated - * @param {Renderer} renderer - The renderer. - * @return {Promise} A Promise that resolves when the render has been finished. - */ - renderAsync(renderer: Renderer): Promise; - /** - * Renders the quad mesh - * - * @param {Renderer} renderer - The renderer. - */ - render(renderer: Renderer): void; -} -import { Mesh } from '../../objects/Mesh.js'; -import { OrthographicCamera } from '../../cameras/OrthographicCamera.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/ReadbackBuffer.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/ReadbackBuffer.d.ts deleted file mode 100644 index 70218d55a..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/ReadbackBuffer.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -export default ReadbackBuffer; -/** - * A readback buffer is used to transfer data from the GPU to the CPU. - * It is primarily used to read back compute shader results. - * - * @augments EventDispatcher - */ -declare class ReadbackBuffer extends EventDispatcher { - /** - * Constructs a new readback buffer. - * - * @param {number} maxByteLength - The maximum size of the buffer to be read back. - */ - constructor(maxByteLength: number); - /** - * Name used for debugging purposes. - * - * @type {string} - */ - name: string; - /** - * The mapped, read back array buffer. - * - * @type {ArrayBuffer|null} - */ - buffer: ArrayBuffer | null; - /** - * The maximum size of the buffer to be read back. - * - * @type {number} - */ - maxByteLength: number; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isReadbackBuffer: boolean; - _mapped: boolean; - /** - * Releases the mapped buffer data so the GPU buffer can be - * used by the GPU again. - * - * Note: Any `ArrayBuffer` data associated with this readback buffer - * are removed and no longer accessible after calling this method. - */ - release(): void; - /** - * Frees internal resources. - */ - dispose(): void; -} -import { EventDispatcher } from '../../core/EventDispatcher.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RenderBundle.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RenderBundle.d.ts deleted file mode 100644 index aca8cbee1..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/RenderBundle.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export default RenderBundle; -/** - * This module is used to represent render bundles inside the renderer - * for further processing. - * - * @private - */ -declare class RenderBundle { - /** - * Constructs a new bundle group. - * - * @param {BundleGroup} bundleGroup - The bundle group. - * @param {Camera} camera - The camera the bundle group is rendered with. - * @param {RenderContext} renderContext - The render context the bundle is rendered with. - */ - constructor(bundleGroup: BundleGroup, camera: Camera, renderContext: RenderContext); - bundleGroup: BundleGroup; - camera: Camera; - renderContext: RenderContext; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RenderBundles.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RenderBundles.d.ts deleted file mode 100644 index ec46ba6ca..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/RenderBundles.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -export default RenderBundles; -/** - * This renderer module manages render bundles. - * - * @private - */ -declare class RenderBundles { - /** - * A chain map for maintaining the render bundles. - * - * @type {ChainMap} - */ - bundles: ChainMap; - /** - * Returns a render bundle for the given bundle group and camera. - * - * @param {BundleGroup} bundleGroup - The bundle group. - * @param {Camera} camera - The camera the bundle group is rendered with. - * @param {RenderContext} renderContext - The render context the bundle is rendered with. - * @return {RenderBundle} The render bundle. - */ - get(bundleGroup: BundleGroup, camera: Camera, renderContext: RenderContext): RenderBundle; - /** - * Frees all internal resources. - */ - dispose(): void; -} -import ChainMap from './ChainMap.js'; -import RenderBundle from './RenderBundle.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RenderContext.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RenderContext.d.ts deleted file mode 100644 index f0ef10337..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/RenderContext.d.ts +++ /dev/null @@ -1,221 +0,0 @@ -/** - * Computes a cache key for the given render context. This key - * should identify the render target state so it is possible to - * configure the correct attachments in the respective backend. - * - * @param {RenderContext} renderContext - The render context. - * @return {number} The cache key. - */ -export function getCacheKey(renderContext: RenderContext): number; -export default RenderContext; -/** - * Any render or compute command is executed in a specific context that defines - * the state of the renderer and its backend. Typical examples for such context - * data are the current clear values or data from the active framebuffer. This - * module is used to represent these contexts as objects. - * - * @private - */ -declare class RenderContext { - /** - * The context's ID. - * - * @type {number} - */ - id: number; - /** - * The MRT configuration. - * - * @type {?MRTNode} - * @default null - */ - mrt: MRTNode | null; - /** - * Whether the current active framebuffer has a color attachment. - * - * @type {boolean} - * @default true - */ - color: boolean; - /** - * Whether the color attachment should be cleared or not. - * - * @type {boolean} - * @default true - */ - clearColor: boolean; - /** - * The clear color value. - * - * @type {Object} - * @default true - */ - clearColorValue: Object; - /** - * Whether the current active framebuffer has a depth attachment. - * - * @type {boolean} - * @default true - */ - depth: boolean; - /** - * Whether the depth attachment should be cleared or not. - * - * @type {boolean} - * @default true - */ - clearDepth: boolean; - /** - * The clear depth value. - * - * @type {number} - * @default 1 - */ - clearDepthValue: number; - /** - * Whether the current active framebuffer has a stencil attachment. - * - * @type {boolean} - * @default false - */ - stencil: boolean; - /** - * Whether the stencil attachment should be cleared or not. - * - * @type {boolean} - * @default true - */ - clearStencil: boolean; - /** - * The clear stencil value. - * - * @type {number} - * @default 1 - */ - clearStencilValue: number; - /** - * By default the viewport encloses the entire framebuffer If a smaller - * viewport is manually defined, this property is to `true` by the renderer. - * - * @type {boolean} - * @default false - */ - viewport: boolean; - /** - * The viewport value. This value is in physical pixels meaning it incorporates - * the renderer's pixel ratio. The viewport property of render targets or - * the renderer is in logical pixels. - * - * @type {Vector4} - */ - viewportValue: Vector4; - /** - * When the scissor test is active and scissor rectangle smaller than the - * framebuffers dimensions, this property is to `true` by the renderer. - * - * @type {boolean} - * @default false - */ - scissor: boolean; - /** - * The scissor rectangle. - * - * @type {Vector4} - */ - scissorValue: Vector4; - /** - * The active render target. - * - * @type {?RenderTarget} - * @default null - */ - renderTarget: RenderTarget | null; - /** - * The textures of the active render target. - * `null` when no render target is set. - * - * @type {?Array} - * @default null - */ - textures: Array | null; - /** - * The depth texture of the active render target. - * `null` when no render target is set. - * - * @type {?DepthTexture} - * @default null - */ - depthTexture: DepthTexture | null; - /** - * The active cube face. - * - * @type {number} - * @default 0 - */ - activeCubeFace: number; - /** - * The active mipmap level. - * - * @type {number} - * @default 0 - */ - activeMipmapLevel: number; - /** - * The number of MSAA samples. This value is always `1` when - * MSAA isn't used. - * - * @type {number} - * @default 1 - */ - sampleCount: number; - /** - * The active render target's width in physical pixels. - * - * @type {number} - * @default 0 - */ - width: number; - /** - * The active render target's height in physical pixels. - * - * @type {number} - * @default 0 - */ - height: number; - /** - * The occlusion query count. - * - * @type {number} - * @default 0 - */ - occlusionQueryCount: number; - /** - * The current clipping context. - * - * @type {?ClippingContext} - * @default null - */ - clippingContext: ClippingContext | null; - /** - * The current camera. - * - * @type {?Camera} - * @default null - */ - camera: Camera | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isRenderContext: boolean; - /** - * Returns the cache key of this render context. - * - * @return {number} The cache key. - */ - getCacheKey(): number; -} -import { Vector4 } from '../../math/Vector4.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RenderContexts.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RenderContexts.d.ts deleted file mode 100644 index ff6dfc870..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/RenderContexts.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -export default RenderContexts; -/** - * This module manages the render contexts of the renderer. - * - * @private - */ -declare class RenderContexts { - /** - * Constructs a new render context management component. - * - * @param {Renderer} renderer - The renderer. - */ - constructor(renderer: Renderer); - /** - * The renderer. - * - * @type {Renderer} - */ - renderer: Renderer; - /** - * A dictionary that manages render contexts. - * - * @type {Object} - */ - _renderContexts: { - [x: string]: RenderContext; - }; - /** - * Returns a render context for the given scene, camera and render target. - * - * @param {?RenderTarget} [renderTarget=null] - The active render target. - * @param {?MRTNode} [mrt=null] - The MRT configuration - * @param {?number} [callDepth=0] - The call depth of the renderer. - * @return {RenderContext} The render context. - */ - get(renderTarget?: RenderTarget | null, mrt?: MRTNode | null, callDepth?: number | null): RenderContext; - /** - * Frees internal resources. - */ - dispose(): void; -} -import RenderContext from './RenderContext.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RenderList.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RenderList.d.ts deleted file mode 100644 index bc360b020..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/RenderList.d.ts +++ /dev/null @@ -1,169 +0,0 @@ -export default RenderList; -/** - * When the renderer analyzes the scene at the beginning of a render call, - * it stores 3D object for further processing in render lists. Depending on the - * properties of a 3D objects (like their transformation or material state), the - * objects are maintained in ordered lists for the actual rendering. - * - * Render lists are unique per scene and camera combination. - * - * @private - * @augments Pipeline - */ -declare class RenderList { - /** - * Constructs a render list. - * - * @param {Lighting} lighting - The lighting management component. - * @param {Scene} scene - The scene. - * @param {Camera} camera - The camera the scene is rendered with. - */ - constructor(lighting: Lighting, scene: Scene, camera: Camera); - /** - * 3D objects are transformed into render items and stored in this array. - * - * @type {Array} - */ - renderItems: Array; - /** - * The current render items index. - * - * @type {number} - * @default 0 - */ - renderItemsIndex: number; - /** - * A list with opaque render items. - * - * @type {Array} - */ - opaque: Array; - /** - * A list with transparent render items which require - * double pass rendering (e.g. transmissive objects). - * - * @type {Array} - */ - transparentDoublePass: Array; - /** - * A list with transparent render items. - * - * @type {Array} - */ - transparent: Array; - /** - * A list with transparent render bundle data. - * - * @type {Array} - */ - bundles: Array; - /** - * The render list's lights node. This node is later - * relevant for the actual analytical light nodes which - * compute the scene's lighting in the shader. - * - * @type {LightsNode} - */ - lightsNode: LightsNode; - /** - * The scene's lights stored in an array. This array - * is used to setup the lights node. - * - * @type {Array} - */ - lightsArray: Array; - /** - * The scene. - * - * @type {Scene} - */ - scene: Scene; - /** - * The camera the scene is rendered with. - * - * @type {Camera} - */ - camera: Camera; - /** - * How many objects perform occlusion query tests. - * - * @type {number} - * @default 0 - */ - occlusionQueryCount: number; - /** - * This method is called right at the beginning of a render call - * before the scene is analyzed. It prepares the internal data - * structures for the upcoming render lists generation. - * - * @return {RenderList} A reference to this render list. - */ - begin(): RenderList; - /** - * Returns a render item for the giving render item state. The state is defined - * by a series of object-related parameters. - * - * The method avoids object creation by holding render items and reusing them in - * subsequent render calls (just with different property values). - * - * @param {Object3D} object - The 3D object. - * @param {BufferGeometry} geometry - The 3D object's geometry. - * @param {Material} material - The 3D object's material. - * @param {number} groupOrder - The current group order. - * @param {number} z - Th 3D object's depth value (z value in clip space). - * @param {?number} group - {?Object} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. - * @param {ClippingContext} clippingContext - The current clipping context. - * @return {Object} The render item. - */ - getNextRenderItem(object: Object3D, geometry: BufferGeometry, material: Material, groupOrder: number, z: number, group: number | null, clippingContext: ClippingContext): Object; - /** - * Pushes the given object as a render item to the internal render lists. - * The selected lists depend on the object properties. - * - * @param {Object3D} object - The 3D object. - * @param {BufferGeometry} geometry - The 3D object's geometry. - * @param {Material} material - The 3D object's material. - * @param {number} groupOrder - The current group order. - * @param {number} z - Th 3D object's depth value (z value in clip space). - * @param {?number} group - {?Object} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. - * @param {ClippingContext} clippingContext - The current clipping context. - */ - push(object: Object3D, geometry: BufferGeometry, material: Material, groupOrder: number, z: number, group: number | null, clippingContext: ClippingContext): void; - /** - * Inserts the given object as a render item at the start of the internal render lists. - * The selected lists depend on the object properties. - * - * @param {Object3D} object - The 3D object. - * @param {BufferGeometry} geometry - The 3D object's geometry. - * @param {Material} material - The 3D object's material. - * @param {number} groupOrder - The current group order. - * @param {number} z - Th 3D object's depth value (z value in clip space). - * @param {?number} group - {?Object} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. - * @param {ClippingContext} clippingContext - The current clipping context. - */ - unshift(object: Object3D, geometry: BufferGeometry, material: Material, groupOrder: number, z: number, group: number | null, clippingContext: ClippingContext): void; - /** - * Pushes render bundle group data into the render list. - * - * @param {Object} group - Bundle group data. - */ - pushBundle(group: Object): void; - /** - * Pushes a light into the render list. - * - * @param {Light} light - The light. - */ - pushLight(light: Light): void; - /** - * Sorts the internal render lists. - * - * @param {?function(any, any): number} customOpaqueSort - A custom sort function for opaque objects. - * @param {?function(any, any): number} customTransparentSort - A custom sort function for transparent objects. - */ - sort(customOpaqueSort: ((arg0: any, arg1: any) => number) | null, customTransparentSort: ((arg0: any, arg1: any) => number) | null): void; - /** - * This method performs finalizing tasks right after the render lists - * have been generated. - */ - finish(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RenderLists.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RenderLists.d.ts deleted file mode 100644 index d8d26670c..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/RenderLists.d.ts +++ /dev/null @@ -1,41 +0,0 @@ -export default RenderLists; -/** - * This renderer module manages the render lists which are unique - * per scene and camera combination. - * - * @private - */ -declare class RenderLists { - /** - * Constructs a render lists management component. - * - * @param {Lighting} lighting - The lighting management component. - */ - constructor(lighting: Lighting); - /** - * The lighting management component. - * - * @type {Lighting} - */ - lighting: Lighting; - /** - * The internal chain map which holds the render lists. - * - * @type {ChainMap} - */ - lists: ChainMap; - /** - * Returns a render list for the given scene and camera. - * - * @param {Scene} scene - The scene. - * @param {Camera} camera - The camera. - * @return {RenderList} The render list. - */ - get(scene: Scene, camera: Camera): RenderList; - /** - * Frees all internal resources. - */ - dispose(): void; -} -import ChainMap from './ChainMap.js'; -import RenderList from './RenderList.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RenderObject.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RenderObject.d.ts deleted file mode 100644 index 36c013119..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/RenderObject.d.ts +++ /dev/null @@ -1,409 +0,0 @@ -export default RenderObject; -/** - * A render object is the renderer's representation of single entity that gets drawn - * with a draw command. There is no unique mapping of render objects to 3D objects in the - * scene since render objects also depend from the used material, the current render context - * and the current scene's lighting. - * - * In general, the basic process of the renderer is: - * - * - Analyze the 3D objects in the scene and generate render lists containing render items. - * - Process the render lists by calling one or more render commands for each render item. - * - For each render command, request a render object and perform the draw. - * - * The module provides an interface to get data required for the draw command like the actual - * draw parameters or vertex buffers. It also holds a series of caching related methods since - * creating render objects should only be done when necessary. - * - * @private - */ -declare class RenderObject { - /** - * Constructs a new render object. - * - * @param {NodeManager} nodes - Renderer component for managing nodes related logic. - * @param {Geometries} geometries - Renderer component for managing geometries. - * @param {Renderer} renderer - The renderer. - * @param {Object3D} object - The 3D object. - * @param {Material} material - The 3D object's material. - * @param {Scene} scene - The scene the 3D object belongs to. - * @param {Camera} camera - The camera the object should be rendered with. - * @param {LightsNode} lightsNode - The lights node. - * @param {RenderContext} renderContext - The render context. - * @param {ClippingContext} clippingContext - The clipping context. - */ - constructor(nodes: NodeManager, geometries: Geometries, renderer: Renderer, object: Object3D, material: Material, scene: Scene, camera: Camera, lightsNode: LightsNode, renderContext: RenderContext, clippingContext: ClippingContext); - id: number; - /** - * Renderer component for managing nodes related logic. - * - * @type {NodeManager} - * @private - */ - private _nodes; - /** - * Renderer component for managing geometries. - * - * @type {Geometries} - * @private - */ - private _geometries; - /** - * The renderer. - * - * @type {Renderer} - */ - renderer: Renderer; - /** - * The 3D object. - * - * @type {Object3D} - */ - object: Object3D; - /** - * The 3D object's material. - * - * @type {Material} - */ - material: Material; - /** - * The scene the 3D object belongs to. - * - * @type {Scene} - */ - scene: Scene; - /** - * The camera the 3D object should be rendered with. - * - * @type {Camera} - */ - camera: Camera; - /** - * The lights node. - * - * @type {LightsNode} - */ - lightsNode: LightsNode; - /** - * The render context. - * - * @type {RenderContext} - */ - context: RenderContext; - /** - * The 3D object's geometry. - * - * @type {BufferGeometry} - */ - geometry: BufferGeometry; - /** - * The render object's version. - * - * @type {number} - */ - version: number; - /** - * The draw range of the geometry. - * - * @type {?Object} - * @default null - */ - drawRange: Object | null; - /** - * An array holding the buffer attributes - * of the render object. This entails attribute - * definitions on geometry and node level. - * - * @type {?Array} - * @default null - */ - attributes: Array | null; - /** - * An object holding the version of the - * attributes. The keys are the attribute names - * and the values are the attribute versions. - * - * @type {?Object} - * @default null - */ - attributesId: { - [x: string]: number; - } | null; - /** - * A reference to a render pipeline the render - * object is processed with. - * - * @type {RenderPipeline} - * @default null - */ - pipeline: RenderPipeline; - /** - * Only relevant for objects using - * multiple materials. This represents a group entry - * from the respective `BufferGeometry`. - * - * @type {?{start: number, count: number}} - * @default null - */ - group: { - start: number; - count: number; - } | null; - /** - * An array holding the vertex buffers which can - * be buffer attributes but also interleaved buffers. - * - * @type {?Array} - * @default null - */ - vertexBuffers: Array | null; - /** - * The parameters for the draw command. - * - * @type {?Object} - * @default null - */ - drawParams: Object | null; - /** - * If this render object is used inside a render bundle, - * this property points to the respective bundle group. - * - * @type {?BundleGroup} - * @default null - */ - bundle: BundleGroup | null; - /** - * The clipping context. - * - * @type {ClippingContext} - */ - clippingContext: ClippingContext; - /** - * The clipping context's cache key. - * - * @type {string} - */ - clippingContextCacheKey: string; - /** - * The initial node cache key. - * - * @type {number} - */ - initialNodesCacheKey: number; - /** - * The initial cache key. - * - * @type {number} - */ - initialCacheKey: number; - /** - * The node builder state. - * - * @type {?NodeBuilderState} - * @private - * @default null - */ - private _nodeBuilderState; - /** - * An array of bindings. - * - * @type {?Array} - * @private - * @default null - */ - private _bindings; - /** - * Reference to the node material observer. - * - * @type {?NodeMaterialObserver} - * @private - * @default null - */ - private _monitor; - /** - * An event listener which is defined by `RenderObjects`. It performs - * clean up tasks when `dispose()` on this render object. - * - * @method - */ - onDispose: any; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isRenderObject: boolean; - /** - * An event listener which is executed when `dispose()` is called on - * the material of this render object. - * - * @method - */ - onMaterialDispose: () => void; - /** - * An event listener which is executed when `dispose()` is called on - * the geometry of this render object. - * - * @method - */ - onGeometryDispose: () => void; - /** - * Updates the clipping context. - * - * @param {ClippingContext} context - The clipping context to set. - */ - updateClipping(context: ClippingContext): void; - /** - * Whether the clipping requires an update or not. - * - * @type {boolean} - * @readonly - */ - readonly get clippingNeedsUpdate(): boolean; - /** - * The number of clipping planes defined in context of hardware clipping. - * - * @type {number} - * @readonly - */ - readonly get hardwareClippingPlanes(): number; - /** - * Returns the node builder state of this render object. - * - * @return {NodeBuilderState} The node builder state. - */ - getNodeBuilderState(): NodeBuilderState; - /** - * Returns the node material observer of this render object. - * - * @return {NodeMaterialObserver} The node material observer. - */ - getMonitor(): NodeMaterialObserver; - /** - * Returns an array of bind groups of this render object. - * - * @return {Array} The bindings. - */ - getBindings(): Array; - /** - * Returns a binding group by group name of this render object. - * - * @param {string} name - The name of the binding group. - * @return {?BindGroup} The bindings. - */ - getBindingGroup(name: string): BindGroup | null; - /** - * Returns the index of the render object's geometry. - * - * @return {?BufferAttribute} The index. Returns `null` for non-indexed geometries. - */ - getIndex(): BufferAttribute | null; - /** - * Returns the indirect buffer attribute. - * - * @return {?BufferAttribute} The indirect attribute. `null` if no indirect drawing is used. - */ - getIndirect(): BufferAttribute | null; - /** - * Returns the byte offset into the indirect attribute buffer. - * - * @return {number|Array} The byte offset into the indirect attribute buffer. - */ - getIndirectOffset(): number | Array; - /** - * Returns an array that acts as a key for identifying the render object in a chain map. - * - * @return {Array} An array with object references. - */ - getChainArray(): Array; - /** - * This method is used when the geometry of a 3D object has been exchanged and the - * respective render object now requires an update. - * - * @param {BufferGeometry} geometry - The geometry to set. - */ - setGeometry(geometry: BufferGeometry): void; - /** - * Returns the buffer attributes of the render object. The returned array holds - * attribute definitions on geometry and node level. - * - * @return {Array} An array with buffer attributes. - */ - getAttributes(): Array; - /** - * Returns the vertex buffers of the render object. - * - * @return {Array} An array with buffer attribute or interleaved buffers. - */ - getVertexBuffers(): Array; - /** - * Returns the draw parameters for the render object. - * - * @return {?{vertexCount: number, firstVertex: number, instanceCount: number, firstInstance: number}} The draw parameters. - */ - getDrawParameters(): { - vertexCount: number; - firstVertex: number; - instanceCount: number; - firstInstance: number; - } | null; - /** - * Returns the render object's geometry cache key. - * - * The geometry cache key is part of the material cache key. - * - * @return {string} The geometry cache key. - */ - getGeometryCacheKey(): string; - /** - * Returns the render object's material cache key. - * - * The material cache key is part of the render object cache key. - * - * @return {number} The material cache key. - */ - getMaterialCacheKey(): number; - /** - * Whether the geometry requires an update or not. - * - * @type {boolean} - * @readonly - */ - readonly get needsGeometryUpdate(): boolean; - /** - * Whether the render object requires an update or not. - * - * Note: There are two distinct places where render objects are checked for an update. - * - * 1. In `RenderObjects.get()` which is executed when the render object is request. This - * method checks the `needsUpdate` flag and recreates the render object if necessary. - * 2. In `Renderer._renderObjectDirect()` right after getting the render object via - * `RenderObjects.get()`. The render object's NodeMaterialObserver is then used to detect - * a need for a refresh due to material, geometry or object related value changes. - * - * TODO: Investigate if it's possible to merge both steps so there is only a single place - * that performs the 'needsUpdate' check. - * - * @type {boolean} - * @readonly - */ - readonly get needsUpdate(): boolean; - /** - * Returns the dynamic cache key which represents a key that is computed per draw command. - * - * @return {number} The cache key. - */ - getDynamicCacheKey(): number; - /** - * Returns the render object's cache key. - * - * @return {number} The cache key. - */ - getCacheKey(): number; - /** - * Frees internal resources. - */ - dispose(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RenderObjectPipeline.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RenderObjectPipeline.d.ts deleted file mode 100644 index d9631c32e..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/RenderObjectPipeline.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -export default RenderObjectPipeline; -/** - * Class for representing render pipelines. - * - * @private - * @augments Pipeline - */ -declare class RenderObjectPipeline extends Pipeline { - /** - * Constructs a new render object pipeline. - * - * @param {string} cacheKey - The pipeline's cache key. - * @param {ProgrammableStage} vertexProgram - The pipeline's vertex shader. - * @param {ProgrammableStage} fragmentProgram - The pipeline's fragment shader. - */ - constructor(cacheKey: string, vertexProgram: ProgrammableStage, fragmentProgram: ProgrammableStage); - /** - * The pipeline's vertex shader. - * - * @type {ProgrammableStage} - */ - vertexProgram: ProgrammableStage; - /** - * The pipeline's fragment shader. - * - * @type {ProgrammableStage} - */ - fragmentProgram: ProgrammableStage; -} -import Pipeline from './Pipeline.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RenderObjects.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RenderObjects.d.ts deleted file mode 100644 index fcb34a2e6..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/RenderObjects.d.ts +++ /dev/null @@ -1,108 +0,0 @@ -export default RenderObjects; -/** - * This module manages the render objects of the renderer. - * - * @private - */ -declare class RenderObjects { - /** - * Constructs a new render object management component. - * - * @param {Renderer} renderer - The renderer. - * @param {NodeManager} nodes - Renderer component for managing nodes related logic. - * @param {Geometries} geometries - Renderer component for managing geometries. - * @param {Pipelines} pipelines - Renderer component for managing pipelines. - * @param {Bindings} bindings - Renderer component for managing bindings. - * @param {Info} info - Renderer component for managing metrics and monitoring data. - */ - constructor(renderer: Renderer, nodes: NodeManager, geometries: Geometries, pipelines: Pipelines, bindings: Bindings, info: Info); - /** - * The renderer. - * - * @type {Renderer} - */ - renderer: Renderer; - /** - * Renderer component for managing nodes related logic. - * - * @type {NodeManager} - */ - nodes: NodeManager; - /** - * Renderer component for managing geometries. - * - * @type {Geometries} - */ - geometries: Geometries; - /** - * Renderer component for managing pipelines. - * - * @type {Pipelines} - */ - pipelines: Pipelines; - /** - * Renderer component for managing bindings. - * - * @type {Bindings} - */ - bindings: Bindings; - /** - * Renderer component for managing metrics and monitoring data. - * - * @type {Info} - */ - info: Info; - /** - * A dictionary that manages render contexts in chain maps - * for each pass ID. - * - * @type {Object} - */ - chainMaps: { - [x: string]: ChainMap; - }; - /** - * Returns a render object for the given object and state data. - * - * @param {Object3D} object - The 3D object. - * @param {Material} material - The 3D object's material. - * @param {Scene} scene - The scene the 3D object belongs to. - * @param {Camera} camera - The camera the 3D object should be rendered with. - * @param {LightsNode} lightsNode - The lights node. - * @param {RenderContext} renderContext - The render context. - * @param {ClippingContext} clippingContext - The clipping context. - * @param {string} [passId] - An optional ID for identifying the pass. - * @return {RenderObject} The render object. - */ - get(object: Object3D, material: Material, scene: Scene, camera: Camera, lightsNode: LightsNode, renderContext: RenderContext, clippingContext: ClippingContext, passId?: string): RenderObject; - /** - * Returns a chain map for the given pass ID. - * - * @param {string} [passId='default'] - The pass ID. - * @return {ChainMap} The chain map. - */ - getChainMap(passId?: string): ChainMap; - /** - * Frees internal resources. - */ - dispose(): void; - /** - * Factory method for creating render objects with the given list of parameters. - * - * @param {NodeManager} nodes - Renderer component for managing nodes related logic. - * @param {Geometries} geometries - Renderer component for managing geometries. - * @param {Renderer} renderer - The renderer. - * @param {Object3D} object - The 3D object. - * @param {Material} material - The object's material. - * @param {Scene} scene - The scene the 3D object belongs to. - * @param {Camera} camera - The camera the object should be rendered with. - * @param {LightsNode} lightsNode - The lights node. - * @param {RenderContext} renderContext - The render context. - * @param {ClippingContext} clippingContext - The clipping context. - * @param {string} [passId] - An optional ID for identifying the pass. - * @return {RenderObject} The render object. - */ - createRenderObject(nodes: NodeManager, geometries: Geometries, renderer: Renderer, object: Object3D, material: Material, scene: Scene, camera: Camera, lightsNode: LightsNode, renderContext: RenderContext, clippingContext: ClippingContext, passId?: string): RenderObject; -} -import ChainMap from './ChainMap.js'; -import RenderObject from './RenderObject.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RenderPipeline.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RenderPipeline.d.ts deleted file mode 100644 index 51a232c3c..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/RenderPipeline.d.ts +++ /dev/null @@ -1,126 +0,0 @@ -export default RenderPipeline; -/** - * This module is responsible to manage the rendering pipeline setups in apps. - * You usually create a single instance of this class and use it to define - * the output of your render pipeline and post processing effect chain. - * ```js - * const renderPipeline = new RenderPipeline( renderer ); - * - * const scenePass = pass( scene, camera ); - * - * renderPipeline.outputNode = scenePass; - * ``` - * - * Note: This module can only be used with `WebGPURenderer`. - */ -declare class RenderPipeline { - /** - * Constructs a new render pipeline management module. - * - * @param {Renderer} renderer - A reference to the renderer. - * @param {Node} outputNode - An optional output node. - */ - constructor(renderer: Renderer, outputNode?: Node); - /** - * A reference to the renderer. - * - * @type {Renderer} - */ - renderer: Renderer; - /** - * A node which defines the final output of the rendering - * pipeline. This is usually the last node in a chain - * of effect nodes. - * - * @type {Node} - */ - outputNode: Node; - /** - * Whether the default output tone mapping and color - * space transformation should be enabled or not. - * - * This is enabled by default but it must be disabled for - * effects that expect to be executed after tone mapping and color - * space conversion. A typical example is FXAA which - * requires sRGB input. - * - * When set to `false`, the app must control the output - * transformation with `RenderOutputNode`. - * - * ```js - * const outputPass = renderOutput( scenePass ); - * ``` - * - * @type {boolean} - */ - outputColorTransform: boolean; - /** - * Must be set to `true` when the output node changes. - * - * @type {Node} - */ - needsUpdate: Node; - /** - * The full screen quad that is used to render - * the effects. - * - * @private - * @type {QuadMesh} - */ - private _quadMesh; - /** - * The context of the render pipeline stack. - * - * @private - * @type {?Object} - * @default null - */ - private _context; - /** - * The current tone mapping. - * - * @private - * @type {ToneMapping} - */ - private _toneMapping; - /** - * The current output color space. - * - * @private - * @type {ColorSpace} - */ - private _outputColorSpace; - /** - * When `RenderPipeline` is used to apply rendering pipeline and post processing effects, - * the application must use this version of `render()` inside - * its animation loop (not the one from the renderer). - */ - render(): void; - /** - * Returns the current context of the render pipeline stack. - * - * @readonly - * @type {?Object} - */ - readonly get context(): Object | null; - /** - * Frees internal resources. - */ - dispose(): void; - /** - * Updates the state of the module. - * - * @private - */ - private _update; - /** - * When `RenderPipeline` is used to apply rendering pipeline and post processing effects, - * the application must use this version of `renderAsync()` inside - * its animation loop (not the one from the renderer). - * - * @async - * @deprecated - * @return {Promise} A Promise that resolves when the render has been finished. - */ - renderAsync(): Promise; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Renderer.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Renderer.d.ts deleted file mode 100644 index 9ac08a6de..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/Renderer.d.ts +++ /dev/null @@ -1,1422 +0,0 @@ -export default Renderer; -/** - * Animation loop parameter of `renderer.setAnimationLoop()`. - */ -export type onAnimationCallback = (time: DOMHighResTimeStamp, frame?: XRFrame) => any; -/** - * Base class for renderers. - */ -declare class Renderer { - /** - * Renderer options. - * - * @typedef {Object} Renderer~Options - * @property {boolean} [logarithmicDepthBuffer=false] - Whether logarithmic depth buffer is enabled or not. - * @property {boolean} [reversedDepthBuffer=false] - Whether reversed depth buffer is enabled or not. - * @property {boolean} [alpha=true] - Whether the default framebuffer (which represents the final contents of the canvas) should be transparent or opaque. - * @property {boolean} [depth=true] - Whether the default framebuffer should have a depth buffer or not. - * @property {boolean} [stencil=false] - Whether the default framebuffer should have a stencil buffer or not. - * @property {boolean} [antialias=false] - Whether MSAA as the default anti-aliasing should be enabled or not. - * @property {number} [samples=0] - When `antialias` is `true`, `4` samples are used by default. This parameter can set to any other integer value than 0 - * to overwrite the default. - * @property {?Function} [getFallback=null] - This callback function can be used to provide a fallback backend, if the primary backend can't be targeted. - * @property {number} [outputBufferType=HalfFloatType] - Defines the type of output buffers. The default `HalfFloatType` is recommend for best - * quality. To save memory and bandwidth, `UnsignedByteType` might be used. This will reduce rendering quality though. - * @property {boolean} [multiview=false] - If set to `true`, the renderer will use multiview during WebXR rendering if supported. - */ - /** - * Constructs a new renderer. - * - * @param {Backend} backend - The backend the renderer is targeting (e.g. WebGPU or WebGL 2). - * @param {Renderer~Options} [parameters] - The configuration parameter. - - */ - constructor(backend: Backend, parameters?: {}); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isRenderer: boolean; - /** - * A reference to the current backend. - * - * @type {Backend} - */ - backend: Backend; - /** - * Whether the renderer should automatically clear the current rendering target - * before execute a `render()` call. The target can be the canvas (default framebuffer) - * or the current bound render target (custom framebuffer). - * - * @type {boolean} - * @default true - */ - autoClear: boolean; - /** - * When `autoClear` is set to `true`, this property defines whether the renderer - * should clear the color buffer. - * - * @type {boolean} - * @default true - */ - autoClearColor: boolean; - /** - * When `autoClear` is set to `true`, this property defines whether the renderer - * should clear the depth buffer. - * - * @type {boolean} - * @default true - */ - autoClearDepth: boolean; - /** - * When `autoClear` is set to `true`, this property defines whether the renderer - * should clear the stencil buffer. - * - * @type {boolean} - * @default true - */ - autoClearStencil: boolean; - /** - * Whether the default framebuffer should be transparent or opaque. - * - * @type {boolean} - * @default true - */ - alpha: boolean; - /** - * Whether logarithmic depth buffer is enabled or not. - * - * @type {boolean} - * @default false - * @readonly - */ - readonly logarithmicDepthBuffer: boolean; - /** - * Whether reversed depth buffer is enabled or not. - * - * @type {boolean} - * @default false - * @readonly - */ - readonly reversedDepthBuffer: boolean; - /** - * Defines the output color space of the renderer. - * - * @type {string} - * @default SRGBColorSpace - */ - outputColorSpace: string; - /** - * Defines the tone mapping of the renderer. - * - * @type {number} - * @default NoToneMapping - */ - toneMapping: number; - /** - * Defines the tone mapping exposure. - * - * @type {number} - * @default 1 - */ - toneMappingExposure: number; - /** - * Whether the renderer should sort its render lists or not. - * - * Note: Sorting is used to attempt to properly render objects that have some degree of transparency. - * By definition, sorting objects may not work in all cases. Depending on the needs of application, - * it may be necessary to turn off sorting and use other methods to deal with transparency rendering - * e.g. manually determining each object's rendering order. - * - * @type {boolean} - * @default true - */ - sortObjects: boolean; - /** - * Whether the default framebuffer should have a depth buffer or not. - * - * @type {boolean} - * @default true - */ - depth: boolean; - /** - * Whether the default framebuffer should have a stencil buffer or not. - * - * @type {boolean} - * @default false - */ - stencil: boolean; - /** - * Holds a series of statistical information about the GPU memory - * and the rendering process. Useful for debugging and monitoring. - * - * @type {Info} - */ - info: Info; - /** - * A global context node that stores override nodes for specific transformations or calculations. - * These nodes can be used to replace default behavior in the rendering pipeline. - * - * @type {ContextNode} - * @property {Object} value - The context value object. - */ - contextNode: ContextNode; - /** - * The node library defines how certain library objects like materials, lights - * or tone mapping functions are mapped to node types. This is required since - * although instances of classes like `MeshBasicMaterial` or `PointLight` can - * be part of the scene graph, they are internally represented as nodes for - * further processing. - * - * @type {NodeLibrary} - */ - library: NodeLibrary; - /** - * A map-like data structure for managing lights. - * - * @type {Lighting} - */ - lighting: Lighting; - /** - * The number of MSAA samples. - * - * @private - * @type {number} - * @default 0 - */ - private _samples; - /** - * Callback when the canvas has been resized. - * - * @private - */ - private _onCanvasTargetResize; - /** - * The canvas target for rendering. - * - * @private - * @type {CanvasTarget} - */ - private _canvasTarget; - /** - * The inspector provides information about the internal renderer state. - * - * @private - * @type {InspectorBase} - */ - private _inspector; - /** - * This callback function can be used to provide a fallback backend, if the primary backend can't be targeted. - * - * @private - * @type {?Function} - */ - private _getFallback; - /** - * A reference to a renderer module for managing shader attributes. - * - * @private - * @type {?Attributes} - * @default null - */ - private _attributes; - /** - * A reference to a renderer module for managing geometries. - * - * @private - * @type {?Geometries} - * @default null - */ - private _geometries; - /** - * A reference to a renderer module for managing node related logic. - * - * @private - * @type {?NodeManager} - * @default null - */ - private _nodes; - /** - * A reference to a renderer module for managing the internal animation loop. - * - * @private - * @type {?Animation} - * @default null - */ - private _animation; - /** - * A reference to a renderer module for managing shader program bindings. - * - * @private - * @type {?Bindings} - * @default null - */ - private _bindings; - /** - * A reference to a renderer module for managing render objects. - * - * @private - * @type {?RenderObjects} - * @default null - */ - private _objects; - /** - * A reference to a renderer module for managing render and compute pipelines. - * - * @private - * @type {?Pipelines} - * @default null - */ - private _pipelines; - /** - * A reference to a renderer module for managing render bundles. - * - * @private - * @type {?RenderBundles} - * @default null - */ - private _bundles; - /** - * A reference to a renderer module for managing render lists. - * - * @private - * @type {?RenderLists} - * @default null - */ - private _renderLists; - /** - * A reference to a renderer module for managing render contexts. - * - * @private - * @type {?RenderContexts} - * @default null - */ - private _renderContexts; - /** - * A reference to a renderer module for managing textures. - * - * @private - * @type {?Textures} - * @default null - */ - private _textures; - /** - * A reference to a renderer module for backgrounds. - * - * @private - * @type {?Background} - * @default null - */ - private _background; - /** - * Cache for the fullscreen quad. - * This fullscreen quad is used for internal render passes - * like the tone mapping and color space output pass. - * - * @private - * @type {Map} - */ - private _quadCache; - /** - * A reference to the current render context. - * - * @private - * @type {?RenderContext} - * @default null - */ - private _currentRenderContext; - /** - * A custom sort function for the opaque render list. - * - * @private - * @type {?Function} - * @default null - */ - private _opaqueSort; - /** - * A custom sort function for the transparent render list. - * - * @private - * @type {?Function} - * @default null - */ - private _transparentSort; - /** - * Cache of framebuffer targets per canvas target. - * - * @private - * @type {Map} - */ - private _frameBufferTargets; - /** - * The clear color value. - * - * @private - * @type {Color4} - */ - private _clearColor; - /** - * The clear depth value. - * - * @private - * @type {number} - * @default 1 - */ - private _clearDepth; - /** - * The clear stencil value. - * - * @private - * @type {number} - * @default 0 - */ - private _clearStencil; - /** - * The current render target. - * - * @private - * @type {?RenderTarget} - * @default null - */ - private _renderTarget; - /** - * The active cube face. - * - * @private - * @type {number} - * @default 0 - */ - private _activeCubeFace; - /** - * The active mipmap level. - * - * @private - * @type {number} - * @default 0 - */ - private _activeMipmapLevel; - /** - * The current output render target. - * - * @private - * @type {?RenderTarget} - * @default null - */ - private _outputRenderTarget; - /** - * The MRT setting. - * - * @private - * @type {?MRTNode} - * @default null - */ - private _mrt; - /** - * This function defines how a render object is going - * to be rendered. - * - * @private - * @type {?Function} - * @default null - */ - private _renderObjectFunction; - /** - * Used to keep track of the current render object function. - * - * @private - * @type {?Function} - * @default null - */ - private _currentRenderObjectFunction; - /** - * Used to keep track of the current render bundle. - * - * @private - * @type {?RenderBundle} - * @default null - */ - private _currentRenderBundle; - /** - * Next to `_renderObjectFunction()`, this function provides another hook - * for influencing the render process of a render object. It is meant for internal - * use and only relevant for `compileAsync()` right now. Instead of using - * the default logic of `_renderObjectDirect()` which actually draws the render object, - * a different function might be used which performs no draw but just the node - * and pipeline updates. - * - * @private - * @type {Function} - */ - private _handleObjectFunction; - /** - * Indicates whether the device has been lost or not. In WebGL terms, the device - * lost is considered as a context lost. When this is set to `true`, rendering - * isn't possible anymore. - * - * @private - * @type {boolean} - * @default false - */ - private _isDeviceLost; - /** - * A callback function that defines what should happen when a device/context lost occurs. - * - * @type {Function} - */ - onDeviceLost: Function; - /** - * A callback function that defines what should happen when an uncaptured - * backend error is reported (e.g. a WebGPU validation/out-of-memory/internal - * error raised outside an error scope). Applications can override this to - * surface errors in their own UI without letting them escalate to a device - * loss. The default implementation logs to the console. - * - * @type {Function} - */ - onError: Function; - /** - * Defines the type of output buffers. The default `HalfFloatType` is recommend for - * best quality. To save memory and bandwidth, `UnsignedByteType` might be used. - * This will reduce rendering quality though. - * - * @private - * @type {number} - * @default HalfFloatType - */ - private _outputBufferType; - /** - * A cache for shadow nodes per material - * - * @private - * @type {WeakMap} - */ - private _cacheShadowNodes; - /** - * Whether the renderer has been initialized or not. - * - * @private - * @type {boolean} - * @default false - */ - private _initialized; - /** - * The call depth of the renderer. Counts the number of - * nested render calls. - * - * @private - * @type {number} - * @default - 1 - */ - private _callDepth; - /** - * A reference to the promise which initializes the renderer. - * - * @private - * @type {?Promise} - * @default null - */ - private _initPromise; - /** - * An array of compilation promises which are used in `compileAsync()`. - * - * @private - * @type {?Array} - * @default null - */ - private _compilationPromises; - /** - * Whether the renderer should render transparent render objects or not. - * - * @type {boolean} - * @default true - */ - transparent: boolean; - /** - * Whether the renderer should render opaque render objects or not. - * - * @type {boolean} - * @default true - */ - opaque: boolean; - /** - * Shadow map configuration - * @typedef {Object} ShadowMapConfig - * @property {boolean} enabled - Whether to globally enable shadows or not. - * @property {boolean} transmitted - Whether to enable light transmission through non-opaque materials. - * @property {number} type - The shadow map type. - */ - /** - * The renderer's shadow configuration. - * - * @type {ShadowMapConfig} - */ - shadowMap: { - /** - * - Whether to globally enable shadows or not. - */ - enabled: boolean; - /** - * - Whether to enable light transmission through non-opaque materials. - */ - transmitted: boolean; - /** - * - The shadow map type. - */ - type: number; - }; - /** - * XR configuration. - * @typedef {Object} XRConfig - * @property {boolean} enabled - Whether to globally enable XR or not. - */ - /** - * The renderer's XR manager. - * - * @type {XRManager} - */ - xr: XRManager; - /** - * Debug configuration. - * @typedef {Object} DebugConfig - * @property {boolean} checkShaderErrors - Whether shader errors should be checked or not. - * @property {?Function} onShaderError - A callback function that is executed when a shader error happens. Only supported with WebGL 2 right now. - * @property {Function} getShaderAsync - Allows the get the raw shader code for the given scene, camera and 3D object. - */ - /** - * The renderer's debug configuration. - * - * @type {DebugConfig} - */ - debug: { - /** - * - Whether shader errors should be checked or not. - */ - checkShaderErrors: boolean; - /** - * - A callback function that is executed when a shader error happens. Only supported with WebGL 2 right now. - */ - onShaderError: Function | null; - /** - * - Allows the get the raw shader code for the given scene, camera and 3D object. - */ - getShaderAsync: Function; - }; - /** - * Initializes the renderer so it is ready for usage. - * - * @async - * @return {Promise} A Promise that resolves when the renderer has been initialized. - */ - init(): Promise; - /** - * A reference to the canvas element the renderer is drawing to. - * This value of this property will automatically be created by - * the renderer. - * - * @type {HTMLCanvasElement|OffscreenCanvas} - */ - get domElement(): HTMLCanvasElement | OffscreenCanvas; - /** - * The coordinate system of the renderer. The value of this property - * depends on the selected backend. Either `THREE.WebGLCoordinateSystem` or - * `THREE.WebGPUCoordinateSystem`. - * - * @readonly - * @type {number} - */ - readonly get coordinateSystem(): number; - /** - * Compiles all materials in the given scene. This can be useful to avoid a - * phenomenon which is called "shader compilation stutter", which occurs when - * rendering an object with a new shader for the first time. - * - * If you want to add a 3D object to an existing scene, use the third optional - * parameter for applying the target scene. Note that the (target) scene's lighting - * and environment must be configured before calling this method. - * - * @async - * @param {Object3D} scene - The scene or 3D object to precompile. - * @param {Camera} camera - The camera that is used to render the scene. - * @param {?Scene} targetScene - If the first argument is a 3D object, this parameter must represent the scene the 3D object is going to be added. - * @return {Promise} A Promise that resolves when the compile has been finished. - */ - compileAsync(scene: Object3D, camera: Camera, targetScene?: Scene | null): Promise; - /** - * Renders the scene in an async fashion. - * - * @async - * @deprecated - * @param {Object3D} scene - The scene or 3D object to render. - * @param {Camera} camera - The camera. - * @return {Promise} A Promise that resolves when the render has been finished. - */ - renderAsync(scene: Object3D, camera: Camera): Promise; - /** - * Can be used to synchronize CPU operations with GPU tasks. So when this method is called, - * the CPU waits for the GPU to complete its operation (e.g. a compute task). - * - * @async - * @deprecated - * @return {Promise} A Promise that resolves when synchronization has been finished. - */ - waitForGPU(): Promise; - set inspector(value: InspectorBase); - /** - * The inspector instance. The inspector can be any class that extends from `InspectorBase`. - * - * @type {InspectorBase} - */ - get inspector(): InspectorBase; - /** - * Enables or disables high precision for model-view and normal-view matrices. - * When enabled, will use CPU 64-bit precision for higher precision instead of GPU 32-bit for higher performance. - * - * NOTE: 64-bit precision is not compatible with `InstancedMesh` and `SkinnedMesh`. - * - * @param {boolean} value - Whether to enable or disable high precision. - * @type {boolean} - */ - set highPrecision(value: boolean); - /** - * Returns whether high precision is enabled or not. - * - * @return {boolean} Whether high precision is enabled or not. - * @type {boolean} - */ - get highPrecision(): boolean; - /** - * Sets the given MRT configuration. - * - * @param {MRTNode} mrt - The MRT node to set. - * @return {Renderer} A reference to this renderer. - */ - setMRT(mrt: MRTNode): Renderer; - /** - * Returns the MRT configuration. - * - * @return {MRTNode} The MRT configuration. - */ - getMRT(): MRTNode; - /** - * Returns the output buffer type. - * - * @return {number} The output buffer type. - */ - getOutputBufferType(): number; - /** - * Returns the output buffer type. - * - * @deprecated since r182. Use `.getOutputBufferType()` instead. - * @return {number} The output buffer type. - */ - getColorBufferType(): number; - /** - * Default implementation of the device lost callback. - * - * @private - * @param {Object} info - Information about the context lost. - */ - private _onDeviceLost; - /** - * Default implementation of the uncaptured backend error callback. - * - * @private - * @param {Object} info - Information about the uncaptured error. - */ - private _onError; - /** - * Renders the given render bundle. - * - * @private - * @param {Object} bundle - Render bundle data. - * @param {Scene} sceneRef - The scene the render bundle belongs to. - * @param {LightsNode} lightsNode - The lights node. - */ - private _renderBundle; - /** - * Renders the scene or 3D object with the given camera. This method can only be called - * if the renderer has been initialized. When using `render()` inside an animation loop, - * it's guaranteed the renderer will be initialized. The animation loop must be defined - * with {@link Renderer#setAnimationLoop} though. - * - * For all other use cases (like when using on-demand rendering), you must call - * {@link Renderer#init} before rendering. - * - * The target of the method is the default framebuffer (meaning the canvas) - * or alternatively a render target when specified via `setRenderTarget()`. - * - * @param {Object3D} scene - The scene or 3D object to render. - * @param {Camera} camera - The camera to render the scene with. - */ - render(scene: Object3D, camera: Camera): void; - /** - * Returns whether the renderer has been initialized or not. - * - * @readonly - * @return {boolean} Whether the renderer has been initialized or not. - */ - readonly get initialized(): boolean; - _renderOutputLayers(quad: any, renderTarget: any): void; - /** - * Returns an internal render target which is used when computing the output tone mapping - * and color space conversion. Unlike in `WebGLRenderer`, this is done in a separate render - * pass and not inline to achieve more correct results. - * - * @private - * @return {?RenderTarget} The render target. The method returns `null` if no output conversion should be applied. - */ - private _getFrameBufferTarget; - /** - * Renders the scene or 3D object with the given camera. - * - * @private - * @param {Object3D} scene - The scene or 3D object to render. - * @param {Camera} camera - The camera to render the scene with. - * @param {boolean} [useFrameBufferTarget=true] - Whether to use a framebuffer target or not. - * @return {RenderContext} The current render context. - */ - private _renderScene; - _setXRLayerSize(width: any, height: any): void; - /** - * The output pass performs tone mapping and color space conversion. - * - * @private - * @param {RenderTarget} renderTarget - The current render target. - */ - private _renderOutput; - /** - * Returns the maximum available anisotropy for texture filtering. - * - * @return {number} The maximum available anisotropy. - */ - getMaxAnisotropy(): number; - /** - * Returns the active cube face. - * - * @return {number} The active cube face. - */ - getActiveCubeFace(): number; - /** - * Returns the active mipmap level. - * - * @return {number} The active mipmap level. - */ - getActiveMipmapLevel(): number; - /** - * Applications are advised to always define the animation loop - * with this method and not manually with `requestAnimationFrame()` - * for best compatibility. - * - * @async - * @param {?onAnimationCallback} callback - The application's animation loop. - * @return {Promise} A Promise that resolves when the set has been executed. - */ - setAnimationLoop(callback: onAnimationCallback | null): Promise; - /** - * Returns the current animation loop callback. - * - * @return {?Function} The current animation loop callback. - */ - getAnimationLoop(): Function | null; - /** - * Can be used to transfer buffer data from a storage buffer attribute - * from the GPU to the CPU in context of compute shaders. - * - * @async - * @param {BufferAttribute} attribute - The storage buffer attribute to read frm. - * @param {ReadbackBuffer|ArrayBuffer} target - The storage buffer attribute. - * @param {number} offset - The storage buffer attribute. - * @param {number} count - The offset from which to start reading the - * @return {Promise} A promise that resolves with the buffer data when the data are ready. - */ - getArrayBufferAsync(attribute: BufferAttribute, target?: ReadbackBuffer | ArrayBuffer, offset?: number, count?: number): Promise; - /** - * Returns the rendering context. - * - * @return {GPUCanvasContext|WebGL2RenderingContext} The rendering context. - */ - getContext(): GPUCanvasContext | WebGL2RenderingContext; - /** - * Returns the pixel ratio. - * - * @return {number} The pixel ratio. - */ - getPixelRatio(): number; - /** - * Returns the drawing buffer size in physical pixels. This method honors the pixel ratio. - * - * @param {Vector2} target - The method writes the result in this target object. - * @return {Vector2} The drawing buffer size. - */ - getDrawingBufferSize(target: Vector2): Vector2; - /** - * Returns the renderer's size in logical pixels. This method does not honor the pixel ratio. - * - * @param {Vector2} target - The method writes the result in this target object. - * @return {Vector2} The renderer's size in logical pixels. - */ - getSize(target: Vector2): Vector2; - /** - * Sets the given pixel ratio and resizes the canvas if necessary. - * - * @param {number} [value=1] - The pixel ratio. - */ - setPixelRatio(value?: number): void; - /** - * This method allows to define the drawing buffer size by specifying - * width, height and pixel ratio all at once. The size of the drawing - * buffer is computed with this formula: - * ```js - * size.x = width * pixelRatio; - * size.y = height * pixelRatio; - * ``` - * - * @param {number} width - The width in logical pixels. - * @param {number} height - The height in logical pixels. - * @param {number} pixelRatio - The pixel ratio. - */ - setDrawingBufferSize(width: number, height: number, pixelRatio: number): void; - /** - * Sets the size of the renderer. - * - * @param {number} width - The width in logical pixels. - * @param {number} height - The height in logical pixels. - * @param {boolean} [updateStyle=true] - Whether to update the `style` attribute of the canvas or not. - */ - setSize(width: number, height: number, updateStyle?: boolean): void; - /** - * Defines a manual sort function for the opaque render list. - * Pass `null` to use the default sort. - * - * @param {Function} method - The sort function. - */ - setOpaqueSort(method: Function): void; - /** - * Defines a manual sort function for the transparent render list. - * Pass `null` to use the default sort. - * - * @param {Function} method - The sort function. - */ - setTransparentSort(method: Function): void; - /** - * Returns the scissor rectangle. - * - * @param {Vector4} target - The method writes the result in this target object. - * @return {Vector4} The scissor rectangle. - */ - getScissor(target: Vector4): Vector4; - /** - * Defines the scissor rectangle. - * - * @param {number | Vector4} x - The horizontal coordinate for the upper left corner of the box in logical pixel unit. - * Instead of passing four arguments, the method also works with a single four-dimensional vector. - * @param {number} y - The vertical coordinate for the upper left corner of the box in logical pixel unit. - * @param {number} width - The width of the scissor box in logical pixel unit. - * @param {number} height - The height of the scissor box in logical pixel unit. - */ - setScissor(x: number | Vector4, y: number, width: number, height: number): void; - /** - * Returns the scissor test value. - * - * @return {boolean} Whether the scissor test should be enabled or not. - */ - getScissorTest(): boolean; - /** - * Defines the scissor test. - * - * @param {boolean} boolean - Whether the scissor test should be enabled or not. - */ - setScissorTest(boolean: boolean): void; - /** - * Returns the viewport definition. - * - * @param {Vector4} target - The method writes the result in this target object. - * @return {Vector4} The viewport definition. - */ - getViewport(target: Vector4): Vector4; - /** - * Defines the viewport. - * - * @param {number | Vector4} x - The horizontal coordinate for the upper left corner of the viewport origin in logical pixel unit. - * @param {number} y - The vertical coordinate for the upper left corner of the viewport origin in logical pixel unit. - * @param {number} width - The width of the viewport in logical pixel unit. - * @param {number} height - The height of the viewport in logical pixel unit. - * @param {number} minDepth - The minimum depth value of the viewport. WebGPU only. - * @param {number} maxDepth - The maximum depth value of the viewport. WebGPU only. - */ - setViewport(x: number | Vector4, y: number, width: number, height: number, minDepth?: number, maxDepth?: number): void; - /** - * Returns the clear color. - * - * @param {Color} target - The method writes the result in this target object. - * @return {Color} The clear color. - */ - getClearColor(target: Color): Color; - /** - * Defines the clear color and optionally the clear alpha. - * - * @param {Color} color - The clear color. - * @param {number} [alpha=1] - The clear alpha. - */ - setClearColor(color: Color, alpha?: number): void; - /** - * Returns the clear alpha. - * - * @return {number} The clear alpha. - */ - getClearAlpha(): number; - /** - * Defines the clear alpha. - * - * @param {number} alpha - The clear alpha. - */ - setClearAlpha(alpha: number): void; - /** - * Returns the clear depth. - * - * @return {number} The clear depth. - */ - getClearDepth(): number; - /** - * Defines the clear depth. - * - * @param {number} depth - The clear depth. - */ - setClearDepth(depth: number): void; - /** - * Returns the clear stencil. - * - * @return {number} The clear stencil. - */ - getClearStencil(): number; - /** - * Defines the clear stencil. - * - * @param {number} stencil - The clear stencil. - */ - setClearStencil(stencil: number): void; - /** - * This method performs an occlusion query for the given 3D object. - * It returns `true` if the given 3D object is fully occluded by other - * 3D objects in the scene. - * - * @param {Object3D} object - The 3D object to test. - * @return {boolean} Whether the 3D object is fully occluded or not. - */ - isOccluded(object: Object3D): boolean; - /** - * Performs a manual clear operation. This method ignores `autoClear` properties. - * - * @param {boolean} [color=true] - Whether the color buffer should be cleared or not. - * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not. - * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not. - */ - clear(color?: boolean, depth?: boolean, stencil?: boolean): void; - /** - * Performs a manual clear operation of the color buffer. This method ignores `autoClear` properties. - */ - clearColor(): void; - /** - * Performs a manual clear operation of the depth buffer. This method ignores `autoClear` properties. - */ - clearDepth(): void; - /** - * Performs a manual clear operation of the stencil buffer. This method ignores `autoClear` properties. - */ - clearStencil(): void; - /** - * Async version of {@link Renderer#clear}. - * - * @async - * @deprecated - * @param {boolean} [color=true] - Whether the color buffer should be cleared or not. - * @param {boolean} [depth=true] - Whether the depth buffer should be cleared or not. - * @param {boolean} [stencil=true] - Whether the stencil buffer should be cleared or not. - * @return {Promise} A Promise that resolves when the clear operation has been executed. - */ - clearAsync(color?: boolean, depth?: boolean, stencil?: boolean): Promise; - /** - * Async version of {@link Renderer#clearColor}. - * - * @async - * @deprecated - * @return {Promise} A Promise that resolves when the clear operation has been executed. - */ - clearColorAsync(): Promise; - /** - * Async version of {@link Renderer#clearDepth}. - * - * @async - * @deprecated - * @return {Promise} A Promise that resolves when the clear operation has been executed. - */ - clearDepthAsync(): Promise; - /** - * Async version of {@link Renderer#clearStencil}. - * - * @async - * @deprecated - * @return {Promise} A Promise that resolves when the clear operation has been executed. - */ - clearStencilAsync(): Promise; - /** - * Returns `true` if a framebuffer target is needed to perform tone mapping or color space conversion. - * If this is the case, the renderer allocates an internal render target for that purpose. - * - */ - get needsFrameBufferTarget(): boolean; - /** - * The number of samples used for multi-sample anti-aliasing (MSAA). - * - * @type {number} - * @default 0 - */ - get samples(): number; - /** - * The current number of samples used for multi-sample anti-aliasing (MSAA). - * - * When rendering to a custom render target, the number of samples of that render target is used. - * If the renderer needs an internal framebuffer target for tone mapping or color space conversion, - * the number of samples is set to 0. - * - * @type {number} - */ - get currentSamples(): number; - /** - * The current tone mapping of the renderer. When not producing screen output, - * the tone mapping is always `NoToneMapping`. - * - * @type {number} - */ - get currentToneMapping(): number; - /** - * The current color space of the renderer. When not producing screen output, - * the color space is always the working color space. - * - * @type {string} - */ - get currentColorSpace(): string; - /** - * Returns `true` if the rendering settings are set to screen output. - * - * @returns {boolean} True if the current render target is the same of output render target or `null`, otherwise false. - */ - get isOutputTarget(): boolean; - /** - * Frees all internal resources of the renderer. Call this method if the renderer - * is no longer in use by your app. - */ - dispose(): void; - /** - * Sets the given render target. Calling this method means the renderer does not - * target the default framebuffer (meaning the canvas) anymore but a custom framebuffer. - * Use `null` as the first argument to reset the state. - * - * @param {?RenderTarget} renderTarget - The render target to set. - * @param {number} [activeCubeFace=0] - The active cube face. - * @param {number} [activeMipmapLevel=0] - The active mipmap level. - */ - setRenderTarget(renderTarget: RenderTarget | null, activeCubeFace?: number, activeMipmapLevel?: number): void; - /** - * Returns the current render target. - * - * @return {?RenderTarget} The render target. Returns `null` if no render target is set. - */ - getRenderTarget(): RenderTarget | null; - /** - * Sets the output render target for the renderer. - * - * @param {?RenderTarget} renderTarget - The render target to set as the output target. - */ - setOutputRenderTarget(renderTarget: RenderTarget | null): void; - /** - * Returns the current output target. - * - * @return {?RenderTarget} The current output render target. Returns `null` if no output target is set. - */ - getOutputRenderTarget(): RenderTarget | null; - /** - * Sets the canvas target. The canvas target manages the HTML canvas - * or the offscreen canvas the renderer draws into. - * - * @param {CanvasTarget} canvasTarget - The canvas target. - */ - setCanvasTarget(canvasTarget: CanvasTarget): void; - /** - * Returns the current canvas target. - * - * @return {CanvasTarget} The current canvas target. - */ - getCanvasTarget(): CanvasTarget; - /** - * Resets the renderer to the initial state before WebXR started. - * - * @private - */ - private _resetXRState; - /** - * Callback for {@link Renderer#setRenderObjectFunction}. - * - * @callback renderObjectFunction - * @param {Object3D} object - The 3D object. - * @param {Scene} scene - The scene the 3D object belongs to. - * @param {Camera} camera - The camera the object should be rendered with. - * @param {BufferGeometry} geometry - The object's geometry. - * @param {Material} material - The object's material. - * @param {?Object} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. - * @param {LightsNode} lightsNode - The current lights node. - * @param {ClippingContext} clippingContext - The clipping context. - * @param {?string} [passId=null] - An optional ID for identifying the pass. - */ - /** - * Sets the given render object function. Calling this method overwrites the default implementation - * which is {@link Renderer#renderObject}. Defining a custom function can be useful - * if you want to modify the way objects are rendered. For example you can define things like "every - * object that has material of a certain type should perform a pre-pass with a special overwrite material". - * The custom function must always call `renderObject()` in its implementation. - * - * Use `null` as the first argument to reset the state. - * - * @param {?renderObjectFunction} renderObjectFunction - The render object function. - */ - setRenderObjectFunction(renderObjectFunction: ((object: Object3D, scene: Scene, camera: Camera, geometry: BufferGeometry, material: Material, group: Object | null, lightsNode: LightsNode, clippingContext: ClippingContext, passId?: string | null | undefined) => any) | null): void; - /** - * Returns the current render object function. - * - * @return {?Function} The current render object function. Returns `null` if no function is set. - */ - getRenderObjectFunction(): Function | null; - /** - * Execute a single or an array of compute nodes. This method can only be called - * if the renderer has been initialized. - * - * @param {Node|Array} computeNodes - The compute node(s). - * @param {number|Array|IndirectStorageBufferAttribute} [dispatchSize=null] - * - A single number representing count, or - * - An array [x, y, z] representing dispatch size, or - * - A IndirectStorageBufferAttribute for indirect dispatch size. - * @return {Promise|undefined} A Promise that resolve when the compute has finished. Only returned when the renderer has not been initialized. - */ - compute(computeNodes: Node | Array, dispatchSize?: number | Array | IndirectStorageBufferAttribute): Promise | undefined; - /** - * Execute a single or an array of compute nodes. - * - * @async - * @param {Node|Array} computeNodes - The compute node(s). - * @param {number|Array|IndirectStorageBufferAttribute} [dispatchSize=null] - * - A single number representing count, or - * - An array [x, y, z] representing dispatch size, or - * - A IndirectStorageBufferAttribute for indirect dispatch size. - * @return {Promise} A Promise that resolve when the compute has finished. - */ - computeAsync(computeNodes: Node | Array, dispatchSize?: number | Array | IndirectStorageBufferAttribute): Promise; - /** - * Checks if the given feature is supported by the selected backend. - * - * @async - * @deprecated - * @param {string} name - The feature's name. - * @return {Promise} A Promise that resolves with a bool that indicates whether the feature is supported or not. - */ - hasFeatureAsync(name: string): Promise; - resolveTimestampsAsync(type?: string): Promise; - /** - * Checks if the given feature is supported by the selected backend. If the - * renderer has not been initialized, this method always returns `false`. - * - * @param {string} name - The feature's name. - * @return {boolean} Whether the feature is supported or not. - */ - hasFeature(name: string): boolean; - /** - * Returns `true` when the renderer has been initialized. - * - * @return {boolean} Whether the renderer has been initialized or not. - */ - hasInitialized(): boolean; - /** - * Initializes the given textures. Useful for preloading a texture rather than waiting until first render - * (which can cause noticeable lags due to decode and GPU upload overhead). - * - * @async - * @deprecated - * @param {Texture} texture - The texture. - * @return {Promise} A Promise that resolves when the texture has been initialized. - */ - initTextureAsync(texture: Texture): Promise; - /** - * Initializes the given texture. Useful for preloading a texture rather than waiting until first render - * (which can cause noticeable lags due to decode and GPU upload overhead). - * - * This method can only be used if the renderer has been initialized. - * - * @param {Texture} texture - The texture. - */ - initTexture(texture: Texture): void; - /** - * Initializes the given render target. - * - * @param {RenderTarget} renderTarget - The render target to intialize. - */ - initRenderTarget(renderTarget: RenderTarget): void; - /** - * Copies the current bound framebuffer into the given texture. - * - * @param {FramebufferTexture} framebufferTexture - The texture. - * @param {?(Vector2|Vector4)} [rectangle=null] - A two or four dimensional vector that defines the rectangular portion of the framebuffer that should be copied. - */ - copyFramebufferToTexture(framebufferTexture: FramebufferTexture, rectangle?: (Vector2 | Vector4) | null): void; - /** - * Copies data of the given source texture into a destination texture. - * - * @param {Texture} srcTexture - The source texture. - * @param {Texture} dstTexture - The destination texture. - * @param {Box2|Box3} [srcRegion=null] - A bounding box which describes the source region. Can be two or three-dimensional. - * @param {Vector2|Vector3} [dstPosition=null] - A vector that represents the origin of the destination region. Can be two or three-dimensional. - * @param {number} [srcLevel=0] - The source mip level to copy from. - * @param {number} [dstLevel=0] - The destination mip level to copy to. - */ - copyTextureToTexture(srcTexture: Texture, dstTexture: Texture, srcRegion?: Box2 | Box3, dstPosition?: Vector2 | Vector3, srcLevel?: number, dstLevel?: number): void; - /** - * Reads pixel data from the given render target. - * - * @async - * @param {RenderTarget} renderTarget - The render target to read from. - * @param {number} x - The `x` coordinate of the copy region's origin. - * @param {number} y - The `y` coordinate of the copy region's origin. - * @param {number} width - The width of the copy region. - * @param {number} height - The height of the copy region. - * @param {number} [textureIndex=0] - The texture index of a MRT render target. - * @param {number} [faceIndex=0] - The active cube face index. - * @return {Promise} A Promise that resolves when the read has been finished. The resolve provides the read data as a typed array. - */ - readRenderTargetPixelsAsync(renderTarget: RenderTarget, x: number, y: number, width: number, height: number, textureIndex?: number, faceIndex?: number): Promise; - /** - * Analyzes the given 3D object's hierarchy and builds render lists from the - * processed hierarchy. - * - * @private - * @param {Object3D} object - The 3D object to process (usually a scene). - * @param {Camera} camera - The camera the object is rendered with. - * @param {number} groupOrder - The group order is derived from the `renderOrder` of groups and is used to group 3D objects within groups. - * @param {RenderList} renderList - The current render list. - * @param {ClippingContext} clippingContext - The current clipping context. - */ - private _projectObject; - /** - * Renders the given render bundles. - * - * @private - * @param {Array} bundles - Array with render bundle data. - * @param {Scene} sceneRef - The scene the render bundles belong to. - * @param {LightsNode} lightsNode - The current lights node. - */ - private _renderBundles; - /** - * Renders the transparent objects from the given render lists. - * - * @private - * @param {Array} renderList - The transparent render list. - * @param {Array} doublePassList - The list of transparent objects which require a double pass (e.g. because of transmission). - * @param {Camera} camera - The camera the render list should be rendered with. - * @param {Scene} scene - The scene the render list belongs to. - * @param {LightsNode} lightsNode - The current lights node. - */ - private _renderTransparents; - /** - * Renders the objects from the given render list. - * - * @private - * @param {Array} renderList - The render list. - * @param {Camera} camera - The camera the render list should be rendered with. - * @param {Scene} scene - The scene the render list belongs to. - * @param {LightsNode} lightsNode - The current lights node. - * @param {?string} [passId=null] - An optional ID for identifying the pass. - */ - private _renderObjects; - /** - * Retrieves shadow nodes for the given material. This is used to setup shadow passes. - * The result is cached per material and updated when the material's version changes. - * - * @private - * @param {Material} material - * @returns {Object} - The shadow nodes for the material. - */ - private _getShadowNodes; - /** - * This method represents the default render object function that manages the render lifecycle - * of the object. - * - * @param {Object3D} object - The 3D object. - * @param {Scene} scene - The scene the 3D object belongs to. - * @param {Camera} camera - The camera the object should be rendered with. - * @param {BufferGeometry} geometry - The object's geometry. - * @param {Material} material - The object's material. - * @param {?Object} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. - * @param {LightsNode} lightsNode - The current lights node. - * @param {?ClippingContext} clippingContext - The clipping context. - * @param {?string} [passId=null] - An optional ID for identifying the pass. - */ - renderObject(object: Object3D, scene: Scene, camera: Camera, geometry: BufferGeometry, material: Material, group: Object | null, lightsNode: LightsNode, clippingContext?: ClippingContext | null, passId?: string | null): void; - /** - * Checks if the given compatibility is supported by the selected backend. - * - * @param {string} name - The compatibility's name. - * @return {boolean} Whether the compatibility is supported or not. - */ - hasCompatibility(name: string): boolean; - /** - * This method represents the default `_handleObjectFunction` implementation which creates - * a render object from the given data and performs the draw command with the selected backend. - * - * @private - * @param {Object3D} object - The 3D object. - * @param {Material} material - The object's material. - * @param {Scene} scene - The scene the 3D object belongs to. - * @param {Camera} camera - The camera the object should be rendered with. - * @param {LightsNode} lightsNode - The current lights node. - * @param {?{start: number, count: number}} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. - * @param {ClippingContext} clippingContext - The clipping context. - * @param {string} [passId] - An optional ID for identifying the pass. - */ - private _renderObjectDirect; - /** - * A different implementation for `_handleObjectFunction` which only makes sure the object is ready for rendering. - * Used in `compileAsync()`. - * - * @private - * @param {Object3D} object - The 3D object. - * @param {Material} material - The object's material. - * @param {Scene} scene - The scene the 3D object belongs to. - * @param {Camera} camera - The camera the object should be rendered with. - * @param {LightsNode} lightsNode - The current lights node. - * @param {?{start: number, count: number}} group - Only relevant for objects using multiple materials. This represents a group entry from the respective `BufferGeometry`. - * @param {ClippingContext} clippingContext - The clipping context. - * @param {string} [passId] - An optional ID for identifying the pass. - */ - private _createObjectPipeline; - /** - * Alias for `compileAsync()`. - * - * @method - * @param {Object3D} scene - The scene or 3D object to precompile. - * @param {Camera} camera - The camera that is used to render the scene. - * @param {Scene} targetScene - If the first argument is a 3D object, this parameter must represent the scene the 3D object is going to be added. - * @return {function(Object3D, Camera, ?Scene): Promise|undefined} A Promise that resolves when the compile has been finished. - */ - get compile(): (arg0: Object3D, arg1: Camera, arg2: Scene | null) => Promise | undefined; -} -import Info from './Info.js'; -import NodeLibrary from './nodes/NodeLibrary.js'; -import Lighting from './Lighting.js'; -import XRManager from './XRManager.js'; -import { Scene } from '../../scenes/Scene.js'; -import InspectorBase from './InspectorBase.js'; -import { Vector2 } from '../../math/Vector2.js'; -import { Vector4 } from '../../math/Vector4.js'; -import { RenderTarget } from '../../core/RenderTarget.js'; -import CanvasTarget from './CanvasTarget.js'; -import ClippingContext from './ClippingContext.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/RendererUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/RendererUtils.d.ts deleted file mode 100644 index 8809693b3..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/RendererUtils.d.ts +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Saves the state of the given renderer and stores it into the given state object. - * - * If not state object is provided, the function creates one. - * - * @private - * @function - * @param {Renderer} renderer - The renderer. - * @param {Object} [state={}] - The state. - * @return {Object} The state. - */ -export function saveRendererState(renderer: Renderer, state?: Object): Object; -/** - * Saves the state of the given renderer and stores it into the given state object. - * Besides, the function also resets the state of the renderer to its default values. - * - * If not state object is provided, the function creates one. - * - * @private - * @function - * @param {Renderer} renderer - The renderer. - * @param {Object} [state={}] - The state. - * @return {Object} The state. - */ -export function resetRendererState(renderer: Renderer, state?: Object): Object; -/** - * Restores the state of the given renderer from the given state object. - * - * @private - * @function - * @param {Renderer} renderer - The renderer. - * @param {Object} state - The state to restore. - */ -export function restoreRendererState(renderer: Renderer, state: Object): void; -/** - * Saves the state of the given scene and stores it into the given state object. - * - * If not state object is provided, the function creates one. - * - * @private - * @function - * @param {Scene} scene - The scene. - * @param {Object} [state={}] - The state. - * @return {Object} The state. - */ -export function saveSceneState(scene: Scene, state?: Object): Object; -/** - * Saves the state of the given scene and stores it into the given state object. - * Besides, the function also resets the state of the scene to its default values. - * - * If not state object is provided, the function creates one. - * - * @private - * @function - * @param {Scene} scene - The scene. - * @param {Object} [state={}] - The state. - * @return {Object} The state. - */ -export function resetSceneState(scene: Scene, state?: Object): Object; -/** - * Restores the state of the given scene from the given state object. - * - * @private - * @function - * @param {Scene} scene - The scene. - * @param {Object} state - The state to restore. - */ -export function restoreSceneState(scene: Scene, state: Object): void; -/** - * Saves the state of the given renderer and scene and stores it into the given state object. - * - * If not state object is provided, the function creates one. - * - * @private - * @function - * @param {Renderer} renderer - The renderer. - * @param {Scene} scene - The scene. - * @param {Object} [state={}] - The state. - * @return {Object} The state. - */ -export function saveRendererAndSceneState(renderer: Renderer, scene: Scene, state?: Object): Object; -/** - * Saves the state of the given renderer and scene and stores it into the given state object. - * Besides, the function also resets the state of the renderer and scene to its default values. - * - * If not state object is provided, the function creates one. - * - * @private - * @function - * @param {Renderer} renderer - The renderer. - * @param {Scene} scene - The scene. - * @param {Object} [state={}] - The state. - * @return {Object} The state. - */ -export function resetRendererAndSceneState(renderer: Renderer, scene: Scene, state?: Object): Object; -/** - * Restores the state of the given renderer and scene from the given state object. - * - * @private - * @function - * @param {Renderer} renderer - The renderer. - * @param {Scene} scene - The scene. - * @param {Object} state - The state to restore. - */ -export function restoreRendererAndSceneState(renderer: Renderer, scene: Scene, state: Object): void; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/SampledTexture.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/SampledTexture.d.ts deleted file mode 100644 index 990534644..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/SampledTexture.d.ts +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Represents a sampled texture binding type. - * - * @private - * @augments Sampler - */ -export class SampledTexture extends Sampler { - /** - * This identifier. - * - * @type {number} - */ - id: number; - /** - * Whether the texture is a storage texture or not. - * - * @type {boolean} - * @default false - */ - store: boolean; - /** - * The mip level to bind for storage textures. - * - * @type {number} - * @default 0 - */ - mipLevel: number; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSampledTexture: boolean; -} -/** - * Represents a sampled array texture binding type. - * - * @private - * @augments SampledTexture - */ -export class SampledArrayTexture extends SampledTexture { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSampledArrayTexture: boolean; -} -/** - * Represents a sampled 3D texture binding type. - * - * @private - * @augments SampledTexture - */ -export class Sampled3DTexture extends SampledTexture { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSampled3DTexture: boolean; -} -/** - * Represents a sampled cube texture binding type. - * - * @private - * @augments SampledTexture - */ -export class SampledCubeTexture extends SampledTexture { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSampledCubeTexture: boolean; -} -import Sampler from './Sampler.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Sampler.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Sampler.d.ts deleted file mode 100644 index 0d197829c..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/Sampler.d.ts +++ /dev/null @@ -1,76 +0,0 @@ -export default Sampler; -/** - * Represents a sampler binding type. - * - * @private - * @augments Binding - */ -declare class Sampler extends Binding { - /** - * Constructs a new sampler. - * - * @param {string} name - The samplers's name. - * @param {?Texture} texture - The texture this binding is referring to. - */ - constructor(name: string, texture: Texture | null); - /** - * The texture the sampler is referring to. - * - * @private - * @type {?Texture} - */ - private _texture; - /** - * The binding's version. - * - * @type {number} - */ - version: number; - /** - * The binding's generation which is an additional version - * qualifier. - * - * @type {?number} - * @default null - */ - generation: number | null; - /** - * The binding's sampler key. - * - * @type {string} - * @default '' - */ - samplerKey: string; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSampler: boolean; - /** - * Sets the texture of this sampler. - * - * @param {Texture} value - The texture to set. - */ - set texture(value: Texture); - /** - * Gets the texture of this sampler. - * @return {?Texture} The texture. - */ - get texture(): Texture | null; - /** - * Updates the binding. - * - * @return {boolean} Whether the texture has been updated and must be - * uploaded to the GPU. - */ - update(): boolean; - /** - * Resets the version and generation. This is used when the texture - * the binding is pointing to is disposed or exchanged. - */ - reset(): void; -} -import Binding from './Binding.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Storage3DTexture.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Storage3DTexture.d.ts deleted file mode 100644 index 5ea5a3e6b..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/Storage3DTexture.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -export default Storage3DTexture; -/** - * This special type of texture is intended for compute shaders. - * It can be used to compute the data of a texture with a compute shader. - * - * Note: This type of texture can only be used with `WebGPURenderer` - * and a WebGPU backend. - * - * @augments Texture - */ -declare class Storage3DTexture extends Texture { - /** - * Constructs a new storage texture. - * - * @param {number} [width=1] - The storage texture's width. - * @param {number} [height=1] - The storage texture's height. - * @param {number} [depth=1] - The storage texture's depth. - */ - constructor(width?: number, height?: number, depth?: number); - isArrayTexture: boolean; - /** - * This defines how the texture is wrapped in the depth direction and corresponds to - * *W* in UVW mapping. - * - * @type {number} - */ - wrapR: number; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStorageTexture: boolean; - /** - * Indicates whether this texture is a 3D texture. - * - * @type {boolean} - * - */ - is3DTexture: boolean; - /** - * Sets the size of the storage 3d texture. - * - * @param {number} width - The new width of the storage texture. - * @param {number} height - The new height of the storage texture. - * @param {number} depth - The new depth of the storage texture. - */ - setSize(width: number, height: number, depth: number): void; -} -import { Texture } from '../../textures/Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/StorageArrayTexture.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/StorageArrayTexture.d.ts deleted file mode 100644 index 27581e2fc..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/StorageArrayTexture.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -export default StorageArrayTexture; -/** - * This special type of texture is intended for compute shaders. - * It can be used to compute the data of a texture with a compute shader. - * - * Note: This type of texture can only be used with `WebGPURenderer` - * and a WebGPU backend. - * - * @augments Texture - */ -declare class StorageArrayTexture extends Texture { - /** - * Constructs a new storage texture. - * - * @param {number} [width=1] - The storage texture's width. - * @param {number} [height=1] - The storage texture's height. - * @param {number} [depth=1] - The storage texture's depth. - */ - constructor(width?: number, height?: number, depth?: number); - isArrayTexture: boolean; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStorageTexture: boolean; - /** - * Sets the size of the storage array texture. - * - * @param {number} width - The new width of the storage texture. - * @param {number} height - The new height of the storage texture. - * @param {number} depth - The new depth of the storage texture. - */ - setSize(width: number, height: number, depth: number): void; -} -import { Texture } from '../../textures/Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/StorageBuffer.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/StorageBuffer.d.ts deleted file mode 100644 index d4de63398..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/StorageBuffer.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -export default StorageBuffer; -/** - * Represents a storage buffer binding type. - * - * @private - * @augments Buffer - */ -declare class StorageBuffer extends Buffer { - /** - * Constructs a new uniform buffer. - * - * @param {string} name - The buffer's name. - * @param {BufferAttribute} attribute - The buffer attribute. - */ - constructor(name: string, attribute: BufferAttribute); - /** - * This flag can be used for type testing. - * - * @private - * @type {BufferAttribute} - */ - private _attribute; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStorageBuffer: boolean; - /** - * The storage buffer attribute. - * - * @type {BufferAttribute} - */ - get attribute(): BufferAttribute; -} -import Buffer from './Buffer.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/StorageBufferAttribute.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/StorageBufferAttribute.d.ts deleted file mode 100644 index d53cac3dc..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/StorageBufferAttribute.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -export default StorageBufferAttribute; -/** - * This special type of buffer attribute is intended for compute shaders. - * In earlier three.js versions it was only possible to update attribute data - * on the CPU via JavaScript and then upload the data to the GPU. With the - * new material system and renderer it is now possible to use compute shaders - * to compute the data for an attribute more efficiently on the GPU. - * - * The idea is to create an instance of this class and provide it as an input - * to {@link StorageBufferNode}. - * - * Note: This type of buffer attribute can only be used with `WebGPURenderer`. - * - * @augments BufferAttribute - */ -declare class StorageBufferAttribute extends BufferAttribute { - /** - * Constructs a new storage buffer attribute. - * - * @param {number|TypedArray} count - The item count. It is also valid to pass a typed array as an argument. - * The subsequent parameters are then obsolete. - * @param {number} itemSize - The item size. - * @param {TypedArray.constructor} [typeClass=Float32Array] - A typed array constructor. - */ - constructor(count: number | TypedArray, itemSize: number, typeClass?: TypedArray.constructor); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStorageBufferAttribute: boolean; -} -import { BufferAttribute } from '../../core/BufferAttribute.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/StorageInstancedBufferAttribute.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/StorageInstancedBufferAttribute.d.ts deleted file mode 100644 index 6f8614323..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/StorageInstancedBufferAttribute.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -export default StorageInstancedBufferAttribute; -/** - * This special type of instanced buffer attribute is intended for compute shaders. - * In earlier three.js versions it was only possible to update attribute data - * on the CPU via JavaScript and then upload the data to the GPU. With the - * new material system and renderer it is now possible to use compute shaders - * to compute the data for an attribute more efficiently on the GPU. - * - * The idea is to create an instance of this class and provide it as an input - * to {@link StorageBufferNode}. - * - * Note: This type of buffer attribute can only be used with `WebGPURenderer`. - * - * @augments InstancedBufferAttribute - */ -declare class StorageInstancedBufferAttribute extends InstancedBufferAttribute { - /** - * Constructs a new storage instanced buffer attribute. - * - * @param {number|TypedArray} count - The item count. It is also valid to pass a typed array as an argument. - * The subsequent parameters are then obsolete. - * @param {number} itemSize - The item size. - * @param {TypedArray.constructor} [typeClass=Float32Array] - A typed array constructor. - */ - constructor(count: number | TypedArray, itemSize: number, typeClass?: TypedArray.constructor); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStorageInstancedBufferAttribute: boolean; -} -import { InstancedBufferAttribute } from '../../core/InstancedBufferAttribute.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/StorageTexture.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/StorageTexture.d.ts deleted file mode 100644 index a369bd6e8..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/StorageTexture.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -export default StorageTexture; -/** - * This special type of texture is intended for compute shaders. - * It can be used to compute the data of a texture with a compute shader. - * - * Note: This type of texture can only be used with `WebGPURenderer` - * and a WebGPU backend. - * - * @augments Texture - */ -declare class StorageTexture extends Texture { - /** - * Constructs a new storage texture. - * - * @param {number} [width=1] - The storage texture's width. - * @param {number} [height=1] - The storage texture's height. - */ - constructor(width?: number, height?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isStorageTexture: boolean; - /** - * When `true`, mipmaps will be auto-generated after compute writes. - * When `false`, mipmaps must be written manually via compute shaders. - * - * @type {boolean} - * @default true - */ - mipmapsAutoUpdate: boolean; - /** - * Sets the size of the storage texture. - * - * @param {number} width - The new width of the storage texture. - * @param {number} height - The new height of the storage texture. - */ - setSize(width: number, height: number): void; -} -import { Texture } from '../../textures/Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Textures.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Textures.d.ts deleted file mode 100644 index b88fdc6a7..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/Textures.d.ts +++ /dev/null @@ -1,117 +0,0 @@ -export default Textures; -/** - * This module manages the textures of the renderer. - * - * @private - * @augments DataMap - */ -declare class Textures extends DataMap { - /** - * Constructs a new texture management component. - * - * @param {Renderer} renderer - The renderer. - * @param {Backend} backend - The renderer's backend. - * @param {Info} info - Renderer component for managing metrics and monitoring data. - */ - constructor(renderer: Renderer, backend: Backend, info: Info); - /** - * The renderer. - * - * @type {Renderer} - */ - renderer: Renderer; - /** - * The backend. - * - * @type {Backend} - */ - backend: Backend; - /** - * Renderer component for managing metrics and monitoring data. - * - * @type {Info} - */ - info: Info; - /** - * A set of HTMLTextures that need paint updates. - * - * @type {Set} - */ - _htmlTextures: Set; - /** - * Updates the given render target. Based on the given render target configuration, - * it updates the texture states representing the attachments of the framebuffer. - * - * @param {RenderTarget} renderTarget - The render target to update. - * @param {number} [activeMipmapLevel=0] - The active mipmap level. - */ - updateRenderTarget(renderTarget: RenderTarget, activeMipmapLevel?: number): void; - /** - * Updates the given texture. Depending on the texture state, this method - * triggers the upload of texture data to the GPU memory. If the texture data are - * not yet ready for the upload, it uses default texture data for as a placeholder. - * - * @param {Texture} texture - The texture to update. - * @param {Object} [options={}] - The options. - */ - updateTexture(texture: Texture, options?: Object): void; - /** - * Updates the sampler for the given texture. This method has no effect - * for the WebGL backend since it has no concept of samplers. Texture - * parameters are configured with the `texParameter()` command for each - * texture. - * - * In WebGPU, samplers are objects like textures and it's possible to share - * them when the texture parameters match. - * - * @param {Texture} texture - The texture to update the sampler for. - * @param {TextureNode} textureNode - The texture node to update the sampler with. - * @return {string} The current sampler key. - */ - updateSampler(texture: Texture, textureNode: TextureNode): string; - /** - * Computes the size of the given texture and writes the result - * into the target vector. This vector is also returned by the - * method. - * - * If no texture data are available for the compute yet, the method - * returns default size values. - * - * @param {Texture} texture - The texture to compute the size for. - * @param {Vector3} target - The target vector. - * @return {Vector3} The target vector. - */ - getSize(texture: Texture, target?: Vector3): Vector3; - /** - * Computes the number of mipmap levels for the given texture. - * - * @param {Texture} texture - The texture. - * @param {number} width - The texture's width. - * @param {number} height - The texture's height. - * @return {number} The number of mipmap levels. - */ - getMipLevels(texture: Texture, width: number, height: number): number; - /** - * Returns `true` if the given texture makes use of mipmapping. - * - * @param {Texture} texture - The texture. - * @return {boolean} Whether mipmaps are required or not. - */ - needsMipmaps(texture: Texture): boolean; - /** - * Frees internal resources when the given render target isn't - * required anymore. - * - * @param {RenderTarget} renderTarget - The render target to destroy. - */ - _destroyRenderTarget(renderTarget: RenderTarget): void; - /** - * Frees internal resource when the given texture isn't - * required anymore. - * - * @param {Texture} texture - The texture to destroy. - */ - _destroyTexture(texture: Texture): void; -} -import DataMap from './DataMap.js'; -import { Vector3 } from '../../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/TimestampQueryPool.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/TimestampQueryPool.d.ts deleted file mode 100644 index 82eedbdd9..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/TimestampQueryPool.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -export default TimestampQueryPool; -/** - * Abstract base class of a timestamp query pool. - * - * @abstract - */ -declare class TimestampQueryPool { - /** - * Creates a new timestamp query pool. - * - * @param {number} [maxQueries=256] - Maximum number of queries this pool can hold. - */ - constructor(maxQueries?: number); - /** - * Whether to track timestamps or not. - * - * @type {boolean} - * @default true - */ - trackTimestamp: boolean; - /** - * Maximum number of queries this pool can hold. - * - * @type {number} - * @default 256 - */ - maxQueries: number; - /** - * How many queries allocated so far. - * - * @type {number} - * @default 0 - */ - currentQueryIndex: number; - /** - * Tracks offsets for different contexts. - * - * @type {Map} - */ - queryOffsets: Map; - /** - * Whether the pool has been disposed or not. - * - * @type {boolean} - * @default false - */ - isDisposed: boolean; - /** - * The total frame duration until the next update. - * - * @type {number} - * @default 0 - */ - lastValue: number; - /** - * Stores all timestamp frames. - * - * @type {Array} - */ - frames: Array; - /** - * This property is used to avoid multiple concurrent resolve operations. - * The WebGL backend uses it as a boolean flag. In context of WebGPU, it holds - * the promise of the current resolve operation. - * - * @type {boolean|Promise} - * @default false - */ - pendingResolve: boolean | Promise; - /** - * Stores the latest timestamp for each render context. - * - * @type {Map} - */ - timestamps: Map; - /** - * Returns all timestamp frames. - * - * @return {Array} The timestamp frames. - */ - getTimestampFrames(): Array; - /** - * Returns the timestamp for a given render context. - * - * @param {string} uid - A unique identifier for the render context. - * @return {?number} The timestamp, or undefined if not available. - */ - getTimestamp(uid: string): number | null; - /** - * Returns whether a timestamp is available for a given render context. - * - * @param {string} uid - A unique identifier for the render context. - * @return {boolean} True if a timestamp is available, false otherwise. - */ - hasTimestamp(uid: string): boolean; - /** - * Allocate queries for a specific uid. - * - * @abstract - * @param {string} uid - A unique identifier for the render context. - * @param {number} frameId - The current frame identifier. - * @returns {?number} - */ - allocateQueriesForContext(): number | null; - /** - * Resolve all timestamps and return data (or process them). - * - * @abstract - * @async - * @returns {Promise|number} The resolved timestamp value. - */ - resolveQueriesAsync(): Promise | number; - /** - * Dispose of the query pool. - * - * @abstract - */ - dispose(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/Uniform.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/Uniform.d.ts deleted file mode 100644 index d8d107299..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/Uniform.d.ts +++ /dev/null @@ -1,260 +0,0 @@ -/** - * Represents a Number uniform. - * - * @private - * @augments Uniform - */ -export class NumberUniform extends Uniform { - /** - * Constructs a new Number uniform. - * - * @param {string} name - The uniform's name. - * @param {number} value - The uniform's value. - */ - constructor(name: string, value?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isNumberUniform: boolean; -} -/** - * Represents a Vector2 uniform. - * - * @private - * @augments Uniform - */ -export class Vector2Uniform extends Uniform { - /** - * Constructs a new Number uniform. - * - * @param {string} name - The uniform's name. - * @param {Vector2} value - The uniform's value. - */ - constructor(name: string, value?: Vector2); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isVector2Uniform: boolean; -} -/** - * Represents a Vector3 uniform. - * - * @private - * @augments Uniform - */ -export class Vector3Uniform extends Uniform { - /** - * Constructs a new Number uniform. - * - * @param {string} name - The uniform's name. - * @param {Vector3} value - The uniform's value. - */ - constructor(name: string, value?: Vector3); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isVector3Uniform: boolean; -} -/** - * Represents a Vector4 uniform. - * - * @private - * @augments Uniform - */ -export class Vector4Uniform extends Uniform { - /** - * Constructs a new Number uniform. - * - * @param {string} name - The uniform's name. - * @param {Vector4} value - The uniform's value. - */ - constructor(name: string, value?: Vector4); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isVector4Uniform: boolean; -} -/** - * Represents a Color uniform. - * - * @private - * @augments Uniform - */ -export class ColorUniform extends Uniform { - /** - * Constructs a new Number uniform. - * - * @param {string} name - The uniform's name. - * @param {Color} value - The uniform's value. - */ - constructor(name: string, value?: Color); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isColorUniform: boolean; -} -/** - * Represents a Matrix2 uniform. - * - * @private - * @augments Uniform - */ -export class Matrix2Uniform extends Uniform { - /** - * Constructs a new Number uniform. - * - * @param {string} name - The uniform's name. - * @param {Matrix2} value - The uniform's value. - */ - constructor(name: string, value?: Matrix2); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMatrix2Uniform: boolean; -} -/** - * Represents a Matrix3 uniform. - * - * @private - * @augments Uniform - */ -export class Matrix3Uniform extends Uniform { - /** - * Constructs a new Number uniform. - * - * @param {string} name - The uniform's name. - * @param {Matrix3} value - The uniform's value. - */ - constructor(name: string, value?: Matrix3); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMatrix3Uniform: boolean; -} -/** - * Represents a Matrix4 uniform. - * - * @private - * @augments Uniform - */ -export class Matrix4Uniform extends Uniform { - /** - * Constructs a new Number uniform. - * - * @param {string} name - The uniform's name. - * @param {Matrix4} value - The uniform's value. - */ - constructor(name: string, value?: Matrix4); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isMatrix4Uniform: boolean; -} -/** - * Abstract base class for uniforms. - * - * @abstract - * @private - */ -declare class Uniform { - /** - * Constructs a new uniform. - * - * @param {string} name - The uniform's name. - * @param {any} value - The uniform's value. - */ - constructor(name: string, value: any); - /** - * The uniform's name. - * - * @type {string} - */ - name: string; - /** - * The uniform's value. - * - * @type {any} - */ - value: any; - /** - * Used to build the uniform buffer according to the STD140 layout. - * Derived uniforms will set this property to a data type specific - * value. - * - * @type {number} - */ - boundary: number; - /** - * The item size. Derived uniforms will set this property to a data - * type specific value. - * - * @type {number} - */ - itemSize: number; - /** - * This property is set by {@link UniformsGroup} and marks - * the start position in the uniform buffer. - * - * @type {number} - */ - offset: number; - /** - * This property is set by {@link UniformsGroup} and marks - * the index position in the uniform array. - * - * @type {number} - */ - index: number; - /** - * Sets the uniform's value. - * - * @param {any} value - The value to set. - */ - setValue(value: any): void; - /** - * Returns the uniform's value. - * - * @return {any} The value. - */ - getValue(): any; -} -import { Vector2 } from '../../math/Vector2.js'; -import { Vector3 } from '../../math/Vector3.js'; -import { Vector4 } from '../../math/Vector4.js'; -import { Color } from '../../math/Color.js'; -import { Matrix2 } from '../../math/Matrix2.js'; -import { Matrix3 } from '../../math/Matrix3.js'; -import { Matrix4 } from '../../math/Matrix4.js'; -export {}; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/UniformBuffer.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/UniformBuffer.d.ts deleted file mode 100644 index 15af25d88..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/UniformBuffer.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export default UniformBuffer; -/** - * Represents a uniform buffer binding type. - * - * @private - * @augments Buffer - */ -declare class UniformBuffer extends Buffer { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isUniformBuffer: boolean; -} -import Buffer from './Buffer.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/UniformsGroup.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/UniformsGroup.d.ts deleted file mode 100644 index 8990101e7..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/UniformsGroup.d.ts +++ /dev/null @@ -1,147 +0,0 @@ -export default UniformsGroup; -/** - * This class represents a uniform buffer binding but with - * an API that allows to maintain individual uniform objects. - * - * @private - * @augments UniformBuffer - */ -declare class UniformsGroup extends UniformBuffer { - /** - * Constructs a new uniforms group. - * - * @param {string} name - The group's name. - */ - constructor(name: string); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isUniformsGroup: boolean; - /** - * An array with the raw uniform values. - * - * @private - * @type {?Array} - * @default null - */ - private _values; - /** - * An array of uniform objects. - * - * The order of uniforms in this array must match the order of uniforms in the shader. - * - * @type {Array} - */ - uniforms: Array; - /** - * A cache for the uniform update ranges. - * - * @private - * @type {Map} - */ - private _updateRangeCache; - /** - * Uniform indices whose range has already been pushed into `updateRanges` - * during the current update cycle. Reset on `clearUpdateRanges()`. - * - * @private - * @type {Set} - */ - private _addedIndices; - /** - * Adds a uniform's update range to this buffer. - * - * @param {Uniform} uniform - The uniform. - */ - addUniformUpdateRange(uniform: Uniform): void; - /** - * Adds a uniform to this group. - * - * @param {Uniform} uniform - The uniform to add. - * @return {UniformsGroup} A reference to this group. - */ - addUniform(uniform: Uniform): UniformsGroup; - /** - * Removes a uniform from this group. - * - * @param {Uniform} uniform - The uniform to remove. - * @return {UniformsGroup} A reference to this group. - */ - removeUniform(uniform: Uniform): UniformsGroup; - /** - * An array with the raw uniform values. - * - * @type {Array} - */ - get values(): Array; - /** - * Updates a given uniform by calling an update method matching - * the uniforms type. - * - * @param {Uniform} uniform - The uniform to update. - * @return {boolean} Whether the uniform has been updated or not. - */ - updateByType(uniform: Uniform): boolean; - /** - * Updates a given Number uniform. - * - * @param {NumberUniform} uniform - The Number uniform. - * @return {boolean} Whether the uniform has been updated or not. - */ - updateNumber(uniform: NumberUniform): boolean; - /** - * Updates a given Vector2 uniform. - * - * @param {Vector2Uniform} uniform - The Vector2 uniform. - * @return {boolean} Whether the uniform has been updated or not. - */ - updateVector2(uniform: Vector2Uniform): boolean; - /** - * Updates a given Vector3 uniform. - * - * @param {Vector3Uniform} uniform - The Vector3 uniform. - * @return {boolean} Whether the uniform has been updated or not. - */ - updateVector3(uniform: Vector3Uniform): boolean; - /** - * Updates a given Vector4 uniform. - * - * @param {Vector4Uniform} uniform - The Vector4 uniform. - * @return {boolean} Whether the uniform has been updated or not. - */ - updateVector4(uniform: Vector4Uniform): boolean; - /** - * Updates a given Color uniform. - * - * @param {ColorUniform} uniform - The Color uniform. - * @return {boolean} Whether the uniform has been updated or not. - */ - updateColor(uniform: ColorUniform): boolean; - /** - * Updates a given Matrix3 uniform. - * - * @param {Matrix3Uniform} uniform - The Matrix3 uniform. - * @return {boolean} Whether the uniform has been updated or not. - */ - updateMatrix3(uniform: Matrix3Uniform): boolean; - /** - * Updates a given Matrix4 uniform. - * - * @param {Matrix4Uniform} uniform - The Matrix4 uniform. - * @return {boolean} Whether the uniform has been updated or not. - */ - updateMatrix4(uniform: Matrix4Uniform): boolean; - /** - * Returns a typed array that matches the given data type. - * - * @private - * @param {string} type - The data type. - * @return {TypedArray} The typed array. - */ - private _getBufferForType; -} -import UniformBuffer from './UniformBuffer.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/XRManager.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/XRManager.d.ts deleted file mode 100644 index 8581c09f6..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/XRManager.d.ts +++ /dev/null @@ -1,596 +0,0 @@ -export default XRManager; -/** - * The XR manager is built on top of the WebXR Device API to - * manage XR sessions with renderer backends. - * - * @augments EventDispatcher - */ -declare class XRManager extends EventDispatcher { - /** - * Constructs a new XR manager. - * - * @param {Renderer} renderer - The renderer. - * @param {boolean} [multiview=false] - Enables multiview if the device supports it. - */ - constructor(renderer: Renderer, multiview?: boolean); - /** - * This flag globally enables XR rendering. - * - * @type {boolean} - * @default false - */ - enabled: boolean; - /** - * Whether the XR device is currently presenting or not. - * - * @type {boolean} - * @default false - * @readonly - */ - readonly isPresenting: boolean; - /** - * Whether the XR camera should automatically be updated or not. - * - * @type {boolean} - * @default true - */ - cameraAutoUpdate: boolean; - /** - * The renderer. - * - * @private - * @type {Renderer} - */ - private _renderer; - /** - * Represents the camera for the left eye. - * - * @private - * @type {PerspectiveCamera} - */ - private _cameraL; - /** - * Represents the camera for the right eye. - * - * @private - * @type {PerspectiveCamera} - */ - private _cameraR; - /** - * A list of cameras used for rendering the XR views. - * - * @private - * @type {Array} - */ - private _cameras; - /** - * The main XR camera. - * - * @private - * @type {ArrayCamera} - */ - private _cameraXR; - /** - * The current near value of the XR camera. - * - * @private - * @type {?number} - * @default null - */ - private _currentDepthNear; - /** - * The current far value of the XR camera. - * - * @private - * @type {?number} - * @default null - */ - private _currentDepthFar; - /** - * A list of WebXR controllers requested by the application. - * - * @private - * @type {Array} - */ - private _controllers; - /** - * A list of XR input source. Each input source belongs to - * an instance of WebXRController. - * - * @private - * @type {Array} - */ - private _controllerInputSources; - /** - * The XR render target that represents the rendering destination - * during an active XR session. - * - * @private - * @type {?RenderTarget} - * @default null - */ - private _xrRenderTarget; - /** - * An array holding all the non-projection layers - * - * @private - * @type {Array} - * @default [] - */ - private _layers; - /** - * Whether the XR session uses layers. - * - * @private - * @type {boolean} - * @default false - */ - private _sessionUsesLayers; - /** - * Whether the device supports binding gl objects. - * - * @private - * @type {boolean} - * @readonly - */ - private readonly _supportsGlBinding; - _supportsWebGPUBinding: boolean; - /** - * Helper function to create native WebXR Layer. - * - * @private - * @type {Function} - */ - private _createXRLayer; - /** - * The current WebGL context. - * - * @private - * @type {?WebGL2RenderingContext} - * @default null - */ - private _gl; - /** - * The current animation context. - * - * @private - * @type {?Window} - * @default null - */ - private _currentAnimationContext; - /** - * The current animation loop. - * - * @private - * @type {?Function} - * @default null - */ - private _currentAnimationLoop; - /** - * The current pixel ratio. - * - * @private - * @type {?number} - * @default null - */ - private _currentPixelRatio; - /** - * The renderer's sample count before XR temporarily overrides it. - * - * @private - * @type {?number} - * @default null - */ - private _currentSamples; - /** - * The current size of the renderer's canvas - * in logical pixel unit. - * - * @private - * @type {Vector2} - */ - private _currentSize; - /** - * The default event listener for handling events inside a XR session. - * - * @private - * @type {Function} - */ - private _onSessionEvent; - /** - * The event listener for handling the end of a XR session. - * - * @private - * @type {Function} - */ - private _onSessionEnd; - /** - * The event listener for handling the `inputsourceschange` event. - * - * @private - * @type {Function} - */ - private _onInputSourcesChange; - /** - * The animation loop which is used as a replacement for the default - * animation loop of the application. It is only used when a XR session - * is active. - * - * @private - * @type {Function} - */ - private _onAnimationFrame; - /** - * The current XR reference space. - * - * @private - * @type {?XRReferenceSpace} - * @default null - */ - private _referenceSpace; - /** - * The current XR reference space type. - * - * @private - * @type {XRReferenceSpaceType} - * @default 'local-floor' - */ - private _referenceSpaceType; - /** - * A custom reference space defined by the application. - * - * @private - * @type {?XRReferenceSpace} - * @default null - */ - private _customReferenceSpace; - /** - * The framebuffer scale factor. - * - * @private - * @type {number} - * @default 1 - */ - private _framebufferScaleFactor; - /** - * The foveation factor. - * - * @private - * @type {number} - * @default 1 - */ - private _foveation; - /** - * A reference to the current XR session. - * - * @private - * @type {?XRSession} - * @default null - */ - private _session; - /** - * A reference to the current XR base layer. - * - * @private - * @type {?XRWebGLLayer} - * @default null - */ - private _glBaseLayer; - /** - * A reference to the current XR binding. - * - * @private - * @type {?XRWebGLBinding} - * @default null - */ - private _glBinding; - /** - * A reference to the current XR WebGPU binding. - * - * @private - * @type {?XRGPUBinding} - * @default null - */ - private _webgpuBinding; - /** - * A reference to the current XR projection layer. - * - * @private - * @type {?XRProjectionLayer} - * @default null - */ - private _glProjLayer; - /** - * A reference to the current XR frame. - * - * @private - * @type {?XRFrame} - * @default null - */ - private _xrFrame; - /** - * Whether the browser supports the APIs necessary to use XRProjectionLayers. - * - * Note: this does not represent XRSession explicitly requesting - * `'layers'` as a feature - see `_sessionUsesLayers` and #30112 - * - * @private - * @type {boolean} - * @readonly - */ - private readonly _supportsLayers; - /** - * Whether the usage of multiview has been requested by the application or not. - * - * @private - * @type {boolean} - * @default false - * @readonly - */ - private readonly _useMultiviewIfPossible; - /** - * Whether the usage of multiview is actually enabled. This flag only evaluates to `true` - * if multiview has been requested by the application and the `OVR_multiview2` is available. - * - * @private - * @type {boolean} - * @readonly - */ - private readonly _useMultiview; - /** - * Returns an instance of `THREE.Group` that represents the transformation - * of a XR controller in target ray space. The requested controller is defined - * by the given index. - * - * @param {number} index - The index of the XR controller. - * @return {Group} A group that represents the controller's transformation. - */ - getController(index: number): Group; - /** - * Returns an instance of `THREE.Group` that represents the transformation - * of a XR controller in grip space. The requested controller is defined - * by the given index. - * - * @param {number} index - The index of the XR controller. - * @return {Group} A group that represents the controller's transformation. - */ - getControllerGrip(index: number): Group; - /** - * Returns an instance of `THREE.Group` that represents the transformation - * of a XR controller in hand space. The requested controller is defined - * by the given index. - * - * @param {number} index - The index of the XR controller. - * @return {Group} A group that represents the controller's transformation. - */ - getHand(index: number): Group; - /** - * Returns the foveation value. - * - * @return {number|undefined} The foveation value. - */ - getFoveation(): number | undefined; - /** - * Sets the foveation value. - * - * @param {number} foveation - A number in the range `[0,1]` where `0` means no foveation (full resolution) - * and `1` means maximum foveation (the edges render at lower resolution). - */ - setFoveation(foveation: number): void; - /** - * Returns the framebuffer scale factor. - * - * @return {number} The framebuffer scale factor. - */ - getFramebufferScaleFactor(): number; - /** - * Sets the framebuffer scale factor. - * - * This method can not be used during a XR session. - * - * @param {number} factor - The framebuffer scale factor. - */ - setFramebufferScaleFactor(factor: number): void; - /** - * Returns the reference space type. - * - * @return {XRReferenceSpaceType} The reference space type. - */ - getReferenceSpaceType(): XRReferenceSpaceType; - /** - * Sets the reference space type. - * - * This method can not be used during a XR session. - * - * @param {XRReferenceSpaceType} type - The reference space type. - */ - setReferenceSpaceType(type: XRReferenceSpaceType): void; - /** - * Returns the XR reference space. - * - * @return {XRReferenceSpace} The XR reference space. - */ - getReferenceSpace(): XRReferenceSpace; - /** - * Sets a custom XR reference space. - * - * @param {XRReferenceSpace} space - The XR reference space. - */ - setReferenceSpace(space: XRReferenceSpace): void; - /** - * Returns the XR camera. - * - * @return {ArrayCamera} The XR camera. - */ - getCamera(): ArrayCamera; - /** - * Returns the environment blend mode from the current XR session. - * - * @return {'opaque'|'additive'|'alpha-blend'|undefined} The environment blend mode. Returns `undefined` when used outside of a XR session. - */ - getEnvironmentBlendMode(): "opaque" | "additive" | "alpha-blend" | undefined; - /** - * Returns the current base layer. - * - * This is an `XRProjectionLayer` when the targeted XR device supports the - * WebXR Layers API, or an `XRWebGLLayer` otherwise. - * - * @return {?(XRWebGLLayer|XRProjectionLayer)} The XR base layer. - */ - getBaseLayer(): (XRWebGLLayer | XRProjectionLayer) | null; - /** - * Returns the current XR binding. - * - * Creates a new binding if needed and the browser is - * capable of doing so. - * - * @return {?XRWebGLBinding} The XR binding. Returns `null` if one cannot be created. - */ - getBinding(): XRWebGLBinding | null; - /** - * Applies WebXR fixed foveation to the internal post-processing render target - * used by the first XR render pass before compositing into a projection layer. - * - * Browser-side `XRWebGLBinding.foveateBoundTexture()` failures are treated as - * non-fatal so they do not interrupt rendering. - * - * @param {RenderTarget} renderTarget - The internal render target. - */ - foveateBoundTexture(renderTarget: RenderTarget): void; - /** - * Returns the current XR WebGPU binding. - * - * Creates a new binding if needed and the browser is - * capable of doing so. - * - * @return {?XRGPUBinding} The XR WebGPU binding. Returns `null` if one cannot be created. - */ - getWebGPUBinding(): XRGPUBinding | null; - /** - * Returns whether the current XR session is using WebGPU. - * - * @private - * @return {boolean} Whether the current session uses the WebGPU backend and the `webgpu` session feature. - */ - private _isWebGPUSession; - /** - * Validates the current WebGPU XR session requirements. - * - * @private - */ - private _validateWebGPUSession; - /** - * Initializes the WebGPU XR projection layer and render target. - * - * @private - * @async - * @param {XRSession} session - The XR session. - * @return {Promise} - */ - private _initWebGPUSession; - /** - * Releases WebGPU XR resources associated with the current session. - * - * @private - */ - private _disposeWebGPUSession; - /** - * Collects WebGPU XR sub-image data for the current frame. - * - * @private - * @param {Array} views - The XR views for the current pose. - * @return {{colorTexture:?GPUTexture, viewDescriptors:Array, viewports:Array}} The WebGPU XR view data. - */ - private _getWebGPUViewData; - /** - * Returns the current XR frame. - * - * @return {?XRFrame} The XR frame. Returns `null` when used outside a XR session. - */ - getFrame(): XRFrame | null; - /** - * Returns `true` if the engine renders to a multiview target. - * - * @return {boolean} Whether the engine renders to a multiview render target or not. - */ - useMultiview(): boolean; - /** - * This method can be used in XR applications to create a quadratic layer that presents a separate - * rendered scene. - * - * @param {number} width - The width of the layer plane in world units. - * @param {number} height - The height of the layer plane in world units. - * @param {Vector3} translation - The position/translation of the layer plane in world units. - * @param {Quaternion} quaternion - The orientation of the layer plane expressed as a quaternion. - * @param {number} pixelwidth - The width of the layer's render target in pixels. - * @param {number} pixelheight - The height of the layer's render target in pixels. - * @param {Function} rendercall - A callback function that renders the layer. Similar to code in - * the default animation loop, this method can be used to update/transform 3D object in the layer's scene. - * @param {Object} [attributes={}] - Allows to configure the layer's render target. - * @return {Mesh} A mesh representing the quadratic XR layer. This mesh should be added to the XR scene. - */ - createQuadLayer(width: number, height: number, translation: Vector3, quaternion: Quaternion, pixelwidth: number, pixelheight: number, rendercall: Function, attributes?: Object): Mesh; - /** - * This method can be used in XR applications to create a cylindrical layer that presents a separate - * rendered scene. - * - * @param {number} radius - The radius of the cylinder in world units. - * @param {number} centralAngle - The central angle of the cylinder in radians. - * @param {number} aspectratio - The aspect ratio. - * @param {Vector3} translation - The position/translation of the layer plane in world units. - * @param {Quaternion} quaternion - The orientation of the layer plane expressed as a quaternion. - * @param {number} pixelwidth - The width of the layer's render target in pixels. - * @param {number} pixelheight - The height of the layer's render target in pixels. - * @param {Function} rendercall - A callback function that renders the layer. Similar to code in - * the default animation loop, this method can be used to update/transform 3D object in the layer's scene. - * @param {Object} [attributes={}] - Allows to configure the layer's render target. - * @return {Mesh} A mesh representing the cylindrical XR layer. This mesh should be added to the XR scene. - */ - createCylinderLayer(radius: number, centralAngle: number, aspectratio: number, translation: Vector3, quaternion: Quaternion, pixelwidth: number, pixelheight: number, rendercall: Function, attributes?: Object): Mesh; - /** - * Renders the XR layers that have been previously added to the scene. - * - * This method is usually called in your animation loop before rendering - * the actual scene via `renderer.render( scene, camera );`. - */ - renderLayers(): void; - /** - * Returns the current XR session. - * - * @return {?XRSession} The XR session. Returns `null` when used outside a XR session. - */ - getSession(): XRSession | null; - /** - * After a XR session has been requested usually with one of the `*Button` modules, it - * is injected into the renderer with this method. This method triggers the start of - * the actual XR rendering. - * - * @async - * @param {XRSession} session - The XR session to set. - * @return {Promise} A Promise that resolves when the session has been set. - */ - setSession(session: XRSession): Promise; - /** - * This method is called by the renderer per frame and updates the XR camera - * and it sub cameras based on the given camera. The given camera is the "user" - * camera created on application level and used for non-XR rendering. - * - * @param {PerspectiveCamera} camera - The camera. - */ - updateCamera(camera: PerspectiveCamera): void; - /** - * Returns a WebXR controller for the given controller index. - * - * @private - * @param {number} index - The controller index. - * @return {WebXRController} The XR controller. - */ - private _getController; -} -import { EventDispatcher } from '../../core/EventDispatcher.js'; -import { ArrayCamera } from '../../cameras/ArrayCamera.js'; -import { RenderTarget } from '../../core/RenderTarget.js'; -import { Vector3 } from '../../math/Vector3.js'; -import { Quaternion } from '../../math/Quaternion.js'; -import { Mesh } from '../../objects/Mesh.js'; -import { PerspectiveCamera } from '../../cameras/PerspectiveCamera.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/XRRenderTarget.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/XRRenderTarget.d.ts deleted file mode 100644 index e397d7c26..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/XRRenderTarget.d.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * A special type of render target that is used when rendering - * with the WebXR Device API. - * - * @private - * @augments RenderTarget - */ -export class XRRenderTarget extends RenderTarget { - /** - * Constructs a new XR render target. - * - * @param {number} [width=1] - The width of the render target. - * @param {number} [height=1] - The height of the render target. - * @param {Object} [options={}] - The configuration options. - */ - constructor(width?: number, height?: number, options?: Object); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isXRRenderTarget: boolean; - /** - * Whether the attachments of the render target - * are defined by external textures. This flag is - * set to `true` when using the WebXR Layers API. - * - * @private - * @type {boolean} - * @default false - */ - private _hasExternalTextures; - /** - * Whether a depth buffer should automatically be allocated - * for this XR render target or not. - * - * Allocating a depth buffer is the default behavior of XR render - * targets. However, when using the WebXR Layers API, this flag - * must be set to `false` when the `ignoreDepthValues` property of - * the projection layers evaluates to `false`. - * - * Reference: {@link https://www.w3.org/TR/webxrlayers-1/#dom-xrprojectionlayer-ignoredepthvalues}. - * - * @private - * @type {boolean} - * @default true - */ - private _autoAllocateDepthBuffer; - /** - * Whether this render target is associated with a XRWebGLLayer. - * - * A XRWebGLLayer points to an opaque framebuffer. Basically, - * this means that you don't have access to its bound color, - * stencil and depth buffers. We need to handle this framebuffer - * differently since its textures are always bound. - * - * @private - * @type {boolean} - * @default false - * */ - private _isOpaqueFramebuffer; - copy(source: any): this; -} -import { RenderTarget } from '../../core/RenderTarget.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/extras/PMREMGenerator.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/extras/PMREMGenerator.d.ts deleted file mode 100644 index f288b2e6f..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/extras/PMREMGenerator.d.ts +++ /dev/null @@ -1,198 +0,0 @@ -export default PMREMGenerator; -/** - * This class generates a Prefiltered, Mipmapped Radiance Environment Map - * (PMREM) from a cubeMap environment texture. This allows different levels of - * blur to be quickly accessed based on material roughness. It is packed into a - * special CubeUV format that allows us to perform custom interpolation so that - * we can support nonlinear formats such as RGBE. Unlike a traditional mipmap - * chain, it only goes down to the LOD_MIN level (above), and then creates extra - * even more filtered 'mips' at the same LOD_MIN resolution, associated with - * higher roughness levels. In this way we maintain resolution to smoothly - * interpolate diffuse lighting while limiting sampling computation. - * - * The prefiltering uses GGX VNDF (Visible Normal Distribution Function) - * importance sampling based on "Sampling the GGX Distribution of Visible Normals" - * (Heitz, 2018) to generate environment maps that accurately match the GGX BRDF - * used in material rendering for physically-based image-based lighting. - */ -declare class PMREMGenerator { - /** - * Constructs a new PMREM generator. - * - * @param {Renderer} renderer - The renderer. - */ - constructor(renderer: Renderer); - _renderer: Renderer; - _pingPongRenderTarget: RenderTarget | null; - _lodMax: number; - _cubeSize: number; - _sizeLods: any[]; - _sigmas: any[]; - _lodMeshes: any[]; - _blurMaterial: NodeMaterial | null; - _ggxMaterial: NodeMaterial | null; - _cubemapMaterial: NodeMaterial | null; - _equirectMaterial: NodeMaterial | null; - _backgroundBox: Mesh | null; - get _hasInitialized(): any; - /** - * Generates a PMREM from a supplied Scene, which can be faster than using an - * image if networking bandwidth is low. Optional sigma specifies a blur radius - * in radians to be applied to the scene before PMREM generation. Optional near - * and far planes ensure the scene is rendered in its entirety. - * - * @param {Scene} scene - The scene to be captured. - * @param {number} [sigma=0] - The blur radius in radians. - * @param {number} [near=0.1] - The near plane distance. - * @param {number} [far=100] - The far plane distance. - * @param {Object} [options={}] - The configuration options. - * @param {number} [options.size=256] - The texture size of the PMREM. - * @param {Vector3} [options.renderTarget=origin] - The position of the internal cube camera that renders the scene. - * @param {?RenderTarget} [options.renderTarget=null] - The render target to use. - * @return {RenderTarget} The resulting PMREM. - * @see {@link PMREMGenerator#fromScene} - */ - fromScene(scene: Scene, sigma?: number, near?: number, far?: number, options?: { - size?: number | undefined; - renderTarget?: Vector3 | undefined; - renderTarget?: Vector3 | undefined; - }): RenderTarget; - /** - * Generates a PMREM from a supplied Scene, which can be faster than using an - * image if networking bandwidth is low. Optional sigma specifies a blur radius - * in radians to be applied to the scene before PMREM generation. Optional near - * and far planes ensure the scene is rendered in its entirety (the cubeCamera - * is placed at the origin). - * - * @deprecated - * @param {Scene} scene - The scene to be captured. - * @param {number} [sigma=0] - The blur radius in radians. - * @param {number} [near=0.1] - The near plane distance. - * @param {number} [far=100] - The far plane distance. - * @param {Object} [options={}] - The configuration options. - * @param {number} [options.size=256] - The texture size of the PMREM. - * @param {Vector3} [options.position=origin] - The position of the internal cube camera that renders the scene. - * @param {?RenderTarget} [options.renderTarget=null] - The render target to use. - * @return {Promise} A Promise that resolve with the PMREM when the generation has been finished. - * @see {@link PMREMGenerator#fromScene} - */ - fromSceneAsync(scene: Scene, sigma?: number, near?: number, far?: number, options?: { - size?: number | undefined; - position?: Vector3 | undefined; - renderTarget?: RenderTarget | null | undefined; - }): Promise; - /** - * Generates a PMREM from an equirectangular texture, which can be either LDR - * or HDR. The ideal input image size is 1k (1024 x 512), as this matches best - * with the 256 x 256 cubemap output. The minimum supported input image size - * is 64 x 32. - * - * @param {Texture} equirectangular - The equirectangular texture to be converted. - * @param {?RenderTarget} [renderTarget=null] - The render target to use. - * @return {RenderTarget} The resulting PMREM. - * @see {@link PMREMGenerator#fromEquirectangularAsync} - */ - fromEquirectangular(equirectangular: Texture, renderTarget?: RenderTarget | null): RenderTarget; - /** - * Generates a PMREM from an equirectangular texture, which can be either LDR - * or HDR. The ideal input image size is 1k (1024 x 512), - * as this matches best with the 256 x 256 cubemap output. - * - * @deprecated - * @param {Texture} equirectangular - The equirectangular texture to be converted. - * @param {?RenderTarget} [renderTarget=null] - The render target to use. - * @return {Promise} The resulting PMREM. - * @see {@link PMREMGenerator#fromEquirectangular} - */ - fromEquirectangularAsync(equirectangular: Texture, renderTarget?: RenderTarget | null): Promise; - /** - * Generates a PMREM from an cubemap texture, which can be either LDR - * or HDR. The ideal input cube size is 256 x 256, as this matches best - * with the 256 x 256 cubemap output. The minimum supported input cube - * size is 16 x 16 per face. - * - * @param {Texture} cubemap - The cubemap texture to be converted. - * @param {?RenderTarget} [renderTarget=null] - The render target to use. - * @return {RenderTarget} The resulting PMREM. - * @see {@link PMREMGenerator#fromCubemapAsync} - */ - fromCubemap(cubemap: Texture, renderTarget?: RenderTarget | null): RenderTarget; - /** - * Generates a PMREM from an cubemap texture, which can be either LDR - * or HDR. The ideal input cube size is 256 x 256, - * with the 256 x 256 cubemap output. - * - * @deprecated - * @param {Texture} cubemap - The cubemap texture to be converted. - * @param {?RenderTarget} [renderTarget=null] - The render target to use. - * @return {Promise} The resulting PMREM. - * @see {@link PMREMGenerator#fromCubemap} - */ - fromCubemapAsync(cubemap: Texture, renderTarget?: RenderTarget | null): Promise; - /** - * Pre-compiles the cubemap shader. You can get faster start-up by invoking this method during - * your texture's network fetch for increased concurrency. - * - * @returns {Promise} - */ - compileCubemapShader(): Promise; - /** - * Pre-compiles the equirectangular shader. You can get faster start-up by invoking this method during - * your texture's network fetch for increased concurrency. - * - * @returns {Promise} - */ - compileEquirectangularShader(): Promise; - /** - * Disposes of the PMREMGenerator's internal memory. Note that PMREMGenerator is a static class, - * so you should not need more than one PMREMGenerator object. If you do, calling dispose() on - * one of them will cause any others to also become unusable. - */ - dispose(): void; - _setSizeFromTexture(texture: any): void; - _setSize(cubeSize: any): void; - _dispose(): void; - _cleanup(outputTarget: any): void; - _fromTexture(texture: any, renderTarget: any): any; - _allocateTarget(depthBuffer: any): RenderTarget; - _init(renderTarget: any): void; - _compileMaterial(material: any): Promise; - _sceneToCubeUV(scene: any, near: any, far: any, cubeUVRenderTarget: any, position: any): void; - _textureToCubeUV(texture: any, cubeUVRenderTarget: any): void; - _applyPMREM(cubeUVRenderTarget: any): void; - /** - * Applies GGX VNDF importance sampling filter to generate a prefiltered environment map. - * Uses Monte Carlo integration with VNDF importance sampling to accurately represent the - * GGX BRDF for physically-based rendering. Reads from the previous LOD level and - * applies incremental roughness filtering to avoid over-blurring. - * - * @private - * @param {RenderTarget} cubeUVRenderTarget - * @param {number} lodIn - Source LOD level to read from - * @param {number} lodOut - Target LOD level to write to - */ - private _applyGGXFilter; - /** - * This is a two-pass Gaussian blur for a cubemap. Normally this is done - * vertically and horizontally, but this breaks down on a cube. Here we apply - * the blur latitudinally (around the poles), and then longitudinally (towards - * the poles) to approximate the orthogonally-separable blur. It is least - * accurate at the poles, but still does a decent job. - * - * Used for initial scene blur in fromScene() method when sigma > 0. - * - * @private - * @param {RenderTarget} cubeUVRenderTarget - The cubemap render target. - * @param {number} lodIn - The input level-of-detail. - * @param {number} lodOut - The output level-of-detail. - * @param {number} sigma - The blur radius in radians. - * @param {Vector3} [poleAxis] - The pole axis. - */ - private _blur; - _halfBlur(targetIn: any, targetOut: any, lodIn: any, lodOut: any, sigmaRadians: any, direction: any, poleAxis: any): void; - _setViewport(target: any, x: any, y: any, width: any, height: any): void; -} -import { RenderTarget } from '../../../core/RenderTarget.js'; -import NodeMaterial from '../../../materials/nodes/NodeMaterial.js'; -import { Mesh } from '../../../objects/Mesh.js'; -import { Vector3 } from '../../../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeBuilderState.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeBuilderState.d.ts deleted file mode 100644 index 876698dc2..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeBuilderState.d.ts +++ /dev/null @@ -1,105 +0,0 @@ -export default NodeBuilderState; -/** - * This module represents the state of a node builder after it was - * used to build the nodes for a render object. The state holds the - * results of the build for further processing in the renderer. - * - * Render objects with identical cache keys share the same node builder state. - * - * @private - */ -declare class NodeBuilderState { - /** - * Constructs a new node builder state. - * - * @param {string} vertexShader - The native vertex shader code. - * @param {string} fragmentShader - The native fragment shader code. - * @param {string} computeShader - The native compute shader code. - * @param {Array} nodeAttributes - An array of node attributes. - * @param {Array} bindings - An array of bind groups. - * @param {Array} updateNodes - An array of nodes that implement their `update()` method. - * @param {Array} updateBeforeNodes - An array of nodes that implement their `updateBefore()` method. - * @param {Array} updateAfterNodes - An array of nodes that implement their `updateAfter()` method. - * @param {NodeMaterialObserver} observer - A node material observer. - * @param {Array} transforms - An array with transform attribute objects. Only relevant when using compute shaders with WebGL 2. - */ - constructor(vertexShader: string, fragmentShader: string, computeShader: string, nodeAttributes: Array, bindings: Array, updateNodes: Array, updateBeforeNodes: Array, updateAfterNodes: Array, observer: NodeMaterialObserver, transforms?: Array); - /** - * The native vertex shader code. - * - * @type {string} - */ - vertexShader: string; - /** - * The native fragment shader code. - * - * @type {string} - */ - fragmentShader: string; - /** - * The native compute shader code. - * - * @type {string} - */ - computeShader: string; - /** - * An array with transform attribute objects. - * Only relevant when using compute shaders with WebGL 2. - * - * @type {Array} - */ - transforms: Array; - /** - * An array of node attributes representing - * the attributes of the shaders. - * - * @type {Array} - */ - nodeAttributes: Array; - /** - * An array of bind groups representing the uniform or storage - * buffers, texture or samplers of the shader. - * - * @type {Array} - */ - bindings: Array; - /** - * An array of nodes that implement their `update()` method. - * - * @type {Array} - */ - updateNodes: Array; - /** - * An array of nodes that implement their `updateBefore()` method. - * - * @type {Array} - */ - updateBeforeNodes: Array; - /** - * An array of nodes that implement their `updateAfter()` method. - * - * @type {Array} - */ - updateAfterNodes: Array; - /** - * A node material observer. - * - * @type {NodeMaterialObserver} - */ - observer: NodeMaterialObserver; - /** - * How often this state is used by render objects. - * - * @type {number} - */ - usedTimes: number; - /** - * This method is used to create a array of bind groups based - * on the existing bind groups of this state. Shared groups are - * not cloned. - * - * @return {Array} A array of bind groups. - */ - createBindings(): Array; -} -import BindGroup from '../BindGroup.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeLibrary.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeLibrary.d.ts deleted file mode 100644 index 0121dd34b..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeLibrary.d.ts +++ /dev/null @@ -1,99 +0,0 @@ -export default NodeLibrary; -/** - * The purpose of a node library is to assign node implementations - * to existing library features. In `WebGPURenderer` lights, materials - * which are not based on `NodeMaterial` as well as tone mapping techniques - * are implemented with node-based modules. - * - * @private - */ -declare class NodeLibrary { - /** - * A weak map that maps lights to light nodes. - * - * @type {WeakMap} - */ - lightNodes: WeakMap; - /** - * A map that maps materials to node materials. - * - * @type {Map} - */ - materialNodes: Map; - /** - * A map that maps tone mapping techniques (constants) - * to tone mapping node functions. - * - * @type {Map} - */ - toneMappingNodes: Map; - /** - * Returns a matching node material instance for the given material object. - * - * This method also assigns/copies the properties of the given material object - * to the node material. This is done to make sure the current material - * configuration carries over to the node version. - * - * @param {Material} material - A material. - * @return {NodeMaterial} The corresponding node material. - */ - fromMaterial(material: Material): NodeMaterial; - /** - * Adds a tone mapping node function for a tone mapping technique (constant). - * - * @param {Function} toneMappingNode - The tone mapping node function. - * @param {number} toneMapping - The tone mapping. - */ - addToneMapping(toneMappingNode: Function, toneMapping: number): void; - /** - * Returns a tone mapping node function for a tone mapping technique (constant). - * - * @param {number} toneMapping - The tone mapping. - * @return {?Function} The tone mapping node function. Returns `null` if no node function is found. - */ - getToneMappingFunction(toneMapping: number): Function | null; - /** - * Returns a node material class definition for a material type. - * - * @param {string} materialType - The material type. - * @return {?NodeMaterial.constructor} The node material class definition. Returns `null` if no node material is found. - */ - getMaterialNodeClass(materialType: string): NodeMaterial.constructor | null; - /** - * Adds a node material class definition for a given material type. - * - * @param {NodeMaterial.constructor} materialNodeClass - The node material class definition. - * @param {string} materialClassType - The material type. - */ - addMaterial(materialNodeClass: NodeMaterial.constructor, materialClassType: string): void; - /** - * Returns a light node class definition for a light class definition. - * - * @param {Light.constructor} light - The light class definition. - * @return {?AnalyticLightNode.constructor} The light node class definition. Returns `null` if no light node is found. - */ - getLightNodeClass(light: Light.constructor): AnalyticLightNode.constructor | null; - /** - * Adds a light node class definition for a given light class definition. - * - * @param {AnalyticLightNode.constructor} lightNodeClass - The light node class definition. - * @param {Light.constructor} lightClass - The light class definition. - */ - addLight(lightNodeClass: AnalyticLightNode.constructor, lightClass: Light.constructor): void; - /** - * Adds a node class definition for the given type to the provided type library. - * - * @param {Node.constructor} nodeClass - The node class definition. - * @param {number|string} type - The object type. - * @param {Map} library - The type library. - */ - addType(nodeClass: Node.constructor, type: number | string, library: Map): void; - /** - * Adds a node class definition for the given class definition to the provided type library. - * - * @param {Node.constructor} nodeClass - The node class definition. - * @param {Node.constructor} baseClass - The class definition. - * @param {WeakMap} library - The type library. - */ - addClass(nodeClass: Node.constructor, baseClass: Node.constructor, library: WeakMap): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeManager.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeManager.d.ts deleted file mode 100644 index 68ca1edfe..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeManager.d.ts +++ /dev/null @@ -1,287 +0,0 @@ -export default NodeManager; -/** - * This renderer module manages node-related objects and is the - * primary interface between the renderer and the node system. - * - * @private - * @augments DataMap - */ -declare class NodeManager extends DataMap { - /** - * Constructs a new nodes management component. - * - * @param {Renderer} renderer - The renderer. - * @param {Backend} backend - The renderer's backend. - */ - constructor(renderer: Renderer, backend: Backend); - /** - * The renderer. - * - * @type {Renderer} - */ - renderer: Renderer; - /** - * The renderer's backend. - * - * @type {Backend} - */ - backend: Backend; - /** - * The node frame. - * - * @type {Renderer} - */ - nodeFrame: Renderer; - /** - * A cache for managing node builder states. - * - * @type {Map} - */ - nodeBuilderCache: Map; - /** - * A cache for managing data cache key data. - * - * @type {ChainMap} - */ - callHashCache: ChainMap; - /** - * A cache for managing node uniforms group data. - * - * @type {ChainMap} - */ - groupsData: ChainMap; - /** - * Queue for pending async builds to limit concurrent compilation. - * - * @private - * @type {Array} - */ - private _buildQueue; - /** - * Whether an async build is currently in progress. - * - * @private - * @type {boolean} - */ - private _buildInProgress; - /** - * A cache for managing node objects of - * scene properties like fog or environments. - * - * @type {Object} - */ - cacheLib: { - [x: string]: WeakMap; - }; - /** - * Returns `true` if the given node uniforms group must be updated or not. - * - * @param {NodeUniformsGroup} nodeUniformsGroup - The node uniforms group. - * @return {boolean} Whether the node uniforms group requires an update or not. - */ - updateGroup(nodeUniformsGroup: NodeUniformsGroup): boolean; - /** - * Returns the cache key for the given render object. - * - * @param {RenderObject} renderObject - The render object. - * @return {number} The cache key. - */ - getForRenderCacheKey(renderObject: RenderObject): number; - /** - * Creates a node builder configured for the given render object and material. - * - * @private - * @param {RenderObject} renderObject - The render object. - * @param {Material} material - The material to use. - * @return {NodeBuilder} The configured node builder. - */ - private _createNodeBuilder; - /** - * Returns a node builder state for the given render object. - * - * @param {RenderObject} renderObject - The render object. - * @param {boolean} [useAsync=false] - Whether to use async build with yielding. - * @return {NodeBuilderState|Promise} The node builder state (or Promise if async). - */ - getForRender(renderObject: RenderObject, useAsync?: boolean): NodeBuilderState | Promise; - /** - * Async version of getForRender() that yields to main thread during build. - * Use this in compileAsync() to prevent blocking the main thread. - * - * @param {RenderObject} renderObject - The render object. - * @return {Promise} A promise that resolves to the node builder state. - */ - getForRenderAsync(renderObject: RenderObject): Promise; - /** - * Returns nodeBuilderState if ready, null if pending async build. - * Queues async build on first call for cache miss. - * Use this in render() path to enable non-blocking compilation. - * - * @param {RenderObject} renderObject - The render object. - * @return {?NodeBuilderState} The node builder state, or null if still building. - */ - getForRenderDeferred(renderObject: RenderObject): NodeBuilderState | null; - /** - * Processes the build queue one item at a time. - * This ensures builds don't all run simultaneously and freeze the main thread. - * - * @private - */ - private _processBuildQueue; - /** - * Deletes the given object from the internal data map - * - * @param {any} object - The object to delete. - * @return {?Object} The deleted dictionary. - */ - delete(object: any): Object | null; - /** - * Returns a node builder state for the given compute node. - * - * @param {Node} computeNode - The compute node. - * @return {NodeBuilderState} The node builder state. - */ - getForCompute(computeNode: Node): NodeBuilderState; - /** - * Creates a node builder state for the given node builder. - * - * @private - * @param {NodeBuilder} nodeBuilder - The node builder. - * @return {NodeBuilderState} The node builder state. - */ - private _createNodeBuilderState; - /** - * Returns an environment node for the current configured - * scene environment. - * - * @param {Scene} scene - The scene. - * @return {Node} A node representing the current scene environment. - */ - getEnvironmentNode(scene: Scene): Node; - /** - * Returns a background node for the current configured - * scene background. - * - * @param {Scene} scene - The scene. - * @return {Node} A node representing the current scene background. - */ - getBackgroundNode(scene: Scene): Node; - /** - * Returns a fog node for the current configured scene fog. - * - * @param {Scene} scene - The scene. - * @return {Node} A node representing the current scene fog. - */ - getFogNode(scene: Scene): Node; - /** - * Returns a cache key for the given scene and lights node. - * This key is used by `RenderObject` as a part of the dynamic - * cache key (a key that must be checked every time the render - * objects is drawn). - * - * @param {Scene} scene - The scene. - * @param {LightsNode} lightsNode - The lights node. - * @return {number} The cache key. - */ - getCacheKey(scene: Scene, lightsNode: LightsNode): number; - /** - * A boolean that indicates whether tone mapping should be enabled - * or not. - * - * @type {boolean} - */ - get isToneMappingState(): boolean; - /** - * If a scene background is configured, this method makes sure to - * represent the background with a corresponding node-based implementation. - * - * @param {Scene} scene - The scene. - */ - updateBackground(scene: Scene): void; - /** - * This method is part of the caching of nodes which are used to represents the - * scene's background, fog or environment. - * - * @param {string} type - The type of object to cache. - * @param {Object} object - The object. - * @param {Function} callback - A callback that produces a node representation for the given object. - * @param {boolean} [forceUpdate=false] - Whether an update should be enforced or not. - * @return {Node} The node representation. - */ - getCacheNode(type: string, object: Object, callback: Function, forceUpdate?: boolean): Node; - /** - * If a scene fog is configured, this method makes sure to - * represent the fog with a corresponding node-based implementation. - * - * @param {Scene} scene - The scene. - */ - updateFog(scene: Scene): void; - /** - * If a scene environment is configured, this method makes sure to - * represent the environment with a corresponding node-based implementation. - * - * @param {Scene} scene - The scene. - */ - updateEnvironment(scene: Scene): void; - getNodeFrame(renderer?: Renderer, scene?: null, object?: null, camera?: null, material?: null): Renderer; - getNodeFrameForRender(renderObject: any): Renderer; - /** - * Returns the current output cache key. - * - * @return {string} The output cache key. - */ - getOutputCacheKey(): string; - /** - * Returns a node that represents the output configuration (tone mapping and - * color space) for the current target. - * - * @param {Texture} outputTarget - The output target. - * @return {Node} The output node. - */ - getOutputNode(outputTarget: Texture): Node; - /** - * Sets the output layer index for array texture output pass. - * This should be called before each layer render during the output pass. - * - * @param {number} index - The layer index. - */ - setOutputLayerIndex(index: number): void; - /** - * Triggers the call of `updateBefore()` methods - * for all nodes of the given render object. - * - * @param {RenderObject} renderObject - The render object. - */ - updateBefore(renderObject: RenderObject): void; - /** - * Triggers the call of `updateAfter()` methods - * for all nodes of the given render object. - * - * @param {RenderObject} renderObject - The render object. - */ - updateAfter(renderObject: RenderObject): void; - /** - * Triggers the call of `update()` methods - * for all nodes of the given compute node. - * - * @param {Node} computeNode - The compute node. - */ - updateForCompute(computeNode: Node): void; - /** - * Triggers the call of `update()` methods - * for all nodes of the given render object. - * - * @param {RenderObject} renderObject - The render object. - */ - updateForRender(renderObject: RenderObject): void; - /** - * Returns `true` if the given render object requires a refresh. - * - * @param {RenderObject} renderObject - The render object. - * @return {boolean} Whether the given render object requires a refresh or not. - */ - needsRefresh(renderObject: RenderObject): boolean; -} -import DataMap from '../DataMap.js'; -import NodeBuilderState from './NodeBuilderState.js'; -import ChainMap from '../ChainMap.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeSampledTexture.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeSampledTexture.d.ts deleted file mode 100644 index 3c380c248..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeSampledTexture.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -/** - * A special form of sampled texture binding type. - * It's texture value is managed by a node object. - * - * @private - * @augments SampledTexture - */ -export class NodeSampledTexture extends SampledTexture { - /** - * Constructs a new node-based sampled texture. - * - * @param {string} name - The textures's name. - * @param {TextureNode} textureNode - The texture node. - * @param {UniformGroupNode} groupNode - The uniform group node. - * @param {?string} [access=null] - The access type. - */ - constructor(name: string, textureNode: TextureNode, groupNode: UniformGroupNode, access?: string | null); - /** - * The texture node. - * - * @type {TextureNode} - */ - textureNode: TextureNode; - /** - * The uniform group node. - * - * @type {UniformGroupNode} - */ - groupNode: UniformGroupNode; - /** - * The access type. - * - * @type {?string} - * @default null - */ - access: string | null; -} -/** - * A special form of sampled cube texture binding type. - * It's texture value is managed by a node object. - * - * @private - * @augments NodeSampledTexture - */ -export class NodeSampledCubeTexture extends NodeSampledTexture { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSampledCubeTexture: boolean; -} -/** - * A special form of sampled 3D texture binding type. - * It's texture value is managed by a node object. - * - * @private - * @augments NodeSampledTexture - */ -export class NodeSampledTexture3D extends NodeSampledTexture { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSampledTexture3D: boolean; -} -import { SampledTexture } from '../SampledTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeSampler.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeSampler.d.ts deleted file mode 100644 index b5ad4701d..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeSampler.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default NodeSampler; -/** - * A special form of sampler binding type. - * It's texture value is managed by a node object. - * - * @private - * @augments Sampler - */ -declare class NodeSampler extends Sampler { - /** - * Constructs a new node-based sampler. - * - * @param {string} name - The samplers's name. - * @param {TextureNode} textureNode - The texture node. - * @param {UniformGroupNode} groupNode - The uniform group node. - */ - constructor(name: string, textureNode: TextureNode, groupNode: UniformGroupNode); - /** - * The texture node. - * - * @type {TextureNode} - */ - textureNode: TextureNode; - /** - * The uniform group node. - * - * @type {UniformGroupNode} - */ - groupNode: UniformGroupNode; -} -import Sampler from '../Sampler.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeStorageBuffer.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeStorageBuffer.d.ts deleted file mode 100644 index ca5196126..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeStorageBuffer.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -export default NodeStorageBuffer; -/** - * A special form of storage buffer binding type. - * It's buffer value is managed by a node object. - * - * @private - * @augments StorageBuffer - */ -declare class NodeStorageBuffer extends StorageBuffer { - /** - * Constructs a new node-based storage buffer. - * - * @param {StorageBufferNode} nodeUniform - The storage buffer node. - * @param {UniformGroupNode} groupNode - The uniform group node. - */ - constructor(nodeUniform: StorageBufferNode, groupNode: UniformGroupNode); - /** - * The node uniform. - * - * @type {StorageBufferNode} - */ - nodeUniform: StorageBufferNode; - /** - * The access type. - * - * @type {string} - */ - access: string; - /** - * The uniform group node. - * - * @type {UniformGroupNode} - */ - groupNode: UniformGroupNode; -} -import StorageBuffer from '../StorageBuffer.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniform.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniform.d.ts deleted file mode 100644 index 47673f68d..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniform.d.ts +++ /dev/null @@ -1,230 +0,0 @@ -/** - * A special form of Number uniform binding type. - * It's value is managed by a node object. - * - * @private - * @augments NumberUniform - */ -export class NumberNodeUniform extends NumberUniform { - /** - * Constructs a new node-based Number uniform. - * - * @param {NodeUniform} nodeUniform - The node uniform. - */ - constructor(nodeUniform: NodeUniform); - /** - * The node uniform. - * - * @type {NodeUniform} - */ - nodeUniform: NodeUniform; - /** - * Overwritten to return the value of the node uniform. - * - * @return {number} The value. - */ - getValue(): number; - /** - * Returns the node uniform data type. - * - * @return {string} The data type. - */ - getType(): string; -} -/** - * A special form of Vector2 uniform binding type. - * It's value is managed by a node object. - * - * @private - * @augments Vector2Uniform - */ -export class Vector2NodeUniform extends Vector2Uniform { - /** - * Constructs a new node-based Vector2 uniform. - * - * @param {NodeUniform} nodeUniform - The node uniform. - */ - constructor(nodeUniform: NodeUniform); - /** - * The node uniform. - * - * @type {NodeUniform} - */ - nodeUniform: NodeUniform; - /** - * Returns the node uniform data type. - * - * @return {string} The data type. - */ - getType(): string; -} -/** - * A special form of Vector3 uniform binding type. - * It's value is managed by a node object. - * - * @private - * @augments Vector3Uniform - */ -export class Vector3NodeUniform extends Vector3Uniform { - /** - * Constructs a new node-based Vector3 uniform. - * - * @param {NodeUniform} nodeUniform - The node uniform. - */ - constructor(nodeUniform: NodeUniform); - /** - * The node uniform. - * - * @type {NodeUniform} - */ - nodeUniform: NodeUniform; - /** - * Returns the node uniform data type. - * - * @return {string} The data type. - */ - getType(): string; -} -/** - * A special form of Vector4 uniform binding type. - * It's value is managed by a node object. - * - * @private - * @augments Vector4Uniform - */ -export class Vector4NodeUniform extends Vector4Uniform { - /** - * Constructs a new node-based Vector4 uniform. - * - * @param {NodeUniform} nodeUniform - The node uniform. - */ - constructor(nodeUniform: NodeUniform); - /** - * The node uniform. - * - * @type {NodeUniform} - */ - nodeUniform: NodeUniform; - /** - * Returns the node uniform data type. - * - * @return {string} The data type. - */ - getType(): string; -} -/** - * A special form of Color uniform binding type. - * It's value is managed by a node object. - * - * @private - * @augments ColorUniform - */ -export class ColorNodeUniform extends ColorUniform { - /** - * Constructs a new node-based Color uniform. - * - * @param {NodeUniform} nodeUniform - The node uniform. - */ - constructor(nodeUniform: NodeUniform); - /** - * The node uniform. - * - * @type {NodeUniform} - */ - nodeUniform: NodeUniform; - /** - * Returns the node uniform data type. - * - * @return {string} The data type. - */ - getType(): string; -} -/** - * A special form of Matrix2 uniform binding type. - * It's value is managed by a node object. - * - * @private - * @augments Matrix2Uniform - */ -export class Matrix2NodeUniform extends Matrix2Uniform { - /** - * Constructs a new node-based Matrix2 uniform. - * - * @param {NodeUniform} nodeUniform - The node uniform. - */ - constructor(nodeUniform: NodeUniform); - /** - * The node uniform. - * - * @type {NodeUniform} - */ - nodeUniform: NodeUniform; - /** - * Returns the node uniform data type. - * - * @return {string} The data type. - */ - getType(): string; -} -/** - * A special form of Matrix3 uniform binding type. - * It's value is managed by a node object. - * - * @private - * @augments Matrix3Uniform - */ -export class Matrix3NodeUniform extends Matrix3Uniform { - /** - * Constructs a new node-based Matrix3 uniform. - * - * @param {NodeUniform} nodeUniform - The node uniform. - */ - constructor(nodeUniform: NodeUniform); - /** - * The node uniform. - * - * @type {NodeUniform} - */ - nodeUniform: NodeUniform; - /** - * Returns the node uniform data type. - * - * @return {string} The data type. - */ - getType(): string; -} -/** - * A special form of Matrix4 uniform binding type. - * It's value is managed by a node object. - * - * @private - * @augments Matrix4Uniform - */ -export class Matrix4NodeUniform extends Matrix4Uniform { - /** - * Constructs a new node-based Matrix4 uniform. - * - * @param {NodeUniform} nodeUniform - The node uniform. - */ - constructor(nodeUniform: NodeUniform); - /** - * The node uniform. - * - * @type {NodeUniform} - */ - nodeUniform: NodeUniform; - /** - * Returns the node uniform data type. - * - * @return {string} The data type. - */ - getType(): string; -} -import { NumberUniform } from '../Uniform.js'; -import { Vector2Uniform } from '../Uniform.js'; -import { Vector3Uniform } from '../Uniform.js'; -import { Vector4Uniform } from '../Uniform.js'; -import { ColorUniform } from '../Uniform.js'; -import { Matrix2Uniform } from '../Uniform.js'; -import { Matrix3Uniform } from '../Uniform.js'; -import { Matrix4Uniform } from '../Uniform.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniformBuffer.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniformBuffer.d.ts deleted file mode 100644 index 495dc5d8c..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniformBuffer.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -export default NodeUniformBuffer; -/** - * A special form of uniform buffer binding type. - * It's buffer value is managed by a node object. - * - * @private - * @augments UniformBuffer - */ -declare class NodeUniformBuffer extends UniformBuffer { - /** - * Constructs a new node-based uniform buffer. - * - * @param {BufferNode} nodeUniform - The uniform buffer node. - * @param {UniformGroupNode} groupNode - The uniform group node. - */ - constructor(nodeUniform: BufferNode, groupNode: UniformGroupNode); - /** - * The uniform buffer node. - * - * @type {BufferNode} - */ - nodeUniform: BufferNode; - /** - * The uniform group node. - * - * @type {UniformGroupNode} - */ - groupNode: UniformGroupNode; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isNodeUniformBuffer: boolean; - /** - * The array of update ranges. - * - * @param {Array<{start: number, count: number}>} value - The update ranges. - */ - set updateRanges(value: Array<{ - start: number; - count: number; - }>); - /** - * The array of update ranges. - * - * @type {Array<{start: number, count: number}>} - */ - get updateRanges(): Array<{ - start: number; - count: number; - }>; -} -import UniformBuffer from '../UniformBuffer.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniformsGroup.d.ts b/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniformsGroup.d.ts deleted file mode 100644 index c196bbe56..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/common/nodes/NodeUniformsGroup.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -export default NodeUniformsGroup; -/** - * A special form of uniforms group that represents - * the individual uniforms as node-based uniforms. - * - * @private - * @augments UniformsGroup - */ -declare class NodeUniformsGroup extends UniformsGroup { - /** - * Constructs a new node-based uniforms group. - * - * @param {string} name - The group's name. - * @param {UniformGroupNode} groupNode - The uniform group node. - */ - constructor(name: string, groupNode: UniformGroupNode); - /** - * The group's ID. - * - * @type {number} - */ - id: number; - /** - * The uniform group node. - * - * @type {UniformGroupNode} - */ - groupNode: UniformGroupNode; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isNodeUniformsGroup: boolean; -} -import UniformsGroup from '../UniformsGroup.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/DFGLUTData.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/DFGLUTData.d.ts deleted file mode 100644 index 408609494..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/DFGLUTData.d.ts +++ /dev/null @@ -1 +0,0 @@ -export function getDFGLUT(): any; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk.d.ts deleted file mode 100644 index 8fb607cb0..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk.d.ts +++ /dev/null @@ -1,252 +0,0 @@ -export namespace ShaderChunk { - export { alphahash_fragment }; - export { alphahash_pars_fragment }; - export { alphamap_fragment }; - export { alphamap_pars_fragment }; - export { alphatest_fragment }; - export { alphatest_pars_fragment }; - export { aomap_fragment }; - export { aomap_pars_fragment }; - export { batching_pars_vertex }; - export { batching_vertex }; - export { begin_vertex }; - export { beginnormal_vertex }; - export { bsdfs }; - export { iridescence_fragment }; - export { bumpmap_pars_fragment }; - export { clipping_planes_fragment }; - export { clipping_planes_pars_fragment }; - export { clipping_planes_pars_vertex }; - export { clipping_planes_vertex }; - export { color_fragment }; - export { color_pars_fragment }; - export { color_pars_vertex }; - export { color_vertex }; - export { common }; - export { cube_uv_reflection_fragment }; - export { defaultnormal_vertex }; - export { displacementmap_pars_vertex }; - export { displacementmap_vertex }; - export { emissivemap_fragment }; - export { emissivemap_pars_fragment }; - export { colorspace_fragment }; - export { colorspace_pars_fragment }; - export { envmap_fragment }; - export { envmap_common_pars_fragment }; - export { envmap_pars_fragment }; - export { envmap_pars_vertex }; - export { envmap_physical_pars_fragment }; - export { envmap_vertex }; - export { fog_vertex }; - export { fog_pars_vertex }; - export { fog_fragment }; - export { fog_pars_fragment }; - export { gradientmap_pars_fragment }; - export { lightmap_pars_fragment }; - export { lights_lambert_fragment }; - export { lights_lambert_pars_fragment }; - export { lights_pars_begin }; - export { lights_toon_fragment }; - export { lights_toon_pars_fragment }; - export { lights_phong_fragment }; - export { lights_phong_pars_fragment }; - export { lights_physical_fragment }; - export { lights_physical_pars_fragment }; - export { lights_fragment_begin }; - export { lights_fragment_maps }; - export { lights_fragment_end }; - export { lightprobes_pars_fragment }; - export { logdepthbuf_fragment }; - export { logdepthbuf_pars_fragment }; - export { logdepthbuf_pars_vertex }; - export { logdepthbuf_vertex }; - export { map_fragment }; - export { map_pars_fragment }; - export { map_particle_fragment }; - export { map_particle_pars_fragment }; - export { metalnessmap_fragment }; - export { metalnessmap_pars_fragment }; - export { morphinstance_vertex }; - export { morphcolor_vertex }; - export { morphnormal_vertex }; - export { morphtarget_pars_vertex }; - export { morphtarget_vertex }; - export { normal_fragment_begin }; - export { normal_fragment_maps }; - export { normal_pars_fragment }; - export { normal_pars_vertex }; - export { normal_vertex }; - export { normalmap_pars_fragment }; - export { clearcoat_normal_fragment_begin }; - export { clearcoat_normal_fragment_maps }; - export { clearcoat_pars_fragment }; - export { iridescence_pars_fragment }; - export { opaque_fragment }; - export { packing }; - export { premultiplied_alpha_fragment }; - export { project_vertex }; - export { dithering_fragment }; - export { dithering_pars_fragment }; - export { roughnessmap_fragment }; - export { roughnessmap_pars_fragment }; - export { shadowmap_pars_fragment }; - export { shadowmap_pars_vertex }; - export { shadowmap_vertex }; - export { shadowmask_pars_fragment }; - export { skinbase_vertex }; - export { skinning_pars_vertex }; - export { skinning_vertex }; - export { skinnormal_vertex }; - export { specularmap_fragment }; - export { specularmap_pars_fragment }; - export { tonemapping_fragment }; - export { tonemapping_pars_fragment }; - export { transmission_fragment }; - export { transmission_pars_fragment }; - export { uv_pars_fragment }; - export { uv_pars_vertex }; - export { uv_vertex }; - export { worldpos_vertex }; - export let background_vert: string; - export let background_frag: string; - export let backgroundCube_vert: string; - export let backgroundCube_frag: string; - export let cube_vert: string; - export let cube_frag: string; - export let depth_vert: string; - export let depth_frag: string; - export let distance_vert: string; - export let distance_frag: string; - export let equirect_vert: string; - export let equirect_frag: string; - export let linedashed_vert: string; - export let linedashed_frag: string; - export let meshbasic_vert: string; - export let meshbasic_frag: string; - export let meshlambert_vert: string; - export let meshlambert_frag: string; - export let meshmatcap_vert: string; - export let meshmatcap_frag: string; - export let meshnormal_vert: string; - export let meshnormal_frag: string; - export let meshphong_vert: string; - export let meshphong_frag: string; - export let meshphysical_vert: string; - export let meshphysical_frag: string; - export let meshtoon_vert: string; - export let meshtoon_frag: string; - export let points_vert: string; - export let points_frag: string; - export let shadow_vert: string; - export let shadow_frag: string; - export let sprite_vert: string; - export let sprite_frag: string; -} -import alphahash_fragment from './ShaderChunk/alphahash_fragment.glsl.js'; -import alphahash_pars_fragment from './ShaderChunk/alphahash_pars_fragment.glsl.js'; -import alphamap_fragment from './ShaderChunk/alphamap_fragment.glsl.js'; -import alphamap_pars_fragment from './ShaderChunk/alphamap_pars_fragment.glsl.js'; -import alphatest_fragment from './ShaderChunk/alphatest_fragment.glsl.js'; -import alphatest_pars_fragment from './ShaderChunk/alphatest_pars_fragment.glsl.js'; -import aomap_fragment from './ShaderChunk/aomap_fragment.glsl.js'; -import aomap_pars_fragment from './ShaderChunk/aomap_pars_fragment.glsl.js'; -import batching_pars_vertex from './ShaderChunk/batching_pars_vertex.glsl.js'; -import batching_vertex from './ShaderChunk/batching_vertex.glsl.js'; -import begin_vertex from './ShaderChunk/begin_vertex.glsl.js'; -import beginnormal_vertex from './ShaderChunk/beginnormal_vertex.glsl.js'; -import bsdfs from './ShaderChunk/bsdfs.glsl.js'; -import iridescence_fragment from './ShaderChunk/iridescence_fragment.glsl.js'; -import bumpmap_pars_fragment from './ShaderChunk/bumpmap_pars_fragment.glsl.js'; -import clipping_planes_fragment from './ShaderChunk/clipping_planes_fragment.glsl.js'; -import clipping_planes_pars_fragment from './ShaderChunk/clipping_planes_pars_fragment.glsl.js'; -import clipping_planes_pars_vertex from './ShaderChunk/clipping_planes_pars_vertex.glsl.js'; -import clipping_planes_vertex from './ShaderChunk/clipping_planes_vertex.glsl.js'; -import color_fragment from './ShaderChunk/color_fragment.glsl.js'; -import color_pars_fragment from './ShaderChunk/color_pars_fragment.glsl.js'; -import color_pars_vertex from './ShaderChunk/color_pars_vertex.glsl.js'; -import color_vertex from './ShaderChunk/color_vertex.glsl.js'; -import common from './ShaderChunk/common.glsl.js'; -import cube_uv_reflection_fragment from './ShaderChunk/cube_uv_reflection_fragment.glsl.js'; -import defaultnormal_vertex from './ShaderChunk/defaultnormal_vertex.glsl.js'; -import displacementmap_pars_vertex from './ShaderChunk/displacementmap_pars_vertex.glsl.js'; -import displacementmap_vertex from './ShaderChunk/displacementmap_vertex.glsl.js'; -import emissivemap_fragment from './ShaderChunk/emissivemap_fragment.glsl.js'; -import emissivemap_pars_fragment from './ShaderChunk/emissivemap_pars_fragment.glsl.js'; -import colorspace_fragment from './ShaderChunk/colorspace_fragment.glsl.js'; -import colorspace_pars_fragment from './ShaderChunk/colorspace_pars_fragment.glsl.js'; -import envmap_fragment from './ShaderChunk/envmap_fragment.glsl.js'; -import envmap_common_pars_fragment from './ShaderChunk/envmap_common_pars_fragment.glsl.js'; -import envmap_pars_fragment from './ShaderChunk/envmap_pars_fragment.glsl.js'; -import envmap_pars_vertex from './ShaderChunk/envmap_pars_vertex.glsl.js'; -import envmap_physical_pars_fragment from './ShaderChunk/envmap_physical_pars_fragment.glsl.js'; -import envmap_vertex from './ShaderChunk/envmap_vertex.glsl.js'; -import fog_vertex from './ShaderChunk/fog_vertex.glsl.js'; -import fog_pars_vertex from './ShaderChunk/fog_pars_vertex.glsl.js'; -import fog_fragment from './ShaderChunk/fog_fragment.glsl.js'; -import fog_pars_fragment from './ShaderChunk/fog_pars_fragment.glsl.js'; -import gradientmap_pars_fragment from './ShaderChunk/gradientmap_pars_fragment.glsl.js'; -import lightmap_pars_fragment from './ShaderChunk/lightmap_pars_fragment.glsl.js'; -import lights_lambert_fragment from './ShaderChunk/lights_lambert_fragment.glsl.js'; -import lights_lambert_pars_fragment from './ShaderChunk/lights_lambert_pars_fragment.glsl.js'; -import lights_pars_begin from './ShaderChunk/lights_pars_begin.glsl.js'; -import lights_toon_fragment from './ShaderChunk/lights_toon_fragment.glsl.js'; -import lights_toon_pars_fragment from './ShaderChunk/lights_toon_pars_fragment.glsl.js'; -import lights_phong_fragment from './ShaderChunk/lights_phong_fragment.glsl.js'; -import lights_phong_pars_fragment from './ShaderChunk/lights_phong_pars_fragment.glsl.js'; -import lights_physical_fragment from './ShaderChunk/lights_physical_fragment.glsl.js'; -import lights_physical_pars_fragment from './ShaderChunk/lights_physical_pars_fragment.glsl.js'; -import lights_fragment_begin from './ShaderChunk/lights_fragment_begin.glsl.js'; -import lights_fragment_maps from './ShaderChunk/lights_fragment_maps.glsl.js'; -import lights_fragment_end from './ShaderChunk/lights_fragment_end.glsl.js'; -import lightprobes_pars_fragment from './ShaderChunk/lightprobes_pars_fragment.glsl.js'; -import logdepthbuf_fragment from './ShaderChunk/logdepthbuf_fragment.glsl.js'; -import logdepthbuf_pars_fragment from './ShaderChunk/logdepthbuf_pars_fragment.glsl.js'; -import logdepthbuf_pars_vertex from './ShaderChunk/logdepthbuf_pars_vertex.glsl.js'; -import logdepthbuf_vertex from './ShaderChunk/logdepthbuf_vertex.glsl.js'; -import map_fragment from './ShaderChunk/map_fragment.glsl.js'; -import map_pars_fragment from './ShaderChunk/map_pars_fragment.glsl.js'; -import map_particle_fragment from './ShaderChunk/map_particle_fragment.glsl.js'; -import map_particle_pars_fragment from './ShaderChunk/map_particle_pars_fragment.glsl.js'; -import metalnessmap_fragment from './ShaderChunk/metalnessmap_fragment.glsl.js'; -import metalnessmap_pars_fragment from './ShaderChunk/metalnessmap_pars_fragment.glsl.js'; -import morphinstance_vertex from './ShaderChunk/morphinstance_vertex.glsl.js'; -import morphcolor_vertex from './ShaderChunk/morphcolor_vertex.glsl.js'; -import morphnormal_vertex from './ShaderChunk/morphnormal_vertex.glsl.js'; -import morphtarget_pars_vertex from './ShaderChunk/morphtarget_pars_vertex.glsl.js'; -import morphtarget_vertex from './ShaderChunk/morphtarget_vertex.glsl.js'; -import normal_fragment_begin from './ShaderChunk/normal_fragment_begin.glsl.js'; -import normal_fragment_maps from './ShaderChunk/normal_fragment_maps.glsl.js'; -import normal_pars_fragment from './ShaderChunk/normal_pars_fragment.glsl.js'; -import normal_pars_vertex from './ShaderChunk/normal_pars_vertex.glsl.js'; -import normal_vertex from './ShaderChunk/normal_vertex.glsl.js'; -import normalmap_pars_fragment from './ShaderChunk/normalmap_pars_fragment.glsl.js'; -import clearcoat_normal_fragment_begin from './ShaderChunk/clearcoat_normal_fragment_begin.glsl.js'; -import clearcoat_normal_fragment_maps from './ShaderChunk/clearcoat_normal_fragment_maps.glsl.js'; -import clearcoat_pars_fragment from './ShaderChunk/clearcoat_pars_fragment.glsl.js'; -import iridescence_pars_fragment from './ShaderChunk/iridescence_pars_fragment.glsl.js'; -import opaque_fragment from './ShaderChunk/opaque_fragment.glsl.js'; -import packing from './ShaderChunk/packing.glsl.js'; -import premultiplied_alpha_fragment from './ShaderChunk/premultiplied_alpha_fragment.glsl.js'; -import project_vertex from './ShaderChunk/project_vertex.glsl.js'; -import dithering_fragment from './ShaderChunk/dithering_fragment.glsl.js'; -import dithering_pars_fragment from './ShaderChunk/dithering_pars_fragment.glsl.js'; -import roughnessmap_fragment from './ShaderChunk/roughnessmap_fragment.glsl.js'; -import roughnessmap_pars_fragment from './ShaderChunk/roughnessmap_pars_fragment.glsl.js'; -import shadowmap_pars_fragment from './ShaderChunk/shadowmap_pars_fragment.glsl.js'; -import shadowmap_pars_vertex from './ShaderChunk/shadowmap_pars_vertex.glsl.js'; -import shadowmap_vertex from './ShaderChunk/shadowmap_vertex.glsl.js'; -import shadowmask_pars_fragment from './ShaderChunk/shadowmask_pars_fragment.glsl.js'; -import skinbase_vertex from './ShaderChunk/skinbase_vertex.glsl.js'; -import skinning_pars_vertex from './ShaderChunk/skinning_pars_vertex.glsl.js'; -import skinning_vertex from './ShaderChunk/skinning_vertex.glsl.js'; -import skinnormal_vertex from './ShaderChunk/skinnormal_vertex.glsl.js'; -import specularmap_fragment from './ShaderChunk/specularmap_fragment.glsl.js'; -import specularmap_pars_fragment from './ShaderChunk/specularmap_pars_fragment.glsl.js'; -import tonemapping_fragment from './ShaderChunk/tonemapping_fragment.glsl.js'; -import tonemapping_pars_fragment from './ShaderChunk/tonemapping_pars_fragment.glsl.js'; -import transmission_fragment from './ShaderChunk/transmission_fragment.glsl.js'; -import transmission_pars_fragment from './ShaderChunk/transmission_pars_fragment.glsl.js'; -import uv_pars_fragment from './ShaderChunk/uv_pars_fragment.glsl.js'; -import uv_pars_vertex from './ShaderChunk/uv_pars_vertex.glsl.js'; -import uv_vertex from './ShaderChunk/uv_vertex.glsl.js'; -import worldpos_vertex from './ShaderChunk/worldpos_vertex.glsl.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphahash_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphahash_fragment.glsl.d.ts deleted file mode 100644 index 2fbc8585e..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphahash_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_ALPHAHASH\n\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphahash_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphahash_pars_fragment.glsl.d.ts deleted file mode 100644 index 22f68c64c..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphahash_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_ALPHAHASH\n\n\t/**\n\t * See: https://casual-effects.com/research/Wyman2017Hashed/index.html\n\t */\n\n\tconst float ALPHA_HASH_SCALE = 0.05; // Derived from trials only, and may be changed.\n\n\tfloat hash2D( vec2 value ) {\n\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\n\t}\n\n\tfloat hash3D( vec3 value ) {\n\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\n\t}\n\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\n\t\t// Find the discretized derivatives of our coordinates\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\n\t\t// Find two nearest log-discretized noise scales\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\n\t\t// Compute alpha thresholds at our two noise scales\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\n\t\t// Factor to interpolate lerp with\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\n\t\t// Interpolate alpha threshold from noise at two scales\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\n\t\t// Pass into CDF to compute uniformly distrib threshold\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\n\t\t// Find our final, uniformly distributed alpha threshold (\u03B1\u03C4)\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\n\t\t// Avoids \u03B1\u03C4 == 0. Could also do \u03B1\u03C4 =1-\u03B1\u03C4\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\n\t}\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphamap_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphamap_fragment.glsl.d.ts deleted file mode 100644 index 307a3304f..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphamap_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_ALPHAMAP\n\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphamap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphamap_pars_fragment.glsl.d.ts deleted file mode 100644 index adb0fb573..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphamap_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_ALPHAMAP\n\n\tuniform sampler2D alphaMap;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphatest_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphatest_fragment.glsl.d.ts deleted file mode 100644 index 92b21922a..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphatest_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_ALPHATEST\n\n\t#ifdef ALPHA_TO_COVERAGE\n\n\tdiffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n\tif ( diffuseColor.a == 0.0 ) discard;\n\n\t#else\n\n\tif ( diffuseColor.a < alphaTest ) discard;\n\n\t#endif\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphatest_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphatest_pars_fragment.glsl.d.ts deleted file mode 100644 index af0e29861..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/alphatest_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/aomap_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/aomap_fragment.glsl.d.ts deleted file mode 100644 index 13933984f..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/aomap_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_AOMAP\n\n\t// reads channel R, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\n\t#if defined( USE_CLEARCOAT ) \n\t\tclearcoatSpecularIndirect *= ambientOcclusion;\n\t#endif\n\n\t#if defined( USE_SHEEN ) \n\t\tsheenSpecularIndirect *= ambientOcclusion;\n\t#endif\n\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\n\t#endif\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/aomap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/aomap_pars_fragment.glsl.d.ts deleted file mode 100644 index 3d9728bad..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/aomap_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_AOMAP\n\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/batching_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/batching_pars_vertex.glsl.d.ts deleted file mode 100644 index 745b7477f..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/batching_pars_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_BATCHING\n\t#if ! defined( GL_ANGLE_multi_draw )\n\t#define gl_DrawID _gl_DrawID\n\tuniform int _gl_DrawID;\n\t#endif\n\n\tuniform highp sampler2D batchingTexture;\n\tuniform highp usampler2D batchingIdTexture;\n\tmat4 getBatchingMatrix( const in float i ) {\n\n\t\tint size = textureSize( batchingTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\n\t}\n\n\tfloat getIndirectIndex( const in int i ) {\n\n\t\tint size = textureSize( batchingIdTexture, 0 ).x;\n\t\tint x = i % size;\n\t\tint y = i / size;\n\t\treturn float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );\n\n\t}\n\n#endif\n\n#ifdef USE_BATCHING_COLOR\n\n\tuniform sampler2D batchingColorTexture;\n\tvec4 getBatchingColor( const in float i ) {\n\n\t\tint size = textureSize( batchingColorTexture, 0 ).x;\n\t\tint j = int( i );\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\treturn texelFetch( batchingColorTexture, ivec2( x, y ), 0 );\n\n\t}\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/batching_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/batching_vertex.glsl.d.ts deleted file mode 100644 index b472ee778..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/batching_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_BATCHING\n\tmat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/begin_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/begin_vertex.glsl.d.ts deleted file mode 100644 index 06db803d3..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/begin_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\nvec3 transformed = vec3( position );\n\n#ifdef USE_ALPHAHASH\n\n\tvPosition = vec3( position );\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/beginnormal_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/beginnormal_vertex.glsl.d.ts deleted file mode 100644 index 3da7db7fa..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/beginnormal_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\nvec3 objectNormal = vec3( normal );\n\n#ifdef USE_TANGENT\n\n\tvec3 objectTangent = vec3( tangent.xyz );\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/bsdfs.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/bsdfs.glsl.d.ts deleted file mode 100644 index 2ad3ea62c..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/bsdfs.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n\nfloat G_BlinnPhong_Implicit( /* const in float dotNL, const in float dotNV */ ) {\n\n\t// geometry term is (n dot l)(n dot v) / 4(n dot l)(n dot v)\n\treturn 0.25;\n\n}\n\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n\n}\n\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\n\tfloat G = G_BlinnPhong_Implicit( /* dotNL, dotNV */ );\n\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\n\treturn F * ( G * D );\n\n} // validated\n\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/bumpmap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/bumpmap_pars_fragment.glsl.d.ts deleted file mode 100644 index f19431cdb..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/bumpmap_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_BUMPMAP\n\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\n\t// Bump Mapping Unparametrized Surfaces on the GPU by Morten S. Mikkelsen\n\t// https://mmikk.github.io/papers3d/mm_sfgrad_bump.pdf\n\n\t// Evaluate the derivative of the height w.r.t. screen-space using forward differencing (listing 2)\n\n\tvec2 dHdxy_fwd() {\n\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\n\t\treturn vec2( dBx, dBy );\n\n\t}\n\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\n\t\t// normalize is done to ensure that the bump map looks the same regardless of the texture's scale\n\t\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n\t\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n\t\tvec3 vN = surf_norm; // normalized\n\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\n\t}\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_begin.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_begin.glsl.d.ts deleted file mode 100644 index 956542f38..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_begin.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_CLEARCOAT\n\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_maps.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_maps.glsl.d.ts deleted file mode 100644 index f16ddc371..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_normal_fragment_maps.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_CLEARCOAT_NORMALMAP\n\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_pars_fragment.glsl.d.ts deleted file mode 100644 index 2ca80fed2..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clearcoat_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n\n#ifdef USE_CLEARCOATMAP\n\n\tuniform sampler2D clearcoatMap;\n\n#endif\n\n#ifdef USE_CLEARCOAT_NORMALMAP\n\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n\n#endif\n\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\n\tuniform sampler2D clearcoatRoughnessMap;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_fragment.glsl.d.ts deleted file mode 100644 index aaa2b23f9..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#if NUM_CLIPPING_PLANES > 0\n\n\tvec4 plane;\n\n\t#ifdef ALPHA_TO_COVERAGE\n\n\t\tfloat distanceToPlane, distanceGradient;\n\t\tfloat clipOpacity = 1.0;\n\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\tclipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\n\t\t\tif ( clipOpacity == 0.0 ) discard;\n\n\t\t}\n\t\t#pragma unroll_loop_end\n\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\n\t\t\tfloat unionClipOpacity = 1.0;\n\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\t\tunionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\n\t\t\tclipOpacity *= 1.0 - unionClipOpacity;\n\n\t\t#endif\n\n\t\tdiffuseColor.a *= clipOpacity;\n\n\t\tif ( diffuseColor.a == 0.0 ) discard;\n\n\t#else\n\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\n\t\t}\n\t\t#pragma unroll_loop_end\n\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\n\t\t\tbool clipped = true;\n\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\n\t\t\tif ( clipped ) discard;\n\n\t\t#endif\n\n\t#endif\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_pars_fragment.glsl.d.ts deleted file mode 100644 index ae5f26dfe..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#if NUM_CLIPPING_PLANES > 0\n\n\tvarying vec3 vClipPosition;\n\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_pars_vertex.glsl.d.ts deleted file mode 100644 index d5b3da410..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_pars_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#if NUM_CLIPPING_PLANES > 0\n\n\tvarying vec3 vClipPosition;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_vertex.glsl.d.ts deleted file mode 100644 index 20c123ce6..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/clipping_planes_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#if NUM_CLIPPING_PLANES > 0\n\n\tvClipPosition = - mvPosition.xyz;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_fragment.glsl.d.ts deleted file mode 100644 index 8feede5ff..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA )\n\n\tdiffuseColor *= vColor;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_pars_fragment.glsl.d.ts deleted file mode 100644 index 34020cf10..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA )\n\n\tvarying vec4 vColor;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_pars_vertex.glsl.d.ts deleted file mode 100644 index 90280cde7..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_pars_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\n\tvarying vec4 vColor;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_vertex.glsl.d.ts deleted file mode 100644 index 18cabec6a..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/color_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\n\tvColor = vec4( 1.0 );\n\n#endif\n\n#ifdef USE_COLOR_ALPHA\n\n\tvColor *= color;\n\n#elif defined( USE_COLOR )\n\n\tvColor.rgb *= color;\n\n#endif\n\n#ifdef USE_INSTANCING_COLOR\n\n\tvColor.rgb *= instanceColor.rgb;\n\n#endif\n\n#ifdef USE_BATCHING_COLOR\n\n\tvColor *= getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/colorspace_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/colorspace_fragment.glsl.d.ts deleted file mode 100644 index 9046950c1..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/colorspace_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\ngl_FragColor = linearToOutputTexel( gl_FragColor );\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/colorspace_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/colorspace_pars_fragment.glsl.d.ts deleted file mode 100644 index 0421d40c8..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/colorspace_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\n\nvec4 sRGBTransferEOTF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\n\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\n\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/common.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/common.glsl.d.ts deleted file mode 100644 index c1b304ac8..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/common.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n\n#ifndef saturate\n// may have defined saturate() already\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\n\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\n\n// expects values in the range of [0,1]x[0,1], returns values in the [0,1] range.\n// do not collapse into a single function per: http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/\nhighp float rand( const in vec2 uv ) {\n\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\n\treturn fract( sin( sn ) * c );\n\n}\n\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\n\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\n\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n\n#ifdef USE_ALPHAHASH\n\n\tvarying vec3 vPosition;\n\n#endif\n\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n}\n\n#define inverseTransformDirection transformDirectionByInverseViewMatrix // keeping this for backwards compatibility\n\nvec3 transformNormalByInverseViewMatrix( in vec3 normal, in mat4 viewMatrix ) {\n\n\t// upper-left 3x3 of view matrix is assumed to be orthogonal\n\n\treturn normalize( ( vec4( normal, 0.0 ) * viewMatrix ).xyz );\n\n}\n\nvec3 transformDirectionByInverseViewMatrix( in vec3 dir, in mat4 viewMatrix ) {\n\n\t// upper-left 3x3 of view matrix is assumed to be orthogonal\n\n\treturn normalize( ( vec4( dir, 0.0 ) * viewMatrix ).xyz );\n\n}\n\nbool isPerspectiveMatrix( mat4 m ) {\n\n\treturn m[ 2 ][ 3 ] == - 1.0;\n\n}\n\nvec2 equirectUv( in vec3 dir ) {\n\n\t// dir is assumed to be unit length\n\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\n\treturn vec2( u, v );\n\n}\n\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\n\treturn RECIPROCAL_PI * diffuseColor;\n\n} // validated\n\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\n\t// Original approximation by Christophe Schlick '94\n\t// float fresnel = pow( 1.0 - dotVH, 5.0 );\n\n\t// Optimized variant (presented by Epic at SIGGRAPH '13)\n\t// https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n\n} // validated\n\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\n\t// Original approximation by Christophe Schlick '94\n\t// float fresnel = pow( 1.0 - dotVH, 5.0 );\n\n\t// Optimized variant (presented by Epic at SIGGRAPH '13)\n\t// https://cdn2.unrealengine.com/Resources/files/2013SiggraphPresentationsNotes-26915738.pdf\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n\n} // validated\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/cube_uv_reflection_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/cube_uv_reflection_fragment.glsl.d.ts deleted file mode 100644 index 679dc7c37..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/cube_uv_reflection_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef ENVMAP_TYPE_CUBE_UV\n\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\n\t// These shader functions convert between the UV coordinates of a single face of\n\t// a cubemap, the 0-5 integer index of a cube face, and the direction vector for\n\t// sampling a textureCube (not generally normalized ).\n\n\tfloat getFace( vec3 direction ) {\n\n\t\tvec3 absDirection = abs( direction );\n\n\t\tfloat face = - 1.0;\n\n\t\tif ( absDirection.x > absDirection.z ) {\n\n\t\t\tif ( absDirection.x > absDirection.y )\n\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t} else {\n\n\t\t\tif ( absDirection.z > absDirection.y )\n\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\n\t\t\telse\n\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\n\t\t}\n\n\t\treturn face;\n\n\t}\n\n\t// RH coordinate system; PMREM face-indexing convention\n\tvec2 getUV( vec3 direction, float face ) {\n\n\t\tvec2 uv;\n\n\t\tif ( face == 0.0 ) {\n\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x ); // pos x\n\n\t\t} else if ( face == 1.0 ) {\n\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y ); // pos y\n\n\t\t} else if ( face == 2.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z ); // pos z\n\n\t\t} else if ( face == 3.0 ) {\n\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x ); // neg x\n\n\t\t} else if ( face == 4.0 ) {\n\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y ); // neg y\n\n\t\t} else {\n\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z ); // neg z\n\n\t\t}\n\n\t\treturn 0.5 * ( uv + 1.0 );\n\n\t}\n\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\n\t\tfloat face = getFace( direction );\n\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\n\t\tfloat faceSize = exp2( mipInt );\n\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; // #25071\n\n\t\tif ( face > 2.0 ) {\n\n\t\t\tuv.y += faceSize;\n\n\t\t\tface -= 3.0;\n\n\t\t}\n\n\t\tuv.x += face * faceSize;\n\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\n\t\t#ifdef texture2DGradEXT\n\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; // disable anisotropic filtering\n\n\t\t#else\n\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\n\t\t#endif\n\n\t}\n\n\t// These defines must match with PMREMGenerator\n\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\n\tfloat roughnessToMip( float roughness ) {\n\n\t\tfloat mip = 0.0;\n\n\t\tif ( roughness >= cubeUV_r1 ) {\n\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\n\t\t} else {\n\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness ); // 1.16 = 1.79^0.25\n\t\t}\n\n\t\treturn mip;\n\n\t}\n\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\n\t\tfloat mipF = fract( mip );\n\n\t\tfloat mipInt = floor( mip );\n\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\n\t\tif ( mipF == 0.0 ) {\n\n\t\t\treturn vec4( color0, 1.0 );\n\n\t\t} else {\n\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\n\t\t}\n\n\t}\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/default_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/default_fragment.glsl.d.ts deleted file mode 100644 index 0ec477406..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/default_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\nvoid main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/default_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/default_vertex.glsl.d.ts deleted file mode 100644 index c8a2405ff..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/default_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\nvoid main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/defaultnormal_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/defaultnormal_vertex.glsl.d.ts deleted file mode 100644 index d07874c8b..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/defaultnormal_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n\nvec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\n\tvec3 transformedTangent = objectTangent;\n\n#endif\n\n#ifdef USE_BATCHING\n\n\t// this is in lieu of a per-instance normal-matrix\n\t// shear transforms in the instance matrix are not supported\n\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\n\t#ifdef USE_TANGENT\n\n\t\ttransformedTangent = bm * transformedTangent;\n\n\t#endif\n\n#endif\n\n#ifdef USE_INSTANCING\n\n\t// this is in lieu of a per-instance normal-matrix\n\t// shear transforms in the instance matrix are not supported\n\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\n\t#ifdef USE_TANGENT\n\n\t\ttransformedTangent = im * transformedTangent;\n\n\t#endif\n\n#endif\n\ntransformedNormal = normalMatrix * transformedNormal;\n\n#ifdef FLIP_SIDED\n\n\ttransformedNormal = - transformedNormal;\n\n#endif\n\n#ifdef USE_TANGENT\n\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\n\t#ifdef FLIP_SIDED\n\n\t\ttransformedTangent = - transformedTangent;\n\n\t#endif\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/displacementmap_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/displacementmap_pars_vertex.glsl.d.ts deleted file mode 100644 index 11548436c..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/displacementmap_pars_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_DISPLACEMENTMAP\n\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/displacementmap_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/displacementmap_vertex.glsl.d.ts deleted file mode 100644 index 00cd8f00c..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/displacementmap_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_DISPLACEMENTMAP\n\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/dithering_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/dithering_fragment.glsl.d.ts deleted file mode 100644 index 79105cddc..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/dithering_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef DITHERING\n\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/dithering_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/dithering_pars_fragment.glsl.d.ts deleted file mode 100644 index a209611c6..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/dithering_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef DITHERING\n\n\t// based on https://www.shadertoy.com/view/MslGR8\n\tvec3 dithering( vec3 color ) {\n\t\t//Calculate grid position\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\n\t\t//Shift the individual colors differently, thus making it even harder to see the dithering pattern\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\n\t\t//modify shift according to grid position.\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\n\t\t//shift the color by dither_shift\n\t\treturn color + dither_shift_RGB;\n\t}\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/emissivemap_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/emissivemap_fragment.glsl.d.ts deleted file mode 100644 index c78635cd5..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/emissivemap_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_EMISSIVEMAP\n\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\n\t#ifdef DECODE_VIDEO_TEXTURE_EMISSIVE\n\n\t\t// use inline sRGB decode until browsers properly support SRGB8_ALPHA8 with video textures (#26516)\n\n\t\temissiveColor = sRGBTransferEOTF( emissiveColor );\n\n\t#endif\n\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/emissivemap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/emissivemap_pars_fragment.glsl.d.ts deleted file mode 100644 index a3cb247c1..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/emissivemap_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_EMISSIVEMAP\n\n\tuniform sampler2D emissiveMap;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_common_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_common_pars_fragment.glsl.d.ts deleted file mode 100644 index b5a4b088e..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_common_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_ENVMAP\n\n\tuniform float envMapIntensity;\n\tuniform mat3 envMapRotation;\n\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_fragment.glsl.d.ts deleted file mode 100644 index f91032c79..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_ENVMAP\n\n\t#ifdef ENV_WORLDPOS\n\n\t\tvec3 cameraToFrag;\n\n\t\tif ( isOrthographic ) {\n\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\n\t\t} else {\n\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\n\t\t}\n\n\t\t// Transforming Normal Vectors with the Inverse Transformation\n\t\tvec3 worldNormal = transformNormalByInverseViewMatrix( normal, viewMatrix );\n\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\n\t\t#else\n\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\n\t\t#endif\n\n\t#else\n\n\t\tvec3 reflectVec = vReflect;\n\n\t#endif\n\n\t#ifdef ENVMAP_TYPE_CUBE\n\n\t\tvec4 envColor = textureCube( envMap, envMapRotation * reflectVec );\n\n\t\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\n\t\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\n\t\t#elif defined( ENVMAP_BLENDING_MIX )\n\n\t\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\n\t\t#elif defined( ENVMAP_BLENDING_ADD )\n\n\t\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\n\t\t#endif\n\n\t#endif\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_pars_fragment.glsl.d.ts deleted file mode 100644 index 402c73014..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_ENVMAP\n\n\tuniform float reflectivity;\n\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\n\t\t#define ENV_WORLDPOS\n\n\t#endif\n\n\t#ifdef ENV_WORLDPOS\n\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_pars_vertex.glsl.d.ts deleted file mode 100644 index 9ff38842e..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_pars_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_ENVMAP\n\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\n\t\t#define ENV_WORLDPOS\n\n\t#endif\n\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\n\t#else\n\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\n\t#endif\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.d.ts deleted file mode 100644 index 6b2783dda..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_ENVMAP\n\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\n\t\t\tvec3 worldNormal = transformNormalByInverseViewMatrix( normal, viewMatrix );\n\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\n\t\t#else\n\n\t\t\treturn vec3( 0.0 );\n\n\t\t#endif\n\n\t}\n\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\n\t\t\t// Mixing the reflection with the normal is more accurate and keeps rough objects from gathering light from behind their tangent plane.\n\t\t\treflectVec = normalize( mix( reflectVec, normal, pow4( roughness ) ) );\n\n\t\t\treflectVec = transformDirectionByInverseViewMatrix( reflectVec, viewMatrix );\n\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\n\t\t#else\n\n\t\t\treturn vec3( 0.0 );\n\n\t\t#endif\n\n\t}\n\n\t#ifdef USE_ANISOTROPY\n\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\n\t\t\t // https://google.github.io/filament/Filament.md.html#lighting/imagebasedlights/anisotropy\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\n\t\t\t#else\n\n\t\t\t\treturn vec3( 0.0 );\n\n\t\t\t#endif\n\n\t\t}\n\n\t#endif\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_vertex.glsl.d.ts deleted file mode 100644 index af6e18f7e..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/envmap_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_ENVMAP\n\n\t#ifdef ENV_WORLDPOS\n\n\t\tvWorldPosition = worldPosition.xyz;\n\n\t#else\n\n\t\tvec3 cameraToVertex;\n\n\t\tif ( isOrthographic ) {\n\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\n\t\t} else {\n\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\n\t\t}\n\n\t\tvec3 worldNormal = transformNormalByInverseViewMatrix( transformedNormal, viewMatrix );\n\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\n\t\t#else\n\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\n\t\t#endif\n\n\t#endif\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_fragment.glsl.d.ts deleted file mode 100644 index a402de6ab..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_FOG\n\n\t#ifdef FOG_EXP2\n\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\n\t#else\n\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\n\t#endif\n\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_pars_fragment.glsl.d.ts deleted file mode 100644 index 2d1b3c615..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_FOG\n\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\n\t#ifdef FOG_EXP2\n\n\t\tuniform float fogDensity;\n\n\t#else\n\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\n\t#endif\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_pars_vertex.glsl.d.ts deleted file mode 100644 index 683bfb933..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_pars_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_FOG\n\n\tvarying float vFogDepth;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_vertex.glsl.d.ts deleted file mode 100644 index 5193d77e2..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/fog_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_FOG\n\n\tvFogDepth = - mvPosition.z;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/gradientmap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/gradientmap_pars_fragment.glsl.d.ts deleted file mode 100644 index 64ffea6e5..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/gradientmap_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n\n#ifdef USE_GRADIENTMAP\n\n\tuniform sampler2D gradientMap;\n\n#endif\n\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\n\t// dotNL will be from -1.0 to 1.0\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\n\t#ifdef USE_GRADIENTMAP\n\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\n\t#else\n\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\n\t#endif\n\n}\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/iridescence_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/iridescence_fragment.glsl.d.ts deleted file mode 100644 index ee7f019ab..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/iridescence_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n\n#ifdef USE_IRIDESCENCE\n\n\t// XYZ to linear-sRGB color space\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\n\t// Assume air interface for top\n\t// Note: We don't handle the case fresnel0 == 1\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\n\t}\n\n\t// Conversion FO/IOR\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\n\t}\n\n\t// ior is a value between 1.0 and 3.0. 1.0 is air interface\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\n\t}\n\n\t// Fresnel equations for dielectric/dielectric interfaces.\n\t// Ref: https://belcour.github.io/blog/research/2017/05/01/brdf-thin-film.html\n\t// Evaluation XYZ sensitivity curves in Fourier space\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\n\t}\n\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\n\t\tvec3 I;\n\n\t\t// Force iridescenceIOR -> outsideIOR when thinFilmThickness -> 0.0\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\t// Evaluate the cosTheta on the base layer (Snell law)\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\n\t\t// Handle TIR:\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\n\t\t\treturn vec3( 1.0 );\n\n\t\t}\n\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\n\t\t// First interface\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\n\t\t// Second interface\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); // guard against 1.0\n\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\n\t\t// Phase shift\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\n\t\t// Compound terms\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\n\t\t// Reflectance term for m = 0 (DC term amplitude)\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\n\t\t// Reflectance term for m > 0 (pairs of diracs)\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\n\t\t}\n\n\t\t// Since out of gamut colors might be produced, negative color values are clamped to 0.\n\t\treturn max( I, vec3( 0.0 ) );\n\n\t}\n\n#endif\n\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/iridescence_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/iridescence_pars_fragment.glsl.d.ts deleted file mode 100644 index 53cec2b86..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/iridescence_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n\n#ifdef USE_IRIDESCENCEMAP\n\n\tuniform sampler2D iridescenceMap;\n\n#endif\n\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\n\tuniform sampler2D iridescenceThicknessMap;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lightmap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lightmap_pars_fragment.glsl.d.ts deleted file mode 100644 index 16bdb81bf..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lightmap_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_LIGHTMAP\n\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lightprobes_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lightprobes_pars_fragment.glsl.d.ts deleted file mode 100644 index feb145c93..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lightprobes_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_LIGHT_PROBES_GRID\n\n// Single atlas 3D texture that stores all 7 SH sub-volumes stacked along Z.\n// Atlas depth = 7 * ( nz + 2 ) where nz = probesResolution.z.\n// Each sub-volume occupies ( nz + 2 ) slices: 1 padding + nz data + 1 padding.\n// Padding is a copy of the first / last data slice and prevents color bleeding\n// when the hardware linear filter reads across a sub-volume boundary.\nuniform highp sampler3D probesSH;\n\nuniform vec3 probesMin;\nuniform vec3 probesMax;\nuniform vec3 probesResolution;\n\nvec3 getLightProbeGridIrradiance( vec3 worldPos, vec3 worldNormal ) {\n\n\tvec3 res = probesResolution;\n\tvec3 gridRange = probesMax - probesMin;\n\tvec3 resMinusOne = res - 1.0;\n\tvec3 probeSpacing = gridRange / resMinusOne;\n\n\t// Offset sample position along normal by half a probe spacing\n\tvec3 samplePos = worldPos + worldNormal * probeSpacing * 0.5;\n\tvec3 uvw = clamp( ( samplePos - probesMin ) / gridRange, 0.0, 1.0 );\n\n\t// Remap to texel centers of the probe grid (XY and Z)\n\tuvw = uvw * resMinusOne / res + 0.5 / res;\n\n\t// Atlas UV mapping along Z:\n\t// paddedSlices = nz + 2 (1 padding texel at each end of every sub-volume)\n\t// atlasDepth = 7 * paddedSlices\n\t// For sub-volume t the first DATA texel sits at atlas slice t*paddedSlices + 1.\n\t// Given probe-grid texel-centre UVZ = ( iz + 0.5 ) / nz the atlas UV is:\n\t// atlasUvZ = ( uvw.z * nz + t * paddedSlices + 1 ) / atlasDepth\n\t//\n\t// uvZBase encodes the nz-scaled Z plus the intra-volume offset (+ 1 for padding),\n\t// so adding t*paddedSlices steps to each successive sub-volume.\n\tfloat nz = res.z;\n\tfloat paddedSlices = nz + 2.0;\n\tfloat atlasDepth = 7.0 * paddedSlices;\n\tfloat uvZBase = uvw.z * nz + 1.0;\n\n\tvec4 s0 = texture( probesSH, vec3( uvw.xy, ( uvZBase ) / atlasDepth ) );\n\tvec4 s1 = texture( probesSH, vec3( uvw.xy, ( uvZBase + paddedSlices ) / atlasDepth ) );\n\tvec4 s2 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 2.0 * paddedSlices ) / atlasDepth ) );\n\tvec4 s3 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 3.0 * paddedSlices ) / atlasDepth ) );\n\tvec4 s4 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 4.0 * paddedSlices ) / atlasDepth ) );\n\tvec4 s5 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 5.0 * paddedSlices ) / atlasDepth ) );\n\tvec4 s6 = texture( probesSH, vec3( uvw.xy, ( uvZBase + 6.0 * paddedSlices ) / atlasDepth ) );\n\n\t// Unpack 9 vec3 SH L2 coefficients\n\tvec3 c0 = s0.xyz;\n\tvec3 c1 = vec3( s0.w, s1.xy );\n\tvec3 c2 = vec3( s1.zw, s2.x );\n\tvec3 c3 = s2.yzw;\n\tvec3 c4 = s3.xyz;\n\tvec3 c5 = vec3( s3.w, s4.xy );\n\tvec3 c6 = vec3( s4.zw, s5.x );\n\tvec3 c7 = s5.yzw;\n\tvec3 c8 = s6.xyz;\n\n\t// Evaluate L2 irradiance\n\tfloat x = worldNormal.x, y = worldNormal.y, z = worldNormal.z;\n\n\tvec3 result = c0 * 0.886227;\n\tresult += c1 * 2.0 * 0.511664 * y;\n\tresult += c2 * 2.0 * 0.511664 * z;\n\tresult += c3 * 2.0 * 0.511664 * x;\n\tresult += c4 * 2.0 * 0.429043 * x * y;\n\tresult += c5 * 2.0 * 0.429043 * y * z;\n\tresult += c6 * ( 0.743125 * z * z - 0.247708 );\n\tresult += c7 * 2.0 * 0.429043 * x * z;\n\tresult += c8 * 0.429043 * ( x * x - y * y );\n\n\treturn max( result, vec3( 0.0 ) );\n\n}\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_begin.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_begin.glsl.d.ts deleted file mode 100644 index 2293478f4..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_begin.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n/**\n * This is a template that can be used to light a material, it uses pluggable\n * RenderEquations (RE)for specific lighting scenarios.\n *\n * Instructions for use:\n * - Ensure that both RE_Direct, RE_IndirectDiffuse and RE_IndirectSpecular are defined\n * - Create a material parameter that is to be passed as the third parameter to your lighting functions.\n *\n * TODO:\n * - Add area light support.\n * - Add sphere light support.\n * - Add diffuse light probe (irradiance cubemap) support.\n */\n\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n\n#ifdef USE_CLEARCOAT\n\n\tgeometryClearcoatNormal = clearcoatNormal;\n\n#endif\n\n#ifdef USE_IRIDESCENCE\n\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\n\tif ( material.iridescenceThickness == 0.0 ) {\n\n\t\tmaterial.iridescence = 0.0;\n\n\t} else {\n\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\n\t}\n\n\tif ( material.iridescence > 0.0 ) {\n\n\t\tmaterial.iridescenceFresnelDielectric = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceFresnelMetallic = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.diffuseColor );\n\n\t\tmaterial.iridescenceFresnel = mix( material.iridescenceFresnelDielectric, material.iridescenceFresnelMetallic, material.metalness );\n\n\t\t// Iridescence F0 approximation\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\n\t}\n\n#endif\n\nIncidentLight directLight;\n\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\n\t\tpointLight = pointLights[ i ];\n\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\n\t\tspotLight = spotLights[ i ];\n\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\n\t\t// spot lights are ordered [shadows with maps, shadows without maps, maps without shadows, none]\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\n\t\tdirectionalLight = directionalLights[ i ];\n\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\n\tRectAreaLight rectAreaLight;\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if defined( RE_IndirectDiffuse )\n\n\tvec3 iblIrradiance = vec3( 0.0 );\n\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\n\t#if defined( USE_LIGHT_PROBES )\n\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\n\t#endif\n\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\n\t\t}\n\t\t#pragma unroll_loop_end\n\n\t#endif\n\n\t#ifdef USE_LIGHT_PROBES_GRID\n\n\t\tvec3 probeWorldPos = ( ( vec4( geometryPosition, 1.0 ) - viewMatrix[ 3 ] ) * viewMatrix ).xyz;\n\t\tvec3 probeWorldNormal = inverseTransformDirection( geometryNormal, viewMatrix );\n\t\tirradiance += getLightProbeGridIrradiance( probeWorldPos, probeWorldNormal );\n\n\t#endif\n\n#endif\n\n#if defined( RE_IndirectSpecular )\n\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_end.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_end.glsl.d.ts deleted file mode 100644 index 247915d2a..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_end.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#if defined( RE_IndirectDiffuse )\n\n\t#if defined( LAMBERT ) || defined( PHONG )\n\n\t\tirradiance += iblIrradiance;\n\n\t#endif\n\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\n#endif\n\n#if defined( RE_IndirectSpecular )\n\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_maps.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_maps.glsl.d.ts deleted file mode 100644 index be37cbe29..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_fragment_maps.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#if defined( RE_IndirectDiffuse )\n\n\t#ifdef USE_LIGHTMAP\n\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\n\t\tirradiance += lightMapIrradiance;\n\n\t#endif\n\n\t#if defined( USE_ENVMAP ) && defined( ENVMAP_TYPE_CUBE_UV )\n\n\t\t#if defined( STANDARD ) || defined( LAMBERT ) || defined( PHONG )\n\n\t\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\n\t\t#endif\n\n\t#endif\n\n#endif\n\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\n\t#ifdef USE_ANISOTROPY\n\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\n\t#else\n\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\n\t#endif\n\n\t#ifdef USE_CLEARCOAT\n\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\n\t#endif\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_lambert_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_lambert_fragment.glsl.d.ts deleted file mode 100644 index 7d7c7ceeb..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_lambert_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\nLambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_lambert_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_lambert_pars_fragment.glsl.d.ts deleted file mode 100644 index 5ea7d176c..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_lambert_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\nvarying vec3 vViewPosition;\n\nstruct LambertMaterial {\n\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n\n};\n\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\n}\n\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\n}\n\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_pars_begin.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_pars_begin.glsl.d.ts deleted file mode 100644 index c6169e6a1..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_pars_begin.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\nuniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n\n#if defined( USE_LIGHT_PROBES )\n\n\tuniform vec3 lightProbe[ 9 ];\n\n#endif\n\n// get the irradiance (radiance convolved with cosine lobe) at the point 'normal' on the unit sphere\n// source: https://graphics.stanford.edu/papers/envmap/envmap.pdf\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\n\t// normal is assumed to have unit length\n\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\n\t// band 0\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\n\t// band 1\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\n\t// band 2\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\n\treturn result;\n\n}\n\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\n\tvec3 worldNormal = transformNormalByInverseViewMatrix( normal, viewMatrix );\n\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\n\treturn irradiance;\n\n}\n\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\n\tvec3 irradiance = ambientLightColor;\n\n\treturn irradiance;\n\n}\n\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\n\t// based upon Frostbite 3 Moving to Physically-based Rendering\n\t// page 32, equation 26: E[window1]\n\t// https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\n\tif ( cutoffDistance > 0.0 ) {\n\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\n\t}\n\n\treturn distanceFalloff;\n\n}\n\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n\n}\n\n#if NUM_DIR_LIGHTS > 0\n\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\n\t}\n\n#endif\n\n\n#if NUM_POINT_LIGHTS > 0\n\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\n\t// light is an out parameter as having it as a return value caused compiler errors on some devices\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\n\t\tlight.direction = normalize( lVector );\n\n\t\tfloat lightDistance = length( lVector );\n\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\n\t}\n\n#endif\n\n\n#if NUM_SPOT_LIGHTS > 0\n\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\n\t// light is an out parameter as having it as a return value caused compiler errors on some devices\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\n\t\tlight.direction = normalize( lVector );\n\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\n\t\tif ( spotAttenuation > 0.0 ) {\n\n\t\t\tfloat lightDistance = length( lVector );\n\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\n\t\t} else {\n\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\n\t\t}\n\n\t}\n\n#endif\n\n\n#if NUM_RECT_AREA_LIGHTS > 0\n\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\n\t// Pre-computed values of LinearTransformedCosine approximation of BRDF\n\t// BRDF approximation Texture is 64x64\n\tuniform sampler2D ltc_1; // RGBA Float\n\tuniform sampler2D ltc_2; // RGBA Float\n\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n\n#endif\n\n\n#if NUM_HEMI_LIGHTS > 0\n\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\n\t\treturn irradiance;\n\n\t}\n\n#endif\n\n#include \n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_phong_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_phong_fragment.glsl.d.ts deleted file mode 100644 index da03357bf..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_phong_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\nBlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_phong_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_phong_pars_fragment.glsl.d.ts deleted file mode 100644 index be47604ec..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_phong_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\nvarying vec3 vViewPosition;\n\nstruct BlinnPhongMaterial {\n\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n\n};\n\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n\n}\n\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\n}\n\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.d.ts deleted file mode 100644 index 0d87feeb4..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_physical_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\nPhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.diffuseContribution = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.metalness = metalnessFactor;\n\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\n\nmaterial.roughness = max( roughnessFactor, 0.0525 );// 0.0525 corresponds to the base mip of a 256 cubemap.\nmaterial.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n\n#ifdef IOR\n\n\tmaterial.ior = ior;\n\n\t#ifdef USE_SPECULAR\n\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\n\t\t#endif\n\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\n\t\t#endif\n\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\n\t#else\n\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\n\t#endif\n\n\tmaterial.specularColor = min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor;\n\tmaterial.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );\n\n#else\n\n\tmaterial.specularColor = vec3( 0.04 );\n\tmaterial.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n\n#endif\n\n#ifdef USE_CLEARCOAT\n\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\n\t#ifdef USE_CLEARCOATMAP\n\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\n\t#endif\n\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\n\t#endif\n\n\tmaterial.clearcoat = saturate( material.clearcoat ); // Burley clearcoat model\n\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n\n#endif\n\n#ifdef USE_DISPERSION\n\n\tmaterial.dispersion = dispersion;\n\n#endif\n\n#ifdef USE_IRIDESCENCE\n\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\n\t#ifdef USE_IRIDESCENCEMAP\n\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\n\t#endif\n\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\n\t#else\n\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\n\t#endif\n\n#endif\n\n#ifdef USE_SHEEN\n\n\tmaterial.sheenColor = sheenColor;\n\n\t#ifdef USE_SHEEN_COLORMAP\n\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\n\t#endif\n\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.0001, 1.0 );\n\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\n\t#endif\n\n#endif\n\n#ifdef USE_ANISOTROPY\n\n\t#ifdef USE_ANISOTROPYMAP\n\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\n\t#else\n\n\t\tvec2 anisotropyV = anisotropyVector;\n\n\t#endif\n\n\tmaterial.anisotropy = length( anisotropyV );\n\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\n\t// Roughness along the anisotropy bitangent is the material roughness, while the tangent roughness increases with anisotropy.\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.d.ts deleted file mode 100644 index 5bb0391c8..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n\nuniform sampler2D dfgLUT;\n\nstruct PhysicalMaterial {\n\n\tvec3 diffuseColor;\n\tvec3 diffuseContribution;\n\tvec3 specularColor;\n\tvec3 specularColorBlended;\n\n\tfloat roughness;\n\tfloat metalness;\n\tfloat specularF90;\n\tfloat dispersion;\n\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t\tvec3 iridescenceFresnelDielectric;\n\t\tvec3 iridescenceFresnelMetallic;\n\t#endif\n\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n\n};\n\n// temporary\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\n\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\n\n// Moving Frostbite to Physically Based Rendering 3.0 - page 12, listing 2\n// https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\n\treturn 0.5 / max( gv + gl, EPSILON );\n\n}\n\n// Microfacet Models for Refraction through Rough Surfaces - equation (33)\n// http://graphicrants.blogspot.com/2013/08/specular-brdf-reference.html\n// alpha is \"roughness squared\" in Disney\u2019s reparameterization\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\n\tfloat a2 = pow2( alpha );\n\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; // avoid alpha = 0 with dotNH = 1\n\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n\n}\n\n// https://google.github.io/filament/Filament.md.html#materialsystem/anisotropicmodel/anisotropicspecularbrdf\n#ifdef USE_ANISOTROPY\n\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\treturn 0.5 / max( gv + gl, EPSILON );\n\n\t}\n\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\n\t}\n\n#endif\n\n#ifdef USE_CLEARCOAT\n\n\t// GGX Distribution, Schlick Fresnel, GGX_SmithCorrelated Visibility\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\n\t\tfloat alpha = pow2( roughness ); // UE4's roughness\n\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\n\t\tfloat D = D_GGX( alpha, dotNH );\n\n\t\treturn F * ( V * D );\n\n\t}\n\n#endif\n\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\n\tvec3 f0 = material.specularColorBlended;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\n\tfloat alpha = pow2( roughness ); // UE4's roughness\n\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\n\t#ifdef USE_IRIDESCENCE\n\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\n\t#endif\n\n\t#ifdef USE_ANISOTROPY\n\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\n\t#else\n\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\n\t\tfloat D = D_GGX( alpha, dotNH );\n\n\t#endif\n\n\treturn F * ( V * D );\n\n}\n\n// Rect Area Light\n\n// Real-Time Polygonal-Light Shading with Linearly Transformed Cosines\n// by Eric Heitz, Jonathan Dupuy, Stephen Hill and David Neubelt\n// code: https://github.com/selfshadow/ltc_code/\n\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\n\tfloat dotNV = saturate( dot( N, V ) );\n\n\t// texture parameterized by sqrt( GGX alpha ) and sqrt( 1 - cos( theta ) )\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\n\treturn uv;\n\n}\n\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\n\t// Real-Time Area Lighting: a Journey from Research to Production (p.102)\n\t// An approximation of the form factor of a horizon-clipped rectangle.\n\n\tfloat l = length( f );\n\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n\n}\n\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\n\tfloat x = dot( v1, v2 );\n\n\tfloat y = abs( x );\n\n\t// rational polynomial approximation to theta / sin( theta ) / 2PI\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\n\treturn cross( v1, v2 ) * theta_sintheta;\n\n}\n\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\n\t// bail if point is on back side of plane of light\n\t// assumes ccw winding order of light vertices\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\n\t// construct orthonormal basis around N\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 ); // negated from paper; possibly due to a different handedness of world coordinate system\n\n\t// compute transform\n\tmat3 mat = mInv * transpose( mat3( T1, T2, N ) );\n\n\t// transform rect\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\n\t// project rect onto sphere\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\n\t// calculate vector form factor\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\n\t// adjust for horizon clipping\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\n/*\n\t// alternate method of adjusting for horizon clipping (see reference)\n\t// refactoring required\n\tfloat len = length( vectorFormFactor );\n\tfloat z = vectorFormFactor.z / len;\n\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\n\t// tabulated horizon-clipped sphere, apparently...\n\tvec2 uv = vec2( z * 0.5 + 0.5, len );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\n\tfloat scale = texture2D( ltc_2, uv ).w;\n\n\tfloat result = len * scale;\n*/\n\n\treturn vec3( result );\n\n}\n\n// End Rect Area Light\n\n#if defined( USE_SHEEN )\n\n// https://github.com/google/filament/blob/master/shaders/src/brdf.fs\nfloat D_Charlie( float roughness, float dotNH ) {\n\n\tfloat alpha = pow2( roughness );\n\n\t// Estevez and Kulla 2017, \"Production Friendly Microfacet Sheen BRDF\"\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 ); // 2^(-14/2), so sin2h^2 > 0 in fp16\n\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n\n}\n\n// https://github.com/google/filament/blob/master/shaders/src/brdf.fs\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\n\t// Neubelt and Pettineo 2013, \"Crafting a Next-gen Material Pipeline for The Order: 1886\"\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n\n}\n\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\n\treturn sheenColor * ( D * V );\n\n}\n\n#endif\n\n// This is a curve-fit approximation to the \"Charlie sheen\" BRDF integrated over the hemisphere from\n// Estevez and Kulla 2017, \"Production Friendly Microfacet Sheen BRDF\".\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\n\tfloat r2 = roughness * roughness;\n\tfloat rInv = 1.0 / ( roughness + 0.1 );\n\n\tfloat a = -1.9362 + 1.0678 * roughness + 0.4573 * r2 - 0.8469 * rInv;\n\tfloat b = -0.6014 + 0.5538 * roughness - 0.4670 * r2 - 0.1255 * rInv;\n\n\tfloat DG = exp( a * dotNV + b );\n\n\treturn saturate( DG );\n\n}\n\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;\n\n\treturn specularColor * fab.x + specularF90 * fab.y;\n\n}\n\n// Fdez-Ag\u00FCera's \"Multiple-Scattering Microfacet Model for Real-Time Image Based Lighting\"\n// Approximates multiscattering in order to preserve energy.\n// http://www.jcgt.org/published/0008/01/03/\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg;\n\n\t#ifdef USE_IRIDESCENCE\n\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\n\t#else\n\n\t\tvec3 Fr = specularColor;\n\n\t#endif\n\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; // 1/21\n\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n\n}\n\n// GGX BRDF with multi-scattering energy compensation for direct lighting\n// Based on \"Practical Multiple Scattering Compensation for Microfacet Models\"\n// https://blog.selfshadow.com/publications/turquin/ms_comp_final.pdf\nvec3 BRDF_GGX_Multiscatter( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\n\t// Single-scattering BRDF (standard GGX)\n\tvec3 singleScatter = BRDF_GGX( lightDir, viewDir, normal, material );\n\n\t// Multi-scattering compensation\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\n\t// Precomputed DFG values for view and light directions\n\tvec2 dfgV = texture2D( dfgLUT, vec2( material.roughness, dotNV ) ).rg;\n\tvec2 dfgL = texture2D( dfgLUT, vec2( material.roughness, dotNL ) ).rg;\n\n\t// Single-scattering energy for view and light\n\tvec3 FssEss_V = material.specularColorBlended * dfgV.x + material.specularF90 * dfgV.y;\n\tvec3 FssEss_L = material.specularColorBlended * dfgL.x + material.specularF90 * dfgL.y;\n\n\tfloat Ess_V = dfgV.x + dfgV.y;\n\tfloat Ess_L = dfgL.x + dfgL.y;\n\n\t// Energy lost to multiple scattering\n\tfloat Ems_V = 1.0 - Ess_V;\n\tfloat Ems_L = 1.0 - Ess_L;\n\n\t// Average Fresnel reflectance\n\tvec3 Favg = material.specularColorBlended + ( 1.0 - material.specularColorBlended ) * 0.047619; // 1/21\n\n\t// Multiple scattering contribution\n\tvec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg + EPSILON );\n\n\t// Energy compensation factor\n\tfloat compensationFactor = Ems_V * Ems_L;\n\n\tvec3 multiScatter = Fms * compensationFactor;\n\n\treturn singleScatter + multiScatter;\n\n}\n\n#if NUM_RECT_AREA_LIGHTS > 0\n\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight; // counterclockwise; light shines in local neg z direction\n\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\n\t\t// LTC Fresnel Approximation by Stephen Hill\n\t\t// http://blog.selfshadow.com/publications/s2016-advances/s2016_ltc_fresnel.pdf\n\t\tvec3 fresnel = ( material.specularColorBlended * t2.x + ( material.specularF90 - material.specularColorBlended ) * t2.y );\n\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseContribution * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\n\t\t#ifdef USE_CLEARCOAT\n\n\t\t\tvec3 Ncc = geometryClearcoatNormal;\n\n\t\t\tvec2 uvClearcoat = LTC_Uv( Ncc, viewDir, material.clearcoatRoughness );\n\n\t\t\tvec4 t1Clearcoat = texture2D( ltc_1, uvClearcoat );\n\t\t\tvec4 t2Clearcoat = texture2D( ltc_2, uvClearcoat );\n\n\t\t\tmat3 mInvClearcoat = mat3(\n\t\t\t\tvec3( t1Clearcoat.x, 0, t1Clearcoat.y ),\n\t\t\t\tvec3( 0, 1, 0 ),\n\t\t\t\tvec3( t1Clearcoat.z, 0, t1Clearcoat.w )\n\t\t\t);\n\n\t\t\t// LTC Fresnel Approximation for clearcoat\n\t\t\tvec3 fresnelClearcoat = material.clearcoatF0 * t2Clearcoat.x + ( material.clearcoatF90 - material.clearcoatF0 ) * t2Clearcoat.y;\n\n\t\t\tclearcoatSpecularDirect += lightColor * fresnelClearcoat * LTC_Evaluate( Ncc, viewDir, position, mInvClearcoat, rectCoords );\n\n\t\t#endif\n\n\t}\n\n#endif\n\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\n\tvec3 irradiance = dotNL * directLight.color;\n\n\t#ifdef USE_CLEARCOAT\n\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\n\t#endif\n\n\t#ifdef USE_SHEEN\n \n \t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n \n \t\tfloat sheenAlbedoV = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n \t\tfloat sheenAlbedoL = IBLSheenBRDF( geometryNormal, directLight.direction, material.sheenRoughness );\n \n \t\tfloat sheenEnergyComp = 1.0 - max3( material.sheenColor ) * max( sheenAlbedoV, sheenAlbedoL );\n \n \t\tirradiance *= sheenEnergyComp;\n \n \t#endif\n\n\treflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material );\n\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseContribution );\n}\n\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\n\tvec3 diffuse = irradiance * BRDF_Lambert( material.diffuseContribution );\n\n\t#ifdef USE_SHEEN\n\n\t\tfloat sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\n\t\tfloat sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;\n\n\t\tdiffuse *= sheenEnergyComp;\n\n\t#endif\n\n\treflectedLight.indirectDiffuse += diffuse;\n\n}\n\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\n\t#ifdef USE_CLEARCOAT\n\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\n\t#endif\n\n\t#ifdef USE_SHEEN\n\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ) * RECIPROCAL_PI;\n\n \t#endif\n\n\t// Both indirect specular and indirect diffuse light accumulate here\n\t// Compute multiscattering separately for dielectric and metallic, then mix\n\n\tvec3 singleScatteringDielectric = vec3( 0.0 );\n\tvec3 multiScatteringDielectric = vec3( 0.0 );\n\n\tvec3 singleScatteringMetallic = vec3( 0.0 );\n\tvec3 multiScatteringMetallic = vec3( 0.0 );\n\n\t#ifdef USE_IRIDESCENCE\n\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnelDielectric, material.roughness, singleScatteringDielectric, multiScatteringDielectric );\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.iridescence, material.iridescenceFresnelMetallic, material.roughness, singleScatteringMetallic, multiScatteringMetallic );\n\n\t#else\n\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScatteringDielectric, multiScatteringDielectric );\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.roughness, singleScatteringMetallic, multiScatteringMetallic );\n\n\t#endif\n\n\t// Mix based on metalness\n\tvec3 singleScattering = mix( singleScatteringDielectric, singleScatteringMetallic, material.metalness );\n\tvec3 multiScattering = mix( multiScatteringDielectric, multiScatteringMetallic, material.metalness );\n\n\t// Diffuse energy conservation uses dielectric path\n\tvec3 totalScatteringDielectric = singleScatteringDielectric + multiScatteringDielectric;\n\tvec3 diffuse = material.diffuseContribution * ( 1.0 - totalScatteringDielectric );\n\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\n\tvec3 indirectSpecular = radiance * singleScattering;\n\tindirectSpecular += multiScattering * cosineWeightedIrradiance;\n\n\tvec3 indirectDiffuse = diffuse * cosineWeightedIrradiance;\n\n\t#ifdef USE_SHEEN\n\n\t\tfloat sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\n\t\tfloat sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo;\n\n\t\tindirectSpecular *= sheenEnergyComp;\n\t\tindirectDiffuse *= sheenEnergyComp;\n\n\t#endif\n\n\treflectedLight.indirectSpecular += indirectSpecular;\n\treflectedLight.indirectDiffuse += indirectDiffuse;\n\n}\n\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n\n// ref: https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n\n}\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_toon_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_toon_fragment.glsl.d.ts deleted file mode 100644 index a113ed7ee..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_toon_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\nToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_toon_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_toon_pars_fragment.glsl.d.ts deleted file mode 100644 index 20ff9bef9..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/lights_toon_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\nvarying vec3 vViewPosition;\n\nstruct ToonMaterial {\n\n\tvec3 diffuseColor;\n\n};\n\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\n}\n\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\n}\n\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_fragment.glsl.d.ts deleted file mode 100644 index 20e28af12..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )\n\n\t// Doing a strict comparison with == 1.0 can cause noise artifacts\n\t// on some platforms. See issue #17623.\n\tgl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_fragment.glsl.d.ts deleted file mode 100644 index 69a279337..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )\n\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_vertex.glsl.d.ts deleted file mode 100644 index ee342c244..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_pars_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\n\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_vertex.glsl.d.ts deleted file mode 100644 index 582385491..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/logdepthbuf_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_LOGARITHMIC_DEPTH_BUFFER\n\n\tvFragDepth = 1.0 + gl_Position.w;\n\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_fragment.glsl.d.ts deleted file mode 100644 index c433444b0..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_MAP\n\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\n\t#ifdef DECODE_VIDEO_TEXTURE\n\n\t\t// use inline sRGB decode until browsers properly support SRGB8_ALPHA8 with video textures (#26516)\n\n\t\tsampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );\n\n\t#endif\n\n\tdiffuseColor *= sampledDiffuseColor;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_pars_fragment.glsl.d.ts deleted file mode 100644 index 1bcb0e9fd..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_MAP\n\n\tuniform sampler2D map;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_particle_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_particle_fragment.glsl.d.ts deleted file mode 100644 index 274c1350e..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_particle_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\n\t#if defined( USE_POINTS_UV )\n\n\t\tvec2 uv = vUv;\n\n\t#else\n\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\n\t#endif\n\n#endif\n\n#ifdef USE_MAP\n\n\tdiffuseColor *= texture2D( map, uv );\n\n#endif\n\n#ifdef USE_ALPHAMAP\n\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_particle_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_particle_pars_fragment.glsl.d.ts deleted file mode 100644 index 2cf3023a2..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/map_particle_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#if defined( USE_POINTS_UV )\n\n\tvarying vec2 vUv;\n\n#else\n\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\n\t\tuniform mat3 uvTransform;\n\n\t#endif\n\n#endif\n\n#ifdef USE_MAP\n\n\tuniform sampler2D map;\n\n#endif\n\n#ifdef USE_ALPHAMAP\n\n\tuniform sampler2D alphaMap;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/metalnessmap_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/metalnessmap_fragment.glsl.d.ts deleted file mode 100644 index a1169d5f9..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/metalnessmap_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\nfloat metalnessFactor = metalness;\n\n#ifdef USE_METALNESSMAP\n\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\n\t// reads channel B, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\tmetalnessFactor *= texelMetalness.b;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/metalnessmap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/metalnessmap_pars_fragment.glsl.d.ts deleted file mode 100644 index 1f17ea17d..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/metalnessmap_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_METALNESSMAP\n\n\tuniform sampler2D metalnessMap;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphcolor_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphcolor_vertex.glsl.d.ts deleted file mode 100644 index 2bbdcb4bb..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphcolor_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#if defined( USE_MORPHCOLORS )\n\n\t// morphTargetBaseInfluence is set based on BufferGeometry.morphTargetsRelative value:\n\t// When morphTargetsRelative is false, this is set to 1 - sum(influences); this results in normal = sum((target - base) * influence)\n\t// When morphTargetsRelative is true, this is set to 1; as a result, all morph targets are simply added to the base after weighting\n\tvColor *= morphTargetBaseInfluence;\n\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\n\t\t#if defined( USE_COLOR_ALPHA )\n\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\n\t\t#elif defined( USE_COLOR )\n\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\n\t\t#endif\n\n\t}\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphinstance_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphinstance_vertex.glsl.d.ts deleted file mode 100644 index e90281801..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphinstance_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_INSTANCING_MORPH\n\n\tfloat morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\n\tfloat morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\n\t\tmorphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n\n\t}\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphnormal_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphnormal_vertex.glsl.d.ts deleted file mode 100644 index 9e1a7c480..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphnormal_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_MORPHNORMALS\n\n\t// morphTargetBaseInfluence is set based on BufferGeometry.morphTargetsRelative value:\n\t// When morphTargetsRelative is false, this is set to 1 - sum(influences); this results in normal = sum((target - base) * influence)\n\t// When morphTargetsRelative is true, this is set to 1; as a result, all morph targets are simply added to the base after weighting\n\tobjectNormal *= morphTargetBaseInfluence;\n\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\n\t}\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphtarget_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphtarget_pars_vertex.glsl.d.ts deleted file mode 100644 index 66bb19332..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphtarget_pars_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_MORPHTARGETS\n\n\t#ifndef USE_INSTANCING_MORPH\n\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\n\t#endif\n\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\n\t}\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphtarget_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphtarget_vertex.glsl.d.ts deleted file mode 100644 index e65f0a031..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/morphtarget_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_MORPHTARGETS\n\n\t// morphTargetBaseInfluence is set based on BufferGeometry.morphTargetsRelative value:\n\t// When morphTargetsRelative is false, this is set to 1 - sum(influences); this results in position = sum((target - base) * influence)\n\t// When morphTargetsRelative is true, this is set to 1; as a result, all morph targets are simply added to the base after weighting\n\ttransformed *= morphTargetBaseInfluence;\n\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\n\t}\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_fragment_begin.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_fragment_begin.glsl.d.ts deleted file mode 100644 index 148a7b65c..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_fragment_begin.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\nfloat faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n\n#ifdef FLAT_SHADED\n\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n\n#else\n\n\tvec3 normal = normalize( vNormal );\n\n\t#ifdef DOUBLE_SIDED\n\n\t\tnormal *= faceDirection;\n\n\t#endif\n\n#endif\n\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\n\t#ifdef USE_TANGENT\n\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\n\t#else\n\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\n\t#endif\n\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\n\t#endif\n\n#endif\n\n#ifdef USE_CLEARCOAT_NORMALMAP\n\n\t#ifdef USE_TANGENT\n\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\n\t#else\n\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\n\t#endif\n\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\n\t#endif\n\n#endif\n\n// non perturbed normal for clearcoat among others\n\nvec3 nonPerturbedNormal = normal;\n\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_fragment_maps.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_fragment_maps.glsl.d.ts deleted file mode 100644 index 69ee51c6d..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_fragment_maps.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; // overrides both flatShading and attribute normals\n\n\t#ifdef FLIP_SIDED\n\n\t\tnormal = - normal;\n\n\t#endif\n\n\t#ifdef DOUBLE_SIDED\n\n\t\tnormal = normal * faceDirection;\n\n\t#endif\n\n\tnormal = normalize( normalMatrix * normal );\n\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\n\t#if defined( USE_PACKED_NORMALMAP )\n\n\t\tmapN = vec3( mapN.xy, sqrt( saturate( 1.0 - dot( mapN.xy, mapN.xy ) ) ) );\n\n\t#endif\n\n\tmapN.xy *= normalScale;\n\n\tnormal = normalize( tbn * mapN );\n\n#elif defined( USE_BUMPMAP )\n\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_pars_fragment.glsl.d.ts deleted file mode 100644 index 069c529cd..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifndef FLAT_SHADED\n\n\tvarying vec3 vNormal;\n\n\t#ifdef USE_TANGENT\n\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\n\t#endif\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_pars_vertex.glsl.d.ts deleted file mode 100644 index 069c529cd..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_pars_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifndef FLAT_SHADED\n\n\tvarying vec3 vNormal;\n\n\t#ifdef USE_TANGENT\n\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\n\t#endif\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_vertex.glsl.d.ts deleted file mode 100644 index a0137068f..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normal_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifndef FLAT_SHADED // normal is computed with derivatives when FLAT_SHADED\n\n\tvNormal = normalize( transformedNormal );\n\n\t#ifdef USE_TANGENT\n\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\n\t#endif\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normalmap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normalmap_pars_fragment.glsl.d.ts deleted file mode 100644 index 34eba1c99..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/normalmap_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_NORMALMAP\n\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\n#endif\n\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\n\tuniform mat3 normalMatrix;\n\n#endif\n\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\n\t// Normal Mapping Without Precomputed Tangents\n\t// http://www.thetenthplanet.de/archives/1180\n\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\n\t\tvec3 N = surf_norm; // normalized\n\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\n\t\treturn mat3( T * scale, B * scale, N );\n\n\t}\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/opaque_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/opaque_fragment.glsl.d.ts deleted file mode 100644 index 30b98b9ed..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/opaque_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\n\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/packing.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/packing.glsl.d.ts deleted file mode 100644 index 3d9dc4d37..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/packing.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\nvec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\n\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\n\nconst float PackUpscale = 256. / 255.; // fraction -> 0..1 (including 1)\nconst float UnpackDownscale = 255. / 256.; // 0..1 -> fraction (excluding 1)\nconst float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\n\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\n\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\n\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\n\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\t// the 0.9999 tweak is unimportant, very tiny empirical improvement\n\t// return vec3( vuf * Inv255, gf * PackUpscale, bf * 0.9999 );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\n\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\n\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\n\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\n\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\n\nvec4 pack2HalfToRGBA( const in vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\n\nvec2 unpackRGBATo2Half( const in vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\n\n// NOTE: viewZ, the z-coordinate in camera space, is negative for points in front of the camera\n\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\t// -near maps to 0; -far maps to 1\n\treturn ( viewZ + near ) / ( near - far );\n}\n\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\n\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\t\n\t\treturn depth * ( far - near ) - far;\n\n\t#else\n\n\t\treturn depth * ( near - far ) - near;\n\n\t#endif\n}\n\n// NOTE: https://twitter.com/gonnavis/status/1377183786949959682\n\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\t// -near maps to 0; -far maps to 1\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\n\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\t\n\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\n\t\treturn ( near * far ) / ( ( near - far ) * depth - near );\n\n\t#else\n\n\t\treturn ( near * far ) / ( ( far - near ) * depth - far );\n\n\t#endif\n}\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/premultiplied_alpha_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/premultiplied_alpha_fragment.glsl.d.ts deleted file mode 100644 index 72a909a98..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/premultiplied_alpha_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef PREMULTIPLIED_ALPHA\n\n\tgl_FragColor.rgb *= gl_FragColor.a;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/project_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/project_vertex.glsl.d.ts deleted file mode 100644 index 69daad77e..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/project_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\nvec4 mvPosition = vec4( transformed, 1.0 );\n\n#ifdef USE_BATCHING\n\n\tmvPosition = batchingMatrix * mvPosition;\n\n#endif\n\n#ifdef USE_INSTANCING\n\n\tmvPosition = instanceMatrix * mvPosition;\n\n#endif\n\nmvPosition = modelViewMatrix * mvPosition;\n\ngl_Position = projectionMatrix * mvPosition;\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/roughnessmap_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/roughnessmap_fragment.glsl.d.ts deleted file mode 100644 index 51df63905..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/roughnessmap_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\nfloat roughnessFactor = roughness;\n\n#ifdef USE_ROUGHNESSMAP\n\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\n\t// reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n\troughnessFactor *= texelRoughness.g;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/roughnessmap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/roughnessmap_pars_fragment.glsl.d.ts deleted file mode 100644 index 41e9d78a5..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/roughnessmap_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_ROUGHNESSMAP\n\n\tuniform sampler2D roughnessMap;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.d.ts deleted file mode 100644 index 2f86cbb4a..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#if NUM_SPOT_LIGHT_COORDS > 0\n\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n\n#endif\n\n#if NUM_SPOT_LIGHT_MAPS > 0\n\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n\n#endif\n\n#ifdef USE_SHADOWMAP\n\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\n\t\t\tuniform sampler2DShadow directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\n\t\t#else\n\n\t\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\n\t\t#endif\n\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\n\t#endif\n\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\n\t\t\tuniform sampler2DShadow spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\n\t\t#else\n\n\t\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\n\t\t#endif\n\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\n\t#endif\n\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\n\t\t\tuniform samplerCubeShadow pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\n\t\t#elif defined( SHADOWMAP_TYPE_BASIC )\n\n\t\t\tuniform samplerCube pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\n\t\t#endif\n\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\n\t#endif\n\n\t#if defined( SHADOWMAP_TYPE_PCF )\n\n\t\t// Interleaved Gradient Noise for randomizing sampling patterns\n\t\tfloat interleavedGradientNoise( vec2 position ) {\n\n\t\t\treturn fract( 52.9829189 * fract( dot( position, vec2( 0.06711056, 0.00583715 ) ) ) );\n\n\t\t}\n\n\t\t// Vogel disk sampling for uniform circular distribution\n\t\tvec2 vogelDiskSample( int sampleIndex, int samplesCount, float phi ) {\n\n\t\t\tconst float goldenAngle = 2.399963229728653;\n\t\t\tfloat r = sqrt( ( float( sampleIndex ) + 0.5 ) / float( samplesCount ) );\n\t\t\tfloat theta = float( sampleIndex ) * goldenAngle + phi;\n\t\t\treturn vec2( cos( theta ), sin( theta ) ) * r;\n\n\t\t}\n\n\t#endif\n\n\t#if defined( SHADOWMAP_TYPE_PCF )\n\n\t\tfloat getShadow( sampler2DShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\n\t\t\tfloat shadow = 1.0;\n\n\t\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\t\tshadowCoord.z += shadowBias;\n\n\t\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\n\t\t\tif ( frustumTest ) {\n\n\t\t\t\t// Hardware PCF with LinearFilter gives us 4-tap filtering per sample\n\t\t\t\t// 5 samples using Vogel disk + IGN = effectively 20 filtered taps with better distribution\n\t\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\t\tfloat radius = shadowRadius * texelSize.x;\n\n\t\t\t\t// Use IGN to rotate sampling pattern per pixel\n\t\t\t\tfloat phi = interleavedGradientNoise( gl_FragCoord.xy ) * PI2;\n\n\t\t\t\tshadow = (\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 0, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 1, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 2, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 3, 5, phi ) * radius, shadowCoord.z ) ) +\n\t\t\t\t\ttexture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 4, 5, phi ) * radius, shadowCoord.z ) )\n\t\t\t\t) * 0.2;\n\n\t\t\t}\n\n\t\t\treturn mix( 1.0, shadow, shadowIntensity );\n\n\t\t}\n\n\t#elif defined( SHADOWMAP_TYPE_VSM )\n\n\t\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\n\t\t\tfloat shadow = 1.0;\n\n\t\t\tshadowCoord.xyz /= shadowCoord.w;\n\n\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\n\t\t\t\tshadowCoord.z -= shadowBias;\n\n\t\t\t#else\n\n\t\t\t\tshadowCoord.z += shadowBias;\n\n\t\t\t#endif\n\n\t\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\n\t\t\tif ( frustumTest ) {\n\n\t\t\t\tvec2 distribution = texture2D( shadowMap, shadowCoord.xy ).rg;\n\n\t\t\t\tfloat mean = distribution.x;\n\t\t\t\tfloat variance = distribution.y * distribution.y;\n\n\t\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\n\t\t\t\t\tfloat hard_shadow = step( mean, shadowCoord.z );\n\n\t\t\t\t#else\n\n\t\t\t\t\tfloat hard_shadow = step( shadowCoord.z, mean );\n\n\t\t\t\t#endif\n\t\t\t\t\n\t\t\t\t// Early return if fully lit\n\t\t\t\tif ( hard_shadow == 1.0 ) {\n\n\t\t\t\t\tshadow = 1.0;\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// Variance must be non-zero to avoid division by zero\n\t\t\t\t\tvariance = max( variance, 0.0000001 );\n\n\t\t\t\t\t// Distance from mean\n\t\t\t\t\tfloat d = shadowCoord.z - mean;\n\n\t\t\t\t\t// Chebyshev's inequality for upper bound on probability\n\t\t\t\t\tfloat p_max = variance / ( variance + d * d );\n\n\t\t\t\t\t// Reduce light bleeding by remapping [amount, 1] to [0, 1]\n\t\t\t\t\tp_max = clamp( ( p_max - 0.3 ) / 0.65, 0.0, 1.0 );\n\n\t\t\t\t\tshadow = max( hard_shadow, p_max );\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn mix( 1.0, shadow, shadowIntensity );\n\n\t\t}\n\n\t#else // SHADOWMAP_TYPE_BASIC\n\n\t\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\n\t\t\tfloat shadow = 1.0;\n\n\t\t\tshadowCoord.xyz /= shadowCoord.w;\n\n\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\n\t\t\t\tshadowCoord.z -= shadowBias;\n\n\t\t\t#else\n\n\t\t\t\tshadowCoord.z += shadowBias;\n\n\t\t\t#endif\n\n\t\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\n\t\t\tif ( frustumTest ) {\n\n\t\t\t\tfloat depth = texture2D( shadowMap, shadowCoord.xy ).r;\n\n\t\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\n\t\t\t\t\tshadow = step( depth, shadowCoord.z );\n\n\t\t\t\t#else\n\n\t\t\t\t\tshadow = step( shadowCoord.z, depth );\n\n\t\t\t\t#endif\n\n\t\t\t}\n\n\t\t\treturn mix( 1.0, shadow, shadowIntensity );\n\n\t\t}\n\n\t#endif\n\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\n\t#if defined( SHADOWMAP_TYPE_PCF )\n\n\tfloat getPointShadow( samplerCubeShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\n\t\tfloat shadow = 1.0;\n\n\t\t// for point lights, the uniform @vShadowCoord is re-purposed to hold\n\t\t// the vector from the light to the world-space position of the fragment.\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\n\t\t// Direction from light to fragment\n\t\tvec3 bd3D = normalize( lightToPosition );\n\n\t\t// For cube shadow maps, depth is stored as distance along each face's view axis, not radial distance\n\t\t// The view-space depth is the maximum component of the direction vector (which face is sampled)\n\t\tvec3 absVec = abs( lightToPosition );\n\t\tfloat viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );\n\n\t\tif ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {\n\n\t\t\t// viewZ to perspective depth\n\n\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\n\t\t\t\tfloat dp = ( shadowCameraNear * ( shadowCameraFar - viewSpaceZ ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );\n\t\t\t\tdp -= shadowBias;\n\n\t\t\t#else\n\n\t\t\t\tfloat dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );\n\t\t\t\tdp += shadowBias;\n\n\t\t\t#endif\n\n\t\t\t// Hardware PCF with LinearFilter gives us 4-tap filtering per sample\n\t\t\t// Use Vogel disk + IGN sampling for better quality\n\t\t\tfloat texelSize = shadowRadius / shadowMapSize.x;\n\n\t\t\t// Build a tangent-space coordinate system for applying offsets\n\t\t\tvec3 absDir = abs( bd3D );\n\t\t\tvec3 tangent = absDir.x > absDir.z ? vec3( 0.0, 1.0, 0.0 ) : vec3( 1.0, 0.0, 0.0 );\n\t\t\ttangent = normalize( cross( bd3D, tangent ) );\n\t\t\tvec3 bitangent = cross( bd3D, tangent );\n\n\t\t\t// Use IGN to rotate sampling pattern per pixel\n\t\t\tfloat phi = interleavedGradientNoise( gl_FragCoord.xy ) * PI2;\n\n\t\t\tvec2 sample0 = vogelDiskSample( 0, 5, phi );\n\t\t\tvec2 sample1 = vogelDiskSample( 1, 5, phi );\n\t\t\tvec2 sample2 = vogelDiskSample( 2, 5, phi );\n\t\t\tvec2 sample3 = vogelDiskSample( 3, 5, phi );\n\t\t\tvec2 sample4 = vogelDiskSample( 4, 5, phi );\n\n\t\t\tshadow = (\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * sample0.x + bitangent * sample0.y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * sample1.x + bitangent * sample1.y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * sample2.x + bitangent * sample2.y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * sample3.x + bitangent * sample3.y ) * texelSize, dp ) ) +\n\t\t\t\ttexture( shadowMap, vec4( bd3D + ( tangent * sample4.x + bitangent * sample4.y ) * texelSize, dp ) )\n\t\t\t) * 0.2;\n\n\t\t}\n\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\n\t}\n\n\t#elif defined( SHADOWMAP_TYPE_BASIC )\n\n\tfloat getPointShadow( samplerCube shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\n\t\tfloat shadow = 1.0;\n\n\t\t// for point lights, the uniform @vShadowCoord is re-purposed to hold\n\t\t// the vector from the light to the world-space position of the fragment.\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\n\t\t// For cube shadow maps, depth is stored as distance along each face's view axis, not radial distance\n\t\t// The view-space depth is the maximum component of the direction vector (which face is sampled)\n\t\tvec3 absVec = abs( lightToPosition );\n\t\tfloat viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z );\n\n\t\tif ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) {\n\n\t\t\t// viewZ to perspective depth\n\n\t\t\tfloat dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) );\n\t\t\tdp += shadowBias;\n\n\t\t\t// Direction from light to fragment\n\t\t\tvec3 bd3D = normalize( lightToPosition );\n\n\t\t\tfloat depth = textureCube( shadowMap, bd3D ).r;\n\n\t\t\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\n\t\t\t\tdepth = 1.0 - depth;\n\n\t\t\t#endif\n\n\t\t\tshadow = step( dp, depth );\n\n\t\t}\n\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\n\t}\n\n\t#endif\n\n\t#endif\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_pars_vertex.glsl.d.ts deleted file mode 100644 index 2d89c27ce..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_pars_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n\n#if NUM_SPOT_LIGHT_COORDS > 0\n\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n\n#endif\n\n#ifdef USE_SHADOWMAP\n\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\n\t#endif\n\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\n\t#endif\n\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\n\t#endif\n\n\t/*\n\t#if NUM_RECT_AREA_LIGHTS > 0\n\n\t\t// TODO (abelnation): uniforms for area light shadows\n\n\t#endif\n\t*/\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_vertex.glsl.d.ts deleted file mode 100644 index 83b0570c8..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmap_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n\n#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\n\t#ifdef HAS_NORMAL\n\n\t\t// Offsetting the position used for querying occlusion along the world normal can be used to reduce shadow acne.\n\n\t\tvec3 shadowWorldNormal = transformNormalByInverseViewMatrix( transformedNormal, viewMatrix );\n\n\t#else\n\n\t\tvec3 shadowWorldNormal = vec3( 0.0 ); // fallback, see #21483\n\n\t#endif\n\n\tvec4 shadowWorldPosition;\n\n#endif\n\n#if defined( USE_SHADOWMAP )\n\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\n\t\t}\n\t\t#pragma unroll_loop_end\n\n\t#endif\n\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\n\t\t}\n\t\t#pragma unroll_loop_end\n\n\t#endif\n\n\t/*\n\t#if NUM_RECT_AREA_LIGHTS > 0\n\n\t\t// TODO (abelnation): update vAreaShadowCoord with area light info\n\n\t#endif\n\t*/\n\n#endif\n\n// spot lights can be evaluated without active shadow mapping (when SpotLight.map is used)\n\n#if NUM_SPOT_LIGHT_COORDS > 0\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmask_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmask_pars_fragment.glsl.d.ts deleted file mode 100644 index d8f408fc2..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/shadowmask_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\nfloat getShadowMask() {\n\n\tfloat shadow = 1.0;\n\n\t#ifdef USE_SHADOWMAP\n\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\n\tDirectionalLightShadow directionalLight;\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\n\t}\n\t#pragma unroll_loop_end\n\n\t#endif\n\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\n\tSpotLightShadow spotLight;\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\n\t}\n\t#pragma unroll_loop_end\n\n\t#endif\n\n\t#if NUM_POINT_LIGHT_SHADOWS > 0 && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) )\n\n\tPointLightShadow pointLight;\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\n\t}\n\t#pragma unroll_loop_end\n\n\t#endif\n\n\t/*\n\t#if NUM_RECT_AREA_LIGHTS > 0\n\n\t\t// TODO (abelnation): update shadow for Area light\n\n\t#endif\n\t*/\n\n\t#endif\n\n\treturn shadow;\n\n}\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinbase_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinbase_vertex.glsl.d.ts deleted file mode 100644 index 17f2cd5a8..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinbase_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_SKINNING\n\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinning_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinning_pars_vertex.glsl.d.ts deleted file mode 100644 index 95a28ff80..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinning_pars_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_SKINNING\n\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\n\tuniform highp sampler2D boneTexture;\n\n\tmat4 getBoneMatrix( const in float i ) {\n\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\n\t\treturn mat4( v1, v2, v3, v4 );\n\n\t}\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinning_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinning_vertex.glsl.d.ts deleted file mode 100644 index 34b9a3566..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinning_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_SKINNING\n\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinnormal_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinnormal_vertex.glsl.d.ts deleted file mode 100644 index 853e7bfd7..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/skinnormal_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_SKINNING\n\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\n\t#ifdef USE_TANGENT\n\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\n\t#endif\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/specularmap_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/specularmap_fragment.glsl.d.ts deleted file mode 100644 index cf125b322..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/specularmap_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\nfloat specularStrength;\n\n#ifdef USE_SPECULARMAP\n\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n\n#else\n\n\tspecularStrength = 1.0;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/specularmap_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/specularmap_pars_fragment.glsl.d.ts deleted file mode 100644 index c2212b978..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/specularmap_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_SPECULARMAP\n\n\tuniform sampler2D specularMap;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/tonemapping_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/tonemapping_fragment.glsl.d.ts deleted file mode 100644 index a48659853..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/tonemapping_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#if defined( TONE_MAPPING )\n\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/tonemapping_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/tonemapping_pars_fragment.glsl.d.ts deleted file mode 100644 index 6f9412747..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/tonemapping_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifndef saturate\n// may have defined saturate() already\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n\nuniform float toneMappingExposure;\n\n// exposure only\nvec3 LinearToneMapping( vec3 color ) {\n\n\treturn saturate( toneMappingExposure * color );\n\n}\n\n// source: https://www.cs.utah.edu/docs/techreports/2002/pdf/UUCS-02-001.pdf\nvec3 ReinhardToneMapping( vec3 color ) {\n\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n\n}\n\n// source: http://filmicworlds.com/blog/filmic-tonemapping-operators/\nvec3 CineonToneMapping( vec3 color ) {\n\n\t// filmic operator by Jim Hejl and Richard Burgess-Dawson\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n\n}\n\n// source: https://github.com/selfshadow/ltc_code/blob/master/webgl/shaders/ltc/ltc_blit.fs\nvec3 RRTAndODTFit( vec3 v ) {\n\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n\n}\n\n// this implementation of ACES is modified to accommodate a brighter viewing environment.\n// the scale factor of 1/0.6 is subjective. see discussion in #19621.\n\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\n\t// sRGB => XYZ => D65_2_D60 => AP1 => RRT_SAT\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ), // transposed from source\n\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\n\t// ODT_SAT => XYZ => D60_2_D65 => sRGB\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ), // transposed from source\n\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\n\tcolor *= toneMappingExposure / 0.6;\n\n\tcolor = ACESInputMat * color;\n\n\t// Apply RRT and ODT\n\tcolor = RRTAndODTFit( color );\n\n\tcolor = ACESOutputMat * color;\n\n\t// Clamp to [0, 1]\n\treturn saturate( color );\n\n}\n\n// Matrices for rec 2020 <> rec 709 color space conversion\n// matrix provided in row-major order so it has been transposed\n// https://www.itu.int/pub/R-REP-BT.2407-2017\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\n\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\n\n// https://iolite-engine.com/blog_posts/minimal_agx_implementation\n// Mean error^2: 3.6705141e-06\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n\n}\n\n// AgX Tone Mapping implementation based on Filament, which in turn is based\n// on Blender's implementation using rec 2020 primaries\n// https://github.com/google/filament/pull/7236\n// Inputs and outputs are encoded as Linear-sRGB.\n\nvec3 AgXToneMapping( vec3 color ) {\n\n\t// AgX constants\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\n\t// explicit AgXOutsetMatrix generated from Filaments AgXOutsetMatrixInv\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\n\t// LOG2_MIN = -10.0\n\t// LOG2_MAX = +6.5\n\t// MIDDLE_GRAY = 0.18\n\tconst float AgxMinEv = - 12.47393; // log2( pow( 2, LOG2_MIN ) * MIDDLE_GRAY )\n\tconst float AgxMaxEv = 4.026069; // log2( pow( 2, LOG2_MAX ) * MIDDLE_GRAY )\n\n\tcolor *= toneMappingExposure;\n\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\n\tcolor = AgXInsetMatrix * color;\n\n\t// Log2 encoding\n\tcolor = max( color, 1e-10 ); // avoid 0 or negative numbers for log2\n\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\n\tcolor = clamp( color, 0.0, 1.0 );\n\n\t// Apply sigmoid\n\tcolor = agxDefaultContrastApprox( color );\n\n\t// Apply AgX look\n\t// v = agxLook(v, look);\n\n\tcolor = AgXOutsetMatrix * color;\n\n\t// Linearize\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\n\t// Gamut mapping. Simple clamp for now.\n\tcolor = clamp( color, 0.0, 1.0 );\n\n\treturn color;\n\n}\n\n// https://modelviewer.dev/examples/tone-mapping\n\nvec3 NeutralToneMapping( vec3 color ) {\n\n\tconst float StartCompression = 0.8 - 0.04;\n\tconst float Desaturation = 0.15;\n\n\tcolor *= toneMappingExposure;\n\n\tfloat x = min( color.r, min( color.g, color.b ) );\n\n\tfloat offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n\n\tcolor -= offset;\n\n\tfloat peak = max( color.r, max( color.g, color.b ) );\n\n\tif ( peak < StartCompression ) return color;\n\n\tfloat d = 1. - StartCompression;\n\n\tfloat newPeak = 1. - d * d / ( peak + d - StartCompression );\n\n\tcolor *= newPeak / peak;\n\n\tfloat g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n\n\treturn mix( color, vec3( newPeak ), g );\n\n}\n\nvec3 CustomToneMapping( vec3 color ) { return color; }\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/transmission_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/transmission_fragment.glsl.d.ts deleted file mode 100644 index 5fa885d5f..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/transmission_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_TRANSMISSION\n\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\n\t#ifdef USE_TRANSMISSIONMAP\n\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\n\t#endif\n\n\t#ifdef USE_THICKNESSMAP\n\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\n\t#endif\n\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = transformNormalByInverseViewMatrix( normal, viewMatrix );\n\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseContribution, material.specularColorBlended, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/transmission_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/transmission_pars_fragment.glsl.d.ts deleted file mode 100644 index a96404940..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/transmission_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#ifdef USE_TRANSMISSION\n\n\t// Transmission code is based on glTF-Sampler-Viewer\n\t// https://github.com/KhronosGroup/glTF-Sample-Viewer\n\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\n\t#ifdef USE_TRANSMISSIONMAP\n\n\t\tuniform sampler2D transmissionMap;\n\n\t#endif\n\n\t#ifdef USE_THICKNESSMAP\n\n\t\tuniform sampler2D thicknessMap;\n\n\t#endif\n\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\n\tvarying vec3 vWorldPosition;\n\n\t// Mipped Bicubic Texture Filtering by N8\n\t// https://www.shadertoy.com/view/Dl2SDW\n\n\tfloat w0( float a ) {\n\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\n\t}\n\n\tfloat w1( float a ) {\n\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\n\t}\n\n\tfloat w2( float a ){\n\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\n\t}\n\n\tfloat w3( float a ) {\n\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\n\t}\n\n\t// g0 and g1 are the two amplitude functions\n\tfloat g0( float a ) {\n\n\t\treturn w0( a ) + w1( a );\n\n\t}\n\n\tfloat g1( float a ) {\n\n\t\treturn w2( a ) + w3( a );\n\n\t}\n\n\t// h0 and h1 are the two offset functions\n\tfloat h0( float a ) {\n\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\n\t}\n\n\tfloat h1( float a ) {\n\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\n\t}\n\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\n\t\tuv = uv * texelSize.zw + 0.5;\n\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\n\t}\n\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\n\t}\n\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\n\t\t// Direction of refracted light.\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\n\t\t// Compute rotation-independent scaling of the model matrix.\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\n\t\t// The thickness is specified in local space.\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\n\t}\n\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\n\t\t// Scale roughness with IOR so that an IOR of 1.0 results in no microfacet refraction and\n\t\t// an IOR of 1.5 results in the default amount of microfacet refraction.\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\n\t}\n\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\n\t}\n\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\n\t\tif ( isinf( attenuationDistance ) ) {\n\n\t\t\t// Attenuation distance is +\u221E, i.e. the transmitted color is not attenuated at all.\n\t\t\treturn vec3( 1.0 );\n\n\t\t} else {\n\n\t\t\t// Compute light attenuation using Beer's law.\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); // Beer's law\n\t\t\treturn transmittance;\n\n\t\t}\n\n\t}\n\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\n\t\t#ifdef USE_DISPERSION\n\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\n\t\t\t\t// Project refracted vector on the framebuffer, while mapping to normalized device coordinates.\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\n\t\t\t\t// Sample framebuffer to get pixel the refracted ray hits.\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\n\t\t\t}\n\n\t\t\ttransmittedLight.a /= 3.0;\n\n\t\t#else\n\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\n\t\t\t// Project refracted vector on the framebuffer, while mapping to normalized device coordinates.\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\n\t\t\t// Sample framebuffer to get pixel the refracted ray hits.\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\n\t\t#endif\n\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\n\t\t// Get the specular component.\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\n\t\t// As less light is transmitted, the opacity should be increased. This simple approximation does a decent job\n\t\t// of modulating a CSS background, and has no effect when the buffer is opaque, due to a solid object or clear color.\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\n\t}\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_pars_fragment.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_pars_fragment.glsl.d.ts deleted file mode 100644 index aa5001c0e..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_pars_fragment.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\n\tvarying vec2 vUv;\n\n#endif\n#ifdef USE_MAP\n\n\tvarying vec2 vMapUv;\n\n#endif\n#ifdef USE_ALPHAMAP\n\n\tvarying vec2 vAlphaMapUv;\n\n#endif\n#ifdef USE_LIGHTMAP\n\n\tvarying vec2 vLightMapUv;\n\n#endif\n#ifdef USE_AOMAP\n\n\tvarying vec2 vAoMapUv;\n\n#endif\n#ifdef USE_BUMPMAP\n\n\tvarying vec2 vBumpMapUv;\n\n#endif\n#ifdef USE_NORMALMAP\n\n\tvarying vec2 vNormalMapUv;\n\n#endif\n#ifdef USE_EMISSIVEMAP\n\n\tvarying vec2 vEmissiveMapUv;\n\n#endif\n#ifdef USE_METALNESSMAP\n\n\tvarying vec2 vMetalnessMapUv;\n\n#endif\n#ifdef USE_ROUGHNESSMAP\n\n\tvarying vec2 vRoughnessMapUv;\n\n#endif\n#ifdef USE_ANISOTROPYMAP\n\n\tvarying vec2 vAnisotropyMapUv;\n\n#endif\n#ifdef USE_CLEARCOATMAP\n\n\tvarying vec2 vClearcoatMapUv;\n\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\n\tvarying vec2 vClearcoatNormalMapUv;\n\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\n\tvarying vec2 vClearcoatRoughnessMapUv;\n\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\n\tvarying vec2 vIridescenceMapUv;\n\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\n\tvarying vec2 vIridescenceThicknessMapUv;\n\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\n\tvarying vec2 vSheenColorMapUv;\n\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\n\tvarying vec2 vSheenRoughnessMapUv;\n\n#endif\n#ifdef USE_SPECULARMAP\n\n\tvarying vec2 vSpecularMapUv;\n\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\n\tvarying vec2 vSpecularColorMapUv;\n\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\n\tvarying vec2 vSpecularIntensityMapUv;\n\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n\n#endif\n#ifdef USE_THICKNESSMAP\n\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_pars_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_pars_vertex.glsl.d.ts deleted file mode 100644 index 5439faba3..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_pars_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\n\tvarying vec2 vUv;\n\n#endif\n#ifdef USE_MAP\n\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n\n#endif\n#ifdef USE_ALPHAMAP\n\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n\n#endif\n#ifdef USE_LIGHTMAP\n\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n\n#endif\n#ifdef USE_AOMAP\n\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n\n#endif\n#ifdef USE_BUMPMAP\n\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n\n#endif\n#ifdef USE_NORMALMAP\n\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n\n#endif\n#ifdef USE_EMISSIVEMAP\n\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n\n#endif\n#ifdef USE_METALNESSMAP\n\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n\n#endif\n#ifdef USE_ROUGHNESSMAP\n\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n\n#endif\n#ifdef USE_ANISOTROPYMAP\n\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n\n#endif\n#ifdef USE_CLEARCOATMAP\n\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n\n#endif\n#ifdef USE_SPECULARMAP\n\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n\n#endif\n#ifdef USE_THICKNESSMAP\n\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_vertex.glsl.d.ts deleted file mode 100644 index 62229e16f..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/uv_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\n\tvUv = vec3( uv, 1 ).xy;\n\n#endif\n#ifdef USE_MAP\n\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_ALPHAMAP\n\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_LIGHTMAP\n\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_AOMAP\n\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_BUMPMAP\n\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_NORMALMAP\n\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_EMISSIVEMAP\n\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_METALNESSMAP\n\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_ROUGHNESSMAP\n\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_ANISOTROPYMAP\n\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_CLEARCOATMAP\n\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_SPECULARMAP\n\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n\n#endif\n#ifdef USE_THICKNESSMAP\n\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/worldpos_vertex.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/worldpos_vertex.glsl.d.ts deleted file mode 100644 index 83ecd5b37..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderChunk/worldpos_vertex.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: "\n#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\n\t#ifdef USE_BATCHING\n\n\t\tworldPosition = batchingMatrix * worldPosition;\n\n\t#endif\n\n\t#ifdef USE_INSTANCING\n\n\t\tworldPosition = instanceMatrix * worldPosition;\n\n\t#endif\n\n\tworldPosition = modelMatrix * worldPosition;\n\n#endif\n"; -export default _default; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib.d.ts deleted file mode 100644 index 7aeb3f49e..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export namespace ShaderLib { - namespace physical { - let uniforms: Object; - let vertexShader: string; - let fragmentShader: string; - } -} diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/background.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/background.glsl.d.ts deleted file mode 100644 index 28f6e3d08..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/background.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const vertex: "\nvarying vec2 vUv;\nuniform mat3 uvTransform;\n\nvoid main() {\n\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n\n}\n"; -export const fragment: "\nuniform sampler2D t2D;\nuniform float backgroundIntensity;\n\nvarying vec2 vUv;\n\nvoid main() {\n\n\tvec4 texColor = texture2D( t2D, vUv );\n\n\t#ifdef DECODE_VIDEO_TEXTURE\n\n\t\t// use inline sRGB decode until browsers properly support SRGB8_ALPHA8 with video textures\n\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\n\t#endif\n\n\ttexColor.rgb *= backgroundIntensity;\n\n\tgl_FragColor = texColor;\n\n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/backgroundCube.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/backgroundCube.glsl.d.ts deleted file mode 100644 index 1e2625bfe..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/backgroundCube.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const vertex: "\nvarying vec3 vWorldDirection;\n\n#include \n\nvoid main() {\n\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t#include \n\t#include \n\n\tgl_Position.z = gl_Position.w; // set z to camera.far\n\n}\n"; -export const fragment: "\n\n#ifdef ENVMAP_TYPE_CUBE\n\n\tuniform samplerCube envMap;\n\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\n\tuniform sampler2D envMap;\n\n#endif\n\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\n\nvarying vec3 vWorldDirection;\n\n#include \n\nvoid main() {\n\n\t#ifdef ENVMAP_TYPE_CUBE\n\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vWorldDirection );\n\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\n\t#else\n\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\n\t#endif\n\n\ttexColor.rgb *= backgroundIntensity;\n\n\tgl_FragColor = texColor;\n\n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/cube.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/cube.glsl.d.ts deleted file mode 100644 index 1db8a9081..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/cube.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const vertex: "\nvarying vec3 vWorldDirection;\n\n#include \n\nvoid main() {\n\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t#include \n\t#include \n\n\tgl_Position.z = gl_Position.w; // set z to camera.far\n\n}\n"; -export const fragment: "\nuniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\n\nvarying vec3 vWorldDirection;\n\nvoid main() {\n\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/depth.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/depth.glsl.d.ts deleted file mode 100644 index b3c2e87e5..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/depth.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const vertex: "\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n// This is used for computing an equivalent of gl_FragCoord.z that is as high precision as possible.\n// Some platforms compute gl_FragCoord at a lower precision which makes the manually computed value better for\n// depth-based postprocessing effects. Reproduced on iPad with A10 processor / iPadOS 13.3.1.\nvarying vec2 vHighPrecisionZW;\n\nvoid main() {\n\n\t#include \n\n\t#include \n\t#include \n\n\t#include \n\n\t#ifdef USE_DISPLACEMENTMAP\n\n\t\t#include \n\t\t#include \n\t\t#include \n\n\t#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tvHighPrecisionZW = gl_Position.zw;\n\n}\n"; -export const fragment: "\n#if DEPTH_PACKING == 3200\n\n\tuniform float opacity;\n\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvarying vec2 vHighPrecisionZW;\n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\n\t#if DEPTH_PACKING == 3200\n\n\t\tdiffuseColor.a = opacity;\n\n\t#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\n\t// Higher precision equivalent of gl_FragCoord.z\n\n\t#ifdef USE_REVERSED_DEPTH_BUFFER\n\n\t\tfloat fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ];\n\n\t#else\n\n\t\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5;\n\n\t#endif\n\n\t#if DEPTH_PACKING == 3200\n\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\n\t#elif DEPTH_PACKING == 3201\n\n\t\t// TODO Deprecate\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\n\t#elif DEPTH_PACKING == 3202\n\n\t\t// TODO Deprecate\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\n\t#elif DEPTH_PACKING == 3203\n\n\t\t// TODO Deprecate\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\n\n\t#endif\n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/distance.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/distance.glsl.d.ts deleted file mode 100644 index cb252359b..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/distance.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const vertex: "\n#define DISTANCE\n\nvarying vec3 vWorldPosition;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\t#include \n\t#include \n\n\t#include \n\n\t#ifdef USE_DISPLACEMENTMAP\n\n\t\t#include \n\t\t#include \n\t\t#include \n\n\t#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tvWorldPosition = worldPosition.xyz;\n\n}\n"; -export const fragment: "\n#define DISTANCE\n\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main () {\n\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist ); // clamp to [ 0, 1 ]\n\n\tgl_FragColor = vec4( dist, 0.0, 0.0, 1.0 );\n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/equirect.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/equirect.glsl.d.ts deleted file mode 100644 index 4e98c6662..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/equirect.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const vertex: "\nvarying vec3 vWorldDirection;\n\n#include \n\nvoid main() {\n\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t#include \n\t#include \n\n}\n"; -export const fragment: "\nuniform sampler2D tEquirect;\n\nvarying vec3 vWorldDirection;\n\n#include \n\nvoid main() {\n\n\tvec3 direction = normalize( vWorldDirection );\n\n\tvec2 sampleUV = equirectUv( direction );\n\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/linedashed.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/linedashed.glsl.d.ts deleted file mode 100644 index 765f1bb14..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/linedashed.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const vertex: "\nuniform float scale;\nattribute float lineDistance;\n\nvarying float vLineDistance;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvLineDistance = scale * lineDistance;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; -export const fragment: "\nuniform vec3 diffuse;\nuniform float opacity;\n\nuniform float dashSize;\nuniform float totalSize;\n\nvarying float vLineDistance;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\n\t\tdiscard;\n\n\t}\n\n\tvec3 outgoingLight = vec3( 0.0 );\n\n\t#include \n\t#include \n\t#include \n\n\toutgoingLight = diffuseColor.rgb; // simple shader\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshbasic.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshbasic.glsl.d.ts deleted file mode 100644 index 23471acee..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshbasic.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const vertex: "\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\n\t#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\n}\n"; -export const fragment: "\nuniform vec3 diffuse;\nuniform float opacity;\n\n#ifndef FLAT_SHADED\n\n\tvarying vec3 vNormal;\n\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\n\t// accumulation (baked indirect lighting only)\n\t#ifdef USE_LIGHTMAP\n\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\n\t#else\n\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\n\t#endif\n\n\t// modulation\n\t#include \n\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshlambert.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshlambert.glsl.d.ts deleted file mode 100644 index 698ee0dd6..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshlambert.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const vertex: "\n#define LAMBERT\n\nvarying vec3 vViewPosition;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tvViewPosition = - mvPosition.xyz;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; -export const fragment: "\n#define LAMBERT\n\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t// accumulation\n\t#include \n\t#include \n\t#include \n\t#include \n\n\t// modulation\n\t#include \n\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshmatcap.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshmatcap.glsl.d.ts deleted file mode 100644 index a2e4cbe2e..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshmatcap.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const vertex: "\n#define MATCAP\n\nvarying vec3 vViewPosition;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\n#include \n#include \n\nvoid main() {\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\n\tvViewPosition = - mvPosition.xyz;\n\n}\n"; -export const fragment: "\n#define MATCAP\n\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\n\nvarying vec3 vViewPosition;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; // 0.495 to remove artifacts caused by undersized matcap disks\n\n\t#ifdef USE_MATCAP\n\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\n\t#else\n\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); // default if matcap is missing\n\n\t#endif\n\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshnormal.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshnormal.glsl.d.ts deleted file mode 100644 index 1961afdbe..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshnormal.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const vertex: "\n#define NORMAL\n\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\n\tvarying vec3 vViewPosition;\n\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\n\tvViewPosition = - mvPosition.xyz;\n\n#endif\n\n}\n"; -export const fragment: "\n#define NORMAL\n\nuniform float opacity;\n\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\n\tvarying vec3 vViewPosition;\n\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n\tgl_FragColor = vec4( normalize( normal ) * 0.5 + 0.5, diffuseColor.a );\n\n\t#ifdef OPAQUE\n\n\t\tgl_FragColor.a = 1.0;\n\n\t#endif\n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshphong.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshphong.glsl.d.ts deleted file mode 100644 index 22dc16023..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshphong.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const vertex: "\n#define PHONG\n\nvarying vec3 vViewPosition;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tvViewPosition = - mvPosition.xyz;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; -export const fragment: "\n#define PHONG\n\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t// accumulation\n\t#include \n\t#include \n\t#include \n\t#include \n\n\t// modulation\n\t#include \n\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshphysical.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshphysical.glsl.d.ts deleted file mode 100644 index 749385aed..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshphysical.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const vertex: "\n#define STANDARD\n\nvarying vec3 vViewPosition;\n\n#ifdef USE_TRANSMISSION\n\n\tvarying vec3 vWorldPosition;\n\n#endif\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tvViewPosition = - mvPosition.xyz;\n\n\t#include \n\t#include \n\t#include \n\n#ifdef USE_TRANSMISSION\n\n\tvWorldPosition = worldPosition.xyz;\n\n#endif\n}\n"; -export const fragment: "\n#define STANDARD\n\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\n\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n\n#ifdef IOR\n\tuniform float ior;\n#endif\n\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n\n#ifdef USE_DISPERSION\n\tuniform float dispersion;\n#endif\n\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\n\nvarying vec3 vViewPosition;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t// accumulation\n\t#include \n\t#include \n\t#include \n\t#include \n\n\t// modulation\n\t#include \n\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\n\t#include \n\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\n\t#ifdef USE_SHEEN\n \n\t\toutgoingLight = outgoingLight + sheenSpecularDirect + sheenSpecularIndirect;\n \n \t#endif\n\n\t#ifdef USE_CLEARCOAT\n\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\n\t#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshtoon.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshtoon.glsl.d.ts deleted file mode 100644 index bccb5d045..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/meshtoon.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const vertex: "\n#define TOON\n\nvarying vec3 vViewPosition;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tvViewPosition = - mvPosition.xyz;\n\n\t#include \n\t#include \n\t#include \n\n}\n"; -export const fragment: "\n#define TOON\n\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t// accumulation\n\t#include \n\t#include \n\t#include \n\t#include \n\n\t// modulation\n\t#include \n\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/points.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/points.glsl.d.ts deleted file mode 100644 index 384b2516f..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/points.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const vertex: "\nuniform float size;\nuniform float scale;\n\n#include \n#include \n#include \n#include \n#include \n#include \n\n#ifdef USE_POINTS_UV\n\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n\n#endif\n\nvoid main() {\n\n\t#ifdef USE_POINTS_UV\n\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\n\t#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\tgl_PointSize = size;\n\n\t#ifdef USE_SIZEATTENUATION\n\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\n\t#endif\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; -export const fragment: "\nuniform vec3 diffuse;\nuniform float opacity;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\n\tvec3 outgoingLight = vec3( 0.0 );\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\toutgoingLight = diffuseColor.rgb;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/shadow.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/shadow.glsl.d.ts deleted file mode 100644 index 49c051900..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/shadow.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const vertex: "\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\t#include \n\t#include \n\t#include \n\n}\n"; -export const fragment: "\nuniform vec3 color;\nuniform float opacity;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/sprite.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/sprite.glsl.d.ts deleted file mode 100644 index 921ca31df..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/sprite.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const vertex: "\nuniform float rotation;\nuniform vec2 center;\n\n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\t#include \n\n\tvec4 mvPosition = modelViewMatrix[ 3 ];\n\n\tvec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );\n\n\t#ifndef USE_SIZEATTENUATION\n\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\n\t#endif\n\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\n\tmvPosition.xy += rotatedPosition;\n\n\tgl_Position = projectionMatrix * mvPosition;\n\n\t#include \n\t#include \n\t#include \n\n}\n"; -export const fragment: "\nuniform vec3 diffuse;\nuniform float opacity;\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n\nvoid main() {\n\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\n\tvec3 outgoingLight = vec3( 0.0 );\n\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\n\toutgoingLight = diffuseColor.rgb;\n\n\t#include \n\t#include \n\t#include \n\t#include \n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/vsm.glsl.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/vsm.glsl.d.ts deleted file mode 100644 index b19167e8f..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/ShaderLib/vsm.glsl.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const vertex: "\nvoid main() {\n\n\tgl_Position = vec4( position, 1.0 );\n\n}\n"; -export const fragment: "\nuniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n\nvoid main() {\n\n\tconst float samples = float( VSM_SAMPLES );\n\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\n\t\t#ifdef HORIZONTAL_PASS\n\n\t\t\tvec2 distribution = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ).rg;\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\n\t\t#else\n\n\t\t\tfloat depth = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ).r;\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\n\t\t#endif\n\n\t}\n\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\n\tfloat std_dev = sqrt( max( 0.0, squared_mean - mean * mean ) );\n\n\tgl_FragColor = vec4( mean, std_dev, 0.0, 1.0 );\n\n}\n"; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/UniformsLib.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/UniformsLib.d.ts deleted file mode 100644 index 1737307e2..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/UniformsLib.d.ts +++ /dev/null @@ -1,449 +0,0 @@ -export namespace UniformsLib { - namespace common { - namespace diffuse { - let value: Color; - } - namespace opacity { - let value_1: number; - export { value_1 as value }; - } - namespace map { - let value_2: null; - export { value_2 as value }; - } - namespace mapTransform { - let value_3: Matrix3; - export { value_3 as value }; - } - namespace alphaMap { - let value_4: null; - export { value_4 as value }; - } - namespace alphaMapTransform { - let value_5: Matrix3; - export { value_5 as value }; - } - namespace alphaTest { - let value_6: number; - export { value_6 as value }; - } - } - namespace specularmap { - namespace specularMap { - let value_7: null; - export { value_7 as value }; - } - namespace specularMapTransform { - let value_8: Matrix3; - export { value_8 as value }; - } - } - namespace envmap { - namespace envMap { - let value_9: null; - export { value_9 as value }; - } - namespace envMapRotation { - let value_10: Matrix3; - export { value_10 as value }; - } - namespace reflectivity { - let value_11: number; - export { value_11 as value }; - } - namespace ior { - let value_12: number; - export { value_12 as value }; - } - namespace refractionRatio { - let value_13: number; - export { value_13 as value }; - } - namespace dfgLUT { - let value_14: null; - export { value_14 as value }; - } - } - namespace aomap { - namespace aoMap { - let value_15: null; - export { value_15 as value }; - } - namespace aoMapIntensity { - let value_16: number; - export { value_16 as value }; - } - namespace aoMapTransform { - let value_17: Matrix3; - export { value_17 as value }; - } - } - namespace lightmap { - namespace lightMap { - let value_18: null; - export { value_18 as value }; - } - namespace lightMapIntensity { - let value_19: number; - export { value_19 as value }; - } - namespace lightMapTransform { - let value_20: Matrix3; - export { value_20 as value }; - } - } - namespace bumpmap { - namespace bumpMap { - let value_21: null; - export { value_21 as value }; - } - namespace bumpMapTransform { - let value_22: Matrix3; - export { value_22 as value }; - } - namespace bumpScale { - let value_23: number; - export { value_23 as value }; - } - } - namespace normalmap { - namespace normalMap { - let value_24: null; - export { value_24 as value }; - } - namespace normalMapTransform { - let value_25: Matrix3; - export { value_25 as value }; - } - namespace normalScale { - let value_26: Vector2; - export { value_26 as value }; - } - } - namespace displacementmap { - namespace displacementMap { - let value_27: null; - export { value_27 as value }; - } - namespace displacementMapTransform { - let value_28: Matrix3; - export { value_28 as value }; - } - namespace displacementScale { - let value_29: number; - export { value_29 as value }; - } - namespace displacementBias { - let value_30: number; - export { value_30 as value }; - } - } - namespace emissivemap { - namespace emissiveMap { - let value_31: null; - export { value_31 as value }; - } - namespace emissiveMapTransform { - let value_32: Matrix3; - export { value_32 as value }; - } - } - namespace metalnessmap { - namespace metalnessMap { - let value_33: null; - export { value_33 as value }; - } - namespace metalnessMapTransform { - let value_34: Matrix3; - export { value_34 as value }; - } - } - namespace roughnessmap { - namespace roughnessMap { - let value_35: null; - export { value_35 as value }; - } - namespace roughnessMapTransform { - let value_36: Matrix3; - export { value_36 as value }; - } - } - namespace gradientmap { - namespace gradientMap { - let value_37: null; - export { value_37 as value }; - } - } - namespace fog { - namespace fogDensity { - let value_38: number; - export { value_38 as value }; - } - namespace fogNear { - let value_39: number; - export { value_39 as value }; - } - namespace fogFar { - let value_40: number; - export { value_40 as value }; - } - namespace fogColor { - let value_41: Color; - export { value_41 as value }; - } - } - namespace lights { - namespace ambientLightColor { - let value_42: never[]; - export { value_42 as value }; - } - namespace lightProbe { - let value_43: never[]; - export { value_43 as value }; - } - namespace directionalLights { - let value_44: never[]; - export { value_44 as value }; - export namespace properties { - let direction: {}; - let color: {}; - } - } - namespace directionalLightShadows { - let value_45: never[]; - export { value_45 as value }; - export namespace properties_1 { - let shadowIntensity: number; - let shadowBias: {}; - let shadowNormalBias: {}; - let shadowRadius: {}; - let shadowMapSize: {}; - } - export { properties_1 as properties }; - } - namespace directionalShadowMatrix { - let value_46: never[]; - export { value_46 as value }; - } - namespace spotLights { - let value_47: never[]; - export { value_47 as value }; - export namespace properties_2 { - let color_1: {}; - export { color_1 as color }; - export let position: {}; - let direction_1: {}; - export { direction_1 as direction }; - export let distance: {}; - export let coneCos: {}; - export let penumbraCos: {}; - export let decay: {}; - } - export { properties_2 as properties }; - } - namespace spotLightShadows { - let value_48: never[]; - export { value_48 as value }; - export namespace properties_3 { - let shadowIntensity_1: number; - export { shadowIntensity_1 as shadowIntensity }; - let shadowBias_1: {}; - export { shadowBias_1 as shadowBias }; - let shadowNormalBias_1: {}; - export { shadowNormalBias_1 as shadowNormalBias }; - let shadowRadius_1: {}; - export { shadowRadius_1 as shadowRadius }; - let shadowMapSize_1: {}; - export { shadowMapSize_1 as shadowMapSize }; - } - export { properties_3 as properties }; - } - namespace spotLightMap { - let value_49: never[]; - export { value_49 as value }; - } - namespace spotLightMatrix { - let value_50: never[]; - export { value_50 as value }; - } - namespace pointLights { - let value_51: never[]; - export { value_51 as value }; - export namespace properties_4 { - let color_2: {}; - export { color_2 as color }; - let position_1: {}; - export { position_1 as position }; - let decay_1: {}; - export { decay_1 as decay }; - let distance_1: {}; - export { distance_1 as distance }; - } - export { properties_4 as properties }; - } - namespace pointLightShadows { - let value_52: never[]; - export { value_52 as value }; - export namespace properties_5 { - let shadowIntensity_2: number; - export { shadowIntensity_2 as shadowIntensity }; - let shadowBias_2: {}; - export { shadowBias_2 as shadowBias }; - let shadowNormalBias_2: {}; - export { shadowNormalBias_2 as shadowNormalBias }; - let shadowRadius_2: {}; - export { shadowRadius_2 as shadowRadius }; - let shadowMapSize_2: {}; - export { shadowMapSize_2 as shadowMapSize }; - export let shadowCameraNear: {}; - export let shadowCameraFar: {}; - } - export { properties_5 as properties }; - } - namespace pointShadowMatrix { - let value_53: never[]; - export { value_53 as value }; - } - namespace hemisphereLights { - let value_54: never[]; - export { value_54 as value }; - export namespace properties_6 { - let direction_2: {}; - export { direction_2 as direction }; - export let skyColor: {}; - export let groundColor: {}; - } - export { properties_6 as properties }; - } - namespace rectAreaLights { - let value_55: never[]; - export { value_55 as value }; - export namespace properties_7 { - let color_3: {}; - export { color_3 as color }; - let position_2: {}; - export { position_2 as position }; - export let width: {}; - export let height: {}; - } - export { properties_7 as properties }; - } - namespace ltc_1 { - let value_56: null; - export { value_56 as value }; - } - namespace ltc_2 { - let value_57: null; - export { value_57 as value }; - } - namespace probesSH { - let value_58: null; - export { value_58 as value }; - } - namespace probesMin { - let value_59: Vector3; - export { value_59 as value }; - } - namespace probesMax { - let value_60: Vector3; - export { value_60 as value }; - } - namespace probesResolution { - let value_61: Vector3; - export { value_61 as value }; - } - } - namespace points { - export namespace diffuse_1 { - let value_62: Color; - export { value_62 as value }; - } - export { diffuse_1 as diffuse }; - export namespace opacity_1 { - let value_63: number; - export { value_63 as value }; - } - export { opacity_1 as opacity }; - export namespace size { - let value_64: number; - export { value_64 as value }; - } - export namespace scale { - let value_65: number; - export { value_65 as value }; - } - export namespace map_1 { - let value_66: null; - export { value_66 as value }; - } - export { map_1 as map }; - export namespace alphaMap_1 { - let value_67: null; - export { value_67 as value }; - } - export { alphaMap_1 as alphaMap }; - export namespace alphaMapTransform_1 { - let value_68: Matrix3; - export { value_68 as value }; - } - export { alphaMapTransform_1 as alphaMapTransform }; - export namespace alphaTest_1 { - let value_69: number; - export { value_69 as value }; - } - export { alphaTest_1 as alphaTest }; - export namespace uvTransform { - let value_70: Matrix3; - export { value_70 as value }; - } - } - namespace sprite { - export namespace diffuse_2 { - let value_71: Color; - export { value_71 as value }; - } - export { diffuse_2 as diffuse }; - export namespace opacity_2 { - let value_72: number; - export { value_72 as value }; - } - export { opacity_2 as opacity }; - export namespace center { - let value_73: Vector2; - export { value_73 as value }; - } - export namespace rotation { - let value_74: number; - export { value_74 as value }; - } - export namespace map_2 { - let value_75: null; - export { value_75 as value }; - } - export { map_2 as map }; - export namespace mapTransform_1 { - let value_76: Matrix3; - export { value_76 as value }; - } - export { mapTransform_1 as mapTransform }; - export namespace alphaMap_2 { - let value_77: null; - export { value_77 as value }; - } - export { alphaMap_2 as alphaMap }; - export namespace alphaMapTransform_2 { - let value_78: Matrix3; - export { value_78 as value }; - } - export { alphaMapTransform_2 as alphaMapTransform }; - export namespace alphaTest_2 { - let value_79: number; - export { value_79 as value }; - } - export { alphaTest_2 as alphaTest }; - } -} -import { Color } from '../../math/Color.js'; -import { Matrix3 } from '../../math/Matrix3.js'; -import { Vector2 } from '../../math/Vector2.js'; -import { Vector3 } from '../../math/Vector3.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/shaders/UniformsUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/shaders/UniformsUtils.d.ts deleted file mode 100644 index 2789a045c..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/shaders/UniformsUtils.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -/** - * Provides utility functions for managing uniforms. - * - * @module UniformsUtils - */ -/** - * Clones the given uniform definitions by performing a deep-copy. That means - * if the value of a uniform refers to an object like a Vector3 or Texture, - * the cloned uniform will refer to a new object reference. - * - * @param {Object} src - An object representing uniform definitions. - * @return {Object} The cloned uniforms. - */ -export function cloneUniforms(src: Object): Object; -/** - * Merges the given uniform definitions into a single object. Since the - * method internally uses cloneUniforms(), it performs a deep-copy when - * producing the merged uniform definitions. - * - * @param {Array} uniforms - An array of objects containing uniform definitions. - * @return {Object} The merged uniforms. - */ -export function mergeUniforms(uniforms: any[]): Object; -export function cloneUniformsGroups(src: any): any[]; -export function getUnlitUniformColorSpace(renderer: any): any; -export namespace UniformsUtils { - export { cloneUniforms as clone }; - export { mergeUniforms as merge }; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/WebGLBackend.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/WebGLBackend.d.ts deleted file mode 100644 index d8e36a458..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/WebGLBackend.d.ts +++ /dev/null @@ -1,649 +0,0 @@ -export default WebGLBackend; -/** - * A backend implementation targeting WebGL 2. - * - * @private - * @augments Backend - */ -declare class WebGLBackend extends Backend { - /** - * WebGLBackend options. - * - * @typedef {Object} WebGLBackend~Options - * @property {boolean} [logarithmicDepthBuffer=false] - Whether logarithmic depth buffer is enabled or not. - * @property {boolean} [reversedDepthBuffer=false] - Whether reversed depth buffer is enabled or not. - * @property {boolean} [alpha=true] - Whether the default framebuffer (which represents the final contents of the canvas) should be transparent or opaque. - * @property {boolean} [depth=true] - Whether the default framebuffer should have a depth buffer or not. - * @property {boolean} [stencil=false] - Whether the default framebuffer should have a stencil buffer or not. - * @property {boolean} [antialias=false] - Whether MSAA as the default anti-aliasing should be enabled or not. - * @property {number} [samples=0] - When `antialias` is `true`, `4` samples are used by default. Set this parameter to any other integer value than 0 to overwrite the default. - * @property {boolean} [forceWebGL=false] - If set to `true`, the renderer uses a WebGL 2 backend no matter if WebGPU is supported or not. - * @property {WebGL2RenderingContext} [context=undefined] - A WebGL 2 rendering context. - */ - /** - * Constructs a new WebGPU backend. - * - * @param {WebGLBackend~Options} [parameters] - The configuration parameter. - */ - constructor(parameters?: {}); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWebGLBackend: boolean; - /** - * A reference to a backend module holding shader attribute-related - * utility functions. - * - * @type {?WebGLAttributeUtils} - * @default null - */ - attributeUtils: WebGLAttributeUtils | null; - /** - * A reference to a backend module holding extension-related - * utility functions. - * - * @type {?WebGLExtensions} - * @default null - */ - extensions: WebGLExtensions | null; - /** - * A reference to a backend module holding capability-related - * utility functions. - * - * @type {?WebGLCapabilities} - * @default null - */ - capabilities: WebGLCapabilities | null; - /** - * A reference to a backend module holding texture-related - * utility functions. - * - * @type {?WebGLTextureUtils} - * @default null - */ - textureUtils: WebGLTextureUtils | null; - /** - * A reference to a backend module holding renderer-related - * utility functions. - * - * @type {?WebGLBufferRenderer} - * @default null - */ - bufferRenderer: WebGLBufferRenderer | null; - /** - * A reference to the rendering context. - * - * @type {?WebGL2RenderingContext} - * @default null - */ - gl: WebGL2RenderingContext | null; - /** - * A reference to a backend module holding state-related - * utility functions. - * - * @type {?WebGLState} - * @default null - */ - state: WebGLState | null; - /** - * A reference to a backend module holding common - * utility functions. - * - * @type {?WebGLUtils} - * @default null - */ - utils: WebGLUtils | null; - /** - * Dictionary for caching VAOs. - * - * @type {Object} - */ - vaoCache: { - [x: string]: WebGLVertexArrayObject; - }; - /** - * Dictionary for caching transform feedback objects. - * - * @type {Object} - */ - transformFeedbackCache: { - [x: string]: WebGLTransformFeedback; - }; - /** - * Controls if `gl.RASTERIZER_DISCARD` should be enabled or not. - * Only relevant when using compute shaders. - * - * @type {boolean} - * @default false - */ - discard: boolean; - /** - * A reference to the `EXT_disjoint_timer_query_webgl2` extension. `null` if the - * device does not support the extension. - * - * @type {?EXTDisjointTimerQueryWebGL2} - * @default null - */ - disjoint: EXTDisjointTimerQueryWebGL2 | null; - /** - * A reference to the `KHR_parallel_shader_compile` extension. `null` if the - * device does not support the extension. - * - * @type {?KHRParallelShaderCompile} - * @default null - */ - parallel: KHRParallelShaderCompile | null; - /** - * A reference to the current render context. - * - * @private - * @type {RenderContext} - * @default null - */ - private _currentContext; - /** - * A unique collection of bindings. - * - * @private - * @type {WeakSet>} - */ - private _knownBindings; - /** - * Whether the device supports framebuffers invalidation or not. - * - * @private - * @type {boolean} - */ - private _supportsInvalidateFramebuffer; - /** - * The target framebuffer when rendering with - * the WebXR device API. - * - * @private - * @type {?WebGLFramebuffer} - * @default null - */ - private _xrFramebuffer; - /** - * Initializes the backend so it is ready for usage. - * - * @param {Renderer} renderer - The renderer. - */ - init(renderer: Renderer): void; - _onContextLost: ((event: any) => void) | undefined; - drawBuffersIndexedExt: Object | undefined; - /** - * This method performs a readback operation by moving buffer data from - * a storage buffer attribute from the GPU to the CPU. ReadbackBuffer can - * be used to retain and reuse handles to the intermediate buffers and prevent - * new allocation. - * - * @async - * @param {BufferAttribute} attribute - The storage buffer attribute to read frm. - * @param {ReadbackBuffer|ArrayBuffer} target - The storage buffer attribute. - * @param {number} offset - The storage buffer attribute. - * @param {number} count - The offset from which to start reading the - * @return {Promise} A promise that resolves with the buffer data when the data are ready. - */ - getArrayBufferAsync(attribute: BufferAttribute, target?: ReadbackBuffer | ArrayBuffer, offset?: number, count?: number): Promise; - /** - * Ensures the backend is XR compatible. - * - * @async - * @return {Promise} A Promise that resolve when the renderer is XR compatible. - */ - makeXRCompatible(): Promise; - /** - * Sets the XR rendering destination. - * - * @param {WebGLFramebuffer} xrFramebuffer - The XR framebuffer. - */ - setXRTarget(xrFramebuffer: WebGLFramebuffer): void; - /** - * Configures the given XR render target with external textures. - * - * This method is only relevant when using the WebXR Layers API. - * - * @param {XRRenderTarget} renderTarget - The XR render target. - * @param {WebGLTexture} colorTexture - A native color texture. - * @param {?WebGLTexture} [depthTexture=null] - A native depth texture. - */ - setXRRenderTargetTextures(renderTarget: XRRenderTarget, colorTexture: WebGLTexture, depthTexture?: WebGLTexture | null): void; - /** - * Inits a time stamp query for the given render context. - * - * @param {string} type - The type of the timestamp query. - * @param {string} uid - A unique identifier for the timestamp query. - */ - initTimestampQuery(type: string, uid: string): void; - /** - * Prepares the timestamp buffer. - * - * @param {string} type - The type of the timestamp query. - * @param {string} uid - A unique identifier for the timestamp query. - */ - prepareTimestampBuffer(type: string, uid: string): void; - /** - * Returns the backend's rendering context. - * - * @return {WebGL2RenderingContext} The rendering context. - */ - getContext(): WebGL2RenderingContext; - /** - * This method is executed at the beginning of a render call and prepares - * the WebGL state for upcoming render calls - * - * @param {RenderContext} renderContext - The render context. - */ - beginRender(renderContext: RenderContext): void; - /** - * This method is executed at the end of a render call and finalizes work - * after draw calls. - * - * @param {RenderContext} renderContext - The render context. - */ - finishRender(renderContext: RenderContext): void; - /** - * This method processes the result of occlusion queries and writes it - * into render context data. - * - * @async - * @param {RenderContext} renderContext - The render context. - */ - resolveOccludedAsync(renderContext: RenderContext): void; - /** - * Returns `true` if the given 3D object is fully occluded by other - * 3D objects in the scene. - * - * @param {RenderContext} renderContext - The render context. - * @param {Object3D} object - The 3D object to test. - * @return {boolean} Whether the 3D object is fully occluded or not. - */ - isOccluded(renderContext: RenderContext, object: Object3D): boolean; - /** - * Updates the viewport with the values from the given render context. - * - * @param {RenderContext} renderContext - The render context. - */ - updateViewport(renderContext: RenderContext): void; - /** - * Updates the scissor with the values from the given render context. - * - * @param {RenderContext} renderContext - The render context. - */ - updateScissor(renderContext: RenderContext): void; - /** - * Defines the scissor test. - * - * @param {boolean} boolean - Whether the scissor test should be enabled or not. - */ - setScissorTest(boolean: boolean): void; - /** - * Returns the clear color and alpha into a single - * color object. - * - * @return {Color4} The clear color. - */ - getClearColor(): Color4; - /** - * Performs a clear operation. - * - * @param {boolean} color - Whether the color buffer should be cleared or not. - * @param {boolean} depth - Whether the depth buffer should be cleared or not. - * @param {boolean} stencil - Whether the stencil buffer should be cleared or not. - * @param {?Object} [descriptor=null] - The render context of the current set render target. - * @param {boolean} [setFrameBuffer=true] - Controls whether the intermediate framebuffer should be set or not. - * @param {boolean} [resolveRenderTarget=true] - Controls whether an active render target should be resolved - * or not. Only relevant for explicit clears. - */ - clear(color: boolean, depth: boolean, stencil: boolean, descriptor?: Object | null, setFrameBuffer?: boolean, resolveRenderTarget?: boolean): void; - /** - * This method is executed at the beginning of a compute call and - * prepares the state for upcoming compute tasks. - * - * @param {Node|Array} computeGroup - The compute node(s). - */ - beginCompute(computeGroup: Node | Array): void; - /** - * Executes a compute command for the given compute node. - * - * @param {Node|Array} computeGroup - The group of compute nodes of a compute call. Can be a single compute node. - * @param {Node} computeNode - The compute node. - * @param {Array} bindings - The bindings. - * @param {ComputePipeline} pipeline - The compute pipeline. - * @param {?number} [count=null] - The count of compute invocations. If `null`, the count is determined by the compute node. - */ - compute(computeGroup: Node | Array, computeNode: Node, bindings: Array, pipeline: ComputePipeline, count?: number | null): void; - /** - * This method is executed at the end of a compute call and - * finalizes work after compute tasks. - * - * @param {Node|Array} computeGroup - The compute node(s). - */ - finishCompute(computeGroup: Node | Array): void; - /** - * Internal to determine if the current render target is a render target array with depth 2D array texture. - * - * @param {RenderContext} renderContext - The render context. - * @return {boolean} Whether the render target is a render target array with depth 2D array texture. - * - * @private - */ - private _isRenderCameraDepthArray; - /** - * Internal draw function. - * - * @private - * @param {Object3D} object - The object to render. - * @param {WebGLBufferRenderer} renderer - The internal renderer. - * @param {number} firstVertex - The first vertex to render. - * @param {number} vertexCount - The vertex count. - * @param {number} instanceCount - The intance count. - * @param {WebGLProgram} programGPU - The raw WebGL shader program. - */ - private _draw; - /** - * Executes a draw command for the given render object. - * - * @param {RenderObject} renderObject - The render object to draw. - * @param {Info} info - Holds a series of statistical information about the GPU memory and the rendering process. - */ - draw(renderObject: RenderObject): void; - /** - * Creates a default texture for the given texture that can be used - * as a placeholder until the actual texture is ready for usage. - * - * @param {Texture} texture - The texture to create a default texture for. - */ - createDefaultTexture(texture: Texture): void; - /** - * Defines a texture on the GPU for the given texture object. - * - * @param {Texture} texture - The texture. - * @param {Object} [options={}] - Optional configuration parameter. - */ - createTexture(texture: Texture, options?: Object): void; - /** - * Uploads the updated texture data to the GPU. - * - * @param {Texture} texture - The texture. - * @param {Object} [options={}] - Optional configuration parameter. - */ - updateTexture(texture: Texture, options?: Object): void; - /** - * Generates mipmaps for the given texture. - * - * @param {Texture} texture - The texture. - */ - generateMipmaps(texture: Texture): void; - /** - * Destroys the GPU data for the given texture object. - * - * @param {Texture} texture - The texture. - * @param {boolean} [isDefaultTexture=false] - Whether the texture uses a default GPU texture or not. - */ - destroyTexture(texture: Texture, isDefaultTexture?: boolean): void; - /** - * Returns texture data as a typed array. - * - * @async - * @param {Texture} texture - The texture to copy. - * @param {number} x - The x coordinate of the copy origin. - * @param {number} y - The y coordinate of the copy origin. - * @param {number} width - The width of the copy. - * @param {number} height - The height of the copy. - * @param {number} faceIndex - The face index. - * @return {Promise} A Promise that resolves with a typed array when the copy operation has finished. - */ - copyTextureToBuffer(texture: Texture, x: number, y: number, width: number, height: number, faceIndex: number): Promise; - /** - * Returns a node builder for the given render object. - * - * @param {RenderObject} object - The render object. - * @param {Renderer} renderer - The renderer. - * @return {GLSLNodeBuilder} The node builder. - */ - createNodeBuilder(object: RenderObject, renderer: Renderer): GLSLNodeBuilder; - /** - * Creates a shader program from the given programmable stage. - * - * @param {ProgrammableStage} program - The programmable stage. - */ - createProgram(program: ProgrammableStage): void; - /** - * Destroys the shader program of the given programmable stage. - * - * @param {ProgrammableStage} program - The programmable stage. - */ - destroyProgram(program: ProgrammableStage): void; - /** - * Creates a render pipeline for the given render object. - * - * @param {RenderObject} renderObject - The render object. - * @param {Array} promises - An array of compilation promises which are used in `compileAsync()`. - */ - createRenderPipeline(renderObject: RenderObject, promises: Array>): void; - /** - * Formats the source code of error messages. - * - * @private - * @param {string} string - The code. - * @param {number} errorLine - The error line. - * @return {string} The formatted code. - */ - private _handleSource; - /** - * Gets the shader compilation errors from the info log. - * - * @private - * @param {WebGL2RenderingContext} gl - The rendering context. - * @param {WebGLShader} shader - The WebGL shader object. - * @param {string} type - The shader type. - * @return {string} The shader errors. - */ - private _getShaderErrors; - /** - * Logs shader compilation errors. - * - * @private - * @param {WebGLProgram} programGPU - The WebGL program. - * @param {WebGLShader} glFragmentShader - The fragment shader as a native WebGL shader object. - * @param {WebGLShader} glVertexShader - The vertex shader as a native WebGL shader object. - */ - private _logProgramError; - /** - * Completes the shader program setup for the given render object. - * - * @private - * @param {RenderObject} renderObject - The render object. - * @param {RenderPipeline} pipeline - The render pipeline. - */ - private _completeCompile; - /** - * Creates a compute pipeline for the given compute node. - * - * @param {ComputePipeline} computePipeline - The compute pipeline. - * @param {Array} bindings - The bindings. - */ - createComputePipeline(computePipeline: ComputePipeline, bindings: Array): void; - /** - * Creates bindings from the given bind group definition. - * - * @param {BindGroup} bindGroup - The bind group. - * @param {Array} bindings - Array of bind groups. - * @param {number} cacheIndex - The cache index. - * @param {number} version - The version. - */ - createBindings(bindGroup: BindGroup, bindings: Array): void; - /** - * Updates the given bind group definition. - * - * @param {BindGroup} bindGroup - The bind group. - * @param {Array} bindings - Array of bind groups. - * @param {number} cacheIndex - The cache index. - * @param {number} version - The version. - */ - updateBindings(bindGroup: BindGroup): void; - /** - * Updates a buffer binding. - * - * @param {Buffer} binding - The buffer binding to update. - */ - updateBinding(binding: Buffer): void; - /** - * Creates a uniform buffer. - * - * @param {Buffer} uniformBuffer - The uniform buffer. - */ - createUniformBuffer(uniformBuffer: Buffer): void; - /** - * Destroys the GPU data for the given uniform buffer. - * - * @param {Buffer} uniformBuffer - The uniform buffer. - */ - destroyUniformBuffer(uniformBuffer: Buffer): void; - /** - * Creates the GPU buffer of an indexed shader attribute. - * - * @param {BufferAttribute} attribute - The indexed buffer attribute. - */ - createIndexAttribute(attribute: BufferAttribute): void; - /** - * Creates the GPU buffer of a shader attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - */ - createAttribute(attribute: BufferAttribute): void; - /** - * Creates the GPU buffer of a storage attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - */ - createStorageAttribute(attribute: BufferAttribute): void; - /** - * Updates the GPU buffer of a shader attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute to update. - */ - updateAttribute(attribute: BufferAttribute): void; - /** - * Destroys the GPU buffer of a shader attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute to destroy. - */ - destroyAttribute(attribute: BufferAttribute): void; - /** - * Checks if the given feature is supported by the backend. - * - * @param {string} name - The feature's name. - * @return {boolean} Whether the feature is supported or not. - */ - hasFeature(name: string): boolean; - /** - * Copies data of the given source texture to the given destination texture. - * - * @param {Texture} srcTexture - The source texture. - * @param {Texture} dstTexture - The destination texture. - * @param {?(Box3|Box2)} [srcRegion=null] - The region of the source texture to copy. - * @param {?(Vector2|Vector3)} [dstPosition=null] - The destination position of the copy. - * @param {number} [srcLevel=0] - The source mip level to copy from. - * @param {number} [dstLevel=0] - The destination mip level to copy to. - */ - copyTextureToTexture(srcTexture: Texture, dstTexture: Texture, srcRegion?: (Box3 | Box2) | null, dstPosition?: (Vector2 | Vector3) | null, srcLevel?: number, dstLevel?: number): void; - /** - * Copies the current bound framebuffer to the given texture. - * - * @param {Texture} texture - The destination texture. - * @param {RenderContext} renderContext - The render context. - * @param {Vector4} rectangle - A four dimensional vector defining the origin and dimension of the copy. - */ - copyFramebufferToTexture(texture: Texture, renderContext: RenderContext, rectangle: Vector4): void; - /** - * Checks if the given compatibility is supported by the backend. - * - * @param {string} name - The compatibility name. - * @return {boolean} Whether the compatibility is supported or not. - */ - hasCompatibility(name: string): boolean; - /** - * Initializes the render target defined in the given render context. - * - * @param {RenderContext} renderContext - The render context. - */ - initRenderTarget(renderContext: RenderContext): void; - /** - * Configures the active framebuffer from the given render context. - * - * @private - * @param {RenderContext} descriptor - The render context. - */ - private _setFramebuffer; - /** - * Computes the VAO key for the given index and attributes. - * - * @private - * @param {Array} attributes - An array of buffer attributes. - * @return {string} The VAO key. - */ - private _getVaoKey; - /** - * Creates a VAO from the index and attributes. - * - * @private - * @param {Array} attributes - An array of buffer attributes. - * @return {Object} The VAO data. - */ - private _createVao; - /** - * Creates a transform feedback from the given transform buffers. - * - * @private - * @param {Array} transformBuffers - The transform buffers. - * @return {WebGLTransformFeedback} The transform feedback. - */ - private _getTransformFeedback; - /** - * Setups the given bindings. - * - * @private - * @param {Array} bindings - The bindings. - * @param {WebGLProgram} programGPU - The WebGL program. - */ - private _setupBindings; - /** - * Binds the given uniforms. - * - * @private - * @param {Array} bindings - The bindings. - */ - private _bindUniforms; - /** - * The method ensures multisampled render targets are resolved. - * - * @private - * @param {RenderContext} renderContext - The render context. - */ - private _resolveRenderTarget; - /** - * Returns `true` if the `WEBGL_multisampled_render_to_texture` extension - * should be used when MSAA is enabled. - * - * @private - * @param {RenderTarget} renderTarget - The render target that should be multisampled. - * @return {boolean} Whether to use the `WEBGL_multisampled_render_to_texture` extension for MSAA or not. - */ - private _useMultisampledExtension; -} -import Backend from '../common/Backend.js'; -import WebGLAttributeUtils from './utils/WebGLAttributeUtils.js'; -import WebGLExtensions from './utils/WebGLExtensions.js'; -import WebGLCapabilities from './utils/WebGLCapabilities.js'; -import WebGLTextureUtils from './utils/WebGLTextureUtils.js'; -import { WebGLBufferRenderer } from './WebGLBufferRenderer.js'; -import WebGLState from './utils/WebGLState.js'; -import WebGLUtils from './utils/WebGLUtils.js'; -import GLSLNodeBuilder from './nodes/GLSLNodeBuilder.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/WebGLBufferRenderer.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/WebGLBufferRenderer.d.ts deleted file mode 100644 index c297252cb..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/WebGLBufferRenderer.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -export class WebGLBufferRenderer { - constructor(backend: any); - gl: any; - extensions: any; - info: any; - mode: any; - index: number; - type: any; - object: any; - render(start: any, count: any): void; - renderInstances(start: any, count: any, primcount: any): void; - renderMultiDraw(starts: any, counts: any, drawCount: any): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.d.ts deleted file mode 100644 index c918b1ac0..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/nodes/GLSLNodeBuilder.d.ts +++ /dev/null @@ -1,384 +0,0 @@ -export default GLSLNodeBuilder; -/** - * A node builder targeting GLSL. - * - * This module generates GLSL shader code from node materials and also - * generates the respective bindings and vertex buffer definitions. These - * data are later used by the renderer to create render and compute pipelines - * for render objects. - * - * @augments NodeBuilder - */ -declare class GLSLNodeBuilder extends NodeBuilder { - /** - * Constructs a new GLSL node builder renderer. - * - * @param {Object3D} object - The 3D object. - * @param {Renderer} renderer - The renderer. - */ - constructor(object: Object3D, renderer: Renderer); - /** - * A dictionary holds for each shader stage ('vertex', 'fragment', 'compute') - * another dictionary which manages UBOs per group ('render','frame','object'). - * - * @type {Object>} - */ - uniformGroups: { - [x: string]: { - [x: string]: NodeUniformsGroup; - }; - }; - /** - * An array that holds objects defining the varying and attribute data in - * context of Transform Feedback. - * - * @type {Array>} - */ - transforms: Array<{ - [x: string]: AttributeNode | string; - }>; - /** - * A dictionary that holds for each shader stage a Map of used extensions. - * - * @type {Object>} - */ - extensions: { - [x: string]: Map; - }; - /** - * A dictionary that holds for each shader stage an Array of used builtins. - * - * @type {Object>} - */ - builtins: { - [x: string]: string[]; - }; - /** - * Checks if the given texture requires a manual conversion to the working color space. - * - * @param {Texture} texture - The texture to check. - * @return {boolean} Whether the given texture requires a conversion to working color space or not. - */ - needsToWorkingColorSpace(texture: Texture): boolean; - /** - * Includes the given method name into the current - * function node. - * - * @private - * @param {string} name - The method name to include. - * @return {CodeNode} The respective code node. - */ - private _include; - /** - * Returns the bitcast method name for a given input and outputType. - * - * @param {string} type - The output type to bitcast to. - * @param {string} inputType - The input type of the. - * @return {string} The resolved GLSL bitcast invocation. - */ - getBitcastMethod(type: string, inputType: string): string; - /** - * Returns the float packing method name for a given numeric encoding. - * - * @param {string} encoding - The numeric encoding that describes how the float values are mapped to the integer range. - * @returns {string} The resolved GLSL float packing method name. - */ - getFloatPackingMethod(encoding: string): string; - /** - * Returns the float unpacking method name for a given numeric encoding. - * - * @param {string} encoding - The numeric encoding that describes how the integer values are mapped to the float range. - * @returns {string} The resolved GLSL float unpacking method name. - */ - getFloatUnpackingMethod(encoding: string): string; - /** - * Returns the native snippet for a ternary operation. - * - * @param {string} condSnippet - The condition determining which expression gets resolved. - * @param {string} ifSnippet - The expression to resolve to if the condition is true. - * @param {string} elseSnippet - The expression to resolve to if the condition is false. - * @return {string} The resolved method name. - */ - getTernary(condSnippet: string, ifSnippet: string, elseSnippet: string): string; - /** - * Builds the given shader node. - * - * @param {ShaderNodeInternal} shaderNode - The shader node. - * @return {string} The GLSL function code. - */ - buildFunctionCode(shaderNode: ShaderNodeInternal): string; - /** - * Setups the Pixel Buffer Object (PBO) for the given storage - * buffer node. - * - * @param {StorageBufferNode} storageBufferNode - The storage buffer node. - */ - setupPBO(storageBufferNode: StorageBufferNode): void; - /** - * Returns a GLSL snippet that represents the property name of the given node. - * - * @param {Node} node - The node. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {string} The property name. - */ - getPropertyName(node: Node, shaderStage?: string): string; - /** - * Setups the Pixel Buffer Object (PBO) for the given storage - * buffer node. - * - * @param {StorageArrayElementNode} storageArrayElementNode - The storage array element node. - * @return {string} The property name. - */ - generatePBO(storageArrayElementNode: StorageArrayElementNode): string; - /** - * Generates the GLSL snippet that reads a single texel from a texture without sampling or filtering. - * - * @param {?Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvIndexSnippet - A GLSL snippet that represents texture coordinates used for sampling. - * @param {?string} levelSnippet - A GLSL snippet that represents the mip level, with level 0 containing a full size version of the texture. - * @param {?string} depthSnippet - A GLSL snippet that represents the 0-based texture array index to sample. - * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @return {string} The GLSL snippet. - */ - generateTextureLoad(texture: Texture | null, textureProperty: string, uvIndexSnippet: string, levelSnippet: string | null, depthSnippet: string | null, offsetSnippet: string | null): string; - /** - * Generates the GLSL snippet for sampling/loading the given texture. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. - * @param {?string} depthSnippet - A GLSL snippet that represents the 0-based texture array index to sample. - * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @return {string} The GLSL snippet. - */ - generateTexture(texture: Texture, textureProperty: string, uvSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; - /** - * Generates the GLSL snippet when sampling textures with explicit mip level. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. - * @param {string} levelSnippet - A GLSL snippet that represents the mip level, with level 0 containing a full size version of the texture. - * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @return {string} The GLSL snippet. - */ - generateTextureLevel(texture: Texture, textureProperty: string, uvSnippet: string, levelSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; - /** - * Generates the GLSL snippet when sampling textures with a bias to the mip level. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. - * @param {string} biasSnippet - A GLSL snippet that represents the bias to apply to the mip level before sampling. - * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @return {string} The GLSL snippet. - */ - generateTextureBias(texture: Texture, textureProperty: string, uvSnippet: string, biasSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; - /** - * Generates the GLSL snippet for sampling/loading the given texture using explicit gradients. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. - * @param {Array} gradSnippet - An array holding both gradient GLSL snippets. - * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @return {string} The GLSL snippet. - */ - generateTextureGrad(texture: Texture, textureProperty: string, uvSnippet: string, gradSnippet: Array, depthSnippet: string | null, offsetSnippet: string | null): string; - /** - * Generates the GLSL snippet for sampling a depth texture and comparing the sampled depth values - * against a reference value. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. - * @param {string} compareSnippet - A GLSL snippet that represents the reference value. - * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {string} The GLSL snippet. - */ - generateTextureCompare(texture: Texture, textureProperty: string, uvSnippet: string, compareSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, shaderStage?: string): string; - /** - * Generates the GLSL snippet for gathering four texels from the given texture. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. - * @param {string} gatherSnippet - A GLSL snippet that represents the index of the channel to read. - * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {?string} flipYSnippet - A GLSL snippet that represents the y-flip. Only used for WebGL. - * @return {string} The GLSL snippet. - */ - generateTextureGather(texture: Texture, textureProperty: string, uvSnippet: string, gatherSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, flipYSnippet: string | null): string; - /** - * Generates the GLSL snippet for performing a depth comparison on four texels in the given depth texture. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A GLSL snippet that represents texture coordinates used for sampling. - * @param {string} compareSnippet - A GLSL snippet that represents the reference value. - * @param {?string} depthSnippet - A GLSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A GLSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {?string} flipYSnippet - A GLSL snippet that represents the y-flip. Only used for WebGL. - * @return {string} The GLSL snippet. - */ - generateTextureGatherCompare(texture: Texture, textureProperty: string, uvSnippet: string, compareSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, flipYSnippet: string | null): string; - /** - * Returns the uniforms of the given shader stage as a GLSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The GLSL snippet that defines the uniforms. - */ - getUniforms(shaderStage: string): string; - /** - * Returns the shader attributes of the given shader stage as a GLSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The GLSL snippet that defines the shader attributes. - */ - getAttributes(shaderStage: string): string; - /** - * Returns the members of the given struct type node as a GLSL string. - * - * @param {StructTypeNode} struct - The struct type node. - * @return {string} The GLSL snippet that defines the struct members. - */ - getStructMembers(struct: StructTypeNode): string; - /** - * Returns the structs of the given shader stage as a GLSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The GLSL snippet that defines the structs. - */ - getStructs(shaderStage: string): string; - /** - * Returns the varyings of the given shader stage as a GLSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The GLSL snippet that defines the varyings. - */ - getVaryings(shaderStage: string): string; - /** - * Returns a builtin representing the index of an invocation within its workgroup. - * - * @return {string} The invocation local index. - */ - getInvocationLocalIndex(): string; - /** - * Returns a builtin representing the size of a subgroup within the current shader. - */ - getSubgroupSize(): void; - /** - * Returns a builtin representing the index of an invocation within its subgroup. - */ - getInvocationSubgroupIndex(): void; - /** - * Returns a builtin representing the index of the current invocation's subgroup within its workgroup. - */ - getSubgroupIndex(): void; - /** - * Returns the frag depth builtin. - * - * @return {string} The frag depth builtin. - */ - getFragDepth(): string; - /** - * Enables the given extension. - * - * @param {string} name - The extension name. - * @param {string} behavior - The extension behavior. - * @param {string} [shaderStage=this.shaderStage] - The shader stage. - */ - enableExtension(name: string, behavior: string, shaderStage?: string): void; - /** - * Returns the enabled extensions of the given shader stage as a GLSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The GLSL snippet that defines the enabled extensions. - */ - getExtensions(shaderStage: string): string; - /** - * Returns the clip distances builtin. - * - * @return {string} The clip distances builtin. - */ - getClipDistance(): string; - /** - * Whether the requested feature is available or not. - * - * @param {string} name - The requested feature. - * @return {boolean} Whether the requested feature is supported or not. - */ - isAvailable(name: string): boolean; - /** - * Enables hardware clipping. - * - * @param {string} planeCount - The clipping plane count. - */ - enableHardwareClipping(planeCount: string): void; - /** - * Enables multiview. - */ - enableMultiview(): void; - /** - * Registers a transform in context of Transform Feedback. - * - * @param {string} varyingName - The varying name. - * @param {AttributeNode} attributeNode - The attribute node. - */ - registerTransform(varyingName: string, attributeNode: AttributeNode): void; - /** - * Returns the transforms of the given shader stage as a GLSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The GLSL snippet that defines the transforms. - */ - getTransforms(): string; - /** - * Returns a GLSL struct based on the given name and variables. - * - * @private - * @param {string} name - The struct name. - * @param {string} vars - The struct variables. - * @return {string} The GLSL snippet representing a struct. - */ - private _getGLSLUniformStruct; - /** - * Returns a GLSL vertex shader based on the given shader data. - * - * @private - * @param {Object} shaderData - The shader data. - * @return {string} The vertex shader. - */ - private _getGLSLVertexCode; - /** - * Returns a GLSL fragment shader based on the given shader data. - * - * @private - * @param {Object} shaderData - The shader data. - * @return {string} The vertex shader. - */ - private _getGLSLFragmentCode; - /** - * This method is one of the more important ones since it's responsible - * for generating a matching binding instance for the given uniform node. - * - * These bindings are later used in the renderer to create bind groups - * and layouts. - * - * @param {UniformNode} node - The uniform node. - * @param {string} type - The node data type. - * @param {string} shaderStage - The shader stage. - * @param {?string} [name=null] - An optional uniform name. - * @return {NodeUniform} The node uniform object. - */ - getUniformFromNode(node: UniformNode, type: string, shaderStage: string, name?: string | null): NodeUniform; -} -import { NodeBuilder } from '../../../nodes/Nodes.js'; -import NodeUniformsGroup from '../../common/nodes/NodeUniformsGroup.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLAttributeUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLAttributeUtils.d.ts deleted file mode 100644 index 80d81e2f3..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLAttributeUtils.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -export default WebGLAttributeUtils; -/** - * A WebGL 2 backend utility module for managing shader attributes. - * - * @private - */ -declare class WebGLAttributeUtils { - /** - * Constructs a new utility object. - * - * @param {WebGLBackend} backend - The WebGL 2 backend. - */ - constructor(backend: WebGLBackend); - /** - * A reference to the WebGL 2 backend. - * - * @type {WebGLBackend} - */ - backend: WebGLBackend; - /** - * Creates the GPU buffer for the given buffer attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - * @param {GLenum } bufferType - A flag that indicates the buffer type and thus binding point target. - */ - createAttribute(attribute: BufferAttribute, bufferType: GLenum): void; - /** - * Updates the GPU buffer of the given buffer attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - */ - updateAttribute(attribute: BufferAttribute): void; - /** - * Destroys the GPU buffer of the given buffer attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - */ - destroyAttribute(attribute: BufferAttribute): void; - /** - * This method performs a readback operation by moving buffer data from - * a storage buffer attribute from the GPU to the CPU. ReadbackBuffer can - * be used to retain and reuse handles to the intermediate buffers and prevent - * new allocation. - * - * @async - * @param {BufferAttribute} attribute - The storage buffer attribute to read frm. - * @param {ReadbackBuffer|ArrayBuffer} target - The storage buffer attribute. - * @param {number} offset - The storage buffer attribute. - * @param {number} count - The offset from which to start reading the - * @return {Promise} A promise that resolves with the buffer data when the data are ready. - */ - getArrayBufferAsync(attribute: BufferAttribute, target?: ReadbackBuffer | ArrayBuffer, offset?: number, count?: number): Promise; - /** - * Creates a WebGL buffer with the given data. - * - * @private - * @param {WebGL2RenderingContext} gl - The rendering context. - * @param {GLenum } bufferType - A flag that indicates the buffer type and thus binding point target. - * @param {TypedArray} array - The array of the buffer attribute. - * @param {GLenum} usage - The usage. - * @return {WebGLBuffer} The WebGL buffer. - */ - private _createBuffer; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLCapabilities.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLCapabilities.d.ts deleted file mode 100644 index 095e4ee8c..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLCapabilities.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -export default WebGLCapabilities; -/** - * A WebGL 2 backend utility module for managing the device's capabilities. - * - * @private - */ -declare class WebGLCapabilities { - /** - * Constructs a new utility object. - * - * @param {WebGLBackend} backend - The WebGL 2 backend. - */ - constructor(backend: WebGLBackend); - /** - * A reference to the WebGL 2 backend. - * - * @type {WebGLBackend} - */ - backend: WebGLBackend; - /** - * This value holds the cached max anisotropy value. - * - * @type {?number} - * @default null - */ - maxAnisotropy: number | null; - /** - * This value holds the cached max uniform block size value. - * - * @type {?number} - * @default null - */ - maxUniformBlockSize: number | null; - /** - * Returns the maximum anisotropy texture filtering value. This value - * depends on the device and is reported by the `EXT_texture_filter_anisotropic` - * WebGL extension. - * - * @return {number} The maximum anisotropy texture filtering value. - */ - getMaxAnisotropy(): number; - /** - * Returns the maximum number of bytes available for uniform buffers. - * - * @return {number} The maximum number of bytes available for uniform buffers. - */ - getUniformBufferLimit(): number; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLConstants.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLConstants.d.ts deleted file mode 100644 index d8093bad2..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLConstants.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export namespace GLFeatureName { - let WEBGL_multi_draw: string; - let WEBGL_compressed_texture_astc: string; - let WEBGL_compressed_texture_etc: string; - let WEBGL_compressed_texture_etc1: string; - let WEBGL_compressed_texture_pvrtc: string; - let WEBGL_compressed_texture_s3tc: string; - let EXT_texture_compression_bptc: string; - let EXT_disjoint_timer_query_webgl2: string; - let OVR_multiview2: string; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLExtensions.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLExtensions.d.ts deleted file mode 100644 index be5b14a6e..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLExtensions.d.ts +++ /dev/null @@ -1,56 +0,0 @@ -export default WebGLExtensions; -/** - * A WebGL 2 backend utility module for managing extensions. - * - * @private - */ -declare class WebGLExtensions { - /** - * Constructs a new utility object. - * - * @param {WebGLBackend} backend - The WebGL 2 backend. - */ - constructor(backend: WebGLBackend); - /** - * A reference to the WebGL 2 backend. - * - * @type {WebGLBackend} - */ - backend: WebGLBackend; - /** - * A reference to the rendering context. - * - * @type {WebGL2RenderingContext} - */ - gl: WebGL2RenderingContext; - /** - * A list with all the supported WebGL extensions. - * - * @type {Array} - */ - availableExtensions: Array; - /** - * A dictionary with requested WebGL extensions. - * The key is the name of the extension, the value - * the requested extension object. - * - * @type {Object} - */ - extensions: { - [x: string]: Object; - }; - /** - * Returns the extension object for the given extension name. - * - * @param {string} name - The extension name. - * @return {Object} The extension object. - */ - get(name: string): Object; - /** - * Returns `true` if the requested extension is available. - * - * @param {string} name - The extension name. - * @return {boolean} Whether the given extension is available or not. - */ - has(name: string): boolean; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLState.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLState.d.ts deleted file mode 100644 index 2aca5c6c5..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLState.d.ts +++ /dev/null @@ -1,372 +0,0 @@ -export default WebGLState; -/** - * A WebGL 2 backend utility module for managing the WebGL state. - * - * The major goal of this module is to reduce the number of state changes - * by caching the WEbGL state with a series of variables. In this way, the - * renderer only executes state change commands when necessary which - * improves the overall performance. - * - * @private - */ -declare class WebGLState { - /** - * Constructs a new utility object. - * - * @param {WebGLBackend} backend - The WebGL 2 backend. - */ - constructor(backend: WebGLBackend); - /** - * A reference to the WebGL 2 backend. - * - * @type {WebGLBackend} - */ - backend: WebGLBackend; - /** - * A reference to the rendering context. - * - * @type {WebGL2RenderingContext} - */ - gl: WebGL2RenderingContext; - enabled: {}; - parameters: {}; - currentFlipSided: any; - currentCullFace: any; - currentProgram: any; - currentBlendingEnabled: boolean; - currentBlending: any; - currentBlendSrc: any; - currentBlendDst: number | null; - currentBlendSrcAlpha: number | null; - currentBlendDstAlpha: number | null; - currentPremultipledAlpha: boolean | null; - currentPolygonOffsetFactor: any; - currentPolygonOffsetUnits: number | null; - currentColorMask: any; - currentDepthReversed: boolean; - currentDepthFunc: any; - currentDepthMask: any; - currentStencilFunc: any; - currentStencilRef: number | null; - currentStencilFuncMask: number | null; - currentStencilFail: any; - currentStencilZFail: number | null; - currentStencilZPass: number | null; - currentStencilMask: any; - currentLineWidth: any; - currentClippingPlanes: number; - currentVAO: any; - currentIndex: WebGLBuffer | null; - currentBoundFramebuffers: {}; - currentDrawbuffers: WeakMap; - maxTextures: any; - currentTextureSlot: any; - currentBoundTextures: {}; - currentBoundBufferBases: {}; - /** - * Inits the state of the utility. - * - * @private - */ - private _init; - currentScissor: Vector4 | undefined; - currentViewport: Vector4 | undefined; - _tempVec4: Vector4 | undefined; - /** - * Enables the given WebGL capability. - * - * This method caches the capability state so - * `gl.enable()` is only called when necessary. - * - * @param {GLenum} id - The capability to enable. - */ - enable(id: GLenum): void; - /** - * Disables the given WebGL capability. - * - * This method caches the capability state so - * `gl.disable()` is only called when necessary. - * - * @param {GLenum} id - The capability to enable. - */ - disable(id: GLenum): void; - /** - * Specifies whether polygons are front- or back-facing - * by setting the winding orientation. - * - * This method caches the state so `gl.frontFace()` is only - * called when necessary. - * - * @param {boolean} flipSided - Whether triangles flipped their sides or not. - */ - setFlipSided(flipSided: boolean): void; - /** - * Specifies whether or not front- and/or back-facing - * polygons can be culled. - * - * This method caches the state so `gl.cullFace()` is only - * called when necessary. - * - * @param {number} cullFace - Defines which polygons are candidates for culling. - */ - setCullFace(cullFace: number): void; - /** - * Specifies the width of line primitives. - * - * This method caches the state so `gl.lineWidth()` is only - * called when necessary. - * - * @param {number} width - The line width. - */ - setLineWidth(width: number): void; - setMRTBlending(textures: any, mrt: any, material: any): void; - /** - * Applies blending configuration for a specific draw buffer index. - * - * @private - * @param {number} index - The draw buffer index. - * @param {Object} blending - The blending configuration (material or BlendMode). - */ - private _setMRTBlendingIndex; - /** - * Defines the blending. - * - * This method caches the state so `gl.blendEquation()`, `gl.blendEquationSeparate()`, - * `gl.blendFunc()` and `gl.blendFuncSeparate()` are only called when necessary. - * - * @param {number} blending - The blending type. - * @param {number} blendEquation - The blending equation. - * @param {number} blendSrc - Only relevant for custom blending. The RGB source blending factor. - * @param {number} blendDst - Only relevant for custom blending. The RGB destination blending factor. - * @param {number} blendEquationAlpha - Only relevant for custom blending. The blending equation for alpha. - * @param {number} blendSrcAlpha - Only relevant for custom blending. The alpha source blending factor. - * @param {number} blendDstAlpha - Only relevant for custom blending. The alpha destination blending factor. - * @param {boolean} premultipliedAlpha - Whether premultiplied alpha is enabled or not. - */ - setBlending(blending: number, blendEquation: number, blendSrc: number, blendDst: number, blendEquationAlpha: number, blendSrcAlpha: number, blendDstAlpha: number, premultipliedAlpha: boolean): void; - currentBlendEquation: any; - currentBlendEquationAlpha: number | undefined; - /** - * Specifies whether colors can be written when rendering - * into a framebuffer or not. - * - * This method caches the state so `gl.colorMask()` is only - * called when necessary. - * - * @param {boolean} colorMask - The color mask. - */ - setColorMask(colorMask: boolean): void; - /** - * Specifies whether the depth test is enabled or not. - * - * @param {boolean} depthTest - Whether the depth test is enabled or not. - */ - setDepthTest(depthTest: boolean): void; - /** - * Configures the WebGL state to use a reversed depth buffer. - * - * @param {boolean} reversed - Whether the depth buffer is reversed or not. - */ - setReversedDepth(reversed: boolean): void; - /** - * Specifies whether depth values can be written when rendering - * into a framebuffer or not. - * - * This method caches the state so `gl.depthMask()` is only - * called when necessary. - * - * @param {boolean} depthMask - The depth mask. - */ - setDepthMask(depthMask: boolean): void; - /** - * Specifies the depth compare function. - * - * This method caches the state so `gl.depthFunc()` is only - * called when necessary. - * - * @param {number} depthFunc - The depth compare function. - */ - setDepthFunc(depthFunc: number): void; - /** - * Specifies the scissor box. - * - * @param {number} x - The x-coordinate of the lower left corner of the viewport. - * @param {number} y - The y-coordinate of the lower left corner of the viewport. - * @param {number} width - The width of the viewport. - * @param {number} height - The height of the viewport. - * - */ - scissor(x: number, y: number, width: number, height: number): void; - /** - * Specifies the viewport. - * - * @param {number} x - The x-coordinate of the lower left corner of the viewport. - * @param {number} y - The y-coordinate of the lower left corner of the viewport. - * @param {number} width - The width of the viewport. - * @param {number} height - The height of the viewport. - * - */ - viewport(x: number, y: number, width: number, height: number): void; - /** - * Defines the scissor test. - * - * @param {boolean} boolean - Whether the scissor test should be enabled or not. - */ - setScissorTest(boolean: boolean): void; - /** - * Specifies whether the stencil test is enabled or not. - * - * @param {boolean} stencilTest - Whether the stencil test is enabled or not. - */ - setStencilTest(stencilTest: boolean): void; - /** - * Specifies whether stencil values can be written when rendering - * into a framebuffer or not. - * - * This method caches the state so `gl.stencilMask()` is only - * called when necessary. - * - * @param {boolean} stencilMask - The stencil mask. - */ - setStencilMask(stencilMask: boolean): void; - /** - * Specifies whether the stencil test functions. - * - * This method caches the state so `gl.stencilFunc()` is only - * called when necessary. - * - * @param {number} stencilFunc - The stencil compare function. - * @param {number} stencilRef - The reference value for the stencil test. - * @param {number} stencilMask - A bit-wise mask that is used to AND the reference value and the stored stencil value when the test is done. - */ - setStencilFunc(stencilFunc: number, stencilRef: number, stencilMask: number): void; - /** - * Specifies whether the stencil test operation. - * - * This method caches the state so `gl.stencilOp()` is only - * called when necessary. - * - * @param {number} stencilFail - The function to use when the stencil test fails. - * @param {number} stencilZFail - The function to use when the stencil test passes, but the depth test fail. - * @param {number} stencilZPass - The function to use when both the stencil test and the depth test pass, - * or when the stencil test passes and there is no depth buffer or depth testing is disabled. - */ - setStencilOp(stencilFail: number, stencilZFail: number, stencilZPass: number): void; - /** - * Configures the WebGL state for the given material. - * - * @param {Material} material - The material to configure the state for. - * @param {number} frontFaceCW - Whether the front faces are counter-clockwise or not. - * @param {number} hardwareClippingPlanes - The number of hardware clipping planes. - */ - setMaterial(material: Material, frontFaceCW: number, hardwareClippingPlanes: number): void; - /** - * Specifies the polygon offset. - * - * This method caches the state so `gl.polygonOffset()` is only - * called when necessary. - * - * @param {boolean} polygonOffset - Whether polygon offset is enabled or not. - * @param {number} factor - The scale factor for the variable depth offset for each polygon. - * @param {number} units - The multiplier by which an implementation-specific value is multiplied with to create a constant depth offset. - */ - setPolygonOffset(polygonOffset: boolean, factor: number, units: number): void; - /** - * Defines the usage of the given WebGL program. - * - * This method caches the state so `gl.useProgram()` is only - * called when necessary. - * - * @param {WebGLProgram} program - The WebGL program to use. - * @return {boolean} Whether a program change has been executed or not. - */ - useProgram(program: WebGLProgram): boolean; - /** - * Sets the vertex state by binding the given VAO and element buffer. - * - * @param {WebGLVertexArrayObject} vao - The VAO. - * @param {?WebGLBuffer} indexBuffer - The index buffer. - * @return {boolean} Whether a vertex state has been changed or not. - */ - setVertexState(vao: WebGLVertexArrayObject, indexBuffer?: WebGLBuffer | null): boolean; - /** - * Resets the vertex array state by resetting the VAO and element buffer. - */ - resetVertexState(): void; - /** - * Binds the given framebuffer. - * - * This method caches the state so `gl.bindFramebuffer()` is only - * called when necessary. - * - * @param {number} target - The binding point (target). - * @param {WebGLFramebuffer} framebuffer - The WebGL framebuffer to bind. - * @return {boolean} Whether a bind has been executed or not. - */ - bindFramebuffer(target: number, framebuffer: WebGLFramebuffer): boolean; - /** - * Defines draw buffers to which fragment colors are written into. - * Configures the MRT setup of custom framebuffers. - * - * This method caches the state so `gl.drawBuffers()` is only - * called when necessary. - * - * @param {RenderContext} renderContext - The render context. - * @param {WebGLFramebuffer} framebuffer - The WebGL framebuffer. - */ - drawBuffers(renderContext: RenderContext, framebuffer: WebGLFramebuffer): void; - /** - * Makes the given texture unit active. - * - * This method caches the state so `gl.activeTexture()` is only - * called when necessary. - * - * @param {number} webglSlot - The texture unit to make active. - */ - activeTexture(webglSlot: number): void; - /** - * Binds the given WebGL texture to a target. - * - * This method caches the state so `gl.bindTexture()` is only - * called when necessary. - * - * @param {number} webglType - The binding point (target). - * @param {WebGLTexture} webglTexture - The WebGL texture to bind. - * @param {number} webglSlot - The texture. - */ - bindTexture(webglType: number, webglTexture: WebGLTexture, webglSlot: number): void; - /** - * Binds a given WebGL buffer to a given binding point (target) at a given index. - * - * This method caches the state so `gl.bindBufferBase()` is only - * called when necessary. - * - * @param {number} target - The target for the bind operation. - * @param {number} index - The index of the target. - * @param {WebGLBuffer} buffer - The WebGL buffer. - * @return {boolean} Whether a bind has been executed or not. - */ - bindBufferBase(target: number, index: number, buffer: WebGLBuffer): boolean; - /** - * Unbinds the current bound texture. - * - * This method caches the state so `gl.bindTexture()` is only - * called when necessary. - */ - unbindTexture(): void; - /** - * Returns the value for the given parameter. - * - * @param {number} name - The paramter to get the value for. - * @return {any} The value for the given parameter. - */ - getParameter(name: number): any; - /** - * Specifies a pixel storage mode. - * - * @param {number} name - The parameter to set. - * @param {any} value - A value to set the parameter to. - */ - pixelStorei(name: number, value: any): void; -} -import { Vector4 } from '../../../math/Vector4.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLTextureUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLTextureUtils.d.ts deleted file mode 100644 index 75add928e..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLTextureUtils.d.ts +++ /dev/null @@ -1,197 +0,0 @@ -export default WebGLTextureUtils; -/** - * A WebGL 2 backend utility module for managing textures. - * - * @private - */ -declare class WebGLTextureUtils { - /** - * Constructs a new utility object. - * - * @param {WebGLBackend} backend - The WebGL 2 backend. - */ - constructor(backend: WebGLBackend); - /** - * A reference to the WebGL 2 backend. - * - * @type {WebGLBackend} - */ - backend: WebGLBackend; - /** - * A reference to the rendering context. - * - * @type {WebGL2RenderingContext} - */ - gl: WebGL2RenderingContext; - /** - * A reference to a backend module holding extension-related - * utility functions. - * - * @type {WebGLExtensions} - */ - extensions: WebGLExtensions; - /** - * A dictionary for managing default textures. The key - * is the binding point (target), the value the WEbGL texture object. - * - * @type {Object} - */ - defaultTextures: any; - /** - * A scratch framebuffer used for attaching the source texture in - * {@link copyTextureToTexture}. - * - * @private - * @type {?WebGLFramebuffer} - */ - private _srcFramebuffer; - /** - * A scratch framebuffer used for attaching the destination texture in - * {@link copyTextureToTexture}. - * - * @private - * @type {?WebGLFramebuffer} - */ - private _dstFramebuffer; - /** - * Inits the state of the utility. - * - * @private - */ - private _init; - /** - * Returns the native texture type for the given texture. - * - * @param {Texture} texture - The texture. - * @return {GLenum} The native texture type. - */ - getGLTextureType(texture: Texture): GLenum; - /** - * Returns the native texture type for the given texture. - * - * @param {?string} internalFormatName - The internal format name. When `null`, the internal format is derived from the subsequent parameters. - * @param {GLenum} glFormat - The WebGL format. - * @param {GLenum} glType - The WebGL type. - * @param {string} colorSpace - The texture's color space. - * @param {boolean} [forceLinearTransfer=false] - Whether to force a linear transfer or not. - * @return {GLenum} The internal format. - */ - getInternalFormat(internalFormatName: string | null, glFormat: GLenum, glType: GLenum, normalized: any, colorSpace: string, forceLinearTransfer?: boolean): GLenum; - /** - * Sets the texture parameters for the given texture. - * - * @param {GLenum} textureType - The texture type. - * @param {Texture} texture - The texture. - */ - setTextureParameters(textureType: GLenum, texture: Texture): void; - /** - * Creates a default texture for the given texture that can be used - * as a placeholder until the actual texture is ready for usage. - * - * @param {Texture} texture - The texture to create a default texture for. - */ - createDefaultTexture(texture: Texture): void; - /** - * Defines a texture on the GPU for the given texture object. - * - * @param {Texture} texture - The texture. - * @param {Object} [options={}] - Optional configuration parameter. - * @return {undefined} - */ - createTexture(texture: Texture, options?: Object): undefined; - /** - * Uploads texture buffer data to the GPU memory. - * - * @param {WebGLBuffer} buffer - The buffer data. - * @param {Texture} texture - The texture, - */ - copyBufferToTexture(buffer: WebGLBuffer, texture: Texture): void; - /** - * Uploads the updated texture data to the GPU. - * - * @param {Texture} texture - The texture. - * @param {Object} [options={}] - Optional configuration parameter. - */ - updateTexture(texture: Texture, options?: Object): void; - /** - * Generates mipmaps for the given texture. - * - * @param {Texture} texture - The texture. - */ - generateMipmaps(texture: Texture): void; - /** - * Deallocates the render buffers of the given render target. - * - * @param {RenderTarget} renderTarget - The render target. - */ - deallocateRenderBuffers(renderTarget: RenderTarget): void; - /** - * Destroys the GPU data for the given texture object. - * - * @param {Texture} texture - The texture. - * @param {boolean} [isDefaultTexture=false] - Whether the texture uses a default GPU texture or not. - */ - destroyTexture(texture: Texture, isDefaultTexture?: boolean): void; - /** - * Copies data of the given source texture to the given destination texture. - * - * @param {Texture} srcTexture - The source texture. - * @param {Texture} dstTexture - The destination texture. - * @param {?(Box3|Box2)} [srcRegion=null] - The region of the source texture to copy. - * @param {?(Vector2|Vector3)} [dstPosition=null] - The destination position of the copy. - * @param {number} [srcLevel=0] - The source mip level to copy from. - * @param {number} [dstLevel=0] - The destination mip level to copy to. - */ - copyTextureToTexture(srcTexture: Texture, dstTexture: Texture, srcRegion?: (Box3 | Box2) | null, dstPosition?: (Vector2 | Vector3) | null, srcLevel?: number, dstLevel?: number): void; - /** - * Copies the current bound framebuffer to the given texture. - * - * @param {Texture} texture - The destination texture. - * @param {RenderContext} renderContext - The render context. - * @param {Vector4} rectangle - A four dimensional vector defining the origin and dimension of the copy. - */ - copyFramebufferToTexture(texture: Texture, renderContext: RenderContext, rectangle: Vector4): void; - /** - * SetupS storage for internal depth/stencil buffers and bind to correct framebuffer. - * - * @param {WebGLRenderbuffer} renderbuffer - The render buffer. - * @param {RenderContext} renderContext - The render context. - * @param {number} samples - The MSAA sample count. - * @param {boolean} [useMultisampledRTT=false] - Whether to use WEBGL_multisampled_render_to_texture or not. - */ - setupRenderBufferStorage(renderbuffer: WebGLRenderbuffer, renderContext: RenderContext, samples: number, useMultisampledRTT?: boolean): void; - /** - * Returns texture data as a typed array. - * - * @async - * @param {Texture} texture - The texture to copy. - * @param {number} x - The x coordinate of the copy origin. - * @param {number} y - The y coordinate of the copy origin. - * @param {number} width - The width of the copy. - * @param {number} height - The height of the copy. - * @param {number} faceIndex - The face index. - * @return {Promise} A Promise that resolves with a typed array when the copy operation has finished. - */ - copyTextureToBuffer(texture: Texture, x: number, y: number, width: number, height: number, faceIndex: number): Promise; - /** - * Returns the corresponding typed array type for the given WebGL data type. - * - * @private - * @param {GLenum} glType - The WebGL data type. - * @return {TypedArray.constructor} The typed array type. - */ - private _getTypedArrayType; - /** - * Returns the bytes-per-texel value for the given WebGL data type and texture format. - * - * @private - * @param {GLenum} glType - The WebGL data type. - * @param {GLenum} glFormat - The WebGL texture format. - * @return {number} The bytes-per-texel. - */ - private _getBytesPerTexel; - /** - * Frees the internal resources. - */ - dispose(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLTimestampQueryPool.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLTimestampQueryPool.d.ts deleted file mode 100644 index c6a325c47..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLTimestampQueryPool.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -export default WebGLTimestampQueryPool; -/** - * Manages a pool of WebGL timestamp queries for performance measurement. - * Handles creation, execution, and resolution of timer queries using WebGL extensions. - * - * @augments TimestampQueryPool - */ -declare class WebGLTimestampQueryPool extends TimestampQueryPool { - /** - * Creates a new WebGL timestamp query pool. - * - * @param {WebGLRenderingContext|WebGL2RenderingContext} gl - The WebGL context. - * @param {string} type - The type identifier for this query pool. - * @param {number} [maxQueries=2048] - Maximum number of queries this pool can hold. - */ - constructor(gl: WebGLRenderingContext | WebGL2RenderingContext, type: string, maxQueries?: number); - gl: WebGLRenderingContext | WebGL2RenderingContext; - type: string; - ext: any; - queries: any[] | undefined; - activeQuery: number | null; - queryStates: Map | undefined; - /** - * Allocates a pair of queries for a given render context. - * - * @param {string} uid - A unique identifier for the render context. - * @returns {?number} The base offset for the allocated queries, or null if allocation failed. - */ - allocateQueriesForContext(uid: string): number | null; - /** - * Begins a timestamp query for the specified render context. - * - * @param {string} uid - A unique identifier for the render context. - */ - beginQuery(uid: string): void; - /** - * Ends the active timestamp query for the specified render context. - * - * @param {string} uid - A unique identifier for the render context. - */ - endQuery(uid: string): void; - /** - * Asynchronously resolves all completed queries and returns the total duration. - * - * @async - * @returns {Promise} The total duration in milliseconds, or the last valid value if resolution fails. - */ - resolveQueriesAsync(): Promise; - /** - * Resolves a single query, checking for completion and disjoint operation. - * - * @async - * @param {WebGLQuery} query - The query object to resolve. - * @returns {Promise} The elapsed time in milliseconds. - */ - resolveQuery(query: WebGLQuery): Promise; -} -import TimestampQueryPool from '../../common/TimestampQueryPool.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLUtils.d.ts deleted file mode 100644 index 1f75ec7e8..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl-fallback/utils/WebGLUtils.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -export default WebGLUtils; -/** - * A WebGL 2 backend utility module with common helpers. - * - * @private - */ -declare class WebGLUtils { - /** - * Constructs a new utility object. - * - * @param {WebGLBackend} backend - The WebGL 2 backend. - */ - constructor(backend: WebGLBackend); - /** - * A reference to the WebGL 2 backend. - * - * @type {WebGLBackend} - */ - backend: WebGLBackend; - /** - * A reference to the rendering context. - * - * @type {WebGL2RenderingContext} - */ - gl: WebGL2RenderingContext; - /** - * A reference to a backend module holding extension-related - * utility functions. - * - * @type {WebGLExtensions} - */ - extensions: WebGLExtensions; - /** - * Converts the given three.js constant into a WebGL constant. - * The method currently supports the conversion of texture formats - * and types. - * - * @param {number} p - The three.js constant. - * @param {string} [colorSpace=NoColorSpace] - The color space. - * @return {?number} The corresponding WebGL constant. - */ - convert(p: number, colorSpace?: string): number | null; - /** - * This method can be used to synchronize the CPU with the GPU by waiting until - * ongoing GPU commands have been completed. - * - * @private - * @return {Promise} A promise that resolves when all ongoing GPU commands have been completed. - */ - private _clientWaitAsync; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLAnimation.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLAnimation.d.ts deleted file mode 100644 index 8c234dea3..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLAnimation.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -export function WebGLAnimation(): { - start: () => void; - stop: () => void; - setAnimationLoop: (callback: any) => void; - setContext: (value: any) => void; -}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLAttributes.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLAttributes.d.ts deleted file mode 100644 index 74dfcf7fd..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLAttributes.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function WebGLAttributes(gl: any): { - get: (attribute: any) => any; - remove: (attribute: any) => void; - update: (attribute: any, bufferType: any) => void; -}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBackground.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBackground.d.ts deleted file mode 100644 index a05a75907..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBackground.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export function WebGLBackground(renderer: any, environments: any, state: any, objects: any, alpha: any, premultipliedAlpha: any): { - getClearColor: () => Color; - setClearColor: (color: any, alpha?: number) => void; - getClearAlpha: () => number; - setClearAlpha: (alpha: any) => void; - render: (scene: any) => void; - addToRenderList: (renderList: any, scene: any) => void; - dispose: () => void; -}; -import { Color } from '../../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBindingStates.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBindingStates.d.ts deleted file mode 100644 index 73ea033cc..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBindingStates.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export function WebGLBindingStates(gl: any, attributes: any): { - setup: (object: any, material: any, program: any, geometry: any, index: any) => void; - reset: () => void; - resetDefaultState: () => void; - dispose: () => void; - releaseStatesOfGeometry: (geometry: any) => void; - releaseStatesOfObject: (object: any) => void; - releaseStatesOfProgram: (program: any) => void; - initAttributes: () => void; - enableAttribute: (attribute: any) => void; - disableUnusedAttributes: () => void; -}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBufferRenderer.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBufferRenderer.d.ts deleted file mode 100644 index 8182d4ea9..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLBufferRenderer.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -export function WebGLBufferRenderer(gl: any, extensions: any, info: any): void; -export class WebGLBufferRenderer { - constructor(gl: any, extensions: any, info: any); - setMode: (value: any) => void; - render: (start: any, count: any) => void; - renderInstances: (start: any, count: any, primcount: any) => void; - renderMultiDraw: (starts: any, counts: any, drawCount: any) => void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLCapabilities.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLCapabilities.d.ts deleted file mode 100644 index 1367f224b..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLCapabilities.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export function WebGLCapabilities(gl: any, extensions: any, parameters: any, utils: any): { - isWebGL2: boolean; - getMaxAnisotropy: () => any; - getMaxPrecision: (precision: any) => "highp" | "mediump" | "lowp"; - textureFormatReadable: (textureFormat: any) => boolean; - textureTypeReadable: (textureType: any) => boolean; - precision: any; - logarithmicDepthBuffer: boolean; - reversedDepthBuffer: any; - maxTextures: any; - maxVertexTextures: any; - maxTextureSize: any; - maxCubemapSize: any; - maxAttributes: any; - maxVertexUniforms: any; - maxVaryings: any; - maxFragmentUniforms: any; - maxSamples: any; - samples: any; -}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLEnvironments.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLEnvironments.d.ts deleted file mode 100644 index 5cda7553c..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLEnvironments.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function WebGLEnvironments(renderer: any): { - get: (texture: any, usePMREM?: boolean) => any; - dispose: () => void; -}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLExtensions.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLExtensions.d.ts deleted file mode 100644 index 485025fbb..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLExtensions.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function WebGLExtensions(gl: any): { - has: (name: any) => boolean; - init: () => void; - get: (name: any) => any; -}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLGeometries.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLGeometries.d.ts deleted file mode 100644 index 6dc941500..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLGeometries.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function WebGLGeometries(gl: any, attributes: any, info: any, bindingStates: any): { - get: (object: any, geometry: any) => any; - update: (geometry: any) => void; - getWireframeAttribute: (geometry: any) => any; -}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts deleted file mode 100644 index 344fcb256..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLIndexedBufferRenderer.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export function WebGLIndexedBufferRenderer(gl: any, extensions: any, info: any): void; -export class WebGLIndexedBufferRenderer { - constructor(gl: any, extensions: any, info: any); - setMode: (value: any) => void; - setIndex: (value: any) => void; - render: (start: any, count: any) => void; - renderInstances: (start: any, count: any, primcount: any) => void; - renderMultiDraw: (starts: any, counts: any, drawCount: any) => void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLInfo.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLInfo.d.ts deleted file mode 100644 index dd5ad7dac..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLInfo.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export function WebGLInfo(gl: any): { - memory: { - geometries: number; - textures: number; - }; - render: { - frame: number; - calls: number; - triangles: number; - points: number; - lines: number; - }; - programs: null; - autoReset: boolean; - reset: () => void; - update: (count: any, mode: any, instanceCount: any) => void; -}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLLights.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLLights.d.ts deleted file mode 100644 index 3c823d28b..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLLights.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -export function WebGLLights(extensions: any): { - setup: (lights: any) => void; - setupView: (lights: any, camera: any) => void; - state: { - version: number; - hash: { - directionalLength: number; - pointLength: number; - spotLength: number; - rectAreaLength: number; - hemiLength: number; - numDirectionalShadows: number; - numPointShadows: number; - numSpotShadows: number; - numSpotMaps: number; - numLightProbes: number; - }; - ambient: number[]; - probe: never[]; - directional: never[]; - directionalShadow: never[]; - directionalShadowMap: never[]; - directionalShadowMatrix: never[]; - spot: never[]; - spotLightMap: never[]; - spotShadow: never[]; - spotShadowMap: never[]; - spotLightMatrix: never[]; - rectArea: never[]; - rectAreaLTC1: null; - rectAreaLTC2: null; - point: never[]; - pointShadow: never[]; - pointShadowMap: never[]; - pointShadowMatrix: never[]; - hemi: never[]; - numSpotLightShadowsWithMaps: number; - numLightProbes: number; - }; -}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLMaterials.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLMaterials.d.ts deleted file mode 100644 index 2db593304..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLMaterials.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function WebGLMaterials(renderer: any, properties: any): { - refreshFogUniforms: (uniforms: any, fog: any) => void; - refreshMaterialUniforms: (uniforms: any, material: any, pixelRatio: any, height: any, transmissionRenderTarget: any) => void; -}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLMorphtargets.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLMorphtargets.d.ts deleted file mode 100644 index 1882f060b..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLMorphtargets.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function WebGLMorphtargets(gl: any, capabilities: any, textures: any): { - update: (object: any, geometry: any, program: any) => void; -}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLObjects.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLObjects.d.ts deleted file mode 100644 index 50c005398..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLObjects.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function WebGLObjects(gl: any, geometries: any, attributes: any, bindingStates: any, info: any): { - update: (object: any) => any; - dispose: () => void; -}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLOutput.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLOutput.d.ts deleted file mode 100644 index 2977b038f..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLOutput.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export function WebGLOutput(type: any, width: any, height: any, antialias: any, depth: any, stencil: any): void; -export class WebGLOutput { - constructor(type: any, width: any, height: any, antialias: any, depth: any, stencil: any); - setSize: (width: any, height: any) => void; - setEffects: (effects: any) => void; - begin: (renderer: any, renderTarget: any) => boolean; - hasRenderPass: () => boolean; - end: (renderer: any, deltaTime: any) => void; - isCompositing: () => boolean; - dispose: () => void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLPrograms.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLPrograms.d.ts deleted file mode 100644 index f66a01e0f..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLPrograms.d.ts +++ /dev/null @@ -1,141 +0,0 @@ -export function WebGLPrograms(renderer: any, environments: any, extensions: any, capabilities: any, bindingStates: any, clipping: any): { - getParameters: (material: any, lights: any, shadows: any, scene: any, object: any, lightProbeGrids: any) => { - shaderID: any; - shaderType: any; - shaderName: any; - vertexShader: any; - fragmentShader: any; - defines: any; - customVertexShaderID: any; - customFragmentShaderID: any; - isRawShaderMaterial: boolean; - glslVersion: any; - precision: any; - batching: boolean; - batchingColor: boolean; - instancing: boolean; - instancingColor: boolean; - instancingMorph: boolean; - outputColorSpace: any; - alphaToCoverage: boolean; - map: boolean; - matcap: boolean; - envMap: boolean; - envMapMode: any; - envMapCubeUVHeight: any; - aoMap: boolean; - lightMap: boolean; - bumpMap: boolean; - normalMap: boolean; - displacementMap: boolean; - emissiveMap: boolean; - normalMapObjectSpace: boolean; - normalMapTangentSpace: boolean; - packedNormalMap: boolean; - metalnessMap: boolean; - roughnessMap: boolean; - anisotropy: boolean; - anisotropyMap: boolean; - clearcoat: boolean; - clearcoatMap: boolean; - clearcoatNormalMap: boolean; - clearcoatRoughnessMap: boolean; - dispersion: boolean; - iridescence: boolean; - iridescenceMap: boolean; - iridescenceThicknessMap: boolean; - sheen: boolean; - sheenColorMap: boolean; - sheenRoughnessMap: boolean; - specularMap: boolean; - specularColorMap: boolean; - specularIntensityMap: boolean; - transmission: boolean; - transmissionMap: boolean; - thicknessMap: boolean; - gradientMap: boolean; - opaque: boolean; - alphaMap: boolean; - alphaTest: boolean; - alphaHash: boolean; - combine: any; - mapUv: string | false; - aoMapUv: string | false; - lightMapUv: string | false; - bumpMapUv: string | false; - normalMapUv: string | false; - displacementMapUv: string | false; - emissiveMapUv: string | false; - metalnessMapUv: string | false; - roughnessMapUv: string | false; - anisotropyMapUv: string | false; - clearcoatMapUv: string | false; - clearcoatNormalMapUv: string | false; - clearcoatRoughnessMapUv: string | false; - iridescenceMapUv: string | false; - iridescenceThicknessMapUv: string | false; - sheenColorMapUv: string | false; - sheenRoughnessMapUv: string | false; - specularMapUv: string | false; - specularColorMapUv: string | false; - specularIntensityMapUv: string | false; - transmissionMapUv: string | false; - thicknessMapUv: string | false; - alphaMapUv: string | false; - vertexTangents: boolean; - vertexNormals: boolean; - vertexColors: any; - vertexAlphas: boolean; - pointsUvs: boolean; - fog: boolean; - useFog: boolean; - fogExp2: any; - flatShading: any; - sizeAttenuation: boolean; - logarithmicDepthBuffer: any; - reversedDepthBuffer: any; - skinning: boolean; - morphTargets: boolean; - morphNormals: boolean; - morphColors: boolean; - morphTargetsCount: any; - morphTextureStride: number; - numDirLights: any; - numPointLights: any; - numSpotLights: any; - numSpotLightMaps: any; - numRectAreaLights: any; - numHemiLights: any; - numDirLightShadows: any; - numPointLightShadows: any; - numSpotLightShadows: any; - numSpotLightShadowsWithMaps: any; - numLightProbes: any; - numLightProbeGrids: any; - numClippingPlanes: any; - numClipIntersection: any; - dithering: any; - shadowMapEnabled: any; - shadowMapType: any; - toneMapping: number; - decodeVideoTexture: boolean; - decodeVideoTextureEmissive: boolean; - premultipliedAlpha: any; - doubleSided: boolean; - flipSided: boolean; - useDepthPacking: boolean; - depthPacking: any; - index0AttributeName: any; - extensionClipCullDistance: any; - extensionMultiDraw: any; - rendererExtensionParallelShaderCompile: any; - customProgramCacheKey: any; - }; - getProgramCacheKey: (parameters: any) => string; - getUniforms: (material: any) => any; - acquireProgram: (parameters: any, cacheKey: any) => any; - releaseProgram: (program: any) => void; - releaseShaderCache: (material: any) => void; - programs: any[]; - dispose: () => void; -}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLProperties.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLProperties.d.ts deleted file mode 100644 index 85512905d..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLProperties.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export function WebGLProperties(): { - has: (object: any) => boolean; - get: (object: any) => any; - remove: (object: any) => void; - update: (object: any, key: any, value: any) => void; - dispose: () => void; -}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLRenderLists.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLRenderLists.d.ts deleted file mode 100644 index b6e0f377c..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLRenderLists.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -export function WebGLRenderLists(): { - get: (scene: any, renderCallDepth: any) => any; - dispose: () => void; -}; -export function WebGLRenderList(): { - opaque: any[]; - transmissive: any[]; - transparent: any[]; - init: () => void; - push: (object: any, geometry: any, material: any, groupOrder: any, z: any, group: any) => void; - unshift: (object: any, geometry: any, material: any, groupOrder: any, z: any, group: any) => void; - finish: () => void; - sort: (customOpaqueSort: any, customTransparentSort: any) => void; -}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLRenderStates.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLRenderStates.d.ts deleted file mode 100644 index f6d5a471a..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLRenderStates.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export function WebGLRenderStates(extensions: any): { - get: (scene: any, renderCallDepth?: number) => any; - dispose: () => void; -}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLShader.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLShader.d.ts deleted file mode 100644 index c4b1be0cc..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLShader.d.ts +++ /dev/null @@ -1 +0,0 @@ -export function WebGLShader(gl: any, type: any, string: any): any; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLShaderCache.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLShaderCache.d.ts deleted file mode 100644 index b3c358d02..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLShaderCache.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export class WebGLShaderCache { - shaderCache: Map; - materialCache: Map; - update(material: any): this; - remove(material: any): this; - getVertexShaderID(material: any): any; - getFragmentShaderID(material: any): any; - dispose(): void; - _getShaderCacheForMaterial(material: any): any; - _getShaderStage(code: any): any; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLState.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLState.d.ts deleted file mode 100644 index 2915facbf..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLState.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -export function WebGLState(gl: any, extensions: any): { - buffers: { - color: any; - depth: any; - stencil: any; - }; - enable: (id: any) => void; - disable: (id: any) => void; - bindFramebuffer: (target: any, framebuffer: any) => boolean; - drawBuffers: (renderTarget: any, framebuffer: any) => void; - useProgram: (program: any) => boolean; - setBlending: (blending: any, blendEquation: any, blendSrc: any, blendDst: any, blendEquationAlpha: any, blendSrcAlpha: any, blendDstAlpha: any, blendColor: any, blendAlpha: any, premultipliedAlpha: any) => void; - setMaterial: (material: any, frontFaceCW: any) => void; - setFlipSided: (flipSided: any) => void; - setCullFace: (cullFace: any) => void; - setLineWidth: (width: any) => void; - setPolygonOffset: (polygonOffset: any, factor: any, units: any) => void; - setScissorTest: (scissorTest: any) => void; - activeTexture: (webglSlot: any) => void; - bindTexture: (webglType: any, webglTexture: any, webglSlot: any) => void; - unbindTexture: () => void; - compressedTexImage2D: (...args: any[]) => void; - compressedTexImage3D: (...args: any[]) => void; - texImage2D: (...args: any[]) => void; - texImage3D: (...args: any[]) => void; - pixelStorei: (name: any, value: any) => void; - getParameter: (name: any) => any; - updateUBOMapping: (uniformsGroup: any, program: any) => void; - uniformBlockBinding: (uniformsGroup: any, program: any) => void; - texStorage2D: (...args: any[]) => void; - texStorage3D: (...args: any[]) => void; - texSubImage2D: (...args: any[]) => void; - texSubImage3D: (...args: any[]) => void; - compressedTexSubImage2D: (...args: any[]) => void; - compressedTexSubImage3D: (...args: any[]) => void; - scissor: (scissor: any) => void; - viewport: (viewport: any) => void; - reset: () => void; -}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLTextures.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLTextures.d.ts deleted file mode 100644 index 8d958b7ae..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLTextures.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -export function WebGLTextures(_gl: any, extensions: any, state: any, properties: any, capabilities: any, utils: any, info: any): void; -export class WebGLTextures { - constructor(_gl: any, extensions: any, state: any, properties: any, capabilities: any, utils: any, info: any); - allocateTextureUnit: () => number; - resetTextureUnits: () => void; - getTextureUnits: () => number; - setTextureUnits: (value: any) => void; - setTexture2D: (texture: any, slot: any) => void; - setTexture2DArray: (texture: any, slot: any) => void; - setTexture3D: (texture: any, slot: any) => void; - setTextureCube: (texture: any, slot: any) => void; - rebindTextures: (renderTarget: any, colorTexture: any, depthTexture: any) => void; - setupRenderTarget: (renderTarget: any) => void; - updateRenderTargetMipmap: (renderTarget: any) => void; - updateMultisampleRenderTarget: (renderTarget: any) => void; - setupDepthRenderbuffer: (renderTarget: any) => void; - setupFrameBufferTexture: (framebuffer: any, renderTarget: any, texture: any, attachment: any, textureTarget: any, level: any) => void; - useMultisampledRTT: (renderTarget: any) => boolean; - isReversedDepthBuffer: () => any; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUniforms.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUniforms.d.ts deleted file mode 100644 index 8535725df..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUniforms.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export class WebGLUniforms { - static upload(gl: any, seq: any, values: any, textures: any): void; - static seqWithValue(seq: any, values: any): any[]; - constructor(gl: any, program: any); - seq: any[]; - map: {}; - setValue(gl: any, name: any, value: any, textures: any): void; - setOptional(gl: any, object: any, name: any): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUniformsGroups.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUniformsGroups.d.ts deleted file mode 100644 index 3eb1deb18..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUniformsGroups.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -export function WebGLUniformsGroups(gl: any, info: any, capabilities: any, state: any): { - bind: (uniformsGroup: any, program: any) => void; - update: (uniformsGroup: any, program: any) => void; - dispose: () => void; -}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUtils.d.ts deleted file mode 100644 index 4c3bac4b4..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgl/WebGLUtils.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function WebGLUtils(gl: any, extensions: any): { - convert: (p: any, colorSpace?: string) => any; -}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPUBackend.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPUBackend.d.ts deleted file mode 100644 index 76ecdbec3..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPUBackend.d.ts +++ /dev/null @@ -1,580 +0,0 @@ -export default WebGPUBackend; -/** - * A backend implementation targeting WebGPU. - * - * @private - * @augments Backend - */ -declare class WebGPUBackend extends Backend { - /** - * WebGPUBackend options. - * - * @typedef {Object} WebGPUBackend~Options - * @property {boolean} [logarithmicDepthBuffer=false] - Whether logarithmic depth buffer is enabled or not. - * @property {boolean} [reversedDepthBuffer=false] - Whether reversed depth buffer is enabled or not. - * @property {boolean} [alpha=true] - Whether the default framebuffer (which represents the final contents of the canvas) should be transparent or opaque. - * @property {boolean} [depth=true] - Whether the default framebuffer should have a depth buffer or not. - * @property {boolean} [stencil=false] - Whether the default framebuffer should have a stencil buffer or not. - * @property {boolean} [antialias=false] - Whether MSAA as the default anti-aliasing should be enabled or not. - * @property {number} [samples=0] - When `antialias` is `true`, `4` samples are used by default. Set this parameter to any other integer value than 0 to overwrite the default. - * @property {boolean} [forceWebGL=false] - If set to `true`, the renderer uses a WebGL 2 backend no matter if WebGPU is supported or not. - * @property {boolean} [trackTimestamp=false] - Whether to track timestamps with a Timestamp Query API or not. - * @property {string} [powerPreference=undefined] - The power preference. - * @property {Object} [requiredLimits=undefined] - Specifies the limits that are required by the device request. The request will fail if the adapter cannot provide these limits. - * @property {GPUDevice} [device=undefined] - If there is an existing GPU device on app level, it can be passed to the renderer as a parameter. - * @property {number} [outputType=undefined] - Texture type for output to canvas. By default, device's preferred format is used; other formats may incur overhead. - */ - /** - * Constructs a new WebGPU backend. - * - * @param {WebGPUBackend~Options} [parameters] - The configuration parameter. - */ - constructor(parameters?: {}); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWebGPUBackend: boolean; - /** - * Indicates whether the backend is in WebGPU compatibility mode or not. - * The backend must be initialized before the property can be evaluated. - * - * @type {?boolean} - * @readonly - * @default null - */ - readonly compatibilityMode: boolean | null; - /** - * A reference to the device. - * - * @type {?GPUDevice} - * @default null - */ - device: GPUDevice | null; - /** - * A reference to the default render pass descriptor. - * - * @type {?Object} - * @default null - */ - defaultRenderPassdescriptor: Object | null; - /** - * A reference to a backend module holding common utility functions. - * - * @type {WebGPUUtils} - */ - utils: WebGPUUtils; - /** - * A reference to a backend module holding shader attribute-related - * utility functions. - * - * @type {WebGPUAttributeUtils} - */ - attributeUtils: WebGPUAttributeUtils; - /** - * A reference to a backend module holding shader binding-related - * utility functions. - * - * @type {WebGPUBindingUtils} - */ - bindingUtils: WebGPUBindingUtils; - /** - * A reference to a backend module holding device capability related - * utility functions. - * - * @type {WebGPUCapabilities} - */ - capabilities: WebGPUCapabilities; - /** - * A reference to a backend module holding shader pipeline-related - * utility functions. - * - * @type {WebGPUPipelineUtils} - */ - pipelineUtils: WebGPUPipelineUtils; - /** - * A reference to a backend module holding shader texture-related - * utility functions. - * - * @type {WebGPUTextureUtils} - */ - textureUtils: WebGPUTextureUtils; - /** - * A map that manages the resolve buffers for occlusion queries. - * - * @type {Map} - */ - occludedResolveCache: Map; - /** - * A map of compatibility checks. - * - * @type {Object} - */ - _compatibility: Object; - /** - * Registers external GPU textures from `XRGPUBinding` for use in rendering. - * - * @param {RenderTarget} renderTarget - The render target to register the textures for. - * @param {GPUTexture} colorTexture - The shared XR color GPUTexture. - * @param {?Array} [viewDescriptors=null] - Optional view descriptors, one per XR view. - */ - setXRRenderTargetTextures(renderTarget: RenderTarget, colorTexture: GPUTexture, viewDescriptors?: Array | null): void; - /** - * A reference to the context. - * - * @type {?GPUCanvasContext} - * @default null - */ - get context(): GPUCanvasContext | null; - /** - * This method performs a readback operation by moving buffer data from - * a storage buffer attribute from the GPU to the CPU. ReadbackBuffer can - * be used to retain and reuse handles to the intermediate buffers and prevent - * new allocation. - * - * @async - * @param {BufferAttribute} attribute - The storage buffer attribute to read frm. - * @param {number} count - The offset from which to start reading the - * @param {number} offset - The storage buffer attribute. - * @param {ReadbackBuffer|ArrayBuffer} target - The storage buffer attribute. - * @return {Promise} A promise that resolves with the buffer data when the data are ready. - */ - getArrayBufferAsync(attribute: BufferAttribute, target?: ReadbackBuffer | ArrayBuffer, offset?: number, count?: number): Promise; - /** - * Returns the backend's rendering context. - * - * @return {GPUCanvasContext} The rendering context. - */ - getContext(): GPUCanvasContext; - /** - * Returns the default render pass descriptor. - * - * In WebGPU, the default framebuffer must be configured - * like custom framebuffers so the backend needs a render - * pass descriptor even when rendering directly to screen. - * - * @private - * @return {Object} The render pass descriptor. - */ - private _getDefaultRenderPassDescriptor; - /** - * Returns whether the render target is a render target array with depth 2D array texture. - * - * @param {RenderContext} renderContext - The render context. - * @return {boolean} Whether the render target is a render target array with depth 2D array texture. - * - * @private - */ - private _isRenderCameraDepthArray; - /** - * Returns whether the current render context references external textures. - * - * External textures can change every frame, so their descriptors must not be cached. - * - * @private - * @param {RenderContext} renderContext - The render context. - * @return {boolean} Whether the render context uses external textures. - */ - private _hasExternalTexture; - /** - * Creates attachment views for an external texture render target. - * - * @private - * @param {RenderContext} renderContext - The render context. - * @param {Object} textureData - The backend data for the texture. - * @return {Array} The attachment view descriptors. - */ - private _createExternalTextureViews; - /** - * Returns the render pass descriptor for the given render context. - * - * @private - * @param {RenderContext} renderContext - The render context. - * @param {Object} colorAttachmentsConfig - Configuration object for the color attachments. - * @return {Object} The render pass descriptor. - */ - private _getRenderPassDescriptor; - /** - * This method is executed at the beginning of a render call and prepares - * the WebGPU state for upcoming render calls - * - * @param {RenderContext} renderContext - The render context. - */ - beginRender(renderContext: RenderContext): void; - /** - * Creates render pass descriptors for each camera in an array camera. - * - * @param {RenderContext} renderContext - The render context. - * @param {Object} renderContextData - The render context data. - * @param {Object} descriptor - The render pass descriptor. - * @param {ArrayCamera} cameras - The array camera. - * - * @private - */ - private _createArrayCameraLayerDescriptors; - /** - * Updates render pass descriptors for each camera in an array camera. - * - * @param {RenderContext} renderContext - The render context. - * @param {Object} renderContextData - The render context data. - * @param {ArrayCamera} cameras - The array camera. - * - */ - _updateArrayCameraLayerDescriptors(renderContext: RenderContext, renderContextData: Object, cameras: ArrayCamera): void; - /** - * This method is executed at the end of a render call and finalizes work - * after draw calls. - * - * @param {RenderContext} renderContext - The render context. - */ - finishRender(renderContext: RenderContext): void; - /** - * Returns `true` if the given 3D object is fully occluded by other - * 3D objects in the scene. - * - * @param {RenderContext} renderContext - The render context. - * @param {Object3D} object - The 3D object to test. - * @return {boolean} Whether the 3D object is fully occluded or not. - */ - isOccluded(renderContext: RenderContext, object: Object3D): boolean; - /** - * This method processes the result of occlusion queries and writes it - * into render context data. - * - * @async - * @param {RenderContext} renderContext - The render context. - * @return {Promise} A Promise that resolves when the occlusion query results have been processed. - */ - resolveOccludedAsync(renderContext: RenderContext): Promise; - /** - * Updates the viewport with the values from the given render context. - * - * @param {RenderContext} renderContext - The render context. - */ - updateViewport(renderContext: RenderContext): void; - /** - * Updates the scissor with the values from the given render context. - * - * @param {RenderContext} renderContext - The render context. - */ - updateScissor(renderContext: RenderContext): void; - /** - * Returns the clear color and alpha into a single - * color object. - * - * @return {Color4} The clear color. - */ - getClearColor(): Color4; - /** - * Performs a clear operation. - * - * @param {boolean} color - Whether the color buffer should be cleared or not. - * @param {boolean} depth - Whether the depth buffer should be cleared or not. - * @param {boolean} stencil - Whether the stencil buffer should be cleared or not. - * @param {?RenderContext} [renderTargetContext=null] - The render context of the current set render target. - */ - clear(color: boolean, depth: boolean, stencil: boolean, renderTargetContext?: RenderContext | null): void; - /** - * This method is executed at the beginning of a compute call and - * prepares the state for upcoming compute tasks. - * - * @param {Node|Array} computeGroup - The compute node(s). - */ - beginCompute(computeGroup: Node | Array): void; - /** - * Executes a compute command for the given compute node. - * - * @param {Node|Array} computeGroup - The group of compute nodes of a compute call. Can be a single compute node. - * @param {Node} computeNode - The compute node. - * @param {Array} bindings - The bindings. - * @param {ComputePipeline} pipeline - The compute pipeline. - * @param {number|Array|IndirectStorageBufferAttribute} [dispatchSize=null] - * - A single number representing count, or - * - An array [x, y, z] representing dispatch size, or - * - A IndirectStorageBufferAttribute for indirect dispatch size. - */ - compute(computeGroup: Node | Array, computeNode: Node, bindings: Array, pipeline: ComputePipeline, dispatchSize?: number | Array | IndirectStorageBufferAttribute): void; - /** - * This method is executed at the end of a compute call and - * finalizes work after compute tasks. - * - * @param {Node|Array} computeGroup - The compute node(s). - */ - finishCompute(computeGroup: Node | Array): void; - /** - * Internal draw function that performs the draw with the given pass encoder. - * - * @private - * @param {RenderObject} renderObject - The render object. - * @param {Info} info - Holds a series of statistical information about the GPU memory and the rendering process. - * @param {Object} renderContextData - The render context data object, holding current pass state and occlusion query tracking. - * @param {GPURenderPipeline} pipelineGPU - The GPU render pipeline. - * @param {Array} bindings - The bind groups. - * @param {Array} vertexBuffers - The vertex buffers. - * @param {{vertexCount: number, firstVertex: number, instanceCount: number, firstInstance: number}} drawParams - The draw parameters. - * @param {GPURenderPassEncoder|GPURenderBundleEncoder} passEncoderGPU - The GPU pass encoder used for recording draw commands. - * @param {Object} currentSets - Tracking object for currently set pipeline, attributes, bind groups, and index state. - */ - private _draw; - /** - * Executes a draw command for the given render object. - * - * @param {RenderObject} renderObject - The render object to draw. - * @param {Info} info - Holds a series of statistical information about the GPU memory and the rendering process. - */ - draw(renderObject: RenderObject, info: Info): void; - /** - * Returns `true` if the render pipeline requires an update. - * - * @param {RenderObject} renderObject - The render object. - * @return {boolean} Whether the render pipeline requires an update or not. - */ - needsRenderUpdate(renderObject: RenderObject): boolean; - /** - * Returns a cache key that is used to identify render pipelines. - * - * @param {RenderObject} renderObject - The render object. - * @return {string} The cache key. - */ - getRenderCacheKey(renderObject: RenderObject): string; - /** - * Updates a GPU sampler for the given texture. - * - * @param {Texture} texture - The texture to update the sampler for. - * @param {TextureNode} textureNode - The texture node to update the sampler with. - * @return {string} The current sampler key. - */ - updateSampler(texture: Texture, textureNode: TextureNode): string; - /** - * Creates a default texture for the given texture that can be used - * as a placeholder until the actual texture is ready for usage. - * - * @param {Texture} texture - The texture to create a default texture for. - * @return {boolean} Whether the sampler has been updated or not. - */ - createDefaultTexture(texture: Texture): boolean; - /** - * Defines a texture on the GPU for the given texture object. - * - * @param {Texture} texture - The texture. - * @param {Object} [options={}] - Optional configuration parameter. - */ - createTexture(texture: Texture, options?: Object): void; - /** - * Uploads the updated texture data to the GPU. - * - * @param {Texture} texture - The texture. - * @param {Object} [options={}] - Optional configuration parameter. - */ - updateTexture(texture: Texture, options?: Object): void; - /** - * Generates mipmaps for the given texture. - * - * @param {Texture} texture - The texture. - */ - generateMipmaps(texture: Texture): void; - /** - * Destroys the GPU data for the given texture object. - * - * @param {Texture} texture - The texture. - * @param {boolean} [isDefaultTexture=false] - Whether the texture uses a default GPU texture or not. - */ - destroyTexture(texture: Texture, isDefaultTexture?: boolean): void; - /** - * Returns texture data as a typed array. - * - * @async - * @param {Texture} texture - The texture to copy. - * @param {number} x - The x coordinate of the copy origin. - * @param {number} y - The y coordinate of the copy origin. - * @param {number} width - The width of the copy. - * @param {number} height - The height of the copy. - * @param {number} faceIndex - The face index. - * @return {Promise} A Promise that resolves with a typed array when the copy operation has finished. - */ - copyTextureToBuffer(texture: Texture, x: number, y: number, width: number, height: number, faceIndex: number): Promise; - /** - * Inits a time stamp query for the given render context. - * - * @param {string} type - The type of the timestamp query (e.g. 'render', 'compute'). - * @param {number} uid - Unique id for the context (e.g. render context id). - * @param {Object} descriptor - The query descriptor. - */ - initTimestampQuery(type: string, uid: number, descriptor: Object): void; - /** - * Returns a node builder for the given render object. - * - * @param {RenderObject} object - The render object. - * @param {Renderer} renderer - The renderer. - * @return {WGSLNodeBuilder} The node builder. - */ - createNodeBuilder(object: RenderObject, renderer: Renderer): WGSLNodeBuilder; - /** - * Creates a shader program from the given programmable stage. - * - * @param {ProgrammableStage} program - The programmable stage. - */ - createProgram(program: ProgrammableStage): void; - /** - * Destroys the shader program of the given programmable stage. - * - * @param {ProgrammableStage} program - The programmable stage. - */ - destroyProgram(program: ProgrammableStage): void; - /** - * Creates a render pipeline for the given render object. - * - * @param {RenderObject} renderObject - The render object. - * @param {Array} promises - An array of compilation promises which are used in `compileAsync()`. - */ - createRenderPipeline(renderObject: RenderObject, promises: Array>): void; - /** - * Creates a compute pipeline for the given compute node. - * - * @param {ComputePipeline} computePipeline - The compute pipeline. - * @param {Array} bindings - The bindings. - */ - createComputePipeline(computePipeline: ComputePipeline, bindings: Array): void; - /** - * Prepares the state for encoding render bundles. - * - * @param {RenderContext} renderContext - The render context. - */ - beginBundle(renderContext: RenderContext): void; - /** - * After processing render bundles this method finalizes related work. - * - * @param {RenderContext} renderContext - The render context. - * @param {RenderBundle} bundle - The render bundle. - */ - finishBundle(renderContext: RenderContext, bundle: RenderBundle): void; - /** - * Adds a render bundle to the render context data. - * - * @param {RenderContext} renderContext - The render context. - * @param {RenderBundle} bundle - The render bundle to add. - */ - addBundle(renderContext: RenderContext, bundle: RenderBundle): void; - /** - * Creates a uniform buffer. - * - * @param {Buffer} uniformBuffer - The uniform buffer. - */ - createUniformBuffer(uniformBuffer: Buffer): void; - /** - * Destroys the GPU data for the given uniform buffer. - * - * @param {Buffer} uniformBuffer - The uniform buffer. - */ - destroyUniformBuffer(uniformBuffer: Buffer): void; - /** - * Creates bindings from the given bind group definition. - * - * @param {BindGroup} bindGroup - The bind group. - * @param {Array} bindings - Array of bind groups. - * @param {number} cacheIndex - The cache index. - * @param {number} version - The version. - */ - createBindings(bindGroup: BindGroup, bindings: Array, cacheIndex: number, version: number): void; - /** - * Updates the given bind group definition. - * - * @param {BindGroup} bindGroup - The bind group. - * @param {Array} bindings - Array of bind groups. - * @param {number} cacheIndex - The cache index. - * @param {number} version - The version. - */ - updateBindings(bindGroup: BindGroup, bindings: Array, cacheIndex: number, version: number): void; - /** - * Updates a buffer binding. - * - * @param {Buffer} binding - The buffer binding to update. - */ - updateBinding(binding: Buffer): void; - /** - * Delete data associated with the current bind group. - * - * @param {BindGroup} bindGroup - The bind group. - */ - deleteBindGroupData(bindGroup: BindGroup): void; - /** - * Creates the buffer of an indexed shader attribute. - * - * @param {BufferAttribute} attribute - The indexed buffer attribute. - */ - createIndexAttribute(attribute: BufferAttribute): void; - /** - * Creates the GPU buffer of a shader attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - */ - createAttribute(attribute: BufferAttribute): void; - /** - * Creates the GPU buffer of a storage attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - */ - createStorageAttribute(attribute: BufferAttribute): void; - /** - * Creates the GPU buffer of an indirect storage attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - */ - createIndirectStorageAttribute(attribute: BufferAttribute): void; - /** - * Updates the GPU buffer of a shader attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute to update. - */ - updateAttribute(attribute: BufferAttribute): void; - /** - * Destroys the GPU buffer of a shader attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute to destroy. - */ - destroyAttribute(attribute: BufferAttribute): void; - /** - * Checks if the given feature is supported by the backend. - * - * @param {string} name - The feature's name. - * @return {boolean} Whether the feature is supported or not. - */ - hasFeature(name: string): boolean; - /** - * Copies data of the given source texture to the given destination texture. - * - * @param {Texture} srcTexture - The source texture. - * @param {Texture} dstTexture - The destination texture. - * @param {?(Box3|Box2)} [srcRegion=null] - The region of the source texture to copy. - * @param {?(Vector2|Vector3)} [dstPosition=null] - The destination position of the copy. - * @param {number} [srcLevel=0] - The mipmap level to copy. - * @param {number} [dstLevel=0] - The destination mip level to copy to. - */ - copyTextureToTexture(srcTexture: Texture, dstTexture: Texture, srcRegion?: (Box3 | Box2) | null, dstPosition?: (Vector2 | Vector3) | null, srcLevel?: number, dstLevel?: number): void; - /** - * Copies the current bound framebuffer to the given texture. - * - * @param {Texture} texture - The destination texture. - * @param {RenderContext} renderContext - The render context. - * @param {Vector4} rectangle - A four dimensional vector defining the origin and dimension of the copy. - */ - copyFramebufferToTexture(texture: Texture, renderContext: RenderContext, rectangle: Vector4): void; - /** - * Checks if the given compatibility is supported by the backend. - * - * @param {string} name - The compatibility name. - * @return {boolean} Whether the compatibility is supported or not. - */ - hasCompatibility(name: string): boolean; -} -import Backend from '../common/Backend.js'; -import WebGPUUtils from './utils/WebGPUUtils.js'; -import WebGPUAttributeUtils from './utils/WebGPUAttributeUtils.js'; -import WebGPUBindingUtils from './utils/WebGPUBindingUtils.js'; -import WebGPUCapabilities from './utils/WebGPUCapabilities.js'; -import WebGPUPipelineUtils from './utils/WebGPUPipelineUtils.js'; -import WebGPUTextureUtils from './utils/WebGPUTextureUtils.js'; -import WGSLNodeBuilder from './nodes/WGSLNodeBuilder.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPURenderer.Nodes.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPURenderer.Nodes.d.ts deleted file mode 100644 index dfbe8d022..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPURenderer.Nodes.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default WebGPURenderer; -/** - * This alternative version of {@link WebGPURenderer} only supports node materials. - * So classes like `MeshBasicMaterial` are not compatible. - * - * @private - * @augments Renderer - */ -declare class WebGPURenderer extends Renderer { - /** - * Constructs a new WebGPU renderer. - * - * @param {WebGPURenderer~Options} [parameters] - The configuration parameter. - */ - constructor(parameters?: {}); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWebGPURenderer: boolean; -} -import Renderer from '../common/Renderer.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPURenderer.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPURenderer.d.ts deleted file mode 100644 index 546c6744b..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/WebGPURenderer.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -export default WebGPURenderer; -/** - * This renderer is the new alternative of `WebGLRenderer`. `WebGPURenderer` has the ability - * to target different backends. By default, the renderer tries to use a WebGPU backend if the - * browser supports WebGPU. If not, `WebGPURenderer` falls backs to a WebGL 2 backend. - * - * @augments Renderer - */ -declare class WebGPURenderer extends Renderer { - /** - * WebGPURenderer options. - * - * @typedef {Object} WebGPURenderer~Options - * @property {boolean} [logarithmicDepthBuffer=false] - Whether logarithmic depth buffer is enabled or not. - * @property {boolean} [reversedDepthBuffer=false] - Whether reversed depth buffer is enabled or not. - * @property {boolean} [alpha=true] - Whether the default framebuffer (which represents the final contents of the canvas) should be transparent or opaque. - * @property {boolean} [depth=true] - Whether the default framebuffer should have a depth buffer or not. - * @property {boolean} [stencil=false] - Whether the default framebuffer should have a stencil buffer or not. - * @property {boolean} [antialias=false] - Whether MSAA as the default anti-aliasing should be enabled or not. - * @property {number} [samples=0] - When `antialias` is `true`, `4` samples are used by default. Set this parameter to any other integer value than 0 to overwrite the default. - * @property {boolean} [forceWebGL=false] - If set to `true`, the renderer uses a WebGL 2 backend no matter if WebGPU is supported or not. - * @property {boolean} [multiview=false] - If set to `true`, the renderer will use multiview during WebXR rendering if supported. - * @property {number} [outputType=undefined] - Texture type for output to canvas. By default, device's preferred format is used; other formats may incur overhead. - * @property {number} [outputBufferType=HalfFloatType] - Defines the type of output buffers. The default `HalfFloatType` is recommend for best - * quality. To save memory and bandwidth, `UnsignedByteType` might be used. This will reduce rendering quality though. - */ - /** - * Constructs a new WebGPU renderer. - * - * @param {WebGPURenderer~Options} [parameters] - The configuration parameter. - */ - constructor(parameters?: {}); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isWebGPURenderer: boolean; -} -import Renderer from '../common/Renderer.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUBindGroupDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUBindGroupDescriptor.d.ts deleted file mode 100644 index 1bd559d39..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUBindGroupDescriptor.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -export default GPUBindGroupDescriptor; -/** - * Reusable descriptor for `GPUDevice.createBindGroup()`. - * - * @private - */ -declare class GPUBindGroupDescriptor { - /** - * The label of the bind group. - * - * @type {string} - */ - label: string; - /** - * The bind group layout the bind group conforms to. - * - * @type {?GPUBindGroupLayout} - * @default null - */ - layout: GPUBindGroupLayout | null; - /** - * The bind group entries. - * - * @type {Array} - */ - entries: Array; - /** - * Resets the descriptor to its default state. The internal `entries` array - * is emptied without releasing its backing storage. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUBufferDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUBufferDescriptor.d.ts deleted file mode 100644 index b53c868a8..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUBufferDescriptor.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -export default GPUBufferDescriptor; -/** - * Reusable descriptor for `GPUDevice.createBuffer()`. - * - * @private - */ -declare class GPUBufferDescriptor { - /** - * The label of the buffer. - * - * @type {string} - */ - label: string; - /** - * The size of the buffer in bytes. - * - * @type {number} - * @default 0 - */ - size: number; - /** - * The allowed usages for the buffer. - * - * @type {number} - * @default 0 - */ - usage: number; - /** - * Whether the buffer is in the mapped state at creation. - * - * @type {boolean} - * @default false - */ - mappedAtCreation: boolean; - /** - * Resets the descriptor to its default state. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCommandEncoderDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCommandEncoderDescriptor.d.ts deleted file mode 100644 index 3e3be9d44..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCommandEncoderDescriptor.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export default GPUCommandEncoderDescriptor; -/** - * Reusable descriptor for `GPUDevice.createCommandEncoder()`. - * - * @private - */ -declare class GPUCommandEncoderDescriptor { - /** - * The label of the command encoder. - * - * @type {string} - */ - label: string; - /** - * Resets the descriptor to its default state. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUComputePassDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUComputePassDescriptor.d.ts deleted file mode 100644 index ab1ccf90e..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUComputePassDescriptor.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -export default GPUComputePassDescriptor; -/** - * Reusable descriptor for `GPUCommandEncoder.beginComputePass()`. - * - * @private - */ -declare class GPUComputePassDescriptor { - /** - * The label of the compute pass. - * - * @type {string} - */ - label: string; - /** - * Defines which timestamp values are written and where. - * - * @type {Object|undefined} - */ - timestampWrites: Object | undefined; - /** - * Resets the descriptor to its default state. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUComputePipelineDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUComputePipelineDescriptor.d.ts deleted file mode 100644 index 738679592..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUComputePipelineDescriptor.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -export default GPUComputePipelineDescriptor; -/** - * Reusable descriptor for `GPUDevice.createComputePipeline()`. - * - * @private - */ -declare class GPUComputePipelineDescriptor { - /** - * The label of the compute pipeline. - * - * @type {string} - */ - label: string; - /** - * The pipeline layout the pipeline conforms to, or `'auto'`. - * - * @type {?GPUPipelineLayout|string} - * @default null - */ - layout: (GPUPipelineLayout | string) | null; - /** - * The programmable compute stage. - * - * @type {?Object} - * @default null - */ - compute: Object | null; - /** - * Resets the descriptor to its default state. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCopyExternalImageDestInfo.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCopyExternalImageDestInfo.d.ts deleted file mode 100644 index 49adfbc13..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCopyExternalImageDestInfo.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default GPUCopyExternalImageDestInfo; -/** - * Reusable descriptor for `GPUCopyExternalImageDestInfo`, the destination - * argument to `GPUQueue.copyExternalImageToTexture()`. - * - * @private - * @augments GPUTexelCopyTextureInfo - */ -declare class GPUCopyExternalImageDestInfo extends GPUTexelCopyTextureInfo { - /** - * The predefined color space the destination texture is interpreted in. - * - * @type {string} - * @default 'srgb' - */ - colorSpace: string; - /** - * Whether the destination texture has premultiplied alpha. - * - * @type {boolean} - * @default false - */ - premultipliedAlpha: boolean; -} -import GPUTexelCopyTextureInfo from './GPUTexelCopyTextureInfo.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCopyExternalImageSourceInfo.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCopyExternalImageSourceInfo.d.ts deleted file mode 100644 index ade0e6661..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUCopyExternalImageSourceInfo.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -export default GPUCopyExternalImageSourceInfo; -/** - * Reusable descriptor for `GPUCopyExternalImageSourceInfo`, the source argument - * to `GPUQueue.copyExternalImageToTexture()`. - * - * @private - */ -declare class GPUCopyExternalImageSourceInfo { - /** - * The image-like source. - * - * @type {?(ImageBitmap|ImageData|HTMLImageElement|HTMLVideoElement|VideoFrame|HTMLCanvasElement|OffscreenCanvas)} - * @default null - */ - source: (ImageBitmap | ImageData | HTMLImageElement | HTMLVideoElement | VideoFrame | HTMLCanvasElement | OffscreenCanvas) | null; - /** - * The origin offset within the source. - * - * @type {{x: number, y: number}} - */ - origin: { - x: number; - y: number; - }; - /** - * Whether the source is flipped vertically before copying. - * - * @type {boolean} - * @default false - */ - flipY: boolean; - /** - * Resets the descriptor to its default state. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUExtent3D.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUExtent3D.d.ts deleted file mode 100644 index ad73dea82..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUExtent3D.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -export default GPUExtent3D; -/** - * Reusable descriptor for `GPUExtent3D` in its dictionary form, used by - * `GPUQueue.writeTexture()`, `GPUQueue.copyExternalImageToTexture()` and - * the various `GPUCommandEncoder` copy methods. - * - * @private - */ -declare class GPUExtent3D { - /** - * The width of the extent. - * - * @type {number} - * @default 0 - */ - width: number; - /** - * The height of the extent. - * - * @type {number} - * @default 1 - */ - height: number; - /** - * The depth (for 3D textures) or number of array layers. - * - * @type {number} - * @default 1 - */ - depthOrArrayLayers: number; - /** - * Resets the descriptor to its default state. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUPipelineLayoutDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUPipelineLayoutDescriptor.d.ts deleted file mode 100644 index a2263550f..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUPipelineLayoutDescriptor.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default GPUPipelineLayoutDescriptor; -/** - * Reusable descriptor for `GPUDevice.createPipelineLayout()`. - * - * @private - */ -declare class GPUPipelineLayoutDescriptor { - /** - * The label of the pipeline layout. - * - * @type {string} - */ - label: string; - /** - * The set of bind group layouts the pipeline layout describes. - * - * @type {?Array} - * @default null - */ - bindGroupLayouts: Array | null; - /** - * Resets the descriptor to its default state. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUQuerySetDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUQuerySetDescriptor.d.ts deleted file mode 100644 index 6e44a65da..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUQuerySetDescriptor.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -export default GPUQuerySetDescriptor; -/** - * Reusable descriptor for `GPUDevice.createQuerySet()`. - * - * @private - */ -declare class GPUQuerySetDescriptor { - /** - * The label of the query set. - * - * @type {string} - */ - label: string; - /** - * The type of queries managed by the set. - * - * @type {string|undefined} - */ - type: string | undefined; - /** - * The number of queries managed by the set. - * - * @type {number} - * @default 0 - */ - count: number; - /** - * Resets the descriptor to its default state. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderBundleEncoderDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderBundleEncoderDescriptor.d.ts deleted file mode 100644 index b027f82ca..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderBundleEncoderDescriptor.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -export default GPURenderBundleEncoderDescriptor; -/** - * Reusable descriptor for `GPUDevice.createRenderBundleEncoder()`. - * - * @private - */ -declare class GPURenderBundleEncoderDescriptor { - /** - * The label of the render bundle encoder. - * - * @type {string} - */ - label: string; - /** - * The formats of the color attachments the bundle is compatible with. - * - * @type {?Array} - * @default null - */ - colorFormats: Array | null; - /** - * The format of the depth/stencil attachment the bundle is compatible with. - * - * @type {string|undefined} - */ - depthStencilFormat: string | undefined; - /** - * The number of samples per pixel the bundle is compatible with. - * - * @type {number} - * @default 1 - */ - sampleCount: number; - /** - * Whether the depth attachment is read-only. - * - * @type {boolean} - * @default false - */ - depthReadOnly: boolean; - /** - * Whether the stencil attachment is read-only. - * - * @type {boolean} - * @default false - */ - stencilReadOnly: boolean; - /** - * Resets the descriptor to its default state. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassColorAttachment.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassColorAttachment.d.ts deleted file mode 100644 index a6aa47714..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassColorAttachment.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -export default GPURenderPassColorAttachment; -/** - * Reusable descriptor for `GPURenderPassColorAttachment`, the type of each - * entry in `GPURenderPassDescriptor.colorAttachments`. - * - * @private - */ -declare class GPURenderPassColorAttachment { - /** - * The texture view the pass renders into. - * - * @type {?GPUTextureView} - * @default null - */ - view: GPUTextureView | null; - /** - * The depth slice the pass renders into. - * - * @type {number|undefined} - */ - depthSlice: number | undefined; - /** - * The texture view that receives the resolved output of multisampled rendering. - * - * @type {?GPUTextureView|undefined} - */ - resolveTarget: (GPUTextureView | undefined) | null; - /** - * The clear value used when `loadOp` is `'clear'`. - * - * @type {Object|undefined} - */ - clearValue: Object | undefined; - /** - * The load operation performed at the start of the pass. - * - * @type {string|undefined} - */ - loadOp: string | undefined; - /** - * The store operation performed at the end of the pass. - * - * @type {string|undefined} - */ - storeOp: string | undefined; - /** - * Resets the descriptor to its default state. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassDepthStencilAttachment.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassDepthStencilAttachment.d.ts deleted file mode 100644 index 3bc5d785d..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassDepthStencilAttachment.d.ts +++ /dev/null @@ -1,71 +0,0 @@ -export default GPURenderPassDepthStencilAttachment; -/** - * Reusable descriptor for `GPURenderPassDepthStencilAttachment`, the - * `depthStencilAttachment` field of `GPURenderPassDescriptor`. - * - * @private - */ -declare class GPURenderPassDepthStencilAttachment { - /** - * The depth/stencil texture view the pass renders into. - * - * @type {?GPUTextureView} - * @default null - */ - view: GPUTextureView | null; - /** - * The load operation applied to the depth aspect at the start of the pass. - * - * @type {string|undefined} - */ - depthLoadOp: string | undefined; - /** - * The store operation applied to the depth aspect at the end of the pass. - * - * @type {string|undefined} - */ - depthStoreOp: string | undefined; - /** - * The clear value used when `depthLoadOp` is `'clear'`. - * - * @type {number|undefined} - */ - depthClearValue: number | undefined; - /** - * Whether the depth aspect is read-only. - * - * @type {boolean} - * @default false - */ - depthReadOnly: boolean; - /** - * The load operation applied to the stencil aspect at the start of the pass. - * - * @type {string|undefined} - */ - stencilLoadOp: string | undefined; - /** - * The store operation applied to the stencil aspect at the end of the pass. - * - * @type {string|undefined} - */ - stencilStoreOp: string | undefined; - /** - * The clear value used when `stencilLoadOp` is `'clear'`. - * - * @type {number} - * @default 0 - */ - stencilClearValue: number; - /** - * Whether the stencil aspect is read-only. - * - * @type {boolean} - * @default false - */ - stencilReadOnly: boolean; - /** - * Resets the descriptor to its default state. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassDescriptor.d.ts deleted file mode 100644 index 34e775c38..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassDescriptor.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -export default GPURenderPassDescriptor; -/** - * Reusable descriptor for `GPUCommandEncoder.beginRenderPass()`. - * - * @private - */ -declare class GPURenderPassDescriptor { - /** - * The label of the render pass. - * - * @type {string} - */ - label: string; - /** - * The color attachments of the render pass. - * - * @type {Array} - */ - colorAttachments: Array; - /** - * The depth-stencil attachment of the render pass. - * - * @type {Object|undefined} - */ - depthStencilAttachment: Object | undefined; - /** - * The query set used for occlusion queries during the pass. - * - * @type {?GPUQuerySet|undefined} - */ - occlusionQuerySet: (GPUQuerySet | undefined) | null; - /** - * Defines which timestamp values are written and where. - * - * @type {Object|undefined} - */ - timestampWrites: Object | undefined; - /** - * The maximum number of draw calls that can be issued during the pass. - * - * @type {number} - * @default 50000000 - */ - maxDrawCount: number; - /** - * Resets the descriptor to its default state. The internal `colorAttachments` - * array is emptied without releasing its backing storage. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassTimestampWrites.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassTimestampWrites.d.ts deleted file mode 100644 index f7199f492..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPassTimestampWrites.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -export default GPURenderPassTimestampWrites; -/** - * Reusable descriptor for `GPURenderPassTimestampWrites`, the - * `timestampWrites` field of `GPURenderPassDescriptor`. The same shape is - * also accepted as `GPUComputePassTimestampWrites`. - * - * @private - */ -declare class GPURenderPassTimestampWrites { - /** - * The query set the timestamps are written to. - * - * @type {?GPUQuerySet} - * @default null - */ - querySet: GPUQuerySet | null; - /** - * The index in the query set the beginning timestamp is written to. - * - * @type {number|undefined} - */ - beginningOfPassWriteIndex: number | undefined; - /** - * The index in the query set the ending timestamp is written to. - * - * @type {number|undefined} - */ - endOfPassWriteIndex: number | undefined; - /** - * Resets the descriptor to its default state. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPipelineDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPipelineDescriptor.d.ts deleted file mode 100644 index e7139e818..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPURenderPipelineDescriptor.d.ts +++ /dev/null @@ -1,90 +0,0 @@ -export default GPURenderPipelineDescriptor; -/** - * Reusable descriptor for `GPUDevice.createRenderPipeline()` and - * `createRenderPipelineAsync()`. - * - * @private - */ -declare class GPURenderPipelineDescriptor { - /** - * The label of the render pipeline. - * - * @type {string} - */ - label: string; - /** - * The pipeline layout the pipeline conforms to, or `'auto'`. - * - * @type {?GPUPipelineLayout|string} - * @default null - */ - layout: (GPUPipelineLayout | string) | null; - /** - * The programmable vertex stage. - * - * @type {?Object} - * @default null - */ - vertex: Object | null; - /** - * The primitive-assembly state. - * - * @type {Object} - */ - primitive: Object; - /** - * The depth/stencil state, omitted when the pipeline has no depth or stencil aspect. - * - * @type {Object|undefined} - */ - depthStencil: Object | undefined; - /** - * The multisample state. - * - * @type {GPUMultisampleState} - */ - multisample: GPUMultisampleState; - /** - * The programmable fragment stage. Omitted for vertex-only pipelines. - * - * @type {?Object} - * @default null - */ - fragment: Object | null; - /** - * Resets the descriptor to its default state. - */ - reset(): void; -} -/** - * Reusable nested state for `GPURenderPipelineDescriptor.multisample`. - * - * @private - */ -declare class GPUMultisampleState { - /** - * The number of samples per pixel. - * - * @type {number} - * @default 1 - */ - count: number; - /** - * A bitmask determining which samples are written to. - * - * @type {number} - * @default 0xFFFFFFFF - */ - mask: number; - /** - * Whether a fragment's alpha channel is used to generate a sample coverage mask. - * - * @type {boolean} - * @default false - */ - alphaToCoverageEnabled: boolean; - /** - * Resets the state to its default values. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUSamplerDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUSamplerDescriptor.d.ts deleted file mode 100644 index a3b28563b..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUSamplerDescriptor.d.ts +++ /dev/null @@ -1,87 +0,0 @@ -export default GPUSamplerDescriptor; -/** - * Reusable descriptor for `GPUDevice.createSampler()`. - * - * @private - */ -declare class GPUSamplerDescriptor { - /** - * The label of the sampler. - * - * @type {string} - */ - label: string; - /** - * The address mode for the sampler's U coordinate. - * - * @type {string} - * @default 'clamp-to-edge' - */ - addressModeU: string; - /** - * The address mode for the sampler's V coordinate. - * - * @type {string} - * @default 'clamp-to-edge' - */ - addressModeV: string; - /** - * The address mode for the sampler's W coordinate. - * - * @type {string} - * @default 'clamp-to-edge' - */ - addressModeW: string; - /** - * The magnification filter mode. - * - * @type {string} - * @default 'nearest' - */ - magFilter: string; - /** - * The minification filter mode. - * - * @type {string} - * @default 'nearest' - */ - minFilter: string; - /** - * The mipmap filter mode. - * - * @type {string} - * @default 'nearest' - */ - mipmapFilter: string; - /** - * The minimum level of detail used to sample. - * - * @type {number} - * @default 0 - */ - lodMinClamp: number; - /** - * The maximum level of detail used to sample. - * - * @type {number} - * @default 32 - */ - lodMaxClamp: number; - /** - * The compare function used by the sampler. - * - * @type {string|undefined} - */ - compare: string | undefined; - /** - * The maximum allowed anisotropic filtering. - * - * @type {number} - * @default 1 - */ - maxAnisotropy: number; - /** - * Resets the descriptor to its default state. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUShaderModuleDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUShaderModuleDescriptor.d.ts deleted file mode 100644 index 25b481010..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUShaderModuleDescriptor.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -export default GPUShaderModuleDescriptor; -/** - * Reusable descriptor for `GPUDevice.createShaderModule()`. - * - * @private - */ -declare class GPUShaderModuleDescriptor { - /** - * The label of the shader module. - * - * @type {string} - */ - label: string; - /** - * The WGSL source code of the shader module. - * - * @type {string} - */ - code: string; - /** - * Compilation hints that may help the implementation produce optimized code. - * - * @type {Array} - */ - compilationHints: Array; - /** - * Resets the descriptor to its default state. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyBufferInfo.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyBufferInfo.d.ts deleted file mode 100644 index 8e7a5e2aa..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyBufferInfo.d.ts +++ /dev/null @@ -1,39 +0,0 @@ -export default GPUTexelCopyBufferInfo; -/** - * Reusable descriptor for `GPUTexelCopyBufferInfo`, the buffer side of - * `GPUCommandEncoder.copyTextureToBuffer()` and `copyBufferToTexture()`. - * - * @private - */ -declare class GPUTexelCopyBufferInfo { - /** - * The target buffer. - * - * @type {?GPUBuffer} - * @default null - */ - buffer: GPUBuffer | null; - /** - * The byte offset within the buffer where the texel data begins. - * - * @type {number} - * @default 0 - */ - offset: number; - /** - * The stride, in bytes, between rows of texel blocks. - * - * @type {number|undefined} - */ - bytesPerRow: number | undefined; - /** - * The number of texel block rows per single image of the texture. - * - * @type {number|undefined} - */ - rowsPerImage: number | undefined; - /** - * Resets the descriptor to its default state. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyBufferLayout.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyBufferLayout.d.ts deleted file mode 100644 index a78ad019e..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyBufferLayout.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -export default GPUTexelCopyBufferLayout; -/** - * Reusable descriptor for `GPUTexelCopyBufferLayout`, the data-layout argument - * to `GPUQueue.writeTexture()`. - * - * @private - */ -declare class GPUTexelCopyBufferLayout { - /** - * The byte offset within the source data where the texel data begins. - * - * @type {number} - * @default 0 - */ - offset: number; - /** - * The stride, in bytes, between rows of texel blocks. - * - * @type {number|undefined} - */ - bytesPerRow: number | undefined; - /** - * The number of texel block rows per single image of the texture. - * - * @type {number|undefined} - */ - rowsPerImage: number | undefined; - /** - * Resets the descriptor to its default state. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyTextureInfo.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyTextureInfo.d.ts deleted file mode 100644 index b57669f02..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTexelCopyTextureInfo.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -export default GPUTexelCopyTextureInfo; -/** - * Reusable descriptor for `GPUTexelCopyTextureInfo`, the texture side of - * `GPUCommandEncoder.copyTextureToTexture()`, `copyTextureToBuffer()` and - * `GPUQueue.writeTexture()`. - * - * @private - */ -declare class GPUTexelCopyTextureInfo { - /** - * The target texture. - * - * @type {?GPUTexture} - * @default null - */ - texture: GPUTexture | null; - /** - * The mipmap level of the texture. - * - * @type {number} - * @default 0 - */ - mipLevel: number; - /** - * The origin offset within the texture. - * - * @type {{x: number, y: number, z: number}} - */ - origin: { - x: number; - y: number; - z: number; - }; - /** - * Which aspect of the texture is referenced. - * - * @type {string} - * @default 'all' - */ - aspect: string; - /** - * Resets the descriptor to its default state. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTextureDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTextureDescriptor.d.ts deleted file mode 100644 index a9507b721..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTextureDescriptor.d.ts +++ /dev/null @@ -1,73 +0,0 @@ -export default GPUTextureDescriptor; -/** - * Reusable descriptor for `GPUDevice.createTexture()`. - * - * @private - */ -declare class GPUTextureDescriptor { - /** - * The label of the texture. - * - * @type {string} - */ - label: string; - /** - * The size of the texture. - * - * @type {{width: number, height: number, depthOrArrayLayers: number}} - */ - size: { - width: number; - height: number; - depthOrArrayLayers: number; - }; - /** - * The number of mip levels the texture will contain. - * - * @type {number} - * @default 1 - */ - mipLevelCount: number; - /** - * The sample count of the texture. - * - * @type {number} - * @default 1 - */ - sampleCount: number; - /** - * The dimension of the set of texel coordinates. - * - * @type {string} - * @default '2d' - */ - dimension: string; - /** - * The format of the texture. - * - * @type {string|undefined} - */ - format: string | undefined; - /** - * The allowed usages for the texture. - * - * @type {number|undefined} - */ - usage: number | undefined; - /** - * The formats that views of this texture may use. - * - * @type {Array} - */ - viewFormats: Array; - /** - * The view dimension to use when binding the texture (compatibility mode). - * - * @type {string|undefined} - */ - textureBindingViewDimension: string | undefined; - /** - * Resets the descriptor to its default state. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTextureViewDescriptor.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTextureViewDescriptor.d.ts deleted file mode 100644 index a70410284..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/descriptors/GPUTextureViewDescriptor.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -export default GPUTextureViewDescriptor; -/** - * Reusable descriptor for `GPUTexture.createView()`. - * - * @private - */ -declare class GPUTextureViewDescriptor { - /** - * The label of the texture view. - * - * @type {string} - */ - label: string; - /** - * The format of the texture view. - * - * @type {string|undefined} - */ - format: string | undefined; - /** - * The dimension of the texture view. - * - * @type {string|undefined} - */ - dimension: string | undefined; - /** - * The allowed usages for the texture view. - * - * @type {number} - * @default 0 - */ - usage: number; - /** - * Which aspect of the texture is referenced. - * - * @type {string} - * @default 'all' - */ - aspect: string; - /** - * The first mip level accessible to the texture view. - * - * @type {number} - * @default 0 - */ - baseMipLevel: number; - /** - * The number of mip levels accessible to the texture view. - * - * @type {number|undefined} - */ - mipLevelCount: number | undefined; - /** - * The first array layer accessible to the texture view. - * - * @type {number} - * @default 0 - */ - baseArrayLayer: number; - /** - * The number of array layers accessible to the texture view. - * - * @type {number|undefined} - */ - arrayLayerCount: number | undefined; - /** - * The component swizzle to apply when sampling the texture view. - * Requires the `'texture-component-swizzle'` feature; ignored otherwise. - * - * @type {string} - * @default 'rgba' - */ - swizzle: string; - /** - * Resets the descriptor to its default state. - */ - reset(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts deleted file mode 100644 index f6f699f14..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/BasicNodeLibrary.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export default BasicNodeLibrary; -/** - * This version of a node library represents a basic version - * just focusing on lights and tone mapping techniques. - * - * @private - * @augments NodeLibrary - */ -declare class BasicNodeLibrary extends NodeLibrary { -} -import NodeLibrary from '../../common/nodes/NodeLibrary.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts deleted file mode 100644 index 1d2893798..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/StandardNodeLibrary.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -export default StandardNodeLibrary; -/** - * This version of a node library represents the standard version - * used in {@link WebGPURenderer}. It maps lights, tone mapping - * techniques and materials to node-based implementations. - * - * @private - * @augments NodeLibrary - */ -declare class StandardNodeLibrary extends NodeLibrary { -} -import NodeLibrary from '../../common/nodes/NodeLibrary.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts deleted file mode 100644 index 101807f28..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeBuilder.d.ts +++ /dev/null @@ -1,633 +0,0 @@ -export default WGSLNodeBuilder; -/** - * A node builder targeting WGSL. - * - * This module generates WGSL shader code from node materials and also - * generates the respective bindings and vertex buffer definitions. These - * data are later used by the renderer to create render and compute pipelines - * for render objects. - * - * @augments NodeBuilder - */ -declare class WGSLNodeBuilder extends NodeBuilder { - /** - * Constructs a new WGSL node builder renderer. - * - * @param {Object3D} object - The 3D object. - * @param {Renderer} renderer - The renderer. - */ - constructor(object: Object3D, renderer: Renderer); - /** - * A dictionary that holds for each shader stage ('vertex', 'fragment', 'compute') - * another dictionary which manages UBOs per group ('render','frame','object'). - * - * @type {Object>} - */ - uniformGroups: { - [x: string]: { - [x: string]: NodeUniformsGroup; - }; - }; - /** - * A dictionary that holds the assigned binding indices for each uniform group. - * This ensures the same binding index is used across all shader stages. - * - * @type {Object} - */ - uniformGroupsBindings: { - [x: string]: { - index: number; - id: number; - }; - }; - /** - * A dictionary that holds for each shader stage a Map of builtins. - * - * @type {Object>} - */ - builtins: { - [x: string]: Map; - }; - /** - * A dictionary that holds for each shader stage a Set of directives. - * - * @type {Object>} - */ - directives: { - [x: string]: Set; - }; - /** - * A map for managing scope arrays. Only relevant for when using - * {@link WorkgroupInfoNode} in context of compute shaders. - * - * @type {Map} - */ - scopedArrays: Map; - /** - * A flag that indicates that early returns are allowed. - * - * @type {boolean} - * @default true - */ - allowEarlyReturns: boolean; - /** - * A flag that indicates that global variables are allowed. - * - * @type {boolean} - * @default true - */ - allowGlobalVariables: boolean; - /** - * Generates the WGSL snippet for sampled textures. - * - * @private - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {string} The WGSL snippet. - */ - private _generateTextureSample; - /** - * Generates the WGSL snippet when sampling textures with explicit mip level. - * - * @private - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {string} levelSnippet - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. - * @param {string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @return {string} The WGSL snippet. - */ - private generateTextureSampleLevel; - /** - * Generates a wrap function used in context of textures. - * - * @param {Texture} texture - The texture to generate the function for. - * @return {string} The name of the generated function. - */ - generateWrapFunction(texture: Texture): string; - /** - * Generates a WGSL variable that holds the texture dimension of the given texture. - * It also returns information about the number of layers (elements) of an arrayed - * texture as well as the cube face count of cube textures. - * - * @param {Texture} texture - The texture to generate the function for. - * @param {string} textureProperty - The name of the video texture uniform in the shader. - * @param {string} levelSnippet - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. - * @return {string} The name of the dimension variable. - */ - generateTextureDimension(texture: Texture, textureProperty: string, levelSnippet: string): string; - /** - * Generates the WGSL snippet for a manual filtered texture. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {string} [levelSnippet='0u'] - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @return {string} The WGSL snippet. - */ - generateFilteredTexture(texture: Texture, textureProperty: string, uvSnippet: string, offsetSnippet: string | null, levelSnippet?: string, depthSnippet: string | null): string; - /** - * Generates the WGSL snippet for a texture lookup with explicit level-of-detail. - * Since it's a lookup, no sampling or filtering is applied. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {string} [levelSnippet='0u'] - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. - * @return {string} The WGSL snippet. - */ - generateTextureLod(texture: Texture, textureProperty: string, uvSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, levelSnippet?: string): string; - /** - * Generates the WGSL snippet that reads a single texel from a storage texture. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvIndexSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {?string} levelSnippet - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @return {string} The WGSL snippet. - */ - generateStorageTextureLoad(texture: Texture, textureProperty: string, uvIndexSnippet: string, levelSnippet: string | null, depthSnippet: string | null, offsetSnippet: string | null): string; - /** - * Generates the WGSL snippet that reads a single texel from a texture without sampling or filtering. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvIndexSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {?string} levelSnippet - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @return {string} The WGSL snippet. - */ - generateTextureLoad(texture: Texture, textureProperty: string, uvIndexSnippet: string, levelSnippet: string | null, depthSnippet: string | null, offsetSnippet: string | null): string; - /** - * Generates the WGSL snippet that writes a single texel to a texture. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvIndexSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {string} valueSnippet - A WGSL snippet that represent the new texel value. - * @return {string} The WGSL snippet. - */ - generateTextureStore(texture: Texture, textureProperty: string, uvIndexSnippet: string, depthSnippet: string | null, valueSnippet: string): string; - /** - * Returns `true` if the sampled values of the given texture should be compared against a reference value. - * - * @param {Texture} texture - The texture. - * @return {boolean} Whether the sampled values of the given texture should be compared against a reference value or not. - */ - isSampleCompare(texture: Texture): boolean; - /** - * Returns `true` if the given texture is unfilterable. - * - * @param {Texture} texture - The texture. - * @return {boolean} Whether the given texture is unfilterable or not. - */ - isUnfilterable(texture: Texture): boolean; - /** - * Generates the WGSL snippet for sampling/loading the given texture. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {string} The WGSL snippet. - */ - generateTexture(texture: Texture, textureProperty: string, uvSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, shaderStage?: string): string; - /** - * Generates the WGSL snippet for sampling/loading the given texture using explicit gradients. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {Array} gradSnippet - An array holding both gradient WGSL snippets. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {string} The WGSL snippet. - */ - generateTextureGrad(texture: Texture, textureProperty: string, uvSnippet: string, gradSnippet: Array, depthSnippet: string | null, offsetSnippet: string | null, shaderStage?: string): string; - /** - * Generates the WGSL snippet for sampling a depth texture and comparing the sampled depth values - * against a reference value. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {string} compareSnippet - A WGSL snippet that represents the reference value. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {string} The WGSL snippet. - */ - generateTextureCompare(texture: Texture, textureProperty: string, uvSnippet: string, compareSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, shaderStage?: string): string; - /** - * Generates the WGSL snippet for gathering four texels from the given texture. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {string} gatherSnippet - A WGSL snippet that represents the index of the channel to read. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {?string} flipYSnippet - A WGSL snippet that represents the y-flip. Only used for WebGL. - * @return {string} The WGSL snippet. - */ - generateTextureGather(texture: Texture, textureProperty: string, uvSnippet: string, gatherSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; - /** - * Generates the WGSL snippet for performing a depth comparison on four texels in the given depth texture. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {string} compareSnippet - A WGSL snippet that represents the reference value. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {?string} flipYSnippet - A WGSL snippet that represents the y-flip. Only used for WebGL. - * @return {string} The WGSL snippet. - */ - generateTextureGatherCompare(texture: Texture, textureProperty: string, uvSnippet: string, compareSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; - /** - * Generates the WGSL snippet when sampling textures with explicit mip level. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {string} levelSnippet - A WGSL snippet that represents the mip level, with level 0 containing a full size version of the texture. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {string} The WGSL snippet. - */ - generateTextureLevel(texture: Texture, textureProperty: string, uvSnippet: string, levelSnippet: string, depthSnippet: string | null, offsetSnippet: string | null): string; - /** - * Generates the WGSL snippet when sampling textures with a bias to the mip level. - * - * @param {Texture} texture - The texture. - * @param {string} textureProperty - The name of the texture uniform in the shader. - * @param {string} uvSnippet - A WGSL snippet that represents texture coordinates used for sampling. - * @param {string} biasSnippet - A WGSL snippet that represents the bias to apply to the mip level before sampling. - * @param {?string} depthSnippet - A WGSL snippet that represents 0-based texture array index to sample. - * @param {?string} offsetSnippet - A WGSL snippet that represents the offset that will be applied to the unnormalized texture coordinate before sampling the texture. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {string} The WGSL snippet. - */ - generateTextureBias(texture: Texture, textureProperty: string, uvSnippet: string, biasSnippet: string, depthSnippet: string | null, offsetSnippet: string | null, shaderStage?: string): string; - /** - * Returns a WGSL snippet that represents the property name of the given node. - * - * @param {Node} node - The node. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {string} The property name. - */ - getPropertyName(node: Node, shaderStage?: string): string; - /** - * Returns the native shader operator name for a given generic name. - * - * @param {string} op - The operator name to resolve. - * @return {?string} The resolved operator name. - */ - getFunctionOperator(op: string): string | null; - /** - * Returns the node access for the given node and shader stage. - * - * @param {StorageTextureNode|StorageBufferNode} node - The storage node. - * @param {string} shaderStage - The shader stage. - * @return {string} The node access. - */ - getNodeAccess(node: StorageTextureNode | StorageBufferNode, shaderStage: string): string; - /** - * Returns A WGSL snippet representing the storage access. - * - * @param {StorageTextureNode|StorageBufferNode} node - The storage node. - * @param {string} shaderStage - The shader stage. - * @return {string} The WGSL snippet representing the storage access. - */ - getStorageAccess(node: StorageTextureNode | StorageBufferNode, shaderStage: string): string; - /** - * This method is one of the more important ones since it's responsible - * for generating a matching binding instance for the given uniform node. - * - * These bindings are later used in the renderer to create bind groups - * and layouts. - * - * @param {UniformNode} node - The uniform node. - * @param {string} type - The node data type. - * @param {string} shaderStage - The shader stage. - * @param {?string} [name=null] - An optional uniform name. - * @return {NodeUniform} The node uniform object. - */ - getUniformFromNode(node: UniformNode, type: string, shaderStage: string, name?: string | null): NodeUniform; - /** - * This method should be used whenever builtins are required in nodes. - * The internal builtins data structure will make sure builtins are - * defined in the WGSL source. - * - * @param {string} name - The builtin name. - * @param {string} property - The property name. - * @param {string} type - The node data type. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {string} The property name. - */ - getBuiltin(name: string, property: string, type: string, shaderStage?: string): string; - /** - * Returns `true` if the given builtin is defined in the given shader stage. - * - * @param {string} name - The builtin name. - * @param {string} [shaderStage=this.shaderStage] - The shader stage this code snippet is generated for. - * @return {boolean} Whether the given builtin is defined in the given shader stage or not. - */ - hasBuiltin(name: string, shaderStage?: string): boolean; - /** - * Builds the given shader node. - * - * @param {ShaderNodeInternal} shaderNode - The shader node. - * @return {string} The WGSL function code. - */ - buildFunctionCode(shaderNode: ShaderNodeInternal): string; - /** - * Returns a builtin representing the index of a compute invocation within the scope of a workgroup load. - * - * @return {string} The invocation local index. - */ - getInvocationLocalIndex(): string; - /** - * Returns a builtin representing the size of a subgroup within the current shader. - * - * @return {string} The subgroup size. - */ - getSubgroupSize(): string; - /** - * Returns a builtin representing the index of a compute invocation within the scope of a subgroup. - * - * @return {string} The invocation subgroup index. - */ - getInvocationSubgroupIndex(): string; - /** - * Returns a builtin representing the index of a compute invocation's subgroup within its workgroup. - * - * @return {string} The subgroup index. - */ - getSubgroupIndex(): string; - /** - * Overwritten as a NOP since this method is intended for the WebGL 2 backend. - * - * @return {null} Null. - */ - getDrawIndex(): null; - /** - * Returns the frag depth builtin. - * - * @return {string} The frag depth builtin. - */ - getFragDepth(): string; - /** - * Returns the clip distances builtin. - * - * @return {string} The clip distances builtin. - */ - getClipDistance(): string; - /** - * Enables the given directive for the given shader stage. - * - * @param {string} name - The directive name. - * @param {string} [shaderStage=this.shaderStage] - The shader stage to enable the directive for. - */ - enableDirective(name: string, shaderStage?: string): void; - /** - * Returns the directives of the given shader stage as a WGSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} A WGSL snippet that enables the directives of the given stage. - */ - getDirectives(shaderStage: string): string; - /** - * Enables the 'subgroups' directive. - */ - enableSubGroups(): void; - /** - * Enables the 'subgroups-f16' directive. - */ - enableSubgroupsF16(): void; - /** - * Enables the 'clip_distances' directive. - */ - enableClipDistances(): void; - /** - * Enables the 'f16' directive. - */ - enableShaderF16(): void; - /** - * Enables the 'dual_source_blending' directive. - */ - enableDualSourceBlending(): void; - /** - * Enables hardware clipping. - * - * @param {string} planeCount - The clipping plane count. - */ - enableHardwareClipping(planeCount: string): void; - /** - * Returns the builtins of the given shader stage as a WGSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} A WGSL snippet that represents the builtins of the given stage. - */ - getBuiltins(shaderStage: string): string; - /** - * This method should be used when a new scoped buffer is used in context of - * compute shaders. It adds the array to the internal data structure which is - * later used to generate the respective WGSL. - * - * @param {string} name - The array name. - * @param {string} scope - The scope. - * @param {string} bufferType - The buffer type. - * @param {string} bufferCount - The buffer count. - * @return {string} The array name. - */ - getScopedArray(name: string, scope: string, bufferType: string, bufferCount: string): string; - /** - * Returns the scoped arrays of the given shader stage as a WGSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string|undefined} The WGSL snippet that defines the scoped arrays. - * Returns `undefined` when used in the vertex or fragment stage. - */ - getScopedArrays(shaderStage: string): string | undefined; - /** - * Returns the shader attributes of the given shader stage as a WGSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The WGSL snippet that defines the shader attributes. - */ - getAttributes(shaderStage: string): string; - /** - * Returns the members of the given struct type node as a WGSL string. - * - * @param {StructTypeNode} struct - The struct type node. - * @return {string} The WGSL snippet that defines the struct members. - */ - getStructMembers(struct: StructTypeNode): string; - /** - * Returns the structs of the given shader stage as a WGSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The WGSL snippet that defines the structs. - */ - getStructs(shaderStage: string): string; - /** - * Returns a WGSL string representing a variable. - * - * @param {string} type - The variable's type. - * @param {string} name - The variable's name. - * @param {?number} [count=null] - The array length. - * @param {string} [qualifier=''] - The variable's qualifier. - * @return {string} The WGSL snippet that defines a variable. - */ - getVar(type: string, name: string, count?: number | null, qualifier?: string): string; - /** - * Returns the variables of the given shader stage as a WGSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The WGSL snippet that defines the variables. - */ - getVars(shaderStage: string, global?: boolean): string; - /** - * Returns the varyings of the given shader stage as a WGSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The WGSL snippet that defines the varyings. - */ - getVaryings(shaderStage: string): string; - isCustomStruct(nodeUniform: any): any; - /** - * Returns the uniforms of the given shader stage as a WGSL string. - * - * @param {string} shaderStage - The shader stage. - * @return {string} The WGSL snippet that defines the uniforms. - */ - getUniforms(shaderStage: string): string; - /** - * Returns the native shader method name for a given generic name. - * - * @param {string} method - The method name to resolve. - * @param {?string} [output=null] - An optional output. - * @return {string} The resolved WGSL method name. - */ - getMethod(method: string, output?: string | null): string; - /** - * Returns the bitcast method name for a given input and outputType. - * - * @param {string} type - The output type to bitcast to. - * @return {string} The resolved WGSL bitcast invocation. - */ - getBitcastMethod(type: string): string; - /** - * Returns the float packing method name for a given numeric encoding. - * - * @param {string} encoding - The numeric encoding that describes how the float values are mapped to the integer range. - * @returns {string} The resolve WGSL float packing method name. - */ - getFloatPackingMethod(encoding: string): string; - /** - * Returns the float unpacking method name for a given numeric encoding. - * - * @param {string} encoding - The numeric encoding that describes how the integer values are mapped to the float range. - * @returns {string} The resolve WGSL float unpacking method name. - */ - getFloatUnpackingMethod(encoding: string): string; - /** - * Returns the native snippet for a ternary operation. - * - * @param {string} condSnippet - The condition determining which expression gets resolved. - * @param {string} ifSnippet - The expression to resolve to if the condition is true. - * @param {string} elseSnippet - The expression to resolve to if the condition is false. - * @return {string} The resolved method name. - */ - getTernary(condSnippet: string, ifSnippet: string, elseSnippet: string): string; - /** - * Whether the requested feature is available or not. - * - * @param {string} name - The requested feature. - * @return {boolean} Whether the requested feature is supported or not. - */ - isAvailable(name: string): boolean; - /** - * Returns the native shader method name for a given generic name. - * - * @private - * @param {string} method - The method name to resolve. - * @return {string} The resolved WGSL method name. - */ - private _getWGSLMethod; - /** - * Includes the given method name into the current - * function node. - * - * @private - * @param {string} name - The method name to include. - * @return {CodeNode} The respective code node. - */ - private _include; - /** - * Returns a WGSL vertex shader based on the given shader data. - * - * @private - * @param {Object} shaderData - The shader data. - * @return {string} The vertex shader. - */ - private _getWGSLVertexCode; - /** - * Returns a WGSL fragment shader based on the given shader data. - * - * @private - * @param {Object} shaderData - The shader data. - * @return {string} The vertex shader. - */ - private _getWGSLFragmentCode; - /** - * Returns a WGSL compute shader based on the given shader data. - * - * @private - * @param {Object} shaderData - The shader data. - * @param {string} workgroupSize - The workgroup size. - * @return {string} The vertex shader. - */ - private _getWGSLComputeCode; - /** - * Returns a WGSL struct based on the given name and variables. - * - * @private - * @param {string} name - The struct name. - * @param {string} vars - The struct variables. - * @return {string} The WGSL snippet representing a struct. - */ - private _getWGSLStruct; - /** - * Returns a WGSL struct binding. - * - * @private - * @param {string} name - The struct name. - * @param {string} vars - The struct variables. - * @param {string} access - The access. - * @param {number} [binding=0] - The binding index. - * @param {number} [group=0] - The group index. - * @return {string} The WGSL snippet representing a struct binding. - */ - private _getWGSLStructBinding; -} -import { NodeBuilder } from '../../../nodes/Nodes.js'; -import NodeUniformsGroup from '../../common/nodes/NodeUniformsGroup.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeFunction.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeFunction.d.ts deleted file mode 100644 index 3cbe9f2f5..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeFunction.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -export default WGSLNodeFunction; -/** - * This class represents a WSL node function. - * - * @augments NodeFunction - */ -declare class WGSLNodeFunction extends NodeFunction { - /** - * Constructs a new WGSL node function. - * - * @param {string} source - The WGSL source. - */ - constructor(source: string); - inputsCode: any; - blockCode: any; - outputType: any; - /** - * This method returns the WGSL code of the node function. - * - * @param {string} [name=this.name] - The function's name. - * @return {string} The shader code. - */ - getCode(name?: string): string; -} -import NodeFunction from '../../../nodes/core/NodeFunction.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeParser.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeParser.d.ts deleted file mode 100644 index 58ab25284..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/nodes/WGSLNodeParser.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export default WGSLNodeParser; -/** - * A WGSL node parser. - * - * @augments NodeParser - */ -declare class WGSLNodeParser extends NodeParser { - /** - * The method parses the given WGSL code an returns a node function. - * - * @param {string} source - The WGSL code. - * @return {WGSLNodeFunction} A node function. - */ - parseFunction(source: string): WGSLNodeFunction; -} -import NodeParser from '../../../nodes/core/NodeParser.js'; -import WGSLNodeFunction from './WGSLNodeFunction.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUAttributeUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUAttributeUtils.d.ts deleted file mode 100644 index 6f286dacf..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUAttributeUtils.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -export default WebGPUAttributeUtils; -/** - * A WebGPU backend utility module for managing shader attributes. - * - * @private - */ -declare class WebGPUAttributeUtils { - /** - * Constructs a new utility object. - * - * @param {WebGPUBackend} backend - The WebGPU backend. - */ - constructor(backend: WebGPUBackend); - /** - * A reference to the WebGPU backend. - * - * @type {WebGPUBackend} - */ - backend: WebGPUBackend; - /** - * Creates the GPU buffer for the given buffer attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - * @param {GPUBufferUsage} usage - A flag that indicates how the buffer may be used after its creation. - */ - createAttribute(attribute: BufferAttribute, usage: GPUBufferUsage): void; - /** - * Updates the GPU buffer of the given buffer attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - */ - updateAttribute(attribute: BufferAttribute): void; - /** - * This method creates the vertex buffer layout data which are - * require when creating a render pipeline for the given render object. - * - * @param {RenderObject} renderObject - The render object. - * @return {Array} An array holding objects which describe the vertex buffer layout. - */ - createShaderVertexBuffers(renderObject: RenderObject): Array; - /** - * Destroys the GPU buffer of the given buffer attribute. - * - * @param {BufferAttribute} attribute - The buffer attribute. - */ - destroyAttribute(attribute: BufferAttribute): void; - /** - * This method performs a readback operation by moving buffer data from - * a storage buffer attribute from the GPU to the CPU. ReadbackBuffer can - * be used to retain and reuse handles to the intermediate buffers and prevent - * new allocation. - * - * @async - * @param {BufferAttribute} attribute - The storage buffer attribute to read frm. - * @param {number} count - The offset from which to start reading the - * @param {number} offset - The storage buffer attribute. - * @param {ReadbackBuffer|ArrayBuffer} target - The storage buffer attribute. - * @return {Promise} A promise that resolves with the buffer data when the data are ready. - */ - getArrayBufferAsync(attribute: BufferAttribute, target?: ReadbackBuffer | ArrayBuffer, offset?: number, count?: number): Promise; - /** - * Returns the vertex format of the given buffer attribute. - * - * @private - * @param {BufferAttribute} geometryAttribute - The buffer attribute. - * @return {string|undefined} The vertex format (e.g. 'float32x3'). - */ - private _getVertexFormat; - /** - * Utility method for handling interleaved buffer attributes correctly. - * To process them, their `InterleavedBuffer` is returned. - * - * @private - * @param {BufferAttribute} attribute - The attribute. - * @return {BufferAttribute|InterleavedBuffer} - */ - private _getBufferAttribute; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUBindingUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUBindingUtils.d.ts deleted file mode 100644 index 9c5208097..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUBindingUtils.d.ts +++ /dev/null @@ -1,88 +0,0 @@ -export default WebGPUBindingUtils; -/** - * A WebGPU backend utility module for managing bindings. - * - * When reading the documentation it's helpful to keep in mind that - * all class definitions starting with 'GPU*' are modules from the - * WebGPU API. So for example `BindGroup` is a class from the engine - * whereas `GPUBindGroup` is a class from WebGPU. - * - * @private - */ -declare class WebGPUBindingUtils { - /** - * Constructs a new utility object. - * - * @param {WebGPUBackend} backend - The WebGPU backend. - */ - constructor(backend: WebGPUBackend); - /** - * A reference to the WebGPU backend. - * - * @type {WebGPUBackend} - */ - backend: WebGPUBackend; - /** - * A cache that maps combinations of layout entries to existing bind group layouts. - * - * @private - * @type {Map} - */ - private _bindGroupLayoutCache; - /** - * Creates a GPU bind group layout for the given bind group. - * - * @param {BindGroup} bindGroup - The bind group. - * @return {GPUBindGroupLayout} The GPU bind group layout. - */ - createBindingsLayout(bindGroup: BindGroup): GPUBindGroupLayout; - /** - * Creates bindings from the given bind group definition. - * - * @param {BindGroup} bindGroup - The bind group. - * @param {Array} bindings - Array of bind groups. - * @param {number} cacheIndex - The cache index. - * @param {number} version - The version. - */ - createBindings(bindGroup: BindGroup, bindings: Array, cacheIndex: number, version?: number): void; - /** - * Updates a buffer binding. - * - * @param {Buffer} binding - The buffer binding to update. - */ - updateBinding(binding: Buffer): void; - /** - * Creates a GPU bind group for the camera index. - * - * @param {Uint32Array} data - The index data. - * @param {GPUBindGroupLayout} layoutGPU - The GPU bind group layout. - * @return {GPUBindGroup} The GPU bind group. - */ - createBindGroupIndex(data: Uint32Array, layoutGPU: GPUBindGroupLayout): GPUBindGroup; - /** - * Creates a GPU bind group for the given bind group and GPU layout. - * - * @param {BindGroup} bindGroup - The bind group. - * @param {GPUBindGroupLayout} layoutGPU - The GPU bind group layout. - * @return {GPUBindGroup} The GPU bind group. - */ - createBindGroup(bindGroup: BindGroup, layoutGPU: GPUBindGroupLayout): GPUBindGroup; - /** - * Creates a GPU bind group layout entries for the given bind group. - * - * @private - * @param {BindGroup} bindGroup - The bind group. - * @return {Array} The GPU bind group layout entries. - */ - private _createLayoutEntries; - /** - * Delete the data associated with a bind group. - * - * @param {BindGroup} bindGroup - The bind group. - */ - deleteBindGroupData(bindGroup: BindGroup): void; - /** - * Frees internal resources. - */ - dispose(): void; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUCapabilities.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUCapabilities.d.ts deleted file mode 100644 index c56d99d65..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUCapabilities.d.ts +++ /dev/null @@ -1,32 +0,0 @@ -export default WebGPUCapabilities; -/** - * A WebGPU backend utility module for managing the device's capabilities. - * - * @private - */ -declare class WebGPUCapabilities { - /** - * Constructs a new utility object. - * - * @param {WebGPUBackend} backend - The WebGPU backend. - */ - constructor(backend: WebGPUBackend); - /** - * A reference to the WebGPU backend. - * - * @type {WebGPUBackend} - */ - backend: WebGPUBackend; - /** - * Returns the maximum anisotropy texture filtering value. - * - * @return {number} The maximum anisotropy texture filtering value. - */ - getMaxAnisotropy(): number; - /** - * Returns the maximum number of bytes available for uniform buffers. - * - * @return {number} The maximum number of bytes available for uniform buffers. - */ - getUniformBufferLimit(): number; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUConstants.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUConstants.d.ts deleted file mode 100644 index b8fc49536..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUConstants.d.ts +++ /dev/null @@ -1,301 +0,0 @@ -export namespace GPUPrimitiveTopology { - let PointList: string; - let LineList: string; - let LineStrip: string; - let TriangleList: string; - let TriangleStrip: string; -} -export const GPUShaderStage: any; -export namespace GPUCompareFunction { - let Never: string; - let Less: string; - let Equal: string; - let LessEqual: string; - let Greater: string; - let NotEqual: string; - let GreaterEqual: string; - let Always: string; -} -export namespace GPUStoreOp { - let Store: string; - let Discard: string; -} -export namespace GPULoadOp { - let Load: string; - let Clear: string; -} -export namespace GPUFrontFace { - let CCW: string; - let CW: string; -} -export namespace GPUCullMode { - let None: string; - let Front: string; - let Back: string; -} -export namespace GPUIndexFormat { - let Uint16: string; - let Uint32: string; -} -export namespace GPUVertexFormat { - export let Uint8x2: string; - export let Uint8x4: string; - export let Sint8x2: string; - export let Sint8x4: string; - export let Unorm8x2: string; - export let Unorm8x4: string; - export let Snorm8x2: string; - export let Snorm8x4: string; - export let Uint16x2: string; - export let Uint16x4: string; - export let Sint16x2: string; - export let Sint16x4: string; - export let Unorm16x2: string; - export let Unorm16x4: string; - export let Snorm16x2: string; - export let Snorm16x4: string; - export let Float16x2: string; - export let Float16x4: string; - export let Float32: string; - export let Float32x2: string; - export let Float32x3: string; - export let Float32x4: string; - let Uint32_1: string; - export { Uint32_1 as Uint32 }; - export let Uint32x2: string; - export let Uint32x3: string; - export let Uint32x4: string; - export let Sint32: string; - export let Sint32x2: string; - export let Sint32x3: string; - export let Sint32x4: string; -} -export namespace GPUTextureFormat { - let R8Unorm: string; - let R8Snorm: string; - let R8Uint: string; - let R8Sint: string; - let R16Uint: string; - let R16Sint: string; - let R16Float: string; - let RG8Unorm: string; - let RG8Snorm: string; - let RG8Uint: string; - let RG8Sint: string; - let R16Unorm: string; - let R16Snorm: string; - let R32Uint: string; - let R32Sint: string; - let R32Float: string; - let RG16Uint: string; - let RG16Sint: string; - let RG16Float: string; - let RGBA8Unorm: string; - let RGBA8UnormSRGB: string; - let RGBA8Snorm: string; - let RGBA8Uint: string; - let RGBA8Sint: string; - let BGRA8Unorm: string; - let BGRA8UnormSRGB: string; - let RG16Unorm: string; - let RG16Snorm: string; - let RGB9E5UFloat: string; - let RGB10A2Unorm: string; - let RG11B10UFloat: string; - let RG32Uint: string; - let RG32Sint: string; - let RG32Float: string; - let RGBA16Uint: string; - let RGBA16Sint: string; - let RGBA16Float: string; - let RGBA16Unorm: string; - let RGBA16Snorm: string; - let RGBA32Uint: string; - let RGBA32Sint: string; - let RGBA32Float: string; - let Stencil8: string; - let Depth16Unorm: string; - let Depth24Plus: string; - let Depth24PlusStencil8: string; - let Depth32Float: string; - let Depth32FloatStencil8: string; - let BC1RGBAUnorm: string; - let BC1RGBAUnormSRGB: string; - let BC2RGBAUnorm: string; - let BC2RGBAUnormSRGB: string; - let BC3RGBAUnorm: string; - let BC3RGBAUnormSRGB: string; - let BC4RUnorm: string; - let BC4RSnorm: string; - let BC5RGUnorm: string; - let BC5RGSnorm: string; - let BC6HRGBUFloat: string; - let BC6HRGBFloat: string; - let BC7RGBAUnorm: string; - let BC7RGBAUnormSRGB: string; - let ETC2RGB8Unorm: string; - let ETC2RGB8UnormSRGB: string; - let ETC2RGB8A1Unorm: string; - let ETC2RGB8A1UnormSRGB: string; - let ETC2RGBA8Unorm: string; - let ETC2RGBA8UnormSRGB: string; - let EACR11Unorm: string; - let EACR11Snorm: string; - let EACRG11Unorm: string; - let EACRG11Snorm: string; - let ASTC4x4Unorm: string; - let ASTC4x4UnormSRGB: string; - let ASTC5x4Unorm: string; - let ASTC5x4UnormSRGB: string; - let ASTC5x5Unorm: string; - let ASTC5x5UnormSRGB: string; - let ASTC6x5Unorm: string; - let ASTC6x5UnormSRGB: string; - let ASTC6x6Unorm: string; - let ASTC6x6UnormSRGB: string; - let ASTC8x5Unorm: string; - let ASTC8x5UnormSRGB: string; - let ASTC8x6Unorm: string; - let ASTC8x6UnormSRGB: string; - let ASTC8x8Unorm: string; - let ASTC8x8UnormSRGB: string; - let ASTC10x5Unorm: string; - let ASTC10x5UnormSRGB: string; - let ASTC10x6Unorm: string; - let ASTC10x6UnormSRGB: string; - let ASTC10x8Unorm: string; - let ASTC10x8UnormSRGB: string; - let ASTC10x10Unorm: string; - let ASTC10x10UnormSRGB: string; - let ASTC12x10Unorm: string; - let ASTC12x10UnormSRGB: string; - let ASTC12x12Unorm: string; - let ASTC12x12UnormSRGB: string; -} -export namespace GPUAddressMode { - let ClampToEdge: string; - let Repeat: string; - let MirrorRepeat: string; -} -export namespace GPUFilterMode { - let Linear: string; - let Nearest: string; -} -export namespace GPUBlendFactor { - let Zero: string; - let One: string; - let Src: string; - let OneMinusSrc: string; - let SrcAlpha: string; - let OneMinusSrcAlpha: string; - let Dst: string; - let OneMinusDst: string; - let DstAlpha: string; - let OneMinusDstAlpha: string; - let SrcAlphaSaturated: string; - let Constant: string; - let OneMinusConstant: string; -} -export namespace GPUBlendOperation { - let Add: string; - let Subtract: string; - let ReverseSubtract: string; - let Min: string; - let Max: string; -} -export namespace GPUColorWriteFlags { - let None_1: number; - export { None_1 as None }; - export let Red: number; - export let Green: number; - export let Blue: number; - export let Alpha: number; - export let All: number; -} -export namespace GPUStencilOperation { - export let Keep: string; - let Zero_1: string; - export { Zero_1 as Zero }; - export let Replace: string; - export let Invert: string; - export let IncrementClamp: string; - export let DecrementClamp: string; - export let IncrementWrap: string; - export let DecrementWrap: string; -} -export namespace GPUBufferBindingType { - let Uniform: string; - let Storage: string; - let ReadOnlyStorage: string; -} -export namespace GPUStorageTextureAccess { - let WriteOnly: string; - let ReadOnly: string; - let ReadWrite: string; -} -export namespace GPUSamplerBindingType { - let Filtering: string; - let NonFiltering: string; - let Comparison: string; -} -export namespace GPUTextureSampleType { - let Float: string; - let UnfilterableFloat: string; - let Depth: string; - let SInt: string; - let UInt: string; -} -export namespace GPUTextureDimension { - let OneD: string; - let TwoD: string; - let ThreeD: string; -} -export namespace GPUTextureViewDimension { - let OneD_1: string; - export { OneD_1 as OneD }; - let TwoD_1: string; - export { TwoD_1 as TwoD }; - export let TwoDArray: string; - export let Cube: string; - export let CubeArray: string; - let ThreeD_1: string; - export { ThreeD_1 as ThreeD }; -} -export namespace GPUTextureAspect { - let All_1: string; - export { All_1 as All }; - export let StencilOnly: string; - export let DepthOnly: string; -} -export namespace GPUInputStepMode { - let Vertex: string; - let Instance: string; -} -export namespace GPUFeatureName { - export let CoreFeaturesAndLimits: string; - export let DepthClipControl: string; - let Depth32FloatStencil8_1: string; - export { Depth32FloatStencil8_1 as Depth32FloatStencil8 }; - export let TextureCompressionBC: string; - export let TextureCompressionBCSliced3D: string; - export let TextureCompressionETC2: string; - export let TextureCompressionASTC: string; - export let TextureCompressionASTCSliced3D: string; - export let TimestampQuery: string; - export let IndirectFirstInstance: string; - export let ShaderF16: string; - let RG11B10UFloat_1: string; - export { RG11B10UFloat_1 as RG11B10UFloat }; - export let BGRA8UNormStorage: string; - export let Float32Filterable: string; - export let Float32Blendable: string; - export let ClipDistances: string; - export let DualSourceBlending: string; - export let Subgroups: string; - export let TextureFormatsTier1: string; - export let TextureFormatsTier2: string; -} -export const GPUFeatureMap: { - 'texture-compression-s3tc': string; - 'texture-compression-etc1': string; -}; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUPipelineUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUPipelineUtils.d.ts deleted file mode 100644 index 12321c42b..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUPipelineUtils.d.ts +++ /dev/null @@ -1,144 +0,0 @@ -export default WebGPUPipelineUtils; -/** - * A WebGPU backend utility module for managing pipelines. - * - * @private - */ -declare class WebGPUPipelineUtils { - /** - * Constructs a new utility object. - * - * @param {WebGPUBackend} backend - The WebGPU backend. - */ - constructor(backend: WebGPUBackend); - /** - * A reference to the WebGPU backend. - * - * @type {WebGPUBackend} - */ - backend: WebGPUBackend; - /** - * A Weak Map that tracks the active pipeline for render or compute passes. - * - * @private - * @type {WeakMap<(GPURenderPassEncoder|GPUComputePassEncoder),(GPURenderPipeline|GPUComputePipeline)>} - */ - private _activePipelines; - /** - * Sets the given pipeline for the given pass. The method makes sure to only set the - * pipeline when necessary. - * - * @param {(GPURenderPassEncoder|GPUComputePassEncoder)} pass - The pass encoder. - * @param {(GPURenderPipeline|GPUComputePipeline)} pipeline - The pipeline. - */ - setPipeline(pass: (GPURenderPassEncoder | GPUComputePassEncoder), pipeline: (GPURenderPipeline | GPUComputePipeline)): void; - /** - * Returns the sample count derived from the given render context. - * - * @private - * @param {RenderContext} renderContext - The render context. - * @return {number} The sample count. - */ - private _getSampleCount; - /** - * Creates a render pipeline for the given render object. - * - * @param {RenderObject} renderObject - The render object. - * @param {Array} promises - An array of compilation promises which are used in `compileAsync()`. - */ - createRenderPipeline(renderObject: RenderObject, promises: Array>): void; - /** - * Creates GPU render bundle encoder for the given render context. - * - * @param {RenderContext} renderContext - The render context. - * @param {?string} [label='renderBundleEncoder'] - The label. - * @return {GPURenderBundleEncoder} The GPU render bundle encoder. - */ - createBundleEncoder(renderContext: RenderContext, label?: string | null): GPURenderBundleEncoder; - /** - * Creates a compute pipeline for the given compute node. - * - * @param {ComputePipeline} pipeline - The compute pipeline. - * @param {Array} bindings - The bindings. - */ - createComputePipeline(pipeline: ComputePipeline, bindings: Array): void; - /** - * Reads line-accurate diagnostics from shader modules and logs them. - * Called from pipeline creation error paths to turn opaque validation - * failures into actionable WGSL feedback. - * - * @private - * @param {Array<{program: ProgrammableStage, module: GPUShaderModule}>} stages - Pairs of program + compiled shader module. - * @param {string} pipelineLabel - Label of the owning pipeline, used as log prefix. - * @return {Promise} - */ - private _reportShaderDiagnostics; - /** - * Returns the blending state as a descriptor object required - * for the pipeline creation. - * - * @private - * @param {Material|BlendMode} object - The object containing blending information. - * @return {Object} The blending state. - */ - private _getBlending; - /** - * Returns the GPU blend factor which is required for the pipeline creation. - * - * @private - * @param {number} blend - The blend factor as a three.js constant. - * @return {string} The GPU blend factor. - */ - private _getBlendFactor; - /** - * Returns the GPU stencil compare function which is required for the pipeline creation. - * - * @private - * @param {Material} material - The material. - * @return {string} The GPU stencil compare function. - */ - private _getStencilCompare; - /** - * Returns the GPU stencil operation which is required for the pipeline creation. - * - * @private - * @param {number} op - A three.js constant defining the stencil operation. - * @return {string} The GPU stencil operation. - */ - private _getStencilOperation; - /** - * Returns the GPU blend operation which is required for the pipeline creation. - * - * @private - * @param {number} blendEquation - A three.js constant defining the blend equation. - * @return {string} The GPU blend operation. - */ - private _getBlendOperation; - /** - * Returns the primitive state as a descriptor object required - * for the pipeline creation. - * - * @private - * @param {Object3D} object - The 3D object. - * @param {BufferGeometry} geometry - The geometry. - * @param {Material} material - The material. - * @return {Object} The primitive state. - */ - private _getPrimitiveState; - /** - * Returns the GPU color write mask which is required for the pipeline creation. - * - * @private - * @param {Material} material - The material. - * @return {number} The GPU color write mask. - */ - private _getColorWriteMask; - /** - * Returns the GPU depth compare function which is required for the pipeline creation. - * - * @private - * @param {Material} material - The material. - * @return {string} The GPU depth compare function. - */ - private _getDepthCompare; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTexturePassUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTexturePassUtils.d.ts deleted file mode 100644 index e2d05d692..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTexturePassUtils.d.ts +++ /dev/null @@ -1,84 +0,0 @@ -export default WebGPUTexturePassUtils; -/** - * A WebGPU backend utility module used by {@link WebGPUTextureUtils}. - * - * @private - */ -declare class WebGPUTexturePassUtils extends DataMap { - /** - * Constructs a new utility object. - * - * @param {GPUDevice} device - The WebGPU device. - */ - constructor(device: GPUDevice); - /** - * The WebGPU device. - * - * @type {GPUDevice} - */ - device: GPUDevice; - /** - * The mipmap GPU sampler. - * - * @type {GPUSampler} - */ - mipmapSampler: GPUSampler; - /** - * The flipY GPU sampler. - * - * @type {GPUSampler} - */ - flipYSampler: GPUSampler; - flipUniformBuffer: GPUBuffer; - noFlipUniformBuffer: GPUBuffer; - /** - * A cache for GPU render pipelines used for copy/transfer passes. - * Every texture format and textureBindingViewDimension combo requires a unique pipeline. - * - * @type {Object} - */ - transferPipelines: { - [x: string]: GPURenderPipeline; - }; - mipmapShaderModule: GPUShaderModule; - /** - * Returns a render pipeline for the internal copy render pass. The pass - * requires a unique render pipeline for each texture format. - * - * @param {string} format - The GPU texture format - * @param {string?} textureBindingViewDimension - The GPU texture binding view dimension - * @return {GPURenderPipeline} The GPU render pipeline. - */ - getTransferPipeline(format: string, textureBindingViewDimension: string | null): GPURenderPipeline; - /** - * Flip the contents of the given GPU texture along its vertical axis. - * - * @param {GPUTexture} textureGPU - The GPU texture object. - * @param {Object} textureGPUDescriptor - The texture descriptor. - * @param {number} [baseArrayLayer=0] - The index of the first array layer accessible to the texture view. - */ - flipY(textureGPU: GPUTexture, textureGPUDescriptor: Object, baseArrayLayer?: number): void; - /** - * Generates mipmaps for the given GPU texture. - * - * @param {GPUTexture} textureGPU - The GPU texture object. - * @param {?GPUCommandEncoder} [encoder=null] - An optional command encoder used to generate mipmaps. - */ - generateMipmaps(textureGPU: GPUTexture, encoder?: GPUCommandEncoder | null): void; - /** - * Since multiple copy render passes are required to generate mipmaps, the passes - * are managed as render bundles to improve performance. - * - * @param {GPUTexture} textureGPU - The GPU texture object. - * @return {Array} An array of render bundles. - */ - _mipmapCreateBundles(textureGPU: GPUTexture): Array; - /** - * Executes the render bundles. - * - * @param {GPUCommandEncoder} commandEncoder - The GPU command encoder. - * @param {Array} passes - An array of render bundles. - */ - _mipmapRunBundles(commandEncoder: GPUCommandEncoder, passes: Array): void; -} -import DataMap from '../../common/DataMap.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTextureUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTextureUtils.d.ts deleted file mode 100644 index 6bf2a9f38..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTextureUtils.d.ts +++ /dev/null @@ -1,289 +0,0 @@ -/** - * Returns the GPU format for the given texture. - * - * @param {Texture} texture - The texture. - * @param {GPUDevice} [device] - The GPU device which is used for feature detection. - * @return {string} The GPU format. - */ -export function getFormat(texture: Texture, device?: GPUDevice): string; -export default WebGPUTextureUtils; -import { Texture } from '../../../textures/Texture.js'; -/** - * A WebGPU backend utility module for managing textures. - * - * @private - */ -declare class WebGPUTextureUtils { - /** - * Constructs a new utility object. - * - * @param {WebGPUBackend} backend - The WebGPU backend. - */ - constructor(backend: WebGPUBackend); - /** - * A reference to the WebGPU backend. - * - * @type {WebGPUBackend} - */ - backend: WebGPUBackend; - /** - * A reference to the pass utils. - * - * @type {?WebGPUTexturePassUtils} - * @default null - */ - _passUtils: WebGPUTexturePassUtils | null; - /** - * A dictionary for managing default textures. The key - * is the texture format, the value the texture object. - * - * @type {Object} - */ - defaultTexture: { - [x: string]: Texture; - }; - /** - * A dictionary for managing default cube textures. The key - * is the texture format, the value the texture object. - * - * @type {Object} - */ - defaultCubeTexture: { - [x: string]: CubeTexture; - }; - /** - * A default video frame. - * - * @type {?VideoFrame} - * @default null - */ - defaultVideoFrame: VideoFrame | null; - /** - * A cache of shared texture samplers. - * - * @type {Map} - */ - _samplerCache: Map; - /** - * Creates a GPU sampler for the given texture. - * - * @param {Texture} texture - The texture to create the sampler for. - * @param {TextureNode} textureNode - The texture node to update the sampler with. - * @return {string} The current sampler key. - */ - updateSampler(texture: Texture, textureNode: TextureNode): string; - /** - * Creates a default texture for the given texture that can be used - * as a placeholder until the actual texture is ready for usage. - * - * @param {Texture} texture - The texture to create a default texture for. - */ - createDefaultTexture(texture: Texture): void; - /** - * Defines a texture on the GPU for the given texture object. - * - * @param {Texture} texture - The texture. - * @param {Object} [options={}] - Optional configuration parameter. - */ - createTexture(texture: Texture, options?: Object): void; - /** - * Destroys the GPU data for the given texture object. - * - * @param {Texture} texture - The texture. - * @param {boolean} [isDefaultTexture=false] - Whether the texture uses a default GPU texture or not. - */ - destroyTexture(texture: Texture, isDefaultTexture?: boolean): void; - /** - * Generates mipmaps for the given texture. - * - * @param {Texture} texture - The texture. - * @param {?GPUCommandEncoder} [encoder=null] - An optional command encoder used to generate mipmaps. - */ - generateMipmaps(texture: Texture, encoder?: GPUCommandEncoder | null): void; - /** - * Returns the color buffer representing the color - * attachment of the default framebuffer. - * - * @return {GPUTexture} The color buffer. - */ - getColorBuffer(): GPUTexture; - /** - * Returns the depth buffer representing the depth - * attachment of the default framebuffer. - * - * @param {boolean} [depth=true] - Whether depth is enabled or not. - * @param {boolean} [stencil=false] - Whether stencil is enabled or not. - * @return {GPUTexture} The depth buffer. - */ - getDepthBuffer(depth?: boolean, stencil?: boolean): GPUTexture; - /** - * Uploads the updated texture data to the GPU. - * - * @param {Texture} texture - The texture. - * @param {Object} [options={}] - Optional configuration parameter. - */ - updateTexture(texture: Texture, options?: Object): void; - /** - * Returns texture data as a typed array. - * - * @async - * @param {Texture} texture - The texture to copy. - * @param {number} x - The x coordinate of the copy origin. - * @param {number} y - The y coordinate of the copy origin. - * @param {number} width - The width of the copy. - * @param {number} height - The height of the copy. - * @param {number} faceIndex - The face index. - * @return {Promise} A Promise that resolves with a typed array when the copy operation has finished. - */ - copyTextureToBuffer(texture: Texture, x: number, y: number, width: number, height: number, faceIndex: number): Promise; - /** - * Frees all internal resources. - */ - dispose(): void; - /** - * Returns the default GPU texture for the given format. - * - * @private - * @param {string} format - The GPU format. - * @return {GPUTexture} The GPU texture. - */ - private _getDefaultTextureGPU; - /** - * Returns the default GPU cube texture for the given format. - * - * @private - * @param {string} format - The GPU format. - * @return {GPUTexture} The GPU texture. - */ - private _getDefaultCubeTextureGPU; - /** - * Uploads cube texture image data to the GPU memory. - * - * @private - * @param {CubeTexture} texture - The cube texture. - * @param {GPUTexture} textureGPU - The GPU texture. - * @param {Object} textureDescriptorGPU - The GPU texture descriptor. - */ - private _copyCubeMapToTexture; - /** - * Uploads texture image data to the GPU memory. - * - * @private - * @param {HTMLImageElement|ImageBitmap|HTMLCanvasElement} image - The image data. - * @param {GPUTexture} textureGPU - The GPU texture. - * @param {Object} textureDescriptorGPU - The GPU texture descriptor. - * @param {number} originDepth - The origin depth. - * @param {boolean} flipY - Whether to flip texture data along their vertical axis or not. - * @param {boolean} premultiplyAlpha - Whether the texture should have its RGB channels premultiplied by the alpha channel or not. - * @param {number} [mipLevel=0] - The mip level where the data should be copied to. - */ - private _copyImageToTexture; - /** - * Returns the pass utils singleton. - * - * @private - * @return {WebGPUTexturePassUtils} The utils instance. - */ - private _getPassUtils; - /** - * Generates mipmaps for the given GPU texture. - * - * @private - * @param {GPUTexture} textureGPU - The GPU texture object. - * @param {?GPUCommandEncoder} [encoder=null] - An optional command encoder used to generate mipmaps. - */ - private _generateMipmaps; - /** - * Flip the contents of the given GPU texture along its vertical axis. - * - * @private - * @param {GPUTexture} textureGPU - The GPU texture object. - * @param {Object} textureDescriptorGPU - The texture descriptor. - * @param {number} [originDepth=0] - The origin depth. - */ - private _flipY; - /** - * Uploads texture buffer data to the GPU memory. - * - * @private - * @param {Object} image - An object defining the image buffer data. - * @param {GPUTexture} textureGPU - The GPU texture. - * @param {Object} textureDescriptorGPU - The GPU texture descriptor. - * @param {number} originDepth - The origin depth. - * @param {boolean} flipY - Whether to flip texture data along their vertical axis or not. - * @param {number} [depth=0] - The depth offset when copying array or 3D texture data. - * @param {number} [mipLevel=0] - The mip level where the data should be copied to. - */ - private _copyBufferToTexture; - /** - * Uploads compressed texture data to the GPU memory. - * - * @private - * @param {Array} mipmaps - An array with mipmap data. - * @param {GPUTexture} textureGPU - The GPU texture. - * @param {Object} textureDescriptorGPU - The GPU texture descriptor. - * @param {?Set} [layerUpdates=null] - The layer indices to update. - */ - private _copyCompressedBufferToTexture; - /** - * This method is only relevant for compressed texture formats. It returns a block - * data descriptor for the given GPU compressed texture format. - * - * @private - * @param {string} format - The GPU compressed texture format. - * @return {Object} The block data descriptor. - */ - private _getBlockData; - /** - * Converts the three.js uv wrapping constants to GPU address mode constants. - * - * @private - * @param {number} value - The three.js constant defining a uv wrapping mode. - * @return {string} The GPU address mode. - */ - private _convertAddressMode; - /** - * Converts the three.js filter constants to GPU filter constants. - * - * @private - * @param {number} value - The three.js constant defining a filter mode. - * @return {string} The GPU filter mode. - */ - private _convertFilterMode; - /** - * Converts the three.js filter constants to a GPU mipmap filter constant. - * Unlike `_convertFilterMode`, this extracts the between-mip-level filtering - * axis from the combined three.js constant rather than the within-level axis. - * - * @private - * @param {number} value - The three.js constant defining a filter mode. - * @return {string} The GPU mipmap filter mode. - */ - private _convertMipmapFilterMode; - /** - * Returns the bytes-per-texel value for the given GPU texture format. - * - * @private - * @param {string} format - The GPU texture format. - * @return {number} The bytes-per-texel. - */ - private _getBytesPerTexel; - /** - * Returns the corresponding typed array type for the given GPU texture format. - * - * @private - * @param {string} format - The GPU texture format. - * @return {TypedArray.constructor} The typed array type. - */ - private _getTypedArrayType; - /** - * Returns the GPU dimensions for the given texture. - * - * @private - * @param {Texture} texture - The texture. - * @return {string} The GPU dimension. - */ - private _getDimension; -} -import WebGPUTexturePassUtils from './WebGPUTexturePassUtils.js'; -import { CubeTexture } from '../../../textures/CubeTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.d.ts deleted file mode 100644 index dcc48eded..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUTimestampQueryPool.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -export default WebGPUTimestampQueryPool; -/** - * Manages a pool of WebGPU timestamp queries for performance measurement. - * Extends the base TimestampQueryPool to provide WebGPU-specific implementation. - * - * @augments TimestampQueryPool - */ -declare class WebGPUTimestampQueryPool extends TimestampQueryPool { - /** - * Creates a new WebGPU timestamp query pool. - * - * @param {GPUDevice} device - The WebGPU device to create queries on. - * @param {string} type - The type identifier for this query pool. - * @param {number} [maxQueries=2048] - Maximum number of queries this pool can hold. - */ - constructor(device: GPUDevice, type: string, maxQueries?: number); - device: GPUDevice; - type: string; - querySet: GPUQuerySet; - resolveBuffer: GPUBuffer; - resultBuffer: GPUBuffer; - /** - * Allocates a pair of queries for a given render context. - * - * @param {string} uid - A unique identifier for the render context. - * @returns {?number} The base offset for the allocated queries, or null if allocation failed. - */ - allocateQueriesForContext(uid: string): number | null; - /** - * Asynchronously resolves all pending queries and returns the total duration. - * If there's already a pending resolve operation, returns that promise instead. - * - * @async - * @returns {Promise} The total duration in milliseconds, or the last valid value if resolution fails. - */ - resolveQueriesAsync(): Promise; - /** - * Internal method to resolve queries and calculate total duration. - * - * @async - * @private - * @returns {Promise} The total duration in milliseconds. - */ - private _resolveQueries; - /** - * Dispose of the query pool. - * - * @async - * @returns {Promise} A Promise that resolves when the dispose has been executed. - */ - dispose(): Promise; -} -import TimestampQueryPool from '../../common/TimestampQueryPool.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUUtils.d.ts b/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUUtils.d.ts deleted file mode 100644 index b367efa5a..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webgpu/utils/WebGPUUtils.d.ts +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Submits a single GPU command to the device queue using a shared, module-scoped - * array to avoid per-call array allocations. - * - * @private - * @param {GPUDevice} device - The GPU device. - * @param {GPUCommandBuffer} command - The command buffer to submit. - */ -export function submit(device: GPUDevice, command: GPUCommandBuffer): void; -export default WebGPUUtils; -/** - * A WebGPU backend utility module with common helpers. - * - * @private - */ -declare class WebGPUUtils { - /** - * Constructs a new utility object. - * - * @param {WebGPUBackend} backend - The WebGPU backend. - */ - constructor(backend: WebGPUBackend); - /** - * A reference to the WebGPU backend. - * - * @type {WebGPUBackend} - */ - backend: WebGPUBackend; - /** - * Returns the depth/stencil GPU format for the given render context. - * - * @param {RenderContext} renderContext - The render context. - * @return {string} The depth/stencil GPU texture format. - */ - getCurrentDepthStencilFormat(renderContext: RenderContext): string; - /** - * Returns the GPU format for the given texture. - * - * @param {Texture} texture - The texture. - * @return {string} The GPU texture format. - */ - getTextureFormatGPU(texture: Texture): string; - /** - * Returns an object that defines the multi-sampling state of the given texture. - * - * @param {Texture} texture - The texture. - * @return {Object} The multi-sampling state. - */ - getTextureSampleData(texture: Texture): Object; - /** - * Returns the default color attachment's GPU format of the current render context. - * - * @param {RenderContext} renderContext - The render context. - * @return {string} The GPU texture format of the default color attachment. - */ - getCurrentColorFormat(renderContext: RenderContext): string; - /** - * Returns the GPU formats of all color attachments of the current render context. - * - * @param {RenderContext} renderContext - The render context. - * @return {Array} The GPU texture formats of all color attachments. - */ - getCurrentColorFormats(renderContext: RenderContext): Array; - /** - * Returns the output color space of the current render context. - * - * @param {RenderContext} renderContext - The render context. - * @return {string} The output color space. - */ - getCurrentColorSpace(renderContext: RenderContext): string; - /** - * Returns GPU primitive topology for the given object and material. - * - * @param {Object3D} object - The 3D object. - * @param {Material} material - The material. - * @return {string} The GPU primitive topology. - */ - getPrimitiveTopology(object: Object3D, material: Material): string; - /** - * Returns a modified sample count from the given sample count value. - * - * That is required since WebGPU only supports either 1 or 4. - * - * @param {number} sampleCount - The input sample count. - * @return {number} The (potentially updated) output sample count. - */ - getSampleCount(sampleCount: number): number; - /** - * Returns the sample count of the given render context. - * - * @param {RenderContext} renderContext - The render context. - * @return {number} The sample count. - */ - getSampleCountRenderContext(renderContext: RenderContext): number; - /** - * Returns the preferred canvas format. - * - * There is a separate method for this so it's possible to - * honor edge cases for specific devices. - * - * @return {string} The GPU texture format of the canvas. - */ - getPreferredCanvasFormat(): string; -} diff --git a/jsdoc-testing/jsdoc/src/renderers/webxr/WebXRController.d.ts b/jsdoc-testing/jsdoc/src/renderers/webxr/WebXRController.d.ts deleted file mode 100644 index 91dbb3340..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webxr/WebXRController.d.ts +++ /dev/null @@ -1,96 +0,0 @@ -/** - * Class for representing a XR controller with its - * different coordinate systems. - * - * @private - */ -export class WebXRController { - /** - * A group representing the target ray space - * of the XR controller. - * - * @private - * @type {?Group} - * @default null - */ - private _targetRay; - /** - * A group representing the grip space - * of the XR controller. - * - * @private - * @type {?Group} - * @default null - */ - private _grip; - /** - * A group representing the hand space - * of the XR controller. - * - * @private - * @type {?Group} - * @default null - */ - private _hand; - /** - * Returns a group representing the hand space of the XR controller. - * - * @return {Group} A group representing the hand space of the XR controller. - */ - getHandSpace(): Group; - /** - * Returns a group representing the target ray space of the XR controller. - * - * @return {Group} A group representing the target ray space of the XR controller. - */ - getTargetRaySpace(): Group; - /** - * Returns a group representing the grip space of the XR controller. - * - * @return {Group} A group representing the grip space of the XR controller. - */ - getGripSpace(): Group; - /** - * Dispatches the given event to the groups representing - * the different coordinate spaces of the XR controller. - * - * @param {Object} event - The event to dispatch. - * @return {WebXRController} A reference to this instance. - */ - dispatchEvent(event: Object): WebXRController; - /** - * Connects the controller with the given XR input source. - * - * @param {XRInputSource} inputSource - The input source. - * @return {WebXRController} A reference to this instance. - */ - connect(inputSource: XRInputSource): WebXRController; - /** - * Disconnects the controller from the given XR input source. - * - * @param {XRInputSource} inputSource - The input source. - * @return {WebXRController} A reference to this instance. - */ - disconnect(inputSource: XRInputSource): WebXRController; - /** - * Updates the controller with the given input source, XR frame and reference space. - * This updates the transformations of the groups that represent the different - * coordinate systems of the controller. - * - * @param {XRInputSource} inputSource - The input source. - * @param {XRFrame} frame - The XR frame. - * @param {XRReferenceSpace} referenceSpace - The reference space. - * @return {WebXRController} A reference to this instance. - */ - update(inputSource: XRInputSource, frame: XRFrame, referenceSpace: XRReferenceSpace): WebXRController; - /** - * Returns a group representing the hand joint for the given input joint. - * - * @private - * @param {Group} hand - The group representing the hand space. - * @param {XRJointSpace} inputjoint - The hand joint data. - * @return {Group} A group representing the hand joint for the given input joint. - */ - private _getHandJoint; -} -import { Group } from '../../objects/Group.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webxr/WebXRDepthSensing.d.ts b/jsdoc-testing/jsdoc/src/renderers/webxr/WebXRDepthSensing.d.ts deleted file mode 100644 index aaa8ad7cf..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webxr/WebXRDepthSensing.d.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * A XR module that manages the access to the Depth Sensing API. - */ -export class WebXRDepthSensing { - /** - * An opaque texture representing the depth of the user's environment. - * - * @type {?ExternalTexture} - */ - texture: ExternalTexture | null; - /** - * A plane mesh for visualizing the depth texture. - * - * @type {?Mesh} - */ - mesh: Mesh | null; - /** - * The depth near value. - * - * @type {number} - */ - depthNear: number; - /** - * The depth near far. - * - * @type {number} - */ - depthFar: number; - /** - * Inits the depth sensing module - * - * @param {XRWebGLDepthInformation} depthData - The XR depth data. - * @param {XRRenderState} renderState - The XR render state. - */ - init(depthData: XRWebGLDepthInformation, renderState: XRRenderState): void; - /** - * Returns a plane mesh that visualizes the depth texture. - * - * @param {ArrayCamera} cameraXR - The XR camera. - * @return {?Mesh} The plane mesh. - */ - getMesh(cameraXR: ArrayCamera): Mesh | null; - /** - * Resets the module - */ - reset(): void; - /** - * Returns a texture representing the depth of the user's environment. - * - * @return {?ExternalTexture} The depth texture. - */ - getDepthTexture(): ExternalTexture | null; -} -import { ExternalTexture } from '../../textures/ExternalTexture.js'; -import { Mesh } from '../../objects/Mesh.js'; diff --git a/jsdoc-testing/jsdoc/src/renderers/webxr/WebXRManager.d.ts b/jsdoc-testing/jsdoc/src/renderers/webxr/WebXRManager.d.ts deleted file mode 100644 index edab6f90c..000000000 --- a/jsdoc-testing/jsdoc/src/renderers/webxr/WebXRManager.d.ts +++ /dev/null @@ -1,220 +0,0 @@ -/** - * This class represents an abstraction of the WebXR Device API and is - * internally used by {@link WebGLRenderer}. `WebXRManager` also provides a public - * interface that allows users to enable/disable XR and perform XR related - * tasks like for instance retrieving controllers. - * - * @augments EventDispatcher - * @hideconstructor - */ -export class WebXRManager extends EventDispatcher { - /** - * Constructs a new WebGL renderer. - * - * @param {WebGLRenderer} renderer - The renderer. - * @param {WebGL2RenderingContext} gl - The rendering context. - */ - constructor(renderer: WebGLRenderer, gl: WebGL2RenderingContext); - /** - * Whether the manager's XR camera should be automatically updated or not. - * - * @type {boolean} - * @default true - */ - cameraAutoUpdate: boolean; - /** - * This flag notifies the renderer to be ready for XR rendering. Set it to `true` - * if you are going to use XR in your app. - * - * @type {boolean} - * @default false - */ - enabled: boolean; - /** - * Whether XR presentation is active or not. - * - * @type {boolean} - * @readonly - * @default false - */ - readonly isPresenting: boolean; - /** - * Returns a group representing the `target ray` space of the XR controller. - * Use this space for visualizing 3D objects that support the user in pointing - * tasks like UI interaction. - * - * @param {number} index - The index of the controller. - * @return {Group} A group representing the `target ray` space. - */ - getController: (index: number) => Group; - /** - * Returns a group representing the `grip` space of the XR controller. - * Use this space for visualizing 3D objects that support the user in pointing - * tasks like UI interaction. - * - * Note: If you want to show something in the user's hand AND offer a - * pointing ray at the same time, you'll want to attached the handheld object - * to the group returned by `getControllerGrip()` and the ray to the - * group returned by `getController()`. The idea is to have two - * different groups in two different coordinate spaces for the same WebXR - * controller. - * - * @param {number} index - The index of the controller. - * @return {Group} A group representing the `grip` space. - */ - getControllerGrip: (index: number) => Group; - /** - * Returns a group representing the `hand` space of the XR controller. - * Use this space for visualizing 3D objects that support the user in pointing - * tasks like UI interaction. - * - * @param {number} index - The index of the controller. - * @return {Group} A group representing the `hand` space. - */ - getHand: (index: number) => Group; - /** - * Sets the framebuffer scale factor. - * - * This method can not be used during a XR session. - * - * @param {number} value - The framebuffer scale factor. - */ - setFramebufferScaleFactor: (value: number) => void; - /** - * Sets the reference space type. Can be used to configure a spatial relationship with the user's physical - * environment. Depending on how the user moves in 3D space, setting an appropriate reference space can - * improve tracking. Default is `local-floor`. Valid values can be found here - * https://developer.mozilla.org/en-US/docs/Web/API/XRReferenceSpace#reference_space_types. - * - * This method can not be used during a XR session. - * - * @param {string} value - The reference space type. - */ - setReferenceSpaceType: (value: string) => void; - /** - * Returns the XR reference space. - * - * @return {XRReferenceSpace} The XR reference space. - */ - getReferenceSpace: () => XRReferenceSpace; - /** - * Sets a custom XR reference space. - * - * @param {XRReferenceSpace} space - The XR reference space. - */ - setReferenceSpace: (space: XRReferenceSpace) => void; - /** - * Returns the current base layer. - * - * This is an `XRProjectionLayer` when the targeted XR device supports the - * WebXR Layers API, or an `XRWebGLLayer` otherwise. - * - * @return {?(XRWebGLLayer|XRProjectionLayer)} The XR base layer. - */ - getBaseLayer: () => (XRWebGLLayer | XRProjectionLayer) | null; - /** - * Returns the current XR binding. - * - * Creates a new binding if needed and the browser is - * capable of doing so. - * - * @return {?XRWebGLBinding} The XR binding. Returns `null` if one cannot be created. - */ - getBinding: () => XRWebGLBinding | null; - /** - * Returns the current XR frame. - * - * @return {?XRFrame} The XR frame. Returns `null` when used outside a XR session. - */ - getFrame: () => XRFrame | null; - /** - * Returns the current XR session. - * - * @return {?XRSession} The XR session. Returns `null` when used outside a XR session. - */ - getSession: () => XRSession | null; - /** - * After a XR session has been requested usually with one of the `*Button` modules, it - * is injected into the renderer with this method. This method triggers the start of - * the actual XR rendering. - * - * @async - * @param {XRSession} value - The XR session to set. - * @return {Promise} A Promise that resolves when the session has been set. - */ - setSession: (value: XRSession) => Promise; - /** - * Returns the environment blend mode from the current XR session. - * - * @return {'opaque'|'additive'|'alpha-blend'|undefined} The environment blend mode. Returns `undefined` when used outside of a XR session. - */ - getEnvironmentBlendMode: () => "opaque" | "additive" | "alpha-blend" | undefined; - /** - * Returns the current depth texture computed via depth sensing. - * - * See {@link WebXRDepthSensing#getDepthTexture}. - * - * @return {?Texture} The depth texture. - */ - getDepthTexture: () => Texture | null; - /** - * Updates the state of the XR camera. Use this method on app level if you - * set `cameraAutoUpdate` to `false`. The method requires the non-XR - * camera of the scene as a parameter. The passed in camera's transformation - * is automatically adjusted to the position of the XR camera when calling - * this method. - * - * @param {Camera} camera - The camera. - */ - updateCamera: (camera: Camera) => void; - /** - * Returns an instance of {@link ArrayCamera} which represents the XR camera - * of the active XR session. For each view it holds a separate camera object. - * - * The camera's `fov` is currently not used and does not reflect the fov of - * the XR camera. If you need the fov on app level, you have to compute in - * manually from the XR camera's projection matrices. - * - * @return {ArrayCamera} The XR camera. - */ - getCamera: () => ArrayCamera; - /** - * Returns the amount of foveation used by the XR compositor for the projection layer. - * - * @return {number|undefined} The amount of foveation. - */ - getFoveation: () => number | undefined; - /** - * Sets the foveation value. - * - * @param {number} value - A number in the range `[0,1]` where `0` means no foveation (full resolution) - * and `1` means maximum foveation (the edges render at lower resolution). - */ - setFoveation: (value: number) => void; - /** - * Returns `true` if depth sensing is supported. - * - * @return {boolean} Whether depth sensing is supported or not. - */ - hasDepthSensing: () => boolean; - /** - * Returns the depth sensing mesh. - * - * See {@link WebXRDepthSensing#getMesh}. - * - * @return {Mesh} The depth sensing mesh. - */ - getDepthSensingMesh: () => Mesh; - /** - * Retrieves an opaque texture from the view-aligned {@link XRCamera}. - * Only available during the current animation loop. - * - * @param {XRCamera} xrCamera - The camera to query. - * @return {?Texture} An opaque texture representing the current raw camera frame. - */ - getCameraTexture: (xrCamera: XRCamera) => Texture | null; - setAnimationLoop: (callback: any) => void; - dispose: () => void; -} -import { EventDispatcher } from '../../core/EventDispatcher.js'; -import { ArrayCamera } from '../../cameras/ArrayCamera.js'; diff --git a/jsdoc-testing/jsdoc/src/scenes/Fog.d.ts b/jsdoc-testing/jsdoc/src/scenes/Fog.d.ts deleted file mode 100644 index 3c17089bd..000000000 --- a/jsdoc-testing/jsdoc/src/scenes/Fog.d.ts +++ /dev/null @@ -1,70 +0,0 @@ -/** - * This class can be used to define a linear fog that grows linearly denser - * with the distance. - * - * ```js - * const scene = new THREE.Scene(); - * scene.fog = new THREE.Fog( 0xcccccc, 10, 15 ); - * ``` - */ -export class Fog { - /** - * Constructs a new fog. - * - * @param {number|Color} color - The fog's color. - * @param {number} [near=1] - The minimum distance to start applying fog. - * @param {number} [far=1000] - The maximum distance at which fog stops being calculated and applied. - */ - constructor(color: number | Color, near?: number, far?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isFog: boolean; - /** - * The name of the fog. - * - * @type {string} - */ - name: string; - /** - * The fog's color. - * - * @type {Color} - */ - color: Color; - /** - * The minimum distance to start applying fog. Objects that are less than - * `near` units from the active camera won't be affected by fog. - * - * @type {number} - * @default 1 - */ - near: number; - /** - * The maximum distance at which fog stops being calculated and applied. - * Objects that are more than `far` units away from the active camera won't - * be affected by fog. - * - * @type {number} - * @default 1000 - */ - far: number; - /** - * Returns a new fog with copied values from this instance. - * - * @return {Fog} A clone of this instance. - */ - clone(): Fog; - /** - * Serializes the fog into JSON. - * - * @param {?(Object|string)} meta - An optional value holding meta information about the serialization. - * @return {Object} A JSON object representing the serialized fog - */ - toJSON(): Object; -} -import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/scenes/FogExp2.d.ts b/jsdoc-testing/jsdoc/src/scenes/FogExp2.d.ts deleted file mode 100644 index e11462391..000000000 --- a/jsdoc-testing/jsdoc/src/scenes/FogExp2.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * This class can be used to define an exponential squared fog, - * which gives a clear view near the camera and a faster than exponentially - * densening fog farther from the camera. - * - * ```js - * const scene = new THREE.Scene(); - * scene.fog = new THREE.FogExp2( 0xcccccc, 0.002 ); - * ``` - */ -export class FogExp2 { - /** - * Constructs a new fog. - * - * @param {number|Color} color - The fog's color. - * @param {number} [density=0.00025] - Defines how fast the fog will grow dense. - */ - constructor(color: number | Color, density?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isFogExp2: boolean; - /** - * The name of the fog. - * - * @type {string} - */ - name: string; - /** - * The fog's color. - * - * @type {Color} - */ - color: Color; - /** - * Defines how fast the fog will grow dense. - * - * @type {number} - * @default 0.00025 - */ - density: number; - /** - * Returns a new fog with copied values from this instance. - * - * @return {FogExp2} A clone of this instance. - */ - clone(): FogExp2; - /** - * Serializes the fog into JSON. - * - * @param {?(Object|string)} meta - An optional value holding meta information about the serialization. - * @return {Object} A JSON object representing the serialized fog - */ - toJSON(): Object; -} -import { Color } from '../math/Color.js'; diff --git a/jsdoc-testing/jsdoc/src/scenes/Scene.d.ts b/jsdoc-testing/jsdoc/src/scenes/Scene.d.ts deleted file mode 100644 index 91ed09ab6..000000000 --- a/jsdoc-testing/jsdoc/src/scenes/Scene.d.ts +++ /dev/null @@ -1,97 +0,0 @@ -/** - * Scenes allow you to set up what is to be rendered and where by three.js. - * This is where you place 3D objects like meshes, lines or lights. - * - * @augments Object3D - */ -export class Scene extends Object3D { - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isScene: boolean; - type: string; - /** - * Defines the background of the scene. Valid inputs are: - * - * - A color for defining a uniform colored background. - * - A texture for defining a (flat) textured background. - * - Cube textures or equirectangular textures for defining a skybox. - * - * @type {?(Color|Texture)} - * @default null - */ - background: (Color | Texture) | null; - /** - * Sets the environment map for all physical materials in the scene. However, - * it's not possible to overwrite an existing texture assigned to the `envMap` - * material property. - * - * @type {?Texture} - * @default null - */ - environment: Texture | null; - /** - * A fog instance defining the type of fog that affects everything - * rendered in the scene. - * - * @type {?(Fog|FogExp2)} - * @default null - */ - fog: (Fog | FogExp2) | null; - /** - * Sets the blurriness of the background. Only influences environment maps - * assigned to {@link Scene#background}. Valid input is a float between `0` - * and `1`. - * - * @type {number} - * @default 0 - */ - backgroundBlurriness: number; - /** - * Attenuates the color of the background. Only applies to background textures. - * - * @type {number} - * @default 1 - */ - backgroundIntensity: number; - /** - * The rotation of the background in radians. Only influences environment maps - * assigned to {@link Scene#background}. - * - * @type {Euler} - * @default (0,0,0) - */ - backgroundRotation: Euler; - /** - * Attenuates the color of the environment. Only influences environment maps - * assigned to {@link Scene#environment}. - * - * @type {number} - * @default 1 - */ - environmentIntensity: number; - /** - * The rotation of the environment map in radians. Only influences physical materials - * in the scene when {@link Scene#environment} is used. - * - * @type {Euler} - * @default (0,0,0) - */ - environmentRotation: Euler; - /** - * Forces everything in the scene to be rendered with the defined material. It is possible - * to exclude materials from override by setting {@link Material#allowOverride} to `false`. - * - * @type {?Material} - * @default null - */ - overrideMaterial: Material | null; - copy(source: any, recursive: any): this; - toJSON(meta: any): Object; -} -import { Object3D } from '../core/Object3D.js'; -import { Euler } from '../math/Euler.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/CanvasTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/CanvasTexture.d.ts deleted file mode 100644 index ee88d4d2b..000000000 --- a/jsdoc-testing/jsdoc/src/textures/CanvasTexture.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Creates a texture from a canvas element. - * - * This is almost the same as the base texture class, except that it sets {@link Texture#needsUpdate} - * to `true` immediately since a canvas can directly be used for rendering. - * - * @augments Texture - */ -export class CanvasTexture extends Texture { - /** - * Constructs a new texture. - * - * @param {HTMLCanvasElement} [canvas] - The HTML canvas element. - * @param {number} [mapping=Texture.DEFAULT_MAPPING] - The texture mapping. - * @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value. - * @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value. - * @param {number} [magFilter=LinearFilter] - The mag filter value. - * @param {number} [minFilter=LinearMipmapLinearFilter] - The min filter value. - * @param {number} [format=RGBAFormat] - The texture format. - * @param {number} [type=UnsignedByteType] - The texture type. - * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value. - */ - constructor(canvas?: HTMLCanvasElement, mapping?: number, wrapS?: number, wrapT?: number, magFilter?: number, minFilter?: number, format?: number, type?: number, anisotropy?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isCanvasTexture: boolean; -} -import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/CompressedArrayTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/CompressedArrayTexture.d.ts deleted file mode 100644 index 5e6a9f0f9..000000000 --- a/jsdoc-testing/jsdoc/src/textures/CompressedArrayTexture.d.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Creates a texture 2D array based on data in compressed form. - * - * These texture are usually loaded with {@link CompressedTextureLoader}. - * - * @augments CompressedTexture - */ -export class CompressedArrayTexture extends CompressedTexture { - /** - * Constructs a new compressed array texture. - * - * @param {Array} mipmaps - This array holds for all mipmaps (including the bases mip) - * the data and dimensions. - * @param {number} width - The width of the texture. - * @param {number} height - The height of the texture. - * @param {number} depth - The depth of the texture. - * @param {number} [format=RGBAFormat] - The min filter value. - * @param {number} [type=UnsignedByteType] - The min filter value. - */ - constructor(mipmaps: Array, width: number, height: number, depth: number, format?: number, type?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isCompressedArrayTexture: boolean; - /** - * This defines how the texture is wrapped in the depth and corresponds to - * *W* in UVW mapping. - * - * @type {(RepeatWrapping|ClampToEdgeWrapping|MirroredRepeatWrapping)} - * @default ClampToEdgeWrapping - */ - wrapR: (RepeatWrapping | number | MirroredRepeatWrapping); - /** - * A set of all layers which need to be updated in the texture. - * - * @type {Set} - */ - layerUpdates: Set; - /** - * Describes that a specific layer of the texture needs to be updated. - * Normally when {@link Texture#needsUpdate} is set to `true`, the - * entire compressed texture array is sent to the GPU. Marking specific - * layers will only transmit subsets of all mipmaps associated with a - * specific depth in the array which is often much more performant. - * - * @param {number} layerIndex - The layer index that should be updated. - */ - addLayerUpdate(layerIndex: number): void; - /** - * Resets the layer updates registry. - */ - clearLayerUpdates(): void; -} -import { CompressedTexture } from './CompressedTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/CompressedCubeTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/CompressedCubeTexture.d.ts deleted file mode 100644 index 05f09fbfb..000000000 --- a/jsdoc-testing/jsdoc/src/textures/CompressedCubeTexture.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Creates a cube texture based on data in compressed form. - * - * These texture are usually loaded with {@link CompressedTextureLoader}. - * - * @augments CompressedTexture - */ -export class CompressedCubeTexture extends CompressedTexture { - /** - * Constructs a new compressed texture. - * - * @param {Array} images - An array of compressed textures. - * @param {number} [format=RGBAFormat] - The texture format. - * @param {number} [type=UnsignedByteType] - The texture type. - */ - constructor(images: Array, format?: number, type?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isCompressedCubeTexture: boolean; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isCubeTexture: boolean; - image: CompressedTexture[]; -} -import { CompressedTexture } from './CompressedTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/CompressedTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/CompressedTexture.d.ts deleted file mode 100644 index 3d1d77673..000000000 --- a/jsdoc-testing/jsdoc/src/textures/CompressedTexture.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Creates a texture based on data in compressed form. - * - * These texture are usually loaded with {@link CompressedTextureLoader}. - * - * @augments Texture - */ -export class CompressedTexture extends Texture { - /** - * Constructs a new compressed texture. - * - * @param {Array} mipmaps - This array holds for all mipmaps (including the bases mip) - * the data and dimensions. - * @param {number} width - The width of the texture. - * @param {number} height - The height of the texture. - * @param {number} [format=RGBAFormat] - The texture format. - * @param {number} [type=UnsignedByteType] - The texture type. - * @param {number} [mapping=Texture.DEFAULT_MAPPING] - The texture mapping. - * @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value. - * @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value. - * @param {number} [magFilter=LinearFilter] - The mag filter value. - * @param {number} [minFilter=LinearMipmapLinearFilter] - The min filter value. - * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value. - * @param {string} [colorSpace=NoColorSpace] - The color space. - */ - constructor(mipmaps: Array, width: number, height: number, format?: number, type?: number, mapping?: number, wrapS?: number, wrapT?: number, magFilter?: number, minFilter?: number, anisotropy?: number, colorSpace?: string); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isCompressedTexture: boolean; -} -import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/CubeDepthTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/CubeDepthTexture.d.ts deleted file mode 100644 index c436fb9e7..000000000 --- a/jsdoc-testing/jsdoc/src/textures/CubeDepthTexture.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -/** - * This class can be used to automatically save the depth information of a - * cube rendering into a cube texture with depth format. Used for PointLight shadows. - * - * @augments DepthTexture - */ -export class CubeDepthTexture extends DepthTexture { - /** - * Constructs a new cube depth texture. - * - * @param {number} size - The size (width and height) of each cube face. - * @param {number} [type=UnsignedIntType] - The texture type. - * @param {number} [mapping=CubeReflectionMapping] - The texture mapping. - * @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value. - * @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value. - * @param {number} [magFilter=NearestFilter] - The mag filter value. - * @param {number} [minFilter=NearestFilter] - The min filter value. - * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value. - * @param {number} [format=DepthFormat] - The texture format. - */ - constructor(size: number, type?: number, mapping?: number, wrapS?: number, wrapT?: number, magFilter?: number, minFilter?: number, anisotropy?: number, format?: number); - image: { - width: number; - height: number; - depth: number; - }[]; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isCubeDepthTexture: boolean; - /** - * Set to true for cube texture handling in WebGLTextures. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isCubeTexture: boolean; - set images(value: Array HTMLImageElement>); - /** - * Alias for {@link CubeDepthTexture#image}. - * - * @type {Array} - */ - get images(): Array HTMLImageElement>; -} -import { DepthTexture } from './DepthTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/CubeTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/CubeTexture.d.ts deleted file mode 100644 index 76c1ce43d..000000000 --- a/jsdoc-testing/jsdoc/src/textures/CubeTexture.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Creates a cube texture made up of six images. - * - * ```js - * const loader = new THREE.CubeTextureLoader(); - * loader.setPath( 'textures/cube/pisa/' ); - * - * const textureCube = loader.load( [ - * 'px.png', 'nx.png', 'py.png', 'ny.png', 'pz.png', 'nz.png' - * ] ); - * - * const material = new THREE.MeshBasicMaterial( { color: 0xffffff, envMap: textureCube } ); - * ``` - * - * @augments Texture - */ -export class CubeTexture extends Texture { - /** - * Constructs a new cube texture. - * - * @param {Array} [images=[]] - An array holding a image for each side of a cube. - * @param {number} [mapping=CubeReflectionMapping] - The texture mapping. - * @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value. - * @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value. - * @param {number} [magFilter=LinearFilter] - The mag filter value. - * @param {number} [minFilter=LinearMipmapLinearFilter] - The min filter value. - * @param {number} [format=RGBAFormat] - The texture format. - * @param {number} [type=UnsignedByteType] - The texture type. - * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value. - * @param {string} [colorSpace=NoColorSpace] - The color space value. - */ - constructor(images?: Array HTMLImageElement>, mapping?: number, wrapS?: number, wrapT?: number, magFilter?: number, minFilter?: number, format?: number, type?: number, anisotropy?: number, colorSpace?: string); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isCubeTexture: boolean; - set images(value: Array HTMLImageElement>); - /** - * Alias for {@link CubeTexture#image}. - * - * @type {Array} - */ - get images(): Array HTMLImageElement>; -} -import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/Data3DTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/Data3DTexture.d.ts deleted file mode 100644 index 877df941e..000000000 --- a/jsdoc-testing/jsdoc/src/textures/Data3DTexture.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Creates a three-dimensional texture from raw data, with parameters to - * divide it into width, height, and depth. - * - * @augments Texture - */ -export class Data3DTexture extends Texture { - /** - * Constructs a new data array texture. - * - * @param {?TypedArray} [data=null] - The buffer data. - * @param {number} [width=1] - The width of the texture. - * @param {number} [height=1] - The height of the texture. - * @param {number} [depth=1] - The depth of the texture. - */ - constructor(data?: TypedArray | null, width?: number, height?: number, depth?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isData3DTexture: boolean; - /** - * This defines how the texture is wrapped in the depth and corresponds to - * *W* in UVW mapping. - * - * @type {(RepeatWrapping|ClampToEdgeWrapping|MirroredRepeatWrapping)} - * @default ClampToEdgeWrapping - */ - wrapR: (RepeatWrapping | number | MirroredRepeatWrapping); -} -import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/DataArrayTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/DataArrayTexture.d.ts deleted file mode 100644 index 7b9225b8e..000000000 --- a/jsdoc-testing/jsdoc/src/textures/DataArrayTexture.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Creates an array of textures directly from raw buffer data. - * - * @augments Texture - */ -export class DataArrayTexture extends Texture { - /** - * Constructs a new data array texture. - * - * @param {?TypedArray} [data=null] - The buffer data. - * @param {number} [width=1] - The width of the texture. - * @param {number} [height=1] - The height of the texture. - * @param {number} [depth=1] - The depth of the texture. - */ - constructor(data?: TypedArray | null, width?: number, height?: number, depth?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isDataArrayTexture: boolean; - /** - * This defines how the texture is wrapped in the depth and corresponds to - * *W* in UVW mapping. - * - * @type {(RepeatWrapping|ClampToEdgeWrapping|MirroredRepeatWrapping)} - * @default ClampToEdgeWrapping - */ - wrapR: (RepeatWrapping | number | MirroredRepeatWrapping); - /** - * A set of all layers which need to be updated in the texture. - * - * @type {Set} - */ - layerUpdates: Set; - /** - * Describes that a specific layer of the texture needs to be updated. - * Normally when {@link Texture#needsUpdate} is set to `true`, the - * entire data texture array is sent to the GPU. Marking specific - * layers will only transmit subsets of all mipmaps associated with a - * specific depth in the array which is often much more performant. - * - * @param {number} layerIndex - The layer index that should be updated. - */ - addLayerUpdate(layerIndex: number): void; - /** - * Resets the layer updates registry. - */ - clearLayerUpdates(): void; -} -import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/DataTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/DataTexture.d.ts deleted file mode 100644 index 8bec07e5d..000000000 --- a/jsdoc-testing/jsdoc/src/textures/DataTexture.d.ts +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Creates a texture directly from raw buffer data. - * - * The interpretation of the data depends on type and format: If the type is - * `UnsignedByteType`, a `Uint8Array` will be useful for addressing the - * texel data. If the format is `RGBAFormat`, data needs four values for - * one texel; Red, Green, Blue and Alpha (typically the opacity). - * - * @augments Texture - */ -export class DataTexture extends Texture { - /** - * Constructs a new data texture. - * - * @param {?TypedArray} [data=null] - The buffer data. - * @param {number} [width=1] - The width of the texture. - * @param {number} [height=1] - The height of the texture. - * @param {number} [format=RGBAFormat] - The texture format. - * @param {number} [type=UnsignedByteType] - The texture type. - * @param {number} [mapping=Texture.DEFAULT_MAPPING] - The texture mapping. - * @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value. - * @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value. - * @param {number} [magFilter=NearestFilter] - The mag filter value. - * @param {number} [minFilter=NearestFilter] - The min filter value. - * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value. - * @param {string} [colorSpace=NoColorSpace] - The color space. - */ - constructor(data?: TypedArray | null, width?: number, height?: number, format?: number, type?: number, mapping?: number, wrapS?: number, wrapT?: number, magFilter?: number, minFilter?: number, anisotropy?: number, colorSpace?: string); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isDataTexture: boolean; -} -import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/DepthTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/DepthTexture.d.ts deleted file mode 100644 index 7d3a969ed..000000000 --- a/jsdoc-testing/jsdoc/src/textures/DepthTexture.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * This class can be used to automatically save the depth information of a - * rendering into a texture. - * - * @augments Texture - */ -export class DepthTexture extends Texture { - /** - * Constructs a new depth texture. - * - * @param {number} width - The width of the texture. - * @param {number} height - The height of the texture. - * @param {number} [type=UnsignedIntType] - The texture type. - * @param {number} [mapping=Texture.DEFAULT_MAPPING] - The texture mapping. - * @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value. - * @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value. - * @param {number} [magFilter=LinearFilter] - The mag filter value. - * @param {number} [minFilter=LinearFilter] - The min filter value. - * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value. - * @param {number} [format=DepthFormat] - The texture format. - * @param {number} [depth=1] - The depth of the texture. - */ - constructor(width: number, height: number, type?: number, mapping?: number, wrapS?: number, wrapT?: number, magFilter?: number, minFilter?: number, anisotropy?: number, format?: number, depth?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isDepthTexture: boolean; - /** - * Code corresponding to the depth compare function. - * - * @type {?(NeverCompare|LessCompare|EqualCompare|LessEqualCompare|GreaterCompare|NotEqualCompare|GreaterEqualCompare|AlwaysCompare)} - * @default null - */ - compareFunction: (NeverCompare | LessCompare | EqualCompare | LessEqualCompare | GreaterCompare | NotEqualCompare | GreaterEqualCompare | AlwaysCompare) | null; - copy(source: any): this; - toJSON(meta: any): Object; -} -import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/ExternalTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/ExternalTexture.d.ts deleted file mode 100644 index e14a5d7b9..000000000 --- a/jsdoc-testing/jsdoc/src/textures/ExternalTexture.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Represents a texture created externally with the same renderer context. - * - * This may be a texture from a protected media stream, device camera feed, - * or other data feeds like a depth sensor. - * - * Note that this class is only supported in {@link WebGLRenderer}, and in - * the {@link WebGPURenderer} WebGPU backend. - * - * @augments Texture - */ -export class ExternalTexture extends Texture { - /** - * Creates a new raw texture. - * - * @param {?(WebGLTexture|GPUTexture)} [sourceTexture=null] - The external texture. - */ - constructor(sourceTexture?: (WebGLTexture | GPUTexture) | null); - /** - * The external source texture. - * - * @type {?(WebGLTexture|GPUTexture)} - * @default null - */ - sourceTexture: (WebGLTexture | GPUTexture) | null; - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isExternalTexture: boolean; - copy(source: any): this; -} -import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/FramebufferTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/FramebufferTexture.d.ts deleted file mode 100644 index 0de9064c8..000000000 --- a/jsdoc-testing/jsdoc/src/textures/FramebufferTexture.d.ts +++ /dev/null @@ -1,42 +0,0 @@ -/** - * This class can only be used in combination with `copyFramebufferToTexture()` methods - * of renderers. It extracts the contents of the current bound framebuffer and provides it - * as a texture for further usage. - * - * ```js - * const pixelRatio = window.devicePixelRatio; - * const textureSize = 128 * pixelRatio; - * - * const frameTexture = new FramebufferTexture( textureSize, textureSize ); - * - * // calculate start position for copying part of the frame data - * const vector = new Vector2(); - * vector.x = ( window.innerWidth * pixelRatio / 2 ) - ( textureSize / 2 ); - * vector.y = ( window.innerHeight * pixelRatio / 2 ) - ( textureSize / 2 ); - * - * renderer.render( scene, camera ); - * - * // copy part of the rendered frame into the framebuffer texture - * renderer.copyFramebufferToTexture( frameTexture, vector ); - * ``` - * - * @augments Texture - */ -export class FramebufferTexture extends Texture { - /** - * Constructs a new framebuffer texture. - * - * @param {number} [width] - The width of the texture. - * @param {number} [height] - The height of the texture. - */ - constructor(width?: number, height?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isFramebufferTexture: boolean; -} -import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/HTMLTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/HTMLTexture.d.ts deleted file mode 100644 index bdf594cf7..000000000 --- a/jsdoc-testing/jsdoc/src/textures/HTMLTexture.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Creates a texture from an HTML element. - * - * This is almost the same as the base texture class, except that it sets {@link Texture#needsUpdate} - * to `true` immediately and listens for the parent canvas's paint events to trigger updates. - * - * @augments Texture - */ -export class HTMLTexture extends Texture { - /** - * Constructs a new texture. - * - * @param {HTMLElement} [element] - The HTML element. - * @param {number} [mapping=Texture.DEFAULT_MAPPING] - The texture mapping. - * @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value. - * @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value. - * @param {number} [magFilter=LinearFilter] - The mag filter value. - * @param {number} [minFilter=LinearMipmapLinearFilter] - The min filter value. - * @param {number} [format=RGBAFormat] - The texture format. - * @param {number} [type=UnsignedByteType] - The texture type. - * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value. - */ - constructor(element?: HTMLElement, mapping?: number, wrapS?: number, wrapT?: number, magFilter?: number, minFilter?: number, format?: number, type?: number, anisotropy?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isHTMLTexture: boolean; -} -import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/Source.d.ts b/jsdoc-testing/jsdoc/src/textures/Source.d.ts deleted file mode 100644 index d4fbed15c..000000000 --- a/jsdoc-testing/jsdoc/src/textures/Source.d.ts +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Represents the data source of a texture. - * - * The main purpose of this class is to decouple the data definition from the texture - * definition so the same data can be used with multiple texture instances. - */ -export class Source { - /** - * Constructs a new video texture. - * - * @param {any} [data=null] - The data definition of a texture. - */ - constructor(data?: any); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isSource: boolean; - /** - * The UUID of the source. - * - * @type {string} - * @readonly - */ - readonly uuid: string; - /** - * The data definition of a texture. - * - * @type {any} - */ - data: any; - /** - * This property is only relevant when {@link Source#needsUpdate} is set to `true` and - * provides more control on how texture data should be processed. When `dataReady` is set - * to `false`, the engine performs the memory allocation (if necessary) but does not transfer - * the data into the GPU memory. - * - * @type {boolean} - * @default true - */ - dataReady: boolean; - /** - * This starts at `0` and counts how many times {@link Source#needsUpdate} is set to `true`. - * - * @type {number} - * @readonly - * @default 0 - */ - readonly version: number; - /** - * Returns the dimensions of the source into the given target vector. - * - * @param {(Vector2|Vector3)} target - The target object the result is written into. - * @return {(Vector2|Vector3)} The dimensions of the source. - */ - getSize(target: (Vector2 | Vector3)): (Vector2 | Vector3); - /** - * When the property is set to `true`, the engine allocates the memory - * for the texture (if necessary) and triggers the actual texture upload - * to the GPU next time the source is used. - * - * @type {boolean} - * @default false - * @param {boolean} value - */ - set needsUpdate(value: boolean); - /** - * Serializes the source into JSON. - * - * @param {?(Object|string)} meta - An optional value holding meta information about the serialization. - * @return {Object} A JSON object representing the serialized source. - * @see {@link ObjectLoader#parse} - */ - toJSON(meta: (Object | string) | null): Object; -} diff --git a/jsdoc-testing/jsdoc/src/textures/Texture.d.ts b/jsdoc-testing/jsdoc/src/textures/Texture.d.ts deleted file mode 100644 index dbf4420fe..000000000 --- a/jsdoc-testing/jsdoc/src/textures/Texture.d.ts +++ /dev/null @@ -1,413 +0,0 @@ -/** - * Base class for all textures. - * - * Note: After the initial use of a texture, its dimensions, format, and type - * cannot be changed. Instead, call {@link Texture#dispose} on the texture and instantiate a new one. - * - * @augments EventDispatcher - */ -export class Texture extends EventDispatcher { - /** - * Constructs a new texture. - * - * @param {?Object} [image=Texture.DEFAULT_IMAGE] - The image holding the texture data. - * @param {number} [mapping=Texture.DEFAULT_MAPPING] - The texture mapping. - * @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value. - * @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value. - * @param {number} [magFilter=LinearFilter] - The mag filter value. - * @param {number} [minFilter=LinearMipmapLinearFilter] - The min filter value. - * @param {number} [format=RGBAFormat] - The texture format. - * @param {number} [type=UnsignedByteType] - The texture type. - * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value. - * @param {string} [colorSpace=NoColorSpace] - The color space. - */ - constructor(image?: Object | null, mapping?: number, wrapS?: number, wrapT?: number, magFilter?: number, minFilter?: number, format?: number, type?: number, anisotropy?: number, colorSpace?: string); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isTexture: boolean; - /** - * The UUID of the texture. - * - * @type {string} - * @readonly - */ - readonly uuid: string; - /** - * The name of the texture. - * - * @type {string} - */ - name: string; - /** - * The data definition of a texture. A reference to the data source can be - * shared across textures. This is often useful in context of spritesheets - * where multiple textures render the same data but with different texture - * transformations. - * - * @type {Source} - */ - source: Source; - /** - * An array holding user-defined mipmaps. - * - * @type {Array} - */ - mipmaps: Array; - /** - * How the texture is applied to the object. The value `UVMapping` - * is the default, where texture or uv coordinates are used to apply the map. - * - * @type {(UVMapping|CubeReflectionMapping|CubeRefractionMapping|EquirectangularReflectionMapping|EquirectangularRefractionMapping|CubeUVReflectionMapping)} - * @default UVMapping - */ - mapping: (number | CubeReflectionMapping | CubeRefractionMapping | EquirectangularReflectionMapping | EquirectangularRefractionMapping | CubeUVReflectionMapping); - /** - * Lets you select the uv attribute to map the texture to. `0` for `uv`, - * `1` for `uv1`, `2` for `uv2` and `3` for `uv3`. - * - * @type {number} - * @default 0 - */ - channel: number; - /** - * This defines how the texture is wrapped horizontally and corresponds to - * *U* in UV mapping. - * - * @type {(RepeatWrapping|ClampToEdgeWrapping|MirroredRepeatWrapping)} - * @default ClampToEdgeWrapping - */ - wrapS: (number | number | number); - /** - * This defines how the texture is wrapped horizontally and corresponds to - * *V* in UV mapping. - * - * @type {(RepeatWrapping|ClampToEdgeWrapping|MirroredRepeatWrapping)} - * @default ClampToEdgeWrapping - */ - wrapT: (number | number | number); - /** - * How the texture is sampled when a texel covers more than one pixel. - * - * @type {(NearestFilter|NearestMipmapNearestFilter|NearestMipmapLinearFilter|LinearFilter|LinearMipmapNearestFilter|LinearMipmapLinearFilter)} - * @default LinearFilter - */ - magFilter: (NearestFilter | NearestMipmapNearestFilter | NearestMipmapLinearFilter | number | LinearMipmapNearestFilter | number); - /** - * How the texture is sampled when a texel covers less than one pixel. - * - * @type {(NearestFilter|NearestMipmapNearestFilter|NearestMipmapLinearFilter|LinearFilter|LinearMipmapNearestFilter|LinearMipmapLinearFilter)} - * @default LinearMipmapLinearFilter - */ - minFilter: (NearestFilter | NearestMipmapNearestFilter | NearestMipmapLinearFilter | number | LinearMipmapNearestFilter | number); - /** - * The number of samples taken along the axis through the pixel that has the - * highest density of texels. By default, this value is `1`. A higher value - * gives a less blurry result than a basic mipmap, at the cost of more - * texture samples being used. - * - * @type {number} - * @default Texture.DEFAULT_ANISOTROPY - */ - anisotropy: number; - /** - * The format of the texture. - * - * @type {number} - * @default RGBAFormat - */ - format: number; - /** - * The default internal format is derived from {@link Texture#format} and {@link Texture#type} and - * defines how the texture data is going to be stored on the GPU. - * - * This property allows to overwrite the default format. - * - * @type {?string} - * @default null - */ - internalFormat: string | null; - /** - * The data type of the texture. - * - * @type {number} - * @default UnsignedByteType - */ - type: number; - /** - * How much a single repetition of the texture is offset from the beginning, - * in each direction U and V. Typical range is `0.0` to `1.0`. - * - * @type {Vector2} - * @default (0,0) - */ - offset: Vector2; - /** - * How many times the texture is repeated across the surface, in each - * direction U and V. If repeat is set greater than `1` in either direction, - * the corresponding wrap parameter should also be set to `RepeatWrapping` - * or `MirroredRepeatWrapping` to achieve the desired tiling effect. - * - * @type {Vector2} - * @default (1,1) - */ - repeat: Vector2; - /** - * The point around which rotation occurs. A value of `(0.5, 0.5)` corresponds - * to the center of the texture. Default is `(0, 0)`, the lower left. - * - * @type {Vector2} - * @default (0,0) - */ - center: Vector2; - /** - * How much the texture is rotated around the center point, in radians. - * Positive values are counter-clockwise. - * - * @type {number} - * @default 0 - */ - rotation: number; - /** - * Whether to update the texture's uv-transformation {@link Texture#matrix} - * from the properties {@link Texture#offset}, {@link Texture#repeat}, - * {@link Texture#rotation}, and {@link Texture#center}. - * - * Set this to `false` if you are specifying the uv-transform matrix directly. - * - * @type {boolean} - * @default true - */ - matrixAutoUpdate: boolean; - /** - * The uv-transformation matrix of the texture. - * - * @type {Matrix3} - */ - matrix: Matrix3; - /** - * Whether to generate mipmaps (if possible) for a texture. - * - * Set this to `false` if you are creating mipmaps manually. - * - * @type {boolean} - * @default true - */ - generateMipmaps: boolean; - /** - * If set to `true`, the alpha channel, if present, is multiplied into the - * color channels when the texture is uploaded to the GPU. - * - * Note that this property has no effect when using `ImageBitmap`. You need to - * configure premultiply alpha on bitmap creation instead. - * - * @type {boolean} - * @default false - */ - premultiplyAlpha: boolean; - /** - * If set to `true`, the texture is flipped along the vertical axis when - * uploaded to the GPU. - * - * Note that this property has no effect when using `ImageBitmap`. You need to - * configure the flip on bitmap creation instead. - * - * @type {boolean} - * @default true - */ - flipY: boolean; - /** - * Specifies the alignment requirements for the start of each pixel row in memory. - * The allowable values are `1` (byte-alignment), `2` (rows aligned to even-numbered bytes), - * `4` (word-alignment), and `8` (rows start on double-word boundaries). - * - * @type {number} - * @default 4 - */ - unpackAlignment: number; - /** - * Textures containing color data should be annotated with `SRGBColorSpace` or `LinearSRGBColorSpace`. - * - * @type {string} - * @default NoColorSpace - */ - colorSpace: string; - /** - * An object that can be used to store custom data about the texture. It - * should not hold references to functions as these will not be cloned. - * - * @type {Object} - */ - userData: Object; - /** - * This can be used to only update a subregion or specific rows of the texture (for example, just the - * first 3 rows). Use the `addUpdateRange()` function to add ranges to this array. - * - * @type {Array} - */ - updateRanges: Array; - /** - * This starts at `0` and counts how many times {@link Texture#needsUpdate} is set to `true`. - * - * @type {number} - * @readonly - * @default 0 - */ - readonly version: number; - /** - * A callback function, called when the texture is updated (e.g., when - * {@link Texture#needsUpdate} has been set to true and then the texture is used). - * - * @type {?Function} - * @default null - */ - onUpdate: Function | null; - /** - * An optional back reference to the textures render target. - * - * @type {?(RenderTarget|WebGLRenderTarget)} - * @default null - */ - renderTarget: (RenderTarget | WebGLRenderTarget) | null; - /** - * Indicates whether a texture belongs to a render target or not. - * - * @type {boolean} - * @readonly - * @default false - */ - readonly isRenderTargetTexture: boolean; - /** - * Indicates if a texture should be handled like a texture array. - * - * @type {boolean} - * @readonly - * @default false - */ - readonly isArrayTexture: boolean; - /** - * Indicates whether this texture should be processed by `PMREMGenerator` or not - * (only relevant for render target textures). - * - * @type {number} - * @readonly - * @default 0 - */ - readonly pmremVersion: number; - /** - * Whether the texture should use one of the 16 bit integer formats which are normalized - * to [0, 1] or [-1, 1] (depending on signed/unsigned) when sampled. - * - * @type {boolean} - * @default false - */ - normalized: boolean; - /** - * The width of the texture in pixels. - */ - get width(): any; - /** - * The height of the texture in pixels. - */ - get height(): any; - /** - * The depth of the texture in pixels. - */ - get depth(): any; - set image(value: Object | null); - /** - * The image object holding the texture data. - * - * @type {?Object} - */ - get image(): Object | null; - /** - * Updates the texture transformation matrix from the properties {@link Texture#offset}, - * {@link Texture#repeat}, {@link Texture#rotation}, and {@link Texture#center}. - */ - updateMatrix(): void; - /** - * Adds a range of data in the data texture to be updated on the GPU. - * - * @param {number} start - Position at which to start update. - * @param {number} count - The number of components to update. - */ - addUpdateRange(start: number, count: number): void; - /** - * Clears the update ranges. - */ - clearUpdateRanges(): void; - /** - * Returns a new texture with copied values from this instance. - * - * @return {Texture} A clone of this instance. - */ - clone(): Texture; - /** - * Copies the values of the given texture to this instance. - * - * @param {Texture} source - The texture to copy. - * @return {Texture} A reference to this instance. - */ - copy(source: Texture): Texture; - /** - * Setting this property to `true` indicates the engine the texture - * must be updated in the next render. This triggers a texture upload - * to the GPU and ensures correct texture parameter configuration. - * - * @type {boolean} - * @default false - * @param {boolean} value - */ - set needsUpdate(value: boolean); - /** - * Sets this texture's properties based on `values`. - * @param {Object} values - A container with texture parameters. - */ - setValues(values: Object): void; - /** - * Serializes the texture into JSON. - * - * @param {?(Object|string)} meta - An optional value holding meta information about the serialization. - * @return {Object} A JSON object representing the serialized texture. - * @see {@link ObjectLoader#parse} - */ - toJSON(meta: (Object | string) | null): Object; - /** - * Frees the GPU-related resources allocated by this instance. Call this - * method whenever this instance is no longer used in your app. - * - * @fires Texture#dispose - */ - dispose(): void; - /** - * Transforms the given uv vector with the textures uv transformation matrix. - * - * @param {Vector2} uv - The uv vector. - * @return {Vector2} The transformed uv vector. - */ - transformUv(uv: Vector2): Vector2; - /** - * Setting this property to `true` indicates the engine the PMREM - * must be regenerated. - * - * @type {boolean} - * @default false - * @param {boolean} value - */ - set needsPMREMUpdate(value: boolean); -} -export namespace Texture { - export let DEFAULT_IMAGE: (new (width?: number, height?: number) => HTMLImageElement) | null; - export { UVMapping as DEFAULT_MAPPING }; - export let DEFAULT_ANISOTROPY: number; -} -import { EventDispatcher } from '../core/EventDispatcher.js'; -import { Source } from './Source.js'; -import { Vector2 } from '../math/Vector2.js'; -import { Matrix3 } from '../math/Matrix3.js'; -import { UVMapping } from '../constants.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/VideoFrameTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/VideoFrameTexture.d.ts deleted file mode 100644 index bd25d7d01..000000000 --- a/jsdoc-testing/jsdoc/src/textures/VideoFrameTexture.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * This class can be used as an alternative way to define video data. Instead of using - * an instance of `HTMLVideoElement` like with `VideoTexture`, `VideoFrameTexture` expects each frame is - * defined manually via {@link VideoFrameTexture#setFrame}. A typical use case for this module is when - * video frames are decoded with the WebCodecs API. - * - * ```js - * const texture = new THREE.VideoFrameTexture(); - * texture.setFrame( frame ); - * ``` - * - * @augments VideoTexture - */ -export class VideoFrameTexture extends VideoTexture { - /** - * Constructs a new video frame texture. - * - * @param {number} [mapping=Texture.DEFAULT_MAPPING] - The texture mapping. - * @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value. - * @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value. - * @param {number} [magFilter=LinearFilter] - The mag filter value. - * @param {number} [minFilter=LinearFilter] - The min filter value. - * @param {number} [format=RGBAFormat] - The texture format. - * @param {number} [type=UnsignedByteType] - The texture type. - * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value. - */ - constructor(mapping?: number, wrapS?: number, wrapT?: number, magFilter?: number, minFilter?: number, format?: number, type?: number, anisotropy?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isVideoFrameTexture: boolean; - /** - * Sets the current frame of the video. This will automatically update the texture - * so the data can be used for rendering. - * - * @param {VideoFrame} frame - The video frame. - */ - setFrame(frame: VideoFrame): void; -} -import { VideoTexture } from './VideoTexture.js'; diff --git a/jsdoc-testing/jsdoc/src/textures/VideoTexture.d.ts b/jsdoc-testing/jsdoc/src/textures/VideoTexture.d.ts deleted file mode 100644 index d4ba7a0fd..000000000 --- a/jsdoc-testing/jsdoc/src/textures/VideoTexture.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -/** - * A texture for use with a video. - * - * ```js - * // assuming you have created a HTML video element with id="video" - * const video = document.getElementById( 'video' ); - * const texture = new THREE.VideoTexture( video ); - * ``` - * - * Note: When using video textures with {@link WebGPURenderer}, {@link Texture#colorSpace} must be - * set to THREE.SRGBColorSpace. - * - * Note: After the initial use of a texture, its dimensions, format, and type - * cannot be changed. Instead, call {@link Texture#dispose} on the texture and instantiate a new one. - * - * @augments Texture - */ -export class VideoTexture extends Texture { - /** - * Constructs a new video texture. - * - * @param {HTMLVideoElement} video - The video element to use as a data source for the texture. - * @param {number} [mapping=Texture.DEFAULT_MAPPING] - The texture mapping. - * @param {number} [wrapS=ClampToEdgeWrapping] - The wrapS value. - * @param {number} [wrapT=ClampToEdgeWrapping] - The wrapT value. - * @param {number} [magFilter=LinearFilter] - The mag filter value. - * @param {number} [minFilter=LinearFilter] - The min filter value. - * @param {number} [format=RGBAFormat] - The texture format. - * @param {number} [type=UnsignedByteType] - The texture type. - * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value. - */ - constructor(video: HTMLVideoElement, mapping?: number, wrapS?: number, wrapT?: number, magFilter?: number, minFilter?: number, format?: number, type?: number, anisotropy?: number); - /** - * This flag can be used for type testing. - * - * @type {boolean} - * @readonly - * @default true - */ - readonly isVideoTexture: boolean; - /** - * The video frame request callback identifier, which is a positive integer. - * - * Value of 0 represents no scheduled rVFC. - * - * @private - * @type {number} - */ - private _requestVideoFrameCallbackId; - clone(): any; - /** - * This method is called automatically by the renderer and sets {@link Texture#needsUpdate} - * to `true` every time a new frame is available. - * - * Only relevant if `requestVideoFrameCallback` is not supported in the browser. - */ - update(): void; -} -import { Texture } from './Texture.js'; diff --git a/jsdoc-testing/jsdoc/src/utils.d.ts b/jsdoc-testing/jsdoc/src/utils.d.ts deleted file mode 100644 index 21c16ba39..000000000 --- a/jsdoc-testing/jsdoc/src/utils.d.ts +++ /dev/null @@ -1,185 +0,0 @@ -/** - * Finds the minimum value in an array. - * - * @private - * @param {Array} array - The array to search for the minimum value. - * @return {number} The minimum value in the array, or Infinity if the array is empty. - */ -export function arrayMin(array: Array): number; -/** - * Finds the maximum value in an array. - * - * @private - * @param {Array} array - The array to search for the maximum value. - * @return {number} The maximum value in the array, or -Infinity if the array is empty. - */ -export function arrayMax(array: Array): number; -/** - * Checks if an array contains values that require Uint32 representation. - * - * This function determines whether the array contains any values >= 65535, - * which would require a Uint32Array rather than a Uint16Array for proper storage. - * The function iterates from the end of the array, assuming larger values are - * typically located at the end. - * - * @private - * @param {Array} array - The array to check. - * @return {boolean} True if the array contains values >= 65535, false otherwise. - */ -export function arrayNeedsUint32(array: Array): boolean; -/** - * Creates a typed array of the specified type from the given buffer. - * - * @private - * @param {string} type - The name of the typed array type (e.g., 'Float32Array', 'Uint16Array'). - * @param {ArrayBuffer} buffer - The buffer to create the typed array from. - * @return {TypedArray} A new typed array of the specified type. - */ -export function getTypedArray(type: string, buffer: ArrayBuffer): TypedArray; -/** - * Creates an XHTML element with the specified tag name. - * - * This function uses the XHTML namespace to create DOM elements, - * ensuring proper element creation in XML-based contexts. - * - * @private - * @param {string} name - The tag name of the element to create (e.g., 'canvas', 'div'). - * @return {HTMLElement} The created XHTML element. - */ -export function createElementNS(name: string): HTMLElement; -/** - * Creates a canvas element configured for block display. - * - * This is a convenience function that creates a canvas element with - * display style set to 'block', which is commonly used in three.js - * rendering contexts to avoid inline element spacing issues. - * - * @return {HTMLCanvasElement} A canvas element with display set to 'block'. - */ -export function createCanvasElement(): HTMLCanvasElement; -/** - * Sets a custom function to handle console output. - * - * This allows external code to intercept and handle console.log, console.warn, - * and console.error calls made by three.js, which is useful for custom logging, - * testing, or debugging workflows. - * - * @param {Function} fn - The function to handle console output. Should accept - * (type, message, ...params) where type is 'log', 'warn', or 'error'. - */ -export function setConsoleFunction(fn: Function): void; -/** - * Gets the currently set custom console function. - * - * @return {Function|null} The custom console function, or null if not set. - */ -export function getConsoleFunction(): Function | null; -/** - * Logs an informational message with the 'THREE.' prefix. - * - * If a custom console function is set via setConsoleFunction(), it will be used - * instead of the native console.log. The first parameter is treated as the - * method name and is automatically prefixed with 'THREE.'. - * - * @param {...any} params - The message components. The first param is used as - * the method name and prefixed with 'THREE.'. - */ -export function log(...params: any[]): void; -/** - * Logs a warning message with the 'THREE.' prefix. - * - * If a custom console function is set via setConsoleFunction(), it will be used - * instead of the native console.warn. The first parameter is treated as the - * method name and is automatically prefixed with 'THREE.'. - * - * @param {...any} params - The message components. The first param is used as - * the method name and prefixed with 'THREE.'. - */ -export function warn(...params: any[]): void; -/** - * Logs an error message with the 'THREE.' prefix. - * - * If a custom console function is set via setConsoleFunction(), it will be used - * instead of the native console.error. The first parameter is treated as the - * method name and is automatically prefixed with 'THREE.'. - * - * @param {...any} params - The message components. The first param is used as - * the method name and prefixed with 'THREE.'. - */ -export function error(...params: any[]): void; -/** - * Logs a warning message only once, preventing duplicate warnings. - * - * This function maintains an internal cache of warning messages and will only - * output each unique warning message once. Useful for warnings that may be - * triggered repeatedly but should only be shown to the user once. - * - * @param {...any} params - The warning message components. - */ -export function warnOnce(...params: any[]): void; -/** - * Asynchronously probes for WebGL sync object completion. - * - * This function creates a promise that resolves when the WebGL sync object - * signals completion or rejects if the sync operation fails. It uses polling - * at the specified interval to check the sync status without blocking the - * main thread. This is useful for GPU-CPU synchronization in WebGL contexts. - * - * @private - * @param {WebGL2RenderingContext} gl - The WebGL rendering context. - * @param {WebGLSync} sync - The WebGL sync object to wait for. - * @param {number} interval - The polling interval in milliseconds. - * @return {Promise} A promise that resolves when the sync completes or rejects if it fails. - */ -export function probeAsync(gl: WebGL2RenderingContext, sync: WebGLSync, interval: number): Promise; -/** - * Yields execution to the main thread to allow rendering and other tasks. - * Uses scheduler.yield() when available (Chrome 115+), falls back to requestAnimationFrame. - * - * @return {Promise} - */ -export function yieldToMain(): Promise; -/** - * Converts a projection matrix from normalized device coordinates (NDC) - * range [-1, 1] to [0, 1]. - * - * This conversion is commonly needed when working with depth textures or - * render targets that expect depth values in the [0, 1] range rather than - * the standard OpenGL NDC range of [-1, 1]. The function modifies the - * projection matrix in place. - * - * @private - * @param {Matrix4} projectionMatrix - The projection matrix to convert (modified in place). - */ -export function toNormalizedProjectionMatrix(projectionMatrix: Matrix4): void; -/** - * Reverses the depth range of a projection matrix. - * - * This function inverts the depth mapping of a projection matrix, which is - * useful for reversed-Z depth buffer techniques that can improve depth - * precision. The function handles both perspective and orthographic projection - * matrices differently and modifies the matrix in place. - * - * For perspective matrices (where m[11] === -1), the depth mapping is - * reversed with an offset. For orthographic matrices, a simpler reversal - * is applied. - * - * @private - * @param {Matrix4} projectionMatrix - The projection matrix to reverse (modified in place). - */ -export function toReversedProjectionMatrix(projectionMatrix: Matrix4): void; -/** - * Returns `true` if the given object is a typed array. - * - * @param {any} array - The object to check. - * @return {boolean} Whether the given object is a typed array. - */ -export function isTypedArray(array: any): boolean; -/** - * Used to select the correct depth functions - * when reversed depth buffer is used. - * - * @private - * @type {Object} - */ -export const ReversedDepthFuncs: Object; From 980a6dac03519d26860be8ef2cf06aa9d7179d64 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Sat, 30 May 2026 16:18:55 -0400 Subject: [PATCH 5/5] Update declarations --- types/three/src/math/Box3.d.ts | 270 ++++++++++++++++++++++++++++++--- 1 file changed, 253 insertions(+), 17 deletions(-) diff --git a/types/three/src/math/Box3.d.ts b/types/three/src/math/Box3.d.ts index 91560bdc7..a1fd86b78 100644 --- a/types/three/src/math/Box3.d.ts +++ b/types/three/src/math/Box3.d.ts @@ -6,65 +6,301 @@ import { Sphere } from "./Sphere.js"; import { Triangle } from "./Triangle.js"; import { Vector3 } from "./Vector3.js"; +/** + * Represents an axis-aligned bounding box (AABB) in 3D space. + */ export class Box3 { + /** + * Constructs a new bounding box. + * + * @param {Vector3} [min=(Infinity,Infinity,Infinity)] - A vector representing the lower boundary of the box. + * @param {Vector3} [max=(-Infinity,-Infinity,-Infinity)] - A vector representing the upper boundary of the box. + */ constructor(min?: Vector3, max?: Vector3); - /** - * @default new THREE.Vector3( + Infinity, + Infinity, + Infinity ) + * This flag can be used for type testing. + * + * @type {boolean} + * @readonly + * @default true + */ + readonly isBox3: boolean; + /** + * The lower boundary of the box. + * + * @type {Vector3} */ min: Vector3; - /** - * @default new THREE.Vector3( - Infinity, - Infinity, - Infinity ) + * The upper boundary of the box. + * + * @type {Vector3} */ max: Vector3; - readonly isBox3: true; - + /** + * Sets the lower and upper boundaries of this box. + * Please note that this method only copies the values from the given objects. + * + * @param {Vector3} min - The lower boundary of the box. + * @param {Vector3} max - The upper boundary of the box. + * @return {Box3} A reference to this bounding box. + */ set(min: Vector3, max: Vector3): this; + /** + * Sets the upper and lower bounds of this box so it encloses the position data + * in the given array. + * + * @param {Array} array - An array holding 3D position data. + * @return {Box3} A reference to this bounding box. + */ setFromArray(array: ArrayLike): this; - setFromBufferAttribute(bufferAttribute: BufferAttribute): this; - setFromPoints(points: Vector3[]): this; + /** + * Sets the upper and lower bounds of this box so it encloses the position data + * in the given buffer attribute. + * + * @param {BufferAttribute} attribute - A buffer attribute holding 3D position data. + * @return {Box3} A reference to this bounding box. + */ + setFromBufferAttribute(attribute: BufferAttribute): this; + /** + * Sets the upper and lower bounds of this box so it encloses the position data + * in the given array. + * + * @param {Array} points - An array holding 3D position data as instances of {@link Vector3}. + * @return {Box3} A reference to this bounding box. + */ + setFromPoints(points: Array): this; + /** + * Centers this box on the given center vector and sets this box's width, height and + * depth to the given size values. + * + * @param {Vector3} center - The center of the box. + * @param {Vector3} size - The x, y and z dimensions of the box. + * @return {Box3} A reference to this bounding box. + */ setFromCenterAndSize(center: Vector3, size: Vector3): this; + /** + * Computes the world-axis-aligned bounding box for the given 3D object + * (including its children), accounting for the object's, and children's, + * world transforms. The function may result in a larger box than strictly necessary. + * + * Note: To compute the correct bounding box, make sure the given 3D object + * has an up-to-date world matrix that reflects the current transformation of its + * ancestor nodes. Call `object.updateWorldMatrix( true, false )` beforehand if + * you're unsure. + * + * @param {Object3D} object - The 3D object to compute the bounding box for. + * @param {boolean} [precise=false] - If set to `true`, the method computes the smallest + * world-axis-aligned bounding box at the expense of more computation. + * @return {Box3} A reference to this bounding box. + */ setFromObject(object: Object3D, precise?: boolean): this; + /** + * Returns a new box with copied values from this instance. + * + * @return {Box3} A clone of this instance. + */ clone(): this; + /** + * Copies the values of the given box to this instance. + * + * @param {Box3} box - The box to copy. + * @return {Box3} A reference to this bounding box. + */ copy(box: Box3): this; + /** + * Makes this box empty which means in encloses a zero space in 3D. + * + * @return {Box3} A reference to this bounding box. + */ makeEmpty(): this; + /** + * Returns true if this box includes zero points within its bounds. + * Note that a box with equal lower and upper bounds still includes one + * point, the one both bounds share. + * + * @return {boolean} Whether this box is empty or not. + */ isEmpty(): boolean; + /** + * Returns the center point of this box. + * + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The center point. + */ getCenter(target: Vector3): Vector3; + /** + * Returns the dimensions of this box. + * + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The size. + */ getSize(target: Vector3): Vector3; + /** + * Expands the boundaries of this box to include the given point. + * + * @param {Vector3} point - The point that should be included by the bounding box. + * @return {Box3} A reference to this bounding box. + */ expandByPoint(point: Vector3): this; + /** + * Expands this box equilaterally by the given vector. The width of this + * box will be expanded by the x component of the vector in both + * directions. The height of this box will be expanded by the y component of + * the vector in both directions. The depth of this box will be + * expanded by the z component of the vector in both directions. + * + * @param {Vector3} vector - The vector that should expand the bounding box. + * @return {Box3} A reference to this bounding box. + */ expandByVector(vector: Vector3): this; + /** + * Expands each dimension of the box by the given scalar. If negative, the + * dimensions of the box will be contracted. + * + * @param {number} scalar - The scalar value that should expand the bounding box. + * @return {Box3} A reference to this bounding box. + */ expandByScalar(scalar: number): this; + /** + * Expands the boundaries of this box to include the given 3D object and + * its children, accounting for the object's, and children's, world + * transforms. The function may result in a larger box than strictly + * necessary (unless the precise parameter is set to true). + * + * @param {Object3D} object - The 3D object that should expand the bounding box. + * @param {boolean} precise - If set to `true`, the method expands the bounding box + * as little as necessary at the expense of more computation. + * @return {Box3} A reference to this bounding box. + */ expandByObject(object: Object3D, precise?: boolean): this; + /** + * Returns `true` if the given point lies within or on the boundaries of this box. + * + * @param {Vector3} point - The point to test. + * @return {boolean} Whether the bounding box contains the given point or not. + */ containsPoint(point: Vector3): boolean; + /** + * Returns `true` if this bounding box includes the entirety of the given bounding box. + * If this box and the given one are identical, this function also returns `true`. + * + * @param {Box3} box - The bounding box to test. + * @return {boolean} Whether the bounding box contains the given bounding box or not. + */ containsBox(box: Box3): boolean; + /** + * Returns a point as a proportion of this box's width, height and depth. + * + * @param {Vector3} point - A point in 3D space. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} A point as a proportion of this box's width, height and depth. + */ getParameter(point: Vector3, target: Vector3): Vector3; + /** + * Returns `true` if the given bounding box intersects with this bounding box. + * + * @param {Box3} box - The bounding box to test. + * @return {boolean} Whether the given bounding box intersects with this bounding box. + */ intersectsBox(box: Box3): boolean; + /** + * Returns `true` if the given bounding sphere intersects with this bounding box. + * + * @param {Sphere} sphere - The bounding sphere to test. + * @return {boolean} Whether the given bounding sphere intersects with this bounding box. + */ intersectsSphere(sphere: Sphere): boolean; + /** + * Returns `true` if the given plane intersects with this bounding box. + * + * @param {Plane} plane - The plane to test. + * @return {boolean} Whether the given plane intersects with this bounding box. + */ intersectsPlane(plane: Plane): boolean; + /** + * Returns `true` if the given triangle intersects with this bounding box. + * + * @param {Triangle} triangle - The triangle to test. + * @return {boolean} Whether the given triangle intersects with this bounding box. + */ intersectsTriangle(triangle: Triangle): boolean; + /** + * Clamps the given point within the bounds of this box. + * + * @param {Vector3} point - The point to clamp. + * @param {Vector3} target - The target vector that is used to store the method's result. + * @return {Vector3} The clamped point. + */ clampPoint(point: Vector3, target: Vector3): Vector3; + /** + * Returns the euclidean distance from any edge of this box to the specified point. If + * the given point lies inside of this box, the distance will be `0`. + * + * @param {Vector3} point - The point to compute the distance to. + * @return {number} The euclidean distance. + */ distanceToPoint(point: Vector3): number; + /** + * Returns a bounding sphere that encloses this bounding box. + * + * @param {Sphere} target - The target sphere that is used to store the method's result. + * @return {Sphere} The bounding sphere that encloses this bounding box. + */ getBoundingSphere(target: Sphere): Sphere; + /** + * Computes the intersection of this bounding box and the given one, setting the upper + * bound of this box to the lesser of the two boxes' upper bounds and the + * lower bound of this box to the greater of the two boxes' lower bounds. If + * there's no overlap, makes this box empty. + * + * @param {Box3} box - The bounding box to intersect with. + * @return {Box3} A reference to this bounding box. + */ intersect(box: Box3): this; + /** + * Computes the union of this box and another and the given one, setting the upper + * bound of this box to the greater of the two boxes' upper bounds and the + * lower bound of this box to the lesser of the two boxes' lower bounds. + * + * @param {Box3} box - The bounding box that will be unioned with this instance. + * @return {Box3} A reference to this bounding box. + */ union(box: Box3): this; + /** + * Transforms this bounding box by the given 4x4 transformation matrix. + * + * @param {Matrix4} matrix - The transformation matrix. + * @return {Box3} A reference to this bounding box. + */ applyMatrix4(matrix: Matrix4): this; - translate(offset: Vector3): this; - equals(box: Box3): boolean; /** - * @deprecated Use {@link Box3#isEmpty .isEmpty()} instead. + * Adds the given offset to both the upper and lower bounds of this bounding box, + * effectively moving it in 3D space. + * + * @param {Vector3} offset - The offset that should be used to translate the bounding box. + * @return {Box3} A reference to this bounding box. */ - empty(): any; + translate(offset: Vector3): this; /** - * @deprecated Use {@link Box3#intersectsBox .intersectsBox()} instead. + * Returns `true` if this bounding box is equal with the given one. + * + * @param {Box3} box - The box to test for equality. + * @return {boolean} Whether this bounding box is equal with the given one. */ - isIntersectionBox(b: any): any; + equals(box: Box3): boolean; /** - * @deprecated Use {@link Box3#intersectsSphere .intersectsSphere()} instead. + * Returns a serialized structure of the bounding box. + * + * @return {Object} Serialized structure with fields representing the object state. */ - isIntersectionSphere(s: any): any; - toJSON(): Box3JSON; + /** + * Returns a serialized structure of the bounding box. + * + * @param {Object} json - The serialized json to set the box from. + * @return {Box3} A reference to this bounding box. + */ fromJSON(json: Box3JSON): this; }