bubamara

Members
  • Content count

    153
  • Joined

  • Last visited

2 Followers

About bubamara

  • Rank
    Advanced Member

Contact Methods

  • Website URL
    http://www.enea.sk
  • Twitter
    EneaGames

Profile Information

  • Gender
    Not Telling
  • Location
    Slovakia

Recent Profile Visitors

1,122 profile views
  1. Animate drawing a stroke along a bezier path

    you see no animation, right? you have to call animate(); first or use app's ticker instead
  2. problems with pointertap event

    yes, it's a bug : https://github.com/pixijs/pixi.js/issues/4374 workaround : store object on which pointerdown was fired and compare it with object on which pointertap was fired. If they don't match, it wasn't real pointertap
  3. question about concatenation

    nice way var l = []; for (var i=0; i < 2; i++) { l.push( { a : i } ); } console.log(l[0], l[1]); in this case, this === window -> better not pollute it, but you can use it on your own object without worries for (var i=0; i < 2; i++) { this[ 'l' + i ] = { a : i }; } console.log(this); console.log(this.l0, this.l1); nasty way for (var i=0; i < 2; i++) { eval( 'l' + i + ' = { a : i } ' ); } console.log(l0, l1);
  4. Performance

    there is also raised issue on github https://github.com/pixijs/pixi.js/issues/4371 for me personaly iOS11 works fine on several devices while some others are experiencding FPS drops
  5. Strange Text Outlines? - Trying To Polish Beta1...

    http://pixijs.download/release/docs/PIXI.TextStyle.html The lineJoin property sets the type of corner created, it can resolve spiked text issues. Default is 'miter' (creates a sharp corner). try 'round'
  6. Drag from point which was clicked

    agree, examples should be more friendly to newcomers
  7. Drag from point which was clicked

    the reason why bunny pops to cursor position is bunny's anchor point. You need to store offset and use it while dragging bunny function onDragStart(event) { // store a reference to the data // the reason for this is because of multitouch // we want to track the movement of this particular touch this.data = event.data; this.alpha = 0.5; this.dragging = true; this.offX = this.x - this.data.getLocalPosition(this.parent).x; this.offY = this.y - this.data.getLocalPosition(this.parent).y; } function onDragMove() { if (this.dragging) { var newPosition = this.data.getLocalPosition(this.parent); this.x = newPosition.x + this.offX; this.y = newPosition.y + this.offY; } }
  8. Confused About Pre-Loading PNG Image Sprites...

    it comes from PIXI.loader : http://pixijs.download/dev/docs/PIXI.loaders.Loader.html PIXI.loader .add("images/treasureHunter.json") .load(setup); function setup(loader, resources) { var id = resources["images/treasureHunter.json"].textures; // object with generated textures (dungeon.png, door.png, ..) console.log(id); }
  9. Procedural Generated 2D Starfield

    one or two layers of tiling sprites could do the trick. you can move background layer slowly than the layer above it -> nice parallax effect
  10. iOS soft fullscreen. How?

    use the damn brim it does everything for you
  11. iOS soft fullscreen. How?

    minimal-ui viewport property isn't there since iOS8 don't know what the game you linked is using, but there is : https://github.com/gajus/brim which you can use
  12. Number of draw call

    there is an extension for chrome WebGL inspector: https://chrome.google.com/webstore/detail/webgl-inspector/ogkcjmbhnfmlnielkjhedpcjomeaghda?hl=en it can show you used textures, buffers, programs and also draw calls
  13. I'm starting a new documented journey in the world of games.

    Glad you didn't give up, fingers crossed!
  14. Strange Sprite Outline Filter Artifact

    try increase filter.padding = 10;
  15. Pixi Sprite children z-index

    no, children are positioned above their parent. wrap gun & bunny into container var app = new PIXI.Application(800, 600, {backgroundColor : 0x1099bb}); document.body.appendChild(app.view); var bunnyContainer = new PIXI.Container(); bunnyContainer.x = app.renderer.width / 2; bunnyContainer.y = app.renderer.height / 2; app.stage.addChild(bunnyContainer); // gun var gun = PIXI.Sprite.fromImage('required/assets/basics/bunny.png') gun.tint = 0xFF0000; bunnyContainer.addChild(gun); // create a new Sprite from an image path var bunny = PIXI.Sprite.fromImage('required/assets/basics/bunny.png') bunny.anchor.set(0.5); bunnyContainer.addChild(bunny); // Listen for animate update app.ticker.add(function(delta) { bunnyContainer.rotation += 0.03 * delta; // just for fun, let's rotate mr rabbit a little // delta is 1 if running at 100% performance // creates frame-independent tranformation });