两个版本的插件

This commit is contained in:
onvia
2023-07-20 19:00:23 +08:00
parent 44bce05250
commit 68895155e5
2385 changed files with 1826008 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.UIObject = void 0;
const config_1 = require("../config");
const EditorVersion_1 = require("../EditorVersion");
const Utils_1 = require("../utils/Utils");
const _decorator_1 = require("../_decorator");
class UIObject {
constructor() {
this.uuid = "";
this.idx = 0;
this.uuid = Utils_1.utils.uuid();
}
toJSON() {
var _a;
let data = {};
for (const key in this) {
if (Object.prototype.hasOwnProperty.call(this, key)) {
// @ts-ignore
if (this.__unserialization && this.__unserialization.indexOf(key) !== -1) {
continue;
}
// @ts-ignore
let ver_tag = this.constructor.__ver_tag_id__;
// 判断编辑器版本
// @ts-ignore
if (this._version && ((_a = this._version[ver_tag]) === null || _a === void 0 ? void 0 : _a[key])) {
// @ts-ignore
if (!this._version[ver_tag][key][EditorVersion_1.EditorVersion[config_1.config.editorVersion]]) {
continue;
}
}
const value = this[key];
data[key] = value;
}
}
return data;
}
}
__decorate([
_decorator_1.nonserialization
], UIObject.prototype, "uuid", void 0);
__decorate([
_decorator_1.nonserialization
], UIObject.prototype, "idx", void 0);
exports.UIObject = UIObject;

View File

@@ -0,0 +1,87 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CCButton = void 0;
const EditorVersion_1 = require("../../EditorVersion");
const _decorator_1 = require("../../_decorator");
const CCComponent_1 = require("./CCComponent");
let CCButton = class CCButton extends CCComponent_1.CCComponent {
constructor() {
super(...arguments);
// 2.4.x
this.duration = 0.1;
// 2.4.x
this.zoomScale = 1.2;
this.clickEvents = [];
// 2.4.x
this._N$interactable = true;
// 2.4.x
this._N$enableAutoGrayEffect = false;
// 2.4.x
this._N$transition = 3;
// 2.4.x
this.transition = 3;
// 2.4.x
this._N$target = null;
// 3.4.x
this._interactable = true;
// 3.4.x
this._transition = 3;
// 3.4.x
this._duration = 0.1;
// 3.4.x
this._zoomScale = 1.2;
// 3.4.x
this._target = null;
}
updateWithLayer(psdLayer) {
}
};
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCButton.prototype, "duration", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCButton.prototype, "zoomScale", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCButton.prototype, "clickEvents", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCButton.prototype, "_N$interactable", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCButton.prototype, "_N$enableAutoGrayEffect", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCButton.prototype, "_N$transition", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCButton.prototype, "transition", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCButton.prototype, "_N$target", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCButton.prototype, "_interactable", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCButton.prototype, "_transition", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCButton.prototype, "_duration", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCButton.prototype, "_zoomScale", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCButton.prototype, "_target", void 0);
CCButton = __decorate([
(0, _decorator_1.cctype)("cc.Button")
], CCButton);
exports.CCButton = CCButton;

View File

@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CCCompPrefabInfo = void 0;
const Utils_1 = require("../../utils/Utils");
const UIObject_1 = require("../UIObject");
// @cctype("cc.CompPrefabInfo")
class CCCompPrefabInfo extends UIObject_1.UIObject {
constructor() {
super();
this.__type__ = "cc.CompPrefabInfo";
this.fileId = "";
this.fileId = Utils_1.utils.compressUuid(this.uuid);
}
}
exports.CCCompPrefabInfo = CCCompPrefabInfo;

View File

@@ -0,0 +1,35 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CCComponent = void 0;
const EditorVersion_1 = require("../../EditorVersion");
const _decorator_1 = require("../../_decorator");
const CCObject_1 = require("./CCObject");
class CCComponent extends CCObject_1.CCObject {
constructor() {
super(...arguments);
this._enabled = true;
this.node = null;
this._id = "";
// 3.4.x
this.__prefab = null;
}
}
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCComponent.prototype, "_enabled", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCComponent.prototype, "node", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCComponent.prototype, "_id", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCComponent.prototype, "__prefab", void 0);
exports.CCComponent = CCComponent;

View File

@@ -0,0 +1,167 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CCLabel = void 0;
const config_1 = require("../../config");
const EditorVersion_1 = require("../../EditorVersion");
const _decorator_1 = require("../../_decorator");
const CCComponent_1 = require("./CCComponent");
const CCColor_1 = require("./values/CCColor");
let CCLabel = class CCLabel extends CCComponent_1.CCComponent {
constructor() {
super(...arguments);
this._srcBlendFactor = 770; // 3.4.x = 2
this._dstBlendFactor = 771; // 3.4.x = 4
this._string = "";
this._fontSize = 0;
this._lineHeight = 0;
this._enableWrapText = true;
this._isSystemFontUsed = true;
this._spacingX = 0;
this._underlineHeight = 0;
this._materials = [];
// 2.4.x
this._N$string = "";
// 2.4.x
this._N$file = null;
// 2.4.x
this._batchAsBitmap = false;
// 2.4.x
this._styleFlags = 0;
// 2.4.x
this._N$horizontalAlign = 1;
// 2.4.x
this._N$verticalAlign = 1;
// 2.4.x
this._N$fontFamily = "Arial";
// 2.4.x
this._N$overflow = 0;
// 2.4.x
this._N$cacheMode = 0;
// 3.4.x
this._visFlags = 0;
// 3.4.x
this._customMaterial = null;
// 3.4.x
this._color = new CCColor_1.CCColor(255, 255, 255, 255);
// 3.4.x
this._overflow = 0;
// // 3.4.x
this._cacheMode = 0;
this._horizontalAlign = 1;
this._verticalAlign = 1;
this._actualFontSize = 0;
this._isItalic = false;
this._isBold = false;
this._isUnderline = false;
}
updateWithLayer(psdLayer) {
this._fontSize = psdLayer.fontSize;
// this._actualFontSize = this._fontSize;
this._string = this._N$string = psdLayer.text;
this._lineHeight = this._fontSize + config_1.config.textLineHeightOffset;
if (config_1.config.editorVersion >= EditorVersion_1.EditorVersion.v342) {
this._srcBlendFactor = 2;
this._dstBlendFactor = 4;
}
}
};
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCLabel.prototype, "_srcBlendFactor", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCLabel.prototype, "_dstBlendFactor", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCLabel.prototype, "_string", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCLabel.prototype, "_fontSize", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCLabel.prototype, "_lineHeight", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCLabel.prototype, "_enableWrapText", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCLabel.prototype, "_isSystemFontUsed", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCLabel.prototype, "_spacingX", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCLabel.prototype, "_underlineHeight", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCLabel.prototype, "_materials", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCLabel.prototype, "_N$string", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCLabel.prototype, "_N$file", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCLabel.prototype, "_batchAsBitmap", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCLabel.prototype, "_styleFlags", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCLabel.prototype, "_N$horizontalAlign", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCLabel.prototype, "_N$verticalAlign", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCLabel.prototype, "_N$fontFamily", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCLabel.prototype, "_N$overflow", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCLabel.prototype, "_N$cacheMode", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCLabel.prototype, "_visFlags", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCLabel.prototype, "_customMaterial", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCLabel.prototype, "_color", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCLabel.prototype, "_overflow", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCLabel.prototype, "_cacheMode", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCLabel.prototype, "_horizontalAlign", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCLabel.prototype, "_verticalAlign", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCLabel.prototype, "_actualFontSize", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCLabel.prototype, "_isItalic", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCLabel.prototype, "_isBold", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCLabel.prototype, "_isUnderline", void 0);
CCLabel = __decorate([
(0, _decorator_1.cctype)("cc.Label")
], CCLabel);
exports.CCLabel = CCLabel;

View File

@@ -0,0 +1,34 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CCLabelOutline = void 0;
const EditorVersion_1 = require("../../EditorVersion");
const _decorator_1 = require("../../_decorator");
const CCComponent_1 = require("./CCComponent");
const CCColor_1 = require("./values/CCColor");
let CCLabelOutline = class CCLabelOutline extends CCComponent_1.CCComponent {
constructor() {
super(...arguments);
this._color = new CCColor_1.CCColor(255, 255, 255, 255);
this._width = 1;
}
updateWithLayer(psdLayer) {
this._width = psdLayer.outline.width;
this._color.set(psdLayer.outline.color);
}
};
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCLabelOutline.prototype, "_color", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCLabelOutline.prototype, "_width", void 0);
CCLabelOutline = __decorate([
(0, _decorator_1.cctype)("cc.LabelOutline")
], CCLabelOutline);
exports.CCLabelOutline = CCLabelOutline;

View File

@@ -0,0 +1,177 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CCNode = void 0;
const config_1 = require("../../config");
const EditorVersion_1 = require("../../EditorVersion");
const _decorator_1 = require("../../_decorator");
const CCCompPrefabInfo_1 = require("./CCCompPrefabInfo");
const CCObject_1 = require("./CCObject");
const CCColor_1 = require("./values/CCColor");
const CCSize_1 = require("./values/CCSize");
const CCTypedArray_1 = require("./values/CCTypedArray");
const CCVec2_1 = require("./values/CCVec2");
const CCVec3_1 = require("./values/CCVec3");
let CCNode = class CCNode extends CCObject_1.CCObject {
constructor(psdDoc) {
super();
this._parent = null;
this._children = [];
this._active = true;
this._components = [];
this._prefab = null;
this._id = "";
// 2.4.x
this._opacity = 255;
// 2.4.x
this._color = new CCColor_1.CCColor(255, 255, 255, 255);
// 2.4.x
this._contentSize = new CCSize_1.CCSize();
// 2.4.x
this._anchorPoint = new CCVec2_1.CCVec2(0, 0);
// 2.4.x
this._trs = new CCTypedArray_1.CCTypedArray();
// 2.4.x
this._eulerAngles = new CCVec3_1.CCVec3();
// 2.4.x
this._skewX = 0;
// 2.4.x
this._skewY = 0;
// 2.4.x
this._is3DNode = false;
// 2.4.x
this._groupIndex = 0;
// 2.4.x
this.groupIndex = 0;
// 2.4.x
this._renderEnable = false;
// 2.4.x
this._bfsRenderFlag = false;
// 3.4.x
this._lpos = new CCVec3_1.CCVec3();
// 3.4.x
this._lrot = new CCVec3_1.CCVec3();
// 3.4.x
this._lscale = new CCVec3_1.CCVec3();
// 3.4.x
this._euler = new CCVec3_1.CCVec3();
// 3.4.x
this._layer = 33554432;
this.psdDoc = null;
this.components = [];
this.children = [];
if (psdDoc) {
this.psdDoc = psdDoc;
psdDoc.pushObject(this);
}
}
addComponent(comp) {
comp.node = { __id__: this.idx };
let compIdx = this.psdDoc.pushObject(comp);
this._components.push({ __id__: compIdx });
this.components.push(comp);
if (config_1.config.editorVersion >= EditorVersion_1.EditorVersion.v342) {
this.addCompPrefabInfo(comp);
}
}
addCompPrefabInfo(comp) {
let compInfo = new CCCompPrefabInfo_1.CCCompPrefabInfo();
let compIdx = this.psdDoc.pushObject(compInfo);
comp.__prefab = { __id__: compIdx };
}
addChild(child) {
this._children.push({ __id__: child.idx });
child._parent = { __id__: this.idx };
this.children.push(child);
}
};
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCNode.prototype, "_parent", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCNode.prototype, "_children", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCNode.prototype, "_active", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCNode.prototype, "_components", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCNode.prototype, "_prefab", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCNode.prototype, "_id", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCNode.prototype, "_opacity", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCNode.prototype, "_color", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCNode.prototype, "_contentSize", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCNode.prototype, "_anchorPoint", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCNode.prototype, "_trs", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCNode.prototype, "_eulerAngles", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCNode.prototype, "_skewX", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCNode.prototype, "_skewY", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCNode.prototype, "_is3DNode", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCNode.prototype, "_groupIndex", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCNode.prototype, "groupIndex", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCNode.prototype, "_renderEnable", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCNode.prototype, "_bfsRenderFlag", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCNode.prototype, "_lpos", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCNode.prototype, "_lrot", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCNode.prototype, "_lscale", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCNode.prototype, "_euler", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCNode.prototype, "_layer", void 0);
__decorate([
_decorator_1.nonserialization
], CCNode.prototype, "psdDoc", void 0);
__decorate([
_decorator_1.nonserialization
], CCNode.prototype, "components", void 0);
__decorate([
_decorator_1.nonserialization
], CCNode.prototype, "children", void 0);
CCNode = __decorate([
(0, _decorator_1.cctype)("cc.Node")
], CCNode);
exports.CCNode = CCNode;

View File

@@ -0,0 +1,31 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CCObject = void 0;
const EditorVersion_1 = require("../../EditorVersion");
const _decorator_1 = require("../../_decorator");
const UIObject_1 = require("../UIObject");
class CCObject extends UIObject_1.UIObject {
constructor() {
super();
this._name = "";
this._objFlags = 0;
// @ts-ignore
this.__type__ = this.$__type__;
}
}
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCObject.prototype, "__type__", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCObject.prototype, "_name", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCObject.prototype, "_objFlags", void 0);
exports.CCObject = CCObject;

View File

@@ -0,0 +1,47 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CCPrefab = void 0;
const EditorVersion_1 = require("../../EditorVersion");
const _decorator_1 = require("../../_decorator");
const CCObject_1 = require("./CCObject");
let CCPrefab = class CCPrefab extends CCObject_1.CCObject {
constructor() {
super(...arguments);
this._native = "";
this.data = null;
this.optimizationPolicy = 0;
this.asyncLoadAssets = false;
// 2.4.x
this.readonly = false;
// // 3.4.x
this.persistent = false;
}
};
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCPrefab.prototype, "_native", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCPrefab.prototype, "data", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCPrefab.prototype, "optimizationPolicy", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCPrefab.prototype, "asyncLoadAssets", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCPrefab.prototype, "readonly", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCPrefab.prototype, "persistent", void 0);
CCPrefab = __decorate([
(0, _decorator_1.cctype)("cc.Prefab")
], CCPrefab);
exports.CCPrefab = CCPrefab;

View File

@@ -0,0 +1,41 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CCPrefabInfo = void 0;
const EditorVersion_1 = require("../../EditorVersion");
const Utils_1 = require("../../utils/Utils");
const _decorator_1 = require("../../_decorator");
const UIObject_1 = require("../UIObject");
// @cctype("cc.PrefabInfo")
class CCPrefabInfo extends UIObject_1.UIObject {
constructor() {
super();
this.__type__ = "cc.PrefabInfo";
this.root = { __id__: 1 };
this.asset = { __id__: 0 };
this.fileId = "";
this.sync = false;
this.fileId = Utils_1.utils.compressUuid(this.uuid);
}
}
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCPrefabInfo.prototype, "__type__", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCPrefabInfo.prototype, "root", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCPrefabInfo.prototype, "asset", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCPrefabInfo.prototype, "fileId", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCPrefabInfo.prototype, "sync", void 0);
exports.CCPrefabInfo = CCPrefabInfo;

View File

@@ -0,0 +1,98 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CCProgressBar = void 0;
const EditorVersion_1 = require("../../EditorVersion");
const _decorator_1 = require("../../_decorator");
const CCComponent_1 = require("./CCComponent");
const CCSprite_1 = require("./CCSprite");
let CCProgressBar = class CCProgressBar extends CCComponent_1.CCComponent {
constructor() {
super(...arguments);
// 2.4.x
this._N$totalLength = 0;
// 2.4.x
this._N$barSprite = null;
// 2.4.x
this._N$mode = 0;
// 2.4.x
this._N$progress = 1;
// 2.4.x
this._N$reverse = false;
// 3.4.x
this._barSprite = null;
// 3.4.x
this._mode = 0;
// 3.4.x
this._totalLength = 0;
// 3.4.x
this._progress = 1;
// 3.4.x
this._reverse = false;
}
setBar(sprite) {
this._barSprite = this._N$barSprite = {
__id__: sprite.idx
};
}
updateWithLayer(psdLayer) {
if (!psdLayer.children) {
console.error(`CCProgressBar-> 只能作用在 组图层 上`);
return;
}
outer: for (let i = 0; i < psdLayer.children.length; i++) {
const child = psdLayer.children[i];
if (child.attr.comps.bar) {
let node = child.uiObject;
// 暂时只有横向进度条
this._totalLength = this._N$totalLength = node._contentSize.width;
for (let j = 0; j < node.components.length; j++) {
const comp = node.components[j];
if (comp instanceof CCSprite_1.CCSprite) {
this.setBar(comp);
break outer;
}
}
}
}
}
};
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCProgressBar.prototype, "_N$totalLength", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCProgressBar.prototype, "_N$barSprite", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCProgressBar.prototype, "_N$mode", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCProgressBar.prototype, "_N$progress", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCProgressBar.prototype, "_N$reverse", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCProgressBar.prototype, "_barSprite", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCProgressBar.prototype, "_mode", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCProgressBar.prototype, "_totalLength", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCProgressBar.prototype, "_progress", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCProgressBar.prototype, "_reverse", void 0);
CCProgressBar = __decorate([
(0, _decorator_1.cctype)("cc.ProgressBar")
], CCProgressBar);
exports.CCProgressBar = CCProgressBar;

View File

@@ -0,0 +1,117 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CCSprite = void 0;
const config_1 = require("../../config");
const EditorVersion_1 = require("../../EditorVersion");
const _decorator_1 = require("../../_decorator");
const CCComponent_1 = require("./CCComponent");
const CCColor_1 = require("./values/CCColor");
const CCVec2_1 = require("./values/CCVec2");
let CCSprite = class CCSprite extends CCComponent_1.CCComponent {
constructor() {
super(...arguments);
// 2.4.x
this._materials = [];
this._srcBlendFactor = 770; // 3.4.x = 2
this._dstBlendFactor = 771; // 3.4.x = 4
this._spriteFrame = null;
this._type = 0;
this._sizeMode = 1;
this._fillType = 0;
this._fillCenter = new CCVec2_1.CCVec2();
this._fillStart = 0;
this._fillRange = 0;
this._isTrimmedMode = true;
this._atlas = null;
// 3.4.x
this._visFlags = 0;
// 3.4.x
this._customMaterial = null;
// 3.4.x
this._color = new CCColor_1.CCColor(255, 255, 255, 255);
// 3.4.x
this._useGrayscale = false;
}
use9() {
this._type = 1;
this._sizeMode = 0;
}
updateWithLayer(psdLayer) {
if (psdLayer.s9) {
this.use9();
}
if (Math.abs(psdLayer.scale.x) != 1 || Math.abs(psdLayer.scale.y) != 1) {
this._sizeMode = 0;
}
if (config_1.config.editorVersion >= EditorVersion_1.EditorVersion.v342) {
this._srcBlendFactor = 2;
this._dstBlendFactor = 4;
}
}
setSpriteFrame(uuid) {
if (config_1.config.editorVersion >= EditorVersion_1.EditorVersion.v342) {
this._spriteFrame = { __uuid__: `${uuid}@f9941`, __expectedType__: "cc.SpriteFrame" };
}
else {
this._spriteFrame = { __uuid__: uuid };
}
}
};
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCSprite.prototype, "_materials", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCSprite.prototype, "_srcBlendFactor", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCSprite.prototype, "_dstBlendFactor", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCSprite.prototype, "_spriteFrame", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCSprite.prototype, "_type", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCSprite.prototype, "_sizeMode", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCSprite.prototype, "_fillType", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCSprite.prototype, "_fillCenter", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCSprite.prototype, "_fillStart", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCSprite.prototype, "_fillRange", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCSprite.prototype, "_isTrimmedMode", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCSprite.prototype, "_atlas", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCSprite.prototype, "_visFlags", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCSprite.prototype, "_customMaterial", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCSprite.prototype, "_color", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCSprite.prototype, "_useGrayscale", void 0);
CCSprite = __decorate([
(0, _decorator_1.cctype)("cc.Sprite")
], CCSprite);
exports.CCSprite = CCSprite;

View File

@@ -0,0 +1,75 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CCToggle = void 0;
const EditorVersion_1 = require("../../EditorVersion");
const _decorator_1 = require("../../_decorator");
const CCButton_1 = require("./CCButton");
const CCSprite_1 = require("./CCSprite");
let CCToggle = class CCToggle extends CCButton_1.CCButton {
constructor() {
super(...arguments);
// 2.4.x
this._N$isChecked = true;
// 2.4.x
this.toggleGroup = null;
// 2.4.x
this.checkMark = null;
this.checkEvents = [];
// 3.4.x
this._isChecked = true;
// 3.4.x
this._checkMark = null;
}
setCheckMark(sprite) {
this._checkMark = this.checkMark = {
__id__: sprite.idx
};
}
updateWithLayer(psdLayer) {
if (!psdLayer.children) {
console.error(`CCToggle-> 只能作用在 组图层 上`);
return;
}
outer: for (let i = 0; i < psdLayer.children.length; i++) {
const child = psdLayer.children[i];
if (child.attr.comps.check) {
let node = child.uiObject;
for (let j = 0; j < node.components.length; j++) {
const comp = node.components[j];
if (comp instanceof CCSprite_1.CCSprite) {
this.setCheckMark(comp);
break outer;
}
}
}
}
}
};
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCToggle.prototype, "_N$isChecked", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCToggle.prototype, "toggleGroup", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v249)
], CCToggle.prototype, "checkMark", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.all)
], CCToggle.prototype, "checkEvents", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCToggle.prototype, "_isChecked", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCToggle.prototype, "_checkMark", void 0);
CCToggle = __decorate([
(0, _decorator_1.cctype)("cc.Toggle")
], CCToggle);
exports.CCToggle = CCToggle;

View File

@@ -0,0 +1,28 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CCUIOpacity = void 0;
const EditorVersion_1 = require("../../EditorVersion");
const _decorator_1 = require("../../_decorator");
const CCComponent_1 = require("./CCComponent");
// 3.4.x
let CCUIOpacity = class CCUIOpacity extends CCComponent_1.CCComponent {
constructor() {
super(...arguments);
this._opacity = 255;
}
updateWithLayer(psdLayer) {
}
};
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCUIOpacity.prototype, "_opacity", void 0);
CCUIOpacity = __decorate([
(0, _decorator_1.cctype)("cc.UIOpacity")
], CCUIOpacity);
exports.CCUIOpacity = CCUIOpacity;

View File

@@ -0,0 +1,34 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CCUITransform = void 0;
const EditorVersion_1 = require("../../EditorVersion");
const _decorator_1 = require("../../_decorator");
const CCComponent_1 = require("./CCComponent");
const CCSize_1 = require("./values/CCSize");
const CCVec2_1 = require("./values/CCVec2");
// 3.4.x
let CCUITransform = class CCUITransform extends CCComponent_1.CCComponent {
constructor() {
super(...arguments);
this._contentSize = new CCSize_1.CCSize();
this._anchorPoint = new CCVec2_1.CCVec2(0, 0);
}
updateWithLayer(psdLayer) {
}
};
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCUITransform.prototype, "_contentSize", void 0);
__decorate([
(0, _decorator_1.ccversion)(EditorVersion_1.EditorVersion.v342)
], CCUITransform.prototype, "_anchorPoint", void 0);
CCUITransform = __decorate([
(0, _decorator_1.cctype)("cc.UITransform")
], CCUITransform);
exports.CCUITransform = CCUITransform;

View File

@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CCColor = void 0;
const Color_1 = require("../../../values/Color");
class CCColor extends Color_1.Color {
constructor() {
super(...arguments);
this.__type__ = "cc.Color";
}
}
exports.CCColor = CCColor;

View File

@@ -0,0 +1,21 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CCSize = void 0;
const Size_1 = require("../../../values/Size");
const _decorator_1 = require("../../../_decorator");
let CCSize = class CCSize extends Size_1.Size {
constructor() {
super(...arguments);
this.__type__ = "cc.Size";
}
};
CCSize = __decorate([
(0, _decorator_1.cctype)("cc.Size")
], CCSize);
exports.CCSize = CCSize;

View File

@@ -0,0 +1,37 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CCTypedArray = void 0;
const _decorator_1 = require("../../../_decorator");
let CCTypedArray = class CCTypedArray {
constructor() {
this.__type__ = "TypedArray";
this.ctor = "Float64Array";
this.array = [];
}
setPosition(x, y, z) {
this.array[0] = x;
this.array[1] = y;
this.array[2] = z;
}
setRotation(x, y, z, w) {
this.array[3] = x;
this.array[4] = y;
this.array[5] = z;
this.array[6] = w;
}
setScale(x, y, z) {
this.array[7] = x;
this.array[8] = y;
this.array[9] = z;
}
};
CCTypedArray = __decorate([
(0, _decorator_1.cctype)("TypedArray")
], CCTypedArray);
exports.CCTypedArray = CCTypedArray;

View File

@@ -0,0 +1,21 @@
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CCVec2 = void 0;
const Vec2_1 = require("../../../values/Vec2");
const _decorator_1 = require("../../../_decorator");
let CCVec2 = class CCVec2 extends Vec2_1.Vec2 {
constructor() {
super(...arguments);
this.__type__ = "cc.Vec2";
}
};
CCVec2 = __decorate([
(0, _decorator_1.cctype)("cc.Vec2")
], CCVec2);
exports.CCVec2 = CCVec2;

View File

@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CCVec3 = void 0;
const Vec3_1 = require("../../../values/Vec3");
class CCVec3 extends Vec3_1.Vec3 {
constructor() {
super(...arguments);
this.__type__ = "cc.Vec3";
}
}
exports.CCVec3 = CCVec3;