DylanD

Members
  • Content Count

    370
  • Joined

  • Last visited

About DylanD

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. DylanD

    Fog Density

    Hey, im trying to clean up my code, and put shaders in files, and then organize then into a shaders folder. I tried putting this. fogdeclaration into a .fx file just like the rest of my shaders. However it doesn't get instantiated like the other shaders i believe, so it doesn't directly call this shader file. Any ideas about how i could keep this shader in its own file, without over writing the original shader permanently. Just calling this one...
  2. DylanD

    Caching Resources

    So it would seem i can only cache texture files with the engine. So for browser caching, as long as i make a .manifest file i can cache anything right? ie, Sound files Models Shaders(not sure if they are even worth caching since they are small but still curious) Can these^ also be cached with a simple manifest file? Thanks for the help you guys !!
  3. Sorry everyone, i was unable to participate. School and work was a bit too much Maybe next time
  4. DylanD

    Caching Resources

    Thanks!, thats pretty cool. So as long as i dont have multiple engines or switch engines I can use engine caching. So are only texture contents cached by the engine? if so is there a way i could force the engine to cache other resources like sounds and models, or would that be done by the browser caching? Also if i had to use browser caching i would just need to add "$name.manifest" to my resources folder and add this to each .manifest { "version" : 1, "enableSceneOffline" : true, "enableTexturesOffline" : true } Then whenever i try to load the resource it should load instantly or at least super fast. Sorry im very curious about this as i try to make my game a bit faster with loading, by caching. Thanks!
  5. DylanD

    Caching Resources

    To add on. In my game i have tested, loading textures into a array, then also in the same scene, loading the texture again and when i load it the second time its almost instant, making me think it is already cached. Not sure where i read that it worked like that though. But it correlates with my testing.
  6. DylanD

    Caching Resources

    Hey everyone, I was curious if my understanding of how babylonjs and resources work with caching. The way i understand it works is that if I load a resource it becomes cached until that page is reloaded/cache is emptied. I think that it works this way for all of the resource types I am using (sound files, scene files/models, textures, and images). However I looked into it a bit and read this doc https://doc.babylonjs.com/how_to/caching_resources_in_indexeddb Which makes me think that the resources are only cached if I declare it so in the manifest files. However this is an older version of babylonjs so maybe it is outdated? I also read this Which makes me a bit more confused, however it seems that the manifest is for .babylons only, or could i put that on all the files? So I was wondering is my understanding of how babylonjs caches, incorrect? How does babylonjs cache things (sound files, scene files/models, textures, and images)? If so do i just need to add a .manifest file to each resource I want cache? Any Ideas?
  7. DylanD

    Babylonjs Fps capped at 60fps

    Oh cool I found it, for anyone interested its in the scene.debugLayer.show() under the stats tab, its shows potential fps. Thats super cool!!! Thanks everyone!!
  8. Hi everyone, I was wondering, i use this to display the fps of my game: this.fpsText.text = "" + Game.engine.getFps().toFixed() + " fps"; I was wondering is the fps capped because i never see anything higher than 60fps, if it is capped, can i un cap it for testing? Any ideas?
  9. DylanD

    Passing textures to CubeTexture

    Alright the wild goose chase is over, i had depreciated code, which was i had an older function freeze the material the texture is on, to save performace(i thought that would help, from what i understand it would but not very much...) once i took out that material.freeze() it started working perfectly! Sorry everyone for the goose chase Thanks everyone for helping though!
  10. DylanD

    Passing textures to CubeTexture

    is there a way i could do something like : new texture = texture().then( new texture2 = texture() ); so that after the first textures are loaded then second textures load?
  11. DylanD

    Passing textures to CubeTexture

    Hey not sure if this helps you guys understand the problem, but what is really strange is that this only happens on the first go. Let me explain So i have a customization menu and they choose which texture they wear, it has a preview of the texture on your character, which works great, in the background the game scene is being loaded, after they choose a texture they can hit start then the game scene is shown but the texture does not load(although i have tested it and it tries to apply the texture but im guessing the texture hasn't loaded in time), then you lose and go back to the menu. After that first sequence the textures are applied fine if you do the same sequence again, my hypothesis is that by then they are cache somehow, so no need for new loading. Just gotta get it working for the first sequence. I believe this is just a problem with how i have my code structured but if you have any ideas let me know. Thanks, DD
  12. DylanD

    Blocks become fuzzy?

    This worked great thanks @trevordev
  13. DylanD

    registerOnPhysicsCollide With Any

    couldnt you just provide an array of all the meshes in the scene then. Use scene.meshes?? to make it would for each one just scene.meshes.foreach(mesh)=>{ if(mesh.body.registerOnPhysicsCollide(scene.meshes)){ console.log(mesh.name); } } sorry this was kind of rush but why not that, seems general enough, right? edit: i know you didnt want to put an array in but this is the next best thing right? gotta reference them somehow edit2: there is probably a better way i just dont know of
  14. aw i was hoping there was going to be an easier way o well i thought these might be the only ways, thanks!
  15. DylanD

    Passing textures to CubeTexture

    Hey i just finished up trying to put all of the textures in my sceneManager class but i still get the problem of i cant switch the scene of the texture. You say it should work though eh? Maybe im doing something else wrong. Could it be that they are both trying to access the files at the same time and the second one cannot access it becuase the first one is currently accessing it(therefor it just doesnt load it at all)? Also i can try to make a PG but im not sure i have the time to create it. Gotta go to school soon