• Content Count

  • 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:
  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?
  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): #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 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: And with instances, it runs faster:
  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:
  12. I made one using DynamicTexture, it's just a proof of concept: At the bottom there are many variables you can play with. Here is the spark in your combination playground: It's still a very siny spark, but the getSparkPoints function can easily be edited. Edit: Here they are with a blue glow: 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: To solve this, you can call camera.update(), which updates for user input, after camera.setTarget(): 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:
  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: 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:
  19. I've added the dudes from the instanced bones playground demo:
  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: But it works right this way: 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: Here is the same one, but with the ray made visible, and the cube set to 0.5 visibility: