@types/three 0.157.2 → 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 (87) hide show
  1. three/README.md +1 -1
  2. three/examples/jsm/Addons.d.ts +290 -0
  3. three/examples/jsm/controls/OrbitControls.d.ts +18 -0
  4. three/examples/jsm/libs/lil-gui.module.min.d.ts +5 -5
  5. three/examples/jsm/loaders/KTX2Loader.d.ts +2 -1
  6. three/examples/jsm/loaders/LogLuvLoader.d.ts +1 -1
  7. three/examples/jsm/loaders/PCDLoader.d.ts +3 -3
  8. three/examples/jsm/math/Capsule.d.ts +0 -1
  9. three/examples/jsm/misc/MD2CharacterComplex.d.ts +9 -1
  10. three/examples/jsm/objects/ReflectorForSSRPass.d.ts +1 -0
  11. three/examples/jsm/objects/Refractor.d.ts +2 -1
  12. three/examples/jsm/physics/AmmoPhysics.d.ts +2 -1
  13. three/examples/jsm/physics/RapierPhysics.d.ts +2 -1
  14. three/examples/jsm/renderers/SVGRenderer.d.ts +2 -1
  15. three/examples/jsm/renderers/common/Backend.d.ts +15 -0
  16. three/examples/jsm/renderers/common/Info.d.ts +15 -0
  17. three/examples/jsm/renderers/common/Renderer.d.ts +42 -0
  18. three/examples/jsm/renderers/webgpu/WebGPURenderer.d.ts +9 -0
  19. three/examples/jsm/shaders/ACESFilmicToneMappingShader.d.ts +1 -0
  20. three/examples/jsm/shaders/AfterimageShader.d.ts +1 -0
  21. three/examples/jsm/shaders/BasicShader.d.ts +1 -0
  22. three/examples/jsm/shaders/BlendShader.d.ts +1 -0
  23. three/examples/jsm/shaders/BokehShader.d.ts +1 -0
  24. three/examples/jsm/shaders/BokehShader2.d.ts +2 -0
  25. three/examples/jsm/shaders/BrightnessContrastShader.d.ts +1 -0
  26. three/examples/jsm/shaders/ColorCorrectionShader.d.ts +1 -0
  27. three/examples/jsm/shaders/DOFMipMapShader.d.ts +1 -0
  28. three/examples/jsm/shaders/DepthLimitedBlurShader.d.ts +1 -0
  29. three/examples/jsm/shaders/FXAAShader.d.ts +1 -0
  30. three/examples/jsm/shaders/FocusShader.d.ts +1 -0
  31. three/examples/jsm/shaders/FreiChenShader.d.ts +1 -0
  32. three/examples/jsm/shaders/GodRaysShader.d.ts +4 -0
  33. three/examples/jsm/shaders/HalftoneShader.d.ts +1 -0
  34. three/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts +1 -0
  35. three/examples/jsm/shaders/HueSaturationShader.d.ts +1 -0
  36. three/examples/jsm/shaders/KaleidoShader.d.ts +1 -0
  37. three/examples/jsm/shaders/LuminosityHighPassShader.d.ts +1 -0
  38. three/examples/jsm/shaders/LuminosityShader.d.ts +1 -0
  39. three/examples/jsm/shaders/MirrorShader.d.ts +1 -0
  40. three/examples/jsm/shaders/NormalMapShader.d.ts +1 -0
  41. three/examples/jsm/shaders/OutputShader.d.ts +1 -0
  42. three/examples/jsm/shaders/SAOShader.d.ts +1 -0
  43. three/examples/jsm/shaders/SMAAShader.d.ts +3 -0
  44. three/examples/jsm/shaders/SSAOShader.d.ts +3 -0
  45. three/examples/jsm/shaders/SSRShader.d.ts +3 -0
  46. three/examples/jsm/shaders/SobelOperatorShader.d.ts +1 -0
  47. three/examples/jsm/shaders/SubsurfaceScatteringShader.d.ts +1 -0
  48. three/examples/jsm/shaders/TechnicolorShader.d.ts +1 -0
  49. three/examples/jsm/shaders/TriangleBlurShader.d.ts +1 -0
  50. three/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts +1 -0
  51. three/examples/jsm/shaders/VelocityShader.d.ts +1 -0
  52. three/examples/jsm/shaders/VerticalTiltShiftShader.d.ts +1 -0
  53. three/examples/jsm/shaders/WaterRefractionShader.d.ts +1 -0
  54. three/examples/jsm/utils/GPUStatsPanel.d.ts +12 -0
  55. three/examples/jsm/webxr/XRButton.d.ts +1 -1
  56. three/examples/jsm/webxr/XREstimatedLight.d.ts +32 -0
  57. three/package.json +3 -2
  58. three/src/cameras/CubeCamera.d.ts +1 -2
  59. three/src/constants.d.ts +21 -10
  60. three/src/core/Object3D.d.ts +4 -4
  61. three/src/core/Raycaster.d.ts +1 -0
  62. three/src/extras/core/Curve.d.ts +1 -1
  63. three/src/geometries/CapsuleGeometry.d.ts +1 -1
  64. three/src/helpers/AxesHelper.d.ts +2 -2
  65. three/src/helpers/Box3Helper.d.ts +2 -2
  66. three/src/lights/Light.d.ts +1 -2
  67. three/src/materials/Material.d.ts +20 -2
  68. three/src/materials/MeshPhysicalMaterial.d.ts +8 -6
  69. three/src/math/ColorManagement.d.ts +1 -1
  70. three/src/math/Matrix4.d.ts +2 -1
  71. three/src/objects/SkinnedMesh.d.ts +9 -8
  72. three/src/renderers/WebGLRenderer.d.ts +12 -2
  73. three/src/scenes/Scene.d.ts +2 -2
  74. three/src/textures/DepthTexture.d.ts +3 -3
  75. three/src/textures/Texture.d.ts +2 -2
  76. three/examples/jsm/controls/FirstPersonControls.d.ts +0 -31
  77. three/examples/jsm/geometries/TextGeometry.d.ts +0 -115
  78. three/examples/jsm/loaders/FontLoader.d.ts +0 -27
  79. three/examples/jsm/loaders/HDRCubeTextureLoader.d.ts +0 -18
  80. three/examples/jsm/loaders/RGBMLoader.d.ts +0 -32
  81. three/examples/jsm/modifiers/TessellateModifier.d.ts +0 -9
  82. three/examples/jsm/objects/GroundProjectedSkybox.d.ts +0 -13
  83. three/examples/jsm/objects/MarchingCubes.d.ts +0 -76
  84. three/examples/jsm/shaders/ToonShader.d.ts +0 -54
  85. three/examples/jsm/textures/FlakesTexture.d.ts +0 -3
  86. three/examples/jsm/utils/CameraUtils.d.ts +0 -9
  87. three/examples/jsm/utils/ShadowMapViewer.d.ts +0 -24
@@ -13,11 +13,14 @@ import {
13
13
  StencilOp,
14
14
  PixelFormat,
15
15
  } from '../constants.js';
16
+ import { Color, ColorRepresentation } from '../math/Color.js';
16
17
 
17
18
  export interface MaterialParameters {
18
19
  alphaHash?: boolean | undefined;
19
20
  alphaTest?: number | undefined;
20
21
  alphaToCoverage?: boolean | undefined;
22
+ blendAlpha?: number | undefined;
23
+ blendColor?: ColorRepresentation | undefined;
21
24
  blendDst?: BlendingDstFactor | undefined;
22
25
  blendDstAlpha?: number | undefined;
23
26
  blendEquation?: BlendingEquation | undefined;
@@ -86,6 +89,20 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
86
89
  */
87
90
  alphaToCoverage: boolean;
88
91
 
92
+ /**
93
+ * Represents the alpha value of the constant blend color. This property has only an effect when using custom
94
+ * blending with {@link ConstantAlphaFactor} or {@link OneMinusConstantAlphaFactor}.
95
+ * @default 0
96
+ */
97
+ blendAlpha: number;
98
+
99
+ /**
100
+ * Represent the RGB values of the constant blend color. This property has only an effect when using custom
101
+ * blending with {@link ConstantColorFactor} or {@link OneMinusConstantColorFactor}.
102
+ * @default 0x000000
103
+ */
104
+ blendColor: Color;
105
+
89
106
  /**
90
107
  * Blending destination. It's one of the blending mode constants defined in Three.js. Default is {@link OneMinusSrcAlphaFactor}.
91
108
  * @default THREE.OneMinusSrcAlphaFactor
@@ -141,7 +158,7 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
141
158
  * See the WebGL / clipping /intersection example. Default is null.
142
159
  * @default null
143
160
  */
144
- clippingPlanes: Plane[];
161
+ clippingPlanes: Plane[] | null;
145
162
 
146
163
  /**
147
164
  * Defines whether to clip shadows according to the clipping planes specified on this material. Default is false.
@@ -169,7 +186,8 @@ export class Material extends EventDispatcher<{ dispose: {} }> {
169
186
  depthFunc: DepthModes;
170
187
 
171
188
  /**
172
- * Whether to have depth test enabled when rendering this material. Default is true.
189
+ * Whether to have depth test enabled when rendering this material. When the depth test is disabled, the depth write
190
+ * will also be implicitly disabled.
173
191
  * @default true
174
192
  */
175
193
  depthTest: boolean;
@@ -1,7 +1,7 @@
1
- import { Texture } from './../textures/Texture.js';
2
- import { Vector2 } from './../math/Vector2.js';
1
+ import { Texture } from '../textures/Texture.js';
2
+ import { Vector2 } from '../math/Vector2.js';
3
3
  import { MeshStandardMaterialParameters, MeshStandardMaterial } from './MeshStandardMaterial.js';
4
- import { Color } from './../math/Color.js';
4
+ import { Color, ColorRepresentation } from '../math/Color.js';
5
5
 
6
6
  export interface MeshPhysicalMaterialParameters extends MeshStandardMaterialParameters {
7
7
  clearcoat?: number | undefined;
@@ -15,7 +15,7 @@ export interface MeshPhysicalMaterialParameters extends MeshStandardMaterialPara
15
15
  ior?: number | undefined;
16
16
 
17
17
  sheen?: number | undefined;
18
- sheenColor?: Color | undefined;
18
+ sheenColor?: ColorRepresentation | undefined;
19
19
  sheenColorMap?: Texture | null | undefined;
20
20
  sheenRoughness?: number | undefined;
21
21
  sheenRoughnessMap?: Texture | null | undefined;
@@ -27,10 +27,10 @@ export interface MeshPhysicalMaterialParameters extends MeshStandardMaterialPara
27
27
  thicknessMap?: Texture | null | undefined;
28
28
 
29
29
  attenuationDistance?: number | undefined;
30
- attenuationColor?: Color | undefined;
30
+ attenuationColor?: ColorRepresentation | undefined;
31
31
 
32
32
  specularIntensity?: number | undefined;
33
- specularColor?: Color | undefined;
33
+ specularColor?: ColorRepresentation | undefined;
34
34
  specularIntensityMap?: Texture | null | undefined;
35
35
  specularColorMap?: Texture | null | undefined;
36
36
 
@@ -48,6 +48,8 @@ export interface MeshPhysicalMaterialParameters extends MeshStandardMaterialPara
48
48
  export class MeshPhysicalMaterial extends MeshStandardMaterial {
49
49
  constructor(parameters?: MeshPhysicalMaterialParameters);
50
50
 
51
+ isMeshPhysicalMaterial: boolean;
52
+
51
53
  /**
52
54
  * @default 'MeshPhysicalMaterial'
53
55
  */
@@ -26,7 +26,7 @@ export interface ColorManagement {
26
26
  * @default LinearSRGBColorSpace
27
27
  */
28
28
  get workingColorSpace(): WorkingColorSpace;
29
- set workingSpaceColor(colorSpace: WorkingColorSpace);
29
+ set workingColorSpace(colorSpace: WorkingColorSpace);
30
30
 
31
31
  convert: (color: Color, sourceColorSpace: DefinedColorSpace, targetColorSpace: DefinedColorSpace) => Color;
32
32
 
@@ -156,7 +156,8 @@ export class Matrix4 implements Matrix {
156
156
  /**
157
157
  * Sets the position component for this matrix from vector v.
158
158
  */
159
- setPosition(v: Vector3 | number, y?: number, z?: number): Matrix4;
159
+ setPosition(v: Vector3): Matrix4;
160
+ setPosition(x: number, y: number, z: number): Matrix4;
160
161
 
161
162
  /**
162
163
  * Inverts this matrix.
@@ -1,11 +1,12 @@
1
- import { Material } from './../materials/Material.js';
1
+ import { Material } from '../materials/Material.js';
2
2
  import { Box3 } from '../math/Box3.js';
3
- import { Matrix4 } from './../math/Matrix4.js';
4
- import { Vector3 } from './../math/Vector3.js';
3
+ import { Matrix4 } from '../math/Matrix4.js';
4
+ import { Vector3 } from '../math/Vector3.js';
5
5
  import { Skeleton } from './Skeleton.js';
6
6
  import { Mesh } from './Mesh.js';
7
7
  import { BufferGeometry } from '../core/BufferGeometry.js';
8
8
  import { Sphere } from '../math/Sphere.js';
9
+ import { BindMode } from '../constants.js';
9
10
 
10
11
  /**
11
12
  * A mesh that has a {@link THREE.Skeleton | Skeleton} with {@link Bone | bones} that can then be used to animate the vertices of the geometry.
@@ -72,12 +73,12 @@ export class SkinnedMesh<
72
73
  override readonly type: string | 'SkinnedMesh';
73
74
 
74
75
  /**
75
- * Either `attached` or `detached`.
76
- * - `attached` uses the {@link THREE.SkinnedMesh.matrixWorld | SkinnedMesh.matrixWorld} property for the base transform matrix of the bones.
77
- * - `detached` uses the {@link THREE.SkinnedMesh.bindMatrix | SkinnedMesh.bindMatrix}.
78
- * @defaultValue `attached`.
76
+ * Either {@link AttachedBindMode} or {@link DetachedBindMode}. {@link AttachedBindMode} means the skinned mesh
77
+ * shares the same world space as the skeleton. This is not true when using {@link DetachedBindMode} which is useful
78
+ * when sharing a skeleton across multiple skinned meshes.
79
+ * @defaultValue `AttachedBindMode`
79
80
  */
80
- bindMode: 'attached' | 'detached';
81
+ bindMode: BindMode;
81
82
 
82
83
  /**
83
84
  * The base matrix that is used for the bound bone transforms.
@@ -370,9 +370,19 @@ export class WebGLRenderer implements Renderer {
370
370
  animate(callback: () => void): void;
371
371
 
372
372
  /**
373
- * Compiles all materials in the scene with the camera. This is useful to precompile shaders before the first rendering.
373
+ * Compiles all materials in the scene with the camera. This is useful to precompile shaders before the first
374
+ * rendering. If you want to add a 3D object to an existing scene, use the third optional parameter for applying the
375
+ * target scene.
376
+ * Note that the (target) scene's lighting should be configured before calling this method.
374
377
  */
375
- compile(scene: Object3D, camera: Camera): void;
378
+ compile: (scene: Object3D, camera: Camera, targetScene?: Scene | null) => Set<Material>;
379
+
380
+ /**
381
+ * Asynchronous version of {@link compile}(). The method returns a Promise that resolves when the given scene can be
382
+ * rendered without unnecessary stalling due to shader compilation.
383
+ * This method makes use of the KHR_parallel_shader_compile WebGL extension.
384
+ */
385
+ compileAsync: (scene: Object3D, camera: Camera, targetScene?: Scene | null) => Promise<Object3D>;
376
386
 
377
387
  /**
378
388
  * Render a scene or an object using a camera.
@@ -1,6 +1,6 @@
1
1
  import { FogBase } from './Fog.js';
2
- import { Material } from './../materials/Material.js';
3
- import { Object3D } from './../core/Object3D.js';
2
+ import { Material } from '../materials/Material.js';
3
+ import { Object3D } from '../core/Object3D.js';
4
4
  import { Color } from '../math/Color.js';
5
5
  import { Texture } from '../textures/Texture.js';
6
6
  import { CubeTexture } from '../Three.js';
@@ -3,7 +3,7 @@ import {
3
3
  Mapping,
4
4
  Wrapping,
5
5
  TextureDataType,
6
- DeepTexturePixelFormat,
6
+ DepthTexturePixelFormat,
7
7
  MagnificationTextureFilter,
8
8
  MinificationTextureFilter,
9
9
  TextureComparisonFunction,
@@ -42,7 +42,7 @@ export class DepthTexture extends Texture {
42
42
  magFilter?: MagnificationTextureFilter,
43
43
  minFilter?: MinificationTextureFilter,
44
44
  anisotropy?: number,
45
- format?: DeepTexturePixelFormat,
45
+ format?: DepthTexturePixelFormat,
46
46
  );
47
47
 
48
48
  /**
@@ -88,7 +88,7 @@ export class DepthTexture extends Texture {
88
88
  * @see {@link Texture.format | Texture.format}
89
89
  * @defaultValue {@link THREE.DepthFormat}.
90
90
  */
91
- format: DeepTexturePixelFormat;
91
+ format: DepthTexturePixelFormat;
92
92
 
93
93
  /**
94
94
  * @override
@@ -201,8 +201,8 @@ export class Texture extends EventDispatcher<{ dispose: {} }> {
201
201
 
202
202
  /**
203
203
  * These define how elements of a 2D texture, or texels, are read by shaders.
204
- * @remarks All {@link Texture} types except {@link THREE.DeepTexture} and {@link THREE.CompressedPixelFormat} expect the _values_ be {@link THREE.PixelFormat}
205
- * @remarks {@link DeepTexture} expect the _values_ be {@link THREE.CubeTextureMapping}
204
+ * @remarks All {@link Texture} types except {@link THREE.DepthTexture} and {@link THREE.CompressedPixelFormat} expect the _values_ be {@link THREE.PixelFormat}
205
+ * @remarks {@link DepthTexture} expect the _values_ be {@link THREE.CubeTextureMapping}
206
206
  * @remarks {@link CompressedPixelFormat} expect the _values_ be {@link THREE.CubeTextureMapping}
207
207
  * @see {@link https://threejs.org/docs/index.html#api/en/constants/Textures | Texture Constants}
208
208
  * @see {@link THREE.PixelFormat}
@@ -1,31 +0,0 @@
1
- import { Camera, Vector3 } from '../../../src/Three.js';
2
-
3
- export class FirstPersonControls {
4
- constructor(object: Camera, domElement?: HTMLElement);
5
-
6
- object: Camera;
7
- domElement: HTMLElement | Document;
8
-
9
- enabled: boolean;
10
- movementSpeed: number;
11
- lookSpeed: number;
12
- lookVertical: boolean;
13
- autoForward: boolean;
14
- activeLook: boolean;
15
- heightSpeed: boolean;
16
- heightCoef: number;
17
- heightMin: number;
18
- heightMax: number;
19
- constrainVertical: boolean;
20
- verticalMin: number;
21
- verticalMax: number;
22
- mouseDragOn: boolean;
23
-
24
- handleResize(): void;
25
-
26
- lookAt(x: Vector3): this;
27
- lookAt(x: number, y: number, z: number): this;
28
-
29
- update(delta: number): this;
30
- dispose(): void;
31
- }
@@ -1,115 +0,0 @@
1
- import { ExtrudeGeometry, ExtrudeGeometryOptions, Shape } from '../../../src/Three.js';
2
-
3
- import { Font } from '../loaders/FontLoader.js';
4
-
5
- export interface TextGeometryParameters extends ExtrudeGeometryOptions {
6
- font: Font;
7
-
8
- /**
9
- * Size of the text
10
- * Expects a `Float`.
11
- * @defaultValue `100`
12
- */
13
- size?: number | undefined;
14
-
15
- /**
16
- * Thickness to extrude text.
17
- * Expects a `Float`.
18
- * @defaultValue `50`
19
- */
20
- height?: number | undefined;
21
-
22
- /**
23
- * @override
24
- * @defaultValue `12`
25
- */
26
- curveSegments?: number | undefined;
27
-
28
- /**
29
- * @defaultValue `false`
30
- */
31
- bevelEnabled?: boolean | undefined;
32
-
33
- /**
34
- * How deep into text bevel goes.
35
- * Expects a `Float`.
36
- * @override
37
- * @defaultValue `10`
38
- */
39
- bevelThickness?: number | undefined;
40
-
41
- /**
42
- * How far from text outline is bevel.
43
- * Expects a `Float`.
44
- * @override
45
- * @defaultValue `8`
46
- */
47
- bevelSize?: number | undefined;
48
-
49
- /**
50
- * How far from text outline bevel starts.
51
- * Expects a `Float`.
52
- * @override
53
- * @defaultValue `0`
54
- */
55
- bevelOffset?: number | undefined;
56
-
57
- /**
58
- * @override
59
- * @defaultValue `3`
60
- */
61
- bevelSegments?: number | undefined;
62
- }
63
-
64
- /**
65
- * A class for generating text as a single geometry
66
- * @remarks
67
- * It is constructed by providing a string of text, and a set of parameters consisting of a loaded font and settings for the geometry's parent {@link THREE.ExtrudeGeometry | ExtrudeGeometry}
68
- * See the {@link THREE.FontLoader | FontLoader} page for additional details.
69
- * @example
70
- * ```typescript
71
- * const loader = new FontLoader();
72
- * loader.load('fonts/helvetiker_regular.typeface.json', function (font) {
73
- * const geometry = new TextGeometry('Hello three.js!', {
74
- * font: font,
75
- * size: 80,
76
- * height: 5,
77
- * curveSegments: 12,
78
- * bevelEnabled: true,
79
- * bevelThickness: 10,
80
- * bevelSize: 8,
81
- * bevelOffset: 0,
82
- * bevelSegments: 5
83
- * });
84
- * });
85
- * ```
86
- * @see Example: {@link https://threejs.org/examples/#webgl_geometry_text | geometry / text }
87
- * @see {@link https://threejs.org/docs/index.html#api/en/C:/rafaelsc/Source/threejs/three.js/docs/examples/en/geometries/TextGeometry | Official Documentation}
88
- * @see {@link https://github.com/mrdoob/three.js/blob/master/examples/jsm/geometries/TextGeometry.js | Source}
89
- */
90
- export class TextGeometry extends ExtrudeGeometry {
91
- /**
92
- * Create a new instance of {@link TextGeometry}
93
- * @param text The text that needs to be shown.
94
- * @param parameters Object that can contain the following parameters. @see {@link TextGeometryParameters} for defaults.
95
- */
96
- constructor(text: string, parameters?: TextGeometryParameters);
97
-
98
- /**
99
- * A Read-only _string_ to check if `this` object type.
100
- * @remarks Sub-classes will update this value.
101
- * @defaultValue `TextGeometry`
102
- */
103
- override readonly type: string | 'TextGeometry';
104
-
105
- /**
106
- * An object with a property for each of the constructor parameters.
107
- * @remarks Any modification after instantiation does not change the geometry.
108
- */
109
- readonly parameters: {
110
- readonly shapes: Shape | Shape[];
111
- readonly options: TextGeometryParameters;
112
- };
113
- }
114
-
115
- export { TextGeometry as TextBufferGeometry };
@@ -1,27 +0,0 @@
1
- import { Shape, Loader, LoadingManager } from '../../../src/Three.js';
2
-
3
- export class FontLoader extends Loader<Font> {
4
- constructor(manager?: LoadingManager);
5
-
6
- load(
7
- url: string,
8
- onLoad?: (data: Font) => void,
9
- onProgress?: (event: ProgressEvent) => void,
10
- onError?: (err: unknown) => void,
11
- ): void;
12
-
13
- parse(json: any): Font;
14
- }
15
-
16
- export class Font {
17
- constructor(jsondata: any);
18
-
19
- /**
20
- * @default 'Font'
21
- */
22
- type: string;
23
-
24
- data: string;
25
-
26
- generateShapes(text: string, size: number): Shape[];
27
- }
@@ -1,18 +0,0 @@
1
- import { CubeTexture, Loader, LoadingManager, TextureDataType } from '../../../src/Three.js';
2
-
3
- import { RGBELoader } from './RGBELoader.js';
4
-
5
- export class HDRCubeTextureLoader extends Loader<CubeTexture, readonly string[]> {
6
- constructor(manager?: LoadingManager);
7
- hdrLoader: RGBELoader;
8
- type: TextureDataType;
9
-
10
- load(
11
- url: readonly string[],
12
- onLoad?: (data: CubeTexture) => void,
13
- onProgress?: (event: ProgressEvent) => void,
14
- onError?: (err: unknown) => void,
15
- ): CubeTexture;
16
-
17
- setDataType(type: TextureDataType): this;
18
- }
@@ -1,32 +0,0 @@
1
- import { CubeTexture, LoadingManager, DataTextureLoader, PixelFormat, TextureDataType } from '../../../src/Three.js';
2
-
3
- export interface RGBM {
4
- width: number;
5
- height: number;
6
- data: Uint16Array | Float32Array;
7
- header: string;
8
- format: PixelFormat;
9
- type: TextureDataType;
10
- flipY: boolean;
11
- }
12
-
13
- export class RGBMLoader extends DataTextureLoader {
14
- type: TextureDataType;
15
-
16
- maxRange: number;
17
-
18
- constructor(manager?: LoadingManager);
19
-
20
- loadCubemap(
21
- urls: string[],
22
- onLoad?: (texture: CubeTexture) => void,
23
- onProgress?: (event: ProgressEvent) => void,
24
- onError?: (event: ErrorEvent) => void,
25
- ): CubeTexture;
26
-
27
- parse(buffer: ArrayBuffer): RGBM;
28
-
29
- setDataType(dataType: TextureDataType): this;
30
-
31
- setMaxRange(value: number): this;
32
- }
@@ -1,9 +0,0 @@
1
- import { BufferGeometry } from '../../../src/Three.js';
2
-
3
- export class TessellateModifier {
4
- constructor(maxEdgeLength?: number, maxIterations?: number);
5
- maxEdgeLength: number;
6
- maxIterations: number;
7
-
8
- modify<TGeometry extends BufferGeometry>(geometry: TGeometry): TGeometry;
9
- }
@@ -1,13 +0,0 @@
1
- import { Mesh, IcosahedronGeometry, ShaderMaterial, Texture } from '../../../src/Three.js';
2
-
3
- export class GroundProjectedSkybox extends Mesh<IcosahedronGeometry, ShaderMaterial> {
4
- constructor(texture: Texture, options?: { height?: number; radius?: number });
5
-
6
- set radius(radius: number);
7
-
8
- get radius(): number;
9
-
10
- set height(height: number);
11
-
12
- get height(): number;
13
- }
@@ -1,76 +0,0 @@
1
- import { BufferGeometry, Material, Mesh, Color } from '../../../src/Three.js';
2
-
3
- export class MarchingCubes extends Mesh {
4
- constructor(
5
- resolution: number,
6
- material: Material,
7
- enableUvs?: boolean,
8
- enableColors?: boolean,
9
- maxPolyCount?: number,
10
- );
11
-
12
- enableUvs: boolean;
13
- enableColors: boolean;
14
-
15
- resolution: number;
16
-
17
- // parameters
18
-
19
- isolation: number;
20
-
21
- // size of field, 32 is pushing it in Javascript :)
22
-
23
- size: number;
24
- size2: number;
25
- size3: number;
26
- halfsize: number;
27
-
28
- // deltas
29
-
30
- delta: number;
31
- yd: number;
32
- zd: number;
33
-
34
- field: Float32Array;
35
- normal_cache: Float32Array;
36
- palette: Float32Array;
37
-
38
- maxCount: number;
39
- count: number;
40
-
41
- hasPositions: boolean;
42
- hasNormals: boolean;
43
- hasColors: boolean;
44
- hasUvs: boolean;
45
-
46
- positionArray: Float32Array;
47
- normalArray: Float32Array;
48
-
49
- uvArray: Float32Array;
50
- colorArray: Float32Array;
51
-
52
- begin(): void;
53
- end(): void;
54
-
55
- init(resolution: number): void;
56
-
57
- addBall(ballx: number, bally: number, ballz: number, strength: number, subtract: number, colors?: Color): void;
58
-
59
- addPlaneX(strength: number, subtract: number): void;
60
- addPlaneY(strength: number, subtract: number): void;
61
- addPlaneZ(strength: number, subtract: number): void;
62
-
63
- setCell(x: number, y: number, z: number, value: number): void;
64
- getCell(x: number, y: number, z: number): number;
65
-
66
- blur(intensity: number): void;
67
-
68
- reset(): void;
69
- update(): void;
70
- render(renderCallback: any): void;
71
- generateGeometry(): BufferGeometry;
72
- generateBufferGeometry(): BufferGeometry;
73
- }
74
-
75
- export const edgeTable: Int32Array[];
76
- export const triTable: Int32Array[];
@@ -1,54 +0,0 @@
1
- import { IUniform } from '../../../src/Three.js';
2
-
3
- export const ToonShader1: {
4
- uniforms: {
5
- uDirLightPos: IUniform;
6
- uDirLightColor: IUniform;
7
- uAmbientLightColor: IUniform;
8
- uBaseColor: IUniform;
9
- };
10
- vertexShader: string;
11
- fragmentShader: string;
12
- };
13
-
14
- export const ToonShader2: {
15
- uniforms: {
16
- uDirLightPos: IUniform;
17
- uDirLightColor: IUniform;
18
- uAmbientLightColor: IUniform;
19
- uBaseColor: IUniform;
20
- uLineColor1: IUniform;
21
- uLineColor2: IUniform;
22
- uLineColor3: IUniform;
23
- uLineColor4: IUniform;
24
- };
25
- vertexShader: string;
26
- fragmentShader: string;
27
- };
28
-
29
- export const ToonShaderHatching: {
30
- uniforms: {
31
- uDirLightPos: IUniform;
32
- uDirLightColor: IUniform;
33
- uAmbientLightColor: IUniform;
34
- uBaseColor: IUniform;
35
- uLineColor1: IUniform;
36
- uLineColor2: IUniform;
37
- uLineColor3: IUniform;
38
- uLineColor4: IUniform;
39
- };
40
- vertexShader: string;
41
- fragmentShader: string;
42
- };
43
-
44
- export const ToonShaderDotted: {
45
- uniforms: {
46
- uDirLightPos: IUniform;
47
- uDirLightColor: IUniform;
48
- uAmbientLightColor: IUniform;
49
- uBaseColor: IUniform;
50
- uLineColor1: IUniform;
51
- };
52
- vertexShader: string;
53
- fragmentShader: string;
54
- };
@@ -1,3 +0,0 @@
1
- export class FlakesTexture extends HTMLCanvasElement {
2
- constructor(width?: number, height?: number);
3
- }
@@ -1,9 +0,0 @@
1
- import { PerspectiveCamera, Vector3 } from '../../../src/Three.js';
2
-
3
- export function frameCorners(
4
- camera: PerspectiveCamera,
5
- bottomLeftCorner: Vector3,
6
- bottomRightCorner: Vector3,
7
- topLeftCorner: Vector3,
8
- estimateViewFrustum?: boolean,
9
- ): void;
@@ -1,24 +0,0 @@
1
- import { Light, Renderer } from '../../../src/Three.js';
2
-
3
- export interface Size {
4
- width: number;
5
- height: number;
6
- set: (width: number, height: number) => void;
7
- }
8
-
9
- export interface Position {
10
- x: number;
11
- y: number;
12
- set: (x: number, y: number) => void;
13
- }
14
-
15
- export class ShadowMapViewer {
16
- constructor(light: Light);
17
-
18
- enabled: boolean;
19
- size: Size;
20
- position: Position;
21
- render(renderer: Renderer): void;
22
- updateForWindowResize(): void;
23
- update(): void;
24
- }