Closed nevermemo closed 9 months ago
Wow, nice! Sorry for the late response, I'm quite busy right now. I'll take a look at this soon!
@nevermemo Do you have any gltf models with this feature so we can add some tests for it?
@jnsmalm You can use AnimatedMorphCube-meshquant.glb @goldenratio shared in the issue. Model renders fine without the changes but animation weights are normalized so cube stretches to almost infinity. For normalized primitives, I used testModelBlank.glb.zip. It is one of my experimentations using gltfpack. Vertexes render just fine but texture wrap is way off without the changes. I used Model Viewer to compare and make sure it works as intended.
@nevermemo Thanks for adding this! I'll create a new release after the weekend.
You are welcome. I have been using pixi3d for a while but I never had gone deep into the source code before. It is such an ingenious way of integrating 3d into pixijs using already existing tools and implementing many more. I really love your work and it is a pleasure to contribute to such an open source project.
This PR adds support for KHR_mesh_quantization extension. To handle geometry data, it retains normalized information for gltfAttribute and passes it to associated buffer. This does not work for animations directly so they are de-normalized after interpolations.
This PR partially addresses issue https://github.com/jnsmalm/pixi3d/issues/89
PS: I added a change in
serve/src/index.js
so served page can be used with PixiJS DevTools.