diff --git a/examples/Animated/Flock.html b/examples/Animated/Flock.html index 90cb78d2..4bba7b1f 100644 --- a/examples/Animated/Flock.html +++ b/examples/Animated/Flock.html @@ -264,7 +264,7 @@ groupTogether = false, pathLength = heartPath.length, mouseDown = false; - function onFrameLoop() { + function onFrame() { count++; for(var i = 0, l = boids.length; i < l; i++) { if (groupTogether) { diff --git a/examples/Animated/RoundedRectangles.html b/examples/Animated/RoundedRectangles.html index ad88d4d2..263110ee 100644 --- a/examples/Animated/RoundedRectangles.html +++ b/examples/Animated/RoundedRectangles.html @@ -30,7 +30,7 @@ var children = document.activeLayer.children; var count = 0; - function onFrameLoop() { + function onFrame() { count++; for (var i = 0, l = children.length; i < l; i++) { var item = children[i]; diff --git a/examples/Animated/animatedStar.html b/examples/Animated/animatedStar.html index 01738e5f..d45e1635 100644 --- a/examples/Animated/animatedStar.html +++ b/examples/Animated/animatedStar.html @@ -36,7 +36,7 @@ } var count = 0; - function onFrameLoop() { + function onFrame() { count++; for (var i = 0, l = layer.children.length; i < l; i++) { var item = layer.children[i]; diff --git a/src/util/PaperScript.js b/src/util/PaperScript.js index 727da8fc..2e6bf742 100644 --- a/src/util/PaperScript.js +++ b/src/util/PaperScript.js @@ -145,12 +145,12 @@ var PaperScript = new function() { }); } try { - var onFrameLoop = eval('onFrameLoop'); - if (onFrameLoop) { + var onFrame = eval('onFrame'); + if (onFrame) { function loop() { // Request next frame already Event.requestAnimationFrame(loop, doc && doc.canvas); - onFrameLoop(); + onFrame(); // Automatically redraw document each frame. doc && doc.redraw(); }