Infinisecond

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. Infinisecond

    add/copy sprites to bitmapdata

    Still no luck with bmd.draw(sprite). But I did some digging in the Phaser examples and found this http://examples.phaser.io/_site/view_full.html?d=display&f=render%20texture%20trail.js&t=render%20texture%20trail&phaser_version=v2.0.7& so now my code looks like this texture = game.add.renderTexture(800, 800, 'mousetrail'); block = game.make.sprite(0, 0, 'blocks', 4); texture.renderXY(block, 50, 50, false); sprite = game.add.sprite(0,0,texture);and just for the heck of it I made this var emitter; var texture1; var texture2; var sprite1; var sprite2; function create() { game.stage.backgroundColor = '#2d2d2d'; texture1 = game.add.renderTexture(800, 800, 'mousetrail1'); texture2 = game.add.renderTexture(800, 800, 'mousetrail2'); emitter = game.make.emitter(0, 0, 200); emitter.makeParticles('crystal', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/*, 4, 6, 7*/]); emitter.minParticleSpeed.setTo(-70, -70); emitter.maxParticleSpeed.setTo(70, 70); emitter.setRotation(0, 0); emitter.setScale(1, 0, 1, 0, 7000); emitter.gravity = 40; emitter.start(false, 7000, 40); sprite1 = game.make.sprite(0,0,texture1); sprite2 = game.add.sprite(0,0,texture2); } function update() { texture1.renderXY(sprite2, 0,0, true); if (!game.input.activePointer.position.isZero()) { texture1.render(emitter, game.input.activePointer.position, false); } texture2.renderXY(sprite1, 0,0, true); }there's a picture of it below
  2. Infinisecond

    add/copy sprites to bitmapdata

    I'm trying to create a bitmapdata with a single frame from a spritesheet and I'm getting nothing I'm using this, bmd = game.add.bitmapData(800, 800); bmd.add(new Phaser.Sprite(game, 50, 50, 'blocks', 3)); sprite = game.add.sprite(0,0,bmd);but its showing nothing. Am doing something wrong? I tried copypixels aswell and still got nothing, I tried adding the sprite in advance, nothing. (I'm useing phaser 2.0.6) Thanks for the help in advance.