We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Procedural Lines

Home Forums Programming Procedural Lines

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1277
    Will Welker
    Customer

    Procedural lines work. This can be handy because doing non-mesh lines in Blender is not really possible. Also these lines keep the same thickness no matter how far away they are.

    API Link

    // add your code here, e.g. console.log('Hello, World!');
        var material = new v3d.LineBasicMaterial({
            color: 0x0000ff
        });
    
        var geometry = new v3d.Geometry();
        geometry.vertices.push(
            new v3d.Vector3( -10, 0, 0 ),
            new v3d.Vector3( 0, 10, 0 ),
            new v3d.Vector3( 10, 0, 0 )
            );
    
        var line = new v3d.Line( geometry, material );
        //here I had to add v3dApp. otherwise, scene was undefined
        v3dApp.scene.add( line );
    #1287

    :good:

    Chief 3D Verger | LinkedIn | Twitter

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.