Jump to content

Search the Community

Showing results for tags 'assetsmanager'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 19 results

  1. Hi, would like to propose some possible improvements for AssetsManager there are multiple tasks that can be added to manager, but I think would be nice to have general `addTask(task: AbstractAssetTask)` so custom tasks could be created and added to manager if needed. right now response in onSuccess can be just string or ArrayBuffer but I think it would be great to get back request object so there would be more control what to do on success. minor but I didnt found way to add mime types to loader, but that can be fixed on server side as well, so server always serves
  2. Hello, maybe this frequently required about preview dialog. like when shows character preview in a dialog or popup ui with new canvas. but i couldn't find the related post. in my case, not a full screen game it's web application. so, required multiple scenes for a dialog. BABYLONJS AssetsManager constructor needs a scene. and can not reuse these loaded textures with another scene in normal. when reused, it shows error like 'bindTexture: object not from this context' Is that possible to reuse loaded textures in another canvas with new scene? I
  3. Hello! I looked through the documentation but wasn't quite sure if I missed how I might load textures for my model. Perhaps I could do this using the TextureAssetTask or ImageAssetTask? Basically, I was wondering if there was a way to accomplish this: BABYLON.SceneLoader.ImportMesh("space_frig", "Assets/", "gate.babylon", scene, function (newMeshes, particleSystems) { meshPlayer = newMeshes[0]; meshPlayer.position.y = 2; //meshPlayer.receiveShadows = true; //shadowGenerator.getShadowMap().renderList.push(meshPlayer);
  4. https://www.babylonjs-playground.com/#B2S8JX Here is the demo. Both assetsManager.onProgress and assetsManager.onFinish stop working as the document described now. https://doc.babylonjs.com/how_to/how_to_use_assetsmanager#manager-callbacks-and-observables Is it a bug, or we need to update the document now? Sorry, they are working correctly. It's my fault to ignore the "loadingUIText". I expect that assetsManager.onFinish = function(tasks) will give the processed tasks.
  5. I've made a mesh in Blender and I've exported it to a .babylon file. I've also tried exporting the mesh as a .obj file but the problem persisted. I've checked my network tab in Chrome (on Mac OS btw) and I can see that the file has been downloaded so it's not a wrong path. Also, I get errors that the system couldn't find the .manifest file but I've found that that's not the issue. This is the error: Unable to import meshes from ./testObject.babylon: 0 This is the code I've been using: var loader = new BABYLON.AssetsManager(scene); house = loader.addMeshTask("pillar", "", "./", "
  6. Hello 3D guru, According to the docs, we can load objects from *.babylon files this way: var assetsManager = new BABYLON.AssetsManager(scene); var meshTask = assetsManager.addMeshTask("skull task", "", "scenes/", "skull.babylon"); ... assetsManager.load(); Imagine, that *.babylon file contains many objects and I load these files dynamically, one by one. Later I want to delete/dispose all objects loaded from the specific file - how do I do that? Is there a built in way? Probably I could store all mesh names in a dictionary where keys are *.babylon file names, then in a loop g
  7. Hello, Below is a PG for a scene I'm having problems with: https://playground.babylonjs.com/#X6KVNY I have a list of material definitions in JSON which I load with assetsManager, once this is loaded.. I then load a .babylon file. We then loop through each of the materials in the JSON file and if the material name matches that in the scene, it then change that material. Problem is, the scene displays before all the textures have loaded.. more noticable if you throttle the speed. In an ideal world, the spinning loading screen would show right up to the point that everyt
  8. Hey I'd would like know when the texture is loaded on PBR glTF workflow, I did this code : assetsManager = new BABYLON.AssetsManager(scene); var textureTask = assetsManager.addTextureTask("albedoTexture texture", "assets/test/lambert1_baseColor.jpg", true, false); albedoTextureTask.onSuccess = function(task) { console.log(task.texture); meshes.material.albedoTexture = task.texture; } assetsManager.load(); The material assignation does nothing here thanks
  9. Hello, I'm looking for a way to change a loaded mesh texture after it been loaded, without fetching new obj file. for example - I have the same chair in different textures, when the user does something I want to change the chair's texture. I can create a different .mtl file for each variant, but is it possible to load just the .mtl file after the obj already been loaded? Thanks, Tomer.
  10. I'm new to babylonJS, so please forgive if this question is stupid. I'd like to use the playground and import an OBJ from my computer into the scene. I've looked at the documentation, but it seems to indicate I need a special loader. The sample of which does not work on my computer/Chrome or IE browser (i.e. https://www.babylonjs-playground.com/#28YUR5) And the other way seems to be to just use playground and use Assetsmanager. But the forums seem to indicate that Assetsmanager is for loading scenes or .babylon file and/or you "simply cant' do that, the OBJ must be on the web")
  11. What's the difference between assetsManager and ImportMesh for importing custom meshes? thanks very much
  12. 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 missi
  13. Hello, I have a problem with get information how many percent of all mesh/textures were loaded, while I use AssetsManager. I have seen a similar topic, but there SceneLoader is used. Is it possible to get those information about loading progress, while I use AssetsManager?
  14. Hi, this is my code: for(var t = 0; t < edificios_texto.length; t++){ var loader = new BABYLON.AssetsManager(scene); //console.log(edificios_texto[n]); var edificio = loader.addMeshTask(t, "", "http://localhost:8080/modelos2/"+edificios_texto[t]+"/",edificios_texto[t]+".obj"); edificio.onSuccess = function (task) { //console.log(task.loadedMeshes.length); console.log(edificio.name); task.loadedMeshes.forEach(function(b) { b.scaling = new BABYLON.Vector3(5,5, 5); b.rotation.y = Math.PI; // cambiar las X var vertex_data = BABYLON.VertexD
  15. Hello, I have a small problem that I do not understand with addMeshTask(). If I do this, it does not work. (I have no error in the console and I get out the value of 'key') // Not Work $.getJSON(global.game.nameProjet, function(json) { $.each(json, function (key, val) { addTask(key); }); }); function addTask(key) { global.game.meshTask = global.game.assetsManager.addMeshTask(key, "", "../../scene/"+key+"/", key+".babylon"); global.game.meshTask.onSuccess = function(task) { task.loadedMeshes[0].position = new BABYLON.Vector3(0, 0, 0); } } But if I do this, it
  16. I try to clone the same mesh, but for some reason, the mesh is cloned once. How to clone the same mesh many? var loader = new BABYLON.AssetsManager(scene); dom1mesh = loader.addMeshTask('dom1', "", "/static/game/dom1/", "dom2.babylon"); mesh = new BABYLON.Mesh.CreateSphere(name, 8, 2, scene); mesh.position = new BABYLON.Vector3( 5, 1, 5); dom1mesh.onSuccess = function (task) { var nm = task.loadedMeshes[0]; nm.position = new BABYLON.Vector3(10, 1, 10); nm.parent = mesh; }; mesh1 = BABYLON.Mesh.CreateSphere(name, 8, 2, scene); mesh1.position = new BABYLON.Vector3( 15, 1,
  17. Hi, Im new to Babylon.js but it seems fun, I have a simple question about the code below. It imports models and places them in random positions, whats the most efficient way to re-randomise the positions every second? I tried with setTimeout(function(){ window.location.reload(1); }, 5000); but this was a bit heavy, is there a way to just call the randomise bit again. Also is this the most efficient way to load multiple models, the hardware I'm targeting is slow so anything I can do to get a bit more performance is best- maybe I should clone the objects? Thanks <!DOCTYPE html>&l
  18. I want to clone the already loaded model and inserted into another location on the map. At the end of the time. var loader = new BABYLON.AssetsManager(scene);var taskMesh = loader.addMeshTask('t3', "", "game/t3/", "t.babylon");taskMesh.onSuccess = function (task) { task.loadedMeshes[0].position = new BABYLON.Vector3(0, 0, 0); task.loadedMeshes[0].parent = camera;};I have not found. Maybe something like this? taskMesh.loadedMeshes[0].clone();
  19. Hello, I would like to use the assetsManager to load asynchronously a BABYLON.CubeTexture, is it possible ? Thank you for your responses ! Jérémy
  • Create New...