Jump to content

Galious

Members
  • Content Count

    5
  • Joined

  • Last visited

  • Days Won

    1
  1. Thank you! I am using PixiJS with NextJS, exporting the pixi code to a different module and compiling it to ES5 works fine now.
  2. Hello! When extending the sprite class and using it instead of adding the default sprite the performance becomes really bad. // Using this reduces the performance a lot after 5k+ sprites: class Car extends Sprite { constructor() { super(); this.texture = Texture.from("/car.png"); this.interactive = true; this.anchor.set(0.5, 0.5); //... other manipulation } } app.stage.addChild(new Car()) // compared to this (nearly no performance loss even after 50k+ sprites): function addCar(app) { const sprite = new Sprite() sprite.texture = Texture.from("/car.png");
  3. I had the same problem, I figured out that the problem was that the ticker was not the same like the app uses. (The default from pixi-viewport is Pixi.Ticker.shared) So the answer was to set the ticker with the right one: const viewport = new Viewport({ worldWidth: 50000, worldHeight: 50000, screenHeight: 720, screenWidth: 1280, ticker: app.ticker, });
  4. I found the answer! https://github.com/pixijs/pixi.js/issues/4727 The stage itself has no bounds to add click events. 😃
  5. Hello, I am currently trying out pixi but can't handle all pointer events. If I use pointermove it works like expected, but every other event from the InteractionManager does not work. I tried it with different devices. That is my code which I am using: <!DOCTYPE html> <html> <body> <script src="https://cdnjs.cloudflare.com/ajax/libs/pixi.js/5.1.3/pixi.min.js"></script> <script> var app = new PIXI.Application(window.innerWidth, window.innerHeight); document.body.appendChild(app.view); app.start(); app.st
×
×
  • Create New...