From 1a264f231c92a8dfa86c8586d4e03e8c13d9fd6c Mon Sep 17 00:00:00 2001 From: Code WvS Date: Wed, 25 Mar 2015 10:21:32 +0100 Subject: let each sprite manage its own pen trail parts --- snap.html | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'snap.html') 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')); -- cgit v1.3.1