• Content count

  • Joined

  • Last visited

  1. Get object fired the event

    Great, that just works... I've seen a lot of answers out there that were a lot longer and did not work...
  2. How do do right click on a Container

    I have a simpler solution. In the event handler that cancels the contextmenu event on the canvas, I also set a variable window.wasRightClick this.graphics.view.addEventListener('contextmenu', (e) => { window.wasRightClick=true; e.preventDefault(); }); In the handler fired on mouse down on a sprite or other object, I can now test for it. At the end of this event I reset the variable to false. this.click = function(event) { event.stopPropagation(); if (window.wasRightClick) acGame.showInventory(this.acParent); else acGame.showCommands(this.acParent); window.wasRightClick=false; return false; }
  3. Get object fired the event

    When I attach an event to a sprite, like sprint.on('click',clickresponse) I would like to know which of the hundreds of sprites fired this event. But somehow the event does not contain a pointer to the sprite that fired the event. I would have thought currentTarget would be a good candidate to test for it, but that one seems to be null allways. How to figure this out?
  4. WebP

    @Ivan, what does this post got to do with WebP?
  5. WebP

    Does anyone know where to find the fileformats PixiJS supports? Or is the support simply the same as the browser support for file formats? To be more specific: does PixiJS support the WebP fileformat? It would be great if it did, since WebP offers better and higher compression than PNG and JPG.
  6. Documentation

    Sorry, found it, just move up a folder level and the download zip button is there...
  7. Documentation

    did you manage to download them? I can't find an option to zip them, and downloading them one after an other will be quite some work...
  8. How about lights in Phaser

    https://stackoverflow.com/questions/25942955/phaser-pixi-normal-map-filter-not-working These are a number of these posts...
  9. How about lights in Phaser

    I am trying to find out about the implementation of lights and normal- or bumpmapping in Phaser. I found some older posts here and on other sites about dynamic lighting and bump mapping but if I interpret the information given, the lighting features have been experimented with in earlier features, but were discarded in later versions. Can anyone tell me if dynamic lighting and bumpmapping is on the official Phaser roadmap and when to expect it. I know that Pixijs has a special branch that has lighting features and there is a pixijs plugin for lights. Does anyone know of a Phaser plugin for this?
  10. That helps... for the PG example... http://www.babylonjs-playground.com/index2_5.html#460BZJ#17
  11. @sable, Fastcheck does not help me here. I need accuracy when picking UV coordinates. Fastcheck does picking using only the bounding box. And what do you mean with the double render - I have one scene.render() in the code...
  12. Ok, but in fact I am doing the same: the texture.update is my example is also in it's own loop... And you leave out Picking here, which seems to be the biggest problem...
  13. Do you base that conclusion, that Picking can be called every frame, on this example? There is a difference: this scene has a lot of objects with each just a few faces. My scene only has one object with a lot of faces. That may be significant. I tested it and put the picking function in the draw function so it is now executed every frame. Frame rate when doing nothing drops from 60FPS to around 40FPS. http://www.babylonjs-playground.com/#460BZJ#13 But in a sence you are right, it is not the only problem... I tried switching of the texture.update() (which fired every 10th second) and the FPS went back to 60: http://www.babylonjs-playground.com/#460BZJ#14
  14. Got it: http://www.babylonjs-playground.com/#460BZJ#12 On my machine the frame rate of this example is around 8FPS.