From 568e98e72045b02dfbae9d58a85c806d6275fc6f Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Sun, 6 Jan 2019 14:25:08 +0800 Subject: [PATCH] __renderFrameFuncs function --- libs/control.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libs/control.js b/libs/control.js index 93fb3ba1..66acc8c0 100644 --- a/libs/control.js +++ b/libs/control.js @@ -276,8 +276,13 @@ control.prototype.setRequestAnimationFrame = function () { var renderFrameFuncs = core.plugin.__renderFrameFuncs || []; renderFrameFuncs.forEach(function (t) { try { - if (core.plugin[t]) - core.plugin[t](timestamp); + if (t instanceof Function) { + t(timestamp); + } + else if (typeof t == 'string') { + if (core.plugin[t]) + core.plugin[t](timestamp); + } } catch (e) { console.log(e);