BabylonJS MeshLine - a port of THREE.MeshLine

Thanks!

Sorry, not yet, but it is on my list.

EDIT: Already working on it

2 Likes

Here you go :slight_smile:
The black ray intersects the red line and the given point marked with the black sphere.

Looking good but I need to do more tests though.

R.

3 Likes

Amazing :star_struck:

Guys, just wanted to let you know I’m working on this whenever I can and I think finally it has a quite reliable raycast function.

R.

:vulcan_salute:

4 Likes

Guys I started to create something like the GitHub globe using GreasedLine .

Current status is:

Follow here if you are interested:

7 Likes

@roland
Nice work!

I’m using this GitHub - RolandCsibrei/babylonjs-meshline at v2
and I noticed that when the camera zooms out, the line gets really big
:thinking:

Ok guys, one more screenshot of the possibilities of the GreasedLine before release :slight_smile:
I rewrote some code once again to match the usage of the existing LineSystem (I’ve used same common parameter names) and I will rename the stuff to GreasedLineSystem.

Finally the code is able to draw multiple lines with each line segment differently coloured, each segment can have it’s own width so you can draw something like this in 1 draw call:

Arrows can be easily drawn by setting the line segment widths.

I’ve created convenience methods for creating the color and width tables so it’s much easier to draw, size and colorise the line segments.

:vulcan_salute:

3 Likes

Thanks dude :slight_smile:

There might be still bugs. Can you make a screenshot?

1 Like

here :slight_smile:
line scale

1 Like

Well, you are modifiying the line mesh with a gizmo. I tried to modify the scale using the scale gizmo provided by the Scene Explorer and it’s behaving ok. I suggest you to wait for the release version or you can send me the code snippet where you are generating the line and I will try to find out what’s wrong.

Thanks!

This is an example, if you start zooming out, the shape of the line is barely visible

1 Like

Great!

2 Likes

Hi!

This is your code with the current GreasedLine stuff. Looks better:

https://demos.babylonjs.xyz/greased-line/hello/

Source code (new-builder branch):

4 Likes

Actually I was thinking about to introduce a visiblityStart parameter so you can limit the visibility of the line from the start - at what percentage to start to draw the line(the current visibility parameter affects the line only from its end, so it basically sets the length of the line - at what percentage to stop to draw the line) but this hack with dash solves this problem - nice hack, thanks :slight_smile:

2 Likes

Whoa this is much better!!

Thanks :slight_smile:!

1 Like

Hi!
I’ve just added GeometryDraw to GreasedLine:

and created a utility function to draw curves from Blender:

r.

:vulcan_salute:

8 Likes

Hello buddies!

I put together a small Quasar/Vue/Vite app to demonstrate the capabilities and usage of GreasedLine. This is just for the few people in this thread this time. I will create docs for BabylonJS later ofcourse. It’s still in beta, some stuff will change under the hood however the main GreasedLineBuilder’s interface is 98% final :slight_smile:

If you are tired of X-MASS and the food have a look at (navigate using the hamburger menu - sry not mobile friendly)

If you want to try it out yourself you can write your own code in src/pages/tools/TryPage and access it at http://localhost:9000/tools/Try

There is a bug in this version which creates should-be-temporary bounding spheres for ray picking but they are permanent for now :smiley: They are disabled so not visible but the Scene explorer reveals their existence (Press SHIFT+CTRL+I to open the Inspector)

  1. Install Quasar CLI - must be admin on Windows
    npm i -g @quasar/cli @quasar/cli
  2. Clone repo
  3. Install dependecies
    npm i
  4. Run
    quasar dev
  5. Automatically opens browser at localhost:9000

You can use yarn as well.

r.

:vulcan_salute: Live long and prosper my friends!

@labris what about to try to create some cool disco lasers for your project with GreasedLine? :wink:

Tested only on Mac/Chrome/Retina

6 Likes

The docs look gorgeous and the demos too - love the Star Wars :slight_smile:

1 Like

why is blurry i saw?

what’s your config? OS/Browser/GPU?

Thanks!