@types/three
Advanced tools
Comparing version 0.148.1 to 0.149.0
@@ -16,4 +16,4 @@ import { CubeTexture, Loader, LoadingManager, TextureDataType } from '../../../src/Three'; | ||
): CubeTexture; | ||
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<CubeTexture>; | ||
loadAsync(urls: string[], onProgress?: (event: ProgressEvent) => void): Promise<CubeTexture>; | ||
setDataType(type: TextureDataType): this; | ||
} |
@@ -23,2 +23,3 @@ import { | ||
): void; | ||
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<IFCModel>; | ||
@@ -25,0 +26,0 @@ parse(buffer: ArrayBuffer): Promise<IFCModel>; |
@@ -16,4 +16,5 @@ import { Loader, LoadingManager, Mesh } from '../../../src/Three'; | ||
): void; | ||
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<Mesh>; | ||
parse(buffer: ArrayBuffer | string): THREE.Group; | ||
} |
@@ -18,3 +18,3 @@ import { Data3DTexture, Mesh, Loader, LoadingManager } from '../../../src/Three'; | ||
): void; | ||
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<object[]>; | ||
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<Chunk[]>; | ||
parse(data: ArrayBuffer): object[]; | ||
@@ -21,0 +21,0 @@ } |
@@ -17,2 +17,3 @@ import { Loader, LoadingManager, Texture } from '../../../../src/Three'; | ||
): void; | ||
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<NodeLoaderResult>; | ||
@@ -19,0 +20,0 @@ parseNodes(json: AnyJson): NodeLoaderResult; |
@@ -1,2 +0,2 @@ | ||
// Type definitions for three 0.148 | ||
// Type definitions for three 0.149 | ||
// Project: https://threejs.org/ | ||
@@ -3,0 +3,0 @@ // Definitions by: Josh Ellis <https://github.com/joshuaellis> |
{ | ||
"name": "@types/three", | ||
"version": "0.148.1", | ||
"version": "0.149.0", | ||
"description": "TypeScript definitions for three", | ||
@@ -30,4 +30,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three", | ||
}, | ||
"typesPublisherContentHash": "ee8fd128bc5ae440fcab56b69067c71262d47937aa1ab8a080442efe025e59e5", | ||
"typesPublisherContentHash": "26b43856591e0e71a44773611c3705a12a8926b63542851ba0c85e160758d30b", | ||
"typeScriptVersion": "4.4" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Mon, 23 Jan 2023 18:32:36 GMT | ||
* Last updated: Mon, 30 Jan 2023 20:02:38 GMT | ||
* Dependencies: [@types/webxr](https://npmjs.com/package/@types/webxr) | ||
@@ -14,0 +14,0 @@ * Global values: `THREE` |
@@ -39,5 +39,3 @@ export const REVISION: string; | ||
* Defines which side of faces will be rendered - front, back or both. | ||
* Default is FrontSide. | ||
* | ||
* TwoPassDoubleSide will renderer double-sided transparent materials in two passes in back-front order to mitigate transparency artifacts. | ||
* Default is {@link FrontSide}. | ||
*/ | ||
@@ -48,3 +46,2 @@ export enum Side {} | ||
export const DoubleSide: Side; | ||
export const TwoPassDoubleSide: Side; | ||
@@ -159,3 +156,2 @@ // blending modes | ||
export const AlphaFormat: PixelFormat; | ||
export const RGBFormat: PixelFormat; | ||
export const RGBAFormat: PixelFormat; | ||
@@ -276,2 +272,8 @@ export const LuminanceFormat: PixelFormat; | ||
// RGTC compressed texture formats | ||
export const RED_RGTC1_Format: CompressedPixelFormat; | ||
export const SIGNED_RED_RGTC1_Format: CompressedPixelFormat; | ||
export const RED_GREEN_RGTC2_Format: CompressedPixelFormat; | ||
export const SIGNED_RED_GREEN_RGTC2_Format: CompressedPixelFormat; | ||
// Loop styles for AnimationAction | ||
@@ -278,0 +280,0 @@ export enum AnimationActionLoopStyles {} |
import { BufferAttribute } from './BufferAttribute'; | ||
import { InterleavedBufferAttribute } from './InterleavedBufferAttribute'; | ||
import { GLBufferAttribute } from './GLBufferAttribute'; | ||
import { Box3 } from './../math/Box3'; | ||
@@ -9,3 +11,2 @@ import { Sphere } from './../math/Sphere'; | ||
import { EventDispatcher } from './EventDispatcher'; | ||
import { InterleavedBufferAttribute } from './InterleavedBufferAttribute'; | ||
import { BuiltinShaderAttributeName } from '../constants'; | ||
@@ -51,3 +52,3 @@ | ||
attributes: { | ||
[name: string]: BufferAttribute | InterleavedBufferAttribute; | ||
[name: string]: BufferAttribute | InterleavedBufferAttribute | GLBufferAttribute; | ||
}; | ||
@@ -98,5 +99,7 @@ | ||
name: BuiltinShaderAttributeName | (string & {}), | ||
attribute: BufferAttribute | InterleavedBufferAttribute, | ||
attribute: BufferAttribute | InterleavedBufferAttribute | GLBufferAttribute, | ||
): BufferGeometry; | ||
getAttribute(name: BuiltinShaderAttributeName | (string & {})): BufferAttribute | InterleavedBufferAttribute; | ||
getAttribute( | ||
name: BuiltinShaderAttributeName | (string & {}), | ||
): BufferAttribute | InterleavedBufferAttribute | GLBufferAttribute; | ||
deleteAttribute(name: BuiltinShaderAttributeName | (string & {})): BufferGeometry; | ||
@@ -103,0 +106,0 @@ hasAttribute(name: BuiltinShaderAttributeName | (string & {})): boolean; |
@@ -8,2 +8,6 @@ /** | ||
/** | ||
* @default '' | ||
*/ | ||
name: string; | ||
buffer: WebGLBuffer; | ||
@@ -10,0 +14,0 @@ type: number; |
@@ -54,4 +54,7 @@ import { Vector3 } from './../math/Vector3'; | ||
/** | ||
* Up direction. | ||
* @default THREE.Object3D.DefaultUp.clone() | ||
* This is used by the {@link lookAt} method, for example, to determine the orientation of the result. | ||
* | ||
* Default is {@link Object3D.DEFAULT_UP} - that is, `( 0, 1, 0 )`. | ||
* | ||
* @default {@link Object3D.DEFAULT_UP} | ||
*/ | ||
@@ -107,5 +110,4 @@ up: Vector3; | ||
/** | ||
* 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 | ||
* When this is set, it calculates the matrix of position, (rotation or quaternion) and | ||
* scale every frame and also recalculates the matrixWorld property. Default is {@link Object3D.DEFAULT_MATRIX_AUTO_UPDATE} (true). | ||
*/ | ||
@@ -115,5 +117,5 @@ matrixAutoUpdate: boolean; | ||
/** | ||
* When this is set, the renderer checks every frame if the object and its children need matrix updates. | ||
* Otherwise, you have to maintain all matrices in the object and its children yourself. | ||
* @default THREE.Object3D.DefaultMatrixWorldAutoUpdate | ||
* If set, then the renderer checks every frame if the object and its children need matrix updates. | ||
* When it isn't, then you have to maintain all matrices in the object and its children yourself. | ||
* Default is {@link Object3D.DEFAULT_MATRIX_WORLD_AUTO_UPDATE} (true). | ||
*/ | ||
@@ -221,7 +223,21 @@ matrixWorldAutoUpdate: boolean; | ||
static DefaultUp: Vector3; | ||
static DefaultMatrixAutoUpdate: boolean; | ||
static DefaultMatrixWorldAutoUpdate: boolean; | ||
/** | ||
* The default {@link up} direction for objects, also used as the default position for {@link DirectionalLight}, | ||
* {@link HemisphereLight} and {@link Spotlight} (which creates lights shining from the top down). | ||
* | ||
* Set to ( 0, 1, 0 ) by default. | ||
*/ | ||
static DEFAULT_UP: Vector3; | ||
/** | ||
* The default setting for {@link matrixAutoUpdate} for newly created Object3Ds. | ||
*/ | ||
static DEFAULT_MATRIX_AUTO_UPDATE: boolean; | ||
/** | ||
* The default setting for {@link matrixWorldAutoUpdate} for newly created Object3Ds. | ||
*/ | ||
static DEFAULT_MATRIX_WORLD_AUTO_UPDATE: boolean; | ||
/** | ||
* Applies the matrix transform to the object and updates the object's position, rotation and scale. | ||
@@ -228,0 +244,0 @@ */ |
@@ -1,7 +0,7 @@ | ||
export class Uniform { | ||
constructor(value: any); | ||
export class Uniform<T = any> { | ||
constructor(value: T); | ||
/** | ||
* @deprecated | ||
*/ | ||
constructor(type: string, value: any); | ||
constructor(type: string, value: T); | ||
/** | ||
@@ -11,3 +11,3 @@ * @deprecated | ||
type: string; | ||
value: any; | ||
value: T; | ||
/** | ||
@@ -21,3 +21,3 @@ * @deprecated Use {@link Object3D#onBeforeRender object.onBeforeRender()} instead. | ||
*/ | ||
onUpdate(callback: () => void): Uniform; | ||
onUpdate(callback: () => void): Uniform<T>; | ||
} |
@@ -0,11 +1,42 @@ | ||
import { Color } from '../math/Color'; | ||
import { Matrix4 } from '../math/Matrix4'; | ||
import { Camera } from './../cameras/Camera'; | ||
import { LineSegments } from './../objects/LineSegments'; | ||
/** | ||
* This helps with visualizing what a camera contains in its frustum. | ||
* It visualizes the frustum of a camera using a {@link LineSegments}. | ||
* | ||
* CameraHelper must be a child of the scene. | ||
*/ | ||
export class CameraHelper extends LineSegments { | ||
/** | ||
* This create a new CameraHelper for the specified camera. | ||
* | ||
* @param camera - The camera to visualize. | ||
*/ | ||
constructor(camera: Camera); | ||
/** | ||
* The camera being visualized. | ||
*/ | ||
camera: Camera; | ||
/** | ||
* This contains the points used to visualize the camera. | ||
*/ | ||
pointMap: { [id: string]: number[] }; | ||
/** | ||
* Reference to the {@link Camera.matrixWorld}. | ||
*/ | ||
matrix: Matrix4; | ||
/** | ||
* See {@link Object3D.matrixAutoUpdate}. | ||
* Set to `false` here as the helper is using the camera's {@link Camera.matrixWorld}. | ||
*/ | ||
matrixAutoUpdate: boolean; | ||
/** | ||
* @default 'CameraHelper' | ||
@@ -15,5 +46,17 @@ */ | ||
/** | ||
* Updates the helper based on the projectionMatrix of the camera. | ||
*/ | ||
update(): void; | ||
/** | ||
* Frees the GPU-related resources allocated by this instance. | ||
* Call this method whenever this instance is no longer used in your app. | ||
*/ | ||
dispose(): void; | ||
/** | ||
* Defines the colors of the helper. | ||
*/ | ||
setColors(frustum: Color, cone: Color, up: Color, target: Color, cross: Color): this; | ||
} |
@@ -25,3 +25,5 @@ import { Object3D } from './../core/Object3D'; | ||
/** | ||
* @default THREE.Object3D.DefaultUp | ||
* This is set equal to {@link Object3D.DEFAULT_UP} (0, 1, 0), so that the light shines from the top down. | ||
* | ||
* @default {@link Object3D.DEFAULT_UP} | ||
*/ | ||
@@ -28,0 +30,0 @@ readonly position: Vector3; |
@@ -20,3 +20,5 @@ import { Color } from './../math/Color'; | ||
/** | ||
* @default THREE.Object3D.DefaultUp | ||
* This is set equal to {@link Object3D.DEFAULT_UP} (0, 1, 0), so that the light shines from the top down. | ||
* | ||
* @default {@link Object3D.DEFAULT_UP} | ||
*/ | ||
@@ -23,0 +25,0 @@ position: Vector3; |
@@ -28,3 +28,5 @@ import { Color } from './../math/Color'; | ||
/** | ||
* @default THREE.Object3D.DefaultUp | ||
* This is set equal to {@link Object3D.DEFAULT_UP} (0, 1, 0), so that the light shines from the top down. | ||
* | ||
* @default {@link Object3D.DEFAULT_UP} | ||
*/ | ||
@@ -31,0 +33,0 @@ position: Vector3; |
@@ -15,3 +15,3 @@ import { Loader } from './Loader'; | ||
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<CubeTexture>; | ||
loadAsync(urls: string[], onProgress?: (event: ProgressEvent) => void): Promise<CubeTexture>; | ||
} |
@@ -37,7 +37,6 @@ import { LoadingManager } from './LoadingManager'; | ||
load(): void; | ||
loadAsync(): Promise<unknown>; | ||
parse(): void; | ||
*/ | ||
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<any>; | ||
setCrossOrigin(crossOrigin: string): this; | ||
@@ -44,0 +43,0 @@ setWithCredentials(value: boolean): this; |
@@ -42,2 +42,3 @@ import { Plane } from './../math/Plane'; | ||
premultipliedAlpha?: boolean | undefined; | ||
forceSinglePass?: boolean | undefined; | ||
dithering?: boolean | undefined; | ||
@@ -288,2 +289,7 @@ side?: Side | undefined; | ||
/** | ||
* @default false | ||
*/ | ||
forceSinglePass: boolean; | ||
/** | ||
* Whether to apply dithering to the color to remove the appearance of banding. Default is false. | ||
@@ -296,4 +302,5 @@ * @default false | ||
* 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 | ||
* Default is {@link THREE.FrontSide}. Other options are {@link THREE.BackSide} and {@link THREE.DoubleSide}. | ||
* | ||
* @default {@link THREE.FrontSide} | ||
*/ | ||
@@ -300,0 +307,0 @@ side: Side; |
@@ -26,3 +26,3 @@ import { Matrix4 } from './Matrix4'; | ||
/** | ||
* @default THREE.Euler.DefaultOrder | ||
* @default THREE.Euler.DEFAULT_ORDER | ||
*/ | ||
@@ -46,6 +46,5 @@ order: EulerOrder; | ||
static RotationOrders: EulerOrder[]; | ||
static DefaultOrder: 'XYZ'; | ||
static DEFAULT_ORDER: 'XYZ'; | ||
[Symbol.iterator](): Generator<string | number, void>; | ||
} |
@@ -24,8 +24,8 @@ import { Material } from './../materials/Material'; | ||
/** | ||
* Get the current position of the indicated vertex in local space, | ||
* Get the local-space position of the vertex at the given index, | ||
* taking into account the current animation state of both morph targets and skinning. | ||
*/ | ||
getVertexPosition(vert: number, target: Vector3): Vector3; | ||
getVertexPosition(index: number, target: Vector3): Vector3; | ||
raycast(raycaster: Raycaster, intersects: Intersection[]): void; | ||
} |
import { WebGLCapabilities } from './WebGLCapabilities'; | ||
import { BufferAttribute } from '../../core/BufferAttribute'; | ||
import { InterleavedBufferAttribute } from '../../core/InterleavedBufferAttribute'; | ||
import { GLBufferAttribute } from '../../core/GLBufferAttribute'; | ||
@@ -8,3 +9,3 @@ export class WebGLAttributes { | ||
get(attribute: BufferAttribute | InterleavedBufferAttribute): { | ||
get(attribute: BufferAttribute | InterleavedBufferAttribute | GLBufferAttribute): { | ||
buffer: WebGLBuffer; | ||
@@ -16,5 +17,5 @@ type: number; | ||
remove(attribute: BufferAttribute | InterleavedBufferAttribute): void; | ||
remove(attribute: BufferAttribute | InterleavedBufferAttribute | GLBufferAttribute): void; | ||
update(attribute: BufferAttribute | InterleavedBufferAttribute, bufferType: number): void; | ||
update(attribute: BufferAttribute | InterleavedBufferAttribute | GLBufferAttribute, bufferType: number): void; | ||
} |
import { Camera } from './../../cameras/Camera'; | ||
import { Material } from './../../materials/Material'; | ||
import { Plane } from '../../math/Plane'; | ||
import { WebGLProperties } from './WebGLProperties'; | ||
@@ -20,6 +21,7 @@ | ||
init(planes: any[], enableLocalClipping: boolean, camera: Camera): boolean; | ||
init(planes: any[], enableLocalClipping: boolean): boolean; | ||
beginShadows(): void; | ||
endShadows(): void; | ||
setGlobalState(planes: Plane[], camera: Camera): void; | ||
setState(material: Material, camera: Camera, useCache: boolean): void; | ||
} |
@@ -43,3 +43,3 @@ // https://threejs.org/docs/#api/en/renderers/webxr/WebXRManager | ||
getSession(): XRSession | null; | ||
setSession(value: XRSession): Promise<void>; | ||
setSession(value: XRSession | null): Promise<void>; | ||
getCamera(): WebXRArrayCamera; | ||
@@ -49,3 +49,3 @@ updateCamera(camera: PerspectiveCamera): void; | ||
getFoveation(): number | undefined; | ||
setFoveation(foveation: number): void; | ||
setFoveation(value: number): void; | ||
@@ -52,0 +52,0 @@ /** |
import { Texture } from './Texture'; | ||
import { TextureFilter } from '../constants'; | ||
import { TextureFilter, Wrapping } from '../constants'; | ||
@@ -20,3 +20,3 @@ export class Data3DTexture extends Texture { | ||
*/ | ||
wrapR: boolean; | ||
wrapR: Wrapping; | ||
@@ -23,0 +23,0 @@ /** |
@@ -69,3 +69,3 @@ /** | ||
export * from './extras/core/Curve'; | ||
export * from './extras/DataUtils'; | ||
export * as DataUtils from './extras/DataUtils'; | ||
export * from './extras/Earcut'; | ||
@@ -183,3 +183,2 @@ export * from './extras/ImageUtils'; | ||
*/ | ||
export * from './renderers/WebGLMultisampleRenderTarget'; | ||
export * from './renderers/WebGLCubeRenderTarget'; | ||
@@ -231,4 +230,2 @@ export * from './renderers/WebGLMultipleRenderTargets'; | ||
export * from './textures/DataTexture'; | ||
export * from './textures/DataTexture2DArray'; | ||
export * from './textures/DataTexture3D'; | ||
export * from './textures/CompressedTexture'; | ||
@@ -235,0 +232,0 @@ export * from './textures/CubeTexture'; |
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
691461
20712
627