Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions examples-testing/changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -14126,32 +14126,6 @@ index 86f21eb..bf2af6b 100644

postProcessing.outputNode = combinedPass;

diff --git a/examples-testing/examples/webgpu_shadowmap.ts b/examples-testing/examples/webgpu_shadowmap.ts
index 4184cb4..f6d36c0 100644
--- a/examples-testing/examples/webgpu_shadowmap.ts
+++ b/examples-testing/examples/webgpu_shadowmap.ts
@@ -7,9 +7,9 @@ import WebGPURenderer from 'three/addons/renderers/webgpu/WebGPURenderer.js';

import { OrbitControls } from 'three/addons/controls/OrbitControls.js';

-let camera, scene, renderer, clock;
-let dirLight, spotLight;
-let torusKnot, dirGroup;
+let camera: THREE.PerspectiveCamera, scene: THREE.Scene, renderer: WebGPURenderer, clock: THREE.Clock;
+let dirLight: THREE.DirectionalLight, spotLight: THREE.SpotLight;
+let torusKnot: THREE.Mesh, dirGroup: THREE.Group;

init();

@@ -139,7 +139,7 @@ function resize() {
renderer.setSize(window.innerWidth, window.innerHeight);
}

-function animate(time) {
+function animate(time: number) {
const delta = clock.getDelta();

torusKnot.rotation.x += 0.25 * delta;
diff --git a/examples-testing/examples/webgpu_video_panorama.ts b/examples-testing/examples/webgpu_video_panorama.ts
index c6e051f..dca0db3 100644
--- a/examples-testing/examples/webgpu_video_panorama.ts
Expand Down
2 changes: 1 addition & 1 deletion examples-testing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ const files = {
// 'webgpu_rtt',
// 'webgpu_sandbox',
// 'webgpu_shadertoy',
'webgpu_shadowmap',
// 'webgpu_shadowmap',
// 'webgpu_skinning',
// 'webgpu_skinning_instancing',
// 'webgpu_skinning_points',
Expand Down
3 changes: 3 additions & 0 deletions types/three/examples/jsm/nodes/Nodes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export { default as BypassNode, bypass } from './core/BypassNode.js';
export { default as CacheNode, cache } from './core/CacheNode.js';
export { default as ConstNode } from './core/ConstNode.js';
export { default as ContextNode, context, label } from './core/ContextNode.js';
export { default as IndexNode, vertexIndex, instanceIndex, IndexNodeScope } from './core/IndexNode.js';
export {
default as LightingModel,
LightingModelReflectedLight,
Expand Down Expand Up @@ -149,6 +150,7 @@ export {
Operator,
} from './math/OperatorNode.js';
export { default as CondNode, cond } from './math/CondNode.js';
export { default as HashNode, hash } from './math/HashNode.js';

// math utils
export { parabola, gain, pcurve, sinc } from './math/MathUtilsNode.js';
Expand All @@ -157,6 +159,7 @@ export { triNoise3D } from './math/TriNoise3D.js';
// utils
export { default as ArrayElementNode } from './utils/ArrayElementNode.js';
export { default as ConvertNode } from './utils/ConvertNode.js';
export { default as DiscardNode, discard } from './utils/DiscardNode.js';
export { default as EquirectUVNode, equirectUV } from './utils/EquirectUVNode.js';
export { default as JoinNode } from './utils/JoinNode.js';
export { default as MatcapUVNode, matcapUV } from './utils/MatcapUVNode.js';
Expand Down
18 changes: 18 additions & 0 deletions types/three/examples/jsm/nodes/core/IndexNode.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import Node from './Node.js';
import { ShaderNodeObject } from '../shadernode/ShaderNode.js';

export type IndexNodeScope = typeof IndexNode.VERTEX | typeof IndexNode.INSTANCE;

export default class IndexNode extends Node {
scope: IndexNodeScope;

readonly isInstanceNode: true;

constructor(scope: IndexNodeScope);

static VERTEX: 'vertex';
static INSTANCE: 'instance';
}

export const vertexIndex: ShaderNodeObject<IndexNode>;
export const instanceIndex: ShaderNodeObject<IndexNode>;
1 change: 1 addition & 0 deletions types/three/examples/jsm/nodes/materials/NodeMaterial.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export default class NodeMaterial extends ShaderMaterial {
positionNode: Node | null;

depthNode: Node | null;
shadowNode: Node | null;

outputNode: Node | null;

Expand Down
16 changes: 16 additions & 0 deletions types/three/examples/jsm/nodes/math/HashNode.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Node from '../core/Node.js';
import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';

export default class HashNode extends Node {
seedNode: Node;

constructor(seedNode: Node);
}

export const hash: (seedNode: NodeRepresentation) => ShaderNodeObject<HashNode>;

declare module '../shadernode/ShaderNode.js' {
interface NodeElements {
hash: typeof hash;
}
}
16 changes: 16 additions & 0 deletions types/three/examples/jsm/nodes/utils/DiscardNode.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import CondNode from '../math/CondNode.js';
import Node from '../core/Node.js';
import { NodeRepresentation, ShaderNodeObject } from '../shadernode/ShaderNode.js';

export default class DiscardNode extends CondNode {
constructor(condNode: Node);
}

export const inlineDiscard: (condNode: NodeRepresentation) => ShaderNodeObject<DiscardNode>;
export const discard: (condNode: NodeRepresentation) => ShaderNodeObject<Node>;

declare module '../shadernode/ShaderNode.js' {
interface NodeElements {
discard: typeof discard;
}
}