Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The project won't work #2

Closed
spencer17x opened this issue Jul 1, 2023 · 16 comments
Closed

The project won't work #2

spencer17x opened this issue Jul 1, 2023 · 16 comments
Assignees

Comments

@spencer17x
Copy link

I cloned this project, but after executing the readme, the project reported an error and did not work properly.
The same goes for npm packages

@noname0310
Copy link
Owner

Please tell me the details of the error with the code

@spencer17x
Copy link
Author

When I run, I get the following error
image

@noname0310
Copy link
Owner

pmx and vmd files are required. Due to licensing issues, the assets are not included in the source.

@spencer17x
Copy link
Author

@noname0310
Copy link
Owner

You must load vmd with VmdLoader.

Aren't you using BvmdLoader?

@spencer17x
Copy link
Author

I used the vmdloader to load the vmd, but did not use the bvmdloader

@spencer17x
Copy link
Author

So is bvmd necessary?

@noname0310
Copy link
Owner

bvmd is optional. And I think it's a CORS problem. Please host the static files locally and give them a try.

@spencer17x
Copy link
Author

No, I had the same problem with it locally, you can download it and test it

@noname0310
Copy link
Owner

There is not enough information to know the cause

@spencer17x
Copy link
Author

You can use https://a-cdn.qbox.net/test/models/vmd/wavefile_v2.vmd for testing

@noname0310
Copy link
Owner

I fixed it now, so you can use the 0.5.0 version.

@spencer17x
Copy link
Author

How to make pmx file execute vmd animation, I tested seems not to work

@noname0310
Copy link
Owner

If you could show me the code, I might be able to identify the problem.

@spencer17x
Copy link
Author

spencer17x commented Jul 2, 2023

const pmxLoader = new PmxLoader();
SceneLoader.RegisterPlugin(pmxLoader);
const model = await SceneLoader.ImportMeshAsync(
'',
'/models/pmx/[MODELS] Lovesick girls ver.1/[LSG] Jennie (Miku) ver.1.pmx',
'',
).then((result) => result.meshes[0]);
console.log('model', model);
const vmdLoader = new VmdLoader(scene);
const modelMotion = await vmdLoader.loadAsync("", "https://a-cdn.qbox.net/test/models/vmd/wavefile_v2.vmd");
const mmdRuntime = new MmdRuntime();
const mmdModel = mmdRuntime.createMmdModel(model);
mmdModel.addAnimation(modelMotion);
mmdModel.setAnimation("model_motion_1");
mmdRuntime.register(scene);

@noname0310
Copy link
Owner

const pmxLoader = new PmxLoader();
SceneLoader.RegisterPlugin(pmxLoader);
const model = await SceneLoader.ImportMeshAsync(
  '',
  '/models/pmx/[MODELS] Lovesick girls ver.1/[LSG] Jennie (Miku) ver.1.pmx',
  '',
).then((result) => result.meshes[0]);
console.log('model', model);
const vmdLoader = new VmdLoader(scene);
const modelMotion = await vmdLoader.loadAsync("model_motion_1", "https://a-cdn.qbox.net/test/models/vmd/wavefile_v2.vmd");
const mmdRuntime = new MmdRuntime();
const mmdModel = mmdRuntime.createMmdModel(model);
mmdModel.addAnimation(modelMotion);
mmdModel.setAnimation("model_motion_1");
mmdRuntime.register(scene);
mmdRuntime.playAnimation();

It should be work

@noname0310 noname0310 self-assigned this Jul 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants