Jump to content

Search the Community

Showing results for tags 'object import'.

  • 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 1 result

  1. Hi,I have hard times with asynchronous mesh loading. I need to apply textures to meshes right after meshes are ready. I'm importing in this way: var loader = new BABYLON.AssetsManager(scene); someLoader = loader.addMeshTask("roulette", "", "", "rouletteTable.obj"); anotherLoader =loader.addMeshTask("chip", "", "", "blackChip.obj"); someLoader.onSuccess = function (t) { t.loadedMeshes.forEach(function (m) { tableMeshArr.push(m); }); tableMeshArr[0].material = materialWheel; tableMeshArr[1].material = materialRoulette; tableMeshArr[2].material = materialBlack; }; anotherLoader.onSuccess = function (t) { t.loadedMeshes.forEach(function (m) { chip=m; chip.material=materialChips; }); }; loader.onFinish = applyObjTextures; loader.load(); var applyObjTextures = function () { tableMeshArr[0].material = materialWheel; tableMeshArr[1].material = materialRoulette; tableMeshArr[2].material = materialBlack; chip.material = materialChips; }; But it applies only to tableMeshArr[0] mesh. onFinish Callback works right after finishing importing first mesh, but I need a callback when all meshes are loaded.
×
×
  • Create New...