This commit is contained in:
2026-07-14 11:44:07 +08:00
commit 4409c7b031
5906 changed files with 6959792 additions and 0 deletions
@@ -0,0 +1,152 @@
System.register(["cc"], function (_export, _context) {
"use strict";
var _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, Component, easing, tween, Vec3, _dec, _dec2, _dec3, _dec4, _dec5, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _crd, ccclass, property, ScaleComponent;
function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.'); }
return {
setters: [function (_cc) {
_cclegacy = _cc.cclegacy;
__checkObsolete__ = _cc.__checkObsolete__;
__checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
_decorator = _cc._decorator;
Component = _cc.Component;
easing = _cc.easing;
tween = _cc.tween;
Vec3 = _cc.Vec3;
}],
execute: function () {
_crd = true;
_cclegacy._RF.push({}, "f63e6rwAJ9ETqh1I31PDw3s", "ScaleComponent", undefined);
__checkObsolete__(['_decorator', 'Component', 'easing', 'Node', 'tween', 'Vec2', 'Vec3']);
({
ccclass,
property
} = _decorator);
_export("ScaleComponent", ScaleComponent = (_dec = ccclass('ScaleComponent'), _dec2 = property({
displayName: "线性"
}), _dec3 = property({
displayName: "先慢后快"
}), _dec4 = property({
displayName: "先快后慢"
}), _dec5 = property({
displayName: "设置为初始值"
}), _dec(_class = (_class2 = class ScaleComponent extends Component {
constructor() {
super(...arguments);
_initializerDefineProperty(this, "startPos", _descriptor, this);
_initializerDefineProperty(this, "endPos", _descriptor2, this);
_initializerDefineProperty(this, "delay", _descriptor3, this);
_initializerDefineProperty(this, "moveTimer", _descriptor4, this);
_initializerDefineProperty(this, "line", _descriptor5, this);
_initializerDefineProperty(this, "sineIn", _descriptor6, this);
_initializerDefineProperty(this, "sineOut", _descriptor7, this);
_initializerDefineProperty(this, "setToStart", _descriptor8, this);
}
onEnable() {
var easeFunc = easing.linear;
if (this.sineIn) {
easeFunc = easing.sineIn;
}
if (this.sineOut) {
easeFunc = easing.sineOut;
}
if (this.setToStart) {
this.node.setScale(this.startPos);
}
tween(this.node).delay(this.delay).call(() => {
this.node.setScale(this.startPos);
}).to(this.moveTimer, {
scale: this.endPos
}, {
easing: easeFunc
}).start();
}
}, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, "startPos", [property], {
configurable: true,
enumerable: true,
writable: true,
initializer: function initializer() {
return new Vec3(0, 0, 0);
}
}), _descriptor2 = _applyDecoratedDescriptor(_class2.prototype, "endPos", [property], {
configurable: true,
enumerable: true,
writable: true,
initializer: function initializer() {
return new Vec3(1, 1, 1);
}
}), _descriptor3 = _applyDecoratedDescriptor(_class2.prototype, "delay", [property], {
configurable: true,
enumerable: true,
writable: true,
initializer: function initializer() {
return 0;
}
}), _descriptor4 = _applyDecoratedDescriptor(_class2.prototype, "moveTimer", [property], {
configurable: true,
enumerable: true,
writable: true,
initializer: function initializer() {
return 0.1;
}
}), _descriptor5 = _applyDecoratedDescriptor(_class2.prototype, "line", [_dec2], {
configurable: true,
enumerable: true,
writable: true,
initializer: function initializer() {
return true;
}
}), _descriptor6 = _applyDecoratedDescriptor(_class2.prototype, "sineIn", [_dec3], {
configurable: true,
enumerable: true,
writable: true,
initializer: function initializer() {
return true;
}
}), _descriptor7 = _applyDecoratedDescriptor(_class2.prototype, "sineOut", [_dec4], {
configurable: true,
enumerable: true,
writable: true,
initializer: function initializer() {
return true;
}
}), _descriptor8 = _applyDecoratedDescriptor(_class2.prototype, "setToStart", [_dec5], {
configurable: true,
enumerable: true,
writable: true,
initializer: function initializer() {
return false;
}
})), _class2)) || _class));
_cclegacy._RF.pop();
_crd = false;
}
};
});
//# sourceMappingURL=45cfa33e80cce35c61b1acf7ea562fe31c3843dd.js.map
@@ -0,0 +1 @@
{"version":3,"sources":["file:///D:/Users/admin/Alien_Sniper/assets/scripts/framework/animation/ScaleComponent.ts"],"names":["_decorator","Component","easing","tween","Vec3","ccclass","property","ScaleComponent","displayName","onEnable","easeFunc","linear","sineIn","sineOut","setToStart","node","setScale","startPos","delay","call","to","moveTimer","scale","endPos","start"],"mappings":";;;;;;;;;;;;;;;;AAASA,MAAAA,U,OAAAA,U;AAAYC,MAAAA,S,OAAAA,S;AAAWC,MAAAA,M,OAAAA,M;AAAcC,MAAAA,K,OAAAA,K;AAAaC,MAAAA,I,OAAAA,I;;;;;;;;;OACrD;AAAEC,QAAAA,OAAF;AAAWC,QAAAA;AAAX,O,GAAwBN,U;;gCAGjBO,c,WADZF,OAAO,CAAC,gBAAD,C,UAeHC,QAAQ,CAAC;AAAEE,QAAAA,WAAW,EAAE;AAAf,OAAD,C,UAGRF,QAAQ,CAAC;AAAEE,QAAAA,WAAW,EAAE;AAAf,OAAD,C,UAGRF,QAAQ,CAAC;AAAEE,QAAAA,WAAW,EAAE;AAAf,OAAD,C,UAIRF,QAAQ,CAAC;AAAEE,QAAAA,WAAW,EAAE;AAAf,OAAD,C,2BAzBb,MACaD,cADb,SACoCN,SADpC,CAC8C;AAAA;AAAA;;AAAA;;AAAA;;AAAA;;AAAA;;AAAA;;AAAA;;AAAA;;AAAA;AAAA;;AA4BhCQ,QAAAA,QAAQ,GAAS;AAGvB,cAAIC,QAAQ,GAAGR,MAAM,CAACS,MAAtB;;AAEA,cAAI,KAAKC,MAAT,EAAiB;AACbF,YAAAA,QAAQ,GAAGR,MAAM,CAACU,MAAlB;AACH;;AAED,cAAI,KAAKC,OAAT,EAAkB;AACdH,YAAAA,QAAQ,GAAGR,MAAM,CAACW,OAAlB;AACH;;AAED,cAAI,KAAKC,UAAT,EAAqB;AACjB,iBAAKC,IAAL,CAAUC,QAAV,CAAmB,KAAKC,QAAxB;AACH;;AAGDd,UAAAA,KAAK,CAAC,KAAKY,IAAN,CAAL,CACKG,KADL,CACW,KAAKA,KADhB,EAEKC,IAFL,CAEU,MAAM;AACR,iBAAKJ,IAAL,CAAUC,QAAV,CAAmB,KAAKC,QAAxB;AACH,WAJL,EAKKG,EALL,CAKQ,KAAKC,SALb,EAKwB;AAAEC,YAAAA,KAAK,EAAE,KAAKC;AAAd,WALxB,EAKgD;AAAErB,YAAAA,MAAM,EAAEQ;AAAV,WALhD,EAMKc,KANL;AAOH;;AArDyC,O,2EAEzClB,Q;;;;;iBACgB,IAAIF,IAAJ,CAAS,CAAT,EAAY,CAAZ,EAAe,CAAf,C;;iFAEhBE,Q;;;;;iBACc,IAAIF,IAAJ,CAAS,CAAT,EAAY,CAAZ,EAAe,CAAf,C;;gFAEdE,Q;;;;;iBACe,C;;oFAEfA,Q;;;;;iBACmB,G;;;;;;;iBAGJ,I;;;;;;;iBAGE,I;;;;;;;iBAGC,I;;;;;;;iBAIG,K","sourcesContent":["import { _decorator, Component, easing, Node, tween, Vec2, Vec3 } from 'cc';\nconst { ccclass, property } = _decorator;\n\n@ccclass('ScaleComponent')\nexport class ScaleComponent extends Component {\n\n @property\n startPos: Vec3 = new Vec3(0, 0, 0);\n\n @property\n endPos: Vec3 = new Vec3(1, 1, 1);\n\n @property\n delay: number = 0;\n\n @property\n moveTimer: number = 0.1;\n\n @property({ displayName: \"线性\" })\n line: boolean = true;\n\n @property({ displayName: \"先慢后快\" })\n sineIn: boolean = true;\n\n @property({ displayName: \"先快后慢\" })\n sineOut: boolean = true;\n\n\n @property({ displayName: \"设置为初始值\" })\n setToStart: boolean = false;\n\n\n protected onEnable(): void {\n\n\n let easeFunc = easing.linear;\n\n if (this.sineIn) {\n easeFunc = easing.sineIn\n }\n\n if (this.sineOut) {\n easeFunc = easing.sineOut\n }\n\n if (this.setToStart) {\n this.node.setScale(this.startPos)\n }\n\n\n tween(this.node)\n .delay(this.delay)\n .call(() => {\n this.node.setScale(this.startPos)\n })\n .to(this.moveTimer, { scale: this.endPos }, { easing: easeFunc })\n .start()\n }\n\n\n}\n\n\n"]}