Jump to content

dittofittoe

Members
  • Content Count

    7
  • Joined

  • Last visited

  1. The demos dont seem to be working for me. Edit nvm got it working,t y OK, I now get the pixel data returned as an array, how do I check for any collision with a RGB value greather than 1? (Black area is walkable, white i a block).
  2. I get errors in the console for both examples.
  3. Thanks I took a look, Nothing was loading for me for the second example excapt a white square.
  4. I was actually looking into this yesterday night too. PUXI was the first one I came across. The route im going through now is just rendering the UI as a sprite and having mouse clicke events and collision detection with the button positions.
  5. Is there anything in Pixi.js where I can read the colour data of a texture or sprite? I have a large map and instead of drawing collision lines, I want to just use an identical map but with 2 colours (magenta, alpha clear) and when the player collides with that colour pixel, it counts as a collision.
  6. Solved: Dont play an animation inside of a loop unless you create a run once function. I rewrote the script and drew the sprite to the canvas OUTSIDE of the loop. I was able to manipulate the values inside the ticker loop and it still updated (JS defies all knowledge I have of procedural programming).
  7. I have been trying to wrap my head around getting an animation from a json spritesheet to play. (attached video of the result) Firstly when i create the sprite, it only renders to the screen when it is in a loop. Loop: ////Loop m_canvas.ticker.add(delta => loop(delta)); ///// Update loop function function loop(delta){ m_canvas.stage.removeChildren(); m_map.Draw(loader, m_canvas,m_map.x,m_map.y); m_player.Draw(loader, m_canvas, m_player.x, m_player.y); } Now when i call the animated sprite.play() nothing happens. I tinkered the speed, no cha
×
×
  • Create New...