tasumta Posted March 31, 2020 Share Posted March 31, 2020 (edited) here's the code: let Sprite = PIXI.Sprite, loader = PIXI.loader, resources = PIXI.loader.resources; loader .add("assets/sprites.json") .load(setup); let uno; function setup() { sheet = resources["assets/sprites.json"]; uno = new PIXI.AnimatedSprite(sheet.animations["uno"]); app.stage.addChild(uno); } Edited March 31, 2020 by tasumta Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted March 31, 2020 Share Posted March 31, 2020 I guys it should be "sheet.spritesheet.animations" Its javascript, there are no types, only IDE intellisense. My recommendation - learn how to use debugger. Look for places where "undefined" was found. Without DevTools debugging, breakpoints, watches, profiling you wouldn't be able to make any production app. Easy fixes like that should be obvious. You dont have to remember all the pixi documentation and examples, and those docs also wil lie to you about some things - so you really should learn how to debug. tasumta 1 Quote Link to comment Share on other sites More sharing options...
tasumta Posted March 31, 2020 Author Share Posted March 31, 2020 thanks a lot ivan.popelyshev 1 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.