Area restrita - Questionario
This commit is contained in:
-21
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
# Installation
|
||||
> `npm install --save @types/draco3d`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for draco3d (https://github.com/google/draco#readme).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/draco3d.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Tue, 14 May 2024 15:07:51 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Don McCurdy](https://github.com/donmccurdy), and [Horizon0514](https://github.com/horizon0514).
|
||||
-267
@@ -1,267 +0,0 @@
|
||||
type TypedArray = Float32Array | Uint32Array | Uint16Array | Uint8Array | Int32Array | Int16Array | Int8Array;
|
||||
|
||||
export function createDecoderModule(object?: Record<string, unknown>): Promise<DecoderModule>;
|
||||
export function createEncoderModule(object?: Record<string, unknown>): Promise<EncoderModule>;
|
||||
|
||||
export interface BaseModule {
|
||||
Mesh: new() => Mesh;
|
||||
|
||||
DracoFloat32Array: new() => DracoFloat32Array;
|
||||
DracoInt8Array: new() => DracoInt8Array;
|
||||
DracoInt16Array: new() => DracoInt16Array;
|
||||
DracoInt32Array: new() => DracoInt32Array;
|
||||
DracoUInt8Array: new() => DracoUInt8Array;
|
||||
DracoUInt16Array: new() => DracoUInt16Array;
|
||||
DracoUInt32Array: new() => DracoUInt32Array;
|
||||
|
||||
POSITION: GeometryAttributeType;
|
||||
NORMAL: GeometryAttributeType;
|
||||
TEX_COORD: GeometryAttributeType;
|
||||
COLOR: GeometryAttributeType;
|
||||
GENERIC: GeometryAttributeType;
|
||||
INVALID: GeometryAttributeType;
|
||||
|
||||
_malloc(ptr: number): number;
|
||||
_free(ptr: number): void;
|
||||
destroy(object: unknown): void;
|
||||
|
||||
// Heap.
|
||||
HEAPF32: Float32Array;
|
||||
HEAP32: Int32Array;
|
||||
HEAP16: Int16Array;
|
||||
HEAP8: Int8Array;
|
||||
HEAPU32: Uint32Array;
|
||||
HEAPU16: Uint16Array;
|
||||
HEAPU8: Uint8Array;
|
||||
}
|
||||
|
||||
export interface EncoderModule extends BaseModule {
|
||||
Encoder: new() => Encoder;
|
||||
ExpertEncoder: new(pc: PointCloud) => ExpertEncoder;
|
||||
MeshBuilder: new() => MeshBuilder;
|
||||
Metadata: new() => Metadata;
|
||||
MetadataBuilder: new() => MetadataBuilder;
|
||||
|
||||
MESH_SEQUENTIAL_ENCODING: number;
|
||||
MESH_EDGEBREAKER_ENCODING: number;
|
||||
}
|
||||
|
||||
export interface DracoDecoderModuleProps {
|
||||
wasmBinary?: ArrayBuffer;
|
||||
onModuleLoaded?(draco: DecoderModule): void;
|
||||
}
|
||||
|
||||
export type DracoDecoderModule = (props: DracoDecoderModuleProps) => Promise<DecoderModule>;
|
||||
|
||||
export interface DecoderModule extends BaseModule {
|
||||
Decoder: new() => Decoder;
|
||||
DecoderBuffer: new() => DecoderBuffer;
|
||||
PointCloud: new() => PointCloud;
|
||||
MetadataQuerier: new() => MetadataQuerier;
|
||||
|
||||
// GeometryType.
|
||||
TRIANGULAR_MESH: GeometryType;
|
||||
POINT_CLOUD: GeometryType;
|
||||
|
||||
// DataType.
|
||||
DT_FLOAT32: DataType;
|
||||
DT_INT8: DataType;
|
||||
DT_INT16: DataType;
|
||||
DT_INT32: DataType;
|
||||
DT_UINT8: DataType;
|
||||
DT_UINT16: DataType;
|
||||
DT_UINT32: DataType;
|
||||
}
|
||||
|
||||
interface EncoderBase {
|
||||
SetSpeedOptions(encodeSpeed: number, decodeSpeed: number): void;
|
||||
SetEncodingMethod(method: number): void;
|
||||
SetTrackEncodedProperties(track: boolean): void;
|
||||
GetNumberOfEncodedPoints(): number;
|
||||
GetNumberOfEncodedFaces(): number;
|
||||
}
|
||||
|
||||
export interface Encoder extends EncoderBase {
|
||||
SetAttributeQuantization(attributeType: GeometryAttributeType, bits: number): void;
|
||||
SetAttributeExplicitQuantization(
|
||||
attributeType: GeometryAttributeType,
|
||||
bits: number,
|
||||
itemSize: number,
|
||||
origin: [number, number, number],
|
||||
range: number,
|
||||
): void;
|
||||
EncodeMeshToDracoBuffer(mesh: Mesh, array: DracoInt8Array): number;
|
||||
}
|
||||
|
||||
export interface ExpertEncoder extends EncoderBase {
|
||||
SetAttributeQuantization(attributeId: number, bits: number): void;
|
||||
SetAttributeExplicitQuantization(
|
||||
attributeId: number,
|
||||
bits: number,
|
||||
itemSize: number,
|
||||
origin: [number, number, number],
|
||||
range: number,
|
||||
): void;
|
||||
EncodeToDracoBuffer(deduplicateValues: boolean, array: DracoInt8Array): number;
|
||||
}
|
||||
|
||||
export interface Decoder {
|
||||
DecodeBufferToMesh(buffer: DecoderBuffer, mesh: Mesh): Status;
|
||||
DecodeBufferToPointCloud(buffer: DecoderBuffer, pointCloud: PointCloud): Status;
|
||||
GetAttributeByUniqueId(pointCloud: PointCloud, id: number): Attribute;
|
||||
GetFaceFromMesh(mesh: Mesh, index: number, array: DracoArray): number;
|
||||
GetTrianglesUInt16Array(mesh: Mesh, byteLength: number, ptr: number): void;
|
||||
GetTrianglesUInt32Array(mesh: Mesh, byteLength: number, ptr: number): void;
|
||||
GetAttributeDataArrayForAllPoints: (
|
||||
pointCloud: PointCloud,
|
||||
attribute: Attribute,
|
||||
type: DataType,
|
||||
byteLength: number,
|
||||
ptr: number,
|
||||
) => void;
|
||||
GetAttributeFloatForAllPoints(pointCloud: PointCloud, attribute: Attribute, array: DracoArray): void;
|
||||
GetAttributeInt8ForAllPoints(pointCloud: PointCloud, attribute: Attribute, array: DracoArray): void;
|
||||
GetAttributeInt16ForAllPoints(pointCloud: PointCloud, attribute: Attribute, array: DracoArray): void;
|
||||
GetAttributeInt32ForAllPoints(pointCloud: PointCloud, attribute: Attribute, array: DracoArray): void;
|
||||
GetAttributeUInt8ForAllPoints(pointCloud: PointCloud, attribute: Attribute, array: DracoArray): void;
|
||||
GetAttributeUInt16ForAllPoints(pointCloud: PointCloud, attribute: Attribute, array: DracoArray): void;
|
||||
GetAttributeUInt32ForAllPoints(pointCloud: PointCloud, attribute: Attribute, array: DracoArray): void;
|
||||
GetEncodedGeometryType(buffer: DecoderBuffer): GeometryType;
|
||||
GetAttributeId(pointCloud: PointCloud, attributeType: number): number;
|
||||
GetAttributeIdByName(pointCloud: PointCloud, name: string): number;
|
||||
GetAttribute(pointCloud: PointCloud, id: number): Attribute;
|
||||
GetMetadata(pointCloud: PointCloud): Metadata;
|
||||
GetAttributeMetadata(pointCloud: PointCloud, attributeId: number): Metadata;
|
||||
}
|
||||
|
||||
export interface DecoderBuffer {
|
||||
Init(array: Int8Array, byteLength: number): void;
|
||||
}
|
||||
|
||||
export interface DracoArray {
|
||||
GetValue(index: number): number;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface DracoFloat32Array extends DracoArray {}
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface DracoInt8Array extends DracoArray {}
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface DracoInt16Array extends DracoArray {}
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface DracoInt32Array extends DracoArray {}
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface DracoUInt8Array extends DracoArray {}
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface DracoUInt16Array extends DracoArray {}
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface DracoUInt32Array extends DracoArray {}
|
||||
|
||||
export interface Status {
|
||||
ok(): boolean;
|
||||
error_msg(): string;
|
||||
}
|
||||
|
||||
export interface Attribute {
|
||||
num_components(): number;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export enum GeometryType {}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export enum GeometryAttributeType {}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export enum DataType {}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
export interface Metadata {}
|
||||
|
||||
export interface MetadataBuilder {
|
||||
AddStringEntry(metadata: Metadata, entryName: string, entryValue: string): boolean;
|
||||
AddIntEntry(metadata: Metadata, entryName: string, entryValue: number): boolean;
|
||||
AddIntEntryArray(metadata: Metadata, entryName: string, entryValues: TypedArray, numValues: number): boolean;
|
||||
AddDoubleEntry(metadata: Metadata, entryName: string, entryValue: number): boolean;
|
||||
}
|
||||
|
||||
export interface MetadataQuerier {
|
||||
HasEntry(metadata: Metadata, entryName: string): boolean;
|
||||
GetIntEntry(metadata: Metadata, entryName: string): number;
|
||||
GetIntEntryArray(metadata: Metadata, entryName: string, outValues: DracoInt32Array): void;
|
||||
GetDoubleEntry(metadata: Metadata, entryName: string): number;
|
||||
GetStringEntry(metadata: Metadata, entryName: string): string;
|
||||
NumEntries(metadata: Metadata): number;
|
||||
GetEntryName(metadata: Metadata, entryId: number): string;
|
||||
}
|
||||
|
||||
export interface PointCloud {
|
||||
ptr: number;
|
||||
num_attributes(): number;
|
||||
num_points(): number;
|
||||
}
|
||||
|
||||
export interface Mesh extends PointCloud {
|
||||
num_faces(): number;
|
||||
}
|
||||
|
||||
export interface PointCloudBuilder {
|
||||
AddFloatAttribute(
|
||||
pointCloud: PointCloud,
|
||||
attribute: number,
|
||||
count: number,
|
||||
itemSize: number,
|
||||
array: TypedArray,
|
||||
): number;
|
||||
AddInt8Attribute(
|
||||
pointCloud: PointCloud,
|
||||
attribute: number,
|
||||
count: number,
|
||||
itemSize: number,
|
||||
array: TypedArray,
|
||||
): number;
|
||||
AddUInt8Attribute(
|
||||
pointCloud: PointCloud,
|
||||
attribute: number,
|
||||
count: number,
|
||||
itemSize: number,
|
||||
array: TypedArray,
|
||||
): number;
|
||||
AddInt16Attribute(
|
||||
pointCloud: PointCloud,
|
||||
attribute: number,
|
||||
count: number,
|
||||
itemSize: number,
|
||||
array: TypedArray,
|
||||
): number;
|
||||
AddUInt16Attribute(
|
||||
pointCloud: PointCloud,
|
||||
attribute: number,
|
||||
count: number,
|
||||
itemSize: number,
|
||||
array: TypedArray,
|
||||
): number;
|
||||
AddInt32Attribute(
|
||||
pointCloud: PointCloud,
|
||||
attribute: number,
|
||||
count: number,
|
||||
itemSize: number,
|
||||
array: TypedArray,
|
||||
): number;
|
||||
AddUInt32Attribute(
|
||||
pointCloud: PointCloud,
|
||||
attribute: number,
|
||||
count: number,
|
||||
itemSize: number,
|
||||
array: TypedArray,
|
||||
): number;
|
||||
SetMetadataForAttribute(pointCloud: PointCloud, attributeId: number, metadata: Metadata): boolean;
|
||||
AddMetadata(pointCloud: PointCloud, metadata: Metadata): boolean;
|
||||
SetNormalizedFlagForAttribute(pointCloud: PointCloud, attributeId: number, normalized: boolean): boolean;
|
||||
}
|
||||
|
||||
export interface MeshBuilder extends PointCloudBuilder {
|
||||
AddFacesToMesh(mesh: Mesh, numFaces: number, faces: Uint16Array | Uint32Array): void;
|
||||
}
|
||||
|
||||
export {};
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
{
|
||||
"name": "@types/draco3d",
|
||||
"version": "1.4.10",
|
||||
"description": "TypeScript definitions for draco3d",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/draco3d",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Don McCurdy",
|
||||
"githubUsername": "donmccurdy",
|
||||
"url": "https://github.com/donmccurdy"
|
||||
},
|
||||
{
|
||||
"name": "Horizon0514",
|
||||
"githubUsername": "horizon0514",
|
||||
"url": "https://github.com/horizon0514"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/draco3d"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"typesPublisherContentHash": "bd3a05d131a81cdb5282e72abbc9755f42a5d2220ffdbc7d3226ece154d1d936",
|
||||
"typeScriptVersion": "4.7"
|
||||
}
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
# Installation
|
||||
> `npm install --save @types/offscreencanvas`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for offscreencanvas (https://html.spec.whatwg.org/multipage/canvas.html#the-offscreencanvas-interface).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/offscreencanvas.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Tue, 07 Nov 2023 09:09:39 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Klaus Reimer](https://github.com/kayahr), [Oleg Varaksin](https://github.com/ova2), and [Sean T.McBeth](https://github.com/capnmidnight).
|
||||
-208
@@ -1,208 +0,0 @@
|
||||
// https://html.spec.whatwg.org/multipage/canvas.html#dom-canvas-transfercontroltooffscreen
|
||||
interface HTMLCanvasElement {
|
||||
transferControlToOffscreen(): OffscreenCanvas;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvasrenderingcontext2d
|
||||
interface OffscreenCanvasRenderingContext2D
|
||||
extends
|
||||
CanvasState,
|
||||
CanvasTransform,
|
||||
CanvasCompositing,
|
||||
CanvasImageSmoothing,
|
||||
CanvasFillStrokeStyles,
|
||||
CanvasShadowStyles,
|
||||
CanvasFilters,
|
||||
CanvasRect,
|
||||
CanvasDrawPath,
|
||||
CanvasText,
|
||||
CanvasDrawImage,
|
||||
CanvasImageData,
|
||||
CanvasPathDrawingStyles,
|
||||
CanvasTextDrawingStyles,
|
||||
CanvasPath
|
||||
{
|
||||
readonly canvas: OffscreenCanvas;
|
||||
}
|
||||
|
||||
declare var OffscreenCanvasRenderingContext2D: {
|
||||
prototype: OffscreenCanvasRenderingContext2D;
|
||||
new(): OffscreenCanvasRenderingContext2D;
|
||||
};
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/canvas.html#the-offscreencanvas-interface
|
||||
// Possible contextId values are defined by the enum OffscreenRenderingContextId { "2d", "bitmaprenderer", "webgl", "webgl2" }
|
||||
// See also description: https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas/getContext
|
||||
interface OffscreenCanvas extends EventTarget {
|
||||
width: number;
|
||||
height: number;
|
||||
|
||||
getContext(
|
||||
contextId: "2d",
|
||||
contextAttributes?: CanvasRenderingContext2DSettings,
|
||||
): OffscreenCanvasRenderingContext2D | null;
|
||||
|
||||
getContext(
|
||||
contextId: "bitmaprenderer",
|
||||
contextAttributes?: WebGLContextAttributes,
|
||||
): ImageBitmapRenderingContext | null;
|
||||
|
||||
getContext(contextId: "webgl", contextAttributes?: WebGLContextAttributes): WebGLRenderingContext | null;
|
||||
|
||||
getContext(contextId: "webgl2", contextAttributes?: WebGLContextAttributes): WebGL2RenderingContext | null;
|
||||
|
||||
convertToBlob(options?: { type?: string | undefined; quality?: number | undefined }): Promise<Blob>;
|
||||
|
||||
transferToImageBitmap(): ImageBitmap;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/canvas.html#canvasdrawimage
|
||||
interface CanvasDrawImage {
|
||||
drawImage(image: CanvasImageSource | OffscreenCanvas, dx: number, dy: number): void;
|
||||
|
||||
drawImage(image: CanvasImageSource | OffscreenCanvas, dx: number, dy: number, dw: number, dh: number): void;
|
||||
|
||||
drawImage(
|
||||
image: CanvasImageSource | OffscreenCanvas,
|
||||
sx: number,
|
||||
sy: number,
|
||||
sw: number,
|
||||
sh: number,
|
||||
dx: number,
|
||||
dy: number,
|
||||
dw: number,
|
||||
dh: number,
|
||||
): void;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#dom-createimagebitmap
|
||||
declare function createImageBitmap(image: ImageBitmapSource | OffscreenCanvas): Promise<ImageBitmap>;
|
||||
declare function createImageBitmap(
|
||||
image: ImageBitmapSource | OffscreenCanvas,
|
||||
sx: number,
|
||||
sy: number,
|
||||
sw: number,
|
||||
sh: number,
|
||||
): Promise<ImageBitmap>;
|
||||
|
||||
// OffscreenCanvas should be a part of Transferable => extend all postMessage methods
|
||||
interface Worker {
|
||||
postMessage(message: any, transfer?: Array<Transferable | OffscreenCanvas>): void;
|
||||
}
|
||||
|
||||
interface DedicatedWorkerGlobalScope {
|
||||
postMessage(message: any, transfer?: Array<Transferable | OffscreenCanvas>): void;
|
||||
}
|
||||
|
||||
interface ServiceWorker {
|
||||
postMessage(message: any, transfer?: Array<Transferable | OffscreenCanvas>): void;
|
||||
}
|
||||
|
||||
interface MessagePort {
|
||||
postMessage(message: any, transfer?: Array<Transferable | OffscreenCanvas>): void;
|
||||
}
|
||||
|
||||
interface Window {
|
||||
postMessage(message: any, targetOrigin: string, transfer?: Array<Transferable | OffscreenCanvas>): void;
|
||||
}
|
||||
|
||||
declare function postMessage(
|
||||
message: any,
|
||||
targetOrigin: string,
|
||||
transfer?: Array<Transferable | OffscreenCanvas>,
|
||||
): void;
|
||||
|
||||
declare var OffscreenCanvas: {
|
||||
prototype: OffscreenCanvas;
|
||||
new(width: number, height: number): OffscreenCanvas;
|
||||
};
|
||||
|
||||
interface WebGL2RenderingContextBase {
|
||||
texImage3D(
|
||||
target: GLenum,
|
||||
level: GLint,
|
||||
internalformat: GLint,
|
||||
width: GLsizei,
|
||||
height: GLsizei,
|
||||
depth: GLsizei,
|
||||
border: GLint,
|
||||
format: GLenum,
|
||||
type: GLenum,
|
||||
source: TexImageSource | OffscreenCanvas,
|
||||
): void;
|
||||
texSubImage3D(
|
||||
target: GLenum,
|
||||
level: GLint,
|
||||
xoffset: GLint,
|
||||
yoffset: GLint,
|
||||
zoffset: GLint,
|
||||
width: GLsizei,
|
||||
height: GLsizei,
|
||||
depth: GLsizei,
|
||||
format: GLenum,
|
||||
type: GLenum,
|
||||
source: TexImageSource | OffscreenCanvas,
|
||||
): void;
|
||||
}
|
||||
|
||||
interface WebGL2RenderingContextOverloads {
|
||||
texImage2D(
|
||||
target: GLenum,
|
||||
level: GLint,
|
||||
internalformat: GLint,
|
||||
format: GLenum,
|
||||
type: GLenum,
|
||||
source: TexImageSource | OffscreenCanvas,
|
||||
): void;
|
||||
texImage2D(
|
||||
target: GLenum,
|
||||
level: GLint,
|
||||
internalformat: GLint,
|
||||
width: GLsizei,
|
||||
height: GLsizei,
|
||||
border: GLint,
|
||||
format: GLenum,
|
||||
type: GLenum,
|
||||
source: TexImageSource | OffscreenCanvas,
|
||||
): void;
|
||||
texSubImage2D(
|
||||
target: GLenum,
|
||||
level: GLint,
|
||||
xoffset: GLint,
|
||||
yoffset: GLint,
|
||||
format: GLenum,
|
||||
type: GLenum,
|
||||
source: TexImageSource | OffscreenCanvas,
|
||||
): void;
|
||||
texSubImage2D(
|
||||
target: GLenum,
|
||||
level: GLint,
|
||||
xoffset: GLint,
|
||||
yoffset: GLint,
|
||||
width: GLsizei,
|
||||
height: GLsizei,
|
||||
format: GLenum,
|
||||
type: GLenum,
|
||||
source: TexImageSource | OffscreenCanvas,
|
||||
): void;
|
||||
}
|
||||
|
||||
interface WebGLRenderingContextOverloads {
|
||||
texImage2D(
|
||||
target: GLenum,
|
||||
level: GLint,
|
||||
internalformat: GLint,
|
||||
format: GLenum,
|
||||
type: GLenum,
|
||||
source: TexImageSource | OffscreenCanvas,
|
||||
): void;
|
||||
texSubImage2D(
|
||||
target: GLenum,
|
||||
level: GLint,
|
||||
xoffset: GLint,
|
||||
yoffset: GLint,
|
||||
format: GLenum,
|
||||
type: GLenum,
|
||||
source: TexImageSource | OffscreenCanvas,
|
||||
): void;
|
||||
}
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
{
|
||||
"name": "@types/offscreencanvas",
|
||||
"version": "2019.7.3",
|
||||
"description": "TypeScript definitions for offscreencanvas",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/offscreencanvas",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Klaus Reimer",
|
||||
"githubUsername": "kayahr",
|
||||
"url": "https://github.com/kayahr"
|
||||
},
|
||||
{
|
||||
"name": "Oleg Varaksin",
|
||||
"githubUsername": "ova2",
|
||||
"url": "https://github.com/ova2"
|
||||
},
|
||||
{
|
||||
"name": "Sean T.McBeth",
|
||||
"githubUsername": "capnmidnight",
|
||||
"url": "https://github.com/capnmidnight"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/offscreencanvas"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"typesPublisherContentHash": "3bb9d8e21546b767b05750c5b57b2612423128a6c4619c93ff2e2cbe93279baf",
|
||||
"typeScriptVersion": "4.5",
|
||||
"nonNpm": true
|
||||
}
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
# Installation
|
||||
> `npm install --save @types/react-reconciler`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for react-reconciler (https://reactjs.org/).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-reconciler.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Wed, 11 Dec 2024 14:36:56 GMT
|
||||
* Dependencies: none
|
||||
* Peer dependencies: [@types/react](https://npmjs.com/package/@types/react)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Nathan Bierema](https://github.com/Methuselah96), [Zhang Haocong](https://github.com/zhanghaocong), and [Mathieu Dutour](https://github.com/mathieudutour).
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
export const DiscreteEventPriority = 0b0000000000000000000000000000001;
|
||||
export const ContinuousEventPriority = 0b0000000000000000000000000000100;
|
||||
export const DefaultEventPriority = 0b0000000000000000000000000010000;
|
||||
export const IdleEventPriority = 0b0100000000000000000000000000000;
|
||||
export const LegacyRoot = 0;
|
||||
export const ConcurrentRoot = 1;
|
||||
-1028
File diff suppressed because it is too large
Load Diff
-38
@@ -1,38 +0,0 @@
|
||||
{
|
||||
"name": "@types/react-reconciler",
|
||||
"version": "0.28.9",
|
||||
"description": "TypeScript definitions for react-reconciler",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-reconciler",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Nathan Bierema",
|
||||
"githubUsername": "Methuselah96",
|
||||
"url": "https://github.com/Methuselah96"
|
||||
},
|
||||
{
|
||||
"name": "Zhang Haocong",
|
||||
"githubUsername": "zhanghaocong",
|
||||
"url": "https://github.com/zhanghaocong"
|
||||
},
|
||||
{
|
||||
"name": "Mathieu Dutour",
|
||||
"githubUsername": "mathieudutour",
|
||||
"url": "https://github.com/mathieudutour"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/react-reconciler"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"peerDependencies": {
|
||||
"@types/react": "*"
|
||||
},
|
||||
"typesPublisherContentHash": "08ff2948d78f7616f151a26a7f4a9f847bd190e3ea194516a4dc517cea40cb6e",
|
||||
"typeScriptVersion": "5.0"
|
||||
}
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
-60
@@ -1,60 +0,0 @@
|
||||
# Installation
|
||||
> `npm install --save @types/stats.js`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for stats.js (https://github.com/mrdoob/stats.js).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stats.js.
|
||||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stats.js/index.d.ts)
|
||||
````ts
|
||||
declare class Stats {
|
||||
constructor();
|
||||
|
||||
REVISION: number;
|
||||
dom: HTMLDivElement;
|
||||
|
||||
addPanel(panel: Stats.Panel): Stats.Panel;
|
||||
|
||||
/**
|
||||
* @param value 0:fps, 1: ms, 2: mb, 3+: custom
|
||||
*/
|
||||
showPanel(value: number): void;
|
||||
|
||||
begin(): void;
|
||||
end(): number;
|
||||
update(): void;
|
||||
|
||||
// Backwards Compatibility
|
||||
|
||||
/**
|
||||
* @deprecated Use `dom` instead.
|
||||
*/
|
||||
domElement: HTMLDivElement;
|
||||
|
||||
/**
|
||||
* @deprecated Use `showPanel` instead.
|
||||
*/
|
||||
setMode(value: number): void;
|
||||
}
|
||||
|
||||
declare namespace Stats {
|
||||
class Panel {
|
||||
constructor(name: string, foregroundColor: string, backgroundColor: string);
|
||||
dom: HTMLCanvasElement;
|
||||
update(value: number, maxValue: number): void;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "stats.js" {
|
||||
export = Stats;
|
||||
}
|
||||
|
||||
````
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Mon, 05 May 2025 20:35:19 GMT
|
||||
* Dependencies: none
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Gregory Dalton](https://github.com/gregolai), [Harm Berntsen](https://github.com/hberntsen), and [Dan Vanderkam](https://github.com/danvk).
|
||||
-41
@@ -1,41 +0,0 @@
|
||||
declare class Stats {
|
||||
constructor();
|
||||
|
||||
REVISION: number;
|
||||
dom: HTMLDivElement;
|
||||
|
||||
addPanel(panel: Stats.Panel): Stats.Panel;
|
||||
|
||||
/**
|
||||
* @param value 0:fps, 1: ms, 2: mb, 3+: custom
|
||||
*/
|
||||
showPanel(value: number): void;
|
||||
|
||||
begin(): void;
|
||||
end(): number;
|
||||
update(): void;
|
||||
|
||||
// Backwards Compatibility
|
||||
|
||||
/**
|
||||
* @deprecated Use `dom` instead.
|
||||
*/
|
||||
domElement: HTMLDivElement;
|
||||
|
||||
/**
|
||||
* @deprecated Use `showPanel` instead.
|
||||
*/
|
||||
setMode(value: number): void;
|
||||
}
|
||||
|
||||
declare namespace Stats {
|
||||
class Panel {
|
||||
constructor(name: string, foregroundColor: string, backgroundColor: string);
|
||||
dom: HTMLCanvasElement;
|
||||
update(value: number, maxValue: number): void;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "stats.js" {
|
||||
export = Stats;
|
||||
}
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
{
|
||||
"name": "@types/stats.js",
|
||||
"version": "0.17.4",
|
||||
"description": "TypeScript definitions for stats.js",
|
||||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/stats.js",
|
||||
"license": "MIT",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Gregory Dalton",
|
||||
"githubUsername": "gregolai",
|
||||
"url": "https://github.com/gregolai"
|
||||
},
|
||||
{
|
||||
"name": "Harm Berntsen",
|
||||
"githubUsername": "hberntsen",
|
||||
"url": "https://github.com/hberntsen"
|
||||
},
|
||||
{
|
||||
"name": "Dan Vanderkam",
|
||||
"githubUsername": "danvk",
|
||||
"url": "https://github.com/danvk"
|
||||
}
|
||||
],
|
||||
"main": "",
|
||||
"types": "index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
|
||||
"directory": "types/stats.js"
|
||||
},
|
||||
"scripts": {},
|
||||
"dependencies": {},
|
||||
"peerDependencies": {},
|
||||
"typesPublisherContentHash": "33db1076f265c7fe8fc161806c4b7bf2b877c76e5896c2a460c0e23b3b6ba840",
|
||||
"typeScriptVersion": "5.1"
|
||||
}
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
# Installation
|
||||
> `npm install --save @types/three`
|
||||
|
||||
# Summary
|
||||
This package contains type definitions for three (https://threejs.org/).
|
||||
|
||||
# Details
|
||||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/three.
|
||||
|
||||
### Additional Details
|
||||
* Last updated: Wed, 10 Dec 2025 22:36:27 GMT
|
||||
* Dependencies: [@dimforge/rapier3d-compat](https://npmjs.com/package/@dimforge/rapier3d-compat), [@tweenjs/tween.js](https://npmjs.com/package/@tweenjs/tween.js), [@types/stats.js](https://npmjs.com/package/@types/stats.js), [@types/webxr](https://npmjs.com/package/@types/webxr), [@webgpu/types](https://npmjs.com/package/@webgpu/types), [fflate](https://npmjs.com/package/fflate), [meshoptimizer](https://npmjs.com/package/meshoptimizer)
|
||||
|
||||
# Credits
|
||||
These definitions were written by [Josh Ellis](https://github.com/joshuaellis), and [Nathan Bierema](https://github.com/Methuselah96).
|
||||
-1
@@ -1 +0,0 @@
|
||||
export * from "../src/Three.Core.js";
|
||||
-1
@@ -1 +0,0 @@
|
||||
export * from "../src/Three.Core.js";
|
||||
-1
@@ -1 +0,0 @@
|
||||
export * from "../src/Three.js";
|
||||
-1
@@ -1 +0,0 @@
|
||||
export * from "../src/Three.js";
|
||||
-1
@@ -1 +0,0 @@
|
||||
export * from "../src/Three.js";
|
||||
-1
@@ -1 +0,0 @@
|
||||
export * from "../src/Three.TSL.js";
|
||||
-1
@@ -1 +0,0 @@
|
||||
export * from "../src/Three.TSL.js";
|
||||
-1
@@ -1 +0,0 @@
|
||||
export * from "../src/Three.WebGPU.js";
|
||||
-1
@@ -1 +0,0 @@
|
||||
export * from "../src/Three.WebGPU.js";
|
||||
-1
@@ -1 +0,0 @@
|
||||
export * from "../src/Three.WebGPU.Nodes.js";
|
||||
-1
@@ -1 +0,0 @@
|
||||
export * from "../src/Three.WebGPU.Nodes.js";
|
||||
-285
@@ -1,285 +0,0 @@
|
||||
export * from "./animation/AnimationClipCreator.js";
|
||||
export * from "./animation/CCDIKSolver.js";
|
||||
|
||||
export { default as WebGL } from "./capabilities/WebGL.js";
|
||||
|
||||
export * from "./controls/ArcballControls.js";
|
||||
export * from "./controls/DragControls.js";
|
||||
export * from "./controls/FirstPersonControls.js";
|
||||
export * from "./controls/FlyControls.js";
|
||||
export * from "./controls/MapControls.js";
|
||||
export * from "./controls/OrbitControls.js";
|
||||
export * from "./controls/PointerLockControls.js";
|
||||
export * from "./controls/TrackballControls.js";
|
||||
export * from "./controls/TransformControls.js";
|
||||
|
||||
export * from "./csm/CSM.js";
|
||||
export * from "./csm/CSMFrustum.js";
|
||||
export * from "./csm/CSMHelper.js";
|
||||
export * from "./csm/CSMShader.js";
|
||||
|
||||
export * as Curves from "./curves/CurveExtras.js";
|
||||
export * from "./curves/NURBSCurve.js";
|
||||
export * from "./curves/NURBSSurface.js";
|
||||
export * as NURBSUtils from "./curves/NURBSUtils.js";
|
||||
export * from "./curves/NURBSVolume.js";
|
||||
|
||||
export * from "./effects/AnaglyphEffect.js";
|
||||
export * from "./effects/AsciiEffect.js";
|
||||
export * from "./effects/OutlineEffect.js";
|
||||
export * from "./effects/ParallaxBarrierEffect.js";
|
||||
export * from "./effects/StereoEffect.js";
|
||||
|
||||
export * from "./environments/DebugEnvironment.js";
|
||||
export * from "./environments/RoomEnvironment.js";
|
||||
|
||||
export * from "./exporters/DRACOExporter.js";
|
||||
export * from "./exporters/EXRExporter.js";
|
||||
export * from "./exporters/GLTFExporter.js";
|
||||
export * from "./exporters/KTX2Exporter.js";
|
||||
export * from "./exporters/OBJExporter.js";
|
||||
export * from "./exporters/PLYExporter.js";
|
||||
export * from "./exporters/STLExporter.js";
|
||||
export * from "./exporters/USDZExporter.js";
|
||||
|
||||
export * from "./geometries/BoxLineGeometry.js";
|
||||
export * from "./geometries/ConvexGeometry.js";
|
||||
export * from "./geometries/DecalGeometry.js";
|
||||
export * from "./geometries/ParametricFunctions.js";
|
||||
export * from "./geometries/ParametricGeometry.js";
|
||||
export * from "./geometries/RoundedBoxGeometry.js";
|
||||
export * from "./geometries/TeapotGeometry.js";
|
||||
export * from "./geometries/TextGeometry.js";
|
||||
|
||||
export * from "./helpers/LightProbeHelper.js";
|
||||
export * from "./helpers/OctreeHelper.js";
|
||||
export * from "./helpers/PositionalAudioHelper.js";
|
||||
export * from "./helpers/RectAreaLightHelper.js";
|
||||
export * from "./helpers/TextureHelper.js";
|
||||
export * from "./helpers/VertexNormalsHelper.js";
|
||||
export * from "./helpers/VertexTangentsHelper.js";
|
||||
export * from "./helpers/ViewHelper.js";
|
||||
|
||||
export * from "./interactive/HTMLMesh.js";
|
||||
export * from "./interactive/InteractiveGroup.js";
|
||||
export * from "./interactive/SelectionBox.js";
|
||||
export * from "./interactive/SelectionHelper.js";
|
||||
|
||||
export * from "./lights/LightProbeGenerator.js";
|
||||
export * from "./lights/RectAreaLightUniformsLib.js";
|
||||
|
||||
export * from "./lines/Line2.js";
|
||||
export * from "./lines/LineGeometry.js";
|
||||
export * from "./lines/LineMaterial.js";
|
||||
export * from "./lines/LineSegments2.js";
|
||||
export * from "./lines/LineSegmentsGeometry.js";
|
||||
export * from "./lines/Wireframe.js";
|
||||
export * from "./lines/WireframeGeometry2.js";
|
||||
|
||||
export * from "./loaders/3DMLoader.js";
|
||||
export * from "./loaders/3MFLoader.js";
|
||||
export * from "./loaders/AMFLoader.js";
|
||||
export * from "./loaders/BVHLoader.js";
|
||||
export * from "./loaders/ColladaLoader.js";
|
||||
export * from "./loaders/DDSLoader.js";
|
||||
export * from "./loaders/DRACOLoader.js";
|
||||
export * from "./loaders/EXRLoader.js";
|
||||
export * from "./loaders/FBXLoader.js";
|
||||
export * from "./loaders/FontLoader.js";
|
||||
export * from "./loaders/GCodeLoader.js";
|
||||
export * from "./loaders/GLTFLoader.js";
|
||||
export * from "./loaders/HDRCubeTextureLoader.js";
|
||||
export * from "./loaders/HDRLoader.js";
|
||||
export * from "./loaders/IESLoader.js";
|
||||
export * from "./loaders/KMZLoader.js";
|
||||
export * from "./loaders/KTX2Loader.js";
|
||||
export * from "./loaders/KTXLoader.js";
|
||||
export * from "./loaders/LDrawLoader.js";
|
||||
export * from "./loaders/LottieLoader.js";
|
||||
export * from "./loaders/LUT3dlLoader.js";
|
||||
export * from "./loaders/LUTCubeLoader.js";
|
||||
export * from "./loaders/LWOLoader.js";
|
||||
export * from "./loaders/MD2Loader.js";
|
||||
export * from "./loaders/MDDLoader.js";
|
||||
export * from "./loaders/MTLLoader.js";
|
||||
export * from "./loaders/NRRDLoader.js";
|
||||
export * from "./loaders/OBJLoader.js";
|
||||
export * from "./loaders/PCDLoader.js";
|
||||
export * from "./loaders/PDBLoader.js";
|
||||
export * from "./loaders/PLYLoader.js";
|
||||
export * from "./loaders/PVRLoader.js";
|
||||
export * from "./loaders/RGBELoader.js";
|
||||
export * from "./loaders/STLLoader.js";
|
||||
export * from "./loaders/SVGLoader.js";
|
||||
export * from "./loaders/TDSLoader.js";
|
||||
export * from "./loaders/TGALoader.js";
|
||||
export * from "./loaders/TIFFLoader.js";
|
||||
export * from "./loaders/TTFLoader.js";
|
||||
export * from "./loaders/UltraHDRLoader.js";
|
||||
export * from "./loaders/USDLoader.js";
|
||||
export * from "./loaders/VOXLoader.js";
|
||||
export * from "./loaders/VRMLLoader.js";
|
||||
export * from "./loaders/VTKLoader.js";
|
||||
export * from "./loaders/XYZLoader.js";
|
||||
|
||||
export * from "./materials/LDrawConditionalLineMaterial.js";
|
||||
export * from "./materials/MeshGouraudMaterial.js";
|
||||
export * from "./materials/MeshPostProcessingMaterial.js";
|
||||
|
||||
export * from "./math/Capsule.js";
|
||||
export * from "./math/ColorConverter.js";
|
||||
export * from "./math/ConvexHull.js";
|
||||
export * from "./math/ImprovedNoise.js";
|
||||
export * from "./math/Lut.js";
|
||||
export * from "./math/MeshSurfaceSampler.js";
|
||||
export * from "./math/OBB.js";
|
||||
export * from "./math/Octree.js";
|
||||
export * from "./math/SimplexNoise.js";
|
||||
|
||||
export * from "./misc/ConvexObjectBreaker.js";
|
||||
export * from "./misc/GPUComputationRenderer.js";
|
||||
export * from "./misc/Gyroscope.js";
|
||||
export * from "./misc/MD2Character.js";
|
||||
export * from "./misc/MD2CharacterComplex.js";
|
||||
export * from "./misc/MorphAnimMesh.js";
|
||||
export * from "./misc/MorphBlendMesh.js";
|
||||
export * from "./misc/ProgressiveLightMap.js";
|
||||
export * from "./misc/RollerCoaster.js";
|
||||
export * from "./misc/TubePainter.js";
|
||||
export * from "./misc/Volume.js";
|
||||
export * from "./misc/VolumeSlice.js";
|
||||
|
||||
export * from "./modifiers/CurveModifier.js";
|
||||
export * from "./modifiers/EdgeSplitModifier.js";
|
||||
export * from "./modifiers/SimplifyModifier.js";
|
||||
export * from "./modifiers/TessellateModifier.js";
|
||||
|
||||
export * from "./objects/GroundedSkybox.js";
|
||||
export * from "./objects/Lensflare.js";
|
||||
export * from "./objects/MarchingCubes.js";
|
||||
export * from "./objects/Reflector.js";
|
||||
export * from "./objects/ReflectorForSSRPass.js";
|
||||
export * from "./objects/Refractor.js";
|
||||
export * from "./objects/ShadowMesh.js";
|
||||
export * from "./objects/Sky.js";
|
||||
export * from "./objects/Water.js";
|
||||
export { Water as Water2 } from "./objects/Water2.js";
|
||||
export type { WaterOptions as Water2Options } from "./objects/Water2.js";
|
||||
|
||||
export * from "./physics/AmmoPhysics.js";
|
||||
export * from "./physics/RapierPhysics.js";
|
||||
|
||||
export * from "./postprocessing/AfterimagePass.js";
|
||||
export * from "./postprocessing/BloomPass.js";
|
||||
export * from "./postprocessing/BokehPass.js";
|
||||
export * from "./postprocessing/ClearPass.js";
|
||||
export * from "./postprocessing/CubeTexturePass.js";
|
||||
export * from "./postprocessing/DotScreenPass.js";
|
||||
export * from "./postprocessing/EffectComposer.js";
|
||||
export * from "./postprocessing/FilmPass.js";
|
||||
export * from "./postprocessing/GlitchPass.js";
|
||||
export * from "./postprocessing/GTAOPass.js";
|
||||
export * from "./postprocessing/HalftonePass.js";
|
||||
export * from "./postprocessing/LUTPass.js";
|
||||
export * from "./postprocessing/MaskPass.js";
|
||||
export * from "./postprocessing/OutlinePass.js";
|
||||
export * from "./postprocessing/OutputPass.js";
|
||||
export * from "./postprocessing/Pass.js";
|
||||
export * from "./postprocessing/RenderPass.js";
|
||||
export * from "./postprocessing/RenderPixelatedPass.js";
|
||||
export * from "./postprocessing/SAOPass.js";
|
||||
export * from "./postprocessing/SavePass.js";
|
||||
export * from "./postprocessing/ShaderPass.js";
|
||||
export * from "./postprocessing/SMAAPass.js";
|
||||
export * from "./postprocessing/SSAARenderPass.js";
|
||||
export * from "./postprocessing/SSAOPass.js";
|
||||
export * from "./postprocessing/SSRPass.js";
|
||||
export * from "./postprocessing/TAARenderPass.js";
|
||||
export * from "./postprocessing/TexturePass.js";
|
||||
export * from "./postprocessing/UnrealBloomPass.js";
|
||||
|
||||
export * from "./renderers/CSS2DRenderer.js";
|
||||
export * from "./renderers/CSS3DRenderer.js";
|
||||
export * from "./renderers/Projector.js";
|
||||
export * from "./renderers/SVGRenderer.js";
|
||||
|
||||
export * from "./shaders/ACESFilmicToneMappingShader.js";
|
||||
export * from "./shaders/AfterimageShader.js";
|
||||
export * from "./shaders/BasicShader.js";
|
||||
export * from "./shaders/BleachBypassShader.js";
|
||||
export * from "./shaders/BlendShader.js";
|
||||
export * from "./shaders/BokehShader.js";
|
||||
export { BokehShader as BokehShader2 } from "./shaders/BokehShader2.js";
|
||||
export * from "./shaders/BrightnessContrastShader.js";
|
||||
export * from "./shaders/ColorCorrectionShader.js";
|
||||
export * from "./shaders/ColorifyShader.js";
|
||||
export * from "./shaders/ConvolutionShader.js";
|
||||
export * from "./shaders/CopyShader.js";
|
||||
export * from "./shaders/DepthLimitedBlurShader.js";
|
||||
export * from "./shaders/DigitalGlitch.js";
|
||||
export * from "./shaders/DOFMipMapShader.js";
|
||||
export * from "./shaders/DotScreenShader.js";
|
||||
export * from "./shaders/ExposureShader.js";
|
||||
export * from "./shaders/FilmShader.js";
|
||||
export * from "./shaders/FocusShader.js";
|
||||
export * from "./shaders/FreiChenShader.js";
|
||||
export * from "./shaders/FXAAShader.js";
|
||||
export * from "./shaders/GammaCorrectionShader.js";
|
||||
export * from "./shaders/GodRaysShader.js";
|
||||
export * from "./shaders/GTAOShader.js";
|
||||
export * from "./shaders/HalftoneShader.js";
|
||||
export * from "./shaders/HorizontalBlurShader.js";
|
||||
export * from "./shaders/HorizontalTiltShiftShader.js";
|
||||
export * from "./shaders/HueSaturationShader.js";
|
||||
export * from "./shaders/KaleidoShader.js";
|
||||
export * from "./shaders/LuminosityHighPassShader.js";
|
||||
export * from "./shaders/LuminosityShader.js";
|
||||
export * from "./shaders/MirrorShader.js";
|
||||
export * from "./shaders/NormalMapShader.js";
|
||||
export * from "./shaders/OutputShader.js";
|
||||
export * from "./shaders/RGBShiftShader.js";
|
||||
export * from "./shaders/SAOShader.js";
|
||||
export * from "./shaders/SepiaShader.js";
|
||||
export * from "./shaders/SMAAShader.js";
|
||||
export * from "./shaders/SobelOperatorShader.js";
|
||||
export * from "./shaders/SSAOShader.js";
|
||||
export * from "./shaders/SSRShader.js";
|
||||
export * from "./shaders/SubsurfaceScatteringShader.js";
|
||||
export * from "./shaders/TechnicolorShader.js";
|
||||
export * from "./shaders/ToonShader.js";
|
||||
export * from "./shaders/TriangleBlurShader.js";
|
||||
export * from "./shaders/UnpackDepthRGBAShader.js";
|
||||
export * from "./shaders/VelocityShader.js";
|
||||
export * from "./shaders/VerticalBlurShader.js";
|
||||
export * from "./shaders/VerticalTiltShiftShader.js";
|
||||
export * from "./shaders/VignetteShader.js";
|
||||
export * from "./shaders/VolumeShader.js";
|
||||
export * from "./shaders/WaterRefractionShader.js";
|
||||
|
||||
export * from "./textures/FlakesTexture.js";
|
||||
|
||||
export * as BufferGeometryUtils from "./utils/BufferGeometryUtils.js";
|
||||
export * as CameraUtils from "./utils/CameraUtils.js";
|
||||
export * as GeometryCompressionUtils from "./utils/GeometryCompressionUtils.js";
|
||||
export * as GeometryUtils from "./utils/GeometryUtils.js";
|
||||
export * from "./utils/LDrawUtils.js";
|
||||
export * as SceneUtils from "./utils/SceneUtils.js";
|
||||
export * from "./utils/ShadowMapViewer.js";
|
||||
export * as SkeletonUtils from "./utils/SkeletonUtils.js";
|
||||
export * as SortUtils from "./utils/SortUtils.js";
|
||||
export * from "./utils/UVsDebug.js";
|
||||
export * from "./utils/WebGLTextureUtils.js";
|
||||
export * from "./utils/WorkerPool.js";
|
||||
|
||||
export * from "./webxr/ARButton.js";
|
||||
export * from "./webxr/OculusHandModel.js";
|
||||
export * from "./webxr/OculusHandPointerModel.js";
|
||||
export * from "./webxr/Text2D.js";
|
||||
export * from "./webxr/VRButton.js";
|
||||
export * from "./webxr/XRButton.js";
|
||||
export * from "./webxr/XRControllerModelFactory.js";
|
||||
export * from "./webxr/XREstimatedLight.js";
|
||||
export * from "./webxr/XRHandMeshModel.js";
|
||||
export * from "./webxr/XRHandModelFactory.js";
|
||||
export * from "./webxr/XRHandPrimitiveModel.js";
|
||||
export * from "./webxr/XRPlanes.js";
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
import { AnimationClip, Vector3 } from "three";
|
||||
|
||||
export interface AnimationClipCreator {
|
||||
CreateRotationAnimation(period: number, axis: string): AnimationClip;
|
||||
CreateScaleAxisAnimation(period: number, axis: string): AnimationClip;
|
||||
CreateShakeAnimation(duration: number, shakeScale: Vector3): AnimationClip;
|
||||
CreatePulsationAnimation(duration: number, pulseScale: number): AnimationClip;
|
||||
CreateVisibilityAnimation(duration: number): AnimationClip;
|
||||
CreateMaterialColorAnimation(duration: number, colors: number[]): AnimationClip;
|
||||
}
|
||||
|
||||
export const AnimationClipCreator: AnimationClipCreator;
|
||||
-44
@@ -1,44 +0,0 @@
|
||||
import { LineBasicMaterial, MeshBasicMaterial, Object3D, SkinnedMesh, SphereGeometry, Vector3 } from "three";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
export interface IK {
|
||||
effector: number;
|
||||
iteration?: number | undefined;
|
||||
links: Array<{
|
||||
enabled?: boolean | undefined;
|
||||
index: number;
|
||||
limitation?: Vector3 | undefined;
|
||||
rotationMin?: Vector3 | undefined;
|
||||
rotationMax?: Vector3 | undefined;
|
||||
}>;
|
||||
minAngle?: number | undefined;
|
||||
maxAngle?: number | undefined;
|
||||
target: number;
|
||||
blendFactor?: number | undefined;
|
||||
}
|
||||
|
||||
export class CCDIKSolver {
|
||||
mesh: SkinnedMesh;
|
||||
iks: IK[];
|
||||
|
||||
constructor(mesh: SkinnedMesh, iks?: IK[]);
|
||||
|
||||
update(globalBlendFactor?: number): this;
|
||||
updateOne(ik: IK, overrideBlend?: number): this;
|
||||
createHelper(sphereSize?: number): CCDIKHelper;
|
||||
}
|
||||
|
||||
export class CCDIKHelper extends Object3D {
|
||||
root: SkinnedMesh;
|
||||
iks: IK[];
|
||||
|
||||
sphereGeometry: SphereGeometry;
|
||||
targetSphereMaterial: MeshBasicMaterial;
|
||||
effectorSphereMaterial: MeshBasicMaterial;
|
||||
linkSphereMaterial: MeshBasicMaterial;
|
||||
lineMaterial: LineBasicMaterial;
|
||||
|
||||
constructor(mesh: SkinnedMesh, iks?: IK[], sphereSize?: number);
|
||||
|
||||
dispose(): void;
|
||||
}
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
export default class WebGL {
|
||||
static isWebGL2Available(): boolean;
|
||||
static isColorSpaceAvailable(colorSpace: PredefinedColorSpace): boolean;
|
||||
static getWebGL2ErrorMessage(): HTMLElement;
|
||||
static getErrorMessage(version: number): HTMLElement;
|
||||
}
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
// tslint:disable-next-line:no-unnecessary-class
|
||||
|
||||
export default class WebGPU {
|
||||
static isAvailable(): boolean;
|
||||
static getStaticAdapter(): unknown;
|
||||
static getErrorMessage(): HTMLElement;
|
||||
}
|
||||
-208
@@ -1,208 +0,0 @@
|
||||
import { Camera, Controls, Raycaster, Scene } from "three";
|
||||
|
||||
export type ArcballControlsMouseActionOperation = "PAN" | "ROTATE" | "ZOOM" | "FOV";
|
||||
|
||||
export type ArcballControlsMouseActionMouse = 0 | 1 | 2 | "WHEEL";
|
||||
|
||||
export type ArcballControlsMouseActionKey = "SHIFT" | "CTRL";
|
||||
|
||||
export interface ArcballControlsEventMap {
|
||||
/**
|
||||
* Fires when the camera has been transformed by the controls.
|
||||
*/
|
||||
change: {};
|
||||
|
||||
/**
|
||||
* Fires when an interaction was initiated.
|
||||
*/
|
||||
start: {};
|
||||
|
||||
/**
|
||||
* Fires when an interaction has finished.
|
||||
*/
|
||||
end: {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Arcball controls allow the camera to be controlled by a virtual trackball with full touch support and advanced
|
||||
* navigation functionality.
|
||||
*/
|
||||
declare class ArcballControls extends Controls<ArcballControlsEventMap> {
|
||||
/**
|
||||
* The scene rendered by the camera.
|
||||
*/
|
||||
scene: Scene | null;
|
||||
|
||||
/**
|
||||
* The size of the gizmo relative to the screen width and height. Default is 0.67.
|
||||
*/
|
||||
radiusFactor: number;
|
||||
|
||||
/**
|
||||
* Duration time of focus animation.
|
||||
*/
|
||||
focusAnimationTime: number;
|
||||
|
||||
/**
|
||||
* If true, camera's near and far values will be adjusted every time zoom is performed trying to maintain the same
|
||||
* visible portion given by initial near and far values ( {@link PerspectiveCamera} only ). Default is false.
|
||||
*/
|
||||
adjustNearFar: boolean;
|
||||
|
||||
/**
|
||||
* The scaling factor used when performing zoom operation.
|
||||
*/
|
||||
scaleFactor: number;
|
||||
|
||||
/**
|
||||
* The damping inertia used if [page:.enableAnimations] is set to true.
|
||||
*/
|
||||
dampingFactor: number;
|
||||
|
||||
/**
|
||||
* Maximum angular velocity allowed on rotation animation start.
|
||||
*/
|
||||
wMax: number;
|
||||
|
||||
/**
|
||||
* Set to true to enable animations for rotation (damping) and focus operation. Default is true.
|
||||
*/
|
||||
enableAnimations: boolean;
|
||||
|
||||
/**
|
||||
* Enable or disable camera focusing on double-tap (or click) operations. Default is true.
|
||||
*/
|
||||
enableFocus: boolean;
|
||||
|
||||
/**
|
||||
* When set to true, a grid will appear when panning operation is being performed (desktop interaction only). Default is false.
|
||||
*/
|
||||
enableGrid: boolean;
|
||||
|
||||
/**
|
||||
* Set to true to make zoom become cursor centered.
|
||||
*/
|
||||
cursorZoom: boolean;
|
||||
|
||||
/**
|
||||
* Speed of rotation. Default is 1.
|
||||
*/
|
||||
rotateSpeed: number;
|
||||
|
||||
/**
|
||||
* Enable or disable camera panning. Default is true.
|
||||
*/
|
||||
enablePan: boolean;
|
||||
|
||||
/**
|
||||
* Enable or disable camera rotation. Default is true.
|
||||
*/
|
||||
enableRotate: boolean;
|
||||
|
||||
/**
|
||||
* Enable or disable zooming of the camera.
|
||||
*/
|
||||
enableZoom: boolean;
|
||||
|
||||
/**
|
||||
* How far you can dolly in ( {@link PerspectiveCamera} only ). Default is 0.
|
||||
*/
|
||||
minDistance: number;
|
||||
|
||||
/**
|
||||
* How far you can dolly out ( {@link PerspectiveCamera} only ). Default is Infinity.
|
||||
*/
|
||||
maxDistance: number;
|
||||
|
||||
/**
|
||||
* How far you can zoom in ( {@link OrthographicCamera} only ). Default is 0.
|
||||
*/
|
||||
minZoom: number;
|
||||
|
||||
/**
|
||||
* How far you can zoom out ( {@link OrthographicCamera} only ). Default is Infinity.
|
||||
*/
|
||||
maxZoom: number;
|
||||
|
||||
/**
|
||||
* @param camera 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. (optional)
|
||||
* @param scene The scene rendered by the camera. If not given, gizmos cannot be shown. (optional)
|
||||
*/
|
||||
constructor(camera: Camera, domElement?: HTMLElement | SVGElement | null, scene?: Scene | null);
|
||||
|
||||
/**
|
||||
* Set a new mouse action by specifying the operation to be performed and a mouse/key combination. In case of
|
||||
* conflict, replaces the existing one.
|
||||
* @param operation Operations can be specified as 'ROTATE', 'PAN', 'FOV' or 'ZOOM'.
|
||||
* @param mouse Mouse inputs can be specified as mouse buttons 0, 1 and 2 or 'WHEEL' for wheel notches.
|
||||
* @param key Keyboard modifiers can be specified as 'CTRL', 'SHIFT' or null if not needed.
|
||||
*/
|
||||
setMouseAction(
|
||||
operation: ArcballControlsMouseActionOperation,
|
||||
mouse: ArcballControlsMouseActionMouse,
|
||||
key?: ArcballControlsMouseActionKey | null,
|
||||
): boolean;
|
||||
|
||||
/**
|
||||
* Removes a mouse action by specifying its mouse/key combination.
|
||||
* @param mouse Mouse inputs can be specified as mouse buttons 0, 1 and 2 or 'WHEEL' for wheel notches.
|
||||
* @param key Keyboard modifiers can be specified as 'CTRL', 'SHIFT' or null if not needed.
|
||||
*/
|
||||
unsetMouseAction(mouse: ArcballControlsMouseActionMouse, key?: ArcballControlsMouseActionKey | null): boolean;
|
||||
|
||||
/**
|
||||
* Make gizmos more or less visible.
|
||||
*/
|
||||
activateGizmos(isActive: boolean): void;
|
||||
|
||||
/**
|
||||
* Set the camera to be controlled. Must be called in order to set a new camera to be controlled.
|
||||
*/
|
||||
setCamera(camera: Camera): void;
|
||||
|
||||
/**
|
||||
* Set the visible property of gizmos.
|
||||
*/
|
||||
setGizmosVisible(value: boolean): void;
|
||||
|
||||
/**
|
||||
* Update the `radiusFactor` value, redraw the gizmo and send a `changeEvent` to visualize the changes.
|
||||
*/
|
||||
setTbRadius(value: number): void;
|
||||
|
||||
/**
|
||||
* Reset the controls to their state from either the last time the {@link .saveState} was called, or the initial
|
||||
* state.
|
||||
*/
|
||||
reset(): void;
|
||||
|
||||
/**
|
||||
* Copy the current state to clipboard (as a readable JSON text).
|
||||
*/
|
||||
copyState(): void;
|
||||
|
||||
/**
|
||||
* Set the controls state from the clipboard, assumes that the clipboard stores a JSON text as saved from
|
||||
* {@link .copyState}.
|
||||
*/
|
||||
pasteState(): void;
|
||||
|
||||
/**
|
||||
* Save the current state of the controls. This can later be recovered with {@link .reset}.
|
||||
*/
|
||||
saveState(): void;
|
||||
|
||||
/**
|
||||
* Returns the {@link Raycaster} object that is used for user interaction. This object is shared between all
|
||||
* instances of ArcballControls. If you set the [.layers]{@link Object3D.layers} property of the
|
||||
* {@link ArcballControls}, you will also want to set the [.layers]{@link Raycaster.layers} property on the
|
||||
* {@link Raycaster} with a matching value, or else the {@link ArcballControls} won't work as expected.
|
||||
*/
|
||||
getRaycaster(): Raycaster;
|
||||
|
||||
update(): void;
|
||||
}
|
||||
|
||||
export { ArcballControls };
|
||||
-81
@@ -1,81 +0,0 @@
|
||||
import { Camera, Controls, MOUSE, Object3D, Raycaster, TOUCH } from "three";
|
||||
|
||||
export interface DragControlsEventMap {
|
||||
/**
|
||||
* Fires when the pointer is moved onto a 3D object, or onto one of its children.
|
||||
*/
|
||||
hoveron: { object: Object3D };
|
||||
|
||||
/**
|
||||
* Fires when the pointer is moved out of a 3D object.
|
||||
*/
|
||||
hoveroff: { object: Object3D };
|
||||
|
||||
/**
|
||||
* Fires when the user starts to drag a 3D object.
|
||||
*/
|
||||
dragstart: { object: Object3D };
|
||||
|
||||
/**
|
||||
* Fires when the user drags a 3D object.
|
||||
*/
|
||||
drag: { object: Object3D };
|
||||
|
||||
/**
|
||||
* Fires when the user has finished dragging a 3D object.
|
||||
*/
|
||||
dragend: { object: Object3D };
|
||||
}
|
||||
|
||||
declare class DragControls extends Controls<DragControlsEventMap> {
|
||||
/**
|
||||
* An array of draggable 3D objects.
|
||||
*/
|
||||
objects: Object3D[];
|
||||
|
||||
/**
|
||||
* Whether children of draggable objects can be dragged independently from their parent. Default is `true`.
|
||||
*/
|
||||
recursive: boolean;
|
||||
|
||||
/**
|
||||
* This option only works if the {@link .objects} array contains a single draggable group object. If set to `true`,
|
||||
* {@link DragControls} does not transform individual objects but the entire group. Default is `false`.
|
||||
*/
|
||||
transformGroup: boolean;
|
||||
|
||||
/**
|
||||
* The speed at which the object will rotate when dragged in `rotate` mode. The higher the number the faster the
|
||||
* rotation. Default is `1`.
|
||||
*/
|
||||
rotateSpeed: number;
|
||||
|
||||
/**
|
||||
* The internal raycaster used for detecting 3D objects.
|
||||
*/
|
||||
raycaster: Raycaster;
|
||||
|
||||
/**
|
||||
* This object defines what type of actions are assigned to the available mouse buttons.
|
||||
*/
|
||||
mouseButtons: {
|
||||
LEFT?: MOUSE | null | undefined;
|
||||
MIDDLE?: MOUSE | null | undefined;
|
||||
RIGHT?: MOUSE | null | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* This object defines what type of actions are assigned to what kind of touch interaction.
|
||||
*/
|
||||
touches: { ONE?: TOUCH | null | undefined };
|
||||
|
||||
/**
|
||||
* Creates a new instance of DragControls.
|
||||
* @param objects An array of draggable 3D objects.
|
||||
* @param camera The camera of the rendered scene.
|
||||
* @param domElement The HTML element used for event listeners. (optional)
|
||||
*/
|
||||
constructor(objects: Object3D[], camera: Camera, domElement?: HTMLElement | SVGElement | null);
|
||||
}
|
||||
|
||||
export { DragControls };
|
||||
-101
@@ -1,101 +0,0 @@
|
||||
import { Camera, Controls, Vector3 } from "three";
|
||||
|
||||
/**
|
||||
* This class is an alternative implementation of {@link FlyControls}.
|
||||
*/
|
||||
declare class FirstPersonControls extends Controls<{}> {
|
||||
/**
|
||||
* The movement speed. Default is *1*.
|
||||
*/
|
||||
movementSpeed: number;
|
||||
|
||||
/**
|
||||
* The look around speed. Default is `0.005`.
|
||||
*/
|
||||
lookSpeed: number;
|
||||
|
||||
/**
|
||||
* Whether or not it's possible to vertically look around. Default is `true`.
|
||||
*/
|
||||
lookVertical: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not the camera is automatically moved forward. Default is `false`.
|
||||
*/
|
||||
autoForward: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not it's possible to look around. Default is `true`.
|
||||
*/
|
||||
activeLook: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not the camera's height influences the forward movement speed. Default is `false`.
|
||||
* Use the properties {@link .heightCoef}, {@link .heightMin} and {@link .heightMax} for configuration
|
||||
*/
|
||||
heightSpeed: boolean;
|
||||
|
||||
/**
|
||||
* Determines how much faster the camera moves when it's y-component is near {@link .heightMax}. Default is *1*.
|
||||
*/
|
||||
heightCoef: number;
|
||||
|
||||
/**
|
||||
* Lower camera height limit used for movement speed adjustment. Default is *0*.
|
||||
*/
|
||||
heightMin: number;
|
||||
|
||||
/**
|
||||
* Upper camera height limit used for movement speed adjustment. Default is *1*.
|
||||
*/
|
||||
heightMax: number;
|
||||
|
||||
/**
|
||||
* Whether or not looking around is vertically constrained by [{@link .verticalMin}, {@link .verticalMax}]. Default
|
||||
* is `false`.
|
||||
*/
|
||||
constrainVertical: boolean;
|
||||
|
||||
/**
|
||||
* How far you can vertically look around, lower limit. Range is 0 to Math.PI radians. Default is *0*.
|
||||
*/
|
||||
verticalMin: number;
|
||||
|
||||
/**
|
||||
* How far you can vertically look around, upper limit. Range is 0 to Math.PI radians. Default is `Math.PI`.
|
||||
*/
|
||||
verticalMax: number;
|
||||
|
||||
/**
|
||||
* Whether or not the mouse is pressed down. Read-only property.
|
||||
*/
|
||||
mouseDragOn: boolean;
|
||||
|
||||
/**
|
||||
* Creates a new instance of {@link FirstPersonControls}.
|
||||
* @param object The camera to be controlled.
|
||||
* @param domElement The HTML element used for event listeners. (optional)
|
||||
*/
|
||||
constructor(object: Camera, domElement?: HTMLElement | SVGElement);
|
||||
|
||||
/**
|
||||
* Should be called if the application window is resized.
|
||||
*/
|
||||
handleResize(): void;
|
||||
|
||||
/**
|
||||
* Ensures the controls orient the camera towards the defined target position.
|
||||
* @param vector A vector representing the target position.
|
||||
*/
|
||||
lookAt(vector: Vector3): this;
|
||||
|
||||
/**
|
||||
* Ensures the controls orient the camera towards the defined target position.
|
||||
* @param x The x component of the world space position.
|
||||
* @param y The y component of the world space position.
|
||||
* @param z The z component of the world space position.
|
||||
*/
|
||||
lookAt(x: number, y: number, z: number): this;
|
||||
}
|
||||
|
||||
export { FirstPersonControls };
|
||||
-44
@@ -1,44 +0,0 @@
|
||||
import { Camera, Controls } from "three";
|
||||
|
||||
export interface FlyControlsEventMap {
|
||||
/**
|
||||
* Fires when the camera has been transformed by the controls.
|
||||
*/
|
||||
change: {};
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link FlyControls} enables a navigation similar to fly modes in DCC tools like Blender. You can arbitrarily
|
||||
* transform the camera in 3D space without any limitations (e.g. focus on a specific target).
|
||||
*/
|
||||
declare class FlyControls extends Controls<FlyControlsEventMap> {
|
||||
/**
|
||||
* The movement speed. Default is `1`.
|
||||
*/
|
||||
movementSpeed: number;
|
||||
|
||||
/**
|
||||
* The rotation speed. Default is `0.005`.
|
||||
*/
|
||||
rollSpeed: number;
|
||||
|
||||
/**
|
||||
* If set to `true`, you can only look around by performing a drag interaction. Default is `false`.
|
||||
*/
|
||||
dragToLook: boolean;
|
||||
|
||||
/**
|
||||
* If set to `true`, the camera automatically moves forward (and does not stop) when initially translated. Default
|
||||
* is `false`.
|
||||
*/
|
||||
autoForward: boolean;
|
||||
|
||||
/**
|
||||
* Creates a new instance of {@link FlyControls}.
|
||||
* @param object The camera to be controlled.
|
||||
* @param domElement The HTML element used for event listeners. (optional)
|
||||
*/
|
||||
constructor(object: Camera, domElement?: HTMLElement | SVGElement | null);
|
||||
}
|
||||
|
||||
export { FlyControls };
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
import { Camera } from "three";
|
||||
import { OrbitControls } from "./OrbitControls.js";
|
||||
|
||||
/**
|
||||
* MapControls performs orbiting, dollying (zooming), and panning.
|
||||
* Unlike TrackballControls, it maintains the "up" direction
|
||||
* object.up (+Y by default).
|
||||
*
|
||||
* Orbit - right mouse, or left mouse + ctrl/meta/shiftKey / touch:
|
||||
* two-finger rotate
|
||||
* Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish
|
||||
* Pan - left mouse, or arrow keys / touch: one-finger move
|
||||
*
|
||||
* @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 MapControls extends OrbitControls {
|
||||
constructor(object: Camera, domElement?: HTMLElement);
|
||||
}
|
||||
-256
@@ -1,256 +0,0 @@
|
||||
import { Camera, Controls, MOUSE, TOUCH, Vector3 } from "three";
|
||||
|
||||
export interface OrbitControlsEventMap {
|
||||
/**
|
||||
* Fires when the camera has been transformed by the controls.
|
||||
*/
|
||||
change: {};
|
||||
|
||||
/**
|
||||
* Fires when an interaction was initiated.
|
||||
*/
|
||||
start: {};
|
||||
|
||||
/**
|
||||
* Fires when an interaction has finished.
|
||||
*/
|
||||
end: {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Orbit controls allow the camera to orbit around a target.
|
||||
*/
|
||||
declare class OrbitControls extends Controls<OrbitControlsEventMap> {
|
||||
/**
|
||||
* The focus point of the controls, the {@link .object} orbits around this. It can be updated manually at any point
|
||||
* to change the focus of the controls.
|
||||
*/
|
||||
target: Vector3;
|
||||
|
||||
/**
|
||||
* The focus point of the {@link .minTargetRadius} and {@link .maxTargetRadius} limits. It can be updated manually
|
||||
* at any point to change the center of interest for the {@link .target}.
|
||||
*/
|
||||
cursor: Vector3;
|
||||
|
||||
/**
|
||||
* How far you can dolly in ( {@link PerspectiveCamera} only ). Default is 0.
|
||||
*/
|
||||
minDistance: number;
|
||||
|
||||
/**
|
||||
* How far you can dolly out ( {@link PerspectiveCamera} only ). Default is Infinity.
|
||||
*/
|
||||
maxDistance: number;
|
||||
|
||||
/**
|
||||
* How far you can zoom in ( {@link OrthographicCamera} only ). Default is 0.
|
||||
*/
|
||||
minZoom: number;
|
||||
|
||||
/**
|
||||
* How far you can zoom out ( {@link OrthographicCamera} only ). Default is Infinity.
|
||||
*/
|
||||
maxZoom: number;
|
||||
|
||||
/**
|
||||
* How close you can get the target to the 3D {@link .cursor}. Default is 0.
|
||||
*/
|
||||
minTargetRadius: number;
|
||||
|
||||
/**
|
||||
* How far you can move the target from the 3D {@link .cursor}. Default is Infinity.
|
||||
*/
|
||||
maxTargetRadius: number;
|
||||
|
||||
/**
|
||||
* How far you can orbit vertically, lower limit. Range is 0 to Math.PI radians, and default is 0.
|
||||
*/
|
||||
minPolarAngle: number;
|
||||
|
||||
/**
|
||||
* How far you can orbit vertically, upper limit. Range is 0 to Math.PI radians, and default is 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 is 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 is Infinity.
|
||||
*/
|
||||
maxAzimuthAngle: number;
|
||||
|
||||
/**
|
||||
* Set to true to enable damping (inertia), which can be used to give a sense of weight to the controls. Default is
|
||||
* false.
|
||||
* Note that if this is enabled, you must call {@link .update}() in your animation loop.
|
||||
*/
|
||||
enableDamping: boolean;
|
||||
|
||||
/**
|
||||
* The damping inertia used if .enableDamping is set to true. Default is `0.05`.
|
||||
* Note that for this to work, you must call {@link .update}() in your animation loop.
|
||||
*/
|
||||
dampingFactor: number;
|
||||
|
||||
/**
|
||||
* Enable or disable zooming (dollying) of the camera.
|
||||
*/
|
||||
enableZoom: boolean;
|
||||
|
||||
/**
|
||||
* Speed of zooming / dollying. Default is 1.
|
||||
*/
|
||||
zoomSpeed: number;
|
||||
|
||||
/**
|
||||
* Enable or disable horizontal and vertical rotation of the camera. Default is true.
|
||||
* Note that it is possible to disable a single axis by setting the min and max of the
|
||||
* [polar angle]{@link .minPolarAngle} or [azimuth angle]{@link .minAzimuthAngle} to the same value, which will
|
||||
* cause the vertical or horizontal rotation to be fixed at that value.
|
||||
*/
|
||||
enableRotate: boolean;
|
||||
|
||||
/**
|
||||
* Speed of rotation. Default is 1.
|
||||
*/
|
||||
rotateSpeed: number;
|
||||
|
||||
/**
|
||||
* How fast to rotate the camera when the keyboard is used. Default is 1.
|
||||
*/
|
||||
keyRotateSpeed: number;
|
||||
|
||||
/**
|
||||
* Enable or disable camera panning. Default is true.
|
||||
*/
|
||||
enablePan: boolean;
|
||||
|
||||
/**
|
||||
* Speed of panning. Default is 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`.
|
||||
*/
|
||||
screenSpacePanning: boolean;
|
||||
|
||||
/**
|
||||
* How fast to pan the camera when the keyboard is used. Default is 7.0 pixels per keypress.
|
||||
*/
|
||||
keyPanSpeed: number;
|
||||
|
||||
/**
|
||||
* Setting this property to `true` allows to zoom to the cursor's position. Default is `false`.
|
||||
*/
|
||||
zoomToCursor: boolean;
|
||||
|
||||
/**
|
||||
* Set to true to automatically rotate around the target.
|
||||
* Note that if this is enabled, you must call {@link .update}() in your animation loop. If you want the auto-rotate speed
|
||||
* to be independent of the frame rate (the refresh rate of the display), you must pass the time `deltaTime`, in
|
||||
* seconds, to {@link .update}().
|
||||
*/
|
||||
autoRotate: boolean;
|
||||
|
||||
/**
|
||||
* How fast to rotate around the target if {@link .autoRotate} is true. Default is 2.0, which equates to 30 seconds
|
||||
* per orbit at 60fps.
|
||||
* Note that if {@link .autoRotate} is enabled, you must call {@link .update}() in your animation loop.
|
||||
*/
|
||||
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: {
|
||||
LEFT?: MOUSE | null | undefined;
|
||||
MIDDLE?: MOUSE | null | undefined;
|
||||
RIGHT?: MOUSE | null | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* This object contains references to the touch actions used by the controls.
|
||||
*/
|
||||
touches: { ONE?: TOUCH | null | undefined; TWO?: TOUCH | null | undefined };
|
||||
|
||||
/**
|
||||
* Used internally by the {@link .saveState} and {@link .reset} methods.
|
||||
*/
|
||||
target0: Vector3;
|
||||
|
||||
/**
|
||||
* Used internally by the {@link .saveState} and {@link .reset} methods.
|
||||
*/
|
||||
position0: Vector3;
|
||||
|
||||
/**
|
||||
* Used internally by the {@link .saveState} and {@link .reset} methods.
|
||||
*/
|
||||
zoom0: number;
|
||||
|
||||
/**
|
||||
* @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. (optional)
|
||||
*/
|
||||
constructor(object: Camera, domElement?: HTMLElement | SVGElement | null);
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* Removes the key event listener previously defined with {@link .listenToKeyEvents}().
|
||||
*/
|
||||
stopListenToKeyEvents(): void;
|
||||
|
||||
/**
|
||||
* Save the current state of the controls. This can later be recovered with {@link .reset}.
|
||||
*/
|
||||
saveState(): void;
|
||||
|
||||
/**
|
||||
* Reset the controls to their state from either the last time the {@link .saveState} was called, or the initial
|
||||
* state.
|
||||
*/
|
||||
reset(): void;
|
||||
|
||||
/**
|
||||
* Update the controls. Must be called after any manual changes to the camera's transform, or in the update loop if
|
||||
* {@link .autoRotate} or {@link .enableDamping} are set. `deltaTime`, in seconds, is optional, and is only required
|
||||
* if you want the auto-rotate speed to be independent of the frame rate (the refresh rate of the display).
|
||||
*/
|
||||
update(deltaTime?: number | null): boolean;
|
||||
}
|
||||
|
||||
export { OrbitControls };
|
||||
-84
@@ -1,84 +0,0 @@
|
||||
import { Camera, Controls, Vector3 } from "three";
|
||||
|
||||
export interface PointerLockControlsEventMap {
|
||||
/**
|
||||
* Fires when the user moves the mouse.
|
||||
*/
|
||||
change: {};
|
||||
|
||||
/**
|
||||
* Fires when the pointer lock status is "locked" (in other words: the mouse is captured).
|
||||
*/
|
||||
lock: {};
|
||||
|
||||
/**
|
||||
* Fires when the pointer lock status is "unlocked" (in other words: the mouse is not captured anymore).
|
||||
*/
|
||||
unlock: {};
|
||||
}
|
||||
|
||||
/**
|
||||
* The implementation of this class is based on the [Pointer Lock API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API}.
|
||||
* {@link PointerLockControls} is a perfect choice for first person 3D games.
|
||||
*/
|
||||
declare class PointerLockControls extends Controls<PointerLockControlsEventMap> {
|
||||
/**
|
||||
* Whether or not the controls are locked.
|
||||
*/
|
||||
isLocked: boolean;
|
||||
|
||||
/**
|
||||
* Camera pitch, lower limit. Range is 0 to Math.PI radians. Default is 0.
|
||||
*/
|
||||
minPolarAngle: number;
|
||||
|
||||
/**
|
||||
* Camera pitch, upper limit. Range is 0 to Math.PI radians. Default is Math.PI.
|
||||
*/
|
||||
maxPolarAngle: number;
|
||||
|
||||
/**
|
||||
* Multiplier for how much the pointer movement influences the camera rotation. Default is 1.
|
||||
*/
|
||||
pointerSpeed: number;
|
||||
|
||||
/**
|
||||
* Creates a new instance of {@link PointerLockControls}.
|
||||
* @param camera The camera of the rendered scene.
|
||||
* @param domElement The HTML element used for event listeners.
|
||||
*/
|
||||
constructor(camera: Camera, domElement?: HTMLElement | SVGElement | null);
|
||||
|
||||
/**
|
||||
* Returns the look direction of the camera.
|
||||
* @param v The target vector.
|
||||
*/
|
||||
getDirection(v: Vector3): Vector3;
|
||||
|
||||
/**
|
||||
* Moves the camera forward parallel to the xz-plane. Assumes camera.up is y-up.
|
||||
* @param distance The signed distance.
|
||||
*/
|
||||
moveForward(distance: number): void;
|
||||
|
||||
/**
|
||||
* Moves the camera sidewards parallel to the xz-plane.
|
||||
* @param distance The signed distance.
|
||||
*/
|
||||
moveRight(distance: number): void;
|
||||
|
||||
/**
|
||||
* Activates the pointer lock.
|
||||
*
|
||||
* @param {boolean} [unadjustedMovement=false] - Disables OS-level adjustment for mouse acceleration, and accesses raw mouse input instead.
|
||||
* Setting it to true will disable mouse acceleration.
|
||||
*/
|
||||
lock(unadjustedMovement?: boolean): void;
|
||||
|
||||
/**
|
||||
* Exits the pointer lock.
|
||||
*/
|
||||
unlock(): void;
|
||||
}
|
||||
|
||||
export { PointerLockControls };
|
||||
-142
@@ -1,142 +0,0 @@
|
||||
import { Camera, Controls, MOUSE, Vector3 } from "three";
|
||||
|
||||
export interface TrackballControlsEventMap {
|
||||
/**
|
||||
* Fires when the camera has been transformed by the controls.
|
||||
*/
|
||||
change: {};
|
||||
|
||||
/**
|
||||
* Fires when an interaction (e.g. touch) was initiated.
|
||||
*/
|
||||
start: {};
|
||||
|
||||
/**
|
||||
* Fires when an interaction has finished.
|
||||
*/
|
||||
end: {};
|
||||
}
|
||||
|
||||
/**
|
||||
* TrackballControls is similar to {@link OrbitControls}. However, it does not maintain a constant camera
|
||||
* [up]{@link Object3D.up} vector. That means if the camera orbits over the “north” and “south” poles, it does not flip
|
||||
* to stay "right side up".
|
||||
*/
|
||||
declare class TrackballControls extends Controls<TrackballControlsEventMap> {
|
||||
/**
|
||||
* Represents the properties of the screen. Automatically set when {@link .handleResize}() is called.
|
||||
* - left: Represents the offset in pixels to the screen's left boundary.
|
||||
* - top: Represents the offset in pixels to the screen's top boundary.
|
||||
* - width: Represents the screen width in pixels.
|
||||
* - height: Represents the screen height in pixels.
|
||||
*/
|
||||
screen: { left: number; top: number; width: number; height: number };
|
||||
|
||||
/**
|
||||
* The rotation speed. Default is `1.0`.
|
||||
*/
|
||||
rotateSpeed: number;
|
||||
|
||||
/**
|
||||
* The zoom speed. Default is `1.2`.
|
||||
*/
|
||||
zoomSpeed: number;
|
||||
|
||||
/**
|
||||
* The pan speed. Default is `0.3`.
|
||||
*/
|
||||
panSpeed: number;
|
||||
|
||||
/**
|
||||
* Whether or not rotation is disabled. Default is `false`.
|
||||
*/
|
||||
noRotate: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not zooming is disabled. Default is `false`.
|
||||
*/
|
||||
noZoom: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not panning is disabled. Default is `false`.
|
||||
*/
|
||||
noPan: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not damping is disabled. Default is `false`.
|
||||
*/
|
||||
staticMoving: boolean;
|
||||
|
||||
/**
|
||||
* Defines the intensity of damping. Only considered if {@link .staticMoving} is set to `false`. Default is `0.2`.
|
||||
*/
|
||||
dynamicDampingFactor: number;
|
||||
|
||||
/**
|
||||
* How far you can dolly in ( {@link PerspectiveCamera} only ). Default is *0*.
|
||||
*/
|
||||
minDistance: number;
|
||||
|
||||
/**
|
||||
* How far you can dolly out ( {@link PerspectiveCamera} only ). Default is `Infinity`.
|
||||
*/
|
||||
maxDistance: number;
|
||||
|
||||
/**
|
||||
* How far you can zoom out ( {@link OrthographicCamera} only ). Default is `Infinity`.
|
||||
*/
|
||||
minZoom: number;
|
||||
|
||||
/**
|
||||
* How far you can zoom in ( {@link OrthographicCamera} only ). Default is *0*.
|
||||
*/
|
||||
maxZoom: number;
|
||||
|
||||
/**
|
||||
* This array holds keycodes for controlling interactions.
|
||||
* - When the first defined key is pressed, all mouse interactions (left, middle, right) performs orbiting.
|
||||
* - When the second defined key is pressed, all mouse interactions (left, middle, right) performs zooming.
|
||||
* - When the third defined key is pressed, all mouse interactions (left, middle, right) performs panning.
|
||||
*
|
||||
* Default is *KeyA, KeyS, KeyD* which represents A, S, D.
|
||||
*/
|
||||
keys: [string, string, string];
|
||||
|
||||
/**
|
||||
* This object contains references to the mouse actions used by the controls.
|
||||
* - .LEFT is assigned with `THREE.MOUSE.ROTATE`
|
||||
* - .MIDDLE is assigned with `THREE.MOUSE.ZOOM`
|
||||
* - .RIGHT is assigned with `THREE.MOUSE.PAN`
|
||||
*/
|
||||
mouseButtons: {
|
||||
LEFT?: MOUSE | null | undefined;
|
||||
MIDDLE?: MOUSE | null | undefined;
|
||||
RIGHT?: MOUSE | null | undefined;
|
||||
};
|
||||
|
||||
/**
|
||||
* The focus point of the controls.
|
||||
*/
|
||||
target: Vector3;
|
||||
|
||||
/**
|
||||
* Creates a new instance of TrackballControls.
|
||||
* @param camera The camera of the rendered scene.
|
||||
* @param domElement The HTML element used for event listeners. (optional)
|
||||
*/
|
||||
constructor(camera: Camera, domElement?: HTMLElement | SVGElement | null);
|
||||
|
||||
/**
|
||||
* Should be called if the application window is resized.
|
||||
*/
|
||||
handleResize(): void;
|
||||
|
||||
update(): void;
|
||||
|
||||
/**
|
||||
* Resets the controls to its initial state.
|
||||
*/
|
||||
reset(): void;
|
||||
}
|
||||
|
||||
export { TrackballControls };
|
||||
-308
@@ -1,308 +0,0 @@
|
||||
import { Camera, ColorRepresentation, Controls, Mesh, Object3D, Quaternion, Raycaster, Vector3 } from "three";
|
||||
|
||||
export type TransformControlsMode = "translate" | "rotate" | "scale";
|
||||
|
||||
export interface TransformControlsEventMap {
|
||||
/**
|
||||
* Fires if any type of change (object or property change) is performed. Property changes are separate events you
|
||||
* can add event listeners to. The event type is "propertyname-changed".
|
||||
*/
|
||||
change: {};
|
||||
|
||||
/**
|
||||
* Fires if a pointer (mouse/touch) becomes active.
|
||||
*/
|
||||
mouseDown: { mode: TransformControlsMode };
|
||||
|
||||
/**
|
||||
* Fires if a pointer (mouse/touch) is no longer active.
|
||||
*/
|
||||
mouseUp: { mode: TransformControlsMode };
|
||||
|
||||
/**
|
||||
* Fires if the controlled 3D object is changed.
|
||||
*/
|
||||
objectChange: {};
|
||||
|
||||
"camera-changed": { value: unknown };
|
||||
"object-changed": { value: unknown };
|
||||
"enabled-changed": { value: unknown };
|
||||
"axis-changed": { value: unknown };
|
||||
"mode-changed": { value: unknown };
|
||||
"translationSnap-changed": { value: unknown };
|
||||
"rotationSnap-changed": { value: unknown };
|
||||
"scaleSnap-changed": { value: unknown };
|
||||
"space-changed": { value: unknown };
|
||||
"size-changed": { value: unknown };
|
||||
"dragging-changed": { value: unknown };
|
||||
"showX-changed": { value: unknown };
|
||||
"showY-changed": { value: unknown };
|
||||
"showZ-changed": { value: unknown };
|
||||
"minX-changed": { value: unknown };
|
||||
"maxX-changed": { value: unknown };
|
||||
"minY-changed": { value: unknown };
|
||||
"maxY-changed": { value: unknown };
|
||||
"minZ-changed": { value: unknown };
|
||||
"maxZ-changed": { value: unknown };
|
||||
"worldPosition-changed": { value: unknown };
|
||||
"worldPositionStart-changed": { value: unknown };
|
||||
"worldQuaternion-changed": { value: unknown };
|
||||
"worldQuaternionStart-changed": { value: unknown };
|
||||
"cameraPosition-changed": { value: unknown };
|
||||
"cameraQuaternion-changed": { value: unknown };
|
||||
"pointStart-changed": { value: unknown };
|
||||
"pointEnd-changed": { value: unknown };
|
||||
"rotationAxis-changed": { value: unknown };
|
||||
"rotationAngle-changed": { value: unknown };
|
||||
"eye-changed": { value: unknown };
|
||||
}
|
||||
|
||||
/**
|
||||
* This class can be used to transform objects in 3D space by adapting a similar interaction model of DCC tools like
|
||||
* Blender. Unlike other controls, it is not intended to transform the scene's camera.
|
||||
*
|
||||
* TransformControls expects that its attached 3D object is part of the scene graph.
|
||||
*/
|
||||
declare class TransformControls extends Controls<TransformControlsEventMap> {
|
||||
/**
|
||||
* The camera of the rendered scene.
|
||||
*/
|
||||
camera: Camera;
|
||||
|
||||
/**
|
||||
* The current transformation axis.
|
||||
*/
|
||||
axis: "X" | "Y" | "Z" | "E" | "XY" | "YZ" | "XZ" | "XYZ" | "XYZE" | null;
|
||||
|
||||
/**
|
||||
* The current transformation mode. Possible values are "translate", "rotate" and "scale". Default is `translate`.
|
||||
*/
|
||||
mode: TransformControlsMode;
|
||||
|
||||
/**
|
||||
* By default, 3D objects are continuously translated. If you set this property to a numeric value (world units),
|
||||
* you can define in which steps the 3D object should be translated. Default is `null`.
|
||||
*/
|
||||
translationSnap: number | null;
|
||||
|
||||
/**
|
||||
* By default, 3D objects are continuously rotated. If you set this property to a numeric value (radians), you can
|
||||
* define in which steps the 3D object should be rotated. Default is `null`.
|
||||
*/
|
||||
rotationSnap: number | null;
|
||||
|
||||
/**
|
||||
* By default, 3D objects are continuously scaled. If you set this property to a numeric value, you can define in
|
||||
* which steps the 3D object should be scaled. Default is `null`.
|
||||
*/
|
||||
scaleSnap: number | null;
|
||||
|
||||
/**
|
||||
* Defines in which coordinate space transformations should be performed. Possible values are "world" and "local".
|
||||
* Default is `world`.
|
||||
*/
|
||||
space: "world" | "local";
|
||||
|
||||
/**
|
||||
* The size of the helper UI (axes/planes). Default is *1*.
|
||||
*/
|
||||
size: number;
|
||||
|
||||
/**
|
||||
* Whether or not dragging is currently performed. Read-only property.
|
||||
*/
|
||||
dragging: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not the x-axis helper should be visible. Default is `true`.
|
||||
*/
|
||||
showX: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not the y-axis helper should be visible. Default is `true`.
|
||||
*/
|
||||
showY: boolean;
|
||||
|
||||
/**
|
||||
* Whether or not the z-axis helper should be visible. Default is `true`.
|
||||
*/
|
||||
showZ: boolean;
|
||||
|
||||
/**
|
||||
* The minimum allowed X position during translation. Default is `-Infinity`.
|
||||
*/
|
||||
minx: number;
|
||||
|
||||
/**
|
||||
* The maximum allowed X position during translation. Default is `Infinity`.
|
||||
*/
|
||||
maxX: number;
|
||||
|
||||
/**
|
||||
* The minimum allowed Y position during translation. Default is `-Infinity`.
|
||||
*/
|
||||
minY: number;
|
||||
|
||||
/**
|
||||
* The maximum allowed Y position during translation. Default is `Infinity`.
|
||||
*/
|
||||
maxY: number;
|
||||
|
||||
/**
|
||||
* The minimum allowed Z position during translation. Default is `-Infinity`.
|
||||
*/
|
||||
minZ: number;
|
||||
|
||||
/**
|
||||
* The maximum allowed Z position during translation. Default is `Infinity`.
|
||||
*/
|
||||
maxZ: number;
|
||||
|
||||
/**
|
||||
* Creates a new instance of TransformControls.
|
||||
* @param camera The camera of the rendered scene.
|
||||
* @param domElement The HTML element used for event listeners. (optional)
|
||||
*/
|
||||
constructor(camera: Camera, domElement?: HTMLElement | SVGElement | null);
|
||||
|
||||
/**
|
||||
* Returns the visual representation of the controls. Add the helper to your scene to visually transform the
|
||||
* attached 3D object.
|
||||
*/
|
||||
getHelper(): TransformControlsRoot;
|
||||
|
||||
pointerHover(pointer: PointerEvent | null): void;
|
||||
pointerDown(pointer: PointerEvent | null): void;
|
||||
pointerMove(pointer: PointerEvent | null): void;
|
||||
pointerUp(pointer: PointerEvent | null): void;
|
||||
|
||||
/**
|
||||
* Sets the 3D object that should be transformed and ensures the controls UI is visible.
|
||||
* @param object The 3D object that should be transformed.
|
||||
*/
|
||||
attach(object: Object3D): this;
|
||||
|
||||
/**
|
||||
* Removes the current 3D object from the controls and makes the helper UI invisible.
|
||||
*/
|
||||
detach(): this;
|
||||
|
||||
/**
|
||||
* Resets the object's position, rotation and scale to when the current transform began.
|
||||
*/
|
||||
reset(): void;
|
||||
|
||||
/**
|
||||
* Returns the {@link Raycaster} object that is used for user interaction. This object is shared between all
|
||||
* instances of TransformControls. If you set the [.layers]{@link Object3D.layers} property of the
|
||||
* TransformControls, you will also want to set the [.layers]{@link Raycaster.layers} property on the
|
||||
* {@link Raycaster} with a matching value, or else the TransformControls won't work as expected.
|
||||
*/
|
||||
getRaycaster(): Raycaster;
|
||||
|
||||
/**
|
||||
* Returns the transformation mode.
|
||||
*/
|
||||
getMode(): TransformControlsMode;
|
||||
|
||||
/**
|
||||
* Sets the transformation mode.
|
||||
* @param mode The transformation mode.
|
||||
*/
|
||||
setMode(mode: TransformControlsMode): void;
|
||||
|
||||
/**
|
||||
* Sets the translation snap.
|
||||
* @param translationSnap The translation snap.
|
||||
*/
|
||||
setTranslationSnap(translationSnap: number | null): void;
|
||||
|
||||
/**
|
||||
* Sets the rotation snap.
|
||||
* @param rotationSnap The rotation snap.
|
||||
*/
|
||||
setRotationSnap(rotationSnap: number | null): void;
|
||||
|
||||
/**
|
||||
* Sets the scale snap.
|
||||
* @param scaleSnap The scale snap.
|
||||
*/
|
||||
setScaleSnap(scaleSnap: number | null): void;
|
||||
|
||||
/**
|
||||
* Sets the size of the helper UI.
|
||||
* @param size The size of the helper UI.
|
||||
*/
|
||||
setSize(size: number): void;
|
||||
|
||||
/**
|
||||
* Sets the coordinate space in which transformations are applied.
|
||||
* @param space The coordinate space in which transformations are applied.
|
||||
*/
|
||||
setSpace(space: "world" | "local"): void;
|
||||
|
||||
/**
|
||||
* Sets the colors of the control's gizmo.
|
||||
*
|
||||
* @param {number|Color|string} xAxis - The x-axis color.
|
||||
* @param {number|Color|string} yAxis - The y-axis color.
|
||||
* @param {number|Color|string} zAxis - The z-axis color.
|
||||
* @param {number|Color|string} active - The color for active elements.
|
||||
*/
|
||||
setColors(
|
||||
xAxis: ColorRepresentation,
|
||||
yAxis: ColorRepresentation,
|
||||
zAxis: ColorRepresentation,
|
||||
active: ColorRepresentation,
|
||||
): void;
|
||||
}
|
||||
|
||||
declare class TransformControlsRoot extends Object3D {
|
||||
readonly isTransformControlsRoot: true;
|
||||
|
||||
controls: TransformControls;
|
||||
|
||||
constructor(controls: TransformControls);
|
||||
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
declare class TransformControlsGizmo extends Object3D {
|
||||
isTransformControlsGizmo: true;
|
||||
|
||||
gizmo: {
|
||||
translate: Object3D;
|
||||
rotate: Object3D;
|
||||
scale: Object3D;
|
||||
};
|
||||
helper: {
|
||||
translate: Object3D;
|
||||
rotate: Object3D;
|
||||
scale: Object3D;
|
||||
};
|
||||
picker: {
|
||||
translate: Object3D;
|
||||
rotate: Object3D;
|
||||
scale: Object3D;
|
||||
};
|
||||
|
||||
constructor();
|
||||
}
|
||||
|
||||
declare class TransformControlsPlane extends Mesh {
|
||||
readonly isTransformControlsPlane: true;
|
||||
|
||||
constructor();
|
||||
|
||||
mode: TransformControlsMode;
|
||||
|
||||
axis: "X" | "Y" | "Z" | "XY" | "YZ" | "XZ" | "XYZ" | "E";
|
||||
|
||||
space: "local" | "world";
|
||||
|
||||
eye: Vector3;
|
||||
worldPosition: Vector3;
|
||||
worldQuaternion: Quaternion;
|
||||
}
|
||||
|
||||
export { TransformControls, TransformControlsGizmo, TransformControlsPlane };
|
||||
-55
@@ -1,55 +0,0 @@
|
||||
import { Camera, DirectionalLight, Material, Object3D, Vector2, Vector3 } from "three";
|
||||
import { CSMFrustum } from "./CSMFrustum.js";
|
||||
|
||||
export type CSMMode = "uniform" | "logarithmic" | "practical" | "custom";
|
||||
|
||||
export interface CSMParameters {
|
||||
camera?: Camera;
|
||||
parent?: Object3D;
|
||||
cascades?: number;
|
||||
maxFar?: number;
|
||||
mode?: CSMMode;
|
||||
shadowMapSize?: number;
|
||||
shadowBias?: number;
|
||||
lightDirection?: Vector3;
|
||||
lightIntensity?: number;
|
||||
lightNear?: number;
|
||||
lightFar?: number;
|
||||
lightMargin?: number;
|
||||
customSplitsCallback?: (cascades: number, cameraNear: number, cameraFar: number, breaks: number[]) => void;
|
||||
}
|
||||
|
||||
export class CSM {
|
||||
constructor(data: CSMParameters);
|
||||
camera: Camera;
|
||||
parent: Object3D;
|
||||
cascades: number;
|
||||
maxFar: number;
|
||||
mode: CSMMode;
|
||||
shadowMapSize: number;
|
||||
shadowBias: number;
|
||||
lightDirection: Vector3;
|
||||
lightIntensity: number;
|
||||
lightNear: number;
|
||||
lightFar: number;
|
||||
lightMargin: number;
|
||||
customSplitsCallback: (cascades: number, cameraNear: number, cameraFar: number, breaks: number[]) => void;
|
||||
fade: boolean;
|
||||
mainFrustum: CSMFrustum;
|
||||
frustums: CSMFrustum[];
|
||||
breaks: number[];
|
||||
lights: DirectionalLight[];
|
||||
shaders: Map<unknown, string>;
|
||||
createLights(): void;
|
||||
initCascades(): void;
|
||||
updateShadowBounds(): void;
|
||||
getBreaks(): void;
|
||||
update(): void;
|
||||
injectInclude(): void;
|
||||
setupMaterial(material: Material): void;
|
||||
updateUniforms(): void;
|
||||
getExtendedBreaks(target: Vector2[]): void;
|
||||
updateFrustums(): void;
|
||||
remove(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
-25
@@ -1,25 +0,0 @@
|
||||
import { Matrix4, Vector3 } from "three";
|
||||
|
||||
export interface CSMFrustumVerticies {
|
||||
near: Vector3[];
|
||||
far: Vector3[];
|
||||
}
|
||||
|
||||
export interface CSMFrustumParameters {
|
||||
webGL?: boolean;
|
||||
projectionMatrix?: Matrix4;
|
||||
maxFar?: number;
|
||||
}
|
||||
|
||||
declare class CSMFrustum {
|
||||
zNear: number;
|
||||
vertices: CSMFrustumVerticies;
|
||||
|
||||
constructor(data?: CSMFrustumParameters);
|
||||
|
||||
setFromProjectionMatrix(projectionMatrix: Matrix4, maxFar: number): CSMFrustumVerticies;
|
||||
split(breaks: number[], target: CSMFrustum[]): void;
|
||||
toSpace(cameraMatrix: Matrix4, target: CSMFrustum): void;
|
||||
}
|
||||
|
||||
export { CSMFrustum };
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
import {
|
||||
Box3Helper,
|
||||
BufferGeometry,
|
||||
Group,
|
||||
LineBasicMaterial,
|
||||
LineSegments,
|
||||
Mesh,
|
||||
MeshBasicMaterial,
|
||||
PlaneGeometry,
|
||||
} from "three";
|
||||
|
||||
import { CSM } from "./CSM.js";
|
||||
import { CSMShadowNode } from "./CSMShadowNode.js";
|
||||
|
||||
export class CSMHelper<TCSM extends CSM | CSMShadowNode = CSM | CSMShadowNode> extends Group {
|
||||
constructor(csm: TCSM);
|
||||
csm: TCSM;
|
||||
displayFrustum: boolean;
|
||||
displayPlanes: boolean;
|
||||
displayShadowBounds: boolean;
|
||||
frustumLines: LineSegments<BufferGeometry, LineBasicMaterial>;
|
||||
cascadeLines: Box3Helper[];
|
||||
cascadePlanes: Array<Mesh<PlaneGeometry, MeshBasicMaterial>>;
|
||||
shadowLines: Box3Helper[];
|
||||
updateVisibility(): void;
|
||||
update(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
export interface CSMShader {
|
||||
lights_fragment_begin: string;
|
||||
lights_pars_begin: string;
|
||||
}
|
||||
-44
@@ -1,44 +0,0 @@
|
||||
import { Camera, DirectionalLightShadow, Light, Object3D, ShadowBaseNode } from "three/webgpu";
|
||||
import { CSMFrustum } from "./CSMFrustum.js";
|
||||
|
||||
export type CSMShadowNodeMode = "uniform" | "logarithmic" | "practical" | "custom";
|
||||
|
||||
export interface CSMShadowNodeData {
|
||||
cascades?: number | undefined;
|
||||
maxFar?: number | undefined;
|
||||
mode?: CSMShadowNodeMode | undefined;
|
||||
lightMargin?: number | undefined;
|
||||
customSplitsCallback?:
|
||||
| ((cascades: number, cameraNear: number, cameraFar: number, breaks: number[]) => void)
|
||||
| undefined;
|
||||
}
|
||||
|
||||
declare class LwLight extends Object3D {
|
||||
target: Object3D;
|
||||
shadow?: DirectionalLightShadow;
|
||||
|
||||
constructor();
|
||||
}
|
||||
|
||||
declare class CSMShadowNode extends ShadowBaseNode {
|
||||
camera: Camera | null;
|
||||
cascades: number;
|
||||
maxFar: number;
|
||||
mode: CSMShadowNodeMode;
|
||||
lightMargin: number;
|
||||
customSplitsCallback: (cascades: number, cameraNear: number, cameraFar: number, breaks: number[]) => void;
|
||||
|
||||
fade: boolean;
|
||||
|
||||
breaks: number[];
|
||||
mainFrustum: CSMFrustum | null;
|
||||
frustums: CSMFrustum[];
|
||||
|
||||
lights: LwLight[];
|
||||
|
||||
constructor(light: Light, data?: CSMShadowNodeData);
|
||||
|
||||
updateFrustums(): void;
|
||||
}
|
||||
|
||||
export { CSMShadowNode };
|
||||
-68
@@ -1,68 +0,0 @@
|
||||
import { Curve, Vector3 } from "three";
|
||||
|
||||
export class GrannyKnot extends Curve<Vector3> {
|
||||
constructor();
|
||||
}
|
||||
|
||||
export class HeartCurve extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
|
||||
export class VivianiCurve extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
|
||||
export class KnotCurve extends Curve<Vector3> {
|
||||
constructor();
|
||||
}
|
||||
|
||||
export class HelixCurve extends Curve<Vector3> {
|
||||
constructor();
|
||||
}
|
||||
|
||||
export class TrefoilKnot extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
|
||||
export class TorusKnot extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
|
||||
export class CinquefoilKnot extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
|
||||
export class TrefoilPolynomialKnot extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
|
||||
export class FigureEightPolynomialKnot extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
|
||||
export class DecoratedTorusKnot4a extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
|
||||
export class DecoratedTorusKnot4b extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
|
||||
export class DecoratedTorusKnot5a extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
|
||||
export class DecoratedTorusKnot5c extends Curve<Vector3> {
|
||||
constructor(scale?: number);
|
||||
scale: number;
|
||||
}
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
import { Curve, CurveJSON, Vector2, Vector3, Vector4 } from "three";
|
||||
|
||||
export interface NURBSCurveJSON extends CurveJSON {
|
||||
degree: number;
|
||||
knots: number[];
|
||||
controlPoints: number[][];
|
||||
startKnot: number;
|
||||
endKnot: number;
|
||||
}
|
||||
|
||||
export class NURBSCurve extends Curve<Vector3> {
|
||||
degree: number;
|
||||
knots: number[];
|
||||
controlPoints: Vector2[] | Vector3[] | Vector4[];
|
||||
startKnot: number;
|
||||
endKnot: number;
|
||||
|
||||
constructor(
|
||||
degree: number,
|
||||
knots: number[],
|
||||
controlPoints: Vector2[] | Vector3[] | Vector4[],
|
||||
startKnot?: number,
|
||||
endKnot?: number,
|
||||
);
|
||||
|
||||
toJSON(): NURBSCurveJSON;
|
||||
fromJSON(json: NURBSCurveJSON): this;
|
||||
}
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
import { Vector2, Vector3, Vector4 } from "three";
|
||||
|
||||
export class NURBSSurface {
|
||||
constructor(
|
||||
degree1: number,
|
||||
degree2: number,
|
||||
knots1: number[],
|
||||
knots2: number[],
|
||||
controlPoints: Vector2[][] | Vector3[][] | Vector4[][],
|
||||
);
|
||||
|
||||
getPoint(t1: number, t2: number, target: Vector3): void;
|
||||
}
|
||||
-146
@@ -1,146 +0,0 @@
|
||||
import { Vector3, Vector4 } from "three";
|
||||
|
||||
/**
|
||||
* Finds knot vector span.
|
||||
* @param p degree
|
||||
* @param u parametric value
|
||||
* @param U knot vector
|
||||
* @returns the span
|
||||
*/
|
||||
export function findSpan(p: number, u: number, U: readonly number[]): number;
|
||||
|
||||
/**
|
||||
* Calculate basis functions. See The NURBS Book, page 70, algorithm A2.2
|
||||
* @param span span in which u lies
|
||||
* @param u parametric point
|
||||
* @param p degrees
|
||||
* @param U knot vector
|
||||
* @returns array[p+1] with basis function values
|
||||
*/
|
||||
export function calcBasisFunctions(span: number, u: number, p: number, U: readonly number[]): number[];
|
||||
|
||||
/**
|
||||
* Calculate B-Spline curve points. See The NURBS Book, page 82, algorithm A3.1.
|
||||
* @param p degree of B-Spline
|
||||
* @param U knot vector
|
||||
* @param P control points (x, y, z, w)
|
||||
* @param u parametric point
|
||||
* @returns point for given u
|
||||
*/
|
||||
export function calcBSplinePoint(p: number, U: readonly number[], P: readonly Vector4[], u: number): Vector4;
|
||||
|
||||
/**
|
||||
* Calculate basis functions derivatives. See The NURBS Book, page 72, algorithm A2.3.
|
||||
* @param span span in which u lies
|
||||
* @param u parametric point
|
||||
* @param p degree
|
||||
* @param n number of derivatives to calculate
|
||||
* @param U knot vector
|
||||
* @returns array[n+1][p+1] with basis functions derivatives
|
||||
*/
|
||||
export function calcBasisFunctionDerivatives(
|
||||
span: number,
|
||||
u: number,
|
||||
p: number,
|
||||
n: number,
|
||||
U: readonly number[],
|
||||
): number[][];
|
||||
|
||||
/**
|
||||
* Calculate derivatives of a B-Spline. See The NURBS Book, page 93, algorithm A3.2.
|
||||
* @param p degree
|
||||
* @param U knot vector
|
||||
* @param P control points
|
||||
* @param u Parametric points
|
||||
* @param nd number of derivatives
|
||||
* @returns array[d+1] with derivatives
|
||||
*/
|
||||
export function calcBSplineDerivatives(
|
||||
p: number,
|
||||
U: readonly number[],
|
||||
P: readonly Vector4[],
|
||||
u: number,
|
||||
nd: number,
|
||||
): Vector4[];
|
||||
|
||||
/**
|
||||
* Calculate "K over I"
|
||||
* @returns k!/(i!(k-i)!
|
||||
*/
|
||||
export function calcKoverI(k: number, i: number): number;
|
||||
|
||||
/**
|
||||
* Calculate derivatives (0-nd) of rational curve. See The NURBS Book, page 127, algorithm A4.2.
|
||||
* @param Pders result of function calcBSplineDerivatives
|
||||
* @returns array with derivatives for rational curve.
|
||||
*/
|
||||
export function calcRationalCurveDerivatives(Pders: readonly Vector4[]): Vector3[];
|
||||
|
||||
/**
|
||||
* Calculate NURBS curve derivatives. See The NURBS Book, page 127, algorithm A4.2.
|
||||
* @param p degree
|
||||
* @param U knot vector
|
||||
* @param P control points in homogeneous space
|
||||
* @param u parametric points
|
||||
* @param nd number of derivatives
|
||||
* @returns array with derivatives
|
||||
*/
|
||||
export function calcNURBSDerivatives(
|
||||
p: number,
|
||||
U: readonly number[],
|
||||
P: readonly Vector4[],
|
||||
u: number,
|
||||
nd: number,
|
||||
): Vector3[];
|
||||
|
||||
/**
|
||||
* Calculate rational B-Spline surface point. See The NURBS Book, page 134, algorithm A4.3.
|
||||
* @param p degree of B-Spline surface
|
||||
* @param q degree of B-Spline surface
|
||||
* @param U knot vector
|
||||
* @param V knot vector
|
||||
* @param P control points (x, y, z, w)
|
||||
* @param u parametric value
|
||||
* @param v parametric value
|
||||
* @param target
|
||||
* @returns point for given (u, v)
|
||||
*/
|
||||
export function calcSurfacePoint(
|
||||
p: number,
|
||||
q: number,
|
||||
U: readonly number[],
|
||||
V: readonly number[],
|
||||
P: readonly (readonly Vector4[])[],
|
||||
u: number,
|
||||
v: number,
|
||||
target: Vector3,
|
||||
): Vector3;
|
||||
|
||||
/**
|
||||
* Calculate rational B-Spline volume point. See The NURBS Book, page 134, algorithm A4.3.
|
||||
* @param p degree of B-Spline volume
|
||||
* @param q degree of B-Spline volume
|
||||
* @param r degree of B-Spline volume
|
||||
* @param U knot vector
|
||||
* @param V knot vector
|
||||
* @param W knot vector
|
||||
* @param P control points (x, y, z, w)
|
||||
* @param u parametric value
|
||||
* @param v parametric value
|
||||
* @param w parametric value
|
||||
* @param target
|
||||
* @returns point for given (u, v, w)
|
||||
*/
|
||||
export function calcVolumePoint(
|
||||
p: number,
|
||||
q: number,
|
||||
r: number,
|
||||
U: readonly number[],
|
||||
V: readonly number[],
|
||||
W: readonly number[],
|
||||
P: readonly (readonly (readonly Vector4[])[])[],
|
||||
u: number,
|
||||
v: number,
|
||||
w: number,
|
||||
target: Vector3,
|
||||
): Vector3;
|
||||
-23
@@ -1,23 +0,0 @@
|
||||
import { Vector3, Vector4 } from "three";
|
||||
|
||||
export class NURBSVolume {
|
||||
degree1: number;
|
||||
degree2: number;
|
||||
degree3: number;
|
||||
knots1: readonly number[];
|
||||
knots2: readonly number[];
|
||||
knots3: readonly number[];
|
||||
controlPoints: Vector4[][][];
|
||||
|
||||
constructor(
|
||||
degree1: number,
|
||||
degree2: number,
|
||||
degree3: number,
|
||||
knots1: readonly number[],
|
||||
knots2: readonly number[],
|
||||
knots3: readonly number[],
|
||||
controlPoints: Vector4[][][],
|
||||
);
|
||||
|
||||
getPoint(t1: number, t2: number, t3: number, target: Vector3): void;
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
import { Camera, Matrix3, Scene, WebGLRenderer } from "three";
|
||||
|
||||
declare class AnaglyphEffect {
|
||||
colorMatrixLeft: Matrix3;
|
||||
|
||||
colorMatrixRight: Matrix3;
|
||||
|
||||
setSize: (width: number, height: number) => void;
|
||||
|
||||
render: (scene: Scene, camera: Camera) => void;
|
||||
|
||||
dispose: () => void;
|
||||
|
||||
constructor(renderer: WebGLRenderer, width?: number, height?: number);
|
||||
}
|
||||
|
||||
export { AnaglyphEffect };
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
import { Camera, Scene, WebGLRenderer } from "three";
|
||||
|
||||
export interface AsciiEffectOptions {
|
||||
resolution?: number;
|
||||
scale?: number;
|
||||
color?: boolean;
|
||||
alpha?: boolean;
|
||||
block?: boolean;
|
||||
invert?: boolean;
|
||||
}
|
||||
|
||||
export class AsciiEffect {
|
||||
constructor(renderer: WebGLRenderer, charSet?: string, options?: AsciiEffectOptions);
|
||||
domElement: HTMLElement;
|
||||
|
||||
render(scene: Scene, camera: Camera): void;
|
||||
setSize(width: number, height: number): void;
|
||||
}
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
import { Camera, Scene, Vector2, Vector4, WebGLRenderer, WebGLRenderTarget, WebGLShadowMap } from "three";
|
||||
|
||||
export interface OutlineEffectParameters {
|
||||
defaultThickness?: number | undefined;
|
||||
defaultColor?: number[] | undefined;
|
||||
defaultAlpha?: number | undefined;
|
||||
defaultKeepAlive?: boolean | undefined;
|
||||
}
|
||||
|
||||
export class OutlineEffect {
|
||||
constructor(renderer: WebGLRenderer, parameters?: OutlineEffectParameters);
|
||||
enabled: boolean;
|
||||
autoClear: boolean;
|
||||
domElement: HTMLElement;
|
||||
shadowMap: WebGLShadowMap;
|
||||
|
||||
clear(color?: boolean, depth?: boolean, stencil?: boolean): void;
|
||||
getPixelRatio(): number;
|
||||
getSize(target: Vector2): Vector2;
|
||||
render(scene: Scene, camera: Camera): void;
|
||||
renderOutline(scene: Scene, camera: Camera): void;
|
||||
setRenderTarget(renderTarget: WebGLRenderTarget | null): void;
|
||||
setPixelRatio(value: number): void;
|
||||
setScissor(x: Vector4 | number, y?: number, width?: number, height?: number): void;
|
||||
setScissorTest(enable: boolean): void;
|
||||
setSize(width: number, height: number, updateStyle?: boolean): void;
|
||||
setViewport(x: Vector4 | number, y?: number, width?: number, height?: number): void;
|
||||
}
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
import { Camera, Scene, WebGLRenderer } from "three";
|
||||
|
||||
declare class ParallaxBarrierEffect {
|
||||
setSize: (width: number, height: number) => void;
|
||||
render: (scene: Scene, camera: Camera) => void;
|
||||
dispose: () => void;
|
||||
|
||||
constructor(renderer: WebGLRenderer);
|
||||
}
|
||||
|
||||
export { ParallaxBarrierEffect };
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
import { Camera, Scene, WebGLRenderer } from "three";
|
||||
|
||||
export class StereoEffect {
|
||||
constructor(renderer: WebGLRenderer);
|
||||
|
||||
setEyeSeparation(eyeSep: number): void;
|
||||
render(scene: Scene, camera: Camera): void;
|
||||
setSize(width: number, height: number): void;
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
import { Scene } from "three";
|
||||
|
||||
export class DebugEnvironment extends Scene {
|
||||
constructor();
|
||||
}
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
import { Scene } from "three";
|
||||
|
||||
export class RoomEnvironment extends Scene {
|
||||
constructor();
|
||||
dispose(): void;
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
import { Mesh, Points } from "three";
|
||||
|
||||
export interface DRACOExporterOptions {
|
||||
decodeSpeed?: number;
|
||||
encodeSpeed?: number;
|
||||
encoderMethod?: number;
|
||||
quantization?: number[];
|
||||
exportUvs?: boolean;
|
||||
exportNormals?: boolean;
|
||||
exportColor?: boolean;
|
||||
}
|
||||
|
||||
export class DRACOExporter {
|
||||
constructor();
|
||||
|
||||
parse(object: Mesh | Points, options?: DRACOExporterOptions): Int8Array<ArrayBuffer>;
|
||||
}
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
/**
|
||||
* @author sciecode / https://github.com/sciecode
|
||||
*
|
||||
* EXR format references:
|
||||
* https://www.openexr.com/documentation/openexrfilelayout.pdf
|
||||
*/
|
||||
|
||||
import { DataTexture, TextureDataType, WebGLRenderer, WebGLRenderTarget } from "three";
|
||||
import { WebGPURenderer } from "three/webgpu";
|
||||
|
||||
export const NO_COMPRESSION: 0;
|
||||
export const ZIPS_COMPRESSION: 2;
|
||||
export const ZIP_COMPRESSION: 3;
|
||||
|
||||
export interface EXRExporterParseOptions {
|
||||
compression?: number;
|
||||
type?: TextureDataType;
|
||||
}
|
||||
|
||||
export class EXRExporter {
|
||||
parse(
|
||||
renderer: WebGLRenderer | WebGPURenderer,
|
||||
renderTarget: WebGLRenderTarget,
|
||||
options?: EXRExporterParseOptions,
|
||||
): Promise<Uint8Array<ArrayBuffer>>;
|
||||
parse(dataTexture: DataTexture, options?: EXRExporterParseOptions): Promise<Uint8Array<ArrayBuffer>>;
|
||||
}
|
||||
-156
@@ -1,156 +0,0 @@
|
||||
import { AnimationClip, Material, Mesh, Object3D, Texture } from "three";
|
||||
|
||||
export interface GLTFExporterOptions {
|
||||
/**
|
||||
* Export position, rotation and scale instead of matrix per node. Default is false
|
||||
*/
|
||||
trs?: boolean;
|
||||
|
||||
/**
|
||||
* Export only visible objects. Default is true.
|
||||
*/
|
||||
onlyVisible?: boolean;
|
||||
|
||||
/**
|
||||
* Export just the attributes within the drawRange, if defined, instead of exporting the whole array. Default is true.
|
||||
*/
|
||||
truncateDrawRange?: boolean;
|
||||
|
||||
/**
|
||||
* Export in binary (.glb) format, returning an ArrayBuffer. Default is false.
|
||||
*/
|
||||
binary?: boolean;
|
||||
|
||||
/**
|
||||
* Export with images embedded into the glTF asset. Default is true.
|
||||
*/
|
||||
embedImages?: boolean;
|
||||
|
||||
/**
|
||||
* Restricts the image maximum size (both width and height) to the given value. This option works only if embedImages is true. Default is Infinity.
|
||||
*/
|
||||
maxTextureSize?: number;
|
||||
|
||||
/**
|
||||
* List of animations to be included in the export.
|
||||
*/
|
||||
animations?: AnimationClip[];
|
||||
|
||||
/**
|
||||
* Generate indices for non-index geometry and export with them. Default is false.
|
||||
*/
|
||||
forceIndices?: boolean;
|
||||
|
||||
/**
|
||||
* Export custom glTF extensions defined on an object's userData.gltfExtensions property. Default is false.
|
||||
*/
|
||||
includeCustomExtensions?: boolean;
|
||||
}
|
||||
|
||||
type TextureUtils = {
|
||||
decompress:
|
||||
| ((texture: Texture, maxTextureSize?: number) => Promise<void>)
|
||||
| ((texture: Texture, maxTextureSize?: number) => void);
|
||||
};
|
||||
|
||||
declare class GLTFExporter {
|
||||
textureUtils: TextureUtils | null;
|
||||
|
||||
constructor();
|
||||
|
||||
register(callback: (writer: GLTFWriter) => GLTFExporterPlugin): this;
|
||||
unregister(callback: (writer: GLTFWriter) => GLTFExporterPlugin): this;
|
||||
|
||||
setTextureUtils(utils: TextureUtils | null): this;
|
||||
|
||||
/**
|
||||
* Generates a .gltf (JSON) or .glb (binary) output from the input (Scenes or Objects)
|
||||
*
|
||||
* @param input Scenes or objects to export. Valid options:
|
||||
* - Export scenes
|
||||
* ```js
|
||||
* exporter.parse( scene1, ... )
|
||||
* exporter.parse( [ scene1, scene2 ], ... )
|
||||
* ```
|
||||
* - Export objects (It will create a new Scene to hold all the objects)
|
||||
* ```js
|
||||
* exporter.parse( object1, ... )
|
||||
* exporter.parse( [ object1, object2 ], ... )
|
||||
* ```
|
||||
* - Mix scenes and objects (It will export the scenes as usual but it will create a new scene to hold all the single objects).
|
||||
* ```js
|
||||
* exporter.parse( [ scene1, object1, object2, scene2 ], ... )
|
||||
* ```
|
||||
* @param onDone Will be called when the export completes. The argument will be the generated glTF JSON or binary ArrayBuffer.
|
||||
* @param onError Will be called if there are any errors during the gltf generation.
|
||||
* @param options Export options
|
||||
*/
|
||||
parse(
|
||||
input: Object3D | Object3D[],
|
||||
onDone: (gltf: ArrayBuffer | { [key: string]: unknown }) => void,
|
||||
onError: (error: ErrorEvent) => void,
|
||||
options?: GLTFExporterOptions,
|
||||
): void;
|
||||
|
||||
/**
|
||||
* Generates a .gltf (JSON) or .glb (binary) output from the input (Scenes or Objects).
|
||||
*
|
||||
* This is just like the {@link parse}() method, but instead of accepting callbacks it returns a promise that
|
||||
* resolves with the result, and otherwise accepts the same options.
|
||||
*/
|
||||
parseAsync(
|
||||
input: Object3D | Object3D[],
|
||||
options?: GLTFExporterOptions,
|
||||
): Promise<ArrayBuffer | { [key: string]: unknown }>;
|
||||
}
|
||||
|
||||
declare class GLTFWriter {
|
||||
textureUtils: TextureUtils | null;
|
||||
|
||||
extensionsUsed: { [name: string]: boolean };
|
||||
extensionsRequired: { [name: string]: boolean };
|
||||
|
||||
constructor();
|
||||
|
||||
setPlugins(plugins: GLTFExporterPlugin[]): void;
|
||||
|
||||
setTextureUtils(utils: TextureUtils | null): this;
|
||||
|
||||
/**
|
||||
* Process texture
|
||||
* @param map Map to process
|
||||
* @return Index of the processed texture in the "textures" array
|
||||
*/
|
||||
processTextureAsync(map: Texture): Promise<number>;
|
||||
|
||||
/**
|
||||
* Applies a texture transform, if present, to the map definition. Requires
|
||||
* the KHR_texture_transform extension.
|
||||
*/
|
||||
applyTextureTransform(mapDef: { [key: string]: unknown }, texture: Texture): void;
|
||||
|
||||
/**
|
||||
* Parse scenes and generate GLTF output
|
||||
*
|
||||
* @param input Scene or Array of THREE.Scenes
|
||||
* @param onDone Callback on completed
|
||||
* @param options options
|
||||
*/
|
||||
writeAsync(
|
||||
input: Object3D | Object3D[],
|
||||
onDone: (gltf: ArrayBuffer | { [key: string]: unknown }) => void,
|
||||
options?: GLTFExporterOptions,
|
||||
): Promise<void>;
|
||||
}
|
||||
|
||||
export interface GLTFExporterPlugin {
|
||||
writeTexture?: (map: Texture, textureDef: { [key: string]: unknown }) => void;
|
||||
writeMaterialAsync?: (material: Material, materialDef: { [key: string]: unknown }) => Promise<void>;
|
||||
writeMesh?: (mesh: Mesh, meshDef: { [key: string]: unknown }) => void;
|
||||
writeNode?: (object: Object3D, nodeDef: { [key: string]: unknown }) => void;
|
||||
beforeParse?: (input: Object3D | Object3D[]) => void;
|
||||
afterParse?: (input: Object3D | Object3D[]) => void;
|
||||
}
|
||||
|
||||
export { GLTFExporter };
|
||||
export type { GLTFWriter };
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
import { Data3DTexture, DataTexture, WebGLRenderer, WebGLRenderTarget } from "three";
|
||||
import { WebGPURenderer } from "three/webgpu";
|
||||
|
||||
export class KTX2Exporter {
|
||||
parse(renderer: WebGLRenderer | WebGPURenderer, rtt?: WebGLRenderTarget): Promise<Uint8Array<ArrayBuffer>>;
|
||||
parse(texture: Data3DTexture | DataTexture): Promise<Uint8Array<ArrayBuffer>>;
|
||||
}
|
||||
-7
@@ -1,7 +0,0 @@
|
||||
import { Object3D } from "three";
|
||||
|
||||
export class OBJExporter {
|
||||
constructor();
|
||||
|
||||
parse(object: Object3D): string;
|
||||
}
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
import { Object3D } from "three";
|
||||
|
||||
export interface PLYExporterOptionsBase {
|
||||
excludeAttributes?: string[];
|
||||
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: 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;
|
||||
}
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
import { Object3D } from "three";
|
||||
|
||||
export interface STLExporterOptionsBinary {
|
||||
binary: true;
|
||||
}
|
||||
|
||||
export interface STLExporterOptionsString {
|
||||
binary?: false;
|
||||
}
|
||||
|
||||
export interface STLExporterOptions {
|
||||
binary?: boolean;
|
||||
}
|
||||
|
||||
export class STLExporter {
|
||||
constructor();
|
||||
|
||||
parse(scene: Object3D, options: STLExporterOptionsBinary): DataView<ArrayBuffer>;
|
||||
parse(scene: Object3D, options?: STLExporterOptionsString): string;
|
||||
parse(scene: Object3D, options?: STLExporterOptions): string | DataView<ArrayBuffer>;
|
||||
}
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
import { Object3D } from "three";
|
||||
import * as WebGLTextureUtils from "../utils/WebGLTextureUtils.js";
|
||||
import * as WebGPUTextureUtils from "../utils/WebGPUTextureUtils.js";
|
||||
|
||||
export interface USDZExporterOptions {
|
||||
ar?: { anchoring: { type: "plane" }; planeAnchoring: { alignment: "horizontal" | "vertical" | "any" } } | undefined;
|
||||
includeAnchoringProperties?: boolean | undefined;
|
||||
onlyVisible?: boolean | undefined;
|
||||
quickLookCompatible?: boolean | undefined;
|
||||
maxTextureSize?: number | undefined;
|
||||
}
|
||||
|
||||
export class USDZExporter {
|
||||
textureUtils: typeof WebGLTextureUtils | typeof WebGPUTextureUtils | null;
|
||||
|
||||
constructor();
|
||||
|
||||
parse(
|
||||
scene: Object3D,
|
||||
onDone: (result: Uint8Array<ArrayBuffer>) => void,
|
||||
onError: (error: unknown) => void,
|
||||
options?: USDZExporterOptions,
|
||||
): void;
|
||||
|
||||
parseAsync(scene: Object3D, options?: USDZExporterOptions): Promise<Uint8Array<ArrayBuffer>>;
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
import { BufferGeometry } from "three";
|
||||
|
||||
export class BoxLineGeometry extends BufferGeometry {
|
||||
constructor(
|
||||
width?: number,
|
||||
height?: number,
|
||||
depth?: number,
|
||||
widthSegments?: number,
|
||||
heightSegments?: number,
|
||||
depthSegments?: number,
|
||||
);
|
||||
}
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
import { BufferGeometry, Vector3 } from "three";
|
||||
|
||||
export class ConvexGeometry extends BufferGeometry {
|
||||
constructor(points?: Vector3[]);
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
import { BufferGeometry, Euler, Mesh, Vector3 } from "three";
|
||||
|
||||
declare class DecalGeometry extends BufferGeometry {
|
||||
constructor(mesh?: Mesh, position?: Vector3, orientation?: Euler, size?: Vector3);
|
||||
}
|
||||
|
||||
declare class DecalVertex {
|
||||
position: Vector3;
|
||||
normal: Vector3 | null;
|
||||
|
||||
constructor(position: Vector3, normal?: Vector3 | null);
|
||||
|
||||
clone(): this;
|
||||
}
|
||||
|
||||
export { DecalGeometry, DecalVertex };
|
||||
-8
@@ -1,8 +0,0 @@
|
||||
import { Vector3 } from "three";
|
||||
|
||||
declare function klein(v: number, u: number, target: Vector3): void;
|
||||
declare function plane(u: number, v: number, target: Vector3): void;
|
||||
declare function mobius(u: number, t: number, target: Vector3): void;
|
||||
declare function mobius3d(u: number, t: number, target: Vector3): void;
|
||||
|
||||
export { klein, mobius, mobius3d, plane };
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
import { BufferGeometry, Vector3 } from "three";
|
||||
|
||||
export class ParametricGeometry extends BufferGeometry {
|
||||
constructor(func?: (u: number, v: number, target: Vector3) => void, slices?: number, stacks?: number);
|
||||
|
||||
/**
|
||||
* @default 'ParametricGeometry'
|
||||
*/
|
||||
type: string;
|
||||
|
||||
parameters: {
|
||||
func: (u: number, v: number, dest: Vector3) => void;
|
||||
slices: number;
|
||||
stacks: number;
|
||||
};
|
||||
}
|
||||
|
||||
export { ParametricGeometry as ParametricBufferGeometry };
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
import { BoxGeometry } from "three";
|
||||
|
||||
export class RoundedBoxGeometry extends BoxGeometry {
|
||||
constructor(width?: number, height?: number, depth?: number, segments?: number, radius?: number);
|
||||
}
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
import { BufferGeometry } from "three";
|
||||
|
||||
/**
|
||||
* TeapotGeometry tessellates the famous Utah teapot database by Martin Newell.
|
||||
*
|
||||
* TeapotGeometry is an add-on, and must be imported explicitly. See
|
||||
* [Installation / Addons]{@link https://threejs.org/docs/#manual/en/introduction/Installation}.
|
||||
*
|
||||
* @example
|
||||
* import { TeapotGeometry } from 'three/addons/geometries/TeapotGeometry.js';
|
||||
*
|
||||
* const geometry = new TeapotGeometry( 50, 18 );
|
||||
* const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
|
||||
* const teapot = new THREE.Mesh( geometry, material );
|
||||
* scene.add( teapot );
|
||||
*/
|
||||
export class TeapotGeometry extends BufferGeometry {
|
||||
/**
|
||||
* @param size Relative scale of the teapot. Optional; Defaults to `50`.
|
||||
* @param segments Number of line segments to subdivide each patch edge. Optional; Defaults to `10`.
|
||||
* @param bottom Whether the bottom of the teapot is generated or not. Optional; Defaults to `true`.
|
||||
* @param lid Whether the lid is generated or not. Optional; Defaults to `true`.
|
||||
* @param body Whether the body is generated or not. Optional; Defaults to `true`.
|
||||
* @param fitLid Whether the lid is slightly stretched to prevent gaps between the body and lid or not. Optional;
|
||||
* Defaults to `true`.
|
||||
* @param blinn Whether the teapot is scaled vertically for better aesthetics or not. Optional; Defaults to `true`.
|
||||
*/
|
||||
constructor(
|
||||
size?: number,
|
||||
segments?: number,
|
||||
bottom?: boolean,
|
||||
lid?: boolean,
|
||||
body?: boolean,
|
||||
fitLid?: boolean,
|
||||
blinn?: boolean,
|
||||
);
|
||||
}
|
||||
-117
@@ -1,117 +0,0 @@
|
||||
import { ExtrudeGeometry, ExtrudeGeometryOptions, Shape } from "three";
|
||||
|
||||
import { Font } from "../loaders/FontLoader.js";
|
||||
|
||||
export interface TextGeometryParameters extends ExtrudeGeometryOptions {
|
||||
font: Font;
|
||||
|
||||
/**
|
||||
* Size of the text
|
||||
* Expects a `Float`.
|
||||
* @defaultValue `100`
|
||||
*/
|
||||
size?: number | undefined;
|
||||
|
||||
/**
|
||||
* Thickness to extrude text.
|
||||
* Expects a `Float`.
|
||||
* @defaultValue `50`
|
||||
*/
|
||||
depth?: number | undefined;
|
||||
|
||||
/**
|
||||
* @override
|
||||
* @defaultValue `12`
|
||||
*/
|
||||
curveSegments?: number | undefined;
|
||||
|
||||
/**
|
||||
* @defaultValue `false`
|
||||
*/
|
||||
bevelEnabled?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* How deep into text bevel goes.
|
||||
* Expects a `Float`.
|
||||
* @override
|
||||
* @defaultValue `10`
|
||||
*/
|
||||
bevelThickness?: number | undefined;
|
||||
|
||||
/**
|
||||
* How far from text outline is bevel.
|
||||
* Expects a `Float`.
|
||||
* @override
|
||||
* @defaultValue `8`
|
||||
*/
|
||||
bevelSize?: number | undefined;
|
||||
|
||||
/**
|
||||
* How far from text outline bevel starts.
|
||||
* Expects a `Float`.
|
||||
* @override
|
||||
* @defaultValue `0`
|
||||
*/
|
||||
bevelOffset?: number | undefined;
|
||||
|
||||
/**
|
||||
* @override
|
||||
* @defaultValue `3`
|
||||
*/
|
||||
bevelSegments?: number | undefined;
|
||||
|
||||
direction?: "ltr" | "rtl" | "tb" | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* A class for generating text as a single geometry
|
||||
* @remarks
|
||||
* It is constructed by providing a string of text, and a set of parameters consisting of a loaded font and settings for the geometry's parent {@link THREE.ExtrudeGeometry | ExtrudeGeometry}
|
||||
* See the {@link THREE.FontLoader | FontLoader} page for additional details.
|
||||
* @example
|
||||
* ```typescript
|
||||
* const loader = new FontLoader();
|
||||
* loader.load('fonts/helvetiker_regular.typeface.json', function (font) {
|
||||
* const geometry = new TextGeometry('Hello three.js!', {
|
||||
* font: font,
|
||||
* size: 80,
|
||||
* height: 5,
|
||||
* curveSegments: 12,
|
||||
* bevelEnabled: true,
|
||||
* bevelThickness: 10,
|
||||
* bevelSize: 8,
|
||||
* bevelOffset: 0,
|
||||
* bevelSegments: 5
|
||||
* });
|
||||
* });
|
||||
* ```
|
||||
* @see Example: {@link https://threejs.org/examples/#webgl_geometry_text | geometry / text }
|
||||
* @see {@link https://threejs.org/docs/index.html#api/en/C:/rafaelsc/Source/threejs/three.js/docs/examples/en/geometries/TextGeometry | Official Documentation}
|
||||
* @see {@link https://github.com/mrdoob/three.js/blob/master/examples/jsm/geometries/TextGeometry.js | Source}
|
||||
*/
|
||||
export class TextGeometry extends ExtrudeGeometry {
|
||||
/**
|
||||
* Create a new instance of {@link TextGeometry}
|
||||
* @param text The text that needs to be shown.
|
||||
* @param parameters Object that can contain the following parameters. @see {@link TextGeometryParameters} for defaults.
|
||||
*/
|
||||
constructor(text: string, parameters?: TextGeometryParameters);
|
||||
|
||||
/**
|
||||
* A Read-only _string_ to check if `this` object type.
|
||||
* @remarks Sub-classes will update this value.
|
||||
* @defaultValue `TextGeometry`
|
||||
*/
|
||||
override readonly type: string | "TextGeometry";
|
||||
|
||||
/**
|
||||
* An object with a property for each of the constructor parameters.
|
||||
* @remarks Any modification after instantiation does not change the geometry.
|
||||
*/
|
||||
readonly parameters: {
|
||||
readonly shapes: Shape | Shape[];
|
||||
readonly options: TextGeometryParameters;
|
||||
};
|
||||
}
|
||||
|
||||
export { TextGeometry as TextBufferGeometry };
|
||||
-21
@@ -1,21 +0,0 @@
|
||||
import { Node, Renderer, StorageBufferNode } from "three/webgpu";
|
||||
|
||||
export const getBitonicFlipIndices: (index: Node, blockHeight: Node) => Node;
|
||||
|
||||
export const getBitonicDisperseIndices: (index: Node, swapSpan: Node) => Node;
|
||||
|
||||
export interface BitonicSortOptions {
|
||||
workgroupSize?: number | undefined;
|
||||
}
|
||||
|
||||
export class BitonicSort {
|
||||
infoStorage: StorageBufferNode;
|
||||
|
||||
swapOpCount: number;
|
||||
stepCount: number;
|
||||
|
||||
constructor(renderer: Renderer, dataBuffer: StorageBufferNode, options?: BitonicSortOptions);
|
||||
|
||||
computeStep(renderer: Renderer): Promise<void>;
|
||||
compute(renderer: Renderer): Promise<void>;
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
import { LightProbe, Mesh } from "three";
|
||||
|
||||
declare class LightProbeHelper extends Mesh {
|
||||
lightProbe: LightProbe;
|
||||
size: number;
|
||||
|
||||
constructor(lightProbe: LightProbe, size?: number);
|
||||
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export { LightProbeHelper };
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
import { LightProbe, Mesh } from "three";
|
||||
|
||||
declare class LightProbeHelper extends Mesh {
|
||||
lightProbe: LightProbe;
|
||||
size: number;
|
||||
|
||||
constructor(lightProbe: LightProbe, size?: number);
|
||||
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export { LightProbeHelper };
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
import { ColorRepresentation, LineSegments } from "three";
|
||||
import { Octree } from "../math/Octree.js";
|
||||
|
||||
export class OctreeHelper extends LineSegments {
|
||||
constructor(octree: Octree, color?: ColorRepresentation);
|
||||
|
||||
octree: Octree;
|
||||
color: ColorRepresentation;
|
||||
|
||||
/**
|
||||
* @default 'OctreeHelper'
|
||||
*/
|
||||
type: "OctreeHelper" | string;
|
||||
|
||||
update(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
import { Line, PositionalAudio } from "three";
|
||||
|
||||
export class PositionalAudioHelper extends Line {
|
||||
constructor(audio: PositionalAudio, range?: number, divisionsInnerAngle?: number, divisionsOuterAngle?: number);
|
||||
|
||||
audio: PositionalAudio;
|
||||
range: number;
|
||||
divisionsInnerAngle: number;
|
||||
divisionsOuterAngle: number;
|
||||
|
||||
dispose(): void;
|
||||
update(): void;
|
||||
}
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
import * as RAPIER from "@dimforge/rapier3d-compat";
|
||||
import { LineSegments } from "three";
|
||||
|
||||
declare class RapierHelper extends LineSegments {
|
||||
world: RAPIER.World;
|
||||
|
||||
constructor(world: RAPIER.World);
|
||||
|
||||
update(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export { RapierHelper };
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
import { ColorRepresentation, Line, RectAreaLight } from "three";
|
||||
|
||||
export class RectAreaLightHelper extends Line {
|
||||
constructor(light: RectAreaLight, color?: ColorRepresentation);
|
||||
|
||||
light: RectAreaLight;
|
||||
color: ColorRepresentation | undefined;
|
||||
|
||||
dispose(): void;
|
||||
}
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
import { BufferGeometry, Mesh, ShaderMaterial, Texture } from "three";
|
||||
|
||||
export class TextureHelper extends Mesh<BufferGeometry, ShaderMaterial> {
|
||||
texture: Texture;
|
||||
type: "TextureHelper";
|
||||
|
||||
constructor(texture: Texture, width?: number, height?: number, depth?: number);
|
||||
|
||||
dispose(): void;
|
||||
}
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
import { BufferGeometry, Mesh, NodeMaterial, Texture } from "three/webgpu";
|
||||
|
||||
export class TextureHelper extends Mesh<BufferGeometry, NodeMaterial> {
|
||||
texture: Texture;
|
||||
type: "TextureHelper";
|
||||
|
||||
constructor(texture: Texture, width?: number, height?: number, depth?: number);
|
||||
|
||||
dispose(): void;
|
||||
}
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
import { LineSegments, Object3D } from "three";
|
||||
|
||||
export class VertexNormalsHelper extends LineSegments {
|
||||
readonly isVertexNormalsHelper: true;
|
||||
|
||||
constructor(object: Object3D, size?: number, hex?: number);
|
||||
|
||||
object: Object3D;
|
||||
size: number;
|
||||
|
||||
update(): void;
|
||||
|
||||
dispose(): void;
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
import { LineSegments, Object3D } from "three";
|
||||
|
||||
export class VertexTangentsHelper extends LineSegments {
|
||||
constructor(object: Object3D, size?: number, hex?: number);
|
||||
|
||||
object: Object3D;
|
||||
size: number;
|
||||
|
||||
update(): void;
|
||||
|
||||
dispose(): void;
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
import { Camera, Object3D, Vector3, WebGLRenderer } from "three";
|
||||
|
||||
export class ViewHelper extends Object3D {
|
||||
readonly isViewHelper: true;
|
||||
|
||||
animating: boolean;
|
||||
center: Vector3;
|
||||
|
||||
render: (renderer: WebGLRenderer) => void;
|
||||
handleClick: (event: MouseEvent) => boolean;
|
||||
setLabels: (labelX?: string, labelY?: string, labelZ?: string) => void;
|
||||
setLabelStyle: (font?: string, color?: string, radius?: number) => void;
|
||||
update: (delta: number) => void;
|
||||
dispose: () => void;
|
||||
|
||||
constructor(camera: Camera, domElement: HTMLElement);
|
||||
}
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
import { RendererInspector } from "./RendererInspector.js";
|
||||
import { ParametersGroup } from "./tabs/Parameters.js";
|
||||
|
||||
declare class Inspector extends RendererInspector {
|
||||
createParameters(name: string): ParametersGroup;
|
||||
|
||||
get domElement(): HTMLDivElement;
|
||||
}
|
||||
|
||||
export { Inspector };
|
||||
-4
@@ -1,4 +0,0 @@
|
||||
import { InspectorBase } from "three/webgpu";
|
||||
|
||||
export class RendererInspector extends InspectorBase {
|
||||
}
|
||||
-95
@@ -1,95 +0,0 @@
|
||||
import { Tab } from "../ui/Tab.js";
|
||||
import { ValueButton, ValueCheckbox, ValueColor, ValueNumber, ValueSelect, ValueSlider } from "../ui/Values.js";
|
||||
|
||||
type KeyToValueOfType<T, V> = { [K in keyof T]: T[K] extends V ? K : never }[keyof T];
|
||||
|
||||
interface ValueSelectWithParameters<T = Record<string, unknown>, K extends keyof T = keyof T>
|
||||
extends ValueSelect<T, K>
|
||||
{
|
||||
name: (name: string) => this;
|
||||
listen: () => this;
|
||||
}
|
||||
|
||||
interface ValueNumberWithParameters<
|
||||
T = Record<string, unknown>,
|
||||
K extends KeyToValueOfType<T, number> = KeyToValueOfType<T, number>,
|
||||
> extends ValueNumber<T, K> {
|
||||
name: (name: string) => this;
|
||||
listen: () => this;
|
||||
}
|
||||
|
||||
interface ValueSliderWithParameters<
|
||||
T = Record<string, unknown>,
|
||||
K extends KeyToValueOfType<T, number> = KeyToValueOfType<T, number>,
|
||||
> extends ValueSlider<T, K> {
|
||||
name: (name: string) => this;
|
||||
listen: () => this;
|
||||
}
|
||||
|
||||
interface ValueCheckboxWithParameters<
|
||||
T = Record<string, unknown>,
|
||||
K extends KeyToValueOfType<T, boolean> = KeyToValueOfType<T, boolean>,
|
||||
> extends ValueCheckbox<T, K> {
|
||||
name: (name: string) => this;
|
||||
listen: () => this;
|
||||
}
|
||||
|
||||
interface ValueButtonWithParameters<
|
||||
T = Record<string, unknown>,
|
||||
K extends KeyToValueOfType<T, (this: T) => void> = KeyToValueOfType<T, (this: T) => void>,
|
||||
> extends ValueButton<T, K> {
|
||||
name: (name: string) => this;
|
||||
}
|
||||
|
||||
interface ValueColorWithParameters<
|
||||
T = Record<string, unknown>,
|
||||
K extends keyof T = keyof T,
|
||||
> extends ValueColor<T, K> {
|
||||
name: (name: string) => this;
|
||||
listen: () => this;
|
||||
}
|
||||
|
||||
declare class ParametersGroup {
|
||||
name: string;
|
||||
|
||||
constructor(parameters: never, name: string);
|
||||
|
||||
add<T, K extends keyof T>(
|
||||
object: T,
|
||||
property: K,
|
||||
options: ReadonlyArray<T[K]> | Record<string, T[K]>,
|
||||
): ValueSelectWithParameters<T, K>;
|
||||
add<T, K extends KeyToValueOfType<T, number>>(
|
||||
object: T,
|
||||
property: K,
|
||||
min: number,
|
||||
max: number,
|
||||
step?: number,
|
||||
): ValueSliderWithParameters<T, K>;
|
||||
add<T, K extends KeyToValueOfType<T, number>>(
|
||||
object: T,
|
||||
property: K,
|
||||
min?: number,
|
||||
): ValueNumberWithParameters<T, K>;
|
||||
add<T, K extends KeyToValueOfType<T, boolean>>(
|
||||
object: T,
|
||||
property: K,
|
||||
options?: never,
|
||||
): ValueCheckboxWithParameters<T, K>;
|
||||
add<T, K extends KeyToValueOfType<T, (this: T) => void>>(
|
||||
object: T,
|
||||
property: K,
|
||||
options?: never,
|
||||
): ValueButtonWithParameters<T, K>;
|
||||
|
||||
addFolder(name: string): ParametersGroup;
|
||||
|
||||
addColor<T, K extends keyof T>(object: T, property: K, rgbScale?: number): ValueColorWithParameters<T, K>;
|
||||
}
|
||||
|
||||
declare class Parameters extends Tab {
|
||||
createGroup(name: string): ParametersGroup;
|
||||
}
|
||||
|
||||
export { Parameters };
|
||||
export type { ParametersGroup };
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
export class Tab {
|
||||
constructor(title: string);
|
||||
}
|
||||
-80
@@ -1,80 +0,0 @@
|
||||
import { ColorRepresentation, EventDispatcher } from "three";
|
||||
|
||||
type KeyToValueOfType<T, V> = { [K in keyof T]: T[K] extends V ? K : never }[keyof T];
|
||||
|
||||
declare class Value<T = Record<string, unknown>, K extends keyof T = keyof T> extends EventDispatcher {
|
||||
onChange(callback: (value: T[K]) => void): this;
|
||||
}
|
||||
|
||||
export interface ValueNumberParams {
|
||||
value?: number;
|
||||
step?: number;
|
||||
min?: number;
|
||||
max?: number;
|
||||
}
|
||||
|
||||
declare class ValueNumber<
|
||||
T = Record<string, unknown>,
|
||||
K extends KeyToValueOfType<T, number> = KeyToValueOfType<T, number>,
|
||||
> extends Value<T, K> {
|
||||
constructor(params: ValueNumberParams);
|
||||
}
|
||||
|
||||
export interface ValueCheckboxParams {
|
||||
value?: boolean;
|
||||
}
|
||||
|
||||
declare class ValueCheckbox<
|
||||
T = Record<string, unknown>,
|
||||
K extends KeyToValueOfType<T, boolean> = KeyToValueOfType<T, boolean>,
|
||||
> extends Value<T, K> {
|
||||
constructor(params: ValueCheckboxParams);
|
||||
}
|
||||
|
||||
export interface ValueSliderParams {
|
||||
value?: number;
|
||||
min?: number;
|
||||
max?: number;
|
||||
step?: number;
|
||||
}
|
||||
|
||||
declare class ValueSlider<
|
||||
T = Record<string, unknown>,
|
||||
K extends KeyToValueOfType<T, number> = KeyToValueOfType<T, number>,
|
||||
> extends Value<T, K> {
|
||||
constructor(params: ValueSliderParams);
|
||||
|
||||
setValue(val: number): this;
|
||||
step(value: number): this;
|
||||
}
|
||||
|
||||
export interface ValueSelectParams<T, K extends keyof T> {
|
||||
options?: ReadonlyArray<T[K]> | Record<string, T[K]>;
|
||||
value?: number;
|
||||
}
|
||||
|
||||
declare class ValueSelect<T = Record<string, unknown>, K extends keyof T = keyof T> extends Value<T, K> {
|
||||
constructor(params: ValueSelectParams<T, K>);
|
||||
}
|
||||
|
||||
export interface ValueColorParams {
|
||||
value?: ColorRepresentation;
|
||||
}
|
||||
|
||||
declare class ValueColor<T = Record<string, unknown>, K extends keyof T = keyof T> extends Value<T, K> {
|
||||
constructor(params: ValueColorParams);
|
||||
}
|
||||
|
||||
export interface ValueButtonParams {
|
||||
text?: string;
|
||||
value?: () => void;
|
||||
}
|
||||
|
||||
declare class ValueButton<
|
||||
T = Record<string, unknown>,
|
||||
K extends KeyToValueOfType<T, (this: T) => void> = KeyToValueOfType<T, (this: T) => void>,
|
||||
> extends Value<T, K> {
|
||||
constructor(params: ValueColorParams);
|
||||
}
|
||||
|
||||
export { Value, ValueButton, ValueCheckbox, ValueColor, ValueNumber, ValueSelect, ValueSlider };
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
import { Mesh, MeshBasicMaterial, Object3DEventMap, PlaneGeometry } from "three";
|
||||
|
||||
export interface HTMLMeshEventMap extends Object3DEventMap {
|
||||
mousedown: { data: { x: number; y: number } };
|
||||
mousemove: { data: { x: number; y: number } };
|
||||
mouseup: { data: { x: number; y: number } };
|
||||
click: { data: { x: number; y: number } };
|
||||
}
|
||||
|
||||
export class HTMLMesh extends Mesh<PlaneGeometry, MeshBasicMaterial, HTMLMeshEventMap> {
|
||||
constructor(dom: HTMLElement);
|
||||
dispose(): void;
|
||||
}
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
import { Camera, Group, Object3D, Object3DEventMap, Raycaster, Vector2, WebGLRenderer, XRTargetRaySpace } from "three";
|
||||
|
||||
export interface InteractiveObject3DEventMap extends Object3DEventMap {
|
||||
hoveron: { data: Vector2 };
|
||||
pointerdown: { data: Vector2 };
|
||||
pointerup: { data: Vector2 };
|
||||
pointermove: { data: Vector2 };
|
||||
mousedown: { data: Vector2 };
|
||||
mouseup: { data: Vector2 };
|
||||
mousemove: { data: Vector2 };
|
||||
click: { data: Vector2 };
|
||||
}
|
||||
|
||||
export class InteractiveObject3D extends Object3D<InteractiveObject3DEventMap> {}
|
||||
|
||||
export class InteractiveGroup extends Group {
|
||||
raycaster: Raycaster;
|
||||
|
||||
listenToPointerEvents(renderer: WebGLRenderer, camera: Camera): void;
|
||||
|
||||
disconnectionPointerEvents(): void;
|
||||
|
||||
listenToXRControllerEvents(controller: XRTargetRaySpace): void;
|
||||
|
||||
disconnectXrControllerEvents(): void;
|
||||
|
||||
disconnect(): void;
|
||||
}
|
||||
-16
@@ -1,16 +0,0 @@
|
||||
import { Camera, Object3D, Scene, Vector3 } from "three";
|
||||
|
||||
declare class SelectionBox {
|
||||
camera: Camera;
|
||||
scene: Scene;
|
||||
startPoint: Vector3;
|
||||
endPoint: Vector3;
|
||||
collection: Object3D[];
|
||||
instances: Record<string, number[]>;
|
||||
batches: Record<string, number[]>;
|
||||
deep: number;
|
||||
|
||||
constructor(camera: Camera, scene: Scene, deep?: number);
|
||||
|
||||
select(startPoint?: Vector3, endPoint?: Vector3): Object3D[];
|
||||
}
|
||||
-17
@@ -1,17 +0,0 @@
|
||||
import { Vector2, WebGLRenderer } from "three";
|
||||
|
||||
export class SelectionHelper {
|
||||
constructor(renderer: WebGLRenderer, cssClassName: string);
|
||||
element: HTMLElement;
|
||||
isDown: boolean;
|
||||
enabled: boolean;
|
||||
pointBottomRight: Vector2;
|
||||
pointTopLeft: Vector2;
|
||||
renderer: WebGLRenderer;
|
||||
startPoint: Vector2;
|
||||
|
||||
onSelectStart(event: Event): void;
|
||||
onSelectMove(event: Event): void;
|
||||
onSelectOver(event: Event): void;
|
||||
dispose(): void;
|
||||
}
|
||||
-1
@@ -1 +0,0 @@
|
||||
export * from "fflate";
|
||||
-608
@@ -1,608 +0,0 @@
|
||||
export type KeyToValueOfType<T, V> = { [K in keyof T]: T[K] extends V ? K : never }[keyof T];
|
||||
|
||||
export default GUI;
|
||||
export class GUI {
|
||||
/**
|
||||
* Creates a panel that holds controllers.
|
||||
* @example
|
||||
* new GUI();
|
||||
* new GUI( { container: document.getElementById( 'custom' ) } );
|
||||
*
|
||||
* @param [options]
|
||||
* @param [options.autoPlace=true]
|
||||
* Adds the GUI to `document.body` and fixes it to the top right of the page.
|
||||
*
|
||||
* @param [options.container]
|
||||
* Adds the GUI to this DOM element. Overrides `autoPlace`.
|
||||
*
|
||||
* @param [options.width=245]
|
||||
* Width of the GUI in pixels, usually set when name labels become too long. Note that you can make
|
||||
* name labels wider in CSS with `.lil‑gui { ‑‑name‑width: 55% }`
|
||||
*
|
||||
* @param [options.title=Controls]
|
||||
* Name to display in the title bar.
|
||||
*
|
||||
* @param [options.injectStyles=true]
|
||||
* Injects the default stylesheet into the page if this is the first GUI.
|
||||
* Pass `false` to use your own stylesheet.
|
||||
*
|
||||
* @param [options.touchStyles=true]
|
||||
* Makes controllers larger on touch devices. Pass `false` to disable touch styles.
|
||||
*
|
||||
* @param [options.parent]
|
||||
* Adds this GUI as a child in another GUI. Usually this is done for you by `addFolder()`.
|
||||
*/
|
||||
constructor({
|
||||
parent,
|
||||
autoPlace,
|
||||
container,
|
||||
width,
|
||||
title,
|
||||
injectStyles,
|
||||
touchStyles,
|
||||
}?: {
|
||||
autoPlace?: boolean;
|
||||
container?: HTMLElement;
|
||||
width?: number;
|
||||
title?: string;
|
||||
injectStyles?: boolean;
|
||||
touchStyles?: number;
|
||||
parent?: GUI;
|
||||
});
|
||||
/**
|
||||
* The GUI containing this folder, or `undefined` if this is the root GUI.
|
||||
*/
|
||||
parent: GUI;
|
||||
/**
|
||||
* The top level GUI containing this folder, or `this` if this is the root GUI.
|
||||
*/
|
||||
root: GUI;
|
||||
/**
|
||||
* The list of controllers and folders contained by this GUI.
|
||||
*/
|
||||
children: Array<GUI | Controller>;
|
||||
/**
|
||||
* The list of controllers contained by this GUI.
|
||||
*/
|
||||
controllers: Controller[];
|
||||
/**
|
||||
* The list of folders contained by this GUI.
|
||||
*/
|
||||
folders: GUI[];
|
||||
/**
|
||||
* Used to determine if the GUI is closed. Use `gui.open()` or `gui.close()` to change this.
|
||||
*/
|
||||
_closed: boolean;
|
||||
/**
|
||||
* Used to determine if the GUI is hidden. Use `gui.show()` or `gui.hide()` to change this.
|
||||
*/
|
||||
_hidden: boolean;
|
||||
/**
|
||||
* The outermost container element.
|
||||
*/
|
||||
domElement: HTMLElement;
|
||||
/**
|
||||
* The DOM element that contains the title.
|
||||
*/
|
||||
$title: HTMLElement;
|
||||
/**
|
||||
* The DOM element that contains children.
|
||||
*/
|
||||
$children: HTMLElement;
|
||||
/**
|
||||
* Adds a controller to the GUI, inferring controller type using the `typeof` operator.
|
||||
* @example
|
||||
* gui.add( object, 'property' );
|
||||
* gui.add( object, 'number', 0, 100, 1 );
|
||||
* gui.add( object, 'options', [ 1, 2, 3 ] );
|
||||
*
|
||||
* @param object The object the controller will modify.
|
||||
* @param property Name of the property to control.
|
||||
* @param [$1] Minimum value for number controllers, or the set of
|
||||
* selectable values for a dropdown.
|
||||
* @param [max] Maximum value for number controllers.
|
||||
* @param [step] Step value for number controllers.
|
||||
*/
|
||||
add<T, K extends keyof T>(
|
||||
object: T,
|
||||
property: K,
|
||||
options: ReadonlyArray<T[K]> | Record<string, T[K]>,
|
||||
): OptionController<T, K>;
|
||||
add<T, K extends KeyToValueOfType<T, number>>(
|
||||
object: T,
|
||||
property: K,
|
||||
min?: number,
|
||||
max?: number,
|
||||
step?: number,
|
||||
): NumberController<T, K>;
|
||||
add<T, K extends KeyToValueOfType<T, boolean>>(object: T, property: K, options?: never): BooleanController<T, K>;
|
||||
add<T, K extends KeyToValueOfType<T, string>>(object: T, property: K, options?: never): StringController<T, K>;
|
||||
add<T, K extends KeyToValueOfType<T, (this: T) => void>>(
|
||||
object: T,
|
||||
property: K,
|
||||
options?: never,
|
||||
): FunctionController<T, K>;
|
||||
/**
|
||||
* Adds a color controller to the GUI.
|
||||
* @example
|
||||
* params = {
|
||||
* cssColor: '#ff00ff',
|
||||
* rgbColor: { r: 0, g: 0.2, b: 0.4 },
|
||||
* customRange: [ 0, 127, 255 ],
|
||||
* };
|
||||
*
|
||||
* gui.addColor( params, 'cssColor' );
|
||||
* gui.addColor( params, 'rgbColor' );
|
||||
* gui.addColor( params, 'customRange', 255 );
|
||||
*
|
||||
* @param object The object the controller will modify.
|
||||
* @param property Name of the property to control.
|
||||
* @param rgbScale Maximum value for a color channel when using an RGB color. You may
|
||||
* need to set this to 255 if your colors are too bright.
|
||||
*/
|
||||
addColor<T, K extends keyof T>(object: T, property: K, rgbScale?: number): ColorController<T, K>;
|
||||
/**
|
||||
* Adds a folder to the GUI, which is just another GUI. This method returns
|
||||
* the nested GUI so you can add controllers to it.
|
||||
* @example
|
||||
* const folder = gui.addFolder( 'Position' );
|
||||
* folder.add( position, 'x' );
|
||||
* folder.add( position, 'y' );
|
||||
* folder.add( position, 'z' );
|
||||
*
|
||||
* @param title Name to display in the folder's title bar.
|
||||
*/
|
||||
addFolder(title: string): GUI;
|
||||
/**
|
||||
* Recalls values that were saved with `gui.save()`.
|
||||
* @param obj
|
||||
* @param recursive Pass false to exclude folders descending from this GUI.
|
||||
*/
|
||||
load(obj: object, recursive?: boolean): this;
|
||||
/**
|
||||
* Returns an object mapping controller names to values. The object can be passed to `gui.load()` to
|
||||
* recall these values.
|
||||
* @example
|
||||
* {
|
||||
* controllers: {
|
||||
* prop1: 1,
|
||||
* prop2: 'value',
|
||||
* ...
|
||||
* },
|
||||
* folders: {
|
||||
* folderName1: { controllers, folders },
|
||||
* folderName2: { controllers, folders }
|
||||
* ...
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* @param recursive Pass false to exclude folders descending from this GUI.
|
||||
*/
|
||||
save(recursive?: boolean): object;
|
||||
/**
|
||||
* Opens a GUI or folder. GUI and folders are open by default.
|
||||
* @param open Pass false to close
|
||||
* @example
|
||||
* gui.open(); // open
|
||||
* gui.open( false ); // close
|
||||
* gui.open( gui._closed ); // toggle
|
||||
*/
|
||||
open(open?: boolean): this;
|
||||
/**
|
||||
* Closes the GUI.
|
||||
*/
|
||||
close(): this;
|
||||
/**
|
||||
* Shows the GUI after it's been hidden.
|
||||
* @param show
|
||||
* @example
|
||||
* gui.show();
|
||||
* gui.show( false ); // hide
|
||||
* gui.show( gui._hidden ); // toggle
|
||||
*/
|
||||
show(show?: boolean): this;
|
||||
/**
|
||||
* Hides the GUI.
|
||||
*/
|
||||
hide(): this;
|
||||
openAnimated(open?: boolean): GUI;
|
||||
/**
|
||||
* Change the title of this GUI.
|
||||
* @param title
|
||||
*/
|
||||
title(title: string): this;
|
||||
/**
|
||||
* Current title of the GUI. Use `gui.title( 'Title' )` to modify this value.
|
||||
*/
|
||||
_title: string;
|
||||
/**
|
||||
* Resets all controllers to their initial values.
|
||||
* @param recursive Pass false to exclude folders descending from this GUI.
|
||||
*/
|
||||
reset(recursive?: boolean): this;
|
||||
/**
|
||||
* Pass a function to be called whenever a controller in this GUI changes.
|
||||
* @param callback
|
||||
* @example
|
||||
* gui.onChange( event => {
|
||||
* event.object // object that was modified
|
||||
* event.property // string, name of property
|
||||
* event.value // new value of controller
|
||||
* event.controller // controller that was modified
|
||||
* } );
|
||||
*/
|
||||
onChange(
|
||||
callback: (arg0: { object: object; property: string; value: unknown; controller: Controller }) => void,
|
||||
): this;
|
||||
/**
|
||||
* Used to access the function bound to `onChange` events. Don't modify this value
|
||||
* directly. Use the `gui.onChange( callback )` method instead.
|
||||
*/
|
||||
_onChange: (arg0: { object: object; property: string; value: unknown; controller: Controller }) => void;
|
||||
_callOnChange(controller: Controller): void;
|
||||
/**
|
||||
* Pass a function to be called whenever a controller in this GUI has finished changing.
|
||||
* @param callback
|
||||
* @example
|
||||
* gui.onFinishChange( event => {
|
||||
* event.object // object that was modified
|
||||
* event.property // string, name of property
|
||||
* event.value // new value of controller
|
||||
* event.controller // controller that was modified
|
||||
* } );
|
||||
*/
|
||||
onFinishChange(
|
||||
callback: (arg0: { object: object; property: string; value: unknown; controller: Controller }) => void,
|
||||
): this;
|
||||
/**
|
||||
* Used to access the function bound to `onFinishChange` events. Don't modify this value
|
||||
* directly. Use the `gui.onFinishChange( callback )` method instead.
|
||||
*/
|
||||
_onFinishChange: (arg0: { object: object; property: string; value: unknown; controller: Controller }) => void;
|
||||
_callOnFinishChange(controller: Controller): void;
|
||||
/**
|
||||
* Destroys all DOM elements and event listeners associated with this GUI
|
||||
*/
|
||||
destroy(): void;
|
||||
/**
|
||||
* Returns an array of controllers contained by this GUI and its descendents.
|
||||
*/
|
||||
controllersRecursive(): Controller[];
|
||||
/**
|
||||
* Returns an array of folders contained by this GUI and its descendents.
|
||||
*/
|
||||
foldersRecursive(): GUI[];
|
||||
}
|
||||
export class BooleanController<
|
||||
T = Record<string, unknown>,
|
||||
K extends KeyToValueOfType<T, boolean> = KeyToValueOfType<T, boolean>,
|
||||
> extends Controller<T, K> {
|
||||
constructor(parent: GUI, object: T, property: K);
|
||||
$input: HTMLInputElement;
|
||||
}
|
||||
export class ColorController<T = Record<string, unknown>, K extends keyof T = keyof T> extends Controller<T, K> {
|
||||
constructor(parent: GUI, object: T, property: K, rgbScale: number);
|
||||
$input: HTMLInputElement;
|
||||
$text: HTMLInputElement;
|
||||
$display: HTMLDivElement;
|
||||
_format:
|
||||
| {
|
||||
isPrimitive: boolean;
|
||||
match: (v: unknown) => boolean;
|
||||
fromHexString: typeof normalizeColorString;
|
||||
toHexString: typeof normalizeColorString;
|
||||
}
|
||||
| {
|
||||
isPrimitive: boolean;
|
||||
match: (arg: unknown) => arg is unknown[];
|
||||
fromHexString(string: unknown, target: unknown, rgbScale?: number): void;
|
||||
toHexString([r, g, b]: [unknown, unknown, unknown], rgbScale?: number): string;
|
||||
}
|
||||
| {
|
||||
isPrimitive: boolean;
|
||||
match: (v: unknown) => boolean;
|
||||
fromHexString(string: unknown, target: unknown, rgbScale?: number): void;
|
||||
toHexString(
|
||||
{
|
||||
r,
|
||||
g,
|
||||
b,
|
||||
}: {
|
||||
r: unknown;
|
||||
g: unknown;
|
||||
b: unknown;
|
||||
},
|
||||
rgbScale?: number,
|
||||
): string;
|
||||
};
|
||||
_rgbScale: number;
|
||||
_initialValueHexString: string | boolean;
|
||||
_textFocused: boolean;
|
||||
_setValueFromHexString(value: unknown): void;
|
||||
}
|
||||
/**
|
||||
* lil-gui
|
||||
* https://lil-gui.georgealways.com
|
||||
* @version 0.17.0
|
||||
* @author George Michael Brower
|
||||
* @license MIT
|
||||
*/
|
||||
/**
|
||||
* Base class for all controllers.
|
||||
*/
|
||||
export class Controller<T = Record<string, unknown>, K extends keyof T = keyof T> {
|
||||
constructor(parent: GUI, object: T, property: K, className: string, widgetTag?: string);
|
||||
/**
|
||||
* The GUI that contains this controller.
|
||||
*/
|
||||
parent: GUI;
|
||||
/**
|
||||
* The object this controller will modify.
|
||||
*/
|
||||
object: T;
|
||||
/**
|
||||
* The name of the property to control.
|
||||
*/
|
||||
property: string;
|
||||
/**
|
||||
* Used to determine if the controller is disabled.
|
||||
* Use `controller.disable( true|false )` to modify this value
|
||||
*/
|
||||
_disabled: boolean;
|
||||
/**
|
||||
* Used to determine if the Controller is hidden.
|
||||
* Use `controller.show()` or `controller.hide()` to change this.
|
||||
*/
|
||||
_hidden: boolean;
|
||||
/**
|
||||
* The value of `object[ property ]` when the controller was created.
|
||||
*/
|
||||
initialValue: T[K];
|
||||
/**
|
||||
* The outermost container DOM element for this controller.
|
||||
*/
|
||||
domElement: HTMLElement;
|
||||
/**
|
||||
* The DOM element that contains the controller's name.
|
||||
*/
|
||||
$name: HTMLElement;
|
||||
/**
|
||||
* The DOM element that contains the controller's "widget" (which differs by controller type).
|
||||
*/
|
||||
$widget: HTMLElement;
|
||||
/**
|
||||
* The DOM element that receives the disabled attribute when using disable()
|
||||
*/
|
||||
$disable: HTMLElement;
|
||||
_listenCallback(): void;
|
||||
/**
|
||||
* Sets the name of the controller and its label in the GUI.
|
||||
* @param name
|
||||
*/
|
||||
name(name: string): this;
|
||||
/**
|
||||
* The controller's name. Use `controller.name( 'Name' )` to modify this value.
|
||||
*/
|
||||
_name: string;
|
||||
/**
|
||||
* Pass a function to be called whenever the value is modified by this controller.
|
||||
* The function receives the new value as its first parameter. The value of `this` will be the
|
||||
* controller.
|
||||
* @param callback
|
||||
* @example
|
||||
* const controller = gui.add( object, 'property' );
|
||||
*
|
||||
* controller.onChange( function( v ) {
|
||||
* console.log( 'The value is now ' + v );
|
||||
* console.assert( this === controller );
|
||||
* } );
|
||||
*/
|
||||
onChange(callback: (this: this, value: T[K]) => void): this;
|
||||
/**
|
||||
* Used to access the function bound to `onChange` events. Don't modify this value directly.
|
||||
* Use the `controller.onChange( callback )` method instead.
|
||||
*/
|
||||
_onChange: (this: this, value: T[K]) => void;
|
||||
/**
|
||||
* Calls the onChange methods of this controller and its parent GUI.
|
||||
*/
|
||||
protected _callOnChange(): void;
|
||||
_changed: boolean;
|
||||
/**
|
||||
* Pass a function to be called after this controller has been modified and loses focus.
|
||||
* @param callback
|
||||
* @example
|
||||
* const controller = gui.add( object, 'property' );
|
||||
*
|
||||
* controller.onFinishChange( function( v ) {
|
||||
* console.log( 'Changes complete: ' + v );
|
||||
* console.assert( this === controller );
|
||||
* } );
|
||||
*/
|
||||
onFinishChange(callback: (this: this, value: T[K]) => void): this;
|
||||
/**
|
||||
* Used to access the function bound to `onFinishChange` events. Don't modify this value
|
||||
* directly. Use the `controller.onFinishChange( callback )` method instead.
|
||||
*/
|
||||
_onFinishChange: (this: this, value: T[K]) => void;
|
||||
/**
|
||||
* Should be called by Controller when its widgets lose focus.
|
||||
*/
|
||||
protected _callOnFinishChange(): void;
|
||||
/**
|
||||
* Sets the controller back to its initial value.
|
||||
*/
|
||||
reset(): this;
|
||||
/**
|
||||
* Enables this controller.
|
||||
* @param enabled
|
||||
* @example
|
||||
* controller.enable();
|
||||
* controller.enable( false ); // disable
|
||||
* controller.enable( controller._disabled ); // toggle
|
||||
*/
|
||||
enable(enabled?: boolean): this;
|
||||
/**
|
||||
* Disables this controller.
|
||||
* @param disabled
|
||||
* @example
|
||||
* controller.disable();
|
||||
* controller.disable( false ); // enable
|
||||
* controller.disable( !controller._disabled ); // toggle
|
||||
*/
|
||||
disable(disabled?: boolean): this;
|
||||
/**
|
||||
* Shows the Controller after it's been hidden.
|
||||
* @param show
|
||||
* @example
|
||||
* controller.show();
|
||||
* controller.show( false ); // hide
|
||||
* controller.show( controller._hidden ); // toggle
|
||||
*/
|
||||
show(show?: boolean): this;
|
||||
/**
|
||||
* Hides the Controller.
|
||||
*/
|
||||
hide(): this;
|
||||
/**
|
||||
* Destroys this controller and replaces it with a new option controller. Provided as a more
|
||||
* descriptive syntax for `gui.add`, but primarily for compatibility with dat.gui.
|
||||
*
|
||||
* Use caution, as this method will destroy old references to this controller. It will also
|
||||
* change controller order if called out of sequence, moving the option controller to the end of
|
||||
* the GUI.
|
||||
* @example
|
||||
* // safe usage
|
||||
*
|
||||
* gui.add( object1, 'property' ).options( [ 'a', 'b', 'c' ] );
|
||||
* gui.add( object2, 'property' );
|
||||
*
|
||||
* // danger
|
||||
*
|
||||
* const c = gui.add( object1, 'property' );
|
||||
* gui.add( object2, 'property' );
|
||||
*
|
||||
* c.options( [ 'a', 'b', 'c' ] );
|
||||
* // controller is now at the end of the GUI even though it was added first
|
||||
*
|
||||
* assert( c.parent.children.indexOf( c ) === -1 )
|
||||
* // c references a controller that no longer exists
|
||||
*
|
||||
* @param options
|
||||
*/
|
||||
options(options: object | unknown[]): Controller;
|
||||
/**
|
||||
* Calls `updateDisplay()` every animation frame. Pass `false` to stop listening.
|
||||
* @param listen
|
||||
*/
|
||||
listen(listen?: boolean): this;
|
||||
/**
|
||||
* Used to determine if the controller is currently listening. Don't modify this value
|
||||
* directly. Use the `controller.listen( true|false )` method instead.
|
||||
*/
|
||||
_listening: boolean;
|
||||
_listenCallbackID: number;
|
||||
_listenPrevValue: unknown;
|
||||
/**
|
||||
* Returns `object[ property ]`.
|
||||
*/
|
||||
getValue(): T[K];
|
||||
/**
|
||||
* Sets the value of `object[ property ]`, invokes any `onChange` handlers and updates the display.
|
||||
* @param value
|
||||
*/
|
||||
setValue(value: T[K]): this;
|
||||
/**
|
||||
* Updates the display to keep it in sync with the current value. Useful for updating your
|
||||
* controllers when their values have been modified outside of the GUI.
|
||||
*/
|
||||
updateDisplay(): this;
|
||||
load(value: T[K]): this;
|
||||
save(): T[K];
|
||||
/**
|
||||
* Destroys this controller and removes it from the parent GUI.
|
||||
*/
|
||||
destroy(): void;
|
||||
}
|
||||
export class FunctionController<
|
||||
T = Record<string, unknown>,
|
||||
K extends KeyToValueOfType<T, (this: T) => void> = KeyToValueOfType<T, (this: T) => void>,
|
||||
> extends Controller<T, K> {
|
||||
constructor(parent: GUI, object: T, property: K);
|
||||
$button: HTMLButtonElement;
|
||||
}
|
||||
export class NumberController<
|
||||
T = Record<string, unknown>,
|
||||
K extends KeyToValueOfType<T, number> = KeyToValueOfType<T, number>,
|
||||
> extends Controller<T, K> {
|
||||
constructor(
|
||||
parent: GUI,
|
||||
object: T,
|
||||
property: K,
|
||||
min: number | undefined,
|
||||
max: number | undefined,
|
||||
step: number | undefined,
|
||||
);
|
||||
_decimals: unknown;
|
||||
_min: unknown;
|
||||
_max: unknown;
|
||||
_step: unknown;
|
||||
_stepExplicit: boolean;
|
||||
_initInput(): void;
|
||||
$input: HTMLInputElement;
|
||||
_inputFocused: boolean;
|
||||
_initSlider(): void;
|
||||
_hasSlider: boolean;
|
||||
$slider: HTMLDivElement;
|
||||
$fill: HTMLDivElement;
|
||||
_setDraggingStyle(active: unknown, axis?: string): void;
|
||||
_getImplicitStep(): number;
|
||||
_onUpdateMinMax(): void;
|
||||
_normalizeMouseWheel(e: unknown): unknown;
|
||||
_arrowKeyMultiplier(e: unknown): number;
|
||||
_snap(value: unknown): number;
|
||||
_clamp(value: unknown): unknown;
|
||||
_snapClampSetValue(value: unknown): void;
|
||||
get _hasScrollBar(): boolean;
|
||||
get _hasMin(): boolean;
|
||||
get _hasMax(): boolean;
|
||||
/**
|
||||
* Sets the minimum value. Only works on number controllers.
|
||||
* @param min
|
||||
*/
|
||||
min(min: number): this;
|
||||
/**
|
||||
* Sets the maximum value. Only works on number controllers.
|
||||
* @param max
|
||||
*/
|
||||
max(max: number): this;
|
||||
/**
|
||||
* Values set by this controller will be rounded to multiples of `step`. Only works on number
|
||||
* controllers.
|
||||
* @param step
|
||||
*/
|
||||
step(step: number): this;
|
||||
/**
|
||||
* Rounds the displayed value to a fixed number of decimals, without affecting the actual value
|
||||
* like `step()`. Only works on number controllers.
|
||||
* @example
|
||||
* gui.add( object, 'property' ).listen().decimals( 4 );
|
||||
* @param decimals
|
||||
*/
|
||||
decimals(decimals: number): this;
|
||||
}
|
||||
export class OptionController<T = Record<string, unknown>, K extends keyof T = keyof T> extends Controller<T, K> {
|
||||
constructor(parent: GUI, object: T, property: K, options: ReadonlyArray<T[K]> | Record<string, T[K]>);
|
||||
$select: HTMLSelectElement;
|
||||
$display: HTMLDivElement;
|
||||
_values: Array<T[K]>;
|
||||
_names: unknown[];
|
||||
}
|
||||
export class StringController<
|
||||
T = Record<string, unknown>,
|
||||
K extends KeyToValueOfType<T, string> = KeyToValueOfType<T, string>,
|
||||
> extends Controller<T, K> {
|
||||
constructor(parent: GUI, object: T, property: K);
|
||||
$input: HTMLInputElement;
|
||||
}
|
||||
declare function normalizeColorString(string: unknown): string | false;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user