Skip to content

Commit

Permalink
pmx converter: support unsorted skeleton display
Browse files Browse the repository at this point in the history
  • Loading branch information
noname0310 committed May 30, 2024
1 parent 83d8922 commit dcc7b2d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/static/pmx_converter/main.bundle.js

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion src/Test/Scene/pmxConverterScene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import type { PmxLoader } from "@/Loader/pmxLoader";
import { SdefInjector } from "@/Loader/sdefInjector";
import { TextureAlphaChecker } from "@/Loader/textureAlphaChecker";
import type { MmdMesh } from "@/Runtime/mmdMesh";
import { OiComputeTransformInjector } from "@/Runtime/Util/oiComputeTransformInjector";

import type { ISceneBuilder } from "../baseRuntime";

Expand Down Expand Up @@ -149,7 +150,12 @@ export class SceneBuilder implements ISceneBuilder {
file,
scene,
(event) => engine.loadingUIText = `<br/><br/><br/>Loading (${file.name})... ${event.loaded}/${event.total} (${Math.floor(event.loaded * 100 / event.total)}%)`
).then(result => result.meshes[0] as MmdMesh);
).then(result => {
const mmdMesh = result.meshes[0] as MmdMesh;
OiComputeTransformInjector.OverrideComputeTransformMatrices(mmdMesh.metadata.skeleton!);
mmdMesh.metadata.skeleton?._markAsDirty();
return mmdMesh;
});
{
const meshes = mesh!.metadata.meshes;
for (let i = 0; i < meshes.length; ++i) {
Expand Down

0 comments on commit dcc7b2d

Please sign in to comment.