Having more than 8 morph targets

Hello everyone !

So I wanted to have more than 8 morph target to be activated for certain kinds of meshes as it is an requirement. I know that threejs limits the number of morph targets to 8 which is also the limit of webg2 .

Then I came across this unique solution by Francois-Laberge-Bose :

I tried to replicate the example online but it seems not to work as intended :

Locally I tried to change the webgl_morphtargets_horse.html from threejs examples and convert it for the sake of the demo :
webgl_morphtargets_horse.html (9.5 KB)

on this this geometry
cube.glb (11.3 KB)

but it seems to split the geometry in triangles as you can see in the wireframe view :

can anybody please tell whats wrong with the script ?


I think I found the solution to this cube at least right now , you need to set the shader with the exact number of morph influences you have instead of what the author set (63)

In the above case of cube it would be 10