mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Rename onFrameLoop to onFrame.
This commit is contained in:
parent
985aa5aff8
commit
28c9254695
4 changed files with 6 additions and 6 deletions
|
@ -264,7 +264,7 @@
|
||||||
groupTogether = false,
|
groupTogether = false,
|
||||||
pathLength = heartPath.length,
|
pathLength = heartPath.length,
|
||||||
mouseDown = false;
|
mouseDown = false;
|
||||||
function onFrameLoop() {
|
function onFrame() {
|
||||||
count++;
|
count++;
|
||||||
for(var i = 0, l = boids.length; i < l; i++) {
|
for(var i = 0, l = boids.length; i < l; i++) {
|
||||||
if (groupTogether) {
|
if (groupTogether) {
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
var children = document.activeLayer.children;
|
var children = document.activeLayer.children;
|
||||||
var count = 0;
|
var count = 0;
|
||||||
function onFrameLoop() {
|
function onFrame() {
|
||||||
count++;
|
count++;
|
||||||
for (var i = 0, l = children.length; i < l; i++) {
|
for (var i = 0, l = children.length; i < l; i++) {
|
||||||
var item = children[i];
|
var item = children[i];
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
var count = 0;
|
var count = 0;
|
||||||
function onFrameLoop() {
|
function onFrame() {
|
||||||
count++;
|
count++;
|
||||||
for (var i = 0, l = layer.children.length; i < l; i++) {
|
for (var i = 0, l = layer.children.length; i < l; i++) {
|
||||||
var item = layer.children[i];
|
var item = layer.children[i];
|
||||||
|
|
|
@ -145,12 +145,12 @@ var PaperScript = new function() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
var onFrameLoop = eval('onFrameLoop');
|
var onFrame = eval('onFrame');
|
||||||
if (onFrameLoop) {
|
if (onFrame) {
|
||||||
function loop() {
|
function loop() {
|
||||||
// Request next frame already
|
// Request next frame already
|
||||||
Event.requestAnimationFrame(loop, doc && doc.canvas);
|
Event.requestAnimationFrame(loop, doc && doc.canvas);
|
||||||
onFrameLoop();
|
onFrame();
|
||||||
// Automatically redraw document each frame.
|
// Automatically redraw document each frame.
|
||||||
doc && doc.redraw();
|
doc && doc.redraw();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue