Problem with addon RoundedBoxGeometry in version r178

Hello

Today I downloaded the most recent version (r178) of threeJS and I found a problem with addon class RoundedBoxGeometry which didn’t show up in previous versions. One can see it here (look at the tiles of the puzzle):

Sliding Puzzle

I compared files RoundedBoxGeometry.js in versions r178 and r177. Based on that, I realized that if line 73 in r178 file:

super( width, height, depth, segments, segments, segments );

is replaced by this one:

super( 1, 1, 1, segments, segments, segments );

the problem gets solved.

So, I kindly ask if the above-mentioned problem is due to some bug in RoundedBoxGeometry.js or if I need to make some changes in the code of the puzzle in order to adapt it to this (and to future) versions of threeJS.

Thanks in advance.

The puzzle isn’t loading for me? Just getting a white screen…

no errors in the console.

Oh ok it finally loaded…
But upside down:

4x4 and upper puzzles load upside-down and with a awful look.

2 x 2 and 3 x 3 puzzles don’t load upside-down, but they look awful as well.

Now please try running it with version r177. You will notice that it will load and look fine.

can you set material.wireframe = true and post screenshots of the 2 versions ?

I don’t know how to run/switch your versions.

Will do so in a moment. Switching from mobile to notebook…

material.wireframe = true (r178):

material.wireframe = true (r177):

It should look like this (with material.wireframe = false):

It looks fine with version r177 and, I as wrote before, if in line 73 of file RoundedBoxGeometry.js one replaces super( width, height, depth, etc. ); with super ( 1, 1, 1, etc. ); (similar to previous versions of this class).

@Mugen87 is this a regression?

(related ?): RoundedBoxGeometry: add type, parameters and toJSON (#31340) · mrdoob/three.js@6b2f433 · GitHub

Looks like the super( constructor originally took 1,1,1 and then later roundrect deformed the vertices.. but that change is passing width/height/depth to the constructor instead?

Yes, this was a regression and is now fixed on dev. The next release r179 should restore the previous behavior.

thanks!! :slight_smile: