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

three.webgpu.js contains identically-named items "arrayNeedsUint32", "Uniform", and "UniformsGroup" that are also found in three.core.js #30404

Closed
PoseidonEnergy opened this issue Jan 26, 2025 · 1 comment · Fixed by #30408
Milestone

Comments

@PoseidonEnergy
Copy link
Contributor

PoseidonEnergy commented Jan 26, 2025

Description

three.core.js exports the following items:

arrayNeedsUint32
Uniform
UniformsGroup

three.webgpu.js exports the items listed above on behalf of three.core.js, but also redeclares them for its own use.

Was this intentional?

#############################################################################################

arrayNeedsUint32

three.core.js:

function arrayNeedsUint32( array ) {

three.webgpu.js:

https://github.com/mrdoob/three.js/blob/27a171511dc9b001641e0a97fe81b7a51d89ec14/build/three.webgpu.js#L24063

#############################################################################################

Uniform

three.core.js:

class Uniform {

three.webgpu.js:

https://github.com/mrdoob/three.js/blob/27a171511dc9b001641e0a97fe81b7a51d89ec14/build/three.webgpu.js#L39497

#############################################################################################

UniformsGroup

three.core.js:

class UniformsGroup extends EventDispatcher {

three.webgpu.js:

https://github.com/mrdoob/three.js/blob/27a171511dc9b001641e0a97fe81b7a51d89ec14/build/three.webgpu.js#L50559

#############################################################################################

Version

173dev

@Mugen87
Copy link
Collaborator

Mugen87 commented Jan 27, 2025

Was this intentional?

Yes. At least Uniform and UniformsGroup have a custom version for WebGPURenderer. I just wonder why arrayNeedsUint32() has been duplicated. I think this can be refactored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants