diff --git a/src/animation/AnimationAction.d.ts b/src/animation/AnimationAction.d.ts index c1b6a65318173e..5593e4fb560cc0 100644 --- a/src/animation/AnimationAction.d.ts +++ b/src/animation/AnimationAction.d.ts @@ -9,15 +9,55 @@ export class AnimationAction { constructor( mixer: AnimationMixer, clip: AnimationClip, localRoot?: Object3D, blendMode?: AnimationBlendMode ); blendMode: AnimationBlendMode; + + /** + * @default THREE.LoopRepeat + */ loop: AnimationActionLoopStyles; + + /** + * @default 0 + */ time: number; + + /** + * @default 1 + */ timeScale: number; + + /** + * @default 1 + */ weight: number; + + /** + * @default Infinity + */ repetitions: number; + + /** + * @default false + */ paused: boolean; + + /** + * @default true + */ enabled: boolean; + + /** + * @default false + */ clampWhenFinished: boolean; + + /** + * @default true + */ zeroSlopeAtStart: boolean; + + /** + * @default true + */ zeroSlopeAtEnd: boolean; play(): AnimationAction; diff --git a/src/animation/AnimationClip.d.ts b/src/animation/AnimationClip.d.ts index 58daee620ef7e9..be7e6a49d3b92e 100644 --- a/src/animation/AnimationClip.d.ts +++ b/src/animation/AnimationClip.d.ts @@ -9,7 +9,15 @@ export class AnimationClip { name: string; tracks: KeyframeTrack[]; + + /** + * @default THREE.NormalAnimationBlendMode + */ blendMode: AnimationBlendMode; + + /** + * @default -1 + */ duration: number; uuid: string; results: any[]; diff --git a/src/animation/AnimationMixer.d.ts b/src/animation/AnimationMixer.d.ts index e7b4813196d2be..76537850d6626e 100644 --- a/src/animation/AnimationMixer.d.ts +++ b/src/animation/AnimationMixer.d.ts @@ -9,7 +9,14 @@ export class AnimationMixer extends EventDispatcher { constructor( root: Object3D | AnimationObjectGroup ); + /** + * @default 0 + */ time: number; + + /** + * @default 1.0 + */ timeScale: number; clipAction( clip: AnimationClip, root?: Object3D | AnimationObjectGroup, blendMode?: AnimationBlendMode ): AnimationAction; diff --git a/src/animation/AnimationUtils.d.ts b/src/animation/AnimationUtils.d.ts index 75c0ab7045f54c..715ddd3ebe3392 100644 --- a/src/animation/AnimationUtils.d.ts +++ b/src/animation/AnimationUtils.d.ts @@ -16,6 +16,14 @@ export namespace AnimationUtils { values: any[], valuePropertyName: string ): void; + + /** + * @param sourceClip + * @param name + * @param startFrame + * @param endFrame + * @param [fps=30] + */ export function subclip( sourceClip: AnimationClip, name: string, @@ -23,6 +31,13 @@ export namespace AnimationUtils { endFrame: number, fps?: number ): AnimationClip; + + /** + * @param targetClip + * @param [referenceFrame=0] + * @param [referenceClip=targetClip] + * @param [fps=30] + */ export function makeClipAdditive( targetClip: AnimationClip, referenceFrame?: number, diff --git a/src/animation/KeyframeTrack.d.ts b/src/animation/KeyframeTrack.d.ts index 969d7de4340969..5d3a295a49c3b2 100644 --- a/src/animation/KeyframeTrack.d.ts +++ b/src/animation/KeyframeTrack.d.ts @@ -5,6 +5,12 @@ import { InterpolationModes } from '../constants'; export class KeyframeTrack { + /** + * @param name + * @param times + * @param values + * @param [interpolation=THREE.InterpolateLinear] + */ constructor( name: string, times: any[], @@ -20,6 +26,9 @@ export class KeyframeTrack { TimeBufferType: Float32Array; ValueBufferType: Float32Array; + /** + * @default THREE.InterpolateLinear + */ DefaultInterpolation: InterpolationModes; InterpolantFactoryMethodDiscrete( result: any ): DiscreteInterpolant; diff --git a/src/animation/tracks/BooleanKeyframeTrack.d.ts b/src/animation/tracks/BooleanKeyframeTrack.d.ts index e37b0eac7c0230..c4f91066d4b63c 100644 --- a/src/animation/tracks/BooleanKeyframeTrack.d.ts +++ b/src/animation/tracks/BooleanKeyframeTrack.d.ts @@ -4,4 +4,9 @@ export class BooleanKeyframeTrack extends KeyframeTrack { constructor( name: string, times: any[], values: any[] ); + /** + * @default 'bool' + */ + ValueTypeName: string; + } diff --git a/src/animation/tracks/ColorKeyframeTrack.d.ts b/src/animation/tracks/ColorKeyframeTrack.d.ts index aacf8bfb717f80..69383fba012d0c 100644 --- a/src/animation/tracks/ColorKeyframeTrack.d.ts +++ b/src/animation/tracks/ColorKeyframeTrack.d.ts @@ -10,4 +10,9 @@ export class ColorKeyframeTrack extends KeyframeTrack { interpolation?: InterpolationModes ); + /** + * @default 'color' + */ + ValueTypeName: string; + } diff --git a/src/animation/tracks/NumberKeyframeTrack.d.ts b/src/animation/tracks/NumberKeyframeTrack.d.ts index b7f36e03ea1c5b..27d641ba3f6349 100644 --- a/src/animation/tracks/NumberKeyframeTrack.d.ts +++ b/src/animation/tracks/NumberKeyframeTrack.d.ts @@ -10,4 +10,9 @@ export class NumberKeyframeTrack extends KeyframeTrack { interpolation?: InterpolationModes ); + /** + * @default 'number' + */ + ValueTypeName: string; + } diff --git a/src/animation/tracks/QuaternionKeyframeTrack.d.ts b/src/animation/tracks/QuaternionKeyframeTrack.d.ts index b06b7072261743..6a1c99bfbb5747 100644 --- a/src/animation/tracks/QuaternionKeyframeTrack.d.ts +++ b/src/animation/tracks/QuaternionKeyframeTrack.d.ts @@ -10,4 +10,9 @@ export class QuaternionKeyframeTrack extends KeyframeTrack { interpolation?: InterpolationModes ); + /** + * @default 'quaternion' + */ + ValueTypeName: string; + } diff --git a/src/animation/tracks/StringKeyframeTrack.d.ts b/src/animation/tracks/StringKeyframeTrack.d.ts index ecf2b7f2448ba3..1d527032c268b2 100644 --- a/src/animation/tracks/StringKeyframeTrack.d.ts +++ b/src/animation/tracks/StringKeyframeTrack.d.ts @@ -10,4 +10,9 @@ export class StringKeyframeTrack extends KeyframeTrack { interpolation?: InterpolationModes ); + /** + * @default 'string' + */ + ValueTypeName: string; + } diff --git a/src/animation/tracks/VectorKeyframeTrack.d.ts b/src/animation/tracks/VectorKeyframeTrack.d.ts index d9647db05ba53a..6fd96550826cec 100644 --- a/src/animation/tracks/VectorKeyframeTrack.d.ts +++ b/src/animation/tracks/VectorKeyframeTrack.d.ts @@ -10,4 +10,9 @@ export class VectorKeyframeTrack extends KeyframeTrack { interpolation?: InterpolationModes ); + /** + * @default 'vector' + */ + ValueTypeName: string; + } diff --git a/src/audio/Audio.d.ts b/src/audio/Audio.d.ts index 14db33ae1b0adf..7e243c360cba2f 100644 --- a/src/audio/Audio.d.ts +++ b/src/audio/Audio.d.ts @@ -12,19 +12,67 @@ export class Audio extends Object3D { listener: AudioListener; context: AudioContext; gain: GainNode; + + /** + * @default false + */ autoplay: boolean; buffer: null | AudioBuffer; + + /** + * @default 0 + */ detune: number; + + /** + * @default false + */ loop: boolean; + + /** + * @default 0 + */ loopStart: number; + + /** + * @default 0 + */ loopEnd: number; + + /** + * @default 0 + */ offset: number; + + /** + * @default undefined + */ duration: number | undefined; + + /** + * @default 1 + */ playbackRate: number; + + /** + * @default false + */ isPlaying: boolean; + + /** + * @default true + */ hasPlaybackControl: boolean; + + /** + * @default 'empty' + */ sourceType: string; source: AudioBufferSourceNode; + + /** + * @default [] + */ filters: any[]; getOutput(): NodeType; diff --git a/src/audio/AudioAnalyser.d.ts b/src/audio/AudioAnalyser.d.ts index 7da37c854bd709..5c9e3eed62c1de 100644 --- a/src/audio/AudioAnalyser.d.ts +++ b/src/audio/AudioAnalyser.d.ts @@ -2,7 +2,11 @@ import { Audio } from './Audio'; export class AudioAnalyser { - constructor( audio: Audio, fftSize: number ); + /** + * @param audio + * @param [fftSize=2048] + */ + constructor( audio: Audio, fftSize?: number ); analyser: AnalyserNode; data: Uint8Array; diff --git a/src/audio/AudioListener.d.ts b/src/audio/AudioListener.d.ts index 631909da7b90fe..77306300ae2c24 100644 --- a/src/audio/AudioListener.d.ts +++ b/src/audio/AudioListener.d.ts @@ -8,7 +8,15 @@ export class AudioListener extends Object3D { type: 'AudioListener'; context: AudioContext; gain: GainNode; + + /** + * @default null + */ filter: null | any; + + /** + * @default 0 + */ timeDelta: number; getInput(): GainNode; diff --git a/src/cameras/ArrayCamera.d.ts b/src/cameras/ArrayCamera.d.ts index 380c3382451ca7..55c920620c6c99 100644 --- a/src/cameras/ArrayCamera.d.ts +++ b/src/cameras/ArrayCamera.d.ts @@ -4,6 +4,9 @@ export class ArrayCamera extends PerspectiveCamera { constructor( cameras?: PerspectiveCamera[] ); + /** + * @default [] + */ cameras: PerspectiveCamera[]; readonly isArrayCamera: true; diff --git a/src/cameras/Camera.d.ts b/src/cameras/Camera.d.ts index b854d65b046db3..18c3e0527fdb1d 100644 --- a/src/cameras/Camera.d.ts +++ b/src/cameras/Camera.d.ts @@ -16,16 +16,19 @@ export class Camera extends Object3D { /** * This is the inverse of matrixWorld. MatrixWorld contains the Matrix which has the world transform of the Camera. + * @default new THREE.Matrix4() */ matrixWorldInverse: Matrix4; /** * This is the matrix which contains the projection. + * @default new THREE.Matrix4() */ projectionMatrix: Matrix4; /** * This is the inverse of projectionMatrix. + * @default new THREE.Matrix4() */ projectionMatrixInverse: Matrix4; diff --git a/src/cameras/OrthographicCamera.d.ts b/src/cameras/OrthographicCamera.d.ts index 4bf9112d7c6080..718d9d2d17c7b7 100644 --- a/src/cameras/OrthographicCamera.d.ts +++ b/src/cameras/OrthographicCamera.d.ts @@ -16,8 +16,8 @@ export class OrthographicCamera extends Camera { * @param right Camera frustum right plane. * @param top Camera frustum top plane. * @param bottom Camera frustum bottom plane. - * @param near Camera frustum near plane. - * @param far Camera frustum far plane. + * @param [near=0.1] Camera frustum near plane. + * @param [far=2000] Camera frustum far plane. */ constructor( left: number, @@ -32,7 +32,14 @@ export class OrthographicCamera extends Camera { readonly isOrthographicCamera: true; + /** + * @default 1 + */ zoom: number; + + /** + * @default null + */ view: null | { enabled: boolean; fullWidth: number; @@ -45,31 +52,37 @@ export class OrthographicCamera extends Camera { /** * Camera frustum left plane. + * @default -1 */ left: number; /** * Camera frustum right plane. + * @default 1 */ right: number; /** * Camera frustum top plane. + * @default 1 */ top: number; /** * Camera frustum bottom plane. + * @default -1 */ bottom: number; /** * Camera frustum near plane. + * @default 0.1 */ near: number; /** * Camera frustum far plane. + * @default 2000 */ far: number; diff --git a/src/cameras/PerspectiveCamera.d.ts b/src/cameras/PerspectiveCamera.d.ts index a01221ae8dcc0a..a31b318406bab6 100644 --- a/src/cameras/PerspectiveCamera.d.ts +++ b/src/cameras/PerspectiveCamera.d.ts @@ -8,10 +8,10 @@ import { Camera } from './Camera'; export class PerspectiveCamera extends Camera { /** - * @param fov Camera frustum vertical field of view. Default value is 50. - * @param aspect Camera frustum aspect ratio. Default value is 1. - * @param near Camera frustum near plane. Default value is 0.1. - * @param far Camera frustum far plane. Default value is 2000. + * @param [fov=50] Camera frustum vertical field of view. Default value is 50. + * @param [aspect=1] Camera frustum aspect ratio. Default value is 1. + * @param [near=0.1] Camera frustum near plane. Default value is 0.1. + * @param [far=2000] Camera frustum far plane. Default value is 2000. */ constructor( fov?: number, aspect?: number, near?: number, far?: number ); @@ -19,29 +19,43 @@ export class PerspectiveCamera extends Camera { readonly isPerspectiveCamera: true; + /** + * @default 1 + */ zoom: number; /** * Camera frustum vertical field of view, from bottom to top of view, in degrees. + * @default 50 */ fov: number; /** * Camera frustum aspect ratio, window width divided by window height. + * @default 1 */ aspect: number; /** * Camera frustum near plane. + * @default 0.1 */ near: number; /** * Camera frustum far plane. + * @default 2000 */ far: number; + /** + * @default 10 + */ focus: number; + + /** + * @default null + */ view: null | { enabled: boolean; fullWidth: number; @@ -51,7 +65,15 @@ export class PerspectiveCamera extends Camera { width: number; height: number; }; + + /** + * @default 35 + */ filmGauge: number; + + /** + * @default 0 + */ filmOffset: number; setFocalLength( focalLength: number ): void; diff --git a/src/cameras/StereoCamera.d.ts b/src/cameras/StereoCamera.d.ts index 5ba067df46a23f..02234427f30f41 100644 --- a/src/cameras/StereoCamera.d.ts +++ b/src/cameras/StereoCamera.d.ts @@ -7,8 +7,16 @@ export class StereoCamera extends Camera { type: 'StereoCamera'; + /** + * @default 1 + */ aspect: number; + + /** + * @default 0.064 + */ eyeSep: number; + cameraL: PerspectiveCamera; cameraR: PerspectiveCamera; diff --git a/src/core/BufferAttribute.d.ts b/src/core/BufferAttribute.d.ts index 43194bbaafe54b..ab4e6461cf2688 100644 --- a/src/core/BufferAttribute.d.ts +++ b/src/core/BufferAttribute.d.ts @@ -9,13 +9,36 @@ export class BufferAttribute { constructor( array: ArrayLike, itemSize: number, normalized?: boolean ); // array parameter should be TypedArray. + /** + * @default '' + */ name: string; array: ArrayLike; itemSize: number; + + /** + * @default THREE.StaticDrawUsage + */ usage: Usage; + + /** + * @default { offset: number; count: number } + */ updateRange: { offset: number; count: number }; + + /** + * @default 0 + */ version: number; + + /** + * @default false + */ normalized: boolean; + + /** + * @default 0 + */ count: number; set needsUpdate( value: boolean ); diff --git a/src/core/BufferGeometry.d.ts b/src/core/BufferGeometry.d.ts index c0f8018e99ef91..8d898bc146a013 100644 --- a/src/core/BufferGeometry.d.ts +++ b/src/core/BufferGeometry.d.ts @@ -31,20 +31,64 @@ export class BufferGeometry extends EventDispatcher { */ id: number; uuid: string; + + /** + * @default '' + */ name: string; + + /** + * @default 'BufferGeometry' + */ type: string; + + /** + * @default null + */ index: BufferAttribute | null; + + /** + * @default {} + */ attributes: { [name: string]: BufferAttribute | InterleavedBufferAttribute; }; + + /** + * @default {} + */ morphAttributes: { [name: string]: ( BufferAttribute | InterleavedBufferAttribute )[]; }; + + /** + * @default false + */ morphTargetsRelative: boolean; + + /** + * @default [] + */ groups: { start: number; count: number; materialIndex?: number }[]; + + /** + * @default null + */ boundingBox: Box3 | null; + + /** + * @default null + */ boundingSphere: Sphere | null; + + /** + * @default { start: 0, count: Infinity } + */ drawRange: { start: number; count: number }; + + /** + * @default {} + */ userData: {[key: string]: any}; readonly isBufferGeometry: true; diff --git a/src/core/Clock.d.ts b/src/core/Clock.d.ts index 241b56df92a3cf..250c621187851a 100644 --- a/src/core/Clock.d.ts +++ b/src/core/Clock.d.ts @@ -6,35 +6,40 @@ export class Clock { /** - * @param autoStart Automatically start the clock. + * @param [autoStart=true] Automatically start the clock. */ constructor( autoStart?: boolean ); /** * If set, starts the clock automatically when the first update is called. + * @default true */ autoStart: boolean; /** * When the clock is running, It holds the starttime of the clock. * This counted from the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC. + * @default 0 */ startTime: number; /** * When the clock is running, It holds the previous time from a update. * This counted from the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC. + * @default 0 */ oldTime: number; /** * When the clock is running, It holds the time elapsed between the start of the clock to the previous update. * This parameter is in seconds of three decimal places. + * @default 0 */ elapsedTime: number; /** * This property keeps track whether the clock is running or not. + * @default false */ running: boolean; diff --git a/src/core/DirectGeometry.d.ts b/src/core/DirectGeometry.d.ts index f635b430013e8e..e4f89354a08355 100644 --- a/src/core/DirectGeometry.d.ts +++ b/src/core/DirectGeometry.d.ts @@ -18,22 +18,90 @@ export class DirectGeometry { uuid: string; name: string; type: string; + + /** + * @default [] + */ indices: number[]; + + /** + * @default [] + */ vertices: Vector3[]; + + /** + * @default [] + */ normals: Vector3[]; + + /** + * @default [] + */ colors: Color[]; + + /** + * @default [] + */ uvs: Vector2[]; + + /** + * @default [] + */ uvs2: Vector2[]; + + /** + * @default [] + */ groups: { start: number; materialIndex: number }[]; + + /** + * @default {} + */ morphTargets: MorphTarget[]; + + /** + * @default [] + */ skinWeights: Vector4[]; + + /** + * @default [] + */ skinIndices: Vector4[]; + + /** + * @default null + */ boundingBox: Box3 | null; + + /** + * @default null + */ boundingSphere: Sphere | null; + + /** + * @default false + */ verticesNeedUpdate: boolean; + + /** + * @default false + */ normalsNeedUpdate: boolean; + + /** + * @default false + */ colorsNeedUpdate: boolean; + + /** + * @default false + */ uvsNeedUpdate: boolean; + + /** + * @default false + */ groupsNeedUpdate: boolean; computeBoundingBox(): void; diff --git a/src/core/Face3.d.ts b/src/core/Face3.d.ts index 1f25f287b56235..4257845184ea14 100644 --- a/src/core/Face3.d.ts +++ b/src/core/Face3.d.ts @@ -66,26 +66,31 @@ export class Face3 { /** * Face normal. + * @default new THREE.Vector3() */ normal: Vector3; /** * Array of 3 vertex normals. + * @default [] */ vertexNormals: Vector3[]; /** * Face color. + * @default new THREE.Color() */ color: Color; /** * Array of 3 vertex colors. + * @default [] */ vertexColors: Color[]; /** * Material index (points to {@link Geometry.materials}). + * @default 0 */ materialIndex: number; diff --git a/src/core/Geometry.d.ts b/src/core/Geometry.d.ts index e8e1eb0826d2b9..9d9f9f1c1b7f66 100644 --- a/src/core/Geometry.d.ts +++ b/src/core/Geometry.d.ts @@ -54,14 +54,19 @@ export class Geometry extends EventDispatcher { /** * Name for this geometry. Default is an empty string. + * @default '' */ name: string; + /** + * @default 'Geometry' + */ type: string; /** * The array of vertices hold every position of points of the model. * To signal an update in this array, Geometry.verticesNeedUpdate needs to be set to true. + * @default [] */ vertices: Vector3[]; @@ -70,6 +75,7 @@ export class Geometry extends EventDispatcher { * Used in ParticleSystem, Line and Ribbon. * Meshes use per-face-use-of-vertex colors embedded directly in faces. * To signal an update in this array, Geometry.colorsNeedUpdate needs to be set to true. + * @default [] */ colors: Color[]; @@ -77,6 +83,7 @@ export class Geometry extends EventDispatcher { * Array of triangles or/and quads. * The array of faces describe how each vertex in the model is connected with each other. * To signal an update in this array, Geometry.elementsNeedUpdate needs to be set to true. + * @default [] */ faces: Face3[]; @@ -84,6 +91,7 @@ export class Geometry extends EventDispatcher { * Array of face UV layers. * Each UV layer is an array of UV matching order and number of vertices in faces. * To signal an update in this array, Geometry.uvsNeedUpdate needs to be set to true. + * @default [[]] */ faceVertexUvs: Vector2[][][]; @@ -93,6 +101,7 @@ export class Geometry extends EventDispatcher { * { name: "targetName", vertices: [ new THREE.Vector3(), ... ] } * * Morph vertices match number and order of primary vertices. + * @default [] */ morphTargets: MorphTarget[]; @@ -100,66 +109,78 @@ export class Geometry extends EventDispatcher { * Array of morph normals. Morph normals have similar structure as morph targets, each normal set is a Javascript object: * * morphNormal = { name: "NormalName", normals: [ new THREE.Vector3(), ... ] } + * @default [] */ morphNormals: MorphNormals[]; /** * Array of skinning weights, matching number and order of vertices. + * @default [] */ skinWeights: Vector4[]; /** * Array of skinning indices, matching number and order of vertices. + * @default [] */ skinIndices: Vector4[]; /** - * + * @default [] */ lineDistances: number[]; /** * Bounding box. + * @default null */ boundingBox: Box3 | null; /** * Bounding sphere. + * @default null */ boundingSphere: Sphere | null; /** * Set to true if the vertices array has been updated. + * @default false */ verticesNeedUpdate: boolean; /** * Set to true if the faces array has been updated. + * @default false */ elementsNeedUpdate: boolean; /** * Set to true if the uvs array has been updated. + * @default false */ uvsNeedUpdate: boolean; /** * Set to true if the normals array has been updated. + * @default false */ normalsNeedUpdate: boolean; /** * Set to true if the colors array has been updated. + * @default false */ colorsNeedUpdate: boolean; /** * Set to true if the linedistances array has been updated. + * @default false */ lineDistancesNeedUpdate: boolean; /** * + * @default false */ groupsNeedUpdate: boolean; diff --git a/src/core/InstancedBufferAttribute.d.ts b/src/core/InstancedBufferAttribute.d.ts index 674d025543e1d0..33f9ef0e341e37 100644 --- a/src/core/InstancedBufferAttribute.d.ts +++ b/src/core/InstancedBufferAttribute.d.ts @@ -44,6 +44,9 @@ export class InstancedBufferAttribute extends BufferAttribute { meshPerAttribute?: number ); + /** + * @default 1 + */ meshPerAttribute: number; } diff --git a/src/core/InstancedBufferGeometry.d.ts b/src/core/InstancedBufferGeometry.d.ts index 8cc285e5665866..f7658863a1213b 100644 --- a/src/core/InstancedBufferGeometry.d.ts +++ b/src/core/InstancedBufferGeometry.d.ts @@ -7,7 +7,16 @@ export class InstancedBufferGeometry extends BufferGeometry { constructor(); + /** + * @default 'InstancedBufferGeometry + */ + type: string; + groups: { start: number; count: number; instances: number }[]; + + /** + * @default Infinity + */ instanceCount: number; addGroup( start: number, count: number, instances: number ): void; diff --git a/src/core/InstancedInterleavedBuffer.d.ts b/src/core/InstancedInterleavedBuffer.d.ts index 50576f98f32a17..bcc224e7eefec8 100644 --- a/src/core/InstancedInterleavedBuffer.d.ts +++ b/src/core/InstancedInterleavedBuffer.d.ts @@ -11,6 +11,9 @@ export class InstancedInterleavedBuffer extends InterleavedBuffer { meshPerAttribute?: number ); + /** + * @default 1 + */ meshPerAttribute: number; } diff --git a/src/core/InterleavedBuffer.d.ts b/src/core/InterleavedBuffer.d.ts index d2086d7ad813aa..298ae0db38dff6 100644 --- a/src/core/InterleavedBuffer.d.ts +++ b/src/core/InterleavedBuffer.d.ts @@ -10,10 +10,27 @@ export class InterleavedBuffer { array: ArrayLike; stride: number; + + /** + * @default THREE.StaticDrawUsage + */ usage: Usage; + + /** + * @default { offset: number; count: number } + */ updateRange: { offset: number; count: number }; + + /** + * @default 0 + */ version: number; + length: number; + + /** + * @default 0 + */ count: number; needsUpdate: boolean; uuid: string; diff --git a/src/core/InterleavedBufferAttribute.d.ts b/src/core/InterleavedBufferAttribute.d.ts index a8f981ff505c6a..20ad6069ce7753 100644 --- a/src/core/InterleavedBufferAttribute.d.ts +++ b/src/core/InterleavedBufferAttribute.d.ts @@ -13,10 +13,17 @@ export class InterleavedBufferAttribute { normalized?: boolean ); + /** + * @default '' + */ name: string; data: InterleavedBuffer; itemSize: number; offset: number; + + /** + * @default false + */ normalized: boolean; get count(): number; diff --git a/src/core/Layers.d.ts b/src/core/Layers.d.ts index 14dad236dd578e..45d09dcedadcac 100644 --- a/src/core/Layers.d.ts +++ b/src/core/Layers.d.ts @@ -2,6 +2,9 @@ export class Layers { constructor(); + /** + * @default 1 | 0 + */ mask: number; set( channel: number ): void; diff --git a/src/core/Object3D.d.ts b/src/core/Object3D.d.ts index 2429aeb254dad2..76608a82e9dfbf 100644 --- a/src/core/Object3D.d.ts +++ b/src/core/Object3D.d.ts @@ -36,98 +36,128 @@ export class Object3D extends EventDispatcher { /** * Optional name of the object (doesn't need to be unique). + * @default '' */ name: string; + /** + * @default 'Object3D' + */ type: string; /** * Object's parent in the scene graph. + * @default null */ parent: Object3D | null; /** * Array with object's children. + * @default [] */ children: Object3D[]; /** * Up direction. + * @default THREE.Object3D.DefaultUp.clone() */ up: Vector3; /** * Object's local position. + * @default new THREE.Vector3() */ readonly position: Vector3; /** * Object's local rotation (Euler angles), in radians. + * @default new THREE.Euler() */ readonly rotation: Euler; /** * Global rotation. + * @default new THREE.Quaternion() */ readonly quaternion: Quaternion; /** * Object's local scale. + * @default new THREE.Vector3() */ readonly scale: Vector3; + /** + * @default new THREE.Matrix4() + */ readonly modelViewMatrix: Matrix4; + /** + * @default new THREE.Matrix3() + */ readonly normalMatrix: Matrix3; /** * Local transform. + * @default new THREE.Matrix4() */ matrix: Matrix4; /** * The global transform of the object. If the Object3d has no parent, then it's identical to the local transform. + * @default new THREE.Matrix4() */ matrixWorld: Matrix4; /** * When this is set, it calculates the matrix of position, (rotation or quaternion) and scale every frame and also recalculates the matrixWorld property. + * @default THREE.Object3D.DefaultMatrixAutoUpdate */ matrixAutoUpdate: boolean; /** * When this is set, it calculates the matrixWorld in that frame and resets this property to false. + * @default false */ matrixWorldNeedsUpdate: boolean; + /** + * @default new THREE.Layers() + */ layers: Layers; /** * Object gets rendered if true. + * @default true */ visible: boolean; /** * Gets rendered into shadow map. + * @default false */ castShadow: boolean; /** * Material gets baked in shadow receiving. + * @default false */ receiveShadow: boolean; /** * When this is set, it checks every frame if the object is in the frustum of the camera. Otherwise the object gets drawn every frame even if it isn't visible. + * @default true */ frustumCulled: boolean; /** * Overrides the default rendering order of scene graph objects, from lowest to highest renderOrder. Opaque and transparent objects remain sorted independently though. When this property is set for an instance of Group, all descendants objects will be sorted and rendered together. + * @default 0 */ renderOrder: number; /** * An object that can be used to store custom data about the Object3d. It should not hold references to functions as these will not be cloned. + * @default {} */ userData: { [key: string]: any }; diff --git a/src/core/Raycaster.d.ts b/src/core/Raycaster.d.ts index df1e812a796b84..03f9e93779ad4a 100644 --- a/src/core/Raycaster.d.ts +++ b/src/core/Raycaster.d.ts @@ -48,12 +48,14 @@ export class Raycaster { /** * The near factor of the raycaster. This value indicates which objects can be discarded based on the * distance. This value shouldn't be negative and should be smaller than the far property. + * @default 0 */ near: number; /** * The far factor of the raycaster. This value indicates which objects can be discarded based on the * distance. This value shouldn't be negative and should be larger than the near property. + * @default Infinity */ far: number; @@ -65,9 +67,13 @@ export class Raycaster { /** * Used by Raycaster to selectively ignore 3D objects when performing intersection tests. + * @default new THREE.Layers() */ layers: Layers; + /** + * @default { Mesh: {}, Line: { threshold: 1 }, LOD: {}, Points: { threshold: 1 }, Sprite: {} } + */ params: RaycasterParameters; /** diff --git a/src/extras/core/Curve.d.ts b/src/extras/core/Curve.d.ts index fffb66f9510033..a37544e57852a9 100644 --- a/src/extras/core/Curve.d.ts +++ b/src/extras/core/Curve.d.ts @@ -8,10 +8,15 @@ import { Vector } from './../../math/Vector2'; */ export class Curve { + /** + * @default 'Curve' + */ + type: string; + /** * This value determines the amount of divisions when calculating the cumulative segment lengths of a curve via .getLengths. * To ensure precision when using methods like .getSpacedPoints, it is recommended to increase .arcLengthDivisions if the curve is very large. - * Default is 200. + * @default 200 */ arcLengthDivisions: number; diff --git a/src/extras/core/CurvePath.d.ts b/src/extras/core/CurvePath.d.ts index 7e32e5035994b3..d432d170a0f5d4 100644 --- a/src/extras/core/CurvePath.d.ts +++ b/src/extras/core/CurvePath.d.ts @@ -6,7 +6,19 @@ export class CurvePath extends Curve { constructor(); + /** + * @default 'CurvePath' + */ + type: string; + + /** + * @default [] + */ curves: Curve[]; + + /** + * @default false + */ autoClose: boolean; add( curve: Curve ): void; diff --git a/src/extras/core/Font.d.ts b/src/extras/core/Font.d.ts index f63cffdcdce25d..de30b4a5738938 100644 --- a/src/extras/core/Font.d.ts +++ b/src/extras/core/Font.d.ts @@ -4,6 +4,11 @@ export class Font { constructor( jsondata: any ); + /** + * @default 'Font' + */ + type: string; + data: string; generateShapes( text: string, size: number ): Shape[]; diff --git a/src/extras/core/Path.d.ts b/src/extras/core/Path.d.ts index 6fcc25ec7f95c4..5ad8a23fdd145a 100644 --- a/src/extras/core/Path.d.ts +++ b/src/extras/core/Path.d.ts @@ -8,6 +8,14 @@ export class Path extends CurvePath { constructor( points?: Vector2[] ); + /** + * @default 'Path' + */ + type: string; + + /** + * @default new THREE.Vector2() + */ currentPoint: Vector2; /** diff --git a/src/extras/core/Shape.d.ts b/src/extras/core/Shape.d.ts index f3f35f39c4acd6..4a3654f2a16487 100644 --- a/src/extras/core/Shape.d.ts +++ b/src/extras/core/Shape.d.ts @@ -10,6 +10,14 @@ export class Shape extends Path { constructor( points?: Vector2[] ); + /** + * @default 'Shape' + */ + type: string; + + /** + * @default [] + */ holes: Path[]; /** diff --git a/src/extras/core/ShapePath.d.ts b/src/extras/core/ShapePath.d.ts index 88203eefad07d2..801b1dad548c0b 100644 --- a/src/extras/core/ShapePath.d.ts +++ b/src/extras/core/ShapePath.d.ts @@ -1,11 +1,29 @@ import { Vector2 } from './../../math/Vector2'; import { Shape } from './Shape'; +import { Color } from '../../math/Color'; export class ShapePath { constructor(); + /** + * @default 'ShapePath' + */ + type: string; + + /** + * @default new THREE.Color() + */ + color: Color; + + /** + * @default [] + */ subPaths: any[]; + + /** + * @default null + */ currentPath: any; moveTo( x: number, y: number ): this; diff --git a/src/extras/curves/ArcCurve.d.ts b/src/extras/curves/ArcCurve.d.ts index ccd7efa83eeb1d..f4581542cdd6ff 100644 --- a/src/extras/curves/ArcCurve.d.ts +++ b/src/extras/curves/ArcCurve.d.ts @@ -10,4 +10,9 @@ export class ArcCurve extends EllipseCurve { aClockwise: boolean ); + /** + * @default 'ArcCurve' + */ + type: string; + } diff --git a/src/extras/curves/CatmullRomCurve3.d.ts b/src/extras/curves/CatmullRomCurve3.d.ts index db68a7e9aaf035..0282bb9fe3f748 100644 --- a/src/extras/curves/CatmullRomCurve3.d.ts +++ b/src/extras/curves/CatmullRomCurve3.d.ts @@ -34,6 +34,12 @@ export namespace CurveUtils { export class CatmullRomCurve3 extends Curve { + /** + * @param [points=[]] + * @param [closed=false] + * @param [curveType='centripetal'] + * @param [tension=0.5] + */ constructor( points?: Vector3[], closed?: boolean, @@ -41,6 +47,14 @@ export class CatmullRomCurve3 extends Curve { tension?: number ); + /** + * @default 'CatmullRomCurve3' + */ + type: string; + + /** + * @default [] + */ points: Vector3[]; } diff --git a/src/extras/curves/CubicBezierCurve.d.ts b/src/extras/curves/CubicBezierCurve.d.ts index 4310980233f155..61ac4d34c2bdb6 100644 --- a/src/extras/curves/CubicBezierCurve.d.ts +++ b/src/extras/curves/CubicBezierCurve.d.ts @@ -5,9 +5,29 @@ export class CubicBezierCurve extends Curve { constructor( v0: Vector2, v1: Vector2, v2: Vector2, v3: Vector2 ); + /** + * @default 'CubicBezierCurve' + */ + type: string; + + /** + * @default new THREE.Vector2() + */ v0: Vector2; + + /** + * @default new THREE.Vector2() + */ v1: Vector2; + + /** + * @default new THREE.Vector2() + */ v2: Vector2; + + /** + * @default new THREE.Vector2() + */ v3: Vector2; } diff --git a/src/extras/curves/CubicBezierCurve3.d.ts b/src/extras/curves/CubicBezierCurve3.d.ts index b3054accd15061..bb7972fae6a944 100644 --- a/src/extras/curves/CubicBezierCurve3.d.ts +++ b/src/extras/curves/CubicBezierCurve3.d.ts @@ -5,9 +5,29 @@ export class CubicBezierCurve3 extends Curve { constructor( v0: Vector3, v1: Vector3, v2: Vector3, v3: Vector3 ); + /** + * @default 'CubicBezierCurve3' + */ + type: string; + + /** + * @default new THREE.Vector3() + */ v0: Vector3; + + /** + * @default new THREE.Vector3() + */ v1: Vector3; + + /** + * @default new THREE.Vector3() + */ v2: Vector3; + + /** + * @default new THREE.Vector3() + */ v3: Vector3; } diff --git a/src/extras/curves/EllipseCurve.d.ts b/src/extras/curves/EllipseCurve.d.ts index 8ff8d04fa79d9e..2a642c41157c21 100644 --- a/src/extras/curves/EllipseCurve.d.ts +++ b/src/extras/curves/EllipseCurve.d.ts @@ -14,13 +14,49 @@ export class EllipseCurve extends Curve { aRotation: number ); + /** + * @default 'EllipseCurve' + */ + type: string; + + /** + * @default 0 + */ aX: number; + + /** + * @default 0 + */ aY: number; + + /** + * @default 1 + */ xRadius: number; + + /** + * @default 1 + */ yRadius: number; + + /** + * @default 0 + */ aStartAngle: number; + + /** + * @default 2 * Math.PI + */ aEndAngle: number; + + /** + * @default false + */ aClockwise: boolean; + + /** + * @default 0 + */ aRotation: number; } diff --git a/src/extras/curves/LineCurve.d.ts b/src/extras/curves/LineCurve.d.ts index 270c58560acfe1..b3d278892c1dd1 100644 --- a/src/extras/curves/LineCurve.d.ts +++ b/src/extras/curves/LineCurve.d.ts @@ -5,7 +5,20 @@ export class LineCurve extends Curve { constructor( v1: Vector2, v2: Vector2 ); + /** + * @default 'LineCurve' + */ + type: string; + + + /** + * @default new THREE.Vector2() + */ v1: Vector2; + + /** + * @default new THREE.Vector2() + */ v2: Vector2; } diff --git a/src/extras/curves/LineCurve3.d.ts b/src/extras/curves/LineCurve3.d.ts index a9689ffb73f228..58a67b57ecaec2 100644 --- a/src/extras/curves/LineCurve3.d.ts +++ b/src/extras/curves/LineCurve3.d.ts @@ -5,7 +5,20 @@ export class LineCurve3 extends Curve { constructor( v1: Vector3, v2: Vector3 ); + /** + * @default 'LineCurve3' + */ + type: string; + + + /** + * @default new THREE.Vector3() + */ v1: Vector3; + + /** + * @default new THREE.Vector3() + */ v2: Vector3; } diff --git a/src/extras/curves/QuadraticBezierCurve.d.ts b/src/extras/curves/QuadraticBezierCurve.d.ts index 344d109d4fc0b0..ef4baef6876aa0 100644 --- a/src/extras/curves/QuadraticBezierCurve.d.ts +++ b/src/extras/curves/QuadraticBezierCurve.d.ts @@ -5,8 +5,24 @@ export class QuadraticBezierCurve extends Curve { constructor( v0: Vector2, v1: Vector2, v2: Vector2 ); + /** + * @default 'QuadraticBezierCurve' + */ + type: string; + + /** + * @default new THREE.Vector2() + */ v0: Vector2; + + /** + * @default new THREE.Vector2() + */ v1: Vector2; + + /** + * @default new THREE.Vector2() + */ v2: Vector2; } diff --git a/src/extras/curves/QuadraticBezierCurve3.d.ts b/src/extras/curves/QuadraticBezierCurve3.d.ts index 6e6e84e36abde0..4d1abc7151edee 100644 --- a/src/extras/curves/QuadraticBezierCurve3.d.ts +++ b/src/extras/curves/QuadraticBezierCurve3.d.ts @@ -5,8 +5,24 @@ export class QuadraticBezierCurve3 extends Curve { constructor( v0: Vector3, v1: Vector3, v2: Vector3 ); + /** + * @default 'QuadraticBezierCurve3' + */ + type: string; + + /** + * @default new THREE.Vector3() + */ v0: Vector3; + + /** + * @default new THREE.Vector3() + */ v1: Vector3; + + /** + * @default new THREE.Vector3() + */ v2: Vector3; } diff --git a/src/extras/curves/SplineCurve.d.ts b/src/extras/curves/SplineCurve.d.ts index 37d10d24e7e4c1..f980df3469a0c7 100644 --- a/src/extras/curves/SplineCurve.d.ts +++ b/src/extras/curves/SplineCurve.d.ts @@ -5,6 +5,14 @@ export class SplineCurve extends Curve { constructor( points?: Vector2[] ); + /** + * @default 'SplineCurve' + */ + type: string; + + /** + * @default [] + */ points: Vector2[]; } diff --git a/src/extras/objects/ImmediateRenderObject.d.ts b/src/extras/objects/ImmediateRenderObject.d.ts index 457ad346107eab..b56d89e6b698c8 100644 --- a/src/extras/objects/ImmediateRenderObject.d.ts +++ b/src/extras/objects/ImmediateRenderObject.d.ts @@ -11,16 +11,49 @@ export class ImmediateRenderObject extends Object3D { material: Material; + /** + * @default false + */ hasPositions: boolean; + + /** + * @default false + */ hasNormals: boolean; + + /** + * @default false + */ hasColors: boolean; + + /** + * @default false + */ hasUvs: boolean; + /** + * @default null + */ positionArray: null | Float32Array; + + /** + * @default null + */ normalArray: null | Float32Array; + + /** + * @default null + */ colorArray: null | Float32Array; + + /** + * @default null + */ uvArray: null | Float32Array; + /** + * @default 0 + */ count: number; render( renderCallback: Function ): void; diff --git a/src/geometries/BoxGeometry.d.ts b/src/geometries/BoxGeometry.d.ts index 9645280b9f70e8..7ac9fe6c68fe2a 100644 --- a/src/geometries/BoxGeometry.d.ts +++ b/src/geometries/BoxGeometry.d.ts @@ -4,6 +4,14 @@ import { BufferGeometry } from '../core/BufferGeometry'; // Extras / Geometries ///////////////////////////////////////////////////////////////////// export class BoxBufferGeometry extends BufferGeometry { + /** + * @param [width=1] — Width of the sides on the X axis. + * @param [height=1] — Height of the sides on the Y axis. + * @param [depth=1] — Depth of the sides on the Z axis. + * @param [widthSegments=1] — Number of segmented faces along the width of the sides. + * @param [heightSegments=1] — Number of segmented faces along the height of the sides. + * @param [depthSegments=1] — Number of segmented faces along the depth of the sides. + */ constructor( width?: number, height?: number, @@ -13,6 +21,11 @@ export class BoxBufferGeometry extends BufferGeometry { depthSegments?: number ); + /** + * @default 'BoxBufferGeometry' + */ + type: string; + parameters: { width: number; height: number; @@ -30,12 +43,12 @@ export class BoxBufferGeometry extends BufferGeometry { export class BoxGeometry extends Geometry { /** - * @param width — Width of the sides on the X axis. - * @param height — Height of the sides on the Y axis. - * @param depth — Depth of the sides on the Z axis. - * @param widthSegments — Number of segmented faces along the width of the sides. - * @param heightSegments — Number of segmented faces along the height of the sides. - * @param depthSegments — Number of segmented faces along the depth of the sides. + * @param [width=1] — Width of the sides on the X axis. + * @param [height=1] — Height of the sides on the Y axis. + * @param [depth=1] — Depth of the sides on the Z axis. + * @param [widthSegments=1] — Number of segmented faces along the width of the sides. + * @param [heightSegments=1] — Number of segmented faces along the height of the sides. + * @param [depthSegments=1] — Number of segmented faces along the depth of the sides. */ constructor( width?: number, @@ -46,6 +59,11 @@ export class BoxGeometry extends Geometry { depthSegments?: number ); + /** + * @default 'BoxGeometry' + */ + type: string; + parameters: { width: number; height: number; diff --git a/src/geometries/CircleGeometry.d.ts b/src/geometries/CircleGeometry.d.ts index 8f8b3659719172..96931b2bfb3ce8 100644 --- a/src/geometries/CircleGeometry.d.ts +++ b/src/geometries/CircleGeometry.d.ts @@ -3,6 +3,12 @@ import { BufferGeometry } from '../core/BufferGeometry'; export class CircleBufferGeometry extends BufferGeometry { + /** + * @param [radius=1] + * @param [segments=8] + * @param [thetaStart=0] + * @param [widthSegments=Math.PI * 2] + */ constructor( radius?: number, segments?: number, @@ -10,6 +16,11 @@ export class CircleBufferGeometry extends BufferGeometry { thetaLength?: number ); + /** + * @default 'CircleBufferGeometry' + */ + type: string; + parameters: { radius: number; segments: number; @@ -21,6 +32,12 @@ export class CircleBufferGeometry extends BufferGeometry { export class CircleGeometry extends Geometry { + /** + * @param [radius=1] + * @param [segments=8] + * @param [thetaStart=0] + * @param [widthSegments=Math.PI * 2] + */ constructor( radius?: number, segments?: number, @@ -28,6 +45,11 @@ export class CircleGeometry extends Geometry { thetaLength?: number ); + /** + * @default 'CircleGeometry' + */ + type: string; + parameters: { radius: number; segments: number; diff --git a/src/geometries/ConeGeometry.d.ts b/src/geometries/ConeGeometry.d.ts index 04340a986daefa..abaddcc5340896 100644 --- a/src/geometries/ConeGeometry.d.ts +++ b/src/geometries/ConeGeometry.d.ts @@ -3,6 +3,16 @@ import { CylinderBufferGeometry } from './CylinderGeometry'; export class ConeBufferGeometry extends CylinderBufferGeometry { + /** + * @param [radiusTop=0] — Radius of the cylinder at the top. + * @param [radiusBottom=1] — Radius of the cylinder at the bottom. + * @param [height=1] — Height of the cylinder. + * @param [radiusSegments=8] — Number of segmented faces around the circumference of the cylinder. + * @param [heightSegments=1] — Number of rows of faces along the height of the cylinder. + * @param [openEnded=false] - A Boolean indicating whether or not to cap the ends of the cylinder. + * @param [thetaStart=0] + * @param [widthSegments=Math.PI * 2] + */ constructor( radius?: number, height?: number, @@ -13,10 +23,25 @@ export class ConeBufferGeometry extends CylinderBufferGeometry { thetaLength?: number ); + /** + * @default 'ConeBufferGeometry' + */ + type: string; + } export class ConeGeometry extends CylinderGeometry { + /** + * @param [radiusTop=0] — Radius of the cylinder at the top. + * @param [radiusBottom=1] — Radius of the cylinder at the bottom. + * @param [height=1] — Height of the cylinder. + * @param [radiusSegments=8] — Number of segmented faces around the circumference of the cylinder. + * @param [heightSegments=1] — Number of rows of faces along the height of the cylinder. + * @param [openEnded=false] - A Boolean indicating whether or not to cap the ends of the cylinder. + * @param [thetaStart=0] + * @param [widthSegments=Math.PI * 2] + */ constructor( radius?: number, height?: number, @@ -27,4 +52,9 @@ export class ConeGeometry extends CylinderGeometry { thetaLength?: number ); + /** + * @default 'ConeGeometry' + */ + type: string; + } diff --git a/src/geometries/CylinderGeometry.d.ts b/src/geometries/CylinderGeometry.d.ts index eaad678bcb10be..cb0d3a9be1c70e 100644 --- a/src/geometries/CylinderGeometry.d.ts +++ b/src/geometries/CylinderGeometry.d.ts @@ -3,6 +3,16 @@ import { BufferGeometry } from '../core/BufferGeometry'; export class CylinderBufferGeometry extends BufferGeometry { + /** + * @param [radiusTop=1] — Radius of the cylinder at the top. + * @param [radiusBottom=1] — Radius of the cylinder at the bottom. + * @param [height=1] — Height of the cylinder. + * @param [radiusSegments=8] — Number of segmented faces around the circumference of the cylinder. + * @param [heightSegments=1] — Number of rows of faces along the height of the cylinder. + * @param [openEnded=false] - A Boolean indicating whether or not to cap the ends of the cylinder. + * @param [thetaStart=0] + * @param [widthSegments=Math.PI * 2] + */ constructor( radiusTop?: number, radiusBottom?: number, @@ -14,6 +24,11 @@ export class CylinderBufferGeometry extends BufferGeometry { thetaLength?: number ); + /** + * @default 'CylinderBufferGeometry' + */ + type: string; + parameters: { radiusTop: number; radiusBottom: number; @@ -30,12 +45,14 @@ export class CylinderBufferGeometry extends BufferGeometry { export class CylinderGeometry extends Geometry { /** - * @param radiusTop — Radius of the cylinder at the top. - * @param radiusBottom — Radius of the cylinder at the bottom. - * @param height — Height of the cylinder. - * @param radiusSegments — Number of segmented faces around the circumference of the cylinder. - * @param heightSegments — Number of rows of faces along the height of the cylinder. - * @param openEnded - A Boolean indicating whether or not to cap the ends of the cylinder. + * @param [radiusTop=1] — Radius of the cylinder at the top. + * @param [radiusBottom=1] — Radius of the cylinder at the bottom. + * @param [height=1] — Height of the cylinder. + * @param [radiusSegments=8] — Number of segmented faces around the circumference of the cylinder. + * @param [heightSegments=1] — Number of rows of faces along the height of the cylinder. + * @param [openEnded=false] - A Boolean indicating whether or not to cap the ends of the cylinder. + * @param [thetaStart=0] + * @param [widthSegments=Math.PI * 2] */ constructor( radiusTop?: number, @@ -48,6 +65,11 @@ export class CylinderGeometry extends Geometry { thetaLength?: number ); + /** + * @default 'CylinderGeometry' + */ + type: string; + parameters: { radiusTop: number; radiusBottom: number; diff --git a/src/geometries/DodecahedronGeometry.d.ts b/src/geometries/DodecahedronGeometry.d.ts index ea97fa17b09612..f789e099542210 100644 --- a/src/geometries/DodecahedronGeometry.d.ts +++ b/src/geometries/DodecahedronGeometry.d.ts @@ -3,14 +3,32 @@ import { PolyhedronBufferGeometry } from './PolyhedronGeometry'; export class DodecahedronBufferGeometry extends PolyhedronBufferGeometry { + /** + * @param [radius=1] + * @param [detail=0] + */ constructor( radius?: number, detail?: number ); + /** + * @default 'DodecahedronBufferGeometry' + */ + type: string; + } export class DodecahedronGeometry extends Geometry { + /** + * @param [radius=1] + * @param [detail=0] + */ constructor( radius?: number, detail?: number ); + /** + * @default 'DodecahedronGeometry' + */ + type: string; + parameters: { radius: number; detail: number; diff --git a/src/geometries/EdgesGeometry.d.ts b/src/geometries/EdgesGeometry.d.ts index 86a75108d63c18..cc34c2cc1f6768 100644 --- a/src/geometries/EdgesGeometry.d.ts +++ b/src/geometries/EdgesGeometry.d.ts @@ -3,6 +3,19 @@ import { Geometry } from '../core/Geometry'; export class EdgesGeometry extends BufferGeometry { + /** + * @param geometry + * @param [thresholdAngle=1] + */ constructor( geometry: BufferGeometry | Geometry, thresholdAngle?: number ); + /** + * @default 'EdgesGeometry' + */ + type: string; + + parameters: { + thresholdAngle: number; + }; + } diff --git a/src/geometries/ExtrudeGeometry.d.ts b/src/geometries/ExtrudeGeometry.d.ts index 2f089fc1dd6471..317e6512292442 100644 --- a/src/geometries/ExtrudeGeometry.d.ts +++ b/src/geometries/ExtrudeGeometry.d.ts @@ -6,13 +6,34 @@ import { Geometry } from './../core/Geometry'; import { BufferGeometry } from './../core/BufferGeometry'; export interface ExtrudeGeometryOptions { + /** + * @default 12 + */ curveSegments?: number; + /** + * @default 1 + */ steps?: number; + /** + * @default 100 + */ depth?: number; + /** + * @default true + */ bevelEnabled?: boolean; + /** + * @default 6 + */ bevelThickness?: number; bevelSize?: number; + /** + * @default 0 + */ bevelOffset?: number; + /** + * @default 3 + */ bevelSegments?: number; extrudePath?: Curve; UVGenerator?: UVGenerator; @@ -42,6 +63,11 @@ export class ExtrudeBufferGeometry extends BufferGeometry { static WorldUVGenerator: UVGenerator; + /** + * @default 'ExtrudeBufferGeometry' + */ + type: string; + addShapeList( shapes: Shape[], options?: any ): void; addShape( shape: Shape, options?: any ): void; @@ -53,6 +79,11 @@ export class ExtrudeGeometry extends Geometry { static WorldUVGenerator: UVGenerator; + /** + * @default 'ExtrudeGeometry' + */ + type: string; + addShapeList( shapes: Shape[], options?: any ): void; addShape( shape: Shape, options?: any ): void; diff --git a/src/geometries/IcosahedronGeometry.d.ts b/src/geometries/IcosahedronGeometry.d.ts index fc02ea396a81ef..ab84ee786428a6 100644 --- a/src/geometries/IcosahedronGeometry.d.ts +++ b/src/geometries/IcosahedronGeometry.d.ts @@ -5,12 +5,30 @@ import { export class IcosahedronBufferGeometry extends PolyhedronBufferGeometry { + /** + * @param [radius=1] + * @param [detail=0] + */ constructor( radius?: number, detail?: number ); + /** + * @default 'IcosahedronBufferGeometry' + */ + type: string; + } export class IcosahedronGeometry extends PolyhedronGeometry { + /** + * @param [radius=1] + * @param [detail=0] + */ constructor( radius?: number, detail?: number ); + /** + * @default 'IcosahedronGeometry' + */ + type: string; + } diff --git a/src/geometries/LatheGeometry.d.ts b/src/geometries/LatheGeometry.d.ts index aea669b7603ef8..8463c378a6eb30 100644 --- a/src/geometries/LatheGeometry.d.ts +++ b/src/geometries/LatheGeometry.d.ts @@ -4,6 +4,12 @@ import { BufferGeometry } from './../core/BufferGeometry'; export class LatheBufferGeometry extends BufferGeometry { + /** + * @param points + * @param [segments=12] + * @param [phiStart=0] + * @param [phiLength=Math.PI * 2] + */ constructor( points: Vector2[], segments?: number, @@ -11,6 +17,11 @@ export class LatheBufferGeometry extends BufferGeometry { phiLength?: number ); + /** + * @default 'LatheBufferGeometry' + */ + type: string; + parameters: { points: Vector2[]; segments: number; @@ -22,6 +33,12 @@ export class LatheBufferGeometry extends BufferGeometry { export class LatheGeometry extends Geometry { + /** + * @param points + * @param [segments=12] + * @param [phiStart=0] + * @param [phiLength=Math.PI * 2] + */ constructor( points: Vector2[], segments?: number, @@ -29,6 +46,12 @@ export class LatheGeometry extends Geometry { phiLength?: number ); + + /** + * @default 'LatheGeometry' + */ + type: string; + parameters: { points: Vector2[]; segments: number; diff --git a/src/geometries/OctahedronGeometry.d.ts b/src/geometries/OctahedronGeometry.d.ts index ca7c079486c37b..5416ceb8f13361 100644 --- a/src/geometries/OctahedronGeometry.d.ts +++ b/src/geometries/OctahedronGeometry.d.ts @@ -5,12 +5,30 @@ import { export class OctahedronBufferGeometry extends PolyhedronBufferGeometry { + /** + * @param [radius=1] + * @param [detail=0] + */ constructor( radius?: number, detail?: number ); + /** + * @default 'OctahedronBufferGeometry' + */ + type: string; + } export class OctahedronGeometry extends PolyhedronGeometry { + /** + * @param [radius=1] + * @param [detail=0] + */ constructor( radius?: number, detail?: number ); + /** + * @default 'OctahedronGeometry' + */ + type: string; + } diff --git a/src/geometries/ParametricGeometry.d.ts b/src/geometries/ParametricGeometry.d.ts index a12735b29110f4..94b10c9c018ecb 100644 --- a/src/geometries/ParametricGeometry.d.ts +++ b/src/geometries/ParametricGeometry.d.ts @@ -10,6 +10,11 @@ export class ParametricBufferGeometry extends BufferGeometry { stacks: number ); + /** + * @default 'ParametricBufferGeometry' + */ + type: string; + parameters: { func: ( u: number, v: number, dest: Vector3 ) => void; slices: number; @@ -26,6 +31,11 @@ export class ParametricGeometry extends Geometry { stacks: number ); + /** + * @default 'ParametricGeometry' + */ + type: string; + parameters: { func: ( u: number, v: number, dest: Vector3 ) => void; slices: number; diff --git a/src/geometries/PlaneGeometry.d.ts b/src/geometries/PlaneGeometry.d.ts index 21447c3b0f9c78..05304acf462740 100644 --- a/src/geometries/PlaneGeometry.d.ts +++ b/src/geometries/PlaneGeometry.d.ts @@ -3,6 +3,12 @@ import { BufferGeometry } from './../core/BufferGeometry'; export class PlaneBufferGeometry extends BufferGeometry { + /** + * @param [width=1] — Width of the sides on the X axis. + * @param [height=1] — Height of the sides on the Y axis. + * @param [widthSegments=1] — Number of segmented faces along the width of the sides. + * @param [heightSegments=1] — Number of segmented faces along the height of the sides. + */ constructor( width?: number, height?: number, @@ -10,6 +16,11 @@ export class PlaneBufferGeometry extends BufferGeometry { heightSegments?: number ); + /** + * @default 'PlaneBufferGeometry' + */ + type: string; + parameters: { width: number; height: number; @@ -21,6 +32,12 @@ export class PlaneBufferGeometry extends BufferGeometry { export class PlaneGeometry extends Geometry { + /** + * @param [width=1] — Width of the sides on the X axis. + * @param [height=1] — Height of the sides on the Y axis. + * @param [widthSegments=1] — Number of segmented faces along the width of the sides. + * @param [heightSegments=1] — Number of segmented faces along the height of the sides. + */ constructor( width?: number, height?: number, @@ -28,6 +45,11 @@ export class PlaneGeometry extends Geometry { heightSegments?: number ); + /** + * @default 'PlaneGeometry' + */ + type: string; + parameters: { width: number; height: number; diff --git a/src/geometries/PolyhedronGeometry.d.ts b/src/geometries/PolyhedronGeometry.d.ts index d57ea87b46aeef..7c85bc52d0859f 100644 --- a/src/geometries/PolyhedronGeometry.d.ts +++ b/src/geometries/PolyhedronGeometry.d.ts @@ -4,6 +4,12 @@ import { BufferGeometry } from './../core/BufferGeometry'; export class PolyhedronBufferGeometry extends BufferGeometry { + /** + * @param vertices + * @param indices + * @param [radius=1] + * @param [detail=0] + */ constructor( vertices: number[], indices: number[], @@ -11,6 +17,11 @@ export class PolyhedronBufferGeometry extends BufferGeometry { detail?: number ); + /** + * @default 'PolyhedronBufferGeometry' + */ + type: string; + parameters: { vertices: number[]; indices: number[]; @@ -22,6 +33,12 @@ export class PolyhedronBufferGeometry extends BufferGeometry { export class PolyhedronGeometry extends Geometry { + /** + * @param vertices + * @param indices + * @param [radius=1] + * @param [detail=0] + */ constructor( vertices: number[], indices: number[], @@ -29,6 +46,11 @@ export class PolyhedronGeometry extends Geometry { detail?: number ); + /** + * @default 'PolyhedronGeometry' + */ + type: string; + parameters: { vertices: number[]; indices: number[]; diff --git a/src/geometries/RingGeometry.d.ts b/src/geometries/RingGeometry.d.ts index 057632438a467c..68e6f025627b02 100644 --- a/src/geometries/RingGeometry.d.ts +++ b/src/geometries/RingGeometry.d.ts @@ -3,6 +3,14 @@ import { BufferGeometry } from './../core/BufferGeometry'; export class RingBufferGeometry extends BufferGeometry { + /** + * @param [innerRadius=0.5] + * @param [outerRadius=1] + * @param [thetaSegments=8] + * @param [phiSegments=1] + * @param [thetaStart=0] + * @param [thetaLength=Math.PI * 2] + */ constructor( innerRadius?: number, outerRadius?: number, @@ -12,6 +20,11 @@ export class RingBufferGeometry extends BufferGeometry { thetaLength?: number ); + /** + * @default 'RingBufferGeometry' + */ + type: string; + parameters: { innerRadius: number; outerRadius: number; @@ -25,6 +38,14 @@ export class RingBufferGeometry extends BufferGeometry { export class RingGeometry extends Geometry { + /** + * @param [innerRadius=0.5] + * @param [outerRadius=1] + * @param [thetaSegments=8] + * @param [phiSegments=1] + * @param [thetaStart=0] + * @param [thetaLength=Math.PI * 2] + */ constructor( innerRadius?: number, outerRadius?: number, @@ -34,6 +55,11 @@ export class RingGeometry extends Geometry { thetaLength?: number ); + /** + * @default 'RingGeometry' + */ + type: string; + parameters: { innerRadius: number; outerRadius: number; diff --git a/src/geometries/ShapeGeometry.d.ts b/src/geometries/ShapeGeometry.d.ts index f93497922c02f0..9e4b3d9b1d9b55 100644 --- a/src/geometries/ShapeGeometry.d.ts +++ b/src/geometries/ShapeGeometry.d.ts @@ -4,14 +4,28 @@ import { BufferGeometry } from './../core/BufferGeometry'; export class ShapeBufferGeometry extends BufferGeometry { + /** + * @default 'ShapeBufferGeometry' + */ + type: string; + constructor( shapes: Shape | Shape[], curveSegments?: number ); } export class ShapeGeometry extends Geometry { + /** + * @param shapes + * @param [curveSegments=12] + */ constructor( shapes: Shape | Shape[], curveSegments?: number ); + /** + * @default 'ShapeGeometry' + */ + type: string; + addShapeList( shapes: Shape[], options: any ): ShapeGeometry; addShape( shape: Shape, options?: any ): void; diff --git a/src/geometries/SphereGeometry.d.ts b/src/geometries/SphereGeometry.d.ts index 7242a748a2b1c0..b3f7cea225ce0e 100644 --- a/src/geometries/SphereGeometry.d.ts +++ b/src/geometries/SphereGeometry.d.ts @@ -3,6 +3,17 @@ import { BufferGeometry } from './../core/BufferGeometry'; export class SphereBufferGeometry extends BufferGeometry { + /** + * The geometry is created by sweeping and calculating vertexes around the Y axis (horizontal sweep) and the Z axis (vertical sweep). Thus, incomplete spheres (akin to 'sphere slices') can be created through the use of different values of phiStart, phiLength, thetaStart and thetaLength, in order to define the points in which we start (or end) calculating those vertices. + * + * @param [radius=50] — sphere radius. Default is 50. + * @param [widthSegments=8] — number of horizontal segments. Minimum value is 3, and the default is 8. + * @param [heightSegments=6] — number of vertical segments. Minimum value is 2, and the default is 6. + * @param [phiStart=0] — specify horizontal starting angle. Default is 0. + * @param [phiLength=Math.PI * 2] — specify horizontal sweep angle size. Default is Math.PI * 2. + * @param [thetaStart=0] — specify vertical starting angle. Default is 0. + * @param [thetaLength=Math.PI * 2] — specify vertical sweep angle size. Default is Math.PI. + */ constructor( radius?: number, widthSegments?: number, @@ -13,6 +24,11 @@ export class SphereBufferGeometry extends BufferGeometry { thetaLength?: number ); + /** + * @default 'SphereBufferGeometry' + */ + type: string; + parameters: { radius: number; widthSegments: number; @@ -33,13 +49,13 @@ export class SphereGeometry extends Geometry { /** * The geometry is created by sweeping and calculating vertexes around the Y axis (horizontal sweep) and the Z axis (vertical sweep). Thus, incomplete spheres (akin to 'sphere slices') can be created through the use of different values of phiStart, phiLength, thetaStart and thetaLength, in order to define the points in which we start (or end) calculating those vertices. * - * @param radius — sphere radius. Default is 50. - * @param widthSegments — number of horizontal segments. Minimum value is 3, and the default is 8. - * @param heightSegments — number of vertical segments. Minimum value is 2, and the default is 6. - * @param phiStart — specify horizontal starting angle. Default is 0. - * @param phiLength — specify horizontal sweep angle size. Default is Math.PI * 2. - * @param thetaStart — specify vertical starting angle. Default is 0. - * @param thetaLength — specify vertical sweep angle size. Default is Math.PI. + * @param [radius=50] — sphere radius. Default is 50. + * @param [widthSegments=8] — number of horizontal segments. Minimum value is 3, and the default is 8. + * @param [heightSegments=6] — number of vertical segments. Minimum value is 2, and the default is 6. + * @param [phiStart=0] — specify horizontal starting angle. Default is 0. + * @param [phiLength=Math.PI * 2] — specify horizontal sweep angle size. Default is Math.PI * 2. + * @param [thetaStart=0] — specify vertical starting angle. Default is 0. + * @param [thetaLength=Math.PI * 2] — specify vertical sweep angle size. Default is Math.PI. */ constructor( radius?: number, @@ -51,6 +67,11 @@ export class SphereGeometry extends Geometry { thetaLength?: number ); + /** + * @default 'SphereGeometry' + */ + type: string; + parameters: { radius: number; widthSegments: number; diff --git a/src/geometries/TetrahedronGeometry.d.ts b/src/geometries/TetrahedronGeometry.d.ts index 7b4a7cc9696776..300669eef92d77 100644 --- a/src/geometries/TetrahedronGeometry.d.ts +++ b/src/geometries/TetrahedronGeometry.d.ts @@ -2,12 +2,30 @@ import { PolyhedronGeometry, PolyhedronBufferGeometry } from './PolyhedronGeomet export class TetrahedronBufferGeometry extends PolyhedronBufferGeometry { + /** + * @param [radius=1] + * @param [detail=0] + */ constructor( radius?: number, detail?: number ); + /** + * @default 'TetrahedronBufferGeometry' + */ + type: string; + } export class TetrahedronGeometry extends PolyhedronGeometry { + /** + * @param [radius=1] + * @param [detail=0] + */ constructor( radius?: number, detail?: number ); + /** + * @default 'TetrahedronGeometry' + */ + type: string; + } diff --git a/src/geometries/TextGeometry.d.ts b/src/geometries/TextGeometry.d.ts index 291512550d86fb..f2a5588c56488f 100644 --- a/src/geometries/TextGeometry.d.ts +++ b/src/geometries/TextGeometry.d.ts @@ -15,6 +15,11 @@ export interface TextGeometryParameters { export class TextBufferGeometry extends ExtrudeBufferGeometry { + /** + * @default 'TextBufferGeometry' + */ + type: string; + constructor( text: string, parameters: TextGeometryParameters ); parameters: { @@ -35,13 +40,30 @@ export class TextGeometry extends ExtrudeGeometry { constructor( text: string, parameters: TextGeometryParameters ); + /** + * @default 'TextGeometry' + */ + type: string; + parameters: { font: Font; size: number; + /** + * @default 50 + */ height: number; curveSegments: number; + /** + * @default false + */ bevelEnabled: boolean; + /** + * @default 10 + */ bevelThickness: number; + /** + * @default 8 + */ bevelSize: number; bevelOffset: number; bevelSegments: number; diff --git a/src/geometries/TorusGeometry.d.ts b/src/geometries/TorusGeometry.d.ts index c05a13380bfa57..9de9ec7b8f0cbc 100644 --- a/src/geometries/TorusGeometry.d.ts +++ b/src/geometries/TorusGeometry.d.ts @@ -3,6 +3,13 @@ import { BufferGeometry } from './../core/BufferGeometry'; export class TorusBufferGeometry extends BufferGeometry { + /** + * @param [radius=1] + * @param [tube=0.4] + * @param [radialSegments=8] + * @param [tubularSegments=6] + * @param [arc=Math.PI * 2] + */ constructor( radius?: number, tube?: number, @@ -11,6 +18,11 @@ export class TorusBufferGeometry extends BufferGeometry { arc?: number ); + /** + * @default 'TorusBufferGeometry' + */ + type: string; + parameters: { radius: number; tube: number; @@ -23,6 +35,13 @@ export class TorusBufferGeometry extends BufferGeometry { export class TorusGeometry extends Geometry { + /** + * @param [radius=1] + * @param [tube=0.4] + * @param [radialSegments=8] + * @param [tubularSegments=6] + * @param [arc=Math.PI * 2] + */ constructor( radius?: number, tube?: number, @@ -31,6 +50,11 @@ export class TorusGeometry extends Geometry { arc?: number ); + /** + * @default 'TorusGeometry' + */ + type: string; + parameters: { radius: number; tube: number; diff --git a/src/geometries/TorusKnotGeometry.d.ts b/src/geometries/TorusKnotGeometry.d.ts index dca6e3f1a1a981..a17a6d31d63d1d 100644 --- a/src/geometries/TorusKnotGeometry.d.ts +++ b/src/geometries/TorusKnotGeometry.d.ts @@ -3,6 +3,14 @@ import { BufferGeometry } from './../core/BufferGeometry'; export class TorusKnotBufferGeometry extends BufferGeometry { + /** + * @param [radius=1] + * @param [tube=0.4] + * @param [radialSegments=64] + * @param [tubularSegments=8] + * @param [p=2] + * @param [q=3] + */ constructor( radius?: number, tube?: number, @@ -12,6 +20,11 @@ export class TorusKnotBufferGeometry extends BufferGeometry { q?: number ); + /** + * @default 'TorusKnotBufferGeometry' + */ + type: string; + parameters: { radius: number; tube: number; @@ -25,6 +38,14 @@ export class TorusKnotBufferGeometry extends BufferGeometry { export class TorusKnotGeometry extends Geometry { + /** + * @param [radius=1] + * @param [tube=0.4] + * @param [radialSegments=64] + * @param [tubularSegments=8] + * @param [p=2] + * @param [q=3] + */ constructor( radius?: number, tube?: number, @@ -34,6 +55,11 @@ export class TorusKnotGeometry extends Geometry { q?: number ); + /** + * @default 'TorusKnotGeometry' + */ + type: string; + parameters: { radius: number; tube: number; diff --git a/src/geometries/TubeGeometry.d.ts b/src/geometries/TubeGeometry.d.ts index 2420bb587f1e1a..35085d9a8e3f14 100644 --- a/src/geometries/TubeGeometry.d.ts +++ b/src/geometries/TubeGeometry.d.ts @@ -5,6 +5,13 @@ import { BufferGeometry } from './../core/BufferGeometry'; export class TubeBufferGeometry extends BufferGeometry { + /** + * @param path + * @param [tubularSegments=64] + * @param [radius=1] + * @param [radiusSegments=8] + * @param [closed=false] + */ constructor( path: Curve, tubularSegments?: number, @@ -28,6 +35,13 @@ export class TubeBufferGeometry extends BufferGeometry { export class TubeGeometry extends Geometry { + /** + * @param path + * @param [tubularSegments=64] + * @param [radius=1] + * @param [radiusSegments=8] + * @param [closed=false] + */ constructor( path: Curve, tubularSegments?: number, diff --git a/src/geometries/WireframeGeometry.d.ts b/src/geometries/WireframeGeometry.d.ts index f92dd305ec72d1..cd499e21cb615c 100644 --- a/src/geometries/WireframeGeometry.d.ts +++ b/src/geometries/WireframeGeometry.d.ts @@ -5,4 +5,9 @@ export class WireframeGeometry extends BufferGeometry { constructor( geometry: Geometry | BufferGeometry ); + /** + * @default 'WireframeGeometry' + */ + type: string; + } diff --git a/src/helpers/ArrowHelper.d.ts b/src/helpers/ArrowHelper.d.ts index 8e23420d14a803..8cb9dcf284529a 100644 --- a/src/helpers/ArrowHelper.d.ts +++ b/src/helpers/ArrowHelper.d.ts @@ -8,6 +8,14 @@ import { Object3D } from './../core/Object3D'; export class ArrowHelper extends Object3D { + /** + * @param [dir=new THREE.Vector3( 0, 0, 1 )] + * @param [origin=new THREE.Vector3( 0, 0, 0 )] + * @param [length=1] + * @param [color=0xffff00] + * @param headLength + * @param headWidth + */ constructor( dir: Vector3, origin?: Vector3, @@ -17,6 +25,11 @@ export class ArrowHelper extends Object3D { headWidth?: number ); + /** + * @default 'ArrowHelper' + */ + type: string; + line: Line; cone: Mesh; diff --git a/src/helpers/AxesHelper.d.ts b/src/helpers/AxesHelper.d.ts index e41d6cdcfb36de..1d38ac3514b791 100644 --- a/src/helpers/AxesHelper.d.ts +++ b/src/helpers/AxesHelper.d.ts @@ -2,6 +2,14 @@ import { LineSegments } from './../objects/LineSegments'; export class AxesHelper extends LineSegments { + /** + * @param [size=1] + */ constructor( size?: number ); + /** + * @default 'AxesHelper' + */ + type: string; + } diff --git a/src/helpers/Box3Helper.d.ts b/src/helpers/Box3Helper.d.ts index b58c8d51a8fc81..be3de578338341 100644 --- a/src/helpers/Box3Helper.d.ts +++ b/src/helpers/Box3Helper.d.ts @@ -4,8 +4,17 @@ import { LineSegments } from './../objects/LineSegments'; export class Box3Helper extends LineSegments { + /** + * @param box + * @param [color=0xffff00] + */ constructor( box: Box3, color?: Color ); + /** + * @default 'Box3Helper' + */ + type: string; + box: Box3; } diff --git a/src/helpers/BoxHelper.d.ts b/src/helpers/BoxHelper.d.ts index 5497ed615d4bc2..6c5b6d8657aa1f 100644 --- a/src/helpers/BoxHelper.d.ts +++ b/src/helpers/BoxHelper.d.ts @@ -4,8 +4,17 @@ import { LineSegments } from './../objects/LineSegments'; export class BoxHelper extends LineSegments { + /** + * @param object + * @param [color=0xffff00] + */ constructor( object: Object3D, color?: Color | string | number ); + /** + * @default 'BoxHelper' + */ + type: string; + update( object?: Object3D ): void; setFromObject( object: Object3D ): this; diff --git a/src/helpers/CameraHelper.d.ts b/src/helpers/CameraHelper.d.ts index dc1ec11278a98b..b6477d5ba21fb6 100644 --- a/src/helpers/CameraHelper.d.ts +++ b/src/helpers/CameraHelper.d.ts @@ -8,6 +8,11 @@ export class CameraHelper extends LineSegments { camera: Camera; pointMap: { [id: string]: number[] }; + /** + * @default 'CameraHelper' + */ + type: string; + update(): void; } diff --git a/src/helpers/DirectionalLightHelper.d.ts b/src/helpers/DirectionalLightHelper.d.ts index 3a778f2b246b81..32bd590483d295 100644 --- a/src/helpers/DirectionalLightHelper.d.ts +++ b/src/helpers/DirectionalLightHelper.d.ts @@ -6,6 +6,11 @@ import { Object3D } from './../core/Object3D'; export class DirectionalLightHelper extends Object3D { + /** + * @param light + * @param [size=1] + * @param color + */ constructor( light: DirectionalLight, size?: number, @@ -15,8 +20,16 @@ export class DirectionalLightHelper extends Object3D { light: DirectionalLight; lightPlane: Line; targetLine: Line; + + /** + * @default undefined + */ color: Color | string | number | undefined; matrix: Matrix4; + + /** + * @default false + */ matrixAutoUpdate: boolean; dispose(): void; diff --git a/src/helpers/GridHelper.d.ts b/src/helpers/GridHelper.d.ts index 53485692516156..1b19c098608955 100644 --- a/src/helpers/GridHelper.d.ts +++ b/src/helpers/GridHelper.d.ts @@ -3,12 +3,24 @@ import { LineSegments } from './../objects/LineSegments'; export class GridHelper extends LineSegments { + /** + * @param [size=10] + * @param [divisions=10] + * @param [color1=0x444444] + * @param [color2=0x888888] + */ constructor( - size: number, - divisions: number, + size?: number, + divisions?: number, color1?: Color | string | number, color2?: Color | string | number ); + + /** + * @default 'GridHelper' + */ + type: string; + /** * @deprecated Colors should be specified in the constructor. */ diff --git a/src/helpers/PlaneHelper.d.ts b/src/helpers/PlaneHelper.d.ts index 353e31de184b97..ab23c920361189 100644 --- a/src/helpers/PlaneHelper.d.ts +++ b/src/helpers/PlaneHelper.d.ts @@ -3,9 +3,23 @@ import { LineSegments } from './../objects/LineSegments'; export class PlaneHelper extends LineSegments { + /** + * @param plane + * @param [size=1] + * @param [hex=0xffff00] + */ constructor( plane: Plane, size?: number, hex?: number ); + /** + * @default 'PlaneHelper' + */ + type: string; + plane: Plane; + + /** + * @default 1 + */ size: number; updateMatrixWorld( force?: boolean ): void; diff --git a/src/helpers/PointLightHelper.d.ts b/src/helpers/PointLightHelper.d.ts index 44aa29efab97e1..ffd041c5bacea8 100644 --- a/src/helpers/PointLightHelper.d.ts +++ b/src/helpers/PointLightHelper.d.ts @@ -11,9 +11,18 @@ export class PointLightHelper extends Object3D { color?: Color | string | number ); + /** + * @default 'PointLightHelper' + */ + type: string; + light: PointLight; color: Color | string | number | undefined; matrix: Matrix4; + + /** + * @default false + */ matrixAutoUpdate: boolean; dispose(): void; diff --git a/src/helpers/PolarGridHelper.d.ts b/src/helpers/PolarGridHelper.d.ts index bdd253cce55765..b0d3419ad02011 100644 --- a/src/helpers/PolarGridHelper.d.ts +++ b/src/helpers/PolarGridHelper.d.ts @@ -3,6 +3,14 @@ import { Color } from '../math/Color'; export class PolarGridHelper extends LineSegments { + /** + * @param [radius=10] + * @param [radials=16] + * @param [circles=8] + * @param [divisions=64] + * @param [color1=0x444444] + * @param [color2=0x888888] + */ constructor( radius: number, radials: number, @@ -12,4 +20,9 @@ export class PolarGridHelper extends LineSegments { color2: Color | string | number | undefined ); + /** + * @default 'PolarGridHelper' + */ + type: string; + } diff --git a/src/helpers/SkeletonHelper.d.ts b/src/helpers/SkeletonHelper.d.ts index ea930e7b6b116b..e0b66221a2e031 100644 --- a/src/helpers/SkeletonHelper.d.ts +++ b/src/helpers/SkeletonHelper.d.ts @@ -1,4 +1,5 @@ import { Object3D } from './../core/Object3D'; +import { Matrix4 } from './../math/Matrix4'; import { Bone } from './../objects/Bone'; import { LineSegments } from './../objects/LineSegments'; @@ -6,11 +7,23 @@ export class SkeletonHelper extends LineSegments { constructor( object: Object3D ); + /** + * @default 'SkeletonHelper' + */ + type: string; + bones: Bone[]; root: Object3D; readonly isSkeletonHelper: true; + matrix: Matrix4; + + /** + * @default false + */ + matrixAutoUpdate: boolean; + getBoneList( object: Object3D ): Bone[]; update(): void; diff --git a/src/helpers/SpotLightHelper.d.ts b/src/helpers/SpotLightHelper.d.ts index cf371860f12a37..0df16c2dd45275 100644 --- a/src/helpers/SpotLightHelper.d.ts +++ b/src/helpers/SpotLightHelper.d.ts @@ -10,6 +10,10 @@ export class SpotLightHelper extends Object3D { light: Light; matrix: Matrix4; + + /** + * @default false + */ matrixAutoUpdate: boolean; color: Color | string | number | undefined; cone: LineSegments; diff --git a/src/lights/AmbientLight.d.ts b/src/lights/AmbientLight.d.ts index f9342659d620c3..9ac93a6dc00b5b 100644 --- a/src/lights/AmbientLight.d.ts +++ b/src/lights/AmbientLight.d.ts @@ -11,9 +11,18 @@ export class AmbientLight extends Light { /** * This creates a Ambientlight with a color. * @param color Numeric value of the RGB component of the color or a Color instance. + * @param [intensity=1] */ constructor( color?: Color | string | number, intensity?: number ); + /** + * @default 'AmbientLight' + */ + type: string; + + /** + * @default undefined + */ castShadow: boolean; readonly isAmbientLight: true; diff --git a/src/lights/DirectionalLight.d.ts b/src/lights/DirectionalLight.d.ts index de7bf653c86b96..cd06784f7bb9e5 100644 --- a/src/lights/DirectionalLight.d.ts +++ b/src/lights/DirectionalLight.d.ts @@ -2,6 +2,7 @@ import { Color } from './../math/Color'; import { Object3D } from './../core/Object3D'; import { DirectionalLightShadow } from './DirectionalLightShadow'; import { Light } from './Light'; +import { Vector3 } from '../math/Vector3'; /** * @example @@ -16,17 +17,31 @@ export class DirectionalLight extends Light { constructor( color?: Color | string | number, intensity?: number ); + /** + * @default 'DirectionalLight' + */ + type: string; + + /** + * @default THREE.Object3D.DefaultUp + */ + position: Vector3; + /** * Target used for shadow camera orientation. + * @default new THREE.Object3D() */ target: Object3D; /** * Light's intensity. - * Default — 1.0. + * @default 1 */ intensity: number; + /** + * @default new THREE.DirectionalLightShadow() + */ shadow: DirectionalLightShadow; readonly isDirectionalLight: true; diff --git a/src/lights/HemisphereLight.d.ts b/src/lights/HemisphereLight.d.ts index c8fc3d60976d43..9ae3dd78d6b277 100644 --- a/src/lights/HemisphereLight.d.ts +++ b/src/lights/HemisphereLight.d.ts @@ -1,17 +1,37 @@ import { Color } from './../math/Color'; +import { Vector3 } from '../math/Vector3'; import { Light } from './Light'; export class HemisphereLight extends Light { + /** + * @param skyColor + * @param groundColor + * @param [intensity=1] + */ constructor( skyColor?: Color | string | number, groundColor?: Color | string | number, intensity?: number ); - skyColor: Color; + /** + * @default 'HemisphereLight' + */ + type: string; + + /** + * @default THREE.Object3D.DefaultUp + */ + position: Vector3; + + /** + * @default undefined + */ + castShadow: boolean; + groundColor: Color; - intensity: number; + readonly isHemisphereLight: true; } diff --git a/src/lights/Light.d.ts b/src/lights/Light.d.ts index c729436657d080..5e8ae63849a4d5 100644 --- a/src/lights/Light.d.ts +++ b/src/lights/Light.d.ts @@ -11,9 +11,22 @@ export class Light extends Object3D { constructor( hex?: number | string, intensity?: number ); + /** + * @default 'Light' + */ + type: string; + color: Color; + + /** + * @default 1 + */ intensity: number; readonly isLight: true; + + /** + * @default undefined + */ receiveShadow: boolean; shadow: LightShadow; /** diff --git a/src/lights/LightProbe.d.ts b/src/lights/LightProbe.d.ts index 6a68fd3439f975..4d8328547da11c 100644 --- a/src/lights/LightProbe.d.ts +++ b/src/lights/LightProbe.d.ts @@ -5,7 +5,16 @@ export class LightProbe extends Light { constructor( sh?: SphericalHarmonics3, intensity?: number ); + /** + * @default 'LightProbe' + */ + type: string; + readonly isLightProbe: true; + + /** + * @default new THREE.SphericalHarmonics3() + */ sh: SphericalHarmonics3; fromJSON( json: object ): LightProbe; diff --git a/src/lights/LightShadow.d.ts b/src/lights/LightShadow.d.ts index 5390d57ee60524..030554bd92fb89 100644 --- a/src/lights/LightShadow.d.ts +++ b/src/lights/LightShadow.d.ts @@ -10,14 +10,50 @@ export class LightShadow { constructor( camera: Camera ); camera: Camera; + + /** + * @default 0 + */ bias: number; + + /** + * @default 0 + */ normalBias: number; + + /** + * @default 1 + */ radius: number; + + /** + * @default new THREE.Vector2( 512, 512 ) + */ mapSize: Vector2; + + /** + * @default null + */ map: RenderTarget; + + /** + * @default null + */ mapPass: RenderTarget; + + /** + * @default new THREE.Matrix4() + */ matrix: Matrix4; + + /** + * @default true + */ autoUpdate: boolean; + + /** + * @default false + */ needsUpdate: boolean; copy( source: LightShadow ): this; diff --git a/src/lights/PointLight.d.ts b/src/lights/PointLight.d.ts index f73fcf2091a780..a8b7b9c0837182 100644 --- a/src/lights/PointLight.d.ts +++ b/src/lights/PointLight.d.ts @@ -17,20 +17,33 @@ export class PointLight extends Light { decay?: number ); - /* + /** + * @default 'PointLight' + */ + type: string; + + /** * Light's intensity. - * Default - 1.0. + * @default 1 */ intensity: number; /** * If non-zero, light will attenuate linearly from maximum intensity at light position down to zero at distance. - * Default - 0.0. + * @default 0 */ distance: number; + /** + * @default 1 + */ decay: number; + + /** + * @default new THREE.PointLightShadow() + */ shadow: PointLightShadow; + power: number; } diff --git a/src/lights/RectAreaLight.d.ts b/src/lights/RectAreaLight.d.ts index d9400b7781e451..7acc561e3cf54d 100644 --- a/src/lights/RectAreaLight.d.ts +++ b/src/lights/RectAreaLight.d.ts @@ -10,10 +10,26 @@ export class RectAreaLight extends Light { height?: number ); + /** + * @default 'RectAreaLight' + */ type: string; + + /** + * @default 10 + */ width: number; + + /** + * @default 10 + */ height: number; + + /** + * @default 1 + */ intensity: number; + readonly isRectAreaLight: true; } diff --git a/src/lights/SpotLight.d.ts b/src/lights/SpotLight.d.ts index 6037bf6cd54ad1..5a52dbf7da521b 100644 --- a/src/lights/SpotLight.d.ts +++ b/src/lights/SpotLight.d.ts @@ -1,4 +1,5 @@ import { Color } from './../math/Color'; +import { Vector3 } from '../math/Vector3'; import { Object3D } from './../core/Object3D'; import { SpotLightShadow } from './SpotLightShadow'; import { Light } from './Light'; @@ -17,34 +18,56 @@ export class SpotLight extends Light { decay?: number ); + /** + * @default 'SpotLight' + */ + type: string; + + /** + * @default THREE.Object3D.DefaultUp + */ + position: Vector3; + /** * Spotlight focus points at target.position. - * Default position — (0,0,0). + * @default new THREE.Object3D() */ target: Object3D; /** * Light's intensity. - * Default — 1.0. + * @default 1 */ intensity: number; /** * If non-zero, light will attenuate linearly from maximum intensity at light position down to zero at distance. - * Default — 0.0. + * @default 0 */ distance: number; - /* + /** * Maximum extent of the spotlight, in radians, from its direction. - * Default — Math.PI/2. + * @default Math.PI / 3. */ angle: number; + /** + * @default 1 + */ decay: number; + + /** + * @default new THREE.SpotLightShadow() + */ shadow: SpotLightShadow; power: number; + + /** + * @default 0 + */ penumbra: number; + readonly isSpotLight: true; } diff --git a/src/loaders/Cache.d.ts b/src/loaders/Cache.d.ts index a658f7a9997042..cf188ba5cddd16 100644 --- a/src/loaders/Cache.d.ts +++ b/src/loaders/Cache.d.ts @@ -1,5 +1,12 @@ export namespace Cache { + /** + * @default false + */ export let enabled: boolean; + + /** + * @default {} + */ export let files: any; export function add( key: string, file: any ): void; diff --git a/src/loaders/ImageBitmapLoader.d.ts b/src/loaders/ImageBitmapLoader.d.ts index f06491954727a5..48420a7bcc1c41 100644 --- a/src/loaders/ImageBitmapLoader.d.ts +++ b/src/loaders/ImageBitmapLoader.d.ts @@ -5,6 +5,9 @@ export class ImageBitmapLoader extends Loader { constructor( manager?: LoadingManager ); + /** + * @default { premultiplyAlpha: 'none' } + */ options: undefined | object; readonly isImageBitmapLoader: true; diff --git a/src/loaders/Loader.d.ts b/src/loaders/Loader.d.ts index fefe671e798f94..9ed12507c27a95 100644 --- a/src/loaders/Loader.d.ts +++ b/src/loaders/Loader.d.ts @@ -7,10 +7,25 @@ export class Loader { constructor( manager?: LoadingManager ); + /** + * @default 'anonymous' + */ crossOrigin: string; + + /** + * @default '' + */ path: string; + + /** + * @default '' + */ resourcePath: string; manager: LoadingManager; + + /** + * @default {} + */ requestHeader: { [header: string]: string }; /* diff --git a/src/loaders/MaterialLoader.d.ts b/src/loaders/MaterialLoader.d.ts index bf9b5d9c22d6a2..4ad016b26da674 100644 --- a/src/loaders/MaterialLoader.d.ts +++ b/src/loaders/MaterialLoader.d.ts @@ -7,6 +7,9 @@ export class MaterialLoader extends Loader { constructor( manager?: LoadingManager ); + /** + * @default {} + */ textures: { [key: string]: Texture }; load( diff --git a/src/materials/LineBasicMaterial.d.ts b/src/materials/LineBasicMaterial.d.ts index 6a956eca1eb0a7..724cdc82279adc 100644 --- a/src/materials/LineBasicMaterial.d.ts +++ b/src/materials/LineBasicMaterial.d.ts @@ -13,10 +13,34 @@ export class LineBasicMaterial extends Material { constructor( parameters?: LineBasicMaterialParameters ); - color: Color; + /** + * @default 'LineBasicMaterial' + */ + type: string; + + /** + * @default 0xffffff + */ + color: Color | string | number; + + /** + * @default 1 + */ linewidth: number; + + /** + * @default 'round' + */ linecap: string; + + /** + * @default 'round' + */ linejoin: string; + + /** + * @default false + */ morphTargets: boolean; setValues( parameters: LineBasicMaterialParameters ): void; diff --git a/src/materials/LineDashedMaterial.d.ts b/src/materials/LineDashedMaterial.d.ts index d551f7179bfb32..4680073f2e16c6 100644 --- a/src/materials/LineDashedMaterial.d.ts +++ b/src/materials/LineDashedMaterial.d.ts @@ -10,8 +10,24 @@ export class LineDashedMaterial extends LineBasicMaterial { constructor( parameters?: LineDashedMaterialParameters ); + /** + * @default 'LineDashedMaterial' + */ + type: string; + + /** + * @default 1 + */ scale: number; + + /** + * @default 1 + */ dashSize: number; + + /** + * @default 1 + */ gapSize: number; readonly isLineDashedMaterial: true; diff --git a/src/materials/Material.d.ts b/src/materials/Material.d.ts index b41eed3abe9e2a..35fa88c14b1374 100644 --- a/src/materials/Material.d.ts +++ b/src/materials/Material.d.ts @@ -67,88 +67,105 @@ export class Material extends EventDispatcher { /** * Sets the alpha value to be used when running an alpha test. Default is 0. + * @default 0 */ alphaTest: number; /** * Blending destination. It's one of the blending mode constants defined in Three.js. Default is {@link OneMinusSrcAlphaFactor}. + * @default THREE.OneMinusSrcAlphaFactor */ blendDst: BlendingDstFactor; /** * The tranparency of the .blendDst. Default is null. + * @default null */ blendDstAlpha: number | null; /** * Blending equation to use when applying blending. It's one of the constants defined in Three.js. Default is {@link AddEquation}. + * @default THREE.AddEquation */ blendEquation: BlendingEquation; /** * The tranparency of the .blendEquation. Default is null. + * @default null */ blendEquationAlpha: number | null; /** * Which blending to use when displaying objects with this material. Default is {@link NormalBlending}. + * @default THREE.NormalBlending */ blending: Blending; /** * Blending source. It's one of the blending mode constants defined in Three.js. Default is {@link SrcAlphaFactor}. + * @default THREE.SrcAlphaFactor */ blendSrc: BlendingSrcFactor | BlendingDstFactor; /** * The tranparency of the .blendSrc. Default is null. + * @default null */ blendSrcAlpha: number | null; /** * Changes the behavior of clipping planes so that only their intersection is clipped, rather than their union. Default is false. + * @default false */ clipIntersection: boolean; /** * User-defined clipping planes specified as THREE.Plane objects in world space. These planes apply to the objects this material is attached to. Points in space whose signed distance to the plane is negative are clipped (not rendered). See the WebGL / clipping /intersection example. Default is null. + * @default null */ clippingPlanes: any; /** * Defines whether to clip shadows according to the clipping planes specified on this material. Default is false. + * @default false */ clipShadows: boolean; /** * Whether to render the material's color. This can be used in conjunction with a mesh's .renderOrder property to create invisible objects that occlude other objects. Default is true. + * @default true */ colorWrite: boolean; /** * Custom defines to be injected into the shader. These are passed in form of an object literal, with key/value pairs. { MY_CUSTOM_DEFINE: '' , PI2: Math.PI * 2 }. * The pairs are defined in both vertex and fragment shaders. Default is undefined. + * @default undefined */ - defines: any; + defines: { [key: string]: any }; /** * Which depth function to use. Default is {@link LessEqualDepth}. See the depth mode constants for all possible values. + * @default THREE.LessEqualDepth */ depthFunc: DepthModes; /** * Whether to have depth test enabled when rendering this material. Default is true. + * @default true */ depthTest: boolean; /** * Whether rendering this material has any effect on the depth buffer. Default is true. * When drawing 2D overlays it can be useful to disable the depth writing in order to layer several things together without creating z-index artifacts. + * @default true */ depthWrite: boolean; /** * Whether the material is affected by fog. Default is true. + * @default fog */ fog: boolean; @@ -159,36 +176,43 @@ export class Material extends EventDispatcher { /** * Whether rendering this material has any effect on the stencil buffer. Default is *false*. + * @default false */ stencilWrite: boolean; /** * The stencil comparison function to use. Default is {@link AlwaysStencilFunc}. See stencil operation constants for all possible values. + * @default THREE.AlwaysStencilFunc */ stencilFunc: StencilFunc; /** * The value to use when performing stencil comparisons or stencil operations. Default is *0*. + * @default 0 */ stencilRef: number; /** * The bit mask to use when comparing against or writing to the stencil buffer. Default is *0xFF*. + * @default 0xff */ stencilMask: number; /** * Which stencil operation to perform when the comparison function returns false. Default is {@link KeepStencilOp}. See the stencil operation constants for all possible values. + * @default THREE.KeepStencilOp */ stencilFail: StencilOp; /** * Which stencil operation to perform when the comparison function returns true but the depth test fails. Default is {@link KeepStencilOp}. See the stencil operation constants for all possible values. + * @default THREE.KeepStencilOp */ stencilZFail: StencilOp; /** * Which stencil operation to perform when the comparison function returns true and the depth test passes. Default is {@link KeepStencilOp}. See the stencil operation constants for all possible values. + * @default THREE.KeepStencilOp */ stencilZPass: StencilOp; @@ -200,70 +224,83 @@ export class Material extends EventDispatcher { /** * Material name. Default is an empty string. + * @default '' */ name: string; /** * Specifies that the material needs to be updated, WebGL wise. Set it to true if you made changes that need to be reflected in WebGL. * This property is automatically set to true when instancing a new material. + * @default false */ needsUpdate: boolean; /** * Opacity. Default is 1. + * @default 1 */ opacity: number; /** * Whether to use polygon offset. Default is false. This corresponds to the POLYGON_OFFSET_FILL WebGL feature. + * @default false */ polygonOffset: boolean; /** * Sets the polygon offset factor. Default is 0. + * @default 0 */ polygonOffsetFactor: number; /** * Sets the polygon offset units. Default is 0. + * @default 0 */ polygonOffsetUnits: number; /** * Override the renderer's default precision for this material. Can be "highp", "mediump" or "lowp". Defaults is null. + * @default null */ precision: 'highp' | 'mediump' | 'lowp' | null; /** * Whether to premultiply the alpha (transparency) value. See WebGL / Materials / Transparency for an example of the difference. Default is false. + * @default false */ premultipliedAlpha: boolean; /** * Whether to apply dithering to the color to remove the appearance of banding. Default is false. + * @default false */ dithering: boolean; /** * Define whether the material is rendered with flat shading. Default is false. + * @default false */ flatShading: boolean; /** * Defines which of the face sides will be rendered - front, back or both. * Default is THREE.FrontSide. Other options are THREE.BackSide and THREE.DoubleSide. + * @default THREE.FrontSide */ side: Side; /** * Defines which of the face sides will cast shadows. Default is *null*. * If *null*, the value is opposite that of side, above. + * @default null */ shadowSide: Side; /** * Defines whether this material is tone mapped according to the renderer's toneMapping setting. * Default is true. + * @default true */ toneMapped: boolean; @@ -271,11 +308,13 @@ export class Material extends EventDispatcher { * Defines whether this material is transparent. This has an effect on rendering as transparent objects need special treatment and are rendered after non-transparent objects. * When set to true, the extent to which the material is transparent is controlled by setting it's .opacity property. * Default is false. + * @default false */ transparent: boolean; /** * Value is the string 'Material'. This shouldn't be changed, and can be used to find all objects of this type in a scene. + * @default 'Material' */ type: string; @@ -286,21 +325,25 @@ export class Material extends EventDispatcher { /** * Defines whether vertex coloring is used. Default is false. + * @default false */ vertexColors: boolean; /** * Defines whether this material is visible. Default is true. + * @default true */ visible: boolean; /** * An object that can be used to store custom data about the Material. It should not hold references to functions as these will not be cloned. + * @default {} */ userData: any; /** * This starts at 0 and counts how many times .needsUpdate is set to true. + * @default 0 */ version: number; diff --git a/src/materials/MeshBasicMaterial.d.ts b/src/materials/MeshBasicMaterial.d.ts index c7622d685e9bf1..9607f9d2289d73 100644 --- a/src/materials/MeshBasicMaterial.d.ts +++ b/src/materials/MeshBasicMaterial.d.ts @@ -29,21 +29,89 @@ export class MeshBasicMaterial extends Material { constructor( parameters?: MeshBasicMaterialParameters ); + /** + * @default 'MeshBasicMaterial' + */ + type: string; + + /** + * @default new THREE.Color( 0xffffff ) + */ color: Color; + + /** + * @default null + */ map: Texture | null; + + /** + * @default null + */ aoMap: Texture | null; + + /** + * @default 1 + */ aoMapIntensity: number; + + /** + * @default null + */ specularMap: Texture | null; + + /** + * @default null + */ alphaMap: Texture | null; + + /** + * @default null + */ envMap: Texture | null; + + /** + * @default THREE.MultiplyOperation + */ combine: Combine; + + /** + * @default 1 + */ reflectivity: number; + + /** + * @default 0.98 + */ refractionRatio: number; + + /** + * @default false + */ wireframe: boolean; + + /** + * @default 1 + */ wireframeLinewidth: number; + + /** + * @default 'round' + */ wireframeLinecap: string; + + /** + * @default 'round' + */ wireframeLinejoin: string; + + /** + * @default false + */ skinning: boolean; + + /** + * @default false + */ morphTargets: boolean; setValues( parameters: MeshBasicMaterialParameters ): void; diff --git a/src/materials/MeshDepthMaterial.d.ts b/src/materials/MeshDepthMaterial.d.ts index 8f2e13a7c65219..c51eae700f877e 100644 --- a/src/materials/MeshDepthMaterial.d.ts +++ b/src/materials/MeshDepthMaterial.d.ts @@ -17,15 +17,56 @@ export class MeshDepthMaterial extends Material { constructor( parameters?: MeshDepthMaterialParameters ); + /** + * @default 'MeshDepthMaterial' + */ + type: string; + + /** + * @default null + */ map: Texture | null; + + /** + * @default null + */ alphaMap: Texture | null; + + /** + * @default THREE.BasicDepthPacking + */ depthPacking: DepthPackingStrategies; + + /** + * @default null + */ displacementMap: Texture | null; + + /** + * @default 1 + */ displacementScale: number; + + /** + * @default 0 + */ displacementBias: number; + + /** + * @default false + */ wireframe: boolean; + + /** + * @default 1 + */ wireframeLinewidth: number; + /** + * @default false + */ + fog: boolean; + setValues( parameters: MeshDepthMaterialParameters ): void; } diff --git a/src/materials/MeshDistanceMaterial.d.ts b/src/materials/MeshDistanceMaterial.d.ts index 2331da2456292f..d57122178ddbd1 100644 --- a/src/materials/MeshDistanceMaterial.d.ts +++ b/src/materials/MeshDistanceMaterial.d.ts @@ -17,15 +17,66 @@ export class MeshDistanceMaterial extends Material { constructor( parameters?: MeshDistanceMaterialParameters ); + /** + * @default 'MeshDistanceMaterial' + */ + type: string; + + /** + * @default null + */ map: Texture | null; + + /** + * @default null + */ alphaMap: Texture | null; + + /** + * @default null + */ displacementMap: Texture | null; + + /** + * @default 1 + */ displacementScale: number; + + /** + * @default 0 + */ displacementBias: number; + + /** + * @default 1000 + */ farDistance: number; + + /** + * @default 1 + */ nearDistance: number; + + /** + * @default new THREE.Vector3() + */ referencePosition: Vector3; + /** + * @default false + */ + skinning: boolean; + + /** + * @default false + */ + morphTargets: boolean; + + /** + * @default false + */ + fog: boolean; + setValues( parameters: MeshDistanceMaterialParameters ): void; } diff --git a/src/materials/MeshLambertMaterial.d.ts b/src/materials/MeshLambertMaterial.d.ts index 81a1d7bec7e7c0..9f1fecd9ed6fbd 100644 --- a/src/materials/MeshLambertMaterial.d.ts +++ b/src/materials/MeshLambertMaterial.d.ts @@ -32,27 +32,119 @@ export class MeshLambertMaterial extends Material { constructor( parameters?: MeshLambertMaterialParameters ); + /** + * @default 'MeshLambertMaterial' + */ + type: string; + + /** + * @default new THREE.Color( 0xffffff ) + */ color: Color; + + /** + * @default new THREE.Color( 0x000000 ) + */ emissive: Color; + + /** + * @default 1 + */ emissiveIntensity: number; + + /** + * @default null + */ emissiveMap: Texture | null; + + /** + * @default null + */ map: Texture | null; + + /** + * @default null + */ lightMap: Texture | null; + + /** + * @default 1 + */ lightMapIntensity: number; + + /** + * @default null + */ aoMap: Texture | null; + + /** + * @default 1 + */ aoMapIntensity: number; + + /** + * @default null + */ specularMap: Texture | null; + + /** + * @default null + */ alphaMap: Texture | null; + + /** + * @default null + */ envMap: Texture | null; + + /** + * @default THREE.MultiplyOperation + */ combine: Combine; + + /** + * @default 1 + */ reflectivity: number; + + /** + * @default 0.98 + */ refractionRatio: number; + + /** + * @default false + */ wireframe: boolean; + + /** + * @default 1 + */ wireframeLinewidth: number; + + /** + * @default 'round' + */ wireframeLinecap: string; + + /** + * @default 'round' + */ wireframeLinejoin: string; + + /** + * @default false + */ skinning: boolean; + + /** + * @default false + */ morphTargets: boolean; + + /** + * @default false + */ morphNormals: boolean; setValues( parameters: MeshLambertMaterialParameters ): void; diff --git a/src/materials/MeshMatcapMaterial.d.ts b/src/materials/MeshMatcapMaterial.d.ts index 52e77e9952dc21..f4d85cd765e325 100644 --- a/src/materials/MeshMatcapMaterial.d.ts +++ b/src/materials/MeshMatcapMaterial.d.ts @@ -27,20 +27,89 @@ export class MeshMatcapMaterial extends Material { constructor( parameters?: MeshMatcapMaterialParameters ); + /** + * @default 'MeshMatcapMaterial' + */ + type: string; + + /** + * @default { 'MATCAP': '' } + */ + defines: { [key: string]: any }; + + /** + * @default new THREE.Color( 0xffffff ) + */ color: Color; + + /** + * @default null + */ matcap: Texture | null; + + /** + * @default null + */ map: Texture | null; + + /** + * @default null + */ bumpMap: Texture | null; + + /** + * @default 1 + */ bumpScale: number; + + /** + * @default null + */ normalMap: Texture | null; + + /** + * @default THREE.TangentSpaceNormalMap + */ normalMapType: NormalMapTypes; + + /** + * @default new Vector2( 1, 1 ) + */ normalScale: Vector2; + + /** + * @default null + */ displacementMap: Texture | null; + + /** + * @default 1 + */ displacementScale: number; + + /** + * @default 0 + */ displacementBias: number; + + /** + * @default null + */ alphaMap: Texture | null; + + /** + * @default false + */ skinning: boolean; + + /** + * @default false + */ morphTargets: boolean; + + /** + * @default false + */ morphNormals: boolean; setValues( parameters: MeshMatcapMaterialParameters ): void; diff --git a/src/materials/MeshNormalMaterial.d.ts b/src/materials/MeshNormalMaterial.d.ts index d7f71d1b7d1b04..cc811061375897 100644 --- a/src/materials/MeshNormalMaterial.d.ts +++ b/src/materials/MeshNormalMaterial.d.ts @@ -24,18 +24,74 @@ export class MeshNormalMaterial extends Material { constructor( parameters?: MeshNormalMaterialParameters ); + /** + * @default 'MeshNormalMaterial' + */ + type: string; + + /** + * @default null + */ bumpMap: Texture | null; + + /** + * @default 1 + */ bumpScale: number; + + /** + * @default null + */ normalMap: Texture | null; + + /** + * @default THREE.TangentSpaceNormalMap + */ normalMapType: NormalMapTypes; + + /** + * @default new THREE.Vector2( 1, 1 ) + */ normalScale: Vector2; + + /** + * @default null + */ displacementMap: Texture | null; + + /** + * @default 1 + */ displacementScale: number; + + /** + * @default 0 + */ displacementBias: number; + + /** + * @default false + */ wireframe: boolean; + + /** + * @default 1 + */ wireframeLinewidth: number; + + /** + * @default false + */ skinning: boolean; + + /** + * @default false + */ morphTargets: boolean; + + /** + * @default false + */ morphNormals: boolean; setValues( parameters: MeshNormalMaterialParameters ): void; diff --git a/src/materials/MeshPhongMaterial.d.ts b/src/materials/MeshPhongMaterial.d.ts index f77ba9e4788dc0..5177f01527dd2e 100644 --- a/src/materials/MeshPhongMaterial.d.ts +++ b/src/materials/MeshPhongMaterial.d.ts @@ -45,37 +45,169 @@ export class MeshPhongMaterial extends Material { constructor( parameters?: MeshPhongMaterialParameters ); + /** + * @default 'MeshNormalMaterial' + */ + type: string; + + /** + * @default new THREE.Color( 0xffffff ) + */ color: Color; + + /** + * @default new THREE.Color( 0x111111 ) + */ specular: Color; + + /** + * @default 30 + */ shininess: number; + + /** + * @default null + */ map: Texture | null; + + /** + * @default null + */ lightMap: Texture | null; + + /** + * @default null + */ lightMapIntensity: number; + + /** + * @default null + */ aoMap: Texture | null; + + /** + * @default null + */ aoMapIntensity: number; + + /** + * @default new THREE.Color( 0x000000 ) + */ emissive: Color; + + /** + * @default 1 + */ emissiveIntensity: number; + + /** + * @default null + */ emissiveMap: Texture | null; + + /** + * @default null + */ bumpMap: Texture | null; + + /** + * @default 1 + */ bumpScale: number; + + /** + * @default null + */ normalMap: Texture | null; + + /** + * @default THREE.TangentSpaceNormalMap + */ normalMapType: NormalMapTypes; + + /** + * @default new Vector2( 1, 1 ) + */ normalScale: Vector2; + + /** + * @default null + */ displacementMap: Texture | null; + + /** + * @default 1 + */ displacementScale: number; + + /** + * @default 0 + */ displacementBias: number; + + /** + * @default null + */ specularMap: Texture | null; + + /** + * @default null + */ alphaMap: Texture | null; + + /** + * @default null + */ envMap: Texture | null; + + /** + * @default THREE.MultiplyOperation + */ combine: Combine; + + /** + * @default 1 + */ reflectivity: number; + + /** + * @default 0.98 + */ refractionRatio: number; + + /** + * @default false + */ wireframe: boolean; + + /** + * @default 1 + */ wireframeLinewidth: number; + + /** + * @default 'round' + */ wireframeLinecap: string; + + /** + * @default 'round' + */ wireframeLinejoin: string; + + /** + * @default false + */ skinning: boolean; + + /** + * @default false + */ morphTargets: boolean; + + /** + * @default false + */ morphNormals: boolean; /** * @deprecated Use {@link MeshStandardMaterial THREE.MeshStandardMaterial} instead. diff --git a/src/materials/MeshPhysicalMaterial.d.ts b/src/materials/MeshPhysicalMaterial.d.ts index a85f1c8c71f4d9..fa48d32cf6fe37 100644 --- a/src/materials/MeshPhysicalMaterial.d.ts +++ b/src/materials/MeshPhysicalMaterial.d.ts @@ -29,18 +29,64 @@ export class MeshPhysicalMaterial extends MeshStandardMaterial { constructor( parameters: MeshPhysicalMaterialParameters ); + /** + * @default 'MeshPhysicalMaterial' + */ + type: string; + + /** + * @default { 'STANDARD': '', 'PHYSICAL': '' } + */ + defines: { [key: string]: any }; + + /** + * @default 0 + */ clearcoat: number; + + /** + * @default null + */ clearcoatMap: Texture | null; + + /** + * @default 0 + */ clearcoatRoughness: number; + + /** + * @default null + */ clearcoatRoughnessMap: Texture | null; + + /** + * @default new THREE.Vector2( 1, 1 ) + */ clearcoatNormalScale: Vector2; + + /** + * @default null + */ clearcoatNormalMap: Texture | null; + /** + * @default 0.5 + */ reflectivity: number; + /** + * @default null + */ sheen: Color | null; + /** + * @default 0 + */ transmission: number; + + /** + * @default null + */ transmissionMap: Texture | null; } diff --git a/src/materials/MeshStandardMaterial.d.ts b/src/materials/MeshStandardMaterial.d.ts index 401424b88867cb..ac08987343c5e9 100644 --- a/src/materials/MeshStandardMaterial.d.ts +++ b/src/materials/MeshStandardMaterial.d.ts @@ -42,36 +42,179 @@ export class MeshStandardMaterial extends Material { constructor( parameters?: MeshStandardMaterialParameters ); + /** + * @default 'MeshStandardMaterial' + */ + type: string; + + /** + * @default { 'STANDARD': '' } + */ + defines: { [key: string]: any }; + + /** + * @default new THREE.Color( 0xffffff ) + */ color: Color; + + /** + * @default 1 + */ roughness: number; + + /** + * @default 0 + */ metalness: number; + + /** + * @default null + */ map: Texture | null; + + /** + * @default null + */ lightMap: Texture | null; + + /** + * @default 1 + */ lightMapIntensity: number; + + /** + * @default null + */ aoMap: Texture | null; + + /** + * @default 1 + */ aoMapIntensity: number; + + /** + * @default new THREE.Color( 0x000000 ) + */ emissive: Color; + + /** + * @default 1 + */ emissiveIntensity: number; + + /** + * @default null + */ emissiveMap: Texture | null; + + /** + * @default null + */ bumpMap: Texture | null; + + /** + * @default 1 + */ bumpScale: number; + + /** + * @default null + */ normalMap: Texture | null; + + /** + * @default THREE.TangentSpaceNormalMap + */ normalMapType: NormalMapTypes; + + /** + * @default new THREE.Vector2( 1, 1 ) + */ normalScale: Vector2; + + /** + * @default null + */ displacementMap: Texture | null; + + /** + * @default 1 + */ displacementScale: number; + + /** + * @default 0 + */ displacementBias: number; + + /** + * @default null + */ roughnessMap: Texture | null; + + /** + * @default null + */ metalnessMap: Texture | null; + + /** + * @default null + */ alphaMap: Texture | null; + + /** + * @default null + */ envMap: Texture | null; + + /** + * @default 1 + */ envMapIntensity: number; + + /** + * @default 0.98 + */ refractionRatio: number; + + /** + * @default false + */ wireframe: boolean; + + /** + * @default 1 + */ wireframeLinewidth: number; + + /** + * @default 'round' + */ + wireframeLinecap: string; + + /** + * @default 'round' + */ + wireframeLinejoin: string; + + /** + * @default false + */ skinning: boolean; + + /** + * @default false + */ vertexTangents: boolean; + + /** + * @default false + */ morphTargets: boolean; + + /** + * @default false + */ morphNormals: boolean; setValues( parameters: MeshStandardMaterialParameters ): void; diff --git a/src/materials/MeshToonMaterial.d.ts b/src/materials/MeshToonMaterial.d.ts index 7f9b2ef7c53b49..60346fb37e5ae6 100644 --- a/src/materials/MeshToonMaterial.d.ts +++ b/src/materials/MeshToonMaterial.d.ts @@ -39,31 +39,144 @@ export class MeshToonMaterial extends Material { constructor( parameters?: MeshToonMaterialParameters ); + /** + * @default 'MeshToonMaterial' + */ + type: string; + + /** + * @default { 'TOON': '' } + */ + defines: { [key: string]: any }; + + /** + * @default new THREE.Color( 0xffffff ) + */ color: Color; + + /** + * @default null + */ gradientMap: Texture | null; + + /** + * @default null + */ map: Texture | null; + + /** + * @default null + */ lightMap: Texture | null; + + /** + * @default 1 + */ lightMapIntensity: number; + + /** + * @default null + */ aoMap: Texture | null; + + /** + * @default 1 + */ aoMapIntensity: number; + + /** + * @default new THREE.Color( 0x000000 ) + */ emissive: Color; + + /** + * @default 1 + */ emissiveIntensity: number; + + /** + * @default null + */ emissiveMap: Texture | null; + + /** + * @default null + */ bumpMap: Texture | null; + + /** + * @default 1 + */ bumpScale: number; + + /** + * @default null + */ normalMap: Texture | null; + + /** + * @default THREE.TangentSpaceNormalMap + */ normalMapType: NormalMapTypes; + + /** + * @default new THREE.Vector2( 1, 1 ) + */ normalScale: Vector2; + + /** + * @default null + */ displacementMap: Texture | null; + + /** + * @default 1 + */ displacementScale: number; + + /** + * @default 0 + */ displacementBias: number; + + /** + * @default null + */ alphaMap: Texture | null; + + /** + * @default false + */ wireframe: boolean; + + /** + * @default 1 + */ wireframeLinewidth: number; + + /** + * @default 'round' + */ wireframeLinecap: string; + + /** + * @default 'round' + */ wireframeLinejoin: string; + + /** + * @default false + */ skinning: boolean; + + /** + * @default false + */ morphTargets: boolean; + + /** + * @default false + */ morphNormals: boolean; setValues( parameters: MeshToonMaterialParameters ): void; diff --git a/src/materials/PointsMaterial.d.ts b/src/materials/PointsMaterial.d.ts index 9e35e0fdcbd95b..9c472939e81b01 100644 --- a/src/materials/PointsMaterial.d.ts +++ b/src/materials/PointsMaterial.d.ts @@ -15,11 +15,39 @@ export class PointsMaterial extends Material { constructor( parameters?: PointsMaterialParameters ); + /** + * @default 'PointsMaterial' + */ + type: string; + + /** + * @default new THREE.Color( 0xffffff ) + */ color: Color; + + /** + * @default null + */ map: Texture | null; + + /** + * @default null + */ alphaMap: Texture | null; + + /** + * @default 1 + */ size: number; + + /** + * @default true + */ sizeAttenuation: boolean; + + /** + * @default false + */ morphTargets: boolean; setValues( parameters: PointsMaterialParameters ): void; diff --git a/src/materials/ShaderMaterial.d.ts b/src/materials/ShaderMaterial.d.ts index 20535062629915..4353fea2ff38c0 100644 --- a/src/materials/ShaderMaterial.d.ts +++ b/src/materials/ShaderMaterial.d.ts @@ -35,29 +35,95 @@ export class ShaderMaterial extends Material { constructor( parameters?: ShaderMaterialParameters ); + /** + * @default 'ShaderMaterial' + */ + type: string; + + /** + * @default {} + */ + defines: { [key: string]: any }; + + /** + * @default {} + */ uniforms: { [uniform: string]: IUniform }; vertexShader: string; fragmentShader: string; + + /** + * @default 1 + */ linewidth: number; + + /** + * @default false + */ wireframe: boolean; + + /** + * @default 1 + */ wireframeLinewidth: number; + + /** + * @default false + */ + fog: boolean; + + /** + * @default false + */ lights: boolean; + + /** + * @default false + */ clipping: boolean; + + /** + * @default false + */ skinning: boolean; + + /** + * @default false + */ morphTargets: boolean; + + /** + * @default false + */ morphNormals: boolean; /** * @deprecated Use {@link ShaderMaterial#extensions.derivatives extensions.derivatives} instead. */ derivatives: any; + + /** + * @default { derivatives: false, fragDepth: false, drawBuffers: false, shaderTextureLOD: false } + */ extensions: { derivatives: boolean; fragDepth: boolean; drawBuffers: boolean; shaderTextureLOD: boolean; }; + + /** + * @default { 'color': [ 1, 1, 1 ], 'uv': [ 0, 0 ], 'uv2': [ 0, 0 ] } + */ defaultAttributeValues: any; + + /** + * @default undefined + */ index0AttributeName: string | undefined; + + /** + * @default false + */ uniformsNeedUpdate: boolean; setValues( parameters: ShaderMaterialParameters ): void; diff --git a/src/materials/ShadowMaterial.d.ts b/src/materials/ShadowMaterial.d.ts index 8096ba9c9c87f6..8d98680f71199a 100644 --- a/src/materials/ShadowMaterial.d.ts +++ b/src/materials/ShadowMaterial.d.ts @@ -9,6 +9,19 @@ export class ShadowMaterial extends Material { constructor( parameters?: ShadowMaterialParameters ); + /** + * @default 'ShadowMaterial' + */ + type: string; + + /** + * @default new THREE.Color( 0x000000 ) + */ color: Color; + /** + * @default true + */ + transparent: boolean; + } diff --git a/src/materials/SpriteMaterial.d.ts b/src/materials/SpriteMaterial.d.ts index af2a1ae0fd1670..bb13cdf745812c 100644 --- a/src/materials/SpriteMaterial.d.ts +++ b/src/materials/SpriteMaterial.d.ts @@ -13,12 +13,41 @@ export interface SpriteMaterialParameters extends MaterialParameters { export class SpriteMaterial extends Material { constructor( parameters?: SpriteMaterialParameters ); + /** + * @default 'SpriteMaterial' + */ + type: string; + /** + * @default new THREE.Color( 0xffffff ) + */ color: Color; + + /** + * @default null + */ map: Texture | null; + + /** + * @default null + */ alphaMap: Texture | null; + + /** + * @default 0 + */ rotation: number; + + /** + * @default true + */ sizeAttenuation: boolean; + + /** + * @default true + */ + transparent: boolean; + readonly isSpriteMaterial: true; setValues( parameters: SpriteMaterialParameters ): void; diff --git a/src/math/Box2.d.ts b/src/math/Box2.d.ts index 9d8cac43dd23f0..f0d8dc5ae8c9bf 100644 --- a/src/math/Box2.d.ts +++ b/src/math/Box2.d.ts @@ -6,9 +6,16 @@ export class Box2 { constructor( min?: Vector2, max?: Vector2 ); - max: Vector2; + /** + * @default new THREE.Vector2( + Infinity, + Infinity ) + */ min: Vector2; + /** + * @default new THREE.Vector2( - Infinity, - Infinity ) + */ + max: Vector2; + set( min: Vector2, max: Vector2 ): Box2; setFromPoints( points: Vector2[] ): Box2; setFromCenterAndSize( center: Vector2, size: Vector2 ): Box2; diff --git a/src/math/Box3.d.ts b/src/math/Box3.d.ts index 18a232631fa466..3ce1cb4e332a5e 100644 --- a/src/math/Box3.d.ts +++ b/src/math/Box3.d.ts @@ -10,8 +10,15 @@ export class Box3 { constructor( min?: Vector3, max?: Vector3 ); - max: Vector3; + /** + * @default new THREE.Vector3( + Infinity, + Infinity, + Infinity ) + */ min: Vector3; + + /** + * @default new THREE.Vector3( - Infinity, - Infinity, - Infinity ) + */ + max: Vector3; readonly isBox3: true; set( min: Vector3, max: Vector3 ): this; diff --git a/src/math/Color.d.ts b/src/math/Color.d.ts index 53030e6d0752be..86a708e097c8b3 100644 --- a/src/math/Color.d.ts +++ b/src/math/Color.d.ts @@ -23,16 +23,19 @@ export class Color { /** * Red channel value between 0 and 1. Default is 1. + * @default 1 */ r: number; /** * Green channel value between 0 and 1. Default is 1. + * @default 1 */ g: number; /** * Blue channel value between 0 and 1. Default is 1. + * @default 1 */ b: number; diff --git a/src/math/Cylindrical.d.ts b/src/math/Cylindrical.d.ts index 29fe5117c1fdaa..4c8e5fa6afa903 100644 --- a/src/math/Cylindrical.d.ts +++ b/src/math/Cylindrical.d.ts @@ -4,8 +4,19 @@ export class Cylindrical { constructor( radius?: number, theta?: number, y?: number ); + /** + * @default 1 + */ radius: number; + + /** + * @default 0 + */ theta: number; + + /** + * @default 0 + */ y: number; clone(): this; diff --git a/src/math/Euler.d.ts b/src/math/Euler.d.ts index b4cf4deb780da5..1827967cde48dd 100644 --- a/src/math/Euler.d.ts +++ b/src/math/Euler.d.ts @@ -6,9 +6,24 @@ export class Euler { constructor( x?: number, y?: number, z?: number, order?: string ); + /** + * @default 0 + */ x: number; + + /** + * @default 0 + */ y: number; + + /** + * @default 0 + */ z: number; + + /** + * @default THREE.Euler.DefaultOrder + */ order: string; readonly isEuler: true; diff --git a/src/math/Line3.d.ts b/src/math/Line3.d.ts index f4b9b1c02684ae..a18774955232e4 100644 --- a/src/math/Line3.d.ts +++ b/src/math/Line3.d.ts @@ -5,7 +5,14 @@ export class Line3 { constructor( start?: Vector3, end?: Vector3 ); + /** + * @default new THREE.Vector3() + */ start: Vector3; + + /** + * @default new THREE.Vector3() + */ end: Vector3; set( start?: Vector3, end?: Vector3 ): Line3; diff --git a/src/math/Matrix3.d.ts b/src/math/Matrix3.d.ts index 0f5000446206fd..f701f0c5ced0d3 100644 --- a/src/math/Matrix3.d.ts +++ b/src/math/Matrix3.d.ts @@ -55,6 +55,7 @@ export class Matrix3 implements Matrix { /** * Array with matrix values. + * @default [1, 0, 0, 0, 1, 0, 0, 0, 1] */ elements: number[]; diff --git a/src/math/Matrix4.d.ts b/src/math/Matrix4.d.ts index 75c49164488f0f..abc214ab6d689c 100644 --- a/src/math/Matrix4.d.ts +++ b/src/math/Matrix4.d.ts @@ -26,6 +26,7 @@ export class Matrix4 implements Matrix { /** * Array with matrix values. + * @default [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] */ elements: number[]; diff --git a/src/math/Plane.d.ts b/src/math/Plane.d.ts index 7072d9485ae1c6..da45eb9dfaca60 100644 --- a/src/math/Plane.d.ts +++ b/src/math/Plane.d.ts @@ -9,8 +9,16 @@ export class Plane { constructor( normal?: Vector3, constant?: number ); + /** + * @default new THREE.Vector3( 1, 0, 0 ) + */ normal: Vector3; + + /** + * @default 0 + */ constant: number; + readonly isPlane: true; set( normal: Vector3, constant: number ): Plane; diff --git a/src/math/Quaternion.d.ts b/src/math/Quaternion.d.ts index 962cf62eb7a399..13cb2e90578df3 100644 --- a/src/math/Quaternion.d.ts +++ b/src/math/Quaternion.d.ts @@ -21,9 +21,24 @@ export class Quaternion { */ constructor( x?: number, y?: number, z?: number, w?: number ); + /** + * @default 0 + */ x: number; + + /** + * @default 0 + */ y: number; + + /** + * @default 0 + */ z: number; + + /** + * @default 1 + */ w: number; readonly isQuaternion: true; diff --git a/src/math/Ray.d.ts b/src/math/Ray.d.ts index 6d981148de9426..cfd45ca0f5ff4b 100644 --- a/src/math/Ray.d.ts +++ b/src/math/Ray.d.ts @@ -8,7 +8,14 @@ export class Ray { constructor( origin?: Vector3, direction?: Vector3 ); + /** + * @default new THREE.Vector3() + */ origin: Vector3; + + /** + * @default new THREE.Vector3( 0, 0, - 1 ) + */ direction: Vector3; set( origin: Vector3, direction: Vector3 ): Ray; diff --git a/src/math/Sphere.d.ts b/src/math/Sphere.d.ts index 99c7ed06975743..615cb9263cd022 100644 --- a/src/math/Sphere.d.ts +++ b/src/math/Sphere.d.ts @@ -7,7 +7,14 @@ export class Sphere { constructor( center?: Vector3, radius?: number ); + /** + * @default new Vector3() + */ center: Vector3; + + /** + * @default 1 + */ radius: number; set( center: Vector3, radius: number ): Sphere; diff --git a/src/math/Spherical.d.ts b/src/math/Spherical.d.ts index b97afc0a0a06fe..0e3a77046712df 100644 --- a/src/math/Spherical.d.ts +++ b/src/math/Spherical.d.ts @@ -4,8 +4,19 @@ export class Spherical { constructor( radius?: number, phi?: number, theta?: number ); + /** + * @default 1 + */ radius: number; + + /** + * @default 0 + */ phi: number; + + /** + * @default 0 + */ theta: number; set( radius: number, phi: number, theta: number ): this; diff --git a/src/math/SphericalHarmonics3.d.ts b/src/math/SphericalHarmonics3.d.ts index 28a88f114537fe..0f3f6486de4260 100644 --- a/src/math/SphericalHarmonics3.d.ts +++ b/src/math/SphericalHarmonics3.d.ts @@ -4,6 +4,9 @@ export class SphericalHarmonics3 { constructor(); + /** + * @default [new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3(), new THREE.Vector3()] + */ coefficients: Vector3[]; readonly isSphericalHarmonics3: true; diff --git a/src/math/Triangle.d.ts b/src/math/Triangle.d.ts index d1bb51a0540481..ce63423aa21e4d 100644 --- a/src/math/Triangle.d.ts +++ b/src/math/Triangle.d.ts @@ -7,8 +7,19 @@ export class Triangle { constructor( a?: Vector3, b?: Vector3, c?: Vector3 ); + /** + * @default new THREE.Vector3() + */ a: Vector3; + + /** + * @default new THREE.Vector3() + */ b: Vector3; + + /** + * @default new THREE.Vector3() + */ c: Vector3; set( a: Vector3, b: Vector3, c: Vector3 ): Triangle; diff --git a/src/math/Vector2.d.ts b/src/math/Vector2.d.ts index 19898a78cd73ba..d93a4ca1b335e1 100644 --- a/src/math/Vector2.d.ts +++ b/src/math/Vector2.d.ts @@ -138,7 +138,14 @@ export class Vector2 implements Vector { constructor( x?: number, y?: number ); + /** + * @default 0 + */ x: number; + + /** + * @default 0 + */ y: number; width: number; height: number; diff --git a/src/math/Vector3.d.ts b/src/math/Vector3.d.ts index fa9dd6f81750e8..2caa0b74d73443 100644 --- a/src/math/Vector3.d.ts +++ b/src/math/Vector3.d.ts @@ -24,8 +24,19 @@ export class Vector3 implements Vector { constructor( x?: number, y?: number, z?: number ); + /** + * @default 0 + */ x: number; + + /** + * @default 0 + */ y: number; + + /** + * @default 0 + */ z: number; readonly isVector3: true; diff --git a/src/math/Vector4.d.ts b/src/math/Vector4.d.ts index 751daf7b8e4068..6fe4382f0cd810 100644 --- a/src/math/Vector4.d.ts +++ b/src/math/Vector4.d.ts @@ -13,10 +13,26 @@ export class Vector4 implements Vector { constructor( x?: number, y?: number, z?: number, w?: number ); + /** + * @default 0 + */ x: number; + + /** + * @default 0 + */ y: number; + + /** + * @default 0 + */ z: number; + + /** + * @default 0 + */ w: number; + width: number; height: number; readonly isVector4: true; diff --git a/src/objects/Line.d.ts b/src/objects/Line.d.ts index a381008c43f8a0..31be9667fd860a 100644 --- a/src/objects/Line.d.ts +++ b/src/objects/Line.d.ts @@ -19,7 +19,7 @@ export class Line < geometry: TGeometry; material: TMaterial; - type: 'Line' | 'LineLoop' | 'LineSegments'; + type: 'Line' | 'LineLoop' | 'LineSegments' | string; readonly isLine: true; morphTargetInfluences?: number[]; diff --git a/src/objects/LineSegments.d.ts b/src/objects/LineSegments.d.ts index 22faec2dadaa9e..636ea5bf56a8d7 100644 --- a/src/objects/LineSegments.d.ts +++ b/src/objects/LineSegments.d.ts @@ -23,7 +23,10 @@ export class LineSegments < mode?: number ); - type: 'LineSegments'; + /** + * @default 'LineSegments' + */ + type: 'LineSegments' | string; readonly isLineSegments: true; } diff --git a/src/renderers/WebGLMultisampleRenderTarget.d.ts b/src/renderers/WebGLMultisampleRenderTarget.d.ts index 15fa1b5b1abde3..65ec6b3299bce1 100644 --- a/src/renderers/WebGLMultisampleRenderTarget.d.ts +++ b/src/renderers/WebGLMultisampleRenderTarget.d.ts @@ -15,6 +15,7 @@ export class WebGLMultisampleRenderTarget extends WebGLRenderTarget { /** * Specifies the number of samples to be used for the renderbuffer storage.However, the maximum supported size for multisampling is platform dependent and defined via gl.MAX_SAMPLES. + * @default 4 */ samples: number; diff --git a/src/renderers/WebGLRenderTarget.d.ts b/src/renderers/WebGLRenderTarget.d.ts index 9e4353e47161b9..5e161119116d54 100644 --- a/src/renderers/WebGLRenderTarget.d.ts +++ b/src/renderers/WebGLRenderTarget.d.ts @@ -31,11 +31,27 @@ export class WebGLRenderTarget extends EventDispatcher { width: number; height: number; scissor: Vector4; + + /** + * @default false + */ scissorTest: boolean; viewport: Vector4; texture: Texture; + + /** + * @default true + */ depthBuffer: boolean; + + /** + * @default true + */ stencilBuffer: boolean; + + /** + * @default null + */ depthTexture: DepthTexture; readonly isWebGLRenderTarget: true; diff --git a/src/renderers/WebGLRenderer.d.ts b/src/renderers/WebGLRenderer.d.ts index 60047398b76a7c..ade28640b5ada9 100644 --- a/src/renderers/WebGLRenderer.d.ts +++ b/src/renderers/WebGLRenderer.d.ts @@ -112,6 +112,7 @@ export class WebGLRenderer implements Renderer { /** * A Canvas where the renderer draws its output. * This is automatically created by the renderer in the constructor (if not provided already); you just need to add it to your page. + * @default document.createElementNS( 'http://www.w3.org/1999/xhtml', 'canvas' ) */ domElement: HTMLCanvasElement; @@ -122,60 +123,85 @@ export class WebGLRenderer implements Renderer { /** * Defines whether the renderer should automatically clear its output before rendering. + * @default true */ autoClear: boolean; /** * If autoClear is true, defines whether the renderer should clear the color buffer. Default is true. + * @default true */ autoClearColor: boolean; /** * If autoClear is true, defines whether the renderer should clear the depth buffer. Default is true. + * @default true */ autoClearDepth: boolean; /** * If autoClear is true, defines whether the renderer should clear the stencil buffer. Default is true. + * @default true */ autoClearStencil: boolean; /** * Debug configurations. + * @default { checkShaderErrors: true } */ debug: WebGLDebug; /** * Defines whether the renderer should sort objects. Default is true. + * @default true */ sortObjects: boolean; + /** + * @default [] + */ clippingPlanes: any[]; + + /** + * @default false + */ localClippingEnabled: boolean; extensions: WebGLExtensions; /** * Default is LinearEncoding. + * @default THREE.LinearEncoding */ outputEncoding: TextureEncoding; + /** + * @default false + */ physicallyCorrectLights: boolean; + + /** + * @default THREE.NoToneMapping + */ toneMapping: ToneMapping; + + /** + * @default 1 + */ toneMappingExposure: number; /** - * Default is false. + * @default false */ shadowMapDebug: boolean; /** - * Default is 8. + * @default 8 */ maxMorphTargets: number; /** - * Default is 4. + * @default 4 */ maxMorphNormals: number; diff --git a/src/renderers/webgl/WebGLClipping.d.ts b/src/renderers/webgl/WebGLClipping.d.ts index 132be0db1ba910..664a7822ef8b0b 100644 --- a/src/renderers/webgl/WebGLClipping.d.ts +++ b/src/renderers/webgl/WebGLClipping.d.ts @@ -3,7 +3,15 @@ import { Camera } from './../../cameras/Camera'; export class WebGLClipping { uniform: { value: any; needsUpdate: boolean }; + + /** + * @default 0 + */ numPlanes: number; + + /** + * @default 0 + */ numIntersection: number; init( planes: any[], enableLocalClipping: boolean, camera: Camera ): boolean; diff --git a/src/renderers/webgl/WebGLInfo.d.ts b/src/renderers/webgl/WebGLInfo.d.ts index df1b32e796569a..922111dd6282f5 100644 --- a/src/renderers/webgl/WebGLInfo.d.ts +++ b/src/renderers/webgl/WebGLInfo.d.ts @@ -7,12 +7,27 @@ export class WebGLInfo { constructor( gl: WebGLRenderingContext ); + /** + * @default true + */ autoReset: boolean; + + /** + * @default { geometries: 0, textures: 0 } + */ memory: { geometries: number; textures: number; }; + + /** + * @default null + */ programs: WebGLProgram[] | null; + + /** + * @default { frame: 0, calls: 0, triangles: 0, points: 0, lines: 0 } + */ render: { calls: number; frame: number; diff --git a/src/renderers/webgl/WebGLProgram.d.ts b/src/renderers/webgl/WebGLProgram.d.ts index 334aeb4d93c826..3fbd3703c2204c 100644 --- a/src/renderers/webgl/WebGLProgram.d.ts +++ b/src/renderers/webgl/WebGLProgram.d.ts @@ -13,6 +13,10 @@ export class WebGLProgram { name: string; id: number; cacheKey: string; // unique identifier for this program, used for looking up compiled programs from cache. + + /** + * @default 1 + */ usedTimes: number; program: any; vertexShader: WebGLShader; diff --git a/src/renderers/webgl/WebGLRenderLists.d.ts b/src/renderers/webgl/WebGLRenderLists.d.ts index 6f316dfc2f525c..2beb10e643fe3f 100644 --- a/src/renderers/webgl/WebGLRenderLists.d.ts +++ b/src/renderers/webgl/WebGLRenderLists.d.ts @@ -25,8 +25,16 @@ export class WebGLRenderList { constructor( properties: WebGLProperties ); + /** + * @default [] + */ opaque: Array; + + /** + * @default [] + */ transparent: Array; + init(): void; push( object: Object3D, diff --git a/src/renderers/webgl/WebGLRenderStates.d.ts b/src/renderers/webgl/WebGLRenderStates.d.ts index 5edb86725aa299..a1884e6caf3840 100644 --- a/src/renderers/webgl/WebGLRenderStates.d.ts +++ b/src/renderers/webgl/WebGLRenderStates.d.ts @@ -6,6 +6,7 @@ import { WebGLLights } from './WebGLLights'; interface WebGLRenderState { init(): void; + state: { lightsArray: Light[]; shadowsArray: Light[]; diff --git a/src/renderers/webgl/WebGLShadowMap.d.ts b/src/renderers/webgl/WebGLShadowMap.d.ts index d88626f43767b3..e501a6fa320f17 100644 --- a/src/renderers/webgl/WebGLShadowMap.d.ts +++ b/src/renderers/webgl/WebGLShadowMap.d.ts @@ -13,9 +13,24 @@ export class WebGLShadowMap { maxTextureSize: number ); + /** + * @default false + */ enabled: boolean; + + /** + * @default true + */ autoUpdate: boolean; + + /** + * @default false + */ needsUpdate: boolean; + + /** + * @default THREE.PCFShadowMap + */ type: ShadowMapType; render( shadowsArray: Light[], scene: Scene, camera: Camera ): void; diff --git a/src/renderers/webxr/WebXRManager.d.ts b/src/renderers/webxr/WebXRManager.d.ts index 2812eb78af86c4..852bbbcd0ea356 100644 --- a/src/renderers/webxr/WebXRManager.d.ts +++ b/src/renderers/webxr/WebXRManager.d.ts @@ -5,8 +5,16 @@ export class WebXRManager { constructor( renderer: any, gl: WebGLRenderingContext ); + /** + * @default false + */ enabled: boolean; + + /** + * @default false + */ isPresenting: boolean; + getController( id: number ): Group; getControllerGrip( id: number ): Group; setFramebufferScaleFactor( value: number ): void; diff --git a/src/scenes/Fog.d.ts b/src/scenes/Fog.d.ts index 811cb9b82ea93b..7d579af3ff5f57 100644 --- a/src/scenes/Fog.d.ts +++ b/src/scenes/Fog.d.ts @@ -14,6 +14,9 @@ export class Fog implements IFog { constructor( color: Color | number | string, near?: number, far?: number ); + /** + * @default '' + */ name: string; /** @@ -23,12 +26,13 @@ export class Fog implements IFog { /** * The minimum distance to start applying fog. Objects that are less than 'near' units from the active camera won't be affected by fog. + * @default 1 */ near: number; /** * The maximum distance at which fog stops being calculated and applied. Objects that are more than 'far' units away from the active camera won't be affected by fog. - * Default is 1000. + * @default 1000 */ far: number; diff --git a/src/scenes/FogExp2.d.ts b/src/scenes/FogExp2.d.ts index a4f2fcf9f16829..5ec4d0b001ca85 100644 --- a/src/scenes/FogExp2.d.ts +++ b/src/scenes/FogExp2.d.ts @@ -7,12 +7,16 @@ export class FogExp2 implements IFog { constructor( hex: number | string, density?: number ); + /** + * @default '' + */ name: string; + color: Color; /** * Defines how fast the fog will grow dense. - * Default is 0.00025. + * @default 0.00025 */ density: number; diff --git a/src/scenes/Scene.d.ts b/src/scenes/Scene.d.ts index d9a0ef7f60bd10..61f3c0e9ce8387 100644 --- a/src/scenes/Scene.d.ts +++ b/src/scenes/Scene.d.ts @@ -21,15 +21,29 @@ export class Scene extends Object3D { /** * A fog instance defining the type of fog that affects everything rendered in the scene. Default is null. + * @default null */ fog: IFog | null; /** * If not null, it will force everything in the scene to be rendered with that material. Default is null. + * @default null */ overrideMaterial: Material | null; + + /** + * @default true + */ autoUpdate: boolean; + + /** + * @default null + */ background: null | Color | Texture | WebGLCubeRenderTarget; + + /** + * @default null + */ environment: null | Texture; readonly isScene: true; diff --git a/src/textures/CanvasTexture.d.ts b/src/textures/CanvasTexture.d.ts index 67b0d27f166504..72a4520d9dd702 100644 --- a/src/textures/CanvasTexture.d.ts +++ b/src/textures/CanvasTexture.d.ts @@ -9,6 +9,18 @@ import { export class CanvasTexture extends Texture { + /** + * @param canvas + * @param [format=THREE.RGBAFormat] + * @param [type=THREE.UnsignedByteType] + * @param [mapping=THREE.Texture.DEFAULT_MAPPING] + * @param [wrapS=THREE.ClampToEdgeWrapping] + * @param [wrapT=THREE.ClampToEdgeWrapping] + * @param [magFilter=THREE.LinearFilter] + * @param [minFilter=THREE.LinearMipmapLinearFilter] + * @param [anisotropy=1] + * @param [encoding=THREE.LinearEncoding] + */ constructor( canvas: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, mapping?: Mapping, diff --git a/src/textures/CompressedTexture.d.ts b/src/textures/CompressedTexture.d.ts index 00b8d519d5c5ed..7f2b41ad2c49a4 100644 --- a/src/textures/CompressedTexture.d.ts +++ b/src/textures/CompressedTexture.d.ts @@ -10,6 +10,20 @@ import { export class CompressedTexture extends Texture { + /** + * @param mipmaps + * @param width + * @param height + * @param [format=THREE.RGBAFormat] + * @param [type=THREE.UnsignedByteType] + * @param [mapping=THREE.Texture.DEFAULT_MAPPING] + * @param [wrapS=THREE.ClampToEdgeWrapping] + * @param [wrapT=THREE.ClampToEdgeWrapping] + * @param [magFilter=THREE.LinearFilter] + * @param [minFilter=THREE.LinearMipmapLinearFilter] + * @param [anisotropy=1] + * @param [encoding=THREE.LinearEncoding] + */ constructor( mipmaps: ImageData[], width: number, @@ -27,4 +41,16 @@ export class CompressedTexture extends Texture { image: { width: number; height: number }; + mipmaps: ImageData[]; + + /** + * @default false + */ + flipY: boolean; + + /** + * @default false + */ + generateMipmaps: boolean; + } diff --git a/src/textures/CubeTexture.d.ts b/src/textures/CubeTexture.d.ts index b2ae0121ddbf27..e7a6e3768bd91f 100644 --- a/src/textures/CubeTexture.d.ts +++ b/src/textures/CubeTexture.d.ts @@ -10,6 +10,18 @@ import { export class CubeTexture extends Texture { + /** + * @param [images=[]] + * @param [mapping=THREE.CubeReflectionMapping] + * @param [wrapS=THREE.ClampToEdgeWrapping] + * @param [wrapT=THREE.ClampToEdgeWrapping] + * @param [magFilter=THREE.LinearFilter] + * @param [minFilter=THREE.LinearMipmapLinearFilter] + * @param [format=THREE.RGBFormat] + * @param [type=THREE.UnsignedByteType] + * @param [anisotropy=1] + * @param [encoding=THREE.LinearEncoding] + */ constructor( images?: any[], // HTMLImageElement or HTMLCanvasElement mapping?: Mapping, @@ -25,4 +37,9 @@ export class CubeTexture extends Texture { images: any; // returns and sets the value of Texture.image in the codde ? + /** + * @default false + */ + flipY: boolean; + } diff --git a/src/textures/DataTexture.d.ts b/src/textures/DataTexture.d.ts index d7781678fa357b..ce9889511db32e 100644 --- a/src/textures/DataTexture.d.ts +++ b/src/textures/DataTexture.d.ts @@ -11,6 +11,20 @@ import { TypedArray } from '../polyfills'; export class DataTexture extends Texture { + /** + * @param data + * @param width + * @param height + * @param [format=THREE.RGBAFormat] + * @param [type=THREE.UnsignedByteType] + * @param [mapping=THREE.Texture.DEFAULT_MAPPING] + * @param [wrapS=THREE.ClampToEdgeWrapping] + * @param [wrapT=THREE.ClampToEdgeWrapping] + * @param [magFilter=THREE.NearestFilter] + * @param [minFilter=THREE.NearestFilter] + * @param [anisotropy=1] + * @param [encoding=THREE.LinearEncoding] + */ constructor( data: TypedArray, width: number, @@ -28,4 +42,24 @@ export class DataTexture extends Texture { image: ImageData; + /** + * @default false + */ + flipY: boolean; + + /** + * @default false + */ + generateMipmaps: boolean; + + /** + * @default 1 + */ + unpackAlignment: number; + + /** + * @default THREE.DepthFormat + */ + format: PixelFormat; + } diff --git a/src/textures/DataTexture2DArray.d.ts b/src/textures/DataTexture2DArray.d.ts index 62de15c765dd71..4d5304c1a63975 100644 --- a/src/textures/DataTexture2DArray.d.ts +++ b/src/textures/DataTexture2DArray.d.ts @@ -1,5 +1,6 @@ import { Texture } from './Texture'; import { TypedArray } from '../polyfills'; +import { TextureFilter } from '../constants'; export class DataTexture2DArray extends Texture { @@ -10,4 +11,29 @@ export class DataTexture2DArray extends Texture { depth: number ); + /** + * @default THREE.NearestFilter + */ + magFilter: TextureFilter; + + /** + * @default THREE.NearestFilter + */ + minFilter: TextureFilter; + + /** + * @default THREE.ClampToEdgeWrapping + */ + wrapR: boolean; + + /** + * @default false + */ + flipY: boolean; + + /** + * @default false + */ + generateMipmaps: boolean; + } diff --git a/src/textures/DataTexture3D.d.ts b/src/textures/DataTexture3D.d.ts index 6bdcc9a1904992..5d7b9760a4b18a 100644 --- a/src/textures/DataTexture3D.d.ts +++ b/src/textures/DataTexture3D.d.ts @@ -1,5 +1,6 @@ import { Texture } from './Texture'; import { TypedArray } from '../polyfills'; +import { TextureFilter } from '../constants'; export class DataTexture3D extends Texture { @@ -10,4 +11,29 @@ export class DataTexture3D extends Texture { depth: number ); + /** + * @default THREE.NearestFilter + */ + magFilter: TextureFilter; + + /** + * @default THREE.NearestFilter + */ + minFilter: TextureFilter; + + /** + * @default THREE.ClampToEdgeWrapping + */ + wrapR: boolean; + + /** + * @default false + */ + flipY: boolean; + + /** + * @default false + */ + generateMipmaps: boolean; + } diff --git a/src/textures/DepthTexture.d.ts b/src/textures/DepthTexture.d.ts index c9b4d3714d3fb9..c8ee2e7368fc50 100644 --- a/src/textures/DepthTexture.d.ts +++ b/src/textures/DepthTexture.d.ts @@ -8,9 +8,20 @@ import { export class DepthTexture extends Texture { + /** + * @param width + * @param height + * @param type + * @param [mapping=THREE.Texture.DEFAULT_MAPPING] + * @param [wrapS=THREE.ClampToEdgeWrapping] + * @param [wrapT=THREE.ClampToEdgeWrapping] + * @param [magFilter=THREE.NearestFilter] + * @param [minFilter=THREE.NearestFilter] + * @param [anisotropy=1] + */ constructor( width: number, - heighht: number, + height: number, type?: TextureDataType, mapping?: Mapping, wrapS?: Wrapping, @@ -22,4 +33,14 @@ export class DepthTexture extends Texture { image: { width: number; height: number }; + /** + * @default false + */ + flipY: boolean; + + /** + * @default false + */ + generateMipmaps: boolean; + } diff --git a/src/textures/Texture.d.ts b/src/textures/Texture.d.ts index 38192cbbd04a77..664e52e88af98b 100644 --- a/src/textures/Texture.d.ts +++ b/src/textures/Texture.d.ts @@ -16,6 +16,18 @@ export let TextureIdCount: number; export class Texture extends EventDispatcher { + /** + * @param [image] + * @param [mapping=THREE.Texture.DEFAULT_MAPPING] + * @param [wrapS=THREE.ClampToEdgeWrapping] + * @param [wrapT=THREE.ClampToEdgeWrapping] + * @param [magFilter=THREE.LinearFilter] + * @param [minFilter=THREE.LinearMipmapLinearFilter] + * @param [format=THREE.RGBAFormat] + * @param [type=THREE.UnsignedByteType] + * @param [anisotropy=1] + * @param [encoding=THREE.LinearEncoding] + */ constructor( image?: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, mapping?: Mapping, @@ -31,30 +43,123 @@ export class Texture extends EventDispatcher { id: number; uuid: string; + + /** + * @default '' + */ name: string; sourceFile: string; + + /** + * @default THREE.Texture.DEFAULT_IMAGE + */ image: any; // HTMLImageElement or ImageData or { width: number, height: number } in some children; + + /** + * @default [] + */ mipmaps: any[]; // ImageData[] for 2D textures and CubeTexture[] for cube textures; + + /** + * @default THREE.Texture.DEFAULT_MAPPING + */ mapping: Mapping; + + /** + * @default THREE.ClampToEdgeWrapping + */ wrapS: Wrapping; + + /** + * @default THREE.ClampToEdgeWrapping + */ wrapT: Wrapping; + + /** + * @default THREE.LinearFilter + */ magFilter: TextureFilter; + + /** + * @default THREE.LinearMipmapLinearFilter + */ minFilter: TextureFilter; + + /** + * @default 1 + */ anisotropy: number; + + /** + * @default THREE.RGBAFormat + */ format: PixelFormat; + internalFormat: PixelFormatGPU | null; + + /** + * @default THREE.UnsignedByteType + */ type: TextureDataType; + + /** + * @default new THREE.Matrix3() + */ matrix: Matrix3; + + /** + * @default true + */ matrixAutoUpdate: boolean; + + /** + * @default new THREE.Vector2( 0, 0 ) + */ offset: Vector2; + + /** + * @default new THREE.Vector2( 1, 1 ) + */ repeat: Vector2; + + /** + * @default new THREE.Vector2( 0, 0 ) + */ center: Vector2; + + /** + * @default 0 + */ rotation: number; + + /** + * @default true + */ generateMipmaps: boolean; + + /** + * @default false + */ premultiplyAlpha: boolean; + + /** + * @default true + */ flipY: boolean; + + /** + * @default 4 + */ unpackAlignment: number; + + /** + * @default THREE.LinearEncoding + */ encoding: TextureEncoding; + + /** + * @default 0 + */ version: number; needsUpdate: boolean; readonly isTexture: true; diff --git a/src/textures/VideoTexture.d.ts b/src/textures/VideoTexture.d.ts index f49107df28e50f..4afd718723a322 100644 --- a/src/textures/VideoTexture.d.ts +++ b/src/textures/VideoTexture.d.ts @@ -9,6 +9,17 @@ import { export class VideoTexture extends Texture { + /** + * @param video + * @param [mapping=THREE.Texture.DEFAULT_MAPPING] + * @param [wrapS=THREE.ClampToEdgeWrapping] + * @param [wrapT=THREE.ClampToEdgeWrapping] + * @param [magFilter=THREE.LinearFilter] + * @param [minFilter=THREE.LinearFilter] + * @param [format=THREE.RGBFormat] + * @param [type=THREE.UnsignedByteType] + * @param [anisotropy=1] + */ constructor( video: HTMLVideoElement, mapping?: Mapping, @@ -23,4 +34,9 @@ export class VideoTexture extends Texture { readonly isVideoTexture: true; + /** + * @default false + */ + generateMipmaps: boolean; + }