@types/three 0.157.1 → 0.158.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/Addons.d.ts +290 -0
  3. three/examples/jsm/animation/CCDIKSolver.d.ts +30 -0
  4. three/examples/jsm/animation/MMDAnimationHelper.d.ts +105 -0
  5. three/examples/jsm/animation/MMDPhysics.d.ts +124 -0
  6. three/examples/jsm/cameras/CinematicCamera.d.ts +41 -0
  7. three/examples/jsm/capabilities/WebGL.d.ts +9 -0
  8. three/examples/jsm/controls/OrbitControls.d.ts +304 -0
  9. three/examples/jsm/controls/TrackballControls.d.ts +58 -0
  10. three/examples/jsm/effects/OutlineEffect.d.ts +36 -0
  11. three/examples/jsm/environments/RoomEnvironment.d.ts +6 -0
  12. three/examples/jsm/exporters/PLYExporter.d.ts +30 -0
  13. three/examples/jsm/exporters/STLExporter.d.ts +21 -0
  14. three/examples/jsm/helpers/RectAreaLightHelper.d.ts +10 -0
  15. three/examples/jsm/helpers/ViewHelper.d.ts +15 -0
  16. three/examples/jsm/libs/fflate.module.d.ts +1 -0
  17. three/examples/jsm/libs/lil-gui.module.min.d.ts +609 -0
  18. three/examples/jsm/libs/tween.module.d.ts +219 -0
  19. three/examples/jsm/lights/RectAreaLightUniformsLib.d.ts +3 -0
  20. three/examples/jsm/lines/Line2.d.ts +11 -0
  21. three/examples/jsm/lines/LineGeometry.d.ts +10 -0
  22. three/examples/jsm/lines/LineMaterial.d.ts +31 -0
  23. three/examples/jsm/lines/LineSegments2.d.ts +14 -0
  24. three/examples/jsm/lines/LineSegmentsGeometry.d.ts +23 -0
  25. three/examples/jsm/loaders/DDSLoader.d.ts +16 -0
  26. three/examples/jsm/loaders/DRACOLoader.d.ts +19 -0
  27. three/examples/jsm/loaders/GLTFLoader.d.ts +147 -0
  28. three/examples/jsm/loaders/KTX2Loader.d.ts +17 -0
  29. three/examples/jsm/loaders/LDrawLoader.d.ts +19 -0
  30. three/examples/jsm/loaders/LogLuvLoader.d.ts +1 -1
  31. three/examples/jsm/loaders/MMDLoader.d.ts +56 -0
  32. three/examples/jsm/loaders/MTLLoader.d.ts +104 -0
  33. three/examples/jsm/loaders/OBJLoader.d.ts +10 -0
  34. three/examples/jsm/loaders/PCDLoader.d.ts +8 -0
  35. three/examples/jsm/loaders/RGBELoader.d.ts +19 -0
  36. three/examples/jsm/loaders/SVGLoader.d.ts +68 -0
  37. three/examples/jsm/loaders/TGALoader.d.ts +7 -0
  38. three/examples/jsm/loaders/TTFLoader.d.ts +8 -0
  39. three/examples/jsm/loaders/USDZLoader.d.ts +11 -0
  40. three/examples/jsm/materials/MeshGouraudMaterial.d.ts +17 -0
  41. three/examples/jsm/math/Capsule.d.ts +0 -1
  42. three/examples/jsm/misc/MD2CharacterComplex.d.ts +9 -1
  43. three/examples/jsm/nodes/Nodes.d.ts +149 -0
  44. three/examples/jsm/nodes/accessors/BitangentNode.d.ts +18 -0
  45. three/examples/jsm/nodes/accessors/BufferNode.d.ts +11 -0
  46. three/examples/jsm/nodes/accessors/CameraNode.d.ts +12 -0
  47. three/examples/jsm/nodes/accessors/CubeTextureNode.d.ts +13 -0
  48. three/examples/jsm/nodes/accessors/InstanceNode.d.ts +9 -0
  49. three/examples/jsm/nodes/accessors/MaterialNode.d.ts +23 -0
  50. three/examples/jsm/nodes/accessors/MaterialReferenceNode.d.ts +6 -0
  51. three/examples/jsm/nodes/accessors/ModelNode.d.ts +9 -0
  52. three/examples/jsm/nodes/accessors/ModelViewProjectionNode.d.ts +6 -0
  53. three/examples/jsm/nodes/accessors/NormalNode.d.ts +12 -0
  54. three/examples/jsm/nodes/accessors/Object3DNode.d.ts +22 -0
  55. three/examples/jsm/nodes/accessors/PointUVNode.d.ts +7 -0
  56. three/examples/jsm/nodes/accessors/PositionNode.d.ts +21 -0
  57. three/examples/jsm/nodes/accessors/ReferenceNode.d.ts +13 -0
  58. three/examples/jsm/nodes/accessors/ReflectVectorNode.d.ts +8 -0
  59. three/examples/jsm/nodes/accessors/SkinningNode.d.ts +13 -0
  60. three/examples/jsm/nodes/accessors/StorageBufferNode.d.ts +6 -0
  61. three/examples/jsm/nodes/accessors/TangentNode.d.ts +18 -0
  62. three/examples/jsm/nodes/accessors/TextureNode.d.ts +14 -0
  63. three/examples/jsm/nodes/accessors/UVNode.d.ts +8 -0
  64. three/examples/jsm/nodes/accessors/UserDataNode.d.ts +7 -0
  65. three/examples/jsm/nodes/code/CodeNode.d.ts +15 -0
  66. three/examples/jsm/nodes/code/ExpressionNode.d.ts +7 -0
  67. three/examples/jsm/nodes/code/FunctionCallNode.d.ts +13 -0
  68. three/examples/jsm/nodes/code/FunctionNode.d.ts +17 -0
  69. three/examples/jsm/nodes/core/ArrayUniformNode.d.ts +8 -0
  70. three/examples/jsm/nodes/core/AttributeNode.d.ts +9 -0
  71. three/examples/jsm/nodes/core/BypassNode.d.ts +9 -0
  72. three/examples/jsm/nodes/core/CacheNode.d.ts +10 -0
  73. three/examples/jsm/nodes/core/ConstNode.d.ts +10 -0
  74. three/examples/jsm/nodes/core/ContextNode.d.ts +10 -0
  75. three/examples/jsm/nodes/core/InputNode.d.ts +16 -0
  76. three/examples/jsm/nodes/core/Node.d.ts +31 -0
  77. three/examples/jsm/nodes/core/NodeAttribute.d.ts +6 -0
  78. three/examples/jsm/nodes/core/NodeBuilder.d.ts +138 -0
  79. three/examples/jsm/nodes/core/NodeCache.d.ts +9 -0
  80. three/examples/jsm/nodes/core/NodeCode.d.ts +4 -0
  81. three/examples/jsm/nodes/core/NodeFrame.d.ts +19 -0
  82. three/examples/jsm/nodes/core/NodeFunction.d.ts +13 -0
  83. three/examples/jsm/nodes/core/NodeFunctionInput.d.ts +7 -0
  84. three/examples/jsm/nodes/core/NodeKeywords.d.ts +14 -0
  85. three/examples/jsm/nodes/core/NodeParser.d.ts +5 -0
  86. three/examples/jsm/nodes/core/NodeUniform.d.ts +13 -0
  87. three/examples/jsm/nodes/core/NodeUtils.d.ts +13 -0
  88. three/examples/jsm/nodes/core/NodeVar.d.ts +6 -0
  89. three/examples/jsm/nodes/core/NodeVarying.d.ts +8 -0
  90. three/examples/jsm/nodes/core/PropertyNode.d.ts +6 -0
  91. three/examples/jsm/nodes/core/StackNode.d.ts +11 -0
  92. three/examples/jsm/nodes/core/TempNode.d.ts +11 -0
  93. three/examples/jsm/nodes/core/UniformNode.d.ts +10 -0
  94. three/examples/jsm/nodes/core/VarNode.d.ts +16 -0
  95. three/examples/jsm/nodes/core/VaryingNode.d.ts +8 -0
  96. three/examples/jsm/nodes/core/constants.d.ts +78 -0
  97. three/examples/jsm/nodes/display/BlendModeNode.d.ts +32 -0
  98. three/examples/jsm/nodes/display/ColorAdjustmentNode.d.ts +20 -0
  99. three/examples/jsm/nodes/display/ColorSpaceNode.d.ts +18 -0
  100. three/examples/jsm/nodes/display/FrontFacingNode.d.ts +6 -0
  101. three/examples/jsm/nodes/display/NormalMapNode.d.ts +12 -0
  102. three/examples/jsm/nodes/display/PosterizeNode.d.ts +8 -0
  103. three/examples/jsm/nodes/display/ToneMappingNode.d.ts +14 -0
  104. three/examples/jsm/nodes/display/ViewportNode.d.ts +23 -0
  105. three/examples/jsm/nodes/fog/FogExp2Node.d.ts +9 -0
  106. three/examples/jsm/nodes/fog/FogNode.d.ts +10 -0
  107. three/examples/jsm/nodes/fog/FogRangeNode.d.ts +10 -0
  108. three/examples/jsm/nodes/functions/BSDF/BRDF_GGX.d.ts +6 -0
  109. three/examples/jsm/nodes/functions/BSDF/BRDF_Lambert.d.ts +6 -0
  110. three/examples/jsm/nodes/functions/BSDF/DFGApprox.d.ts +10 -0
  111. three/examples/jsm/nodes/functions/BSDF/D_GGX.d.ts +9 -0
  112. three/examples/jsm/nodes/functions/BSDF/F_Schlick.d.ts +6 -0
  113. three/examples/jsm/nodes/functions/BSDF/V_GGX_SmithCorrelated.d.ts +6 -0
  114. three/examples/jsm/nodes/functions/PhysicalLightingModel.d.ts +11 -0
  115. three/examples/jsm/nodes/functions/material/getGeometryRoughness.d.ts +5 -0
  116. three/examples/jsm/nodes/functions/material/getRoughness.d.ts +6 -0
  117. three/examples/jsm/nodes/geometry/RangeNode.d.ts +13 -0
  118. three/examples/jsm/nodes/gpgpu/ComputeNode.d.ts +11 -0
  119. three/examples/jsm/nodes/lighting/AONode.d.ts +8 -0
  120. three/examples/jsm/nodes/lighting/AnalyticLightNode.d.ts +10 -0
  121. three/examples/jsm/nodes/lighting/EnvironmentNode.d.ts +8 -0
  122. three/examples/jsm/nodes/lighting/HemisphereLightNode.d.ts +13 -0
  123. three/examples/jsm/nodes/lighting/LightUtils.d.ts +4 -0
  124. three/examples/jsm/nodes/lighting/LightingContextNode.d.ts +15 -0
  125. three/examples/jsm/nodes/lighting/LightingNode.d.ts +5 -0
  126. three/examples/jsm/nodes/lighting/LightsNode.d.ts +19 -0
  127. three/examples/jsm/nodes/lighting/PointLightNode.d.ts +10 -0
  128. three/examples/jsm/nodes/lighting/SpotLightNode.d.ts +15 -0
  129. three/examples/jsm/nodes/loaders/NodeLoader.d.ts +14 -0
  130. three/examples/jsm/nodes/loaders/NodeMaterialLoader.d.ts +8 -0
  131. three/examples/jsm/nodes/loaders/NodeObjectLoader.d.ts +9 -0
  132. three/examples/jsm/nodes/materials/LineBasicNodeMaterial.d.ts +9 -0
  133. three/examples/jsm/nodes/materials/Materials.d.ts +17 -0
  134. three/examples/jsm/nodes/materials/MeshBasicNodeMaterial.d.ts +10 -0
  135. three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +22 -0
  136. three/examples/jsm/nodes/materials/MeshStandardNodeMaterial.d.ts +18 -0
  137. three/examples/jsm/nodes/materials/NodeMaterial.d.ts +38 -0
  138. three/examples/jsm/nodes/materials/PointsNodeMaterial.d.ts +15 -0
  139. three/examples/jsm/nodes/materials/SpriteNodeMaterial.d.ts +23 -0
  140. three/examples/jsm/nodes/materialx/MaterialXNodes.d.ts +94 -0
  141. three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +4 -0
  142. three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +6 -0
  143. three/examples/jsm/nodes/math/CondNode.d.ts +9 -0
  144. three/examples/jsm/nodes/math/MathNode.d.ts +115 -0
  145. three/examples/jsm/nodes/math/OperatorNode.d.ts +31 -0
  146. three/examples/jsm/nodes/procedural/CheckerNode.d.ts +6 -0
  147. three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +156 -0
  148. three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +310 -0
  149. three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +166 -0
  150. three/examples/jsm/nodes/utils/ArrayElementNode.d.ts +9 -0
  151. three/examples/jsm/nodes/utils/ConvertNode.d.ts +8 -0
  152. three/examples/jsm/nodes/utils/EquirectUVNode.d.ts +6 -0
  153. three/examples/jsm/nodes/utils/JoinNode.d.ts +10 -0
  154. three/examples/jsm/nodes/utils/MatcapUVNode.d.ts +5 -0
  155. three/examples/jsm/nodes/utils/MaxMipLevelNode.d.ts +11 -0
  156. three/examples/jsm/nodes/utils/OscNode.d.ts +19 -0
  157. three/examples/jsm/nodes/utils/RemapNode.d.ts +13 -0
  158. three/examples/jsm/nodes/utils/RotateUVNode.d.ts +10 -0
  159. three/examples/jsm/nodes/utils/SpecularMIPLevelNode.d.ts +8 -0
  160. three/examples/jsm/nodes/utils/SplitNode.d.ts +16 -0
  161. three/examples/jsm/nodes/utils/SpriteSheetUVNode.d.ts +9 -0
  162. three/examples/jsm/nodes/utils/TimerNode.d.ts +19 -0
  163. three/examples/jsm/nodes/utils/TriplanarTexturesNode.d.ts +22 -0
  164. three/examples/jsm/objects/Reflector.d.ts +29 -0
  165. three/examples/jsm/objects/ReflectorForSSRPass.d.ts +1 -0
  166. three/examples/jsm/objects/Refractor.d.ts +2 -1
  167. three/examples/jsm/physics/AmmoPhysics.d.ts +2 -1
  168. three/examples/jsm/physics/RapierPhysics.d.ts +2 -1
  169. three/examples/jsm/postprocessing/EffectComposer.d.ts +31 -0
  170. three/examples/jsm/postprocessing/Pass.d.ts +31 -0
  171. three/examples/jsm/postprocessing/SavePass.d.ts +12 -0
  172. three/examples/jsm/postprocessing/ShaderPass.d.ts +11 -0
  173. three/examples/jsm/renderers/CSS3DRenderer.d.ts +26 -0
  174. three/examples/jsm/renderers/SVGRenderer.d.ts +2 -1
  175. three/examples/jsm/renderers/common/Backend.d.ts +15 -0
  176. three/examples/jsm/renderers/common/Info.d.ts +15 -0
  177. three/examples/jsm/renderers/common/Renderer.d.ts +42 -0
  178. three/examples/jsm/renderers/webgl/nodes/SlotNode.d.ts +17 -0
  179. three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +37 -0
  180. three/examples/jsm/renderers/webgl/nodes/WebGLNodes.d.ts +3 -0
  181. three/examples/jsm/renderers/webgpu/WebGPURenderer.d.ts +9 -0
  182. three/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts +11 -0
  183. three/examples/jsm/shaders/AfterimageShader.d.ts +1 -0
  184. three/examples/jsm/shaders/BasicShader.d.ts +1 -0
  185. three/examples/jsm/shaders/BlendShader.d.ts +1 -0
  186. three/examples/jsm/shaders/BokehShader.d.ts +1 -0
  187. three/examples/jsm/shaders/BokehShader2.d.ts +44 -0
  188. three/examples/jsm/shaders/BrightnessContrastShader.d.ts +1 -0
  189. three/examples/jsm/shaders/ColorCorrectionShader.d.ts +1 -0
  190. three/examples/jsm/shaders/DOFMipMapShader.d.ts +1 -0
  191. three/examples/jsm/shaders/DepthLimitedBlurShader.d.ts +1 -0
  192. three/examples/jsm/shaders/FXAAShader.d.ts +1 -0
  193. three/examples/jsm/shaders/FocusShader.d.ts +1 -0
  194. three/examples/jsm/shaders/FreiChenShader.d.ts +1 -0
  195. three/examples/jsm/shaders/GodRaysShader.d.ts +4 -0
  196. three/examples/jsm/shaders/HalftoneShader.d.ts +1 -0
  197. three/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts +1 -0
  198. three/examples/jsm/shaders/HueSaturationShader.d.ts +1 -0
  199. three/examples/jsm/shaders/KaleidoShader.d.ts +1 -0
  200. three/examples/jsm/shaders/LuminosityHighPassShader.d.ts +1 -0
  201. three/examples/jsm/shaders/LuminosityShader.d.ts +1 -0
  202. three/examples/jsm/shaders/MirrorShader.d.ts +1 -0
  203. three/examples/jsm/shaders/NormalMapShader.d.ts +1 -0
  204. three/examples/jsm/shaders/OutputShader.d.ts +1 -0
  205. three/examples/jsm/shaders/SAOShader.d.ts +1 -0
  206. three/examples/jsm/shaders/SMAAShader.d.ts +3 -0
  207. three/examples/jsm/shaders/SSAOShader.d.ts +3 -0
  208. three/examples/jsm/shaders/SSRShader.d.ts +3 -0
  209. three/examples/jsm/shaders/SobelOperatorShader.d.ts +1 -0
  210. three/examples/jsm/shaders/SubsurfaceScatteringShader.d.ts +1 -0
  211. three/examples/jsm/shaders/TechnicolorShader.d.ts +1 -0
  212. three/examples/jsm/shaders/TriangleBlurShader.d.ts +1 -0
  213. three/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts +1 -0
  214. three/examples/jsm/shaders/VelocityShader.d.ts +14 -0
  215. three/examples/jsm/shaders/VerticalTiltShiftShader.d.ts +1 -0
  216. three/examples/jsm/shaders/WaterRefractionShader.d.ts +1 -0
  217. three/examples/jsm/utils/GPUStatsPanel.d.ts +12 -0
  218. three/examples/jsm/utils/GeometryUtils.d.ts +25 -0
  219. three/examples/jsm/utils/LDrawUtils.d.ts +5 -0
  220. three/examples/jsm/webxr/VRButton.d.ts +5 -0
  221. three/examples/jsm/webxr/XRButton.d.ts +6 -0
  222. three/examples/jsm/webxr/XRControllerModelFactory.d.ts +21 -0
  223. three/examples/jsm/webxr/XREstimatedLight.d.ts +32 -0
  224. three/examples/jsm/webxr/XRHandMeshModel.d.ts +11 -0
  225. three/examples/jsm/webxr/XRHandModelFactory.d.ts +25 -0
  226. three/examples/jsm/webxr/XRHandPrimitiveModel.d.ts +24 -0
  227. three/package.json +3 -2
  228. three/src/cameras/CubeCamera.d.ts +1 -2
  229. three/src/constants.d.ts +21 -10
  230. three/src/core/Object3D.d.ts +4 -4
  231. three/src/core/Raycaster.d.ts +1 -0
  232. three/src/extras/Earcut.d.ts +15 -0
  233. three/src/extras/core/Curve.d.ts +1 -1
  234. three/src/geometries/CapsuleGeometry.d.ts +1 -1
  235. three/src/helpers/AxesHelper.d.ts +2 -2
  236. three/src/helpers/Box3Helper.d.ts +2 -2
  237. three/src/lights/Light.d.ts +1 -2
  238. three/src/materials/Material.d.ts +20 -2
  239. three/src/materials/MeshPhysicalMaterial.d.ts +8 -6
  240. three/src/math/ColorManagement.d.ts +1 -1
  241. three/src/math/Matrix4.d.ts +2 -1
  242. three/src/objects/SkinnedMesh.d.ts +9 -8
  243. three/src/renderers/WebGLRenderer.d.ts +12 -2
  244. three/src/scenes/Scene.d.ts +2 -2
  245. three/src/textures/DepthTexture.d.ts +3 -3
  246. three/src/textures/Texture.d.ts +2 -2
@@ -0,0 +1,29 @@
1
+ import {
2
+ Mesh,
3
+ BufferGeometry,
4
+ ColorRepresentation,
5
+ TextureEncoding,
6
+ WebGLRenderTarget,
7
+ PerspectiveCamera,
8
+ } from '../../../src/Three.js';
9
+
10
+ export interface ReflectorOptions {
11
+ color?: ColorRepresentation;
12
+ textureWidth?: number;
13
+ textureHeight?: number;
14
+ clipBias?: number;
15
+ shader?: object;
16
+ encoding?: TextureEncoding;
17
+ multisample?: number;
18
+ }
19
+
20
+ export class Reflector extends Mesh {
21
+ type: 'Reflector';
22
+ camera: PerspectiveCamera;
23
+
24
+ constructor(geometry?: BufferGeometry, options?: ReflectorOptions);
25
+
26
+ getRenderTarget(): WebGLRenderTarget;
27
+
28
+ dispose(): void;
29
+ }
@@ -12,6 +12,7 @@ import {
12
12
  } from '../../../src/Three.js';
13
13
 
14
14
  export interface ReflectorShader {
15
+ name: string;
15
16
  defines: {
16
17
  DISTANCE_ATTENUATION: boolean;
17
18
  FRESNEL: boolean;
@@ -5,6 +5,7 @@ import {
5
5
  TextureEncoding,
6
6
  WebGLRenderTarget,
7
7
  PerspectiveCamera,
8
+ ShaderMaterial,
8
9
  } from '../../../src/Three.js';
9
10
 
10
11
  export interface RefractorOptions {
@@ -17,7 +18,7 @@ export interface RefractorOptions {
17
18
  multisample?: number;
18
19
  }
19
20
 
20
- export class Refractor extends Mesh {
21
+ export class Refractor extends Mesh<BufferGeometry, ShaderMaterial> {
21
22
  type: 'Refractor';
22
23
  camera: PerspectiveCamera;
23
24
 
@@ -1,6 +1,7 @@
1
- import { Mesh, Vector3 } from '../../../src/Three.js';
1
+ import { Mesh, Object3D, Vector3 } from '../../../src/Three.js';
2
2
 
3
3
  export interface AmmoPhysicsObject {
4
+ addScene: (scene: Object3D) => void;
4
5
  addMesh: (mesh: Mesh, mass?: number) => void;
5
6
  setMeshPosition: (mesh: Mesh, position: Vector3, index?: number) => void;
6
7
  }
@@ -1,8 +1,9 @@
1
- import { Mesh } from '../../../src/Three.js';
1
+ import { Mesh, Object3D } from '../../../src/Three.js';
2
2
 
3
3
  type Vector = { x: number; y: number; z: number };
4
4
 
5
5
  export interface RapierPhysicsObject {
6
+ addScene: (scene: Object3D) => void;
6
7
  addMesh: (mesh: Mesh, mass?: number, restitution?: number) => void;
7
8
  setMeshPosition: (mesh: Mesh, position: Vector, index?: number) => void;
8
9
  setMeshVelocity: (mesh: Mesh, velocity: Vector, index?: number) => void;
@@ -0,0 +1,31 @@
1
+ import { Clock, WebGLRenderer, WebGLRenderTarget } from '../../../src/Three.js';
2
+
3
+ import { Pass, FullScreenQuad } from './Pass.js';
4
+ import { ShaderPass } from './ShaderPass.js';
5
+
6
+ export { FullScreenQuad } from './Pass.js';
7
+ export { Pass };
8
+
9
+ export class EffectComposer {
10
+ constructor(renderer: WebGLRenderer, renderTarget?: WebGLRenderTarget);
11
+ renderer: WebGLRenderer;
12
+ renderTarget1: WebGLRenderTarget;
13
+ renderTarget2: WebGLRenderTarget;
14
+ writeBuffer: WebGLRenderTarget;
15
+ readBuffer: WebGLRenderTarget;
16
+ passes: Pass[];
17
+ copyPass: ShaderPass;
18
+ clock: Clock;
19
+ renderToScreen: boolean;
20
+
21
+ swapBuffers(): void;
22
+ addPass(pass: Pass): void;
23
+ insertPass(pass: Pass, index: number): void;
24
+ removePass(pass: Pass): void;
25
+ isLastEnabledPass(passIndex: number): boolean;
26
+ render(deltaTime?: number): void;
27
+ reset(renderTarget?: WebGLRenderTarget): void;
28
+ setSize(width: number, height: number): void;
29
+ setPixelRatio(pixelRatio: number): void;
30
+ dispose(): void;
31
+ }
@@ -0,0 +1,31 @@
1
+ import { Material, WebGLRenderer, WebGLRenderTarget } from '../../../src/Three.js';
2
+
3
+ export class Pass {
4
+ constructor();
5
+
6
+ isPass: boolean;
7
+ enabled: boolean;
8
+ needsSwap: boolean;
9
+ clear: boolean;
10
+ renderToScreen: boolean;
11
+
12
+ setSize(width: number, height: number): void;
13
+ render(
14
+ renderer: WebGLRenderer,
15
+ writeBuffer: WebGLRenderTarget,
16
+ readBuffer: WebGLRenderTarget,
17
+ deltaTime: number,
18
+ maskActive: boolean,
19
+ ): void;
20
+
21
+ dispose(): void;
22
+ }
23
+
24
+ export class FullScreenQuad {
25
+ constructor(material?: Material);
26
+
27
+ render(renderer: WebGLRenderer): void;
28
+ dispose(): void;
29
+
30
+ material: Material;
31
+ }
@@ -0,0 +1,12 @@
1
+ import { ShaderMaterial, WebGLRenderTarget } from '../../../src/Three.js';
2
+
3
+ import { Pass, FullScreenQuad } from './Pass.js';
4
+
5
+ export class SavePass extends Pass {
6
+ constructor(renderTarget?: WebGLRenderTarget);
7
+ textureID: string;
8
+ renderTarget: WebGLRenderTarget;
9
+ uniforms: object;
10
+ material: ShaderMaterial;
11
+ fsQuad: FullScreenQuad;
12
+ }
@@ -0,0 +1,11 @@
1
+ import { ShaderMaterial } from '../../../src/Three.js';
2
+
3
+ import { Pass, FullScreenQuad } from './Pass.js';
4
+
5
+ export class ShaderPass extends Pass {
6
+ constructor(shader: object, textureID?: string);
7
+ textureID: string;
8
+ uniforms: { [name: string]: { value: any } };
9
+ material: ShaderMaterial;
10
+ fsQuad: FullScreenQuad;
11
+ }
@@ -0,0 +1,26 @@
1
+ import { Object3D, Scene, Camera } from '../../../src/Three.js';
2
+
3
+ export class CSS3DObject extends Object3D {
4
+ constructor(element: HTMLElement);
5
+ element: HTMLElement;
6
+
7
+ onBeforeRender: (renderer: unknown, scene: Scene, camera: Camera) => void;
8
+ onAfterRender: (renderer: unknown, scene: Scene, camera: Camera) => void;
9
+ }
10
+
11
+ export class CSS3DSprite extends CSS3DObject {
12
+ constructor(element: HTMLElement);
13
+ }
14
+
15
+ export interface CSS3DParameters {
16
+ element?: HTMLElement;
17
+ }
18
+
19
+ export class CSS3DRenderer {
20
+ constructor(parameters?: CSS3DParameters);
21
+ domElement: HTMLElement;
22
+
23
+ getSize(): { width: number; height: number };
24
+ setSize(width: number, height: number): void;
25
+ render(scene: Scene, camera: Camera): void;
26
+ }
@@ -1,4 +1,4 @@
1
- import { Object3D, Color, Scene, Camera } from '../../../src/Three.js';
1
+ import { Object3D, Color, Scene, Camera, ColorSpace } from '../../../src/Three.js';
2
2
 
3
3
  export class SVGObject extends Object3D {
4
4
  constructor(node: SVGElement);
@@ -12,6 +12,7 @@ export class SVGRenderer {
12
12
  sortObjects: boolean;
13
13
  sortElements: boolean;
14
14
  overdraw: number;
15
+ outputColorSpace: ColorSpace;
15
16
  info: { render: { vertices: number; faces: number } };
16
17
 
17
18
  getSize(): { width: number; height: number };
@@ -0,0 +1,15 @@
1
+ import { CoordinateSystem } from '../../../../src/Three.js';
2
+ import Renderer from './Renderer.js';
3
+
4
+ export default abstract class Backend {
5
+ renderer: Renderer | null;
6
+ domElement: HTMLCanvasElement | null;
7
+
8
+ constructor(parameters?: { canvas?: HTMLCanvasElement | undefined });
9
+
10
+ init(renderer: Renderer): Promise<void>;
11
+
12
+ abstract get coordinateSystem(): CoordinateSystem;
13
+
14
+ getDomElement(): HTMLCanvasElement;
15
+ }
@@ -0,0 +1,15 @@
1
+ import { Object3D } from '../../../../src/Three.js';
2
+
3
+ export default class Info {
4
+ autoRest: boolean;
5
+
6
+ render: { frame: number; drawCalls: number; triangles: number; points: number; lines: number };
7
+
8
+ memory: { geometries: number; textures: number };
9
+
10
+ update(object: Object3D, count: number, instanceCount: number): void;
11
+
12
+ reset(): void;
13
+
14
+ dispose(): void;
15
+ }
@@ -0,0 +1,42 @@
1
+ import { Camera, ColorSpace, CoordinateSystem, Scene, ToneMapping } from '../../../../src/Three.js';
2
+ import Backend from './Backend.js';
3
+ import Info from './Info.js';
4
+
5
+ export default class Renderer {
6
+ isRenderer: true;
7
+
8
+ domElement: HTMLCanvasElement;
9
+
10
+ backend: Backend;
11
+
12
+ autoClear: boolean;
13
+ autoClearColor: boolean;
14
+ autoClearDepth: boolean;
15
+ autoClearStencil: boolean;
16
+
17
+ outputColorSpace: ColorSpace;
18
+
19
+ toneMapping: ToneMapping;
20
+ toneMappingExposure: number;
21
+
22
+ sortObjects: boolean;
23
+
24
+ depth: boolean;
25
+ stencil: boolean;
26
+
27
+ info: Info;
28
+
29
+ constructor(backend: Backend);
30
+
31
+ init(): Promise<void>;
32
+
33
+ get coordinateSystem(): CoordinateSystem;
34
+
35
+ render(scene: Scene, camera: Camera): Promise<void>;
36
+
37
+ setAnimationLoop(callback: ((time: DOMHighResTimeStamp) => void) | null): void;
38
+
39
+ setPixelRatio(value?: number): void;
40
+
41
+ setSize(width: number, height: number, updateStyle?: boolean): void;
42
+ }
@@ -0,0 +1,17 @@
1
+ import Node from '../../../nodes/core/Node.js';
2
+
3
+ export interface SlotNodeParameters<TNode extends Node = Node> {
4
+ node?: TNode;
5
+ nodeType?: string;
6
+ source?: string | null;
7
+ target?: string | null;
8
+ }
9
+
10
+ export default class SlotNode<TNode extends Node = Node> extends Node {
11
+ inclusionType: 'replace';
12
+ node: TNode | null;
13
+ source: null;
14
+ target: null;
15
+
16
+ constructor(params: SlotNodeParameters<TNode>);
17
+ }
@@ -0,0 +1,37 @@
1
+ import NodeBuilder from '../../../nodes/core/NodeBuilder.js';
2
+ import { Renderer, Object3D } from '../../../../../src/Three.js';
3
+ import Node from '../../../nodes/core/Node.js';
4
+ import SlotNode from './SlotNode.js';
5
+ import { NodeShaderStageOption } from '../../../nodes/core/constants.js';
6
+
7
+ export class WebGLNodeBuilder extends NodeBuilder {
8
+ constructor(
9
+ object: Object3D,
10
+ renderer: Renderer,
11
+ shader: { uniforms: any; vertexShader: any; fragmentShader: any },
12
+ );
13
+
14
+ addSlot(shaderStage: NodeShaderStageOption, slotNode: SlotNode): Node;
15
+
16
+ getUniforms(shaderStage: string): string;
17
+
18
+ getAttributes(shaderStage: string): string;
19
+
20
+ getVarys(shaderStage: string): string;
21
+
22
+ addCode(shaderStage: string, source: string, code: string, scope?: this): string;
23
+ addCodeAfterInclude(shaderStage: string, snippet: string, code: string): string;
24
+
25
+ replaceCode(shaderStage: string, source: string, target: string, scope?: this): void;
26
+ parseInclude(shaderStage: string, ...includes: string[]): void;
27
+
28
+ getInstanceIndex(): string;
29
+ getFrontFacing(): string;
30
+ getFragCoord(): 'gl_FragCoord';
31
+ isFlipY(): true;
32
+
33
+ buildCode(): void;
34
+ build(): this;
35
+
36
+ getSlot(shaderStage: string, name: string): Node;
37
+ }
@@ -0,0 +1,3 @@
1
+ import NodeFrame from '../../../nodes/core/NodeFrame.js';
2
+
3
+ export const nodeFrame: NodeFrame;
@@ -0,0 +1,9 @@
1
+ import Renderer from '../common/Renderer.js';
2
+
3
+ export default class WebGPURenderer extends Renderer {
4
+ constructor(parameters?: {
5
+ canvas?: HTMLCanvasElement | undefined;
6
+ antialias?: boolean | undefined;
7
+ sampleCount?: number | undefined;
8
+ });
9
+ }
@@ -0,0 +1,11 @@
1
+ import { IUniform, Texture } from '../../../src/Three.js';
2
+
3
+ export const ACESFilmicToneMappingShader: {
4
+ name: string;
5
+ uniforms: {
6
+ tDiffuse: IUniform<Texture>;
7
+ exposure: IUniform<number>;
8
+ };
9
+ vertexShader: string;
10
+ fragmentShader: string;
11
+ };
@@ -1,6 +1,7 @@
1
1
  import { IUniform } from '../../../src/Three.js';
2
2
 
3
3
  export const AfterimageShader: {
4
+ name: string;
4
5
  uniforms: {
5
6
  damp: IUniform;
6
7
  tOld: IUniform;
@@ -1,4 +1,5 @@
1
1
  export const BasicShader: {
2
+ name: string;
2
3
  uniforms: {};
3
4
  vertexShader: string;
4
5
  fragmentShader: string;
@@ -1,6 +1,7 @@
1
1
  import { IUniform } from '../../../src/Three.js';
2
2
 
3
3
  export const BlendShader: {
4
+ name: string;
4
5
  uniforms: {
5
6
  tDiffuse1: IUniform;
6
7
  tDiffuse2: IUniform;
@@ -1,6 +1,7 @@
1
1
  import { IUniform } from '../../../src/Three.js';
2
2
 
3
3
  export const BokehShader: {
4
+ name: string;
4
5
  defines: {
5
6
  DEPTH_PACKING: number;
6
7
  PERSPECTIVE_CAMERA: number;
@@ -0,0 +1,44 @@
1
+ import { IUniform } from '../../../src/Three.js';
2
+
3
+ export interface BokehShaderUniforms {
4
+ textureWidth: IUniform;
5
+ textureHeight: IUniform;
6
+ focalDepth: IUniform;
7
+ focalLength: IUniform;
8
+ fstop: IUniform;
9
+ tColor: IUniform;
10
+ tDepth: IUniform;
11
+ maxblur: IUniform;
12
+ showFocus: IUniform;
13
+ manualdof: IUniform;
14
+ vignetting: IUniform;
15
+ depthblur: IUniform;
16
+ threshold: IUniform;
17
+ gain: IUniform;
18
+ bias: IUniform;
19
+ fringe: IUniform;
20
+ znear: IUniform;
21
+ zfar: IUniform;
22
+ noise: IUniform;
23
+ dithering: IUniform;
24
+ pentagon: IUniform;
25
+ shaderFocus: IUniform;
26
+ focusCoords: IUniform;
27
+ }
28
+
29
+ export const BokehShader: {
30
+ name: string;
31
+ uniforms: BokehShaderUniforms;
32
+ vertexShader: string;
33
+ fragmentShader: string;
34
+ };
35
+
36
+ export const BokehDepthShader: {
37
+ name: string;
38
+ uniforms: {
39
+ mNear: IUniform;
40
+ mFar: IUniform;
41
+ };
42
+ vertexShader: string;
43
+ fragmentShader: string;
44
+ };
@@ -1,6 +1,7 @@
1
1
  import { IUniform } from '../../../src/Three.js';
2
2
 
3
3
  export const BrightnessContrastShader: {
4
+ name: string;
4
5
  uniforms: {
5
6
  tDiffuse: IUniform;
6
7
  brightness: IUniform;
@@ -1,6 +1,7 @@
1
1
  import { IUniform } from '../../../src/Three.js';
2
2
 
3
3
  export const ColorCorrectionShader: {
4
+ name: string;
4
5
  uniforms: {
5
6
  tDiffuse: IUniform;
6
7
  powRGB: IUniform;
@@ -1,6 +1,7 @@
1
1
  import { IUniform } from '../../../src/Three.js';
2
2
 
3
3
  export const DOFMipMapShader: {
4
+ name: string;
4
5
  uniforms: {
5
6
  tColor: IUniform;
6
7
  tDepth: IUniform;
@@ -1,6 +1,7 @@
1
1
  import { IUniform, Vector2, Material } from '../../../src/Three.js';
2
2
 
3
3
  export const DepthLimitedBlurShader: {
4
+ name: string;
4
5
  defines: {
5
6
  KERNEL_RADIUS: number;
6
7
  DEPTH_PACKING: number;
@@ -1,6 +1,7 @@
1
1
  import { IUniform } from '../../../src/Three.js';
2
2
 
3
3
  export const FXAAShader: {
4
+ name: string;
4
5
  uniforms: {
5
6
  tDiffuse: IUniform;
6
7
  resolution: IUniform;
@@ -1,6 +1,7 @@
1
1
  import { IUniform } from '../../../src/Three.js';
2
2
 
3
3
  export const FocusShader: {
4
+ name: string;
4
5
  uniforms: {
5
6
  tDiffuse: IUniform;
6
7
  screenWidth: IUniform;
@@ -1,6 +1,7 @@
1
1
  import { IUniform } from '../../../src/Three.js';
2
2
 
3
3
  export const FreiChenShader: {
4
+ name: string;
4
5
  uniforms: {
5
6
  tDiffuse: IUniform;
6
7
  aspect: IUniform;
@@ -1,6 +1,7 @@
1
1
  import { IUniform } from '../../../src/Three.js';
2
2
 
3
3
  export const GodRaysDepthMaskShader: {
4
+ name: string;
4
5
  uniforms: {
5
6
  tInput: IUniform;
6
7
  };
@@ -9,6 +10,7 @@ export const GodRaysDepthMaskShader: {
9
10
  };
10
11
 
11
12
  export const GodRaysGenerateShader: {
13
+ name: string;
12
14
  uniforms: {
13
15
  tInput: IUniform;
14
16
  fStepSize: IUniform;
@@ -19,6 +21,7 @@ export const GodRaysGenerateShader: {
19
21
  };
20
22
 
21
23
  export const GodRaysCombineShader: {
24
+ name: string;
22
25
  uniforms: {
23
26
  tColors: IUniform;
24
27
  tGodRays: IUniform;
@@ -29,6 +32,7 @@ export const GodRaysCombineShader: {
29
32
  };
30
33
 
31
34
  export const GodRaysFakeSunShader: {
35
+ name: string;
32
36
  uniforms: {
33
37
  vSunPositionScreenSpace: IUniform;
34
38
  fAspect: IUniform;
@@ -1,6 +1,7 @@
1
1
  import { IUniform } from '../../../src/Three.js';
2
2
 
3
3
  export const HalftoneShader: {
4
+ name: string;
4
5
  uniforms: {
5
6
  tDiffuse: IUniform;
6
7
  shape: IUniform;
@@ -1,6 +1,7 @@
1
1
  import { IUniform } from '../../../src/Three.js';
2
2
 
3
3
  export const HorizontalTiltShiftShader: {
4
+ name: string;
4
5
  uniforms: {
5
6
  tDiffuse: IUniform;
6
7
  h: IUniform;
@@ -1,6 +1,7 @@
1
1
  import { IUniform } from '../../../src/Three.js';
2
2
 
3
3
  export const HueSaturationShader: {
4
+ name: string;
4
5
  uniforms: {
5
6
  tDiffuse: IUniform;
6
7
  hue: IUniform;
@@ -1,6 +1,7 @@
1
1
  import { IUniform } from '../../../src/Three.js';
2
2
 
3
3
  export const KaleidoShader: {
4
+ name: string;
4
5
  uniforms: {
5
6
  tDiffuse: IUniform;
6
7
  sides: IUniform;
@@ -1,6 +1,7 @@
1
1
  import { IUniform } from '../../../src/Three.js';
2
2
 
3
3
  export const LuminosityHighPassShader: {
4
+ name: string;
4
5
  shaderID: string;
5
6
  uniforms: {
6
7
  tDiffuse: IUniform;
@@ -1,6 +1,7 @@
1
1
  import { IUniform } from '../../../src/Three.js';
2
2
 
3
3
  export const LuminosityShader: {
4
+ name: string;
4
5
  uniforms: {
5
6
  tDiffuse: IUniform;
6
7
  };
@@ -1,6 +1,7 @@
1
1
  import { IUniform } from '../../../src/Three.js';
2
2
 
3
3
  export const MirrorShader: {
4
+ name: string;
4
5
  uniforms: {
5
6
  tDiffuse: IUniform;
6
7
  side: IUniform;
@@ -1,6 +1,7 @@
1
1
  import { IUniform } from '../../../src/Three.js';
2
2
 
3
3
  export const NormalMapShader: {
4
+ name: string;
4
5
  uniforms: {
5
6
  heightMap: IUniform;
6
7
  resolution: IUniform;
@@ -1,6 +1,7 @@
1
1
  import { IUniform } from '../../../src/Three.js';
2
2
 
3
3
  export const OutputShader: {
4
+ name: string;
4
5
  uniforms: {
5
6
  tDiffuse: IUniform;
6
7
  toneMappingExposure: IUniform;
@@ -1,6 +1,7 @@
1
1
  import { IUniform } from '../../../src/Three.js';
2
2
 
3
3
  export const SAOShader: {
4
+ name: string;
4
5
  defines: {
5
6
  NUM_SAMPLES: number;
6
7
  NUM_RINGS: number;
@@ -1,6 +1,7 @@
1
1
  import { IUniform } from '../../../src/Three.js';
2
2
 
3
3
  export const SMAAEdgesShader: {
4
+ name: string;
4
5
  defines: {
5
6
  SMAA_THRESHOLD: string;
6
7
  };
@@ -13,6 +14,7 @@ export const SMAAEdgesShader: {
13
14
  };
14
15
 
15
16
  export const SMAAWeightsShader: {
17
+ name: string;
16
18
  defines: {
17
19
  SMAA_MAX_SEARCH_STEPS: string;
18
20
  SMAA_AREATEX_MAX_DISTANCE: string;
@@ -30,6 +32,7 @@ export const SMAAWeightsShader: {
30
32
  };
31
33
 
32
34
  export const SMAABlendShader: {
35
+ name: string;
33
36
  uniforms: {
34
37
  tDiffuse: IUniform;
35
38
  tColor: IUniform;