guansss / pixi-live2d-display

A PixiJS plugin to display Live2D models of any kind.
https://guansss.github.io/pixi-live2d-display/
MIT License
823 stars 125 forks source link

Help me plz #55

Closed IntroEvEivie closed 2 years ago

IntroEvEivie commented 2 years ago

A bit of a stupid question. I need to pass the URL value from the button to the asynchronous main function to display this model. How to replace models in view mode?

guansss commented 2 years ago

Just add a parameter to the main function.

async function main (url) {
    const model = await Live2DModel.from(url);

    // ...
}

main("model.json");
IntroEvEivie commented 2 years ago

Just add a parameter to the main function.

async function main (url) {
    const model = await Live2DModel.from(url);

    // ...
}

main("model.json");

Thx. Give me your discord if possible

guansss commented 2 years ago

Nope, I don't have a discord.