Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSL: Deprecated .temp() #1304

Merged
merged 8 commits into from
Oct 24, 2024
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
1 change: 1 addition & 0 deletions examples-testing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const exceptionList = [
'webgpu_equirectangular',
'webgpu_instance_mesh',
'webgpu_instance_points',
'webgpu_instance_sprites',
'webgpu_instance_uniform',
'webgpu_lightprobe_cubecamera',
'webgpu_lights_custom',
Expand Down
4 changes: 2 additions & 2 deletions src-testing/changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6654,7 +6654,7 @@ index 520a3c91..524d188c 100644
} else {
bindings.push(instanceGroup);
diff --git a/src-testing/src/renderers/common/nodes/NodeLibrary.ts b/src-testing/src/renderers/common/nodes/NodeLibrary.ts
index d631572a..dc0c0a05 100644
index 15931016..2128aa79 100644
--- a/src-testing/src/renderers/common/nodes/NodeLibrary.ts
+++ b/src-testing/src/renderers/common/nodes/NodeLibrary.ts
@@ -1,4 +1,21 @@
Expand Down Expand Up @@ -6724,7 +6724,7 @@ index d631572a..dc0c0a05 100644

- addMaterial(materialNodeClass, materialClass) {
+ addMaterial(materialNodeClass: { new (): NodeMaterial }, materialClass: { new (): Material }) {
this.addType(materialNodeClass, materialClass.name, this.materialNodes);
this.addType(materialNodeClass, materialClass.type, this.materialNodes);
}

- getLightNodeClass(light) {
Expand Down
2 changes: 1 addition & 1 deletion three.js
Submodule three.js updated 41 files
+1 −0 examples/files.json
+1 −1 examples/jsm/Addons.js
+1 −1 examples/jsm/controls/TransformControls.js
+1 −1 examples/jsm/exporters/GLTFExporter.js
+21 −3 examples/jsm/exporters/USDZExporter.js
+2 −0 examples/jsm/geometries/InstancedPointsGeometry.js
+7 −2 examples/jsm/lines/LineMaterial.js
+6 −0 examples/jsm/loaders/LDrawLoader.js
+6 −2 examples/jsm/loaders/MMDLoader.js
+6 −2 examples/jsm/materials/MeshGouraudMaterial.js
+0 −0 examples/jsm/utils/WebGLTextureUtils.js
+0 −0 examples/jsm/utils/WebGPUTextureUtils.js
+ examples/screenshots/webgpu_instance_sprites.jpg
+1 −1 examples/webgpu_compute_points.html
+172 −0 examples/webgpu_instance_sprites.html
+1 −1 examples/webgpu_materials.html
+6 −2 src/materials/LineBasicMaterial.js
+6 −2 src/materials/LineDashedMaterial.js
+14 −1 src/materials/Material.js
+6 −2 src/materials/MeshBasicMaterial.js
+6 −2 src/materials/MeshDepthMaterial.js
+6 −2 src/materials/MeshDistanceMaterial.js
+6 −2 src/materials/MeshLambertMaterial.js
+6 −2 src/materials/MeshMatcapMaterial.js
+6 −2 src/materials/MeshNormalMaterial.js
+6 −2 src/materials/MeshPhongMaterial.js
+6 −2 src/materials/MeshPhysicalMaterial.js
+6 −2 src/materials/MeshStandardMaterial.js
+6 −2 src/materials/MeshToonMaterial.js
+6 −2 src/materials/PointsMaterial.js
+6 −2 src/materials/RawShaderMaterial.js
+6 −2 src/materials/ShaderMaterial.js
+6 −2 src/materials/ShadowMaterial.js
+6 −2 src/materials/SpriteMaterial.js
+18 −6 src/materials/nodes/NodeMaterial.js
+4 −1 src/materials/nodes/SpriteNodeMaterial.js
+0 −1 src/nodes/accessors/Camera.js
+15 −3 src/nodes/core/VarNode.js
+26 −1 src/nodes/display/ViewportDepthNode.js
+26 −5 src/nodes/lighting/AnalyticLightNode.js
+1 −1 src/renderers/common/nodes/NodeLibrary.js
13 changes: 12 additions & 1 deletion types/three/src/nodes/core/VarNode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,22 @@ export default class VarNode extends Node {
constructor(node: Node, name?: string | null);
}

declare module "../tsl/TSLCore.js" {
interface NodeElements {
toVar: (node: NodeRepresentation, name?: string | null) => ShaderNodeObject<VarNode>;
}
}

/**
* @deprecated Use ".toVar()" instead.
*/
export const temp: (node: NodeRepresentation, name?: string | null) => ShaderNodeObject<VarNode>;

declare module "../tsl/TSLCore.js" {
interface NodeElements {
/**
* @deprecated Use ".toVar()" instead.
*/
temp: typeof temp;
toVar: typeof temp;
}
}
Loading