Leaderboard


Popular Content

Showing content with the highest reputation on 11/01/14 in all areas

  1. 1 point
    Subjects in the title. For those who bashed their head against their keyboard figuring this out (like myself) here it is, buried in the (very readable) source. Phaser.Keyboard.A Phaser.Keyboard.C Phaser.Keyboard.D Phaser.Keyboard.E Phaser.Keyboard.F Phaser.Keyboard.G Phaser.Keyboard.H Phaser.Keyboard.I Phaser.Keyboard.J Phaser.Keyboard.K Phaser.Keyboard.L Phaser.Keyboard.M Phaser.Keyboard.N Phaser.Keyboard.O Phaser.Keyboard.P Phaser.Keyboard.Q Phaser.Keyboard.R Phaser.Keyboard.S Phaser.Keyboard.T Phaser.Keyboard.U Phaser.Keyboard.V Phaser.Keyboard.W Phaser.Keyboard.X Phaser.Keyboard.Y Phaser.Keyboard.Z Phaser.Keyboard.ZERO Phaser.Keyboard.ONE Phaser.Keyboard.TWO Phaser.Keyboard.THREE Phaser.Keyboard.FOUR Phaser.Keyboard.FIVE Phaser.Keyboard.SIX Phaser.Keyboard.SEVEN Phaser.Keyboard.EIGHT Phaser.Keyboard.NINE Phaser.Keyboard.NUMPAD_0 Phaser.Keyboard.NUMPAD_1 Phaser.Keyboard.NUMPAD_2 Phaser.Keyboard.NUMPAD_3 Phaser.Keyboard.NUMPAD_4 Phaser.Keyboard.NUMPAD_5 Phaser.Keyboard.NUMPAD_6 Phaser.Keyboard.NUMPAD_7 Phaser.Keyboard.NUMPAD_8 Phaser.Keyboard.NUMPAD_9 Phaser.Keyboard.NUMPAD_MULTIPLY Phaser.Keyboard.NUMPAD_ADD Phaser.Keyboard.NUMPAD_ENTER Phaser.Keyboard.NUMPAD_SUBTRACT Phaser.Keyboard.NUMPAD_DECIMAL Phaser.Keyboard.NUMPAD_DIVIDE Phaser.Keyboard.F1 Phaser.Keyboard.F2 Phaser.Keyboard.F3 Phaser.Keyboard.F4 Phaser.Keyboard.F5 Phaser.Keyboard.F6 Phaser.Keyboard.F7 Phaser.Keyboard.F8 Phaser.Keyboard.F9 Phaser.Keyboard.F10 Phaser.Keyboard.F11 Phaser.Keyboard.F12; Phaser.Keyboard.F13 Phaser.Keyboard.F14 Phaser.Keyboard.F15 Phaser.Keyboard.COLON Phaser.Keyboard.EQUALS Phaser.Keyboard.UNDERSCORE Phaser.Keyboard.QUESTION_MARK Phaser.Keyboard.TILDE Phaser.Keyboard.OPEN_BRACKET Phaser.Keyboard.BACKWARD_SLASH Phaser.Keyboard.CLOSED_BRACKET Phaser.Keyboard.QUOTES Phaser.Keyboard.BACKSPACE Phaser.Keyboard.TAB Phaser.Keyboard.CLEAR Phaser.Keyboard.ENTER Phaser.Keyboard.SHIFT Phaser.Keyboard.CONTROL Phaser.Keyboard.ALT Phaser.Keyboard.CAPS_LOCK Phaser.Keyboard.ESC Phaser.Keyboard.SPACEBAR Phaser.Keyboard.PAGE_UP Phaser.Keyboard.PAGE_DOWN Phaser.Keyboard.END Phaser.Keyboard.HOME Phaser.Keyboard.LEFT Phaser.Keyboard.UP Phaser.Keyboard.RIGHT Phaser.Keyboard.DOWN Phaser.Keyboard.INSERT Phaser.Keyboard.DELETE Phaser.Keyboard.HELP Phaser.Keyboard.NUM_LOCK Phaser.Keyboard.PLUS Phaser.Keyboard.MINUS
  2. 1 point
    Good catch, I already know what is causing the issue. I will fix this later this day.
  3. 1 point
  4. 1 point
    Fishrock123

    The Phaser 3 Wishlist Thread :)

    I wouldn't aim for ES6 until it stably lands in all the Major browsers. If possible, I would like Phaser 3 to contain a massive api re-thinking to using objects for both options when creating / configuring things, events, any maybe other non-super-performance-critical things. Think constructors: // oldnew Phaser.Game(800, 600, Phaser.AUTO, 'canvas', null, false, true)// proposednew Phaser.Game({ width : 800 , height : 600 , renderer : Phaser.AUTO , domID : 'canvas' , antialias : true})// for those of you who prefer more traditional js stylingnew Phaser.Game({ width: 800, height: 600, renderer: Phaser.AUTO, domID: 'canvas', antialias: true})This would help to keep code verbose and readable, while only making people pass the options that they need. Think events: // taken from the loader events example// none of us actually remember this param orderfunction fileComplete(progress, cacheKey, success, totalLoaded, totalFiles) { text.setText("File Complete: " + progress + "% - " + totalLoaded + " out of " + totalFiles) var newImage = game.add.image(x, y, cacheKey) // stuff}// more in line with native js eventsfunction fileComplete(event) { text.setText("File Complete: " + event.progress + "% - " + event.totalLoaded + " out of " + event.totalFiles) var newImage = game.add.image(x, y, event.cacheKey) // stuff} In addition, HDPI support would be very nice, though I think that belongs in PIXI. Text renders awfully in canvas on my Retina display. :/
  5. 1 point
    It's a bit of a hack but you could treat it as a texture atlas and generate the JSON data object part of the atlas yourself, feed it into the game.load.atlasJSONArray function as the last parameter (atlasData) and have it work as needed. The other way (and probably the better and more 'correct' way) would be to use BitmapData objects and copy parts of the full image to these as needed using the copyPixels function.
  6. 1 point
    Chris

    Import files and data (JSON parser)

    You cannot directly load and parse a JSON text file at the moment. To load any text file, just call game.load.text('someData', '/my/file.json');Do this inside the preload() method of any state. To access the JSON data after the text file has been loaded, you can call: var jsonData = JSON.parse(game.cache.getText('someData'));BUT! You have to make sure that the data has been loaded already, so do it OUTSIDE the preload() method of a state. The best place would be the create() method of the state. You could also apply a little "hack", to convert the text only once to JSON and then write it back to the cache: game.cache._text['someData'] = JSON.parse(game.cache.getText('someData'));This way, you can just directly access the JSON object that has been transported in the text file anywhere in your game, for example if you had a "inventory" property inside the JSON object: var inventory = game.cache.getText('someData').inventory;I don't know why the loader class currently has no explicit method to load and parse JSON files. Maybe it will be added in a later version.