@types/three 0.143.2 → 0.146.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.
- three/README.md +1 -1
- three/examples/jsm/animation/CCDIKSolver.d.ts +2 -1
- three/examples/jsm/animation/MMDPhysics.d.ts +6 -1
- three/examples/jsm/controls/FirstPersonControls.d.ts +4 -1
- three/examples/jsm/csm/CSM.d.ts +1 -1
- three/examples/jsm/csm/CSMHelper.d.ts +1 -0
- three/examples/jsm/environments/RoomEnvironment.d.ts +1 -0
- three/examples/jsm/helpers/OctreeHelper.d.ts +3 -0
- three/examples/jsm/helpers/VertexNormalsHelper.d.ts +2 -0
- three/examples/jsm/helpers/VertexTangentsHelper.d.ts +2 -0
- three/examples/jsm/interactive/SelectionHelper.d.ts +1 -3
- three/examples/jsm/libs/stats.module.d.ts +1 -1
- three/examples/jsm/loaders/PCDLoader.d.ts +1 -1
- three/examples/jsm/loaders/RGBELoader.d.ts +0 -1
- three/examples/jsm/loaders/TIFFLoader.d.ts +16 -0
- three/examples/jsm/loaders/USDZLoader.d.ts +18 -0
- three/examples/jsm/materials/MeshGouraudMaterial.d.ts +17 -0
- three/examples/jsm/math/ColorConverter.d.ts +0 -2
- three/examples/jsm/misc/GPUComputationRenderer.d.ts +1 -0
- three/examples/jsm/misc/ProgressiveLightMap.d.ts +1 -2
- three/examples/jsm/misc/Volume.d.ts +1 -1
- three/examples/jsm/modifiers/CurveModifier.d.ts +6 -6
- three/examples/jsm/nodes/Nodes.d.ts +21 -3
- three/examples/jsm/nodes/accessors/BitangentNode.d.ts +18 -0
- three/examples/jsm/nodes/accessors/NormalNode.d.ts +1 -6
- three/examples/jsm/nodes/accessors/PositionNode.d.ts +2 -0
- three/examples/jsm/nodes/accessors/TangentNode.d.ts +18 -0
- three/examples/jsm/nodes/core/CodeNode.d.ts +2 -2
- three/examples/jsm/nodes/core/FunctionCallNode.d.ts +5 -5
- three/examples/jsm/nodes/core/FunctionNode.d.ts +6 -4
- three/examples/jsm/nodes/core/Node.d.ts +1 -0
- three/examples/jsm/nodes/core/NodeBuilder.d.ts +4 -3
- three/examples/jsm/nodes/core/NodeUtils.d.ts +1 -0
- three/examples/jsm/nodes/core/NodeVarying.d.ts +8 -0
- three/examples/jsm/nodes/core/constants.d.ts +13 -13
- three/examples/jsm/nodes/display/BlendModeNode.d.ts +32 -0
- three/examples/jsm/nodes/display/PosterizeNode.d.ts +8 -0
- three/examples/jsm/nodes/materials/Materials.d.ts +8 -6
- three/examples/jsm/nodes/materials/MeshPhysicalNodeMaterial.d.ts +22 -0
- three/examples/jsm/nodes/materialx/MaterialXNodes.d.ts +94 -0
- three/examples/jsm/nodes/materialx/lib/mx_hsv.d.ts +4 -0
- three/examples/jsm/nodes/materialx/lib/mx_noise.d.ts +6 -0
- three/examples/jsm/nodes/math/MathNode.d.ts +1 -2
- three/examples/jsm/nodes/procedural/CheckerNode.d.ts +2 -2
- three/examples/jsm/nodes/shadernode/ShaderNode.d.ts +10 -8
- three/examples/jsm/nodes/shadernode/ShaderNodeBaseElements.d.ts +49 -9
- three/examples/jsm/nodes/shadernode/ShaderNodeElements.d.ts +30 -0
- three/examples/jsm/nodes/utils/EquirectUVNode.d.ts +6 -0
- three/examples/jsm/nodes/utils/RemapNode.d.ts +13 -0
- three/examples/jsm/nodes/utils/TimerNode.d.ts +6 -1
- three/examples/jsm/nodes/utils/TriplanarTexturesNode.d.ts +22 -0
- three/examples/jsm/objects/ReflectorForSSRPass.d.ts +4 -4
- three/examples/jsm/postprocessing/BloomPass.d.ts +1 -1
- three/examples/jsm/postprocessing/BokehPass.d.ts +0 -2
- three/examples/jsm/postprocessing/EffectComposer.d.ts +1 -0
- three/examples/jsm/postprocessing/Pass.d.ts +2 -0
- three/examples/jsm/postprocessing/SSRPass.d.ts +3 -3
- three/examples/jsm/renderers/webgl/nodes/SlotNode.d.ts +15 -3
- three/examples/jsm/renderers/webgl/nodes/WebGLNodeBuilder.d.ts +6 -6
- three/examples/jsm/renderers/webgl/nodes/WebGLNodes.d.ts +1 -1
- three/examples/jsm/shaders/AfterimageShader.d.ts +4 -4
- three/examples/jsm/shaders/BleachBypassShader.d.ts +3 -3
- three/examples/jsm/shaders/BlendShader.d.ts +5 -5
- three/examples/jsm/shaders/BokehShader.d.ts +9 -9
- three/examples/jsm/shaders/BokehShader2.d.ts +26 -26
- three/examples/jsm/shaders/BrightnessContrastShader.d.ts +4 -4
- three/examples/jsm/shaders/ColorCorrectionShader.d.ts +5 -5
- three/examples/jsm/shaders/ColorifyShader.d.ts +3 -3
- three/examples/jsm/shaders/ConvolutionShader.d.ts +4 -4
- three/examples/jsm/shaders/CopyShader.d.ts +3 -3
- three/examples/jsm/shaders/DOFMipMapShader.d.ts +5 -5
- three/examples/jsm/shaders/DepthLimitedBlurShader.d.ts +9 -9
- three/examples/jsm/shaders/DigitalGlitch.d.ts +12 -12
- three/examples/jsm/shaders/DotScreenShader.d.ts +6 -6
- three/examples/jsm/shaders/FXAAShader.d.ts +3 -3
- three/examples/jsm/shaders/FilmShader.d.ts +7 -7
- three/examples/jsm/shaders/FocusShader.d.ts +6 -6
- three/examples/jsm/shaders/FreiChenShader.d.ts +3 -3
- three/examples/jsm/shaders/GammaCorrectionShader.d.ts +2 -2
- three/examples/jsm/shaders/GodRaysShader.d.ts +12 -12
- three/examples/jsm/shaders/HalftoneShader.d.ts +14 -14
- three/examples/jsm/shaders/HorizontalBlurShader.d.ts +3 -3
- three/examples/jsm/shaders/HorizontalTiltShiftShader.d.ts +4 -4
- three/examples/jsm/shaders/HueSaturationShader.d.ts +4 -4
- three/examples/jsm/shaders/KaleidoShader.d.ts +4 -4
- three/examples/jsm/shaders/LuminosityHighPassShader.d.ts +6 -6
- three/examples/jsm/shaders/LuminosityShader.d.ts +2 -2
- three/examples/jsm/shaders/MirrorShader.d.ts +3 -3
- three/examples/jsm/shaders/NormalMapShader.d.ts +5 -5
- three/examples/jsm/shaders/PixelShader.d.ts +4 -4
- three/examples/jsm/shaders/RGBShiftShader.d.ts +4 -4
- three/examples/jsm/shaders/SAOShader.d.ts +15 -15
- three/examples/jsm/shaders/SMAAShader.d.ts +10 -10
- three/examples/jsm/shaders/SSAOShader.d.ts +19 -19
- three/examples/jsm/shaders/SepiaShader.d.ts +3 -3
- three/examples/jsm/shaders/SobelOperatorShader.d.ts +3 -3
- three/examples/jsm/shaders/SubsurfaceScatteringShader.d.ts +30 -30
- three/examples/jsm/shaders/TechnicolorShader.d.ts +2 -2
- three/examples/jsm/shaders/ToneMapShader.d.ts +7 -7
- three/examples/jsm/shaders/ToonShader.d.ts +26 -26
- three/examples/jsm/shaders/TriangleBlurShader.d.ts +3 -3
- three/examples/jsm/shaders/UnpackDepthRGBAShader.d.ts +3 -3
- three/examples/jsm/shaders/VelocityShader.d.ts +13 -0
- three/examples/jsm/shaders/VerticalBlurShader.d.ts +3 -3
- three/examples/jsm/shaders/VerticalTiltShiftShader.d.ts +4 -4
- three/examples/jsm/shaders/VignetteShader.d.ts +4 -4
- three/examples/jsm/shaders/VolumeShader.d.ts +7 -7
- three/examples/jsm/shaders/WaterRefractionShader.d.ts +6 -6
- three/examples/jsm/utils/BufferGeometryUtils.d.ts +1 -0
- three/examples/jsm/utils/CameraUtils.d.ts +1 -1
- three/examples/jsm/utils/SceneUtils.d.ts +9 -1
- three/index.d.ts +1 -1
- three/package.json +3 -3
- three/src/Three.d.ts +3 -1
- three/src/constants.d.ts +0 -5
- three/src/core/BufferAttribute.d.ts +0 -4
- three/src/core/BufferGeometry.d.ts +0 -1
- three/src/core/Object3D.d.ts +11 -2
- three/src/extras/core/ShapePath.d.ts +1 -1
- three/src/geometries/BoxGeometry.d.ts +0 -2
- three/src/geometries/CapsuleGeometry.d.ts +0 -2
- three/src/geometries/CircleGeometry.d.ts +0 -2
- three/src/geometries/ConeGeometry.d.ts +0 -2
- three/src/geometries/CylinderGeometry.d.ts +0 -2
- three/src/geometries/DodecahedronGeometry.d.ts +0 -2
- three/src/geometries/ExtrudeGeometry.d.ts +0 -2
- three/src/geometries/IcosahedronGeometry.d.ts +0 -2
- three/src/geometries/LatheGeometry.d.ts +0 -2
- three/src/geometries/OctahedronGeometry.d.ts +0 -2
- three/src/geometries/PlaneGeometry.d.ts +0 -2
- three/src/geometries/PolyhedronGeometry.d.ts +0 -2
- three/src/geometries/RingGeometry.d.ts +0 -2
- three/src/geometries/ShapeGeometry.d.ts +0 -2
- three/src/geometries/SphereGeometry.d.ts +0 -2
- three/src/geometries/TetrahedronGeometry.d.ts +0 -2
- three/src/geometries/TorusGeometry.d.ts +0 -2
- three/src/geometries/TorusKnotGeometry.d.ts +0 -2
- three/src/geometries/TubeGeometry.d.ts +0 -2
- three/src/helpers/ArrowHelper.d.ts +4 -0
- three/src/helpers/Box3Helper.d.ts +2 -0
- three/src/helpers/BoxHelper.d.ts +2 -0
- three/src/helpers/GridHelper.d.ts +1 -4
- three/src/helpers/PlaneHelper.d.ts +2 -0
- three/src/helpers/PolarGridHelper.d.ts +2 -0
- three/src/helpers/SkeletonHelper.d.ts +2 -0
- three/src/loaders/DataTextureLoader.d.ts +1 -1
- three/src/materials/LineBasicMaterial.d.ts +7 -0
- three/src/materials/MeshLambertMaterial.d.ts +52 -1
- three/src/materials/MeshPhysicalMaterial.d.ts +5 -0
- three/src/materials/ShaderMaterial.d.ts +1 -1
- three/src/math/ColorManagement.d.ts +11 -1
- three/src/math/Euler.d.ts +13 -11
- three/src/math/Quaternion.d.ts +10 -6
- three/src/renderers/WebGL3DRenderTarget.d.ts +1 -1
- three/src/renderers/WebGLArrayRenderTarget.d.ts +1 -1
- three/src/renderers/WebGLCubeRenderTarget.d.ts +1 -1
- three/src/renderers/WebGLMultipleRenderTargets.d.ts +1 -1
- three/src/renderers/WebGLRenderTarget.d.ts +1 -1
- three/src/renderers/WebGLRenderer.d.ts +1 -5
- three/src/renderers/shaders/UniformsLib.d.ts +3 -2
- three/src/renderers/shaders/UniformsUtils.d.ts +0 -1
- three/src/renderers/webgl/WebGLCapabilities.d.ts +1 -0
- three/src/scenes/Scene.d.ts +2 -5
- three/src/textures/CanvasTexture.d.ts +2 -2
- three/src/textures/CompressedArrayTexture.d.ts +17 -0
- three/src/textures/Texture.d.ts +5 -1
- three/examples/jsm/nodes/core/NodeVary.d.ts +0 -6
- three/examples/jsm/renderers/webgl/nodes/WebGLPhysicalContextNode.d.ts +0 -13
three/src/helpers/BoxHelper.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export class DataTextureLoader extends Loader {
|
|
|
7
7
|
|
|
8
8
|
load(
|
|
9
9
|
url: string,
|
|
10
|
-
onLoad
|
|
10
|
+
onLoad?: (dataTexture: DataTexture, texData: object) => void,
|
|
11
11
|
onProgress?: (event: ProgressEvent) => void,
|
|
12
12
|
onError?: (event: ErrorEvent) => void,
|
|
13
13
|
): DataTexture;
|
|
@@ -4,6 +4,7 @@ import { MaterialParameters, Material } from './Material';
|
|
|
4
4
|
|
|
5
5
|
export interface LineBasicMaterialParameters extends MaterialParameters {
|
|
6
6
|
color?: ColorRepresentation | undefined;
|
|
7
|
+
fog?: boolean | undefined;
|
|
7
8
|
linewidth?: number | undefined;
|
|
8
9
|
linecap?: string | undefined;
|
|
9
10
|
linejoin?: string | undefined;
|
|
@@ -22,6 +23,12 @@ export class LineBasicMaterial extends Material {
|
|
|
22
23
|
*/
|
|
23
24
|
color: Color;
|
|
24
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Whether the material is affected by fog. Default is true.
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
30
|
+
fog: boolean;
|
|
31
|
+
|
|
25
32
|
/**
|
|
26
33
|
* @default 1
|
|
27
34
|
*/
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
import { Color } from './../math/Color';
|
|
2
2
|
import { Texture } from './../textures/Texture';
|
|
3
3
|
import { MaterialParameters, Material } from './Material';
|
|
4
|
-
import { Combine } from '../constants';
|
|
4
|
+
import { Combine, NormalMapTypes } from '../constants';
|
|
5
5
|
import { ColorRepresentation } from '../utils';
|
|
6
|
+
import { Vector2 } from '../Three';
|
|
6
7
|
|
|
7
8
|
export interface MeshLambertMaterialParameters extends MaterialParameters {
|
|
9
|
+
bumpMap?: Texture | undefined;
|
|
10
|
+
bumpScale?: number | undefined;
|
|
8
11
|
color?: ColorRepresentation | undefined;
|
|
12
|
+
displacementMap?: Texture | undefined;
|
|
13
|
+
displacementScale?: number | undefined;
|
|
14
|
+
displacementBias?: number | undefined;
|
|
9
15
|
emissive?: ColorRepresentation | undefined;
|
|
10
16
|
emissiveIntensity?: number | undefined;
|
|
11
17
|
emissiveMap?: Texture | null | undefined;
|
|
18
|
+
flatShading?: boolean | undefined;
|
|
12
19
|
map?: Texture | null | undefined;
|
|
13
20
|
lightMap?: Texture | null | undefined;
|
|
14
21
|
lightMapIntensity?: number | undefined;
|
|
22
|
+
normalMap?: Texture | undefined;
|
|
23
|
+
normalScale?: Vector2 | undefined;
|
|
15
24
|
aoMap?: Texture | null | undefined;
|
|
16
25
|
aoMapIntensity?: number | undefined;
|
|
17
26
|
specularMap?: Texture | null | undefined;
|
|
@@ -40,6 +49,31 @@ export class MeshLambertMaterial extends Material {
|
|
|
40
49
|
*/
|
|
41
50
|
color: Color;
|
|
42
51
|
|
|
52
|
+
/**
|
|
53
|
+
* @default null
|
|
54
|
+
*/
|
|
55
|
+
bumpMap: Texture | null;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @default 1
|
|
59
|
+
*/
|
|
60
|
+
bumpScale: number;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @default null
|
|
64
|
+
*/
|
|
65
|
+
displacementMap: Texture | null;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @default 1
|
|
69
|
+
*/
|
|
70
|
+
displacementScale: number;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @default 0
|
|
74
|
+
*/
|
|
75
|
+
displacementBias: number;
|
|
76
|
+
|
|
43
77
|
/**
|
|
44
78
|
* @default new THREE.Color( 0x000000 )
|
|
45
79
|
*/
|
|
@@ -55,6 +89,11 @@ export class MeshLambertMaterial extends Material {
|
|
|
55
89
|
*/
|
|
56
90
|
emissiveMap: Texture | null;
|
|
57
91
|
|
|
92
|
+
/**
|
|
93
|
+
* @default false
|
|
94
|
+
*/
|
|
95
|
+
flatShading: boolean;
|
|
96
|
+
|
|
58
97
|
/**
|
|
59
98
|
* @default null
|
|
60
99
|
*/
|
|
@@ -70,6 +109,18 @@ export class MeshLambertMaterial extends Material {
|
|
|
70
109
|
*/
|
|
71
110
|
lightMapIntensity: number;
|
|
72
111
|
|
|
112
|
+
/**
|
|
113
|
+
* @default null
|
|
114
|
+
*/
|
|
115
|
+
normalMap: Texture | null;
|
|
116
|
+
|
|
117
|
+
normalMapType: NormalMapTypes;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @default new THREE.Vector2( 1, 1 )
|
|
121
|
+
*/
|
|
122
|
+
normalScale: Vector2;
|
|
123
|
+
|
|
73
124
|
/**
|
|
74
125
|
* @default null
|
|
75
126
|
*/
|
|
@@ -11,7 +11,7 @@ export interface ShaderMaterialParameters extends MaterialParameters {
|
|
|
11
11
|
wireframeLinewidth?: number | undefined;
|
|
12
12
|
lights?: boolean | undefined;
|
|
13
13
|
clipping?: boolean | undefined;
|
|
14
|
-
|
|
14
|
+
fog?: boolean | undefined;
|
|
15
15
|
extensions?:
|
|
16
16
|
| {
|
|
17
17
|
derivatives?: boolean | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LinearSRGBColorSpace, SRGBColorSpace } from '../constants';
|
|
1
|
+
import { ColorSpace, LinearSRGBColorSpace, SRGBColorSpace } from '../constants';
|
|
2
2
|
import { Color } from './Color';
|
|
3
3
|
|
|
4
4
|
export function SRGBToLinear(c: number): number;
|
|
@@ -6,6 +6,16 @@ export function SRGBToLinear(c: number): number;
|
|
|
6
6
|
export function LinearToSRGB(c: number): number;
|
|
7
7
|
|
|
8
8
|
export namespace ColorManagement {
|
|
9
|
+
/**
|
|
10
|
+
* @default true
|
|
11
|
+
*/
|
|
12
|
+
let legacyMode: boolean;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @default LinearSRGBColorSpace
|
|
16
|
+
*/
|
|
17
|
+
let workingColorSpace: ColorSpace;
|
|
18
|
+
|
|
9
19
|
function convert(
|
|
10
20
|
color: Color,
|
|
11
21
|
sourceColorSpace: SRGBColorSpace | LinearSRGBColorSpace,
|
three/src/math/Euler.d.ts
CHANGED
|
@@ -2,8 +2,10 @@ import { Matrix4 } from './Matrix4';
|
|
|
2
2
|
import { Quaternion } from './Quaternion';
|
|
3
3
|
import { Vector3 } from './Vector3';
|
|
4
4
|
|
|
5
|
+
export type EulerOrder = 'XYZ' | 'YXZ' | 'ZXY' | 'ZYX' | 'YZX' | 'XZY';
|
|
6
|
+
|
|
5
7
|
export class Euler {
|
|
6
|
-
constructor(x?: number, y?: number, z?: number, order?:
|
|
8
|
+
constructor(x?: number, y?: number, z?: number, order?: EulerOrder);
|
|
7
9
|
|
|
8
10
|
/**
|
|
9
11
|
* @default 0
|
|
@@ -23,25 +25,25 @@ export class Euler {
|
|
|
23
25
|
/**
|
|
24
26
|
* @default THREE.Euler.DefaultOrder
|
|
25
27
|
*/
|
|
26
|
-
order:
|
|
28
|
+
order: EulerOrder;
|
|
27
29
|
readonly isEuler: true;
|
|
28
30
|
|
|
29
31
|
_onChangeCallback: () => void;
|
|
30
32
|
|
|
31
|
-
set(x: number, y: number, z: number, order?:
|
|
33
|
+
set(x: number, y: number, z: number, order?: EulerOrder): Euler;
|
|
32
34
|
clone(): this;
|
|
33
35
|
copy(euler: Euler): this;
|
|
34
|
-
setFromRotationMatrix(m: Matrix4, order?:
|
|
35
|
-
setFromQuaternion(q: Quaternion, order?:
|
|
36
|
-
setFromVector3(v: Vector3, order?:
|
|
37
|
-
reorder(newOrder:
|
|
36
|
+
setFromRotationMatrix(m: Matrix4, order?: EulerOrder, update?: boolean): Euler;
|
|
37
|
+
setFromQuaternion(q: Quaternion, order?: EulerOrder, update?: boolean): Euler;
|
|
38
|
+
setFromVector3(v: Vector3, order?: EulerOrder): Euler;
|
|
39
|
+
reorder(newOrder: EulerOrder): Euler;
|
|
38
40
|
equals(euler: Euler): boolean;
|
|
39
|
-
fromArray(xyzo: any[]): Euler;
|
|
40
|
-
toArray(array?: number
|
|
41
|
+
fromArray(xyzo: [number, number, number, EulerOrder?, ...any[]]): Euler;
|
|
42
|
+
toArray(array?: Array<number | string | undefined>, offset?: number): Array<number | string | undefined>;
|
|
41
43
|
_onChange(callback: () => void): this;
|
|
42
44
|
|
|
43
|
-
static RotationOrders:
|
|
44
|
-
static DefaultOrder:
|
|
45
|
+
static RotationOrders: EulerOrder[];
|
|
46
|
+
static DefaultOrder: 'XYZ';
|
|
45
47
|
|
|
46
48
|
[Symbol.iterator](): Generator<string | number, void>;
|
|
47
49
|
}
|
three/src/math/Quaternion.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Euler } from './Euler';
|
|
2
2
|
import { Vector3 } from './Vector3';
|
|
3
3
|
import { Matrix4 } from './Matrix4';
|
|
4
|
+
import { BufferAttribute } from '../core/BufferAttribute';
|
|
5
|
+
import { InterleavedBufferAttribute } from '../core/InterleavedBufferAttribute';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* Implementation of a quaternion. This is used for rotating things without incurring in the dreaded gimbal lock issue, amongst other advantages.
|
|
@@ -136,6 +138,13 @@ export class Quaternion {
|
|
|
136
138
|
*/
|
|
137
139
|
toArray(array: ArrayLike<number>, offset?: number): ArrayLike<number>;
|
|
138
140
|
|
|
141
|
+
/**
|
|
142
|
+
* Sets x, y, z, w properties of this quaternion from the attribute.
|
|
143
|
+
* @param attribute the source attribute.
|
|
144
|
+
* @param index index in the attribute.
|
|
145
|
+
*/
|
|
146
|
+
fromBufferAttribute(attribute: BufferAttribute | InterleavedBufferAttribute, index: number): Quaternion;
|
|
147
|
+
|
|
139
148
|
_onChange(callback: () => void): Quaternion;
|
|
140
149
|
_onChangeCallback: () => void;
|
|
141
150
|
|
|
@@ -147,7 +156,7 @@ export class Quaternion {
|
|
|
147
156
|
src1: number[],
|
|
148
157
|
stcOffset1: number,
|
|
149
158
|
t: number,
|
|
150
|
-
):
|
|
159
|
+
): void;
|
|
151
160
|
|
|
152
161
|
static multiplyQuaternionsFlat(
|
|
153
162
|
dst: number[],
|
|
@@ -168,11 +177,6 @@ export class Quaternion {
|
|
|
168
177
|
*/
|
|
169
178
|
multiplyVector3(v: any): any;
|
|
170
179
|
|
|
171
|
-
/**
|
|
172
|
-
* @deprecated Use {@link Quaternion#invert .invert()} instead.
|
|
173
|
-
*/
|
|
174
|
-
inverse(): Quaternion;
|
|
175
|
-
|
|
176
180
|
random(): Quaternion;
|
|
177
181
|
|
|
178
182
|
[Symbol.iterator](): Generator<number, void>;
|
|
@@ -12,7 +12,7 @@ export class WebGL3DRenderTarget extends WebGLRenderTarget {
|
|
|
12
12
|
* @param height the height of the render target, in pixels.
|
|
13
13
|
* @param depth the depth of the render target.
|
|
14
14
|
*/
|
|
15
|
-
constructor(width
|
|
15
|
+
constructor(width?: number, height?: number, depth?: number);
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* The depth of the render target.
|
|
@@ -12,7 +12,7 @@ export class WebGLArrayRenderTarget extends WebGLRenderTarget {
|
|
|
12
12
|
* @param height the height of the render target, in pixels.
|
|
13
13
|
* @param depth the depth/layer count of the render target.
|
|
14
14
|
*/
|
|
15
|
-
constructor(width
|
|
15
|
+
constructor(width?: number, height?: number, depth?: number);
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* The depth of the render target.
|
|
@@ -4,7 +4,7 @@ import { Texture } from './../textures/Texture';
|
|
|
4
4
|
import { CubeTexture } from './../textures/CubeTexture';
|
|
5
5
|
|
|
6
6
|
export class WebGLCubeRenderTarget extends WebGLRenderTarget {
|
|
7
|
-
constructor(size
|
|
7
|
+
constructor(size?: number, options?: WebGLRenderTargetOptions);
|
|
8
8
|
|
|
9
9
|
texture: CubeTexture;
|
|
10
10
|
|
|
@@ -18,7 +18,7 @@ export class WebGLMultipleRenderTargets extends EventDispatcher {
|
|
|
18
18
|
* @param options object that holds texture parameters for an auto-generated target texture and depthBuffer/stencilBuffer booleans.
|
|
19
19
|
* For an explanation of the texture parameters see {@link Texture}.
|
|
20
20
|
*/
|
|
21
|
-
constructor(width
|
|
21
|
+
constructor(width?: number, height?: number, count?: number, options?: WebGLRenderTargetOptions);
|
|
22
22
|
|
|
23
23
|
setSize(width: number, height: number, depth?: number): this;
|
|
24
24
|
copy(source: WebGLMultipleRenderTargets): this;
|
|
@@ -26,7 +26,7 @@ export interface WebGLRenderTargetOptions {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export class WebGLRenderTarget extends EventDispatcher {
|
|
29
|
-
constructor(width
|
|
29
|
+
constructor(width?: number, height?: number, options?: WebGLRenderTargetOptions);
|
|
30
30
|
|
|
31
31
|
width: number;
|
|
32
32
|
height: number;
|
|
@@ -17,7 +17,7 @@ import { Material } from './../materials/Material';
|
|
|
17
17
|
import { ToneMapping, ShadowMapType, CullFace, TextureEncoding } from '../constants';
|
|
18
18
|
import { WebXRManager } from '../renderers/webxr/WebXRManager';
|
|
19
19
|
import { BufferGeometry } from './../core/BufferGeometry';
|
|
20
|
-
import { Texture } from '../textures/Texture';
|
|
20
|
+
import { OffscreenCanvas, Texture } from '../textures/Texture';
|
|
21
21
|
import { Data3DTexture } from '../textures/Data3DTexture';
|
|
22
22
|
import { Vector3 } from '../math/Vector3';
|
|
23
23
|
import { Box3 } from '../math/Box3';
|
|
@@ -31,10 +31,6 @@ export interface Renderer {
|
|
|
31
31
|
setSize(width: number, height: number, updateStyle?: boolean): void;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
/** This is only available in worker JS contexts, not the DOM. */
|
|
35
|
-
// tslint:disable-next-line:no-empty-interface
|
|
36
|
-
export interface OffscreenCanvas extends EventTarget {}
|
|
37
|
-
|
|
38
34
|
export interface WebGLRendererParameters {
|
|
39
35
|
/**
|
|
40
36
|
* A Canvas where the renderer draws its output.
|
|
@@ -19,8 +19,9 @@ export let UniformsLib: {
|
|
|
19
19
|
envMap: IUniform;
|
|
20
20
|
flipEnvMap: IUniform;
|
|
21
21
|
reflectivity: IUniform;
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
ior: IUniform;
|
|
23
|
+
refractRatio: IUniform;
|
|
24
|
+
backgroundBlurriness: IUniform;
|
|
24
25
|
};
|
|
25
26
|
aomap: {
|
|
26
27
|
aoMap: IUniform;
|
three/src/scenes/Scene.d.ts
CHANGED
|
@@ -22,17 +22,14 @@ export class Scene extends Object3D {
|
|
|
22
22
|
*/
|
|
23
23
|
fog: FogBase | null;
|
|
24
24
|
|
|
25
|
+
backgroundBlurriness: number;
|
|
26
|
+
|
|
25
27
|
/**
|
|
26
28
|
* If not null, it will force everything in the scene to be rendered with that material. Default is null.
|
|
27
29
|
* @default null
|
|
28
30
|
*/
|
|
29
31
|
overrideMaterial: Material | null;
|
|
30
32
|
|
|
31
|
-
/**
|
|
32
|
-
* @default true
|
|
33
|
-
*/
|
|
34
|
-
autoUpdate: boolean;
|
|
35
|
-
|
|
36
33
|
/**
|
|
37
34
|
* @default null
|
|
38
35
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Texture } from './Texture';
|
|
1
|
+
import { OffscreenCanvas, Texture } from './Texture';
|
|
2
2
|
import { Mapping, Wrapping, TextureFilter, PixelFormat, TextureDataType } from '../constants';
|
|
3
3
|
|
|
4
4
|
export class CanvasTexture extends Texture {
|
|
@@ -15,7 +15,7 @@ export class CanvasTexture extends Texture {
|
|
|
15
15
|
* @param [encoding=THREE.LinearEncoding]
|
|
16
16
|
*/
|
|
17
17
|
constructor(
|
|
18
|
-
canvas:
|
|
18
|
+
canvas: TexImageSource | OffscreenCanvas,
|
|
19
19
|
mapping?: Mapping,
|
|
20
20
|
wrapS?: Wrapping,
|
|
21
21
|
wrapT?: Wrapping,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CompressedPixelFormat, TextureDataType, Wrapping } from '../constants';
|
|
2
|
+
import { CompressedTexture } from './CompressedTexture.js';
|
|
3
|
+
|
|
4
|
+
export class CompressedArrayTexture extends CompressedTexture {
|
|
5
|
+
isCompressedArrayTexture: true;
|
|
6
|
+
|
|
7
|
+
wrapR: Wrapping;
|
|
8
|
+
|
|
9
|
+
constructor(
|
|
10
|
+
mipmaps: ImageData[],
|
|
11
|
+
width: number,
|
|
12
|
+
height: number,
|
|
13
|
+
depth: number,
|
|
14
|
+
format?: CompressedPixelFormat,
|
|
15
|
+
type?: TextureDataType,
|
|
16
|
+
);
|
|
17
|
+
}
|
three/src/textures/Texture.d.ts
CHANGED
|
@@ -12,6 +12,10 @@ import {
|
|
|
12
12
|
TextureEncoding,
|
|
13
13
|
} from '../constants';
|
|
14
14
|
|
|
15
|
+
/** Shim for OffscreenCanvas. */
|
|
16
|
+
// tslint:disable-next-line:no-empty-interface
|
|
17
|
+
export interface OffscreenCanvas extends EventTarget {}
|
|
18
|
+
|
|
15
19
|
export class Texture extends EventDispatcher {
|
|
16
20
|
/**
|
|
17
21
|
* @param [image]
|
|
@@ -26,7 +30,7 @@ export class Texture extends EventDispatcher {
|
|
|
26
30
|
* @param [encoding=THREE.LinearEncoding]
|
|
27
31
|
*/
|
|
28
32
|
constructor(
|
|
29
|
-
image?:
|
|
33
|
+
image?: TexImageSource | OffscreenCanvas,
|
|
30
34
|
mapping?: Mapping,
|
|
31
35
|
wrapS?: Wrapping,
|
|
32
36
|
wrapT?: Wrapping,
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import ContextNode from '../../../nodes/core/ContextNode.js';
|
|
2
|
-
import Node from '../../../nodes/core/Node';
|
|
3
|
-
|
|
4
|
-
export type WebGLPhysicalContextScope =
|
|
5
|
-
| typeof WebGLPhysicalContextNode.RADIANCE
|
|
6
|
-
| typeof WebGLPhysicalContextNode.IRRADIANCE;
|
|
7
|
-
|
|
8
|
-
export default class WebGLPhysicalContextNode extends ContextNode {
|
|
9
|
-
static RADIANCE: 'radiance';
|
|
10
|
-
static IRRADIANCE: 'irradiance';
|
|
11
|
-
|
|
12
|
-
constructor(scope: WebGLPhysicalContextScope, node: Node);
|
|
13
|
-
}
|