Here’s a infinite anti-aliased grid helper which fades out in distance. It doesn’t rely on lines, instead uses a single quad, so you can have a very dense huge grid without creating lines you can also change on the fly.
new THREE.InfiniteGridHelper(size1, size2, color, distance);
I have some shakes on some lines passing through in the middle with these. Any reason for that?
Note: I have added device orientation controls to my code as well. https://project-lg.glitch.me/
Just tried and it works. Maybe from a desktop you only see a line which is due to the orientation of desktop computers are different than mobile ones. It would be well oriented if you could try from mobile device. Yes geolocation is necessary.Can I learn why did you ask if it is necessary?
I can place some cube and sphere meshes on the xz plane. Can that cause it?
I’ve been using this for one of my projects, but I really need to make the origin X and Y lines different colors. The included grid helper for Three JS allows for changing the color of the main axes so it would be great if this could too. I’d also like to make the X and Y axes different colors like Blender3D where they are red and green.
I tried modifying the shader to do this and I could kind of get it to work but the lines just because super jagged. I’ve never done any shader programming before and was just kind of winging it so any idea on how to do this for just the main axes?
Yes, that’s not related to the helper, i can’t provide help for the bundlers you need to investigate their docs or ask on a related platform.
However the error already says you can’t just add a property to the THREE object as regular plugin, for ES6 modules or bundlers using import/export you need to export the function instead.
It’s not supposed to be rotated, i’ve added a parameter you can define which axes order to use with the first 2 being the plane axes, so in your case you set it to ‘xyz’.