forked from microsoft/maker.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdependExample.html
More file actions
50 lines (41 loc) · 1.03 KB
/
dependExample.html
File metadata and controls
50 lines (41 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<!DOCTYPE html>
<html>
<head>
<title>Maker.js</title>
<style type="text/css">
html, body {
height: 100%;
margin: 0;
padding: 0;
}
svg {
position: absolute;
top: 0;
height: 100%;
width: 100%;
}
</style>
<script src="../target/js/browser.maker.js"></script>
<script src="dependExample_forBrowser.js"></script>
<script>
var makerjs = require('makerjs');
var _require = window["require"];
var require = function(x) {
if (x == '../target/js/node.maker.js' || x == 'makerjs') {
return makerjs;
} else {
return _require(x);
}
}
</script>
</head>
<body>
<script>
var makerjs = require('makerjs');
var dependExample = require('dependExample');
var model = new dependExample();
var svg = makerjs.exporter.toSVG(model);
document.write(svg);
</script>
</body>
</html>