IDEST Posted May 14, 2018 Share Posted May 14, 2018 Hello I am learning PixiJS with webpack right now. I have two files but maleGoblin.js and game.js. maleGoblin.js import * as PIXI from 'pixi.js'; import { Spine } from 'pixi-spine'; export default class Grytva extends PIXI.Sprite { constructor() { super(); PIXI.loader .add('pixie','Pixie.json') .load(); } } game.js import * as PIXI from 'pixi.js'; import BG from '../../assets/backgroundimage.jpg'; import Grytva from '../displayObjects/characters/maleGoblin'; export default class Game extends PIXI.Container { constructor(app) { super(); this.app = app; this.gameBackground(); this.createGrytva(); } createGrytva() { const grytva = new Grytva(); this.grytva = grytva; this.addChild(grytva.sprite); } gameBackground() { this.background = PIXI.Sprite.fromImage(BG); this.addChild(this.background); } } I knew how to load Pixie.json file and now I should use PIXI.spine.Spine() in gameGoblin.js but I tried different ways but I didnt succeed.What should I do is my question? Quote Link to comment Share on other sites More sharing options...
jonforum Posted May 15, 2018 Share Posted May 15, 2018 sorry , am not understand what your trying to do ! If you really want help, take 5 to 10 minutes to write something understandable, I do not understand your code upper. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.