Jump to content

new mesh type : dashed lines


jerome
 Share

Recommended Posts

@Temechon : wait for it to be PR before starting to love me :D

@ RaananW : no idea about performance

The dashed line will have 3 parameters (with default values) : dash size, gap size and dash number

- dash number will be the number of dashes, so half the number of vertices. Default 200 => 400 vertices.

- dash and gap sizes will just be relative sizes from one to the other.

So it's quite a simple mesh (no normals) and I guess it will behave nicely in term of performances.

 

For now, it will just be a simple tool for plotting. It is to say I don't handle cases where I can't set less than a dash per line segment.

Link to comment
Share on other sites

huuu..

I don't deserve so much for just a simple new mesh type.

RotationFromAxis() was far more complex to design and to implement (and threejs hasn't the equivalent).

 

Too bad "Temechon", who loves me now, isn't Charlize Theron's pseudo actually  :lol:

 

Ok, for the clone of CreateLine, that's what I did so far.

Link to comment
Share on other sites

Actually she just phoned me to make sure her pseudo wasn't "Temechon" on this forum but another one she doesn't want to let us know because ... well, you know... she doesn't want everybody disturbs her asking her all day long how to compile this or that, how to rotate a mesh, how to set a dynamicTexture and so on

 

I can understand this

Link to comment
Share on other sites

Dashed Lines demo :

 

Here is a classical Lines mesh : http://www.babylonjs-playground.com/#XKYAE

Let's use the same array points to create the DashedLines mesh : http://www.babylonjs-playground.com/#XKYAE#1

 

Can we morph/animate it as the classical Lines mesh ?

Yes sir : http://www.babylonjs-playground.com/#XKYAE#2

 

Of course, the Lines mesh isn't needed : http://www.babylonjs-playground.com/#XKYAE#3

 

I will write the doc soon in Basic Shapes section.

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...