Jump to content

Search the Community

Showing results for tags 'capacity'.

  • 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. 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!
  2. Hey, I was wandering if anyone knew the code to set the size of sprites to however many pixels as currently no matter what the cell size or image size they are all formatting to the same height which is very unhelpful for my project! Looking for any working solution so I can have height accurate sprites, my two pieces of code being used to position and call in my sprites are as follows; var spriteManagerstaffs = new BABYLON.SpriteManager("peopleManager", "Images/TinyPNG/David.png", 1, 1010, scene); //finds file, sets capacity to 1, cellsize to 1010<-- (does nothing) and adds to scene var staff = new BABYLON.Sprite("staff", spriteManagerstaffs); staff.position.x = -1.4; staff.position.z = 0; staff.isPickable = true; //Sets the position within my 3d environment
×
×
  • Create New...