@types/three 0.139.0 → 0.140.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/controls/OrbitControls.d.ts +1 -1
- three/examples/jsm/controls/TransformControls.d.ts +41 -1
- three/examples/jsm/exporters/GLTFExporter.d.ts +102 -5
- three/examples/jsm/loaders/GLTFLoader.d.ts +6 -1
- three/examples/jsm/objects/Reflector.d.ts +11 -1
- three/examples/jsm/objects/Refractor.d.ts +11 -1
- three/examples/jsm/postprocessing/SavePass.d.ts +1 -1
- three/examples/jsm/utils/BufferGeometryUtils.d.ts +7 -1
- three/examples/jsm/utils/SkeletonUtils.d.ts +15 -11
- three/index.d.ts +6 -5
- three/package.json +2 -2
- three/src/Three.d.ts +1 -0
- three/src/constants.d.ts +0 -1
- three/src/extras/Earcut.d.ts +4 -0
- three/src/materials/Material.d.ts +0 -10
- three/src/materials/MeshBasicMaterial.d.ts +7 -0
- three/src/materials/MeshLambertMaterial.d.ts +7 -0
- three/src/materials/MeshMatcapMaterial.d.ts +7 -1
- three/src/materials/MeshPhongMaterial.d.ts +7 -1
- three/src/materials/MeshStandardMaterial.d.ts +7 -1
- three/src/materials/MeshToonMaterial.d.ts +7 -0
- three/src/materials/PointsMaterial.d.ts +7 -0
- three/src/materials/ShadowMaterial.d.ts +7 -0
- three/src/materials/SpriteMaterial.d.ts +7 -0
- three/src/math/Color.d.ts +2 -0
- three/src/math/Euler.d.ts +2 -0
- three/src/math/Quaternion.d.ts +2 -0
three/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for three (https://threejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Tue, 03 May 2022 17:01:38 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `THREE`
|
|
14
14
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Object3D, Camera, MOUSE, Raycaster } from '../../../src/Three';
|
|
1
|
+
import { Object3D, Camera, MOUSE, Raycaster, Mesh, Vector3, Quaternion } from '../../../src/Three';
|
|
2
2
|
|
|
3
3
|
export class TransformControls extends Object3D {
|
|
4
4
|
constructor(object: Camera, domElement?: HTMLElement);
|
|
@@ -40,3 +40,43 @@ export class TransformControls extends Object3D {
|
|
|
40
40
|
reset(): void;
|
|
41
41
|
dispose(): void;
|
|
42
42
|
}
|
|
43
|
+
|
|
44
|
+
export class TransformControlsGizmo extends Object3D {
|
|
45
|
+
type: 'TransformControlsGizmo';
|
|
46
|
+
isTransformControlsGizmo: true;
|
|
47
|
+
|
|
48
|
+
gizmo: {
|
|
49
|
+
translate: Object3D;
|
|
50
|
+
rotate: Object3D;
|
|
51
|
+
scale: Object3D;
|
|
52
|
+
};
|
|
53
|
+
helper: {
|
|
54
|
+
translate: Object3D;
|
|
55
|
+
rotate: Object3D;
|
|
56
|
+
scale: Object3D;
|
|
57
|
+
};
|
|
58
|
+
picker: {
|
|
59
|
+
translate: Object3D;
|
|
60
|
+
rotate: Object3D;
|
|
61
|
+
scale: Object3D;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
constructor();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export class TransformControlsPlane extends Mesh {
|
|
68
|
+
type: 'TransformControlsPlane';
|
|
69
|
+
isTransformControlsPlane: true;
|
|
70
|
+
|
|
71
|
+
constructor();
|
|
72
|
+
|
|
73
|
+
mode: 'translate' | 'scale' | 'rotate';
|
|
74
|
+
|
|
75
|
+
axis: 'X' | 'Y' | 'Z' | 'XY' | 'YZ' | 'XZ' | 'XYZ' | 'E';
|
|
76
|
+
|
|
77
|
+
space: 'local' | 'world';
|
|
78
|
+
|
|
79
|
+
eye: Vector3;
|
|
80
|
+
worldPosition: Vector3;
|
|
81
|
+
worldQuaternion: Quaternion;
|
|
82
|
+
}
|
|
@@ -1,20 +1,117 @@
|
|
|
1
|
-
import { Object3D, AnimationClip } from '../../../src/Three';
|
|
1
|
+
import { Object3D, AnimationClip, Texture, Material, Mesh } from '../../../src/Three';
|
|
2
2
|
|
|
3
3
|
export interface GLTFExporterOptions {
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Export position, rotation and scale instead of matrix per node. Default is false
|
|
6
|
+
*/
|
|
5
7
|
trs?: boolean;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Export only visible objects. Default is true.
|
|
11
|
+
*/
|
|
6
12
|
onlyVisible?: boolean;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Export just the attributes within the drawRange, if defined, instead of exporting the whole array. Default is true.
|
|
16
|
+
*/
|
|
7
17
|
truncateDrawRange?: boolean;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Export in binary (.glb) format, returning an ArrayBuffer. Default is false.
|
|
21
|
+
*/
|
|
22
|
+
binary?: boolean;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Export with images embedded into the glTF asset. Default is true.
|
|
26
|
+
*/
|
|
8
27
|
embedImages?: boolean;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Restricts the image maximum size (both width and height) to the given value. This option works only if embedImages is true. Default is Infinity.
|
|
31
|
+
*/
|
|
32
|
+
maxTextureSize?: number;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* List of animations to be included in the export.
|
|
36
|
+
*/
|
|
9
37
|
animations?: AnimationClip[];
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Generate indices for non-index geometry and export with them. Default is false.
|
|
41
|
+
*/
|
|
10
42
|
forceIndices?: boolean;
|
|
11
|
-
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Export custom glTF extensions defined on an object's userData.gltfExtensions property. Default is false.
|
|
46
|
+
*/
|
|
12
47
|
includeCustomExtensions?: boolean;
|
|
13
48
|
}
|
|
14
49
|
|
|
15
50
|
export class GLTFExporter {
|
|
16
51
|
constructor();
|
|
17
52
|
|
|
18
|
-
|
|
19
|
-
|
|
53
|
+
register(callback: (writer: GLTFWriter) => GLTFExporterPlugin): this;
|
|
54
|
+
unregister(callback: (writer: GLTFWriter) => GLTFExporterPlugin): this;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Generates a .gltf (JSON) or .glb (binary) output from the input (Scenes or Objects)
|
|
58
|
+
*
|
|
59
|
+
* @param input Scenes or objects to export. Valid options:
|
|
60
|
+
* - Export scenes
|
|
61
|
+
* ```js
|
|
62
|
+
* exporter.parse( scene1, ... )
|
|
63
|
+
* exporter.parse( [ scene1, scene2 ], ... )
|
|
64
|
+
* ```
|
|
65
|
+
* - Export objects (It will create a new Scene to hold all the objects)
|
|
66
|
+
* ```js
|
|
67
|
+
* exporter.parse( object1, ... )
|
|
68
|
+
* exporter.parse( [ object1, object2 ], ... )
|
|
69
|
+
* ```
|
|
70
|
+
* - Mix scenes and objects (It will export the scenes as usual but it will create a new scene to hold all the single objects).
|
|
71
|
+
* ```js
|
|
72
|
+
* exporter.parse( [ scene1, object1, object2, scene2 ], ... )
|
|
73
|
+
* ```
|
|
74
|
+
* @param onDone Will be called when the export completes. The argument will be the generated glTF JSON or binary ArrayBuffer.
|
|
75
|
+
* @param onError Will be called if there are any errors during the gltf generation.
|
|
76
|
+
* @param options Export options
|
|
77
|
+
*/
|
|
78
|
+
parse(
|
|
79
|
+
input: Object3D | Object3D[],
|
|
80
|
+
onDone: (gltf: ArrayBuffer | { [key: string]: any }) => void,
|
|
81
|
+
onError: (error: ErrorEvent) => void,
|
|
82
|
+
options?: GLTFExporterOptions,
|
|
83
|
+
): void;
|
|
84
|
+
|
|
85
|
+
parseAsync(
|
|
86
|
+
input: Object3D | Object3D[],
|
|
87
|
+
options?: GLTFExporterOptions,
|
|
88
|
+
): Promise<ArrayBuffer | { [key: string]: any }>;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export class GLTFWriter {
|
|
92
|
+
constructor();
|
|
93
|
+
|
|
94
|
+
setPlugins(plugins: GLTFExporterPlugin[]);
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Parse scenes and generate GLTF output
|
|
98
|
+
*
|
|
99
|
+
* @param input Scene or Array of THREE.Scenes
|
|
100
|
+
* @param onDone Callback on completed
|
|
101
|
+
* @param options options
|
|
102
|
+
*/
|
|
103
|
+
write(
|
|
104
|
+
input: Object3D | Object3D[],
|
|
105
|
+
onDone: (gltf: ArrayBuffer | { [key: string]: any }) => void,
|
|
106
|
+
options?: GLTFExporterOptions,
|
|
107
|
+
): Promise<void>;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface GLTFExporterPlugin {
|
|
111
|
+
writeTexture?: (map: Texture, textureDef: { [key: string]: any }) => void;
|
|
112
|
+
writeMaterial?: (material: Material, materialDef: { [key: string]: any }) => void;
|
|
113
|
+
writeMesh?: (mesh: Mesh, meshDef: { [key: string]: any }) => void;
|
|
114
|
+
writeNode?: (object: Object3D, nodeDef: { [key: string]: any }) => void;
|
|
115
|
+
beforeParse?: (input: Object3D | Object3D[]) => void;
|
|
116
|
+
afterParse?: (input: Object3D | Object3D[]) => void;
|
|
20
117
|
}
|
|
@@ -91,10 +91,15 @@ export class GLTFParser {
|
|
|
91
91
|
|
|
92
92
|
fileLoader: FileLoader;
|
|
93
93
|
textureLoader: TextureLoader | ImageBitmapLoader;
|
|
94
|
-
plugins: GLTFLoaderPlugin;
|
|
94
|
+
plugins: { [name: string]: GLTFLoaderPlugin };
|
|
95
95
|
extensions: { [name: string]: any };
|
|
96
96
|
associations: Map<Object3D | Material | Texture, GLTFReference>;
|
|
97
97
|
|
|
98
|
+
setExtensions(extensions: { [name: string]: any }): void;
|
|
99
|
+
setPlugins(plugins: { [name: string]: GLTFLoaderPlugin }): void;
|
|
100
|
+
|
|
101
|
+
parse(onLoad: (gltf: GLTF) => void, onError?: (event: ErrorEvent) => void): void;
|
|
102
|
+
|
|
98
103
|
getDependency: (type: string, index: number) => Promise<any>;
|
|
99
104
|
getDependencies: (type: string) => Promise<any[]>;
|
|
100
105
|
loadBuffer: (bufferIndex: number) => Promise<ArrayBuffer>;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Mesh,
|
|
3
|
+
BufferGeometry,
|
|
4
|
+
ColorRepresentation,
|
|
5
|
+
TextureEncoding,
|
|
6
|
+
WebGLRenderTarget,
|
|
7
|
+
PerspectiveCamera,
|
|
8
|
+
} from '../../../src/Three';
|
|
2
9
|
|
|
3
10
|
export interface ReflectorOptions {
|
|
4
11
|
color?: ColorRepresentation;
|
|
@@ -11,6 +18,9 @@ export interface ReflectorOptions {
|
|
|
11
18
|
}
|
|
12
19
|
|
|
13
20
|
export class Reflector extends Mesh {
|
|
21
|
+
type: 'Reflector';
|
|
22
|
+
camera: PerspectiveCamera;
|
|
23
|
+
|
|
14
24
|
constructor(geometry?: BufferGeometry, options?: ReflectorOptions);
|
|
15
25
|
|
|
16
26
|
getRenderTarget(): WebGLRenderTarget;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Mesh,
|
|
3
|
+
BufferGeometry,
|
|
4
|
+
ColorRepresentation,
|
|
5
|
+
TextureEncoding,
|
|
6
|
+
WebGLRenderTarget,
|
|
7
|
+
PerspectiveCamera,
|
|
8
|
+
} from '../../../src/Three';
|
|
2
9
|
|
|
3
10
|
export interface RefractorOptions {
|
|
4
11
|
color?: ColorRepresentation;
|
|
@@ -11,6 +18,9 @@ export interface RefractorOptions {
|
|
|
11
18
|
}
|
|
12
19
|
|
|
13
20
|
export class Refractor extends Mesh {
|
|
21
|
+
type: 'Refractor';
|
|
22
|
+
camera: PerspectiveCamera;
|
|
23
|
+
|
|
14
24
|
constructor(geometry?: BufferGeometry, options?: RefractorOptions);
|
|
15
25
|
|
|
16
26
|
getRenderTarget(): WebGLRenderTarget;
|
|
@@ -3,7 +3,7 @@ import { ShaderMaterial, WebGLRenderTarget } from '../../../src/Three';
|
|
|
3
3
|
import { Pass } from './Pass';
|
|
4
4
|
|
|
5
5
|
export class SavePass extends Pass {
|
|
6
|
-
constructor(renderTarget
|
|
6
|
+
constructor(renderTarget?: WebGLRenderTarget);
|
|
7
7
|
textureID: string;
|
|
8
8
|
renderTarget: WebGLRenderTarget;
|
|
9
9
|
uniforms: object;
|
|
@@ -15,5 +15,11 @@ export function estimateBytesUsed(geometry: BufferGeometry): number;
|
|
|
15
15
|
export function mergeVertices(geometry: BufferGeometry, tolerance?: number): BufferGeometry;
|
|
16
16
|
export function toTrianglesDrawMode(geometry: BufferGeometry, drawMode: TrianglesDrawModes): BufferGeometry;
|
|
17
17
|
export function computeMorphedAttributes(object: Mesh | Line | Points): object;
|
|
18
|
-
export function
|
|
18
|
+
export function computeMikkTSpaceTangents(
|
|
19
|
+
geometry: BufferGeometry,
|
|
20
|
+
MikkTSpace: unknown,
|
|
21
|
+
negateSign?: boolean,
|
|
22
|
+
): BufferGeometry;
|
|
19
23
|
export function mergeGroups(geometry: BufferGeometry): BufferGeometry;
|
|
24
|
+
export function deinterleaveAttribute(geometry: BufferGeometry): void;
|
|
25
|
+
export function deinterleaveGeometry(geometry: BufferGeometry): void;
|
|
@@ -1,30 +1,34 @@
|
|
|
1
1
|
import { AnimationClip, Bone, Matrix4, Object3D, Skeleton, SkeletonHelper } from '../../../src/Three';
|
|
2
2
|
|
|
3
3
|
export namespace SkeletonUtils {
|
|
4
|
-
function retarget(target: Object3D | Skeleton, source: Object3D | Skeleton, options: {}): void;
|
|
4
|
+
export function retarget(target: Object3D | Skeleton, source: Object3D | Skeleton, options: {}): void;
|
|
5
5
|
|
|
6
|
-
function retargetClip(
|
|
6
|
+
export function retargetClip(
|
|
7
7
|
target: Skeleton | Object3D,
|
|
8
8
|
source: Skeleton | Object3D,
|
|
9
9
|
clip: AnimationClip,
|
|
10
10
|
options: {},
|
|
11
11
|
): AnimationClip;
|
|
12
12
|
|
|
13
|
-
function getHelperFromSkeleton(skeleton: Skeleton): SkeletonHelper;
|
|
13
|
+
export function getHelperFromSkeleton(skeleton: Skeleton): SkeletonHelper;
|
|
14
14
|
|
|
15
|
-
function getSkeletonOffsets(
|
|
15
|
+
export function getSkeletonOffsets(
|
|
16
|
+
target: Object3D | Skeleton,
|
|
17
|
+
source: Object3D | Skeleton,
|
|
18
|
+
options: {},
|
|
19
|
+
): Matrix4[];
|
|
16
20
|
|
|
17
|
-
function renameBones(skeleton: Skeleton, names: {}): any;
|
|
21
|
+
export function renameBones(skeleton: Skeleton, names: {}): any;
|
|
18
22
|
|
|
19
|
-
function getBones(skeleton: Skeleton | Bone[]): Bone[];
|
|
23
|
+
export function getBones(skeleton: Skeleton | Bone[]): Bone[];
|
|
20
24
|
|
|
21
|
-
function getBoneByName(name: string, skeleton: Skeleton): Bone;
|
|
25
|
+
export function getBoneByName(name: string, skeleton: Skeleton): Bone;
|
|
22
26
|
|
|
23
|
-
function getNearestBone(bone: Bone, names: {}): Bone;
|
|
27
|
+
export function getNearestBone(bone: Bone, names: {}): Bone;
|
|
24
28
|
|
|
25
|
-
function findBoneTrackData(name: string, tracks: any[]): {};
|
|
29
|
+
export function findBoneTrackData(name: string, tracks: any[]): {};
|
|
26
30
|
|
|
27
|
-
function getEqualsBonesNames(skeleton: Skeleton, targetSkeleton: Skeleton): string[];
|
|
31
|
+
export function getEqualsBonesNames(skeleton: Skeleton, targetSkeleton: Skeleton): string[];
|
|
28
32
|
|
|
29
|
-
function clone(source: Object3D): Object3D;
|
|
33
|
+
export function clone(source: Object3D): Object3D;
|
|
30
34
|
}
|
three/index.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
// Type definitions for three 0.
|
|
1
|
+
// Type definitions for three 0.140
|
|
2
2
|
// Project: https://threejs.org/
|
|
3
3
|
// Definitions by: Josh Ellis <https://github.com/joshuaellis>
|
|
4
4
|
// Nathan Bierema <https://github.com/Methuselah96>
|
|
5
5
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
6
6
|
// Minimum TypeScript Version: 3.6
|
|
7
7
|
|
|
8
|
+
// To update three.js type definition, please make changes to the repository at:
|
|
9
|
+
// https://github.com/three-types/three-ts-types.
|
|
10
|
+
// Periodically, the updates from the repository are pushed to DefinitelyTyped
|
|
11
|
+
// and released in the @types/three npm package.
|
|
12
|
+
|
|
8
13
|
export * from './src/Three';
|
|
9
14
|
|
|
10
|
-
/*~ If this module is a UMD module that exposes a global variable 'myLib' when
|
|
11
|
-
*~ loaded outside a module loader environment, declare that global here.
|
|
12
|
-
*~ Otherwise, delete this declaration.
|
|
13
|
-
*/
|
|
14
15
|
export as namespace THREE;
|
three/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/three",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.140.0",
|
|
4
4
|
"description": "TypeScript definitions for three",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,6 +25,6 @@
|
|
|
25
25
|
},
|
|
26
26
|
"scripts": {},
|
|
27
27
|
"dependencies": {},
|
|
28
|
-
"typesPublisherContentHash": "
|
|
28
|
+
"typesPublisherContentHash": "0003f52bd6b42bfc5b77be02ad5eee29a50d1ddc25ce1b64506a2253f0420782",
|
|
29
29
|
"typeScriptVersion": "3.9"
|
|
30
30
|
}
|
three/src/Three.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ export * from './extras/core/ShapePath';
|
|
|
65
65
|
export * from './extras/core/CurvePath';
|
|
66
66
|
export * from './extras/core/Curve';
|
|
67
67
|
export * from './extras/DataUtils';
|
|
68
|
+
export * from './extras/Earcut';
|
|
68
69
|
export * from './extras/ImageUtils';
|
|
69
70
|
export * from './extras/ShapeUtils';
|
|
70
71
|
export * from './extras/PMREMGenerator';
|
three/src/constants.d.ts
CHANGED
|
@@ -301,7 +301,6 @@ export const TriangleFanDrawMode: TrianglesDrawModes;
|
|
|
301
301
|
export enum TextureEncoding {}
|
|
302
302
|
export const LinearEncoding: TextureEncoding;
|
|
303
303
|
export const sRGBEncoding: TextureEncoding;
|
|
304
|
-
export const LogLuvEncoding: TextureEncoding;
|
|
305
304
|
|
|
306
305
|
// Depth packing strategies
|
|
307
306
|
export enum DepthPackingStrategies {}
|
|
@@ -13,9 +13,6 @@ import {
|
|
|
13
13
|
StencilOp,
|
|
14
14
|
PixelFormat,
|
|
15
15
|
} from '../constants';
|
|
16
|
-
import { ColorRepresentation } from '../utils';
|
|
17
|
-
import { Color } from '../math/Color';
|
|
18
|
-
import { Texture } from '../textures/Texture';
|
|
19
16
|
|
|
20
17
|
export interface MaterialParameters {
|
|
21
18
|
alphaTest?: number | undefined;
|
|
@@ -35,7 +32,6 @@ export interface MaterialParameters {
|
|
|
35
32
|
depthFunc?: DepthModes | undefined;
|
|
36
33
|
depthTest?: boolean | undefined;
|
|
37
34
|
depthWrite?: boolean | undefined;
|
|
38
|
-
fog?: boolean | undefined;
|
|
39
35
|
name?: string | undefined;
|
|
40
36
|
opacity?: number | undefined;
|
|
41
37
|
polygonOffset?: boolean | undefined;
|
|
@@ -175,12 +171,6 @@ export class Material extends EventDispatcher {
|
|
|
175
171
|
*/
|
|
176
172
|
depthWrite: boolean;
|
|
177
173
|
|
|
178
|
-
/**
|
|
179
|
-
* Whether the material is affected by fog. Default is true.
|
|
180
|
-
* @default fog
|
|
181
|
-
*/
|
|
182
|
-
fog: boolean;
|
|
183
|
-
|
|
184
174
|
/**
|
|
185
175
|
* Unique number of this material instance.
|
|
186
176
|
*/
|
|
@@ -16,6 +16,7 @@ export interface MeshBasicMaterialParameters extends MaterialParameters {
|
|
|
16
16
|
aoMapIntensity?: number | undefined;
|
|
17
17
|
specularMap?: Texture | null | undefined;
|
|
18
18
|
alphaMap?: Texture | null | undefined;
|
|
19
|
+
fog?: boolean | undefined;
|
|
19
20
|
envMap?: Texture | null | undefined;
|
|
20
21
|
combine?: Combine | undefined;
|
|
21
22
|
reflectivity?: number | undefined;
|
|
@@ -114,5 +115,11 @@ export class MeshBasicMaterial extends Material {
|
|
|
114
115
|
*/
|
|
115
116
|
wireframeLinejoin: string;
|
|
116
117
|
|
|
118
|
+
/**
|
|
119
|
+
* Whether the material is affected by fog. Default is true.
|
|
120
|
+
* @default fog
|
|
121
|
+
*/
|
|
122
|
+
fog: boolean;
|
|
123
|
+
|
|
117
124
|
setValues(parameters: MeshBasicMaterialParameters): void;
|
|
118
125
|
}
|
|
@@ -24,6 +24,7 @@ export interface MeshLambertMaterialParameters extends MaterialParameters {
|
|
|
24
24
|
wireframeLinewidth?: number | undefined;
|
|
25
25
|
wireframeLinecap?: string | undefined;
|
|
26
26
|
wireframeLinejoin?: string | undefined;
|
|
27
|
+
fog?: boolean | undefined;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export class MeshLambertMaterial extends Material {
|
|
@@ -129,5 +130,11 @@ export class MeshLambertMaterial extends Material {
|
|
|
129
130
|
*/
|
|
130
131
|
wireframeLinejoin: string;
|
|
131
132
|
|
|
133
|
+
/**
|
|
134
|
+
* Whether the material is affected by fog. Default is true.
|
|
135
|
+
* @default fog
|
|
136
|
+
*/
|
|
137
|
+
fog: boolean;
|
|
138
|
+
|
|
132
139
|
setValues(parameters: MeshLambertMaterialParameters): void;
|
|
133
140
|
}
|
|
@@ -18,7 +18,7 @@ export interface MeshMatcapMaterialParameters extends MaterialParameters {
|
|
|
18
18
|
displacementScale?: number | undefined;
|
|
19
19
|
displacementBias?: number | undefined;
|
|
20
20
|
alphaMap?: Texture | null | undefined;
|
|
21
|
-
|
|
21
|
+
fog?: boolean | undefined;
|
|
22
22
|
flatShading?: boolean | undefined;
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -101,5 +101,11 @@ export class MeshMatcapMaterial extends Material {
|
|
|
101
101
|
*/
|
|
102
102
|
flatShading: boolean;
|
|
103
103
|
|
|
104
|
+
/**
|
|
105
|
+
* Whether the material is affected by fog. Default is true.
|
|
106
|
+
* @default fog
|
|
107
|
+
*/
|
|
108
|
+
fog: boolean;
|
|
109
|
+
|
|
104
110
|
setValues(parameters: MeshMatcapMaterialParameters): void;
|
|
105
111
|
}
|
|
@@ -37,7 +37,7 @@ export interface MeshPhongMaterialParameters extends MaterialParameters {
|
|
|
37
37
|
wireframeLinewidth?: number | undefined;
|
|
38
38
|
wireframeLinecap?: string | undefined;
|
|
39
39
|
wireframeLinejoin?: string | undefined;
|
|
40
|
-
|
|
40
|
+
fog?: boolean | undefined;
|
|
41
41
|
flatShading?: boolean | undefined;
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -205,5 +205,11 @@ export class MeshPhongMaterial extends Material {
|
|
|
205
205
|
*/
|
|
206
206
|
metal: boolean;
|
|
207
207
|
|
|
208
|
+
/**
|
|
209
|
+
* Whether the material is affected by fog. Default is true.
|
|
210
|
+
* @default fog
|
|
211
|
+
*/
|
|
212
|
+
fog: boolean;
|
|
213
|
+
|
|
208
214
|
setValues(parameters: MeshPhongMaterialParameters): void;
|
|
209
215
|
}
|
|
@@ -32,7 +32,7 @@ export interface MeshStandardMaterialParameters extends MaterialParameters {
|
|
|
32
32
|
envMapIntensity?: number | undefined;
|
|
33
33
|
wireframe?: boolean | undefined;
|
|
34
34
|
wireframeLinewidth?: number | undefined;
|
|
35
|
-
|
|
35
|
+
fog?: boolean | undefined;
|
|
36
36
|
flatShading?: boolean | undefined;
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -195,6 +195,12 @@ export class MeshStandardMaterial extends Material {
|
|
|
195
195
|
*/
|
|
196
196
|
flatShading: boolean;
|
|
197
197
|
|
|
198
|
+
/**
|
|
199
|
+
* Whether the material is affected by fog. Default is true.
|
|
200
|
+
* @default fog
|
|
201
|
+
*/
|
|
202
|
+
fog: boolean;
|
|
203
|
+
|
|
198
204
|
isMeshStandardMaterial: boolean;
|
|
199
205
|
|
|
200
206
|
setValues(parameters: MeshStandardMaterialParameters): void;
|
|
@@ -31,6 +31,7 @@ export interface MeshToonMaterialParameters extends MaterialParameters {
|
|
|
31
31
|
wireframeLinewidth?: number | undefined;
|
|
32
32
|
wireframeLinecap?: string | undefined;
|
|
33
33
|
wireframeLinejoin?: string | undefined;
|
|
34
|
+
fog?: boolean | undefined;
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
export class MeshToonMaterial extends Material {
|
|
@@ -161,5 +162,11 @@ export class MeshToonMaterial extends Material {
|
|
|
161
162
|
*/
|
|
162
163
|
wireframeLinejoin: string;
|
|
163
164
|
|
|
165
|
+
/**
|
|
166
|
+
* Whether the material is affected by fog. Default is true.
|
|
167
|
+
* @default fog
|
|
168
|
+
*/
|
|
169
|
+
fog: boolean;
|
|
170
|
+
|
|
164
171
|
setValues(parameters: MeshToonMaterialParameters): void;
|
|
165
172
|
}
|
|
@@ -9,6 +9,7 @@ export interface PointsMaterialParameters extends MaterialParameters {
|
|
|
9
9
|
alphaMap?: Texture | null | undefined;
|
|
10
10
|
size?: number | undefined;
|
|
11
11
|
sizeAttenuation?: boolean | undefined;
|
|
12
|
+
fog?: boolean | undefined;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
export class PointsMaterial extends Material {
|
|
@@ -44,5 +45,11 @@ export class PointsMaterial extends Material {
|
|
|
44
45
|
*/
|
|
45
46
|
sizeAttenuation: boolean;
|
|
46
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Whether the material is affected by fog. Default is true.
|
|
50
|
+
* @default fog
|
|
51
|
+
*/
|
|
52
|
+
fog: boolean;
|
|
53
|
+
|
|
47
54
|
setValues(parameters: PointsMaterialParameters): void;
|
|
48
55
|
}
|
|
@@ -4,6 +4,7 @@ import { MaterialParameters, Material } from './Material';
|
|
|
4
4
|
|
|
5
5
|
export interface ShadowMaterialParameters extends MaterialParameters {
|
|
6
6
|
color?: ColorRepresentation | undefined;
|
|
7
|
+
fog?: boolean | undefined;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
export class ShadowMaterial extends Material {
|
|
@@ -23,4 +24,10 @@ export class ShadowMaterial extends Material {
|
|
|
23
24
|
* @default true
|
|
24
25
|
*/
|
|
25
26
|
transparent: boolean;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Whether the material is affected by fog. Default is true.
|
|
30
|
+
* @default fog
|
|
31
|
+
*/
|
|
32
|
+
fog: boolean;
|
|
26
33
|
}
|
|
@@ -9,6 +9,7 @@ export interface SpriteMaterialParameters extends MaterialParameters {
|
|
|
9
9
|
alphaMap?: Texture | null | undefined;
|
|
10
10
|
rotation?: number | undefined;
|
|
11
11
|
sizeAttenuation?: boolean | undefined;
|
|
12
|
+
fog?: boolean | undefined;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
export class SpriteMaterial extends Material {
|
|
@@ -48,6 +49,12 @@ export class SpriteMaterial extends Material {
|
|
|
48
49
|
*/
|
|
49
50
|
transparent: boolean;
|
|
50
51
|
|
|
52
|
+
/**
|
|
53
|
+
* Whether the material is affected by fog. Default is true.
|
|
54
|
+
* @default fog
|
|
55
|
+
*/
|
|
56
|
+
fog: boolean;
|
|
57
|
+
|
|
51
58
|
readonly isSpriteMaterial: true;
|
|
52
59
|
|
|
53
60
|
setValues(parameters: SpriteMaterialParameters): void;
|
three/src/math/Color.d.ts
CHANGED
three/src/math/Euler.d.ts
CHANGED