svatem1

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. svatem1

    fullScreenScaleMode on IOS

    Aah, necro.
  2. svatem1

    fullScreenScaleMode on IOS

    Check out https://caniuse.com/#feat=fullscreen namely the IOS Safari labeled column.
  3. svatem1

    changing image on which multiple sprites are based

    Thx again. Do you have anything specific in mind regarding the article you linked or it's just a result of generic "phaser multitexturing" google search? Because I'm (I mean - everybody is) fully capable of that (in fact I did some time ago and the result can be summarized as "setTexturePriority(keys) is a function that allows you to elevate multitexturing capability, keys are keys of Image objects in Phaser cache not bitmapData objects") and moreover the correct phrase to google was "phaser multitexturing bitmapdata".
  4. svatem1

    changing image on which multiple sprites are based

    Thanks, yeah, i know how to use basic JS to express what I want (and your example won't stand, generateTexture is asynchronous, which will complicate things if you want e.g. to extend Phaser.Sprite, imagine both a & b be both of that class and both call reRender() method that does what I've expressed). I'm interested merely in Phaser's internals. You linked a very good example. The one line in your example I'd like to find out either exists or not for my case is: bmd.dirty = true; Notice this one line will automagically make all sprites having bmd as texture to update themselves. The reason I'm not using bitmapData as underlying data structure for my sprites is: renderer.setTexturePriority(keys) keys -> keys inside imageCache. If I could elevate multitexturing capability with bitmapData I wouldn't bother converting it and I'd be updating my sprites with that one dirty flag. So this is also good question: can I somehow elevate multitexturing capabilities with bitmapData? Thx.
  5. Hi, I have image in cache on which multiple sprites are based like this: a = game.add.sprite(0, 0, "image"); b = game.add.sprite(0, 0, "image"); Now: I want to change the underlying image's data like e.g. this (notice the "image" as argument to generateTexture): game.cache.getBitmapData("somedata").generateTexture("image") This fails at runtime. According to what I've found out so far, I have to do it like this: game.cache.getBitmapData("somedata").generateTexture("image", function(texture) { a.loadTexture("image"); b.loadTexture("image"); }) The question is: is this achievable via more elegant way? The main problem I have with this is I have to keep track of every sprite that's based on "image", because this: game.cache.getBitmapData("somedata").generateTexture("image", function(texture) { a.loadTexture("image"); // b.loadTexture("image"); }); also fails at runtime. Isn't this somehow covered by what Phaser already offers? Thx in advance.