Jump to content

Search the Community

Showing results for tags 'spritemanager'.

  • 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 5 results

  1. I'm in search for a way to dynamically change a sprite. Let's say I have a spriteManager with spriteA.png. and a sprite called sprite linked to said manager. I want to change the sprite/spriteManager to spriteB.png. This might happen once every frame, so simply creating a new sprite won't quite cut it. I see the manager has a sprites array as well as a _spriteTexture, but I don't see any function that allows me to change these. Am I missing something that would allow me to do this, or are there issues I should be aware of?
  2. Hey everyone I just have two simple question I cannot find an answer too. First Question: The SpriteManager needs a capacity parameter, but why does it need this? Why can I not change this during runtime? What does it actually do (in the background) (except for just not showing any sprites that exceed the capacity)? Does it hurt performance at all if I just put a 'crazy' high number? Can the manager not just +1 the capacity by itself in the background whenever an instance of the sprite is created? It just seems so odd that I have to give it a number and I feel like I'm missing something here. My second question is how to exactly use the AssetsManager for sprites. The documentation gives this example: var imageTask = assetsManager.addImageTask("image task", "img.jpg"); imageTask.onSuccess = function(task) { console.log(task.image.width); } But that doesn't explain how to use it with a Sprite since the task returns an image, and a SpriteManager only requires an image url. Thank you in advance!
  3. Hi, Setting a renderingGroupId on a spritemanager breaks the highlightlayer feature for the whole scene. I have this bug in 2.5, but it is reproducible in the current playground: spritemanager without renderingGroupId, everything is fine (see picture 1): http://www.babylonjs-playground.com/#E3D3Y#6 Result as expected: setting a renderingGroupId on the sprite manager, all highlights break and are now filling out the highlighted objects: http://www.babylonjs-playground.com/#E3D3Y#5 The only change is line 114 is now commented in, the result is the unexpected and undesired filling of all highlighted objects: Note: This is not about the interaction of sprites with the highlight layer (the whole sprite in front of a highlighted object gets colored) this is only about highlights breaking that are no where near the sprites when the spritemanager has a renderingGroupId. Any workaround would be great. For my game I need some effect sprites to render above all 3d objects and I also use the highlight layer - this is not possible right now.
  4. Hello, I am fairly new to babylonjs, but I found this weird thing where on each layer sprites will run at different speeds. to see this in action simply change the layermask from LAYER_FG to LAYER_BG. var spriteManagerPlayer = new BABYLON.SpriteManager("playerManager", "textures/player.png", 2, 64, scene); spriteManagerPlayer.layerMask = LAYER_FG; http://www.babylonjs-playground.com/#CSAVV#1 from playing around with it, it seems the foreground is running 3 times as fast, you can see it demonstrated in this code: http://www.babylonjs-playground.com/#CSAVV#2 I also noticed that when I leave the tab and come back in chrome they start to get out of sync, but if you stay on the page, they will stay in sync. is this expected? I am a bit confused as to why this may be. Right now I am experimenting with 2d and 3d plains on different layers, I am also going to be experimenting with renderGroups. So forgive the messy code. Thanks,
  5. Hi folks! I'm getting the error "Uncaught TypeError: Cannot read property '_size' of null" when creating a sprite manager and setting the scene.useDelayedTextureLoading flag to true. Example in PG: http://www.babylonjs-playground.com/#2IPMDX#2
×
×
  • Create New...