aWeirdo

Members
  • Content count

    529
  • Joined

  • Last visited

  • Days Won

    6

aWeirdo last won the day on December 18 2017

aWeirdo had the most liked content!

2 Followers

About aWeirdo

Profile Information

  • Gender
    Male
  • Location
    Denmark

Recent Profile Visitors

2,518 profile views
  1. What's next?

    Hi @Deltakosh If i may suggest some additions to the Babylon GUI; Dropdown/Select, Because who can't use a dropdown menu Slider isVertical option, Because.. it would be nice. Stackpanel overflow scrolling(..slider) when a predefined width or height is set and exceeded (depending on whether the panel is horizontal or vertical) (or a new 'overflowPanel'?) Being able to predefine height's & width's while the contents are dynamic is a widely used feature when designing GUI's Cheers
  2. Where are stored advancedDynamicTexture ?

    Hi @AnnaBruel It is stored in the variable you create for it. E.g. advancedTexture; var advancedTexture = BABYLON.GUI.AdvancedDynamicTexture... If you want it to be scene.something you can also do; scene.myGuiVariable = BABYLON.GUI.AdvancedDynamicTexture...
  3. Particles dispose

    Hi @negrant You could as you also mentioned clone the texture, Another option is to create your own dispose function, copy/paste the particleSystem.prototype.dispose function from core babylon.js file and remove the part which dispose the texture. A third option would be to not dispose them, keep the particleSystems in an array, simply stop() the particleSystems when they should end, and reuse, re-position/etc, and start().
  4. Hi @Shb I made this some time ago; http://playground.babylonjs.com/#S3U25D I used to have a topic about FoW, but i can't find it anymore.
  5. Empty screenshot

    Odd, works fine for me http://playground.babylonjs.com/#8P4VBC#5
  6. Empty screenshot

    If same size as canvas, you can also just do canvas.toDataURL() var test = document.createElement('img'); test.src = renderCanvas.toDataURL("image/png"); document.body.appendChild(test);
  7. Text with border or bold

    Hi @pichou Here's another method using context.strokeText, it does however require overwriting the _drawText function. https://www.babylonjs-playground.com/#XCPP9Y#410 BABYLON.GUI.TextBlock.prototype._drawText = function (text, textWidth, y, context) { var width = this._currentMeasure.width; var x = 0; switch (this._textHorizontalAlignment) { case BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT: x = 0; break; case BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_RIGHT: x = width - textWidth; break; case BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_CENTER: x = (width - textWidth) / 2; break; } if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) { context.shadowColor = this.shadowColor; context.shadowBlur = this.shadowBlur; context.shadowOffsetX = this.shadowOffsetX; context.shadowOffsetY = this.shadowOffsetY; } if(this.drawOutline){ context.strokeStyle = (this.outlineColor ? this.outlineColor : "black"); context.lineWidth = (this.outlineWidth ? this.outlineWidth : 5); context.strokeText(text, this._currentMeasure.left + x, y); } context.fillText(text, this._currentMeasure.left + x, y); }; var text1 = new BABYLON.GUI.TextBlock(); text1.text = "Hello world"; text1.color = "white"; text1.fontSize = 24; text1.drawOutline = true; text1.outlineColor = "black"; text1.outlineWidth = 4;
  8. Change GUI button image

    Hi @AB95, That button is made of an GUI image and a GUI textblock. https://github.com/BabylonJS/Babylon.js/blob/b215e22829e182a4fd6cdce8b81a9a6bf44f07cb/dist/preview release/gui/babylon.gui.js#L3823 ( image being child no. 0 ) GUI.Image has a "source" property. https://github.com/BabylonJS/Babylon.js/blob/b215e22829e182a4fd6cdce8b81a9a6bf44f07cb/dist/preview release/gui/babylon.gui.js#L3545 TL;DR: button.children[0].source = newImageUrlOrBase64String;
  9. You have to update the direction, as it changes when the particle system/emitter moves. http://www.babylonjs-playground.com/#1UGDQC#23 http://www.babylonjs-playground.com/#1UGDQC#24
  10. Multiple Animation from same Skeleton

    Possible? Yes. Supported? Not that i know off. You would have to write a custom "beginAnimation" function and only animate the bones you wish to target with each animation.
  11. Render 2D background

    you can also use a BABYLON.Layer new BABYLON.Layer("myBackground", "textures/grass.jpg", scene, true); http://playground.babylonjs.com/#SY1R8P Edit; @MarianG beat me to it
  12. Help! Safari bug!

    Hi @BlackMojito If the error is caused by texture being non-power-of-2, try using CLAMP_ADDRESSMODE; I can't say for sure it'll work, but it might. material.diffuseTexture.wrapU = BABYLON.Texture.CLAMP_ADDRESSMODE; material.diffuseTexture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;
  13. Mesh.lookAt

    Only thing that changed is that if the mesh is not already using rotationQuarternion, mesh.lookAt will apply mesh.rotation. Previously, it would silently overwrite mesh.rotation and apply mesh.rotationQuarternion, rendering further changes to mesh.rotation to do nothing, and incase the dev was unaware of this, cause confusion.
  14. Mesh.lookAt

    In newer versions of babylonJs (3.0+ i think) mesh.lookAt only uses rotationQuaternion if mesh is already using it