@types/three
Advanced tools
Comparing version 0.152.1 to 0.153.0
@@ -20,2 +20,3 @@ import { | ||
resetPhysicsOnLoop?: boolean | undefined; | ||
pmxAnimation?: boolean | undefined; | ||
} | ||
@@ -59,2 +60,3 @@ | ||
resetPhysicsOnLoop: boolean; | ||
pmxAnimation: boolean; | ||
}; | ||
@@ -61,0 +63,0 @@ enabled: { |
@@ -27,3 +27,3 @@ import { Camera, Vector3, DirectionalLight, Material, Vector2, Object3D } from '../../../src/Three'; | ||
export class CSM { | ||
constructor(data?: CMSParameters); | ||
constructor(data: CMSParameters); | ||
camera: Camera; | ||
@@ -30,0 +30,0 @@ parent: Object3D; |
@@ -16,3 +16,3 @@ import { Mesh, Points } from '../../../src/Three'; | ||
parse(object: Mesh | Points, options: DRACOExporterOptions): Int8Array; | ||
parse(object: Mesh | Points, options?: DRACOExporterOptions): Int8Array; | ||
} |
import { Object3D } from '../../../src/Three'; | ||
export interface PLYExporterOptions { | ||
binary?: boolean; | ||
export interface PLYExporterOptionsBase { | ||
excludeAttributes?: string[]; | ||
@@ -9,6 +8,24 @@ littleEndian?: boolean; | ||
export interface PLYExporterOptionsBinary extends PLYExporterOptionsBase { | ||
binary: true; | ||
} | ||
export interface PLYExporterOptionsString extends PLYExporterOptionsBase { | ||
binary?: false; | ||
} | ||
export interface PLYExporterOptions extends PLYExporterOptionsBase { | ||
binary?: boolean; | ||
} | ||
export class PLYExporter { | ||
constructor(); | ||
parse(object: Object3D, onDone: (res: string) => void, options: PLYExporterOptions): string | null; | ||
parse(object: Object3D, onDone: (res: ArrayBuffer) => void, options: PLYExporterOptionsBinary): ArrayBuffer | null; | ||
parse(object: Object3D, onDone: (res: string) => void, options?: PLYExporterOptionsString): string | null; | ||
parse( | ||
object: Object3D, | ||
onDone: (res: string | ArrayBuffer) => void, | ||
options?: PLYExporterOptions, | ||
): string | ArrayBuffer | null; | ||
} |
import { Object3D } from '../../../src/Three'; | ||
export interface STLExporterOptionsBinary { | ||
binary: true; | ||
} | ||
export interface STLExporterOptionsString { | ||
binary?: false; | ||
} | ||
export interface STLExporterOptions { | ||
@@ -10,3 +18,5 @@ binary?: boolean; | ||
parse(scene: Object3D, options?: STLExporterOptions): string; | ||
parse(scene: Object3D, options: STLExporterOptionsBinary): DataView; | ||
parse(scene: Object3D, options?: STLExporterOptionsString): string; | ||
parse(scene: Object3D, options?: STLExporterOptions): string | DataView; | ||
} |
@@ -11,4 +11,4 @@ import { BufferGeometry } from '../../../src/Three'; | ||
fitLid?: boolean, | ||
blinn?: number, | ||
blinn?: boolean, | ||
); | ||
} |
@@ -202,3 +202,3 @@ import { | ||
* @param modelID ID of the IFC model. | ||
* @parent The parent where the subset is (can be any `THREE.Object3D`). | ||
* @param parent The parent where the subset is (can be any `THREE.Object3D`). | ||
* @param material Material assigned to the subset, if any. | ||
@@ -382,3 +382,3 @@ */ | ||
* Removes the specified subset. | ||
* @parent The parent where the subset is (can be any `THREE.Object3D`). | ||
* @param parent The parent where the subset is (can be any `THREE.Object3D`). | ||
* @param material Material assigned to the subset, if any. | ||
@@ -607,3 +607,3 @@ */ | ||
* @param data Buffer containing IFC data (bytes) | ||
* @param settings Settings settings for loading the model | ||
* @param settings Settings for loading the model | ||
*/ | ||
@@ -614,3 +614,3 @@ OpenModel(data: string | Uint8Array, settings?: LoaderSettings): number; | ||
* Creates a new model and returns a modelID number | ||
* @param settings Settings settings for generating data the model | ||
* @param settings Settings for generating data the model | ||
*/ | ||
@@ -617,0 +617,0 @@ CreateModel(settings?: LoaderSettings): number; |
@@ -52,5 +52,5 @@ import { | ||
createTexture(): DataTexture; | ||
renderTexture(input: Texture, output: Texture): void; | ||
renderTexture(input: Texture, output: WebGLRenderTarget): void; | ||
doRenderTarget(material: Material, output: WebGLRenderTarget): void; | ||
dispose(): void; | ||
} |
@@ -5,3 +5,3 @@ import Node from '../core/Node'; | ||
export default class ModelViewProjectionNode extends Node { | ||
constructor(position?: PositionNode); | ||
constructor(positionNode?: PositionNode); | ||
} |
@@ -109,3 +109,3 @@ import { | ||
getNodeProperties(node: Node, shaderStage?: NodeShaderStageOption): AnyObject; | ||
getUniformFromNode(node: Node, shaderStage: NodeShaderStageOption, type: NodeTypeOption): NodeUniform; | ||
getUniformFromNode(node: Node, type: NodeTypeOption, shaderStage?: NodeShaderStageOption): NodeUniform; | ||
getVarFromNode(node: Node, type: NodeTypeOption, shaderStage?: NodeShaderStageOption): NodeVar; | ||
@@ -112,0 +112,0 @@ getVaryFromNode(node: Node, type: NodeTypeOption): NodeVarying; |
@@ -6,3 +6,3 @@ import { ShaderMaterial } from '../../../src/Three'; | ||
export class FilmPass extends Pass { | ||
constructor(noiseIntensity?: number, scanlinesIntensity?: number, scanlinesCount?: number, grayscale?: number); | ||
constructor(noiseIntensity?: number, scanlinesIntensity?: number, scanlinesCount?: number, grayscale?: boolean); | ||
uniforms: object; | ||
@@ -9,0 +9,0 @@ material: ShaderMaterial; |
import { BufferGeometry } from '../../../src/Three'; | ||
export function UVsDebug(geometry: BufferGeometry, size: number): HTMLCanvasElement; | ||
export function UVsDebug(geometry: BufferGeometry, size?: number): HTMLCanvasElement; |
@@ -1,2 +0,2 @@ | ||
// Type definitions for three 0.152 | ||
// Type definitions for three 0.153 | ||
// Project: https://threejs.org/ | ||
@@ -3,0 +3,0 @@ // Definitions by: Josh Ellis <https://github.com/joshuaellis> |
{ | ||
"name": "@types/three", | ||
"version": "0.152.1", | ||
"version": "0.153.0", | ||
"description": "TypeScript definitions for three", | ||
@@ -34,3 +34,3 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three", | ||
}, | ||
"typesPublisherContentHash": "4a1b7a1820d0565498723427b382216d64d91a892d84b4a3ad2c73c41a5fe823", | ||
"typesPublisherContentHash": "776e445e303f817fc78a39d4f0acdac279c33b7cc46a10995a77955c8386f84d", | ||
"typeScriptVersion": "4.4", | ||
@@ -37,0 +37,0 @@ "exports": { |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Thu, 25 May 2023 20:34:45 GMT | ||
* Last updated: Thu, 06 Jul 2023 18:35:25 GMT | ||
* Dependencies: [@types/fflate](https://npmjs.com/package/@types/fflate), [@types/lil-gui](https://npmjs.com/package/@types/lil-gui), [@types/stats.js](https://npmjs.com/package/@types/stats.js), [@types/tweenjs__tween.js](https://npmjs.com/package/@types/tweenjs__tween.js), [@types/webxr](https://npmjs.com/package/@types/webxr) | ||
@@ -14,0 +14,0 @@ * Global values: `THREE` |
@@ -1,5 +0,6 @@ | ||
import { Matrix4 } from './../math/Matrix4'; | ||
import { Vector3 } from './../math/Vector3'; | ||
import { Object3D } from './../core/Object3D'; | ||
import { Layers } from '../Three'; | ||
import { Matrix4 } from '../math/Matrix4'; | ||
import { Vector3 } from '../math/Vector3'; | ||
import { Object3D } from '../core/Object3D'; | ||
import { Layers } from '../core/Layers'; | ||
import { CoordinateSystem } from '../constants'; | ||
@@ -62,2 +63,4 @@ /** | ||
coordinateSystem: CoordinateSystem; | ||
/** | ||
@@ -64,0 +67,0 @@ * Returns a {@link THREE.Vector3 | Vector3} representing the world space direction in which the {@link Camera} is looking. |
@@ -5,2 +5,3 @@ import { WebGLCubeRenderTarget } from './../renderers/WebGLCubeRenderTarget'; | ||
import { Object3D } from './../core/Object3D'; | ||
import { CoordinateSystem } from '../constants'; | ||
@@ -57,2 +58,6 @@ /** | ||
coordinateSystem: CoordinateSystem; | ||
updateCoordinateSystem(): void; | ||
/** | ||
@@ -59,0 +64,0 @@ * Call this to update the {@link CubeCamera.renderTarget | renderTarget}. |
@@ -326,2 +326,4 @@ export const REVISION: string; | ||
export type AttributeGPUType = typeof FloatType | typeof IntType; | ||
/** | ||
@@ -413,3 +415,3 @@ * Texture Types. | ||
export const _SRGBAFormat = 1035; // fallback for WebGL 1 | ||
export const _SRGBAFormat: 1035; // fallback for WebGL 1 | ||
@@ -714,3 +716,3 @@ /** | ||
export const LinearSRGBColorSpace: 'srgb-linear'; | ||
export const DisplayP3ColorSpace = 'display-p3'; | ||
export const DisplayP3ColorSpace: 'display-p3'; | ||
export type ColorSpace = | ||
@@ -760,2 +762,20 @@ | typeof NoColorSpace | ||
export const NeverCompare: 512; | ||
export const LessCompare: 513; | ||
export const EqualCompare: 514; | ||
export const LessEqualCompare: 515; | ||
export const GreaterCompare: 516; | ||
export const NotEqualCompare: 517; | ||
export const GreaterEqualCompare: 518; | ||
export const AlwaysCompare: 519; | ||
export type TextureComparisonFunction = | ||
| typeof NeverCompare | ||
| typeof LessCompare | ||
| typeof EqualCompare | ||
| typeof LessEqualCompare | ||
| typeof GreaterCompare | ||
| typeof NotEqualCompare | ||
| typeof GreaterEqualCompare | ||
| typeof AlwaysCompare; | ||
// usage types | ||
@@ -786,2 +806,6 @@ export const StaticDrawUsage: 35044; | ||
export const WebGLCoordinateSystem: 2000; | ||
export const WebGPUCoordinateSystem: 2001; | ||
export type CoordinateSystem = typeof WebGLCoordinateSystem | typeof WebGPUCoordinateSystem; | ||
/////////////////////////////////////////////////////////////////////////////// | ||
@@ -788,0 +812,0 @@ // Texture - Internal Pixel Formats |
@@ -1,2 +0,2 @@ | ||
import { Usage } from '../constants'; | ||
import { Usage, AttributeGPUType } from '../constants'; | ||
import { Matrix3 } from './../math/Matrix3'; | ||
@@ -70,2 +70,10 @@ import { Matrix4 } from './../math/Matrix4'; | ||
/** | ||
* Configures the bound GPU type for use in shaders. Either {@link FloatType} or {@link IntType}, default is {@link FloatType}. | ||
* | ||
* Note: this only has an effect for integer arrays and is not configurable for float arrays. For lower precision | ||
* float types, see https://threejs.org/docs/#api/en/core/bufferAttributeTypes/BufferAttributeTypes. | ||
*/ | ||
gpuType: AttributeGPUType; | ||
/** | ||
* This can be used to only update some components of stored vectors (for example, just the component related to color). | ||
@@ -72,0 +80,0 @@ * @defaultValue `{ offset: number = 0; count: number = -1 }` |
import { ColorRepresentation } from '../math/Color'; | ||
import { LineSegments } from './../objects/LineSegments'; | ||
import { BufferGeometry } from '../core/BufferGeometry'; | ||
import { LineBasicMaterial } from '../materials/LineBasicMaterial'; | ||
@@ -19,3 +21,3 @@ /** | ||
*/ | ||
export class GridHelper extends LineSegments { | ||
export class GridHelper extends LineSegments<BufferGeometry, LineBasicMaterial> { | ||
/** | ||
@@ -22,0 +24,0 @@ * Creates a new {@link GridHelper} of size 'size' and divided into 'divisions' segments per side |
@@ -68,3 +68,3 @@ import { Object3D } from './../core/Object3D'; | ||
*/ | ||
override position: Vector3; | ||
override readonly position: Vector3; | ||
@@ -71,0 +71,0 @@ /** |
@@ -41,3 +41,3 @@ import { Color, ColorRepresentation } from '../math/Color'; | ||
* The light's intensity, or strength. | ||
* In {@link THREE.WebGLRenderer.physicallyCorrectLights | physically correct} mode, the units of intensity depend on the type of light. | ||
* When {@link THREE.WebGLRenderer.useLegacyLights | legacy lighting mode} is disabled, the units of intensity depend on the type of light. | ||
* @remarks Expects a `Float` | ||
@@ -44,0 +44,0 @@ * @defaultValue `1` |
@@ -40,3 +40,3 @@ import { ColorRepresentation } from '../math/Color'; | ||
* | ||
* When **{@link WebGLRenderer.physicallyCorrectLights | physically correct} mode** — intensity is the luminous intensity of the light measured in candela (cd). | ||
* When **{@link WebGLRenderer.useLegacyLights | legacy lighting mode} is disabled** — intensity is the luminous intensity of the light measured in candela (cd). | ||
* @remarks Changing the intensity will also change the light's power. | ||
@@ -52,3 +52,3 @@ * @remarks Expects a `Float` | ||
* | ||
* When **{@link WebGLRenderer.physicallyCorrectLights | Physically correct} rendering mode** — When distance is zero, | ||
* When **{@link WebGLRenderer.useLegacyLights | legacy lighting mode} is disabled** — When distance is zero, | ||
* light will attenuate according to inverse-square law to infinite distance. | ||
@@ -73,3 +73,3 @@ * When distance is non-zero, light will attenuate according to inverse-square law until near the distance cutoff, | ||
* The amount the light dims along the distance of the light. | ||
* In **{@link WebGLRenderer.physicallyCorrectLights | physically correct} rendering mode** — the default value **should not** be changed. | ||
* In context of physically-correct rendering the default value should not be changed. | ||
* @remarks Expects a `Float` | ||
@@ -93,3 +93,3 @@ * @defaultValue `2` | ||
* The light's power. | ||
* When **{@link WebGLRenderer.physicallyCorrectLights | physically correct} rendering mode** — power is the luminous power of the light measured in lumens (lm). | ||
* When **{@link WebGLRenderer.useLegacyLights | legacy lighting mode} is disabled** — power is the luminous power of the light measured in lumens (lm). | ||
* @remarks Changing the power will also change the light's intensity. | ||
@@ -96,0 +96,0 @@ * @remarks Expects a `Float` |
@@ -69,3 +69,3 @@ import { Light } from './Light'; | ||
* @remarks Changing the intensity will also change the light's power. | ||
* In **{@link WebGLRenderer.physicallyCorrectLights | physically correct} rendering mode** — intensity is the luminance (brightness) of the light measured in nits (cd/m^2). | ||
* When **{@link WebGLRenderer.useLegacyLights | legacy lighting mode} is disabled** — intensity is the luminance (brightness) of the light measured in nits (cd/m^2). | ||
* @remarks Expects a `Float` | ||
@@ -79,3 +79,3 @@ * @defaultValue `1` | ||
* @remarks Changing the power will also change the light's intensity. | ||
* In **{@link WebGLRenderer.physicallyCorrectLights | physically correct} rendering mode** — power is the luminous power of the light measured in lumens (lm). | ||
* When **{@link WebGLRenderer.useLegacyLights | legacy lighting mode} is disabled** — power is the luminous power of the light measured in lumens (lm). | ||
* @remarks Expects a `Float` | ||
@@ -82,0 +82,0 @@ */ |
@@ -66,3 +66,3 @@ import { Vector3 } from '../math/Vector3'; | ||
*/ | ||
position: Vector3; | ||
readonly position: Vector3; | ||
@@ -101,3 +101,3 @@ /** | ||
* @remarks Changing the intensity will also change the light's power. | ||
* When **{@link WebGLRenderer.physicallyCorrectLights | Physically correct} rendering mode** — intensity is the luminous intensity of the light measured in candela (cd). | ||
* When **{@link WebGLRenderer.useLegacyLights | legacy lighting mode} is disabled** — intensity is the luminous intensity of the light measured in candela (cd). | ||
* @remarks Expects a `Float` | ||
@@ -112,3 +112,3 @@ * @defaultValue `1` | ||
* | ||
* When **{@link WebGLRenderer.physicallyCorrectLights | Physically correct} rendering mode** — When distance is zero, | ||
* When **{@link WebGLRenderer.useLegacyLights | legacy lighting mode} is disabled** — When distance is zero, | ||
* light will attenuate according to inverse-square law to infinite distance. | ||
@@ -132,3 +132,3 @@ * When distance is non-zero, light will attenuate according to inverse-square law until near the distance cutoff, | ||
* The amount the light dims along the distance of the light. | ||
* In **{@link WebGLRenderer.physicallyCorrectLights | physically correct} rendering mode** — the default value should not be changed. | ||
* In context of physically-correct rendering the default value should not be changed. | ||
* @remarks Expects a `Float` | ||
@@ -148,3 +148,3 @@ * @defaultValue `2` | ||
* @remarks Changing the power will also change the light's intensity. | ||
* In **{@link WebGLRenderer.physicallyCorrectLights | physically correct} rendering mode** — power is the luminous power of the light measured in lumens (lm). | ||
* When **{@link WebGLRenderer.useLegacyLights | legacy lighting mode} is disabled** — power is the luminous power of the light measured in lumens (lm). | ||
* @remarks Expects a `Float` | ||
@@ -151,0 +151,0 @@ */ |
@@ -42,2 +42,6 @@ import { Texture } from './../textures/Texture'; | ||
iridescenceThicknessMap?: Texture | null | undefined; | ||
anisotropy?: number | undefined; | ||
anisotropyRotation?: number | undefined; | ||
anisotropyMap?: Texture | null | undefined; | ||
} | ||
@@ -197,2 +201,17 @@ | ||
iridescenceThicknessMap: Texture | null; | ||
/** | ||
* @default 0 | ||
*/ | ||
anisotropy?: number; | ||
/** | ||
* @default 0 | ||
*/ | ||
anisotropyRotation?: number; | ||
/** | ||
* @default null | ||
*/ | ||
anisotropyMap?: Texture | null; | ||
} |
@@ -207,3 +207,4 @@ import { ColorSpace } from '../constants'; | ||
set(color: ColorRepresentation): Color; | ||
set(color: ColorRepresentation): this; | ||
set(r: number, g: number, b: number): this; | ||
@@ -210,0 +211,0 @@ /** |
@@ -8,2 +8,3 @@ import { Plane } from './Plane'; | ||
import { Vector3 } from './Vector3'; | ||
import { CoordinateSystem } from '../constants'; | ||
@@ -24,3 +25,3 @@ /** | ||
copy(frustum: Frustum): this; | ||
setFromProjectionMatrix(m: Matrix4): this; | ||
setFromProjectionMatrix(m: Matrix4, coordinateSystem?: CoordinateSystem): this; | ||
intersectsObject(object: Object3D): boolean; | ||
@@ -27,0 +28,0 @@ intersectsSprite(sprite: Sprite): boolean; |
@@ -8,2 +8,3 @@ import { Quaternion } from './Quaternion'; | ||
export const DEG2RAD: number; | ||
export const RAD2DEG: number; | ||
@@ -17,6 +18,7 @@ | ||
* @param value Value to be clamped. | ||
* @param min Minimum value | ||
* @param min Minimum value. | ||
* @param max Maximum value. | ||
*/ | ||
export function clamp(value: number, min: number, max: number): number; | ||
export function euclideanModulo(n: number, m: number): number; | ||
@@ -35,40 +37,2 @@ | ||
export function smoothstep(x: number, min: number, max: number): number; | ||
export function smootherstep(x: number, min: number, max: number): number; | ||
/** | ||
* Random float from 0 to 1 with 16 bits of randomness. | ||
* Standard Math.random() creates repetitive patterns when applied over larger space. | ||
* | ||
* @deprecated Use {@link Math#random Math.random()} | ||
*/ | ||
export function random16(): number; | ||
/** | ||
* Random integer from low to high interval. | ||
*/ | ||
export function randInt(low: number, high: number): number; | ||
/** | ||
* Random float from low to high interval. | ||
*/ | ||
export function randFloat(low: number, high: number): number; | ||
/** | ||
* Random float from - range / 2 to range / 2 interval. | ||
*/ | ||
export function randFloatSpread(range: number): number; | ||
/** | ||
* Deterministic pseudo-random float in the interval [ 0, 1 ]. | ||
*/ | ||
export function seededRandom(seed?: number): number; | ||
export function degToRad(degrees: number): number; | ||
export function radToDeg(radians: number): number; | ||
export function isPowerOfTwo(value: number): boolean; | ||
export function inverseLerp(x: number, y: number, t: number): number; | ||
@@ -105,16 +69,73 @@ | ||
export function smoothstep(x: number, min: number, max: number): number; | ||
export function smootherstep(x: number, min: number, max: number): number; | ||
/** | ||
* @deprecated Use {@link Math#floorPowerOfTwo .floorPowerOfTwo()} | ||
* Random integer from low to high interval. | ||
*/ | ||
export function nearestPowerOfTwo(value: number): number; | ||
export function randInt(low: number, high: number): number; | ||
/** | ||
* @deprecated Use {@link Math#ceilPowerOfTwo .ceilPowerOfTwo()} | ||
* Random float from low to high interval. | ||
*/ | ||
export function nextPowerOfTwo(value: number): number; | ||
export function randFloat(low: number, high: number): number; | ||
export function floorPowerOfTwo(value: number): number; | ||
/** | ||
* Random float from - range / 2 to range / 2 interval. | ||
*/ | ||
export function randFloatSpread(range: number): number; | ||
/** | ||
* Deterministic pseudo-random float in the interval [ 0, 1 ]. | ||
*/ | ||
export function seededRandom(seed?: number): number; | ||
export function degToRad(degrees: number): number; | ||
export function radToDeg(radians: number): number; | ||
export function isPowerOfTwo(value: number): boolean; | ||
export function ceilPowerOfTwo(value: number): number; | ||
export function floorPowerOfTwo(value: number): number; | ||
export function setQuaternionFromProperEuler(q: Quaternion, a: number, b: number, c: number, order: string): void; | ||
export function denormalize( | ||
value: number, | ||
array: Float32Array | Uint32Array | Uint16Array | Uint8Array | Int32Array | Int16Array | Int8Array, | ||
): number; | ||
export function normalize( | ||
value: number, | ||
array: Float32Array | Uint32Array | Uint16Array | Uint8Array | Int32Array | Int16Array | Int8Array, | ||
): number; | ||
export const MathUtils: { | ||
DEG2RAD: typeof DEG2RAD; | ||
RAD2DEG: typeof RAD2DEG; | ||
generateUUID: typeof generateUUID; | ||
clamp: typeof clamp; | ||
euclideanModulo: typeof euclideanModulo; | ||
mapLinear: typeof mapLinear; | ||
inverseLerp: typeof inverseLerp; | ||
lerp: typeof lerp; | ||
damp: typeof damp; | ||
pingpong: typeof pingpong; | ||
smoothstep: typeof smoothstep; | ||
smootherstep: typeof smootherstep; | ||
randInt: typeof randInt; | ||
randFloat: typeof randFloat; | ||
randFloatSpread: typeof randFloatSpread; | ||
seededRandom: typeof seededRandom; | ||
degToRad: typeof degToRad; | ||
radToDeg: typeof radToDeg; | ||
isPowerOfTwo: typeof isPowerOfTwo; | ||
ceilPowerOfTwo: typeof ceilPowerOfTwo; | ||
floorPowerOfTwo: typeof floorPowerOfTwo; | ||
setQuaternionFromProperEuler: typeof setQuaternionFromProperEuler; | ||
normalize: typeof normalize; | ||
denormalize: typeof denormalize; | ||
}; |
// https://threejs.org/docs/#api/en/math/Matrix3 | ||
import { Matrix4 } from './Matrix4'; | ||
import { Vector2 } from './Vector2'; | ||
import { Vector3 } from './Vector3'; | ||
@@ -58,2 +59,16 @@ | ||
constructor(); | ||
/** | ||
* Creates a 3x3 matrix with the given arguments in row-major order. | ||
*/ | ||
constructor( | ||
n11: number, | ||
n12: number, | ||
n13: number, | ||
n21: number, | ||
n22: number, | ||
n23: number, | ||
n31: number, | ||
n32: number, | ||
n33: number, | ||
); | ||
@@ -117,4 +132,4 @@ /** | ||
*/ | ||
makeTranslation(v: Vector2): this; | ||
makeTranslation(x: number, y: number): this; | ||
makeTranslation(x: number, y: number): Matrix3; | ||
@@ -121,0 +136,0 @@ /** |
@@ -5,2 +5,3 @@ import { Vector3 } from './Vector3'; | ||
import { Matrix, Matrix3 } from './Matrix3'; | ||
import { CoordinateSystem } from '../constants'; | ||
@@ -45,3 +46,27 @@ export type Matrix4Tuple = [ | ||
export class Matrix4 implements Matrix { | ||
/** | ||
* Creates an identity matrix. | ||
*/ | ||
constructor(); | ||
/** | ||
* Creates a 4x4 matrix with the given arguments in row-major order. | ||
*/ | ||
constructor( | ||
n11: number, | ||
n12: number, | ||
n13: number, | ||
n14: number, | ||
n21: number, | ||
n22: number, | ||
n23: number, | ||
n24: number, | ||
n31: number, | ||
n32: number, | ||
n33: number, | ||
n34: number, | ||
n41: number, | ||
n42: number, | ||
n43: number, | ||
n44: number, | ||
); | ||
@@ -152,3 +177,4 @@ /** | ||
*/ | ||
makeTranslation(x: number, y: number, z: number): Matrix4; | ||
makeTranslation(v: Vector3): this; | ||
makeTranslation(x: number, y: number, z: number): this; | ||
@@ -206,10 +232,13 @@ /** | ||
/** | ||
* Creates a frustum matrix. | ||
*/ | ||
makePerspective(left: number, right: number, bottom: number, top: number, near: number, far: number): Matrix4; | ||
/** | ||
* Creates a perspective projection matrix. | ||
*/ | ||
makePerspective(fov: number, aspect: number, near: number, far: number): Matrix4; | ||
makePerspective( | ||
left: number, | ||
right: number, | ||
top: number, | ||
bottom: number, | ||
near: number, | ||
far: number, | ||
coordinateSystem?: CoordinateSystem, | ||
): Matrix4; | ||
@@ -219,3 +248,11 @@ /** | ||
*/ | ||
makeOrthographic(left: number, right: number, top: number, bottom: number, near: number, far: number): Matrix4; | ||
makeOrthographic( | ||
left: number, | ||
right: number, | ||
top: number, | ||
bottom: number, | ||
near: number, | ||
far: number, | ||
coordinateSystem?: CoordinateSystem, | ||
): Matrix4; | ||
equals(matrix: Matrix4): boolean; | ||
@@ -222,0 +259,0 @@ |
@@ -451,2 +451,7 @@ import { Matrix3 } from './Matrix3'; | ||
random(): this; | ||
/** | ||
* Iterating through a Vector2 instance will yield its components (x, y) in the corresponding order. | ||
*/ | ||
[Symbol.iterator](): Iterator<number>; | ||
} |
@@ -304,2 +304,7 @@ import { Euler } from './Euler'; | ||
randomDirection(): this; | ||
/** | ||
* Iterating through a Vector3 instance will yield its components (x, y, z) in the corresponding order. | ||
*/ | ||
[Symbol.iterator](): Iterator<number>; | ||
} |
@@ -223,2 +223,7 @@ import { Matrix4 } from './Matrix4'; | ||
random(): this; | ||
/** | ||
* Iterating through a Vector4 instance will yield its components (x, y, z, w) in the corresponding order. | ||
*/ | ||
[Symbol.iterator](): Iterator<number>; | ||
} |
@@ -17,3 +17,3 @@ import { Scene } from './../scenes/Scene'; | ||
import { Material } from './../materials/Material'; | ||
import { ToneMapping, ShadowMapType, CullFace, TextureEncoding, ColorSpace } from '../constants'; | ||
import { ToneMapping, ShadowMapType, CullFace, TextureEncoding, ColorSpace, WebGLCoordinateSystem } from '../constants'; | ||
import { WebXRManager } from '../renderers/webxr/WebXRManager'; | ||
@@ -204,2 +204,4 @@ import { BufferGeometry } from './../core/BufferGeometry'; | ||
get coordinateSystem(): typeof WebGLCoordinateSystem; | ||
/** | ||
@@ -206,0 +208,0 @@ * @default true |
@@ -29,2 +29,3 @@ // https://threejs.org/docs/#api/en/renderers/webxr/WebXRManager | ||
* @default true | ||
* @deprecated | ||
*/ | ||
@@ -34,25 +35,41 @@ cameraAutoUpdate: boolean; | ||
getController(index: number): XRTargetRaySpace; | ||
getControllerGrip(index: number): XRGripSpace; | ||
getHand(index: number): XRHandSpace; | ||
setFramebufferScaleFactor(value: number): void; | ||
setReferenceSpaceType(value: XRReferenceSpaceType): void; | ||
getReferenceSpace(): XRReferenceSpace | null; | ||
setReferenceSpace(value: XRReferenceSpace): void; | ||
getBaseLayer(): XRWebGLLayer | XRProjectionLayer; | ||
getBinding(): XRWebGLBinding; | ||
getFrame(): XRFrame; | ||
getSession(): XRSession | null; | ||
setSession(value: XRSession | null): Promise<void>; | ||
/** | ||
* @deprecated | ||
*/ | ||
getCamera(): WebXRArrayCamera; | ||
updateCamera(camera: PerspectiveCamera): void; | ||
setUserCamera(camera: PerspectiveCamera): void; | ||
updateCameraXR(camera: PerspectiveCamera): void; | ||
setAnimationLoop(callback: XRFrameRequestCallback | null): void; | ||
getFoveation(): number | undefined; | ||
setFoveation(value: number): void; | ||
/** | ||
* Returns the set of planes detected by WebXR's plane detection API. | ||
*/ | ||
getPlanes(): Set<XRPlane>; | ||
dispose(): void; | ||
} |
@@ -9,2 +9,3 @@ import { Texture } from './Texture'; | ||
MinificationTextureFilter, | ||
TextureComparisonFunction, | ||
} from '../constants'; | ||
@@ -99,2 +100,10 @@ | ||
type: TextureDataType; | ||
/** | ||
* This is used to define the comparison function used when comparing texels in the depth texture to the value in | ||
* the depth buffer. Default is `null` which means comparison is disabled. | ||
* | ||
* See {@link THREE.TextureComparisonFunction} for functions. | ||
*/ | ||
compareFunction: TextureComparisonFunction | null; | ||
} |
import { Texture } from './Texture'; | ||
import { MagnificationTextureFilter, MinificationTextureFilter, PixelFormat } from '../constants'; | ||
import { MagnificationTextureFilter, MinificationTextureFilter } from '../constants'; | ||
@@ -35,5 +35,4 @@ /** | ||
* @param height The height of the texture. | ||
* @param format See {@link Texture.format | .format}. Default {@link THREE.RGBAFormat}. | ||
*/ | ||
constructor(width: number, height: number, format: PixelFormat); | ||
constructor(width: number, height: number); | ||
@@ -40,0 +39,0 @@ /** |
@@ -20,2 +20,4 @@ /** | ||
readonly id: number; | ||
/** | ||
@@ -22,0 +24,0 @@ * The actual data of a texture. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
984747
631
25736