Gijs

Members
  • Content Count

    141
  • Joined

  • Last visited

Everything posted by Gijs

  1. I'm switching to BABYLON.GUI as well, and I've made a context menu: http://www.babylonjs-playground.com/#HG17VN#1 It's in its early stages, but it's good enough for my project ATM. In my project, the menu it is tied to a custom event system and color scheme, so in this demo the colors are hard-coded, and the clicked button only prints to the console. I'm also interested in what's out there! Edit: The TypeScript source: https://pastebin.com/raw/1zp6fyb4
  2. Extruding the bottom: http://www.babylonjs-playground.com/#XBGEQ#9 It's a bit hacky
  3. From the Three.js demo: https://threejs.org/examples/#webgl_modifier_tessellation I took the vertex shader from the source: https://github.com/mrdoob/three.js/blob/master/examples/webgl_modifier_tessellation.html Put it in CYOS, downloaded it, then put it in this playground: https://www.babylonjs-playground.com/#72A98G I don't know how to do this properly, but it's something.
  4. I've never done that, but can you maybe see anything of interest in F12 > Console or F12 > Network?
  5. @SpaceToast If you hover over the setVerticesData function in the playground, you will see that the data can be either a number array or a Float32 array
  6. @bulisor You have "BABYLON.DOUBLESIDE", which should be "BABYLON.Mesh.DOUBLESIDE"
  7. Better late than never: turns out the problem here is that the skull doesn't have its UVs set: http://www.babylonjs-playground.com/#XA6F3#10
  8. You have var scene = createScene; //Call the createScene function Which should be var scene = createScene(); //Call the createScene function I got it to work that way
  9. Hi all, I updated to the latest preview version of BJS, and now the camera panning behaves differently: What I want: http://playground.babylonjs.com/indexstable#MA1ADL Current behavior: http://playground.babylonjs.com/#MA1ADL What has changed? Thanks
  10. @Sebavan Ok, thanks for your help. It's the preview version, so things like that are to be expected of course.
  11. Hi, I've replaced a previous 3.1-alpha with the latest preview, and now when I use a registerBeforeRender to set the alpha and beta rotation values, it allows you to rotate the camera before the render, and after the rotation is reset. Now: http://playground.babylonjs.com/#RWSSKV Then (August 17): http://playground.babylonjs.com/indexstable#RWSSKV Is it a bug? Thanks.
  12. Never mind, I found the solution after all: canvas.addEventListener('mousedown', function(event){ event.target.setCapture(); }); Thanks for your input @jerome The events are only still received when you keep holding down the mouse button as you move outside the canvas Edit: apparently it's not a cross-browser thing, so you can't use the snippet above like that
  13. Hi, On Firefox the camera stops rotating when your pointer leaves the canvas: http://playground.babylonjs.com/ Which doesn't happen on Edge, IE, Chrome or Opera
  14. Have you tried different settings on your webcam? I see no problems with the camera that's built into my laptop.
  15. Did you make it with TypeScript? Because when I upgraded, the code checker showed me which parts I had to rewrite. I also had some hacks in place that worked for 2.5 only, so that's also something you could check. Finally, the 3.0 version is being updated all the time, so you could check if an earlier version does work: https://github.com/BabylonJS/Babylon.js/commits/master/dist/preview release/babylon.js
  16. Hi, For #1 I got it working by replacing the loops with direct calculations of the positions: http://www.babylonjs-playground.com/#SUXKHY#25 Maybe those loops also caused #3 by never ending, though that wouldn't make the memory usage high. Good luck with your project
  17. Extrusions are the best! They're simple but powerful. I agree with what said in this thread about Blender, and I'm actually making a 3D modelling application that uses extrusions.
  18. I seems that the bounding box is only calculated for the parent mesh and its submeshes, so for the children you have to do it manually. But you can put the code away in a function you replace refreshBoundingInfo with: http://www.babylonjs-playground.com/#QVIDL9#3
  19. You could add the child bounding boxes together like this: http://www.babylonjs-playground.com/#QVIDL9#1
  20. I know of @davrous' "very ugly UI": https://gamedevelopment.tutsplus.com/tutorials/webgl-physics-and-collision-detection-using-babylonjs-and-oimojs--cms-24114 It's at #6
  21. Hi, you can do this with BABYLON.WeirdSpriteManager: https://www.babylonjs-playground.com/#2A9U5V#1 The manager has the function pickSpritePixel, which takes a child sprite as argument, and returns the pixel under the pointer. It does this by putting a plane mesh at the sprite position with the right rotation and scale, then pick that mesh to get the image (x, y) coordinates, and then get the pixel from the imageData like in your jsfiddle. It uses its own copy of the sprite image. Edit: Here is the typescript source: WeirdSpriteManager.ts Edit 2: With the mesh not pickable, and Math.round instead of Math.floor in the pickSpritePixel function: https://www.babylonjs-playground.com/#2A9U5V#2 WeirdSpriteManager.ts
  22. @jerome @NasimiAsl Maybe a shader can be made that uses a pixel from either the front or back image depending on whether a vertex normal is facing the camera