Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by GourmetGorilla

  1. Mat have you guys considered putting a gui on the front of pixi? It's brilliant but seems to be seriously underused. It could be the next flash.
  2. Thanks @crowbar that's great! It's working to resize the canvas, but not updating the size of my content - is this updating your content too?
  3. Trying to think through how to dynamically resizing pixi stage on window resize. I'm using the following the set the size of my stage to the window, it works fine (though it distorts the images, does not keep ratio). stageWidth = $(window).innerWidth(); stageHeight = $(window).innerHeight();console.log(stageWidth, stageHeight); // create an new instance of a pixi stage var stage = new PIXI.Stage(0xff00ff); var renderer = PIXI.autoDetectRenderer(stageWidth, stageHeight);But how do I extend this to update the stage size when the browser window is resized? I tried the following (with a
  4. I put a var on my renderer.view var mypixiStage = document.body.appendChild(renderer.view);and added the code suggested window.addEventListener("resize", mypixiStage.resizeToWindow.bind(mypixiStage));I'm getting the following error - any suggestions? Uncaught ReferenceError: MO5 is not defined(anonymous function) @ StageResizer.js:3
  5. 'myStageResizerInstance' - I'm confused by this, using renderer.view to scale, how do we create the instance you suggest? Here's how pixi does the renderer.view document.body.appendChild(renderer.view);
  6. . deleted post. (Don't know how to actually delete it, sorry!).
  7. GourmetGorilla


    So, a tween usually is triggered, it runs for it's duration and stops. but how do you tie a tween to the moving y position of a pixi.point tied to the mousescroll for instance? Not that it's triggered and executes till it's complete, but that the tween moves with the y of the mousescroll. Let say I have something like: TweenLite.to(element, 2, {scale:1.5, x:10, y:0, alpha:0});I could say if y == 400 run tween but it would just execute and be finished. But I want this tween to run from pixi.point.y 400 to 450, so not use a time element (currently 2sec), but two pixipoint y positions instead.
  8. Haha, got it, thanks for clarifying. When I reread the above, I see Hubert is just calling his container 'camera'. I just wondered if it had a camera whether it would help me. I'm trying to figure out how flashvhtml.com generated their scrollmap. http://flashvhtml.com/js/site/ScrollMap.js (but I asked about that somewhere else on this forum I think). Beyond the simple examples, some aspects of Pixi, or what people have done with it, are a lot to get my head around. o.O!
  9. What benefit does using the camera give us in this situation? Newbie question o.O
  10. Can anyone explain this file, how it was generated, what is was made with. How the sequence of 'position' and 'alpha' numbers are used, and how they relate to the scrollable feature of the site? http://flashvhtml.com/js/site/ScrollMap.js For instance: var rockets = {rockets:[{startFrame:0, endFrame:100, position:[1.15,5,3.14,2.25,10,3.14,3.3,15,3.14,4.3,20,3.14,5.3,25,3.14,6.25,30,3.13,7.15,35,3.13,8.05,40,3.13,8.9,45,3.13,9.75,50,3.13,10.55,53,3.13,11.35,54,3.13,12.15,53,3.13,12.9,50,3.13,13.65,45,3.13,14.4,38,3.13,15.1,29,3.13,15.8,18,3.13,16.5,5,3.13,17.2,-9.95,3.13,17.85,-26.
  11. Has anyone seen a deconstruction of flashvhtml.com? Similar to Petr Tichy's deconstruction of Sony's Be Moved site? https://ihatetomatoes.net/sonys-be-moved-website-deconstructed/
  12. Using Chrome Version 42.0.2311.152 (64-bit) on OSX Snow Leopard on a 2.66Ghz Quad Core Intel Xeon Mac Tower with NVIDIA GeForce GT 120 Graphics card. It worked fine then one day just stopped and looked like the above All the Phaser examples on their site look like this too. But everything works in Firefox. I just want to use Chrome for the js console at least How do I get this browser working again?
  13. Hey Mat, how was the file scrollMap.js generated on your awesome flashvhtml.com project?
  14. New to Pixi.js and JS OOP in general. The old super simple v2 asset loader looks like this (but doesn't work with pixi.js V3): var loader = new PIXI.AssetLoader(["images/cat.png"]);loader.onComplete = setup;loader.load();What's does the new V3 asset loader look like? Did the loaders for Atlas change too? What else changed in V3 where V2 code no longer works? Thanks, was pulling my hair out trying to do a tutorial, found out it was not working cause I had v2 code in the project with V3 pixi version grrr...
  15. Boo, cleared cache, it's still not working for me Any other suggestions? Thanks for checking though!
  16. In Chrome I'm seeing the following. Anyone else seeing this? here's the url: http://deepplanet.com/portfolio/folio/html5games/omshooter/ It's fine in Firefox - how can I fix this?
  17. I fixed it alien.checkWorldBounds = true; alien.events.onOutOfBounds.add(alienOut, this);
  18. hmmm... maybe because this is a sprite in a group, it needs to be written differently, so it knows it's talking about the sprite in the group? sprite.events.onOutOfBounds(this.outOfBoundsFunc, this);OutOfBoundsFunc = function() { ... do stuff};the sprite is 'alien' in a group called 'aliens'. How do I apply the above in this case?
  19. I was playing around with if I could use 'soft' to remove overlaps etc. But when I try the following I get the error: ReferenceError: soft is not defined sprite.destroy(soft);Is there a way to do this using destroy without killing the sprite? Maybe I'm not understanding 'soft'
  20. But how do you remove the overlap later on if you need to? If you have a bullet overlapping with a group, then when a single sprite of that group is shot you want to stop the overlap on that single sprite, how do you do that? Can you just deactivate the overlap somehow?
  21. well, I tried this. sprite.overlap.stop(null, true);It didn't work
  22. When I try that I get an error on my first line of code below: alien.events.onOutOfBounds is not a function. alien.events.onOutOfBounds(this.outOfBoundsFunc, this);OutOfBoundsFunc = function() { ... do stuff};'alien' is the sprite, 'aliens' is the group, if I change the first line to 'aliens' I get the error: aliens.events is undefined What am I doing wrong?
  • Create New...