@types/three
Advanced tools
Comparing version 0.146.0 to 0.147.0
@@ -1,2 +0,2 @@ | ||
import { Object3D, SkinnedMesh } from '../../../src/Three'; | ||
import { Object3D, SkinnedMesh, Vector3 } from '../../../src/Three'; | ||
@@ -7,6 +7,10 @@ // tslint:disable-next-line:interface-name | ||
iteration: number; | ||
links: { | ||
links: Array<{ | ||
enabled: boolean; | ||
index: number; | ||
}; | ||
limitation?: Vector3; | ||
rotationMin?: Vector3; | ||
rotationMax?: Vector3; | ||
}>; | ||
minAngle: number; | ||
maxAngle: number; | ||
@@ -13,0 +17,0 @@ target: number; |
import { Camera, MOUSE, TOUCH, Vector3 } from '../../../src/Three'; | ||
/** | ||
* Orbit controls allow the camera to orbit around a target. | ||
* @param object - The camera to be controlled. The camera must not | ||
* be a child of another object, unless that object is the scene itself. | ||
* @param domElement - The HTML element used for | ||
* event listeners. | ||
*/ | ||
export class OrbitControls { | ||
constructor(object: Camera, domElement?: HTMLElement); | ||
/** | ||
* The camera being controlled. | ||
*/ | ||
object: Camera; | ||
/** | ||
* The HTMLElement used to listen for mouse / touch events. | ||
* This must be passed in the constructor; | ||
* changing it here will not set up new event listeners. | ||
*/ | ||
domElement: HTMLElement | Document; | ||
// API | ||
/** | ||
* When set to `false`, the controls will not respond to user input. | ||
* @default true | ||
*/ | ||
enabled: boolean; | ||
/** | ||
* The focus point of the controls, the .object orbits around this. | ||
* It can be updated manually at any point to change the focus | ||
* of the controls. | ||
*/ | ||
target: Vector3; | ||
// deprecated | ||
/** @deprecated */ | ||
center: Vector3; | ||
/** | ||
* How far you can dolly in ( PerspectiveCamera only ). | ||
* @default 0 | ||
*/ | ||
minDistance: number; | ||
/** | ||
* How far you can dolly out ( PerspectiveCamera only ). | ||
* @default Infinity | ||
*/ | ||
maxDistance: number; | ||
/** | ||
* How far you can zoom in ( OrthographicCamera only ). | ||
* @default 0 | ||
*/ | ||
minZoom: number; | ||
/** | ||
* How far you can zoom out ( OrthographicCamera only ). | ||
* @default Infinity | ||
*/ | ||
maxZoom: number; | ||
/** | ||
* How far you can orbit vertically, lower limit. | ||
* Range is 0 to Math.PI radians. | ||
* @default 0 | ||
*/ | ||
minPolarAngle: number; | ||
/** | ||
* How far you can orbit vertically, upper limit. | ||
* Range is 0 to Math.PI radians. | ||
* @default Math.PI. | ||
*/ | ||
maxPolarAngle: number; | ||
/** | ||
* How far you can orbit horizontally, lower limit. | ||
* If set, the interval [ min, max ] | ||
* must be a sub-interval of [ - 2 PI, 2 PI ], | ||
* with ( max - min < 2 PI ). | ||
* @default Infinity | ||
*/ | ||
minAzimuthAngle: number; | ||
/** | ||
* How far you can orbit horizontally, upper limit. | ||
* If set, the interval [ min, max ] must be a sub-interval | ||
* of [ - 2 PI, 2 PI ], with ( max - min < 2 PI ). | ||
* @default Infinity | ||
*/ | ||
maxAzimuthAngle: number; | ||
/** | ||
* Set to true to enable damping (inertia), which can | ||
* be used to give a sense of weight to the controls. | ||
* Note that if this is enabled, you must call | ||
* .update () in your animation loop. | ||
* @default false | ||
*/ | ||
enableDamping: boolean; | ||
/** | ||
* The damping inertia used if .enableDamping is set to true. | ||
* Note that for this to work, | ||
* you must call .update () in your animation loop. | ||
* @default 0.05 | ||
*/ | ||
dampingFactor: number; | ||
/** | ||
* Enable or disable zooming (dollying) of the camera. | ||
* @default true | ||
*/ | ||
enableZoom: boolean; | ||
/** | ||
* Speed of zooming / dollying. | ||
* @default 1 | ||
*/ | ||
zoomSpeed: number; | ||
/** | ||
* Enable or disable horizontal and | ||
* vertical rotation of the camera. | ||
* Note that it is possible to disable a single axis | ||
* by setting the min and max of the polar angle or | ||
* azimuth angle to the same value, which will cause | ||
* the vertical or horizontal rotation to be fixed at that value. | ||
* @default true | ||
*/ | ||
enableRotate: boolean; | ||
/** | ||
* Speed of rotation. | ||
* @default 1 | ||
*/ | ||
rotateSpeed: number; | ||
/** | ||
* Enable or disable camera panning. | ||
* @default true | ||
*/ | ||
enablePan: boolean; | ||
/** | ||
* Speed of panning. | ||
* @default 1 | ||
*/ | ||
panSpeed: number; | ||
/** | ||
* Defines how the camera's position is translated when panning. | ||
* If true, the camera pans in screen space. Otherwise, | ||
* the camera pans in the plane orthogonal to the camera's | ||
* up direction. Default is true for OrbitControls; false for MapControls. | ||
* @default true | ||
*/ | ||
screenSpacePanning: boolean; | ||
/** | ||
* How fast to pan the camera when the keyboard is used. | ||
* Default is 7.0 pixels per keypress. | ||
* @default 7 | ||
*/ | ||
keyPanSpeed: number; | ||
/** | ||
* Set to true to automatically rotate around the target. | ||
* Note that if this is enabled, you must call | ||
* .update () in your animation loop. | ||
*/ | ||
autoRotate: boolean; | ||
/** | ||
* How fast to rotate around the target if .autoRotate is true. | ||
* Default is 2.0, which equates to 30 seconds per orbit at 60fps. | ||
* Note that if .autoRotate is enabled, you must call | ||
* .update () in your animation loop. | ||
* @default 2 | ||
*/ | ||
autoRotateSpeed: number; | ||
/** | ||
* This object contains references to the keycodes for controlling | ||
* camera panning. Default is the 4 arrow keys. | ||
*/ | ||
keys: { LEFT: string; UP: string; RIGHT: string; BOTTOM: string }; | ||
/** | ||
* This object contains references to the mouse actions used | ||
* by the controls. | ||
*/ | ||
mouseButtons: Partial<{ LEFT: MOUSE; MIDDLE: MOUSE; RIGHT: MOUSE }>; | ||
/** | ||
* This object contains references to the touch actions used by | ||
* the controls. | ||
*/ | ||
touches: Partial<{ ONE: TOUCH; TWO: TOUCH }>; | ||
/** | ||
* Used internally by the .saveState and .reset methods. | ||
*/ | ||
target0: Vector3; | ||
/** | ||
* Used internally by the .saveState and .reset methods. | ||
*/ | ||
position0: Vector3; | ||
/** | ||
* Used internally by the .saveState and .reset methods. | ||
*/ | ||
zoomO: number; | ||
/** | ||
* Update the controls. Must be called after any manual changes | ||
* to the camera's transform, or in the update loop if .autoRotate | ||
* or .enableDamping are set. | ||
*/ | ||
update(): boolean; | ||
/** | ||
* Adds key event listeners to the given DOM element. `window` | ||
* is a recommended argument for using this method. | ||
* @param domElement | ||
*/ | ||
listenToKeyEvents(domElement: HTMLElement | Window): void; | ||
/** | ||
* Save the current state of the controls. This can later be | ||
* recovered with .reset. | ||
*/ | ||
saveState(): void; | ||
/** | ||
* Reset the controls to their state from either the last time | ||
* the .saveState was called, or the initial state. | ||
*/ | ||
reset(): void; | ||
/** | ||
* Remove all the event listeners. | ||
*/ | ||
dispose(): void; | ||
/** | ||
* Get the current vertical rotation, in radians. | ||
*/ | ||
getPolarAngle(): number; | ||
/** | ||
* Get the current horizontal rotation, in radians. | ||
*/ | ||
getAzimuthalAngle(): number; | ||
/** | ||
* Returns the distance from the camera to the target. | ||
*/ | ||
getDistance(): number; | ||
@@ -68,0 +264,0 @@ |
@@ -15,2 +15,3 @@ import { WebGLRenderer, Vector2 } from '../../../src/Three'; | ||
onSelectOver(event: Event): void; | ||
dispose(): void; | ||
} |
@@ -6,2 +6,3 @@ import { BufferGeometry, Loader, LoadingManager } from '../../../src/Three'; | ||
propertyNameMapping: object; | ||
customPropertyMapping: Record<string, any>; | ||
@@ -16,3 +17,4 @@ load( | ||
setPropertyNameMapping(mapping: object): void; | ||
setCustomPropertyNameMapping(mapping: Record<string, any>): void; | ||
parse(data: ArrayBuffer | string): BufferGeometry; | ||
} |
@@ -77,2 +77,6 @@ import { | ||
abstract getFragCoord(): string; | ||
isFlipY(): boolean; | ||
abstract getTexture(textureProperty: string, uvSnippet: string): string; | ||
@@ -79,0 +83,0 @@ |
@@ -64,2 +64,3 @@ // core | ||
import ToneMappingNode from './display/ToneMappingNode'; | ||
import ViewportNode from './display/ViewportNode'; | ||
@@ -190,2 +191,3 @@ // math | ||
ToneMappingNode, | ||
ViewportNode, | ||
// math | ||
@@ -192,0 +194,0 @@ MathNode, |
@@ -38,2 +38,3 @@ import Node from '../core/Node'; | ||
TriplanarTexturesNode, | ||
ViewportNode, | ||
} from '../Nodes'; | ||
@@ -103,2 +104,9 @@ | ||
export const viewportCoordinate: Swizzable<ViewportNode>; | ||
export const viewportResolution: Swizzable<ViewportNode>; | ||
export const viewportTopLeft: Swizzable<ViewportNode>; | ||
export const viewportBottomLeft: Swizzable<ViewportNode>; | ||
export const viewportTopRight: Swizzable<ViewportNode>; | ||
export const viewportBottomRight: Swizzable<ViewportNode>; | ||
// lighting | ||
@@ -105,0 +113,0 @@ |
@@ -1,7 +0,10 @@ | ||
import { Mesh, Plane, Vector4 } from '../../../src/Three'; | ||
import { Mesh, Plane, Vector4, Matrix4, MeshBasicMaterial, BufferGeometry } from '../../../src/Three'; | ||
export class ShadowMesh extends Mesh { | ||
constructor(); | ||
export class ShadowMesh extends Mesh<BufferGeometry, MeshBasicMaterial> { | ||
readonly isShadowMesh: true; | ||
meshMatrix: Matrix4; | ||
constructor(mesh: Mesh); | ||
update(plane: Plane, lightPosition4D: Vector4): void; | ||
} |
import { WebGLRenderTarget, ShaderMaterial } from '../../../src/Three'; | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
@@ -19,3 +19,3 @@ export class AdaptiveToneMappingPass extends Pass { | ||
materialToneMap: ShaderMaterial; | ||
fsQuad: object; | ||
fsQuad: FullScreenQuad; | ||
@@ -22,0 +22,0 @@ reset(): void; |
import { WebGLRenderTarget, ShaderMaterial } from '../../../src/Three'; | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
@@ -12,4 +12,4 @@ export class AfterimagePass extends Pass { | ||
shaderMaterial: ShaderMaterial; | ||
compFsQuad: object; | ||
copyFsQuad: object; | ||
compFsQuad: FullScreenQuad; | ||
copyFsQuad: FullScreenQuad; | ||
} |
import { WebGLRenderTarget, ShaderMaterial } from '../../../src/Three'; | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
@@ -13,3 +13,3 @@ export class BloomPass extends Pass { | ||
materialConvolution: ShaderMaterial; | ||
fsQuad: object; | ||
fsQuad: FullScreenQuad; | ||
} |
import { Scene, Camera, ShaderMaterial, WebGLRenderTarget, MeshDepthMaterial, Color } from '../../../src/Three'; | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
@@ -21,4 +21,4 @@ export interface BokehPassParamters { | ||
uniforms: object; | ||
fsQuad: object; | ||
fsQuad: FullScreenQuad; | ||
oldClearColor: Color; | ||
} |
import { ColorRepresentation } from '../../../src/Three'; | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
@@ -5,0 +5,0 @@ export class ClearPass extends Pass { |
import { PerspectiveCamera, CubeTexture, Mesh, Scene } from '../../../src/Three'; | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
@@ -5,0 +5,0 @@ export class CubeTexturePass extends Pass { |
import { Vector2, ShaderMaterial } from '../../../src/Three'; | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
@@ -9,3 +9,3 @@ export class DotScreenPass extends Pass { | ||
material: ShaderMaterial; | ||
fsQuad: object; | ||
fsQuad: FullScreenQuad; | ||
} |
import { Clock, WebGLRenderer, WebGLRenderTarget } from '../../../src/Three'; | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
import { ShaderPass } from './ShaderPass'; | ||
@@ -5,0 +5,0 @@ |
import { ShaderMaterial } from '../../../src/Three'; | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
@@ -9,3 +9,3 @@ export class FilmPass extends Pass { | ||
material: ShaderMaterial; | ||
fsQuad: object; | ||
fsQuad: FullScreenQuad; | ||
} |
import { ShaderMaterial, DataTexture } from '../../../src/Three'; | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
@@ -9,3 +9,3 @@ export class GlitchPass extends Pass { | ||
material: ShaderMaterial; | ||
fsQuad: object; | ||
fsQuad: FullScreenQuad; | ||
goWild: boolean; | ||
@@ -12,0 +12,0 @@ curF: number; |
import { ShaderMaterial } from '../../../src/Three'; | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
@@ -22,3 +22,3 @@ export interface HalftonePassParameters { | ||
material: ShaderMaterial; | ||
fsQuad: object; | ||
fsQuad: FullScreenQuad; | ||
} |
import { Scene, Camera } from '../../../src/Three'; | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
@@ -5,0 +5,0 @@ export class MaskPass extends Pass { |
@@ -15,3 +15,3 @@ import { | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
@@ -52,3 +52,3 @@ export class OutlinePass extends Pass { | ||
oldClearAlpha: number; | ||
fsQuad: object; | ||
fsQuad: FullScreenQuad; | ||
tempPulseColor1: Color; | ||
@@ -55,0 +55,0 @@ tempPulseColor2: Color; |
import { Scene, Camera, Material, Color } from '../../../src/Three'; | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
@@ -5,0 +5,0 @@ export class RenderPass extends Pass { |
@@ -15,3 +15,3 @@ import { | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
@@ -61,3 +61,3 @@ export enum OUTPUT { | ||
depthCopy: ShaderMaterial; | ||
fsQuad: object; | ||
fsQuad: FullScreenQuad; | ||
params: SAOPassParams; | ||
@@ -64,0 +64,0 @@ |
import { ShaderMaterial, WebGLRenderTarget } from '../../../src/Three'; | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
@@ -11,3 +11,3 @@ export class SavePass extends Pass { | ||
material: ShaderMaterial; | ||
fsQuad: object; | ||
fsQuad: FullScreenQuad; | ||
} |
import { ShaderMaterial } from '../../../src/Three'; | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
@@ -10,3 +10,3 @@ export class ShaderPass extends Pass { | ||
material: ShaderMaterial; | ||
fsQuad: object; | ||
fsQuad: FullScreenQuad; | ||
} |
import { ShaderMaterial, Texture, WebGLRenderTarget } from '../../../src/Three'; | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
@@ -17,3 +17,3 @@ export class SMAAPass extends Pass { | ||
materialBlend: ShaderMaterial; | ||
fsQuad: object; | ||
fsQuad: FullScreenQuad; | ||
@@ -20,0 +20,0 @@ getAreaTexture(): string; |
import { Scene, Camera, ColorRepresentation, ShaderMaterial, WebGLRenderTarget } from '../../../src/Three'; | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
@@ -15,4 +15,4 @@ export class SSAARenderPass extends Pass { | ||
copyMaterial: ShaderMaterial; | ||
fsQuad: object; | ||
fsQuad: FullScreenQuad; | ||
sampleRenderTarget: undefined | WebGLRenderTarget; | ||
} |
@@ -15,3 +15,3 @@ import { | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
@@ -50,3 +50,3 @@ export enum SSAOPassOUTPUT { | ||
copyMaterial: ShaderMaterial; | ||
fsQuad: object; | ||
fsQuad: FullScreenQuad; | ||
originalClearColor: Color; | ||
@@ -53,0 +53,0 @@ |
import { Texture, ShaderMaterial } from '../../../src/Three'; | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
@@ -11,3 +11,3 @@ export class TexturePass extends Pass { | ||
material: ShaderMaterial; | ||
fsQuad: object; | ||
fsQuad: FullScreenQuad; | ||
} |
import { Color, MeshBasicMaterial, ShaderMaterial, Vector2, Vector3, WebGLRenderTarget } from '../../../src/Three'; | ||
import { Pass } from './Pass'; | ||
import { Pass, FullScreenQuad } from './Pass'; | ||
@@ -26,3 +26,3 @@ export class UnrealBloomPass extends Pass { | ||
basic: MeshBasicMaterial; | ||
fsQuad: object; | ||
fsQuad: FullScreenQuad; | ||
@@ -29,0 +29,0 @@ dispose(): void; |
import NodeBuilder from '../../../nodes/core/NodeBuilder'; | ||
import { Texture, TextureEncoding, Renderer, Object3D } from '../../../../../src/Three'; | ||
import { Renderer, Object3D } from '../../../../../src/Three'; | ||
import Node from '../../../nodes/core/Node'; | ||
@@ -47,6 +47,7 @@ import SlotNode from './SlotNode'; | ||
parseInclude(shaderStage: string, ...includes: string[]): void; | ||
getTextureEncodingFromMap(map: Texture): TextureEncoding; | ||
getInstanceIndex(): string; | ||
getFrontFacing(): string; | ||
getFragCoord(): 'gl_FragCoord'; | ||
isFlipY(): true; | ||
@@ -53,0 +54,0 @@ buildCode(): void; |
@@ -0,1 +1,3 @@ | ||
// https://threejs.org/docs/?q=buffergeome#examples/en/utils/BufferGeometryUtils | ||
import { | ||
@@ -27,1 +29,9 @@ BufferAttribute, | ||
export function deinterleaveGeometry(geometry: BufferGeometry): void; | ||
/** | ||
* Creates a new, non-indexed geometry with smooth normals everywhere except faces that meet at an angle greater than the crease angle. | ||
* | ||
* @param geometry The input geometry. | ||
* @param creaseAngle The crease angle. | ||
*/ | ||
export function toCreasedNormals(geometry: BufferGeometry, creaseAngle?: number): BufferGeometry; |
@@ -10,3 +10,3 @@ import 'webxr'; | ||
Raycaster, | ||
SphereBufferGeometry, | ||
SphereGeometry, | ||
Texture, | ||
@@ -34,3 +34,3 @@ Vector3, | ||
cursorObject: Mesh<SphereBufferGeometry, MeshBasicMaterial> | null; | ||
cursorObject: Mesh<SphereGeometry, MeshBasicMaterial> | null; | ||
@@ -37,0 +37,0 @@ raycaster: Raycaster; |
@@ -1,2 +0,2 @@ | ||
// Type definitions for three 0.146 | ||
// Type definitions for three 0.147 | ||
// Project: https://threejs.org/ | ||
@@ -3,0 +3,0 @@ // Definitions by: Josh Ellis <https://github.com/joshuaellis> |
{ | ||
"name": "@types/three", | ||
"version": "0.146.0", | ||
"version": "0.147.0", | ||
"description": "TypeScript definitions for three", | ||
@@ -30,4 +30,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three", | ||
}, | ||
"typesPublisherContentHash": "8811cec6dcb6daed91e5163eee03aeed7a0b56ad67126ce3b6ade0354b3d8614", | ||
"typeScriptVersion": "4.1" | ||
"typesPublisherContentHash": "ada9d7ae4579346a43c927cb2bb915136e542a27b0d12fd83ad85b97b699d134", | ||
"typeScriptVersion": "4.2" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
### Additional Details | ||
* Last updated: Mon, 07 Nov 2022 20:26:35 GMT | ||
* Last updated: Thu, 29 Dec 2022 19:32:53 GMT | ||
* Dependencies: [@types/webxr](https://npmjs.com/package/@types/webxr) | ||
@@ -14,0 +14,0 @@ * Global values: `THREE` |
@@ -21,3 +21,3 @@ import { ColorRepresentation } from '../utils'; | ||
* Light's intensity. | ||
* @default 1 | ||
* @default 2 | ||
*/ | ||
@@ -24,0 +24,0 @@ intensity: number; |
@@ -7,2 +7,3 @@ import { Color } from './../math/Color'; | ||
import { ColorRepresentation } from '../utils'; | ||
import { Texture } from '../textures/Texture'; | ||
@@ -40,3 +41,3 @@ /** | ||
* Light's intensity. | ||
* @default 1 | ||
* @default 2 | ||
*/ | ||
@@ -73,3 +74,8 @@ intensity: number; | ||
/** | ||
* @default null | ||
*/ | ||
map: Texture | null; | ||
readonly isSpotLight: true; | ||
} |
@@ -0,1 +1,3 @@ | ||
// https://threejs.org/docs/#api/en/math/Matrix3 | ||
import { Matrix4 } from './Matrix4'; | ||
@@ -102,2 +104,46 @@ import { Vector3 } from './Vector3'; | ||
/** | ||
* Sets this matrix as a 2D translation transform: | ||
* | ||
* ``` | ||
* 1, 0, x, | ||
* 0, 1, y, | ||
* 0, 0, 1 | ||
* ``` | ||
* | ||
* @param x the amount to translate in the X axis. | ||
* @param y the amount to translate in the Y axis. | ||
*/ | ||
makeTranslation(x: number, y: number): this; | ||
makeTranslation(x: number, y: number): Matrix3; | ||
/** | ||
* Sets this matrix as a 2D rotational transformation by theta radians. The resulting matrix will be: | ||
* | ||
* ``` | ||
* cos(θ) -sin(θ) 0 | ||
* sin(θ) cos(θ) 0 | ||
* 0 0 1 | ||
* ``` | ||
* | ||
* @param theta Rotation angle in radians. Positive values rotate counterclockwise. | ||
*/ | ||
makeRotation(theta: number): this; | ||
makeRotation(theta: number): Matrix3; | ||
/** | ||
* Sets this matrix as a 2D scale transform: | ||
* | ||
* ``` | ||
* x, 0, 0, | ||
* 0, y, 0, | ||
* 0, 0, 1 | ||
* ``` | ||
* | ||
* @param x the amount to scale in the X axis. | ||
* @param y the amount to scale in the Y axis. | ||
*/ | ||
makeScale(x: number, y: number): this; | ||
makeScale(x: number, y: number): Matrix3; | ||
rotate(theta: number): Matrix3; | ||
@@ -104,0 +150,0 @@ |
@@ -11,7 +11,26 @@ import { Object3D } from './../core/Object3D'; | ||
levels: Array<{ distance: number; object: Object3D }>; | ||
/** | ||
* | ||
* An array of level objects | ||
* | ||
* Each level is an object with the following properties: | ||
* | ||
* - object - The Object3D to display at this level. | ||
* - distance - The distance at which to display this level of detail. | ||
* - hysteresis - Threshold used to avoid flickering at LOD boundaries, as a fraction of distance. | ||
*/ | ||
levels: Array<{ distance: number; hysteresis: number; object: Object3D }>; | ||
autoUpdate: boolean; | ||
readonly isLOD: true; | ||
addLevel(object: Object3D, distance?: number): this; | ||
/** | ||
* Adds a mesh that will display at a certain distance and greater. Typically the further away the distance, the lower the detail on the mesh. | ||
* | ||
* @param object The Object3D to display at this level. | ||
* @param distance The distance at which to display this level of detail. Default 0.0. | ||
* @param hysteresis Threshold used to avoid flickering at LOD boundaries, as a fraction of distance. Default 0.0. | ||
*/ | ||
addLevel(object: Object3D, distance?: number, hysteresis?: number): this; | ||
getCurrentLevel(): number; | ||
@@ -23,2 +42,3 @@ getObjectForDistance(distance: number): Object3D | null; | ||
// TODO: Remove this | ||
/** | ||
@@ -25,0 +45,0 @@ * @deprecated Use {@link LOD#levels .levels} instead. |
@@ -6,4 +6,8 @@ import { Group } from '../../objects/Group'; | ||
export type XRHandJoints = Record<XRHandJoint, number>; | ||
export class XRJointSpace extends Group { | ||
readonly jointRadius: number | undefined; | ||
} | ||
export type XRHandJoints = Record<XRHandJoint, XRJointSpace>; | ||
export interface XRHandInputState { | ||
@@ -39,4 +43,5 @@ pinching: boolean; | ||
dispatchEvent(event: { type: XRControllerEventType; data?: XRInputSource }): this; | ||
connect(inputSource: XRInputSource): this; | ||
disconnect(inputSource: XRInputSource): this; | ||
update(inputSource: XRInputSource, frame: XRFrame, referenceSpace: XRReferenceSpace): this; | ||
} |
@@ -0,1 +1,3 @@ | ||
// https://threejs.org/docs/#api/en/renderers/webxr/WebXRManager | ||
/// <reference types="webxr" /> | ||
@@ -47,3 +49,9 @@ | ||
setFoveation(foveation: number): void; | ||
/** | ||
* Returns the set of planes detected by WebXR's plane detection API. | ||
*/ | ||
getPlanes(): Set<XRPlane>; | ||
dispose(): void; | ||
} |
@@ -0,1 +1,3 @@ | ||
// https://threejs.org/docs/?q=scene#api/en/scenes/Scene | ||
import { FogBase } from './Fog'; | ||
@@ -25,5 +27,17 @@ import { Material } from './../materials/Material'; | ||
/** | ||
* Sets the blurriness of the background. Only influences environment maps assigned to Scene.background. Valid input is a float between 0 and 1. | ||
* | ||
* @default 0 | ||
*/ | ||
backgroundBlurriness: number; | ||
/** | ||
* Attenuates the color of the background. Only applies to background textures. | ||
* | ||
* @default 1 | ||
*/ | ||
backgroundIntensity: number; | ||
/** | ||
* If not null, it will force everything in the scene to be rendered with that material. Default is null. | ||
@@ -30,0 +44,0 @@ * @default null |
@@ -0,1 +1,3 @@ | ||
// https://threejs.org/docs/?q=texture#api/en/textures/Texture | ||
import { Vector2 } from './../math/Vector2'; | ||
@@ -29,3 +31,3 @@ import { Matrix3 } from './../math/Matrix3'; | ||
* @param [type=THREE.UnsignedByteType] | ||
* @param [anisotropy=1] | ||
* @param [anisotropy=THREE.Texture.DEFAULT_ANISOTROPY] | ||
* @param [encoding=THREE.LinearEncoding] | ||
@@ -207,2 +209,4 @@ */ | ||
onUpdate: () => void; | ||
static DEFAULT_ANISOTROPY: number; | ||
static DEFAULT_IMAGE: any; | ||
@@ -209,0 +213,0 @@ static DEFAULT_MAPPING: any; |
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
681566
624
20501