mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Merge remote branch 'origin/master'
This commit is contained in:
commit
c9538e8b53
4 changed files with 6 additions and 6 deletions
|
@ -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) {
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue