feat: 第一次上传代码

This commit is contained in:
2025-06-29 23:41:37 +08:00
commit 875c60d3ec
478 changed files with 385642 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
import CompExpressionInterface from './CompInterface';
import ExpressionManager from './ExpressionManager';
const Expressions = (function () {
var ob = {};
ob.initExpressions = initExpressions;
ob.resetFrame = ExpressionManager.resetFrame;
function initExpressions(animation) {
var stackCount = 0;
var registers = [];
function pushExpression() {
stackCount += 1;
}
function popExpression() {
stackCount -= 1;
if (stackCount === 0) {
releaseInstances();
}
}
function registerExpressionProperty(expression) {
if (registers.indexOf(expression) === -1) {
registers.push(expression);
}
}
function releaseInstances() {
var i;
var len = registers.length;
for (i = 0; i < len; i += 1) {
registers[i].release();
}
registers.length = 0;
}
animation.renderer.compInterface = CompExpressionInterface(animation.renderer);
animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);
animation.renderer.globalData.pushExpression = pushExpression;
animation.renderer.globalData.popExpression = popExpression;
animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty;
}
return ob;
}());
export default Expressions;