Skip to content

SpriteSheetUVNode: Transform to TSL function and fix countNode access.#32693

Merged
Mugen87 merged 2 commits intomrdoob:devfrom
gayanMatch:fix/SpriteSheetUVNode-countNode-type
Jan 9, 2026
Merged

SpriteSheetUVNode: Transform to TSL function and fix countNode access.#32693
Mugen87 merged 2 commits intomrdoob:devfrom
gayanMatch:fix/SpriteSheetUVNode-countNode-type

Conversation

@gayanMatch
Copy link
Contributor

@gayanMatch gayanMatch commented Jan 9, 2026

Fixed #32688

Description

This PR refactors SpriteSheetUVNode from a class-based Node to a modern TSL Fn function, as requested by the reviewer.

Changes:

  • Removed the SpriteSheetUVNode class entirely
  • Replaced with a pure TSL Fn function implementation of spritesheetUV()
  • Updated imports to use Fn instead of nodeProxy and removed unused Node import
  • Preserved all existing functionality and logic - the UV calculation remains identical
  • Maintained backward compatibility - the public API (spritesheetUV()) is unchanged

Contribution by Gittensor, see my contribution statistics at https://gittensor.io/miners/details?githubId=132382032

@sunag
Copy link
Collaborator

sunag commented Jan 9, 2026

Some aditional taks:

  • Rename the file SpriteSheetUVNode.js -> SpriteSheetUV.js and update the TSL.js reference
  • Remove the export SpriteSheetUVNode of Nodes.js file

@sunag sunag added this to the r183 milestone Jan 9, 2026
@github-actions
Copy link

github-actions bot commented Jan 9, 2026

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 355.36
84.47
355.36
84.47
+0 B
+0 B
WebGPU 621.54
172.59
621.3
172.52
-244 B
-70 B
WebGPU Nodes 620.15
172.35
619.9
172.28
-244 B
-72 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 487.31
119.25
487.31
119.25
+0 B
+0 B
WebGPU 692.53
187.85
692.53
187.85
+0 B
+0 B
WebGPU Nodes 642.34
175.07
642.34
175.07
+0 B
+0 B

@gayanMatch gayanMatch force-pushed the fix/SpriteSheetUVNode-countNode-type branch from 6145446 to 631d5a8 Compare January 9, 2026 04:26
@gayanMatch
Copy link
Contributor Author

gayanMatch commented Jan 9, 2026

Some aditional taks:

  • Rename the file SpriteSheetUVNode.js -> SpriteSheetUV.js and update the TSL.js reference
  • Remove the export SpriteSheetUVNode of Nodes.js file

@sunag Fixed!

@Mugen87 Mugen87 changed the title refactor: class to tsl function and fix bug SpriteSheetUVNode: Transform the TSL function and fix countNode access. Jan 9, 2026
@Mugen87 Mugen87 changed the title SpriteSheetUVNode: Transform the TSL function and fix countNode access. SpriteSheetUVNode: Transform to TSL function and fix countNode access. Jan 9, 2026
@Mugen87 Mugen87 merged commit 8485acc into mrdoob:dev Jan 9, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SpriteSheetUVNode invalid countNode type

3 participants