Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Xeltalliv/simple3D: fix bugs with transform direction block, model im…
…porting, invalid mesh drawing (#1480) - If `transform direction from to` has to directly use 1 existing matrix instead of creating a new one, it ends up zero-ing out 13th-15th (12th-14th) elements of it which are responsible for offset. This block wasn't meant to have any side-effects on the input data. [Example](https://turbowarp.org/editor?project_url=https://xeltalliv.github.io/simple3d-extension-examples/projects/manualTransforms/controllerSimple.sb3) b1af7db - Mesh without vertex positions is considered valid for drawing and trying to draw it throws an error. [Example](https://turbowarp.org/editor?project_url=https://xeltalliv.github.io/simple3d-extension-examples/projects/meshMistakes/mistakeNoPositions.sb3) a4c328f - In OBJ importer, material colors do not work, because extension is looking for `Ka` (ambient) tags instead of `Kd` (diffuse) tags. [Example](https://turbowarp.org/editor?project_url=https://xeltalliv.github.io/simple3d-extension-examples/projects/import/import4.sb3) b130924 - In OFF importer, default value for red was missing. b130924 - In OFF importer, colors are not parsed correctly. They can be provided as integers 0 to 255 or as floats 0.0 to 1.0, but currently everything is treated as floats. That is why OFF [example from the Wikipedia](https://en.wikipedia.org/wiki/OFF_(file_format)#Example) doesn't work. Can be tested in [this](https://turbowarp.org/editor?project_url=https://xeltalliv.github.io/simple3d-extension-examples/projects/import/import4.sb3). 8343bd0 - import from file transform is incorrect, because it doesn't copy values before modifying them, so ends up using already processed values mid-computation for the remaining ones. In the past I had a reduced copy of m4 library in the WebWorker, so it worked correctly, but then I incorrectly simplified it and only tested scaling which still worked correctly. [Example](https://turbowarp.org/editor?project_url=https://xeltalliv.github.io/simple3d-extension-examples/projects/import/importTransform.sb3) d008f02 The example projects weren't made for this PR and are the part of the new documentation.
- Loading branch information