Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by aWeirdo

  1. @Hugo M If you're open to other solutions https://forum.babylonjs.com/t/tiled-ground-using-sps-and-spritesheet-textureatlas-updated/260?u=aweirdo
  2. I have a feeling @Deltakosh doesn't have DB access here, but if he can get a DB dump/backup file of the babylonJs forums, it would make it easier to either transfer (would still require quite a lot of manual editing) or make some kind of knowledge-base page. other solution could be a raw HTML grab hosted on github
  3. looks a bit like stackoverflow It'll take some getting used to.. but i like it.
  4. Hi @BritneyWatch Sphere1.scaling = new BABYLON.Vector3(0, 5, 0); works but it sets X and Z values to 0, so i expect your sphere will disappear. Scaling multiplies the size of a mesh, multiply by 0 equals 0 To keep X and Z at 100% size and set Y to 500% size you should instead do new BABYLON.Vector3(1, 5, 1);
  5. Hi again, @i_tejas19 Afraid I don't use blender, ( do you have a .babylon file ? ), but I suggest adding it after import Here's an example: https://www.babylonjs-playground.com/#XCPP9Y#751 Side-note, this one only uses a single ActionManager Short snippet: var labelActionManager = new BABYLON.ActionManager(scene); labelActionManager.registerAction( pointerOverAction); labelActionManager.registerAction( pointerOutAction); function addLabelToMesh(mesh) { if(mesh.name){ // Do some check if we should add label to this mesh.. mesh.actionManager = la
  6. Here's the same one Wingnut posted, but re-using the same rectangle & textblock https://www.babylonjs-playground.com/#XCPP9Y#748 -- Edit -- Another one with a few more optimations, generic displayRect1 function, using the mesh's name or id as text source as example and re-using babylon actions aswell. https://www.babylonjs-playground.com/#XCPP9Y#750
  7. @Nodragem ResizeToFit resizes the textblock, not the fontsize, perhaps it should be changed to do both. https://www.babylonjs-playground.com/#XCPP9Y#736 ( uncomment line 44 )
  8. @bzor Do you mean Drop & Drag, with your mouse? Edit; Oh holy necro.. 😂
  9. Hi @Nodragem You can use fontSize = "100%" to fit fontSize to container, however, it only works for height, so width will still overflow if text is too long.
  10. Well.. 404 (not found), Generally, path or file name is incorrect, or you are not using a webserver ( fileloader requires a webserver, apache, etc )
  11. Hi @MinZe Sprites are already being rendered on top of meshes. https://www.babylonjs-playground.com/#UBXKZZ
  12. Hi, please read the error again. it's not "addControl" which is undefined, it's "advancedTexture" which hasn't been created.
  13. Hi.. It's a javascript function declared in the PG, not a part of babylonJs GUI. function createGUITexture(planeName, planeSize, planePosition) { var plane = BABYLON.Mesh.CreatePlane(planeName, planeSize, scene); plane.position = planePosition; var GUITexture = BABYLON.GUI.AdvancedDynamicTexture.CreateForMesh(plane); return { GUITexture: GUITexture, plane: plane}; }
  14. Hi Deltakosh should be around by tomorrow. As mentioned, this happens because of a loop in calls, Here's a temporary fix for until it's fixed; Accessing absolutePosition directly, instead of getAbsolutePosition() function which forces computeWorldMatrix. Include the snippet in your code, after the main babylonJs file. BABYLON.ArcRotateCamera.prototype._getTargetPosition = function() { if (this._targetHost && this._targetHost.absolutePosition) { var e = this._targetHost.absolutePosition; this._targetBoundingCenter ? e.addToRef(this._targetBoundingC
  15. Here's one in HTML that just makes a black background container and a video element. https://playground.babylonjs.com/#GC1S7W#1 (You may need to click run before the video works, issue with video elements need interaction.) side-note: PG with timeout( for extra video time ) will bug when clicking run again before the timeout finishes (and video is hidden).
  16. I can confirm, 1'st save-> # accessing #1 fails 2'nd save -> #1 accessing #2 works 3'rd save -> #3 accessing #4 works I can't see any changes to the save code, so perhaps something changed on the server.
  17. ./assets/myGltfFile.gltf ./assets/textureUsedBy_myGltfFile.png "you must have the textures side by side with your gltf" -> same folder
  18. @TomaszFurca Looks like the pointerUp event is 'counted' as a pointerMove. > Observers still work, only scene.onPointerUp seems to be affected. > clickInfo.ignore is always true. (should be false for onPointerUp..) http://playground.babylonjs.com/#UM43F8#1 @Deltakosh I have to run so i'll tag this for you. scene -> attachControl -> _initClickEvent -> always sets "clickInfo.ignore = true" before callback is called. See line 177 -> http://playground.babylonjs.com/#UM43F8#5 ( commented it out, and onPointerUp works again ) Is there a reason
  19. Hi, Why do you have a seperate camera for the GUI ?
  20. What i understood from the beginning of this thread, was code hot swapping, maually re-writing or changing code and live execution, thus the confusion as i was expecting a different image path or name (to be written in to the code), not a different image at same path/name ^^ But either way, i think it's pretty cool
  21. @brianzinn true, if it has the same path & name, caching will mostlikely mess with it, but speaking of hot-swapping code, i expect the path/name to be changed to a different image file, not the image file to be replaced 😛 And as i mentioned, i don't see the file name being changed anywhere, the logs even output the same file name, if you update imageA to imageA.. it might reload it, but it'll still look the same heh I'm afraid i don't use webpack or TS so i can only comment on what i read in the code. Let us know what you find
  22. I don't think caching should affect anything when you're creating a new texture with a different image file. However, What are you changing the image file to? It seems unclear from your code where you write-in the file change. Aswell as the logs you posted, they say the file is the same as the standard one, e.g. dungeons_and_flagons3.jpg // MazeLoader this.floorMaterial.diffuseTexture = new BABYLON.Texture("./assets/2D/dungeons_and_flagons3.jpg", scene); // AcceptChange this._maze.floorMaterial.diffuseTexture = new BABYLON.Texture("./assets/2D/dungeons_and_flagons3.jpg",
  • Create New...