Jump to content

new mesh type : LineSystem


Recommended Posts

Hi people,

It was expected for a long time, so here is it : the brand new LineSystem.

This allow you to create a single mesh with as many lines you want. Just pass an array populated with lines, each line being an array of successive Vector3.

var nbLines = 30;
var nbPoints = 100;
var lines = [];
for (var l = 0; l < nbLines; l++) {
    var points = [];
    for (var p = 0; p < nbPoints; p++) {
        points.push(new BABYLON.Vector3(p - nbPoints/2, Math.sin(p), l - nbLines/2));

var lineSystem = BABYLON.MeshBuilder.CreateLineSystem("ls", {lines: lines, updatable: true}, scene);


Is this updatable/morphable ?

Yes sir ! As usual with the parameter instance :

lineSystem = BABYLON.MeshBuilder.CreateLineSystem(null, {lines: lines, instance: lineSystem});


Have fun :-)

Link to comment
Share on other sites

  • 4 weeks 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.

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.


  • Recently Browsing   0 members

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