Gijs

Members
  • Content Count

    141
  • Joined

  • Last visited

Everything posted by Gijs

  1. 2: You commit the changed .ts files, and then you make a pull request from that commit 3: Yes. When I made a pull request, Deltakosh looked over the code, but I had to actually test it myself.
  2. Not that I know of, but you could make a new BABYLON.AbstractMesh(); and make it the ultimate parent of the sun and the constellations. You could of course also rotate the camera with the right alpha and beta value.
  3. Yes, I forgot to say that if beta <= 0, the rotation direction gets flipped (it's a feature). You can use this to "fix" it: scene.registerBeforeRender(function(){ if(camera.beta <= 0){ camera.beta += Math.PI * 2; } }); I also had an unsuccessful go at transforming ArcRotateCamera into a trackball camera, but it's definitely worth pursuing! Regarding your second comment, you can override anything, so all cameras give you control over their transformation matrix. Here is a playground with ArcRotateCamera's _getViewMatrix function copied from the JavaScript code: http://www.babylonjs-playground.com/#FTW19P
  4. Hi, welcome to the forums! I found that those limitations are controlled by camera.upperBetaLimit and camera.lowerBetaLimit, and setting them to either null or undefined disables them.
  5. Did you delete the file? http://www.babylon.actifgames.com/TerrainEditor/DelosCity_ground.babylon
  6. It's expected behavior: I don't know what the best option is to get a callback
  7. Maybe it never quite worked. This playground does produce a visible mesh on Edge, but it also produces error messages in the log, just like other browsers. I tried using code from older versions, but the problem persisted, so maybe the browsers behaved differently back then. Apparently PolygonMeshBuilder uses Earcut to fill the space between vertices with triangles, but it is misleadingly named "path" in your playground. It works if you don't add the first vertex again (the reference image): http://www.babylonjs-playground.com/#1TGOMH#8 #3 would also work if you add a small offset to either the first or the last vertex, so them having (virtually) the same position seems to be the problem. When I added random vertices twice, it also corrupted the mesh sometimes. You can see with polygon.getIndices() that corrupted meshes have some missing indices, but I don't know why that would only sometimes make the mesh invalid....
  8. Does http://www.babylonjs-playground.com/#0GG6MR#6 work for you? I get shader compilation errors. And shouldn't "deffiuse" be "diffuse" in "Fragment_Custom_Deffiuse"?
  9. Looks useful! Maybe you can also make it a dungeon generator. What is the algorithm based on? I saw it only shows 20/50 of the maze. Here is the full maze: http://www.babylonjs-playground.com/#lf4h6a#5 And with instances, it runs faster: http://www.babylonjs-playground.com/#lf4h6a#6
  10. Gijs

    STL Export

    Maybe this is the start of a fully-fledged STL serializer! Whose permission did you need to post this? And why does it compute the normals itself?
  11. It works if you set the uvs and normals as well: http://www.babylonjs-playground.com/#1KQZAF#4
  12. I made one using DynamicTexture, it's just a proof of concept: http://www.babylonjs-playground.com/#XLDBB2#4 At the bottom there are many variables you can play with. Here is the spark in your combination playground: http://www.babylonjs-playground.com/#22FWI5#14 It's still a very siny spark, but the getSparkPoints function can easily be edited. Edit: Here they are with a blue glow: http://www.babylonjs-playground.com/#XLDBB2#5 http://www.babylonjs-playground.com/#22FWI5#16 Apparently lighting has to be disabled on the material, it's just that you don't notice when the color is white.
  13. Can't you use instanced meshes instead of clones?
  14. You're welcome, but problem 1 wasn't caused the way I thought it was, so I've edited my comment accordingly. The solution is unchanged though.
  15. After some searching I found the cause of problem 1: In the playground you don't need to call scene.render(), so what I think happens in the playground is: scene.render(); // called in the background camera.setTarget(sphere.position); scene.render(); // called by you This is the playground with your second scene.render() removed, and it behaves just like the jsfiddle scene: https://www.babylonjs-playground.com/index.html#3ZU9ZU#2 To solve this, you can call camera.update(), which updates for user input, after camera.setTarget(): https://www.babylonjs-playground.com/index.html#3ZU9ZU#3 Your second problem happens because in the "fast" playground, the startPosition is a reference to the position vector of the sphere, so when you do sphere.x, you are changing the startPosition, because they refer to the same Vector3. To fix this, you can do this instead: startPosition = sphere.position.clone(); Demo: https://www.babylonjs-playground.com/index.html#U8GDR9#1
  16. It could be supported alongside WebGL. It will take a long time for WebGPU to be complete, and for BabylonJS to make full use of it. I don't think of things like that it in terms of difficulty, just duration.
  17. As can be seen here: http://www.babylonjs-playground.com/#TYAHX#10 Which is the scene from the introduction post: Thanks in advance
  18. If you open the console with F12, you see that it says it can't find the files, and when I go there in my browser, I get the same: https://drive.google.com/open?id=0b-oomaihlcdyekqtdnhzodhkc1e https://drive.google.com/open?id=0b-oomaihlcdyytiztvhflulumtq
  19. I've added the dudes from the instanced bones playground demo: http://www.babylonjs-playground.com/#2m1x8r#9
  20. For #1 you can do this: camera.inputs.attached['pointers'].detachControl(canvas);
  21. (I deleted the post above because it contained an error I had to fix first) I tried a cylinder instead of a box, but it gave some unexpected rotations along the way: http://www.babylonjs-playground.com/#IHBB35#4 But it works right this way: http://www.babylonjs-playground.com/#IHBB35#6 So if the first method causes problems in your situation, you can try the second (but you should replace the unnecessary new vector with a constant). I'm going try to figure out why the first one behaves that way. Good luck with your project.
  22. I tried some things, and got it to work like this: http://www.babylonjs-playground.com/#IHBB35#2 Here is the same one, but with the ray made visible, and the cube set to 0.5 visibility: http://www.babylonjs-playground.com/#IHBB35#3