-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSamples.html
40 lines (35 loc) · 1.27 KB
/
Samples.html
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<script data-main="scripts/main" src="scripts/libs/require/require-jquery.js"></script>
</head>
<body>
<div>0</div>
<script>
require(['main'], function () {
require([
'helpers/SampleCanvas',
'element/shape/PolySegmentShape'],
function (SampleCanvas, PolySegmentShape) {
var sampleCanvas = new SampleCanvas("test1");
var polyLine = new PolySegmentShape(0, {
IsClosedPath:false,
Origin:{X:100, Y:100},
Items:[
{ X:0, Y:0 },
{ SegmentType:"line"},
{ X:100, Y:0 },
{ SegmentType:"line"},
{ X:100, Y:100 }]});
polyLine.StrokeDashOffset.set(0, 0);
polyLine.StrokeDashOffset.set(10000, 1000);
polyLine.StrokeRatio.End.set(0, 0);
polyLine.StrokeRatio.End.set(10000, 1);
polyLine.StrokeColor.set(0, {R:120, G:120, B:120});
sampleCanvas.addToScene(polyLine);
});
});
</script>
</body>
</html>