0.18.1 • Published 6 years ago

craftml v0.18.1

Weekly downloads
10
License
MIT
Repository
github
Last release
6 years ago

CraftML

2.0 Beta

  • written in TypeScript
  • no dependency on csg.js
  • no dependency on openjscad

Roadmap

Remaining features to implement: div h1, h2, h3, h4, h5 text using different fonts circle triangle flip clip fit import from local file systems mutating a model inside a tag

New features: TBD

API

commonjs

var craftml = require('craftml')

// render <cube/> into a model object
craftml.render('<cube/>')
    .then(model => {
        // save the model as 'cube.stl'
        model.saveAs('cube.stl')
    })

TypeScript

Render

import * as craftml from 'craftml'

// render <cube/> into a model object
const model = await craftml.render('<cube/>')

// save the model as 'cube.stl'
model.saveAs('cube.stl')

Render with parameters

import * as craftml from 'craftml'

// render a row of repeated cubes, providing s = 5 as a parameter
// to specify the number of repetitions

const params = {s: 5}
const model = await craftml.render('<row><cube repeat="{{s}}"/></row>', params)

// save the model as 'cube.stl'
model.saveAs('row-of-cube.stl')
2.0.0-alpha

6 years ago

1.9.2-alpha-1

7 years ago

1.9.1

7 years ago

1.9.0

7 years ago

0.18.1

8 years ago

0.18.0

8 years ago

0.17.1

8 years ago

0.11.0

8 years ago

0.10.0

9 years ago

0.9.1

9 years ago

0.9.0

9 years ago

0.8.8

9 years ago

0.8.7

9 years ago

0.8.6

9 years ago

0.8.5

9 years ago

0.8.4

9 years ago

0.8.3

9 years ago

0.8.2

9 years ago

0.8.1

9 years ago

0.5.0

9 years ago

0.3.3

9 years ago

0.3.2

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.2.0

9 years ago

0.1.9

9 years ago

0.1.8

9 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago