Skip to content

Commit 857f955

Browse files
authored
🤖 Merge PR DefinitelyTyped#72585 [three] r176 by @Methuselah96
1 parent 04011b5 commit 857f955

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+367
-114
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import * as RAPIER from "@dimforge/rapier3d-compat";
2+
import { LineSegments } from "three";
3+
4+
declare class RapierHelper extends LineSegments {
5+
world: RAPIER.World;
6+
7+
constructor(world: RAPIER.World);
8+
9+
update(): void;
10+
dispose(): void;
11+
}
12+
13+
export { RapierHelper };

types/three/examples/jsm/loaders/LottieLoader.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import { CanvasTexture, Loader, LoadingManager } from "three";
22

33
export class LottieLoader extends Loader<CanvasTexture> {
4+
/**
5+
* @deprecated The loader has been deprecated and will be removed with r186. Use lottie-web instead and create your
6+
* animated texture manually.
7+
*/
48
constructor(manager?: LoadingManager);
59

610
load(

types/three/examples/jsm/misc/MD2CharacterComplex.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export class MD2CharacterComplex {
99
maxReverseSpeed: number;
1010
frontAcceleration: number;
1111
backAcceleration: number;
12-
frontDecceleration: number;
12+
frontDeceleration: number;
1313
angularSpeed: number;
1414
root: Object3D;
1515
meshBody: Mesh | null;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
1+
import * as RAPIER from "@dimforge/rapier3d-compat";
12
import { Mesh, Object3D } from "three";
23

34
type Vector = { x: number; y: number; z: number };
45

56
export interface RapierPhysicsObject {
7+
RAPIER: typeof RAPIER;
8+
world: RAPIER.World;
69
addScene: (scene: Object3D) => void;
710
addMesh: (mesh: Mesh, mass?: number, restitution?: number) => void;
811
setMeshPosition: (mesh: Mesh, position: Vector, index?: number) => void;
912
setMeshVelocity: (mesh: Mesh, velocity: Vector, index?: number) => void;
13+
addHeightfield: (
14+
mesh: Mesh,
15+
width: number,
16+
depth: number,
17+
heights: Float32Array,
18+
scale: Vector,
19+
) => RAPIER.RigidBody;
1020
}
1121

1222
export function RapierPhysics(): Promise<RapierPhysicsObject>;
23+
24+
export type RAPIER = typeof RAPIER;

types/three/examples/jsm/postprocessing/BokehPass.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ import { Camera, Color, MeshDepthMaterial, Scene, ShaderMaterial, WebGLRenderTar
22

33
import { FullScreenQuad, Pass } from "./Pass.js";
44

5-
export interface BokehPassParamters {
5+
export interface BokehPassParameters {
66
focus?: number;
77
aspect?: number;
88
aperture?: number;
99
maxblur?: number;
1010
}
1111

1212
export class BokehPass extends Pass {
13-
constructor(scene: Scene, camera: Camera, params: BokehPassParamters);
13+
constructor(scene: Scene, camera: Camera, params: BokehPassParameters);
1414
scene: Scene;
1515
camera: Camera;
1616
renderTargetColor: WebGLRenderTarget;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { Light, ShadowBaseNode } from "three/webgpu";
2+
3+
export interface TileShadeNodeConfig {
4+
tilesX?: number | undefined;
5+
tilesY?: number | undefined;
6+
resolution?: { width: number; height: number };
7+
debug?: boolean | undefined;
8+
}
9+
10+
declare class TileShadowNode extends ShadowBaseNode {
11+
constructor(light: Light, options?: TileShadeNodeConfig);
12+
}
13+
14+
export { TileShadowNode };
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { Group } from "three/webgpu";
2+
import { TileShadowNode } from "./TileShadowNode.js";
3+
4+
declare class TileShadowNodeHelper extends Group {
5+
constructor(tileShadowNode: TileShadowNode);
6+
7+
init(): void;
8+
9+
update(): void;
10+
11+
dispose(): void;
12+
}
13+
14+
export { TileShadowNodeHelper };

types/three/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "@types/three",
4-
"version": "0.175.9999",
4+
"version": "0.176.9999",
55
"projects": [
66
"https://threejs.org/"
77
],
@@ -20,6 +20,7 @@
2020
"./tsl": "./build/three.tsl.js"
2121
},
2222
"dependencies": {
23+
"@dimforge/rapier3d-compat": "^0.12.0",
2324
"@tweenjs/tween.js": "~23.1.3",
2425
"@types/stats.js": "*",
2526
"@types/webxr": "*",

types/three/src/Three.Core.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ export { ColorManagement, ColorSpaceDefinition } from "./math/ColorManagement.js
103103
export * from "./math/Cylindrical.js";
104104
export * from "./math/Euler.js";
105105
export * from "./math/Frustum.js";
106+
export * from "./math/FrustumArray.js";
106107
export * from "./math/Interpolant.js";
107108
export * from "./math/interpolants/CubicInterpolant.js";
108109
export * from "./math/interpolants/DiscreteInterpolant.js";
@@ -152,6 +153,7 @@ export * from "./textures/CubeTexture.js";
152153
export * from "./textures/Data3DTexture.js";
153154
export * from "./textures/DataArrayTexture.js";
154155
export * from "./textures/DataTexture.js";
156+
export * from "./textures/DepthArrayTexture.js";
155157
export * from "./textures/DepthTexture.js";
156158
export * from "./textures/FramebufferTexture.js";
157159
export * from "./textures/Source.js";

types/three/src/Three.TSL.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export const F_Schlick: typeof TSL.F_Schlick;
1313
export const Fn: typeof TSL.Fn;
1414
export const INFINITY: typeof TSL.INFINITY;
1515
export const If: typeof TSL.If;
16+
export const Switch: typeof TSL.Switch;
1617
export const Loop: typeof TSL.Loop;
1718
export const NodeShaderStage: typeof TSL.NodeShaderStage;
1819
export const NodeType: typeof TSL.NodeType;
@@ -130,6 +131,8 @@ export const dFdx: typeof TSL.dFdx;
130131
export const dFdy: typeof TSL.dFdy;
131132
export const dashSize: typeof TSL.dashSize;
132133
export const debug: typeof TSL.debug;
134+
export const decrement: typeof TSL.decrement;
135+
export const decrementBefore: typeof TSL.decrementBefore;
133136
export const defaultBuildStages: typeof TSL.defaultBuildStages;
134137
export const defaultShaderStages: typeof TSL.defaultShaderStages;
135138
export const defined: typeof TSL.defined;
@@ -183,6 +186,8 @@ export const getScreenPosition: typeof TSL.getScreenPosition;
183186
export const getShIrradianceAt: typeof TSL.getShIrradianceAt;
184187
export const getTextureIndex: typeof TSL.getTextureIndex;
185188
export const getViewPosition: typeof TSL.getViewPosition;
189+
export const getShadowMaterial: typeof TSL.getShadowMaterial;
190+
export const getShadowRenderObjectFunction: typeof TSL.getShadowRenderObjectFunction;
186191
export const glsl: typeof TSL.glsl;
187192
export const glslFn: typeof TSL.glslFn;
188193
export const grayscale: typeof TSL.grayscale;
@@ -192,6 +197,8 @@ export const hash: typeof TSL.hash;
192197
export const highpModelNormalViewMatrix: typeof TSL.highpModelNormalViewMatrix;
193198
export const highPrecisionModelViewMatrix: typeof TSL.highpModelViewMatrix;
194199
export const hue: typeof TSL.hue;
200+
export const increment: typeof TSL.increment;
201+
export const incrementBefore: typeof TSL.incrementBefore;
195202
export const instance: typeof TSL.instance;
196203
export const instanceIndex: typeof TSL.instanceIndex;
197204
export const instancedArray: typeof TSL.instancedArray;
@@ -217,6 +224,7 @@ export const lengthSq: typeof TSL.lengthSq;
217224
export const lessThan: typeof TSL.lessThan;
218225
export const lessThanEqual: typeof TSL.lessThanEqual;
219226
export const lightPosition: typeof TSL.lightPosition;
227+
export const lightShadowMatrix: typeof TSL.lightShadowMatrix;
220228
export const lightTargetDirection: typeof TSL.lightTargetDirection;
221229
export const lightTargetPosition: typeof TSL.lightTargetPosition;
222230
export const lightViewPosition: typeof TSL.lightViewPosition;

0 commit comments

Comments
 (0)