aframe-lsystem-component
Version:
L-System/LSystem component for A-Frame to draw 3D turtle graphics. Using Lindenmayer as backend.
19 lines (17 loc) • 379 B
JavaScript
AFRAME.registerPrimitive('a-lsystem', {
defaultComponents: {
lsystem: {
axiom: 'F',
productions: 'F:F++F++F++F',
iterations: 3,
angle: 60
}
},
mappings: {
axiom: 'lsystem.axiom',
productions: 'lsystem.productions',
segmentMixins: 'lsystem.segmentMixins',
iterations: 'lsystem.iterations',
angle: 'lsystem.angle'
}
});