paper 0.12.16 → 0.12.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -4
- package/dist/docs/assets/js/paper.js +22 -14
- package/dist/docs/classes/Color.html +2 -2
- package/dist/docs/classes/CompoundPath.html +3 -4
- package/dist/docs/classes/Curve.html +2 -2
- package/dist/docs/classes/CurveLocation.html +2 -2
- package/dist/docs/classes/Event.html +2 -2
- package/dist/docs/classes/Gradient.html +2 -2
- package/dist/docs/classes/GradientStop.html +2 -2
- package/dist/docs/classes/Group.html +3 -4
- package/dist/docs/classes/HitResult.html +2 -2
- package/dist/docs/classes/Item.html +3 -4
- package/dist/docs/classes/Key.html +2 -2
- package/dist/docs/classes/KeyEvent.html +2 -2
- package/dist/docs/classes/Layer.html +3 -4
- package/dist/docs/classes/Matrix.html +2 -2
- package/dist/docs/classes/MouseEvent.html +2 -2
- package/dist/docs/classes/PaperScope.html +2 -2
- package/dist/docs/classes/PaperScript.html +2 -2
- package/dist/docs/classes/Path.html +3 -4
- package/dist/docs/classes/PathItem.html +3 -4
- package/dist/docs/classes/Point.html +2 -2
- package/dist/docs/classes/PointText.html +3 -4
- package/dist/docs/classes/Project.html +3 -2
- package/dist/docs/classes/Raster.html +3 -4
- package/dist/docs/classes/Rectangle.html +2 -2
- package/dist/docs/classes/Segment.html +2 -2
- package/dist/docs/classes/Shape.html +3 -4
- package/dist/docs/classes/Size.html +2 -2
- package/dist/docs/classes/Style.html +2 -2
- package/dist/docs/classes/SymbolDefinition.html +2 -2
- package/dist/docs/classes/SymbolItem.html +3 -4
- package/dist/docs/classes/TextItem.html +3 -4
- package/dist/docs/classes/Tool.html +2 -2
- package/dist/docs/classes/ToolEvent.html +2 -2
- package/dist/docs/classes/Tween.html +2 -2
- package/dist/docs/classes/View.html +3 -3
- package/dist/docs/classes/global.html +2 -2
- package/dist/docs/classes/index.html +2 -2
- package/dist/docs/index.html +1 -1
- package/dist/paper-core.js +22 -14
- package/dist/paper-core.min.js +3 -3
- package/dist/paper-full.js +22 -14
- package/dist/paper-full.min.js +3 -3
- package/dist/paper.d.ts +175 -147
- package/dist/paperjs/LICENSE.txt +23 -0
- package/dist/paperjs/dist/node/canvas.js +66 -0
- package/dist/paperjs/dist/node/extend.js +156 -0
- package/dist/paperjs/dist/node/self.js +58 -0
- package/dist/paperjs/dist/node/xml.js +40 -0
- package/dist/paperjs/dist/paper-core.d.ts +1 -0
- package/dist/paperjs/dist/paper-core.js +15703 -0
- package/dist/paperjs/dist/paper-core.min.js +32 -0
- package/dist/paperjs/dist/paper-full.js +17472 -0
- package/dist/paperjs/dist/paper-full.min.js +32 -0
- package/dist/paperjs/dist/paper.d.ts +7394 -0
- package/dist/paperjs/docs/assets/css/docs.css +414 -0
- package/dist/paperjs/docs/assets/js/codemirror.js +4 -0
- package/dist/paperjs/docs/assets/js/docs.js +493 -0
- package/dist/paperjs/docs/assets/js/jquery.js +6 -0
- package/dist/paperjs/docs/assets/js/paper.js +17472 -0
- package/dist/paperjs/docs/classes/Color.html +2188 -0
- package/dist/paperjs/docs/classes/CompoundPath.html +8877 -0
- package/dist/paperjs/docs/classes/Curve.html +2323 -0
- package/dist/paperjs/docs/classes/CurveLocation.html +672 -0
- package/dist/paperjs/docs/classes/Event.html +176 -0
- package/dist/paperjs/docs/classes/Gradient.html +240 -0
- package/dist/paperjs/docs/classes/GradientStop.html +273 -0
- package/dist/paperjs/docs/classes/Group.html +6864 -0
- package/dist/paperjs/docs/classes/HitResult.html +239 -0
- package/dist/paperjs/docs/classes/Item.html +6628 -0
- package/dist/paperjs/docs/classes/Key.html +139 -0
- package/dist/paperjs/docs/classes/KeyEvent.html +308 -0
- package/dist/paperjs/docs/classes/Layer.html +6850 -0
- package/dist/paperjs/docs/classes/Matrix.html +1744 -0
- package/dist/paperjs/docs/classes/MouseEvent.html +355 -0
- package/dist/paperjs/docs/classes/PaperScope.html +459 -0
- package/dist/paperjs/docs/classes/PaperScript.html +198 -0
- package/dist/paperjs/docs/classes/Path.html +11775 -0
- package/dist/paperjs/docs/classes/PathItem.html +8639 -0
- package/dist/paperjs/docs/classes/Point.html +2699 -0
- package/dist/paperjs/docs/classes/PointText.html +7029 -0
- package/dist/paperjs/docs/classes/Project.html +1305 -0
- package/dist/paperjs/docs/classes/Raster.html +7843 -0
- package/dist/paperjs/docs/classes/Rectangle.html +1654 -0
- package/dist/paperjs/docs/classes/Segment.html +939 -0
- package/dist/paperjs/docs/classes/Shape.html +7363 -0
- package/dist/paperjs/docs/classes/Size.html +1825 -0
- package/dist/paperjs/docs/classes/Style.html +919 -0
- package/dist/paperjs/docs/classes/SymbolDefinition.html +311 -0
- package/dist/paperjs/docs/classes/SymbolItem.html +6755 -0
- package/dist/paperjs/docs/classes/TextItem.html +6869 -0
- package/dist/paperjs/docs/classes/Tool.html +761 -0
- package/dist/paperjs/docs/classes/ToolEvent.html +446 -0
- package/dist/paperjs/docs/classes/Tween.html +374 -0
- package/dist/paperjs/docs/classes/View.html +1772 -0
- package/dist/paperjs/docs/classes/global.html +425 -0
- package/dist/paperjs/docs/classes/index.html +88 -0
- package/dist/paperjs/docs/index.html +11 -0
- package/dist/paperjs/examples/Animated/AnimatedStar.html +53 -0
- package/dist/paperjs/examples/Animated/BooleanOperations.html +115 -0
- package/dist/paperjs/examples/Animated/CandyCrash.html +151 -0
- package/dist/paperjs/examples/Animated/Extruded.html +50 -0
- package/dist/paperjs/examples/Animated/Lines.html +53 -0
- package/dist/paperjs/examples/Animated/Smoothing.html +70 -0
- package/dist/paperjs/examples/Animated/Space.html +86 -0
- package/dist/paperjs/examples/Animated/SpaceUsingShapes.html +79 -0
- package/dist/paperjs/examples/Games/Paperoids.html +569 -0
- package/dist/paperjs/examples/JSON/Circle Testing.html +34 -0
- package/dist/paperjs/examples/JSON/Compound Path.html +25 -0
- package/dist/paperjs/examples/JSON/Empty Path Testing.html +31 -0
- package/dist/paperjs/examples/JSON/Gradients.html +34 -0
- package/dist/paperjs/examples/JSON/Group Transform.html +28 -0
- package/dist/paperjs/examples/JSON/Line Testing.html +44 -0
- package/dist/paperjs/examples/JSON/Random Path Testing.html +42 -0
- package/dist/paperjs/examples/JSON/Raster.html +29 -0
- package/dist/paperjs/examples/JSON/Rect and Attribute Testing.html +56 -0
- package/dist/paperjs/examples/JSON/Rotated Primitives.html +55 -0
- package/dist/paperjs/examples/JSON/Selection.html +43 -0
- package/dist/paperjs/examples/JSON/Shapes.html +54 -0
- package/dist/paperjs/examples/JSON/Symbols.html +30 -0
- package/dist/paperjs/examples/JSON/Text Testing.html +38 -0
- package/dist/paperjs/examples/JSON/Tiger.html +19 -0
- package/dist/paperjs/examples/JSON/Transform Test 1.html +32 -0
- package/dist/paperjs/examples/JSON/Transform Test 2.html +30 -0
- package/dist/paperjs/examples/Node.js/AnimatedStar.js +52 -0
- package/dist/paperjs/examples/Node.js/BooleanOperations.js +36 -0
- package/dist/paperjs/examples/Node.js/JSONtoPDF.js +20 -0
- package/dist/paperjs/examples/Node.js/Raster.js +32 -0
- package/dist/paperjs/examples/Node.js/RasterRemote.js +33 -0
- package/dist/paperjs/examples/Node.js/SvgExport.js +52 -0
- package/dist/paperjs/examples/Node.js/SvgImport.js +23 -0
- package/dist/paperjs/examples/Node.js/Tadpoles.js +16 -0
- package/dist/paperjs/examples/Node.js/Tadpoles.pjs +278 -0
- package/dist/paperjs/examples/Node.js/in.json +1 -0
- package/dist/paperjs/examples/Node.js/in.svg +16 -0
- package/dist/paperjs/examples/Paperjs.org/BooleanOperattions.html +115 -0
- package/dist/paperjs/examples/Paperjs.org/BouncingBalls.html +103 -0
- package/dist/paperjs/examples/Paperjs.org/Chain.html +54 -0
- package/dist/paperjs/examples/Paperjs.org/DivisionRaster.html +72 -0
- package/dist/paperjs/examples/Paperjs.org/FutureSplash.html +122 -0
- package/dist/paperjs/examples/Paperjs.org/HitTesting.html +103 -0
- package/dist/paperjs/examples/Paperjs.org/InteractiveTiger.html +777 -0
- package/dist/paperjs/examples/Paperjs.org/MetaBalls.html +132 -0
- package/dist/paperjs/examples/Paperjs.org/NyanRainbow.html +202 -0
- package/dist/paperjs/examples/Paperjs.org/PathIntersections.html +76 -0
- package/dist/paperjs/examples/Paperjs.org/Qbertify.html +146 -0
- package/dist/paperjs/examples/Paperjs.org/RadialRainbows.html +80 -0
- package/dist/paperjs/examples/Paperjs.org/RoundedRectangles.html +41 -0
- package/dist/paperjs/examples/Paperjs.org/SatieLikedToDraw.html +140 -0
- package/dist/paperjs/examples/Paperjs.org/Simplify.html +63 -0
- package/dist/paperjs/examples/Paperjs.org/SpiralRaster.html +120 -0
- package/dist/paperjs/examples/Paperjs.org/Tadpoles.html +283 -0
- package/dist/paperjs/examples/Paperjs.org/Voronoi.html +134 -0
- package/dist/paperjs/examples/Rasters/PhyllotaxisRaster.html +96 -0
- package/dist/paperjs/examples/Rasters/Raster.html +34 -0
- package/dist/paperjs/examples/Rasters/RotationRaster.html +44 -0
- package/dist/paperjs/examples/Rasters/Smoothing.html +36 -0
- package/dist/paperjs/examples/SVG Export/Circle Testing.html +32 -0
- package/dist/paperjs/examples/SVG Export/Clipping.html +17 -0
- package/dist/paperjs/examples/SVG Export/Compound Path.html +22 -0
- package/dist/paperjs/examples/SVG Export/Empty Path Testing.html +28 -0
- package/dist/paperjs/examples/SVG Export/Gradients.html +52 -0
- package/dist/paperjs/examples/SVG Export/Group Transform.html +25 -0
- package/dist/paperjs/examples/SVG Export/Line Testing.html +41 -0
- package/dist/paperjs/examples/SVG Export/Random Path Testing.html +39 -0
- package/dist/paperjs/examples/SVG Export/Raster.html +21 -0
- package/dist/paperjs/examples/SVG Export/Rect and Attribute Testing.html +53 -0
- package/dist/paperjs/examples/SVG Export/Rotated Primitives.html +80 -0
- package/dist/paperjs/examples/SVG Export/Shapes.html +58 -0
- package/dist/paperjs/examples/SVG Export/Symbols.html +27 -0
- package/dist/paperjs/examples/SVG Export/Text Testing.html +45 -0
- package/dist/paperjs/examples/SVG Export/Tiger.html +23 -0
- package/dist/paperjs/examples/SVG Export/Transform Test 1.html +29 -0
- package/dist/paperjs/examples/SVG Export/Transform Test 2.html +27 -0
- package/dist/paperjs/examples/SVG Import/Arcs.html +78 -0
- package/dist/paperjs/examples/SVG Import/Butterfly.html +223 -0
- package/dist/paperjs/examples/SVG Import/Circle and Ellipse Testing.html +26 -0
- package/dist/paperjs/examples/SVG Import/Clipping.html +100 -0
- package/dist/paperjs/examples/SVG Import/From File.html +30 -0
- package/dist/paperjs/examples/SVG Import/Gradient.html +138 -0
- package/dist/paperjs/examples/SVG Import/Gradients.html +30 -0
- package/dist/paperjs/examples/SVG Import/Inkscape Pivot.html +52 -0
- package/dist/paperjs/examples/SVG Import/Inkscape.html +88 -0
- package/dist/paperjs/examples/SVG Import/Line Testing.html +24 -0
- package/dist/paperjs/examples/SVG Import/MoreGradients.html +107 -0
- package/dist/paperjs/examples/SVG Import/Multiple Paths Test 1.html +42 -0
- package/dist/paperjs/examples/SVG Import/Multiple Paths Test 2.html +33 -0
- package/dist/paperjs/examples/SVG Import/Nested Groups Test.html +78 -0
- package/dist/paperjs/examples/SVG Import/Polybezier.html +43 -0
- package/dist/paperjs/examples/SVG Import/Rect Testing.html +25 -0
- package/dist/paperjs/examples/SVG Import/Symbols.html +24 -0
- package/dist/paperjs/examples/SVG Import/Testing.html +40 -0
- package/dist/paperjs/examples/SVG Import/Text Testing.html +19 -0
- package/dist/paperjs/examples/SVG Import/Tiger.html +742 -0
- package/dist/paperjs/examples/SVG Import/Transform Testing.html +22 -0
- package/dist/paperjs/examples/SVG Import/Viewbox.html +38 -0
- package/dist/paperjs/examples/Scripts/Arcs.html +39 -0
- package/dist/paperjs/examples/Scripts/BlendModes.html +77 -0
- package/dist/paperjs/examples/Scripts/BooleanOperations.html +937 -0
- package/dist/paperjs/examples/Scripts/CompoundPath.html +19 -0
- package/dist/paperjs/examples/Scripts/CurveTimeParameterization.html +61 -0
- package/dist/paperjs/examples/Scripts/HslColor.html +53 -0
- package/dist/paperjs/examples/Scripts/PathStructure.html +82 -0
- package/dist/paperjs/examples/Scripts/PathTangents.html +73 -0
- package/dist/paperjs/examples/Scripts/Resize.html +42 -0
- package/dist/paperjs/examples/Scripts/RoundRectangle.html +28 -0
- package/dist/paperjs/examples/Scripts/Shapes.html +54 -0
- package/dist/paperjs/examples/Scripts/StrokeBounds.html +101 -0
- package/dist/paperjs/examples/Scripts/StrokeScaling.html +65 -0
- package/dist/paperjs/examples/Tools/BezierTool.html +90 -0
- package/dist/paperjs/examples/Tools/Circles.html +28 -0
- package/dist/paperjs/examples/Tools/Clouds.html +35 -0
- package/dist/paperjs/examples/Tools/DrippingBrush.html +73 -0
- package/dist/paperjs/examples/Tools/FancyBrush.html +82 -0
- package/dist/paperjs/examples/Tools/Grid.html +44 -0
- package/dist/paperjs/examples/Tools/MultiLines.html +44 -0
- package/dist/paperjs/examples/Tools/MultipleTools.html +44 -0
- package/dist/paperjs/examples/Tools/PathEditing.html +95 -0
- package/dist/paperjs/examples/Tools/SquareRounded.html +76 -0
- package/dist/paperjs/examples/Tools/Stars.html +38 -0
- package/dist/paperjs/examples/Tools/Vektor.html +200 -0
- package/dist/paperjs/examples/Tools/Wave.html +50 -0
- package/dist/paperjs/examples/Tools/WormFarm.html +88 -0
- package/dist/paperjs/examples/Worker/Main.html +53 -0
- package/dist/paperjs/examples/Worker/Worker.js +14 -0
- package/dist/paperjs/examples/css/style.css +12 -0
- package/package.json +4 -4
|
@@ -0,0 +1,425 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>_global_</title>
|
|
6
|
+
<base target="class-frame">
|
|
7
|
+
<link href="../assets/css/docs.css" rel="stylesheet" type="text/css">
|
|
8
|
+
<script src="../assets/js/paper.js"></script>
|
|
9
|
+
<script src="../assets/js/jquery.js"></script>
|
|
10
|
+
<script src="../assets/js/codemirror.js"></script>
|
|
11
|
+
<script src="../assets/js/docs.js"></script>
|
|
12
|
+
</head>
|
|
13
|
+
<body>
|
|
14
|
+
<article class="reference">
|
|
15
|
+
<div class="reference-class">
|
|
16
|
+
<h1>Global Scope</h1>
|
|
17
|
+
|
|
18
|
+
<p>When code is executed as PaperScript, the script’s scope is populated with all fields of the currently active <a href="../classes/PaperScope.html"><tt>PaperScope</tt></a> object, which within the script appear to be global.</p>
|
|
19
|
+
<p>In a JavaScript context, only the <a href="../classes/global.html#paper"><tt>paper</tt></a> variable is added to the global scope, referencing the currently active <a href="../classes/PaperScope.html"><tt>PaperScope</tt></a> object, through which all properties and Paper.js classes can be accessed.</p>
|
|
20
|
+
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
<!-- ================================ properties =========================== -->
|
|
28
|
+
<div class="reference-members">
|
|
29
|
+
<h2>Properties</h2>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
<div id="paper" class="member">
|
|
33
|
+
<div class="member-link">
|
|
34
|
+
<a name="paper" href="#paper"><tt><b>paper</b></tt></a>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="member-description hidden">
|
|
37
|
+
|
|
38
|
+
<div class="member-text">
|
|
39
|
+
<p>A reference to the currently active <a href="../classes/PaperScope.html"><tt>PaperScope</tt></a> object.</p>
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
<ul class="member-list">
|
|
44
|
+
<h4>Type:</h4>
|
|
45
|
+
<li>
|
|
46
|
+
<a href="../classes/PaperScope.html"><tt>PaperScope</tt></a>
|
|
47
|
+
</li>
|
|
48
|
+
</ul>
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
<h3>Global PaperScript Properties</h3>
|
|
59
|
+
|
|
60
|
+
<div id="project" class="member">
|
|
61
|
+
<div class="member-link">
|
|
62
|
+
<a name="project" href="#project"><tt><b>project</b></tt></a>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="member-description hidden">
|
|
65
|
+
|
|
66
|
+
<div class="member-text">
|
|
67
|
+
<p>The project for which the PaperScript is executed.</p>
|
|
68
|
+
<p>Note that when working with multiple projects, this does not necessarily reflect the currently active project. For this, use <a href="../classes/PaperScope.html#project"><tt>paperScope.project</tt></a> instead.</p>
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
<ul class="member-list">
|
|
73
|
+
<h4>Type:</h4>
|
|
74
|
+
<li>
|
|
75
|
+
<a href="../classes/Project.html"><tt>Project</tt></a>
|
|
76
|
+
</li>
|
|
77
|
+
</ul>
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
<div id="projects" class="member">
|
|
88
|
+
<div class="member-link">
|
|
89
|
+
<a name="projects" href="#projects"><tt><b>projects</b></tt></a>
|
|
90
|
+
</div>
|
|
91
|
+
<div class="member-description hidden">
|
|
92
|
+
|
|
93
|
+
<div class="member-text">
|
|
94
|
+
<p>The list of all open projects within the current Paper.js context.</p>
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
<ul class="member-list">
|
|
99
|
+
<h4>Type:</h4>
|
|
100
|
+
<li>
|
|
101
|
+
Array of <a href="../classes/Project.html"><tt>Project</tt></a> objects
|
|
102
|
+
</li>
|
|
103
|
+
</ul>
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
<div id="view" class="member">
|
|
114
|
+
<div class="member-link">
|
|
115
|
+
<a name="view" href="#view"><tt><b>view</b></tt></a>
|
|
116
|
+
</div>
|
|
117
|
+
<div class="member-description hidden">
|
|
118
|
+
|
|
119
|
+
<div class="member-text">
|
|
120
|
+
<p>The reference to the project’s view.</p>
|
|
121
|
+
<p>Note that when working with multiple projects, this does not necessarily reflect the view of the currently active project. For this, use <a href="../classes/PaperScope.html#view"><tt>paperScope.view</tt></a> instead.</p>
|
|
122
|
+
|
|
123
|
+
<p>Read only.</p>
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
<ul class="member-list">
|
|
128
|
+
<h4>Type:</h4>
|
|
129
|
+
<li>
|
|
130
|
+
<a href="../classes/View.html"><tt>View</tt></a>
|
|
131
|
+
</li>
|
|
132
|
+
</ul>
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
<div id="tool" class="member">
|
|
143
|
+
<div class="member-link">
|
|
144
|
+
<a name="tool" href="#tool"><tt><b>tool</b></tt></a>
|
|
145
|
+
</div>
|
|
146
|
+
<div class="member-description hidden">
|
|
147
|
+
|
|
148
|
+
<div class="member-text">
|
|
149
|
+
<p>The reference to the tool object which is automatically created when global tool event handlers are defined.</p>
|
|
150
|
+
<p>Note that when working with multiple tools, this does not necessarily reflect the currently active tool. For this, use <a href="../classes/PaperScope.html#tool"><tt>paperScope.tool</tt></a> instead.</p>
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
<ul class="member-list">
|
|
155
|
+
<h4>Type:</h4>
|
|
156
|
+
<li>
|
|
157
|
+
<a href="../classes/Tool.html"><tt>Tool</tt></a>
|
|
158
|
+
</li>
|
|
159
|
+
</ul>
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
<div id="tools" class="member">
|
|
170
|
+
<div class="member-link">
|
|
171
|
+
<a name="tools" href="#tools"><tt><b>tools</b></tt></a>
|
|
172
|
+
</div>
|
|
173
|
+
<div class="member-description hidden">
|
|
174
|
+
|
|
175
|
+
<div class="member-text">
|
|
176
|
+
<p>The list of available tools.</p>
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
<ul class="member-list">
|
|
181
|
+
<h4>Type:</h4>
|
|
182
|
+
<li>
|
|
183
|
+
Array of <a href="../classes/Tool.html"><tt>Tool</tt></a> objects
|
|
184
|
+
</li>
|
|
185
|
+
</ul>
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
</div>
|
|
190
|
+
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
<h3>PaperScript View Event Handlers</h3>
|
|
196
|
+
|
|
197
|
+
<div id="onframe" class="member">
|
|
198
|
+
<div class="member-link">
|
|
199
|
+
<a name="onframe" href="#onframe"><tt><b>onFrame</b></tt></a>
|
|
200
|
+
</div>
|
|
201
|
+
<div class="member-description hidden">
|
|
202
|
+
|
|
203
|
+
<div class="member-text">
|
|
204
|
+
<p>A global reference to the <a href="../classes/View.html#onframe"><tt>view.onFrame</tt></a> handler function.</p>
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
<ul class="member-list">
|
|
209
|
+
<h4>Type:</h4>
|
|
210
|
+
<li>
|
|
211
|
+
<tt>Function</tt>
|
|
212
|
+
</li>
|
|
213
|
+
</ul>
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
</div>
|
|
218
|
+
|
|
219
|
+
</div>
|
|
220
|
+
</div>
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
<div id="onresize" class="member">
|
|
224
|
+
<div class="member-link">
|
|
225
|
+
<a name="onresize" href="#onresize"><tt><b>onResize</b></tt></a>
|
|
226
|
+
</div>
|
|
227
|
+
<div class="member-description hidden">
|
|
228
|
+
|
|
229
|
+
<div class="member-text">
|
|
230
|
+
<p>A reference to the <a href="../classes/View.html#onresize"><tt>view.onResize</tt></a> handler function.</p>
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
<ul class="member-list">
|
|
235
|
+
<h4>Type:</h4>
|
|
236
|
+
<li>
|
|
237
|
+
<tt>Function</tt>
|
|
238
|
+
</li>
|
|
239
|
+
</ul>
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
</div>
|
|
244
|
+
|
|
245
|
+
</div>
|
|
246
|
+
</div>
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
<h3>PaperScript Tool Event Handlers</h3>
|
|
250
|
+
|
|
251
|
+
<div id="onmousedown" class="member">
|
|
252
|
+
<div class="member-link">
|
|
253
|
+
<a name="onmousedown" href="#onmousedown"><tt><b>onMouseDown</b></tt></a>
|
|
254
|
+
</div>
|
|
255
|
+
<div class="member-description hidden">
|
|
256
|
+
|
|
257
|
+
<div class="member-text">
|
|
258
|
+
<p>A reference to the <a href="../classes/Tool.html#onmousedown"><tt>tool.onMouseDown</tt></a> handler function.</p>
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
<ul class="member-list">
|
|
263
|
+
<h4>Type:</h4>
|
|
264
|
+
<li>
|
|
265
|
+
<tt>Function</tt>
|
|
266
|
+
</li>
|
|
267
|
+
</ul>
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
</div>
|
|
272
|
+
|
|
273
|
+
</div>
|
|
274
|
+
</div>
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
<div id="onmousedrag" class="member">
|
|
278
|
+
<div class="member-link">
|
|
279
|
+
<a name="onmousedrag" href="#onmousedrag"><tt><b>onMouseDrag</b></tt></a>
|
|
280
|
+
</div>
|
|
281
|
+
<div class="member-description hidden">
|
|
282
|
+
|
|
283
|
+
<div class="member-text">
|
|
284
|
+
<p>A reference to the <a href="../classes/Tool.html#onmousedrag"><tt>tool.onMouseDrag</tt></a> handler function.</p>
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
<ul class="member-list">
|
|
289
|
+
<h4>Type:</h4>
|
|
290
|
+
<li>
|
|
291
|
+
<tt>Function</tt>
|
|
292
|
+
</li>
|
|
293
|
+
</ul>
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
</div>
|
|
298
|
+
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
<div id="onmousemove" class="member">
|
|
304
|
+
<div class="member-link">
|
|
305
|
+
<a name="onmousemove" href="#onmousemove"><tt><b>onMouseMove</b></tt></a>
|
|
306
|
+
</div>
|
|
307
|
+
<div class="member-description hidden">
|
|
308
|
+
|
|
309
|
+
<div class="member-text">
|
|
310
|
+
<p>A reference to the <a href="../classes/Tool.html#onmousemove"><tt>tool.onMouseMove</tt></a> handler function.</p>
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
<ul class="member-list">
|
|
315
|
+
<h4>Type:</h4>
|
|
316
|
+
<li>
|
|
317
|
+
<tt>Function</tt>
|
|
318
|
+
</li>
|
|
319
|
+
</ul>
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
</div>
|
|
324
|
+
|
|
325
|
+
</div>
|
|
326
|
+
</div>
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
<div id="onmouseup" class="member">
|
|
330
|
+
<div class="member-link">
|
|
331
|
+
<a name="onmouseup" href="#onmouseup"><tt><b>onMouseUp</b></tt></a>
|
|
332
|
+
</div>
|
|
333
|
+
<div class="member-description hidden">
|
|
334
|
+
|
|
335
|
+
<div class="member-text">
|
|
336
|
+
<p>A reference to the <a href="../classes/Tool.html#onmouseup"><tt>tool.onMouseUp</tt></a> handler function.</p>
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
<ul class="member-list">
|
|
341
|
+
<h4>Type:</h4>
|
|
342
|
+
<li>
|
|
343
|
+
<tt>Function</tt>
|
|
344
|
+
</li>
|
|
345
|
+
</ul>
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
</div>
|
|
350
|
+
|
|
351
|
+
</div>
|
|
352
|
+
</div>
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
<h3>Keyboard Event Handlers (for PaperScript)</h3>
|
|
356
|
+
|
|
357
|
+
<div id="onkeydown" class="member">
|
|
358
|
+
<div class="member-link">
|
|
359
|
+
<a name="onkeydown" href="#onkeydown"><tt><b>onKeyDown</b></tt></a>
|
|
360
|
+
</div>
|
|
361
|
+
<div class="member-description hidden">
|
|
362
|
+
|
|
363
|
+
<div class="member-text">
|
|
364
|
+
<p>A reference to the <a href="../classes/Tool.html#onkeydown"><tt>tool.onKeyDown</tt></a> handler function.</p>
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
<ul class="member-list">
|
|
369
|
+
<h4>Type:</h4>
|
|
370
|
+
<li>
|
|
371
|
+
<tt>Function</tt>
|
|
372
|
+
</li>
|
|
373
|
+
</ul>
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
</div>
|
|
378
|
+
|
|
379
|
+
</div>
|
|
380
|
+
</div>
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
<div id="onkeyup" class="member">
|
|
384
|
+
<div class="member-link">
|
|
385
|
+
<a name="onkeyup" href="#onkeyup"><tt><b>onKeyUp</b></tt></a>
|
|
386
|
+
</div>
|
|
387
|
+
<div class="member-description hidden">
|
|
388
|
+
|
|
389
|
+
<div class="member-text">
|
|
390
|
+
<p>A reference to the <a href="../classes/Tool.html#onkeyup"><tt>tool.onKeyUp</tt></a> handler function.</p>
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
<ul class="member-list">
|
|
395
|
+
<h4>Type:</h4>
|
|
396
|
+
<li>
|
|
397
|
+
<tt>Function</tt>
|
|
398
|
+
</li>
|
|
399
|
+
</ul>
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
</div>
|
|
404
|
+
|
|
405
|
+
</div>
|
|
406
|
+
</div>
|
|
407
|
+
|
|
408
|
+
</div>
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
<!-- =========================== copyright notice ========================== -->
|
|
418
|
+
<p class="footer">
|
|
419
|
+
Paper.js v0.12.17<br>
|
|
420
|
+
Copyright © 2011—2022 <a href="http://www.lehni.org" target="_blank">Jürg Lehni</a> & <a href="http://www.jonathanpuckey.com" target="_blank">Jonathan Puckey</a>. All Rights Reserved.</p>
|
|
421
|
+
<div class="content-end"></div>
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
</article>
|
|
425
|
+
</body>
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>Paper.js v0.12.17</title>
|
|
6
|
+
<base target="class-frame">
|
|
7
|
+
<link href="../assets/css/docs.css" rel="stylesheet" type="text/css">
|
|
8
|
+
</head>
|
|
9
|
+
<body class="reference">
|
|
10
|
+
<div class="reference-index">
|
|
11
|
+
<h1>Paper.js<span class="version">0.12.17</span></h1>
|
|
12
|
+
<ul class="reference-classes"><li><a href="../classes/global.html">Global Scope</a></li>
|
|
13
|
+
<li>
|
|
14
|
+
<h2>Basic Types</h2>
|
|
15
|
+
<ul>
|
|
16
|
+
<li><a href="../classes/Point.html">Point</a></li>
|
|
17
|
+
<li><a href="../classes/Size.html">Size</a></li>
|
|
18
|
+
<li><a href="../classes/Rectangle.html">Rectangle</a></li>
|
|
19
|
+
<li><a href="../classes/Matrix.html">Matrix</a></li>
|
|
20
|
+
</ul>
|
|
21
|
+
<li>
|
|
22
|
+
<h2>Project & Items</h2>
|
|
23
|
+
<ul>
|
|
24
|
+
<li><a href="../classes/Project.html">Project</a></li>
|
|
25
|
+
<li><a href="../classes/Item.html">Item</a></li>
|
|
26
|
+
<li><a href="../classes/Layer.html">Layer</a></li>
|
|
27
|
+
<li><a href="../classes/Group.html">Group</a></li>
|
|
28
|
+
<li><a href="../classes/Shape.html">Shape</a></li>
|
|
29
|
+
<li><a href="../classes/Raster.html">Raster</a></li>
|
|
30
|
+
<li><hr /></li>
|
|
31
|
+
<li><a href="../classes/HitResult.html">HitResult</a></li>
|
|
32
|
+
</ul>
|
|
33
|
+
<li>
|
|
34
|
+
<h2>Paths</h2>
|
|
35
|
+
<ul>
|
|
36
|
+
<li><a href="../classes/PathItem.html">PathItem</a></li>
|
|
37
|
+
<li><a href="../classes/Path.html">Path</a></li>
|
|
38
|
+
<li><a href="../classes/CompoundPath.html">CompoundPath</a></li>
|
|
39
|
+
<li><a href="../classes/Segment.html">Segment</a></li>
|
|
40
|
+
<li><a href="../classes/Curve.html">Curve</a></li>
|
|
41
|
+
<li><hr /></li>
|
|
42
|
+
<li><a href="../classes/CurveLocation.html">CurveLocation</a></li>
|
|
43
|
+
</ul>
|
|
44
|
+
<li>
|
|
45
|
+
<h2>Symbols</h2>
|
|
46
|
+
<ul>
|
|
47
|
+
<li><a href="../classes/SymbolDefinition.html">SymbolDefinition</a></li>
|
|
48
|
+
<li><a href="../classes/SymbolItem.html">SymbolItem</a></li>
|
|
49
|
+
</ul>
|
|
50
|
+
<li>
|
|
51
|
+
<h2>Styling</h2>
|
|
52
|
+
<ul>
|
|
53
|
+
<li><a href="../classes/Style.html">Style</a></li>
|
|
54
|
+
<li><a href="../classes/Color.html">Color</a></li>
|
|
55
|
+
<li><a href="../classes/Gradient.html">Gradient</a></li>
|
|
56
|
+
<li><a href="../classes/GradientStop.html">GradientStop</a></li>
|
|
57
|
+
</ul>
|
|
58
|
+
<li>
|
|
59
|
+
<h2>Animation</h2>
|
|
60
|
+
<ul>
|
|
61
|
+
<li><a href="../classes/Tween.html">Tween</a></li>
|
|
62
|
+
</ul>
|
|
63
|
+
<li>
|
|
64
|
+
<h2>Typography</h2>
|
|
65
|
+
<ul>
|
|
66
|
+
<li><a href="../classes/TextItem.html">TextItem</a></li>
|
|
67
|
+
<li><a href="../classes/PointText.html">PointText</a></li>
|
|
68
|
+
</ul>
|
|
69
|
+
<li>
|
|
70
|
+
<h2>User Interaction & Events</h2>
|
|
71
|
+
<ul>
|
|
72
|
+
<li><a href="../classes/View.html">View</a></li>
|
|
73
|
+
<li><a href="../classes/Event.html">Event</a></li>
|
|
74
|
+
<li><a href="../classes/MouseEvent.html">MouseEvent</a></li>
|
|
75
|
+
<li><a href="../classes/Tool.html">Tool</a></li>
|
|
76
|
+
<li><a href="../classes/ToolEvent.html">ToolEvent</a></li>
|
|
77
|
+
<li><a href="../classes/Key.html">Key</a></li>
|
|
78
|
+
<li><a href="../classes/KeyEvent.html">KeyEvent</a></li>
|
|
79
|
+
</ul>
|
|
80
|
+
<li>
|
|
81
|
+
<h2>JavaScript</h2>
|
|
82
|
+
<ul>
|
|
83
|
+
<li><a href="../classes/PaperScope.html">PaperScope</a></li>
|
|
84
|
+
<li><a href="../classes/PaperScript.html">PaperScript</a></li>
|
|
85
|
+
</ul>
|
|
86
|
+
</ul>
|
|
87
|
+
</body>
|
|
88
|
+
</html>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>Paper.js v0.12.17</title>
|
|
6
|
+
</head>
|
|
7
|
+
<frameset cols="230,*">
|
|
8
|
+
<frame src="classes/index.html" name="packageListFrame" title="All Packages">
|
|
9
|
+
<frame src="about:blank" name="class-frame" title="Class and interface descriptions">
|
|
10
|
+
</frameset>
|
|
11
|
+
</html>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>Animated Star</title>
|
|
6
|
+
<link rel="stylesheet" href="../css/style.css">
|
|
7
|
+
<script type="text/javascript" src="../../dist/paper-full.js"></script>
|
|
8
|
+
<script type="text/paperscript" canvas="canvas">
|
|
9
|
+
var layer = project.activeLayer;
|
|
10
|
+
|
|
11
|
+
var values = {
|
|
12
|
+
count: 34,
|
|
13
|
+
points: 32
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
for (var i = 0; i < values.count; i++) {
|
|
17
|
+
var path = new Path({
|
|
18
|
+
fillColor: i % 2 ? 'red' : 'black',
|
|
19
|
+
closed: true
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
var offset = new Point(20 + 10 * i, 0);
|
|
23
|
+
var l = offset.length;
|
|
24
|
+
for (var j = 0; j < values.points * 2; j++) {
|
|
25
|
+
offset.angle += 360 / values.points;
|
|
26
|
+
var vector = offset.normalize(l * (j % 2 ? 0.1 : -0.1));
|
|
27
|
+
path.add(offset + vector);
|
|
28
|
+
}
|
|
29
|
+
path.smooth({ type: 'continuous' });
|
|
30
|
+
layer.insertChild(0, new Group({
|
|
31
|
+
children: [path],
|
|
32
|
+
applyMatrix: false
|
|
33
|
+
}));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function onFrame(event) {
|
|
37
|
+
for (var i = 0; i < values.count; i++) {
|
|
38
|
+
var item = layer.children[i];
|
|
39
|
+
var angle = (values.count - i) * Math.sin(event.count / 128) / 10;
|
|
40
|
+
item.rotate(angle);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Reposition the paths whenever the window is resized:
|
|
45
|
+
function onResize(event) {
|
|
46
|
+
layer.position = view.center;
|
|
47
|
+
}
|
|
48
|
+
</script>
|
|
49
|
+
</head>
|
|
50
|
+
<body>
|
|
51
|
+
<canvas id="canvas" resize stats hidpi="off"></canvas>
|
|
52
|
+
</body>
|
|
53
|
+
</html>
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>Boolean Operations</title>
|
|
6
|
+
<link rel="stylesheet" href="../css/style.css">
|
|
7
|
+
<script type="text/javascript" src="../../dist/paper-full.js"></script>
|
|
8
|
+
<script type="text/paperscript" canvas="canvas">
|
|
9
|
+
var text = new PointText({
|
|
10
|
+
position: view.center + [0, 200],
|
|
11
|
+
fillColor: 'black',
|
|
12
|
+
justification: 'center',
|
|
13
|
+
fontSize: 20
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
var originals = new Group({ insert: false }); // Don't insert in DOM.
|
|
17
|
+
|
|
18
|
+
var square = new Path.Rectangle({
|
|
19
|
+
position: view.center,
|
|
20
|
+
size: 300,
|
|
21
|
+
parent: originals,
|
|
22
|
+
fillColor: 'white'
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// Make a ring using subtraction of two circles:
|
|
26
|
+
var inner = new Path.Circle({
|
|
27
|
+
center: view.center,
|
|
28
|
+
radius: 100,
|
|
29
|
+
parent: originals,
|
|
30
|
+
fillColor: 'white'
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
var outer = new Path.Circle({
|
|
34
|
+
center: view.center,
|
|
35
|
+
radius: 140,
|
|
36
|
+
parent: originals,
|
|
37
|
+
fillColor: 'white'
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
var ring = outer.subtract(inner);
|
|
41
|
+
|
|
42
|
+
var operations = ['unite', 'intersect', 'subtract', 'exclude', 'divide'];
|
|
43
|
+
var colors = ['red', 'green', 'blue', 'black'];
|
|
44
|
+
var curIndex = -1;
|
|
45
|
+
var operation, result, activeItem;
|
|
46
|
+
|
|
47
|
+
// Change the mode every 3 seconds:
|
|
48
|
+
setInterval(setMode, 3000);
|
|
49
|
+
|
|
50
|
+
// Set the initial mode:
|
|
51
|
+
setMode();
|
|
52
|
+
|
|
53
|
+
function setMode() {
|
|
54
|
+
curIndex++;
|
|
55
|
+
if (curIndex == operations.length * 2)
|
|
56
|
+
curIndex = 0;
|
|
57
|
+
operation = operations[curIndex % operations.length];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function onMouseDown(event) {
|
|
61
|
+
var hitResult = originals.hitTest(event.point);
|
|
62
|
+
activeItem = hitResult && hitResult.item;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function onMouseDrag(event) {
|
|
66
|
+
if (activeItem)
|
|
67
|
+
activeItem.position = event.point;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function onMouseUp() {
|
|
71
|
+
activeItem = null;
|
|
72
|
+
square.position = view.center;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function onFrame(event) {
|
|
76
|
+
if (activeItem != ring) {
|
|
77
|
+
// Move the ring around:
|
|
78
|
+
var offset = new Point(140, 80) * [Math.sin(event.count / 60), Math.sin(event.count / 40)];
|
|
79
|
+
ring.position = view.center + offset;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Remove the result of the last path operation:
|
|
83
|
+
if (result)
|
|
84
|
+
result.remove();
|
|
85
|
+
|
|
86
|
+
// Perform the path operation on the ring:
|
|
87
|
+
if (curIndex < operations.length) {
|
|
88
|
+
result = square[operation](ring);
|
|
89
|
+
text.content = 'square.' + operation + '(ring)';
|
|
90
|
+
} else {
|
|
91
|
+
result = ring[operation](square);
|
|
92
|
+
text.content = 'ring.' + operation + '(square)';
|
|
93
|
+
}
|
|
94
|
+
result.selected = true;
|
|
95
|
+
result.fillColor = colors[curIndex % colors.length];
|
|
96
|
+
result.moveBelow(text);
|
|
97
|
+
|
|
98
|
+
// If the result is a group, color each of its children differently:
|
|
99
|
+
if (result instanceof Group) {
|
|
100
|
+
for (var i = 0; i < result.children.length; i++) {
|
|
101
|
+
result.children[i].fillColor = colors[i];
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
function onResize() {
|
|
107
|
+
text.position = view.center + [0, 200];
|
|
108
|
+
square.position = view.center;
|
|
109
|
+
}
|
|
110
|
+
</script>
|
|
111
|
+
</head>
|
|
112
|
+
<body>
|
|
113
|
+
<canvas id="canvas" resize stats></canvas>
|
|
114
|
+
</body>
|
|
115
|
+
</html>
|