UNPKG

makerjs-card

Version:
58 lines (47 loc) 1.39 kB
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Makerjs card</title> <!--meta http-equiv="refresh" content="3" /--> <style> svg { height: 670px; width: 100%; } </style> <script> var module = {}; function require(lib) { switch (lib) { case 'makerjs': return MakerJs; case 'makerjs-logo': return logo; case 'makerjs-monotext': return monotext; } } </script> <script src="node_modules/makerjs/index.js"></script> <script src="node_modules/makerjs-logo/index.js"></script> <script src="node_modules/makerjs-monotext/index.js"></script> <script src="index.js"></script> </head> <body> <script> function sheet() { this.units = makerjs.unitType.Millimeter; this.id = 'sheet'; this.models = []; var d = 3; for (var i = 0; i < 6; i++) { var c = makerjs.model.scale(new card(), .75); c.origin = [0, 49 * i]; this.models.push(c); } } var svg = makerjs.exporter.toSVG(new card()); document.write(svg); </script> </body> </html>