summaryrefslogtreecommitdiff
path: root/snap.html
diff options
context:
space:
mode:
authorCode WvS <code-wvs@quantentunnel.de>2015-03-25 10:21:32 +0100
committerCode WvS <code-wvs@quantentunnel.de>2015-03-25 10:21:32 +0100
commit1a264f231c92a8dfa86c8586d4e03e8c13d9fd6c (patch)
tree7b675d01b0af4b4c3f052199e8361eeb5b91c2ea /snap.html
parent817dc3b46c7df1ecc5dc9be7a185d6dc72c232db (diff)
downloadsnap-yow-1a264f231c92a8dfa86c8586d4e03e8c13d9fd6c.tar.gz
snap-yow-1a264f231c92a8dfa86c8586d4e03e8c13d9fd6c.zip
let each sprite manage its own pen trail parts
Diffstat (limited to 'snap.html')
-rwxr-xr-xsnap.html13
1 files changed, 1 insertions, 12 deletions
diff --git a/snap.html b/snap.html
index 63f94e8..65b21f7 100755
--- a/snap.html
+++ b/snap.html
@@ -171,19 +171,8 @@
window.spriteGroup = spriteGroup;
spriteGroup = L.layerGroup().addTo(map);
- // During a pen down, a polything (thing = line/shape) is updated
- // at polything[this.myPolythingIndex].
- // On pen down, myPolythingIndex is set to window.polythingIndex and
- // window.polythingIndex is incremented
- // so window.polygons and window.polylines contain
- // polygons/lines created by all sprites.
+ // every sprite has its own polylines/polygons that are added to penTrails
window.penTrails = L.layerGroup().addTo(map);
- window.penShapes = L.layerGroup().addTo(window.penTrails);
- window.penLines = L.layerGroup().addTo(window.penTrails);
- window.polygons = [];
- window.polylines = [];
- window.polygonIndex = 0;
- window.polylineIndex = 0;
// Load the IDE
world = new WorldMorph(document.getElementById('world'));