aWeirdo

Members
  • Content count

    612
  • Joined

  • Last visited

  • Days Won

    7

aWeirdo last won the day on March 10

aWeirdo had the most liked content!

2 Followers

About aWeirdo

  • Rank
    Advanced Member

Profile Information

  • Gender
    Male
  • Location
    Denmark

Recent Profile Visitors

3,229 profile views
  1. aWeirdo

    Imported File Hierarchy

    Hi @benforreal You are correct all meshes loaded can be accessed from a single 'flat' array in the loader's callback, however, parent/child relations should still be there. Example, If your file has three meshes & mesh 0 is parent of both mesh 1 & mesh 2; // Callback var parent = newMeshes[0] // parent var childA = newMeshes[1] // child var childB = newMeshes[2] // child // But parent ._children[0] should return childA parent ._children[1] should return childB aswell as the array returned by parent.getChildMeshes() should contain childA & childB If the parent/child relations isn't there, then there's (mostlikely) something wrong in the obj file.
  2. aWeirdo

    GUI feature request - Mask

    Hi @Sebavan & @royibernthal Isn't this the same? ( or almost ) https://github.com/BabylonJS/Babylon.js/issues/3897
  3. aWeirdo

    Sprite Sheets that are not Uniform

    I don't know, sorry, but sounds like it might be worth researching. i hope you figured it out
  4. aWeirdo

    Sprite Sheets that are not Uniform

    often, spritesheet editing/creation tools have json exports.. (they map the sprites as you add them to the sheet) but i don't think you can automaticly create them from an already finished spritesheet, it simply would have no way of telling where one starts and the next ends.
  5. aWeirdo

    Sprite Sheets that are not Uniform

    Oh i thought you ment a spritesheet where different sprites have different sizes? like there might be a man 100x100 and then a tree 100x200
  6. aWeirdo

    Sprite Sheets that are not Uniform

    not without a json mapping or something of the sprites, something needs to tell where each sprite start & end uniform sprite sheets can be done like that because you just add the sprite size each time you need to find the next one.
  7. aWeirdo

    Defend

    Very cool
  8. Hi @Vorion It's GUI.Image, not GUI.GUIImage https://www.babylonjs-playground.com/#K60448#23 Woops, happens when you don't read everything 😅
  9. aWeirdo

    Texture hasAlpha performance issue

    Ahh typeScript.. i think.. that would require you adding it to the baseTexture source.. I don't know if you can add properties from outside the object in typeScript. public set hasAlphaOverwrite(value: boolean) { if (this._hasAlpha === value) { return; } this._hasAlpha = value; } public get hasAlphaOverwrite(): boolean { return this._hasAlpha; } If casting to any also does the trick, then that would probably be better. Have a nice day
  10. aWeirdo

    Texture hasAlpha performance issue

    Hi, If you don't need the shader recompile, you can also add another prototype that doesn't call markAllMaterialsAsDirty http://www.babylonjs-playground.com/#9FMJCS#1 tests; 3085, 2970, 3156 And even if you do need the recompile, you should be able to just call it after the last one, to only call markAllMaterialsAsDirty once. http://www.babylonjs-playground.com/#9FMJCS#2 tests; 3432, 3462, 3486
  11. Hi @BuzyGear Please see docs for buttons; https://doc.babylonjs.com/how_to/gui#button and; http://doc.babylonjs.com/api/classes/babylon.gui.button#pointerdownanimation TL:DR; _this.pointerEnterAnimation = function () { _this.alpha -= 0.1; }; _this.pointerOutAnimation = function () { _this.alpha += 0.1; }; _this.pointerDownAnimation = function () { _this.scaleX -= 0.05; _this.scaleY -= 0.05; }; _this.pointerUpAnimation = function () { _this.scaleX += 0.05; _this.scaleY += 0.05; }; You can simply overwrite those functions, '_this' being your button name/variable ofcourse Have a nice saturday!
  12. I'm not sure i understand the need, seems like reinventing the wheel? no? observers can do everything you want, as you write the logic. Observers simply tell you, "this key was pressed" "this key was released" http://playground.babylonjs.com/#J7HA4U and here with a "keyIndex", space = "jump", w = "forward" http://playground.babylonjs.com/#J7HA4U#2 The json idea is nice, but a simple extension based on keyboard observers seems more reasonable... I might be misunderstanding something..
  13. aWeirdo

    Change GUI button image

    Hi @DylanD It's hard to tell without an example, the code seems fine.
  14. aWeirdo

    Occlusion query not working

    Seems to be a bug in 3.3 alpha; http://www.babylonjs-playground.com/indexStable.html#QDAZ80#3 Edit; @Deltakosh It looks like the code is being moved or something? https://github.com/BabylonJS/Babylon.js/commit/d7faa73d11d2ca3e751e58912c31ef217b260ae1
  15. aWeirdo

    BabylonJS render slower thanThreeJS?

    Dat SPS. 422k boxes; https://jsfiddle.net/6ng7usmj/49/ 60 fps on my pc, even when moving the camera, yeah nah, i don't see the issue.