Jump to content

Search the Community

Showing results for tags 'phaser-framework'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 2 results

  1. I would like to highlight differences from one video frame to the next using Phaser's built in video streaming library. So functionally, as a person moves their body, the changes from one frame to the next will be highlighted and all of the unchanging image parts will become black. The important code snippet currently looks like: function create() { video = game.add.video(); video.onAccess.add(camAllowed, this); video.startMediaStream();} function camAllowed() { bmd = game.add.bitmapData(video.width, video.height); bmd.addToWorld(game.world.centerX, game.world.centerY, 0.5, 0.5); game.time.events.loop(50, takeSnapshot, this);}; function takeSnapshot() { video.grab(false,1,'difference');//params clear true or false, alpha, blend mode bmd.draw(video.snapshot);} The code almost works, but causes flashing video even for the parts of the scene that do not change from moment to moment. I played around with different globalCompositeOperation operations, many of which were trippy, not none which had the intended effect of making a completely black image except for where there was something different from the preceding to current frame.
  2. Hello!!! I have a code, just a button created via Phaser: //---------------------------------Boot module.exports = { init: function() { closeButton = game.add.button(w/1.47, h/1.272, 'close', this.closeProfile, this); closeButton.fixedToCamera = true; closeButton.inputEnabled = true; }, closeProfile: function() { alert('asd') close.key = 'img/profile/closePress.png'; } }; Module.exports - this is Browserify in the main file there is another code: //---------------------------------Main window.game = new Phaser.Game((h > w) ? h : w, (h > w) ? w : h, Phaser.CANVAS, 'game', {render:render}); var ship; var cursors; var sun1; var rc; var space; var profile; var closeButton, holdLeft, holdRight, avaProfile; game.state.add('Boot', require('./states/boot.js')); game.state.add('Play', require('./states/play.js')); game.state.start('Boot'); And button doesn't call a function at all I really can't get it! I will appreciate your help Thanks in advacne!
×
×
  • Create New...