mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2025-10-10 03:45:23 +00:00
更新文档到 2.4.9-v1.0.0
This commit is contained in:
89
docs/static/demo/v1.0.0/web-mobile/assets/home/config.df293.json
vendored
Normal file
89
docs/static/demo/v1.0.0/web-mobile/assets/home/config.df293.json
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
{
|
||||
"paths": {
|
||||
"e3EaADwKFP+ZmDIVTeFF63": [
|
||||
"home",
|
||||
"cc.Prefab"
|
||||
]
|
||||
},
|
||||
"uuids": [
|
||||
"02kcE0s9pAmLe145ftvpR/",
|
||||
"29FYIk+N1GYaeWH/q1NxQO",
|
||||
"312JYturtOx74Zjp9UpOqZ",
|
||||
"34Wm35ZlJBApgKytyVFWhX",
|
||||
"56fc2Ai/RFNYpaMT8crweK",
|
||||
"5cO7kybDxGj4ipyMYdRYZB",
|
||||
"5f5dyqtRNNxaFmVzYns6FZ",
|
||||
"68J8oyAQdFUrqy37MXmbtE",
|
||||
"71VhFCTINJM6/Ky3oX9nBT",
|
||||
"73oJA92A5OPKpn+ZlUPAj1",
|
||||
"7a/QZLET9IDreTiBfRn2PD",
|
||||
"90AErWL21A4ZPvtxQ3XG8G",
|
||||
"93dM6KrkZCf5dgNpQwf7T6",
|
||||
"a2MjXRFdtLlYQ5ouAFv/+R",
|
||||
"d2kHe6FidKcpV5e1aiNTQM",
|
||||
"e3EaADwKFP+ZmDIVTeFF63",
|
||||
"e7q6FL+VZEgLJUjVeDLic/",
|
||||
"ecpdLyjvZBwrvm+cedCcQy"
|
||||
],
|
||||
"scenes": {},
|
||||
"redirect": [
|
||||
"34Wm35ZlJBApgKytyVFWhX",
|
||||
0,
|
||||
"5cO7kybDxGj4ipyMYdRYZB",
|
||||
1,
|
||||
"5f5dyqtRNNxaFmVzYns6FZ",
|
||||
1,
|
||||
"7a/QZLET9IDreTiBfRn2PD",
|
||||
2,
|
||||
"93dM6KrkZCf5dgNpQwf7T6",
|
||||
0,
|
||||
"a2MjXRFdtLlYQ5ouAFv/+R",
|
||||
1,
|
||||
"ecpdLyjvZBwrvm+cedCcQy",
|
||||
2
|
||||
],
|
||||
"deps": [
|
||||
"common",
|
||||
"main",
|
||||
"internal"
|
||||
],
|
||||
"packs": {
|
||||
"025f75dc8": [
|
||||
"02kcE0s9pAmLe145ftvpR/",
|
||||
"29FYIk+N1GYaeWH/q1NxQO",
|
||||
"312JYturtOx74Zjp9UpOqZ",
|
||||
"56fc2Ai/RFNYpaMT8crweK",
|
||||
"68J8oyAQdFUrqy37MXmbtE",
|
||||
"71VhFCTINJM6/Ky3oX9nBT",
|
||||
"73oJA92A5OPKpn+ZlUPAj1",
|
||||
"90AErWL21A4ZPvtxQ3XG8G",
|
||||
"d2kHe6FidKcpV5e1aiNTQM",
|
||||
"e3EaADwKFP+ZmDIVTeFF63",
|
||||
"e7q6FL+VZEgLJUjVeDLic/"
|
||||
]
|
||||
},
|
||||
"name": "home",
|
||||
"importBase": "import",
|
||||
"nativeBase": "native",
|
||||
"debug": true,
|
||||
"isZip": false,
|
||||
"encrypted": false,
|
||||
"versions": {
|
||||
"import": [
|
||||
"025f75dc8",
|
||||
"515a0"
|
||||
],
|
||||
"native": [
|
||||
"02kcE0s9pAmLe145ftvpR/",
|
||||
"b7a3e",
|
||||
"56fc2Ai/RFNYpaMT8crweK",
|
||||
"5f1d9",
|
||||
"71VhFCTINJM6/Ky3oX9nBT",
|
||||
"c06a9",
|
||||
"73oJA92A5OPKpn+ZlUPAj1",
|
||||
"7661e",
|
||||
"d2kHe6FidKcpV5e1aiNTQM",
|
||||
"65417"
|
||||
]
|
||||
}
|
||||
}
|
2534
docs/static/demo/v1.0.0/web-mobile/assets/home/import/02/025f75dc8.515a0.json
vendored
Normal file
2534
docs/static/demo/v1.0.0/web-mobile/assets/home/import/02/025f75dc8.515a0.json
vendored
Normal file
File diff suppressed because it is too large
Load Diff
136
docs/static/demo/v1.0.0/web-mobile/assets/home/index.df293.js
vendored
Normal file
136
docs/static/demo/v1.0.0/web-mobile/assets/home/index.df293.js
vendored
Normal file
@@ -0,0 +1,136 @@
|
||||
window.__require = function e(t, n, r) {
|
||||
function s(o, u) {
|
||||
if (!n[o]) {
|
||||
if (!t[o]) {
|
||||
var b = o.split("/");
|
||||
b = b[b.length - 1];
|
||||
if (!t[b]) {
|
||||
var a = "function" == typeof __require && __require;
|
||||
if (!u && a) return a(b, !0);
|
||||
if (i) return i(b, !0);
|
||||
throw new Error("Cannot find module '" + o + "'");
|
||||
}
|
||||
o = b;
|
||||
}
|
||||
var f = n[o] = {
|
||||
exports: {}
|
||||
};
|
||||
t[o][0].call(f.exports, function(e) {
|
||||
var n = t[o][1][e];
|
||||
return s(n || e);
|
||||
}, f, f.exports, e, t, n, r);
|
||||
}
|
||||
return n[o].exports;
|
||||
}
|
||||
var i = "function" == typeof __require && __require;
|
||||
for (var o = 0; o < r.length; o++) s(r[o]);
|
||||
return s;
|
||||
}({
|
||||
home: [ function(require, module, exports) {
|
||||
"use strict";
|
||||
cc._RF.push(module, "fae4avBZoFIhLI0tl2YbZCe", "home");
|
||||
"use strict";
|
||||
var __extends = this && this.__extends || function() {
|
||||
var extendStatics = function(d, b) {
|
||||
extendStatics = Object.setPrototypeOf || {
|
||||
__proto__: []
|
||||
} instanceof Array && function(d, b) {
|
||||
d.__proto__ = b;
|
||||
} || function(d, b) {
|
||||
for (var p in b) Object.prototype.hasOwnProperty.call(b, p) && (d[p] = b[p]);
|
||||
};
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function(d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() {
|
||||
this.constructor = d;
|
||||
}
|
||||
d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
}();
|
||||
var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if ("object" === typeof Reflect && "function" === typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (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
|
||||
});
|
||||
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
|
||||
var Home = function(_super) {
|
||||
__extends(Home, _super);
|
||||
function Home() {
|
||||
var _this = null !== _super && _super.apply(this, arguments) || this;
|
||||
_this.objectNumLabel = null;
|
||||
_this.objectNumSlider = null;
|
||||
_this.enbaleMultiNode = null;
|
||||
_this.objects = null;
|
||||
_this.nums = [ 10, 1e4 ];
|
||||
_this.num = _this.nums[0];
|
||||
_this.enableMultiRender = true;
|
||||
_this.prefabs = [];
|
||||
return _this;
|
||||
}
|
||||
Home.prototype.onLoad = function() {
|
||||
var _this = this;
|
||||
this.prefabs = this.objects.children.concat();
|
||||
this.objects.removeAllChildren(false);
|
||||
false;
|
||||
this.objectNumSlider.node.on("slide", function(slider) {
|
||||
var offset = (_this.nums[1] - _this.nums[0]) * slider.progress;
|
||||
_this.num = _this.nums[0] + Math.ceil(offset);
|
||||
_this.numUpdate();
|
||||
});
|
||||
this.enbaleMultiNode.on("toggle", function(toggle) {
|
||||
_this.enableMultiRender = toggle.isChecked;
|
||||
_this.multiRenderUpdate();
|
||||
});
|
||||
this.objectNumSlider.progress = .02;
|
||||
var offset = (this.nums[1] - this.nums[0]) * this.objectNumSlider.progress;
|
||||
this.num = this.nums[0] + Math.ceil(offset);
|
||||
this.numUpdate();
|
||||
this.multiRenderUpdate();
|
||||
};
|
||||
Home.prototype.numUpdate = function() {
|
||||
this.objectNumLabel.string = "\u5bf9\u8c61\u6570\u91cf\uff1a" + this.num;
|
||||
var offset = this.num - this.objects.children.length;
|
||||
if (offset > 0) for (var i = 0; i < offset; i++) this.createObject(); else {
|
||||
offset = -offset;
|
||||
for (var i = 0; i < offset; i++) this.objects.children[i].destroy();
|
||||
}
|
||||
};
|
||||
Home.prototype.multiRenderUpdate = function() {
|
||||
this.reCreateObjects();
|
||||
};
|
||||
Home.prototype.reCreateObjects = function() {
|
||||
this.objects.destroyAllChildren();
|
||||
for (var i = 0; i < this.num; i++) this.createObject();
|
||||
};
|
||||
Home.prototype.createObject = function() {
|
||||
var _a, _b, _c;
|
||||
var random = Math.floor(Math.random() * this.prefabs.length);
|
||||
var node = cc.instantiate(this.prefabs[random]);
|
||||
if (this.enableMultiRender) {
|
||||
var comp = null !== (_c = null !== (_b = null !== (_a = node.getComponent(cc.Label)) && void 0 !== _a ? _a : node.getComponent(cc.Sprite)) && void 0 !== _b ? _b : node.getComponent(cc.RichText)) && void 0 !== _c ? _c : node.getComponent(sp.Skeleton);
|
||||
comp.autoSwitchMaterial = cc.RenderComponent.EnableType.ENABLE;
|
||||
comp.allowDynamicAtlas = cc.RenderComponent.EnableType.ENABLE;
|
||||
}
|
||||
this.objects.addChild(node);
|
||||
node.position = cc.v3(Math.floor(Math.random() * this.objects.width), Math.floor(Math.random() * this.objects.height));
|
||||
cc.tween(node).by(3, {
|
||||
angle: 360
|
||||
}).repeatForever().start();
|
||||
};
|
||||
__decorate([ property(cc.Label) ], Home.prototype, "objectNumLabel", void 0);
|
||||
__decorate([ property(cc.Slider) ], Home.prototype, "objectNumSlider", void 0);
|
||||
__decorate([ property(cc.Node) ], Home.prototype, "enbaleMultiNode", void 0);
|
||||
__decorate([ property(cc.Node) ], Home.prototype, "objects", void 0);
|
||||
Home = __decorate([ ccclass ], Home);
|
||||
return Home;
|
||||
}(cc.Component);
|
||||
exports.default = Home;
|
||||
cc._RF.pop();
|
||||
}, {} ]
|
||||
}, {}, [ "home" ]);
|
||||
//# sourceMappingURL=index.js.map
|
1
docs/static/demo/v1.0.0/web-mobile/assets/home/index.js.map
vendored
Normal file
1
docs/static/demo/v1.0.0/web-mobile/assets/home/index.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
Reference in New Issue
Block a user