tmpvar / livecad

live coding of 3d surfaces and objects
livecad.wtf
53 stars 2 forks source link

livecad.wtf

Live editing of 3d objects and surface in the browser

livecad.wtf

"Wow that's fun!"

global functions

There are currently 3 types of functions:

shapes

All primitives are created centered around origin with the y axis being world "up"

operators

Every shape has a bunch of operators associated with it.

note: each operator will return a new shape leaving the original unaffected

You can also use these operators without the chaining mechanism:

var y = 0;
var z = 0;

display(
  translate(cube(10), x, y, z)
);

editor

It is important to be able to display what you are building and modify the state of the editor. These functions allow you to do so

export

note: you can also pass an array of shapes as the second arg


var shapes = [
  cube(10),
  cube(10).translate(20, 0, 0)
];

stl('filename.stl', shapes);