Git Product home page Git Product logo

Comments (4)

guansss avatar guansss commented on May 20, 2024

The path ../web_modules/pixi-live2d-display.js is strange, as it would typically be node_modules/pixi-live2d-display/lib/index.js. I'm wondering how you used this module, could you provide more information?

from pixi-live2d-display.

yeemachine avatar yeemachine commented on May 20, 2024

I'm currently using Rollup/Snowpack to bundle atm. Here's how im importing. which seems to work this way, compared to how pixi gets imported.

import { Application } from '@pixi/app';
import { Ticker, TickerPlugin } from '@pixi/ticker';
import { Renderer } from '@pixi/core';
import { InteractionManager } from '@pixi/interaction';

import Live2D_Display from 'pixi-live2d-display';
const {Live2DModel} = Live2D_Display

which actually still gets me this error

pixi-live2d-display.js:28405 Uncaught (in promise) TypeError: (intermediate value).add(...).load(...).on is not a function
pixi-live2d-display.js:28405 Uncaught (in promise) TypeError: r.on is not a function

Though I did a quick search on the second problem might needing some semicolons?

from pixi-live2d-display.

guansss avatar guansss commented on May 20, 2024

Alright, I realized that "strange" path was generated by Snowpack.

The first problem seems to be an incompatibility between Snowpack and commonjs modules, there's a related issue with possible solutions. I will consider releasing both the commonjs module and ES module in the future.

And for the second, it's because Pixi has suddenly obsoleted the EventEmitter mixin of PIXI.Loader in v5.3.0, which made the on() method no longer available. The solution is either use a Pixi version lower than 5.3.0, or wait for the next release of this project, which has removed the dependency of PIXI.Loader.

from pixi-live2d-display.

yeemachine avatar yeemachine commented on May 20, 2024

Thanks! yup. Updating PIXI to 5.2.4 worked.

from pixi-live2d-display.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.